Import rename module
[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
09607c9e
TT
659PTHREAD_H_DEFINES_STRUCT_TIMESPEC
660SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
661TIME_H_DEFINES_STRUCT_TIMESPEC
662NEXT_AS_FIRST_DIRECTIVE_TIME_H
663NEXT_TIME_H
664REPLACE_TIMEGM
665REPLACE_NANOSLEEP
666REPLACE_MKTIME
667REPLACE_LOCALTIME_R
668HAVE_TIMEGM
669HAVE_STRPTIME
670HAVE_NANOSLEEP
671HAVE_DECL_LOCALTIME_R
672GNULIB_TIME_R
673GNULIB_TIMEGM
674GNULIB_STRPTIME
675GNULIB_NANOSLEEP
676GNULIB_MKTIME
63ce7108
TT
677WINDOWS_64_BIT_OFF_T
678NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
679NEXT_SYS_TYPES_H
09607c9e
TT
680MKDIR_P
681WINDOWS_64_BIT_ST_SIZE
682NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
683NEXT_SYS_STAT_H
2196f55f
YQ
684NEXT_AS_FIRST_DIRECTIVE_STRING_H
685NEXT_STRING_H
98399780
YQ
686NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
687NEXT_STDLIB_H
6a29c58e
YQ
688NEXT_AS_FIRST_DIRECTIVE_STDIO_H
689NEXT_STDIO_H
2196f55f
YQ
690NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
691NEXT_STDDEF_H
692GL_GENERATE_STDDEF_H_FALSE
693GL_GENERATE_STDDEF_H_TRUE
694STDDEF_H
695HAVE_WCHAR_T
696REPLACE_NULL
697HAVE__BOOL
698GL_GENERATE_STDBOOL_H_FALSE
699GL_GENERATE_STDBOOL_H_TRUE
700STDBOOL_H
6a29c58e
YQ
701REPLACE_VSPRINTF
702REPLACE_VSNPRINTF
703REPLACE_VPRINTF
704REPLACE_VFPRINTF
705REPLACE_VDPRINTF
706REPLACE_VASPRINTF
707REPLACE_TMPFILE
708REPLACE_STDIO_WRITE_FUNCS
709REPLACE_STDIO_READ_FUNCS
710REPLACE_SPRINTF
711REPLACE_SNPRINTF
712REPLACE_RENAMEAT
713REPLACE_RENAME
714REPLACE_REMOVE
715REPLACE_PRINTF
716REPLACE_POPEN
717REPLACE_PERROR
718REPLACE_OBSTACK_PRINTF
719REPLACE_GETLINE
720REPLACE_GETDELIM
721REPLACE_FTELLO
722REPLACE_FTELL
723REPLACE_FSEEKO
724REPLACE_FSEEK
725REPLACE_FREOPEN
726REPLACE_FPURGE
727REPLACE_FPRINTF
728REPLACE_FOPEN
729REPLACE_FFLUSH
730REPLACE_FDOPEN
731REPLACE_FCLOSE
732REPLACE_DPRINTF
733HAVE_VDPRINTF
734HAVE_VASPRINTF
735HAVE_RENAMEAT
736HAVE_POPEN
737HAVE_PCLOSE
738HAVE_FTELLO
739HAVE_FSEEKO
740HAVE_DPRINTF
741HAVE_DECL_VSNPRINTF
742HAVE_DECL_SNPRINTF
743HAVE_DECL_OBSTACK_PRINTF
744HAVE_DECL_GETLINE
745HAVE_DECL_GETDELIM
746HAVE_DECL_FTELLO
747HAVE_DECL_FSEEKO
748HAVE_DECL_FPURGE
749GNULIB_VSPRINTF_POSIX
750GNULIB_VSNPRINTF
751GNULIB_VPRINTF_POSIX
752GNULIB_VPRINTF
753GNULIB_VFPRINTF_POSIX
754GNULIB_VFPRINTF
755GNULIB_VDPRINTF
756GNULIB_VSCANF
757GNULIB_VFSCANF
758GNULIB_VASPRINTF
759GNULIB_TMPFILE
760GNULIB_STDIO_H_SIGPIPE
761GNULIB_STDIO_H_NONBLOCKING
762GNULIB_SPRINTF_POSIX
763GNULIB_SNPRINTF
764GNULIB_SCANF
765GNULIB_RENAMEAT
766GNULIB_RENAME
767GNULIB_REMOVE
768GNULIB_PUTS
769GNULIB_PUTCHAR
770GNULIB_PUTC
771GNULIB_PRINTF_POSIX
772GNULIB_PRINTF
773GNULIB_POPEN
774GNULIB_PERROR
775GNULIB_PCLOSE
776GNULIB_OBSTACK_PRINTF_POSIX
777GNULIB_OBSTACK_PRINTF
778GNULIB_GETLINE
779GNULIB_GETDELIM
780GNULIB_GETCHAR
781GNULIB_GETC
782GNULIB_FWRITE
783GNULIB_FTELLO
784GNULIB_FTELL
785GNULIB_FSEEKO
786GNULIB_FSEEK
787GNULIB_FSCANF
788GNULIB_FREOPEN
789GNULIB_FREAD
790GNULIB_FPUTS
791GNULIB_FPUTC
792GNULIB_FPURGE
793GNULIB_FPRINTF_POSIX
794GNULIB_FPRINTF
795GNULIB_FOPEN
796GNULIB_FGETS
797GNULIB_FGETC
798GNULIB_FFLUSH
799GNULIB_FDOPEN
800GNULIB_FCLOSE
801GNULIB_DPRINTF
c971b7fa
PA
802UNDEFINE_STRTOK_R
803REPLACE_STRTOK_R
804REPLACE_STRSIGNAL
805REPLACE_STRNLEN
806REPLACE_STRNDUP
807REPLACE_STRNCAT
808REPLACE_STRERROR_R
809REPLACE_STRERROR
810REPLACE_STRCHRNUL
811REPLACE_STRCASESTR
812REPLACE_STRSTR
813REPLACE_STRDUP
814REPLACE_STPNCPY
815REPLACE_MEMMEM
816REPLACE_MEMCHR
817HAVE_STRVERSCMP
818HAVE_DECL_STRSIGNAL
819HAVE_DECL_STRERROR_R
820HAVE_DECL_STRTOK_R
821HAVE_STRCASESTR
822HAVE_STRSEP
823HAVE_STRPBRK
824HAVE_DECL_STRNLEN
825HAVE_DECL_STRNDUP
826HAVE_DECL_STRDUP
827HAVE_STRCHRNUL
828HAVE_STPNCPY
829HAVE_STPCPY
830HAVE_RAWMEMCHR
831HAVE_DECL_MEMRCHR
832HAVE_MEMPCPY
833HAVE_DECL_MEMMEM
834HAVE_MEMCHR
835HAVE_FFSLL
836HAVE_FFSL
837HAVE_MBSLEN
838GNULIB_STRVERSCMP
839GNULIB_STRSIGNAL
840GNULIB_STRERROR_R
841GNULIB_STRERROR
842GNULIB_MBSTOK_R
843GNULIB_MBSSEP
844GNULIB_MBSSPN
845GNULIB_MBSPBRK
846GNULIB_MBSCSPN
847GNULIB_MBSCASESTR
848GNULIB_MBSPCASECMP
849GNULIB_MBSNCASECMP
850GNULIB_MBSCASECMP
851GNULIB_MBSSTR
852GNULIB_MBSRCHR
853GNULIB_MBSCHR
854GNULIB_MBSNLEN
855GNULIB_MBSLEN
856GNULIB_STRTOK_R
857GNULIB_STRCASESTR
858GNULIB_STRSTR
859GNULIB_STRSEP
860GNULIB_STRPBRK
861GNULIB_STRNLEN
862GNULIB_STRNDUP
863GNULIB_STRNCAT
864GNULIB_STRDUP
865GNULIB_STRCHRNUL
866GNULIB_STPNCPY
867GNULIB_STPCPY
868GNULIB_RAWMEMCHR
869GNULIB_MEMRCHR
870GNULIB_MEMPCPY
871GNULIB_MEMMEM
872GNULIB_MEMCHR
873GNULIB_FFSLL
874GNULIB_FFSL
8690e634
JK
875LOCALE_FR
876LOCALE_FR_UTF8
877LOCALE_ZH_CN
878LOCALE_JA
879REPLACE_WCSWIDTH
880REPLACE_WCWIDTH
881REPLACE_WCSNRTOMBS
882REPLACE_WCSRTOMBS
883REPLACE_WCRTOMB
884REPLACE_MBSNRTOWCS
885REPLACE_MBSRTOWCS
886REPLACE_MBRLEN
887REPLACE_MBRTOWC
888REPLACE_MBSINIT
889REPLACE_WCTOB
890REPLACE_BTOWC
891REPLACE_MBSTATE_T
892HAVE_DECL_WCWIDTH
893HAVE_DECL_WCTOB
894HAVE_WCSWIDTH
895HAVE_WCSTOK
896HAVE_WCSSTR
897HAVE_WCSPBRK
898HAVE_WCSSPN
899HAVE_WCSCSPN
900HAVE_WCSRCHR
901HAVE_WCSCHR
902HAVE_WCSDUP
903HAVE_WCSXFRM
904HAVE_WCSCOLL
905HAVE_WCSNCASECMP
906HAVE_WCSCASECMP
907HAVE_WCSNCMP
908HAVE_WCSCMP
909HAVE_WCSNCAT
910HAVE_WCSCAT
911HAVE_WCPNCPY
912HAVE_WCSNCPY
913HAVE_WCPCPY
914HAVE_WCSCPY
915HAVE_WCSNLEN
916HAVE_WCSLEN
917HAVE_WMEMSET
918HAVE_WMEMMOVE
919HAVE_WMEMCPY
920HAVE_WMEMCMP
921HAVE_WMEMCHR
922HAVE_WCSNRTOMBS
923HAVE_WCSRTOMBS
924HAVE_WCRTOMB
925HAVE_MBSNRTOWCS
926HAVE_MBSRTOWCS
927HAVE_MBRLEN
928HAVE_MBRTOWC
929HAVE_MBSINIT
930HAVE_BTOWC
931GNULIB_WCSWIDTH
932GNULIB_WCSTOK
933GNULIB_WCSSTR
934GNULIB_WCSPBRK
935GNULIB_WCSSPN
936GNULIB_WCSCSPN
937GNULIB_WCSRCHR
938GNULIB_WCSCHR
939GNULIB_WCSDUP
940GNULIB_WCSXFRM
941GNULIB_WCSCOLL
942GNULIB_WCSNCASECMP
943GNULIB_WCSCASECMP
944GNULIB_WCSNCMP
945GNULIB_WCSCMP
946GNULIB_WCSNCAT
947GNULIB_WCSCAT
948GNULIB_WCPNCPY
949GNULIB_WCSNCPY
950GNULIB_WCPCPY
951GNULIB_WCSCPY
952GNULIB_WCSNLEN
953GNULIB_WCSLEN
954GNULIB_WMEMSET
955GNULIB_WMEMMOVE
956GNULIB_WMEMCPY
957GNULIB_WMEMCMP
958GNULIB_WMEMCHR
959GNULIB_WCWIDTH
960GNULIB_WCSNRTOMBS
961GNULIB_WCSRTOMBS
962GNULIB_WCRTOMB
963GNULIB_MBSNRTOWCS
964GNULIB_MBSRTOWCS
965GNULIB_MBRLEN
966GNULIB_MBRTOWC
967GNULIB_MBSINIT
968GNULIB_WCTOB
969GNULIB_BTOWC
88b48903
WN
970NEXT_AS_FIRST_DIRECTIVE_MATH_H
971NEXT_MATH_H
f45c62c4
YQ
972REPLACE_UTIMENSAT
973REPLACE_STAT
974REPLACE_MKNOD
975REPLACE_MKFIFO
976REPLACE_MKDIR
977REPLACE_LSTAT
978REPLACE_FUTIMENS
979REPLACE_FSTATAT
980REPLACE_FSTAT
981HAVE_UTIMENSAT
982HAVE_MKNODAT
983HAVE_MKNOD
984HAVE_MKFIFOAT
985HAVE_MKFIFO
986HAVE_MKDIRAT
987HAVE_LSTAT
988HAVE_LCHMOD
989HAVE_FUTIMENS
990HAVE_FSTATAT
991HAVE_FCHMODAT
992GNULIB_UTIMENSAT
993GNULIB_STAT
994GNULIB_MKNODAT
995GNULIB_MKNOD
996GNULIB_MKFIFOAT
997GNULIB_MKFIFO
998GNULIB_MKDIRAT
999GNULIB_LSTAT
1000GNULIB_LCHMOD
1001GNULIB_FUTIMENS
1002GNULIB_FSTATAT
1003GNULIB_FSTAT
1004GNULIB_FCHMODAT
8690e634
JK
1005LOCALCHARSET_TESTS_ENVIRONMENT
1006GLIBC21
c971b7fa
PA
1007NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
1008NEXT_INTTYPES_H
1009UINT64_MAX_EQ_ULONG_MAX
1010UINT32_MAX_LT_UINTMAX_MAX
1011PRIPTR_PREFIX
1012PRI_MACROS_BROKEN
1013INT64_MAX_EQ_LONG_MAX
1014INT32_MAX_LT_INTMAX_MAX
1015REPLACE_STRTOIMAX
1016HAVE_DECL_STRTOUMAX
1017HAVE_DECL_STRTOIMAX
1018HAVE_DECL_IMAXDIV
1019HAVE_DECL_IMAXABS
1020GNULIB_STRTOUMAX
1021GNULIB_STRTOIMAX
1022GNULIB_IMAXDIV
1023GNULIB_IMAXABS
1024GL_GENERATE_STDINT_H_FALSE
1025GL_GENERATE_STDINT_H_TRUE
1026STDINT_H
1027WINT_T_SUFFIX
1028WCHAR_T_SUFFIX
1029SIG_ATOMIC_T_SUFFIX
1030SIZE_T_SUFFIX
1031PTRDIFF_T_SUFFIX
1032HAVE_SIGNED_WINT_T
1033HAVE_SIGNED_WCHAR_T
1034HAVE_SIGNED_SIG_ATOMIC_T
1035BITSIZEOF_WINT_T
1036BITSIZEOF_WCHAR_T
1037BITSIZEOF_SIG_ATOMIC_T
1038BITSIZEOF_SIZE_T
1039BITSIZEOF_PTRDIFF_T
1040APPLE_UNIVERSAL_BUILD
1041HAVE_SYS_BITYPES_H
1042HAVE_SYS_INTTYPES_H
1043HAVE_STDINT_H
1044NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1045NEXT_STDINT_H
c971b7fa
PA
1046HAVE_SYS_TYPES_H
1047HAVE_INTTYPES_H
1048HAVE_WCHAR_H
1049HAVE_UNSIGNED_LONG_LONG_INT
1050HAVE_LONG_LONG_INT
88b48903
WN
1051FREXPL_LIBM
1052HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1053FREXP_LIBM
1054REPLACE_TRUNCL
1055REPLACE_TRUNCF
1056REPLACE_TRUNC
1057REPLACE_SQRTL
1058REPLACE_SIGNBIT_USING_GCC
1059REPLACE_SIGNBIT
1060REPLACE_ROUNDL
1061REPLACE_ROUNDF
1062REPLACE_ROUND
1063REPLACE_REMAINDERL
1064REPLACE_REMAINDERF
1065REPLACE_REMAINDER
1066REPLACE_NAN
1067REPLACE_MODFL
1068REPLACE_MODFF
1069REPLACE_MODF
1070REPLACE_LOGBL
1071REPLACE_LOGBF
1072REPLACE_LOGB
1073REPLACE_LOG2L
1074REPLACE_LOG2F
1075REPLACE_LOG2
1076REPLACE_LOG1PL
1077REPLACE_LOG1PF
1078REPLACE_LOG1P
1079REPLACE_LOG10L
1080REPLACE_LOG10F
1081REPLACE_LOG10
1082REPLACE_LOGL
1083REPLACE_LOGF
1084REPLACE_LOG
1085REPLACE_LDEXPL
1086REPLACE_ISNAN
1087REPLACE_ISINF
1088REPLACE_ISFINITE
1089REPLACE_ILOGBF
1090REPLACE_ILOGB
1091REPLACE_HYPOTL
1092REPLACE_HYPOTF
1093REPLACE_HYPOT
1094REPLACE_HUGE_VAL
1095REPLACE_FREXPL
1096REPLACE_FREXP
1097REPLACE_FREXPF
1098REPLACE_FMODL
1099REPLACE_FMODF
1100REPLACE_FMOD
1101REPLACE_FMAL
1102REPLACE_FMAF
1103REPLACE_FMA
1104REPLACE_FLOORL
1105REPLACE_FLOORF
1106REPLACE_FLOOR
1107REPLACE_FABSL
1108REPLACE_EXP2L
1109REPLACE_EXP2
1110REPLACE_EXPM1F
1111REPLACE_EXPM1
1112REPLACE_CEILL
1113REPLACE_CEILF
1114REPLACE_CEIL
1115REPLACE_CBRTL
1116REPLACE_CBRTF
1117HAVE_DECL_TRUNCL
1118HAVE_DECL_TRUNCF
1119HAVE_DECL_TRUNC
1120HAVE_DECL_TANL
1121HAVE_DECL_SQRTL
1122HAVE_DECL_SINL
1123HAVE_DECL_ROUNDL
1124HAVE_DECL_ROUNDF
1125HAVE_DECL_ROUND
1126HAVE_DECL_RINTF
1127HAVE_DECL_REMAINDERL
1128HAVE_DECL_REMAINDER
1129HAVE_DECL_LOGB
1130HAVE_DECL_LOG2L
1131HAVE_DECL_LOG2F
1132HAVE_DECL_LOG2
1133HAVE_DECL_LOG10L
1134HAVE_DECL_LOGL
1135HAVE_DECL_LDEXPL
1136HAVE_DECL_FREXPL
1137HAVE_DECL_FLOORL
1138HAVE_DECL_FLOORF
1139HAVE_DECL_EXPM1L
1140HAVE_DECL_EXP2L
1141HAVE_DECL_EXP2F
1142HAVE_DECL_EXP2
1143HAVE_DECL_EXPL
1144HAVE_DECL_COSL
1145HAVE_DECL_COPYSIGNF
1146HAVE_DECL_CEILL
1147HAVE_DECL_CEILF
1148HAVE_DECL_CBRTL
1149HAVE_DECL_CBRTF
1150HAVE_DECL_ATANL
1151HAVE_DECL_ASINL
1152HAVE_DECL_ACOSL
1153HAVE_TANHF
1154HAVE_TANL
1155HAVE_TANF
1156HAVE_SQRTL
1157HAVE_SQRTF
1158HAVE_SINHF
1159HAVE_SINL
1160HAVE_SINF
1161HAVE_RINTL
1162HAVE_RINT
1163HAVE_REMAINDERF
1164HAVE_REMAINDER
1165HAVE_POWF
1166HAVE_MODFL
1167HAVE_MODFF
1168HAVE_LOGBL
1169HAVE_LOGBF
1170HAVE_LOG1PL
1171HAVE_LOG1PF
1172HAVE_LOG1P
1173HAVE_LOG10L
1174HAVE_LOG10F
1175HAVE_LOGL
1176HAVE_LOGF
1177HAVE_LDEXPF
1178HAVE_ISNANL
1179HAVE_ISNAND
1180HAVE_ISNANF
1181HAVE_ILOGBL
1182HAVE_ILOGBF
1183HAVE_ILOGB
1184HAVE_HYPOTL
1185HAVE_HYPOTF
1186HAVE_FREXPF
1187HAVE_FMODL
1188HAVE_FMODF
1189HAVE_FMAL
1190HAVE_FMAF
1191HAVE_FMA
1192HAVE_FABSL
1193HAVE_FABSF
1194HAVE_EXPM1F
1195HAVE_EXPM1
1196HAVE_EXPL
1197HAVE_EXPF
1198HAVE_COSHF
1199HAVE_COSL
1200HAVE_COSF
1201HAVE_COPYSIGNL
1202HAVE_COPYSIGN
1203HAVE_CBRTL
1204HAVE_CBRTF
1205HAVE_CBRT
1206HAVE_ATAN2F
1207HAVE_ATANL
1208HAVE_ATANF
1209HAVE_ASINL
1210HAVE_ASINF
1211HAVE_ACOSL
1212HAVE_ACOSF
1213GNULIB_TRUNCL
1214GNULIB_TRUNCF
1215GNULIB_TRUNC
1216GNULIB_TANHF
1217GNULIB_TANL
1218GNULIB_TANF
1219GNULIB_SQRTL
1220GNULIB_SQRTF
1221GNULIB_SINHF
1222GNULIB_SINL
1223GNULIB_SINF
1224GNULIB_SIGNBIT
1225GNULIB_ROUNDL
1226GNULIB_ROUNDF
1227GNULIB_ROUND
1228GNULIB_RINTL
1229GNULIB_RINTF
1230GNULIB_RINT
1231GNULIB_REMAINDERL
1232GNULIB_REMAINDERF
1233GNULIB_REMAINDER
1234GNULIB_POWF
1235GNULIB_MODFL
1236GNULIB_MODFF
1237GNULIB_MODF
1238GNULIB_LOGBL
1239GNULIB_LOGBF
1240GNULIB_LOGB
1241GNULIB_LOG2L
1242GNULIB_LOG2F
1243GNULIB_LOG2
1244GNULIB_LOG1PL
1245GNULIB_LOG1PF
1246GNULIB_LOG1P
1247GNULIB_LOG10L
1248GNULIB_LOG10F
1249GNULIB_LOG10
1250GNULIB_LOGL
1251GNULIB_LOGF
1252GNULIB_LOG
1253GNULIB_LDEXPL
1254GNULIB_LDEXPF
1255GNULIB_ISNANL
1256GNULIB_ISNAND
1257GNULIB_ISNANF
1258GNULIB_ISNAN
1259GNULIB_ISINF
1260GNULIB_ISFINITE
1261GNULIB_ILOGBL
1262GNULIB_ILOGBF
1263GNULIB_ILOGB
1264GNULIB_HYPOTL
1265GNULIB_HYPOTF
1266GNULIB_HYPOT
1267GNULIB_FREXPL
1268GNULIB_FREXP
1269GNULIB_FREXPF
1270GNULIB_FMODL
1271GNULIB_FMODF
1272GNULIB_FMOD
1273GNULIB_FMAL
1274GNULIB_FMAF
1275GNULIB_FMA
1276GNULIB_FLOORL
1277GNULIB_FLOORF
1278GNULIB_FLOOR
1279GNULIB_FABSL
1280GNULIB_FABSF
1281GNULIB_EXPM1L
1282GNULIB_EXPM1F
1283GNULIB_EXPM1
1284GNULIB_EXP2L
1285GNULIB_EXP2F
1286GNULIB_EXP2
1287GNULIB_EXPL
1288GNULIB_EXPF
1289GNULIB_COSHF
1290GNULIB_COSL
1291GNULIB_COSF
1292GNULIB_COPYSIGNL
1293GNULIB_COPYSIGNF
1294GNULIB_COPYSIGN
1295GNULIB_CEILL
1296GNULIB_CEILF
1297GNULIB_CEIL
1298GNULIB_CBRTL
1299GNULIB_CBRTF
1300GNULIB_CBRT
1301GNULIB_ATAN2F
1302GNULIB_ATANL
1303GNULIB_ATANF
1304GNULIB_ASINL
1305GNULIB_ASINF
1306GNULIB_ACOSL
1307GNULIB_ACOSF
8690e634
JK
1308GL_GENERATE_FNMATCH_H_FALSE
1309GL_GENERATE_FNMATCH_H_TRUE
1310FNMATCH_H
88b48903
WN
1311REPLACE_ITOLD
1312GL_GENERATE_FLOAT_H_FALSE
1313GL_GENERATE_FLOAT_H_TRUE
1314FLOAT_H
1315NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1316NEXT_FLOAT_H
18848e28
GF
1317EOVERFLOW_VALUE
1318EOVERFLOW_HIDDEN
1319ENOLINK_VALUE
1320ENOLINK_HIDDEN
1321EMULTIHOP_VALUE
1322EMULTIHOP_HIDDEN
1323GL_GENERATE_ERRNO_H_FALSE
1324GL_GENERATE_ERRNO_H_TRUE
1325ERRNO_H
1326NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1327NEXT_ERRNO_H
e26b6bb0
TT
1328HAVE_DIRENT_H
1329NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1330NEXT_DIRENT_H
88b48903
WN
1331PRAGMA_COLUMNS
1332PRAGMA_SYSTEM_HEADER
1333INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1334INCLUDE_NEXT
e26b6bb0
TT
1335REPLACE_FDOPENDIR
1336REPLACE_DIRFD
1337REPLACE_CLOSEDIR
1338REPLACE_OPENDIR
1339HAVE_ALPHASORT
1340HAVE_SCANDIR
1341HAVE_FDOPENDIR
1342HAVE_DECL_FDOPENDIR
1343HAVE_DECL_DIRFD
1344HAVE_CLOSEDIR
1345HAVE_REWINDDIR
1346HAVE_READDIR
1347HAVE_OPENDIR
1348GNULIB_ALPHASORT
1349GNULIB_SCANDIR
1350GNULIB_FDOPENDIR
1351GNULIB_DIRFD
1352GNULIB_CLOSEDIR
1353GNULIB_REWINDDIR
1354GNULIB_READDIR
1355GNULIB_OPENDIR
6a29c58e
YQ
1356pkglibexecdir
1357lispdir
e26b6bb0
TT
1358UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1359UNISTD_H_HAVE_WINSOCK2_H
1360REPLACE_WRITE
1361REPLACE_USLEEP
1362REPLACE_UNLINKAT
1363REPLACE_UNLINK
1364REPLACE_TTYNAME_R
1365REPLACE_SYMLINK
1366REPLACE_SLEEP
1367REPLACE_RMDIR
1368REPLACE_READLINK
1369REPLACE_READ
1370REPLACE_PWRITE
1371REPLACE_PREAD
1372REPLACE_LSEEK
1373REPLACE_LINKAT
1374REPLACE_LINK
1375REPLACE_LCHOWN
1376REPLACE_ISATTY
1377REPLACE_GETPAGESIZE
1378REPLACE_GETGROUPS
1379REPLACE_GETLOGIN_R
1380REPLACE_GETDOMAINNAME
1381REPLACE_GETCWD
1382REPLACE_FTRUNCATE
1383REPLACE_FCHOWNAT
1384REPLACE_DUP2
1385REPLACE_DUP
1386REPLACE_CLOSE
1387REPLACE_CHOWN
1388HAVE_SYS_PARAM_H
1389HAVE_OS_H
1390HAVE_DECL_TTYNAME_R
1391HAVE_DECL_SETHOSTNAME
1392HAVE_DECL_GETUSERSHELL
1393HAVE_DECL_GETPAGESIZE
1394HAVE_DECL_GETLOGIN_R
1395HAVE_DECL_GETDOMAINNAME
1396HAVE_DECL_FDATASYNC
1397HAVE_DECL_FCHDIR
1398HAVE_DECL_ENVIRON
1399HAVE_USLEEP
1400HAVE_UNLINKAT
1401HAVE_SYMLINKAT
1402HAVE_SYMLINK
1403HAVE_SLEEP
1404HAVE_SETHOSTNAME
1405HAVE_READLINKAT
1406HAVE_READLINK
1407HAVE_PWRITE
1408HAVE_PREAD
1409HAVE_PIPE2
1410HAVE_PIPE
1411HAVE_LINKAT
1412HAVE_LINK
1413HAVE_LCHOWN
1414HAVE_GROUP_MEMBER
1415HAVE_GETPAGESIZE
1416HAVE_GETLOGIN
1417HAVE_GETHOSTNAME
1418HAVE_GETGROUPS
1419HAVE_GETDTABLESIZE
1420HAVE_FTRUNCATE
1421HAVE_FSYNC
1422HAVE_FDATASYNC
1423HAVE_FCHOWNAT
1424HAVE_FCHDIR
1425HAVE_FACCESSAT
1426HAVE_EUIDACCESS
1427HAVE_DUP3
1428HAVE_DUP2
1429HAVE_CHOWN
1430GNULIB_WRITE
1431GNULIB_USLEEP
1432GNULIB_UNLINKAT
1433GNULIB_UNLINK
1434GNULIB_UNISTD_H_SIGPIPE
1435GNULIB_UNISTD_H_NONBLOCKING
1436GNULIB_TTYNAME_R
1437GNULIB_SYMLINKAT
1438GNULIB_SYMLINK
1439GNULIB_SLEEP
1440GNULIB_SETHOSTNAME
1441GNULIB_RMDIR
1442GNULIB_READLINKAT
1443GNULIB_READLINK
1444GNULIB_READ
1445GNULIB_PWRITE
1446GNULIB_PREAD
1447GNULIB_PIPE2
1448GNULIB_PIPE
1449GNULIB_LSEEK
1450GNULIB_LINKAT
1451GNULIB_LINK
1452GNULIB_LCHOWN
1453GNULIB_ISATTY
1454GNULIB_GROUP_MEMBER
1455GNULIB_GETUSERSHELL
1456GNULIB_GETPAGESIZE
1457GNULIB_GETLOGIN_R
1458GNULIB_GETLOGIN
1459GNULIB_GETHOSTNAME
1460GNULIB_GETGROUPS
1461GNULIB_GETDTABLESIZE
1462GNULIB_GETDOMAINNAME
1463GNULIB_GETCWD
1464GNULIB_FTRUNCATE
1465GNULIB_FSYNC
1466GNULIB_FDATASYNC
1467GNULIB_FCHOWNAT
1468GNULIB_FCHDIR
1469GNULIB_FACCESSAT
1470GNULIB_EUIDACCESS
1471GNULIB_ENVIRON
1472GNULIB_DUP3
1473GNULIB_DUP2
1474GNULIB_DUP
1475GNULIB_CLOSE
1476GNULIB_CHOWN
1477GNULIB_CHDIR
98399780
YQ
1478REPLACE_WCTOMB
1479REPLACE_UNSETENV
1480REPLACE_STRTOD
1481REPLACE_SETENV
1482REPLACE_REALPATH
1483REPLACE_REALLOC
1484REPLACE_RANDOM_R
1485REPLACE_PUTENV
1486REPLACE_PTSNAME_R
1487REPLACE_PTSNAME
1488REPLACE_MKSTEMP
1489REPLACE_MBTOWC
1490REPLACE_MALLOC
1491REPLACE_CANONICALIZE_FILE_NAME
1492REPLACE_CALLOC
1493HAVE_DECL_UNSETENV
1494HAVE_UNLOCKPT
1495HAVE_SYS_LOADAVG_H
1496HAVE_STRUCT_RANDOM_DATA
1497HAVE_STRTOULL
1498HAVE_STRTOLL
1499HAVE_STRTOD
1500HAVE_DECL_SETENV
1501HAVE_SETENV
1502HAVE_RPMATCH
1503HAVE_REALPATH
1504HAVE_RANDOM_R
1505HAVE_RANDOM_H
1506HAVE_RANDOM
1507HAVE_PTSNAME_R
1508HAVE_PTSNAME
1509HAVE_POSIX_OPENPT
1510HAVE_MKSTEMPS
1511HAVE_MKSTEMP
1512HAVE_MKOSTEMPS
1513HAVE_MKOSTEMP
1514HAVE_MKDTEMP
1515HAVE_GRANTPT
1516HAVE_GETSUBOPT
1517HAVE_DECL_GETLOADAVG
1518HAVE_CANONICALIZE_FILE_NAME
1519HAVE_ATOLL
1520HAVE__EXIT
1521GNULIB_WCTOMB
1522GNULIB_UNSETENV
1523GNULIB_UNLOCKPT
1524GNULIB_SYSTEM_POSIX
1525GNULIB_STRTOULL
1526GNULIB_STRTOLL
1527GNULIB_STRTOD
1528GNULIB_SETENV
1529GNULIB_RPMATCH
1530GNULIB_REALPATH
1531GNULIB_REALLOC_POSIX
1532GNULIB_RANDOM_R
1533GNULIB_RANDOM
1534GNULIB_PUTENV
1535GNULIB_PTSNAME_R
1536GNULIB_PTSNAME
1537GNULIB_POSIX_OPENPT
1538GNULIB_MKSTEMPS
1539GNULIB_MKSTEMP
1540GNULIB_MKOSTEMPS
1541GNULIB_MKOSTEMP
1542GNULIB_MKDTEMP
1543GNULIB_MBTOWC
1544GNULIB_MALLOC_POSIX
1545GNULIB_GRANTPT
1546GNULIB_GETSUBOPT
1547GNULIB_GETLOADAVG
1548GNULIB_CANONICALIZE_FILE_NAME
1549GNULIB_CALLOC_POSIX
1550GNULIB_ATOLL
1551GNULIB__EXIT
8690e634
JK
1552GL_GENERATE_ALLOCA_H_FALSE
1553GL_GENERATE_ALLOCA_H_TRUE
1554ALLOCA_H
1555ALLOCA
c971b7fa
PA
1556GL_COND_LIBTOOL_FALSE
1557GL_COND_LIBTOOL_TRUE
1558target_os
1559target_vendor
1560target_cpu
1561target
1562RANLIB
1563ARFLAGS
1564AR
1565EGREP
1566GREP
1567CPP
1568host_os
1569host_vendor
1570host_cpu
1571host
1572build_os
1573build_vendor
1574build_cpu
1575build
1576OBJEXT
1577EXEEXT
1578ac_ct_CC
1579CPPFLAGS
1580LDFLAGS
1581CFLAGS
1582CC
1583MAINT
1584MAINTAINER_MODE_FALSE
1585MAINTAINER_MODE_TRUE
1586target_alias
1587host_alias
1588build_alias
1589LIBS
1590ECHO_T
1591ECHO_N
1592ECHO_C
1593DEFS
1594mandir
1595localedir
1596libdir
1597psdir
1598pdfdir
1599dvidir
1600htmldir
1601infodir
1602docdir
1603oldincludedir
1604includedir
1605localstatedir
1606sharedstatedir
1607sysconfdir
1608datadir
1609datarootdir
1610libexecdir
1611sbindir
1612bindir
1613program_transform_name
1614prefix
1615exec_prefix
1616PACKAGE_URL
1617PACKAGE_BUGREPORT
1618PACKAGE_STRING
1619PACKAGE_VERSION
1620PACKAGE_TARNAME
1621PACKAGE_NAME
1622PATH_SEPARATOR
1623SHELL'
1624ac_subst_files=''
1625ac_user_opts='
1626enable_option_checking
1627enable_maintainer_mode
2196f55f 1628enable_largefile
c971b7fa
PA
1629enable_dependency_tracking
1630'
1631 ac_precious_vars='build_alias
1632host_alias
1633target_alias
1634CC
1635CFLAGS
1636LDFLAGS
1637LIBS
1638CPPFLAGS
1639CPP'
1640
1641
1642# Initialize some variables set by options.
1643ac_init_help=
1644ac_init_version=false
1645ac_unrecognized_opts=
1646ac_unrecognized_sep=
1647# The variables have the same names as the options, with
1648# dashes changed to underlines.
1649cache_file=/dev/null
1650exec_prefix=NONE
1651no_create=
1652no_recursion=
1653prefix=NONE
1654program_prefix=NONE
1655program_suffix=NONE
1656program_transform_name=s,x,x,
1657silent=
1658site=
1659srcdir=
1660verbose=
1661x_includes=NONE
1662x_libraries=NONE
1663
1664# Installation directory options.
1665# These are left unexpanded so users can "make install exec_prefix=/foo"
1666# and all the variables that are supposed to be based on exec_prefix
1667# by default will actually change.
1668# Use braces instead of parens because sh, perl, etc. also accept them.
1669# (The list follows the same order as the GNU Coding Standards.)
1670bindir='${exec_prefix}/bin'
1671sbindir='${exec_prefix}/sbin'
1672libexecdir='${exec_prefix}/libexec'
1673datarootdir='${prefix}/share'
1674datadir='${datarootdir}'
1675sysconfdir='${prefix}/etc'
1676sharedstatedir='${prefix}/com'
1677localstatedir='${prefix}/var'
1678includedir='${prefix}/include'
1679oldincludedir='/usr/include'
1680docdir='${datarootdir}/doc/${PACKAGE}'
1681infodir='${datarootdir}/info'
1682htmldir='${docdir}'
1683dvidir='${docdir}'
1684pdfdir='${docdir}'
1685psdir='${docdir}'
1686libdir='${exec_prefix}/lib'
1687localedir='${datarootdir}/locale'
1688mandir='${datarootdir}/man'
1689
1690ac_prev=
1691ac_dashdash=
1692for ac_option
1693do
1694 # If the previous option needs an argument, assign it.
1695 if test -n "$ac_prev"; then
1696 eval $ac_prev=\$ac_option
1697 ac_prev=
1698 continue
1699 fi
1700
1701 case $ac_option in
1702 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1703 *) ac_optarg=yes ;;
1704 esac
1705
1706 # Accept the important Cygnus configure options, so we can diagnose typos.
1707
1708 case $ac_dashdash$ac_option in
1709 --)
1710 ac_dashdash=yes ;;
1711
1712 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1713 ac_prev=bindir ;;
1714 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1715 bindir=$ac_optarg ;;
1716
1717 -build | --build | --buil | --bui | --bu)
1718 ac_prev=build_alias ;;
1719 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1720 build_alias=$ac_optarg ;;
1721
1722 -cache-file | --cache-file | --cache-fil | --cache-fi \
1723 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1724 ac_prev=cache_file ;;
1725 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1726 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1727 cache_file=$ac_optarg ;;
1728
1729 --config-cache | -C)
1730 cache_file=config.cache ;;
1731
1732 -datadir | --datadir | --datadi | --datad)
1733 ac_prev=datadir ;;
1734 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1735 datadir=$ac_optarg ;;
1736
1737 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1738 | --dataroo | --dataro | --datar)
1739 ac_prev=datarootdir ;;
1740 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1741 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1742 datarootdir=$ac_optarg ;;
1743
1744 -disable-* | --disable-*)
1745 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1746 # Reject names that are not valid shell variable names.
1747 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1748 as_fn_error "invalid feature name: $ac_useropt"
1749 ac_useropt_orig=$ac_useropt
1750 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1751 case $ac_user_opts in
1752 *"
1753"enable_$ac_useropt"
1754"*) ;;
1755 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1756 ac_unrecognized_sep=', ';;
1757 esac
1758 eval enable_$ac_useropt=no ;;
1759
1760 -docdir | --docdir | --docdi | --doc | --do)
1761 ac_prev=docdir ;;
1762 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1763 docdir=$ac_optarg ;;
1764
1765 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1766 ac_prev=dvidir ;;
1767 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1768 dvidir=$ac_optarg ;;
1769
1770 -enable-* | --enable-*)
1771 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1772 # Reject names that are not valid shell variable names.
1773 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1774 as_fn_error "invalid feature name: $ac_useropt"
1775 ac_useropt_orig=$ac_useropt
1776 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1777 case $ac_user_opts in
1778 *"
1779"enable_$ac_useropt"
1780"*) ;;
1781 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1782 ac_unrecognized_sep=', ';;
1783 esac
1784 eval enable_$ac_useropt=\$ac_optarg ;;
1785
1786 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1787 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1788 | --exec | --exe | --ex)
1789 ac_prev=exec_prefix ;;
1790 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1791 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1792 | --exec=* | --exe=* | --ex=*)
1793 exec_prefix=$ac_optarg ;;
1794
1795 -gas | --gas | --ga | --g)
1796 # Obsolete; use --with-gas.
1797 with_gas=yes ;;
1798
1799 -help | --help | --hel | --he | -h)
1800 ac_init_help=long ;;
1801 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1802 ac_init_help=recursive ;;
1803 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1804 ac_init_help=short ;;
1805
1806 -host | --host | --hos | --ho)
1807 ac_prev=host_alias ;;
1808 -host=* | --host=* | --hos=* | --ho=*)
1809 host_alias=$ac_optarg ;;
1810
1811 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1812 ac_prev=htmldir ;;
1813 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1814 | --ht=*)
1815 htmldir=$ac_optarg ;;
1816
1817 -includedir | --includedir | --includedi | --included | --include \
1818 | --includ | --inclu | --incl | --inc)
1819 ac_prev=includedir ;;
1820 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1821 | --includ=* | --inclu=* | --incl=* | --inc=*)
1822 includedir=$ac_optarg ;;
1823
1824 -infodir | --infodir | --infodi | --infod | --info | --inf)
1825 ac_prev=infodir ;;
1826 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1827 infodir=$ac_optarg ;;
1828
1829 -libdir | --libdir | --libdi | --libd)
1830 ac_prev=libdir ;;
1831 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1832 libdir=$ac_optarg ;;
1833
1834 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1835 | --libexe | --libex | --libe)
1836 ac_prev=libexecdir ;;
1837 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1838 | --libexe=* | --libex=* | --libe=*)
1839 libexecdir=$ac_optarg ;;
1840
1841 -localedir | --localedir | --localedi | --localed | --locale)
1842 ac_prev=localedir ;;
1843 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1844 localedir=$ac_optarg ;;
1845
1846 -localstatedir | --localstatedir | --localstatedi | --localstated \
1847 | --localstate | --localstat | --localsta | --localst | --locals)
1848 ac_prev=localstatedir ;;
1849 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1850 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1851 localstatedir=$ac_optarg ;;
1852
1853 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1854 ac_prev=mandir ;;
1855 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1856 mandir=$ac_optarg ;;
1857
1858 -nfp | --nfp | --nf)
1859 # Obsolete; use --without-fp.
1860 with_fp=no ;;
1861
1862 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1863 | --no-cr | --no-c | -n)
1864 no_create=yes ;;
1865
1866 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1867 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1868 no_recursion=yes ;;
1869
1870 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1871 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1872 | --oldin | --oldi | --old | --ol | --o)
1873 ac_prev=oldincludedir ;;
1874 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1875 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1876 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1877 oldincludedir=$ac_optarg ;;
1878
1879 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1880 ac_prev=prefix ;;
1881 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1882 prefix=$ac_optarg ;;
1883
1884 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1885 | --program-pre | --program-pr | --program-p)
1886 ac_prev=program_prefix ;;
1887 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1888 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1889 program_prefix=$ac_optarg ;;
1890
1891 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1892 | --program-suf | --program-su | --program-s)
1893 ac_prev=program_suffix ;;
1894 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1895 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1896 program_suffix=$ac_optarg ;;
1897
1898 -program-transform-name | --program-transform-name \
1899 | --program-transform-nam | --program-transform-na \
1900 | --program-transform-n | --program-transform- \
1901 | --program-transform | --program-transfor \
1902 | --program-transfo | --program-transf \
1903 | --program-trans | --program-tran \
1904 | --progr-tra | --program-tr | --program-t)
1905 ac_prev=program_transform_name ;;
1906 -program-transform-name=* | --program-transform-name=* \
1907 | --program-transform-nam=* | --program-transform-na=* \
1908 | --program-transform-n=* | --program-transform-=* \
1909 | --program-transform=* | --program-transfor=* \
1910 | --program-transfo=* | --program-transf=* \
1911 | --program-trans=* | --program-tran=* \
1912 | --progr-tra=* | --program-tr=* | --program-t=*)
1913 program_transform_name=$ac_optarg ;;
1914
1915 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1916 ac_prev=pdfdir ;;
1917 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1918 pdfdir=$ac_optarg ;;
1919
1920 -psdir | --psdir | --psdi | --psd | --ps)
1921 ac_prev=psdir ;;
1922 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1923 psdir=$ac_optarg ;;
1924
1925 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1926 | -silent | --silent | --silen | --sile | --sil)
1927 silent=yes ;;
1928
1929 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1930 ac_prev=sbindir ;;
1931 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1932 | --sbi=* | --sb=*)
1933 sbindir=$ac_optarg ;;
1934
1935 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1936 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1937 | --sharedst | --shareds | --shared | --share | --shar \
1938 | --sha | --sh)
1939 ac_prev=sharedstatedir ;;
1940 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1941 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1942 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1943 | --sha=* | --sh=*)
1944 sharedstatedir=$ac_optarg ;;
1945
1946 -site | --site | --sit)
1947 ac_prev=site ;;
1948 -site=* | --site=* | --sit=*)
1949 site=$ac_optarg ;;
1950
1951 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1952 ac_prev=srcdir ;;
1953 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1954 srcdir=$ac_optarg ;;
1955
1956 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1957 | --syscon | --sysco | --sysc | --sys | --sy)
1958 ac_prev=sysconfdir ;;
1959 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1960 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1961 sysconfdir=$ac_optarg ;;
1962
1963 -target | --target | --targe | --targ | --tar | --ta | --t)
1964 ac_prev=target_alias ;;
1965 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1966 target_alias=$ac_optarg ;;
1967
1968 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1969 verbose=yes ;;
1970
1971 -version | --version | --versio | --versi | --vers | -V)
1972 ac_init_version=: ;;
1973
1974 -with-* | --with-*)
1975 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1976 # Reject names that are not valid shell variable names.
1977 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1978 as_fn_error "invalid package name: $ac_useropt"
1979 ac_useropt_orig=$ac_useropt
1980 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1981 case $ac_user_opts in
1982 *"
1983"with_$ac_useropt"
1984"*) ;;
1985 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1986 ac_unrecognized_sep=', ';;
1987 esac
1988 eval with_$ac_useropt=\$ac_optarg ;;
1989
1990 -without-* | --without-*)
1991 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1992 # Reject names that are not valid shell variable names.
1993 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1994 as_fn_error "invalid package name: $ac_useropt"
1995 ac_useropt_orig=$ac_useropt
1996 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1997 case $ac_user_opts in
1998 *"
1999"with_$ac_useropt"
2000"*) ;;
2001 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2002 ac_unrecognized_sep=', ';;
2003 esac
2004 eval with_$ac_useropt=no ;;
2005
2006 --x)
2007 # Obsolete; use --with-x.
2008 with_x=yes ;;
2009
2010 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2011 | --x-incl | --x-inc | --x-in | --x-i)
2012 ac_prev=x_includes ;;
2013 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2014 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2015 x_includes=$ac_optarg ;;
2016
2017 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2018 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2019 ac_prev=x_libraries ;;
2020 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2021 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2022 x_libraries=$ac_optarg ;;
2023
2024 -*) as_fn_error "unrecognized option: \`$ac_option'
2025Try \`$0 --help' for more information."
2026 ;;
2027
2028 *=*)
2029 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2030 # Reject names that are not valid shell variable names.
2031 case $ac_envvar in #(
2032 '' | [0-9]* | *[!_$as_cr_alnum]* )
2033 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
2034 esac
2035 eval $ac_envvar=\$ac_optarg
2036 export $ac_envvar ;;
2037
2038 *)
2039 # FIXME: should be removed in autoconf 3.0.
2040 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2041 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2042 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
2043 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
2044 ;;
2045
2046 esac
2047done
2048
2049if test -n "$ac_prev"; then
2050 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2051 as_fn_error "missing argument to $ac_option"
2052fi
2053
2054if test -n "$ac_unrecognized_opts"; then
2055 case $enable_option_checking in
2056 no) ;;
2057 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
2058 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2059 esac
2060fi
2061
2062# Check all directory arguments for consistency.
2063for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2064 datadir sysconfdir sharedstatedir localstatedir includedir \
2065 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2066 libdir localedir mandir
2067do
2068 eval ac_val=\$$ac_var
2069 # Remove trailing slashes.
2070 case $ac_val in
2071 */ )
2072 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2073 eval $ac_var=\$ac_val;;
2074 esac
2075 # Be sure to have absolute directory names.
2076 case $ac_val in
2077 [\\/$]* | ?:[\\/]* ) continue;;
2078 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2079 esac
2080 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
2081done
2082
2083# There might be people who depend on the old broken behavior: `$host'
2084# used to hold the argument of --host etc.
2085# FIXME: To remove some day.
2086build=$build_alias
2087host=$host_alias
2088target=$target_alias
2089
2090# FIXME: To remove some day.
2091if test "x$host_alias" != x; then
2092 if test "x$build_alias" = x; then
2093 cross_compiling=maybe
2094 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
2095 If a cross compiler is detected then cross compile mode will be used." >&2
2096 elif test "x$build_alias" != "x$host_alias"; then
2097 cross_compiling=yes
2098 fi
2099fi
2100
2101ac_tool_prefix=
2102test -n "$host_alias" && ac_tool_prefix=$host_alias-
2103
2104test "$silent" = yes && exec 6>/dev/null
2105
2106
2107ac_pwd=`pwd` && test -n "$ac_pwd" &&
2108ac_ls_di=`ls -di .` &&
2109ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2110 as_fn_error "working directory cannot be determined"
2111test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2112 as_fn_error "pwd does not report name of working directory"
2113
2114
2115# Find the source files, if location was not specified.
2116if test -z "$srcdir"; then
2117 ac_srcdir_defaulted=yes
2118 # Try the directory containing this script, then the parent directory.
2119 ac_confdir=`$as_dirname -- "$as_myself" ||
2120$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2121 X"$as_myself" : 'X\(//\)[^/]' \| \
2122 X"$as_myself" : 'X\(//\)$' \| \
2123 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2124$as_echo X"$as_myself" |
2125 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2126 s//\1/
2127 q
2128 }
2129 /^X\(\/\/\)[^/].*/{
2130 s//\1/
2131 q
2132 }
2133 /^X\(\/\/\)$/{
2134 s//\1/
2135 q
2136 }
2137 /^X\(\/\).*/{
2138 s//\1/
2139 q
2140 }
2141 s/.*/./; q'`
2142 srcdir=$ac_confdir
2143 if test ! -r "$srcdir/$ac_unique_file"; then
2144 srcdir=..
2145 fi
2146else
2147 ac_srcdir_defaulted=no
2148fi
2149if test ! -r "$srcdir/$ac_unique_file"; then
2150 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2151 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
2152fi
2153ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2154ac_abs_confdir=`(
2155 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
2156 pwd)`
2157# When building in place, set srcdir=.
2158if test "$ac_abs_confdir" = "$ac_pwd"; then
2159 srcdir=.
2160fi
2161# Remove unnecessary trailing slashes from srcdir.
2162# Double slashes in file names in object file debugging info
2163# mess up M-x gdb in Emacs.
2164case $srcdir in
2165*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2166esac
2167for ac_var in $ac_precious_vars; do
2168 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2169 eval ac_env_${ac_var}_value=\$${ac_var}
2170 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2171 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2172done
2173
2174#
2175# Report the --help message.
2176#
2177if test "$ac_init_help" = "long"; then
2178 # Omit some internal or obsolete options to make the list less imposing.
2179 # This message is too long to be a string in the A/UX 3.1 sh.
2180 cat <<_ACEOF
2181\`configure' configures this package to adapt to many kinds of systems.
2182
2183Usage: $0 [OPTION]... [VAR=VALUE]...
2184
2185To assign environment variables (e.g., CC, CFLAGS...), specify them as
2186VAR=VALUE. See below for descriptions of some of the useful variables.
2187
2188Defaults for the options are specified in brackets.
2189
2190Configuration:
2191 -h, --help display this help and exit
2192 --help=short display options specific to this package
2193 --help=recursive display the short help of all the included packages
2194 -V, --version display version information and exit
2195 -q, --quiet, --silent do not print \`checking...' messages
2196 --cache-file=FILE cache test results in FILE [disabled]
2197 -C, --config-cache alias for \`--cache-file=config.cache'
2198 -n, --no-create do not create output files
2199 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2200
2201Installation directories:
2202 --prefix=PREFIX install architecture-independent files in PREFIX
2203 [$ac_default_prefix]
2204 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2205 [PREFIX]
2206
2207By default, \`make install' will install all the files in
2208\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2209an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2210for instance \`--prefix=\$HOME'.
2211
2212For better control, use the options below.
2213
2214Fine tuning of the installation directories:
2215 --bindir=DIR user executables [EPREFIX/bin]
2216 --sbindir=DIR system admin executables [EPREFIX/sbin]
2217 --libexecdir=DIR program executables [EPREFIX/libexec]
2218 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2219 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2220 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2221 --libdir=DIR object code libraries [EPREFIX/lib]
2222 --includedir=DIR C header files [PREFIX/include]
2223 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2224 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2225 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2226 --infodir=DIR info documentation [DATAROOTDIR/info]
2227 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2228 --mandir=DIR man documentation [DATAROOTDIR/man]
2229 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
2230 --htmldir=DIR html documentation [DOCDIR]
2231 --dvidir=DIR dvi documentation [DOCDIR]
2232 --pdfdir=DIR pdf documentation [DOCDIR]
2233 --psdir=DIR ps documentation [DOCDIR]
2234_ACEOF
2235
2236 cat <<\_ACEOF
2237
2238Program names:
2239 --program-prefix=PREFIX prepend PREFIX to installed program names
2240 --program-suffix=SUFFIX append SUFFIX to installed program names
2241 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2242
2243System types:
2244 --build=BUILD configure for building on BUILD [guessed]
2245 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2246 --target=TARGET configure for building compilers for TARGET [HOST]
2247_ACEOF
2248fi
2249
2250if test -n "$ac_init_help"; then
2251
2252 cat <<\_ACEOF
2253
2254Optional Features:
2255 --disable-option-checking ignore unrecognized --enable/--with options
2256 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2257 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2258 --enable-maintainer-mode enable make rules and dependencies not useful
2259 (and sometimes confusing) to the casual installer
2196f55f 2260 --disable-largefile omit support for large files
c971b7fa
PA
2261 --disable-dependency-tracking speeds up one-time build
2262 --enable-dependency-tracking do not reject slow dependency extractors
2263
2264Some influential environment variables:
2265 CC C compiler command
2266 CFLAGS C compiler flags
2267 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2268 nonstandard directory <lib dir>
2269 LIBS libraries to pass to the linker, e.g. -l<library>
2270 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
2271 you have headers in a nonstandard directory <include dir>
2272 CPP C preprocessor
2273
2274Use these variables to override the choices made by `configure' or to help
2275it to find libraries and programs with nonstandard names/locations.
2276
2277Report bugs to the package provider.
2278_ACEOF
2279ac_status=$?
2280fi
2281
2282if test "$ac_init_help" = "recursive"; then
2283 # If there are subdirs, report their specific --help.
2284 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2285 test -d "$ac_dir" ||
2286 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2287 continue
2288 ac_builddir=.
2289
2290case "$ac_dir" in
2291.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2292*)
2293 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2294 # A ".." for each directory in $ac_dir_suffix.
2295 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2296 case $ac_top_builddir_sub in
2297 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2298 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2299 esac ;;
2300esac
2301ac_abs_top_builddir=$ac_pwd
2302ac_abs_builddir=$ac_pwd$ac_dir_suffix
2303# for backward compatibility:
2304ac_top_builddir=$ac_top_build_prefix
2305
2306case $srcdir in
2307 .) # We are building in place.
2308 ac_srcdir=.
2309 ac_top_srcdir=$ac_top_builddir_sub
2310 ac_abs_top_srcdir=$ac_pwd ;;
2311 [\\/]* | ?:[\\/]* ) # Absolute name.
2312 ac_srcdir=$srcdir$ac_dir_suffix;
2313 ac_top_srcdir=$srcdir
2314 ac_abs_top_srcdir=$srcdir ;;
2315 *) # Relative name.
2316 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2317 ac_top_srcdir=$ac_top_build_prefix$srcdir
2318 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2319esac
2320ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2321
2322 cd "$ac_dir" || { ac_status=$?; continue; }
2323 # Check for guested configure.
2324 if test -f "$ac_srcdir/configure.gnu"; then
2325 echo &&
2326 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2327 elif test -f "$ac_srcdir/configure"; then
2328 echo &&
2329 $SHELL "$ac_srcdir/configure" --help=recursive
2330 else
2331 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2332 fi || ac_status=$?
2333 cd "$ac_pwd" || { ac_status=$?; break; }
2334 done
2335fi
2336
2337test -n "$ac_init_help" && exit $ac_status
2338if $ac_init_version; then
2339 cat <<\_ACEOF
2340configure
2341generated by GNU Autoconf 2.64
2342
2343Copyright (C) 2009 Free Software Foundation, Inc.
2344This configure script is free software; the Free Software Foundation
2345gives unlimited permission to copy, distribute and modify it.
2346_ACEOF
2347 exit
2348fi
2349
2350## ------------------------ ##
2351## Autoconf initialization. ##
2352## ------------------------ ##
2353
2354# ac_fn_c_try_compile LINENO
2355# --------------------------
2356# Try to compile conftest.$ac_ext, and return whether this succeeded.
2357ac_fn_c_try_compile ()
2358{
2359 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2360 rm -f conftest.$ac_objext
2361 if { { ac_try="$ac_compile"
2362case "(($ac_try" in
2363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2364 *) ac_try_echo=$ac_try;;
2365esac
2366eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2367$as_echo "$ac_try_echo"; } >&5
2368 (eval "$ac_compile") 2>conftest.err
2369 ac_status=$?
2370 if test -s conftest.err; then
2371 grep -v '^ *+' conftest.err >conftest.er1
2372 cat conftest.er1 >&5
2373 mv -f conftest.er1 conftest.err
2374 fi
2375 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2376 test $ac_status = 0; } && {
2377 test -z "$ac_c_werror_flag" ||
2378 test ! -s conftest.err
2379 } && test -s conftest.$ac_objext; then :
2380 ac_retval=0
2381else
2382 $as_echo "$as_me: failed program was:" >&5
2383sed 's/^/| /' conftest.$ac_ext >&5
2384
2385 ac_retval=1
2386fi
2387 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2388 return $ac_retval
2389
2390} # ac_fn_c_try_compile
2391
2392# ac_fn_c_try_cpp LINENO
2393# ----------------------
2394# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2395ac_fn_c_try_cpp ()
2396{
2397 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2398 if { { ac_try="$ac_cpp conftest.$ac_ext"
2399case "(($ac_try" in
2400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2401 *) ac_try_echo=$ac_try;;
2402esac
2403eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2404$as_echo "$ac_try_echo"; } >&5
2405 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2406 ac_status=$?
2407 if test -s conftest.err; then
2408 grep -v '^ *+' conftest.err >conftest.er1
2409 cat conftest.er1 >&5
2410 mv -f conftest.er1 conftest.err
2411 fi
2412 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2413 test $ac_status = 0; } >/dev/null && {
2414 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2415 test ! -s conftest.err
2416 }; then :
2417 ac_retval=0
2418else
2419 $as_echo "$as_me: failed program was:" >&5
2420sed 's/^/| /' conftest.$ac_ext >&5
2421
2422 ac_retval=1
2423fi
2424 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2425 return $ac_retval
2426
2427} # ac_fn_c_try_cpp
2428
2429# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2430# -------------------------------------------------------
2431# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2432# the include files in INCLUDES and setting the cache variable VAR
2433# accordingly.
2434ac_fn_c_check_header_mongrel ()
2435{
2436 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2437 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2439$as_echo_n "checking for $2... " >&6; }
2440if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2441 $as_echo_n "(cached) " >&6
2442fi
2443eval ac_res=\$$3
2444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2445$as_echo "$ac_res" >&6; }
2446else
2447 # Is the header compilable?
2448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2449$as_echo_n "checking $2 usability... " >&6; }
2450cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2451/* end confdefs.h. */
2452$4
2453#include <$2>
2454_ACEOF
2455if ac_fn_c_try_compile "$LINENO"; then :
2456 ac_header_compiler=yes
2457else
2458 ac_header_compiler=no
2459fi
2460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2462$as_echo "$ac_header_compiler" >&6; }
2463
2464# Is the header present?
2465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2466$as_echo_n "checking $2 presence... " >&6; }
2467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2468/* end confdefs.h. */
2469#include <$2>
2470_ACEOF
2471if ac_fn_c_try_cpp "$LINENO"; then :
2472 ac_header_preproc=yes
2473else
2474 ac_header_preproc=no
2475fi
2476rm -f conftest.err conftest.$ac_ext
2477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2478$as_echo "$ac_header_preproc" >&6; }
2479
2480# So? What about this header?
2481case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2482 yes:no: )
2483 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2484$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2485 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2486$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2487 ;;
2488 no:yes:* )
2489 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2490$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2491 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2492$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2493 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2494$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2495 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2496$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2497 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2498$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2499 ;;
2500esac
2501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2502$as_echo_n "checking for $2... " >&6; }
2503if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2504 $as_echo_n "(cached) " >&6
2505else
2506 eval "$3=\$ac_header_compiler"
2507fi
2508eval ac_res=\$$3
2509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2510$as_echo "$ac_res" >&6; }
2511fi
2512 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2513
2514} # ac_fn_c_check_header_mongrel
2515
2516# ac_fn_c_try_run LINENO
2517# ----------------------
2518# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2519# that executables *can* be run.
2520ac_fn_c_try_run ()
2521{
2522 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2523 if { { ac_try="$ac_link"
2524case "(($ac_try" in
2525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2526 *) ac_try_echo=$ac_try;;
2527esac
2528eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2529$as_echo "$ac_try_echo"; } >&5
2530 (eval "$ac_link") 2>&5
2531 ac_status=$?
2532 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2533 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2534 { { case "(($ac_try" in
2535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2536 *) ac_try_echo=$ac_try;;
2537esac
2538eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2539$as_echo "$ac_try_echo"; } >&5
2540 (eval "$ac_try") 2>&5
2541 ac_status=$?
2542 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2543 test $ac_status = 0; }; }; then :
2544 ac_retval=0
2545else
2546 $as_echo "$as_me: program exited with status $ac_status" >&5
2547 $as_echo "$as_me: failed program was:" >&5
2548sed 's/^/| /' conftest.$ac_ext >&5
2549
2550 ac_retval=$ac_status
2551fi
2552 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2553 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2554 return $ac_retval
2555
2556} # ac_fn_c_try_run
2557
2558# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2559# -------------------------------------------------------
2560# Tests whether HEADER exists and can be compiled using the include files in
2561# INCLUDES, setting the cache variable VAR accordingly.
2562ac_fn_c_check_header_compile ()
2563{
2564 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2566$as_echo_n "checking for $2... " >&6; }
2567if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2568 $as_echo_n "(cached) " >&6
2569else
2570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2571/* end confdefs.h. */
2572$4
2573#include <$2>
2574_ACEOF
2575if ac_fn_c_try_compile "$LINENO"; then :
2576 eval "$3=yes"
2577else
2578 eval "$3=no"
2579fi
2580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2581fi
2582eval ac_res=\$$3
2583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2584$as_echo "$ac_res" >&6; }
2585 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2586
2587} # ac_fn_c_check_header_compile
2588
2589# ac_fn_c_try_link LINENO
2590# -----------------------
2591# Try to link conftest.$ac_ext, and return whether this succeeded.
2592ac_fn_c_try_link ()
2593{
2594 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2595 rm -f conftest.$ac_objext conftest$ac_exeext
2596 if { { ac_try="$ac_link"
2597case "(($ac_try" in
2598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2599 *) ac_try_echo=$ac_try;;
2600esac
2601eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2602$as_echo "$ac_try_echo"; } >&5
2603 (eval "$ac_link") 2>conftest.err
2604 ac_status=$?
2605 if test -s conftest.err; then
2606 grep -v '^ *+' conftest.err >conftest.er1
2607 cat conftest.er1 >&5
2608 mv -f conftest.er1 conftest.err
2609 fi
2610 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2611 test $ac_status = 0; } && {
2612 test -z "$ac_c_werror_flag" ||
2613 test ! -s conftest.err
2614 } && test -s conftest$ac_exeext && {
2615 test "$cross_compiling" = yes ||
2616 $as_test_x conftest$ac_exeext
2617 }; then :
2618 ac_retval=0
2619else
2620 $as_echo "$as_me: failed program was:" >&5
2621sed 's/^/| /' conftest.$ac_ext >&5
2622
2623 ac_retval=1
2624fi
2625 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2626 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2627 # interfere with the next link command; also delete a directory that is
2628 # left behind by Apple's compiler. We do this before executing the actions.
2629 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2630 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2631 return $ac_retval
2632
2633} # ac_fn_c_try_link
2634
8690e634
JK
2635# ac_fn_c_check_func LINENO FUNC VAR
2636# ----------------------------------
2637# Tests whether FUNC exists, setting the cache variable VAR accordingly
2638ac_fn_c_check_func ()
2639{
2640 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2642$as_echo_n "checking for $2... " >&6; }
2643if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2644 $as_echo_n "(cached) " >&6
2645else
2646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2647/* end confdefs.h. */
2648/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2649 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2650#define $2 innocuous_$2
2651
2652/* System header to define __stub macros and hopefully few prototypes,
2653 which can conflict with char $2 (); below.
2654 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2655 <limits.h> exists even on freestanding compilers. */
2656
2657#ifdef __STDC__
2658# include <limits.h>
2659#else
2660# include <assert.h>
2661#endif
2662
2663#undef $2
2664
2665/* Override any GCC internal prototype to avoid an error.
2666 Use char because int might match the return type of a GCC
2667 builtin and then its argument prototype would still apply. */
2668#ifdef __cplusplus
2669extern "C"
2670#endif
2671char $2 ();
2672/* The GNU C library defines this for functions which it implements
2673 to always fail with ENOSYS. Some functions are actually named
2674 something starting with __ and the normal name is an alias. */
2675#if defined __stub_$2 || defined __stub___$2
2676choke me
2677#endif
2678
2679int
2680main ()
2681{
2682return $2 ();
2683 ;
2684 return 0;
2685}
2686_ACEOF
2687if ac_fn_c_try_link "$LINENO"; then :
2688 eval "$3=yes"
2689else
2690 eval "$3=no"
2691fi
2692rm -f core conftest.err conftest.$ac_objext \
2693 conftest$ac_exeext conftest.$ac_ext
2694fi
2695eval ac_res=\$$3
2696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2697$as_echo "$ac_res" >&6; }
2698 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2699
2700} # ac_fn_c_check_func
2701
8986e351
TT
2702# ac_fn_c_check_decl LINENO SYMBOL VAR
2703# ------------------------------------
2704# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2705ac_fn_c_check_decl ()
2706{
2707 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2709$as_echo_n "checking whether $2 is declared... " >&6; }
2710if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2711 $as_echo_n "(cached) " >&6
2712else
2713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2714/* end confdefs.h. */
2715$4
2716int
2717main ()
2718{
2719#ifndef $2
2720 (void) $2;
2721#endif
2722
2723 ;
2724 return 0;
2725}
2726_ACEOF
2727if ac_fn_c_try_compile "$LINENO"; then :
2728 eval "$3=yes"
2729else
2730 eval "$3=no"
2731fi
2732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2733fi
2734eval ac_res=\$$3
2735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2736$as_echo "$ac_res" >&6; }
2737 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2738
2739} # ac_fn_c_check_decl
2740
c971b7fa
PA
2741# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2742# --------------------------------------------
2743# Tries to find the compile-time value of EXPR in a program that includes
2744# INCLUDES, setting VAR accordingly. Returns whether the value could be
2745# computed
2746ac_fn_c_compute_int ()
2747{
2748 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2749 if test "$cross_compiling" = yes; then
2750 # Depending upon the size, compute the lo and hi bounds.
2751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2752/* end confdefs.h. */
2753$4
2754int
2755main ()
2756{
2757static int test_array [1 - 2 * !(($2) >= 0)];
2758test_array [0] = 0
2759
2760 ;
2761 return 0;
2762}
2763_ACEOF
2764if ac_fn_c_try_compile "$LINENO"; then :
2765 ac_lo=0 ac_mid=0
2766 while :; do
2767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2768/* end confdefs.h. */
2769$4
2770int
2771main ()
2772{
2773static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2774test_array [0] = 0
2775
2776 ;
2777 return 0;
2778}
2779_ACEOF
2780if ac_fn_c_try_compile "$LINENO"; then :
2781 ac_hi=$ac_mid; break
2782else
2783 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2784 if test $ac_lo -le $ac_mid; then
2785 ac_lo= ac_hi=
2786 break
2787 fi
2788 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2789fi
2790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2791 done
2792else
2793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2794/* end confdefs.h. */
2795$4
2796int
2797main ()
2798{
2799static int test_array [1 - 2 * !(($2) < 0)];
2800test_array [0] = 0
2801
2802 ;
2803 return 0;
2804}
2805_ACEOF
2806if ac_fn_c_try_compile "$LINENO"; then :
2807 ac_hi=-1 ac_mid=-1
2808 while :; do
2809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2810/* end confdefs.h. */
2811$4
2812int
2813main ()
2814{
2815static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2816test_array [0] = 0
2817
2818 ;
2819 return 0;
2820}
2821_ACEOF
2822if ac_fn_c_try_compile "$LINENO"; then :
2823 ac_lo=$ac_mid; break
2824else
2825 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2826 if test $ac_mid -le $ac_hi; then
2827 ac_lo= ac_hi=
2828 break
2829 fi
2830 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2831fi
2832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2833 done
2834else
2835 ac_lo= ac_hi=
2836fi
2837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2838fi
2839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2840# Binary search between lo and hi bounds.
2841while test "x$ac_lo" != "x$ac_hi"; do
2842 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2844/* end confdefs.h. */
2845$4
2846int
2847main ()
2848{
2849static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2850test_array [0] = 0
2851
2852 ;
2853 return 0;
2854}
2855_ACEOF
2856if ac_fn_c_try_compile "$LINENO"; then :
2857 ac_hi=$ac_mid
2858else
2859 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2860fi
2861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2862done
2863case $ac_lo in #((
2864?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2865'') ac_retval=1 ;;
2866esac
2867 else
2868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2869/* end confdefs.h. */
2870$4
2871static long int longval () { return $2; }
2872static unsigned long int ulongval () { return $2; }
2873#include <stdio.h>
2874#include <stdlib.h>
2875int
2876main ()
2877{
2878
2879 FILE *f = fopen ("conftest.val", "w");
2880 if (! f)
2881 return 1;
2882 if (($2) < 0)
2883 {
2884 long int i = longval ();
2885 if (i != ($2))
2886 return 1;
2887 fprintf (f, "%ld", i);
2888 }
2889 else
2890 {
2891 unsigned long int i = ulongval ();
2892 if (i != ($2))
2893 return 1;
2894 fprintf (f, "%lu", i);
2895 }
2896 /* Do not output a trailing newline, as this causes \r\n confusion
2897 on some platforms. */
2898 return ferror (f) || fclose (f) != 0;
2899
2900 ;
2901 return 0;
2902}
2903_ACEOF
2904if ac_fn_c_try_run "$LINENO"; then :
2905 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2906else
2907 ac_retval=1
2908fi
2909rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2910 conftest.$ac_objext conftest.beam conftest.$ac_ext
2911rm -f conftest.val
2912
2913 fi
2914 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2915 return $ac_retval
2916
2917} # ac_fn_c_compute_int
2918
8690e634
JK
2919# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2920# -------------------------------------------
2921# Tests whether TYPE exists after having included INCLUDES, setting cache
2922# variable VAR accordingly.
2923ac_fn_c_check_type ()
c971b7fa
PA
2924{
2925 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2927$as_echo_n "checking for $2... " >&6; }
2928if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2929 $as_echo_n "(cached) " >&6
2930else
8690e634 2931 eval "$3=no"
c971b7fa
PA
2932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2933/* end confdefs.h. */
8690e634 2934$4
c971b7fa
PA
2935int
2936main ()
2937{
8690e634
JK
2938if (sizeof ($2))
2939 return 0;
c971b7fa
PA
2940 ;
2941 return 0;
2942}
2943_ACEOF
8690e634 2944if ac_fn_c_try_compile "$LINENO"; then :
c971b7fa
PA
2945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2946/* end confdefs.h. */
2947$4
2948int
2949main ()
2950{
8690e634
JK
2951if (sizeof (($2)))
2952 return 0;
c971b7fa
PA
2953 ;
2954 return 0;
2955}
2956_ACEOF
2957if ac_fn_c_try_compile "$LINENO"; then :
8690e634 2958
c971b7fa 2959else
8690e634
JK
2960 eval "$3=yes"
2961fi
2962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa
PA
2963fi
2964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2965fi
2966eval ac_res=\$$3
2967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2968$as_echo "$ac_res" >&6; }
2969 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2970
8690e634 2971} # ac_fn_c_check_type
c971b7fa
PA
2972cat >config.log <<_ACEOF
2973This file contains any messages produced by compilers while
2974running configure, to aid debugging if configure makes a mistake.
2975
2976It was created by $as_me, which was
2977generated by GNU Autoconf 2.64. Invocation command line was
2978
2979 $ $0 $@
2980
2981_ACEOF
2982exec 5>>config.log
2983{
2984cat <<_ASUNAME
2985## --------- ##
2986## Platform. ##
2987## --------- ##
2988
2989hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2990uname -m = `(uname -m) 2>/dev/null || echo unknown`
2991uname -r = `(uname -r) 2>/dev/null || echo unknown`
2992uname -s = `(uname -s) 2>/dev/null || echo unknown`
2993uname -v = `(uname -v) 2>/dev/null || echo unknown`
2994
2995/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2996/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2997
2998/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2999/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3000/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3001/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3002/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3003/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3004/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3005
3006_ASUNAME
3007
3008as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3009for as_dir in $PATH
3010do
3011 IFS=$as_save_IFS
3012 test -z "$as_dir" && as_dir=.
3013 $as_echo "PATH: $as_dir"
3014 done
3015IFS=$as_save_IFS
3016
3017} >&5
3018
3019cat >&5 <<_ACEOF
3020
3021
3022## ----------- ##
3023## Core tests. ##
3024## ----------- ##
3025
3026_ACEOF
3027
3028
3029# Keep a trace of the command line.
3030# Strip out --no-create and --no-recursion so they do not pile up.
3031# Strip out --silent because we don't want to record it for future runs.
3032# Also quote any args containing shell meta-characters.
3033# Make two passes to allow for proper duplicate-argument suppression.
3034ac_configure_args=
3035ac_configure_args0=
3036ac_configure_args1=
3037ac_must_keep_next=false
3038for ac_pass in 1 2
3039do
3040 for ac_arg
3041 do
3042 case $ac_arg in
3043 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3044 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3045 | -silent | --silent | --silen | --sile | --sil)
3046 continue ;;
3047 *\'*)
3048 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3049 esac
3050 case $ac_pass in
3051 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3052 2)
3053 as_fn_append ac_configure_args1 " '$ac_arg'"
3054 if test $ac_must_keep_next = true; then
3055 ac_must_keep_next=false # Got value, back to normal.
3056 else
3057 case $ac_arg in
3058 *=* | --config-cache | -C | -disable-* | --disable-* \
3059 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3060 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3061 | -with-* | --with-* | -without-* | --without-* | --x)
3062 case "$ac_configure_args0 " in
3063 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3064 esac
3065 ;;
3066 -* ) ac_must_keep_next=true ;;
3067 esac
3068 fi
3069 as_fn_append ac_configure_args " '$ac_arg'"
3070 ;;
3071 esac
3072 done
3073done
3074{ ac_configure_args0=; unset ac_configure_args0;}
3075{ ac_configure_args1=; unset ac_configure_args1;}
3076
3077# When interrupted or exit'd, cleanup temporary files, and complete
3078# config.log. We remove comments because anyway the quotes in there
3079# would cause problems or look ugly.
3080# WARNING: Use '\'' to represent an apostrophe within the trap.
3081# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3082trap 'exit_status=$?
3083 # Save into config.log some information that might help in debugging.
3084 {
3085 echo
3086
3087 cat <<\_ASBOX
3088## ---------------- ##
3089## Cache variables. ##
3090## ---------------- ##
3091_ASBOX
3092 echo
3093 # The following way of writing the cache mishandles newlines in values,
3094(
3095 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3096 eval ac_val=\$$ac_var
3097 case $ac_val in #(
3098 *${as_nl}*)
3099 case $ac_var in #(
3100 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3101$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3102 esac
3103 case $ac_var in #(
3104 _ | IFS | as_nl) ;; #(
3105 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3106 *) { eval $ac_var=; unset $ac_var;} ;;
3107 esac ;;
3108 esac
3109 done
3110 (set) 2>&1 |
3111 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3112 *${as_nl}ac_space=\ *)
3113 sed -n \
3114 "s/'\''/'\''\\\\'\'''\''/g;
3115 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3116 ;; #(
3117 *)
3118 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3119 ;;
3120 esac |
3121 sort
3122)
3123 echo
3124
3125 cat <<\_ASBOX
3126## ----------------- ##
3127## Output variables. ##
3128## ----------------- ##
3129_ASBOX
3130 echo
3131 for ac_var in $ac_subst_vars
3132 do
3133 eval ac_val=\$$ac_var
3134 case $ac_val in
3135 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3136 esac
3137 $as_echo "$ac_var='\''$ac_val'\''"
3138 done | sort
3139 echo
3140
3141 if test -n "$ac_subst_files"; then
3142 cat <<\_ASBOX
3143## ------------------- ##
3144## File substitutions. ##
3145## ------------------- ##
3146_ASBOX
3147 echo
3148 for ac_var in $ac_subst_files
3149 do
3150 eval ac_val=\$$ac_var
3151 case $ac_val in
3152 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3153 esac
3154 $as_echo "$ac_var='\''$ac_val'\''"
3155 done | sort
3156 echo
3157 fi
3158
3159 if test -s confdefs.h; then
3160 cat <<\_ASBOX
3161## ----------- ##
3162## confdefs.h. ##
3163## ----------- ##
3164_ASBOX
3165 echo
3166 cat confdefs.h
3167 echo
3168 fi
3169 test "$ac_signal" != 0 &&
3170 $as_echo "$as_me: caught signal $ac_signal"
3171 $as_echo "$as_me: exit $exit_status"
3172 } >&5
3173 rm -f core *.core core.conftest.* &&
3174 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3175 exit $exit_status
3176' 0
3177for ac_signal in 1 2 13 15; do
3178 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3179done
3180ac_signal=0
3181
3182# confdefs.h avoids OS command line length limits that DEFS can exceed.
3183rm -f -r conftest* confdefs.h
3184
3185$as_echo "/* confdefs.h */" > confdefs.h
3186
3187# Predefined preprocessor variables.
3188
3189cat >>confdefs.h <<_ACEOF
3190#define PACKAGE_NAME "$PACKAGE_NAME"
3191_ACEOF
3192
3193cat >>confdefs.h <<_ACEOF
3194#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3195_ACEOF
3196
3197cat >>confdefs.h <<_ACEOF
3198#define PACKAGE_VERSION "$PACKAGE_VERSION"
3199_ACEOF
3200
3201cat >>confdefs.h <<_ACEOF
3202#define PACKAGE_STRING "$PACKAGE_STRING"
3203_ACEOF
3204
3205cat >>confdefs.h <<_ACEOF
3206#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3207_ACEOF
3208
3209cat >>confdefs.h <<_ACEOF
3210#define PACKAGE_URL "$PACKAGE_URL"
3211_ACEOF
3212
3213
3214# Let the site file select an alternate cache file if it wants to.
3215# Prefer an explicitly selected file to automatically selected ones.
3216ac_site_file1=NONE
3217ac_site_file2=NONE
3218if test -n "$CONFIG_SITE"; then
3219 ac_site_file1=$CONFIG_SITE
3220elif test "x$prefix" != xNONE; then
3221 ac_site_file1=$prefix/share/config.site
3222 ac_site_file2=$prefix/etc/config.site
3223else
3224 ac_site_file1=$ac_default_prefix/share/config.site
3225 ac_site_file2=$ac_default_prefix/etc/config.site
3226fi
3227for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3228do
3229 test "x$ac_site_file" = xNONE && continue
3230 if test -r "$ac_site_file"; then
3231 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3232$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3233 sed 's/^/| /' "$ac_site_file" >&5
3234 . "$ac_site_file"
3235 fi
3236done
3237
3238if test -r "$cache_file"; then
3239 # Some versions of bash will fail to source /dev/null (special
3240 # files actually), so we avoid doing that.
3241 if test -f "$cache_file"; then
3242 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3243$as_echo "$as_me: loading cache $cache_file" >&6;}
3244 case $cache_file in
3245 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3246 *) . "./$cache_file";;
3247 esac
3248 fi
3249else
3250 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3251$as_echo "$as_me: creating cache $cache_file" >&6;}
3252 >$cache_file
3253fi
3254
98399780
YQ
3255as_fn_append ac_func_list " canonicalize_file_name"
3256as_fn_append ac_func_list " getcwd"
3257as_fn_append ac_func_list " readlink"
3258as_fn_append ac_func_list " realpath"
3259as_fn_append ac_header_list " sys/param.h"
e26b6bb0 3260as_fn_append ac_header_list " dirent.h"
3574124b
PA
3261as_fn_append ac_func_list " btowc"
3262as_fn_append ac_func_list " isblank"
3263as_fn_append ac_func_list " iswctype"
3264as_fn_append ac_func_list " mbsrtowcs"
3265as_fn_append ac_func_list " mempcpy"
3266as_fn_append ac_func_list " wmemchr"
3267as_fn_append ac_func_list " wmemcpy"
3268as_fn_append ac_func_list " wmempcpy"
3269as_fn_append ac_header_list " wctype.h"
8690e634 3270gl_fnmatch_required=GNU
3574124b
PA
3271as_fn_append ac_func_list " alarm"
3272as_fn_append ac_header_list " wchar.h"
3273as_fn_append ac_header_list " stdint.h"
3274as_fn_append ac_header_list " inttypes.h"
3275as_fn_append ac_header_list " unistd.h"
3276as_fn_append ac_func_list " symlink"
f45c62c4 3277as_fn_append ac_func_list " lstat"
3574124b
PA
3278as_fn_append ac_header_list " math.h"
3279as_fn_append ac_func_list " mbsinit"
3280as_fn_append ac_func_list " mbrtowc"
3281as_fn_append ac_header_list " sys/mman.h"
3282as_fn_append ac_func_list " mprotect"
6a29c58e 3283as_fn_append ac_func_list " link"
09607c9e
TT
3284as_fn_append ac_header_list " sys/stat.h"
3285as_fn_append ac_header_list " sys/time.h"
3574124b
PA
3286as_fn_append ac_header_list " features.h"
3287as_fn_append ac_func_list " iswcntrl"
c971b7fa
PA
3288# Check that the precious variables saved in the cache have kept the same
3289# value.
3290ac_cache_corrupted=false
3291for ac_var in $ac_precious_vars; do
3292 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3293 eval ac_new_set=\$ac_env_${ac_var}_set
3294 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3295 eval ac_new_val=\$ac_env_${ac_var}_value
3296 case $ac_old_set,$ac_new_set in
3297 set,)
3298 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3299$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3300 ac_cache_corrupted=: ;;
3301 ,set)
3302 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3303$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3304 ac_cache_corrupted=: ;;
3305 ,);;
3306 *)
3307 if test "x$ac_old_val" != "x$ac_new_val"; then
3308 # differences in whitespace do not lead to failure.
3309 ac_old_val_w=`echo x $ac_old_val`
3310 ac_new_val_w=`echo x $ac_new_val`
3311 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3312 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3313$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3314 ac_cache_corrupted=:
3315 else
3316 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3317$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3318 eval $ac_var=\$ac_old_val
3319 fi
3320 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3321$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3322 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3323$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3324 fi;;
3325 esac
3326 # Pass precious variables to config.status.
3327 if test "$ac_new_set" = set; then
3328 case $ac_new_val in
3329 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3330 *) ac_arg=$ac_var=$ac_new_val ;;
3331 esac
3332 case " $ac_configure_args " in
3333 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3334 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3335 esac
3336 fi
3337done
3338if $ac_cache_corrupted; then
3339 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3340$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3341 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3342$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3343 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3344fi
3345## -------------------- ##
3346## Main body of script. ##
3347## -------------------- ##
3348
3349ac_ext=c
3350ac_cpp='$CPP $CPPFLAGS'
3351ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3352ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3353ac_compiler_gnu=$ac_cv_c_compiler_gnu
3354
3355
3356ac_config_headers="$ac_config_headers config.h:config.in"
3357
3358
3359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
3360$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
3361 # Check whether --enable-maintainer-mode was given.
3362if test "${enable_maintainer_mode+set}" = set; then :
3363 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
3364else
3365 USE_MAINTAINER_MODE=no
3366fi
3367
3368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3369$as_echo "$USE_MAINTAINER_MODE" >&6; }
3370 if test $USE_MAINTAINER_MODE = yes; then
3371 MAINTAINER_MODE_TRUE=
3372 MAINTAINER_MODE_FALSE='#'
3373else
3374 MAINTAINER_MODE_TRUE='#'
3375 MAINTAINER_MODE_FALSE=
3376fi
3377
3378 MAINT=$MAINTAINER_MODE_TRUE
3379
3380
3381
3382ac_ext=c
3383ac_cpp='$CPP $CPPFLAGS'
3384ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3385ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3386ac_compiler_gnu=$ac_cv_c_compiler_gnu
3387if test -n "$ac_tool_prefix"; then
3388 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3389set dummy ${ac_tool_prefix}gcc; ac_word=$2
3390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3391$as_echo_n "checking for $ac_word... " >&6; }
3392if test "${ac_cv_prog_CC+set}" = set; then :
3393 $as_echo_n "(cached) " >&6
3394else
3395 if test -n "$CC"; then
3396 ac_cv_prog_CC="$CC" # Let the user override the test.
3397else
3398as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3399for as_dir in $PATH
3400do
3401 IFS=$as_save_IFS
3402 test -z "$as_dir" && as_dir=.
3403 for ac_exec_ext in '' $ac_executable_extensions; do
3404 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3405 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3406 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3407 break 2
3408 fi
3409done
3410 done
3411IFS=$as_save_IFS
3412
3413fi
3414fi
3415CC=$ac_cv_prog_CC
3416if test -n "$CC"; then
3417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3418$as_echo "$CC" >&6; }
3419else
3420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3421$as_echo "no" >&6; }
3422fi
3423
3424
3425fi
3426if test -z "$ac_cv_prog_CC"; then
3427 ac_ct_CC=$CC
3428 # Extract the first word of "gcc", so it can be a program name with args.
3429set dummy gcc; ac_word=$2
3430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3431$as_echo_n "checking for $ac_word... " >&6; }
3432if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3433 $as_echo_n "(cached) " >&6
3434else
3435 if test -n "$ac_ct_CC"; then
3436 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3437else
3438as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3439for as_dir in $PATH
3440do
3441 IFS=$as_save_IFS
3442 test -z "$as_dir" && as_dir=.
3443 for ac_exec_ext in '' $ac_executable_extensions; do
3444 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3445 ac_cv_prog_ac_ct_CC="gcc"
3446 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3447 break 2
3448 fi
3449done
3450 done
3451IFS=$as_save_IFS
3452
3453fi
3454fi
3455ac_ct_CC=$ac_cv_prog_ac_ct_CC
3456if test -n "$ac_ct_CC"; then
3457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3458$as_echo "$ac_ct_CC" >&6; }
3459else
3460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3461$as_echo "no" >&6; }
3462fi
3463
3464 if test "x$ac_ct_CC" = x; then
3465 CC=""
3466 else
3467 case $cross_compiling:$ac_tool_warned in
3468yes:)
3469{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3470$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3471ac_tool_warned=yes ;;
3472esac
3473 CC=$ac_ct_CC
3474 fi
3475else
3476 CC="$ac_cv_prog_CC"
3477fi
3478
3479if test -z "$CC"; then
3480 if test -n "$ac_tool_prefix"; then
3481 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3482set dummy ${ac_tool_prefix}cc; ac_word=$2
3483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3484$as_echo_n "checking for $ac_word... " >&6; }
3485if test "${ac_cv_prog_CC+set}" = set; then :
3486 $as_echo_n "(cached) " >&6
3487else
3488 if test -n "$CC"; then
3489 ac_cv_prog_CC="$CC" # Let the user override the test.
3490else
3491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3492for as_dir in $PATH
3493do
3494 IFS=$as_save_IFS
3495 test -z "$as_dir" && as_dir=.
3496 for ac_exec_ext in '' $ac_executable_extensions; do
3497 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3498 ac_cv_prog_CC="${ac_tool_prefix}cc"
3499 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3500 break 2
3501 fi
3502done
3503 done
3504IFS=$as_save_IFS
3505
3506fi
3507fi
3508CC=$ac_cv_prog_CC
3509if test -n "$CC"; then
3510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3511$as_echo "$CC" >&6; }
3512else
3513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3514$as_echo "no" >&6; }
3515fi
3516
3517
3518 fi
3519fi
3520if test -z "$CC"; then
3521 # Extract the first word of "cc", so it can be a program name with args.
3522set dummy cc; ac_word=$2
3523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3524$as_echo_n "checking for $ac_word... " >&6; }
3525if test "${ac_cv_prog_CC+set}" = set; then :
3526 $as_echo_n "(cached) " >&6
3527else
3528 if test -n "$CC"; then
3529 ac_cv_prog_CC="$CC" # Let the user override the test.
3530else
3531 ac_prog_rejected=no
3532as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3533for as_dir in $PATH
3534do
3535 IFS=$as_save_IFS
3536 test -z "$as_dir" && as_dir=.
3537 for ac_exec_ext in '' $ac_executable_extensions; do
3538 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3539 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3540 ac_prog_rejected=yes
3541 continue
3542 fi
3543 ac_cv_prog_CC="cc"
3544 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3545 break 2
3546 fi
3547done
3548 done
3549IFS=$as_save_IFS
3550
3551if test $ac_prog_rejected = yes; then
3552 # We found a bogon in the path, so make sure we never use it.
3553 set dummy $ac_cv_prog_CC
3554 shift
3555 if test $# != 0; then
3556 # We chose a different compiler from the bogus one.
3557 # However, it has the same basename, so the bogon will be chosen
3558 # first if we set CC to just the basename; use the full file name.
3559 shift
3560 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3561 fi
3562fi
3563fi
3564fi
3565CC=$ac_cv_prog_CC
3566if test -n "$CC"; then
3567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3568$as_echo "$CC" >&6; }
3569else
3570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3571$as_echo "no" >&6; }
3572fi
3573
3574
3575fi
3576if test -z "$CC"; then
3577 if test -n "$ac_tool_prefix"; then
3578 for ac_prog in cl.exe
3579 do
3580 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3581set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3583$as_echo_n "checking for $ac_word... " >&6; }
3584if test "${ac_cv_prog_CC+set}" = set; then :
3585 $as_echo_n "(cached) " >&6
3586else
3587 if test -n "$CC"; then
3588 ac_cv_prog_CC="$CC" # Let the user override the test.
3589else
3590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3591for as_dir in $PATH
3592do
3593 IFS=$as_save_IFS
3594 test -z "$as_dir" && as_dir=.
3595 for ac_exec_ext in '' $ac_executable_extensions; do
3596 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3597 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3598 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3599 break 2
3600 fi
3601done
3602 done
3603IFS=$as_save_IFS
3604
3605fi
3606fi
3607CC=$ac_cv_prog_CC
3608if test -n "$CC"; then
3609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3610$as_echo "$CC" >&6; }
3611else
3612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3613$as_echo "no" >&6; }
3614fi
3615
3616
3617 test -n "$CC" && break
3618 done
3619fi
3620if test -z "$CC"; then
3621 ac_ct_CC=$CC
3622 for ac_prog in cl.exe
3623do
3624 # Extract the first word of "$ac_prog", so it can be a program name with args.
3625set dummy $ac_prog; ac_word=$2
3626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3627$as_echo_n "checking for $ac_word... " >&6; }
3628if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3629 $as_echo_n "(cached) " >&6
3630else
3631 if test -n "$ac_ct_CC"; then
3632 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3633else
3634as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3635for as_dir in $PATH
3636do
3637 IFS=$as_save_IFS
3638 test -z "$as_dir" && as_dir=.
3639 for ac_exec_ext in '' $ac_executable_extensions; do
3640 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3641 ac_cv_prog_ac_ct_CC="$ac_prog"
3642 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3643 break 2
3644 fi
3645done
3646 done
3647IFS=$as_save_IFS
3648
3649fi
3650fi
3651ac_ct_CC=$ac_cv_prog_ac_ct_CC
3652if test -n "$ac_ct_CC"; then
3653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3654$as_echo "$ac_ct_CC" >&6; }
3655else
3656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3657$as_echo "no" >&6; }
3658fi
3659
3660
3661 test -n "$ac_ct_CC" && break
3662done
3663
3664 if test "x$ac_ct_CC" = x; then
3665 CC=""
3666 else
3667 case $cross_compiling:$ac_tool_warned in
3668yes:)
3669{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3670$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3671ac_tool_warned=yes ;;
3672esac
3673 CC=$ac_ct_CC
3674 fi
3675fi
3676
3677fi
3678
3679
3680test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3681$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3682as_fn_error "no acceptable C compiler found in \$PATH
3683See \`config.log' for more details." "$LINENO" 5; }
3684
3685# Provide some information about the compiler.
3686$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3687set X $ac_compile
3688ac_compiler=$2
3689for ac_option in --version -v -V -qversion; do
3690 { { ac_try="$ac_compiler $ac_option >&5"
3691case "(($ac_try" in
3692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3693 *) ac_try_echo=$ac_try;;
3694esac
3695eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3696$as_echo "$ac_try_echo"; } >&5
3697 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3698 ac_status=$?
3699 if test -s conftest.err; then
3700 sed '10a\
3701... rest of stderr output deleted ...
3702 10q' conftest.err >conftest.er1
3703 cat conftest.er1 >&5
3704 rm -f conftest.er1 conftest.err
3705 fi
3706 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3707 test $ac_status = 0; }
3708done
3709
3710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3711/* end confdefs.h. */
3712#include <stdio.h>
3713int
3714main ()
3715{
3716FILE *f = fopen ("conftest.out", "w");
3717 return ferror (f) || fclose (f) != 0;
3718
3719 ;
3720 return 0;
3721}
3722_ACEOF
3723ac_clean_files_save=$ac_clean_files
3724ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
3725# Try to create an executable without -o first, disregard a.out.
3726# It will help us diagnose broken compilers, and finding out an intuition
3727# of exeext.
3728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3729$as_echo_n "checking for C compiler default output file name... " >&6; }
3730ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3731
3732# The possible output files:
3733ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3734
3735ac_rmfiles=
3736for ac_file in $ac_files
3737do
3738 case $ac_file in
3739 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3740 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3741 esac
3742done
3743rm -f $ac_rmfiles
3744
3745if { { ac_try="$ac_link_default"
3746case "(($ac_try" in
3747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3748 *) ac_try_echo=$ac_try;;
3749esac
3750eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3751$as_echo "$ac_try_echo"; } >&5
3752 (eval "$ac_link_default") 2>&5
3753 ac_status=$?
3754 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3755 test $ac_status = 0; }; then :
3756 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3757# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3758# in a Makefile. We should not override ac_cv_exeext if it was cached,
3759# so that the user can short-circuit this test for compilers unknown to
3760# Autoconf.
3761for ac_file in $ac_files ''
3762do
3763 test -f "$ac_file" || continue
3764 case $ac_file in
3765 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3766 ;;
3767 [ab].out )
3768 # We found the default executable, but exeext='' is most
3769 # certainly right.
3770 break;;
3771 *.* )
3772 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3773 then :; else
3774 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3775 fi
3776 # We set ac_cv_exeext here because the later test for it is not
3777 # safe: cross compilers may not add the suffix if given an `-o'
3778 # argument, so we may need to know it at that point already.
3779 # Even if this section looks crufty: it has the advantage of
3780 # actually working.
3781 break;;
3782 * )
3783 break;;
3784 esac
3785done
3786test "$ac_cv_exeext" = no && ac_cv_exeext=
3787
3788else
3789 ac_file=''
3790fi
3791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3792$as_echo "$ac_file" >&6; }
3793if test -z "$ac_file"; then :
3794 $as_echo "$as_me: failed program was:" >&5
3795sed 's/^/| /' conftest.$ac_ext >&5
3796
3797{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3798$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3799{ as_fn_set_status 77
3800as_fn_error "C compiler cannot create executables
3801See \`config.log' for more details." "$LINENO" 5; }; }
3802fi
3803ac_exeext=$ac_cv_exeext
3804
3805# Check that the compiler produces executables we can run. If not, either
3806# the compiler is broken, or we cross compile.
3807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3808$as_echo_n "checking whether the C compiler works... " >&6; }
3809# If not cross compiling, check that we can run a simple program.
3810if test "$cross_compiling" != yes; then
3811 if { ac_try='./$ac_file'
3812 { { case "(($ac_try" in
3813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3814 *) ac_try_echo=$ac_try;;
3815esac
3816eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3817$as_echo "$ac_try_echo"; } >&5
3818 (eval "$ac_try") 2>&5
3819 ac_status=$?
3820 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3821 test $ac_status = 0; }; }; then
3822 cross_compiling=no
3823 else
3824 if test "$cross_compiling" = maybe; then
3825 cross_compiling=yes
3826 else
3827 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3828$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3829as_fn_error "cannot run C compiled programs.
3830If you meant to cross compile, use \`--host'.
3831See \`config.log' for more details." "$LINENO" 5; }
3832 fi
3833 fi
3834fi
3835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3836$as_echo "yes" >&6; }
3837
3838rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
3839ac_clean_files=$ac_clean_files_save
3840# Check that the compiler produces executables we can run. If not, either
3841# the compiler is broken, or we cross compile.
3842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3843$as_echo_n "checking whether we are cross compiling... " >&6; }
3844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3845$as_echo "$cross_compiling" >&6; }
3846
3847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3848$as_echo_n "checking for suffix of executables... " >&6; }
3849if { { ac_try="$ac_link"
3850case "(($ac_try" in
3851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3852 *) ac_try_echo=$ac_try;;
3853esac
3854eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3855$as_echo "$ac_try_echo"; } >&5
3856 (eval "$ac_link") 2>&5
3857 ac_status=$?
3858 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3859 test $ac_status = 0; }; then :
3860 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3861# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3862# work properly (i.e., refer to `conftest.exe'), while it won't with
3863# `rm'.
3864for ac_file in conftest.exe conftest conftest.*; do
3865 test -f "$ac_file" || continue
3866 case $ac_file in
3867 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3868 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3869 break;;
3870 * ) break;;
3871 esac
3872done
3873else
3874 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3875$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3876as_fn_error "cannot compute suffix of executables: cannot compile and link
3877See \`config.log' for more details." "$LINENO" 5; }
3878fi
3879rm -f conftest$ac_cv_exeext
3880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3881$as_echo "$ac_cv_exeext" >&6; }
3882
3883rm -f conftest.$ac_ext
3884EXEEXT=$ac_cv_exeext
3885ac_exeext=$EXEEXT
3886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3887$as_echo_n "checking for suffix of object files... " >&6; }
3888if test "${ac_cv_objext+set}" = set; then :
3889 $as_echo_n "(cached) " >&6
3890else
3891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3892/* end confdefs.h. */
3893
3894int
3895main ()
3896{
3897
3898 ;
3899 return 0;
3900}
3901_ACEOF
3902rm -f conftest.o conftest.obj
3903if { { ac_try="$ac_compile"
3904case "(($ac_try" in
3905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3906 *) ac_try_echo=$ac_try;;
3907esac
3908eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3909$as_echo "$ac_try_echo"; } >&5
3910 (eval "$ac_compile") 2>&5
3911 ac_status=$?
3912 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3913 test $ac_status = 0; }; then :
3914 for ac_file in conftest.o conftest.obj conftest.*; do
3915 test -f "$ac_file" || continue;
3916 case $ac_file in
3917 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3918 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3919 break;;
3920 esac
3921done
3922else
3923 $as_echo "$as_me: failed program was:" >&5
3924sed 's/^/| /' conftest.$ac_ext >&5
3925
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 object files: cannot compile
3929See \`config.log' for more details." "$LINENO" 5; }
3930fi
3931rm -f conftest.$ac_cv_objext conftest.$ac_ext
3932fi
3933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3934$as_echo "$ac_cv_objext" >&6; }
3935OBJEXT=$ac_cv_objext
3936ac_objext=$OBJEXT
3937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3938$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3939if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3940 $as_echo_n "(cached) " >&6
3941else
3942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3943/* end confdefs.h. */
3944
3945int
3946main ()
3947{
3948#ifndef __GNUC__
3949 choke me
3950#endif
3951
3952 ;
3953 return 0;
3954}
3955_ACEOF
3956if ac_fn_c_try_compile "$LINENO"; then :
3957 ac_compiler_gnu=yes
3958else
3959 ac_compiler_gnu=no
3960fi
3961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3962ac_cv_c_compiler_gnu=$ac_compiler_gnu
3963
3964fi
3965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3966$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3967if test $ac_compiler_gnu = yes; then
3968 GCC=yes
3969else
3970 GCC=
3971fi
3972ac_test_CFLAGS=${CFLAGS+set}
3973ac_save_CFLAGS=$CFLAGS
3974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3975$as_echo_n "checking whether $CC accepts -g... " >&6; }
3976if test "${ac_cv_prog_cc_g+set}" = set; then :
3977 $as_echo_n "(cached) " >&6
3978else
3979 ac_save_c_werror_flag=$ac_c_werror_flag
3980 ac_c_werror_flag=yes
3981 ac_cv_prog_cc_g=no
3982 CFLAGS="-g"
3983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3984/* end confdefs.h. */
3985
3986int
3987main ()
3988{
3989
3990 ;
3991 return 0;
3992}
3993_ACEOF
3994if ac_fn_c_try_compile "$LINENO"; then :
3995 ac_cv_prog_cc_g=yes
3996else
3997 CFLAGS=""
3998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3999/* end confdefs.h. */
4000
4001int
4002main ()
4003{
4004
4005 ;
4006 return 0;
4007}
4008_ACEOF
4009if ac_fn_c_try_compile "$LINENO"; then :
4010
4011else
4012 ac_c_werror_flag=$ac_save_c_werror_flag
4013 CFLAGS="-g"
4014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4015/* end confdefs.h. */
4016
4017int
4018main ()
4019{
4020
4021 ;
4022 return 0;
4023}
4024_ACEOF
4025if ac_fn_c_try_compile "$LINENO"; then :
4026 ac_cv_prog_cc_g=yes
4027fi
4028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4029fi
4030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4031fi
4032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4033 ac_c_werror_flag=$ac_save_c_werror_flag
4034fi
4035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4036$as_echo "$ac_cv_prog_cc_g" >&6; }
4037if test "$ac_test_CFLAGS" = set; then
4038 CFLAGS=$ac_save_CFLAGS
4039elif test $ac_cv_prog_cc_g = yes; then
4040 if test "$GCC" = yes; then
4041 CFLAGS="-g -O2"
4042 else
4043 CFLAGS="-g"
4044 fi
4045else
4046 if test "$GCC" = yes; then
4047 CFLAGS="-O2"
4048 else
4049 CFLAGS=
4050 fi
4051fi
4052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4053$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4054if test "${ac_cv_prog_cc_c89+set}" = set; then :
4055 $as_echo_n "(cached) " >&6
4056else
4057 ac_cv_prog_cc_c89=no
4058ac_save_CC=$CC
4059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4060/* end confdefs.h. */
4061#include <stdarg.h>
4062#include <stdio.h>
4063#include <sys/types.h>
4064#include <sys/stat.h>
4065/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4066struct buf { int x; };
4067FILE * (*rcsopen) (struct buf *, struct stat *, int);
4068static char *e (p, i)
4069 char **p;
4070 int i;
4071{
4072 return p[i];
4073}
4074static char *f (char * (*g) (char **, int), char **p, ...)
4075{
4076 char *s;
4077 va_list v;
4078 va_start (v,p);
4079 s = g (p, va_arg (v,int));
4080 va_end (v);
4081 return s;
4082}
4083
4084/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4085 function prototypes and stuff, but not '\xHH' hex character constants.
4086 These don't provoke an error unfortunately, instead are silently treated
4087 as 'x'. The following induces an error, until -std is added to get
4088 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4089 array size at least. It's necessary to write '\x00'==0 to get something
4090 that's true only with -std. */
4091int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4092
4093/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4094 inside strings and character constants. */
4095#define FOO(x) 'x'
4096int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4097
4098int test (int i, double x);
4099struct s1 {int (*f) (int a);};
4100struct s2 {int (*f) (double a);};
4101int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4102int argc;
4103char **argv;
4104int
4105main ()
4106{
4107return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4108 ;
4109 return 0;
4110}
4111_ACEOF
4112for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4113 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4114do
4115 CC="$ac_save_CC $ac_arg"
4116 if ac_fn_c_try_compile "$LINENO"; then :
4117 ac_cv_prog_cc_c89=$ac_arg
4118fi
4119rm -f core conftest.err conftest.$ac_objext
4120 test "x$ac_cv_prog_cc_c89" != "xno" && break
4121done
4122rm -f conftest.$ac_ext
4123CC=$ac_save_CC
4124
4125fi
4126# AC_CACHE_VAL
4127case "x$ac_cv_prog_cc_c89" in
4128 x)
4129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4130$as_echo "none needed" >&6; } ;;
4131 xno)
4132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4133$as_echo "unsupported" >&6; } ;;
4134 *)
4135 CC="$CC $ac_cv_prog_cc_c89"
4136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4137$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4138esac
4139if test "x$ac_cv_prog_cc_c89" != xno; then :
4140
4141fi
4142
4143ac_ext=c
4144ac_cpp='$CPP $CPPFLAGS'
4145ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4146ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4147ac_compiler_gnu=$ac_cv_c_compiler_gnu
4148
4149ac_aux_dir=
4150for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4151 for ac_t in install-sh install.sh shtool; do
4152 if test -f "$ac_dir/$ac_t"; then
4153 ac_aux_dir=$ac_dir
4154 ac_install_sh="$ac_aux_dir/$ac_t -c"
4155 break 2
4156 fi
4157 done
4158done
4159if test -z "$ac_aux_dir"; then
4160 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4161fi
4162
4163# These three variables are undocumented and unsupported,
4164# and are intended to be withdrawn in a future Autoconf release.
4165# They can cause serious problems if a builder's source tree is in a directory
4166# whose full name contains unusual characters.
4167ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4168ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4169ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4170
4171
4172# Make sure we can run config.sub.
4173$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4174 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4175
4176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4177$as_echo_n "checking build system type... " >&6; }
4178if test "${ac_cv_build+set}" = set; then :
4179 $as_echo_n "(cached) " >&6
4180else
4181 ac_build_alias=$build_alias
4182test "x$ac_build_alias" = x &&
4183 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4184test "x$ac_build_alias" = x &&
4185 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4186ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4187 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4188
4189fi
4190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4191$as_echo "$ac_cv_build" >&6; }
4192case $ac_cv_build in
4193*-*-*) ;;
4194*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
4195esac
4196build=$ac_cv_build
4197ac_save_IFS=$IFS; IFS='-'
4198set x $ac_cv_build
4199shift
4200build_cpu=$1
4201build_vendor=$2
4202shift; shift
4203# Remember, the first character of IFS is used to create $*,
4204# except with old shells:
4205build_os=$*
4206IFS=$ac_save_IFS
4207case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4208
4209
4210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4211$as_echo_n "checking host system type... " >&6; }
4212if test "${ac_cv_host+set}" = set; then :
4213 $as_echo_n "(cached) " >&6
4214else
4215 if test "x$host_alias" = x; then
4216 ac_cv_host=$ac_cv_build
4217else
4218 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4219 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4220fi
4221
4222fi
4223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4224$as_echo "$ac_cv_host" >&6; }
4225case $ac_cv_host in
4226*-*-*) ;;
4227*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
4228esac
4229host=$ac_cv_host
4230ac_save_IFS=$IFS; IFS='-'
4231set x $ac_cv_host
4232shift
4233host_cpu=$1
4234host_vendor=$2
4235shift; shift
4236# Remember, the first character of IFS is used to create $*,
4237# except with old shells:
4238host_os=$*
4239IFS=$ac_save_IFS
4240case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4241
4242
4243
4244ac_ext=c
4245ac_cpp='$CPP $CPPFLAGS'
4246ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4247ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4248ac_compiler_gnu=$ac_cv_c_compiler_gnu
4249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4250$as_echo_n "checking how to run the C preprocessor... " >&6; }
4251# On Suns, sometimes $CPP names a directory.
4252if test -n "$CPP" && test -d "$CPP"; then
4253 CPP=
4254fi
4255if test -z "$CPP"; then
4256 if test "${ac_cv_prog_CPP+set}" = set; then :
4257 $as_echo_n "(cached) " >&6
4258else
4259 # Double quotes because CPP needs to be expanded
4260 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4261 do
4262 ac_preproc_ok=false
4263for ac_c_preproc_warn_flag in '' yes
4264do
4265 # Use a header file that comes with gcc, so configuring glibc
4266 # with a fresh cross-compiler works.
4267 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4268 # <limits.h> exists even on freestanding compilers.
4269 # On the NeXT, cc -E runs the code through the compiler's parser,
4270 # not just through cpp. "Syntax error" is here to catch this case.
4271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4272/* end confdefs.h. */
4273#ifdef __STDC__
4274# include <limits.h>
4275#else
4276# include <assert.h>
4277#endif
4278 Syntax error
4279_ACEOF
4280if ac_fn_c_try_cpp "$LINENO"; then :
4281
4282else
4283 # Broken: fails on valid input.
4284continue
4285fi
4286rm -f conftest.err conftest.$ac_ext
4287
4288 # OK, works on sane cases. Now check whether nonexistent headers
4289 # can be detected and how.
4290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4291/* end confdefs.h. */
4292#include <ac_nonexistent.h>
4293_ACEOF
4294if ac_fn_c_try_cpp "$LINENO"; then :
4295 # Broken: success on invalid input.
4296continue
4297else
4298 # Passes both tests.
4299ac_preproc_ok=:
4300break
4301fi
4302rm -f conftest.err conftest.$ac_ext
4303
4304done
4305# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4306rm -f conftest.err conftest.$ac_ext
4307if $ac_preproc_ok; then :
4308 break
4309fi
4310
4311 done
4312 ac_cv_prog_CPP=$CPP
4313
4314fi
4315 CPP=$ac_cv_prog_CPP
4316else
4317 ac_cv_prog_CPP=$CPP
4318fi
4319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4320$as_echo "$CPP" >&6; }
4321ac_preproc_ok=false
4322for ac_c_preproc_warn_flag in '' yes
4323do
4324 # Use a header file that comes with gcc, so configuring glibc
4325 # with a fresh cross-compiler works.
4326 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4327 # <limits.h> exists even on freestanding compilers.
4328 # On the NeXT, cc -E runs the code through the compiler's parser,
4329 # not just through cpp. "Syntax error" is here to catch this case.
4330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4331/* end confdefs.h. */
4332#ifdef __STDC__
4333# include <limits.h>
4334#else
4335# include <assert.h>
4336#endif
4337 Syntax error
4338_ACEOF
4339if ac_fn_c_try_cpp "$LINENO"; then :
4340
4341else
4342 # Broken: fails on valid input.
4343continue
4344fi
4345rm -f conftest.err conftest.$ac_ext
4346
4347 # OK, works on sane cases. Now check whether nonexistent headers
4348 # can be detected and how.
4349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4350/* end confdefs.h. */
4351#include <ac_nonexistent.h>
4352_ACEOF
4353if ac_fn_c_try_cpp "$LINENO"; then :
4354 # Broken: success on invalid input.
4355continue
4356else
4357 # Passes both tests.
4358ac_preproc_ok=:
4359break
4360fi
4361rm -f conftest.err conftest.$ac_ext
4362
4363done
4364# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4365rm -f conftest.err conftest.$ac_ext
4366if $ac_preproc_ok; then :
4367
4368else
4369 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4370$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4371as_fn_error "C preprocessor \"$CPP\" fails sanity check
4372See \`config.log' for more details." "$LINENO" 5; }
4373fi
4374
4375ac_ext=c
4376ac_cpp='$CPP $CPPFLAGS'
4377ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4378ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4379ac_compiler_gnu=$ac_cv_c_compiler_gnu
4380
4381
4382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4383$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4384if test "${ac_cv_path_GREP+set}" = set; then :
4385 $as_echo_n "(cached) " >&6
4386else
4387 if test -z "$GREP"; then
4388 ac_path_GREP_found=false
4389 # Loop through the user's path and test for each of PROGNAME-LIST
4390 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4391for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4392do
4393 IFS=$as_save_IFS
4394 test -z "$as_dir" && as_dir=.
4395 for ac_prog in grep ggrep; do
4396 for ac_exec_ext in '' $ac_executable_extensions; do
4397 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4398 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4399# Check for GNU ac_path_GREP and select it if it is found.
4400 # Check for GNU $ac_path_GREP
4401case `"$ac_path_GREP" --version 2>&1` in
4402*GNU*)
4403 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4404*)
4405 ac_count=0
4406 $as_echo_n 0123456789 >"conftest.in"
4407 while :
4408 do
4409 cat "conftest.in" "conftest.in" >"conftest.tmp"
4410 mv "conftest.tmp" "conftest.in"
4411 cp "conftest.in" "conftest.nl"
4412 $as_echo 'GREP' >> "conftest.nl"
4413 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4414 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4415 as_fn_arith $ac_count + 1 && ac_count=$as_val
4416 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4417 # Best one so far, save it but keep looking for a better one
4418 ac_cv_path_GREP="$ac_path_GREP"
4419 ac_path_GREP_max=$ac_count
4420 fi
4421 # 10*(2^10) chars as input seems more than enough
4422 test $ac_count -gt 10 && break
4423 done
4424 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4425esac
4426
4427 $ac_path_GREP_found && break 3
4428 done
4429 done
4430 done
4431IFS=$as_save_IFS
4432 if test -z "$ac_cv_path_GREP"; then
4433 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4434 fi
4435else
4436 ac_cv_path_GREP=$GREP
4437fi
4438
4439fi
4440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4441$as_echo "$ac_cv_path_GREP" >&6; }
4442 GREP="$ac_cv_path_GREP"
4443
4444
4445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4446$as_echo_n "checking for egrep... " >&6; }
4447if test "${ac_cv_path_EGREP+set}" = set; then :
4448 $as_echo_n "(cached) " >&6
4449else
4450 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4451 then ac_cv_path_EGREP="$GREP -E"
4452 else
4453 if test -z "$EGREP"; then
4454 ac_path_EGREP_found=false
4455 # Loop through the user's path and test for each of PROGNAME-LIST
4456 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4457for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4458do
4459 IFS=$as_save_IFS
4460 test -z "$as_dir" && as_dir=.
4461 for ac_prog in egrep; do
4462 for ac_exec_ext in '' $ac_executable_extensions; do
4463 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4464 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4465# Check for GNU ac_path_EGREP and select it if it is found.
4466 # Check for GNU $ac_path_EGREP
4467case `"$ac_path_EGREP" --version 2>&1` in
4468*GNU*)
4469 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4470*)
4471 ac_count=0
4472 $as_echo_n 0123456789 >"conftest.in"
4473 while :
4474 do
4475 cat "conftest.in" "conftest.in" >"conftest.tmp"
4476 mv "conftest.tmp" "conftest.in"
4477 cp "conftest.in" "conftest.nl"
4478 $as_echo 'EGREP' >> "conftest.nl"
4479 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4480 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4481 as_fn_arith $ac_count + 1 && ac_count=$as_val
4482 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4483 # Best one so far, save it but keep looking for a better one
4484 ac_cv_path_EGREP="$ac_path_EGREP"
4485 ac_path_EGREP_max=$ac_count
4486 fi
4487 # 10*(2^10) chars as input seems more than enough
4488 test $ac_count -gt 10 && break
4489 done
4490 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4491esac
4492
4493 $ac_path_EGREP_found && break 3
4494 done
4495 done
4496 done
4497IFS=$as_save_IFS
4498 if test -z "$ac_cv_path_EGREP"; then
4499 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4500 fi
4501else
4502 ac_cv_path_EGREP=$EGREP
4503fi
4504
4505 fi
4506fi
4507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4508$as_echo "$ac_cv_path_EGREP" >&6; }
4509 EGREP="$ac_cv_path_EGREP"
4510
4511
4512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4513$as_echo_n "checking for ANSI C header files... " >&6; }
4514if test "${ac_cv_header_stdc+set}" = set; then :
4515 $as_echo_n "(cached) " >&6
4516else
4517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4518/* end confdefs.h. */
4519#include <stdlib.h>
4520#include <stdarg.h>
4521#include <string.h>
4522#include <float.h>
4523
4524int
4525main ()
4526{
4527
4528 ;
4529 return 0;
4530}
4531_ACEOF
4532if ac_fn_c_try_compile "$LINENO"; then :
4533 ac_cv_header_stdc=yes
4534else
4535 ac_cv_header_stdc=no
4536fi
4537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4538
4539if test $ac_cv_header_stdc = yes; then
4540 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4542/* end confdefs.h. */
4543#include <string.h>
4544
4545_ACEOF
4546if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4547 $EGREP "memchr" >/dev/null 2>&1; then :
4548
4549else
4550 ac_cv_header_stdc=no
4551fi
4552rm -f conftest*
4553
4554fi
4555
4556if test $ac_cv_header_stdc = yes; then
4557 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4559/* end confdefs.h. */
4560#include <stdlib.h>
4561
4562_ACEOF
4563if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4564 $EGREP "free" >/dev/null 2>&1; then :
4565
4566else
4567 ac_cv_header_stdc=no
4568fi
4569rm -f conftest*
4570
4571fi
4572
4573if test $ac_cv_header_stdc = yes; then
4574 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4575 if test "$cross_compiling" = yes; then :
4576 :
4577else
4578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4579/* end confdefs.h. */
4580#include <ctype.h>
4581#include <stdlib.h>
4582#if ((' ' & 0x0FF) == 0x020)
4583# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4584# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4585#else
4586# define ISLOWER(c) \
4587 (('a' <= (c) && (c) <= 'i') \
4588 || ('j' <= (c) && (c) <= 'r') \
4589 || ('s' <= (c) && (c) <= 'z'))
4590# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4591#endif
4592
4593#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4594int
4595main ()
4596{
4597 int i;
4598 for (i = 0; i < 256; i++)
4599 if (XOR (islower (i), ISLOWER (i))
4600 || toupper (i) != TOUPPER (i))
4601 return 2;
4602 return 0;
4603}
4604_ACEOF
4605if ac_fn_c_try_run "$LINENO"; then :
4606
4607else
4608 ac_cv_header_stdc=no
4609fi
4610rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4611 conftest.$ac_objext conftest.beam conftest.$ac_ext
4612fi
4613
4614fi
4615fi
4616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4617$as_echo "$ac_cv_header_stdc" >&6; }
4618if test $ac_cv_header_stdc = yes; then
4619
4620$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4621
4622fi
4623
4624# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4625for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4626 inttypes.h stdint.h unistd.h
4627do :
4628 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4629ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4630"
4631eval as_val=\$$as_ac_Header
4632 if test "x$as_val" = x""yes; then :
4633 cat >>confdefs.h <<_ACEOF
4634#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4635_ACEOF
4636
4637fi
4638
4639done
4640
4641
4642
4643
4644
4645 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4646if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4647 MINIX=yes
4648else
4649 MINIX=
4650fi
4651
4652
4653 if test "$MINIX" = yes; then
4654
4655$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4656
4657
4658$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4659
4660
4661$as_echo "#define _MINIX 1" >>confdefs.h
4662
4663 fi
4664
4665 case "$host_os" in
4666 hpux*)
4667
4668$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
4669
4670 ;;
4671 esac
4672
4673
4674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4675$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4676if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4677 $as_echo_n "(cached) " >&6
4678else
4679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4680/* end confdefs.h. */
4681
4682# define __EXTENSIONS__ 1
4683 $ac_includes_default
4684int
4685main ()
4686{
4687
4688 ;
4689 return 0;
4690}
4691_ACEOF
4692if ac_fn_c_try_compile "$LINENO"; then :
4693 ac_cv_safe_to_define___extensions__=yes
4694else
4695 ac_cv_safe_to_define___extensions__=no
4696fi
4697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4698fi
4699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4700$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4701 test $ac_cv_safe_to_define___extensions__ = yes &&
4702 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4703
4704 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4705
4706 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
4707
4708 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4709
4710 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4711
4712 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4713
4714
4715
4716
4717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
4718$as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
4719if test "${gl_cv_c_amsterdam_compiler+set}" = set; then :
4720 $as_echo_n "(cached) " >&6
4721else
4722
4723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4724/* end confdefs.h. */
4725
4726#ifdef __ACK__
4727Amsterdam
4728#endif
4729
4730_ACEOF
4731if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4732 $EGREP "Amsterdam" >/dev/null 2>&1; then :
4733 gl_cv_c_amsterdam_compiler=yes
4734else
4735 gl_cv_c_amsterdam_compiler=no
4736fi
4737rm -f conftest*
4738
4739
4740fi
4741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
4742$as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
4743 if test -z "$AR"; then
4744 if test $gl_cv_c_amsterdam_compiler = yes; then
4745 AR='cc -c.a'
4746 if test -z "$ARFLAGS"; then
4747 ARFLAGS='-o'
4748 fi
4749 else
4750 if test -n "$ac_tool_prefix"; then
4751 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4752set dummy ${ac_tool_prefix}ar; ac_word=$2
4753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4754$as_echo_n "checking for $ac_word... " >&6; }
4755if test "${ac_cv_prog_AR+set}" = set; then :
4756 $as_echo_n "(cached) " >&6
4757else
4758 if test -n "$AR"; then
4759 ac_cv_prog_AR="$AR" # Let the user override the test.
4760else
4761as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4762for as_dir in $PATH
4763do
4764 IFS=$as_save_IFS
4765 test -z "$as_dir" && as_dir=.
4766 for ac_exec_ext in '' $ac_executable_extensions; do
4767 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4768 ac_cv_prog_AR="${ac_tool_prefix}ar"
4769 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4770 break 2
4771 fi
4772done
4773 done
4774IFS=$as_save_IFS
4775
4776fi
4777fi
4778AR=$ac_cv_prog_AR
4779if test -n "$AR"; then
4780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
4781$as_echo "$AR" >&6; }
4782else
4783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4784$as_echo "no" >&6; }
4785fi
4786
4787
4788fi
4789if test -z "$ac_cv_prog_AR"; then
4790 ac_ct_AR=$AR
4791 # Extract the first word of "ar", so it can be a program name with args.
4792set dummy ar; ac_word=$2
4793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4794$as_echo_n "checking for $ac_word... " >&6; }
4795if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
4796 $as_echo_n "(cached) " >&6
4797else
4798 if test -n "$ac_ct_AR"; then
4799 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4800else
4801as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4802for as_dir in $PATH
4803do
4804 IFS=$as_save_IFS
4805 test -z "$as_dir" && as_dir=.
4806 for ac_exec_ext in '' $ac_executable_extensions; do
4807 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4808 ac_cv_prog_ac_ct_AR="ar"
4809 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4810 break 2
4811 fi
4812done
4813 done
4814IFS=$as_save_IFS
4815
4816fi
4817fi
4818ac_ct_AR=$ac_cv_prog_ac_ct_AR
4819if test -n "$ac_ct_AR"; then
4820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
4821$as_echo "$ac_ct_AR" >&6; }
4822else
4823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4824$as_echo "no" >&6; }
4825fi
4826
4827 if test "x$ac_ct_AR" = x; then
4828 AR="ar"
4829 else
4830 case $cross_compiling:$ac_tool_warned in
4831yes:)
4832{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4833$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4834ac_tool_warned=yes ;;
4835esac
4836 AR=$ac_ct_AR
4837 fi
4838else
4839 AR="$ac_cv_prog_AR"
4840fi
4841
4842 if test -z "$ARFLAGS"; then
4843 ARFLAGS='cru'
4844 fi
4845 fi
4846 else
4847 if test -z "$ARFLAGS"; then
4848 ARFLAGS='cru'
4849 fi
4850 fi
4851
4852
4853 if test -z "$RANLIB"; then
4854 if test $gl_cv_c_amsterdam_compiler = yes; then
4855 RANLIB=':'
4856 else
4857 if test -n "$ac_tool_prefix"; then
4858 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4859set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4861$as_echo_n "checking for $ac_word... " >&6; }
4862if test "${ac_cv_prog_RANLIB+set}" = set; then :
4863 $as_echo_n "(cached) " >&6
4864else
4865 if test -n "$RANLIB"; then
4866 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4867else
4868as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4869for as_dir in $PATH
4870do
4871 IFS=$as_save_IFS
4872 test -z "$as_dir" && as_dir=.
4873 for ac_exec_ext in '' $ac_executable_extensions; do
4874 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4875 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4876 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4877 break 2
4878 fi
4879done
4880 done
4881IFS=$as_save_IFS
4882
4883fi
4884fi
4885RANLIB=$ac_cv_prog_RANLIB
4886if test -n "$RANLIB"; then
4887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4888$as_echo "$RANLIB" >&6; }
4889else
4890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4891$as_echo "no" >&6; }
4892fi
4893
4894
4895fi
4896if test -z "$ac_cv_prog_RANLIB"; then
4897 ac_ct_RANLIB=$RANLIB
4898 # Extract the first word of "ranlib", so it can be a program name with args.
4899set dummy ranlib; ac_word=$2
4900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4901$as_echo_n "checking for $ac_word... " >&6; }
4902if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4903 $as_echo_n "(cached) " >&6
4904else
4905 if test -n "$ac_ct_RANLIB"; then
4906 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4907else
4908as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4909for as_dir in $PATH
4910do
4911 IFS=$as_save_IFS
4912 test -z "$as_dir" && as_dir=.
4913 for ac_exec_ext in '' $ac_executable_extensions; do
4914 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4915 ac_cv_prog_ac_ct_RANLIB="ranlib"
4916 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4917 break 2
4918 fi
4919done
4920 done
4921IFS=$as_save_IFS
4922
4923fi
4924fi
4925ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4926if test -n "$ac_ct_RANLIB"; then
4927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4928$as_echo "$ac_ct_RANLIB" >&6; }
4929else
4930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4931$as_echo "no" >&6; }
4932fi
4933
4934 if test "x$ac_ct_RANLIB" = x; then
4935 RANLIB=":"
4936 else
4937 case $cross_compiling:$ac_tool_warned in
4938yes:)
4939{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4940$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4941ac_tool_warned=yes ;;
4942esac
4943 RANLIB=$ac_ct_RANLIB
4944 fi
4945else
4946 RANLIB="$ac_cv_prog_RANLIB"
4947fi
4948
4949 fi
4950 fi
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
88b48903
WN
4961
4962 # IEEE behaviour is the default on all CPUs except Alpha and SH
4963 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
4964 # and the GCC 4.1.2 manual).
4965 case "$host_cpu" in
4966 alpha*)
4967 # On Alpha systems, a compiler option provides the behaviour.
4968 # See the ieee(3) manual page, also available at
4969 # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
4970 if test -n "$GCC"; then
4971 # GCC has the option -mieee.
4972 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
4973 CPPFLAGS="$CPPFLAGS -mieee"
4974 else
4975 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
4976 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
4977 CPPFLAGS="$CPPFLAGS -ieee"
4978 fi
4979 ;;
4980 sh*)
4981 if test -n "$GCC"; then
4982 # GCC has the option -mieee.
4983 CPPFLAGS="$CPPFLAGS -mieee"
4984 fi
4985 ;;
4986 esac
4987
2196f55f
YQ
4988# Check whether --enable-largefile was given.
4989if test "${enable_largefile+set}" = set; then :
4990 enableval=$enable_largefile;
4991fi
4992
4993if test "$enable_largefile" != no; then
4994
4995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4996$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4997if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4998 $as_echo_n "(cached) " >&6
4999else
5000 ac_cv_sys_largefile_CC=no
5001 if test "$GCC" != yes; then
5002 ac_save_CC=$CC
5003 while :; do
5004 # IRIX 6.2 and later do not support large files by default,
5005 # so use the C compiler's -n32 option if that helps.
5006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5007/* end confdefs.h. */
5008#include <sys/types.h>
5009 /* Check that off_t can represent 2**63 - 1 correctly.
5010 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5011 since some C++ compilers masquerading as C compilers
5012 incorrectly reject 9223372036854775807. */
5013#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5014 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5015 && LARGE_OFF_T % 2147483647 == 1)
5016 ? 1 : -1];
5017int
5018main ()
5019{
5020
5021 ;
5022 return 0;
5023}
5024_ACEOF
5025 if ac_fn_c_try_compile "$LINENO"; then :
5026 break
5027fi
5028rm -f core conftest.err conftest.$ac_objext
5029 CC="$CC -n32"
5030 if ac_fn_c_try_compile "$LINENO"; then :
5031 ac_cv_sys_largefile_CC=' -n32'; break
5032fi
5033rm -f core conftest.err conftest.$ac_objext
5034 break
5035 done
5036 CC=$ac_save_CC
5037 rm -f conftest.$ac_ext
5038 fi
5039fi
5040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5041$as_echo "$ac_cv_sys_largefile_CC" >&6; }
5042 if test "$ac_cv_sys_largefile_CC" != no; then
5043 CC=$CC$ac_cv_sys_largefile_CC
5044 fi
5045
5046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5047$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5048if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
5049 $as_echo_n "(cached) " >&6
5050else
5051 while :; do
5052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5053/* end confdefs.h. */
5054#include <sys/types.h>
5055 /* Check that off_t can represent 2**63 - 1 correctly.
5056 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5057 since some C++ compilers masquerading as C compilers
5058 incorrectly reject 9223372036854775807. */
5059#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5060 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5061 && LARGE_OFF_T % 2147483647 == 1)
5062 ? 1 : -1];
5063int
5064main ()
5065{
5066
5067 ;
5068 return 0;
5069}
5070_ACEOF
5071if ac_fn_c_try_compile "$LINENO"; then :
5072 ac_cv_sys_file_offset_bits=no; break
5073fi
5074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5076/* end confdefs.h. */
5077#define _FILE_OFFSET_BITS 64
5078#include <sys/types.h>
5079 /* Check that off_t can represent 2**63 - 1 correctly.
5080 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5081 since some C++ compilers masquerading as C compilers
5082 incorrectly reject 9223372036854775807. */
5083#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5084 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5085 && LARGE_OFF_T % 2147483647 == 1)
5086 ? 1 : -1];
5087int
5088main ()
5089{
5090
5091 ;
5092 return 0;
5093}
5094_ACEOF
5095if ac_fn_c_try_compile "$LINENO"; then :
5096 ac_cv_sys_file_offset_bits=64; break
5097fi
5098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5099 ac_cv_sys_file_offset_bits=unknown
5100 break
5101done
5102fi
5103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5104$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5105case $ac_cv_sys_file_offset_bits in #(
5106 no | unknown) ;;
5107 *)
5108cat >>confdefs.h <<_ACEOF
5109#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5110_ACEOF
5111;;
5112esac
5113rm -rf conftest*
5114 if test $ac_cv_sys_file_offset_bits = unknown; then
5115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5116$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5117if test "${ac_cv_sys_large_files+set}" = set; then :
5118 $as_echo_n "(cached) " >&6
5119else
5120 while :; do
5121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5122/* end confdefs.h. */
5123#include <sys/types.h>
5124 /* Check that off_t can represent 2**63 - 1 correctly.
5125 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5126 since some C++ compilers masquerading as C compilers
5127 incorrectly reject 9223372036854775807. */
5128#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5129 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5130 && LARGE_OFF_T % 2147483647 == 1)
5131 ? 1 : -1];
5132int
5133main ()
5134{
5135
5136 ;
5137 return 0;
5138}
5139_ACEOF
5140if ac_fn_c_try_compile "$LINENO"; then :
5141 ac_cv_sys_large_files=no; break
5142fi
5143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5145/* end confdefs.h. */
5146#define _LARGE_FILES 1
5147#include <sys/types.h>
5148 /* Check that off_t can represent 2**63 - 1 correctly.
5149 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5150 since some C++ compilers masquerading as C compilers
5151 incorrectly reject 9223372036854775807. */
5152#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5153 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5154 && LARGE_OFF_T % 2147483647 == 1)
5155 ? 1 : -1];
5156int
5157main ()
5158{
5159
5160 ;
5161 return 0;
5162}
5163_ACEOF
5164if ac_fn_c_try_compile "$LINENO"; then :
5165 ac_cv_sys_large_files=1; break
5166fi
5167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5168 ac_cv_sys_large_files=unknown
5169 break
5170done
5171fi
5172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5173$as_echo "$ac_cv_sys_large_files" >&6; }
5174case $ac_cv_sys_large_files in #(
5175 no | unknown) ;;
5176 *)
5177cat >>confdefs.h <<_ACEOF
5178#define _LARGE_FILES $ac_cv_sys_large_files
5179_ACEOF
5180;;
5181esac
5182rm -rf conftest*
5183 fi
5184
5185
5186fi
5187
88b48903
WN
5188
5189
8690e634
JK
5190 # Code from module alloca:
5191 # Code from module alloca-opt:
98399780 5192 # Code from module canonicalize-lgpl:
6a29c58e 5193 # Code from module chdir:
8690e634 5194 # Code from module configmake:
e26b6bb0 5195 # Code from module dirent:
18848e28 5196 # Code from module dirfd:
6a29c58e 5197 # Code from module dirname-lgpl:
2196f55f 5198 # Code from module dosname:
6a29c58e 5199 # Code from module double-slash-root:
18848e28 5200 # Code from module errno:
c971b7fa
PA
5201 # Code from module extensions:
5202
a512b375 5203 # Code from module extern-inline:
88b48903 5204 # Code from module float:
8690e634
JK
5205 # Code from module fnmatch:
5206 # Code from module fnmatch-gnu:
88b48903
WN
5207 # Code from module fpieee:
5208
5209 # Code from module fpucw:
5210 # Code from module frexp:
5211 # Code from module frexpl:
c971b7fa
PA
5212 # Code from module include_next:
5213 # Code from module inttypes:
5214 # Code from module inttypes-incomplete:
88b48903
WN
5215 # Code from module isnand-nolibm:
5216 # Code from module isnanl-nolibm:
2196f55f
YQ
5217 # Code from module largefile:
5218
8690e634 5219 # Code from module localcharset:
f45c62c4 5220 # Code from module lstat:
6a29c58e 5221 # Code from module malloc-posix:
98399780 5222 # Code from module malloca:
88b48903 5223 # Code from module math:
8690e634
JK
5224 # Code from module mbrtowc:
5225 # Code from module mbsinit:
5226 # Code from module mbsrtowcs:
c971b7fa
PA
5227 # Code from module memchr:
5228 # Code from module memmem:
5229 # Code from module memmem-simple:
5230 # Code from module multiarch:
98399780 5231 # Code from module nocrash:
38ec2207 5232 # Code from module pathmax:
2196f55f 5233 # Code from module readlink:
6a29c58e
YQ
5234 # Code from module rename:
5235 # Code from module rmdir:
5236 # Code from module same-inode:
98399780 5237 # Code from module snippet/_Noreturn:
c971b7fa
PA
5238 # Code from module snippet/arg-nonnull:
5239 # Code from module snippet/c++defs:
5240 # Code from module snippet/warn-on-use:
8839a007 5241 # Code from module ssize_t:
2196f55f 5242 # Code from module stat:
8690e634 5243 # Code from module stdbool:
c971b7fa
PA
5244 # Code from module stddef:
5245 # Code from module stdint:
6a29c58e 5246 # Code from module stdio:
98399780 5247 # Code from module stdlib:
8690e634 5248 # Code from module streq:
c971b7fa 5249 # Code from module string:
8690e634 5250 # Code from module strnlen1:
63ce7108
TT
5251 # Code from module strstr:
5252 # Code from module strstr-simple:
09607c9e 5253 # Code from module sys_stat:
8839a007 5254 # Code from module sys_types:
09607c9e 5255 # Code from module time:
8839a007 5256 # Code from module unistd:
c971b7fa 5257 # Code from module update-copyright:
8690e634
JK
5258 # Code from module verify:
5259 # Code from module wchar:
5260 # Code from module wctype-h:
c971b7fa
PA
5261
5262ac_ext=c
5263ac_cpp='$CPP $CPPFLAGS'
5264ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5265ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5266ac_compiler_gnu=$ac_cv_c_compiler_gnu
5267if test -n "$ac_tool_prefix"; then
5268 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5269set dummy ${ac_tool_prefix}gcc; ac_word=$2
5270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5271$as_echo_n "checking for $ac_word... " >&6; }
5272if test "${ac_cv_prog_CC+set}" = set; then :
5273 $as_echo_n "(cached) " >&6
5274else
5275 if test -n "$CC"; then
5276 ac_cv_prog_CC="$CC" # Let the user override the test.
5277else
5278as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5279for as_dir in $PATH
5280do
5281 IFS=$as_save_IFS
5282 test -z "$as_dir" && as_dir=.
5283 for ac_exec_ext in '' $ac_executable_extensions; do
5284 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5285 ac_cv_prog_CC="${ac_tool_prefix}gcc"
5286 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5287 break 2
5288 fi
5289done
5290 done
5291IFS=$as_save_IFS
5292
5293fi
5294fi
5295CC=$ac_cv_prog_CC
5296if test -n "$CC"; then
5297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5298$as_echo "$CC" >&6; }
5299else
5300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5301$as_echo "no" >&6; }
5302fi
5303
5304
5305fi
5306if test -z "$ac_cv_prog_CC"; then
5307 ac_ct_CC=$CC
5308 # Extract the first word of "gcc", so it can be a program name with args.
5309set dummy gcc; ac_word=$2
5310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5311$as_echo_n "checking for $ac_word... " >&6; }
5312if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5313 $as_echo_n "(cached) " >&6
5314else
5315 if test -n "$ac_ct_CC"; then
5316 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5317else
5318as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5319for as_dir in $PATH
5320do
5321 IFS=$as_save_IFS
5322 test -z "$as_dir" && as_dir=.
5323 for ac_exec_ext in '' $ac_executable_extensions; do
5324 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5325 ac_cv_prog_ac_ct_CC="gcc"
5326 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5327 break 2
5328 fi
5329done
5330 done
5331IFS=$as_save_IFS
5332
5333fi
5334fi
5335ac_ct_CC=$ac_cv_prog_ac_ct_CC
5336if test -n "$ac_ct_CC"; then
5337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5338$as_echo "$ac_ct_CC" >&6; }
5339else
5340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5341$as_echo "no" >&6; }
5342fi
5343
5344 if test "x$ac_ct_CC" = x; then
5345 CC=""
5346 else
5347 case $cross_compiling:$ac_tool_warned in
5348yes:)
5349{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5350$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5351ac_tool_warned=yes ;;
5352esac
5353 CC=$ac_ct_CC
5354 fi
5355else
5356 CC="$ac_cv_prog_CC"
5357fi
5358
5359if test -z "$CC"; then
5360 if test -n "$ac_tool_prefix"; then
5361 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5362set dummy ${ac_tool_prefix}cc; ac_word=$2
5363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5364$as_echo_n "checking for $ac_word... " >&6; }
5365if test "${ac_cv_prog_CC+set}" = set; then :
5366 $as_echo_n "(cached) " >&6
5367else
5368 if test -n "$CC"; then
5369 ac_cv_prog_CC="$CC" # Let the user override the test.
5370else
5371as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5372for as_dir in $PATH
5373do
5374 IFS=$as_save_IFS
5375 test -z "$as_dir" && as_dir=.
5376 for ac_exec_ext in '' $ac_executable_extensions; do
5377 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5378 ac_cv_prog_CC="${ac_tool_prefix}cc"
5379 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5380 break 2
5381 fi
5382done
5383 done
5384IFS=$as_save_IFS
5385
5386fi
5387fi
5388CC=$ac_cv_prog_CC
5389if test -n "$CC"; then
5390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5391$as_echo "$CC" >&6; }
5392else
5393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5394$as_echo "no" >&6; }
5395fi
5396
5397
5398 fi
5399fi
5400if test -z "$CC"; then
5401 # Extract the first word of "cc", so it can be a program name with args.
5402set dummy cc; ac_word=$2
5403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5404$as_echo_n "checking for $ac_word... " >&6; }
5405if test "${ac_cv_prog_CC+set}" = set; then :
5406 $as_echo_n "(cached) " >&6
5407else
5408 if test -n "$CC"; then
5409 ac_cv_prog_CC="$CC" # Let the user override the test.
5410else
5411 ac_prog_rejected=no
5412as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5413for as_dir in $PATH
5414do
5415 IFS=$as_save_IFS
5416 test -z "$as_dir" && as_dir=.
5417 for ac_exec_ext in '' $ac_executable_extensions; do
5418 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5419 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5420 ac_prog_rejected=yes
5421 continue
5422 fi
5423 ac_cv_prog_CC="cc"
5424 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5425 break 2
5426 fi
5427done
5428 done
5429IFS=$as_save_IFS
5430
5431if test $ac_prog_rejected = yes; then
5432 # We found a bogon in the path, so make sure we never use it.
5433 set dummy $ac_cv_prog_CC
5434 shift
5435 if test $# != 0; then
5436 # We chose a different compiler from the bogus one.
5437 # However, it has the same basename, so the bogon will be chosen
5438 # first if we set CC to just the basename; use the full file name.
5439 shift
5440 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
5441 fi
5442fi
5443fi
5444fi
5445CC=$ac_cv_prog_CC
5446if test -n "$CC"; then
5447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5448$as_echo "$CC" >&6; }
5449else
5450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5451$as_echo "no" >&6; }
5452fi
5453
5454
5455fi
5456if test -z "$CC"; then
5457 if test -n "$ac_tool_prefix"; then
5458 for ac_prog in cl.exe
5459 do
5460 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5461set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5463$as_echo_n "checking for $ac_word... " >&6; }
5464if test "${ac_cv_prog_CC+set}" = set; then :
5465 $as_echo_n "(cached) " >&6
5466else
5467 if test -n "$CC"; then
5468 ac_cv_prog_CC="$CC" # Let the user override the test.
5469else
5470as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5471for as_dir in $PATH
5472do
5473 IFS=$as_save_IFS
5474 test -z "$as_dir" && as_dir=.
5475 for ac_exec_ext in '' $ac_executable_extensions; do
5476 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5477 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5478 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5479 break 2
5480 fi
5481done
5482 done
5483IFS=$as_save_IFS
5484
5485fi
5486fi
5487CC=$ac_cv_prog_CC
5488if test -n "$CC"; then
5489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5490$as_echo "$CC" >&6; }
5491else
5492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5493$as_echo "no" >&6; }
5494fi
5495
5496
5497 test -n "$CC" && break
5498 done
5499fi
5500if test -z "$CC"; then
5501 ac_ct_CC=$CC
5502 for ac_prog in cl.exe
5503do
5504 # Extract the first word of "$ac_prog", so it can be a program name with args.
5505set dummy $ac_prog; ac_word=$2
5506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5507$as_echo_n "checking for $ac_word... " >&6; }
5508if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5509 $as_echo_n "(cached) " >&6
5510else
5511 if test -n "$ac_ct_CC"; then
5512 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5513else
5514as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5515for as_dir in $PATH
5516do
5517 IFS=$as_save_IFS
5518 test -z "$as_dir" && as_dir=.
5519 for ac_exec_ext in '' $ac_executable_extensions; do
5520 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5521 ac_cv_prog_ac_ct_CC="$ac_prog"
5522 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5523 break 2
5524 fi
5525done
5526 done
5527IFS=$as_save_IFS
5528
5529fi
5530fi
5531ac_ct_CC=$ac_cv_prog_ac_ct_CC
5532if test -n "$ac_ct_CC"; then
5533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5534$as_echo "$ac_ct_CC" >&6; }
5535else
5536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5537$as_echo "no" >&6; }
5538fi
5539
5540
5541 test -n "$ac_ct_CC" && break
5542done
5543
5544 if test "x$ac_ct_CC" = x; then
5545 CC=""
5546 else
5547 case $cross_compiling:$ac_tool_warned in
5548yes:)
5549{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5550$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5551ac_tool_warned=yes ;;
5552esac
5553 CC=$ac_ct_CC
5554 fi
5555fi
5556
5557fi
5558
5559
5560test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5561$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5562as_fn_error "no acceptable C compiler found in \$PATH
5563See \`config.log' for more details." "$LINENO" 5; }
5564
5565# Provide some information about the compiler.
5566$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5567set X $ac_compile
5568ac_compiler=$2
5569for ac_option in --version -v -V -qversion; do
5570 { { ac_try="$ac_compiler $ac_option >&5"
5571case "(($ac_try" in
5572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5573 *) ac_try_echo=$ac_try;;
5574esac
5575eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5576$as_echo "$ac_try_echo"; } >&5
5577 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5578 ac_status=$?
5579 if test -s conftest.err; then
5580 sed '10a\
5581... rest of stderr output deleted ...
5582 10q' conftest.err >conftest.er1
5583 cat conftest.er1 >&5
5584 rm -f conftest.er1 conftest.err
5585 fi
5586 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5587 test $ac_status = 0; }
5588done
5589
5590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5591$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
5592if test "${ac_cv_c_compiler_gnu+set}" = set; then :
5593 $as_echo_n "(cached) " >&6
5594else
5595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5596/* end confdefs.h. */
5597
5598int
5599main ()
5600{
5601#ifndef __GNUC__
5602 choke me
5603#endif
5604
5605 ;
5606 return 0;
5607}
5608_ACEOF
5609if ac_fn_c_try_compile "$LINENO"; then :
5610 ac_compiler_gnu=yes
5611else
5612 ac_compiler_gnu=no
5613fi
5614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5615ac_cv_c_compiler_gnu=$ac_compiler_gnu
5616
5617fi
5618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5619$as_echo "$ac_cv_c_compiler_gnu" >&6; }
5620if test $ac_compiler_gnu = yes; then
5621 GCC=yes
5622else
5623 GCC=
5624fi
5625ac_test_CFLAGS=${CFLAGS+set}
5626ac_save_CFLAGS=$CFLAGS
5627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5628$as_echo_n "checking whether $CC accepts -g... " >&6; }
5629if test "${ac_cv_prog_cc_g+set}" = set; then :
5630 $as_echo_n "(cached) " >&6
5631else
5632 ac_save_c_werror_flag=$ac_c_werror_flag
5633 ac_c_werror_flag=yes
5634 ac_cv_prog_cc_g=no
5635 CFLAGS="-g"
5636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5637/* end confdefs.h. */
5638
5639int
5640main ()
5641{
5642
5643 ;
5644 return 0;
5645}
5646_ACEOF
5647if ac_fn_c_try_compile "$LINENO"; then :
5648 ac_cv_prog_cc_g=yes
5649else
5650 CFLAGS=""
5651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5652/* end confdefs.h. */
5653
5654int
5655main ()
5656{
5657
5658 ;
5659 return 0;
5660}
5661_ACEOF
5662if ac_fn_c_try_compile "$LINENO"; then :
5663
5664else
5665 ac_c_werror_flag=$ac_save_c_werror_flag
5666 CFLAGS="-g"
5667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5668/* end confdefs.h. */
5669
5670int
5671main ()
5672{
5673
5674 ;
5675 return 0;
5676}
5677_ACEOF
5678if ac_fn_c_try_compile "$LINENO"; then :
5679 ac_cv_prog_cc_g=yes
5680fi
5681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5682fi
5683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5684fi
5685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5686 ac_c_werror_flag=$ac_save_c_werror_flag
5687fi
5688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5689$as_echo "$ac_cv_prog_cc_g" >&6; }
5690if test "$ac_test_CFLAGS" = set; then
5691 CFLAGS=$ac_save_CFLAGS
5692elif test $ac_cv_prog_cc_g = yes; then
5693 if test "$GCC" = yes; then
5694 CFLAGS="-g -O2"
5695 else
5696 CFLAGS="-g"
5697 fi
5698else
5699 if test "$GCC" = yes; then
5700 CFLAGS="-O2"
5701 else
5702 CFLAGS=
5703 fi
5704fi
5705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5706$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5707if test "${ac_cv_prog_cc_c89+set}" = set; then :
5708 $as_echo_n "(cached) " >&6
5709else
5710 ac_cv_prog_cc_c89=no
5711ac_save_CC=$CC
5712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5713/* end confdefs.h. */
5714#include <stdarg.h>
5715#include <stdio.h>
5716#include <sys/types.h>
5717#include <sys/stat.h>
5718/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5719struct buf { int x; };
5720FILE * (*rcsopen) (struct buf *, struct stat *, int);
5721static char *e (p, i)
5722 char **p;
5723 int i;
5724{
5725 return p[i];
5726}
5727static char *f (char * (*g) (char **, int), char **p, ...)
5728{
5729 char *s;
5730 va_list v;
5731 va_start (v,p);
5732 s = g (p, va_arg (v,int));
5733 va_end (v);
5734 return s;
5735}
5736
5737/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5738 function prototypes and stuff, but not '\xHH' hex character constants.
5739 These don't provoke an error unfortunately, instead are silently treated
5740 as 'x'. The following induces an error, until -std is added to get
5741 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5742 array size at least. It's necessary to write '\x00'==0 to get something
5743 that's true only with -std. */
5744int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5745
5746/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5747 inside strings and character constants. */
5748#define FOO(x) 'x'
5749int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5750
5751int test (int i, double x);
5752struct s1 {int (*f) (int a);};
5753struct s2 {int (*f) (double a);};
5754int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5755int argc;
5756char **argv;
5757int
5758main ()
5759{
5760return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5761 ;
5762 return 0;
5763}
5764_ACEOF
5765for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5766 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5767do
5768 CC="$ac_save_CC $ac_arg"
5769 if ac_fn_c_try_compile "$LINENO"; then :
5770 ac_cv_prog_cc_c89=$ac_arg
5771fi
5772rm -f core conftest.err conftest.$ac_objext
5773 test "x$ac_cv_prog_cc_c89" != "xno" && break
5774done
5775rm -f conftest.$ac_ext
5776CC=$ac_save_CC
5777
5778fi
5779# AC_CACHE_VAL
5780case "x$ac_cv_prog_cc_c89" in
5781 x)
5782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5783$as_echo "none needed" >&6; } ;;
5784 xno)
5785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5786$as_echo "unsupported" >&6; } ;;
5787 *)
5788 CC="$CC $ac_cv_prog_cc_c89"
5789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5790$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5791esac
5792if test "x$ac_cv_prog_cc_c89" != xno; then :
5793
5794fi
5795
5796ac_ext=c
5797ac_cpp='$CPP $CPPFLAGS'
5798ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5799ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5800ac_compiler_gnu=$ac_cv_c_compiler_gnu
5801
5802
5803am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
5804
5805
5806ac_aux_dir=
5807for ac_dir in ../.. "$srcdir"/../..; do
5808 for ac_t in install-sh install.sh shtool; do
5809 if test -f "$ac_dir/$ac_t"; then
5810 ac_aux_dir=$ac_dir
5811 ac_install_sh="$ac_aux_dir/$ac_t -c"
5812 break 2
5813 fi
5814 done
5815done
5816if test -z "$ac_aux_dir"; then
5817 as_fn_error "cannot find install-sh, install.sh, or shtool in ../.. \"$srcdir\"/../.." "$LINENO" 5
5818fi
5819
5820# These three variables are undocumented and unsupported,
5821# and are intended to be withdrawn in a future Autoconf release.
5822# They can cause serious problems if a builder's source tree is in a directory
5823# whose full name contains unusual characters.
5824ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5825ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5826ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5827
5828
5829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
5830$as_echo_n "checking target system type... " >&6; }
5831if test "${ac_cv_target+set}" = set; then :
5832 $as_echo_n "(cached) " >&6
5833else
5834 if test "x$target_alias" = x; then
5835 ac_cv_target=$ac_cv_host
5836else
5837 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
5838 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
5839fi
5840
5841fi
5842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
5843$as_echo "$ac_cv_target" >&6; }
5844case $ac_cv_target in
5845*-*-*) ;;
5846*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
5847esac
5848target=$ac_cv_target
5849ac_save_IFS=$IFS; IFS='-'
5850set x $ac_cv_target
5851shift
5852target_cpu=$1
5853target_vendor=$2
5854shift; shift
5855# Remember, the first character of IFS is used to create $*,
5856# except with old shells:
5857target_os=$*
5858IFS=$ac_save_IFS
5859case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
5860
5861
5862# The aliases save the names the user supplied, while $host etc.
5863# will get canonicalized.
5864test -n "$target_alias" &&
5865 test "$program_prefix$program_suffix$program_transform_name" = \
5866 NONENONEs,x,x, &&
5867 program_prefix=${target_alias}-
5868
5869
5870
5871
5872
5873
5874
5875 LIBC_FATAL_STDERR_=1
5876 export LIBC_FATAL_STDERR_
5877
8690e634
JK
5878# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5879# for constant arguments. Useless!
5880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
5881$as_echo_n "checking for working alloca.h... " >&6; }
5882if test "${ac_cv_working_alloca_h+set}" = set; then :
c971b7fa
PA
5883 $as_echo_n "(cached) " >&6
5884else
8690e634 5885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 5886/* end confdefs.h. */
8690e634 5887#include <alloca.h>
c971b7fa
PA
5888int
5889main ()
5890{
8690e634
JK
5891char *p = (char *) alloca (2 * sizeof (int));
5892 if (p) return 0;
c971b7fa
PA
5893 ;
5894 return 0;
5895}
c971b7fa
PA
5896_ACEOF
5897if ac_fn_c_try_link "$LINENO"; then :
8690e634 5898 ac_cv_working_alloca_h=yes
c971b7fa 5899else
8690e634 5900 ac_cv_working_alloca_h=no
c971b7fa
PA
5901fi
5902rm -f core conftest.err conftest.$ac_objext \
5903 conftest$ac_exeext conftest.$ac_ext
c971b7fa 5904fi
8690e634
JK
5905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
5906$as_echo "$ac_cv_working_alloca_h" >&6; }
5907if test $ac_cv_working_alloca_h = yes; then
c971b7fa 5908
8690e634 5909$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c971b7fa 5910
8690e634 5911fi
c971b7fa 5912
8690e634
JK
5913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
5914$as_echo_n "checking for alloca... " >&6; }
5915if test "${ac_cv_func_alloca_works+set}" = set; then :
c971b7fa 5916 $as_echo_n "(cached) " >&6
c971b7fa
PA
5917else
5918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5919/* end confdefs.h. */
8690e634
JK
5920#ifdef __GNUC__
5921# define alloca __builtin_alloca
5922#else
5923# ifdef _MSC_VER
5924# include <malloc.h>
5925# define alloca _alloca
5926# else
5927# ifdef HAVE_ALLOCA_H
5928# include <alloca.h>
5929# else
5930# ifdef _AIX
5931 #pragma alloca
5932# else
5933# ifndef alloca /* predefined by HP cc +Olibcalls */
5934char *alloca ();
5935# endif
5936# endif
5937# endif
5938# endif
5939#endif
5940
c971b7fa
PA
5941int
5942main ()
5943{
8690e634
JK
5944char *p = (char *) alloca (1);
5945 if (p) return 0;
c971b7fa
PA
5946 ;
5947 return 0;
5948}
5949_ACEOF
8690e634
JK
5950if ac_fn_c_try_link "$LINENO"; then :
5951 ac_cv_func_alloca_works=yes
c971b7fa 5952else
8690e634 5953 ac_cv_func_alloca_works=no
c971b7fa 5954fi
8690e634
JK
5955rm -f core conftest.err conftest.$ac_objext \
5956 conftest$ac_exeext conftest.$ac_ext
c971b7fa 5957fi
a143c6de
JB
5958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
5959$as_echo "$ac_cv_func_alloca_works" >&6; }
c971b7fa 5960
a143c6de 5961if test $ac_cv_func_alloca_works = yes; then
c971b7fa 5962
a143c6de 5963$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c971b7fa 5964
a143c6de
JB
5965else
5966 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5967# that cause trouble. Some versions do not even contain alloca or
5968# contain a buggy version. If you still want to use their alloca,
5969# use ar to extract alloca.o from them instead of compiling alloca.c.
c971b7fa
PA
5970
5971
5972
5973
5974
a143c6de 5975ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
c971b7fa 5976
a143c6de 5977$as_echo "#define C_ALLOCA 1" >>confdefs.h
c971b7fa 5978
c971b7fa 5979
a143c6de
JB
5980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'alloca.c' needs Cray hooks" >&5
5981$as_echo_n "checking whether 'alloca.c' needs Cray hooks... " >&6; }
5982if test "${ac_cv_os_cray+set}" = set; then :
8690e634
JK
5983 $as_echo_n "(cached) " >&6
5984else
a143c6de 5985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 5986/* end confdefs.h. */
a143c6de
JB
5987#if defined CRAY && ! defined CRAY2
5988webecray
5989#else
5990wenotbecray
8690e634 5991#endif
c971b7fa 5992
8690e634
JK
5993_ACEOF
5994if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
a143c6de
JB
5995 $EGREP "webecray" >/dev/null 2>&1; then :
5996 ac_cv_os_cray=yes
8690e634 5997else
a143c6de 5998 ac_cv_os_cray=no
8690e634
JK
5999fi
6000rm -f conftest*
c971b7fa 6001
c0fc7f8b 6002fi
a143c6de
JB
6003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
6004$as_echo "$ac_cv_os_cray" >&6; }
6005if test $ac_cv_os_cray = yes; then
6006 for ac_func in _getb67 GETB67 getb67; do
6007 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6008ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6009eval as_val=\$$as_ac_var
6010 if test "x$as_val" = x""yes; then :
c0fc7f8b 6011
a143c6de
JB
6012cat >>confdefs.h <<_ACEOF
6013#define CRAY_STACKSEG_END $ac_func
6014_ACEOF
c971b7fa 6015
a143c6de 6016 break
8690e634 6017fi
c971b7fa 6018
a143c6de 6019 done
8690e634 6020fi
c0fc7f8b 6021
a143c6de
JB
6022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
6023$as_echo_n "checking stack direction for C alloca... " >&6; }
6024if test "${ac_cv_c_stack_direction+set}" = set; then :
c971b7fa
PA
6025 $as_echo_n "(cached) " >&6
6026else
a143c6de
JB
6027 if test "$cross_compiling" = yes; then :
6028 ac_cv_c_stack_direction=0
6029else
6030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 6031/* end confdefs.h. */
a143c6de
JB
6032$ac_includes_default
6033int
6034find_stack_direction (int *addr, int depth)
6035{
6036 int dir, dummy = 0;
6037 if (! addr)
6038 addr = &dummy;
6039 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
6040 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
6041 return dir + dummy;
6042}
8690e634 6043
a143c6de
JB
6044int
6045main (int argc, char **argv)
6046{
6047 return find_stack_direction (0, argc + !argv + 20) < 0;
6048}
c971b7fa 6049_ACEOF
a143c6de
JB
6050if ac_fn_c_try_run "$LINENO"; then :
6051 ac_cv_c_stack_direction=1
c971b7fa 6052else
a143c6de 6053 ac_cv_c_stack_direction=-1
8690e634 6054fi
a143c6de
JB
6055rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6056 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 6057fi
c971b7fa
PA
6058
6059fi
a143c6de
JB
6060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
6061$as_echo "$ac_cv_c_stack_direction" >&6; }
6062cat >>confdefs.h <<_ACEOF
6063#define STACK_DIRECTION $ac_cv_c_stack_direction
6064_ACEOF
8690e634 6065
c971b7fa
PA
6066
6067fi
c971b7fa
PA
6068
6069
98399780
YQ
6070 GNULIB__EXIT=0;
6071 GNULIB_ATOLL=0;
6072 GNULIB_CALLOC_POSIX=0;
6073 GNULIB_CANONICALIZE_FILE_NAME=0;
6074 GNULIB_GETLOADAVG=0;
6075 GNULIB_GETSUBOPT=0;
6076 GNULIB_GRANTPT=0;
6077 GNULIB_MALLOC_POSIX=0;
6078 GNULIB_MBTOWC=0;
6079 GNULIB_MKDTEMP=0;
6080 GNULIB_MKOSTEMP=0;
6081 GNULIB_MKOSTEMPS=0;
6082 GNULIB_MKSTEMP=0;
6083 GNULIB_MKSTEMPS=0;
6084 GNULIB_POSIX_OPENPT=0;
6085 GNULIB_PTSNAME=0;
6086 GNULIB_PTSNAME_R=0;
6087 GNULIB_PUTENV=0;
6088 GNULIB_RANDOM=0;
6089 GNULIB_RANDOM_R=0;
6090 GNULIB_REALLOC_POSIX=0;
6091 GNULIB_REALPATH=0;
6092 GNULIB_RPMATCH=0;
6093 GNULIB_SETENV=0;
6094 GNULIB_STRTOD=0;
6095 GNULIB_STRTOLL=0;
6096 GNULIB_STRTOULL=0;
6097 GNULIB_SYSTEM_POSIX=0;
6098 GNULIB_UNLOCKPT=0;
6099 GNULIB_UNSETENV=0;
6100 GNULIB_WCTOMB=0;
6101 HAVE__EXIT=1;
6102 HAVE_ATOLL=1;
6103 HAVE_CANONICALIZE_FILE_NAME=1;
6104 HAVE_DECL_GETLOADAVG=1;
6105 HAVE_GETSUBOPT=1;
6106 HAVE_GRANTPT=1;
6107 HAVE_MKDTEMP=1;
6108 HAVE_MKOSTEMP=1;
6109 HAVE_MKOSTEMPS=1;
6110 HAVE_MKSTEMP=1;
6111 HAVE_MKSTEMPS=1;
6112 HAVE_POSIX_OPENPT=1;
6113 HAVE_PTSNAME=1;
6114 HAVE_PTSNAME_R=1;
6115 HAVE_RANDOM=1;
6116 HAVE_RANDOM_H=1;
6117 HAVE_RANDOM_R=1;
6118 HAVE_REALPATH=1;
6119 HAVE_RPMATCH=1;
6120 HAVE_SETENV=1;
6121 HAVE_DECL_SETENV=1;
6122 HAVE_STRTOD=1;
6123 HAVE_STRTOLL=1;
6124 HAVE_STRTOULL=1;
6125 HAVE_STRUCT_RANDOM_DATA=1;
6126 HAVE_SYS_LOADAVG_H=0;
6127 HAVE_UNLOCKPT=1;
6128 HAVE_DECL_UNSETENV=1;
6129 REPLACE_CALLOC=0;
6130 REPLACE_CANONICALIZE_FILE_NAME=0;
6131 REPLACE_MALLOC=0;
6132 REPLACE_MBTOWC=0;
6133 REPLACE_MKSTEMP=0;
6134 REPLACE_PTSNAME=0;
6135 REPLACE_PTSNAME_R=0;
6136 REPLACE_PUTENV=0;
6137 REPLACE_RANDOM_R=0;
6138 REPLACE_REALLOC=0;
6139 REPLACE_REALPATH=0;
6140 REPLACE_SETENV=0;
6141 REPLACE_STRTOD=0;
6142 REPLACE_UNSETENV=0;
6143 REPLACE_WCTOMB=0;
6144
6145
6146
6147
6148 for ac_func in $ac_func_list
6149do :
6150 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6151ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6152eval as_val=\$$as_ac_var
6153 if test "x$as_val" = x""yes; then :
6154 cat >>confdefs.h <<_ACEOF
6155#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6156_ACEOF
6157
6158fi
6159done
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
6170$as_echo_n "checking whether // is distinct from /... " >&6; }
6171if test "${gl_cv_double_slash_root+set}" = set; then :
6172 $as_echo_n "(cached) " >&6
6173else
6174 if test x"$cross_compiling" = xyes ; then
6175 # When cross-compiling, there is no way to tell whether // is special
6176 # short of a list of hosts. However, the only known hosts to date
6177 # that have a distinct // are Apollo DomainOS (too old to port to),
6178 # Cygwin, and z/OS. If anyone knows of another system for which // has
6179 # special semantics and is distinct from /, please report it to
6180 # <bug-gnulib@gnu.org>.
6181 case $host in
6182 *-cygwin | i370-ibm-openedition)
6183 gl_cv_double_slash_root=yes ;;
6184 *)
6185 # Be optimistic and assume that / and // are the same when we
6186 # don't know.
6187 gl_cv_double_slash_root='unknown, assuming no' ;;
6188 esac
6189 else
6190 set x `ls -di / // 2>/dev/null`
6191 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
6192 gl_cv_double_slash_root=no
6193 else
6194 gl_cv_double_slash_root=yes
6195 fi
6196 fi
6197fi
6198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
6199$as_echo "$gl_cv_double_slash_root" >&6; }
6200 if test "$gl_cv_double_slash_root" = yes; then
6201
6202$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
6203
6204 fi
6205
6206
6207
6208
6209
6210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
6211$as_echo_n "checking whether realpath works... " >&6; }
6212if test "${gl_cv_func_realpath_works+set}" = set; then :
6213 $as_echo_n "(cached) " >&6
6214else
6215
6216 touch conftest.a
6217 mkdir conftest.d
6218 if test "$cross_compiling" = yes; then :
6219 case "$host_os" in
6220 # Guess yes on glibc systems.
6221 *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
6222 # If we don't know, assume the worst.
6223 *) gl_cv_func_realpath_works="guessing no" ;;
6224 esac
6225
6226else
6227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6228/* end confdefs.h. */
6229
6230
6231
6232#include <stdlib.h>
6233#if defined __MACH__ && defined __APPLE__
6234/* Avoid a crash on Mac OS X. */
6235#include <mach/mach.h>
6236#include <mach/mach_error.h>
6237#include <mach/thread_status.h>
6238#include <mach/exception.h>
6239#include <mach/task.h>
6240#include <pthread.h>
6241/* The exception port on which our thread listens. */
6242static mach_port_t our_exception_port;
6243/* The main function of the thread listening for exceptions of type
6244 EXC_BAD_ACCESS. */
6245static void *
6246mach_exception_thread (void *arg)
6247{
6248 /* Buffer for a message to be received. */
6249 struct {
6250 mach_msg_header_t head;
6251 mach_msg_body_t msgh_body;
6252 char data[1024];
6253 } msg;
6254 mach_msg_return_t retval;
6255 /* Wait for a message on the exception port. */
6256 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
6257 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
6258 if (retval != MACH_MSG_SUCCESS)
6259 abort ();
6260 exit (1);
6261}
6262static void
6263nocrash_init (void)
6264{
6265 mach_port_t self = mach_task_self ();
6266 /* Allocate a port on which the thread shall listen for exceptions. */
6267 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
6268 == KERN_SUCCESS) {
6269 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
6270 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
6271 MACH_MSG_TYPE_MAKE_SEND)
6272 == KERN_SUCCESS) {
6273 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
6274 for us. */
6275 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
6276 /* Create the thread listening on the exception port. */
6277 pthread_attr_t attr;
6278 pthread_t thread;
6279 if (pthread_attr_init (&attr) == 0
6280 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
6281 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
6282 pthread_attr_destroy (&attr);
6283 /* Replace the exception port info for these exceptions with our own.
6284 Note that we replace the exception port for the entire task, not only
6285 for a particular thread. This has the effect that when our exception
6286 port gets the message, the thread specific exception port has already
6287 been asked, and we don't need to bother about it.
6288 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
6289 task_set_exception_ports (self, mask, our_exception_port,
6290 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
6291 }
6292 }
6293 }
6294}
6295#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6296/* Avoid a crash on native Windows. */
6297#define WIN32_LEAN_AND_MEAN
6298#include <windows.h>
6299#include <winerror.h>
6300static LONG WINAPI
6301exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
6302{
6303 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
6304 {
6305 case EXCEPTION_ACCESS_VIOLATION:
6306 case EXCEPTION_IN_PAGE_ERROR:
6307 case EXCEPTION_STACK_OVERFLOW:
6308 case EXCEPTION_GUARD_PAGE:
6309 case EXCEPTION_PRIV_INSTRUCTION:
6310 case EXCEPTION_ILLEGAL_INSTRUCTION:
6311 case EXCEPTION_DATATYPE_MISALIGNMENT:
6312 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
6313 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
6314 exit (1);
6315 }
6316 return EXCEPTION_CONTINUE_SEARCH;
6317}
6318static void
6319nocrash_init (void)
6320{
6321 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
6322}
6323#else
6324/* Avoid a crash on POSIX systems. */
6325#include <signal.h>
6326/* A POSIX signal handler. */
6327static void
6328exception_handler (int sig)
6329{
6330 exit (1);
6331}
6332static void
6333nocrash_init (void)
6334{
6335#ifdef SIGSEGV
6336 signal (SIGSEGV, exception_handler);
6337#endif
6338#ifdef SIGBUS
6339 signal (SIGBUS, exception_handler);
6340#endif
6341}
6342#endif
6343
6344 #include <stdlib.h>
6345 #include <string.h>
6346
6347int
6348main ()
6349{
6350
6351 int result = 0;
6352 {
6353 char *name = realpath ("conftest.a", NULL);
6354 if (!(name && *name == '/'))
6355 result |= 1;
6356 }
6357 {
6358 char *name = realpath ("conftest.b/../conftest.a", NULL);
6359 if (name != NULL)
6360 result |= 2;
6361 }
6362 {
6363 char *name = realpath ("conftest.a/", NULL);
6364 if (name != NULL)
6365 result |= 4;
6366 }
6367 {
6368 char *name1 = realpath (".", NULL);
6369 char *name2 = realpath ("conftest.d//./..", NULL);
6370 if (strcmp (name1, name2) != 0)
6371 result |= 8;
6372 }
6373 return result;
6374
6375 ;
6376 return 0;
6377}
6378
6379_ACEOF
6380if ac_fn_c_try_run "$LINENO"; then :
6381 gl_cv_func_realpath_works=yes
6382else
6383 gl_cv_func_realpath_works=no
6384fi
6385rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6386 conftest.$ac_objext conftest.beam conftest.$ac_ext
6387fi
6388
6389 rm -rf conftest.a conftest.d
6390
6391fi
6392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
6393$as_echo "$gl_cv_func_realpath_works" >&6; }
6394 case "$gl_cv_func_realpath_works" in
6395 *yes)
6396
6397$as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
6398
6399 ;;
6400 esac
6401
6402
6403
6404
6405 for ac_header in $ac_header_list
6406do :
6407 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6408ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6409"
6410eval as_val=\$$as_ac_Header
6411 if test "x$as_val" = x""yes; then :
6412 cat >>confdefs.h <<_ACEOF
6413#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6414_ACEOF
6415
6416fi
6417
6418done
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
e26b6bb0
TT
6430 GNULIB_CHDIR=0;
6431 GNULIB_CHOWN=0;
6432 GNULIB_CLOSE=0;
6433 GNULIB_DUP=0;
6434 GNULIB_DUP2=0;
6435 GNULIB_DUP3=0;
6436 GNULIB_ENVIRON=0;
6437 GNULIB_EUIDACCESS=0;
6438 GNULIB_FACCESSAT=0;
6439 GNULIB_FCHDIR=0;
6440 GNULIB_FCHOWNAT=0;
6441 GNULIB_FDATASYNC=0;
6442 GNULIB_FSYNC=0;
6443 GNULIB_FTRUNCATE=0;
6444 GNULIB_GETCWD=0;
6445 GNULIB_GETDOMAINNAME=0;
6446 GNULIB_GETDTABLESIZE=0;
6447 GNULIB_GETGROUPS=0;
6448 GNULIB_GETHOSTNAME=0;
6449 GNULIB_GETLOGIN=0;
6450 GNULIB_GETLOGIN_R=0;
6451 GNULIB_GETPAGESIZE=0;
6452 GNULIB_GETUSERSHELL=0;
6453 GNULIB_GROUP_MEMBER=0;
6454 GNULIB_ISATTY=0;
6455 GNULIB_LCHOWN=0;
6456 GNULIB_LINK=0;
6457 GNULIB_LINKAT=0;
6458 GNULIB_LSEEK=0;
6459 GNULIB_PIPE=0;
6460 GNULIB_PIPE2=0;
6461 GNULIB_PREAD=0;
6462 GNULIB_PWRITE=0;
6463 GNULIB_READ=0;
6464 GNULIB_READLINK=0;
6465 GNULIB_READLINKAT=0;
6466 GNULIB_RMDIR=0;
6467 GNULIB_SETHOSTNAME=0;
6468 GNULIB_SLEEP=0;
6469 GNULIB_SYMLINK=0;
6470 GNULIB_SYMLINKAT=0;
6471 GNULIB_TTYNAME_R=0;
6472 GNULIB_UNISTD_H_NONBLOCKING=0;
6473 GNULIB_UNISTD_H_SIGPIPE=0;
6474 GNULIB_UNLINK=0;
6475 GNULIB_UNLINKAT=0;
6476 GNULIB_USLEEP=0;
6477 GNULIB_WRITE=0;
6478 HAVE_CHOWN=1;
6479 HAVE_DUP2=1;
6480 HAVE_DUP3=1;
6481 HAVE_EUIDACCESS=1;
6482 HAVE_FACCESSAT=1;
6483 HAVE_FCHDIR=1;
6484 HAVE_FCHOWNAT=1;
6485 HAVE_FDATASYNC=1;
6486 HAVE_FSYNC=1;
6487 HAVE_FTRUNCATE=1;
6488 HAVE_GETDTABLESIZE=1;
6489 HAVE_GETGROUPS=1;
6490 HAVE_GETHOSTNAME=1;
6491 HAVE_GETLOGIN=1;
6492 HAVE_GETPAGESIZE=1;
6493 HAVE_GROUP_MEMBER=1;
6494 HAVE_LCHOWN=1;
6495 HAVE_LINK=1;
6496 HAVE_LINKAT=1;
6497 HAVE_PIPE=1;
6498 HAVE_PIPE2=1;
6499 HAVE_PREAD=1;
6500 HAVE_PWRITE=1;
6501 HAVE_READLINK=1;
6502 HAVE_READLINKAT=1;
6503 HAVE_SETHOSTNAME=1;
6504 HAVE_SLEEP=1;
6505 HAVE_SYMLINK=1;
6506 HAVE_SYMLINKAT=1;
6507 HAVE_UNLINKAT=1;
6508 HAVE_USLEEP=1;
6509 HAVE_DECL_ENVIRON=1;
6510 HAVE_DECL_FCHDIR=1;
6511 HAVE_DECL_FDATASYNC=1;
6512 HAVE_DECL_GETDOMAINNAME=1;
6513 HAVE_DECL_GETLOGIN_R=1;
6514 HAVE_DECL_GETPAGESIZE=1;
6515 HAVE_DECL_GETUSERSHELL=1;
6516 HAVE_DECL_SETHOSTNAME=1;
6517 HAVE_DECL_TTYNAME_R=1;
6518 HAVE_OS_H=0;
6519 HAVE_SYS_PARAM_H=0;
6520 REPLACE_CHOWN=0;
6521 REPLACE_CLOSE=0;
6522 REPLACE_DUP=0;
6523 REPLACE_DUP2=0;
6524 REPLACE_FCHOWNAT=0;
6525 REPLACE_FTRUNCATE=0;
6526 REPLACE_GETCWD=0;
6527 REPLACE_GETDOMAINNAME=0;
6528 REPLACE_GETLOGIN_R=0;
6529 REPLACE_GETGROUPS=0;
6530 REPLACE_GETPAGESIZE=0;
6531 REPLACE_ISATTY=0;
6532 REPLACE_LCHOWN=0;
6533 REPLACE_LINK=0;
6534 REPLACE_LINKAT=0;
6535 REPLACE_LSEEK=0;
6536 REPLACE_PREAD=0;
6537 REPLACE_PWRITE=0;
6538 REPLACE_READ=0;
6539 REPLACE_READLINK=0;
6540 REPLACE_RMDIR=0;
6541 REPLACE_SLEEP=0;
6542 REPLACE_SYMLINK=0;
6543 REPLACE_TTYNAME_R=0;
6544 REPLACE_UNLINK=0;
6545 REPLACE_UNLINKAT=0;
6546 REPLACE_USLEEP=0;
6547 REPLACE_WRITE=0;
6548 UNISTD_H_HAVE_WINSOCK2_H=0;
6549 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
6550
6551
6552
6553 GNULIB_OPENDIR=0;
6554 GNULIB_READDIR=0;
6555 GNULIB_REWINDDIR=0;
6556 GNULIB_CLOSEDIR=0;
6557 GNULIB_DIRFD=0;
6558 GNULIB_FDOPENDIR=0;
6559 GNULIB_SCANDIR=0;
6560 GNULIB_ALPHASORT=0;
6561 HAVE_OPENDIR=1;
6562 HAVE_READDIR=1;
6563 HAVE_REWINDDIR=1;
6564 HAVE_CLOSEDIR=1;
6565 HAVE_DECL_DIRFD=1;
6566 HAVE_DECL_FDOPENDIR=1;
6567 HAVE_FDOPENDIR=1;
6568 HAVE_SCANDIR=1;
6569 HAVE_ALPHASORT=1;
6570 REPLACE_OPENDIR=0;
6571 REPLACE_CLOSEDIR=0;
6572 REPLACE_DIRFD=0;
6573 REPLACE_FDOPENDIR=0;
6574
6575
6576
6577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
6578$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
6579if test "${gl_cv_have_include_next+set}" = set; then :
6580 $as_echo_n "(cached) " >&6
6581else
6582 rm -rf conftestd1a conftestd1b conftestd2
6583 mkdir conftestd1a conftestd1b conftestd2
6584 cat <<EOF > conftestd1a/conftest.h
6585#define DEFINED_IN_CONFTESTD1
6586#include_next <conftest.h>
6587#ifdef DEFINED_IN_CONFTESTD2
6588int foo;
6589#else
88b48903
WN
6590#error "include_next doesn't work"
6591#endif
6592EOF
6593 cat <<EOF > conftestd1b/conftest.h
6594#define DEFINED_IN_CONFTESTD1
6595#include <stdio.h>
6596#include_next <conftest.h>
6597#ifdef DEFINED_IN_CONFTESTD2
6598int foo;
6599#else
6600#error "include_next doesn't work"
6601#endif
6602EOF
6603 cat <<EOF > conftestd2/conftest.h
6604#ifndef DEFINED_IN_CONFTESTD1
6605#error "include_next test doesn't work"
6606#endif
6607#define DEFINED_IN_CONFTESTD2
6608EOF
6609 gl_save_CPPFLAGS="$CPPFLAGS"
6610 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
6611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6612/* end confdefs.h. */
6613#include <conftest.h>
6614_ACEOF
6615if ac_fn_c_try_compile "$LINENO"; then :
6616 gl_cv_have_include_next=yes
6617else
6618 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
6619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6620/* end confdefs.h. */
6621#include <conftest.h>
6622_ACEOF
6623if ac_fn_c_try_compile "$LINENO"; then :
6624 gl_cv_have_include_next=buggy
6625else
6626 gl_cv_have_include_next=no
6627fi
6628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6629
6630fi
6631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6632 CPPFLAGS="$gl_save_CPPFLAGS"
6633 rm -rf conftestd1a conftestd1b conftestd2
6634
6635fi
6636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
6637$as_echo "$gl_cv_have_include_next" >&6; }
6638 PRAGMA_SYSTEM_HEADER=
6639 if test $gl_cv_have_include_next = yes; then
6640 INCLUDE_NEXT=include_next
6641 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
6642 if test -n "$GCC"; then
6643 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
6644 fi
6645 else
6646 if test $gl_cv_have_include_next = buggy; then
6647 INCLUDE_NEXT=include
6648 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
6649 else
6650 INCLUDE_NEXT=include
6651 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
6652 fi
6653 fi
6654
6655
6656
6657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
6658$as_echo_n "checking whether system header files limit the line length... " >&6; }
6659if test "${gl_cv_pragma_columns+set}" = set; then :
6660 $as_echo_n "(cached) " >&6
6661else
6662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6663/* end confdefs.h. */
6664
6665#ifdef __TANDEM
6666choke me
6667#endif
6668
6669_ACEOF
6670if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6671 $EGREP "choke me" >/dev/null 2>&1; then :
6672 gl_cv_pragma_columns=yes
6673else
6674 gl_cv_pragma_columns=no
6675fi
6676rm -f conftest*
6677
6678
6679fi
6680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
6681$as_echo "$gl_cv_pragma_columns" >&6; }
6682 if test $gl_cv_pragma_columns = yes; then
6683 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
6684 else
6685 PRAGMA_COLUMNS=
6686 fi
6687
6688
6689
6690
e26b6bb0 6691
e26b6bb0 6692
18848e28
GF
6693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
6694$as_echo_n "checking for complete errno.h... " >&6; }
6695if test "${gl_cv_header_errno_h_complete+set}" = set; then :
6696 $as_echo_n "(cached) " >&6
6697else
6698
6699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6700/* end confdefs.h. */
6701
6702#include <errno.h>
6703#if !defined ETXTBSY
6704booboo
6705#endif
6706#if !defined ENOMSG
6707booboo
6708#endif
6709#if !defined EIDRM
6710booboo
6711#endif
6712#if !defined ENOLINK
6713booboo
6714#endif
6715#if !defined EPROTO
6716booboo
6717#endif
6718#if !defined EMULTIHOP
6719booboo
6720#endif
6721#if !defined EBADMSG
6722booboo
6723#endif
6724#if !defined EOVERFLOW
6725booboo
6726#endif
6727#if !defined ENOTSUP
6728booboo
6729#endif
6730#if !defined ENETRESET
6731booboo
6732#endif
6733#if !defined ECONNABORTED
6734booboo
6735#endif
6736#if !defined ESTALE
6737booboo
6738#endif
6739#if !defined EDQUOT
6740booboo
6741#endif
6742#if !defined ECANCELED
6743booboo
6744#endif
6745#if !defined EOWNERDEAD
6746booboo
6747#endif
6748#if !defined ENOTRECOVERABLE
6749booboo
6750#endif
6751#if !defined EILSEQ
6752booboo
6753#endif
6754
6755_ACEOF
6756if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6757 $EGREP "booboo" >/dev/null 2>&1; then :
6758 gl_cv_header_errno_h_complete=no
6759else
6760 gl_cv_header_errno_h_complete=yes
6761fi
6762rm -f conftest*
6763
6764
6765fi
6766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
6767$as_echo "$gl_cv_header_errno_h_complete" >&6; }
6768 if test $gl_cv_header_errno_h_complete = yes; then
6769 ERRNO_H=''
6770 else
6771
6772
6773
6774
6775
6776
6777
6778
6779 if test $gl_cv_have_include_next = yes; then
6780 gl_cv_next_errno_h='<'errno.h'>'
6781 else
6782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
6783$as_echo_n "checking absolute name of <errno.h>... " >&6; }
6784if test "${gl_cv_next_errno_h+set}" = set; then :
6785 $as_echo_n "(cached) " >&6
6786else
6787
6788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6789/* end confdefs.h. */
6790#include <errno.h>
6791
6792_ACEOF
6793 case "$host_os" in
6794 aix*) gl_absname_cpp="$ac_cpp -C" ;;
6795 *) gl_absname_cpp="$ac_cpp" ;;
6796 esac
6797
6798 case "$host_os" in
6799 mingw*)
6800 gl_dirsep_regex='[/\\]'
6801 ;;
6802 *)
6803 gl_dirsep_regex='\/'
6804 ;;
6805 esac
6806 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6807
6808 gl_header_literal_regex=`echo 'errno.h' \
6809 | sed -e "$gl_make_literal_regex_sed"`
6810 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
6811 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
6812 s|^/[^/]|//&|
6813 p
6814 q
6815 }'
6816 gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
6817 sed -n "$gl_absolute_header_sed"`'"'
6818
6819
6820fi
6821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
6822$as_echo "$gl_cv_next_errno_h" >&6; }
6823 fi
6824 NEXT_ERRNO_H=$gl_cv_next_errno_h
6825
6826 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
6827 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6828 gl_next_as_first_directive='<'errno.h'>'
6829 else
6830 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6831 gl_next_as_first_directive=$gl_cv_next_errno_h
6832 fi
6833 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
6834
6835
6836
6837
6838 ERRNO_H='errno.h'
6839 fi
6840
6841 if test -n "$ERRNO_H"; then
6842 GL_GENERATE_ERRNO_H_TRUE=
6843 GL_GENERATE_ERRNO_H_FALSE='#'
6844else
6845 GL_GENERATE_ERRNO_H_TRUE='#'
6846 GL_GENERATE_ERRNO_H_FALSE=
6847fi
6848
6849
6850 if test -n "$ERRNO_H"; then
6851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
6852$as_echo_n "checking for EMULTIHOP value... " >&6; }
6853if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then :
6854 $as_echo_n "(cached) " >&6
6855else
6856
6857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6858/* end confdefs.h. */
6859
6860#include <errno.h>
6861#ifdef EMULTIHOP
6862yes
6863#endif
6864
6865_ACEOF
6866if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6867 $EGREP "yes" >/dev/null 2>&1; then :
6868 gl_cv_header_errno_h_EMULTIHOP=yes
6869else
6870 gl_cv_header_errno_h_EMULTIHOP=no
6871fi
6872rm -f conftest*
6873
6874 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
6875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6876/* end confdefs.h. */
6877
6878#define _XOPEN_SOURCE_EXTENDED 1
6879#include <errno.h>
6880#ifdef EMULTIHOP
6881yes
6882#endif
6883
6884_ACEOF
6885if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6886 $EGREP "yes" >/dev/null 2>&1; then :
6887 gl_cv_header_errno_h_EMULTIHOP=hidden
6888fi
6889rm -f conftest*
6890
6891 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
6892 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
6893#define _XOPEN_SOURCE_EXTENDED 1
6894#include <errno.h>
6895/* The following two lines are a workaround against an autoconf-2.52 bug. */
6896#include <stdio.h>
6897#include <stdlib.h>
6898"; then :
6899
6900fi
6901
6902 fi
6903 fi
6904
6905fi
6906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
6907$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
6908 case $gl_cv_header_errno_h_EMULTIHOP in
6909 yes | no)
6910 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
6911 ;;
6912 *)
6913 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
6914 ;;
6915 esac
6916
6917
6918 fi
6919
6920
6921 if test -n "$ERRNO_H"; then
6922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
6923$as_echo_n "checking for ENOLINK value... " >&6; }
6924if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then :
6925 $as_echo_n "(cached) " >&6
6926else
6927
6928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6929/* end confdefs.h. */
6930
6931#include <errno.h>
6932#ifdef ENOLINK
6933yes
6934#endif
6935
6936_ACEOF
6937if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6938 $EGREP "yes" >/dev/null 2>&1; then :
6939 gl_cv_header_errno_h_ENOLINK=yes
6940else
6941 gl_cv_header_errno_h_ENOLINK=no
6942fi
6943rm -f conftest*
6944
6945 if test $gl_cv_header_errno_h_ENOLINK = no; then
6946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6947/* end confdefs.h. */
6948
6949#define _XOPEN_SOURCE_EXTENDED 1
6950#include <errno.h>
6951#ifdef ENOLINK
6952yes
6953#endif
6954
6955_ACEOF
6956if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6957 $EGREP "yes" >/dev/null 2>&1; then :
6958 gl_cv_header_errno_h_ENOLINK=hidden
6959fi
6960rm -f conftest*
6961
6962 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
6963 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
6964#define _XOPEN_SOURCE_EXTENDED 1
6965#include <errno.h>
6966/* The following two lines are a workaround against an autoconf-2.52 bug. */
6967#include <stdio.h>
6968#include <stdlib.h>
6969"; then :
6970
6971fi
6972
6973 fi
6974 fi
6975
6976fi
6977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
6978$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
6979 case $gl_cv_header_errno_h_ENOLINK in
6980 yes | no)
6981 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
6982 ;;
6983 *)
6984 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
6985 ;;
6986 esac
6987
6988
6989 fi
6990
6991
6992 if test -n "$ERRNO_H"; then
6993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
6994$as_echo_n "checking for EOVERFLOW value... " >&6; }
6995if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then :
6996 $as_echo_n "(cached) " >&6
6997else
6998
6999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7000/* end confdefs.h. */
7001
7002#include <errno.h>
7003#ifdef EOVERFLOW
7004yes
7005#endif
7006
7007_ACEOF
7008if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7009 $EGREP "yes" >/dev/null 2>&1; then :
7010 gl_cv_header_errno_h_EOVERFLOW=yes
7011else
7012 gl_cv_header_errno_h_EOVERFLOW=no
7013fi
7014rm -f conftest*
7015
7016 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
7017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7018/* end confdefs.h. */
7019
7020#define _XOPEN_SOURCE_EXTENDED 1
7021#include <errno.h>
7022#ifdef EOVERFLOW
7023yes
7024#endif
7025
7026_ACEOF
7027if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7028 $EGREP "yes" >/dev/null 2>&1; then :
7029 gl_cv_header_errno_h_EOVERFLOW=hidden
7030fi
7031rm -f conftest*
7032
7033 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
7034 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
7035#define _XOPEN_SOURCE_EXTENDED 1
7036#include <errno.h>
7037/* The following two lines are a workaround against an autoconf-2.52 bug. */
7038#include <stdio.h>
7039#include <stdlib.h>
7040"; then :
7041
7042fi
7043
7044 fi
7045 fi
7046
7047fi
7048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
7049$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
7050 case $gl_cv_header_errno_h_EOVERFLOW in
7051 yes | no)
7052 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
7053 ;;
7054 *)
7055 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
7056 ;;
7057 esac
7058
7059
7060 fi
7061
7062
7063
7064
63ce7108
TT
7065
7066
7067
7068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
7069$as_echo_n "checking for mbstate_t... " >&6; }
7070if test "${ac_cv_type_mbstate_t+set}" = set; then :
7071 $as_echo_n "(cached) " >&6
7072else
7073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7074/* end confdefs.h. */
7075$ac_includes_default
7076/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
7077 <wchar.h>.
7078 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
7079 included before <wchar.h>. */
7080#include <stddef.h>
7081#include <stdio.h>
7082#include <time.h>
7083#include <wchar.h>
7084int
7085main ()
7086{
7087mbstate_t x; return sizeof x;
7088 ;
7089 return 0;
7090}
7091_ACEOF
7092if ac_fn_c_try_compile "$LINENO"; then :
7093 ac_cv_type_mbstate_t=yes
7094else
7095 ac_cv_type_mbstate_t=no
7096fi
7097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7098fi
7099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
7100$as_echo "$ac_cv_type_mbstate_t" >&6; }
7101 if test $ac_cv_type_mbstate_t = yes; then
7102
7103$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
7104
7105 else
7106
7107$as_echo "#define mbstate_t int" >>confdefs.h
7108
7109 fi
7110
7111
7112
7113
63ce7108
TT
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
63ce7108
TT
7130 GNULIB_ACOSF=0;
7131 GNULIB_ACOSL=0;
7132 GNULIB_ASINF=0;
7133 GNULIB_ASINL=0;
7134 GNULIB_ATANF=0;
7135 GNULIB_ATANL=0;
7136 GNULIB_ATAN2F=0;
7137 GNULIB_CBRT=0;
7138 GNULIB_CBRTF=0;
7139 GNULIB_CBRTL=0;
7140 GNULIB_CEIL=0;
7141 GNULIB_CEILF=0;
7142 GNULIB_CEILL=0;
7143 GNULIB_COPYSIGN=0;
7144 GNULIB_COPYSIGNF=0;
88b48903
WN
7145 GNULIB_COPYSIGNL=0;
7146 GNULIB_COSF=0;
7147 GNULIB_COSL=0;
7148 GNULIB_COSHF=0;
7149 GNULIB_EXPF=0;
7150 GNULIB_EXPL=0;
7151 GNULIB_EXP2=0;
7152 GNULIB_EXP2F=0;
7153 GNULIB_EXP2L=0;
7154 GNULIB_EXPM1=0;
7155 GNULIB_EXPM1F=0;
7156 GNULIB_EXPM1L=0;
7157 GNULIB_FABSF=0;
7158 GNULIB_FABSL=0;
7159 GNULIB_FLOOR=0;
7160 GNULIB_FLOORF=0;
7161 GNULIB_FLOORL=0;
7162 GNULIB_FMA=0;
7163 GNULIB_FMAF=0;
7164 GNULIB_FMAL=0;
7165 GNULIB_FMOD=0;
7166 GNULIB_FMODF=0;
7167 GNULIB_FMODL=0;
7168 GNULIB_FREXPF=0;
7169 GNULIB_FREXP=0;
7170 GNULIB_FREXPL=0;
7171 GNULIB_HYPOT=0;
7172 GNULIB_HYPOTF=0;
7173 GNULIB_HYPOTL=0;
7174 GNULIB_ILOGB=0;
7175 GNULIB_ILOGBF=0;
7176 GNULIB_ILOGBL=0;
7177 GNULIB_ISFINITE=0;
7178 GNULIB_ISINF=0;
7179 GNULIB_ISNAN=0;
7180 GNULIB_ISNANF=0;
7181 GNULIB_ISNAND=0;
7182 GNULIB_ISNANL=0;
7183 GNULIB_LDEXPF=0;
7184 GNULIB_LDEXPL=0;
7185 GNULIB_LOG=0;
7186 GNULIB_LOGF=0;
7187 GNULIB_LOGL=0;
7188 GNULIB_LOG10=0;
7189 GNULIB_LOG10F=0;
7190 GNULIB_LOG10L=0;
7191 GNULIB_LOG1P=0;
7192 GNULIB_LOG1PF=0;
7193 GNULIB_LOG1PL=0;
7194 GNULIB_LOG2=0;
7195 GNULIB_LOG2F=0;
7196 GNULIB_LOG2L=0;
7197 GNULIB_LOGB=0;
7198 GNULIB_LOGBF=0;
7199 GNULIB_LOGBL=0;
7200 GNULIB_MODF=0;
7201 GNULIB_MODFF=0;
7202 GNULIB_MODFL=0;
7203 GNULIB_POWF=0;
7204 GNULIB_REMAINDER=0;
7205 GNULIB_REMAINDERF=0;
7206 GNULIB_REMAINDERL=0;
7207 GNULIB_RINT=0;
7208 GNULIB_RINTF=0;
7209 GNULIB_RINTL=0;
7210 GNULIB_ROUND=0;
7211 GNULIB_ROUNDF=0;
7212 GNULIB_ROUNDL=0;
7213 GNULIB_SIGNBIT=0;
7214 GNULIB_SINF=0;
7215 GNULIB_SINL=0;
7216 GNULIB_SINHF=0;
7217 GNULIB_SQRTF=0;
7218 GNULIB_SQRTL=0;
7219 GNULIB_TANF=0;
7220 GNULIB_TANL=0;
7221 GNULIB_TANHF=0;
7222 GNULIB_TRUNC=0;
7223 GNULIB_TRUNCF=0;
7224 GNULIB_TRUNCL=0;
7225 HAVE_ACOSF=1;
7226 HAVE_ACOSL=1;
7227 HAVE_ASINF=1;
7228 HAVE_ASINL=1;
7229 HAVE_ATANF=1;
7230 HAVE_ATANL=1;
7231 HAVE_ATAN2F=1;
7232 HAVE_CBRT=1;
7233 HAVE_CBRTF=1;
7234 HAVE_CBRTL=1;
7235 HAVE_COPYSIGN=1;
7236 HAVE_COPYSIGNL=1;
7237 HAVE_COSF=1;
7238 HAVE_COSL=1;
7239 HAVE_COSHF=1;
7240 HAVE_EXPF=1;
7241 HAVE_EXPL=1;
7242 HAVE_EXPM1=1;
7243 HAVE_EXPM1F=1;
7244 HAVE_FABSF=1;
7245 HAVE_FABSL=1;
7246 HAVE_FMA=1;
7247 HAVE_FMAF=1;
7248 HAVE_FMAL=1;
7249 HAVE_FMODF=1;
7250 HAVE_FMODL=1;
7251 HAVE_FREXPF=1;
7252 HAVE_HYPOTF=1;
7253 HAVE_HYPOTL=1;
7254 HAVE_ILOGB=1;
7255 HAVE_ILOGBF=1;
7256 HAVE_ILOGBL=1;
7257 HAVE_ISNANF=1;
7258 HAVE_ISNAND=1;
7259 HAVE_ISNANL=1;
7260 HAVE_LDEXPF=1;
7261 HAVE_LOGF=1;
7262 HAVE_LOGL=1;
7263 HAVE_LOG10F=1;
7264 HAVE_LOG10L=1;
7265 HAVE_LOG1P=1;
7266 HAVE_LOG1PF=1;
7267 HAVE_LOG1PL=1;
7268 HAVE_LOGBF=1;
7269 HAVE_LOGBL=1;
7270 HAVE_MODFF=1;
7271 HAVE_MODFL=1;
7272 HAVE_POWF=1;
7273 HAVE_REMAINDER=1;
7274 HAVE_REMAINDERF=1;
7275 HAVE_RINT=1;
7276 HAVE_RINTL=1;
7277 HAVE_SINF=1;
7278 HAVE_SINL=1;
7279 HAVE_SINHF=1;
7280 HAVE_SQRTF=1;
7281 HAVE_SQRTL=1;
7282 HAVE_TANF=1;
7283 HAVE_TANL=1;
7284 HAVE_TANHF=1;
7285 HAVE_DECL_ACOSL=1;
7286 HAVE_DECL_ASINL=1;
7287 HAVE_DECL_ATANL=1;
7288 HAVE_DECL_CBRTF=1;
7289 HAVE_DECL_CBRTL=1;
7290 HAVE_DECL_CEILF=1;
7291 HAVE_DECL_CEILL=1;
7292 HAVE_DECL_COPYSIGNF=1;
7293 HAVE_DECL_COSL=1;
7294 HAVE_DECL_EXPL=1;
7295 HAVE_DECL_EXP2=1;
7296 HAVE_DECL_EXP2F=1;
7297 HAVE_DECL_EXP2L=1;
7298 HAVE_DECL_EXPM1L=1;
7299 HAVE_DECL_FLOORF=1;
7300 HAVE_DECL_FLOORL=1;
7301 HAVE_DECL_FREXPL=1;
7302 HAVE_DECL_LDEXPL=1;
7303 HAVE_DECL_LOGL=1;
7304 HAVE_DECL_LOG10L=1;
7305 HAVE_DECL_LOG2=1;
7306 HAVE_DECL_LOG2F=1;
7307 HAVE_DECL_LOG2L=1;
7308 HAVE_DECL_LOGB=1;
7309 HAVE_DECL_REMAINDER=1;
7310 HAVE_DECL_REMAINDERL=1;
7311 HAVE_DECL_RINTF=1;
7312 HAVE_DECL_ROUND=1;
7313 HAVE_DECL_ROUNDF=1;
7314 HAVE_DECL_ROUNDL=1;
7315 HAVE_DECL_SINL=1;
7316 HAVE_DECL_SQRTL=1;
7317 HAVE_DECL_TANL=1;
7318 HAVE_DECL_TRUNC=1;
7319 HAVE_DECL_TRUNCF=1;
7320 HAVE_DECL_TRUNCL=1;
7321 REPLACE_CBRTF=0;
7322 REPLACE_CBRTL=0;
7323 REPLACE_CEIL=0;
7324 REPLACE_CEILF=0;
7325 REPLACE_CEILL=0;
7326 REPLACE_EXPM1=0;
7327 REPLACE_EXPM1F=0;
7328 REPLACE_EXP2=0;
7329 REPLACE_EXP2L=0;
7330 REPLACE_FABSL=0;
7331 REPLACE_FLOOR=0;
7332 REPLACE_FLOORF=0;
7333 REPLACE_FLOORL=0;
7334 REPLACE_FMA=0;
7335 REPLACE_FMAF=0;
7336 REPLACE_FMAL=0;
7337 REPLACE_FMOD=0;
7338 REPLACE_FMODF=0;
7339 REPLACE_FMODL=0;
7340 REPLACE_FREXPF=0;
7341 REPLACE_FREXP=0;
7342 REPLACE_FREXPL=0;
7343 REPLACE_HUGE_VAL=0;
7344 REPLACE_HYPOT=0;
7345 REPLACE_HYPOTF=0;
7346 REPLACE_HYPOTL=0;
7347 REPLACE_ILOGB=0;
7348 REPLACE_ILOGBF=0;
7349 REPLACE_ISFINITE=0;
7350 REPLACE_ISINF=0;
7351 REPLACE_ISNAN=0;
7352 REPLACE_LDEXPL=0;
7353 REPLACE_LOG=0;
7354 REPLACE_LOGF=0;
7355 REPLACE_LOGL=0;
7356 REPLACE_LOG10=0;
7357 REPLACE_LOG10F=0;
7358 REPLACE_LOG10L=0;
7359 REPLACE_LOG1P=0;
7360 REPLACE_LOG1PF=0;
7361 REPLACE_LOG1PL=0;
7362 REPLACE_LOG2=0;
7363 REPLACE_LOG2F=0;
7364 REPLACE_LOG2L=0;
7365 REPLACE_LOGB=0;
7366 REPLACE_LOGBF=0;
7367 REPLACE_LOGBL=0;
7368 REPLACE_MODF=0;
7369 REPLACE_MODFF=0;
7370 REPLACE_MODFL=0;
7371 REPLACE_NAN=0;
7372 REPLACE_REMAINDER=0;
7373 REPLACE_REMAINDERF=0;
7374 REPLACE_REMAINDERL=0;
7375 REPLACE_ROUND=0;
7376 REPLACE_ROUNDF=0;
7377 REPLACE_ROUNDL=0;
7378 REPLACE_SIGNBIT=0;
7379 REPLACE_SIGNBIT_USING_GCC=0;
7380 REPLACE_SQRTL=0;
7381 REPLACE_TRUNC=0;
7382 REPLACE_TRUNCF=0;
7383 REPLACE_TRUNCL=0;
7384
7385
7386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
7387$as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
7388if test "${gl_cv_func_frexp_no_libm+set}" = set; then :
7389 $as_echo_n "(cached) " >&6
7390else
7391
7392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7393/* end confdefs.h. */
7394#include <math.h>
7395 double x;
7396int
7397main ()
7398{
7399int e; return frexp (x, &e) > 0;
7400 ;
7401 return 0;
7402}
7403_ACEOF
7404if ac_fn_c_try_link "$LINENO"; then :
7405 gl_cv_func_frexp_no_libm=yes
7406else
7407 gl_cv_func_frexp_no_libm=no
7408fi
7409rm -f core conftest.err conftest.$ac_objext \
7410 conftest$ac_exeext conftest.$ac_ext
7411
7412fi
7413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
7414$as_echo "$gl_cv_func_frexp_no_libm" >&6; }
7415
7416
7417
7418
88b48903
WN
7419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
7420$as_echo_n "checking whether long double and double are the same... " >&6; }
7421if test "${gl_cv_long_double_equals_double+set}" = set; then :
7422 $as_echo_n "(cached) " >&6
7423else
7424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7425/* end confdefs.h. */
7426#include <float.h>
7427int
7428main ()
7429{
7430typedef int check[sizeof (long double) == sizeof (double)
7431 && LDBL_MANT_DIG == DBL_MANT_DIG
7432 && LDBL_MAX_EXP == DBL_MAX_EXP
7433 && LDBL_MIN_EXP == DBL_MIN_EXP
7434 ? 1 : -1];
7435
7436 ;
7437 return 0;
7438}
7439_ACEOF
7440if ac_fn_c_try_compile "$LINENO"; then :
7441 gl_cv_long_double_equals_double=yes
7442else
7443 gl_cv_long_double_equals_double=no
7444fi
7445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7446
7447fi
7448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
7449$as_echo "$gl_cv_long_double_equals_double" >&6; }
7450 if test $gl_cv_long_double_equals_double = yes; then
7451
7452$as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
7453
7454 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
7455 else
7456 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
7457 fi
7458
7459
7460
8690e634
JK
7461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
7462$as_echo_n "checking for unsigned long long int... " >&6; }
7463if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
7464 $as_echo_n "(cached) " >&6
7465else
7466 ac_cv_type_unsigned_long_long_int=yes
7467 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
7468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7469/* end confdefs.h. */
7470
7471 /* For now, do not test the preprocessor; as of 2007 there are too many
7472 implementations with broken preprocessors. Perhaps this can
7473 be revisited in 2012. In the meantime, code should not expect
7474 #if to work with literals wider than 32 bits. */
7475 /* Test literals. */
7476 long long int ll = 9223372036854775807ll;
7477 long long int nll = -9223372036854775807LL;
7478 unsigned long long int ull = 18446744073709551615ULL;
7479 /* Test constant expressions. */
7480 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
7481 ? 1 : -1)];
7482 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
7483 ? 1 : -1)];
7484 int i = 63;
7485int
7486main ()
7487{
7488/* Test availability of runtime routines for shift and division. */
7489 long long int llmax = 9223372036854775807ll;
7490 unsigned long long int ullmax = 18446744073709551615ull;
7491 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
7492 | (llmax / ll) | (llmax % ll)
7493 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
7494 | (ullmax / ull) | (ullmax % ull));
7495 ;
7496 return 0;
7497}
7498
7499_ACEOF
7500if ac_fn_c_try_link "$LINENO"; then :
7501
7502else
7503 ac_cv_type_unsigned_long_long_int=no
7504fi
7505rm -f core conftest.err conftest.$ac_objext \
7506 conftest$ac_exeext conftest.$ac_ext
7507 fi
7508fi
7509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
7510$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
7511 if test $ac_cv_type_unsigned_long_long_int = yes; then
7512
7513$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
7514
7515 fi
7516
7517
7518
7519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
7520$as_echo_n "checking for long long int... " >&6; }
7521if test "${ac_cv_type_long_long_int+set}" = set; then :
7522 $as_echo_n "(cached) " >&6
7523else
7524 ac_cv_type_long_long_int=yes
7525 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
7526 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
7527 if test $ac_cv_type_long_long_int = yes; then
7528 if test "$cross_compiling" = yes; then :
7529 :
7530else
7531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7532/* end confdefs.h. */
7533#include <limits.h>
7534 #ifndef LLONG_MAX
7535 # define HALF \
7536 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
7537 # define LLONG_MAX (HALF - 1 + HALF)
7538 #endif
7539int
7540main ()
7541{
7542long long int n = 1;
7543 int i;
7544 for (i = 0; ; i++)
7545 {
7546 long long int m = n << i;
7547 if (m >> i != n)
7548 return 1;
7549 if (LLONG_MAX / 2 < m)
7550 break;
7551 }
7552 return 0;
7553 ;
7554 return 0;
7555}
7556_ACEOF
7557if ac_fn_c_try_run "$LINENO"; then :
7558
7559else
7560 ac_cv_type_long_long_int=no
7561fi
7562rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7563 conftest.$ac_objext conftest.beam conftest.$ac_ext
7564fi
7565
7566 fi
7567 fi
7568fi
7569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
7570$as_echo "$ac_cv_type_long_long_int" >&6; }
7571 if test $ac_cv_type_long_long_int = yes; then
7572
7573$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
7574
7575 fi
7576
7577
7578
7579
7580
7581
88b48903
WN
7582 gl_cv_c_multiarch=no
7583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a143c6de 7584/* end confdefs.h. */
88b48903
WN
7585#ifndef __APPLE_CC__
7586 not a universal capable compiler
7587 #endif
7588 typedef int dummy;
7589
8690e634
JK
7590_ACEOF
7591if ac_fn_c_try_compile "$LINENO"; then :
7592
7593 arch=
7594 prev=
7595 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
7596 if test -n "$prev"; then
7597 case $word in
7598 i?86 | x86_64 | ppc | ppc64)
7599 if test -z "$arch" || test "$arch" = "$word"; then
7600 arch="$word"
7601 else
7602 gl_cv_c_multiarch=yes
7603 fi
7604 ;;
7605 esac
7606 prev=
7607 else
7608 if test "x$word" = "x-arch"; then
7609 prev=arch
7610 fi
7611 fi
7612 done
7613
7614fi
7615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7616 if test $gl_cv_c_multiarch = yes; then
7617 APPLE_UNIVERSAL_BUILD=1
7618 else
7619 APPLE_UNIVERSAL_BUILD=0
7620 fi
7621
7622
7623
7624
7625
7626 if test $ac_cv_type_long_long_int = yes; then
7627 HAVE_LONG_LONG_INT=1
7628 else
7629 HAVE_LONG_LONG_INT=0
7630 fi
7631
7632
7633 if test $ac_cv_type_unsigned_long_long_int = yes; then
7634 HAVE_UNSIGNED_LONG_LONG_INT=1
7635 else
7636 HAVE_UNSIGNED_LONG_LONG_INT=0
7637 fi
7638
7639
7640
8690e634
JK
7641 if test $ac_cv_header_wchar_h = yes; then
7642 HAVE_WCHAR_H=1
7643 else
7644 HAVE_WCHAR_H=0
7645 fi
7646
7647
7648 if test $ac_cv_header_inttypes_h = yes; then
7649 HAVE_INTTYPES_H=1
7650 else
7651 HAVE_INTTYPES_H=0
7652 fi
7653
7654
7655 if test $ac_cv_header_sys_types_h = yes; then
7656 HAVE_SYS_TYPES_H=1
7657 else
7658 HAVE_SYS_TYPES_H=0
7659 fi
7660
7661
7662
7663
7664
7665
7666
7667
8690e634
JK
7668
7669
7670
7671 if test $gl_cv_have_include_next = yes; then
7672 gl_cv_next_stdint_h='<'stdint.h'>'
7673 else
7674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
7675$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
7676if test "${gl_cv_next_stdint_h+set}" = set; then :
7677 $as_echo_n "(cached) " >&6
7678else
7679
7680 if test $ac_cv_header_stdint_h = yes; then
7681
7682
7683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7684/* end confdefs.h. */
7685#include <stdint.h>
7686
7687_ACEOF
7688 case "$host_os" in
7689 aix*) gl_absname_cpp="$ac_cpp -C" ;;
7690 *) gl_absname_cpp="$ac_cpp" ;;
7691 esac
7692
7693 case "$host_os" in
7694 mingw*)
7695 gl_dirsep_regex='[/\\]'
7696 ;;
7697 *)
7698 gl_dirsep_regex='\/'
7699 ;;
7700 esac
7701 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
7702
7703 gl_header_literal_regex=`echo 'stdint.h' \
7704 | sed -e "$gl_make_literal_regex_sed"`
7705 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
7706 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
7707 s|^/[^/]|//&|
7708 p
7709 q
7710 }'
7711 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7712 sed -n "$gl_absolute_header_sed"`'"'
7713 else
7714 gl_cv_next_stdint_h='<'stdint.h'>'
7715 fi
7716
7717
7718fi
7719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
7720$as_echo "$gl_cv_next_stdint_h" >&6; }
7721 fi
7722 NEXT_STDINT_H=$gl_cv_next_stdint_h
7723
7724 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7725 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
7726 gl_next_as_first_directive='<'stdint.h'>'
7727 else
7728 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
7729 gl_next_as_first_directive=$gl_cv_next_stdint_h
7730 fi
7731 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
7732
7733
7734
7735
7736 if test $ac_cv_header_stdint_h = yes; then
7737 HAVE_STDINT_H=1
7738 else
7739 HAVE_STDINT_H=0
7740 fi
7741
7742
7743 if test $ac_cv_header_stdint_h = yes; then
7744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
7745$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
7746if test "${gl_cv_header_working_stdint_h+set}" = set; then :
7747 $as_echo_n "(cached) " >&6
7748else
7749 gl_cv_header_working_stdint_h=no
7750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7751/* end confdefs.h. */
7752
7753
7754#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
7755#include <stdint.h>
7756/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
7757#if !(defined WCHAR_MIN && defined WCHAR_MAX)
7758#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
7759#endif
7760
7761
7762 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
7763 included before <wchar.h>. */
7764 #include <stddef.h>
7765 #include <signal.h>
7766 #if HAVE_WCHAR_H
7767 # include <stdio.h>
7768 # include <time.h>
7769 # include <wchar.h>
7770 #endif
7771
7772
7773#ifdef INT8_MAX
7774int8_t a1 = INT8_MAX;
7775int8_t a1min = INT8_MIN;
7776#endif
7777#ifdef INT16_MAX
7778int16_t a2 = INT16_MAX;
7779int16_t a2min = INT16_MIN;
7780#endif
7781#ifdef INT32_MAX
7782int32_t a3 = INT32_MAX;
7783int32_t a3min = INT32_MIN;
7784#endif
7785#ifdef INT64_MAX
7786int64_t a4 = INT64_MAX;
7787int64_t a4min = INT64_MIN;
7788#endif
7789#ifdef UINT8_MAX
7790uint8_t b1 = UINT8_MAX;
7791#else
7792typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
7793#endif
7794#ifdef UINT16_MAX
7795uint16_t b2 = UINT16_MAX;
7796#endif
7797#ifdef UINT32_MAX
7798uint32_t b3 = UINT32_MAX;
7799#endif
7800#ifdef UINT64_MAX
7801uint64_t b4 = UINT64_MAX;
7802#endif
7803int_least8_t c1 = INT8_C (0x7f);
7804int_least8_t c1max = INT_LEAST8_MAX;
7805int_least8_t c1min = INT_LEAST8_MIN;
7806int_least16_t c2 = INT16_C (0x7fff);
7807int_least16_t c2max = INT_LEAST16_MAX;
7808int_least16_t c2min = INT_LEAST16_MIN;
7809int_least32_t c3 = INT32_C (0x7fffffff);
7810int_least32_t c3max = INT_LEAST32_MAX;
7811int_least32_t c3min = INT_LEAST32_MIN;
7812int_least64_t c4 = INT64_C (0x7fffffffffffffff);
7813int_least64_t c4max = INT_LEAST64_MAX;
7814int_least64_t c4min = INT_LEAST64_MIN;
7815uint_least8_t d1 = UINT8_C (0xff);
7816uint_least8_t d1max = UINT_LEAST8_MAX;
7817uint_least16_t d2 = UINT16_C (0xffff);
7818uint_least16_t d2max = UINT_LEAST16_MAX;
7819uint_least32_t d3 = UINT32_C (0xffffffff);
7820uint_least32_t d3max = UINT_LEAST32_MAX;
7821uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
7822uint_least64_t d4max = UINT_LEAST64_MAX;
7823int_fast8_t e1 = INT_FAST8_MAX;
7824int_fast8_t e1min = INT_FAST8_MIN;
7825int_fast16_t e2 = INT_FAST16_MAX;
7826int_fast16_t e2min = INT_FAST16_MIN;
7827int_fast32_t e3 = INT_FAST32_MAX;
7828int_fast32_t e3min = INT_FAST32_MIN;
7829int_fast64_t e4 = INT_FAST64_MAX;
7830int_fast64_t e4min = INT_FAST64_MIN;
7831uint_fast8_t f1 = UINT_FAST8_MAX;
7832uint_fast16_t f2 = UINT_FAST16_MAX;
7833uint_fast32_t f3 = UINT_FAST32_MAX;
7834uint_fast64_t f4 = UINT_FAST64_MAX;
7835#ifdef INTPTR_MAX
7836intptr_t g = INTPTR_MAX;
7837intptr_t gmin = INTPTR_MIN;
7838#endif
7839#ifdef UINTPTR_MAX
7840uintptr_t h = UINTPTR_MAX;
7841#endif
7842intmax_t i = INTMAX_MAX;
7843uintmax_t j = UINTMAX_MAX;
7844
7845#include <limits.h> /* for CHAR_BIT */
7846#define TYPE_MINIMUM(t) \
7847 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
7848#define TYPE_MAXIMUM(t) \
7849 ((t) ((t) 0 < (t) -1 \
7850 ? (t) -1 \
7851 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
7852struct s {
7853 int check_PTRDIFF:
7854 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
7855 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
7856 ? 1 : -1;
7857 /* Detect bug in FreeBSD 6.0 / ia64. */
7858 int check_SIG_ATOMIC:
7859 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
7860 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
7861 ? 1 : -1;
7862 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
7863 int check_WCHAR:
7864 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
7865 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
7866 ? 1 : -1;
7867 /* Detect bug in mingw. */
7868 int check_WINT:
7869 WINT_MIN == TYPE_MINIMUM (wint_t)
7870 && WINT_MAX == TYPE_MAXIMUM (wint_t)
7871 ? 1 : -1;
7872
7873 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
7874 int check_UINT8_C:
7875 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
7876 int check_UINT16_C:
7877 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
7878
7879 /* Detect bugs in OpenBSD 3.9 stdint.h. */
7880#ifdef UINT8_MAX
7881 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
7882#endif
7883#ifdef UINT16_MAX
7884 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
7885#endif
7886#ifdef UINT32_MAX
7887 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
7888#endif
7889#ifdef UINT64_MAX
7890 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
7891#endif
7892 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
7893 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
7894 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
7895 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
7896 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
7897 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
7898 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
7899 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
7900 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
7901 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
7902 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
7903};
7904
7905int
7906main ()
7907{
7908
7909 ;
7910 return 0;
7911}
7912_ACEOF
7913if ac_fn_c_try_compile "$LINENO"; then :
7914 if test "$cross_compiling" = yes; then :
7915 gl_cv_header_working_stdint_h=yes
7916
7917else
7918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7919/* end confdefs.h. */
7920
7921
7922#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
7923#include <stdint.h>
7924
7925
7926 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
7927 included before <wchar.h>. */
7928 #include <stddef.h>
7929 #include <signal.h>
7930 #if HAVE_WCHAR_H
7931 # include <stdio.h>
7932 # include <time.h>
7933 # include <wchar.h>
7934 #endif
7935
7936
7937#include <stdio.h>
7938#include <string.h>
7939#define MVAL(macro) MVAL1(macro)
7940#define MVAL1(expression) #expression
7941static const char *macro_values[] =
7942 {
7943#ifdef INT8_MAX
7944 MVAL (INT8_MAX),
7945#endif
7946#ifdef INT16_MAX
7947 MVAL (INT16_MAX),
7948#endif
7949#ifdef INT32_MAX
7950 MVAL (INT32_MAX),
7951#endif
7952#ifdef INT64_MAX
7953 MVAL (INT64_MAX),
7954#endif
7955#ifdef UINT8_MAX
7956 MVAL (UINT8_MAX),
7957#endif
7958#ifdef UINT16_MAX
7959 MVAL (UINT16_MAX),
7960#endif
7961#ifdef UINT32_MAX
7962 MVAL (UINT32_MAX),
7963#endif
7964#ifdef UINT64_MAX
7965 MVAL (UINT64_MAX),
7966#endif
7967 NULL
7968 };
7969
7970int
7971main ()
7972{
7973
7974 const char **mv;
7975 for (mv = macro_values; *mv != NULL; mv++)
7976 {
7977 const char *value = *mv;
7978 /* Test whether it looks like a cast expression. */
7979 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
7980 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
7981 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
7982 || strncmp (value, "((int)"/*)*/, 6) == 0
7983 || strncmp (value, "((signed short)"/*)*/, 15) == 0
7984 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
7985 return mv - macro_values + 1;
7986 }
7987 return 0;
7988
7989 ;
7990 return 0;
7991}
7992_ACEOF
7993if ac_fn_c_try_run "$LINENO"; then :
7994 gl_cv_header_working_stdint_h=yes
7995fi
7996rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7997 conftest.$ac_objext conftest.beam conftest.$ac_ext
7998fi
7999
8000
8001fi
8002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8003
8004fi
8005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
8006$as_echo "$gl_cv_header_working_stdint_h" >&6; }
8007 fi
8008 if test "$gl_cv_header_working_stdint_h" = yes; then
8009 STDINT_H=
8010 else
8011 for ac_header in sys/inttypes.h sys/bitypes.h
8012do :
8013 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8014ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8015eval as_val=\$$as_ac_Header
8016 if test "x$as_val" = x""yes; then :
8017 cat >>confdefs.h <<_ACEOF
8018#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8019_ACEOF
8020
8021fi
8022
8023done
8024
8025 if test $ac_cv_header_sys_inttypes_h = yes; then
8026 HAVE_SYS_INTTYPES_H=1
8027 else
8028 HAVE_SYS_INTTYPES_H=0
8029 fi
8030
8031 if test $ac_cv_header_sys_bitypes_h = yes; then
8032 HAVE_SYS_BITYPES_H=1
8033 else
8034 HAVE_SYS_BITYPES_H=0
8035 fi
8036
8037
8038
8039
8040 if test $APPLE_UNIVERSAL_BUILD = 0; then
8041
8042
8043 for gltype in ptrdiff_t size_t ; do
8044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
8045$as_echo_n "checking for bit size of $gltype... " >&6; }
8046if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
8047 $as_echo_n "(cached) " >&6
8048else
8049 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
8050 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8051 included before <wchar.h>. */
8052 #include <stddef.h>
8053 #include <signal.h>
8054 #if HAVE_WCHAR_H
8055 # include <stdio.h>
8056 # include <time.h>
8057 # include <wchar.h>
8058 #endif
8059
8060#include <limits.h>"; then :
8061
8062else
8063 result=unknown
8064fi
8065
8066 eval gl_cv_bitsizeof_${gltype}=\$result
8067
8068fi
8069eval ac_res=\$gl_cv_bitsizeof_${gltype}
8070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8071$as_echo "$ac_res" >&6; }
8072 eval result=\$gl_cv_bitsizeof_${gltype}
8073 if test $result = unknown; then
8074 result=0
8075 fi
8076 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
8077 cat >>confdefs.h <<_ACEOF
8078#define BITSIZEOF_${GLTYPE} $result
8079_ACEOF
8080
8081 eval BITSIZEOF_${GLTYPE}=\$result
8082 done
8083
8084
8085 fi
8086
8087
8088 for gltype in sig_atomic_t wchar_t wint_t ; do
8089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
8090$as_echo_n "checking for bit size of $gltype... " >&6; }
8091if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
8092 $as_echo_n "(cached) " >&6
8093else
8094 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
8095 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8096 included before <wchar.h>. */
8097 #include <stddef.h>
8098 #include <signal.h>
8099 #if HAVE_WCHAR_H
8100 # include <stdio.h>
8101 # include <time.h>
8102 # include <wchar.h>
8103 #endif
8104
8105#include <limits.h>"; then :
8106
8107else
8108 result=unknown
8109fi
8110
8111 eval gl_cv_bitsizeof_${gltype}=\$result
8112
8113fi
8114eval ac_res=\$gl_cv_bitsizeof_${gltype}
8115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8116$as_echo "$ac_res" >&6; }
8117 eval result=\$gl_cv_bitsizeof_${gltype}
8118 if test $result = unknown; then
8119 result=0
8120 fi
8121 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
8122 cat >>confdefs.h <<_ACEOF
8123#define BITSIZEOF_${GLTYPE} $result
8124_ACEOF
8125
8126 eval BITSIZEOF_${GLTYPE}=\$result
8127 done
8128
8129
8130
8131
8132 for gltype in sig_atomic_t wchar_t wint_t ; do
8133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
8134$as_echo_n "checking whether $gltype is signed... " >&6; }
8135if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
8136 $as_echo_n "(cached) " >&6
8137else
8138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8139/* end confdefs.h. */
8140
8141 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8142 included before <wchar.h>. */
8143 #include <stddef.h>
8144 #include <signal.h>
8145 #if HAVE_WCHAR_H
8146 # include <stdio.h>
8147 # include <time.h>
8148 # include <wchar.h>
8149 #endif
8150
8151 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
8152int
8153main ()
8154{
8155
8156 ;
8157 return 0;
8158}
8159_ACEOF
8160if ac_fn_c_try_compile "$LINENO"; then :
8161 result=yes
8162else
8163 result=no
8164fi
8165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8166 eval gl_cv_type_${gltype}_signed=\$result
8167
8168fi
8169eval ac_res=\$gl_cv_type_${gltype}_signed
8170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8171$as_echo "$ac_res" >&6; }
8172 eval result=\$gl_cv_type_${gltype}_signed
8173 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
8174 if test "$result" = yes; then
8175 cat >>confdefs.h <<_ACEOF
8176#define HAVE_SIGNED_${GLTYPE} 1
8177_ACEOF
8178
8179 eval HAVE_SIGNED_${GLTYPE}=1
8180 else
8181 eval HAVE_SIGNED_${GLTYPE}=0
8182 fi
8183 done
8184
8185
8186 gl_cv_type_ptrdiff_t_signed=yes
8187 gl_cv_type_size_t_signed=no
8188 if test $APPLE_UNIVERSAL_BUILD = 0; then
8189
8190
8191 for gltype in ptrdiff_t size_t ; do
8192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
8193$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
8194if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
8195 $as_echo_n "(cached) " >&6
8196else
8197 eval gl_cv_type_${gltype}_suffix=no
8198 eval result=\$gl_cv_type_${gltype}_signed
8199 if test "$result" = yes; then
8200 glsufu=
8201 else
8202 glsufu=u
8203 fi
8204 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
8205 case $glsuf in
8206 '') gltype1='int';;
8207 l) gltype1='long int';;
8208 ll) gltype1='long long int';;
8209 i64) gltype1='__int64';;
8210 u) gltype1='unsigned int';;
8211 ul) gltype1='unsigned long int';;
8212 ull) gltype1='unsigned long long int';;
8213 ui64)gltype1='unsigned __int64';;
8214 esac
8215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8216/* end confdefs.h. */
8217
8218 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8219 included before <wchar.h>. */
8220 #include <stddef.h>
8221 #include <signal.h>
8222 #if HAVE_WCHAR_H
8223 # include <stdio.h>
8224 # include <time.h>
8225 # include <wchar.h>
8226 #endif
8227
8228 extern $gltype foo;
8229 extern $gltype1 foo;
8230int
8231main ()
8232{
8233
8234 ;
8235 return 0;
8236}
8237_ACEOF
8238if ac_fn_c_try_compile "$LINENO"; then :
8239 eval gl_cv_type_${gltype}_suffix=\$glsuf
8240fi
8241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8242 eval result=\$gl_cv_type_${gltype}_suffix
8243 test "$result" != no && break
8244 done
8245fi
8246eval ac_res=\$gl_cv_type_${gltype}_suffix
8247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8248$as_echo "$ac_res" >&6; }
8249 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
8250 eval result=\$gl_cv_type_${gltype}_suffix
8251 test "$result" = no && result=
8252 eval ${GLTYPE}_SUFFIX=\$result
8253 cat >>confdefs.h <<_ACEOF
8254#define ${GLTYPE}_SUFFIX $result
8255_ACEOF
8256
8257 done
8258
8259
8260 fi
8261
8262
8263 for gltype in sig_atomic_t wchar_t wint_t ; do
8264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
8265$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
8266if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
8267 $as_echo_n "(cached) " >&6
8268else
8269 eval gl_cv_type_${gltype}_suffix=no
8270 eval result=\$gl_cv_type_${gltype}_signed
8271 if test "$result" = yes; then
8272 glsufu=
8273 else
8274 glsufu=u
8275 fi
8276 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
8277 case $glsuf in
8278 '') gltype1='int';;
8279 l) gltype1='long int';;
8280 ll) gltype1='long long int';;
8281 i64) gltype1='__int64';;
8282 u) gltype1='unsigned int';;
8283 ul) gltype1='unsigned long int';;
8284 ull) gltype1='unsigned long long int';;
8285 ui64)gltype1='unsigned __int64';;
8286 esac
8287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8288/* end confdefs.h. */
8289
8290 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8291 included before <wchar.h>. */
8292 #include <stddef.h>
8293 #include <signal.h>
8294 #if HAVE_WCHAR_H
8295 # include <stdio.h>
8296 # include <time.h>
8297 # include <wchar.h>
8298 #endif
8299
8300 extern $gltype foo;
8301 extern $gltype1 foo;
8302int
8303main ()
8304{
8305
8306 ;
8307 return 0;
8308}
8309_ACEOF
8310if ac_fn_c_try_compile "$LINENO"; then :
8311 eval gl_cv_type_${gltype}_suffix=\$glsuf
8312fi
8313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8314 eval result=\$gl_cv_type_${gltype}_suffix
8315 test "$result" != no && break
8316 done
8317fi
8318eval ac_res=\$gl_cv_type_${gltype}_suffix
8319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8320$as_echo "$ac_res" >&6; }
8321 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
8322 eval result=\$gl_cv_type_${gltype}_suffix
8323 test "$result" = no && result=
8324 eval ${GLTYPE}_SUFFIX=\$result
8325 cat >>confdefs.h <<_ACEOF
8326#define ${GLTYPE}_SUFFIX $result
8327_ACEOF
8328
8329 done
8330
8331
8332
8333 if test $BITSIZEOF_WINT_T -lt 32; then
8334 BITSIZEOF_WINT_T=32
8335 fi
8336
8337 STDINT_H=stdint.h
8338 fi
8339
8340 if test -n "$STDINT_H"; then
8341 GL_GENERATE_STDINT_H_TRUE=
8342 GL_GENERATE_STDINT_H_FALSE='#'
8343else
8344 GL_GENERATE_STDINT_H_TRUE='#'
8345 GL_GENERATE_STDINT_H_FALSE=
8346fi
8347
8348
8349
8350
8351
8690e634
JK
8352 GNULIB_IMAXABS=0;
8353 GNULIB_IMAXDIV=0;
8354 GNULIB_STRTOIMAX=0;
8355 GNULIB_STRTOUMAX=0;
8356 HAVE_DECL_IMAXABS=1;
8357 HAVE_DECL_IMAXDIV=1;
8358 HAVE_DECL_STRTOIMAX=1;
8359 HAVE_DECL_STRTOUMAX=1;
8360 REPLACE_STRTOIMAX=0;
8361 INT32_MAX_LT_INTMAX_MAX=1;
8362 INT64_MAX_EQ_LONG_MAX='defined _LP64';
8363 PRI_MACROS_BROKEN=0;
8364 PRIPTR_PREFIX=__PRIPTR_PREFIX;
8365 UINT32_MAX_LT_UINTMAX_MAX=1;
8366 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
8367
8368
8369
8370
8690e634
JK
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8690e634
JK
8382 if test $gl_cv_have_include_next = yes; then
8383 gl_cv_next_inttypes_h='<'inttypes.h'>'
8384 else
8385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
8386$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
8387if test "${gl_cv_next_inttypes_h+set}" = set; then :
8388 $as_echo_n "(cached) " >&6
8389else
8390
8391 if test $ac_cv_header_inttypes_h = yes; then
8392
8393
8394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8395/* end confdefs.h. */
8396#include <inttypes.h>
8397
8398_ACEOF
8399 case "$host_os" in
8400 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8401 *) gl_absname_cpp="$ac_cpp" ;;
8402 esac
8403
8404 case "$host_os" in
8405 mingw*)
8406 gl_dirsep_regex='[/\\]'
8407 ;;
8408 *)
8409 gl_dirsep_regex='\/'
8410 ;;
8411 esac
8412 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
8413
8414 gl_header_literal_regex=`echo 'inttypes.h' \
8415 | sed -e "$gl_make_literal_regex_sed"`
8416 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8417 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8418 s|^/[^/]|//&|
8419 p
8420 q
8421 }'
8422 gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8423 sed -n "$gl_absolute_header_sed"`'"'
8424 else
8425 gl_cv_next_inttypes_h='<'inttypes.h'>'
8426 fi
8427
8428
8429fi
8430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
8431$as_echo "$gl_cv_next_inttypes_h" >&6; }
8432 fi
8433 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
8434
8435 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8436 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8437 gl_next_as_first_directive='<'inttypes.h'>'
8438 else
8439 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8440 gl_next_as_first_directive=$gl_cv_next_inttypes_h
8441 fi
8442 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
8443
8444
8445
8446
8447
8448
8449
8450
8451 for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
8452 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
8453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
8454$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
8455if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
8456 $as_echo_n "(cached) " >&6
8457else
8458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8459/* end confdefs.h. */
8460#include <inttypes.h>
8461
8462int
8463main ()
8464{
8465#undef $gl_func
8466 (void) $gl_func;
8467 ;
8468 return 0;
8469}
8470_ACEOF
8471if ac_fn_c_try_compile "$LINENO"; then :
8472 eval "$as_gl_Symbol=yes"
8473else
8474 eval "$as_gl_Symbol=no"
8475fi
8476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8477fi
8478eval ac_res=\$$as_gl_Symbol
8479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8480$as_echo "$ac_res" >&6; }
8481 eval as_val=\$$as_gl_Symbol
8482 if test "x$as_val" = x""yes; then :
8483 cat >>confdefs.h <<_ACEOF
8484#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
8485_ACEOF
8486
8487 eval ac_cv_have_decl_$gl_func=yes
8488fi
8489 done
8490
8491
8492
8493 for ac_header in inttypes.h
8494do :
8495 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
8496if test "x$ac_cv_header_inttypes_h" = x""yes; then :
8497 cat >>confdefs.h <<_ACEOF
8498#define HAVE_INTTYPES_H 1
8499_ACEOF
8500
8501fi
8502
8503done
8504
8505 if test $ac_cv_header_inttypes_h = yes; then
8506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
8507$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
8508if test "${gt_cv_inttypes_pri_broken+set}" = set; then :
8509 $as_echo_n "(cached) " >&6
8510else
8511
8512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8513/* end confdefs.h. */
8514
8515#include <inttypes.h>
8516#ifdef PRId32
8517char *p = PRId32;
8518#endif
8519
8520int
8521main ()
8522{
8523
8524 ;
8525 return 0;
8526}
8527_ACEOF
8528if ac_fn_c_try_compile "$LINENO"; then :
8529 gt_cv_inttypes_pri_broken=no
8530else
8531 gt_cv_inttypes_pri_broken=yes
8532fi
8533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8534
8535fi
8536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
8537$as_echo "$gt_cv_inttypes_pri_broken" >&6; }
8538 fi
8539 if test "$gt_cv_inttypes_pri_broken" = yes; then
8540
8541cat >>confdefs.h <<_ACEOF
8542#define PRI_MACROS_BROKEN 1
8543_ACEOF
8544
8545 PRI_MACROS_BROKEN=1
8546 else
8547 PRI_MACROS_BROKEN=0
8548 fi
8549
8550
8551
88b48903
WN
8552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
8553$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
8554if test "${gl_cv_cc_double_expbit0+set}" = set; then :
8690e634
JK
8555 $as_echo_n "(cached) " >&6
8556else
88b48903
WN
8557
8558 if test "$cross_compiling" = yes; then :
8559
8560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 8561/* end confdefs.h. */
88b48903
WN
8562
8563#if defined arm || defined __arm || defined __arm__
8564 mixed_endianness
8565#endif
8566
8567_ACEOF
8568if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8569 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
8570 gl_cv_cc_double_expbit0="unknown"
8571else
8572
8573 :
8574if test "${ac_cv_c_bigendian+set}" = set; then :
8575 $as_echo_n "(cached) " >&6
8576else
8577 ac_cv_c_bigendian=unknown
8578 # See if we're dealing with a universal compiler.
8579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8580/* end confdefs.h. */
8581#ifndef __APPLE_CC__
8582 not a universal capable compiler
8583 #endif
8584 typedef int dummy;
8585
8586_ACEOF
8587if ac_fn_c_try_compile "$LINENO"; then :
8588
8589 # Check for potential -arch flags. It is not universal unless
8590 # there are at least two -arch flags with different values.
8591 ac_arch=
8592 ac_prev=
8593 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
8594 if test -n "$ac_prev"; then
8595 case $ac_word in
8596 i?86 | x86_64 | ppc | ppc64)
8597 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
8598 ac_arch=$ac_word
8599 else
8600 ac_cv_c_bigendian=universal
8601 break
8602 fi
8603 ;;
8604 esac
8605 ac_prev=
8606 elif test "x$ac_word" = "x-arch"; then
8607 ac_prev=arch
8608 fi
8609 done
8610fi
8611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8612 if test $ac_cv_c_bigendian = unknown; then
8613 # See if sys/param.h defines the BYTE_ORDER macro.
8614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8615/* end confdefs.h. */
8616#include <sys/types.h>
8617 #include <sys/param.h>
8618
8690e634
JK
8619int
8620main ()
8621{
88b48903
WN
8622#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
8623 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
8624 && LITTLE_ENDIAN)
8625 bogus endian macros
8626 #endif
8627
8690e634
JK
8628 ;
8629 return 0;
8630}
8631_ACEOF
88b48903
WN
8632if ac_fn_c_try_compile "$LINENO"; then :
8633 # It does; now see whether it defined to BIG_ENDIAN or not.
8634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8635/* end confdefs.h. */
8636#include <sys/types.h>
8637 #include <sys/param.h>
8638
8639int
8640main ()
8641{
8642#if BYTE_ORDER != BIG_ENDIAN
8643 not big endian
8644 #endif
8645
8646 ;
8647 return 0;
8648}
8649_ACEOF
8650if ac_fn_c_try_compile "$LINENO"; then :
8651 ac_cv_c_bigendian=yes
8690e634 8652else
88b48903 8653 ac_cv_c_bigendian=no
8690e634 8654fi
88b48903 8655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 8656fi
88b48903
WN
8657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8658 fi
8659 if test $ac_cv_c_bigendian = unknown; then
8660 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
8661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8662/* end confdefs.h. */
8663#include <limits.h>
8690e634 8664
88b48903
WN
8665int
8666main ()
8667{
8668#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
8669 bogus endian macros
8670 #endif
8690e634 8671
88b48903
WN
8672 ;
8673 return 0;
8674}
8675_ACEOF
8676if ac_fn_c_try_compile "$LINENO"; then :
8677 # It does; now see whether it defined to _BIG_ENDIAN or not.
8678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8679/* end confdefs.h. */
8680#include <limits.h>
8690e634 8681
88b48903
WN
8682int
8683main ()
8684{
8685#ifndef _BIG_ENDIAN
8686 not big endian
8687 #endif
8690e634 8688
88b48903
WN
8689 ;
8690 return 0;
8691}
8692_ACEOF
8693if ac_fn_c_try_compile "$LINENO"; then :
8694 ac_cv_c_bigendian=yes
8695else
8696 ac_cv_c_bigendian=no
8697fi
8698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8699fi
8700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8701 fi
8702 if test $ac_cv_c_bigendian = unknown; then
8703 # Compile a test program.
8704 if test "$cross_compiling" = yes; then :
8705 # Try to guess by grepping values from an object file.
8706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8707/* end confdefs.h. */
8708short int ascii_mm[] =
8709 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
8710 short int ascii_ii[] =
8711 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
8712 int use_ascii (int i) {
8713 return ascii_mm[i] + ascii_ii[i];
8714 }
8715 short int ebcdic_ii[] =
8716 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
8717 short int ebcdic_mm[] =
8718 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
8719 int use_ebcdic (int i) {
8720 return ebcdic_mm[i] + ebcdic_ii[i];
8721 }
8722 extern int foo;
8690e634 8723
88b48903
WN
8724int
8725main ()
8726{
8727return use_ascii (foo) == use_ebcdic (foo);
8728 ;
8729 return 0;
8730}
8731_ACEOF
8732if ac_fn_c_try_compile "$LINENO"; then :
8733 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
8734 ac_cv_c_bigendian=yes
8735 fi
8736 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
8737 if test "$ac_cv_c_bigendian" = unknown; then
8738 ac_cv_c_bigendian=no
8739 else
8740 # finding both strings is unlikely to happen, but who knows?
8741 ac_cv_c_bigendian=unknown
8742 fi
8743 fi
8744fi
8745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8746else
8747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8748/* end confdefs.h. */
8749$ac_includes_default
8750int
8751main ()
8752{
8690e634 8753
88b48903
WN
8754 /* Are we little or big endian? From Harbison&Steele. */
8755 union
8756 {
8757 long int l;
8758 char c[sizeof (long int)];
8759 } u;
8760 u.l = 1;
8761 return u.c[sizeof (long int) - 1] == 1;
8690e634 8762
88b48903
WN
8763 ;
8764 return 0;
8765}
8766_ACEOF
8767if ac_fn_c_try_run "$LINENO"; then :
8768 ac_cv_c_bigendian=no
8769else
8770 ac_cv_c_bigendian=yes
8771fi
8772rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8773 conftest.$ac_objext conftest.beam conftest.$ac_ext
8774fi
8690e634 8775
88b48903
WN
8776 fi
8777fi
8778:
8779 case $ac_cv_c_bigendian in #(
8780 yes)
8781 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
8782 no)
8783 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
8784 universal)
8690e634 8785
88b48903 8786$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
8690e634 8787
88b48903
WN
8788 ;; #(
8789 *)
8790 gl_cv_cc_double_expbit0="unknown" ;;
8791 esac
8690e634
JK
8792
8793
88b48903
WN
8794fi
8795rm -f conftest*
8690e634 8796
8690e634 8797
88b48903
WN
8798else
8799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8800/* end confdefs.h. */
8690e634 8801
88b48903
WN
8802#include <float.h>
8803#include <stddef.h>
8804#include <stdio.h>
8805#include <string.h>
8806#define NWORDS \
8807 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
8808typedef union { double value; unsigned int word[NWORDS]; } memory_double;
8809static unsigned int ored_words[NWORDS];
8810static unsigned int anded_words[NWORDS];
8811static void add_to_ored_words (double x)
8812{
8813 memory_double m;
8814 size_t i;
8815 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
8816 memset (&m, 0, sizeof (memory_double));
8817 m.value = x;
8818 for (i = 0; i < NWORDS; i++)
8819 {
8820 ored_words[i] |= m.word[i];
8821 anded_words[i] &= m.word[i];
8822 }
8823}
8824int main ()
8825{
8826 size_t j;
8827 FILE *fp = fopen ("conftest.out", "w");
8828 if (fp == NULL)
8829 return 1;
8830 for (j = 0; j < NWORDS; j++)
8831 anded_words[j] = ~ (unsigned int) 0;
8832 add_to_ored_words (0.25);
8833 add_to_ored_words (0.5);
8834 add_to_ored_words (1.0);
8835 add_to_ored_words (2.0);
8836 add_to_ored_words (4.0);
8837 /* Remove bits that are common (e.g. if representation of the first mantissa
8838 bit is explicit). */
8839 for (j = 0; j < NWORDS; j++)
8840 ored_words[j] &= ~anded_words[j];
8841 /* Now find the nonzero word. */
8842 for (j = 0; j < NWORDS; j++)
8843 if (ored_words[j] != 0)
8844 break;
8845 if (j < NWORDS)
8846 {
8847 size_t i;
8848 for (i = j + 1; i < NWORDS; i++)
8849 if (ored_words[i] != 0)
8850 {
8851 fprintf (fp, "unknown");
8852 return (fclose (fp) != 0);
8853 }
8854 for (i = 0; ; i++)
8855 if ((ored_words[j] >> i) & 1)
8856 {
8857 fprintf (fp, "word %d bit %d", (int) j, (int) i);
8858 return (fclose (fp) != 0);
8859 }
8860 }
8861 fprintf (fp, "unknown");
8862 return (fclose (fp) != 0);
8863}
8690e634 8864
88b48903
WN
8865_ACEOF
8866if ac_fn_c_try_run "$LINENO"; then :
8867 gl_cv_cc_double_expbit0=`cat conftest.out`
8868else
8869 gl_cv_cc_double_expbit0="unknown"
8870fi
8871rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8872 conftest.$ac_objext conftest.beam conftest.$ac_ext
8873fi
8690e634 8874
88b48903 8875 rm -f conftest.out
8690e634 8876
88b48903
WN
8877fi
8878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
8879$as_echo "$gl_cv_cc_double_expbit0" >&6; }
8880 case "$gl_cv_cc_double_expbit0" in
8881 word*bit*)
8882 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
8883 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
8690e634 8884
88b48903
WN
8885cat >>confdefs.h <<_ACEOF
8886#define DBL_EXPBIT0_WORD $word
8887_ACEOF
8690e634
JK
8888
8889
88b48903
WN
8890cat >>confdefs.h <<_ACEOF
8891#define DBL_EXPBIT0_BIT $bit
8892_ACEOF
8690e634 8893
88b48903
WN
8894 ;;
8895 esac
8690e634
JK
8896
8897
88b48903
WN
8898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
8899$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
8900if test "${ac_cv_c_bigendian+set}" = set; then :
8690e634
JK
8901 $as_echo_n "(cached) " >&6
8902else
88b48903
WN
8903 ac_cv_c_bigendian=unknown
8904 # See if we're dealing with a universal compiler.
8905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8906/* end confdefs.h. */
8907#ifndef __APPLE_CC__
8908 not a universal capable compiler
8909 #endif
8910 typedef int dummy;
8911
8912_ACEOF
8913if ac_fn_c_try_compile "$LINENO"; then :
8914
8915 # Check for potential -arch flags. It is not universal unless
8916 # there are at least two -arch flags with different values.
8917 ac_arch=
8918 ac_prev=
8919 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
8920 if test -n "$ac_prev"; then
8921 case $ac_word in
8922 i?86 | x86_64 | ppc | ppc64)
8923 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
8924 ac_arch=$ac_word
8925 else
8926 ac_cv_c_bigendian=universal
8927 break
8928 fi
8929 ;;
8930 esac
8931 ac_prev=
8932 elif test "x$ac_word" = "x-arch"; then
8933 ac_prev=arch
8934 fi
8935 done
8936fi
8937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8938 if test $ac_cv_c_bigendian = unknown; then
8939 # See if sys/param.h defines the BYTE_ORDER macro.
8940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
8941/* end confdefs.h. */
8942#include <sys/types.h>
88b48903
WN
8943 #include <sys/param.h>
8944
8945int
8946main ()
8947{
8948#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
8949 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
8950 && LITTLE_ENDIAN)
8951 bogus endian macros
8952 #endif
8953
8954 ;
8955 return 0;
8956}
8957_ACEOF
8958if ac_fn_c_try_compile "$LINENO"; then :
8959 # It does; now see whether it defined to BIG_ENDIAN or not.
8960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8961/* end confdefs.h. */
8962#include <sys/types.h>
8963 #include <sys/param.h>
8964
8965int
8966main ()
8967{
8968#if BYTE_ORDER != BIG_ENDIAN
8969 not big endian
8970 #endif
8971
8972 ;
8973 return 0;
8974}
8975_ACEOF
8976if ac_fn_c_try_compile "$LINENO"; then :
8977 ac_cv_c_bigendian=yes
8978else
8979 ac_cv_c_bigendian=no
8980fi
8981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8982fi
8983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8984 fi
8985 if test $ac_cv_c_bigendian = unknown; then
8986 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
8987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8988/* end confdefs.h. */
8989#include <limits.h>
8990
8991int
8992main ()
8993{
8994#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
8995 bogus endian macros
8996 #endif
8997
8998 ;
8999 return 0;
9000}
9001_ACEOF
9002if ac_fn_c_try_compile "$LINENO"; then :
9003 # It does; now see whether it defined to _BIG_ENDIAN or not.
9004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9005/* end confdefs.h. */
9006#include <limits.h>
9007
9008int
9009main ()
9010{
9011#ifndef _BIG_ENDIAN
9012 not big endian
9013 #endif
9014
9015 ;
9016 return 0;
9017}
9018_ACEOF
9019if ac_fn_c_try_compile "$LINENO"; then :
9020 ac_cv_c_bigendian=yes
9021else
9022 ac_cv_c_bigendian=no
9023fi
9024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9025fi
9026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9027 fi
9028 if test $ac_cv_c_bigendian = unknown; then
9029 # Compile a test program.
9030 if test "$cross_compiling" = yes; then :
9031 # Try to guess by grepping values from an object file.
9032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9033/* end confdefs.h. */
9034short int ascii_mm[] =
9035 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9036 short int ascii_ii[] =
9037 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9038 int use_ascii (int i) {
9039 return ascii_mm[i] + ascii_ii[i];
9040 }
9041 short int ebcdic_ii[] =
9042 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9043 short int ebcdic_mm[] =
9044 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9045 int use_ebcdic (int i) {
9046 return ebcdic_mm[i] + ebcdic_ii[i];
9047 }
9048 extern int foo;
9049
9050int
9051main ()
9052{
9053return use_ascii (foo) == use_ebcdic (foo);
9054 ;
9055 return 0;
9056}
9057_ACEOF
9058if ac_fn_c_try_compile "$LINENO"; then :
9059 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9060 ac_cv_c_bigendian=yes
9061 fi
9062 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9063 if test "$ac_cv_c_bigendian" = unknown; then
9064 ac_cv_c_bigendian=no
9065 else
9066 # finding both strings is unlikely to happen, but who knows?
9067 ac_cv_c_bigendian=unknown
9068 fi
9069 fi
9070fi
9071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9072else
9073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9074/* end confdefs.h. */
9075$ac_includes_default
9076int
9077main ()
9078{
9079
9080 /* Are we little or big endian? From Harbison&Steele. */
9081 union
9082 {
9083 long int l;
9084 char c[sizeof (long int)];
9085 } u;
9086 u.l = 1;
9087 return u.c[sizeof (long int) - 1] == 1;
9088
9089 ;
9090 return 0;
9091}
9092_ACEOF
9093if ac_fn_c_try_run "$LINENO"; then :
9094 ac_cv_c_bigendian=no
9095else
9096 ac_cv_c_bigendian=yes
9097fi
9098rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9099 conftest.$ac_objext conftest.beam conftest.$ac_ext
9100fi
9101
9102 fi
9103fi
9104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9105$as_echo "$ac_cv_c_bigendian" >&6; }
9106 case $ac_cv_c_bigendian in #(
9107 yes)
9108 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
9109;; #(
9110 no)
9111 ;; #(
9112 universal)
9113
9114$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9115
9116 ;; #(
9117 *)
9118 as_fn_error "unknown endianness
9119 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9120 esac
9121
9122
9123
2196f55f
YQ
9124
9125 case "$host_os" in
9126 mingw*)
9127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
9128$as_echo_n "checking for 64-bit off_t... " >&6; }
9129if test "${gl_cv_type_off_t_64+set}" = set; then :
9130 $as_echo_n "(cached) " >&6
9131else
9132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9133/* end confdefs.h. */
9134#include <sys/types.h>
9135 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
9136
9137int
9138main ()
9139{
9140
9141 ;
9142 return 0;
9143}
9144_ACEOF
9145if ac_fn_c_try_compile "$LINENO"; then :
9146 gl_cv_type_off_t_64=yes
9147else
9148 gl_cv_type_off_t_64=no
9149fi
9150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9151
9152fi
9153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
9154$as_echo "$gl_cv_type_off_t_64" >&6; }
9155 if test $gl_cv_type_off_t_64 = no; then
9156 WINDOWS_64_BIT_OFF_T=1
9157 else
9158 WINDOWS_64_BIT_OFF_T=0
9159 fi
9160 WINDOWS_64_BIT_ST_SIZE=1
9161 ;;
9162 *)
9163 WINDOWS_64_BIT_OFF_T=0
9164 WINDOWS_64_BIT_ST_SIZE=0
9165 ;;
9166 esac
9167
9168
88b48903
WN
9169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
9170$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
9171if test "${am_cv_langinfo_codeset+set}" = set; then :
9172 $as_echo_n "(cached) " >&6
9173else
9174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9175/* end confdefs.h. */
9176#include <langinfo.h>
9177int
9178main ()
9179{
9180char* cs = nl_langinfo(CODESET); return !cs;
9181 ;
9182 return 0;
9183}
9184_ACEOF
9185if ac_fn_c_try_link "$LINENO"; then :
9186 am_cv_langinfo_codeset=yes
9187else
9188 am_cv_langinfo_codeset=no
9189fi
9190rm -f core conftest.err conftest.$ac_objext \
9191 conftest$ac_exeext conftest.$ac_ext
9192
9193fi
9194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
9195$as_echo "$am_cv_langinfo_codeset" >&6; }
9196 if test $am_cv_langinfo_codeset = yes; then
9197
9198$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
9199
9200 fi
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
88b48903
WN
9211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
9212$as_echo_n "checking for working fcntl.h... " >&6; }
9213if test "${gl_cv_header_working_fcntl_h+set}" = set; then :
9214 $as_echo_n "(cached) " >&6
9215else
9216 if test "$cross_compiling" = yes; then :
9217 gl_cv_header_working_fcntl_h=cross-compiling
9218else
9219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9220/* end confdefs.h. */
9221#include <sys/types.h>
9222 #include <sys/stat.h>
9223 #if HAVE_UNISTD_H
9224 # include <unistd.h>
9225 #else /* on Windows with MSVC */
9226 # include <io.h>
9227 # include <stdlib.h>
8690e634
JK
9228 # defined sleep(n) _sleep ((n) * 1000)
9229 #endif
9230 #include <fcntl.h>
9231 #ifndef O_NOATIME
9232 #define O_NOATIME 0
9233 #endif
9234 #ifndef O_NOFOLLOW
9235 #define O_NOFOLLOW 0
9236 #endif
9237 static int const constants[] =
9238 {
9239 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
9240 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
9241 };
9242
9243int
9244main ()
9245{
9246
9247 int result = !constants;
9248 #if HAVE_SYMLINK
9249 {
9250 static char const sym[] = "conftest.sym";
a512b375
JB
9251 if (symlink ("/dev/null", sym) != 0)
9252 result |= 2;
9253 else
9254 {
9255 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
9256 if (fd >= 0)
9257 {
9258 close (fd);
9259 result |= 4;
9260 }
9261 }
9262 if (unlink (sym) != 0 || symlink (".", sym) != 0)
8690e634
JK
9263 result |= 2;
9264 else
9265 {
9266 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
9267 if (fd >= 0)
9268 {
9269 close (fd);
9270 result |= 4;
9271 }
9272 }
9273 unlink (sym);
9274 }
9275 #endif
9276 {
9277 static char const file[] = "confdefs.h";
9278 int fd = open (file, O_RDONLY | O_NOATIME);
9279 if (fd < 0)
9280 result |= 8;
9281 else
9282 {
9283 struct stat st0;
9284 if (fstat (fd, &st0) != 0)
9285 result |= 16;
9286 else
9287 {
9288 char c;
9289 sleep (1);
9290 if (read (fd, &c, 1) != 1)
9291 result |= 24;
9292 else
9293 {
9294 if (close (fd) != 0)
9295 result |= 32;
9296 else
9297 {
9298 struct stat st1;
9299 if (stat (file, &st1) != 0)
9300 result |= 40;
9301 else
9302 if (st0.st_atime != st1.st_atime)
9303 result |= 64;
9304 }
9305 }
9306 }
9307 }
9308 }
9309 return result;
9310 ;
9311 return 0;
9312}
9313_ACEOF
9314if ac_fn_c_try_run "$LINENO"; then :
9315 gl_cv_header_working_fcntl_h=yes
9316else
9317 case $? in #(
9318 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
9319 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
9320 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
9321 *) gl_cv_header_working_fcntl_h='no';;
9322 esac
9323fi
9324rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9325 conftest.$ac_objext conftest.beam conftest.$ac_ext
9326fi
9327
9328fi
9329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
9330$as_echo "$gl_cv_header_working_fcntl_h" >&6; }
9331
9332 case $gl_cv_header_working_fcntl_h in #(
9333 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
9334 *) ac_val=1;;
9335 esac
9336
9337cat >>confdefs.h <<_ACEOF
9338#define HAVE_WORKING_O_NOATIME $ac_val
9339_ACEOF
9340
9341
9342 case $gl_cv_header_working_fcntl_h in #(
9343 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
9344 *) ac_val=1;;
9345 esac
9346
9347cat >>confdefs.h <<_ACEOF
9348#define HAVE_WORKING_O_NOFOLLOW $ac_val
9349_ACEOF
9350
9351
3574124b 9352ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
8690e634
JK
9353if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then :
9354 ac_have_decl=1
9355else
9356 ac_have_decl=0
9357fi
9358
9359cat >>confdefs.h <<_ACEOF
9360#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
9361_ACEOF
9362
9363
8690e634
JK
9364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
9365$as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
9366if test "${ac_cv_gnu_library_2_1+set}" = set; then :
9367 $as_echo_n "(cached) " >&6
9368else
9369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9370/* end confdefs.h. */
9371
9372#include <features.h>
9373#ifdef __GNU_LIBRARY__
9374 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
9375 Lucky GNU user
9376 #endif
9377#endif
9378#ifdef __UCLIBC__
9379 Lucky user
9380#endif
9381
9382_ACEOF
9383if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9384 $EGREP "Lucky" >/dev/null 2>&1; then :
9385 ac_cv_gnu_library_2_1=yes
9386else
9387 ac_cv_gnu_library_2_1=no
9388fi
9389rm -f conftest*
9390
9391
9392
9393fi
9394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
9395$as_echo "$ac_cv_gnu_library_2_1" >&6; }
9396
9397 GLIBC21="$ac_cv_gnu_library_2_1"
9398
9399
9400
f45c62c4
YQ
9401 GNULIB_FCHMODAT=0;
9402 GNULIB_FSTAT=0;
9403 GNULIB_FSTATAT=0;
9404 GNULIB_FUTIMENS=0;
9405 GNULIB_LCHMOD=0;
9406 GNULIB_LSTAT=0;
9407 GNULIB_MKDIRAT=0;
9408 GNULIB_MKFIFO=0;
9409 GNULIB_MKFIFOAT=0;
9410 GNULIB_MKNOD=0;
9411 GNULIB_MKNODAT=0;
9412 GNULIB_STAT=0;
9413 GNULIB_UTIMENSAT=0;
9414 HAVE_FCHMODAT=1;
9415 HAVE_FSTATAT=1;
9416 HAVE_FUTIMENS=1;
9417 HAVE_LCHMOD=1;
9418 HAVE_LSTAT=1;
9419 HAVE_MKDIRAT=1;
9420 HAVE_MKFIFO=1;
9421 HAVE_MKFIFOAT=1;
9422 HAVE_MKNOD=1;
9423 HAVE_MKNODAT=1;
9424 HAVE_UTIMENSAT=1;
9425 REPLACE_FSTAT=0;
9426 REPLACE_FSTATAT=0;
9427 REPLACE_FUTIMENS=0;
9428 REPLACE_LSTAT=0;
9429 REPLACE_MKDIR=0;
9430 REPLACE_MKFIFO=0;
9431 REPLACE_MKNOD=0;
9432 REPLACE_STAT=0;
9433 REPLACE_UTIMENSAT=0;
9434
9435
9436
9437
9438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
9439$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
9440if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
9441 $as_echo_n "(cached) " >&6
9442else
9443 rm -f conftest.sym conftest.file
9444 echo >conftest.file
9445 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
9446 if test "$cross_compiling" = yes; then :
9447 case "$host_os" in
9448 # Guess yes on glibc systems.
9449 *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
9450 # If we don't know, assume the worst.
9451 *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
9452 esac
9453
9454else
9455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9456/* end confdefs.h. */
9457$ac_includes_default
9458int
9459main ()
9460{
9461struct stat sbuf;
9462 /* Linux will dereference the symlink and fail, as required by
9463 POSIX. That is better in the sense that it means we will not
9464 have to compile and use the lstat wrapper. */
9465 return lstat ("conftest.sym/", &sbuf) == 0;
9466
9467 ;
9468 return 0;
9469}
9470_ACEOF
9471if ac_fn_c_try_run "$LINENO"; then :
9472 gl_cv_func_lstat_dereferences_slashed_symlink=yes
9473else
9474 gl_cv_func_lstat_dereferences_slashed_symlink=no
9475fi
9476rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9477 conftest.$ac_objext conftest.beam conftest.$ac_ext
9478fi
9479
9480 else
9481 # If the 'ln -s' command failed, then we probably don't even
9482 # have an lstat function.
9483 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
9484 fi
9485 rm -f conftest.sym conftest.file
9486
9487fi
9488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
9489$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
9490 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
9491 *yes)
9492
9493cat >>confdefs.h <<_ACEOF
9494#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
9495_ACEOF
9496
9497 ;;
9498 esac
9499
9500
6a29c58e
YQ
9501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
9502$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
9503if test "${gl_cv_func_malloc_posix+set}" = set; then :
9504 $as_echo_n "(cached) " >&6
9505else
9506
9507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9508/* end confdefs.h. */
9509
9510int
9511main ()
9512{
9513#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
9514 choke me
9515 #endif
9516
9517 ;
9518 return 0;
9519}
9520_ACEOF
9521if ac_fn_c_try_compile "$LINENO"; then :
9522 gl_cv_func_malloc_posix=yes
9523else
9524 gl_cv_func_malloc_posix=no
9525fi
9526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9527
9528fi
9529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
9530$as_echo "$gl_cv_func_malloc_posix" >&6; }
9531
9532
9533
9534 for ac_header in stdlib.h
98399780
YQ
9535do :
9536 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
9537if test "x$ac_cv_header_stdlib_h" = x""yes; then :
9538 cat >>confdefs.h <<_ACEOF
9539#define HAVE_STDLIB_H 1
9540_ACEOF
9541
9542fi
9543
9544done
9545
6a29c58e 9546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
98399780
YQ
9547$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
9548if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then :
9549 $as_echo_n "(cached) " >&6
9550else
9551 if test "$cross_compiling" = yes; then :
6a29c58e
YQ
9552 case "$host_os" in
9553 # Guess yes on platforms where we know the result.
9554 *-gnu* | freebsd* | netbsd* | openbsd* \
9555 | hpux* | solaris* | cygwin* | mingw*)
9556 ac_cv_func_malloc_0_nonnull=yes ;;
9557 # If we don't know, assume the worst.
9558 *) ac_cv_func_malloc_0_nonnull=no ;;
9559 esac
9560
98399780
YQ
9561else
9562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9563/* end confdefs.h. */
9564#if defined STDC_HEADERS || defined HAVE_STDLIB_H
6a29c58e
YQ
9565 # include <stdlib.h>
9566 #else
9567 char *malloc ();
9568 #endif
98399780
YQ
9569
9570int
9571main ()
9572{
9573return ! malloc (0);
9574 ;
9575 return 0;
9576}
6a29c58e 9577
98399780
YQ
9578_ACEOF
9579if ac_fn_c_try_run "$LINENO"; then :
9580 ac_cv_func_malloc_0_nonnull=yes
9581else
9582 ac_cv_func_malloc_0_nonnull=no
9583fi
9584rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9585 conftest.$ac_objext conftest.beam conftest.$ac_ext
9586fi
9587
6a29c58e 9588
98399780
YQ
9589fi
9590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
9591$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
6a29c58e 9592 if test $ac_cv_func_malloc_0_nonnull = yes; then :
98399780
YQ
9593 gl_cv_func_malloc_0_nonnull=1
9594else
9595 gl_cv_func_malloc_0_nonnull=0
9596fi
9597
9598
9599cat >>confdefs.h <<_ACEOF
9600#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
9601_ACEOF
9602
9603
9604
88b48903
WN
9605
9606
8690e634
JK
9607 GNULIB_BTOWC=0;
9608 GNULIB_WCTOB=0;
9609 GNULIB_MBSINIT=0;
9610 GNULIB_MBRTOWC=0;
9611 GNULIB_MBRLEN=0;
9612 GNULIB_MBSRTOWCS=0;
9613 GNULIB_MBSNRTOWCS=0;
9614 GNULIB_WCRTOMB=0;
9615 GNULIB_WCSRTOMBS=0;
9616 GNULIB_WCSNRTOMBS=0;
9617 GNULIB_WCWIDTH=0;
9618 GNULIB_WMEMCHR=0;
9619 GNULIB_WMEMCMP=0;
9620 GNULIB_WMEMCPY=0;
9621 GNULIB_WMEMMOVE=0;
9622 GNULIB_WMEMSET=0;
9623 GNULIB_WCSLEN=0;
9624 GNULIB_WCSNLEN=0;
9625 GNULIB_WCSCPY=0;
9626 GNULIB_WCPCPY=0;
9627 GNULIB_WCSNCPY=0;
9628 GNULIB_WCPNCPY=0;
9629 GNULIB_WCSCAT=0;
9630 GNULIB_WCSNCAT=0;
9631 GNULIB_WCSCMP=0;
9632 GNULIB_WCSNCMP=0;
9633 GNULIB_WCSCASECMP=0;
9634 GNULIB_WCSNCASECMP=0;
9635 GNULIB_WCSCOLL=0;
9636 GNULIB_WCSXFRM=0;
9637 GNULIB_WCSDUP=0;
9638 GNULIB_WCSCHR=0;
9639 GNULIB_WCSRCHR=0;
9640 GNULIB_WCSCSPN=0;
9641 GNULIB_WCSSPN=0;
9642 GNULIB_WCSPBRK=0;
9643 GNULIB_WCSSTR=0;
9644 GNULIB_WCSTOK=0;
9645 GNULIB_WCSWIDTH=0;
9646 HAVE_BTOWC=1;
9647 HAVE_MBSINIT=1;
9648 HAVE_MBRTOWC=1;
9649 HAVE_MBRLEN=1;
9650 HAVE_MBSRTOWCS=1;
9651 HAVE_MBSNRTOWCS=1;
9652 HAVE_WCRTOMB=1;
9653 HAVE_WCSRTOMBS=1;
9654 HAVE_WCSNRTOMBS=1;
9655 HAVE_WMEMCHR=1;
9656 HAVE_WMEMCMP=1;
9657 HAVE_WMEMCPY=1;
9658 HAVE_WMEMMOVE=1;
9659 HAVE_WMEMSET=1;
9660 HAVE_WCSLEN=1;
9661 HAVE_WCSNLEN=1;
9662 HAVE_WCSCPY=1;
9663 HAVE_WCPCPY=1;
9664 HAVE_WCSNCPY=1;
9665 HAVE_WCPNCPY=1;
9666 HAVE_WCSCAT=1;
9667 HAVE_WCSNCAT=1;
9668 HAVE_WCSCMP=1;
9669 HAVE_WCSNCMP=1;
9670 HAVE_WCSCASECMP=1;
9671 HAVE_WCSNCASECMP=1;
9672 HAVE_WCSCOLL=1;
9673 HAVE_WCSXFRM=1;
9674 HAVE_WCSDUP=1;
9675 HAVE_WCSCHR=1;
9676 HAVE_WCSRCHR=1;
9677 HAVE_WCSCSPN=1;
9678 HAVE_WCSSPN=1;
9679 HAVE_WCSPBRK=1;
9680 HAVE_WCSSTR=1;
9681 HAVE_WCSTOK=1;
9682 HAVE_WCSWIDTH=1;
9683 HAVE_DECL_WCTOB=1;
9684 HAVE_DECL_WCWIDTH=1;
9685 REPLACE_MBSTATE_T=0;
9686 REPLACE_BTOWC=0;
9687 REPLACE_WCTOB=0;
9688 REPLACE_MBSINIT=0;
9689 REPLACE_MBRTOWC=0;
9690 REPLACE_MBRLEN=0;
9691 REPLACE_MBSRTOWCS=0;
9692 REPLACE_MBSNRTOWCS=0;
9693 REPLACE_WCRTOMB=0;
9694 REPLACE_WCSRTOMBS=0;
9695 REPLACE_WCSNRTOMBS=0;
9696 REPLACE_WCWIDTH=0;
9697 REPLACE_WCSWIDTH=0;
9698
9699
9700
9701
9702
9703
9704
9705
8690e634
JK
9706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
9707$as_echo_n "checking for a traditional japanese locale... " >&6; }
9708if test "${gt_cv_locale_ja+set}" = set; then :
9709 $as_echo_n "(cached) " >&6
9710else
9711
9712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9713/* end confdefs.h. */
9714
9715#include <locale.h>
9716#include <time.h>
9717#if HAVE_LANGINFO_CODESET
9718# include <langinfo.h>
9719#endif
9720#include <stdlib.h>
9721#include <string.h>
9722struct tm t;
9723char buf[16];
9724int main ()
9725{
9726 const char *p;
9727 /* Check whether the given locale name is recognized by the system. */
9728#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
9729 /* On native Windows, setlocale(category, "") looks at the system settings,
9730 not at the environment variables. Also, when an encoding suffix such
9731 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
9732 category of the locale to "C". */
9733 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
9734 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
9735 return 1;
9736#else
9737 if (setlocale (LC_ALL, "") == NULL) return 1;
9738#endif
9739 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
9740 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
9741 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
9742 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
9743 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
9744 some unit tests fail.
9745 On MirBSD 10, when an unsupported locale is specified, setlocale()
9746 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
9747#if HAVE_LANGINFO_CODESET
9748 {
9749 const char *cs = nl_langinfo (CODESET);
9750 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
9751 || strcmp (cs, "UTF-8") == 0)
9752 return 1;
9753 }
9754#endif
9755#ifdef __CYGWIN__
9756 /* On Cygwin, avoid locale names without encoding suffix, because the
9757 locale_charset() function relies on the encoding suffix. Note that
9758 LC_ALL is set on the command line. */
9759 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
9760#endif
9761 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
9762 on Cygwin 1.5.x. */
9763 if (MB_CUR_MAX == 1)
9764 return 1;
9765 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
9766 This excludes the UTF-8 encoding (except on MirBSD). */
9767 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
9768 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
9769 for (p = buf; *p != '\0'; p++)
9770 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
9771 return 1;
9772 return 0;
9773}
9774
9775_ACEOF
9776 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
9777 (eval $ac_link) 2>&5
9778 ac_status=$?
9779 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9780 test $ac_status = 0; } && test -s conftest$ac_exeext; then
9781 case "$host_os" in
9782 # Handle native Windows specially, because there setlocale() interprets
9783 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
9784 # "fr" or "fra" as "French" or "French_France.1252",
9785 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
9786 # "ja" as "Japanese" or "Japanese_Japan.932",
9787 # and similar.
9788 mingw*)
9789 # Note that on native Windows, the Japanese locale is
9790 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
9791 # cannot use it here.
9792 gt_cv_locale_ja=none
9793 ;;
9794 *)
9795 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
9796 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
9797 # configure script would override the LC_ALL setting. Likewise for
9798 # LC_CTYPE, which is also set at the beginning of the configure script.
9799 # Test for the AIX locale name.
9800 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9801 gt_cv_locale_ja=ja_JP
9802 else
9803 # Test for the locale name with explicit encoding suffix.
9804 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9805 gt_cv_locale_ja=ja_JP.EUC-JP
9806 else
9807 # Test for the HP-UX, OSF/1, NetBSD locale name.
9808 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9809 gt_cv_locale_ja=ja_JP.eucJP
9810 else
9811 # Test for the IRIX, FreeBSD locale name.
9812 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9813 gt_cv_locale_ja=ja_JP.EUC
9814 else
9815 # Test for the Solaris 7 locale name.
9816 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9817 gt_cv_locale_ja=ja
9818 else
9819 # Special test for NetBSD 1.6.
9820 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
9821 gt_cv_locale_ja=ja_JP.eucJP
9822 else
9823 # None found.
9824 gt_cv_locale_ja=none
9825 fi
9826 fi
9827 fi
9828 fi
9829 fi
9830 fi
9831 ;;
9832 esac
9833 fi
9834 rm -fr conftest*
9835
9836fi
9837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
9838$as_echo "$gt_cv_locale_ja" >&6; }
9839 LOCALE_JA=$gt_cv_locale_ja
9840
9841
9842
9843
9844
9845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
9846$as_echo_n "checking for a transitional chinese locale... " >&6; }
9847if test "${gt_cv_locale_zh_CN+set}" = set; then :
9848 $as_echo_n "(cached) " >&6
9849else
9850
9851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9852/* end confdefs.h. */
9853
9854#include <locale.h>
9855#include <stdlib.h>
9856#include <time.h>
9857#if HAVE_LANGINFO_CODESET
9858# include <langinfo.h>
9859#endif
9860#include <stdlib.h>
9861#include <string.h>
9862struct tm t;
9863char buf[16];
9864int main ()
9865{
9866 const char *p;
9867 /* Check whether the given locale name is recognized by the system. */
9868#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
9869 /* On native Windows, setlocale(category, "") looks at the system settings,
9870 not at the environment variables. Also, when an encoding suffix such
9871 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
9872 category of the locale to "C". */
9873 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
9874 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
9875 return 1;
9876#else
9877 if (setlocale (LC_ALL, "") == NULL) return 1;
9878#endif
9879 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
9880 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
9881 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
9882 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
9883 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
9884 some unit tests fail.
9885 On MirBSD 10, when an unsupported locale is specified, setlocale()
9886 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
9887#if HAVE_LANGINFO_CODESET
9888 {
9889 const char *cs = nl_langinfo (CODESET);
9890 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
9891 || strcmp (cs, "UTF-8") == 0)
9892 return 1;
9893 }
9894#endif
9895#ifdef __CYGWIN__
9896 /* On Cygwin, avoid locale names without encoding suffix, because the
9897 locale_charset() function relies on the encoding suffix. Note that
9898 LC_ALL is set on the command line. */
9899 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
9900#endif
9901 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
9902 This excludes the UTF-8 encoding (except on MirBSD). */
9903 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
9904 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
9905 for (p = buf; *p != '\0'; p++)
9906 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
9907 return 1;
9908 /* Check whether a typical GB18030 multibyte sequence is recognized as a
9909 single wide character. This excludes the GB2312 and GBK encodings. */
9910 if (mblen ("\203\062\332\066", 5) != 4)
9911 return 1;
9912 return 0;
9913}
9914
9915_ACEOF
9916 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
9917 (eval $ac_link) 2>&5
9918 ac_status=$?
9919 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9920 test $ac_status = 0; } && test -s conftest$ac_exeext; then
9921 case "$host_os" in
9922 # Handle native Windows specially, because there setlocale() interprets
9923 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
9924 # "fr" or "fra" as "French" or "French_France.1252",
9925 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
9926 # "ja" as "Japanese" or "Japanese_Japan.932",
9927 # and similar.
9928 mingw*)
9929 # Test for the hypothetical native Windows locale name.
9930 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9931 gt_cv_locale_zh_CN=Chinese_China.54936
9932 else
9933 # None found.
9934 gt_cv_locale_zh_CN=none
9935 fi
9936 ;;
9937 solaris2.8)
9938 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
9939 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
9940 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
9941 gt_cv_locale_zh_CN=none
9942 ;;
9943 *)
9944 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
9945 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
9946 # configure script would override the LC_ALL setting. Likewise for
9947 # LC_CTYPE, which is also set at the beginning of the configure script.
9948 # Test for the locale name without encoding suffix.
9949 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9950 gt_cv_locale_zh_CN=zh_CN
9951 else
9952 # Test for the locale name with explicit encoding suffix.
9953 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9954 gt_cv_locale_zh_CN=zh_CN.GB18030
9955 else
9956 # None found.
9957 gt_cv_locale_zh_CN=none
9958 fi
9959 fi
9960 ;;
9961 esac
9962 else
9963 # If there was a link error, due to mblen(), the system is so old that
9964 # it certainly doesn't have a chinese locale.
9965 gt_cv_locale_zh_CN=none
9966 fi
9967 rm -fr conftest*
9968
9969fi
9970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
9971$as_echo "$gt_cv_locale_zh_CN" >&6; }
9972 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
9973
9974
9975
9976
9977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
9978$as_echo_n "checking for a french Unicode locale... " >&6; }
9979if test "${gt_cv_locale_fr_utf8+set}" = set; then :
9980 $as_echo_n "(cached) " >&6
9981else
9982
9983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9984/* end confdefs.h. */
9985
9986#include <locale.h>
9987#include <time.h>
9988#if HAVE_LANGINFO_CODESET
9989# include <langinfo.h>
9990#endif
9991#include <stdlib.h>
9992#include <string.h>
9993struct tm t;
9994char buf[16];
9995int main () {
9996 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
9997 imitates locale dependent behaviour by looking at the environment
9998 variables, and all locales use the UTF-8 encoding. */
9999#if !(defined __BEOS__ || defined __HAIKU__)
10000 /* Check whether the given locale name is recognized by the system. */
10001# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
10002 /* On native Windows, setlocale(category, "") looks at the system settings,
10003 not at the environment variables. Also, when an encoding suffix such
10004 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
10005 category of the locale to "C". */
10006 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
10007 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
10008 return 1;
10009# else
10010 if (setlocale (LC_ALL, "") == NULL) return 1;
10011# endif
10012 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
10013 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
10014 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
10015 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
10016 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
10017 some unit tests fail. */
10018# if HAVE_LANGINFO_CODESET
10019 {
10020 const char *cs = nl_langinfo (CODESET);
10021 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
10022 return 1;
10023 }
10024# endif
10025# ifdef __CYGWIN__
10026 /* On Cygwin, avoid locale names without encoding suffix, because the
10027 locale_charset() function relies on the encoding suffix. Note that
10028 LC_ALL is set on the command line. */
10029 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
10030# endif
10031 /* Check whether in the abbreviation of the second month, the second
10032 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
10033 two bytes long, with UTF-8 encoding. */
10034 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
10035 if (strftime (buf, sizeof (buf), "%b", &t) < 4
10036 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
10037 return 1;
10038#endif
10039#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
10040 /* Check whether the decimal separator is a comma.
10041 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
10042 are nl_langinfo(RADIXCHAR) are both ".". */
10043 if (localeconv () ->decimal_point[0] != ',') return 1;
10044#endif
10045 return 0;
10046}
10047
10048_ACEOF
10049 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10050 (eval $ac_link) 2>&5
10051 ac_status=$?
10052 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10053 test $ac_status = 0; } && test -s conftest$ac_exeext; then
10054 case "$host_os" in
10055 # Handle native Windows specially, because there setlocale() interprets
10056 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
10057 # "fr" or "fra" as "French" or "French_France.1252",
10058 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
10059 # "ja" as "Japanese" or "Japanese_Japan.932",
10060 # and similar.
10061 mingw*)
10062 # Test for the hypothetical native Windows locale name.
10063 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10064 gt_cv_locale_fr_utf8=French_France.65001
10065 else
10066 # None found.
10067 gt_cv_locale_fr_utf8=none
10068 fi
10069 ;;
10070 *)
10071 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
10072 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
10073 # configure script would override the LC_ALL setting. Likewise for
10074 # LC_CTYPE, which is also set at the beginning of the configure script.
10075 # Test for the usual locale name.
10076 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10077 gt_cv_locale_fr_utf8=fr_FR
10078 else
10079 # Test for the locale name with explicit encoding suffix.
10080 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10081 gt_cv_locale_fr_utf8=fr_FR.UTF-8
10082 else
10083 # Test for the Solaris 7 locale name.
10084 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10085 gt_cv_locale_fr_utf8=fr.UTF-8
10086 else
10087 # None found.
10088 gt_cv_locale_fr_utf8=none
10089 fi
10090 fi
10091 fi
10092 ;;
10093 esac
10094 fi
10095 rm -fr conftest*
10096
10097fi
10098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
10099$as_echo "$gt_cv_locale_fr_utf8" >&6; }
10100 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
10101
10102
10103
10104
10105
10106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
10107$as_echo_n "checking for a traditional french locale... " >&6; }
10108if test "${gt_cv_locale_fr+set}" = set; then :
10109 $as_echo_n "(cached) " >&6
10110else
10111
10112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10113/* end confdefs.h. */
10114
10115#include <locale.h>
10116#include <time.h>
10117#if HAVE_LANGINFO_CODESET
10118# include <langinfo.h>
10119#endif
10120#include <stdlib.h>
10121#include <string.h>
10122struct tm t;
10123char buf[16];
10124int main () {
10125 /* Check whether the given locale name is recognized by the system. */
10126#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
10127 /* On native Windows, setlocale(category, "") looks at the system settings,
10128 not at the environment variables. Also, when an encoding suffix such
10129 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
10130 category of the locale to "C". */
10131 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
10132 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
10133 return 1;
10134#else
10135 if (setlocale (LC_ALL, "") == NULL) return 1;
10136#endif
10137 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
10138 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
10139 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
10140 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
10141 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
10142 some unit tests fail.
10143 On MirBSD 10, when an unsupported locale is specified, setlocale()
10144 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
10145#if HAVE_LANGINFO_CODESET
10146 {
10147 const char *cs = nl_langinfo (CODESET);
10148 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
10149 || strcmp (cs, "UTF-8") == 0)
10150 return 1;
10151 }
10152#endif
10153#ifdef __CYGWIN__
10154 /* On Cygwin, avoid locale names without encoding suffix, because the
10155 locale_charset() function relies on the encoding suffix. Note that
10156 LC_ALL is set on the command line. */
10157 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
10158#endif
10159 /* Check whether in the abbreviation of the second month, the second
10160 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
10161 one byte long. This excludes the UTF-8 encoding. */
10162 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
10163 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
10164#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
10165 /* Check whether the decimal separator is a comma.
10166 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
10167 are nl_langinfo(RADIXCHAR) are both ".". */
10168 if (localeconv () ->decimal_point[0] != ',') return 1;
10169#endif
10170 return 0;
10171}
10172
10173_ACEOF
10174 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10175 (eval $ac_link) 2>&5
10176 ac_status=$?
10177 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10178 test $ac_status = 0; } && test -s conftest$ac_exeext; then
10179 case "$host_os" in
10180 # Handle native Windows specially, because there setlocale() interprets
10181 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
10182 # "fr" or "fra" as "French" or "French_France.1252",
10183 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
10184 # "ja" as "Japanese" or "Japanese_Japan.932",
10185 # and similar.
10186 mingw*)
10187 # Test for the native Windows locale name.
10188 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10189 gt_cv_locale_fr=French_France.1252
10190 else
10191 # None found.
10192 gt_cv_locale_fr=none
10193 fi
10194 ;;
10195 *)
10196 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
10197 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
10198 # configure script would override the LC_ALL setting. Likewise for
10199 # LC_CTYPE, which is also set at the beginning of the configure script.
10200 # Test for the usual locale name.
10201 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10202 gt_cv_locale_fr=fr_FR
10203 else
10204 # Test for the locale name with explicit encoding suffix.
10205 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10206 gt_cv_locale_fr=fr_FR.ISO-8859-1
10207 else
10208 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
10209 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10210 gt_cv_locale_fr=fr_FR.ISO8859-1
10211 else
10212 # Test for the HP-UX locale name.
10213 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10214 gt_cv_locale_fr=fr_FR.iso88591
10215 else
10216 # Test for the Solaris 7 locale name.
10217 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10218 gt_cv_locale_fr=fr
10219 else
10220 # None found.
10221 gt_cv_locale_fr=none
10222 fi
10223 fi
10224 fi
10225 fi
10226 fi
10227 ;;
10228 esac
10229 fi
10230 rm -fr conftest*
10231
10232fi
10233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
10234$as_echo "$gt_cv_locale_fr" >&6; }
10235 LOCALE_FR=$gt_cv_locale_fr
10236
10237
10238
10239
10240
10241
10242
8690e634
JK
10243 GNULIB_FFSL=0;
10244 GNULIB_FFSLL=0;
10245 GNULIB_MEMCHR=0;
10246 GNULIB_MEMMEM=0;
10247 GNULIB_MEMPCPY=0;
10248 GNULIB_MEMRCHR=0;
10249 GNULIB_RAWMEMCHR=0;
10250 GNULIB_STPCPY=0;
10251 GNULIB_STPNCPY=0;
10252 GNULIB_STRCHRNUL=0;
10253 GNULIB_STRDUP=0;
10254 GNULIB_STRNCAT=0;
10255 GNULIB_STRNDUP=0;
10256 GNULIB_STRNLEN=0;
10257 GNULIB_STRPBRK=0;
10258 GNULIB_STRSEP=0;
10259 GNULIB_STRSTR=0;
10260 GNULIB_STRCASESTR=0;
10261 GNULIB_STRTOK_R=0;
10262 GNULIB_MBSLEN=0;
10263 GNULIB_MBSNLEN=0;
10264 GNULIB_MBSCHR=0;
10265 GNULIB_MBSRCHR=0;
10266 GNULIB_MBSSTR=0;
10267 GNULIB_MBSCASECMP=0;
10268 GNULIB_MBSNCASECMP=0;
10269 GNULIB_MBSPCASECMP=0;
10270 GNULIB_MBSCASESTR=0;
10271 GNULIB_MBSCSPN=0;
10272 GNULIB_MBSPBRK=0;
10273 GNULIB_MBSSPN=0;
10274 GNULIB_MBSSEP=0;
10275 GNULIB_MBSTOK_R=0;
10276 GNULIB_STRERROR=0;
10277 GNULIB_STRERROR_R=0;
10278 GNULIB_STRSIGNAL=0;
10279 GNULIB_STRVERSCMP=0;
10280 HAVE_MBSLEN=0;
10281 HAVE_FFSL=1;
10282 HAVE_FFSLL=1;
10283 HAVE_MEMCHR=1;
10284 HAVE_DECL_MEMMEM=1;
10285 HAVE_MEMPCPY=1;
10286 HAVE_DECL_MEMRCHR=1;
10287 HAVE_RAWMEMCHR=1;
10288 HAVE_STPCPY=1;
10289 HAVE_STPNCPY=1;
10290 HAVE_STRCHRNUL=1;
10291 HAVE_DECL_STRDUP=1;
10292 HAVE_DECL_STRNDUP=1;
10293 HAVE_DECL_STRNLEN=1;
10294 HAVE_STRPBRK=1;
10295 HAVE_STRSEP=1;
10296 HAVE_STRCASESTR=1;
10297 HAVE_DECL_STRTOK_R=1;
10298 HAVE_DECL_STRERROR_R=1;
10299 HAVE_DECL_STRSIGNAL=1;
10300 HAVE_STRVERSCMP=1;
10301 REPLACE_MEMCHR=0;
10302 REPLACE_MEMMEM=0;
10303 REPLACE_STPNCPY=0;
10304 REPLACE_STRDUP=0;
10305 REPLACE_STRSTR=0;
10306 REPLACE_STRCASESTR=0;
10307 REPLACE_STRCHRNUL=0;
10308 REPLACE_STRERROR=0;
10309 REPLACE_STRERROR_R=0;
10310 REPLACE_STRNCAT=0;
10311 REPLACE_STRNDUP=0;
10312 REPLACE_STRNLEN=0;
10313 REPLACE_STRSIGNAL=0;
10314 REPLACE_STRTOK_R=0;
10315 UNDEFINE_STRTOK_R=0;
10316
10317
10318
10319
10320
10321 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
10322 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
10323 # irrelevant for anonymous mappings.
10324 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
10325if test "x$ac_cv_func_mmap" = x""yes; then :
10326 gl_have_mmap=yes
10327else
10328 gl_have_mmap=no
10329fi
10330
10331
10332 # Try to allow MAP_ANONYMOUS.
10333 gl_have_mmap_anonymous=no
10334 if test $gl_have_mmap = yes; then
10335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
10336$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
10337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10338/* end confdefs.h. */
10339
10340#include <sys/mman.h>
10341#ifdef MAP_ANONYMOUS
10342 I cannot identify this map
10343#endif
10344
10345_ACEOF
10346if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10347 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
10348 gl_have_mmap_anonymous=yes
10349fi
10350rm -f conftest*
10351
10352 if test $gl_have_mmap_anonymous != yes; then
10353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10354/* end confdefs.h. */
10355
10356#include <sys/mman.h>
10357#ifdef MAP_ANON
10358 I cannot identify this map
10359#endif
10360
10361_ACEOF
10362if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10363 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
10364
10365$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
10366
10367 gl_have_mmap_anonymous=yes
10368fi
10369rm -f conftest*
10370
10371 fi
10372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
10373$as_echo "$gl_have_mmap_anonymous" >&6; }
10374 if test $gl_have_mmap_anonymous = yes; then
10375
10376$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
10377
10378 fi
10379 fi
10380
10381
8690e634
JK
10382
10383
10384
10385
10386 if test $HAVE_MEMCHR = 1; then
10387 # Detect platform-specific bugs in some versions of glibc:
10388 # memchr should not dereference anything with length 0
10389 # http://bugzilla.redhat.com/499689
10390 # memchr should not dereference overestimated length after a match
10391 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
10392 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
10393 # Assume that memchr works on platforms that lack mprotect.
10394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
10395$as_echo_n "checking whether memchr works... " >&6; }
10396if test "${gl_cv_func_memchr_works+set}" = set; then :
10397 $as_echo_n "(cached) " >&6
10398else
10399 if test "$cross_compiling" = yes; then :
10400 gl_cv_func_memchr_works="guessing no"
10401else
10402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10403/* end confdefs.h. */
10404
10405#include <string.h>
10406#if HAVE_SYS_MMAN_H
10407# include <fcntl.h>
10408# include <unistd.h>
10409# include <sys/types.h>
10410# include <sys/mman.h>
10411# ifndef MAP_FILE
10412# define MAP_FILE 0
10413# endif
10414#endif
10415
10416int
10417main ()
10418{
10419
10420 int result = 0;
10421 char *fence = NULL;
10422#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
10423# if HAVE_MAP_ANONYMOUS
10424 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
10425 const int fd = -1;
10426# else /* !HAVE_MAP_ANONYMOUS */
10427 const int flags = MAP_FILE | MAP_PRIVATE;
10428 int fd = open ("/dev/zero", O_RDONLY, 0666);
10429 if (fd >= 0)
10430# endif
10431 {
10432 int pagesize = getpagesize ();
10433 char *two_pages =
10434 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
10435 flags, fd, 0);
10436 if (two_pages != (char *)(-1)
10437 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
10438 fence = two_pages + pagesize;
10439 }
10440#endif
10441 if (fence)
10442 {
10443 if (memchr (fence, 0, 0))
10444 result |= 1;
10445 strcpy (fence - 9, "12345678");
10446 if (memchr (fence - 9, 0, 79) != fence - 1)
10447 result |= 2;
10448 if (memchr (fence - 1, 0, 3) != fence - 1)
10449 result |= 4;
10450 }
10451 return result;
10452
10453 ;
10454 return 0;
10455}
10456_ACEOF
10457if ac_fn_c_try_run "$LINENO"; then :
10458 gl_cv_func_memchr_works=yes
10459else
10460 gl_cv_func_memchr_works=no
10461fi
10462rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10463 conftest.$ac_objext conftest.beam conftest.$ac_ext
10464fi
10465
10466fi
10467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
10468$as_echo "$gl_cv_func_memchr_works" >&6; }
10469 if test "$gl_cv_func_memchr_works" != yes; then
10470 REPLACE_MEMCHR=1
10471 fi
10472 fi
10473
3574124b 10474ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
8690e634
JK
10475if test "x$ac_cv_have_decl_memmem" = x""yes; then :
10476 ac_have_decl=1
10477else
10478 ac_have_decl=0
10479fi
10480
10481cat >>confdefs.h <<_ACEOF
10482#define HAVE_DECL_MEMMEM $ac_have_decl
10483_ACEOF
10484
10485
10486
10487
10488
8690e634
JK
10489 for ac_func in memmem
10490do :
10491 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
10492if test "x$ac_cv_func_memmem" = x""yes; then :
10493 cat >>confdefs.h <<_ACEOF
10494#define HAVE_MEMMEM 1
10495_ACEOF
10496
10497fi
10498done
10499
10500 if test $ac_cv_func_memmem = yes; then
10501 HAVE_MEMMEM=1
10502 else
10503 HAVE_MEMMEM=0
10504 fi
10505
8690e634
JK
10506 if test $ac_cv_have_decl_memmem = no; then
10507 HAVE_DECL_MEMMEM=0
10508 else
10509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
10510$as_echo_n "checking whether memmem works... " >&6; }
10511if test "${gl_cv_func_memmem_works_always+set}" = set; then :
10512 $as_echo_n "(cached) " >&6
10513else
10514 if test "$cross_compiling" = yes; then :
10515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10516/* end confdefs.h. */
10517
10518#ifdef __GNU_LIBRARY__
10519 #include <features.h>
10520 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
10521 || __GLIBC_MINOR__ > 12)) \
10522 || (__GLIBC__ > 2)) \
10523 || defined __UCLIBC__
10524 Lucky user
10525 #endif
10526#elif defined __CYGWIN__
10527 #include <cygwin/version.h>
10528 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
10529 Lucky user
10530 #endif
10531#else
10532 Lucky user
10533#endif
10534
10535_ACEOF
10536if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10537 $EGREP "Lucky user" >/dev/null 2>&1; then :
10538 gl_cv_func_memmem_works_always="guessing yes"
10539else
10540 gl_cv_func_memmem_works_always="guessing no"
10541fi
10542rm -f conftest*
10543
10544
10545else
10546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10547/* end confdefs.h. */
10548
10549#include <string.h> /* for memmem */
10550#define P "_EF_BF_BD"
10551#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
10552#define NEEDLE P P P P P
10553
10554int
10555main ()
10556{
10557
10558 int result = 0;
10559 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
10560 result |= 1;
10561 /* Check for empty needle behavior. */
10562 {
10563 const char *haystack = "AAA";
10564 if (memmem (haystack, 3, NULL, 0) != haystack)
10565 result |= 2;
10566 }
10567 return result;
10568
10569 ;
10570 return 0;
10571}
10572_ACEOF
10573if ac_fn_c_try_run "$LINENO"; then :
10574 gl_cv_func_memmem_works_always=yes
10575else
10576 gl_cv_func_memmem_works_always=no
10577fi
10578rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10579 conftest.$ac_objext conftest.beam conftest.$ac_ext
10580fi
10581
10582
10583fi
10584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
10585$as_echo "$gl_cv_func_memmem_works_always" >&6; }
10586 case "$gl_cv_func_memmem_works_always" in
10587 *yes) ;;
10588 *)
10589 REPLACE_MEMMEM=1
10590 ;;
10591 esac
10592 fi
10593 :
10594
6a29c58e
YQ
10595
10596 GNULIB_DPRINTF=0;
10597 GNULIB_FCLOSE=0;
10598 GNULIB_FDOPEN=0;
10599 GNULIB_FFLUSH=0;
10600 GNULIB_FGETC=0;
10601 GNULIB_FGETS=0;
10602 GNULIB_FOPEN=0;
10603 GNULIB_FPRINTF=0;
10604 GNULIB_FPRINTF_POSIX=0;
10605 GNULIB_FPURGE=0;
10606 GNULIB_FPUTC=0;
10607 GNULIB_FPUTS=0;
10608 GNULIB_FREAD=0;
10609 GNULIB_FREOPEN=0;
10610 GNULIB_FSCANF=0;
10611 GNULIB_FSEEK=0;
10612 GNULIB_FSEEKO=0;
10613 GNULIB_FTELL=0;
10614 GNULIB_FTELLO=0;
10615 GNULIB_FWRITE=0;
10616 GNULIB_GETC=0;
10617 GNULIB_GETCHAR=0;
10618 GNULIB_GETDELIM=0;
10619 GNULIB_GETLINE=0;
10620 GNULIB_OBSTACK_PRINTF=0;
10621 GNULIB_OBSTACK_PRINTF_POSIX=0;
10622 GNULIB_PCLOSE=0;
10623 GNULIB_PERROR=0;
10624 GNULIB_POPEN=0;
10625 GNULIB_PRINTF=0;
10626 GNULIB_PRINTF_POSIX=0;
10627 GNULIB_PUTC=0;
10628 GNULIB_PUTCHAR=0;
10629 GNULIB_PUTS=0;
10630 GNULIB_REMOVE=0;
10631 GNULIB_RENAME=0;
10632 GNULIB_RENAMEAT=0;
10633 GNULIB_SCANF=0;
10634 GNULIB_SNPRINTF=0;
10635 GNULIB_SPRINTF_POSIX=0;
10636 GNULIB_STDIO_H_NONBLOCKING=0;
10637 GNULIB_STDIO_H_SIGPIPE=0;
10638 GNULIB_TMPFILE=0;
10639 GNULIB_VASPRINTF=0;
10640 GNULIB_VFSCANF=0;
10641 GNULIB_VSCANF=0;
10642 GNULIB_VDPRINTF=0;
10643 GNULIB_VFPRINTF=0;
10644 GNULIB_VFPRINTF_POSIX=0;
10645 GNULIB_VPRINTF=0;
10646 GNULIB_VPRINTF_POSIX=0;
10647 GNULIB_VSNPRINTF=0;
10648 GNULIB_VSPRINTF_POSIX=0;
10649 HAVE_DECL_FPURGE=1;
10650 HAVE_DECL_FSEEKO=1;
10651 HAVE_DECL_FTELLO=1;
10652 HAVE_DECL_GETDELIM=1;
10653 HAVE_DECL_GETLINE=1;
10654 HAVE_DECL_OBSTACK_PRINTF=1;
10655 HAVE_DECL_SNPRINTF=1;
10656 HAVE_DECL_VSNPRINTF=1;
10657 HAVE_DPRINTF=1;
10658 HAVE_FSEEKO=1;
10659 HAVE_FTELLO=1;
10660 HAVE_PCLOSE=1;
10661 HAVE_POPEN=1;
10662 HAVE_RENAMEAT=1;
10663 HAVE_VASPRINTF=1;
10664 HAVE_VDPRINTF=1;
10665 REPLACE_DPRINTF=0;
10666 REPLACE_FCLOSE=0;
10667 REPLACE_FDOPEN=0;
10668 REPLACE_FFLUSH=0;
10669 REPLACE_FOPEN=0;
10670 REPLACE_FPRINTF=0;
10671 REPLACE_FPURGE=0;
10672 REPLACE_FREOPEN=0;
10673 REPLACE_FSEEK=0;
10674 REPLACE_FSEEKO=0;
10675 REPLACE_FTELL=0;
10676 REPLACE_FTELLO=0;
10677 REPLACE_GETDELIM=0;
10678 REPLACE_GETLINE=0;
10679 REPLACE_OBSTACK_PRINTF=0;
10680 REPLACE_PERROR=0;
10681 REPLACE_POPEN=0;
10682 REPLACE_PRINTF=0;
10683 REPLACE_REMOVE=0;
10684 REPLACE_RENAME=0;
10685 REPLACE_RENAMEAT=0;
10686 REPLACE_SNPRINTF=0;
10687 REPLACE_SPRINTF=0;
10688 REPLACE_STDIO_READ_FUNCS=0;
10689 REPLACE_STDIO_WRITE_FUNCS=0;
10690 REPLACE_TMPFILE=0;
10691 REPLACE_VASPRINTF=0;
10692 REPLACE_VDPRINTF=0;
10693 REPLACE_VFPRINTF=0;
10694 REPLACE_VPRINTF=0;
10695 REPLACE_VSNPRINTF=0;
10696 REPLACE_VSPRINTF=0;
10697
10698
10699
8690e634
JK
10700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
10701$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
10702if test "${ac_cv_header_stdbool_h+set}" = set; then :
10703 $as_echo_n "(cached) " >&6
10704else
10705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10706/* end confdefs.h. */
10707
10708 #include <stdbool.h>
10709 #ifndef bool
10710 "error: bool is not defined"
10711 #endif
10712 #ifndef false
10713 "error: false is not defined"
10714 #endif
10715 #if false
10716 "error: false is not 0"
10717 #endif
10718 #ifndef true
10719 "error: true is not defined"
10720 #endif
10721 #if true != 1
10722 "error: true is not 1"
10723 #endif
10724 #ifndef __bool_true_false_are_defined
10725 "error: __bool_true_false_are_defined is not defined"
10726 #endif
10727
10728 struct s { _Bool s: 1; _Bool t; } s;
10729
10730 char a[true == 1 ? 1 : -1];
10731 char b[false == 0 ? 1 : -1];
10732 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
10733 char d[(bool) 0.5 == true ? 1 : -1];
10734 /* See body of main program for 'e'. */
10735 char f[(_Bool) 0.0 == false ? 1 : -1];
10736 char g[true];
10737 char h[sizeof (_Bool)];
10738 char i[sizeof s.t];
10739 enum { j = false, k = true, l = false * true, m = true * 256 };
10740 /* The following fails for
10741 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
10742 _Bool n[m];
10743 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
10744 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
10745 /* Catch a bug in an HP-UX C compiler. See
10746 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
10747 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
10748 */
10749 _Bool q = true;
10750 _Bool *pq = &q;
10751
10752int
10753main ()
10754{
10755
10756 bool e = &s;
10757 *pq |= q;
10758 *pq |= ! q;
10759 /* Refer to every declared value, to avoid compiler optimizations. */
10760 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
10761 + !m + !n + !o + !p + !q + !pq);
10762
10763 ;
10764 return 0;
10765}
10766_ACEOF
10767if ac_fn_c_try_compile "$LINENO"; then :
10768 ac_cv_header_stdbool_h=yes
10769else
10770 ac_cv_header_stdbool_h=no
10771fi
10772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10773fi
10774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
10775$as_echo "$ac_cv_header_stdbool_h" >&6; }
10776 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
10777if test "x$ac_cv_type__Bool" = x""yes; then :
10778
10779cat >>confdefs.h <<_ACEOF
10780#define HAVE__BOOL 1
10781_ACEOF
10782
10783
10784fi
10785
10786
10787
10788 REPLACE_NULL=0;
10789 HAVE_WCHAR_T=1;
10790
10791
10792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
10793$as_echo_n "checking for wchar_t... " >&6; }
10794if test "${gt_cv_c_wchar_t+set}" = set; then :
10795 $as_echo_n "(cached) " >&6
10796else
10797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10798/* end confdefs.h. */
10799#include <stddef.h>
10800 wchar_t foo = (wchar_t)'\0';
10801int
10802main ()
10803{
10804
10805 ;
10806 return 0;
10807}
10808_ACEOF
10809if ac_fn_c_try_compile "$LINENO"; then :
10810 gt_cv_c_wchar_t=yes
10811else
10812 gt_cv_c_wchar_t=no
10813fi
10814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10815fi
10816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
10817$as_echo "$gt_cv_c_wchar_t" >&6; }
10818 if test $gt_cv_c_wchar_t = yes; then
10819
10820$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
10821
10822 fi
10823
63ce7108
TT
10824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
10825$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
10826if test "${ac_cv_c_restrict+set}" = set; then :
10827 $as_echo_n "(cached) " >&6
10828else
10829 ac_cv_c_restrict=no
10830 # The order here caters to the fact that C++ does not require restrict.
10831 for ac_kw in __restrict __restrict__ _Restrict restrict; do
10832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10833/* end confdefs.h. */
10834typedef int * int_ptr;
10835 int foo (int_ptr $ac_kw ip) {
10836 return ip[0];
10837 }
10838int
10839main ()
10840{
10841int s[1];
10842 int * $ac_kw t = s;
10843 t[0] = 0;
10844 return foo(t)
10845 ;
10846 return 0;
10847}
10848_ACEOF
10849if ac_fn_c_try_compile "$LINENO"; then :
10850 ac_cv_c_restrict=$ac_kw
10851fi
10852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10853 test "$ac_cv_c_restrict" != no && break
10854 done
10855
10856fi
10857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
10858$as_echo "$ac_cv_c_restrict" >&6; }
10859
10860 case $ac_cv_c_restrict in
10861 restrict) ;;
10862 no) $as_echo "#define restrict /**/" >>confdefs.h
10863 ;;
10864 *) cat >>confdefs.h <<_ACEOF
10865#define restrict $ac_cv_c_restrict
10866_ACEOF
10867 ;;
10868 esac
10869
10870
10871
10872
10873
8690e634
JK
10874
10875
10876
10877
10878
10879
10880
10881 if test $gl_cv_have_include_next = yes; then
10882 gl_cv_next_string_h='<'string.h'>'
10883 else
10884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
10885$as_echo_n "checking absolute name of <string.h>... " >&6; }
10886if test "${gl_cv_next_string_h+set}" = set; then :
10887 $as_echo_n "(cached) " >&6
10888else
10889
10890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10891/* end confdefs.h. */
10892#include <string.h>
10893
10894_ACEOF
10895 case "$host_os" in
10896 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10897 *) gl_absname_cpp="$ac_cpp" ;;
10898 esac
10899
10900 case "$host_os" in
c971b7fa
PA
10901 mingw*)
10902 gl_dirsep_regex='[/\\]'
10903 ;;
10904 *)
10905 gl_dirsep_regex='\/'
10906 ;;
10907 esac
10908 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10909
8690e634
JK
10910 gl_header_literal_regex=`echo 'string.h' \
10911 | sed -e "$gl_make_literal_regex_sed"`
10912 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10913 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10914 s|^/[^/]|//&|
10915 p
10916 q
10917 }'
10918 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10919 sed -n "$gl_absolute_header_sed"`'"'
10920
10921
10922fi
10923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
10924$as_echo "$gl_cv_next_string_h" >&6; }
10925 fi
10926 NEXT_STRING_H=$gl_cv_next_string_h
10927
10928 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10929 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10930 gl_next_as_first_directive='<'string.h'>'
10931 else
10932 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10933 gl_next_as_first_directive=$gl_cv_next_string_h
10934 fi
10935 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
10936
10937
10938
10939
10940
10941
10942 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
10943 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
10944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
10945$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
10946if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
10947 $as_echo_n "(cached) " >&6
10948else
10949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10950/* end confdefs.h. */
10951#include <string.h>
10952
10953int
10954main ()
10955{
10956#undef $gl_func
10957 (void) $gl_func;
10958 ;
10959 return 0;
10960}
10961_ACEOF
10962if ac_fn_c_try_compile "$LINENO"; then :
10963 eval "$as_gl_Symbol=yes"
10964else
10965 eval "$as_gl_Symbol=no"
10966fi
10967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10968fi
10969eval ac_res=\$$as_gl_Symbol
10970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10971$as_echo "$ac_res" >&6; }
10972 eval as_val=\$$as_gl_Symbol
10973 if test "x$as_val" = x""yes; then :
10974 cat >>confdefs.h <<_ACEOF
10975#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
10976_ACEOF
10977
10978 eval ac_cv_have_decl_$gl_func=yes
10979fi
10980 done
10981
10982
10983
8839a007 10984
63ce7108
TT
10985
10986 if test "$gl_cv_func_memchr_works" != yes; then
10987 REPLACE_STRSTR=1
10988 else
10989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
10990$as_echo_n "checking whether strstr works... " >&6; }
10991if test "${gl_cv_func_strstr_works_always+set}" = set; then :
10992 $as_echo_n "(cached) " >&6
10993else
10994 if test "$cross_compiling" = yes; then :
10995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10996/* end confdefs.h. */
10997
10998#ifdef __GNU_LIBRARY__
10999 #include <features.h>
11000 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
11001 || defined __UCLIBC__
11002 Lucky user
11003 #endif
11004#elif defined __CYGWIN__
11005 #include <cygwin/version.h>
11006 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
11007 Lucky user
11008 #endif
11009#else
11010 Lucky user
11011#endif
11012
11013_ACEOF
11014if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11015 $EGREP "Lucky user" >/dev/null 2>&1; then :
11016 gl_cv_func_strstr_works_always="guessing yes"
11017else
11018 gl_cv_func_strstr_works_always="guessing no"
11019fi
11020rm -f conftest*
11021
11022
11023else
11024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11025/* end confdefs.h. */
11026
11027#include <string.h> /* for strstr */
11028#define P "_EF_BF_BD"
11029#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
11030#define NEEDLE P P P P P
11031
11032int
11033main ()
11034{
11035return !!strstr (HAYSTACK, NEEDLE);
11036
11037 ;
11038 return 0;
11039}
11040_ACEOF
11041if ac_fn_c_try_run "$LINENO"; then :
11042 gl_cv_func_strstr_works_always=yes
11043else
11044 gl_cv_func_strstr_works_always=no
11045fi
11046rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11047 conftest.$ac_objext conftest.beam conftest.$ac_ext
11048fi
11049
11050
11051fi
11052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
11053$as_echo "$gl_cv_func_strstr_works_always" >&6; }
11054 case "$gl_cv_func_strstr_works_always" in
11055 *yes) ;;
11056 *)
11057 REPLACE_STRSTR=1
11058 ;;
11059 esac
11060 fi
11061
09607c9e
TT
11062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
11063$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
11064if test "${ac_cv_header_stat_broken+set}" = set; then :
11065 $as_echo_n "(cached) " >&6
11066else
11067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11068/* end confdefs.h. */
11069#include <sys/types.h>
11070#include <sys/stat.h>
63ce7108 11071
09607c9e
TT
11072#if defined S_ISBLK && defined S_IFDIR
11073extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
11074#endif
8839a007 11075
09607c9e
TT
11076#if defined S_ISBLK && defined S_IFCHR
11077extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
11078#endif
11079
11080#if defined S_ISLNK && defined S_IFREG
11081extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
11082#endif
11083
11084#if defined S_ISSOCK && defined S_IFREG
11085extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
11086#endif
8839a007 11087
8839a007 11088_ACEOF
09607c9e
TT
11089if ac_fn_c_try_compile "$LINENO"; then :
11090 ac_cv_header_stat_broken=no
11091else
11092 ac_cv_header_stat_broken=yes
11093fi
11094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11095fi
11096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
11097$as_echo "$ac_cv_header_stat_broken" >&6; }
11098if test $ac_cv_header_stat_broken = yes; then
11099
11100$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
8839a007
PA
11101
11102fi
11103
09607c9e
TT
11104
11105
8839a007
PA
11106ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
11107if test "x$ac_cv_type_mode_t" = x""yes; then :
11108
11109else
11110
11111cat >>confdefs.h <<_ACEOF
11112#define mode_t int
11113_ACEOF
11114
11115fi
11116
8839a007
PA
11117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
11118$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
11119if test -z "$MKDIR_P"; then
11120 if test "${ac_cv_path_mkdir+set}" = set; then :
11121 $as_echo_n "(cached) " >&6
11122else
11123 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11124for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
11125do
11126 IFS=$as_save_IFS
11127 test -z "$as_dir" && as_dir=.
11128 for ac_prog in mkdir gmkdir; do
11129 for ac_exec_ext in '' $ac_executable_extensions; do
11130 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
11131 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
11132 'mkdir (GNU coreutils) '* | \
11133 'mkdir (coreutils) '* | \
11134 'mkdir (fileutils) '4.1*)
11135 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
11136 break 3;;
11137 esac
11138 done
11139 done
11140 done
11141IFS=$as_save_IFS
11142
11143fi
11144
11145 if test "${ac_cv_path_mkdir+set}" = set; then
11146 MKDIR_P="$ac_cv_path_mkdir -p"
11147 else
11148 # As a last resort, use the slow shell script. Don't cache a
11149 # value for MKDIR_P within a source directory, because that will
11150 # break other packages using the cache if that directory is
11151 # removed, or if the value is a relative name.
11152 test -d ./--version && rmdir ./--version
11153 MKDIR_P="$ac_install_sh -d"
11154 fi
11155fi
11156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
11157$as_echo "$MKDIR_P" >&6; }
11158
11159
09607c9e
TT
11160
11161ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
11162if test "x$ac_cv_type_pid_t" = x""yes; then :
11163
11164else
11165
11166cat >>confdefs.h <<_ACEOF
11167#define pid_t int
11168_ACEOF
11169
11170fi
11171
11172
11173
2196f55f 11174
09607c9e
TT
11175
11176
11177
11178
11179 GNULIB_MKTIME=0;
11180 GNULIB_NANOSLEEP=0;
11181 GNULIB_STRPTIME=0;
11182 GNULIB_TIMEGM=0;
11183 GNULIB_TIME_R=0;
11184 HAVE_DECL_LOCALTIME_R=1;
11185 HAVE_NANOSLEEP=1;
11186 HAVE_STRPTIME=1;
11187 HAVE_TIMEGM=1;
11188 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
11189 REPLACE_MKTIME=GNULIB_PORTCHECK;
11190 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
11191 REPLACE_TIMEGM=GNULIB_PORTCHECK;
11192
11193
11194
11195
11196
11197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
11198$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
11199if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
11200 $as_echo_n "(cached) " >&6
11201else
11202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11203/* end confdefs.h. */
11204#include <time.h>
11205
11206int
11207main ()
11208{
11209static struct timespec x; x.tv_sec = x.tv_nsec;
11210 ;
11211 return 0;
11212}
11213_ACEOF
11214if ac_fn_c_try_compile "$LINENO"; then :
11215 gl_cv_sys_struct_timespec_in_time_h=yes
11216else
11217 gl_cv_sys_struct_timespec_in_time_h=no
11218fi
11219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11220fi
11221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
11222$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
11223
11224 TIME_H_DEFINES_STRUCT_TIMESPEC=0
11225 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
11226 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
11227 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
11228 TIME_H_DEFINES_STRUCT_TIMESPEC=1
11229 else
11230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
11231$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
11232if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
11233 $as_echo_n "(cached) " >&6
11234else
11235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11236/* end confdefs.h. */
11237#include <sys/time.h>
11238
11239int
11240main ()
11241{
11242static struct timespec x; x.tv_sec = x.tv_nsec;
11243 ;
11244 return 0;
11245}
11246_ACEOF
11247if ac_fn_c_try_compile "$LINENO"; then :
11248 gl_cv_sys_struct_timespec_in_sys_time_h=yes
11249else
11250 gl_cv_sys_struct_timespec_in_sys_time_h=no
11251fi
11252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11253fi
11254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
11255$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
11256 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
11257 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
11258 else
11259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
11260$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
11261if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then :
11262 $as_echo_n "(cached) " >&6
11263else
11264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11265/* end confdefs.h. */
11266#include <pthread.h>
11267
11268int
11269main ()
11270{
11271static struct timespec x; x.tv_sec = x.tv_nsec;
11272 ;
11273 return 0;
11274}
11275_ACEOF
11276if ac_fn_c_try_compile "$LINENO"; then :
11277 gl_cv_sys_struct_timespec_in_pthread_h=yes
11278else
11279 gl_cv_sys_struct_timespec_in_pthread_h=no
11280fi
11281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11282fi
11283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
11284$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
11285 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
11286 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
11287 fi
11288 fi
11289 fi
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305 if test $gl_cv_have_include_next = yes; then
11306 gl_cv_next_time_h='<'time.h'>'
11307 else
11308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
11309$as_echo_n "checking absolute name of <time.h>... " >&6; }
11310if test "${gl_cv_next_time_h+set}" = set; then :
11311 $as_echo_n "(cached) " >&6
11312else
11313
11314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11315/* end confdefs.h. */
11316#include <time.h>
11317
11318_ACEOF
11319 case "$host_os" in
11320 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11321 *) gl_absname_cpp="$ac_cpp" ;;
11322 esac
11323
11324 case "$host_os" in
11325 mingw*)
11326 gl_dirsep_regex='[/\\]'
11327 ;;
11328 *)
11329 gl_dirsep_regex='\/'
11330 ;;
11331 esac
11332 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11333
11334 gl_header_literal_regex=`echo 'time.h' \
11335 | sed -e "$gl_make_literal_regex_sed"`
11336 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11337 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11338 s|^/[^/]|//&|
11339 p
11340 q
11341 }'
11342 gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11343 sed -n "$gl_absolute_header_sed"`'"'
11344
11345
11346fi
11347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
11348$as_echo "$gl_cv_next_time_h" >&6; }
11349 fi
11350 NEXT_TIME_H=$gl_cv_next_time_h
11351
11352 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11353 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11354 gl_next_as_first_directive='<'time.h'>'
11355 else
11356 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11357 gl_next_as_first_directive=$gl_cv_next_time_h
11358 fi
11359 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
11360
11361
11362
11363
11364
11365
11366
8690e634
JK
11367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
11368$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
11369if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then :
11370 $as_echo_n "(cached) " >&6
11371else
11372 gl_cv_header_wchar_h_correct_inline=yes
11373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11374/* end confdefs.h. */
11375
11376 #define wcstod renamed_wcstod
11377/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
11378 <wchar.h>.
11379 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11380 included before <wchar.h>. */
11381#include <stddef.h>
11382#include <stdio.h>
11383#include <time.h>
11384#include <wchar.h>
11385extern int zero (void);
11386int main () { return zero(); }
11387
11388_ACEOF
11389 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
11390 (eval $ac_compile) 2>&5
11391 ac_status=$?
11392 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11393 test $ac_status = 0; }; then
11394 mv conftest.$ac_objext conftest1.$ac_objext
11395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11396/* end confdefs.h. */
11397
11398 #define wcstod renamed_wcstod
11399/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
11400 <wchar.h>.
11401 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11402 included before <wchar.h>. */
11403#include <stddef.h>
11404#include <stdio.h>
11405#include <time.h>
11406#include <wchar.h>
11407int zero (void) { return 0; }
11408
11409_ACEOF
11410 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
11411 (eval $ac_compile) 2>&5
11412 ac_status=$?
11413 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11414 test $ac_status = 0; }; then
11415 mv conftest.$ac_objext conftest2.$ac_objext
11416 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
11417 :
11418 else
11419 gl_cv_header_wchar_h_correct_inline=no
11420 fi
11421 fi
11422 fi
11423 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
11424
11425fi
11426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
11427$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
11428 if test $gl_cv_header_wchar_h_correct_inline = no; then
11429 as_fn_error "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
11430This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
11431C99 mode. You have four options:
11432 - Add the flag -fgnu89-inline to CC and reconfigure, or
11433 - Fix your include files, using parts of
11434 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
11435 - Use a gcc version older than 4.3, or
11436 - Don't use the flags -std=c99 or -std=gnu99.
11437Configuration aborted." "$LINENO" 5
11438 fi
11439
11440
11441
11442
11443
8690e634
JK
11444 if test $ac_cv_header_features_h = yes; then
11445 HAVE_FEATURES_H=1
11446 else
11447 HAVE_FEATURES_H=0
11448 fi
11449
11450
11451
11452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
11453$as_echo_n "checking for wint_t... " >&6; }
11454if test "${gt_cv_c_wint_t+set}" = set; then :
11455 $as_echo_n "(cached) " >&6
11456else
11457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11458/* end confdefs.h. */
11459
11460/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
11461 <wchar.h>.
11462 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
11463 before <wchar.h>. */
11464#include <stddef.h>
11465#include <stdio.h>
11466#include <time.h>
11467#include <wchar.h>
11468 wint_t foo = (wchar_t)'\0';
11469int
11470main ()
11471{
11472
11473 ;
11474 return 0;
11475}
11476_ACEOF
11477if ac_fn_c_try_compile "$LINENO"; then :
11478 gt_cv_c_wint_t=yes
11479else
11480 gt_cv_c_wint_t=no
11481fi
11482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11483fi
11484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
11485$as_echo "$gt_cv_c_wint_t" >&6; }
11486 if test $gt_cv_c_wint_t = yes; then
11487
11488$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
11489
11490 fi
11491
11492
11493 GNULIB_ISWBLANK=0;
11494 GNULIB_WCTYPE=0;
11495 GNULIB_ISWCTYPE=0;
11496 GNULIB_WCTRANS=0;
11497 GNULIB_TOWCTRANS=0;
11498 HAVE_ISWBLANK=1;
11499 HAVE_WCTYPE_T=1;
11500 HAVE_WCTRANS_T=1;
11501 REPLACE_ISWBLANK=0;
11502
11503
11504
11505
8690e634
JK
11506 if false; then
11507 GL_COND_LIBTOOL_TRUE=
11508 GL_COND_LIBTOOL_FALSE='#'
11509else
11510 GL_COND_LIBTOOL_TRUE='#'
11511 GL_COND_LIBTOOL_FALSE=
11512fi
11513
11514 gl_cond_libtool=false
11515 gl_libdeps=
11516 gl_ltlibdeps=
11517 gl_m4_base='import/m4'
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527 gl_source_base='import'
11528
11529
11530 if test $ac_cv_func_alloca_works = no; then
11531 :
11532 fi
11533
11534 # Define an additional variable used in the Makefile substitution.
11535 if test $ac_cv_working_alloca_h = yes; then
11536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
11537$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
11538if test "${gl_cv_rpl_alloca+set}" = set; then :
11539 $as_echo_n "(cached) " >&6
11540else
11541
11542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11543/* end confdefs.h. */
11544
11545#if defined __GNUC__ || defined _AIX || defined _MSC_VER
11546 Need own alloca
11547#endif
11548
11549_ACEOF
11550if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11551 $EGREP "Need own alloca" >/dev/null 2>&1; then :
11552 gl_cv_rpl_alloca=yes
11553else
11554 gl_cv_rpl_alloca=no
11555fi
11556rm -f conftest*
11557
11558
11559fi
11560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
11561$as_echo "$gl_cv_rpl_alloca" >&6; }
11562 if test $gl_cv_rpl_alloca = yes; then
11563
11564$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
11565
11566 ALLOCA_H=alloca.h
11567 else
11568 ALLOCA_H=
11569 fi
11570 else
11571 ALLOCA_H=alloca.h
11572 fi
11573
11574 if test -n "$ALLOCA_H"; then
11575 GL_GENERATE_ALLOCA_H_TRUE=
11576 GL_GENERATE_ALLOCA_H_FALSE='#'
11577else
11578 GL_GENERATE_ALLOCA_H_TRUE='#'
11579 GL_GENERATE_ALLOCA_H_FALSE=
11580fi
11581
11582
11583
98399780
YQ
11584
11585
11586 if test $ac_cv_func_canonicalize_file_name = no; then
11587 HAVE_CANONICALIZE_FILE_NAME=0
11588 if test $ac_cv_func_realpath = no; then
11589 HAVE_REALPATH=0
11590 else
11591 case "$gl_cv_func_realpath_works" in
11592 *yes) ;;
11593 *) REPLACE_REALPATH=1 ;;
11594 esac
11595 fi
11596 else
11597 case "$gl_cv_func_realpath_works" in
11598 *yes)
11599 ;;
11600 *)
11601 REPLACE_CANONICALIZE_FILE_NAME=1
11602 REPLACE_REALPATH=1
11603 ;;
11604 esac
11605 fi
11606
11607 if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
11608
11609
11610
11611
11612
11613
11614
11615
11616 gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
11617
11618 fi
11619
11620
11621cat >>confdefs.h <<_ACEOF
11622#define GNULIB_CANONICALIZE_LGPL 1
11623_ACEOF
11624
11625
11626
11627
11628
11629
11630
11631 GNULIB_CANONICALIZE_FILE_NAME=1
11632
11633
11634
11635
11636
11637$as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
11638
11639
11640
11641
11642
11643
11644
11645
11646 GNULIB_REALPATH=1
11647
11648
11649
11650
11651
11652$as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
11653
11654
11655
11656
6a29c58e
YQ
11657
11658
11659
11660
11661 GNULIB_CHDIR=1
11662
11663
11664
11665
11666
11667$as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
11668
11669
11670
11671
8690e634
JK
11672 if test "x$datarootdir" = x; then
11673 datarootdir='${datadir}'
11674
11675 fi
11676 if test "x$docdir" = x; then
11677 docdir='${datarootdir}/doc/${PACKAGE}'
11678
11679 fi
11680 if test "x$htmldir" = x; then
11681 htmldir='${docdir}'
11682
11683 fi
11684 if test "x$dvidir" = x; then
11685 dvidir='${docdir}'
11686
11687 fi
11688 if test "x$pdfdir" = x; then
11689 pdfdir='${docdir}'
11690
11691 fi
11692 if test "x$psdir" = x; then
11693 psdir='${docdir}'
11694
11695 fi
11696 if test "x$lispdir" = x; then
11697 lispdir='${datarootdir}/emacs/site-lisp'
11698
11699 fi
11700 if test "x$localedir" = x; then
11701 localedir='${datarootdir}/locale'
11702
11703 fi
11704
11705 pkglibexecdir='${libexecdir}/${PACKAGE}'
11706
11707
11708
11709
11710
11711
63ce7108 11712
e26b6bb0
TT
11713
11714
11715
11716
11717
11718
11719
11720 if test $gl_cv_have_include_next = yes; then
11721 gl_cv_next_dirent_h='<'dirent.h'>'
11722 else
11723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
11724$as_echo_n "checking absolute name of <dirent.h>... " >&6; }
11725if test "${gl_cv_next_dirent_h+set}" = set; then :
11726 $as_echo_n "(cached) " >&6
11727else
11728
11729 if test $ac_cv_header_dirent_h = yes; then
11730
11731
11732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11733/* end confdefs.h. */
11734#include <dirent.h>
11735
11736_ACEOF
11737 case "$host_os" in
11738 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11739 *) gl_absname_cpp="$ac_cpp" ;;
11740 esac
11741
11742 case "$host_os" in
11743 mingw*)
11744 gl_dirsep_regex='[/\\]'
11745 ;;
11746 *)
11747 gl_dirsep_regex='\/'
11748 ;;
11749 esac
11750 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11751
11752 gl_header_literal_regex=`echo 'dirent.h' \
11753 | sed -e "$gl_make_literal_regex_sed"`
11754 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11755 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11756 s|^/[^/]|//&|
11757 p
11758 q
11759 }'
11760 gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11761 sed -n "$gl_absolute_header_sed"`'"'
11762 else
11763 gl_cv_next_dirent_h='<'dirent.h'>'
11764 fi
11765
11766
11767fi
11768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
11769$as_echo "$gl_cv_next_dirent_h" >&6; }
11770 fi
11771 NEXT_DIRENT_H=$gl_cv_next_dirent_h
11772
11773 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11774 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11775 gl_next_as_first_directive='<'dirent.h'>'
11776 else
11777 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11778 gl_next_as_first_directive=$gl_cv_next_dirent_h
11779 fi
11780 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
11781
11782
11783
11784
11785 if test $ac_cv_header_dirent_h = yes; then
11786 HAVE_DIRENT_H=1
11787 else
11788 HAVE_DIRENT_H=0
11789 fi
11790
11791
11792
11793 for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do
11794 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
11795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
11796$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
11797if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
11798 $as_echo_n "(cached) " >&6
11799else
11800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11801/* end confdefs.h. */
11802#include <dirent.h>
11803
11804int
11805main ()
11806{
11807#undef $gl_func
11808 (void) $gl_func;
11809 ;
11810 return 0;
11811}
11812_ACEOF
11813if ac_fn_c_try_compile "$LINENO"; then :
11814 eval "$as_gl_Symbol=yes"
11815else
11816 eval "$as_gl_Symbol=no"
11817fi
11818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11819fi
11820eval ac_res=\$$as_gl_Symbol
11821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11822$as_echo "$ac_res" >&6; }
11823 eval as_val=\$$as_gl_Symbol
11824 if test "x$as_val" = x""yes; then :
11825 cat >>confdefs.h <<_ACEOF
11826#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
11827_ACEOF
11828
11829 eval ac_cv_have_decl_$gl_func=yes
11830fi
11831 done
11832
11833
11834
11835
11836
11837
18848e28
GF
11838
11839 for ac_func in dirfd
11840do :
11841 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
11842if test "x$ac_cv_func_dirfd" = x""yes; then :
11843 cat >>confdefs.h <<_ACEOF
11844#define HAVE_DIRFD 1
11845_ACEOF
11846
11847fi
11848done
11849
11850 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11851 #include <dirent.h>
11852"
11853if test "x$ac_cv_have_decl_dirfd" = x""yes; then :
11854 ac_have_decl=1
11855else
11856 ac_have_decl=0
11857fi
11858
11859cat >>confdefs.h <<_ACEOF
11860#define HAVE_DECL_DIRFD $ac_have_decl
11861_ACEOF
11862
11863 if test $ac_cv_have_decl_dirfd = no; then
11864 HAVE_DECL_DIRFD=0
11865 fi
11866
11867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
11868$as_echo_n "checking whether dirfd is a macro... " >&6; }
11869if test "${gl_cv_func_dirfd_macro+set}" = set; then :
11870 $as_echo_n "(cached) " >&6
11871else
11872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11873/* end confdefs.h. */
11874
11875#include <sys/types.h>
11876#include <dirent.h>
11877#ifdef dirfd
11878 dirent_header_defines_dirfd
11879#endif
11880_ACEOF
11881if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11882 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
11883 gl_cv_func_dirfd_macro=yes
11884else
11885 gl_cv_func_dirfd_macro=no
11886fi
11887rm -f conftest*
11888
11889fi
11890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
11891$as_echo "$gl_cv_func_dirfd_macro" >&6; }
11892
11893 # Use the replacement only if we have no function or macro with that name.
11894 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
11895 if test $ac_cv_have_decl_dirfd = yes; then
11896 # If the system declares dirfd already, let's declare rpl_dirfd instead.
11897 REPLACE_DIRFD=1
11898 fi
11899 fi
11900
11901 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
11902
11903
11904
11905
11906
11907
11908
11909
11910 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
11911
11912
11913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
11914$as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
11915if test "${gl_cv_sys_dir_fd_member_name+set}" = set; then :
11916 $as_echo_n "(cached) " >&6
11917else
11918
11919 dirfd_save_CFLAGS=$CFLAGS
11920 for ac_expr in d_fd dd_fd; do
11921
11922 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
11923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11924/* end confdefs.h. */
11925
11926 #include <sys/types.h>
11927 #include <dirent.h>
11928int
11929main ()
11930{
11931DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
11932 ;
11933 return 0;
11934}
11935_ACEOF
11936if ac_fn_c_try_compile "$LINENO"; then :
11937 dir_fd_found=yes
11938
11939fi
11940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11941 CFLAGS=$dirfd_save_CFLAGS
11942 test "$dir_fd_found" = yes && break
11943 done
11944 test "$dir_fd_found" = yes || ac_expr=no_such_member
11945
11946 gl_cv_sys_dir_fd_member_name=$ac_expr
11947
11948
11949fi
11950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
11951$as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
11952 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
11953
11954cat >>confdefs.h <<_ACEOF
11955#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
11956_ACEOF
11957
11958 fi
11959
11960
11961 fi
11962
11963
11964
11965
11966
11967 GNULIB_DIRFD=1
11968
11969
11970
11971
11972
11973$as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
11974
11975
11976
11977
11978
11979
11980
11981
6a29c58e
YQ
11982
11983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
11984$as_echo_n "checking whether // is distinct from /... " >&6; }
11985if test "${gl_cv_double_slash_root+set}" = set; then :
11986 $as_echo_n "(cached) " >&6
11987else
11988 if test x"$cross_compiling" = xyes ; then
11989 # When cross-compiling, there is no way to tell whether // is special
11990 # short of a list of hosts. However, the only known hosts to date
11991 # that have a distinct // are Apollo DomainOS (too old to port to),
11992 # Cygwin, and z/OS. If anyone knows of another system for which // has
11993 # special semantics and is distinct from /, please report it to
11994 # <bug-gnulib@gnu.org>.
11995 case $host in
11996 *-cygwin | i370-ibm-openedition)
11997 gl_cv_double_slash_root=yes ;;
11998 *)
11999 # Be optimistic and assume that / and // are the same when we
12000 # don't know.
12001 gl_cv_double_slash_root='unknown, assuming no' ;;
12002 esac
12003 else
12004 set x `ls -di / // 2>/dev/null`
12005 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
12006 gl_cv_double_slash_root=no
12007 else
12008 gl_cv_double_slash_root=yes
12009 fi
12010 fi
12011fi
12012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
12013$as_echo "$gl_cv_double_slash_root" >&6; }
12014 if test "$gl_cv_double_slash_root" = yes; then
12015
12016$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
12017
12018 fi
12019
12020
12021
12022
12023
12024
88b48903
WN
12025 FLOAT_H=
12026 REPLACE_FLOAT_LDBL=0
12027 case "$host_os" in
12028 aix* | beos* | openbsd* | mirbsd* | irix*)
12029 FLOAT_H=float.h
12030 ;;
12031 freebsd*)
12032 case "$host_cpu" in
12033 i[34567]86 )
12034 FLOAT_H=float.h
12035 ;;
12036 x86_64 )
12037 # On x86_64 systems, the C compiler may still be generating
12038 # 32-bit code.
12039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12040/* end confdefs.h. */
12041#if defined __LP64__ || defined __x86_64__ || defined __amd64__
12042 yes
12043 #endif
12044_ACEOF
12045if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12046 $EGREP "yes" >/dev/null 2>&1; then :
12047
12048else
12049 FLOAT_H=float.h
12050fi
12051rm -f conftest*
8690e634 12052
88b48903
WN
12053 ;;
12054 esac
12055 ;;
12056 linux*)
12057 case "$host_cpu" in
12058 powerpc*)
12059 FLOAT_H=float.h
12060 ;;
12061 esac
12062 ;;
12063 esac
12064 case "$host_os" in
12065 aix* | freebsd* | linux*)
12066 if test -n "$FLOAT_H"; then
12067 REPLACE_FLOAT_LDBL=1
12068 fi
12069 ;;
12070 esac
a512b375 12071
88b48903
WN
12072 REPLACE_ITOLD=0
12073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
12074$as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
12075if test "${gl_cv_func_itold_works+set}" = set; then :
8690e634
JK
12076 $as_echo_n "(cached) " >&6
12077else
88b48903
WN
12078
12079 if test "$cross_compiling" = yes; then :
12080 case "$host" in
12081 sparc*-*-linux*)
12082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12083/* end confdefs.h. */
12084#if defined __LP64__ || defined __arch64__
12085 yes
12086 #endif
12087_ACEOF
12088if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12089 $EGREP "yes" >/dev/null 2>&1; then :
12090 gl_cv_func_itold_works="guessing no"
12091else
12092 gl_cv_func_itold_works="guessing yes"
12093fi
12094rm -f conftest*
12095
12096 ;;
12097 *) gl_cv_func_itold_works="guessing yes" ;;
12098 esac
12099
8690e634
JK
12100else
12101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12102/* end confdefs.h. */
8690e634 12103
88b48903
WN
12104int i = -1;
12105volatile long double ld;
12106int main ()
8690e634 12107{
88b48903
WN
12108 ld += i * 1.0L;
12109 if (ld > 0)
12110 return 1;
12111 return 0;
12112}
12113_ACEOF
12114if ac_fn_c_try_run "$LINENO"; then :
12115 gl_cv_func_itold_works=yes
12116else
12117 gl_cv_func_itold_works=no
12118fi
12119rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12120 conftest.$ac_objext conftest.beam conftest.$ac_ext
12121fi
12122
12123
12124fi
12125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
12126$as_echo "$gl_cv_func_itold_works" >&6; }
12127 case "$gl_cv_func_itold_works" in
12128 *no)
12129 REPLACE_ITOLD=1
12130 FLOAT_H=float.h
12131 ;;
12132 esac
12133
12134 if test -n "$FLOAT_H"; then
12135
12136
12137
12138
12139
12140
12141
12142
12143 if test $gl_cv_have_include_next = yes; then
12144 gl_cv_next_float_h='<'float.h'>'
12145 else
12146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
12147$as_echo_n "checking absolute name of <float.h>... " >&6; }
12148if test "${gl_cv_next_float_h+set}" = set; then :
12149 $as_echo_n "(cached) " >&6
12150else
12151
12152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12153/* end confdefs.h. */
12154#include <float.h>
12155
12156_ACEOF
12157 case "$host_os" in
12158 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12159 *) gl_absname_cpp="$ac_cpp" ;;
12160 esac
12161
12162 case "$host_os" in
12163 mingw*)
12164 gl_dirsep_regex='[/\\]'
12165 ;;
12166 *)
12167 gl_dirsep_regex='\/'
12168 ;;
12169 esac
12170 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12171
12172 gl_header_literal_regex=`echo 'float.h' \
12173 | sed -e "$gl_make_literal_regex_sed"`
12174 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12175 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12176 s|^/[^/]|//&|
12177 p
12178 q
12179 }'
12180 gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12181 sed -n "$gl_absolute_header_sed"`'"'
12182
12183
12184fi
12185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
12186$as_echo "$gl_cv_next_float_h" >&6; }
12187 fi
12188 NEXT_FLOAT_H=$gl_cv_next_float_h
12189
12190 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12191 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12192 gl_next_as_first_directive='<'float.h'>'
12193 else
12194 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12195 gl_next_as_first_directive=$gl_cv_next_float_h
12196 fi
12197 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
12198
12199
12200
12201
12202 fi
12203
12204 if test -n "$FLOAT_H"; then
12205 GL_GENERATE_FLOAT_H_TRUE=
12206 GL_GENERATE_FLOAT_H_FALSE='#'
12207else
12208 GL_GENERATE_FLOAT_H_TRUE='#'
12209 GL_GENERATE_FLOAT_H_FALSE=
12210fi
12211
12212
12213
12214 if test $REPLACE_FLOAT_LDBL = 1; then
12215
12216
12217
12218
12219
12220
12221
12222
12223 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
12224
12225 fi
12226 if test $REPLACE_ITOLD = 1; then
12227
12228
12229
12230
12231
12232
12233
12234
12235 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
12236
12237 fi
12238
12239
12240
12241
12242
12243 FNMATCH_H=
12244 gl_fnmatch_required_lowercase=`
12245 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
12246 `
12247 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
12248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
12249$as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
12250if { as_var=$gl_fnmatch_cache_var; eval "test \"\${$as_var+set}\" = set"; }; then :
12251 $as_echo_n "(cached) " >&6
12252else
12253 if test $gl_fnmatch_required = GNU; then
12254 gl_fnmatch_gnu_start=
12255 gl_fnmatch_gnu_end=
12256 else
12257 gl_fnmatch_gnu_start='#if 0'
12258 gl_fnmatch_gnu_end='#endif'
12259 fi
12260 if test "$cross_compiling" = yes; then :
12261 eval "$gl_fnmatch_cache_var=\"guessing no\""
12262else
12263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12264/* end confdefs.h. */
12265#include <fnmatch.h>
12266 static int
12267 y (char const *pattern, char const *string, int flags)
12268 {
12269 return fnmatch (pattern, string, flags) == 0;
12270 }
12271 static int
12272 n (char const *pattern, char const *string, int flags)
12273 {
12274 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
12275 }
12276
12277int
12278main ()
12279{
12280char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
12281 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
12282 static char const A_1[] = { 'A' - 1, 0 };
12283 static char const A01[] = { 'A' + 1, 0 };
12284 static char const a_1[] = { 'a' - 1, 0 };
12285 static char const a01[] = { 'a' + 1, 0 };
12286 static char const bs_1[] = { '\\\\' - 1, 0 };
8690e634
JK
12287 static char const bs01[] = { '\\\\' + 1, 0 };
12288 int result = 0;
12289 if (!n ("a*", "", 0))
12290 return 1;
12291 if (!y ("a*", "abc", 0))
12292 return 1;
12293 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
12294 return 1;
12295 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
12296 return 2;
12297 if (!y ("a\\\\bc", "abc", 0))
12298 return 3;
12299 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
12300 return 3;
12301 if (!y ("*x", ".x", 0))
12302 return 4;
12303 if (!n ("*x", ".x", FNM_PERIOD))
12304 return 4;
12305 if (!y (Apat, "\\\\", 0))
12306 return 5;
12307 if (!y (Apat, "A", 0))
12308 return 5;
12309 if (!y (apat, "\\\\", 0))
12310 return 5;
12311 if (!y (apat, "a", 0))
12312 return 5;
12313 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
12314 return 5;
12315 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
12316 return 5;
12317 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
12318 return 5;
12319 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
12320 return 5;
12321 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
12322 return 5;
12323 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
12324 return 5;
12325 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
12326 return 5;
12327 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
12328 return 5;
12329 $gl_fnmatch_gnu_start
12330 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
12331 result |= 8;
12332 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
12333 result |= 16;
12334 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
12335 result |= 32;
12336 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
12337 result |= 64;
12338 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
12339 result |= 64;
12340 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
12341 result |= 64;
12342 $gl_fnmatch_gnu_end
12343 return result;
12344
12345 ;
12346 return 0;
12347}
12348_ACEOF
12349if ac_fn_c_try_run "$LINENO"; then :
12350 eval "$gl_fnmatch_cache_var=yes"
12351else
12352 eval "$gl_fnmatch_cache_var=no"
12353fi
12354rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12355 conftest.$ac_objext conftest.beam conftest.$ac_ext
12356fi
12357
12358
12359fi
12360eval ac_res=\$$gl_fnmatch_cache_var
12361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12362$as_echo "$ac_res" >&6; }
12363 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
12364 if test "$gl_fnmatch_result" = yes; then
12365 rm -f "$gl_source_base/fnmatch.h"
12366 else
12367 FNMATCH_H=fnmatch.h
12368 fi
12369
12370 if test -n "$FNMATCH_H"; then
12371 GL_GENERATE_FNMATCH_H_TRUE=
12372 GL_GENERATE_FNMATCH_H_FALSE='#'
12373else
12374 GL_GENERATE_FNMATCH_H_TRUE='#'
12375 GL_GENERATE_FNMATCH_H_FALSE=
12376fi
12377
12378
a512b375 12379 if test -n "$FNMATCH_H"; then
8690e634
JK
12380
12381
12382
12383
12384
12385
12386
12387
12388 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
12389
12390
12391
12392cat >>confdefs.h <<_ACEOF
12393#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
12394_ACEOF
12395
12396
12397 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
12398"
12399if test "x$ac_cv_have_decl_isblank" = x""yes; then :
12400 ac_have_decl=1
12401else
12402 ac_have_decl=0
12403fi
12404
12405cat >>confdefs.h <<_ACEOF
12406#define HAVE_DECL_ISBLANK $ac_have_decl
12407_ACEOF
12408
12409
c971b7fa 12410
c971b7fa 12411
a512b375 12412 fi
c971b7fa 12413
c971b7fa 12414
c971b7fa 12415
c971b7fa 12416
c971b7fa 12417
a512b375 12418 if test -n "$FNMATCH_H"; then
c971b7fa 12419
c971b7fa 12420
c971b7fa
PA
12421
12422
c971b7fa
PA
12423
12424
c971b7fa
PA
12425
12426
8690e634 12427 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
c971b7fa 12428
c971b7fa 12429
c971b7fa 12430
8690e634
JK
12431cat >>confdefs.h <<_ACEOF
12432#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
12433_ACEOF
c971b7fa
PA
12434
12435
8690e634
JK
12436 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
12437"
12438if test "x$ac_cv_have_decl_isblank" = x""yes; then :
12439 ac_have_decl=1
12440else
12441 ac_have_decl=0
c971b7fa 12442fi
c971b7fa 12443
8690e634
JK
12444cat >>confdefs.h <<_ACEOF
12445#define HAVE_DECL_ISBLANK $ac_have_decl
c971b7fa
PA
12446_ACEOF
12447
c971b7fa 12448
8690e634 12449
c971b7fa 12450
88b48903
WN
12451 fi
12452
12453
12454
12455 FREXP_LIBM=
12456 if test $gl_cv_func_frexp_no_libm = no; then
12457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5
12458$as_echo_n "checking whether frexp() can be used with libm... " >&6; }
12459if test "${gl_cv_func_frexp_in_libm+set}" = set; then :
12460 $as_echo_n "(cached) " >&6
12461else
12462
12463 save_LIBS="$LIBS"
12464 LIBS="$LIBS -lm"
12465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12466/* end confdefs.h. */
12467#include <math.h>
12468 double x;
12469int
12470main ()
12471{
12472int e; return frexp (x, &e) > 0;
12473 ;
12474 return 0;
12475}
12476_ACEOF
12477if ac_fn_c_try_link "$LINENO"; then :
12478 gl_cv_func_frexp_in_libm=yes
12479else
12480 gl_cv_func_frexp_in_libm=no
12481fi
12482rm -f core conftest.err conftest.$ac_objext \
12483 conftest$ac_exeext conftest.$ac_ext
12484 LIBS="$save_LIBS"
12485
12486fi
12487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5
12488$as_echo "$gl_cv_func_frexp_in_libm" >&6; }
12489 if test $gl_cv_func_frexp_in_libm = yes; then
12490 FREXP_LIBM=-lm
12491 fi
12492 fi
12493 if test $gl_cv_func_frexp_no_libm = yes \
12494 || test $gl_cv_func_frexp_in_libm = yes; then
12495 save_LIBS="$LIBS"
12496 LIBS="$LIBS $FREXP_LIBM"
12497
12498
12499
88b48903
WN
12500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
12501$as_echo_n "checking whether frexp works... " >&6; }
12502if test "${gl_cv_func_frexp_works+set}" = set; then :
12503 $as_echo_n "(cached) " >&6
12504else
12505
12506 if test "$cross_compiling" = yes; then :
12507 case "$host_os" in
12508 netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
12509 *) gl_cv_func_frexp_works="guessing yes";;
12510 esac
12511
12512else
12513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12514/* end confdefs.h. */
12515
12516#include <float.h>
12517#include <math.h>
12518#include <string.h>
12519#if HAVE_ALARM
12520# include <unistd.h>
12521#endif
12522/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
12523 ICC 10.0 has a bug when optimizing the expression -zero.
12524 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
12525 to PowerPC on Mac OS X 10.5. */
12526#if defined __hpux || defined __sgi || defined __ICC
12527static double
12528compute_minus_zero (void)
12529{
12530 return -DBL_MIN * DBL_MIN;
12531}
12532# define minus_zero compute_minus_zero ()
12533#else
12534double minus_zero = -0.0;
12535#endif
12536int main()
12537{
12538 int result = 0;
12539 int i;
12540 volatile double x;
12541 double zero = 0.0;
12542#if HAVE_ALARM
12543 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
12544 number. Let the test fail in this case. */
12545 alarm (5);
12546#endif
12547 /* Test on denormalized numbers. */
12548 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
12549 ;
12550 if (x > 0.0)
12551 {
12552 int exp;
12553 double y = frexp (x, &exp);
12554 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
12555 On NetBSD: y = 0.75. Correct: y = 0.5. */
12556 if (y != 0.5)
12557 result |= 1;
12558 }
12559 /* Test on infinite numbers. */
12560 x = 1.0 / zero;
12561 {
12562 int exp;
12563 double y = frexp (x, &exp);
12564 if (y != x)
12565 result |= 2;
12566 }
12567 /* Test on negative zero. */
12568 x = minus_zero;
12569 {
12570 int exp;
12571 double y = frexp (x, &exp);
12572 if (memcmp (&y, &x, sizeof x))
12573 result |= 4;
12574 }
12575 return result;
12576}
12577_ACEOF
12578if ac_fn_c_try_run "$LINENO"; then :
12579 gl_cv_func_frexp_works=yes
12580else
12581 gl_cv_func_frexp_works=no
12582fi
12583rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12584 conftest.$ac_objext conftest.beam conftest.$ac_ext
12585fi
12586
12587
12588fi
12589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
12590$as_echo "$gl_cv_func_frexp_works" >&6; }
12591
12592 LIBS="$save_LIBS"
12593 case "$gl_cv_func_frexp_works" in
12594 *yes) gl_func_frexp=yes ;;
12595 *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;;
12596 esac
12597 else
12598 gl_func_frexp=no
12599 fi
12600 if test $gl_func_frexp = yes; then
12601
12602$as_echo "#define HAVE_FREXP 1" >>confdefs.h
12603
12604 fi
12605
12606
12607 if test $gl_func_frexp != yes; then
12608
12609
12610
12611
12612
12613
12614
12615
12616 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
12617
12618 fi
12619
12620
12621
12622
12623
12624 GNULIB_FREXP=1
12625
12626
12627
12628
12629
12630$as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
12641"
12642if test "x$ac_cv_have_decl_frexpl" = x""yes; then :
12643
12644else
12645 HAVE_DECL_FREXPL=0
12646fi
12647
12648
12649 FREXPL_LIBM=
12650 if test $HAVE_DECL_FREXPL = 1; then
12651
12652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
12653$as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
12654if test "${gl_cv_func_frexpl_no_libm+set}" = set; then :
12655 $as_echo_n "(cached) " >&6
12656else
12657
12658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12659/* end confdefs.h. */
12660#include <math.h>
12661 long double x;
12662int
12663main ()
12664{
12665int e; return frexpl (x, &e) > 0;
12666 ;
12667 return 0;
12668}
12669_ACEOF
12670if ac_fn_c_try_link "$LINENO"; then :
12671 gl_cv_func_frexpl_no_libm=yes
12672else
12673 gl_cv_func_frexpl_no_libm=no
12674fi
12675rm -f core conftest.err conftest.$ac_objext \
12676 conftest$ac_exeext conftest.$ac_ext
12677
12678fi
12679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
12680$as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
12681
12682 if test $gl_cv_func_frexpl_no_libm = no; then
12683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5
12684$as_echo_n "checking whether frexpl() can be used with libm... " >&6; }
12685if test "${gl_cv_func_frexpl_in_libm+set}" = set; then :
12686 $as_echo_n "(cached) " >&6
12687else
12688
12689 save_LIBS="$LIBS"
12690 LIBS="$LIBS -lm"
12691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12692/* end confdefs.h. */
12693#include <math.h>
12694 long double x;
12695int
12696main ()
12697{
12698int e; return frexpl (x, &e) > 0;
12699 ;
12700 return 0;
12701}
12702_ACEOF
12703if ac_fn_c_try_link "$LINENO"; then :
12704 gl_cv_func_frexpl_in_libm=yes
12705else
12706 gl_cv_func_frexpl_in_libm=no
12707fi
12708rm -f core conftest.err conftest.$ac_objext \
12709 conftest$ac_exeext conftest.$ac_ext
12710 LIBS="$save_LIBS"
12711
12712fi
12713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5
12714$as_echo "$gl_cv_func_frexpl_in_libm" >&6; }
12715 if test $gl_cv_func_frexpl_in_libm = yes; then
12716 FREXPL_LIBM=-lm
12717 fi
12718 fi
12719 if test $gl_cv_func_frexpl_no_libm = yes \
12720 || test $gl_cv_func_frexpl_in_libm = yes; then
12721 save_LIBS="$LIBS"
12722 LIBS="$LIBS $FREXPL_LIBM"
12723
12724
12725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
12726$as_echo_n "checking whether frexpl works... " >&6; }
12727if test "${gl_cv_func_frexpl_works+set}" = set; then :
12728 $as_echo_n "(cached) " >&6
12729else
12730
12731 if test "$cross_compiling" = yes; then :
12732
12733 case "$host_os" in
12734 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
12735 gl_cv_func_frexpl_works="guessing no";;
12736 *) gl_cv_func_frexpl_works="guessing yes";;
12737 esac
12738
12739else
12740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12741/* end confdefs.h. */
12742
12743#include <float.h>
12744#include <math.h>
12745/* Override the values of <float.h>, like done in float.in.h. */
12746#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
12747# undef LDBL_MIN_EXP
12748# define LDBL_MIN_EXP (-16381)
12749#endif
12750#if defined __i386__ && defined __FreeBSD__
12751# undef LDBL_MIN_EXP
12752# define LDBL_MIN_EXP (-16381)
12753#endif
12754#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
12755# undef LDBL_MIN_EXP
12756# define LDBL_MIN_EXP DBL_MIN_EXP
12757#endif
12758#if defined __sgi && (LDBL_MANT_DIG >= 106)
12759# if defined __GNUC__
12760# undef LDBL_MIN_EXP
12761# define LDBL_MIN_EXP DBL_MIN_EXP
12762# endif
12763#endif
12764extern
12765#ifdef __cplusplus
12766"C"
12767#endif
12768long double frexpl (long double, int *);
12769int main()
12770{
12771 int result = 0;
12772 volatile long double x;
12773 /* Test on finite numbers that fails on AIX 5.1. */
12774 x = 16.0L;
12775 {
12776 int exp = -9999;
12777 frexpl (x, &exp);
12778 if (exp != 5)
12779 result |= 1;
12780 }
12781 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
12782 function returns an invalid (incorrectly normalized) value: it returns
12783 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
12784 but the correct result is
12785 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
12786 x = 1.01L;
12787 {
12788 int exp = -9999;
12789 long double y = frexpl (x, &exp);
12790 if (!(exp == 1 && y == 0.505L))
12791 result |= 2;
12792 }
12793 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
12794 LDBL_MAX_EXP = 16384.
12795 In the loop end test, we test x against Infinity, rather than comparing
12796 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
12797 {
12798 int i;
12799 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
12800 {
12801 int exp = -9999;
12802 frexpl (x, &exp);
12803 if (exp != i)
12804 {
12805 result |= 4;
12806 break;
12807 }
12808 }
12809 }
12810 /* Test on denormalized numbers. */
12811 {
12812 int i;
12813 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
12814 ;
12815 if (x > 0.0L)
12816 {
12817 int exp;
12818 long double y = frexpl (x, &exp);
12819 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
12820 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
12821 if (exp != LDBL_MIN_EXP - 1)
12822 result |= 8;
12823 }
12824 }
12825 /* Test on infinite numbers. */
12826 x = 1.0L / 0.0L;
12827 {
12828 int exp;
12829 long double y = frexpl (x, &exp);
12830 if (y != x)
12831 result |= 16;
12832 }
12833 return result;
12834}
12835_ACEOF
12836if ac_fn_c_try_run "$LINENO"; then :
12837 gl_cv_func_frexpl_works=yes
12838else
12839 gl_cv_func_frexpl_works=no
12840fi
12841rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12842 conftest.$ac_objext conftest.beam conftest.$ac_ext
12843fi
12844
12845
12846fi
12847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
12848$as_echo "$gl_cv_func_frexpl_works" >&6; }
12849
12850 LIBS="$save_LIBS"
12851 case "$gl_cv_func_frexpl_works" in
12852 *yes) gl_func_frexpl=yes ;;
12853 *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;;
12854 esac
12855 else
12856 gl_func_frexpl=no
12857 fi
12858 if test $gl_func_frexpl = yes; then
12859
12860$as_echo "#define HAVE_FREXPL 1" >>confdefs.h
12861
12862 fi
12863 fi
12864 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
12865 if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
12866
12867 FREXPL_LIBM="$FREXP_LIBM"
12868 else
12869 FREXPL_LIBM=
12870 fi
12871 fi
12872
12873
12874 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
12875
12876
12877
12878
12879
12880
12881
12882
12883 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
12884
12885 fi
12886
12887
12888
12889
12890
12891 GNULIB_FREXPL=1
12892
12893
12894
12895
12896
12897$as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
12898
12899
12900
12901
12902
12903
12904
12905
12906 PRIPTR_PREFIX=
12907 if test -n "$STDINT_H"; then
12908 PRIPTR_PREFIX='"l"'
12909 else
12910 for glpfx in '' l ll I64; do
12911 case $glpfx in
12912 '') gltype1='int';;
12913 l) gltype1='long int';;
12914 ll) gltype1='long long int';;
12915 I64) gltype1='__int64';;
12916 esac
12917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12918/* end confdefs.h. */
12919#include <stdint.h>
12920 extern intptr_t foo;
12921 extern $gltype1 foo;
12922int
12923main ()
12924{
12925
12926 ;
12927 return 0;
12928}
12929_ACEOF
12930if ac_fn_c_try_compile "$LINENO"; then :
12931 PRIPTR_PREFIX='"'$glpfx'"'
12932fi
12933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12934 test -n "$PRIPTR_PREFIX" && break
12935 done
12936 fi
12937
12938
12939
12940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
12941$as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
12942if test "${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+set}" = set; then :
12943 $as_echo_n "(cached) " >&6
12944else
12945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12946/* end confdefs.h. */
12947/* Work also in C++ mode. */
12948 #define __STDC_LIMIT_MACROS 1
12949
12950 /* Work if build is not clean. */
12951 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
12952
12953 #include <limits.h>
12954 #if HAVE_STDINT_H
12955 #include <stdint.h>
12956 #endif
12957
12958 #if defined INT32_MAX && defined INTMAX_MAX
12959 #define CONDITION (INT32_MAX < INTMAX_MAX)
12960 #elif HAVE_LONG_LONG_INT
12961 #define CONDITION (sizeof (int) < sizeof (long long int))
12962 #else
12963 #define CONDITION 0
12964 #endif
12965 int test[CONDITION ? 1 : -1];
12966int
12967main ()
12968{
12969
12970 ;
12971 return 0;
12972}
12973_ACEOF
12974if ac_fn_c_try_compile "$LINENO"; then :
12975 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
12976else
12977 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
12978fi
12979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12980fi
12981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
12982$as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
12983 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
12984 INT32_MAX_LT_INTMAX_MAX=1;
12985 else
12986 INT32_MAX_LT_INTMAX_MAX=0;
12987 fi
12988
12989
12990 if test $APPLE_UNIVERSAL_BUILD = 0; then
12991
12992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
12993$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
12994if test "${gl_cv_test_INT64_MAX_EQ_LONG_MAX+set}" = set; then :
12995 $as_echo_n "(cached) " >&6
12996else
12997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12998/* end confdefs.h. */
12999/* Work also in C++ mode. */
13000 #define __STDC_LIMIT_MACROS 1
13001
13002 /* Work if build is not clean. */
13003 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
13004
13005 #include <limits.h>
13006 #if HAVE_STDINT_H
13007 #include <stdint.h>
13008 #endif
13009
13010 #if defined INT64_MAX
13011 #define CONDITION (INT64_MAX == LONG_MAX)
13012 #elif HAVE_LONG_LONG_INT
13013 #define CONDITION (sizeof (long long int) == sizeof (long int))
13014 #else
13015 #define CONDITION 0
13016 #endif
13017 int test[CONDITION ? 1 : -1];
13018int
13019main ()
13020{
13021
13022 ;
13023 return 0;
13024}
13025_ACEOF
13026if ac_fn_c_try_compile "$LINENO"; then :
13027 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
13028else
13029 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
13030fi
13031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13032fi
13033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
13034$as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
13035 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
13036 INT64_MAX_EQ_LONG_MAX=1;
13037 else
13038 INT64_MAX_EQ_LONG_MAX=0;
13039 fi
13040
13041
13042 else
13043 INT64_MAX_EQ_LONG_MAX=-1
13044 fi
13045
13046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
13047$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
13048if test "${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+set}" = set; then :
13049 $as_echo_n "(cached) " >&6
13050else
13051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13052/* end confdefs.h. */
13053/* Work also in C++ mode. */
13054 #define __STDC_LIMIT_MACROS 1
13055
13056 /* Work if build is not clean. */
13057 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
13058
13059 #include <limits.h>
13060 #if HAVE_STDINT_H
13061 #include <stdint.h>
13062 #endif
13063
13064 #if defined UINT32_MAX && defined UINTMAX_MAX
13065 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
13066 #elif HAVE_LONG_LONG_INT
13067 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
13068 #else
13069 #define CONDITION 0
13070 #endif
13071 int test[CONDITION ? 1 : -1];
13072int
13073main ()
13074{
13075
13076 ;
13077 return 0;
13078}
13079_ACEOF
13080if ac_fn_c_try_compile "$LINENO"; then :
13081 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
13082else
13083 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
13084fi
13085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13086fi
13087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
13088$as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
13089 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
13090 UINT32_MAX_LT_UINTMAX_MAX=1;
13091 else
13092 UINT32_MAX_LT_UINTMAX_MAX=0;
13093 fi
13094
13095
13096 if test $APPLE_UNIVERSAL_BUILD = 0; then
13097
13098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
13099$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
13100if test "${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+set}" = set; then :
13101 $as_echo_n "(cached) " >&6
13102else
13103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13104/* end confdefs.h. */
13105/* Work also in C++ mode. */
13106 #define __STDC_LIMIT_MACROS 1
13107
13108 /* Work if build is not clean. */
13109 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
13110
13111 #include <limits.h>
13112 #if HAVE_STDINT_H
13113 #include <stdint.h>
13114 #endif
13115
13116 #if defined UINT64_MAX
13117 #define CONDITION (UINT64_MAX == ULONG_MAX)
13118 #elif HAVE_LONG_LONG_INT
13119 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
13120 #else
13121 #define CONDITION 0
13122 #endif
13123 int test[CONDITION ? 1 : -1];
13124int
13125main ()
13126{
13127
13128 ;
13129 return 0;
13130}
13131_ACEOF
13132if ac_fn_c_try_compile "$LINENO"; then :
13133 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
13134else
13135 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
13136fi
13137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13138fi
13139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
13140$as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
13141 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
13142 UINT64_MAX_EQ_ULONG_MAX=1;
13143 else
13144 UINT64_MAX_EQ_ULONG_MAX=0;
13145 fi
13146
13147
13148 else
13149 UINT64_MAX_EQ_ULONG_MAX=-1
13150 fi
13151
13152
13153
13154
13155
13156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
13157$as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
13158if test "${gl_cv_func_isnand_no_libm+set}" = set; then :
13159 $as_echo_n "(cached) " >&6
13160else
13161
13162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13163/* end confdefs.h. */
13164#include <math.h>
13165 #if __GNUC__ >= 4
13166 # undef isnand
13167 # define isnand(x) __builtin_isnan ((double)(x))
13168 #else
13169 # undef isnand
13170 # define isnand(x) isnan ((double)(x))
13171 #endif
13172 double x;
13173int
13174main ()
13175{
13176return isnand (x);
13177 ;
13178 return 0;
13179}
13180_ACEOF
13181if ac_fn_c_try_link "$LINENO"; then :
13182 gl_cv_func_isnand_no_libm=yes
13183else
13184 gl_cv_func_isnand_no_libm=no
13185fi
13186rm -f core conftest.err conftest.$ac_objext \
13187 conftest$ac_exeext conftest.$ac_ext
13188
13189fi
13190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
13191$as_echo "$gl_cv_func_isnand_no_libm" >&6; }
13192
13193 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
13194 if test $gl_cv_func_isnand_no_libm = yes; then
13195
13196$as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
13197
13198 fi
13199
13200 if test $gl_func_isnand_no_libm != yes; then
13201
13202
13203
13204
13205
13206
13207
13208
13209 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
13210
13211
13212
13213
13214 fi
13215
13216
13217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
13218$as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
13219if test "${gl_cv_func_isnanl_no_libm+set}" = set; then :
13220 $as_echo_n "(cached) " >&6
13221else
13222
13223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13224/* end confdefs.h. */
13225#include <math.h>
13226 #if __GNUC__ >= 4
13227 # undef isnanl
13228 # define isnanl(x) __builtin_isnanl ((long double)(x))
13229 #elif defined isnan
13230 # undef isnanl
13231 # define isnanl(x) isnan ((long double)(x))
13232 #endif
13233 long double x;
13234int
13235main ()
13236{
13237return isnanl (x);
13238 ;
13239 return 0;
13240}
13241_ACEOF
13242if ac_fn_c_try_link "$LINENO"; then :
13243 gl_cv_func_isnanl_no_libm=yes
13244else
13245 gl_cv_func_isnanl_no_libm=no
13246fi
13247rm -f core conftest.err conftest.$ac_objext \
13248 conftest$ac_exeext conftest.$ac_ext
13249
13250fi
13251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
13252$as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
13253
13254 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
13255 if test $gl_func_isnanl_no_libm = yes; then
13256
13257
13258
13259
13260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
13261$as_echo_n "checking whether isnanl works... " >&6; }
13262if test "${gl_cv_func_isnanl_works+set}" = set; then :
13263 $as_echo_n "(cached) " >&6
13264else
13265
13266 if test "$cross_compiling" = yes; then :
13267 case "$host_cpu" in
13268 # Guess no on ia64, x86_64, i386.
13269 ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";;
13270 *)
13271 case "$host_os" in
13272 netbsd*) gl_cv_func_isnanl_works="guessing no";;
13273 *) gl_cv_func_isnanl_works="guessing yes";;
13274 esac
13275 ;;
13276 esac
13277
13278else
13279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13280/* end confdefs.h. */
13281
13282#include <float.h>
13283#include <limits.h>
13284#include <math.h>
13285#if __GNUC__ >= 4
13286# undef isnanl
13287# define isnanl(x) __builtin_isnanl ((long double)(x))
13288#elif defined isnan
13289# undef isnanl
13290# define isnanl(x) isnan ((long double)(x))
13291#endif
13292#define NWORDS \
13293 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
13294typedef union { unsigned int word[NWORDS]; long double value; }
13295 memory_long_double;
13296/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
13297 runtime type conversion. */
13298#ifdef __sgi
13299static long double NaNl ()
13300{
13301 double zero = 0.0;
13302 return zero / zero;
13303}
13304#else
13305# define NaNl() (0.0L / 0.0L)
13306#endif
13307int main ()
13308{
13309 int result = 0;
13310
13311 if (!isnanl (NaNl ()))
13312 result |= 1;
13313
13314 {
13315 memory_long_double m;
13316 unsigned int i;
13317
13318 /* The isnanl function should be immune against changes in the sign bit and
13319 in the mantissa bits. The xor operation twiddles a bit that can only be
13320 a sign bit or a mantissa bit (since the exponent never extends to
13321 bit 31). */
13322 m.value = NaNl ();
13323 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
13324 for (i = 0; i < NWORDS; i++)
13325 m.word[i] |= 1;
13326 if (!isnanl (m.value))
13327 result |= 1;
13328 }
13329
13330#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
13331/* Representation of an 80-bit 'long double' as an initializer for a sequence
13332 of 'unsigned int' words. */
13333# ifdef WORDS_BIGENDIAN
13334# define LDBL80_WORDS(exponent,manthi,mantlo) \
13335 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
13336 ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
13337 (unsigned int) (mantlo) << 16 \
13338 }
13339# else
13340# define LDBL80_WORDS(exponent,manthi,mantlo) \
13341 { mantlo, manthi, exponent }
13342# endif
13343 { /* Quiet NaN. */
13344 static memory_long_double x =
13345 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
13346 if (!isnanl (x.value))
13347 result |= 2;
13348 }
13349 {
13350 /* Signalling NaN. */
13351 static memory_long_double x =
13352 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
13353 if (!isnanl (x.value))
13354 result |= 2;
13355 }
13356 /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
13357 Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
13358 Intel IA-64 Architecture Software Developer's Manual, Volume 1:
13359 Application Architecture.
13360 Table 5-2 "Floating-Point Register Encodings"
13361 Figure 5-6 "Memory to Floating-Point Register Data Translation"
13362 */
13363 { /* Pseudo-NaN. */
13364 static memory_long_double x =
13365 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
13366 if (!isnanl (x.value))
13367 result |= 4;
13368 }
13369 { /* Pseudo-Infinity. */
13370 static memory_long_double x =
13371 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
13372 if (!isnanl (x.value))
13373 result |= 8;
13374 }
13375 { /* Pseudo-Zero. */
13376 static memory_long_double x =
13377 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
13378 if (!isnanl (x.value))
13379 result |= 16;
13380 }
13381 { /* Unnormalized number. */
13382 static memory_long_double x =
13383 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
13384 if (!isnanl (x.value))
13385 result |= 32;
13386 }
13387 { /* Pseudo-Denormal. */
13388 static memory_long_double x =
13389 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
13390 if (!isnanl (x.value))
13391 result |= 64;
13392 }
13393#endif
13394
13395 return result;
13396}
13397_ACEOF
13398if ac_fn_c_try_run "$LINENO"; then :
13399 gl_cv_func_isnanl_works=yes
13400else
13401 gl_cv_func_isnanl_works=no
13402fi
13403rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13404 conftest.$ac_objext conftest.beam conftest.$ac_ext
13405fi
13406
13407
13408fi
13409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
13410$as_echo "$gl_cv_func_isnanl_works" >&6; }
13411
13412 case "$gl_cv_func_isnanl_works" in
13413 *yes) ;;
13414 *) gl_func_isnanl_no_libm=no ;;
13415 esac
13416 fi
13417 if test $gl_func_isnanl_no_libm = yes; then
13418
13419$as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
13420
13421 fi
13422
13423 if test $gl_func_isnanl_no_libm != yes; then
13424
13425
13426
13427
13428
13429
13430
13431
13432 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
13433
13434
13435
13436
13437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
13438$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
13439if test "${gl_cv_cc_long_double_expbit0+set}" = set; then :
13440 $as_echo_n "(cached) " >&6
13441else
13442
13443 if test "$cross_compiling" = yes; then :
13444
13445 gl_cv_cc_long_double_expbit0="unknown"
13446
13447else
13448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13449/* end confdefs.h. */
13450
13451#include <float.h>
13452#include <stddef.h>
13453#include <stdio.h>
13454#include <string.h>
13455#define NWORDS \
13456 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
13457typedef union { long double value; unsigned int word[NWORDS]; }
13458 memory_long_double;
13459static unsigned int ored_words[NWORDS];
13460static unsigned int anded_words[NWORDS];
13461static void add_to_ored_words (long double x)
13462{
13463 memory_long_double m;
13464 size_t i;
13465 /* Clear it first, in case
13466 sizeof (long double) < sizeof (memory_long_double). */
13467 memset (&m, 0, sizeof (memory_long_double));
13468 m.value = x;
13469 for (i = 0; i < NWORDS; i++)
13470 {
13471 ored_words[i] |= m.word[i];
13472 anded_words[i] &= m.word[i];
13473 }
13474}
13475int main ()
13476{
13477 size_t j;
13478 FILE *fp = fopen ("conftest.out", "w");
13479 if (fp == NULL)
13480 return 1;
13481 for (j = 0; j < NWORDS; j++)
13482 anded_words[j] = ~ (unsigned int) 0;
13483 add_to_ored_words (0.25L);
13484 add_to_ored_words (0.5L);
13485 add_to_ored_words (1.0L);
13486 add_to_ored_words (2.0L);
13487 add_to_ored_words (4.0L);
13488 /* Remove bits that are common (e.g. if representation of the first mantissa
13489 bit is explicit). */
13490 for (j = 0; j < NWORDS; j++)
13491 ored_words[j] &= ~anded_words[j];
13492 /* Now find the nonzero word. */
13493 for (j = 0; j < NWORDS; j++)
13494 if (ored_words[j] != 0)
13495 break;
13496 if (j < NWORDS)
13497 {
13498 size_t i;
13499 for (i = j + 1; i < NWORDS; i++)
13500 if (ored_words[i] != 0)
13501 {
13502 fprintf (fp, "unknown");
13503 return (fclose (fp) != 0);
13504 }
13505 for (i = 0; ; i++)
13506 if ((ored_words[j] >> i) & 1)
13507 {
13508 fprintf (fp, "word %d bit %d", (int) j, (int) i);
13509 return (fclose (fp) != 0);
13510 }
13511 }
13512 fprintf (fp, "unknown");
13513 return (fclose (fp) != 0);
13514}
13515
13516_ACEOF
13517if ac_fn_c_try_run "$LINENO"; then :
13518 gl_cv_cc_long_double_expbit0=`cat conftest.out`
13519else
13520 gl_cv_cc_long_double_expbit0="unknown"
13521fi
13522rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13523 conftest.$ac_objext conftest.beam conftest.$ac_ext
13524fi
13525
13526 rm -f conftest.out
13527
13528fi
13529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
13530$as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
13531 case "$gl_cv_cc_long_double_expbit0" in
13532 word*bit*)
13533 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
13534 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
13535
13536cat >>confdefs.h <<_ACEOF
13537#define LDBL_EXPBIT0_WORD $word
13538_ACEOF
13539
13540
13541cat >>confdefs.h <<_ACEOF
13542#define LDBL_EXPBIT0_BIT $bit
13543_ACEOF
13544
13545 ;;
13546 esac
13547
13548
13549
13550 fi
13551
13552
13553
13554
88b48903
WN
13555
13556
13557
13558
2196f55f 13559
88b48903
WN
13560 LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
13561
13562
13563
13564
f45c62c4
YQ
13565 if test $ac_cv_func_lstat = yes; then
13566
13567 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
13568 *no)
13569 REPLACE_LSTAT=1
13570 ;;
13571 esac
13572 else
13573 HAVE_LSTAT=0
13574 fi
13575
13576 if test $REPLACE_LSTAT = 1; then
13577
13578
13579
13580
13581
13582
13583
13584
13585 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
13586
13587 :
13588 fi
13589
13590
13591
13592
13593
13594 GNULIB_LSTAT=1
13595
13596
13597
13598
13599
13600$as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
13601
13602
13603
13604
13605
13606
6a29c58e
YQ
13607 if test $gl_cv_func_malloc_posix = yes; then
13608
13609$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
13610
13611 else
13612 REPLACE_MALLOC=1
13613 fi
13614
13615 if test $REPLACE_MALLOC = 1; then
13616
13617
13618
13619
13620
13621
13622
13623
13624 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
13625
13626 fi
13627
13628
13629
13630
13631
13632 GNULIB_MALLOC_POSIX=1
13633
13634
13635
13636
13637
13638$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
13639
13640
13641
13642
13643
13644
88b48903
WN
13645
13646
13647
13648
13649
88b48903 13650
c971b7fa 13651
c971b7fa 13652
98399780
YQ
13653
13654
13655
13656
88b48903
WN
13657 if test $gl_cv_have_include_next = yes; then
13658 gl_cv_next_math_h='<'math.h'>'
13659 else
13660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
13661$as_echo_n "checking absolute name of <math.h>... " >&6; }
13662if test "${gl_cv_next_math_h+set}" = set; then :
13663 $as_echo_n "(cached) " >&6
13664else
c971b7fa 13665
88b48903 13666 if test $ac_cv_header_math_h = yes; then
c971b7fa
PA
13667
13668
88b48903 13669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 13670/* end confdefs.h. */
88b48903 13671#include <math.h>
8690e634 13672
8690e634 13673_ACEOF
88b48903
WN
13674 case "$host_os" in
13675 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13676 *) gl_absname_cpp="$ac_cpp" ;;
13677 esac
8690e634 13678
88b48903
WN
13679 case "$host_os" in
13680 mingw*)
13681 gl_dirsep_regex='[/\\]'
13682 ;;
13683 *)
13684 gl_dirsep_regex='\/'
13685 ;;
13686 esac
13687 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
8690e634 13688
88b48903
WN
13689 gl_header_literal_regex=`echo 'math.h' \
13690 | sed -e "$gl_make_literal_regex_sed"`
13691 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13692 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13693 s|^/[^/]|//&|
13694 p
13695 q
13696 }'
13697 gl_cv_next_math_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13698 sed -n "$gl_absolute_header_sed"`'"'
13699 else
13700 gl_cv_next_math_h='<'math.h'>'
13701 fi
8690e634 13702
c971b7fa 13703
88b48903
WN
13704fi
13705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
13706$as_echo "$gl_cv_next_math_h" >&6; }
13707 fi
13708 NEXT_MATH_H=$gl_cv_next_math_h
c971b7fa 13709
88b48903
WN
13710 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13711 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13712 gl_next_as_first_directive='<'math.h'>'
13713 else
13714 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13715 gl_next_as_first_directive=$gl_cv_next_math_h
13716 fi
13717 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
8690e634 13718
c971b7fa 13719
c971b7fa
PA
13720
13721
c971b7fa 13722
88b48903
WN
13723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
13724$as_echo_n "checking whether NAN macro works... " >&6; }
13725if test "${gl_cv_header_math_nan_works+set}" = set; then :
c971b7fa
PA
13726 $as_echo_n "(cached) " >&6
13727else
8690e634
JK
13728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13729/* end confdefs.h. */
88b48903 13730#include <math.h>
c971b7fa
PA
13731int
13732main ()
13733{
88b48903
WN
13734/* Solaris 10 has a broken definition of NAN. Other platforms
13735 fail to provide NAN, or provide it only in C99 mode; this
13736 test only needs to fail when NAN is provided but wrong. */
13737 float f = 1.0f;
13738#ifdef NAN
13739 f = NAN;
13740#endif
13741 return f == 0;
c971b7fa
PA
13742 ;
13743 return 0;
13744}
13745_ACEOF
13746if ac_fn_c_try_compile "$LINENO"; then :
88b48903 13747 gl_cv_header_math_nan_works=yes
8690e634 13748else
88b48903 13749 gl_cv_header_math_nan_works=no
c971b7fa
PA
13750fi
13751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 13752fi
88b48903
WN
13753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
13754$as_echo "$gl_cv_header_math_nan_works" >&6; }
13755 if test $gl_cv_header_math_nan_works = no; then
13756 REPLACE_NAN=1
c971b7fa 13757 fi
88b48903
WN
13758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
13759$as_echo_n "checking whether HUGE_VAL works... " >&6; }
13760if test "${gl_cv_header_math_huge_val_works+set}" = set; then :
c971b7fa
PA
13761 $as_echo_n "(cached) " >&6
13762else
8690e634 13763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 13764/* end confdefs.h. */
88b48903 13765#include <math.h>
c971b7fa
PA
13766int
13767main ()
13768{
88b48903
WN
13769/* Solaris 10 has a broken definition of HUGE_VAL. */
13770 double d = HUGE_VAL;
13771 return d == 0;
c971b7fa
PA
13772 ;
13773 return 0;
13774}
13775_ACEOF
13776if ac_fn_c_try_compile "$LINENO"; then :
88b48903 13777 gl_cv_header_math_huge_val_works=yes
8690e634 13778else
88b48903 13779 gl_cv_header_math_huge_val_works=no
c971b7fa
PA
13780fi
13781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 13782fi
88b48903
WN
13783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
13784$as_echo "$gl_cv_header_math_huge_val_works" >&6; }
13785 if test $gl_cv_header_math_huge_val_works = no; then
13786 REPLACE_HUGE_VAL=1
8690e634 13787 fi
c971b7fa 13788
c971b7fa 13789
88b48903
WN
13790 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
13791 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
13792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
13793$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
13794if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
8690e634
JK
13795 $as_echo_n "(cached) " >&6
13796else
13797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13798/* end confdefs.h. */
88b48903 13799#include <math.h>
8690e634
JK
13800int
13801main ()
13802{
88b48903
WN
13803#undef $gl_func
13804 (void) $gl_func;
8690e634
JK
13805 ;
13806 return 0;
13807}
13808_ACEOF
13809if ac_fn_c_try_compile "$LINENO"; then :
88b48903 13810 eval "$as_gl_Symbol=yes"
c971b7fa 13811else
88b48903 13812 eval "$as_gl_Symbol=no"
c971b7fa 13813fi
8690e634
JK
13814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13815fi
88b48903
WN
13816eval ac_res=\$$as_gl_Symbol
13817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13818$as_echo "$ac_res" >&6; }
13819 eval as_val=\$$as_gl_Symbol
13820 if test "x$as_val" = x""yes; then :
13821 cat >>confdefs.h <<_ACEOF
13822#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
13823_ACEOF
c971b7fa 13824
88b48903
WN
13825 eval ac_cv_have_decl_$gl_func=yes
13826fi
13827 done
c971b7fa
PA
13828
13829
13830
13831
13832
c971b7fa 13833
c971b7fa 13834
c971b7fa 13835
c971b7fa
PA
13836
13837
c971b7fa 13838
8690e634
JK
13839
13840 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
13841
13842
13843
13844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
13845$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
13846if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
c971b7fa
PA
13847 $as_echo_n "(cached) " >&6
13848else
8690e634
JK
13849
13850 case "$host_os" in
13851 # Guess no on AIX and OSF/1.
13852 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
13853 # Guess yes otherwise.
13854 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
13855 esac
13856 if test $LOCALE_JA != none; then
13857 if test "$cross_compiling" = yes; then :
13858 :
13859else
c971b7fa
PA
13860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13861/* end confdefs.h. */
c971b7fa 13862
8690e634
JK
13863#include <locale.h>
13864#include <string.h>
13865/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13866 <wchar.h>.
13867 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13868 included before <wchar.h>. */
13869#include <stddef.h>
13870#include <stdio.h>
13871#include <time.h>
13872#include <wchar.h>
13873int main ()
c971b7fa 13874{
8690e634
JK
13875 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
13876 {
13877 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
13878 mbstate_t state;
13879 wchar_t wc;
13880
13881 memset (&state, '\0', sizeof (mbstate_t));
13882 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
13883 if (mbsinit (&state))
13884 return 1;
13885 }
c971b7fa
PA
13886 return 0;
13887}
13888_ACEOF
8690e634
JK
13889if ac_fn_c_try_run "$LINENO"; then :
13890 gl_cv_func_mbrtowc_incomplete_state=yes
c971b7fa 13891else
8690e634 13892 gl_cv_func_mbrtowc_incomplete_state=no
c971b7fa 13893fi
8690e634
JK
13894rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13895 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 13896fi
c971b7fa 13897
8690e634 13898 fi
c971b7fa 13899
8690e634
JK
13900fi
13901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
13902$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
c971b7fa 13903
c971b7fa 13904
c971b7fa 13905
c971b7fa 13906
8690e634
JK
13907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
13908$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
13909if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
c971b7fa
PA
13910 $as_echo_n "(cached) " >&6
13911else
13912
8690e634
JK
13913 case "$host_os" in
13914 # Guess no on Solaris 8.
13915 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
13916 # Guess yes otherwise.
13917 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
13918 esac
13919 if test $LOCALE_ZH_CN != none; then
13920 if test "$cross_compiling" = yes; then :
13921 :
13922else
13923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
13924/* end confdefs.h. */
13925
8690e634
JK
13926#include <locale.h>
13927#include <stdlib.h>
13928#include <string.h>
13929/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13930 <wchar.h>.
13931 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13932 included before <wchar.h>. */
13933#include <stddef.h>
13934#include <stdio.h>
13935#include <time.h>
13936#include <wchar.h>
13937int main ()
c971b7fa 13938{
8690e634
JK
13939 /* This fails on Solaris 8:
13940 mbrtowc returns 2, and sets wc to 0x00F0.
13941 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
13942 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
13943 {
13944 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
13945 mbstate_t state;
13946 wchar_t wc;
13947
13948 memset (&state, '\0', sizeof (mbstate_t));
13949 if (mbrtowc (&wc, input + 3, 6, &state) != 4
13950 && mbtowc (&wc, input + 3, 6) == 4)
13951 return 1;
13952 }
c971b7fa
PA
13953 return 0;
13954}
13955_ACEOF
8690e634
JK
13956if ac_fn_c_try_run "$LINENO"; then :
13957 gl_cv_func_mbrtowc_sanitycheck=yes
c971b7fa 13958else
8690e634 13959 gl_cv_func_mbrtowc_sanitycheck=no
c971b7fa 13960fi
8690e634
JK
13961rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13962 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 13963fi
c971b7fa 13964
8690e634 13965 fi
c971b7fa 13966
8690e634
JK
13967fi
13968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
13969$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
13970
13971 REPLACE_MBSTATE_T=0
13972 case "$gl_cv_func_mbrtowc_incomplete_state" in
13973 *yes) ;;
13974 *) REPLACE_MBSTATE_T=1 ;;
13975 esac
13976 case "$gl_cv_func_mbrtowc_sanitycheck" in
13977 *yes) ;;
13978 *) REPLACE_MBSTATE_T=1 ;;
13979 esac
c971b7fa 13980 else
8690e634 13981 REPLACE_MBSTATE_T=1
c971b7fa
PA
13982 fi
13983
13984
13985
8690e634
JK
13986 if test $ac_cv_func_mbrtowc = no; then
13987 HAVE_MBRTOWC=0
13988 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
13989/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13990 <wchar.h>.
13991 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13992 included before <wchar.h>. */
13993#include <stddef.h>
13994#include <stdio.h>
13995#include <time.h>
13996#include <wchar.h>
c971b7fa 13997
8690e634
JK
13998"
13999if test "x$ac_cv_have_decl_mbrtowc" = x""yes; then :
14000 ac_have_decl=1
14001else
14002 ac_have_decl=0
c971b7fa 14003fi
c971b7fa 14004
8690e634
JK
14005cat >>confdefs.h <<_ACEOF
14006#define HAVE_DECL_MBRTOWC $ac_have_decl
14007_ACEOF
c971b7fa 14008
8690e634
JK
14009 if test $ac_cv_have_decl_mbrtowc = yes; then
14010 REPLACE_MBRTOWC=1
14011 fi
14012 else
14013 if test $REPLACE_MBSTATE_T = 1; then
14014 REPLACE_MBRTOWC=1
14015 else
c971b7fa
PA
14016
14017
14018
8690e634
JK
14019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
14020$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
14021if test "${gl_cv_func_mbrtowc_null_arg1+set}" = set; then :
14022 $as_echo_n "(cached) " >&6
c971b7fa 14023else
c971b7fa 14024
8690e634
JK
14025 case "$host_os" in
14026 # Guess no on Solaris.
14027 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
14028 # Guess yes otherwise.
14029 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
14030 esac
14031 if test $LOCALE_FR_UTF8 != none; then
14032 if test "$cross_compiling" = yes; then :
14033 :
14034else
14035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
14036/* end confdefs.h. */
14037
8690e634
JK
14038#include <locale.h>
14039#include <stdlib.h>
14040#include <string.h>
14041/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14042 <wchar.h>.
14043 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14044 included before <wchar.h>. */
14045#include <stddef.h>
14046#include <stdio.h>
14047#include <time.h>
14048#include <wchar.h>
14049int main ()
14050{
14051 int result = 0;
14052
14053 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
14054 {
14055 char input[] = "\303\237er";
14056 mbstate_t state;
14057 wchar_t wc;
14058 size_t ret;
14059
14060 memset (&state, '\0', sizeof (mbstate_t));
14061 wc = (wchar_t) 0xBADFACE;
14062 ret = mbrtowc (&wc, input, 5, &state);
14063 if (ret != 2)
14064 result |= 1;
14065 if (!mbsinit (&state))
14066 result |= 2;
c971b7fa 14067
8690e634
JK
14068 memset (&state, '\0', sizeof (mbstate_t));
14069 ret = mbrtowc (NULL, input, 5, &state);
14070 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
14071 result |= 4;
14072 if (!mbsinit (&state))
14073 result |= 8;
14074 }
14075 return result;
14076}
c971b7fa 14077_ACEOF
8690e634
JK
14078if ac_fn_c_try_run "$LINENO"; then :
14079 gl_cv_func_mbrtowc_null_arg1=yes
14080else
14081 gl_cv_func_mbrtowc_null_arg1=no
14082fi
14083rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14084 conftest.$ac_objext conftest.beam conftest.$ac_ext
14085fi
c971b7fa 14086
8690e634 14087 fi
c971b7fa 14088
c971b7fa 14089fi
8690e634
JK
14090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
14091$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
c971b7fa 14092
c971b7fa 14093
c971b7fa 14094
c971b7fa 14095
8690e634
JK
14096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
14097$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
14098if test "${gl_cv_func_mbrtowc_null_arg2+set}" = set; then :
14099 $as_echo_n "(cached) " >&6
14100else
c971b7fa 14101
8690e634
JK
14102 case "$host_os" in
14103 # Guess no on OSF/1.
14104 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
14105 # Guess yes otherwise.
14106 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
14107 esac
14108 if test $LOCALE_FR_UTF8 != none; then
14109 if test "$cross_compiling" = yes; then :
c971b7fa 14110 :
8690e634
JK
14111else
14112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14113/* end confdefs.h. */
14114
14115#include <locale.h>
14116#include <string.h>
14117/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14118 <wchar.h>.
14119 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14120 included before <wchar.h>. */
14121#include <stddef.h>
14122#include <stdio.h>
14123#include <time.h>
14124#include <wchar.h>
14125int main ()
14126{
14127 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
14128 {
14129 mbstate_t state;
14130 wchar_t wc;
14131 int ret;
14132
14133 memset (&state, '\0', sizeof (mbstate_t));
14134 wc = (wchar_t) 0xBADFACE;
14135 mbrtowc (&wc, NULL, 5, &state);
14136 /* Check that wc was not modified. */
14137 if (wc != (wchar_t) 0xBADFACE)
14138 return 1;
14139 }
14140 return 0;
14141}
14142_ACEOF
14143if ac_fn_c_try_run "$LINENO"; then :
14144 gl_cv_func_mbrtowc_null_arg2=yes
14145else
14146 gl_cv_func_mbrtowc_null_arg2=no
14147fi
14148rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14149 conftest.$ac_objext conftest.beam conftest.$ac_ext
14150fi
14151
14152 fi
14153
14154fi
14155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
14156$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
c971b7fa
PA
14157
14158
14159
14160
14161
14162
8690e634
JK
14163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
14164$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
14165if test "${gl_cv_func_mbrtowc_retval+set}" = set; then :
14166 $as_echo_n "(cached) " >&6
14167else
14168
14169 case "$host_os" in
14170 # Guess no on HP-UX, Solaris, native Windows.
14171 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
14172 # Guess yes otherwise.
14173 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
14174 esac
14175 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
14176 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
14177 if test "$cross_compiling" = yes; then :
c971b7fa 14178 :
8690e634
JK
14179else
14180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14181/* end confdefs.h. */
c971b7fa 14182
8690e634
JK
14183#include <locale.h>
14184#include <string.h>
14185/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14186 <wchar.h>.
14187 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14188 included before <wchar.h>. */
14189#include <stddef.h>
14190#include <stdio.h>
14191#include <time.h>
14192#include <wchar.h>
14193int main ()
14194{
14195 int result = 0;
14196 int found_some_locale = 0;
14197 /* This fails on Solaris. */
14198 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
14199 {
14200 char input[] = "B\303\274\303\237er"; /* "Büßer" */
14201 mbstate_t state;
14202 wchar_t wc;
14203
14204 memset (&state, '\0', sizeof (mbstate_t));
14205 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
14206 {
14207 input[1] = '\0';
14208 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
14209 result |= 1;
14210 }
14211 found_some_locale = 1;
14212 }
14213 /* This fails on HP-UX 11.11. */
14214 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
14215 {
14216 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
14217 mbstate_t state;
14218 wchar_t wc;
14219
14220 memset (&state, '\0', sizeof (mbstate_t));
14221 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
14222 {
14223 input[1] = '\0';
14224 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
14225 result |= 2;
14226 }
14227 found_some_locale = 1;
14228 }
14229 /* This fails on native Windows. */
14230 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
14231 {
14232 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
14233 mbstate_t state;
14234 wchar_t wc;
14235
14236 memset (&state, '\0', sizeof (mbstate_t));
14237 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
14238 {
14239 input[3] = '\0';
14240 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
14241 result |= 4;
14242 }
14243 found_some_locale = 1;
14244 }
14245 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
14246 {
14247 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
14248 mbstate_t state;
14249 wchar_t wc;
14250
14251 memset (&state, '\0', sizeof (mbstate_t));
14252 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
14253 {
14254 input[3] = '\0';
14255 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
14256 result |= 8;
14257 }
14258 found_some_locale = 1;
14259 }
14260 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
14261 {
14262 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
14263 mbstate_t state;
14264 wchar_t wc;
14265
14266 memset (&state, '\0', sizeof (mbstate_t));
14267 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
14268 {
14269 input[3] = '\0';
14270 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
14271 result |= 16;
14272 }
14273 found_some_locale = 1;
14274 }
14275 return (found_some_locale ? result : 77);
14276}
14277_ACEOF
14278if ac_fn_c_try_run "$LINENO"; then :
14279 gl_cv_func_mbrtowc_retval=yes
14280else
14281 if test $? != 77; then
14282 gl_cv_func_mbrtowc_retval=no
14283 fi
c971b7fa 14284
8690e634
JK
14285fi
14286rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14287 conftest.$ac_objext conftest.beam conftest.$ac_ext
14288fi
c971b7fa 14289
8690e634 14290 fi
c971b7fa 14291
8690e634
JK
14292fi
14293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
14294$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
c971b7fa
PA
14295
14296
14297
14298
8690e634
JK
14299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
14300$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
14301if test "${gl_cv_func_mbrtowc_nul_retval+set}" = set; then :
c971b7fa
PA
14302 $as_echo_n "(cached) " >&6
14303else
8690e634
JK
14304
14305 case "$host_os" in
14306 # Guess no on Solaris 8 and 9.
14307 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
14308 # Guess yes otherwise.
14309 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
14310 esac
14311 if test $LOCALE_ZH_CN != none; then
14312 if test "$cross_compiling" = yes; then :
14313 :
c971b7fa
PA
14314else
14315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14316/* end confdefs.h. */
14317
8690e634 14318#include <locale.h>
c971b7fa 14319#include <string.h>
8690e634
JK
14320/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14321 <wchar.h>.
14322 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14323 included before <wchar.h>. */
14324#include <stddef.h>
14325#include <stdio.h>
14326#include <time.h>
14327#include <wchar.h>
14328int main ()
c971b7fa 14329{
8690e634
JK
14330 /* This fails on Solaris 8 and 9. */
14331 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
c971b7fa 14332 {
8690e634
JK
14333 mbstate_t state;
14334 wchar_t wc;
c971b7fa 14335
8690e634
JK
14336 memset (&state, '\0', sizeof (mbstate_t));
14337 if (mbrtowc (&wc, "", 1, &state) != 0)
14338 return 1;
14339 }
c971b7fa
PA
14340 return 0;
14341}
14342_ACEOF
14343if ac_fn_c_try_run "$LINENO"; then :
8690e634 14344 gl_cv_func_mbrtowc_nul_retval=yes
c971b7fa 14345else
8690e634 14346 gl_cv_func_mbrtowc_nul_retval=no
c971b7fa
PA
14347fi
14348rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14349 conftest.$ac_objext conftest.beam conftest.$ac_ext
14350fi
14351
8690e634
JK
14352 fi
14353
c971b7fa 14354fi
8690e634
JK
14355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
14356$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
14357
14358 case "$gl_cv_func_mbrtowc_null_arg1" in
14359 *yes) ;;
14360 *)
14361$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
14362
14363 REPLACE_MBRTOWC=1
14364 ;;
14365 esac
14366 case "$gl_cv_func_mbrtowc_null_arg2" in
14367 *yes) ;;
14368 *)
14369$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
14370
14371 REPLACE_MBRTOWC=1
14372 ;;
14373 esac
14374 case "$gl_cv_func_mbrtowc_retval" in
14375 *yes) ;;
14376 *)
14377$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
14378
14379 REPLACE_MBRTOWC=1
14380 ;;
14381 esac
14382 case "$gl_cv_func_mbrtowc_nul_retval" in
14383 *yes) ;;
14384 *)
14385$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
14386
14387 REPLACE_MBRTOWC=1
14388 ;;
14389 esac
c971b7fa
PA
14390 fi
14391 fi
14392
a512b375 14393 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
c971b7fa 14394
c971b7fa 14395
c971b7fa
PA
14396
14397
14398
14399
14400
14401
8690e634
JK
14402 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
14403
14404
14405 :
c971b7fa 14406
a512b375 14407 fi
c971b7fa 14408
8690e634
JK
14409
14410
14411
14412
14413 GNULIB_MBRTOWC=1
14414
14415
14416
14417
14418
14419$as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429
14430
14431
c971b7fa 14432
c971b7fa 14433
8690e634 14434 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
c971b7fa 14435
8690e634
JK
14436
14437
14438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
14439$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
14440if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
14441 $as_echo_n "(cached) " >&6
14442else
14443
14444 case "$host_os" in
14445 # Guess no on AIX and OSF/1.
14446 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
14447 # Guess yes otherwise.
14448 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
14449 esac
14450 if test $LOCALE_JA != none; then
14451 if test "$cross_compiling" = yes; then :
14452 :
c971b7fa
PA
14453else
14454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14455/* end confdefs.h. */
14456
8690e634
JK
14457#include <locale.h>
14458#include <string.h>
14459/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14460 <wchar.h>.
14461 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14462 included before <wchar.h>. */
14463#include <stddef.h>
14464#include <stdio.h>
14465#include <time.h>
14466#include <wchar.h>
14467int main ()
c971b7fa 14468{
8690e634 14469 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
c971b7fa 14470 {
8690e634
JK
14471 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
14472 mbstate_t state;
14473 wchar_t wc;
14474
14475 memset (&state, '\0', sizeof (mbstate_t));
14476 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
14477 if (mbsinit (&state))
14478 return 1;
c971b7fa 14479 }
c971b7fa
PA
14480 return 0;
14481}
14482_ACEOF
14483if ac_fn_c_try_run "$LINENO"; then :
8690e634 14484 gl_cv_func_mbrtowc_incomplete_state=yes
c971b7fa 14485else
8690e634 14486 gl_cv_func_mbrtowc_incomplete_state=no
c971b7fa
PA
14487fi
14488rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14489 conftest.$ac_objext conftest.beam conftest.$ac_ext
14490fi
14491
8690e634 14492 fi
c971b7fa
PA
14493
14494fi
8690e634
JK
14495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
14496$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
c971b7fa
PA
14497
14498
c971b7fa
PA
14499
14500
8690e634
JK
14501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
14502$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
14503if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
c971b7fa
PA
14504 $as_echo_n "(cached) " >&6
14505else
8690e634
JK
14506
14507 case "$host_os" in
14508 # Guess no on Solaris 8.
14509 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
14510 # Guess yes otherwise.
14511 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
14512 esac
14513 if test $LOCALE_ZH_CN != none; then
14514 if test "$cross_compiling" = yes; then :
14515 :
14516else
c971b7fa
PA
14517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14518/* end confdefs.h. */
8690e634
JK
14519
14520#include <locale.h>
14521#include <stdlib.h>
14522#include <string.h>
14523/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14524 <wchar.h>.
14525 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14526 included before <wchar.h>. */
c971b7fa 14527#include <stddef.h>
8690e634
JK
14528#include <stdio.h>
14529#include <time.h>
14530#include <wchar.h>
14531int main ()
c971b7fa 14532{
8690e634
JK
14533 /* This fails on Solaris 8:
14534 mbrtowc returns 2, and sets wc to 0x00F0.
14535 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
14536 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
14537 {
14538 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
14539 mbstate_t state;
14540 wchar_t wc;
14541
14542 memset (&state, '\0', sizeof (mbstate_t));
14543 if (mbrtowc (&wc, input + 3, 6, &state) != 4
14544 && mbtowc (&wc, input + 3, 6) == 4)
14545 return 1;
14546 }
c971b7fa
PA
14547 return 0;
14548}
14549_ACEOF
8690e634
JK
14550if ac_fn_c_try_run "$LINENO"; then :
14551 gl_cv_func_mbrtowc_sanitycheck=yes
c971b7fa 14552else
8690e634 14553 gl_cv_func_mbrtowc_sanitycheck=no
c971b7fa 14554fi
8690e634
JK
14555rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14556 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 14557fi
c971b7fa 14558
8690e634
JK
14559 fi
14560
14561fi
14562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
14563$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
c971b7fa 14564
8690e634
JK
14565 REPLACE_MBSTATE_T=0
14566 case "$gl_cv_func_mbrtowc_incomplete_state" in
14567 *yes) ;;
14568 *) REPLACE_MBSTATE_T=1 ;;
14569 esac
14570 case "$gl_cv_func_mbrtowc_sanitycheck" in
14571 *yes) ;;
14572 *) REPLACE_MBSTATE_T=1 ;;
14573 esac
14574 else
14575 REPLACE_MBSTATE_T=1
c971b7fa
PA
14576 fi
14577
c971b7fa 14578
8690e634 14579
8690e634
JK
14580 if test $ac_cv_func_mbsinit = no; then
14581 HAVE_MBSINIT=0
14582 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
14583/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14584 <wchar.h>.
14585 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14586 included before <wchar.h>. */
14587#include <stddef.h>
14588#include <stdio.h>
14589#include <time.h>
14590#include <wchar.h>
14591
14592"
14593if test "x$ac_cv_have_decl_mbsinit" = x""yes; then :
14594 ac_have_decl=1
14595else
14596 ac_have_decl=0
c971b7fa 14597fi
c971b7fa 14598
8690e634
JK
14599cat >>confdefs.h <<_ACEOF
14600#define HAVE_DECL_MBSINIT $ac_have_decl
c971b7fa 14601_ACEOF
c971b7fa 14602
8690e634
JK
14603 if test $ac_cv_have_decl_mbsinit = yes; then
14604 REPLACE_MBSINIT=1
14605 fi
14606 else
14607 if test $REPLACE_MBSTATE_T = 1; then
14608 REPLACE_MBSINIT=1
14609 else
14610 case "$host_os" in
14611 mingw*) REPLACE_MBSINIT=1 ;;
14612 esac
14613 fi
14614 fi
c971b7fa 14615
a512b375 14616 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
c971b7fa
PA
14617
14618
14619
14620
14621
14622
14623
14624
8690e634 14625 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
c971b7fa
PA
14626
14627
8690e634 14628 :
c971b7fa 14629
a512b375 14630 fi
c971b7fa 14631
c971b7fa 14632
c971b7fa 14633
c971b7fa
PA
14634
14635
8690e634 14636 GNULIB_MBSINIT=1
c971b7fa 14637
c971b7fa
PA
14638
14639
14640
14641
8690e634 14642$as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
c971b7fa
PA
14643
14644
c971b7fa 14645
c971b7fa 14646
c971b7fa
PA
14647
14648
14649
c971b7fa 14650
c971b7fa
PA
14651
14652
14653
14654
8690e634
JK
14655
14656 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
c971b7fa
PA
14657
14658
14659
8690e634
JK
14660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
14661$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
14662if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
14663 $as_echo_n "(cached) " >&6
14664else
c971b7fa 14665
8690e634
JK
14666 case "$host_os" in
14667 # Guess no on AIX and OSF/1.
14668 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
14669 # Guess yes otherwise.
14670 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
c971b7fa 14671 esac
8690e634
JK
14672 if test $LOCALE_JA != none; then
14673 if test "$cross_compiling" = yes; then :
14674 :
14675else
14676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 14677/* end confdefs.h. */
c971b7fa 14678
8690e634
JK
14679#include <locale.h>
14680#include <string.h>
14681/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14682 <wchar.h>.
14683 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14684 included before <wchar.h>. */
14685#include <stddef.h>
14686#include <stdio.h>
14687#include <time.h>
14688#include <wchar.h>
14689int main ()
14690{
14691 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
14692 {
14693 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
14694 mbstate_t state;
14695 wchar_t wc;
14696
14697 memset (&state, '\0', sizeof (mbstate_t));
14698 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
14699 if (mbsinit (&state))
14700 return 1;
14701 }
c971b7fa
PA
14702 return 0;
14703}
14704_ACEOF
8690e634
JK
14705if ac_fn_c_try_run "$LINENO"; then :
14706 gl_cv_func_mbrtowc_incomplete_state=yes
14707else
14708 gl_cv_func_mbrtowc_incomplete_state=no
14709fi
14710rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14711 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 14712fi
c971b7fa 14713
8690e634 14714 fi
c971b7fa 14715
8690e634
JK
14716fi
14717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
14718$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
c971b7fa 14719
8690e634
JK
14720
14721
14722
14723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
14724$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
14725if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
c971b7fa
PA
14726 $as_echo_n "(cached) " >&6
14727else
8690e634
JK
14728
14729 case "$host_os" in
14730 # Guess no on Solaris 8.
14731 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
14732 # Guess yes otherwise.
14733 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
14734 esac
14735 if test $LOCALE_ZH_CN != none; then
14736 if test "$cross_compiling" = yes; then :
14737 :
14738else
c971b7fa
PA
14739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14740/* end confdefs.h. */
c971b7fa 14741
8690e634
JK
14742#include <locale.h>
14743#include <stdlib.h>
14744#include <string.h>
14745/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14746 <wchar.h>.
14747 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14748 included before <wchar.h>. */
14749#include <stddef.h>
14750#include <stdio.h>
14751#include <time.h>
14752#include <wchar.h>
14753int main ()
c971b7fa 14754{
8690e634
JK
14755 /* This fails on Solaris 8:
14756 mbrtowc returns 2, and sets wc to 0x00F0.
14757 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
14758 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
14759 {
14760 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
14761 mbstate_t state;
14762 wchar_t wc;
14763
14764 memset (&state, '\0', sizeof (mbstate_t));
14765 if (mbrtowc (&wc, input + 3, 6, &state) != 4
14766 && mbtowc (&wc, input + 3, 6) == 4)
14767 return 1;
14768 }
c971b7fa
PA
14769 return 0;
14770}
14771_ACEOF
8690e634
JK
14772if ac_fn_c_try_run "$LINENO"; then :
14773 gl_cv_func_mbrtowc_sanitycheck=yes
c971b7fa 14774else
8690e634 14775 gl_cv_func_mbrtowc_sanitycheck=no
c971b7fa 14776fi
8690e634
JK
14777rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14778 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 14779fi
8690e634
JK
14780
14781 fi
14782
14783fi
14784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
14785$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
14786
14787 REPLACE_MBSTATE_T=0
14788 case "$gl_cv_func_mbrtowc_incomplete_state" in
14789 *yes) ;;
14790 *) REPLACE_MBSTATE_T=1 ;;
14791 esac
14792 case "$gl_cv_func_mbrtowc_sanitycheck" in
14793 *yes) ;;
14794 *) REPLACE_MBSTATE_T=1 ;;
14795 esac
c971b7fa 14796 else
8690e634 14797 REPLACE_MBSTATE_T=1
c971b7fa
PA
14798 fi
14799
14800
c971b7fa 14801
8690e634
JK
14802 if test $ac_cv_func_mbsrtowcs = no; then
14803 HAVE_MBSRTOWCS=0
14804 ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
14805/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14806 <wchar.h>.
14807 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14808 included before <wchar.h>. */
14809#include <stddef.h>
14810#include <stdio.h>
14811#include <time.h>
14812#include <wchar.h>
14813
14814"
14815if test "x$ac_cv_have_decl_mbsrtowcs" = x""yes; then :
14816 ac_have_decl=1
c971b7fa 14817else
8690e634 14818 ac_have_decl=0
c971b7fa 14819fi
c971b7fa 14820
8690e634
JK
14821cat >>confdefs.h <<_ACEOF
14822#define HAVE_DECL_MBSRTOWCS $ac_have_decl
14823_ACEOF
c971b7fa 14824
8690e634
JK
14825 if test $ac_cv_have_decl_mbsrtowcs = yes; then
14826 REPLACE_MBSRTOWCS=1
14827 fi
c971b7fa 14828 else
8690e634
JK
14829 if test $REPLACE_MBSTATE_T = 1; then
14830 REPLACE_MBSRTOWCS=1
14831 else
c971b7fa 14832
8690e634
JK
14833
14834
14835
14836
14837
14838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
14839$as_echo_n "checking whether mbsrtowcs works... " >&6; }
14840if test "${gl_cv_func_mbsrtowcs_works+set}" = set; then :
c971b7fa
PA
14841 $as_echo_n "(cached) " >&6
14842else
8690e634
JK
14843
14844 case "$host_os" in
14845 # Guess no on HP-UX, Solaris, mingw.
14846 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
14847 # Guess yes otherwise.
14848 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
14849 esac
14850 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
14851 if test "$cross_compiling" = yes; then :
14852 :
14853else
c971b7fa
PA
14854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14855/* end confdefs.h. */
c971b7fa 14856
8690e634
JK
14857#include <locale.h>
14858#include <string.h>
14859/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14860 <wchar.h>.
14861 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14862 included before <wchar.h>. */
14863#include <stddef.h>
14864#include <stdio.h>
14865#include <time.h>
14866#include <wchar.h>
14867int main ()
c971b7fa 14868{
8690e634
JK
14869 int result = 0;
14870 /* Test whether the function supports a NULL destination argument.
14871 This fails on native Windows. */
14872 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
14873 {
14874 const char input[] = "\337er";
14875 const char *src = input;
14876 mbstate_t state;
c971b7fa 14877
8690e634
JK
14878 memset (&state, '\0', sizeof (mbstate_t));
14879 if (mbsrtowcs (NULL, &src, 1, &state) != 3
14880 || src != input)
14881 result |= 1;
14882 }
14883 /* Test whether the function works when started with a conversion state
14884 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
14885 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
14886 {
14887 const char input[] = "B\303\274\303\237er";
14888 mbstate_t state;
14889
14890 memset (&state, '\0', sizeof (mbstate_t));
14891 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
14892 if (!mbsinit (&state))
14893 {
14894 const char *src = input + 2;
14895 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
14896 result |= 2;
14897 }
14898 }
14899 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
14900 {
14901 const char input[] = "<\306\374\313\334\270\354>";
14902 mbstate_t state;
14903
14904 memset (&state, '\0', sizeof (mbstate_t));
14905 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
14906 if (!mbsinit (&state))
14907 {
14908 const char *src = input + 4;
14909 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
14910 result |= 4;
14911 }
14912 }
14913 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
14914 {
14915 const char input[] = "B\250\271\201\060\211\070er";
14916 mbstate_t state;
14917
14918 memset (&state, '\0', sizeof (mbstate_t));
14919 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
14920 if (!mbsinit (&state))
14921 {
14922 const char *src = input + 2;
14923 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
14924 result |= 8;
14925 }
14926 }
14927 return result;
c971b7fa
PA
14928}
14929_ACEOF
8690e634
JK
14930if ac_fn_c_try_run "$LINENO"; then :
14931 gl_cv_func_mbsrtowcs_works=yes
c971b7fa 14932else
8690e634 14933 gl_cv_func_mbsrtowcs_works=no
c971b7fa 14934fi
8690e634
JK
14935rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14936 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 14937fi
8690e634
JK
14938
14939 fi
14940
14941fi
14942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
14943$as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
14944
14945 case "$gl_cv_func_mbsrtowcs_works" in
14946 *yes) ;;
14947 *) REPLACE_MBSRTOWCS=1 ;;
14948 esac
14949 fi
c971b7fa
PA
14950 fi
14951
a512b375 14952 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
c971b7fa 14953
c971b7fa 14954
c971b7fa 14955
c971b7fa 14956
c971b7fa 14957
c971b7fa 14958
c971b7fa
PA
14959
14960
8690e634
JK
14961 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
14972
14973
14974 :
14975
a512b375 14976 fi
8690e634
JK
14977
14978
14979
14980
14981
14982 GNULIB_MBSRTOWCS=1
14983
14984
14985
14986
14987
14988$as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
c971b7fa
PA
14989
14990
14991
14992
a512b375 14993 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
c971b7fa
PA
14994
14995
14996
14997
14998
14999
15000
15001
15002 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
15003
15004
15005 for ac_header in bp-sym.h
15006do :
15007 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
15008if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
15009 cat >>confdefs.h <<_ACEOF
15010#define HAVE_BP_SYM_H 1
15011_ACEOF
15012
15013fi
15014
15015done
15016
15017
a512b375 15018 fi
c971b7fa
PA
15019
15020
15021
15022
15023
15024 GNULIB_MEMCHR=1
15025
15026
15027
15028
15029
15030$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
15031
15032
15033
15034
15035
15036 if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
15037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
15038$as_echo_n "checking whether memmem works in linear time... " >&6; }
15039if test "${gl_cv_func_memmem_works_fast+set}" = set; then :
15040 $as_echo_n "(cached) " >&6
15041else
15042 if test "$cross_compiling" = yes; then :
15043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15044/* end confdefs.h. */
15045
15046#include <features.h>
15047#ifdef __GNU_LIBRARY__
15048 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)) \
15049 && !defined __UCLIBC__
15050 Lucky user
15051 #endif
15052#endif
15053#ifdef __CYGWIN__
15054 #include <cygwin/version.h>
15055 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 0)
15056 Lucky user
15057 #endif
15058#endif
15059
15060_ACEOF
15061if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15062 $EGREP "Lucky user" >/dev/null 2>&1; then :
63ce7108
TT
15063 gl_cv_func_memmem_works_fast="guessing yes"
15064else
15065 gl_cv_func_memmem_works_fast="guessing no"
15066fi
15067rm -f conftest*
15068
15069
15070else
15071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15072/* end confdefs.h. */
15073
15074#include <signal.h> /* for signal */
15075#include <string.h> /* for memmem */
15076#include <stdlib.h> /* for malloc */
15077#include <unistd.h> /* for alarm */
15078static void quit (int sig) { exit (sig + 128); }
15079
15080int
15081main ()
15082{
15083
15084 int result = 0;
15085 size_t m = 1000000;
15086 char *haystack = (char *) malloc (2 * m + 1);
15087 char *needle = (char *) malloc (m + 1);
15088 /* Failure to compile this test due to missing alarm is okay,
15089 since all such platforms (mingw) also lack memmem. */
15090 signal (SIGALRM, quit);
15091 alarm (5);
15092 /* Check for quadratic performance. */
15093 if (haystack && needle)
15094 {
15095 memset (haystack, 'A', 2 * m);
15096 haystack[2 * m] = 'B';
15097 memset (needle, 'A', m);
15098 needle[m] = 'B';
15099 if (!memmem (haystack, 2 * m + 1, needle, m + 1))
15100 result |= 1;
15101 }
15102 return result;
15103
15104 ;
15105 return 0;
15106}
15107_ACEOF
15108if ac_fn_c_try_run "$LINENO"; then :
15109 gl_cv_func_memmem_works_fast=yes
15110else
15111 gl_cv_func_memmem_works_fast=no
15112fi
15113rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15114 conftest.$ac_objext conftest.beam conftest.$ac_ext
15115fi
15116
15117
15118fi
15119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_fast" >&5
15120$as_echo "$gl_cv_func_memmem_works_fast" >&6; }
15121 case "$gl_cv_func_memmem_works_fast" in
15122 *yes) ;;
15123 *)
15124 REPLACE_MEMMEM=1
15125 ;;
15126 esac
15127 fi
15128
15129 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
15130
15131
15132
15133
15134
15135
15136
15137
15138 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
15139
15140 fi
15141
15142
15143
15144
15145 for ac_func in memmem
15146do :
15147 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
15148if test "x$ac_cv_func_memmem" = x""yes; then :
15149 cat >>confdefs.h <<_ACEOF
15150#define HAVE_MEMMEM 1
15151_ACEOF
15152
15153fi
15154done
15155
15156 if test $ac_cv_func_memmem = yes; then
15157 HAVE_MEMMEM=1
15158 else
15159 HAVE_MEMMEM=0
15160 fi
15161
15162 if test $ac_cv_have_decl_memmem = no; then
15163 HAVE_DECL_MEMMEM=0
15164 else
15165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
15166$as_echo_n "checking whether memmem works... " >&6; }
15167if test "${gl_cv_func_memmem_works_always+set}" = set; then :
15168 $as_echo_n "(cached) " >&6
15169else
15170 if test "$cross_compiling" = yes; then :
15171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15172/* end confdefs.h. */
15173
15174#ifdef __GNU_LIBRARY__
15175 #include <features.h>
15176 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
15177 || __GLIBC_MINOR__ > 12)) \
15178 || (__GLIBC__ > 2)) \
15179 || defined __UCLIBC__
15180 Lucky user
15181 #endif
15182#elif defined __CYGWIN__
15183 #include <cygwin/version.h>
15184 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
15185 Lucky user
15186 #endif
15187#else
15188 Lucky user
15189#endif
15190
15191_ACEOF
15192if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15193 $EGREP "Lucky user" >/dev/null 2>&1; then :
15194 gl_cv_func_memmem_works_always="guessing yes"
15195else
15196 gl_cv_func_memmem_works_always="guessing no"
15197fi
15198rm -f conftest*
15199
15200
15201else
15202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15203/* end confdefs.h. */
15204
15205#include <string.h> /* for memmem */
15206#define P "_EF_BF_BD"
15207#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
15208#define NEEDLE P P P P P
15209
15210int
15211main ()
15212{
15213
15214 int result = 0;
15215 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
15216 result |= 1;
15217 /* Check for empty needle behavior. */
15218 {
15219 const char *haystack = "AAA";
15220 if (memmem (haystack, 3, NULL, 0) != haystack)
15221 result |= 2;
15222 }
15223 return result;
15224
15225 ;
15226 return 0;
15227}
15228_ACEOF
15229if ac_fn_c_try_run "$LINENO"; then :
15230 gl_cv_func_memmem_works_always=yes
15231else
15232 gl_cv_func_memmem_works_always=no
15233fi
15234rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15235 conftest.$ac_objext conftest.beam conftest.$ac_ext
15236fi
15237
15238
15239fi
15240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
15241$as_echo "$gl_cv_func_memmem_works_always" >&6; }
15242 case "$gl_cv_func_memmem_works_always" in
15243 *yes) ;;
15244 *)
15245 REPLACE_MEMMEM=1
15246 ;;
15247 esac
15248 fi
15249 :
15250
15251 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
15252
15253
15254
15255
15256
15257
15258
15259
15260 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
15261
15262 fi
15263
15264
15265
15266
15267
15268 GNULIB_MEMMEM=1
15269
15270
15271
15272
15273
15274$as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
15275
15276
15277
15278
15279
15280
15281
15282
2196f55f
YQ
15283
15284
15285 if test $ac_cv_func_readlink = no; then
15286 HAVE_READLINK=0
15287 else
15288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
15289$as_echo_n "checking whether readlink signature is correct... " >&6; }
15290if test "${gl_cv_decl_readlink_works+set}" = set; then :
15291 $as_echo_n "(cached) " >&6
15292else
15293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15294/* end confdefs.h. */
15295#include <unistd.h>
15296 /* Cause compilation failure if original declaration has wrong type. */
15297 ssize_t readlink (const char *, char *, size_t);
15298int
15299main ()
15300{
15301
15302 ;
15303 return 0;
15304}
15305_ACEOF
15306if ac_fn_c_try_compile "$LINENO"; then :
15307 gl_cv_decl_readlink_works=yes
15308else
15309 gl_cv_decl_readlink_works=no
15310fi
15311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15312fi
15313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
15314$as_echo "$gl_cv_decl_readlink_works" >&6; }
15315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
15316$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
15317if test "${gl_cv_func_readlink_works+set}" = set; then :
15318 $as_echo_n "(cached) " >&6
15319else
15320 # We have readlink, so assume ln -s works.
15321 ln -s conftest.no-such conftest.link
15322 ln -s conftest.link conftest.lnk2
15323 if test "$cross_compiling" = yes; then :
15324 case "$host_os" in
15325 # Guess yes on glibc systems.
15326 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
15327 # If we don't know, assume the worst.
15328 *) gl_cv_func_readlink_works="guessing no" ;;
15329 esac
15330
15331else
15332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15333/* end confdefs.h. */
15334#include <unistd.h>
15335
15336int
15337main ()
15338{
15339char buf[20];
15340 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
15341 ;
15342 return 0;
15343}
15344_ACEOF
15345if ac_fn_c_try_run "$LINENO"; then :
15346 gl_cv_func_readlink_works=yes
15347else
15348 gl_cv_func_readlink_works=no
15349fi
15350rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15351 conftest.$ac_objext conftest.beam conftest.$ac_ext
15352fi
15353
15354 rm -f conftest.link conftest.lnk2
15355fi
15356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
15357$as_echo "$gl_cv_func_readlink_works" >&6; }
15358 case "$gl_cv_func_readlink_works" in
15359 *yes)
15360 if test "$gl_cv_decl_readlink_works" != yes; then
15361 REPLACE_READLINK=1
15362 fi
15363 ;;
15364 *)
15365
15366$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
15367
15368 REPLACE_READLINK=1
15369 ;;
15370 esac
15371 fi
15372
15373 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
15374
15375
15376
15377
15378
15379
15380
15381
15382 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
15383
15384
15385 :
15386
15387 fi
15388
15389
15390
15391
15392
15393 GNULIB_READLINK=1
15394
15395
15396
15397
15398
15399$as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
15400
15401
15402
15403
6a29c58e
YQ
15404
15405
15406
15407
15408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
15409$as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
15410if test "${gl_cv_func_rename_slash_dst_works+set}" = set; then :
15411 $as_echo_n "(cached) " >&6
15412else
15413 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
15414 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
15415 as_fn_error "cannot create temporary files" "$LINENO" 5
15416 # Assume that if we have lstat, we can also check symlinks.
15417 if test $ac_cv_func_lstat = yes; then
15418 ln -s conftest.f conftest.lnk
15419 fi
15420 if test "$cross_compiling" = yes; then :
15421 case "$host_os" in
15422 # Guess yes on glibc systems.
15423 *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
15424 # If we don't know, assume the worst.
15425 *) gl_cv_func_rename_slash_dst_works="guessing no" ;;
15426 esac
15427
15428else
15429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15430/* end confdefs.h. */
15431
15432# include <stdio.h>
15433# include <stdlib.h>
15434
15435int
15436main ()
15437{
15438int result = 0;
15439 if (rename ("conftest.f1", "conftest.f2/") == 0)
15440 result |= 1;
15441 if (rename ("conftest.d1", "conftest.d2/") != 0)
15442 result |= 2;
15443#if HAVE_LSTAT
15444 if (rename ("conftest.f", "conftest.lnk/") == 0)
15445 result |= 4;
15446#endif
15447 return result;
15448
15449 ;
15450 return 0;
15451}
15452_ACEOF
15453if ac_fn_c_try_run "$LINENO"; then :
15454 gl_cv_func_rename_slash_dst_works=yes
15455else
15456 gl_cv_func_rename_slash_dst_works=no
15457fi
15458rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15459 conftest.$ac_objext conftest.beam conftest.$ac_ext
15460fi
15461
15462 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
15463
15464fi
15465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
15466$as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
15467 case "$gl_cv_func_rename_slash_dst_works" in
15468 *yes) ;;
15469 *)
15470 REPLACE_RENAME=1
15471
15472$as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
15473
15474 ;;
15475 esac
15476
15477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
15478$as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
15479if test "${gl_cv_func_rename_slash_src_works+set}" = set; then :
15480 $as_echo_n "(cached) " >&6
15481else
15482 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
15483 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
15484 as_fn_error "cannot create temporary files" "$LINENO" 5
15485 # Assume that if we have lstat, we can also check symlinks.
15486 if test $ac_cv_func_lstat = yes; then
15487 ln -s conftest.f conftest.lnk
15488 fi
15489 if test "$cross_compiling" = yes; then :
15490 case "$host_os" in
15491 # Guess yes on glibc systems.
15492 *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
15493 # If we don't know, assume the worst.
15494 *) gl_cv_func_rename_slash_src_works="guessing no" ;;
15495 esac
15496
15497else
15498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15499/* end confdefs.h. */
15500
15501# include <stdio.h>
15502# include <stdlib.h>
15503
15504int
15505main ()
15506{
15507int result = 0;
15508 if (rename ("conftest.f1/", "conftest.d3") == 0)
15509 result |= 1;
15510 if (rename ("conftest.d1/", "conftest.d2") != 0)
15511 result |= 2;
15512#if HAVE_LSTAT
15513 if (rename ("conftest.lnk/", "conftest.f") == 0)
15514 result |= 4;
15515#endif
15516 return result;
15517
15518 ;
15519 return 0;
15520}
15521_ACEOF
15522if ac_fn_c_try_run "$LINENO"; then :
15523 gl_cv_func_rename_slash_src_works=yes
15524else
15525 gl_cv_func_rename_slash_src_works=no
15526fi
15527rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15528 conftest.$ac_objext conftest.beam conftest.$ac_ext
15529fi
15530
15531 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
15532
15533fi
15534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
15535$as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
15536 case "$gl_cv_func_rename_slash_src_works" in
15537 *yes) ;;
15538 *)
15539 REPLACE_RENAME=1
15540
15541$as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
15542
15543 ;;
15544 esac
15545
15546
15547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
15548$as_echo_n "checking whether rename manages hard links correctly... " >&6; }
15549if test "${gl_cv_func_rename_link_works+set}" = set; then :
15550 $as_echo_n "(cached) " >&6
15551else
15552 if test $ac_cv_func_link = yes; then
15553 rm -rf conftest.f conftest.f1
15554 if touch conftest.f && ln conftest.f conftest.f1 &&
15555 set x `ls -i conftest.f conftest.f1` && test "" = ""; then
15556 if test "$cross_compiling" = yes; then :
15557 case "$host_os" in
15558 # Guess yes on glibc systems.
15559 *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
15560 # If we don't know, assume the worst.
15561 *) gl_cv_func_rename_link_works="guessing no" ;;
15562 esac
15563
15564else
15565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15566/* end confdefs.h. */
15567
15568# include <stdio.h>
15569# include <stdlib.h>
15570# include <unistd.h>
15571
15572int
15573main ()
15574{
15575int result = 0;
15576 if (rename ("conftest.f", "conftest.f1"))
15577 result |= 1;
15578 if (unlink ("conftest.f1"))
15579 result |= 2;
15580 if (rename ("conftest.f", "conftest.f"))
15581 result |= 4;
15582 if (rename ("conftest.f1", "conftest.f1") == 0)
15583 result |= 8;
15584 return result;
15585
15586 ;
15587 return 0;
15588}
15589_ACEOF
15590if ac_fn_c_try_run "$LINENO"; then :
15591 gl_cv_func_rename_link_works=yes
15592else
15593 gl_cv_func_rename_link_works=no
15594fi
15595rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15596 conftest.$ac_objext conftest.beam conftest.$ac_ext
15597fi
15598
15599 else
15600 gl_cv_func_rename_link_works="guessing no"
15601 fi
15602 rm -rf conftest.f conftest.f1
15603 else
15604 gl_cv_func_rename_link_works=yes
15605 fi
15606
15607fi
15608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
15609$as_echo "$gl_cv_func_rename_link_works" >&6; }
15610 case "$gl_cv_func_rename_link_works" in
15611 *yes) ;;
15612 *)
15613 REPLACE_RENAME=1
15614
15615$as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
15616
15617 ;;
15618 esac
15619
15620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
15621$as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
15622if test "${gl_cv_func_rename_dest_works+set}" = set; then :
15623 $as_echo_n "(cached) " >&6
15624else
15625 rm -rf conftest.f conftest.d1 conftest.d2
15626 touch conftest.f && mkdir conftest.d1 conftest.d2 ||
15627 as_fn_error "cannot create temporary files" "$LINENO" 5
15628 if test "$cross_compiling" = yes; then :
15629 case "$host_os" in
15630 # Guess yes on glibc systems.
15631 *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
15632 # If we don't know, assume the worst.
15633 *) gl_cv_func_rename_dest_works="guessing no" ;;
15634 esac
15635
15636else
15637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15638/* end confdefs.h. */
15639
15640# include <stdio.h>
15641# include <stdlib.h>
15642
15643int
15644main ()
15645{
15646int result = 0;
15647 if (rename ("conftest.d1", "conftest.d2") != 0)
15648 result |= 1;
15649 if (rename ("conftest.d2", "conftest.f") == 0)
15650 result |= 2;
15651 return result;
15652
15653 ;
15654 return 0;
15655}
15656_ACEOF
15657if ac_fn_c_try_run "$LINENO"; then :
15658 gl_cv_func_rename_dest_works=yes
15659else
15660 gl_cv_func_rename_dest_works=no
15661fi
15662rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15663 conftest.$ac_objext conftest.beam conftest.$ac_ext
15664fi
15665
15666 rm -rf conftest.f conftest.d1 conftest.d2
15667
15668fi
15669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
15670$as_echo "$gl_cv_func_rename_dest_works" >&6; }
15671 case "$gl_cv_func_rename_dest_works" in
15672 *yes) ;;
15673 *)
15674 REPLACE_RENAME=1
15675
15676$as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
15677
15678 ;;
15679 esac
15680
15681 if test $REPLACE_RENAME = 1; then
15682
15683
15684
15685
15686
15687
15688
15689
15690 gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
15691
15692 fi
15693
15694
15695
15696
15697
15698 GNULIB_RENAME=1
15699
15700
15701
15702
15703
15704$as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
15705
15706
15707
15708
15709
15710
15711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
15712$as_echo_n "checking whether rmdir works... " >&6; }
15713if test "${gl_cv_func_rmdir_works+set}" = set; then :
15714 $as_echo_n "(cached) " >&6
15715else
15716 mkdir conftest.dir
15717 touch conftest.file
15718 if test "$cross_compiling" = yes; then :
15719 case "$host_os" in
15720 # Guess yes on glibc systems.
15721 *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
15722 # If we don't know, assume the worst.
15723 *) gl_cv_func_rmdir_works="guessing no" ;;
15724 esac
15725
15726else
15727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15728/* end confdefs.h. */
15729#include <stdio.h>
15730 #include <errno.h>
15731 #if HAVE_UNISTD_H
15732 # include <unistd.h>
15733 #else /* on Windows with MSVC */
15734 # include <direct.h>
15735 #endif
15736
15737int
15738main ()
15739{
15740int result = 0;
15741 if (!rmdir ("conftest.file/"))
15742 result |= 1;
15743 else if (errno != ENOTDIR)
15744 result |= 2;
15745 if (!rmdir ("conftest.dir/./"))
15746 result |= 4;
15747 return result;
15748
15749 ;
15750 return 0;
15751}
15752_ACEOF
15753if ac_fn_c_try_run "$LINENO"; then :
15754 gl_cv_func_rmdir_works=yes
15755else
15756 gl_cv_func_rmdir_works=no
15757fi
15758rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15759 conftest.$ac_objext conftest.beam conftest.$ac_ext
15760fi
15761
15762 rm -rf conftest.dir conftest.file
15763fi
15764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
15765$as_echo "$gl_cv_func_rmdir_works" >&6; }
15766 case "$gl_cv_func_rmdir_works" in
15767 *yes) ;;
15768 *)
15769 REPLACE_RMDIR=1
15770 ;;
15771 esac
15772
15773 if test $REPLACE_RMDIR = 1; then
15774
15775
15776
15777
15778
15779
15780
15781
15782 gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
15783
15784 fi
15785
15786
15787
15788
15789
15790 GNULIB_RMDIR=1
15791
15792
15793
15794
15795
15796$as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
15797
15798
15799
15800
63ce7108
TT
15801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
15802$as_echo_n "checking for ssize_t... " >&6; }
15803if test "${gt_cv_ssize_t+set}" = set; then :
15804 $as_echo_n "(cached) " >&6
15805else
15806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15807/* end confdefs.h. */
15808#include <sys/types.h>
15809int
15810main ()
15811{
15812int x = sizeof (ssize_t *) + sizeof (ssize_t);
15813 return !x;
15814 ;
15815 return 0;
15816}
15817_ACEOF
15818if ac_fn_c_try_compile "$LINENO"; then :
15819 gt_cv_ssize_t=yes
15820else
15821 gt_cv_ssize_t=no
15822fi
15823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15824fi
15825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
15826$as_echo "$gt_cv_ssize_t" >&6; }
15827 if test $gt_cv_ssize_t = no; then
15828
15829$as_echo "#define ssize_t int" >>confdefs.h
15830
15831 fi
15832
15833
15834
15835
2196f55f
YQ
15836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
15837$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
15838if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
15839 $as_echo_n "(cached) " >&6
15840else
15841 if test "$cross_compiling" = yes; then :
15842 case $host_os in
15843 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
15844 *) gl_cv_func_stat_dir_slash="guessing yes";;
15845 esac
15846else
15847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15848/* end confdefs.h. */
15849#include <sys/stat.h>
15850
15851int
15852main ()
15853{
15854struct stat st; return stat (".", &st) != stat ("./", &st);
15855 ;
15856 return 0;
15857}
15858_ACEOF
15859if ac_fn_c_try_run "$LINENO"; then :
15860 gl_cv_func_stat_dir_slash=yes
15861else
15862 gl_cv_func_stat_dir_slash=no
15863fi
15864rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15865 conftest.$ac_objext conftest.beam conftest.$ac_ext
15866fi
15867
15868fi
15869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
15870$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
15871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
15872$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
15873if test "${gl_cv_func_stat_file_slash+set}" = set; then :
15874 $as_echo_n "(cached) " >&6
15875else
15876 touch conftest.tmp
15877 # Assume that if we have lstat, we can also check symlinks.
15878 if test $ac_cv_func_lstat = yes; then
15879 ln -s conftest.tmp conftest.lnk
15880 fi
15881 if test "$cross_compiling" = yes; then :
15882 case "$host_os" in
15883 # Guess yes on glibc systems.
15884 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
15885 # If we don't know, assume the worst.
15886 *) gl_cv_func_stat_file_slash="guessing no" ;;
15887 esac
15888
15889else
15890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15891/* end confdefs.h. */
15892#include <sys/stat.h>
15893
15894int
15895main ()
15896{
15897int result = 0;
15898 struct stat st;
15899 if (!stat ("conftest.tmp/", &st))
15900 result |= 1;
15901#if HAVE_LSTAT
15902 if (!stat ("conftest.lnk/", &st))
15903 result |= 2;
15904#endif
15905 return result;
15906
15907 ;
15908 return 0;
15909}
15910_ACEOF
15911if ac_fn_c_try_run "$LINENO"; then :
15912 gl_cv_func_stat_file_slash=yes
15913else
15914 gl_cv_func_stat_file_slash=no
15915fi
15916rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15917 conftest.$ac_objext conftest.beam conftest.$ac_ext
15918fi
15919
15920 rm -f conftest.tmp conftest.lnk
15921fi
15922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
15923$as_echo "$gl_cv_func_stat_file_slash" >&6; }
15924 case $gl_cv_func_stat_dir_slash in
15925 *no) REPLACE_STAT=1
15926
15927$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
15928;;
15929 esac
15930 case $gl_cv_func_stat_file_slash in
15931 *no) REPLACE_STAT=1
15932
15933$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
15934;;
15935 esac
15936
15937 if test $REPLACE_STAT = 1; then
15938
15939
15940
15941
15942
15943
15944
15945
15946 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
15947
15948 :
15949 fi
15950
15951
15952
15953
15954
15955 GNULIB_STAT=1
15956
15957
15958
15959
15960
15961$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
15962
15963
15964
15965
15966
15967
63ce7108
TT
15968 # Define two additional variables used in the Makefile substitution.
15969
15970 if test "$ac_cv_header_stdbool_h" = yes; then
15971 STDBOOL_H=''
15972 else
15973 STDBOOL_H='stdbool.h'
15974 fi
15975
15976 if test -n "$STDBOOL_H"; then
15977 GL_GENERATE_STDBOOL_H_TRUE=
15978 GL_GENERATE_STDBOOL_H_FALSE='#'
15979else
15980 GL_GENERATE_STDBOOL_H_TRUE='#'
15981 GL_GENERATE_STDBOOL_H_FALSE=
15982fi
15983
15984
15985 if test "$ac_cv_type__Bool" = yes; then
15986 HAVE__BOOL=1
15987 else
15988 HAVE__BOOL=0
15989 fi
15990
15991
15992
15993
15994
15995 STDDEF_H=
15996 if test $gt_cv_c_wchar_t = no; then
15997 HAVE_WCHAR_T=0
15998 STDDEF_H=stddef.h
15999 fi
16000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
16001$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
16002if test "${gl_cv_decl_null_works+set}" = set; then :
16003 $as_echo_n "(cached) " >&6
16004else
16005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16006/* end confdefs.h. */
16007#include <stddef.h>
16008 int test[2 * (sizeof NULL == sizeof (void *)) -1];
16009
16010int
16011main ()
16012{
16013
16014 ;
16015 return 0;
16016}
16017_ACEOF
16018if ac_fn_c_try_compile "$LINENO"; then :
16019 gl_cv_decl_null_works=yes
16020else
16021 gl_cv_decl_null_works=no
16022fi
16023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16024fi
16025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
16026$as_echo "$gl_cv_decl_null_works" >&6; }
16027 if test $gl_cv_decl_null_works = no; then
16028 REPLACE_NULL=1
16029 STDDEF_H=stddef.h
16030 fi
16031
16032 if test -n "$STDDEF_H"; then
16033 GL_GENERATE_STDDEF_H_TRUE=
16034 GL_GENERATE_STDDEF_H_FALSE='#'
16035else
16036 GL_GENERATE_STDDEF_H_TRUE='#'
16037 GL_GENERATE_STDDEF_H_FALSE=
16038fi
16039
16040 if test -n "$STDDEF_H"; then
16041
16042
16043
16044
16045
16046
16047
16048
16049 if test $gl_cv_have_include_next = yes; then
16050 gl_cv_next_stddef_h='<'stddef.h'>'
16051 else
16052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
16053$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
16054if test "${gl_cv_next_stddef_h+set}" = set; then :
16055 $as_echo_n "(cached) " >&6
16056else
16057
16058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16059/* end confdefs.h. */
16060#include <stddef.h>
16061
16062_ACEOF
16063 case "$host_os" in
16064 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16065 *) gl_absname_cpp="$ac_cpp" ;;
16066 esac
16067
16068 case "$host_os" in
16069 mingw*)
16070 gl_dirsep_regex='[/\\]'
16071 ;;
16072 *)
16073 gl_dirsep_regex='\/'
16074 ;;
16075 esac
16076 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16077
16078 gl_header_literal_regex=`echo 'stddef.h' \
16079 | sed -e "$gl_make_literal_regex_sed"`
16080 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16081 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16082 s|^/[^/]|//&|
16083 p
16084 q
16085 }'
16086 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16087 sed -n "$gl_absolute_header_sed"`'"'
16088
16089
16090fi
16091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
16092$as_echo "$gl_cv_next_stddef_h" >&6; }
16093 fi
16094 NEXT_STDDEF_H=$gl_cv_next_stddef_h
16095
16096 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16097 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16098 gl_next_as_first_directive='<'stddef.h'>'
16099 else
16100 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16101 gl_next_as_first_directive=$gl_cv_next_stddef_h
16102 fi
16103 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
16104
16105
16106
16107
16108 fi
16109
16110
16111
16112
16113
16114
16115
98399780
YQ
16116
16117
16118
16119
16120
6a29c58e
YQ
16121 if test $gl_cv_have_include_next = yes; then
16122 gl_cv_next_stdio_h='<'stdio.h'>'
16123 else
16124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
16125$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
16126if test "${gl_cv_next_stdio_h+set}" = set; then :
16127 $as_echo_n "(cached) " >&6
16128else
16129
16130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16131/* end confdefs.h. */
16132#include <stdio.h>
16133
16134_ACEOF
16135 case "$host_os" in
16136 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16137 *) gl_absname_cpp="$ac_cpp" ;;
16138 esac
16139
16140 case "$host_os" in
16141 mingw*)
16142 gl_dirsep_regex='[/\\]'
16143 ;;
16144 *)
16145 gl_dirsep_regex='\/'
16146 ;;
16147 esac
16148 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16149
16150 gl_header_literal_regex=`echo 'stdio.h' \
16151 | sed -e "$gl_make_literal_regex_sed"`
16152 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16153 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16154 s|^/[^/]|//&|
16155 p
16156 q
16157 }'
16158 gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16159 sed -n "$gl_absolute_header_sed"`'"'
16160
16161
16162fi
16163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
16164$as_echo "$gl_cv_next_stdio_h" >&6; }
16165 fi
16166 NEXT_STDIO_H=$gl_cv_next_stdio_h
16167
16168 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16169 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16170 gl_next_as_first_directive='<'stdio.h'>'
16171 else
16172 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16173 gl_next_as_first_directive=$gl_cv_next_stdio_h
16174 fi
16175 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
16176
16177
16178
16179
16180
16181 GNULIB_FSCANF=1
16182
16183
16184cat >>confdefs.h <<_ACEOF
16185#define GNULIB_FSCANF 1
16186_ACEOF
16187
16188
16189 GNULIB_SCANF=1
16190
16191
16192cat >>confdefs.h <<_ACEOF
16193#define GNULIB_SCANF 1
16194_ACEOF
16195
16196
16197 GNULIB_FGETC=1
16198 GNULIB_GETC=1
16199 GNULIB_GETCHAR=1
16200 GNULIB_FGETS=1
16201 GNULIB_FREAD=1
16202
16203
16204 GNULIB_FPRINTF=1
16205 GNULIB_PRINTF=1
16206 GNULIB_VFPRINTF=1
16207 GNULIB_VPRINTF=1
16208 GNULIB_FPUTC=1
16209 GNULIB_PUTC=1
16210 GNULIB_PUTCHAR=1
16211 GNULIB_FPUTS=1
16212 GNULIB_PUTS=1
16213 GNULIB_FWRITE=1
16214
16215
16216
16217
16218 for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen renameat snprintf tmpfile vdprintf vsnprintf; do
16219 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
16220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
16221$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
16222if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
16223 $as_echo_n "(cached) " >&6
16224else
16225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16226/* end confdefs.h. */
16227#include <stdio.h>
16228
16229int
16230main ()
16231{
16232#undef $gl_func
16233 (void) $gl_func;
16234 ;
16235 return 0;
16236}
16237_ACEOF
16238if ac_fn_c_try_compile "$LINENO"; then :
16239 eval "$as_gl_Symbol=yes"
16240else
16241 eval "$as_gl_Symbol=no"
16242fi
16243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16244fi
16245eval ac_res=\$$as_gl_Symbol
16246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16247$as_echo "$ac_res" >&6; }
16248 eval as_val=\$$as_gl_Symbol
16249 if test "x$as_val" = x""yes; then :
16250 cat >>confdefs.h <<_ACEOF
16251#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
16252_ACEOF
16253
16254 eval ac_cv_have_decl_$gl_func=yes
16255fi
16256 done
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
98399780
YQ
16269 if test $gl_cv_have_include_next = yes; then
16270 gl_cv_next_stdlib_h='<'stdlib.h'>'
16271 else
16272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
16273$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
16274if test "${gl_cv_next_stdlib_h+set}" = set; then :
16275 $as_echo_n "(cached) " >&6
16276else
16277
16278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16279/* end confdefs.h. */
16280#include <stdlib.h>
16281
16282_ACEOF
16283 case "$host_os" in
16284 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16285 *) gl_absname_cpp="$ac_cpp" ;;
16286 esac
16287
16288 case "$host_os" in
16289 mingw*)
16290 gl_dirsep_regex='[/\\]'
16291 ;;
16292 *)
16293 gl_dirsep_regex='\/'
16294 ;;
16295 esac
16296 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16297
16298 gl_header_literal_regex=`echo 'stdlib.h' \
16299 | sed -e "$gl_make_literal_regex_sed"`
16300 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16301 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16302 s|^/[^/]|//&|
16303 p
16304 q
16305 }'
16306 gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16307 sed -n "$gl_absolute_header_sed"`'"'
16308
16309
16310fi
16311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
16312$as_echo "$gl_cv_next_stdlib_h" >&6; }
16313 fi
16314 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
16315
16316 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16317 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16318 gl_next_as_first_directive='<'stdlib.h'>'
16319 else
16320 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16321 gl_next_as_first_directive=$gl_cv_next_stdlib_h
16322 fi
16323 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
16324
16325
16326
16327
16328
16329
16330 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 random random_r realpath rpmatch setenv setstate setstate_r srandom srandom_r strtod strtoll strtoull unlockpt unsetenv; do
16331 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
16332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
16333$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
16334if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
16335 $as_echo_n "(cached) " >&6
16336else
16337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16338/* end confdefs.h. */
16339#include <stdlib.h>
16340#if HAVE_SYS_LOADAVG_H
16341# include <sys/loadavg.h>
16342#endif
16343#if HAVE_RANDOM_H
16344# include <random.h>
16345#endif
16346
16347int
16348main ()
16349{
16350#undef $gl_func
16351 (void) $gl_func;
16352 ;
16353 return 0;
16354}
16355_ACEOF
16356if ac_fn_c_try_compile "$LINENO"; then :
16357 eval "$as_gl_Symbol=yes"
16358else
16359 eval "$as_gl_Symbol=no"
16360fi
16361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16362fi
16363eval ac_res=\$$as_gl_Symbol
16364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16365$as_echo "$ac_res" >&6; }
16366 eval as_val=\$$as_gl_Symbol
16367 if test "x$as_val" = x""yes; then :
16368 cat >>confdefs.h <<_ACEOF
16369#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
16370_ACEOF
16371
16372 eval ac_cv_have_decl_$gl_func=yes
16373fi
16374 done
16375
16376
16377
16378
16379
16380
16381
63ce7108
TT
16382 if test $REPLACE_STRSTR = 0; then
16383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
16384$as_echo_n "checking whether strstr works in linear time... " >&6; }
16385if test "${gl_cv_func_strstr_linear+set}" = set; then :
16386 $as_echo_n "(cached) " >&6
16387else
16388 if test "$cross_compiling" = yes; then :
16389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16390/* end confdefs.h. */
16391
16392#include <features.h>
16393#ifdef __GNU_LIBRARY__
16394 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
16395 && !(defined __i386__ || defined __x86_64__) \
16396 && !defined __UCLIBC__
16397 Lucky user
16398 #endif
16399#endif
16400#ifdef __CYGWIN__
16401 #include <cygwin/version.h>
16402 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
16403 Lucky user
16404 #endif
16405#endif
16406
16407_ACEOF
16408if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16409 $EGREP "Lucky user" >/dev/null 2>&1; then :
16410 gl_cv_func_strstr_linear="guessing yes"
c971b7fa 16411else
63ce7108 16412 gl_cv_func_strstr_linear="guessing no"
c971b7fa
PA
16413fi
16414rm -f conftest*
16415
16416
16417else
16418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16419/* end confdefs.h. */
16420
16421#include <signal.h> /* for signal */
63ce7108 16422#include <string.h> /* for strstr */
c971b7fa
PA
16423#include <stdlib.h> /* for malloc */
16424#include <unistd.h> /* for alarm */
16425static void quit (int sig) { exit (sig + 128); }
16426
16427int
16428main ()
16429{
16430
16431 int result = 0;
16432 size_t m = 1000000;
63ce7108
TT
16433 char *haystack = (char *) malloc (2 * m + 2);
16434 char *needle = (char *) malloc (m + 2);
c971b7fa 16435 /* Failure to compile this test due to missing alarm is okay,
63ce7108 16436 since all such platforms (mingw) also have quadratic strstr. */
c971b7fa
PA
16437 signal (SIGALRM, quit);
16438 alarm (5);
16439 /* Check for quadratic performance. */
16440 if (haystack && needle)
16441 {
16442 memset (haystack, 'A', 2 * m);
16443 haystack[2 * m] = 'B';
63ce7108 16444 haystack[2 * m + 1] = 0;
c971b7fa
PA
16445 memset (needle, 'A', m);
16446 needle[m] = 'B';
63ce7108
TT
16447 needle[m + 1] = 0;
16448 if (!strstr (haystack, needle))
c971b7fa
PA
16449 result |= 1;
16450 }
16451 return result;
16452
16453 ;
16454 return 0;
16455}
16456_ACEOF
16457if ac_fn_c_try_run "$LINENO"; then :
63ce7108 16458 gl_cv_func_strstr_linear=yes
c971b7fa 16459else
63ce7108 16460 gl_cv_func_strstr_linear=no
c971b7fa
PA
16461fi
16462rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16463 conftest.$ac_objext conftest.beam conftest.$ac_ext
16464fi
16465
16466
16467fi
63ce7108
TT
16468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
16469$as_echo "$gl_cv_func_strstr_linear" >&6; }
16470 case "$gl_cv_func_strstr_linear" in
40a73391
JK
16471 *yes) ;;
16472 *)
63ce7108 16473 REPLACE_STRSTR=1
40a73391
JK
16474 ;;
16475 esac
c971b7fa
PA
16476 fi
16477
63ce7108 16478 if test $REPLACE_STRSTR = 1; then
c971b7fa
PA
16479
16480
16481
16482
16483
16484
16485
16486
63ce7108 16487 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
c971b7fa 16488
a512b375 16489 fi
c971b7fa
PA
16490
16491
16492
63ce7108
TT
16493 if test "$gl_cv_func_memchr_works" != yes; then
16494 REPLACE_STRSTR=1
c971b7fa 16495 else
63ce7108
TT
16496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
16497$as_echo_n "checking whether strstr works... " >&6; }
16498if test "${gl_cv_func_strstr_works_always+set}" = set; then :
c971b7fa
PA
16499 $as_echo_n "(cached) " >&6
16500else
16501 if test "$cross_compiling" = yes; then :
63ce7108 16502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
16503/* end confdefs.h. */
16504
16505#ifdef __GNU_LIBRARY__
16506 #include <features.h>
63ce7108 16507 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
c971b7fa
PA
16508 || defined __UCLIBC__
16509 Lucky user
16510 #endif
16511#elif defined __CYGWIN__
16512 #include <cygwin/version.h>
16513 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
16514 Lucky user
16515 #endif
16516#else
16517 Lucky user
16518#endif
16519
16520_ACEOF
16521if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16522 $EGREP "Lucky user" >/dev/null 2>&1; then :
63ce7108 16523 gl_cv_func_strstr_works_always="guessing yes"
c971b7fa 16524else
63ce7108 16525 gl_cv_func_strstr_works_always="guessing no"
c971b7fa
PA
16526fi
16527rm -f conftest*
16528
16529
16530else
16531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16532/* end confdefs.h. */
16533
63ce7108 16534#include <string.h> /* for strstr */
c971b7fa
PA
16535#define P "_EF_BF_BD"
16536#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
16537#define NEEDLE P P P P P
16538
16539int
16540main ()
16541{
63ce7108 16542return !!strstr (HAYSTACK, NEEDLE);
c971b7fa
PA
16543
16544 ;
16545 return 0;
16546}
16547_ACEOF
16548if ac_fn_c_try_run "$LINENO"; then :
63ce7108 16549 gl_cv_func_strstr_works_always=yes
c971b7fa 16550else
63ce7108 16551 gl_cv_func_strstr_works_always=no
c971b7fa
PA
16552fi
16553rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16554 conftest.$ac_objext conftest.beam conftest.$ac_ext
16555fi
16556
16557
16558fi
63ce7108
TT
16559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
16560$as_echo "$gl_cv_func_strstr_works_always" >&6; }
16561 case "$gl_cv_func_strstr_works_always" in
40a73391
JK
16562 *yes) ;;
16563 *)
63ce7108 16564 REPLACE_STRSTR=1
40a73391
JK
16565 ;;
16566 esac
c971b7fa 16567 fi
8839a007 16568
63ce7108 16569 if test $REPLACE_STRSTR = 1; then
8839a007 16570
8690e634
JK
16571
16572
8690e634
JK
16573
16574
16575
16576
16577
63ce7108 16578 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
8690e634 16579
8690e634
JK
16580 fi
16581
8690e634
JK
16582
16583
8690e634 16584
8690e634 16585
63ce7108 16586 GNULIB_STRSTR=1
8690e634
JK
16587
16588
16589
8690e634
JK
16590
16591
63ce7108 16592$as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
8690e634
JK
16593
16594
16595
16596
16597
16598
16599
16600
16601
16602
16603
16604
8690e634 16605
09607c9e
TT
16606
16607
16608
16609
16610 if test $gl_cv_have_include_next = yes; then
16611 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
16612 else
16613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
16614$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
16615if test "${gl_cv_next_sys_stat_h+set}" = set; then :
16616 $as_echo_n "(cached) " >&6
16617else
16618
16619 if test $ac_cv_header_sys_stat_h = yes; then
16620
16621
16622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16623/* end confdefs.h. */
16624#include <sys/stat.h>
16625
16626_ACEOF
16627 case "$host_os" in
16628 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16629 *) gl_absname_cpp="$ac_cpp" ;;
16630 esac
16631
16632 case "$host_os" in
16633 mingw*)
16634 gl_dirsep_regex='[/\\]'
16635 ;;
16636 *)
16637 gl_dirsep_regex='\/'
16638 ;;
16639 esac
16640 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16641
16642 gl_header_literal_regex=`echo 'sys/stat.h' \
16643 | sed -e "$gl_make_literal_regex_sed"`
16644 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16645 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16646 s|^/[^/]|//&|
16647 p
16648 q
16649 }'
16650 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16651 sed -n "$gl_absolute_header_sed"`'"'
16652 else
16653 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
16654 fi
16655
16656
16657fi
16658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
16659$as_echo "$gl_cv_next_sys_stat_h" >&6; }
16660 fi
16661 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
16662
16663 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16664 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16665 gl_next_as_first_directive='<'sys/stat.h'>'
16666 else
16667 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16668 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
16669 fi
16670 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
16671
16672
16673
16674
16675
16676
16677
16678
2196f55f 16679
09607c9e
TT
16680
16681
16682 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
16683
16684$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
16685
16686 fi
16687
16688 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
16689 #include <sys/stat.h>
16690"
16691if test "x$ac_cv_type_nlink_t" = x""yes; then :
16692
16693else
16694
16695$as_echo "#define nlink_t int" >>confdefs.h
16696
16697fi
16698
16699
16700
16701 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
16702 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
16703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
16704$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
16705if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
16706 $as_echo_n "(cached) " >&6
16707else
16708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16709/* end confdefs.h. */
16710#include <sys/stat.h>
16711
16712int
16713main ()
16714{
16715#undef $gl_func
16716 (void) $gl_func;
16717 ;
16718 return 0;
16719}
16720_ACEOF
16721if ac_fn_c_try_compile "$LINENO"; then :
16722 eval "$as_gl_Symbol=yes"
16723else
16724 eval "$as_gl_Symbol=no"
16725fi
16726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16727fi
16728eval ac_res=\$$as_gl_Symbol
16729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16730$as_echo "$ac_res" >&6; }
16731 eval as_val=\$$as_gl_Symbol
16732 if test "x$as_val" = x""yes; then :
16733 cat >>confdefs.h <<_ACEOF
16734#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
16735_ACEOF
16736
16737 eval ac_cv_have_decl_$gl_func=yes
16738fi
16739 done
16740
16741
16742
16743
16744
16745
16746
16747
16748
16749
16750
16751
16752
16753
8839a007
PA
16754 if test $gl_cv_have_include_next = yes; then
16755 gl_cv_next_sys_types_h='<'sys/types.h'>'
16756 else
16757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
16758$as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
16759if test "${gl_cv_next_sys_types_h+set}" = set; then :
16760 $as_echo_n "(cached) " >&6
16761else
16762
16763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16764/* end confdefs.h. */
16765#include <sys/types.h>
16766
16767_ACEOF
16768 case "$host_os" in
16769 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16770 *) gl_absname_cpp="$ac_cpp" ;;
16771 esac
16772
16773 case "$host_os" in
16774 mingw*)
16775 gl_dirsep_regex='[/\\]'
16776 ;;
16777 *)
16778 gl_dirsep_regex='\/'
16779 ;;
16780 esac
16781 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16782
16783 gl_header_literal_regex=`echo 'sys/types.h' \
16784 | sed -e "$gl_make_literal_regex_sed"`
16785 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16786 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16787 s|^/[^/]|//&|
16788 p
16789 q
16790 }'
16791 gl_cv_next_sys_types_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16792 sed -n "$gl_absolute_header_sed"`'"'
16793
16794
16795fi
16796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
16797$as_echo "$gl_cv_next_sys_types_h" >&6; }
16798 fi
16799 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
16800
16801 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16802 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16803 gl_next_as_first_directive='<'sys/types.h'>'
16804 else
16805 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16806 gl_next_as_first_directive=$gl_cv_next_sys_types_h
16807 fi
16808 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
16809
16810
16811
16812
16813
16814
16815
16816
16817
16818
16819
16820
16821
16822
16823
16824
16825
16826
16827
16828
16829
09607c9e
TT
16830
16831
8839a007
PA
16832
16833
16834
16835
16836 if test $gl_cv_have_include_next = yes; then
16837 gl_cv_next_unistd_h='<'unistd.h'>'
16838 else
16839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
16840$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
16841if test "${gl_cv_next_unistd_h+set}" = set; then :
16842 $as_echo_n "(cached) " >&6
16843else
16844
16845 if test $ac_cv_header_unistd_h = yes; then
16846
16847
16848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16849/* end confdefs.h. */
16850#include <unistd.h>
16851
16852_ACEOF
16853 case "$host_os" in
16854 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16855 *) gl_absname_cpp="$ac_cpp" ;;
16856 esac
16857
16858 case "$host_os" in
16859 mingw*)
16860 gl_dirsep_regex='[/\\]'
16861 ;;
16862 *)
16863 gl_dirsep_regex='\/'
16864 ;;
16865 esac
16866 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16867
16868 gl_header_literal_regex=`echo 'unistd.h' \
16869 | sed -e "$gl_make_literal_regex_sed"`
16870 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16871 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16872 s|^/[^/]|//&|
16873 p
16874 q
16875 }'
16876 gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16877 sed -n "$gl_absolute_header_sed"`'"'
16878 else
16879 gl_cv_next_unistd_h='<'unistd.h'>'
16880 fi
16881
16882
16883fi
16884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
16885$as_echo "$gl_cv_next_unistd_h" >&6; }
16886 fi
16887 NEXT_UNISTD_H=$gl_cv_next_unistd_h
16888
16889 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16890 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16891 gl_next_as_first_directive='<'unistd.h'>'
16892 else
16893 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16894 gl_next_as_first_directive=$gl_cv_next_unistd_h
16895 fi
16896 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
16897
16898
16899
16900
16901 if test $ac_cv_header_unistd_h = yes; then
16902 HAVE_UNISTD_H=1
16903 else
16904 HAVE_UNISTD_H=0
16905 fi
16906
16907
16908
16909
16910
16911
16912
16913 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
16914 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
16915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
16916$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
16917if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
16918 $as_echo_n "(cached) " >&6
16919else
16920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16921/* end confdefs.h. */
16922
16923#if HAVE_UNISTD_H
16924# include <unistd.h>
16925#endif
16926/* Some systems declare various items in the wrong headers. */
16927#if !(defined __GLIBC__ && !defined __UCLIBC__)
16928# include <fcntl.h>
16929# include <stdio.h>
16930# include <stdlib.h>
16931# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
16932# include <io.h>
16933# endif
16934#endif
16935
16936int
16937main ()
16938{
16939#undef $gl_func
16940 (void) $gl_func;
16941 ;
16942 return 0;
16943}
16944_ACEOF
16945if ac_fn_c_try_compile "$LINENO"; then :
16946 eval "$as_gl_Symbol=yes"
16947else
16948 eval "$as_gl_Symbol=no"
16949fi
16950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16951fi
16952eval ac_res=\$$as_gl_Symbol
16953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16954$as_echo "$ac_res" >&6; }
16955 eval as_val=\$$as_gl_Symbol
16956 if test "x$as_val" = x""yes; then :
16957 cat >>confdefs.h <<_ACEOF
16958#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
16959_ACEOF
16960
16961 eval ac_cv_have_decl_$gl_func=yes
16962fi
16963 done
16964
16965
16966
16967
16968
16969
16970
16971
16972
16973
16974
16975
8690e634
JK
16976
16977
16978 if test $gl_cv_have_include_next = yes; then
16979 gl_cv_next_wchar_h='<'wchar.h'>'
16980 else
16981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
16982$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
16983if test "${gl_cv_next_wchar_h+set}" = set; then :
16984 $as_echo_n "(cached) " >&6
16985else
16986
16987 if test $ac_cv_header_wchar_h = yes; then
16988
16989
16990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16991/* end confdefs.h. */
16992#include <wchar.h>
16993
16994_ACEOF
16995 case "$host_os" in
16996 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16997 *) gl_absname_cpp="$ac_cpp" ;;
16998 esac
16999
17000 case "$host_os" in
17001 mingw*)
17002 gl_dirsep_regex='[/\\]'
17003 ;;
17004 *)
17005 gl_dirsep_regex='\/'
17006 ;;
17007 esac
17008 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17009
17010 gl_header_literal_regex=`echo 'wchar.h' \
17011 | sed -e "$gl_make_literal_regex_sed"`
17012 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17013 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17014 s|^/[^/]|//&|
17015 p
17016 q
17017 }'
17018 gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17019 sed -n "$gl_absolute_header_sed"`'"'
17020 else
17021 gl_cv_next_wchar_h='<'wchar.h'>'
17022 fi
17023
17024
17025fi
17026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
17027$as_echo "$gl_cv_next_wchar_h" >&6; }
17028 fi
17029 NEXT_WCHAR_H=$gl_cv_next_wchar_h
17030
17031 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17032 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17033 gl_next_as_first_directive='<'wchar.h'>'
17034 else
17035 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17036 gl_next_as_first_directive=$gl_cv_next_wchar_h
17037 fi
17038 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
17039
17040
17041
17042
17043 if test $ac_cv_header_wchar_h = yes; then
17044 HAVE_WCHAR_H=1
17045 else
17046 HAVE_WCHAR_H=0
17047 fi
17048
c971b7fa
PA
17049
17050
17051
17052
8690e634
JK
17053 if test $gt_cv_c_wint_t = yes; then
17054 HAVE_WINT_T=1
17055 else
17056 HAVE_WINT_T=0
17057 fi
c971b7fa
PA
17058
17059
17060
8690e634
JK
17061 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
17062 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
17063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
17064$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
17065if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
c971b7fa
PA
17066 $as_echo_n "(cached) " >&6
17067else
17068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17069/* end confdefs.h. */
8690e634
JK
17070
17071/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
17072 <wchar.h>.
17073 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17074 included before <wchar.h>. */
17075#if !(defined __GLIBC__ && !defined __UCLIBC__)
17076# include <stddef.h>
17077# include <stdio.h>
17078# include <time.h>
17079#endif
17080#include <wchar.h>
c971b7fa
PA
17081
17082int
17083main ()
17084{
8690e634
JK
17085#undef $gl_func
17086 (void) $gl_func;
c971b7fa
PA
17087 ;
17088 return 0;
17089}
17090_ACEOF
17091if ac_fn_c_try_compile "$LINENO"; then :
8690e634 17092 eval "$as_gl_Symbol=yes"
c971b7fa 17093else
8690e634 17094 eval "$as_gl_Symbol=no"
c971b7fa
PA
17095fi
17096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17097fi
8690e634
JK
17098eval ac_res=\$$as_gl_Symbol
17099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17100$as_echo "$ac_res" >&6; }
17101 eval as_val=\$$as_gl_Symbol
17102 if test "x$as_val" = x""yes; then :
17103 cat >>confdefs.h <<_ACEOF
17104#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
17105_ACEOF
c971b7fa 17106
8690e634 17107 eval ac_cv_have_decl_$gl_func=yes
c971b7fa 17108fi
8690e634
JK
17109 done
17110
17111
17112
17113
17114
17115
17116
8690e634
JK
17117 if test $ac_cv_func_iswcntrl = yes; then
17118 HAVE_ISWCNTRL=1
17119 else
17120 HAVE_ISWCNTRL=0
17121 fi
17122
17123
17124
8690e634
JK
17125 if test $gt_cv_c_wint_t = yes; then
17126 HAVE_WINT_T=1
17127 else
17128 HAVE_WINT_T=0
17129 fi
17130
17131
17132
17133
17134
17135
c971b7fa 17136
8690e634 17137
c971b7fa
PA
17138
17139
17140
17141 if test $gl_cv_have_include_next = yes; then
8690e634 17142 gl_cv_next_wctype_h='<'wctype.h'>'
c971b7fa 17143 else
8690e634
JK
17144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
17145$as_echo_n "checking absolute name of <wctype.h>... " >&6; }
17146if test "${gl_cv_next_wctype_h+set}" = set; then :
c971b7fa
PA
17147 $as_echo_n "(cached) " >&6
17148else
17149
8690e634
JK
17150 if test $ac_cv_header_wctype_h = yes; then
17151
17152
c971b7fa
PA
17153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17154/* end confdefs.h. */
8690e634 17155#include <wctype.h>
c971b7fa
PA
17156
17157_ACEOF
17158 case "$host_os" in
17159 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17160 *) gl_absname_cpp="$ac_cpp" ;;
17161 esac
17162
17163 case "$host_os" in
17164 mingw*)
17165 gl_dirsep_regex='[/\\]'
17166 ;;
17167 *)
17168 gl_dirsep_regex='\/'
17169 ;;
17170 esac
17171 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17172
8690e634 17173 gl_header_literal_regex=`echo 'wctype.h' \
c971b7fa
PA
17174 | sed -e "$gl_make_literal_regex_sed"`
17175 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17176 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17177 s|^/[^/]|//&|
17178 p
17179 q
17180 }'
8690e634 17181 gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
c971b7fa 17182 sed -n "$gl_absolute_header_sed"`'"'
8690e634
JK
17183 else
17184 gl_cv_next_wctype_h='<'wctype.h'>'
17185 fi
c971b7fa
PA
17186
17187
17188fi
8690e634
JK
17189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
17190$as_echo "$gl_cv_next_wctype_h" >&6; }
c971b7fa 17191 fi
8690e634 17192 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
c971b7fa
PA
17193
17194 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17195 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8690e634 17196 gl_next_as_first_directive='<'wctype.h'>'
c971b7fa
PA
17197 else
17198 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8690e634 17199 gl_next_as_first_directive=$gl_cv_next_wctype_h
c971b7fa 17200 fi
8690e634
JK
17201 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
17202
17203
17204
17205
17206 if test $ac_cv_header_wctype_h = yes; then
17207 if test $ac_cv_func_iswcntrl = yes; then
17208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
17209$as_echo_n "checking whether iswcntrl works... " >&6; }
17210if test "${gl_cv_func_iswcntrl_works+set}" = set; then :
17211 $as_echo_n "(cached) " >&6
17212else
17213
17214 if test "$cross_compiling" = yes; then :
17215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17216/* end confdefs.h. */
17217#include <stdlib.h>
17218 #if __GNU_LIBRARY__ == 1
17219 Linux libc5 i18n is broken.
17220 #endif
17221int
17222main ()
17223{
17224
17225 ;
17226 return 0;
17227}
17228_ACEOF
17229if ac_fn_c_try_compile "$LINENO"; then :
17230 gl_cv_func_iswcntrl_works="guessing yes"
17231else
17232 gl_cv_func_iswcntrl_works="guessing no"
17233fi
17234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17235
17236else
17237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17238/* end confdefs.h. */
17239
17240 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
17241 included before <wchar.h>.
17242 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
17243 must be included before <wchar.h>. */
17244 #include <stddef.h>
17245 #include <stdio.h>
17246 #include <time.h>
17247 #include <wchar.h>
17248 #include <wctype.h>
17249 int main () { return iswprint ('x') == 0; }
17250
17251_ACEOF
17252if ac_fn_c_try_run "$LINENO"; then :
17253 gl_cv_func_iswcntrl_works=yes
17254else
17255 gl_cv_func_iswcntrl_works=no
17256fi
17257rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17258 conftest.$ac_objext conftest.beam conftest.$ac_ext
17259fi
17260
17261
17262fi
17263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
17264$as_echo "$gl_cv_func_iswcntrl_works" >&6; }
17265 fi
17266 HAVE_WCTYPE_H=1
17267 else
17268 HAVE_WCTYPE_H=0
17269 fi
17270
17271
17272 case "$gl_cv_func_iswcntrl_works" in
17273 *yes) REPLACE_ISWCNTRL=0 ;;
17274 *) REPLACE_ISWCNTRL=1 ;;
17275 esac
17276
17277
17278 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
17279 :
17280 fi
17281
17282 if test $REPLACE_ISWCNTRL = 1; then
17283 REPLACE_TOWLOWER=1
17284 else
17285 for ac_func in towlower
17286do :
17287 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
17288if test "x$ac_cv_func_towlower" = x""yes; then :
17289 cat >>confdefs.h <<_ACEOF
17290#define HAVE_TOWLOWER 1
17291_ACEOF
17292
17293fi
17294done
17295
17296 if test $ac_cv_func_towlower = yes; then
17297 REPLACE_TOWLOWER=0
17298 else
17299 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
17300 included before <wchar.h>.
17301 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
17302 must be included before <wchar.h>. */
17303 #include <stddef.h>
17304 #include <stdio.h>
17305 #include <time.h>
17306 #include <wchar.h>
17307 #if HAVE_WCTYPE_H
17308 # include <wctype.h>
17309 #endif
17310
17311"
17312if test "x$ac_cv_have_decl_towlower" = x""yes; then :
17313 ac_have_decl=1
17314else
17315 ac_have_decl=0
17316fi
17317
17318cat >>confdefs.h <<_ACEOF
17319#define HAVE_DECL_TOWLOWER $ac_have_decl
17320_ACEOF
17321
17322 if test $ac_cv_have_decl_towlower = yes; then
17323 REPLACE_TOWLOWER=1
17324 else
17325 REPLACE_TOWLOWER=0
17326 fi
17327 fi
17328 fi
17329
17330
17331 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
17332 :
17333 fi
17334
17335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
17336$as_echo_n "checking for wctype_t... " >&6; }
17337if test "${gl_cv_type_wctype_t+set}" = set; then :
17338 $as_echo_n "(cached) " >&6
17339else
17340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17341/* end confdefs.h. */
17342/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
17343 included before <wchar.h>.
17344 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
17345 must be included before <wchar.h>. */
17346 #include <stddef.h>
17347 #include <stdio.h>
17348 #include <time.h>
17349 #include <wchar.h>
17350 #if HAVE_WCTYPE_H
17351 # include <wctype.h>
17352 #endif
17353 wctype_t a;
17354
17355int
17356main ()
17357{
17358
17359 ;
17360 return 0;
17361}
17362_ACEOF
17363if ac_fn_c_try_compile "$LINENO"; then :
17364 gl_cv_type_wctype_t=yes
17365else
17366 gl_cv_type_wctype_t=no
17367fi
17368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 17369
8690e634
JK
17370fi
17371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
17372$as_echo "$gl_cv_type_wctype_t" >&6; }
17373 if test $gl_cv_type_wctype_t = no; then
17374 HAVE_WCTYPE_T=0
17375 fi
17376
17377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
17378$as_echo_n "checking for wctrans_t... " >&6; }
17379if test "${gl_cv_type_wctrans_t+set}" = set; then :
17380 $as_echo_n "(cached) " >&6
17381else
17382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17383/* end confdefs.h. */
17384/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
17385 included before <wchar.h>.
17386 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
17387 must be included before <wchar.h>. */
17388 #include <stddef.h>
17389 #include <stdio.h>
17390 #include <time.h>
17391 #include <wchar.h>
17392 #include <wctype.h>
17393 wctrans_t a;
c971b7fa 17394
8690e634
JK
17395int
17396main ()
17397{
c971b7fa 17398
8690e634
JK
17399 ;
17400 return 0;
17401}
17402_ACEOF
17403if ac_fn_c_try_compile "$LINENO"; then :
17404 gl_cv_type_wctrans_t=yes
17405else
17406 gl_cv_type_wctrans_t=no
17407fi
17408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 17409
8690e634
JK
17410fi
17411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
17412$as_echo "$gl_cv_type_wctrans_t" >&6; }
17413 if test $gl_cv_type_wctrans_t = no; then
17414 HAVE_WCTRANS_T=0
c971b7fa
PA
17415 fi
17416
17417
8690e634
JK
17418 for gl_func in wctype iswctype wctrans towctrans ; do
17419 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
17420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
17421$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
17422if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
17423 $as_echo_n "(cached) " >&6
17424else
17425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17426/* end confdefs.h. */
17427
17428/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
17429 <wchar.h>.
17430 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17431 included before <wchar.h>. */
17432#if !(defined __GLIBC__ && !defined __UCLIBC__)
17433# include <stddef.h>
17434# include <stdio.h>
17435# include <time.h>
17436# include <wchar.h>
17437#endif
17438#include <wctype.h>
17439
17440int
17441main ()
17442{
17443#undef $gl_func
17444 (void) $gl_func;
17445 ;
17446 return 0;
17447}
17448_ACEOF
17449if ac_fn_c_try_compile "$LINENO"; then :
17450 eval "$as_gl_Symbol=yes"
17451else
17452 eval "$as_gl_Symbol=no"
17453fi
17454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17455fi
17456eval ac_res=\$$as_gl_Symbol
17457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17458$as_echo "$ac_res" >&6; }
17459 eval as_val=\$$as_gl_Symbol
17460 if test "x$as_val" = x""yes; then :
17461 cat >>confdefs.h <<_ACEOF
17462#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
17463_ACEOF
c971b7fa 17464
8690e634
JK
17465 eval ac_cv_have_decl_$gl_func=yes
17466fi
17467 done
c971b7fa
PA
17468
17469
17470 # End of code from modules
17471
17472
17473
17474
17475
17476
17477
17478
17479
17480 gltests_libdeps=
17481 gltests_ltlibdeps=
17482
17483
17484
17485
17486
17487
17488
17489
17490
17491 gl_source_base='tests'
17492 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
17493
17494 gl_module_indicator_condition=$gltests_WITNESS
17495
17496
17497
17498
17499
17500
17501
17502
17503
17504 LIBGNU_LIBDEPS="$gl_libdeps"
17505
17506 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
17507
17508
17509
17510# We don't use automake, but gnulib does. This line lets us generate
17511# its Makefile.in.
17512am__api_version='1.11'
17513
17514# Find a good install program. We prefer a C program (faster),
17515# so one script is as good as another. But avoid the broken or
17516# incompatible versions:
17517# SysV /etc/install, /usr/sbin/install
17518# SunOS /usr/etc/install
17519# IRIX /sbin/install
17520# AIX /bin/install
17521# AmigaOS /C/install, which installs bootblocks on floppy discs
17522# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
17523# AFS /usr/afsws/bin/install, which mishandles nonexistent args
17524# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
17525# OS/2's system install, which has a completely different semantic
17526# ./install, which can be erroneously created by make from ./install.sh.
17527# Reject install programs that cannot install multiple files.
17528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
17529$as_echo_n "checking for a BSD-compatible install... " >&6; }
17530if test -z "$INSTALL"; then
17531if test "${ac_cv_path_install+set}" = set; then :
17532 $as_echo_n "(cached) " >&6
17533else
17534 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17535for as_dir in $PATH
17536do
17537 IFS=$as_save_IFS
17538 test -z "$as_dir" && as_dir=.
17539 # Account for people who put trailing slashes in PATH elements.
17540case $as_dir/ in #((
17541 ./ | .// | /[cC]/* | \
17542 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
17543 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
17544 /usr/ucb/* ) ;;
17545 *)
17546 # OSF1 and SCO ODT 3.0 have their own names for install.
17547 # Don't use installbsd from OSF since it installs stuff as root
17548 # by default.
17549 for ac_prog in ginstall scoinst install; do
17550 for ac_exec_ext in '' $ac_executable_extensions; do
17551 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
17552 if test $ac_prog = install &&
17553 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
17554 # AIX install. It has an incompatible calling convention.
17555 :
17556 elif test $ac_prog = install &&
17557 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
17558 # program-specific install script used by HP pwplus--don't use.
17559 :
17560 else
17561 rm -rf conftest.one conftest.two conftest.dir
17562 echo one > conftest.one
17563 echo two > conftest.two
17564 mkdir conftest.dir
17565 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
17566 test -s conftest.one && test -s conftest.two &&
17567 test -s conftest.dir/conftest.one &&
17568 test -s conftest.dir/conftest.two
17569 then
17570 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
17571 break 3
17572 fi
17573 fi
17574 fi
17575 done
17576 done
17577 ;;
17578esac
17579
17580 done
17581IFS=$as_save_IFS
17582
17583rm -rf conftest.one conftest.two conftest.dir
17584
17585fi
17586 if test "${ac_cv_path_install+set}" = set; then
17587 INSTALL=$ac_cv_path_install
17588 else
17589 # As a last resort, use the slow shell script. Don't cache a
17590 # value for INSTALL within a source directory, because that will
17591 # break other packages using the cache if that directory is
17592 # removed, or if the value is a relative name.
17593 INSTALL=$ac_install_sh
17594 fi
17595fi
17596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
17597$as_echo "$INSTALL" >&6; }
17598
17599# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
17600# It thinks the first close brace ends the variable substitution.
17601test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
17602
17603test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
17604
17605test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
17606
17607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
17608$as_echo_n "checking whether build environment is sane... " >&6; }
17609# Just in case
17610sleep 1
17611echo timestamp > conftest.file
17612# Reject unsafe characters in $srcdir or the absolute working directory
17613# name. Accept space and tab only in the latter.
17614am_lf='
17615'
17616case `pwd` in
17617 *[\\\"\#\$\&\'\`$am_lf]*)
17618 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
17619esac
17620case $srcdir in
17621 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
17622 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
17623esac
17624
17625# Do `set' in a subshell so we don't clobber the current shell's
17626# arguments. Must try -L first in case configure is actually a
17627# symlink; some systems play weird games with the mod time of symlinks
17628# (eg FreeBSD returns the mod time of the symlink's containing
17629# directory).
17630if (
17631 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
17632 if test "$*" = "X"; then
17633 # -L didn't work.
17634 set X `ls -t "$srcdir/configure" conftest.file`
17635 fi
17636 rm -f conftest.file
17637 if test "$*" != "X $srcdir/configure conftest.file" \
17638 && test "$*" != "X conftest.file $srcdir/configure"; then
17639
17640 # If neither matched, then we have a broken ls. This can happen
17641 # if, for instance, CONFIG_SHELL is bash and it inherits a
17642 # broken ls alias from the environment. This has actually
17643 # happened. Such a system could not be considered "sane".
17644 as_fn_error "ls -t appears to fail. Make sure there is not a broken
17645alias in your environment" "$LINENO" 5
17646 fi
17647
17648 test "$2" = conftest.file
17649 )
17650then
17651 # Ok.
17652 :
17653else
17654 as_fn_error "newly created file is older than distributed files!
17655Check your system clock" "$LINENO" 5
17656fi
17657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17658$as_echo "yes" >&6; }
17659test "$program_prefix" != NONE &&
17660 program_transform_name="s&^&$program_prefix&;$program_transform_name"
17661# Use a double $ so make ignores it.
17662test "$program_suffix" != NONE &&
17663 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
17664# Double any \ or $.
17665# By default was `s,x,x', remove it if useless.
17666ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
17667program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
17668
17669# expand $ac_aux_dir to an absolute path
17670am_aux_dir=`cd $ac_aux_dir && pwd`
17671
17672if test x"${MISSING+set}" != xset; then
17673 case $am_aux_dir in
17674 *\ * | *\ *)
17675 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
17676 *)
17677 MISSING="\${SHELL} $am_aux_dir/missing" ;;
17678 esac
17679fi
17680# Use eval to expand $SHELL
17681if eval "$MISSING --run true"; then
17682 am_missing_run="$MISSING --run "
17683else
17684 am_missing_run=
17685 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
17686$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
17687fi
17688
17689if test x"${install_sh}" != xset; then
17690 case $am_aux_dir in
17691 *\ * | *\ *)
17692 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
17693 *)
17694 install_sh="\${SHELL} $am_aux_dir/install-sh"
17695 esac
17696fi
17697
17698# Installed binaries are usually stripped using `strip' when the user
17699# run `make install-strip'. However `strip' might not be the right
17700# tool to use in cross-compilation environments, therefore Automake
17701# will honor the `STRIP' environment variable to overrule this program.
17702if test "$cross_compiling" != no; then
17703 if test -n "$ac_tool_prefix"; then
17704 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
17705set dummy ${ac_tool_prefix}strip; ac_word=$2
17706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17707$as_echo_n "checking for $ac_word... " >&6; }
17708if test "${ac_cv_prog_STRIP+set}" = set; then :
17709 $as_echo_n "(cached) " >&6
17710else
17711 if test -n "$STRIP"; then
17712 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
17713else
17714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17715for as_dir in $PATH
17716do
17717 IFS=$as_save_IFS
17718 test -z "$as_dir" && as_dir=.
17719 for ac_exec_ext in '' $ac_executable_extensions; do
17720 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17721 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
17722 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17723 break 2
17724 fi
17725done
17726 done
17727IFS=$as_save_IFS
17728
17729fi
17730fi
17731STRIP=$ac_cv_prog_STRIP
17732if test -n "$STRIP"; then
17733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
17734$as_echo "$STRIP" >&6; }
17735else
17736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17737$as_echo "no" >&6; }
17738fi
17739
17740
17741fi
17742if test -z "$ac_cv_prog_STRIP"; then
17743 ac_ct_STRIP=$STRIP
17744 # Extract the first word of "strip", so it can be a program name with args.
17745set dummy strip; ac_word=$2
17746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17747$as_echo_n "checking for $ac_word... " >&6; }
17748if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
17749 $as_echo_n "(cached) " >&6
17750else
17751 if test -n "$ac_ct_STRIP"; then
17752 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
17753else
17754as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17755for as_dir in $PATH
17756do
17757 IFS=$as_save_IFS
17758 test -z "$as_dir" && as_dir=.
17759 for ac_exec_ext in '' $ac_executable_extensions; do
17760 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17761 ac_cv_prog_ac_ct_STRIP="strip"
17762 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17763 break 2
17764 fi
17765done
17766 done
17767IFS=$as_save_IFS
17768
17769fi
17770fi
17771ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
17772if test -n "$ac_ct_STRIP"; then
17773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
17774$as_echo "$ac_ct_STRIP" >&6; }
17775else
17776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17777$as_echo "no" >&6; }
17778fi
17779
17780 if test "x$ac_ct_STRIP" = x; then
17781 STRIP=":"
17782 else
17783 case $cross_compiling:$ac_tool_warned in
17784yes:)
17785{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17786$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17787ac_tool_warned=yes ;;
17788esac
17789 STRIP=$ac_ct_STRIP
17790 fi
17791else
17792 STRIP="$ac_cv_prog_STRIP"
17793fi
17794
17795fi
17796INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
17797
c971b7fa
PA
17798mkdir_p="$MKDIR_P"
17799case $mkdir_p in
17800 [\\/$]* | ?:[\\/]*) ;;
17801 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
17802esac
17803
17804for ac_prog in gawk mawk nawk awk
17805do
17806 # Extract the first word of "$ac_prog", so it can be a program name with args.
17807set dummy $ac_prog; ac_word=$2
17808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17809$as_echo_n "checking for $ac_word... " >&6; }
17810if test "${ac_cv_prog_AWK+set}" = set; then :
17811 $as_echo_n "(cached) " >&6
17812else
17813 if test -n "$AWK"; then
17814 ac_cv_prog_AWK="$AWK" # Let the user override the test.
17815else
17816as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17817for as_dir in $PATH
17818do
17819 IFS=$as_save_IFS
17820 test -z "$as_dir" && as_dir=.
17821 for ac_exec_ext in '' $ac_executable_extensions; do
17822 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17823 ac_cv_prog_AWK="$ac_prog"
17824 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17825 break 2
17826 fi
17827done
17828 done
17829IFS=$as_save_IFS
17830
17831fi
17832fi
17833AWK=$ac_cv_prog_AWK
17834if test -n "$AWK"; then
17835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
17836$as_echo "$AWK" >&6; }
17837else
17838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17839$as_echo "no" >&6; }
17840fi
17841
17842
17843 test -n "$AWK" && break
17844done
17845
17846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
17847$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
17848set x ${MAKE-make}
17849ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
17850if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
17851 $as_echo_n "(cached) " >&6
17852else
17853 cat >conftest.make <<\_ACEOF
17854SHELL = /bin/sh
17855all:
17856 @echo '@@@%%%=$(MAKE)=@@@%%%'
17857_ACEOF
17858# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
17859case `${MAKE-make} -f conftest.make 2>/dev/null` in
17860 *@@@%%%=?*=@@@%%%*)
17861 eval ac_cv_prog_make_${ac_make}_set=yes;;
17862 *)
17863 eval ac_cv_prog_make_${ac_make}_set=no;;
17864esac
17865rm -f conftest.make
17866fi
17867if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
17868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17869$as_echo "yes" >&6; }
17870 SET_MAKE=
17871else
17872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17873$as_echo "no" >&6; }
17874 SET_MAKE="MAKE=${MAKE-make}"
17875fi
17876
17877rm -rf .tst 2>/dev/null
17878mkdir .tst 2>/dev/null
17879if test -d .tst; then
17880 am__leading_dot=.
17881else
17882 am__leading_dot=_
17883fi
17884rmdir .tst 2>/dev/null
17885
17886DEPDIR="${am__leading_dot}deps"
17887
17888ac_config_commands="$ac_config_commands depfiles"
17889
17890
17891am_make=${MAKE-make}
17892cat > confinc << 'END'
17893am__doit:
17894 @echo this is the am__doit target
17895.PHONY: am__doit
17896END
17897# If we don't find an include directive, just comment out the code.
17898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
17899$as_echo_n "checking for style of include used by $am_make... " >&6; }
17900am__include="#"
17901am__quote=
17902_am_result=none
17903# First try GNU make style include.
17904echo "include confinc" > confmf
17905# Ignore all kinds of additional output from `make'.
17906case `$am_make -s -f confmf 2> /dev/null` in #(
17907*the\ am__doit\ target*)
17908 am__include=include
17909 am__quote=
17910 _am_result=GNU
17911 ;;
17912esac
17913# Now try BSD make style include.
17914if test "$am__include" = "#"; then
17915 echo '.include "confinc"' > confmf
17916 case `$am_make -s -f confmf 2> /dev/null` in #(
17917 *the\ am__doit\ target*)
17918 am__include=.include
17919 am__quote="\""
17920 _am_result=BSD
17921 ;;
17922 esac
17923fi
17924
17925
17926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
17927$as_echo "$_am_result" >&6; }
17928rm -f confinc confmf
17929
17930# Check whether --enable-dependency-tracking was given.
17931if test "${enable_dependency_tracking+set}" = set; then :
17932 enableval=$enable_dependency_tracking;
17933fi
17934
17935if test "x$enable_dependency_tracking" != xno; then
17936 am_depcomp="$ac_aux_dir/depcomp"
17937 AMDEPBACKSLASH='\'
17938fi
17939 if test "x$enable_dependency_tracking" != xno; then
17940 AMDEP_TRUE=
17941 AMDEP_FALSE='#'
17942else
17943 AMDEP_TRUE='#'
17944 AMDEP_FALSE=
17945fi
17946
17947
17948if test "`cd $srcdir && pwd`" != "`pwd`"; then
17949 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
17950 # is not polluted with repeated "-I."
17951 am__isrc=' -I$(srcdir)'
17952 # test to see if srcdir already configured
17953 if test -f $srcdir/config.status; then
17954 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
17955 fi
17956fi
17957
17958# test whether we have cygpath
17959if test -z "$CYGPATH_W"; then
17960 if (cygpath --version) >/dev/null 2>/dev/null; then
17961 CYGPATH_W='cygpath -w'
17962 else
17963 CYGPATH_W=echo
17964 fi
17965fi
17966
17967
17968# Define the identity of the package.
17969 PACKAGE=libgnu
17970 VERSION=UNUSED-VERSION
17971
17972
17973# Some tools Automake needs.
17974
17975ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
17976
17977
17978AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
17979
17980
17981AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
17982
17983
17984AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
17985
17986
17987MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
17988
17989# We need awk for the "check" target. The system "awk" is bad on
17990# some platforms.
17991# Always define AMTAR for backward compatibility.
17992
17993AMTAR=${AMTAR-"${am_missing_run}tar"}
17994
17995am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
17996
17997
17998
17999
18000depcc="$CC" am_compiler_list=
18001
18002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
18003$as_echo_n "checking dependency style of $depcc... " >&6; }
18004if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
18005 $as_echo_n "(cached) " >&6
18006else
18007 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
18008 # We make a subdir and do the tests there. Otherwise we can end up
18009 # making bogus files that we don't know about and never remove. For
18010 # instance it was reported that on HP-UX the gcc test will end up
18011 # making a dummy file named `D' -- because `-MD' means `put the output
18012 # in D'.
18013 mkdir conftest.dir
18014 # Copy depcomp to subdir because otherwise we won't find it if we're
18015 # using a relative directory.
18016 cp "$am_depcomp" conftest.dir
18017 cd conftest.dir
18018 # We will build objects and dependencies in a subdirectory because
18019 # it helps to detect inapplicable dependency modes. For instance
18020 # both Tru64's cc and ICC support -MD to output dependencies as a
18021 # side effect of compilation, but ICC will put the dependencies in
18022 # the current directory while Tru64 will put them in the object
18023 # directory.
18024 mkdir sub
18025
18026 am_cv_CC_dependencies_compiler_type=none
18027 if test "$am_compiler_list" = ""; then
18028 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
18029 fi
18030 am__universal=false
18031 case " $depcc " in #(
18032 *\ -arch\ *\ -arch\ *) am__universal=true ;;
18033 esac
18034
18035 for depmode in $am_compiler_list; do
18036 # Setup a source with many dependencies, because some compilers
18037 # like to wrap large dependency lists on column 80 (with \), and
18038 # we should not choose a depcomp mode which is confused by this.
18039 #
18040 # We need to recreate these files for each test, as the compiler may
18041 # overwrite some of them when testing with obscure command lines.
18042 # This happens at least with the AIX C compiler.
18043 : > sub/conftest.c
18044 for i in 1 2 3 4 5 6; do
18045 echo '#include "conftst'$i'.h"' >> sub/conftest.c
18046 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
18047 # Solaris 8's {/usr,}/bin/sh.
18048 touch sub/conftst$i.h
18049 done
18050 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
18051
18052 # We check with `-c' and `-o' for the sake of the "dashmstdout"
18053 # mode. It turns out that the SunPro C++ compiler does not properly
18054 # handle `-M -o', and we need to detect this. Also, some Intel
18055 # versions had trouble with output in subdirs
18056 am__obj=sub/conftest.${OBJEXT-o}
18057 am__minus_obj="-o $am__obj"
18058 case $depmode in
18059 gcc)
18060 # This depmode causes a compiler race in universal mode.
18061 test "$am__universal" = false || continue
18062 ;;
18063 nosideeffect)
18064 # after this tag, mechanisms are not by side-effect, so they'll
18065 # only be used when explicitly requested
18066 if test "x$enable_dependency_tracking" = xyes; then
18067 continue
18068 else
18069 break
18070 fi
18071 ;;
18072 msvisualcpp | msvcmsys)
18073 # This compiler won't grok `-c -o', but also, the minuso test has
18074 # not run yet. These depmodes are late enough in the game, and
18075 # so weak that their functioning should not be impacted.
18076 am__obj=conftest.${OBJEXT-o}
18077 am__minus_obj=
18078 ;;
18079 none) break ;;
18080 esac
18081 if depmode=$depmode \
18082 source=sub/conftest.c object=$am__obj \
18083 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
18084 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
18085 >/dev/null 2>conftest.err &&
18086 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
18087 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
18088 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
18089 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
18090 # icc doesn't choke on unknown options, it will just issue warnings
18091 # or remarks (even with -Werror). So we grep stderr for any message
18092 # that says an option was ignored or not supported.
18093 # When given -MP, icc 7.0 and 7.1 complain thusly:
18094 # icc: Command line warning: ignoring option '-M'; no argument required
18095 # The diagnosis changed in icc 8.0:
18096 # icc: Command line remark: option '-MP' not supported
18097 if (grep 'ignoring option' conftest.err ||
18098 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
18099 am_cv_CC_dependencies_compiler_type=$depmode
18100 break
18101 fi
18102 fi
18103 done
18104
18105 cd ..
18106 rm -rf conftest.dir
18107else
18108 am_cv_CC_dependencies_compiler_type=none
18109fi
18110
18111fi
18112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
18113$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
18114CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
18115
18116 if
18117 test "x$enable_dependency_tracking" != xno \
18118 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
18119 am__fastdepCC_TRUE=
18120 am__fastdepCC_FALSE='#'
18121else
18122 am__fastdepCC_TRUE='#'
18123 am__fastdepCC_FALSE=
18124fi
18125
18126
18127
18128
18129# --------------------- #
18130# Checks for programs. #
18131# --------------------- #
18132
18133
18134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
18135$as_echo_n "checking whether ln -s works... " >&6; }
18136LN_S=$as_ln_s
18137if test "$LN_S" = "ln -s"; then
18138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18139$as_echo "yes" >&6; }
18140else
18141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
18142$as_echo "no, using $LN_S" >&6; }
18143fi
18144
18145if test -n "$ac_tool_prefix"; then
18146 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
18147set dummy ${ac_tool_prefix}ranlib; ac_word=$2
18148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18149$as_echo_n "checking for $ac_word... " >&6; }
18150if test "${ac_cv_prog_RANLIB+set}" = set; then :
18151 $as_echo_n "(cached) " >&6
18152else
18153 if test -n "$RANLIB"; then
18154 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
18155else
18156as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18157for as_dir in $PATH
18158do
18159 IFS=$as_save_IFS
18160 test -z "$as_dir" && as_dir=.
18161 for ac_exec_ext in '' $ac_executable_extensions; do
18162 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18163 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
18164 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18165 break 2
18166 fi
18167done
18168 done
18169IFS=$as_save_IFS
18170
18171fi
18172fi
18173RANLIB=$ac_cv_prog_RANLIB
18174if test -n "$RANLIB"; then
18175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
18176$as_echo "$RANLIB" >&6; }
18177else
18178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18179$as_echo "no" >&6; }
18180fi
18181
18182
18183fi
18184if test -z "$ac_cv_prog_RANLIB"; then
18185 ac_ct_RANLIB=$RANLIB
18186 # Extract the first word of "ranlib", so it can be a program name with args.
18187set dummy ranlib; ac_word=$2
18188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18189$as_echo_n "checking for $ac_word... " >&6; }
18190if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
18191 $as_echo_n "(cached) " >&6
18192else
18193 if test -n "$ac_ct_RANLIB"; then
18194 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
18195else
18196as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18197for as_dir in $PATH
18198do
18199 IFS=$as_save_IFS
18200 test -z "$as_dir" && as_dir=.
18201 for ac_exec_ext in '' $ac_executable_extensions; do
18202 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18203 ac_cv_prog_ac_ct_RANLIB="ranlib"
18204 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18205 break 2
18206 fi
18207done
18208 done
18209IFS=$as_save_IFS
18210
18211fi
18212fi
18213ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
18214if test -n "$ac_ct_RANLIB"; then
18215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
18216$as_echo "$ac_ct_RANLIB" >&6; }
18217else
18218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18219$as_echo "no" >&6; }
18220fi
18221
18222 if test "x$ac_ct_RANLIB" = x; then
18223 RANLIB=":"
18224 else
18225 case $cross_compiling:$ac_tool_warned in
18226yes:)
18227{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18228$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18229ac_tool_warned=yes ;;
18230esac
18231 RANLIB=$ac_ct_RANLIB
18232 fi
18233else
18234 RANLIB="$ac_cv_prog_RANLIB"
18235fi
18236
18237
18238if test -n "$ac_tool_prefix"; then
18239 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
18240set dummy ${ac_tool_prefix}ar; ac_word=$2
18241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18242$as_echo_n "checking for $ac_word... " >&6; }
18243if test "${ac_cv_prog_AR+set}" = set; then :
18244 $as_echo_n "(cached) " >&6
18245else
18246 if test -n "$AR"; then
18247 ac_cv_prog_AR="$AR" # Let the user override the test.
18248else
18249as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18250for as_dir in $PATH
18251do
18252 IFS=$as_save_IFS
18253 test -z "$as_dir" && as_dir=.
18254 for ac_exec_ext in '' $ac_executable_extensions; do
18255 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18256 ac_cv_prog_AR="${ac_tool_prefix}ar"
18257 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18258 break 2
18259 fi
18260done
18261 done
18262IFS=$as_save_IFS
18263
18264fi
18265fi
18266AR=$ac_cv_prog_AR
18267if test -n "$AR"; then
18268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
18269$as_echo "$AR" >&6; }
18270else
18271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18272$as_echo "no" >&6; }
18273fi
18274
18275
18276fi
18277if test -z "$ac_cv_prog_AR"; then
18278 ac_ct_AR=$AR
18279 # Extract the first word of "ar", so it can be a program name with args.
18280set dummy ar; ac_word=$2
18281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18282$as_echo_n "checking for $ac_word... " >&6; }
18283if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
18284 $as_echo_n "(cached) " >&6
18285else
18286 if test -n "$ac_ct_AR"; then
18287 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
18288else
18289as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18290for as_dir in $PATH
18291do
18292 IFS=$as_save_IFS
18293 test -z "$as_dir" && as_dir=.
18294 for ac_exec_ext in '' $ac_executable_extensions; do
18295 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18296 ac_cv_prog_ac_ct_AR="ar"
18297 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18298 break 2
18299 fi
18300done
18301 done
18302IFS=$as_save_IFS
18303
18304fi
18305fi
18306ac_ct_AR=$ac_cv_prog_ac_ct_AR
18307if test -n "$ac_ct_AR"; then
18308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
18309$as_echo "$ac_ct_AR" >&6; }
18310else
18311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18312$as_echo "no" >&6; }
18313fi
18314
18315 if test "x$ac_ct_AR" = x; then
18316 AR=""
18317 else
18318 case $cross_compiling:$ac_tool_warned in
18319yes:)
18320{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18321$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18322ac_tool_warned=yes ;;
18323esac
18324 AR=$ac_ct_AR
18325 fi
18326else
18327 AR="$ac_cv_prog_AR"
18328fi
18329
18330
18331# ---------------------- #
18332# Checks for libraries. #
18333# ---------------------- #
18334
18335ac_config_files="$ac_config_files Makefile import/Makefile"
18336
18337ac_config_commands="$ac_config_commands default"
18338
18339cat >confcache <<\_ACEOF
18340# This file is a shell script that caches the results of configure
18341# tests run on this system so they can be shared between configure
18342# scripts and configure runs, see configure's option --config-cache.
18343# It is not useful on other systems. If it contains results you don't
18344# want to keep, you may remove or edit it.
18345#
18346# config.status only pays attention to the cache file if you give it
18347# the --recheck option to rerun configure.
18348#
18349# `ac_cv_env_foo' variables (set or unset) will be overridden when
18350# loading this file, other *unset* `ac_cv_foo' will be assigned the
18351# following values.
18352
18353_ACEOF
18354
18355# The following way of writing the cache mishandles newlines in values,
18356# but we know of no workaround that is simple, portable, and efficient.
18357# So, we kill variables containing newlines.
18358# Ultrix sh set writes to stderr and can't be redirected directly,
18359# and sets the high bit in the cache file unless we assign to the vars.
18360(
18361 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
18362 eval ac_val=\$$ac_var
18363 case $ac_val in #(
18364 *${as_nl}*)
18365 case $ac_var in #(
18366 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
18367$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
18368 esac
18369 case $ac_var in #(
18370 _ | IFS | as_nl) ;; #(
18371 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
18372 *) { eval $ac_var=; unset $ac_var;} ;;
18373 esac ;;
18374 esac
18375 done
18376
18377 (set) 2>&1 |
18378 case $as_nl`(ac_space=' '; set) 2>&1` in #(
18379 *${as_nl}ac_space=\ *)
18380 # `set' does not quote correctly, so add quotes: double-quote
18381 # substitution turns \\\\ into \\, and sed turns \\ into \.
18382 sed -n \
18383 "s/'/'\\\\''/g;
18384 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18385 ;; #(
18386 *)
18387 # `set' quotes correctly as required by POSIX, so do not add quotes.
18388 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
18389 ;;
18390 esac |
18391 sort
18392) |
18393 sed '
18394 /^ac_cv_env_/b end
18395 t clear
18396 :clear
18397 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18398 t end
18399 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18400 :end' >>confcache
18401if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
18402 if test -w "$cache_file"; then
18403 test "x$cache_file" != "x/dev/null" &&
18404 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
18405$as_echo "$as_me: updating cache $cache_file" >&6;}
18406 cat confcache >$cache_file
18407 else
18408 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
18409$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
18410 fi
18411fi
18412rm -f confcache
18413
18414test "x$prefix" = xNONE && prefix=$ac_default_prefix
18415# Let make expand exec_prefix.
18416test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18417
18418DEFS=-DHAVE_CONFIG_H
18419
18420ac_libobjs=
18421ac_ltlibobjs=
18422for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18423 # 1. Remove the extension, and $U if already installed.
18424 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
18425 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
18426 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
18427 # will be set to the directory where LIBOBJS objects are built.
18428 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
18429 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
18430done
18431LIBOBJS=$ac_libobjs
18432
18433LTLIBOBJS=$ac_ltlibobjs
18434
18435
18436if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
18437 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
18438Usually this means the macro was only invoked conditionally." "$LINENO" 5
18439fi
18440if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
18441 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
18442Usually this means the macro was only invoked conditionally." "$LINENO" 5
18443fi
8690e634
JK
18444if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
18445 as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
18446Usually this means the macro was only invoked conditionally." "$LINENO" 5
18447fi
18848e28
GF
18448if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
18449 as_fn_error "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
18450Usually this means the macro was only invoked conditionally." "$LINENO" 5
18451fi
88b48903
WN
18452if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
18453 as_fn_error "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
18454Usually this means the macro was only invoked conditionally." "$LINENO" 5
18455fi
8690e634
JK
18456if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
18457 as_fn_error "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
18458Usually this means the macro was only invoked conditionally." "$LINENO" 5
18459fi
c971b7fa
PA
18460if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
18461 as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined.
18462Usually this means the macro was only invoked conditionally." "$LINENO" 5
18463fi
88b48903
WN
18464
18465
8690e634
JK
18466if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
18467 as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
18468Usually this means the macro was only invoked conditionally." "$LINENO" 5
18469fi
c971b7fa
PA
18470if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
18471 as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
18472Usually this means the macro was only invoked conditionally." "$LINENO" 5
18473fi
18474
18475 gl_libobjs=
18476 gl_ltlibobjs=
18477 if test -n "$gl_LIBOBJS"; then
18478 # Remove the extension.
18479 sed_drop_objext='s/\.o$//;s/\.obj$//'
18480 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
18481 gl_libobjs="$gl_libobjs $i.$ac_objext"
18482 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
18483 done
18484 fi
18485 gl_LIBOBJS=$gl_libobjs
18486
18487 gl_LTLIBOBJS=$gl_ltlibobjs
18488
18489
18490
18491 gltests_libobjs=
18492 gltests_ltlibobjs=
18493 if test -n "$gltests_LIBOBJS"; then
18494 # Remove the extension.
18495 sed_drop_objext='s/\.o$//;s/\.obj$//'
18496 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
18497 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
18498 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
18499 done
18500 fi
18501 gltests_LIBOBJS=$gltests_libobjs
18502
18503 gltests_LTLIBOBJS=$gltests_ltlibobjs
18504
18505
18506if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
18507 as_fn_error "conditional \"AMDEP\" was never defined.
18508Usually this means the macro was only invoked conditionally." "$LINENO" 5
18509fi
18510if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
18511 as_fn_error "conditional \"am__fastdepCC\" was never defined.
18512Usually this means the macro was only invoked conditionally." "$LINENO" 5
18513fi
18514 if test -n "$EXEEXT"; then
18515 am__EXEEXT_TRUE=
18516 am__EXEEXT_FALSE='#'
18517else
18518 am__EXEEXT_TRUE='#'
18519 am__EXEEXT_FALSE=
18520fi
18521
18522
18523: ${CONFIG_STATUS=./config.status}
18524ac_write_fail=0
18525ac_clean_files_save=$ac_clean_files
18526ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18527{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
18528$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
18529as_write_fail=0
18530cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
18531#! $SHELL
18532# Generated by $as_me.
18533# Run this file to recreate the current configuration.
18534# Compiler output produced by configure, useful for debugging
18535# configure, is in config.log if it exists.
18536
18537debug=false
18538ac_cs_recheck=false
18539ac_cs_silent=false
18540
18541SHELL=\${CONFIG_SHELL-$SHELL}
18542export SHELL
18543_ASEOF
18544cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
18545## -------------------- ##
18546## M4sh Initialization. ##
18547## -------------------- ##
18548
18549# Be more Bourne compatible
18550DUALCASE=1; export DUALCASE # for MKS sh
18551if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18552 emulate sh
18553 NULLCMD=:
18554 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
18555 # is contrary to our usage. Disable this feature.
18556 alias -g '${1+"$@"}'='"$@"'
18557 setopt NO_GLOB_SUBST
18558else
18559 case `(set -o) 2>/dev/null` in #(
18560 *posix*) :
18561 set -o posix ;; #(
18562 *) :
18563 ;;
18564esac
18565fi
18566
18567
18568as_nl='
18569'
18570export as_nl
18571# Printing a long string crashes Solaris 7 /usr/bin/printf.
18572as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
18573as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
18574as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
18575# Prefer a ksh shell builtin over an external printf program on Solaris,
18576# but without wasting forks for bash or zsh.
18577if test -z "$BASH_VERSION$ZSH_VERSION" \
18578 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
18579 as_echo='print -r --'
18580 as_echo_n='print -rn --'
18581elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
18582 as_echo='printf %s\n'
18583 as_echo_n='printf %s'
18584else
18585 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
18586 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
18587 as_echo_n='/usr/ucb/echo -n'
18588 else
18589 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
18590 as_echo_n_body='eval
18591 arg=$1;
18592 case $arg in #(
18593 *"$as_nl"*)
18594 expr "X$arg" : "X\\(.*\\)$as_nl";
18595 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
18596 esac;
18597 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
18598 '
18599 export as_echo_n_body
18600 as_echo_n='sh -c $as_echo_n_body as_echo'
18601 fi
18602 export as_echo_body
18603 as_echo='sh -c $as_echo_body as_echo'
18604fi
18605
18606# The user is always right.
18607if test "${PATH_SEPARATOR+set}" != set; then
18608 PATH_SEPARATOR=:
18609 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
18610 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
18611 PATH_SEPARATOR=';'
18612 }
18613fi
18614
18615
18616# IFS
18617# We need space, tab and new line, in precisely that order. Quoting is
18618# there to prevent editors from complaining about space-tab.
18619# (If _AS_PATH_WALK were called with IFS unset, it would disable word
18620# splitting by setting IFS to empty value.)
18621IFS=" "" $as_nl"
18622
18623# Find who we are. Look in the path if we contain no directory separator.
18624case $0 in #((
18625 *[\\/]* ) as_myself=$0 ;;
18626 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18627for as_dir in $PATH
18628do
18629 IFS=$as_save_IFS
18630 test -z "$as_dir" && as_dir=.
18631 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18632 done
18633IFS=$as_save_IFS
18634
18635 ;;
18636esac
18637# We did not find ourselves, most probably we were run as `sh COMMAND'
18638# in which case we are not to be found in the path.
18639if test "x$as_myself" = x; then
18640 as_myself=$0
18641fi
18642if test ! -f "$as_myself"; then
18643 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
18644 exit 1
18645fi
18646
18647# Unset variables that we do not need and which cause bugs (e.g. in
18648# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
18649# suppresses any "Segmentation fault" message there. '((' could
18650# trigger a bug in pdksh 5.2.14.
18651for as_var in BASH_ENV ENV MAIL MAILPATH
18652do eval test x\${$as_var+set} = xset \
18653 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
18654done
18655PS1='$ '
18656PS2='> '
18657PS4='+ '
18658
18659# NLS nuisances.
18660LC_ALL=C
18661export LC_ALL
18662LANGUAGE=C
18663export LANGUAGE
18664
18665# CDPATH.
18666(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
18667
18668
18669# as_fn_error ERROR [LINENO LOG_FD]
18670# ---------------------------------
18671# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
18672# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
18673# script with status $?, using 1 if that was 0.
18674as_fn_error ()
18675{
18676 as_status=$?; test $as_status -eq 0 && as_status=1
18677 if test "$3"; then
18678 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
18679 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
18680 fi
18681 $as_echo "$as_me: error: $1" >&2
18682 as_fn_exit $as_status
18683} # as_fn_error
18684
18685
18686# as_fn_set_status STATUS
18687# -----------------------
18688# Set $? to STATUS, without forking.
18689as_fn_set_status ()
18690{
18691 return $1
18692} # as_fn_set_status
18693
18694# as_fn_exit STATUS
18695# -----------------
18696# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
18697as_fn_exit ()
18698{
18699 set +e
18700 as_fn_set_status $1
18701 exit $1
18702} # as_fn_exit
18703
18704# as_fn_unset VAR
18705# ---------------
18706# Portably unset VAR.
18707as_fn_unset ()
18708{
18709 { eval $1=; unset $1;}
18710}
18711as_unset=as_fn_unset
18712# as_fn_append VAR VALUE
18713# ----------------------
18714# Append the text in VALUE to the end of the definition contained in VAR. Take
18715# advantage of any shell optimizations that allow amortized linear growth over
18716# repeated appends, instead of the typical quadratic growth present in naive
18717# implementations.
18718if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
18719 eval 'as_fn_append ()
18720 {
18721 eval $1+=\$2
18722 }'
18723else
18724 as_fn_append ()
18725 {
18726 eval $1=\$$1\$2
18727 }
18728fi # as_fn_append
18729
18730# as_fn_arith ARG...
18731# ------------------
18732# Perform arithmetic evaluation on the ARGs, and store the result in the
18733# global $as_val. Take advantage of shells that can avoid forks. The arguments
18734# must be portable across $(()) and expr.
18735if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
18736 eval 'as_fn_arith ()
18737 {
18738 as_val=$(( $* ))
18739 }'
18740else
18741 as_fn_arith ()
18742 {
18743 as_val=`expr "$@" || test $? -eq 1`
18744 }
18745fi # as_fn_arith
18746
18747
18748if expr a : '\(a\)' >/dev/null 2>&1 &&
18749 test "X`expr 00001 : '.*\(...\)'`" = X001; then
18750 as_expr=expr
18751else
18752 as_expr=false
18753fi
18754
18755if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
18756 as_basename=basename
18757else
18758 as_basename=false
18759fi
18760
18761if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18762 as_dirname=dirname
18763else
18764 as_dirname=false
18765fi
18766
18767as_me=`$as_basename -- "$0" ||
18768$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18769 X"$0" : 'X\(//\)$' \| \
18770 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
18771$as_echo X/"$0" |
18772 sed '/^.*\/\([^/][^/]*\)\/*$/{
18773 s//\1/
18774 q
18775 }
18776 /^X\/\(\/\/\)$/{
18777 s//\1/
18778 q
18779 }
18780 /^X\/\(\/\).*/{
18781 s//\1/
18782 q
18783 }
18784 s/.*/./; q'`
18785
18786# Avoid depending upon Character Ranges.
18787as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18788as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18789as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18790as_cr_digits='0123456789'
18791as_cr_alnum=$as_cr_Letters$as_cr_digits
18792
18793ECHO_C= ECHO_N= ECHO_T=
18794case `echo -n x` in #(((((
18795-n*)
18796 case `echo 'xy\c'` in
18797 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
18798 xy) ECHO_C='\c';;
18799 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18800 ECHO_T=' ';;
18801 esac;;
18802*)
18803 ECHO_N='-n';;
18804esac
18805
18806rm -f conf$$ conf$$.exe conf$$.file
18807if test -d conf$$.dir; then
18808 rm -f conf$$.dir/conf$$.file
18809else
18810 rm -f conf$$.dir
18811 mkdir conf$$.dir 2>/dev/null
18812fi
18813if (echo >conf$$.file) 2>/dev/null; then
18814 if ln -s conf$$.file conf$$ 2>/dev/null; then
18815 as_ln_s='ln -s'
18816 # ... but there are two gotchas:
18817 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18818 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
18819 # In both cases, we have to default to `cp -p'.
18820 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
18821 as_ln_s='cp -p'
18822 elif ln conf$$.file conf$$ 2>/dev/null; then
18823 as_ln_s=ln
18824 else
18825 as_ln_s='cp -p'
18826 fi
18827else
18828 as_ln_s='cp -p'
18829fi
18830rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18831rmdir conf$$.dir 2>/dev/null
18832
18833
18834# as_fn_mkdir_p
18835# -------------
18836# Create "$as_dir" as a directory, including parents if necessary.
18837as_fn_mkdir_p ()
18838{
18839
18840 case $as_dir in #(
18841 -*) as_dir=./$as_dir;;
18842 esac
18843 test -d "$as_dir" || eval $as_mkdir_p || {
18844 as_dirs=
18845 while :; do
18846 case $as_dir in #(
18847 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18848 *) as_qdir=$as_dir;;
18849 esac
18850 as_dirs="'$as_qdir' $as_dirs"
18851 as_dir=`$as_dirname -- "$as_dir" ||
18852$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18853 X"$as_dir" : 'X\(//\)[^/]' \| \
18854 X"$as_dir" : 'X\(//\)$' \| \
18855 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18856$as_echo X"$as_dir" |
18857 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18858 s//\1/
18859 q
18860 }
18861 /^X\(\/\/\)[^/].*/{
18862 s//\1/
18863 q
18864 }
18865 /^X\(\/\/\)$/{
18866 s//\1/
18867 q
18868 }
18869 /^X\(\/\).*/{
18870 s//\1/
18871 q
18872 }
18873 s/.*/./; q'`
18874 test -d "$as_dir" && break
18875 done
18876 test -z "$as_dirs" || eval "mkdir $as_dirs"
18877 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
18878
18879
18880} # as_fn_mkdir_p
18881if mkdir -p . 2>/dev/null; then
18882 as_mkdir_p='mkdir -p "$as_dir"'
18883else
18884 test -d ./-p && rmdir ./-p
18885 as_mkdir_p=false
18886fi
18887
18888if test -x / >/dev/null 2>&1; then
18889 as_test_x='test -x'
18890else
18891 if ls -dL / >/dev/null 2>&1; then
18892 as_ls_L_option=L
18893 else
18894 as_ls_L_option=
18895 fi
18896 as_test_x='
18897 eval sh -c '\''
18898 if test -d "$1"; then
18899 test -d "$1/.";
18900 else
18901 case $1 in #(
18902 -*)set "./$1";;
18903 esac;
18904 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
18905 ???[sx]*):;;*)false;;esac;fi
18906 '\'' sh
18907 '
18908fi
18909as_executable_p=$as_test_x
18910
18911# Sed expression to map a string onto a valid CPP name.
18912as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
18913
18914# Sed expression to map a string onto a valid variable name.
18915as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
18916
18917
18918exec 6>&1
18919## ----------------------------------- ##
18920## Main body of $CONFIG_STATUS script. ##
18921## ----------------------------------- ##
18922_ASEOF
18923test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
18924
18925cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18926# Save the log message, to keep $0 and so on meaningful, and to
18927# report actual input values of CONFIG_FILES etc. instead of their
18928# values after options handling.
18929ac_log="
18930This file was extended by $as_me, which was
18931generated by GNU Autoconf 2.64. Invocation command line was
18932
18933 CONFIG_FILES = $CONFIG_FILES
18934 CONFIG_HEADERS = $CONFIG_HEADERS
18935 CONFIG_LINKS = $CONFIG_LINKS
18936 CONFIG_COMMANDS = $CONFIG_COMMANDS
18937 $ $0 $@
18938
18939on `(hostname || uname -n) 2>/dev/null | sed 1q`
18940"
18941
18942_ACEOF
18943
18944case $ac_config_files in *"
18945"*) set x $ac_config_files; shift; ac_config_files=$*;;
18946esac
18947
18948case $ac_config_headers in *"
18949"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18950esac
18951
18952
18953cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18954# Files that config.status was made for.
18955config_files="$ac_config_files"
18956config_headers="$ac_config_headers"
18957config_commands="$ac_config_commands"
18958
18959_ACEOF
18960
18961cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18962ac_cs_usage="\
18963\`$as_me' instantiates files and other configuration actions
18964from templates according to the current configuration. Unless the files
18965and actions are specified as TAGs, all are instantiated by default.
18966
18967Usage: $0 [OPTION]... [TAG]...
18968
18969 -h, --help print this help, then exit
18970 -V, --version print version number and configuration settings, then exit
18971 -q, --quiet, --silent
18972 do not print progress messages
18973 -d, --debug don't remove temporary files
18974 --recheck update $as_me by reconfiguring in the same conditions
18975 --file=FILE[:TEMPLATE]
18976 instantiate the configuration file FILE
18977 --header=FILE[:TEMPLATE]
18978 instantiate the configuration header FILE
18979
18980Configuration files:
18981$config_files
18982
18983Configuration headers:
18984$config_headers
18985
18986Configuration commands:
18987$config_commands
18988
18989Report bugs to the package provider."
18990
18991_ACEOF
18992cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18993ac_cs_version="\\
18994config.status
18995configured by $0, generated by GNU Autoconf 2.64,
18996 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
18997
18998Copyright (C) 2009 Free Software Foundation, Inc.
18999This config.status script is free software; the Free Software Foundation
19000gives unlimited permission to copy, distribute and modify it."
19001
19002ac_pwd='$ac_pwd'
19003srcdir='$srcdir'
19004INSTALL='$INSTALL'
19005MKDIR_P='$MKDIR_P'
19006AWK='$AWK'
19007test -n "\$AWK" || AWK=awk
19008_ACEOF
19009
19010cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19011# The default lists apply if the user does not specify any file.
19012ac_need_defaults=:
19013while test $# != 0
19014do
19015 case $1 in
19016 --*=*)
19017 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19018 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19019 ac_shift=:
19020 ;;
19021 *)
19022 ac_option=$1
19023 ac_optarg=$2
19024 ac_shift=shift
19025 ;;
19026 esac
19027
19028 case $ac_option in
19029 # Handling of the options.
19030 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19031 ac_cs_recheck=: ;;
19032 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19033 $as_echo "$ac_cs_version"; exit ;;
19034 --debug | --debu | --deb | --de | --d | -d )
19035 debug=: ;;
19036 --file | --fil | --fi | --f )
19037 $ac_shift
19038 case $ac_optarg in
19039 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19040 esac
19041 as_fn_append CONFIG_FILES " '$ac_optarg'"
19042 ac_need_defaults=false;;
19043 --header | --heade | --head | --hea )
19044 $ac_shift
19045 case $ac_optarg in
19046 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19047 esac
19048 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19049 ac_need_defaults=false;;
19050 --he | --h)
19051 # Conflict between --help and --header
19052 as_fn_error "ambiguous option: \`$1'
19053Try \`$0 --help' for more information.";;
19054 --help | --hel | -h )
19055 $as_echo "$ac_cs_usage"; exit ;;
19056 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19057 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19058 ac_cs_silent=: ;;
19059
19060 # This is an error.
19061 -*) as_fn_error "unrecognized option: \`$1'
19062Try \`$0 --help' for more information." ;;
19063
19064 *) as_fn_append ac_config_targets " $1"
19065 ac_need_defaults=false ;;
19066
19067 esac
19068 shift
19069done
19070
19071ac_configure_extra_args=
19072
19073if $ac_cs_silent; then
19074 exec 6>/dev/null
19075 ac_configure_extra_args="$ac_configure_extra_args --silent"
19076fi
19077
19078_ACEOF
19079cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19080if \$ac_cs_recheck; then
19081 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19082 shift
19083 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19084 CONFIG_SHELL='$SHELL'
19085 export CONFIG_SHELL
19086 exec "\$@"
19087fi
19088
19089_ACEOF
19090cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19091exec 5>>config.log
19092{
19093 echo
19094 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19095## Running $as_me. ##
19096_ASBOX
19097 $as_echo "$ac_log"
19098} >&5
19099
19100_ACEOF
19101cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19102#
19103# INIT-COMMANDS
19104#
19105AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
19106
19107_ACEOF
19108
19109cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19110
19111# Handling of arguments.
19112for ac_config_target in $ac_config_targets
19113do
19114 case $ac_config_target in
19115 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
19116 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
19117 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19118 "import/Makefile") CONFIG_FILES="$CONFIG_FILES import/Makefile" ;;
19119 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
19120
19121 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
19122 esac
19123done
19124
19125
19126# If the user did not use the arguments to specify the items to instantiate,
19127# then the envvar interface is used. Set only those that are not.
19128# We use the long form for the default assignment because of an extremely
19129# bizarre bug on SunOS 4.1.3.
19130if $ac_need_defaults; then
19131 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19132 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19133 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19134fi
19135
19136# Have a temporary directory for convenience. Make it in the build tree
19137# simply because there is no reason against having it here, and in addition,
19138# creating and moving files from /tmp can sometimes cause problems.
19139# Hook for its removal unless debugging.
19140# Note that there is a small window in which the directory will not be cleaned:
19141# after its creation but before its name has been assigned to `$tmp'.
19142$debug ||
19143{
19144 tmp=
19145 trap 'exit_status=$?
19146 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
19147' 0
19148 trap 'as_fn_exit 1' 1 2 13 15
19149}
19150# Create a (secure) tmp directory for tmp files.
19151
19152{
19153 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
19154 test -n "$tmp" && test -d "$tmp"
19155} ||
19156{
19157 tmp=./conf$$-$RANDOM
19158 (umask 077 && mkdir "$tmp")
19159} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
19160
19161# Set up the scripts for CONFIG_FILES section.
19162# No need to generate them if there are no CONFIG_FILES.
19163# This happens for instance with `./config.status config.h'.
19164if test -n "$CONFIG_FILES"; then
19165
19166
19167ac_cr=`echo X | tr X '\015'`
19168# On cygwin, bash can eat \r inside `` if the user requested igncr.
19169# But we know of no other shell where ac_cr would be empty at this
19170# point, so we can use a bashism as a fallback.
19171if test "x$ac_cr" = x; then
19172 eval ac_cr=\$\'\\r\'
19173fi
19174ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19175if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
19176 ac_cs_awk_cr='\r'
19177else
19178 ac_cs_awk_cr=$ac_cr
19179fi
19180
19181echo 'BEGIN {' >"$tmp/subs1.awk" &&
19182_ACEOF
19183
19184
19185{
19186 echo "cat >conf$$subs.awk <<_ACEOF" &&
19187 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19188 echo "_ACEOF"
19189} >conf$$subs.sh ||
19190 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
19191ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
19192ac_delim='%!_!# '
19193for ac_last_try in false false false false false :; do
19194 . ./conf$$subs.sh ||
19195 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
19196
19197 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19198 if test $ac_delim_n = $ac_delim_num; then
19199 break
19200 elif $ac_last_try; then
19201 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
19202 else
19203 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19204 fi
19205done
19206rm -f conf$$subs.sh
19207
19208cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19209cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
19210_ACEOF
19211sed -n '
19212h
19213s/^/S["/; s/!.*/"]=/
19214p
19215g
19216s/^[^!]*!//
19217:repl
19218t repl
19219s/'"$ac_delim"'$//
19220t delim
19221:nl
19222h
19223s/\(.\{148\}\).*/\1/
19224t more1
19225s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19226p
19227n
19228b repl
19229:more1
19230s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19231p
19232g
19233s/.\{148\}//
19234t nl
19235:delim
19236h
19237s/\(.\{148\}\).*/\1/
19238t more2
19239s/["\\]/\\&/g; s/^/"/; s/$/"/
19240p
19241b
19242:more2
19243s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19244p
19245g
19246s/.\{148\}//
19247t delim
19248' <conf$$subs.awk | sed '
19249/^[^""]/{
19250 N
19251 s/\n//
19252}
19253' >>$CONFIG_STATUS || ac_write_fail=1
19254rm -f conf$$subs.awk
19255cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19256_ACAWK
19257cat >>"\$tmp/subs1.awk" <<_ACAWK &&
19258 for (key in S) S_is_set[key] = 1
19259 FS = "\a"
19260
19261}
19262{
19263 line = $ 0
19264 nfields = split(line, field, "@")
19265 substed = 0
19266 len = length(field[1])
19267 for (i = 2; i < nfields; i++) {
19268 key = field[i]
19269 keylen = length(key)
19270 if (S_is_set[key]) {
19271 value = S[key]
19272 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
19273 len += length(value) + length(field[++i])
19274 substed = 1
19275 } else
19276 len += 1 + keylen
19277 }
19278
19279 print line
19280}
19281
19282_ACAWK
19283_ACEOF
19284cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19285if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
19286 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
19287else
19288 cat
19289fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
19290 || as_fn_error "could not setup config files machinery" "$LINENO" 5
19291_ACEOF
19292
19293# VPATH may cause trouble with some makes, so we remove $(srcdir),
19294# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
19295# trailing colons and then remove the whole line if VPATH becomes empty
19296# (actually we leave an empty line to preserve line numbers).
19297if test "x$srcdir" = x.; then
19298 ac_vpsub='/^[ ]*VPATH[ ]*=/{
19299s/:*\$(srcdir):*/:/
19300s/:*\${srcdir}:*/:/
19301s/:*@srcdir@:*/:/
19302s/^\([^=]*=[ ]*\):*/\1/
19303s/:*$//
19304s/^[^=]*=[ ]*$//
19305}'
19306fi
19307
19308cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19309fi # test -n "$CONFIG_FILES"
19310
19311# Set up the scripts for CONFIG_HEADERS section.
19312# No need to generate them if there are no CONFIG_HEADERS.
19313# This happens for instance with `./config.status Makefile'.
19314if test -n "$CONFIG_HEADERS"; then
19315cat >"$tmp/defines.awk" <<\_ACAWK ||
19316BEGIN {
19317_ACEOF
19318
19319# Transform confdefs.h into an awk script `defines.awk', embedded as
19320# here-document in config.status, that substitutes the proper values into
19321# config.h.in to produce config.h.
19322
19323# Create a delimiter string that does not exist in confdefs.h, to ease
19324# handling of long lines.
19325ac_delim='%!_!# '
19326for ac_last_try in false false :; do
19327 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
19328 if test -z "$ac_t"; then
19329 break
19330 elif $ac_last_try; then
19331 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
19332 else
19333 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19334 fi
19335done
19336
19337# For the awk script, D is an array of macro values keyed by name,
19338# likewise P contains macro parameters if any. Preserve backslash
19339# newline sequences.
19340
19341ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
19342sed -n '
19343s/.\{148\}/&'"$ac_delim"'/g
19344t rset
19345:rset
19346s/^[ ]*#[ ]*define[ ][ ]*/ /
19347t def
19348d
19349:def
19350s/\\$//
19351t bsnl
19352s/["\\]/\\&/g
19353s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
19354D["\1"]=" \3"/p
19355s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
19356d
19357:bsnl
19358s/["\\]/\\&/g
19359s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
19360D["\1"]=" \3\\\\\\n"\\/p
19361t cont
19362s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
19363t cont
19364d
19365:cont
19366n
19367s/.\{148\}/&'"$ac_delim"'/g
19368t clear
19369:clear
19370s/\\$//
19371t bsnlc
19372s/["\\]/\\&/g; s/^/"/; s/$/"/p
19373d
19374:bsnlc
19375s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
19376b cont
19377' <confdefs.h | sed '
19378s/'"$ac_delim"'/"\\\
19379"/g' >>$CONFIG_STATUS || ac_write_fail=1
19380
19381cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19382 for (key in D) D_is_set[key] = 1
19383 FS = "\a"
19384}
19385/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
19386 line = \$ 0
19387 split(line, arg, " ")
19388 if (arg[1] == "#") {
19389 defundef = arg[2]
19390 mac1 = arg[3]
19391 } else {
19392 defundef = substr(arg[1], 2)
19393 mac1 = arg[2]
19394 }
19395 split(mac1, mac2, "(") #)
19396 macro = mac2[1]
19397 prefix = substr(line, 1, index(line, defundef) - 1)
19398 if (D_is_set[macro]) {
19399 # Preserve the white space surrounding the "#".
19400 print prefix "define", macro P[macro] D[macro]
19401 next
19402 } else {
19403 # Replace #undef with comments. This is necessary, for example,
19404 # in the case of _POSIX_SOURCE, which is predefined and required
19405 # on some systems where configure will not decide to define it.
19406 if (defundef == "undef") {
19407 print "/*", prefix defundef, macro, "*/"
19408 next
19409 }
19410 }
19411}
19412{ print }
19413_ACAWK
19414_ACEOF
19415cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19416 as_fn_error "could not setup config headers machinery" "$LINENO" 5
19417fi # test -n "$CONFIG_HEADERS"
19418
19419
19420eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
19421shift
19422for ac_tag
19423do
19424 case $ac_tag in
19425 :[FHLC]) ac_mode=$ac_tag; continue;;
19426 esac
19427 case $ac_mode$ac_tag in
19428 :[FHL]*:*);;
19429 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
19430 :[FH]-) ac_tag=-:-;;
19431 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
19432 esac
19433 ac_save_IFS=$IFS
19434 IFS=:
19435 set x $ac_tag
19436 IFS=$ac_save_IFS
19437 shift
19438 ac_file=$1
19439 shift
19440
19441 case $ac_mode in
19442 :L) ac_source=$1;;
19443 :[FH])
19444 ac_file_inputs=
19445 for ac_f
19446 do
19447 case $ac_f in
19448 -) ac_f="$tmp/stdin";;
19449 *) # Look for the file first in the build tree, then in the source tree
19450 # (if the path is not absolute). The absolute path cannot be DOS-style,
19451 # because $ac_f cannot contain `:'.
19452 test -f "$ac_f" ||
19453 case $ac_f in
19454 [\\/$]*) false;;
19455 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
19456 esac ||
19457 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
19458 esac
19459 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
19460 as_fn_append ac_file_inputs " '$ac_f'"
19461 done
19462
19463 # Let's still pretend it is `configure' which instantiates (i.e., don't
19464 # use $as_me), people would be surprised to read:
19465 # /* config.h. Generated by config.status. */
19466 configure_input='Generated from '`
19467 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
19468 `' by configure.'
19469 if test x"$ac_file" != x-; then
19470 configure_input="$ac_file. $configure_input"
19471 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
19472$as_echo "$as_me: creating $ac_file" >&6;}
19473 fi
19474 # Neutralize special characters interpreted by sed in replacement strings.
19475 case $configure_input in #(
19476 *\&* | *\|* | *\\* )
19477 ac_sed_conf_input=`$as_echo "$configure_input" |
19478 sed 's/[\\\\&|]/\\\\&/g'`;; #(
19479 *) ac_sed_conf_input=$configure_input;;
19480 esac
19481
19482 case $ac_tag in
19483 *:-:* | *:-) cat >"$tmp/stdin" \
19484 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
19485 esac
19486 ;;
19487 esac
19488
19489 ac_dir=`$as_dirname -- "$ac_file" ||
19490$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19491 X"$ac_file" : 'X\(//\)[^/]' \| \
19492 X"$ac_file" : 'X\(//\)$' \| \
19493 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
19494$as_echo X"$ac_file" |
19495 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19496 s//\1/
19497 q
19498 }
19499 /^X\(\/\/\)[^/].*/{
19500 s//\1/
19501 q
19502 }
19503 /^X\(\/\/\)$/{
19504 s//\1/
19505 q
19506 }
19507 /^X\(\/\).*/{
19508 s//\1/
19509 q
19510 }
19511 s/.*/./; q'`
19512 as_dir="$ac_dir"; as_fn_mkdir_p
19513 ac_builddir=.
19514
19515case "$ac_dir" in
19516.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19517*)
19518 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19519 # A ".." for each directory in $ac_dir_suffix.
19520 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19521 case $ac_top_builddir_sub in
19522 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19523 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19524 esac ;;
19525esac
19526ac_abs_top_builddir=$ac_pwd
19527ac_abs_builddir=$ac_pwd$ac_dir_suffix
19528# for backward compatibility:
19529ac_top_builddir=$ac_top_build_prefix
19530
19531case $srcdir in
19532 .) # We are building in place.
19533 ac_srcdir=.
19534 ac_top_srcdir=$ac_top_builddir_sub
19535 ac_abs_top_srcdir=$ac_pwd ;;
19536 [\\/]* | ?:[\\/]* ) # Absolute name.
19537 ac_srcdir=$srcdir$ac_dir_suffix;
19538 ac_top_srcdir=$srcdir
19539 ac_abs_top_srcdir=$srcdir ;;
19540 *) # Relative name.
19541 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19542 ac_top_srcdir=$ac_top_build_prefix$srcdir
19543 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
19544esac
19545ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
19546
19547
19548 case $ac_mode in
19549 :F)
19550 #
19551 # CONFIG_FILE
19552 #
19553
19554 case $INSTALL in
19555 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19556 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
19557 esac
19558 ac_MKDIR_P=$MKDIR_P
19559 case $MKDIR_P in
19560 [\\/$]* | ?:[\\/]* ) ;;
19561 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
19562 esac
19563_ACEOF
19564
19565cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19566# If the template does not know about datarootdir, expand it.
19567# FIXME: This hack should be removed a few years after 2.60.
19568ac_datarootdir_hack=; ac_datarootdir_seen=
19569ac_sed_dataroot='
19570/datarootdir/ {
19571 p
19572 q
19573}
19574/@datadir@/p
19575/@docdir@/p
19576/@infodir@/p
19577/@localedir@/p
19578/@mandir@/p'
19579case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
19580*datarootdir*) ac_datarootdir_seen=yes;;
19581*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
19582 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
19583$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
19584_ACEOF
19585cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19586 ac_datarootdir_hack='
19587 s&@datadir@&$datadir&g
19588 s&@docdir@&$docdir&g
19589 s&@infodir@&$infodir&g
19590 s&@localedir@&$localedir&g
19591 s&@mandir@&$mandir&g
19592 s&\\\${datarootdir}&$datarootdir&g' ;;
19593esac
19594_ACEOF
19595
19596# Neutralize VPATH when `$srcdir' = `.'.
19597# Shell code in configure.ac might set extrasub.
19598# FIXME: do we really want to maintain this feature?
19599cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19600ac_sed_extra="$ac_vpsub
19601$extrasub
19602_ACEOF
19603cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19604:t
19605/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19606s|@configure_input@|$ac_sed_conf_input|;t t
19607s&@top_builddir@&$ac_top_builddir_sub&;t t
19608s&@top_build_prefix@&$ac_top_build_prefix&;t t
19609s&@srcdir@&$ac_srcdir&;t t
19610s&@abs_srcdir@&$ac_abs_srcdir&;t t
19611s&@top_srcdir@&$ac_top_srcdir&;t t
19612s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
19613s&@builddir@&$ac_builddir&;t t
19614s&@abs_builddir@&$ac_abs_builddir&;t t
19615s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
19616s&@INSTALL@&$ac_INSTALL&;t t
19617s&@MKDIR_P@&$ac_MKDIR_P&;t t
19618$ac_datarootdir_hack
19619"
19620eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
19621 || as_fn_error "could not create $ac_file" "$LINENO" 5
19622
19623test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
19624 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
19625 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
19626 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
19627which seems to be undefined. Please make sure it is defined." >&5
19628$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
19629which seems to be undefined. Please make sure it is defined." >&2;}
19630
19631 rm -f "$tmp/stdin"
19632 case $ac_file in
19633 -) cat "$tmp/out" && rm -f "$tmp/out";;
19634 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
19635 esac \
19636 || as_fn_error "could not create $ac_file" "$LINENO" 5
19637 ;;
19638 :H)
19639 #
19640 # CONFIG_HEADER
19641 #
19642 if test x"$ac_file" != x-; then
19643 {
19644 $as_echo "/* $configure_input */" \
19645 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
19646 } >"$tmp/config.h" \
19647 || as_fn_error "could not create $ac_file" "$LINENO" 5
19648 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
19649 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
19650$as_echo "$as_me: $ac_file is unchanged" >&6;}
19651 else
19652 rm -f "$ac_file"
19653 mv "$tmp/config.h" "$ac_file" \
19654 || as_fn_error "could not create $ac_file" "$LINENO" 5
19655 fi
19656 else
19657 $as_echo "/* $configure_input */" \
19658 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
19659 || as_fn_error "could not create -" "$LINENO" 5
19660 fi
19661# Compute "$ac_file"'s index in $config_headers.
19662_am_arg="$ac_file"
19663_am_stamp_count=1
19664for _am_header in $config_headers :; do
19665 case $_am_header in
19666 $_am_arg | $_am_arg:* )
19667 break ;;
19668 * )
19669 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
19670 esac
19671done
19672echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
19673$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19674 X"$_am_arg" : 'X\(//\)[^/]' \| \
19675 X"$_am_arg" : 'X\(//\)$' \| \
19676 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
19677$as_echo X"$_am_arg" |
19678 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19679 s//\1/
19680 q
19681 }
19682 /^X\(\/\/\)[^/].*/{
19683 s//\1/
19684 q
19685 }
19686 /^X\(\/\/\)$/{
19687 s//\1/
19688 q
19689 }
19690 /^X\(\/\).*/{
19691 s//\1/
19692 q
19693 }
19694 s/.*/./; q'`/stamp-h$_am_stamp_count
19695 ;;
19696
19697 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
19698$as_echo "$as_me: executing $ac_file commands" >&6;}
19699 ;;
19700 esac
19701
19702
19703 case $ac_file$ac_mode in
19704 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
19705 # Autoconf 2.62 quotes --file arguments for eval, but not when files
19706 # are listed without --file. Let's play safe and only enable the eval
19707 # if we detect the quoting.
19708 case $CONFIG_FILES in
19709 *\'*) eval set x "$CONFIG_FILES" ;;
19710 *) set x $CONFIG_FILES ;;
19711 esac
19712 shift
19713 for mf
19714 do
19715 # Strip MF so we end up with the name of the file.
19716 mf=`echo "$mf" | sed -e 's/:.*$//'`
19717 # Check whether this is an Automake generated Makefile or not.
19718 # We used to match only the files named `Makefile.in', but
19719 # some people rename them; so instead we look at the file content.
19720 # Grep'ing the first line is not enough: some people post-process
19721 # each Makefile.in and add a new line on top of each file to say so.
19722 # Grep'ing the whole file is not good either: AIX grep has a line
19723 # limit of 2048, but all sed's we know have understand at least 4000.
19724 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
19725 dirpart=`$as_dirname -- "$mf" ||
19726$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19727 X"$mf" : 'X\(//\)[^/]' \| \
19728 X"$mf" : 'X\(//\)$' \| \
19729 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
19730$as_echo X"$mf" |
19731 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19732 s//\1/
19733 q
19734 }
19735 /^X\(\/\/\)[^/].*/{
19736 s//\1/
19737 q
19738 }
19739 /^X\(\/\/\)$/{
19740 s//\1/
19741 q
19742 }
19743 /^X\(\/\).*/{
19744 s//\1/
19745 q
19746 }
19747 s/.*/./; q'`
19748 else
19749 continue
19750 fi
19751 # Extract the definition of DEPDIR, am__include, and am__quote
19752 # from the Makefile without running `make'.
19753 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
19754 test -z "$DEPDIR" && continue
19755 am__include=`sed -n 's/^am__include = //p' < "$mf"`
19756 test -z "am__include" && continue
19757 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
19758 # When using ansi2knr, U may be empty or an underscore; expand it
19759 U=`sed -n 's/^U = //p' < "$mf"`
19760 # Find all dependency output files, they are included files with
19761 # $(DEPDIR) in their names. We invoke sed twice because it is the
19762 # simplest approach to changing $(DEPDIR) to its actual value in the
19763 # expansion.
19764 for file in `sed -n "
19765 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
19766 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
19767 # Make sure the directory exists.
19768 test -f "$dirpart/$file" && continue
19769 fdir=`$as_dirname -- "$file" ||
19770$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19771 X"$file" : 'X\(//\)[^/]' \| \
19772 X"$file" : 'X\(//\)$' \| \
19773 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
19774$as_echo X"$file" |
19775 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19776 s//\1/
19777 q
19778 }
19779 /^X\(\/\/\)[^/].*/{
19780 s//\1/
19781 q
19782 }
19783 /^X\(\/\/\)$/{
19784 s//\1/
19785 q
19786 }
19787 /^X\(\/\).*/{
19788 s//\1/
19789 q
19790 }
19791 s/.*/./; q'`
19792 as_dir=$dirpart/$fdir; as_fn_mkdir_p
19793 # echo "creating $dirpart/$file"
19794 echo '# dummy' > "$dirpart/$file"
19795 done
19796 done
19797}
19798 ;;
19799 "default":C)
19800case x$CONFIG_HEADERS in
19801xconfig.h:config.in)
19802echo > stamp-h ;;
19803esac
19804 ;;
19805
19806 esac
19807done # for ac_tag
19808
19809
19810as_fn_exit 0
19811_ACEOF
19812ac_clean_files=$ac_clean_files_save
19813
19814test $ac_write_fail = 0 ||
19815 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
19816
19817
19818# configure is writing to config.log, and then calls config.status.
19819# config.status does its own redirection, appending to config.log.
19820# Unfortunately, on DOS this fails, as config.log is still kept open
19821# by configure, so config.status won't be able to write to it; its
19822# output is simply discarded. So we exec the FD to /dev/null,
19823# effectively closing config.log, so it can be properly (re)opened and
19824# appended to by config.status. When coming back to configure, we
19825# need to make the FD available again.
19826if test "$no_create" != yes; then
19827 ac_cs_success=:
19828 ac_config_status_args=
19829 test "$silent" = yes &&
19830 ac_config_status_args="$ac_config_status_args --quiet"
19831 exec 5>/dev/null
19832 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
19833 exec 5>>config.log
19834 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19835 # would make configure fail if this is the last instruction.
19836 $ac_cs_success || as_fn_exit $?
19837fi
19838if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19839 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19840$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
19841fi
19842
19843
19844exit 0
This page took 1.59776 seconds and 4 git commands to generate.