Delete gdb::unique_ptr/gdb::move
[deliverable/binutils-gdb.git] / gdb / gnulib / configure
CommitLineData
c971b7fa
PA
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.64.
4#
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
7# Foundation, Inc.
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
14
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18 emulate sh
19 NULLCMD=:
20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
31fi
32
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
79fi
80
81
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
90case $0 in #((
91 *[\\/]* ) as_myself=$0 ;;
92 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
93for as_dir in $PATH
94do
95 IFS=$as_save_IFS
96 test -z "$as_dir" && as_dir=.
97 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
98 done
99IFS=$as_save_IFS
100
101 ;;
102esac
103# We did not find ourselves, most probably we were run as `sh COMMAND'
104# in which case we are not to be found in the path.
105if test "x$as_myself" = x; then
106 as_myself=$0
107fi
108if test ! -f "$as_myself"; then
109 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
110 exit 1
111fi
112
113# Unset variables that we do not need and which cause bugs (e.g. in
114# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
115# suppresses any "Segmentation fault" message there. '((' could
116# trigger a bug in pdksh 5.2.14.
117for as_var in BASH_ENV ENV MAIL MAILPATH
118do eval test x\${$as_var+set} = xset \
119 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
120done
121PS1='$ '
122PS2='> '
123PS4='+ '
124
125# NLS nuisances.
126LC_ALL=C
127export LC_ALL
128LANGUAGE=C
129export LANGUAGE
130
131# CDPATH.
132(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
133
134if test "x$CONFIG_SHELL" = x; then
135 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
136 emulate sh
137 NULLCMD=:
138 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
139 # is contrary to our usage. Disable this feature.
140 alias -g '\${1+\"\$@\"}'='\"\$@\"'
141 setopt NO_GLOB_SUBST
142else
143 case \`(set -o) 2>/dev/null\` in #(
144 *posix*) :
145 set -o posix ;; #(
146 *) :
147 ;;
148esac
149fi
150"
151 as_required="as_fn_return () { (exit \$1); }
152as_fn_success () { as_fn_return 0; }
153as_fn_failure () { as_fn_return 1; }
154as_fn_ret_success () { return 0; }
155as_fn_ret_failure () { return 1; }
156
157exitcode=0
158as_fn_success || { exitcode=1; echo as_fn_success failed.; }
159as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
160as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
161as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
162if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
163
164else
165 exitcode=1; echo positional parameters were not saved.
166fi
167test x\$exitcode = x0 || exit 1"
168 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
169 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
170 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
171 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
172test \$(( 1 + 1 )) = 2 || exit 1"
173 if (eval "$as_required") 2>/dev/null; then :
174 as_have_required=yes
175else
176 as_have_required=no
177fi
178 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
179
180else
181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
182as_found=false
183for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
184do
185 IFS=$as_save_IFS
186 test -z "$as_dir" && as_dir=.
187 as_found=:
188 case $as_dir in #(
189 /*)
190 for as_base in sh bash ksh sh5; do
191 # Try only shells that exist, to save several forks.
192 as_shell=$as_dir/$as_base
193 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
194 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
195 CONFIG_SHELL=$as_shell as_have_required=yes
196 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 break 2
198fi
199fi
200 done;;
201 esac
202 as_found=false
203done
204$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
205 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
206 CONFIG_SHELL=$SHELL as_have_required=yes
207fi; }
208IFS=$as_save_IFS
209
210
211 if test "x$CONFIG_SHELL" != x; then :
212 # We cannot yet assume a decent shell, so we have to provide a
213 # neutralization value for shells without unset; and this also
214 # works around shells that cannot unset nonexistent variables.
215 BASH_ENV=/dev/null
216 ENV=/dev/null
217 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
218 export CONFIG_SHELL
219 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
220fi
221
222 if test x$as_have_required = xno; then :
223 $as_echo "$0: This script requires a shell more modern than all"
224 $as_echo "$0: the shells that I found on your system."
225 if test x${ZSH_VERSION+set} = xset ; then
226 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
227 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
228 else
229 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
230$0: including any error possibly output before this
231$0: message. Then install a modern shell, or manually run
232$0: the script under such a shell if you do have one."
233 fi
234 exit 1
235fi
236fi
237fi
238SHELL=${CONFIG_SHELL-/bin/sh}
239export SHELL
240# Unset more variables known to interfere with behavior of common tools.
241CLICOLOR_FORCE= GREP_OPTIONS=
242unset CLICOLOR_FORCE GREP_OPTIONS
243
244## --------------------- ##
245## M4sh Shell Functions. ##
246## --------------------- ##
247# as_fn_unset VAR
248# ---------------
249# Portably unset VAR.
250as_fn_unset ()
251{
252 { eval $1=; unset $1;}
253}
254as_unset=as_fn_unset
255
256# as_fn_set_status STATUS
257# -----------------------
258# Set $? to STATUS, without forking.
259as_fn_set_status ()
260{
261 return $1
262} # as_fn_set_status
263
264# as_fn_exit STATUS
265# -----------------
266# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
267as_fn_exit ()
268{
269 set +e
270 as_fn_set_status $1
271 exit $1
272} # as_fn_exit
273
274# as_fn_mkdir_p
275# -------------
276# Create "$as_dir" as a directory, including parents if necessary.
277as_fn_mkdir_p ()
278{
279
280 case $as_dir in #(
281 -*) as_dir=./$as_dir;;
282 esac
283 test -d "$as_dir" || eval $as_mkdir_p || {
284 as_dirs=
285 while :; do
286 case $as_dir in #(
287 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
288 *) as_qdir=$as_dir;;
289 esac
290 as_dirs="'$as_qdir' $as_dirs"
291 as_dir=`$as_dirname -- "$as_dir" ||
292$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
293 X"$as_dir" : 'X\(//\)[^/]' \| \
294 X"$as_dir" : 'X\(//\)$' \| \
295 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
296$as_echo X"$as_dir" |
297 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
298 s//\1/
299 q
300 }
301 /^X\(\/\/\)[^/].*/{
302 s//\1/
303 q
304 }
305 /^X\(\/\/\)$/{
306 s//\1/
307 q
308 }
309 /^X\(\/\).*/{
310 s//\1/
311 q
312 }
313 s/.*/./; q'`
314 test -d "$as_dir" && break
315 done
316 test -z "$as_dirs" || eval "mkdir $as_dirs"
317 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
318
319
320} # as_fn_mkdir_p
321# as_fn_append VAR VALUE
322# ----------------------
323# Append the text in VALUE to the end of the definition contained in VAR. Take
324# advantage of any shell optimizations that allow amortized linear growth over
325# repeated appends, instead of the typical quadratic growth present in naive
326# implementations.
327if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
328 eval 'as_fn_append ()
329 {
330 eval $1+=\$2
331 }'
332else
333 as_fn_append ()
334 {
335 eval $1=\$$1\$2
336 }
337fi # as_fn_append
338
339# as_fn_arith ARG...
340# ------------------
341# Perform arithmetic evaluation on the ARGs, and store the result in the
342# global $as_val. Take advantage of shells that can avoid forks. The arguments
343# must be portable across $(()) and expr.
344if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
345 eval 'as_fn_arith ()
346 {
347 as_val=$(( $* ))
348 }'
349else
350 as_fn_arith ()
351 {
352 as_val=`expr "$@" || test $? -eq 1`
353 }
354fi # as_fn_arith
355
356
357# as_fn_error ERROR [LINENO LOG_FD]
358# ---------------------------------
359# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
360# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
361# script with status $?, using 1 if that was 0.
362as_fn_error ()
363{
364 as_status=$?; test $as_status -eq 0 && as_status=1
365 if test "$3"; then
366 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
367 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
368 fi
369 $as_echo "$as_me: error: $1" >&2
370 as_fn_exit $as_status
371} # as_fn_error
372
373if expr a : '\(a\)' >/dev/null 2>&1 &&
374 test "X`expr 00001 : '.*\(...\)'`" = X001; then
375 as_expr=expr
376else
377 as_expr=false
378fi
379
380if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
381 as_basename=basename
382else
383 as_basename=false
384fi
385
386if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
387 as_dirname=dirname
388else
389 as_dirname=false
390fi
391
392as_me=`$as_basename -- "$0" ||
393$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
394 X"$0" : 'X\(//\)$' \| \
395 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
396$as_echo X/"$0" |
397 sed '/^.*\/\([^/][^/]*\)\/*$/{
398 s//\1/
399 q
400 }
401 /^X\/\(\/\/\)$/{
402 s//\1/
403 q
404 }
405 /^X\/\(\/\).*/{
406 s//\1/
407 q
408 }
409 s/.*/./; q'`
410
411# Avoid depending upon Character Ranges.
412as_cr_letters='abcdefghijklmnopqrstuvwxyz'
413as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
414as_cr_Letters=$as_cr_letters$as_cr_LETTERS
415as_cr_digits='0123456789'
416as_cr_alnum=$as_cr_Letters$as_cr_digits
417
418
419 as_lineno_1=$LINENO as_lineno_1a=$LINENO
420 as_lineno_2=$LINENO as_lineno_2a=$LINENO
421 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
422 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
423 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
424 sed -n '
425 p
426 /[$]LINENO/=
427 ' <$as_myself |
428 sed '
429 s/[$]LINENO.*/&-/
430 t lineno
431 b
432 :lineno
433 N
434 :loop
435 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
436 t loop
437 s/-\n.*//
438 ' >$as_me.lineno &&
439 chmod +x "$as_me.lineno" ||
440 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
441
442 # Don't try to exec as it changes $[0], causing all sort of problems
443 # (the dirname of $[0] is not the place where we might find the
444 # original and so on. Autoconf is especially sensitive to this).
445 . "./$as_me.lineno"
446 # Exit status is that of the last command.
447 exit
448}
449
450ECHO_C= ECHO_N= ECHO_T=
451case `echo -n x` in #(((((
452-n*)
453 case `echo 'xy\c'` in
454 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
455 xy) ECHO_C='\c';;
456 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
457 ECHO_T=' ';;
458 esac;;
459*)
460 ECHO_N='-n';;
461esac
462
463rm -f conf$$ conf$$.exe conf$$.file
464if test -d conf$$.dir; then
465 rm -f conf$$.dir/conf$$.file
466else
467 rm -f conf$$.dir
468 mkdir conf$$.dir 2>/dev/null
469fi
470if (echo >conf$$.file) 2>/dev/null; then
471 if ln -s conf$$.file conf$$ 2>/dev/null; then
472 as_ln_s='ln -s'
473 # ... but there are two gotchas:
474 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
475 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
476 # In both cases, we have to default to `cp -p'.
477 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
478 as_ln_s='cp -p'
479 elif ln conf$$.file conf$$ 2>/dev/null; then
480 as_ln_s=ln
481 else
482 as_ln_s='cp -p'
483 fi
484else
485 as_ln_s='cp -p'
486fi
487rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
488rmdir conf$$.dir 2>/dev/null
489
490if mkdir -p . 2>/dev/null; then
491 as_mkdir_p='mkdir -p "$as_dir"'
492else
493 test -d ./-p && rmdir ./-p
494 as_mkdir_p=false
495fi
496
497if test -x / >/dev/null 2>&1; then
498 as_test_x='test -x'
499else
500 if ls -dL / >/dev/null 2>&1; then
501 as_ls_L_option=L
502 else
503 as_ls_L_option=
504 fi
505 as_test_x='
506 eval sh -c '\''
507 if test -d "$1"; then
508 test -d "$1/.";
509 else
510 case $1 in #(
511 -*)set "./$1";;
512 esac;
513 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
514 ???[sx]*):;;*)false;;esac;fi
515 '\'' sh
516 '
517fi
518as_executable_p=$as_test_x
519
520# Sed expression to map a string onto a valid CPP name.
521as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
522
523# Sed expression to map a string onto a valid variable name.
524as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
525
526
527exec 7<&0 </dev/null 6>&1
528
529# Name of the host.
530# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
531# so uname gets run too.
532ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
533
534#
535# Initializations.
536#
537ac_default_prefix=/usr/local
538ac_clean_files=
539ac_config_libobj_dir=.
540LIBOBJS=
541cross_compiling=no
542subdirs=
543MFLAGS=
544MAKEFLAGS=
545
546# Identity of this package.
547PACKAGE_NAME=
548PACKAGE_TARNAME=
549PACKAGE_VERSION=
550PACKAGE_STRING=
551PACKAGE_BUGREPORT=
552PACKAGE_URL=
553
8690e634 554ac_unique_file="import/memmem.c"
c971b7fa
PA
555# Factoring default headers for most tests.
556ac_includes_default="\
557#include <stdio.h>
558#ifdef HAVE_SYS_TYPES_H
559# include <sys/types.h>
560#endif
561#ifdef HAVE_SYS_STAT_H
562# include <sys/stat.h>
563#endif
564#ifdef STDC_HEADERS
565# include <stdlib.h>
566# include <stddef.h>
567#else
568# ifdef HAVE_STDLIB_H
569# include <stdlib.h>
570# endif
571#endif
572#ifdef HAVE_STRING_H
573# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
574# include <memory.h>
575# endif
576# include <string.h>
577#endif
578#ifdef HAVE_STRINGS_H
579# include <strings.h>
580#endif
581#ifdef HAVE_INTTYPES_H
582# include <inttypes.h>
583#endif
584#ifdef HAVE_STDINT_H
585# include <stdint.h>
586#endif
587#ifdef HAVE_UNISTD_H
588# include <unistd.h>
589#endif"
590
98399780 591ac_func_list=
e26b6bb0 592ac_header_list=
8690e634 593gl_fnmatch_required=POSIX
c971b7fa
PA
594ac_subst_vars='am__EXEEXT_FALSE
595am__EXEEXT_TRUE
596gltests_LTLIBOBJS
597gltests_LIBOBJS
598gl_LTLIBOBJS
599gl_LIBOBJS
600LTLIBOBJS
601LIBOBJS
602LN_S
603am__fastdepCC_FALSE
604am__fastdepCC_TRUE
605CCDEPMODE
606AMDEPBACKSLASH
607AMDEP_FALSE
608AMDEP_TRUE
609am__quote
610am__include
611DEPDIR
612am__untar
613am__tar
614AMTAR
615am__leading_dot
616SET_MAKE
617AWK
618mkdir_p
c971b7fa
PA
619INSTALL_STRIP_PROGRAM
620STRIP
621install_sh
622MAKEINFO
623AUTOHEADER
624AUTOMAKE
625AUTOCONF
626ACLOCAL
627VERSION
628PACKAGE
629CYGPATH_W
630am__isrc
631INSTALL_DATA
632INSTALL_SCRIPT
633INSTALL_PROGRAM
634LIBGNU_LTLIBDEPS
635LIBGNU_LIBDEPS
636gltests_WITNESS
8690e634
JK
637REPLACE_TOWLOWER
638REPLACE_ISWCNTRL
639HAVE_WCTYPE_H
640NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
641NEXT_WCTYPE_H
642HAVE_ISWCNTRL
643REPLACE_ISWBLANK
644HAVE_WCTRANS_T
645HAVE_WCTYPE_T
646HAVE_ISWBLANK
647GNULIB_TOWCTRANS
648GNULIB_WCTRANS
649GNULIB_ISWCTYPE
650GNULIB_WCTYPE
651GNULIB_ISWBLANK
652HAVE_WINT_T
653HAVE_FEATURES_H
654NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
655NEXT_WCHAR_H
8839a007
PA
656HAVE_UNISTD_H
657NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
658NEXT_UNISTD_H
4a626d0a 659UNISTD_H_DEFINES_STRUCT_TIMESPEC
09607c9e
TT
660PTHREAD_H_DEFINES_STRUCT_TIMESPEC
661SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
662TIME_H_DEFINES_STRUCT_TIMESPEC
663NEXT_AS_FIRST_DIRECTIVE_TIME_H
664NEXT_TIME_H
4a626d0a
PA
665REPLACE_LOCALTIME
666REPLACE_GMTIME
09607c9e
TT
667REPLACE_TIMEGM
668REPLACE_NANOSLEEP
669REPLACE_MKTIME
670REPLACE_LOCALTIME_R
671HAVE_TIMEGM
672HAVE_STRPTIME
673HAVE_NANOSLEEP
674HAVE_DECL_LOCALTIME_R
4a626d0a 675GNULIB_TIME_RZ
09607c9e
TT
676GNULIB_TIME_R
677GNULIB_TIMEGM
678GNULIB_STRPTIME
679GNULIB_NANOSLEEP
680GNULIB_MKTIME
63ce7108
TT
681WINDOWS_64_BIT_OFF_T
682NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
683NEXT_SYS_TYPES_H
09607c9e
TT
684MKDIR_P
685WINDOWS_64_BIT_ST_SIZE
686NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
687NEXT_SYS_STAT_H
2196f55f
YQ
688NEXT_AS_FIRST_DIRECTIVE_STRING_H
689NEXT_STRING_H
98399780
YQ
690NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
691NEXT_STDLIB_H
6a29c58e
YQ
692NEXT_AS_FIRST_DIRECTIVE_STDIO_H
693NEXT_STDIO_H
2196f55f
YQ
694NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
695NEXT_STDDEF_H
696GL_GENERATE_STDDEF_H_FALSE
697GL_GENERATE_STDDEF_H_TRUE
698STDDEF_H
699HAVE_WCHAR_T
4a626d0a 700HAVE_MAX_ALIGN_T
2196f55f
YQ
701REPLACE_NULL
702HAVE__BOOL
703GL_GENERATE_STDBOOL_H_FALSE
704GL_GENERATE_STDBOOL_H_TRUE
705STDBOOL_H
0750520d
PA
706NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
707NEXT_SIGNAL_H
708REPLACE_RAISE
709REPLACE_PTHREAD_SIGMASK
710HAVE_SIGHANDLER_T
711HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
712HAVE_STRUCT_SIGACTION_SA_SIGACTION
713HAVE_SIGACTION
714HAVE_SIGINFO_T
715HAVE_SIGSET_T
716HAVE_RAISE
717HAVE_PTHREAD_SIGMASK
718HAVE_POSIX_SIGNALBLOCKING
719GNULIB_SIGACTION
720GNULIB_SIGPROCMASK
721GNULIB_SIGNAL_H_SIGPIPE
722GNULIB_RAISE
723GNULIB_PTHREAD_SIGMASK
6a29c58e
YQ
724REPLACE_VSPRINTF
725REPLACE_VSNPRINTF
726REPLACE_VPRINTF
727REPLACE_VFPRINTF
728REPLACE_VDPRINTF
729REPLACE_VASPRINTF
730REPLACE_TMPFILE
731REPLACE_STDIO_WRITE_FUNCS
732REPLACE_STDIO_READ_FUNCS
733REPLACE_SPRINTF
734REPLACE_SNPRINTF
735REPLACE_RENAMEAT
736REPLACE_RENAME
737REPLACE_REMOVE
738REPLACE_PRINTF
739REPLACE_POPEN
740REPLACE_PERROR
741REPLACE_OBSTACK_PRINTF
742REPLACE_GETLINE
743REPLACE_GETDELIM
744REPLACE_FTELLO
745REPLACE_FTELL
746REPLACE_FSEEKO
747REPLACE_FSEEK
748REPLACE_FREOPEN
749REPLACE_FPURGE
750REPLACE_FPRINTF
751REPLACE_FOPEN
752REPLACE_FFLUSH
753REPLACE_FDOPEN
754REPLACE_FCLOSE
755REPLACE_DPRINTF
756HAVE_VDPRINTF
757HAVE_VASPRINTF
758HAVE_RENAMEAT
759HAVE_POPEN
760HAVE_PCLOSE
761HAVE_FTELLO
762HAVE_FSEEKO
763HAVE_DPRINTF
764HAVE_DECL_VSNPRINTF
765HAVE_DECL_SNPRINTF
766HAVE_DECL_OBSTACK_PRINTF
767HAVE_DECL_GETLINE
768HAVE_DECL_GETDELIM
769HAVE_DECL_FTELLO
770HAVE_DECL_FSEEKO
771HAVE_DECL_FPURGE
772GNULIB_VSPRINTF_POSIX
773GNULIB_VSNPRINTF
774GNULIB_VPRINTF_POSIX
775GNULIB_VPRINTF
776GNULIB_VFPRINTF_POSIX
777GNULIB_VFPRINTF
778GNULIB_VDPRINTF
779GNULIB_VSCANF
780GNULIB_VFSCANF
781GNULIB_VASPRINTF
782GNULIB_TMPFILE
783GNULIB_STDIO_H_SIGPIPE
784GNULIB_STDIO_H_NONBLOCKING
785GNULIB_SPRINTF_POSIX
786GNULIB_SNPRINTF
787GNULIB_SCANF
788GNULIB_RENAMEAT
789GNULIB_RENAME
790GNULIB_REMOVE
791GNULIB_PUTS
792GNULIB_PUTCHAR
793GNULIB_PUTC
794GNULIB_PRINTF_POSIX
795GNULIB_PRINTF
796GNULIB_POPEN
797GNULIB_PERROR
798GNULIB_PCLOSE
799GNULIB_OBSTACK_PRINTF_POSIX
800GNULIB_OBSTACK_PRINTF
801GNULIB_GETLINE
802GNULIB_GETDELIM
803GNULIB_GETCHAR
804GNULIB_GETC
805GNULIB_FWRITE
806GNULIB_FTELLO
807GNULIB_FTELL
808GNULIB_FSEEKO
809GNULIB_FSEEK
810GNULIB_FSCANF
811GNULIB_FREOPEN
812GNULIB_FREAD
813GNULIB_FPUTS
814GNULIB_FPUTC
815GNULIB_FPURGE
816GNULIB_FPRINTF_POSIX
817GNULIB_FPRINTF
818GNULIB_FOPEN
819GNULIB_FGETS
820GNULIB_FGETC
821GNULIB_FFLUSH
822GNULIB_FDOPEN
823GNULIB_FCLOSE
824GNULIB_DPRINTF
c971b7fa
PA
825UNDEFINE_STRTOK_R
826REPLACE_STRTOK_R
827REPLACE_STRSIGNAL
828REPLACE_STRNLEN
829REPLACE_STRNDUP
830REPLACE_STRNCAT
831REPLACE_STRERROR_R
832REPLACE_STRERROR
833REPLACE_STRCHRNUL
834REPLACE_STRCASESTR
835REPLACE_STRSTR
836REPLACE_STRDUP
837REPLACE_STPNCPY
838REPLACE_MEMMEM
839REPLACE_MEMCHR
840HAVE_STRVERSCMP
841HAVE_DECL_STRSIGNAL
842HAVE_DECL_STRERROR_R
843HAVE_DECL_STRTOK_R
844HAVE_STRCASESTR
845HAVE_STRSEP
846HAVE_STRPBRK
847HAVE_DECL_STRNLEN
848HAVE_DECL_STRNDUP
849HAVE_DECL_STRDUP
850HAVE_STRCHRNUL
851HAVE_STPNCPY
852HAVE_STPCPY
853HAVE_RAWMEMCHR
854HAVE_DECL_MEMRCHR
855HAVE_MEMPCPY
856HAVE_DECL_MEMMEM
857HAVE_MEMCHR
858HAVE_FFSLL
859HAVE_FFSL
860HAVE_MBSLEN
861GNULIB_STRVERSCMP
862GNULIB_STRSIGNAL
863GNULIB_STRERROR_R
864GNULIB_STRERROR
865GNULIB_MBSTOK_R
866GNULIB_MBSSEP
867GNULIB_MBSSPN
868GNULIB_MBSPBRK
869GNULIB_MBSCSPN
870GNULIB_MBSCASESTR
871GNULIB_MBSPCASECMP
872GNULIB_MBSNCASECMP
873GNULIB_MBSCASECMP
874GNULIB_MBSSTR
875GNULIB_MBSRCHR
876GNULIB_MBSCHR
877GNULIB_MBSNLEN
878GNULIB_MBSLEN
879GNULIB_STRTOK_R
880GNULIB_STRCASESTR
881GNULIB_STRSTR
882GNULIB_STRSEP
883GNULIB_STRPBRK
884GNULIB_STRNLEN
885GNULIB_STRNDUP
886GNULIB_STRNCAT
887GNULIB_STRDUP
888GNULIB_STRCHRNUL
889GNULIB_STPNCPY
890GNULIB_STPCPY
891GNULIB_RAWMEMCHR
892GNULIB_MEMRCHR
893GNULIB_MEMPCPY
894GNULIB_MEMMEM
895GNULIB_MEMCHR
896GNULIB_FFSLL
897GNULIB_FFSL
8690e634
JK
898LOCALE_FR
899LOCALE_FR_UTF8
900LOCALE_ZH_CN
901LOCALE_JA
902REPLACE_WCSWIDTH
903REPLACE_WCWIDTH
904REPLACE_WCSNRTOMBS
905REPLACE_WCSRTOMBS
906REPLACE_WCRTOMB
907REPLACE_MBSNRTOWCS
908REPLACE_MBSRTOWCS
909REPLACE_MBRLEN
910REPLACE_MBRTOWC
911REPLACE_MBSINIT
912REPLACE_WCTOB
913REPLACE_BTOWC
914REPLACE_MBSTATE_T
915HAVE_DECL_WCWIDTH
916HAVE_DECL_WCTOB
917HAVE_WCSWIDTH
918HAVE_WCSTOK
919HAVE_WCSSTR
920HAVE_WCSPBRK
921HAVE_WCSSPN
922HAVE_WCSCSPN
923HAVE_WCSRCHR
924HAVE_WCSCHR
925HAVE_WCSDUP
926HAVE_WCSXFRM
927HAVE_WCSCOLL
928HAVE_WCSNCASECMP
929HAVE_WCSCASECMP
930HAVE_WCSNCMP
931HAVE_WCSCMP
932HAVE_WCSNCAT
933HAVE_WCSCAT
934HAVE_WCPNCPY
935HAVE_WCSNCPY
936HAVE_WCPCPY
937HAVE_WCSCPY
938HAVE_WCSNLEN
939HAVE_WCSLEN
940HAVE_WMEMSET
941HAVE_WMEMMOVE
942HAVE_WMEMCPY
943HAVE_WMEMCMP
944HAVE_WMEMCHR
945HAVE_WCSNRTOMBS
946HAVE_WCSRTOMBS
947HAVE_WCRTOMB
948HAVE_MBSNRTOWCS
949HAVE_MBSRTOWCS
950HAVE_MBRLEN
951HAVE_MBRTOWC
952HAVE_MBSINIT
953HAVE_BTOWC
954GNULIB_WCSWIDTH
955GNULIB_WCSTOK
956GNULIB_WCSSTR
957GNULIB_WCSPBRK
958GNULIB_WCSSPN
959GNULIB_WCSCSPN
960GNULIB_WCSRCHR
961GNULIB_WCSCHR
962GNULIB_WCSDUP
963GNULIB_WCSXFRM
964GNULIB_WCSCOLL
965GNULIB_WCSNCASECMP
966GNULIB_WCSCASECMP
967GNULIB_WCSNCMP
968GNULIB_WCSCMP
969GNULIB_WCSNCAT
970GNULIB_WCSCAT
971GNULIB_WCPNCPY
972GNULIB_WCSNCPY
973GNULIB_WCPCPY
974GNULIB_WCSCPY
975GNULIB_WCSNLEN
976GNULIB_WCSLEN
977GNULIB_WMEMSET
978GNULIB_WMEMMOVE
979GNULIB_WMEMCPY
980GNULIB_WMEMCMP
981GNULIB_WMEMCHR
982GNULIB_WCWIDTH
983GNULIB_WCSNRTOMBS
984GNULIB_WCSRTOMBS
985GNULIB_WCRTOMB
986GNULIB_MBSNRTOWCS
987GNULIB_MBSRTOWCS
988GNULIB_MBRLEN
989GNULIB_MBRTOWC
990GNULIB_MBSINIT
991GNULIB_WCTOB
992GNULIB_BTOWC
88b48903
WN
993NEXT_AS_FIRST_DIRECTIVE_MATH_H
994NEXT_MATH_H
f45c62c4
YQ
995REPLACE_UTIMENSAT
996REPLACE_STAT
997REPLACE_MKNOD
998REPLACE_MKFIFO
999REPLACE_MKDIR
1000REPLACE_LSTAT
1001REPLACE_FUTIMENS
1002REPLACE_FSTATAT
1003REPLACE_FSTAT
1004HAVE_UTIMENSAT
1005HAVE_MKNODAT
1006HAVE_MKNOD
1007HAVE_MKFIFOAT
1008HAVE_MKFIFO
1009HAVE_MKDIRAT
1010HAVE_LSTAT
1011HAVE_LCHMOD
1012HAVE_FUTIMENS
1013HAVE_FSTATAT
1014HAVE_FCHMODAT
1015GNULIB_UTIMENSAT
1016GNULIB_STAT
1017GNULIB_MKNODAT
1018GNULIB_MKNOD
1019GNULIB_MKFIFOAT
1020GNULIB_MKFIFO
1021GNULIB_MKDIRAT
1022GNULIB_LSTAT
1023GNULIB_LCHMOD
1024GNULIB_FUTIMENS
1025GNULIB_FSTATAT
1026GNULIB_FSTAT
1027GNULIB_FCHMODAT
8690e634
JK
1028LOCALCHARSET_TESTS_ENVIRONMENT
1029GLIBC21
c971b7fa
PA
1030NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
1031NEXT_INTTYPES_H
1032UINT64_MAX_EQ_ULONG_MAX
1033UINT32_MAX_LT_UINTMAX_MAX
1034PRIPTR_PREFIX
1035PRI_MACROS_BROKEN
1036INT64_MAX_EQ_LONG_MAX
1037INT32_MAX_LT_INTMAX_MAX
4a626d0a 1038REPLACE_STRTOUMAX
c971b7fa
PA
1039REPLACE_STRTOIMAX
1040HAVE_DECL_STRTOUMAX
1041HAVE_DECL_STRTOIMAX
1042HAVE_DECL_IMAXDIV
1043HAVE_DECL_IMAXABS
1044GNULIB_STRTOUMAX
1045GNULIB_STRTOIMAX
1046GNULIB_IMAXDIV
1047GNULIB_IMAXABS
1048GL_GENERATE_STDINT_H_FALSE
1049GL_GENERATE_STDINT_H_TRUE
1050STDINT_H
49e4877c
PA
1051HAVE_SYS_INTTYPES_H
1052HAVE_SYS_BITYPES_H
1053HAVE_C99_STDINT_H
c971b7fa
PA
1054WINT_T_SUFFIX
1055WCHAR_T_SUFFIX
1056SIG_ATOMIC_T_SUFFIX
1057SIZE_T_SUFFIX
1058PTRDIFF_T_SUFFIX
1059HAVE_SIGNED_WINT_T
1060HAVE_SIGNED_WCHAR_T
1061HAVE_SIGNED_SIG_ATOMIC_T
1062BITSIZEOF_WINT_T
1063BITSIZEOF_WCHAR_T
1064BITSIZEOF_SIG_ATOMIC_T
1065BITSIZEOF_SIZE_T
1066BITSIZEOF_PTRDIFF_T
1067APPLE_UNIVERSAL_BUILD
c971b7fa
PA
1068HAVE_STDINT_H
1069NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1070NEXT_STDINT_H
c971b7fa
PA
1071HAVE_SYS_TYPES_H
1072HAVE_INTTYPES_H
1073HAVE_WCHAR_H
1074HAVE_UNSIGNED_LONG_LONG_INT
1075HAVE_LONG_LONG_INT
49e4877c
PA
1076GL_GENERATE_LIMITS_H_FALSE
1077GL_GENERATE_LIMITS_H_TRUE
1078LIMITS_H
1079NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
1080NEXT_LIMITS_H
4a626d0a
PA
1081HAVE_WINSOCK2_H
1082NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1083NEXT_SYS_TIME_H
1084REPLACE_STRUCT_TIMEVAL
1085REPLACE_GETTIMEOFDAY
1086HAVE_TIMEZONE_T
1087HAVE_SYS_TIME_H
1088HAVE_STRUCT_TIMEVAL
1089HAVE_GETTIMEOFDAY
1090GNULIB_GETTIMEOFDAY
88b48903
WN
1091FREXPL_LIBM
1092HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1093FREXP_LIBM
1094REPLACE_TRUNCL
1095REPLACE_TRUNCF
1096REPLACE_TRUNC
1097REPLACE_SQRTL
1098REPLACE_SIGNBIT_USING_GCC
1099REPLACE_SIGNBIT
1100REPLACE_ROUNDL
1101REPLACE_ROUNDF
1102REPLACE_ROUND
1103REPLACE_REMAINDERL
1104REPLACE_REMAINDERF
1105REPLACE_REMAINDER
1106REPLACE_NAN
1107REPLACE_MODFL
1108REPLACE_MODFF
1109REPLACE_MODF
1110REPLACE_LOGBL
1111REPLACE_LOGBF
1112REPLACE_LOGB
1113REPLACE_LOG2L
1114REPLACE_LOG2F
1115REPLACE_LOG2
1116REPLACE_LOG1PL
1117REPLACE_LOG1PF
1118REPLACE_LOG1P
1119REPLACE_LOG10L
1120REPLACE_LOG10F
1121REPLACE_LOG10
1122REPLACE_LOGL
1123REPLACE_LOGF
1124REPLACE_LOG
1125REPLACE_LDEXPL
1126REPLACE_ISNAN
1127REPLACE_ISINF
1128REPLACE_ISFINITE
1129REPLACE_ILOGBF
1130REPLACE_ILOGB
1131REPLACE_HYPOTL
1132REPLACE_HYPOTF
1133REPLACE_HYPOT
1134REPLACE_HUGE_VAL
1135REPLACE_FREXPL
1136REPLACE_FREXP
1137REPLACE_FREXPF
1138REPLACE_FMODL
1139REPLACE_FMODF
1140REPLACE_FMOD
1141REPLACE_FMAL
1142REPLACE_FMAF
1143REPLACE_FMA
1144REPLACE_FLOORL
1145REPLACE_FLOORF
1146REPLACE_FLOOR
1147REPLACE_FABSL
1148REPLACE_EXP2L
1149REPLACE_EXP2
1150REPLACE_EXPM1F
1151REPLACE_EXPM1
1152REPLACE_CEILL
1153REPLACE_CEILF
1154REPLACE_CEIL
1155REPLACE_CBRTL
1156REPLACE_CBRTF
1157HAVE_DECL_TRUNCL
1158HAVE_DECL_TRUNCF
1159HAVE_DECL_TRUNC
1160HAVE_DECL_TANL
1161HAVE_DECL_SQRTL
1162HAVE_DECL_SINL
1163HAVE_DECL_ROUNDL
1164HAVE_DECL_ROUNDF
1165HAVE_DECL_ROUND
1166HAVE_DECL_RINTF
1167HAVE_DECL_REMAINDERL
1168HAVE_DECL_REMAINDER
1169HAVE_DECL_LOGB
1170HAVE_DECL_LOG2L
1171HAVE_DECL_LOG2F
1172HAVE_DECL_LOG2
1173HAVE_DECL_LOG10L
1174HAVE_DECL_LOGL
1175HAVE_DECL_LDEXPL
1176HAVE_DECL_FREXPL
1177HAVE_DECL_FLOORL
1178HAVE_DECL_FLOORF
1179HAVE_DECL_EXPM1L
1180HAVE_DECL_EXP2L
1181HAVE_DECL_EXP2F
1182HAVE_DECL_EXP2
1183HAVE_DECL_EXPL
1184HAVE_DECL_COSL
1185HAVE_DECL_COPYSIGNF
1186HAVE_DECL_CEILL
1187HAVE_DECL_CEILF
1188HAVE_DECL_CBRTL
1189HAVE_DECL_CBRTF
1190HAVE_DECL_ATANL
1191HAVE_DECL_ASINL
1192HAVE_DECL_ACOSL
1193HAVE_TANHF
1194HAVE_TANL
1195HAVE_TANF
1196HAVE_SQRTL
1197HAVE_SQRTF
1198HAVE_SINHF
1199HAVE_SINL
1200HAVE_SINF
1201HAVE_RINTL
1202HAVE_RINT
1203HAVE_REMAINDERF
1204HAVE_REMAINDER
1205HAVE_POWF
1206HAVE_MODFL
1207HAVE_MODFF
1208HAVE_LOGBL
1209HAVE_LOGBF
1210HAVE_LOG1PL
1211HAVE_LOG1PF
1212HAVE_LOG1P
1213HAVE_LOG10L
1214HAVE_LOG10F
1215HAVE_LOGL
1216HAVE_LOGF
1217HAVE_LDEXPF
1218HAVE_ISNANL
1219HAVE_ISNAND
1220HAVE_ISNANF
1221HAVE_ILOGBL
1222HAVE_ILOGBF
1223HAVE_ILOGB
1224HAVE_HYPOTL
1225HAVE_HYPOTF
1226HAVE_FREXPF
1227HAVE_FMODL
1228HAVE_FMODF
1229HAVE_FMAL
1230HAVE_FMAF
1231HAVE_FMA
1232HAVE_FABSL
1233HAVE_FABSF
1234HAVE_EXPM1F
1235HAVE_EXPM1
1236HAVE_EXPL
1237HAVE_EXPF
1238HAVE_COSHF
1239HAVE_COSL
1240HAVE_COSF
1241HAVE_COPYSIGNL
1242HAVE_COPYSIGN
1243HAVE_CBRTL
1244HAVE_CBRTF
1245HAVE_CBRT
1246HAVE_ATAN2F
1247HAVE_ATANL
1248HAVE_ATANF
1249HAVE_ASINL
1250HAVE_ASINF
1251HAVE_ACOSL
1252HAVE_ACOSF
1253GNULIB_TRUNCL
1254GNULIB_TRUNCF
1255GNULIB_TRUNC
1256GNULIB_TANHF
1257GNULIB_TANL
1258GNULIB_TANF
1259GNULIB_SQRTL
1260GNULIB_SQRTF
1261GNULIB_SINHF
1262GNULIB_SINL
1263GNULIB_SINF
1264GNULIB_SIGNBIT
1265GNULIB_ROUNDL
1266GNULIB_ROUNDF
1267GNULIB_ROUND
1268GNULIB_RINTL
1269GNULIB_RINTF
1270GNULIB_RINT
1271GNULIB_REMAINDERL
1272GNULIB_REMAINDERF
1273GNULIB_REMAINDER
1274GNULIB_POWF
1275GNULIB_MODFL
1276GNULIB_MODFF
1277GNULIB_MODF
1278GNULIB_LOGBL
1279GNULIB_LOGBF
1280GNULIB_LOGB
1281GNULIB_LOG2L
1282GNULIB_LOG2F
1283GNULIB_LOG2
1284GNULIB_LOG1PL
1285GNULIB_LOG1PF
1286GNULIB_LOG1P
1287GNULIB_LOG10L
1288GNULIB_LOG10F
1289GNULIB_LOG10
1290GNULIB_LOGL
1291GNULIB_LOGF
1292GNULIB_LOG
1293GNULIB_LDEXPL
1294GNULIB_LDEXPF
1295GNULIB_ISNANL
1296GNULIB_ISNAND
1297GNULIB_ISNANF
1298GNULIB_ISNAN
1299GNULIB_ISINF
1300GNULIB_ISFINITE
1301GNULIB_ILOGBL
1302GNULIB_ILOGBF
1303GNULIB_ILOGB
1304GNULIB_HYPOTL
1305GNULIB_HYPOTF
1306GNULIB_HYPOT
1307GNULIB_FREXPL
1308GNULIB_FREXP
1309GNULIB_FREXPF
1310GNULIB_FMODL
1311GNULIB_FMODF
1312GNULIB_FMOD
1313GNULIB_FMAL
1314GNULIB_FMAF
1315GNULIB_FMA
1316GNULIB_FLOORL
1317GNULIB_FLOORF
1318GNULIB_FLOOR
1319GNULIB_FABSL
1320GNULIB_FABSF
1321GNULIB_EXPM1L
1322GNULIB_EXPM1F
1323GNULIB_EXPM1
1324GNULIB_EXP2L
1325GNULIB_EXP2F
1326GNULIB_EXP2
1327GNULIB_EXPL
1328GNULIB_EXPF
1329GNULIB_COSHF
1330GNULIB_COSL
1331GNULIB_COSF
1332GNULIB_COPYSIGNL
1333GNULIB_COPYSIGNF
1334GNULIB_COPYSIGN
1335GNULIB_CEILL
1336GNULIB_CEILF
1337GNULIB_CEIL
1338GNULIB_CBRTL
1339GNULIB_CBRTF
1340GNULIB_CBRT
1341GNULIB_ATAN2F
1342GNULIB_ATANL
1343GNULIB_ATANF
1344GNULIB_ASINL
1345GNULIB_ASINF
1346GNULIB_ACOSL
1347GNULIB_ACOSF
8690e634
JK
1348GL_GENERATE_FNMATCH_H_FALSE
1349GL_GENERATE_FNMATCH_H_TRUE
1350FNMATCH_H
88b48903
WN
1351REPLACE_ITOLD
1352GL_GENERATE_FLOAT_H_FALSE
1353GL_GENERATE_FLOAT_H_TRUE
1354FLOAT_H
1355NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1356NEXT_FLOAT_H
18848e28
GF
1357EOVERFLOW_VALUE
1358EOVERFLOW_HIDDEN
1359ENOLINK_VALUE
1360ENOLINK_HIDDEN
1361EMULTIHOP_VALUE
1362EMULTIHOP_HIDDEN
1363GL_GENERATE_ERRNO_H_FALSE
1364GL_GENERATE_ERRNO_H_TRUE
1365ERRNO_H
1366NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1367NEXT_ERRNO_H
e26b6bb0
TT
1368HAVE_DIRENT_H
1369NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1370NEXT_DIRENT_H
88b48903
WN
1371PRAGMA_COLUMNS
1372PRAGMA_SYSTEM_HEADER
1373INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1374INCLUDE_NEXT
e26b6bb0
TT
1375REPLACE_FDOPENDIR
1376REPLACE_DIRFD
1377REPLACE_CLOSEDIR
1378REPLACE_OPENDIR
1379HAVE_ALPHASORT
1380HAVE_SCANDIR
1381HAVE_FDOPENDIR
1382HAVE_DECL_FDOPENDIR
1383HAVE_DECL_DIRFD
1384HAVE_CLOSEDIR
1385HAVE_REWINDDIR
1386HAVE_READDIR
1387HAVE_OPENDIR
1388GNULIB_ALPHASORT
1389GNULIB_SCANDIR
1390GNULIB_FDOPENDIR
1391GNULIB_DIRFD
1392GNULIB_CLOSEDIR
1393GNULIB_REWINDDIR
1394GNULIB_READDIR
1395GNULIB_OPENDIR
6a29c58e 1396pkglibexecdir
4a626d0a 1397runstatedir
6a29c58e 1398lispdir
e26b6bb0
TT
1399UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1400UNISTD_H_HAVE_WINSOCK2_H
1401REPLACE_WRITE
1402REPLACE_USLEEP
1403REPLACE_UNLINKAT
1404REPLACE_UNLINK
1405REPLACE_TTYNAME_R
4a626d0a 1406REPLACE_SYMLINKAT
e26b6bb0
TT
1407REPLACE_SYMLINK
1408REPLACE_SLEEP
1409REPLACE_RMDIR
4a626d0a 1410REPLACE_READLINKAT
e26b6bb0
TT
1411REPLACE_READLINK
1412REPLACE_READ
1413REPLACE_PWRITE
1414REPLACE_PREAD
1415REPLACE_LSEEK
1416REPLACE_LINKAT
1417REPLACE_LINK
1418REPLACE_LCHOWN
1419REPLACE_ISATTY
1420REPLACE_GETPAGESIZE
1421REPLACE_GETGROUPS
1422REPLACE_GETLOGIN_R
4a626d0a 1423REPLACE_GETDTABLESIZE
e26b6bb0
TT
1424REPLACE_GETDOMAINNAME
1425REPLACE_GETCWD
1426REPLACE_FTRUNCATE
1427REPLACE_FCHOWNAT
1428REPLACE_DUP2
1429REPLACE_DUP
1430REPLACE_CLOSE
1431REPLACE_CHOWN
1432HAVE_SYS_PARAM_H
1433HAVE_OS_H
1434HAVE_DECL_TTYNAME_R
1435HAVE_DECL_SETHOSTNAME
1436HAVE_DECL_GETUSERSHELL
1437HAVE_DECL_GETPAGESIZE
1438HAVE_DECL_GETLOGIN_R
1439HAVE_DECL_GETDOMAINNAME
1440HAVE_DECL_FDATASYNC
1441HAVE_DECL_FCHDIR
1442HAVE_DECL_ENVIRON
1443HAVE_USLEEP
1444HAVE_UNLINKAT
1445HAVE_SYMLINKAT
1446HAVE_SYMLINK
1447HAVE_SLEEP
1448HAVE_SETHOSTNAME
1449HAVE_READLINKAT
1450HAVE_READLINK
1451HAVE_PWRITE
1452HAVE_PREAD
1453HAVE_PIPE2
1454HAVE_PIPE
1455HAVE_LINKAT
1456HAVE_LINK
1457HAVE_LCHOWN
1458HAVE_GROUP_MEMBER
1459HAVE_GETPAGESIZE
1460HAVE_GETLOGIN
1461HAVE_GETHOSTNAME
1462HAVE_GETGROUPS
1463HAVE_GETDTABLESIZE
1464HAVE_FTRUNCATE
1465HAVE_FSYNC
1466HAVE_FDATASYNC
1467HAVE_FCHOWNAT
1468HAVE_FCHDIR
1469HAVE_FACCESSAT
1470HAVE_EUIDACCESS
1471HAVE_DUP3
1472HAVE_DUP2
1473HAVE_CHOWN
1474GNULIB_WRITE
1475GNULIB_USLEEP
1476GNULIB_UNLINKAT
1477GNULIB_UNLINK
1478GNULIB_UNISTD_H_SIGPIPE
1479GNULIB_UNISTD_H_NONBLOCKING
1480GNULIB_TTYNAME_R
1481GNULIB_SYMLINKAT
1482GNULIB_SYMLINK
1483GNULIB_SLEEP
1484GNULIB_SETHOSTNAME
1485GNULIB_RMDIR
1486GNULIB_READLINKAT
1487GNULIB_READLINK
1488GNULIB_READ
1489GNULIB_PWRITE
1490GNULIB_PREAD
1491GNULIB_PIPE2
1492GNULIB_PIPE
1493GNULIB_LSEEK
1494GNULIB_LINKAT
1495GNULIB_LINK
1496GNULIB_LCHOWN
1497GNULIB_ISATTY
1498GNULIB_GROUP_MEMBER
1499GNULIB_GETUSERSHELL
1500GNULIB_GETPAGESIZE
1501GNULIB_GETLOGIN_R
1502GNULIB_GETLOGIN
1503GNULIB_GETHOSTNAME
1504GNULIB_GETGROUPS
1505GNULIB_GETDTABLESIZE
1506GNULIB_GETDOMAINNAME
1507GNULIB_GETCWD
1508GNULIB_FTRUNCATE
1509GNULIB_FSYNC
1510GNULIB_FDATASYNC
1511GNULIB_FCHOWNAT
1512GNULIB_FCHDIR
1513GNULIB_FACCESSAT
1514GNULIB_EUIDACCESS
1515GNULIB_ENVIRON
1516GNULIB_DUP3
1517GNULIB_DUP2
1518GNULIB_DUP
1519GNULIB_CLOSE
1520GNULIB_CHOWN
1521GNULIB_CHDIR
98399780
YQ
1522REPLACE_WCTOMB
1523REPLACE_UNSETENV
1524REPLACE_STRTOD
1525REPLACE_SETENV
1526REPLACE_REALPATH
1527REPLACE_REALLOC
1528REPLACE_RANDOM_R
4a626d0a 1529REPLACE_QSORT_R
98399780
YQ
1530REPLACE_PUTENV
1531REPLACE_PTSNAME_R
1532REPLACE_PTSNAME
1533REPLACE_MKSTEMP
1534REPLACE_MBTOWC
1535REPLACE_MALLOC
1536REPLACE_CANONICALIZE_FILE_NAME
1537REPLACE_CALLOC
1538HAVE_DECL_UNSETENV
1539HAVE_UNLOCKPT
1540HAVE_SYS_LOADAVG_H
1541HAVE_STRUCT_RANDOM_DATA
1542HAVE_STRTOULL
1543HAVE_STRTOLL
1544HAVE_STRTOD
1545HAVE_DECL_SETENV
1546HAVE_SETENV
4a626d0a 1547HAVE_SECURE_GETENV
98399780
YQ
1548HAVE_RPMATCH
1549HAVE_REALPATH
1550HAVE_RANDOM_R
1551HAVE_RANDOM_H
1552HAVE_RANDOM
1553HAVE_PTSNAME_R
1554HAVE_PTSNAME
1555HAVE_POSIX_OPENPT
1556HAVE_MKSTEMPS
1557HAVE_MKSTEMP
1558HAVE_MKOSTEMPS
1559HAVE_MKOSTEMP
1560HAVE_MKDTEMP
1561HAVE_GRANTPT
1562HAVE_GETSUBOPT
1563HAVE_DECL_GETLOADAVG
1564HAVE_CANONICALIZE_FILE_NAME
1565HAVE_ATOLL
1566HAVE__EXIT
1567GNULIB_WCTOMB
1568GNULIB_UNSETENV
1569GNULIB_UNLOCKPT
1570GNULIB_SYSTEM_POSIX
1571GNULIB_STRTOULL
1572GNULIB_STRTOLL
1573GNULIB_STRTOD
1574GNULIB_SETENV
4a626d0a 1575GNULIB_SECURE_GETENV
98399780
YQ
1576GNULIB_RPMATCH
1577GNULIB_REALPATH
1578GNULIB_REALLOC_POSIX
1579GNULIB_RANDOM_R
1580GNULIB_RANDOM
4a626d0a 1581GNULIB_QSORT_R
98399780
YQ
1582GNULIB_PUTENV
1583GNULIB_PTSNAME_R
1584GNULIB_PTSNAME
1585GNULIB_POSIX_OPENPT
1586GNULIB_MKSTEMPS
1587GNULIB_MKSTEMP
1588GNULIB_MKOSTEMPS
1589GNULIB_MKOSTEMP
1590GNULIB_MKDTEMP
1591GNULIB_MBTOWC
1592GNULIB_MALLOC_POSIX
1593GNULIB_GRANTPT
1594GNULIB_GETSUBOPT
1595GNULIB_GETLOADAVG
1596GNULIB_CANONICALIZE_FILE_NAME
1597GNULIB_CALLOC_POSIX
1598GNULIB_ATOLL
1599GNULIB__EXIT
8690e634
JK
1600GL_GENERATE_ALLOCA_H_FALSE
1601GL_GENERATE_ALLOCA_H_TRUE
1602ALLOCA_H
1603ALLOCA
c971b7fa
PA
1604GL_COND_LIBTOOL_FALSE
1605GL_COND_LIBTOOL_TRUE
1606target_os
1607target_vendor
1608target_cpu
1609target
c971b7fa
PA
1610host_os
1611host_vendor
1612host_cpu
1613host
1614build_os
1615build_vendor
1616build_cpu
1617build
4a626d0a
PA
1618RANLIB
1619ARFLAGS
1620AR
1621EGREP
1622GREP
1623CPP
c971b7fa
PA
1624OBJEXT
1625EXEEXT
1626ac_ct_CC
1627CPPFLAGS
1628LDFLAGS
1629CFLAGS
1630CC
1631MAINT
1632MAINTAINER_MODE_FALSE
1633MAINTAINER_MODE_TRUE
1634target_alias
1635host_alias
1636build_alias
1637LIBS
1638ECHO_T
1639ECHO_N
1640ECHO_C
1641DEFS
1642mandir
1643localedir
1644libdir
1645psdir
1646pdfdir
1647dvidir
1648htmldir
1649infodir
1650docdir
1651oldincludedir
1652includedir
1653localstatedir
1654sharedstatedir
1655sysconfdir
1656datadir
1657datarootdir
1658libexecdir
1659sbindir
1660bindir
1661program_transform_name
1662prefix
1663exec_prefix
1664PACKAGE_URL
1665PACKAGE_BUGREPORT
1666PACKAGE_STRING
1667PACKAGE_VERSION
1668PACKAGE_TARNAME
1669PACKAGE_NAME
1670PATH_SEPARATOR
1671SHELL'
1672ac_subst_files=''
1673ac_user_opts='
1674enable_option_checking
1675enable_maintainer_mode
2196f55f 1676enable_largefile
c971b7fa
PA
1677enable_dependency_tracking
1678'
1679 ac_precious_vars='build_alias
1680host_alias
1681target_alias
1682CC
1683CFLAGS
1684LDFLAGS
1685LIBS
1686CPPFLAGS
1687CPP'
1688
1689
1690# Initialize some variables set by options.
1691ac_init_help=
1692ac_init_version=false
1693ac_unrecognized_opts=
1694ac_unrecognized_sep=
1695# The variables have the same names as the options, with
1696# dashes changed to underlines.
1697cache_file=/dev/null
1698exec_prefix=NONE
1699no_create=
1700no_recursion=
1701prefix=NONE
1702program_prefix=NONE
1703program_suffix=NONE
1704program_transform_name=s,x,x,
1705silent=
1706site=
1707srcdir=
1708verbose=
1709x_includes=NONE
1710x_libraries=NONE
1711
1712# Installation directory options.
1713# These are left unexpanded so users can "make install exec_prefix=/foo"
1714# and all the variables that are supposed to be based on exec_prefix
1715# by default will actually change.
1716# Use braces instead of parens because sh, perl, etc. also accept them.
1717# (The list follows the same order as the GNU Coding Standards.)
1718bindir='${exec_prefix}/bin'
1719sbindir='${exec_prefix}/sbin'
1720libexecdir='${exec_prefix}/libexec'
1721datarootdir='${prefix}/share'
1722datadir='${datarootdir}'
1723sysconfdir='${prefix}/etc'
1724sharedstatedir='${prefix}/com'
1725localstatedir='${prefix}/var'
1726includedir='${prefix}/include'
1727oldincludedir='/usr/include'
1728docdir='${datarootdir}/doc/${PACKAGE}'
1729infodir='${datarootdir}/info'
1730htmldir='${docdir}'
1731dvidir='${docdir}'
1732pdfdir='${docdir}'
1733psdir='${docdir}'
1734libdir='${exec_prefix}/lib'
1735localedir='${datarootdir}/locale'
1736mandir='${datarootdir}/man'
1737
1738ac_prev=
1739ac_dashdash=
1740for ac_option
1741do
1742 # If the previous option needs an argument, assign it.
1743 if test -n "$ac_prev"; then
1744 eval $ac_prev=\$ac_option
1745 ac_prev=
1746 continue
1747 fi
1748
1749 case $ac_option in
1750 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1751 *) ac_optarg=yes ;;
1752 esac
1753
1754 # Accept the important Cygnus configure options, so we can diagnose typos.
1755
1756 case $ac_dashdash$ac_option in
1757 --)
1758 ac_dashdash=yes ;;
1759
1760 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1761 ac_prev=bindir ;;
1762 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1763 bindir=$ac_optarg ;;
1764
1765 -build | --build | --buil | --bui | --bu)
1766 ac_prev=build_alias ;;
1767 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1768 build_alias=$ac_optarg ;;
1769
1770 -cache-file | --cache-file | --cache-fil | --cache-fi \
1771 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1772 ac_prev=cache_file ;;
1773 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1774 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1775 cache_file=$ac_optarg ;;
1776
1777 --config-cache | -C)
1778 cache_file=config.cache ;;
1779
1780 -datadir | --datadir | --datadi | --datad)
1781 ac_prev=datadir ;;
1782 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1783 datadir=$ac_optarg ;;
1784
1785 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1786 | --dataroo | --dataro | --datar)
1787 ac_prev=datarootdir ;;
1788 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1789 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1790 datarootdir=$ac_optarg ;;
1791
1792 -disable-* | --disable-*)
1793 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1794 # Reject names that are not valid shell variable names.
1795 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1796 as_fn_error "invalid feature name: $ac_useropt"
1797 ac_useropt_orig=$ac_useropt
1798 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1799 case $ac_user_opts in
1800 *"
1801"enable_$ac_useropt"
1802"*) ;;
1803 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1804 ac_unrecognized_sep=', ';;
1805 esac
1806 eval enable_$ac_useropt=no ;;
1807
1808 -docdir | --docdir | --docdi | --doc | --do)
1809 ac_prev=docdir ;;
1810 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1811 docdir=$ac_optarg ;;
1812
1813 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1814 ac_prev=dvidir ;;
1815 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1816 dvidir=$ac_optarg ;;
1817
1818 -enable-* | --enable-*)
1819 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1820 # Reject names that are not valid shell variable names.
1821 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1822 as_fn_error "invalid feature name: $ac_useropt"
1823 ac_useropt_orig=$ac_useropt
1824 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1825 case $ac_user_opts in
1826 *"
1827"enable_$ac_useropt"
1828"*) ;;
1829 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1830 ac_unrecognized_sep=', ';;
1831 esac
1832 eval enable_$ac_useropt=\$ac_optarg ;;
1833
1834 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1835 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1836 | --exec | --exe | --ex)
1837 ac_prev=exec_prefix ;;
1838 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1839 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1840 | --exec=* | --exe=* | --ex=*)
1841 exec_prefix=$ac_optarg ;;
1842
1843 -gas | --gas | --ga | --g)
1844 # Obsolete; use --with-gas.
1845 with_gas=yes ;;
1846
1847 -help | --help | --hel | --he | -h)
1848 ac_init_help=long ;;
1849 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1850 ac_init_help=recursive ;;
1851 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1852 ac_init_help=short ;;
1853
1854 -host | --host | --hos | --ho)
1855 ac_prev=host_alias ;;
1856 -host=* | --host=* | --hos=* | --ho=*)
1857 host_alias=$ac_optarg ;;
1858
1859 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1860 ac_prev=htmldir ;;
1861 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1862 | --ht=*)
1863 htmldir=$ac_optarg ;;
1864
1865 -includedir | --includedir | --includedi | --included | --include \
1866 | --includ | --inclu | --incl | --inc)
1867 ac_prev=includedir ;;
1868 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1869 | --includ=* | --inclu=* | --incl=* | --inc=*)
1870 includedir=$ac_optarg ;;
1871
1872 -infodir | --infodir | --infodi | --infod | --info | --inf)
1873 ac_prev=infodir ;;
1874 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1875 infodir=$ac_optarg ;;
1876
1877 -libdir | --libdir | --libdi | --libd)
1878 ac_prev=libdir ;;
1879 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1880 libdir=$ac_optarg ;;
1881
1882 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1883 | --libexe | --libex | --libe)
1884 ac_prev=libexecdir ;;
1885 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1886 | --libexe=* | --libex=* | --libe=*)
1887 libexecdir=$ac_optarg ;;
1888
1889 -localedir | --localedir | --localedi | --localed | --locale)
1890 ac_prev=localedir ;;
1891 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1892 localedir=$ac_optarg ;;
1893
1894 -localstatedir | --localstatedir | --localstatedi | --localstated \
1895 | --localstate | --localstat | --localsta | --localst | --locals)
1896 ac_prev=localstatedir ;;
1897 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1898 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1899 localstatedir=$ac_optarg ;;
1900
1901 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1902 ac_prev=mandir ;;
1903 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1904 mandir=$ac_optarg ;;
1905
1906 -nfp | --nfp | --nf)
1907 # Obsolete; use --without-fp.
1908 with_fp=no ;;
1909
1910 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1911 | --no-cr | --no-c | -n)
1912 no_create=yes ;;
1913
1914 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1915 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1916 no_recursion=yes ;;
1917
1918 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1919 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1920 | --oldin | --oldi | --old | --ol | --o)
1921 ac_prev=oldincludedir ;;
1922 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1923 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1924 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1925 oldincludedir=$ac_optarg ;;
1926
1927 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1928 ac_prev=prefix ;;
1929 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1930 prefix=$ac_optarg ;;
1931
1932 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1933 | --program-pre | --program-pr | --program-p)
1934 ac_prev=program_prefix ;;
1935 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1936 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1937 program_prefix=$ac_optarg ;;
1938
1939 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1940 | --program-suf | --program-su | --program-s)
1941 ac_prev=program_suffix ;;
1942 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1943 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1944 program_suffix=$ac_optarg ;;
1945
1946 -program-transform-name | --program-transform-name \
1947 | --program-transform-nam | --program-transform-na \
1948 | --program-transform-n | --program-transform- \
1949 | --program-transform | --program-transfor \
1950 | --program-transfo | --program-transf \
1951 | --program-trans | --program-tran \
1952 | --progr-tra | --program-tr | --program-t)
1953 ac_prev=program_transform_name ;;
1954 -program-transform-name=* | --program-transform-name=* \
1955 | --program-transform-nam=* | --program-transform-na=* \
1956 | --program-transform-n=* | --program-transform-=* \
1957 | --program-transform=* | --program-transfor=* \
1958 | --program-transfo=* | --program-transf=* \
1959 | --program-trans=* | --program-tran=* \
1960 | --progr-tra=* | --program-tr=* | --program-t=*)
1961 program_transform_name=$ac_optarg ;;
1962
1963 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1964 ac_prev=pdfdir ;;
1965 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1966 pdfdir=$ac_optarg ;;
1967
1968 -psdir | --psdir | --psdi | --psd | --ps)
1969 ac_prev=psdir ;;
1970 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1971 psdir=$ac_optarg ;;
1972
1973 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1974 | -silent | --silent | --silen | --sile | --sil)
1975 silent=yes ;;
1976
1977 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1978 ac_prev=sbindir ;;
1979 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1980 | --sbi=* | --sb=*)
1981 sbindir=$ac_optarg ;;
1982
1983 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1984 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1985 | --sharedst | --shareds | --shared | --share | --shar \
1986 | --sha | --sh)
1987 ac_prev=sharedstatedir ;;
1988 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1989 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1990 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1991 | --sha=* | --sh=*)
1992 sharedstatedir=$ac_optarg ;;
1993
1994 -site | --site | --sit)
1995 ac_prev=site ;;
1996 -site=* | --site=* | --sit=*)
1997 site=$ac_optarg ;;
1998
1999 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2000 ac_prev=srcdir ;;
2001 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2002 srcdir=$ac_optarg ;;
2003
2004 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2005 | --syscon | --sysco | --sysc | --sys | --sy)
2006 ac_prev=sysconfdir ;;
2007 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2008 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2009 sysconfdir=$ac_optarg ;;
2010
2011 -target | --target | --targe | --targ | --tar | --ta | --t)
2012 ac_prev=target_alias ;;
2013 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2014 target_alias=$ac_optarg ;;
2015
2016 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2017 verbose=yes ;;
2018
2019 -version | --version | --versio | --versi | --vers | -V)
2020 ac_init_version=: ;;
2021
2022 -with-* | --with-*)
2023 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2024 # Reject names that are not valid shell variable names.
2025 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2026 as_fn_error "invalid package name: $ac_useropt"
2027 ac_useropt_orig=$ac_useropt
2028 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2029 case $ac_user_opts in
2030 *"
2031"with_$ac_useropt"
2032"*) ;;
2033 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2034 ac_unrecognized_sep=', ';;
2035 esac
2036 eval with_$ac_useropt=\$ac_optarg ;;
2037
2038 -without-* | --without-*)
2039 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2040 # Reject names that are not valid shell variable names.
2041 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2042 as_fn_error "invalid package name: $ac_useropt"
2043 ac_useropt_orig=$ac_useropt
2044 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2045 case $ac_user_opts in
2046 *"
2047"with_$ac_useropt"
2048"*) ;;
2049 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2050 ac_unrecognized_sep=', ';;
2051 esac
2052 eval with_$ac_useropt=no ;;
2053
2054 --x)
2055 # Obsolete; use --with-x.
2056 with_x=yes ;;
2057
2058 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2059 | --x-incl | --x-inc | --x-in | --x-i)
2060 ac_prev=x_includes ;;
2061 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2062 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2063 x_includes=$ac_optarg ;;
2064
2065 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2066 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2067 ac_prev=x_libraries ;;
2068 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2069 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2070 x_libraries=$ac_optarg ;;
2071
2072 -*) as_fn_error "unrecognized option: \`$ac_option'
2073Try \`$0 --help' for more information."
2074 ;;
2075
2076 *=*)
2077 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2078 # Reject names that are not valid shell variable names.
2079 case $ac_envvar in #(
2080 '' | [0-9]* | *[!_$as_cr_alnum]* )
2081 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
2082 esac
2083 eval $ac_envvar=\$ac_optarg
2084 export $ac_envvar ;;
2085
2086 *)
2087 # FIXME: should be removed in autoconf 3.0.
2088 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2089 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2090 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
2091 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
2092 ;;
2093
2094 esac
2095done
2096
2097if test -n "$ac_prev"; then
2098 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2099 as_fn_error "missing argument to $ac_option"
2100fi
2101
2102if test -n "$ac_unrecognized_opts"; then
2103 case $enable_option_checking in
2104 no) ;;
2105 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
2106 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2107 esac
2108fi
2109
2110# Check all directory arguments for consistency.
2111for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2112 datadir sysconfdir sharedstatedir localstatedir includedir \
2113 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2114 libdir localedir mandir
2115do
2116 eval ac_val=\$$ac_var
2117 # Remove trailing slashes.
2118 case $ac_val in
2119 */ )
2120 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2121 eval $ac_var=\$ac_val;;
2122 esac
2123 # Be sure to have absolute directory names.
2124 case $ac_val in
2125 [\\/$]* | ?:[\\/]* ) continue;;
2126 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2127 esac
2128 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
2129done
2130
2131# There might be people who depend on the old broken behavior: `$host'
2132# used to hold the argument of --host etc.
2133# FIXME: To remove some day.
2134build=$build_alias
2135host=$host_alias
2136target=$target_alias
2137
2138# FIXME: To remove some day.
2139if test "x$host_alias" != x; then
2140 if test "x$build_alias" = x; then
2141 cross_compiling=maybe
2142 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
2143 If a cross compiler is detected then cross compile mode will be used." >&2
2144 elif test "x$build_alias" != "x$host_alias"; then
2145 cross_compiling=yes
2146 fi
2147fi
2148
2149ac_tool_prefix=
2150test -n "$host_alias" && ac_tool_prefix=$host_alias-
2151
2152test "$silent" = yes && exec 6>/dev/null
2153
2154
2155ac_pwd=`pwd` && test -n "$ac_pwd" &&
2156ac_ls_di=`ls -di .` &&
2157ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2158 as_fn_error "working directory cannot be determined"
2159test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2160 as_fn_error "pwd does not report name of working directory"
2161
2162
2163# Find the source files, if location was not specified.
2164if test -z "$srcdir"; then
2165 ac_srcdir_defaulted=yes
2166 # Try the directory containing this script, then the parent directory.
2167 ac_confdir=`$as_dirname -- "$as_myself" ||
2168$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2169 X"$as_myself" : 'X\(//\)[^/]' \| \
2170 X"$as_myself" : 'X\(//\)$' \| \
2171 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2172$as_echo X"$as_myself" |
2173 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2174 s//\1/
2175 q
2176 }
2177 /^X\(\/\/\)[^/].*/{
2178 s//\1/
2179 q
2180 }
2181 /^X\(\/\/\)$/{
2182 s//\1/
2183 q
2184 }
2185 /^X\(\/\).*/{
2186 s//\1/
2187 q
2188 }
2189 s/.*/./; q'`
2190 srcdir=$ac_confdir
2191 if test ! -r "$srcdir/$ac_unique_file"; then
2192 srcdir=..
2193 fi
2194else
2195 ac_srcdir_defaulted=no
2196fi
2197if test ! -r "$srcdir/$ac_unique_file"; then
2198 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2199 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
2200fi
2201ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2202ac_abs_confdir=`(
2203 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
2204 pwd)`
2205# When building in place, set srcdir=.
2206if test "$ac_abs_confdir" = "$ac_pwd"; then
2207 srcdir=.
2208fi
2209# Remove unnecessary trailing slashes from srcdir.
2210# Double slashes in file names in object file debugging info
2211# mess up M-x gdb in Emacs.
2212case $srcdir in
2213*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2214esac
2215for ac_var in $ac_precious_vars; do
2216 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2217 eval ac_env_${ac_var}_value=\$${ac_var}
2218 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2219 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2220done
2221
2222#
2223# Report the --help message.
2224#
2225if test "$ac_init_help" = "long"; then
2226 # Omit some internal or obsolete options to make the list less imposing.
2227 # This message is too long to be a string in the A/UX 3.1 sh.
2228 cat <<_ACEOF
2229\`configure' configures this package to adapt to many kinds of systems.
2230
2231Usage: $0 [OPTION]... [VAR=VALUE]...
2232
2233To assign environment variables (e.g., CC, CFLAGS...), specify them as
2234VAR=VALUE. See below for descriptions of some of the useful variables.
2235
2236Defaults for the options are specified in brackets.
2237
2238Configuration:
2239 -h, --help display this help and exit
2240 --help=short display options specific to this package
2241 --help=recursive display the short help of all the included packages
2242 -V, --version display version information and exit
2243 -q, --quiet, --silent do not print \`checking...' messages
2244 --cache-file=FILE cache test results in FILE [disabled]
2245 -C, --config-cache alias for \`--cache-file=config.cache'
2246 -n, --no-create do not create output files
2247 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2248
2249Installation directories:
2250 --prefix=PREFIX install architecture-independent files in PREFIX
2251 [$ac_default_prefix]
2252 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2253 [PREFIX]
2254
2255By default, \`make install' will install all the files in
2256\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2257an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2258for instance \`--prefix=\$HOME'.
2259
2260For better control, use the options below.
2261
2262Fine tuning of the installation directories:
2263 --bindir=DIR user executables [EPREFIX/bin]
2264 --sbindir=DIR system admin executables [EPREFIX/sbin]
2265 --libexecdir=DIR program executables [EPREFIX/libexec]
2266 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2267 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2268 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2269 --libdir=DIR object code libraries [EPREFIX/lib]
2270 --includedir=DIR C header files [PREFIX/include]
2271 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2272 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2273 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2274 --infodir=DIR info documentation [DATAROOTDIR/info]
2275 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2276 --mandir=DIR man documentation [DATAROOTDIR/man]
2277 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
2278 --htmldir=DIR html documentation [DOCDIR]
2279 --dvidir=DIR dvi documentation [DOCDIR]
2280 --pdfdir=DIR pdf documentation [DOCDIR]
2281 --psdir=DIR ps documentation [DOCDIR]
2282_ACEOF
2283
2284 cat <<\_ACEOF
2285
2286Program names:
2287 --program-prefix=PREFIX prepend PREFIX to installed program names
2288 --program-suffix=SUFFIX append SUFFIX to installed program names
2289 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2290
2291System types:
2292 --build=BUILD configure for building on BUILD [guessed]
2293 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2294 --target=TARGET configure for building compilers for TARGET [HOST]
2295_ACEOF
2296fi
2297
2298if test -n "$ac_init_help"; then
2299
2300 cat <<\_ACEOF
2301
2302Optional Features:
2303 --disable-option-checking ignore unrecognized --enable/--with options
2304 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2305 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2306 --enable-maintainer-mode enable make rules and dependencies not useful
2307 (and sometimes confusing) to the casual installer
2196f55f 2308 --disable-largefile omit support for large files
c971b7fa
PA
2309 --disable-dependency-tracking speeds up one-time build
2310 --enable-dependency-tracking do not reject slow dependency extractors
2311
2312Some influential environment variables:
2313 CC C compiler command
2314 CFLAGS C compiler flags
2315 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2316 nonstandard directory <lib dir>
2317 LIBS libraries to pass to the linker, e.g. -l<library>
2318 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
2319 you have headers in a nonstandard directory <include dir>
2320 CPP C preprocessor
2321
2322Use these variables to override the choices made by `configure' or to help
2323it to find libraries and programs with nonstandard names/locations.
2324
2325Report bugs to the package provider.
2326_ACEOF
2327ac_status=$?
2328fi
2329
2330if test "$ac_init_help" = "recursive"; then
2331 # If there are subdirs, report their specific --help.
2332 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2333 test -d "$ac_dir" ||
2334 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2335 continue
2336 ac_builddir=.
2337
2338case "$ac_dir" in
2339.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2340*)
2341 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2342 # A ".." for each directory in $ac_dir_suffix.
2343 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2344 case $ac_top_builddir_sub in
2345 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2346 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2347 esac ;;
2348esac
2349ac_abs_top_builddir=$ac_pwd
2350ac_abs_builddir=$ac_pwd$ac_dir_suffix
2351# for backward compatibility:
2352ac_top_builddir=$ac_top_build_prefix
2353
2354case $srcdir in
2355 .) # We are building in place.
2356 ac_srcdir=.
2357 ac_top_srcdir=$ac_top_builddir_sub
2358 ac_abs_top_srcdir=$ac_pwd ;;
2359 [\\/]* | ?:[\\/]* ) # Absolute name.
2360 ac_srcdir=$srcdir$ac_dir_suffix;
2361 ac_top_srcdir=$srcdir
2362 ac_abs_top_srcdir=$srcdir ;;
2363 *) # Relative name.
2364 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2365 ac_top_srcdir=$ac_top_build_prefix$srcdir
2366 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2367esac
2368ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2369
2370 cd "$ac_dir" || { ac_status=$?; continue; }
2371 # Check for guested configure.
2372 if test -f "$ac_srcdir/configure.gnu"; then
2373 echo &&
2374 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2375 elif test -f "$ac_srcdir/configure"; then
2376 echo &&
2377 $SHELL "$ac_srcdir/configure" --help=recursive
2378 else
2379 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2380 fi || ac_status=$?
2381 cd "$ac_pwd" || { ac_status=$?; break; }
2382 done
2383fi
2384
2385test -n "$ac_init_help" && exit $ac_status
2386if $ac_init_version; then
2387 cat <<\_ACEOF
2388configure
2389generated by GNU Autoconf 2.64
2390
2391Copyright (C) 2009 Free Software Foundation, Inc.
2392This configure script is free software; the Free Software Foundation
2393gives unlimited permission to copy, distribute and modify it.
2394_ACEOF
2395 exit
2396fi
2397
2398## ------------------------ ##
2399## Autoconf initialization. ##
2400## ------------------------ ##
2401
2402# ac_fn_c_try_compile LINENO
2403# --------------------------
2404# Try to compile conftest.$ac_ext, and return whether this succeeded.
2405ac_fn_c_try_compile ()
2406{
2407 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2408 rm -f conftest.$ac_objext
2409 if { { ac_try="$ac_compile"
2410case "(($ac_try" in
2411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2412 *) ac_try_echo=$ac_try;;
2413esac
2414eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2415$as_echo "$ac_try_echo"; } >&5
2416 (eval "$ac_compile") 2>conftest.err
2417 ac_status=$?
2418 if test -s conftest.err; then
2419 grep -v '^ *+' conftest.err >conftest.er1
2420 cat conftest.er1 >&5
2421 mv -f conftest.er1 conftest.err
2422 fi
2423 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2424 test $ac_status = 0; } && {
2425 test -z "$ac_c_werror_flag" ||
2426 test ! -s conftest.err
2427 } && test -s conftest.$ac_objext; then :
2428 ac_retval=0
2429else
2430 $as_echo "$as_me: failed program was:" >&5
2431sed 's/^/| /' conftest.$ac_ext >&5
2432
2433 ac_retval=1
2434fi
2435 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2436 return $ac_retval
2437
2438} # ac_fn_c_try_compile
2439
2440# ac_fn_c_try_cpp LINENO
2441# ----------------------
2442# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2443ac_fn_c_try_cpp ()
2444{
2445 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2446 if { { ac_try="$ac_cpp conftest.$ac_ext"
2447case "(($ac_try" in
2448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2449 *) ac_try_echo=$ac_try;;
2450esac
2451eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2452$as_echo "$ac_try_echo"; } >&5
2453 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2454 ac_status=$?
2455 if test -s conftest.err; then
2456 grep -v '^ *+' conftest.err >conftest.er1
2457 cat conftest.er1 >&5
2458 mv -f conftest.er1 conftest.err
2459 fi
2460 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2461 test $ac_status = 0; } >/dev/null && {
2462 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2463 test ! -s conftest.err
2464 }; then :
2465 ac_retval=0
2466else
2467 $as_echo "$as_me: failed program was:" >&5
2468sed 's/^/| /' conftest.$ac_ext >&5
2469
2470 ac_retval=1
2471fi
2472 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2473 return $ac_retval
2474
2475} # ac_fn_c_try_cpp
2476
2477# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2478# -------------------------------------------------------
2479# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2480# the include files in INCLUDES and setting the cache variable VAR
2481# accordingly.
2482ac_fn_c_check_header_mongrel ()
2483{
2484 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2485 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2487$as_echo_n "checking for $2... " >&6; }
2488if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2489 $as_echo_n "(cached) " >&6
2490fi
2491eval ac_res=\$$3
2492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2493$as_echo "$ac_res" >&6; }
2494else
2495 # Is the header compilable?
2496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2497$as_echo_n "checking $2 usability... " >&6; }
2498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2499/* end confdefs.h. */
2500$4
2501#include <$2>
2502_ACEOF
2503if ac_fn_c_try_compile "$LINENO"; then :
2504 ac_header_compiler=yes
2505else
2506 ac_header_compiler=no
2507fi
2508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2510$as_echo "$ac_header_compiler" >&6; }
2511
2512# Is the header present?
2513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2514$as_echo_n "checking $2 presence... " >&6; }
2515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2516/* end confdefs.h. */
2517#include <$2>
2518_ACEOF
2519if ac_fn_c_try_cpp "$LINENO"; then :
2520 ac_header_preproc=yes
2521else
2522 ac_header_preproc=no
2523fi
2524rm -f conftest.err conftest.$ac_ext
2525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2526$as_echo "$ac_header_preproc" >&6; }
2527
2528# So? What about this header?
2529case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2530 yes:no: )
2531 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2532$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2533 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2534$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2535 ;;
2536 no:yes:* )
2537 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2538$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2539 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2540$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2541 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2542$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2543 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2544$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2545 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2546$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2547 ;;
2548esac
2549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2550$as_echo_n "checking for $2... " >&6; }
2551if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2552 $as_echo_n "(cached) " >&6
2553else
2554 eval "$3=\$ac_header_compiler"
2555fi
2556eval ac_res=\$$3
2557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2558$as_echo "$ac_res" >&6; }
2559fi
2560 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2561
2562} # ac_fn_c_check_header_mongrel
2563
2564# ac_fn_c_try_run LINENO
2565# ----------------------
2566# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2567# that executables *can* be run.
2568ac_fn_c_try_run ()
2569{
2570 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2571 if { { ac_try="$ac_link"
2572case "(($ac_try" in
2573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2574 *) ac_try_echo=$ac_try;;
2575esac
2576eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2577$as_echo "$ac_try_echo"; } >&5
2578 (eval "$ac_link") 2>&5
2579 ac_status=$?
2580 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2581 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2582 { { case "(($ac_try" in
2583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2584 *) ac_try_echo=$ac_try;;
2585esac
2586eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2587$as_echo "$ac_try_echo"; } >&5
2588 (eval "$ac_try") 2>&5
2589 ac_status=$?
2590 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2591 test $ac_status = 0; }; }; then :
2592 ac_retval=0
2593else
2594 $as_echo "$as_me: program exited with status $ac_status" >&5
2595 $as_echo "$as_me: failed program was:" >&5
2596sed 's/^/| /' conftest.$ac_ext >&5
2597
2598 ac_retval=$ac_status
2599fi
2600 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2601 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2602 return $ac_retval
2603
2604} # ac_fn_c_try_run
2605
2606# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2607# -------------------------------------------------------
2608# Tests whether HEADER exists and can be compiled using the include files in
2609# INCLUDES, setting the cache variable VAR accordingly.
2610ac_fn_c_check_header_compile ()
2611{
2612 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2614$as_echo_n "checking for $2... " >&6; }
2615if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2616 $as_echo_n "(cached) " >&6
2617else
2618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2619/* end confdefs.h. */
2620$4
2621#include <$2>
2622_ACEOF
2623if ac_fn_c_try_compile "$LINENO"; then :
2624 eval "$3=yes"
2625else
2626 eval "$3=no"
2627fi
2628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2629fi
2630eval ac_res=\$$3
2631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2632$as_echo "$ac_res" >&6; }
2633 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2634
2635} # ac_fn_c_check_header_compile
2636
2637# ac_fn_c_try_link LINENO
2638# -----------------------
2639# Try to link conftest.$ac_ext, and return whether this succeeded.
2640ac_fn_c_try_link ()
2641{
2642 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2643 rm -f conftest.$ac_objext conftest$ac_exeext
2644 if { { ac_try="$ac_link"
2645case "(($ac_try" in
2646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2647 *) ac_try_echo=$ac_try;;
2648esac
2649eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2650$as_echo "$ac_try_echo"; } >&5
2651 (eval "$ac_link") 2>conftest.err
2652 ac_status=$?
2653 if test -s conftest.err; then
2654 grep -v '^ *+' conftest.err >conftest.er1
2655 cat conftest.er1 >&5
2656 mv -f conftest.er1 conftest.err
2657 fi
2658 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2659 test $ac_status = 0; } && {
2660 test -z "$ac_c_werror_flag" ||
2661 test ! -s conftest.err
2662 } && test -s conftest$ac_exeext && {
2663 test "$cross_compiling" = yes ||
2664 $as_test_x conftest$ac_exeext
2665 }; then :
2666 ac_retval=0
2667else
2668 $as_echo "$as_me: failed program was:" >&5
2669sed 's/^/| /' conftest.$ac_ext >&5
2670
2671 ac_retval=1
2672fi
2673 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2674 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2675 # interfere with the next link command; also delete a directory that is
2676 # left behind by Apple's compiler. We do this before executing the actions.
2677 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2678 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2679 return $ac_retval
2680
2681} # ac_fn_c_try_link
2682
8690e634
JK
2683# ac_fn_c_check_func LINENO FUNC VAR
2684# ----------------------------------
2685# Tests whether FUNC exists, setting the cache variable VAR accordingly
2686ac_fn_c_check_func ()
2687{
2688 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2690$as_echo_n "checking for $2... " >&6; }
2691if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2692 $as_echo_n "(cached) " >&6
2693else
2694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2695/* end confdefs.h. */
2696/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2697 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2698#define $2 innocuous_$2
2699
2700/* System header to define __stub macros and hopefully few prototypes,
2701 which can conflict with char $2 (); below.
2702 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2703 <limits.h> exists even on freestanding compilers. */
2704
2705#ifdef __STDC__
2706# include <limits.h>
2707#else
2708# include <assert.h>
2709#endif
2710
2711#undef $2
2712
2713/* Override any GCC internal prototype to avoid an error.
2714 Use char because int might match the return type of a GCC
2715 builtin and then its argument prototype would still apply. */
2716#ifdef __cplusplus
2717extern "C"
2718#endif
2719char $2 ();
2720/* The GNU C library defines this for functions which it implements
2721 to always fail with ENOSYS. Some functions are actually named
2722 something starting with __ and the normal name is an alias. */
2723#if defined __stub_$2 || defined __stub___$2
2724choke me
2725#endif
2726
2727int
2728main ()
2729{
2730return $2 ();
2731 ;
2732 return 0;
2733}
2734_ACEOF
2735if ac_fn_c_try_link "$LINENO"; then :
2736 eval "$3=yes"
2737else
2738 eval "$3=no"
2739fi
2740rm -f core conftest.err conftest.$ac_objext \
2741 conftest$ac_exeext conftest.$ac_ext
2742fi
2743eval ac_res=\$$3
2744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2745$as_echo "$ac_res" >&6; }
2746 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2747
2748} # ac_fn_c_check_func
2749
8986e351
TT
2750# ac_fn_c_check_decl LINENO SYMBOL VAR
2751# ------------------------------------
2752# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2753ac_fn_c_check_decl ()
2754{
2755 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2757$as_echo_n "checking whether $2 is declared... " >&6; }
2758if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2759 $as_echo_n "(cached) " >&6
2760else
2761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2762/* end confdefs.h. */
2763$4
2764int
2765main ()
2766{
2767#ifndef $2
2768 (void) $2;
2769#endif
2770
2771 ;
2772 return 0;
2773}
2774_ACEOF
2775if ac_fn_c_try_compile "$LINENO"; then :
2776 eval "$3=yes"
2777else
2778 eval "$3=no"
2779fi
2780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2781fi
2782eval ac_res=\$$3
2783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2784$as_echo "$ac_res" >&6; }
2785 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2786
2787} # ac_fn_c_check_decl
2788
c971b7fa
PA
2789# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2790# --------------------------------------------
2791# Tries to find the compile-time value of EXPR in a program that includes
2792# INCLUDES, setting VAR accordingly. Returns whether the value could be
2793# computed
2794ac_fn_c_compute_int ()
2795{
2796 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2797 if test "$cross_compiling" = yes; then
2798 # Depending upon the size, compute the lo and hi bounds.
2799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2800/* end confdefs.h. */
2801$4
2802int
2803main ()
2804{
2805static int test_array [1 - 2 * !(($2) >= 0)];
2806test_array [0] = 0
2807
2808 ;
2809 return 0;
2810}
2811_ACEOF
2812if ac_fn_c_try_compile "$LINENO"; then :
2813 ac_lo=0 ac_mid=0
2814 while :; do
2815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2816/* end confdefs.h. */
2817$4
2818int
2819main ()
2820{
2821static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2822test_array [0] = 0
2823
2824 ;
2825 return 0;
2826}
2827_ACEOF
2828if ac_fn_c_try_compile "$LINENO"; then :
2829 ac_hi=$ac_mid; break
2830else
2831 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2832 if test $ac_lo -le $ac_mid; then
2833 ac_lo= ac_hi=
2834 break
2835 fi
2836 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2837fi
2838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2839 done
2840else
2841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2842/* end confdefs.h. */
2843$4
2844int
2845main ()
2846{
2847static int test_array [1 - 2 * !(($2) < 0)];
2848test_array [0] = 0
2849
2850 ;
2851 return 0;
2852}
2853_ACEOF
2854if ac_fn_c_try_compile "$LINENO"; then :
2855 ac_hi=-1 ac_mid=-1
2856 while :; do
2857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2858/* end confdefs.h. */
2859$4
2860int
2861main ()
2862{
2863static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2864test_array [0] = 0
2865
2866 ;
2867 return 0;
2868}
2869_ACEOF
2870if ac_fn_c_try_compile "$LINENO"; then :
2871 ac_lo=$ac_mid; break
2872else
2873 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2874 if test $ac_mid -le $ac_hi; then
2875 ac_lo= ac_hi=
2876 break
2877 fi
2878 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2879fi
2880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2881 done
2882else
2883 ac_lo= ac_hi=
2884fi
2885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2886fi
2887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2888# Binary search between lo and hi bounds.
2889while test "x$ac_lo" != "x$ac_hi"; do
2890 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2892/* end confdefs.h. */
2893$4
2894int
2895main ()
2896{
2897static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2898test_array [0] = 0
2899
2900 ;
2901 return 0;
2902}
2903_ACEOF
2904if ac_fn_c_try_compile "$LINENO"; then :
2905 ac_hi=$ac_mid
2906else
2907 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2908fi
2909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2910done
2911case $ac_lo in #((
2912?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2913'') ac_retval=1 ;;
2914esac
2915 else
2916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2917/* end confdefs.h. */
2918$4
2919static long int longval () { return $2; }
2920static unsigned long int ulongval () { return $2; }
2921#include <stdio.h>
2922#include <stdlib.h>
2923int
2924main ()
2925{
2926
2927 FILE *f = fopen ("conftest.val", "w");
2928 if (! f)
2929 return 1;
2930 if (($2) < 0)
2931 {
2932 long int i = longval ();
2933 if (i != ($2))
2934 return 1;
2935 fprintf (f, "%ld", i);
2936 }
2937 else
2938 {
2939 unsigned long int i = ulongval ();
2940 if (i != ($2))
2941 return 1;
2942 fprintf (f, "%lu", i);
2943 }
2944 /* Do not output a trailing newline, as this causes \r\n confusion
2945 on some platforms. */
2946 return ferror (f) || fclose (f) != 0;
2947
2948 ;
2949 return 0;
2950}
2951_ACEOF
2952if ac_fn_c_try_run "$LINENO"; then :
2953 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2954else
2955 ac_retval=1
2956fi
2957rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2958 conftest.$ac_objext conftest.beam conftest.$ac_ext
2959rm -f conftest.val
2960
2961 fi
2962 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2963 return $ac_retval
2964
2965} # ac_fn_c_compute_int
2966
8690e634
JK
2967# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2968# -------------------------------------------
2969# Tests whether TYPE exists after having included INCLUDES, setting cache
2970# variable VAR accordingly.
2971ac_fn_c_check_type ()
c971b7fa
PA
2972{
2973 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2975$as_echo_n "checking for $2... " >&6; }
2976if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2977 $as_echo_n "(cached) " >&6
2978else
8690e634 2979 eval "$3=no"
c971b7fa
PA
2980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2981/* end confdefs.h. */
8690e634 2982$4
c971b7fa
PA
2983int
2984main ()
2985{
8690e634
JK
2986if (sizeof ($2))
2987 return 0;
c971b7fa
PA
2988 ;
2989 return 0;
2990}
2991_ACEOF
8690e634 2992if ac_fn_c_try_compile "$LINENO"; then :
c971b7fa
PA
2993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2994/* end confdefs.h. */
2995$4
2996int
2997main ()
2998{
8690e634
JK
2999if (sizeof (($2)))
3000 return 0;
c971b7fa
PA
3001 ;
3002 return 0;
3003}
3004_ACEOF
3005if ac_fn_c_try_compile "$LINENO"; then :
8690e634 3006
c971b7fa 3007else
8690e634
JK
3008 eval "$3=yes"
3009fi
3010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa
PA
3011fi
3012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3013fi
3014eval ac_res=\$$3
3015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3016$as_echo "$ac_res" >&6; }
3017 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
3018
8690e634 3019} # ac_fn_c_check_type
c971b7fa
PA
3020cat >config.log <<_ACEOF
3021This file contains any messages produced by compilers while
3022running configure, to aid debugging if configure makes a mistake.
3023
3024It was created by $as_me, which was
3025generated by GNU Autoconf 2.64. Invocation command line was
3026
3027 $ $0 $@
3028
3029_ACEOF
3030exec 5>>config.log
3031{
3032cat <<_ASUNAME
3033## --------- ##
3034## Platform. ##
3035## --------- ##
3036
3037hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3038uname -m = `(uname -m) 2>/dev/null || echo unknown`
3039uname -r = `(uname -r) 2>/dev/null || echo unknown`
3040uname -s = `(uname -s) 2>/dev/null || echo unknown`
3041uname -v = `(uname -v) 2>/dev/null || echo unknown`
3042
3043/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3044/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3045
3046/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3047/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3048/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3049/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3050/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3051/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3052/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3053
3054_ASUNAME
3055
3056as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3057for as_dir in $PATH
3058do
3059 IFS=$as_save_IFS
3060 test -z "$as_dir" && as_dir=.
3061 $as_echo "PATH: $as_dir"
3062 done
3063IFS=$as_save_IFS
3064
3065} >&5
3066
3067cat >&5 <<_ACEOF
3068
3069
3070## ----------- ##
3071## Core tests. ##
3072## ----------- ##
3073
3074_ACEOF
3075
3076
3077# Keep a trace of the command line.
3078# Strip out --no-create and --no-recursion so they do not pile up.
3079# Strip out --silent because we don't want to record it for future runs.
3080# Also quote any args containing shell meta-characters.
3081# Make two passes to allow for proper duplicate-argument suppression.
3082ac_configure_args=
3083ac_configure_args0=
3084ac_configure_args1=
3085ac_must_keep_next=false
3086for ac_pass in 1 2
3087do
3088 for ac_arg
3089 do
3090 case $ac_arg in
3091 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3092 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3093 | -silent | --silent | --silen | --sile | --sil)
3094 continue ;;
3095 *\'*)
3096 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3097 esac
3098 case $ac_pass in
3099 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3100 2)
3101 as_fn_append ac_configure_args1 " '$ac_arg'"
3102 if test $ac_must_keep_next = true; then
3103 ac_must_keep_next=false # Got value, back to normal.
3104 else
3105 case $ac_arg in
3106 *=* | --config-cache | -C | -disable-* | --disable-* \
3107 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3108 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3109 | -with-* | --with-* | -without-* | --without-* | --x)
3110 case "$ac_configure_args0 " in
3111 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3112 esac
3113 ;;
3114 -* ) ac_must_keep_next=true ;;
3115 esac
3116 fi
3117 as_fn_append ac_configure_args " '$ac_arg'"
3118 ;;
3119 esac
3120 done
3121done
3122{ ac_configure_args0=; unset ac_configure_args0;}
3123{ ac_configure_args1=; unset ac_configure_args1;}
3124
3125# When interrupted or exit'd, cleanup temporary files, and complete
3126# config.log. We remove comments because anyway the quotes in there
3127# would cause problems or look ugly.
3128# WARNING: Use '\'' to represent an apostrophe within the trap.
3129# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3130trap 'exit_status=$?
3131 # Save into config.log some information that might help in debugging.
3132 {
3133 echo
3134
3135 cat <<\_ASBOX
3136## ---------------- ##
3137## Cache variables. ##
3138## ---------------- ##
3139_ASBOX
3140 echo
3141 # The following way of writing the cache mishandles newlines in values,
3142(
3143 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3144 eval ac_val=\$$ac_var
3145 case $ac_val in #(
3146 *${as_nl}*)
3147 case $ac_var in #(
3148 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3149$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3150 esac
3151 case $ac_var in #(
3152 _ | IFS | as_nl) ;; #(
3153 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3154 *) { eval $ac_var=; unset $ac_var;} ;;
3155 esac ;;
3156 esac
3157 done
3158 (set) 2>&1 |
3159 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3160 *${as_nl}ac_space=\ *)
3161 sed -n \
3162 "s/'\''/'\''\\\\'\'''\''/g;
3163 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3164 ;; #(
3165 *)
3166 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3167 ;;
3168 esac |
3169 sort
3170)
3171 echo
3172
3173 cat <<\_ASBOX
3174## ----------------- ##
3175## Output variables. ##
3176## ----------------- ##
3177_ASBOX
3178 echo
3179 for ac_var in $ac_subst_vars
3180 do
3181 eval ac_val=\$$ac_var
3182 case $ac_val in
3183 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3184 esac
3185 $as_echo "$ac_var='\''$ac_val'\''"
3186 done | sort
3187 echo
3188
3189 if test -n "$ac_subst_files"; then
3190 cat <<\_ASBOX
3191## ------------------- ##
3192## File substitutions. ##
3193## ------------------- ##
3194_ASBOX
3195 echo
3196 for ac_var in $ac_subst_files
3197 do
3198 eval ac_val=\$$ac_var
3199 case $ac_val in
3200 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3201 esac
3202 $as_echo "$ac_var='\''$ac_val'\''"
3203 done | sort
3204 echo
3205 fi
3206
3207 if test -s confdefs.h; then
3208 cat <<\_ASBOX
3209## ----------- ##
3210## confdefs.h. ##
3211## ----------- ##
3212_ASBOX
3213 echo
3214 cat confdefs.h
3215 echo
3216 fi
3217 test "$ac_signal" != 0 &&
3218 $as_echo "$as_me: caught signal $ac_signal"
3219 $as_echo "$as_me: exit $exit_status"
3220 } >&5
3221 rm -f core *.core core.conftest.* &&
3222 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3223 exit $exit_status
3224' 0
3225for ac_signal in 1 2 13 15; do
3226 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3227done
3228ac_signal=0
3229
3230# confdefs.h avoids OS command line length limits that DEFS can exceed.
3231rm -f -r conftest* confdefs.h
3232
3233$as_echo "/* confdefs.h */" > confdefs.h
3234
3235# Predefined preprocessor variables.
3236
3237cat >>confdefs.h <<_ACEOF
3238#define PACKAGE_NAME "$PACKAGE_NAME"
3239_ACEOF
3240
3241cat >>confdefs.h <<_ACEOF
3242#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3243_ACEOF
3244
3245cat >>confdefs.h <<_ACEOF
3246#define PACKAGE_VERSION "$PACKAGE_VERSION"
3247_ACEOF
3248
3249cat >>confdefs.h <<_ACEOF
3250#define PACKAGE_STRING "$PACKAGE_STRING"
3251_ACEOF
3252
3253cat >>confdefs.h <<_ACEOF
3254#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3255_ACEOF
3256
3257cat >>confdefs.h <<_ACEOF
3258#define PACKAGE_URL "$PACKAGE_URL"
3259_ACEOF
3260
3261
3262# Let the site file select an alternate cache file if it wants to.
3263# Prefer an explicitly selected file to automatically selected ones.
3264ac_site_file1=NONE
3265ac_site_file2=NONE
3266if test -n "$CONFIG_SITE"; then
3267 ac_site_file1=$CONFIG_SITE
3268elif test "x$prefix" != xNONE; then
3269 ac_site_file1=$prefix/share/config.site
3270 ac_site_file2=$prefix/etc/config.site
3271else
3272 ac_site_file1=$ac_default_prefix/share/config.site
3273 ac_site_file2=$ac_default_prefix/etc/config.site
3274fi
3275for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3276do
3277 test "x$ac_site_file" = xNONE && continue
3278 if test -r "$ac_site_file"; then
3279 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3280$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3281 sed 's/^/| /' "$ac_site_file" >&5
3282 . "$ac_site_file"
3283 fi
3284done
3285
3286if test -r "$cache_file"; then
3287 # Some versions of bash will fail to source /dev/null (special
3288 # files actually), so we avoid doing that.
3289 if test -f "$cache_file"; then
3290 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3291$as_echo "$as_me: loading cache $cache_file" >&6;}
3292 case $cache_file in
3293 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3294 *) . "./$cache_file";;
3295 esac
3296 fi
3297else
3298 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3299$as_echo "$as_me: creating cache $cache_file" >&6;}
3300 >$cache_file
3301fi
3302
98399780
YQ
3303as_fn_append ac_func_list " canonicalize_file_name"
3304as_fn_append ac_func_list " getcwd"
3305as_fn_append ac_func_list " readlink"
3306as_fn_append ac_func_list " realpath"
3307as_fn_append ac_header_list " sys/param.h"
e26b6bb0 3308as_fn_append ac_header_list " dirent.h"
3574124b
PA
3309as_fn_append ac_func_list " btowc"
3310as_fn_append ac_func_list " isblank"
3311as_fn_append ac_func_list " iswctype"
3312as_fn_append ac_func_list " mbsrtowcs"
3313as_fn_append ac_func_list " mempcpy"
3314as_fn_append ac_func_list " wmemchr"
3315as_fn_append ac_func_list " wmemcpy"
3316as_fn_append ac_func_list " wmempcpy"
3317as_fn_append ac_header_list " wctype.h"
8690e634 3318gl_fnmatch_required=GNU
4a626d0a
PA
3319as_fn_append ac_header_list " sys/time.h"
3320as_fn_append ac_header_list " sys/socket.h"
3321as_fn_append ac_func_list " gettimeofday"
49e4877c 3322as_fn_append ac_header_list " limits.h"
3574124b
PA
3323as_fn_append ac_header_list " wchar.h"
3324as_fn_append ac_header_list " stdint.h"
3325as_fn_append ac_header_list " inttypes.h"
3326as_fn_append ac_header_list " unistd.h"
3327as_fn_append ac_func_list " symlink"
f45c62c4 3328as_fn_append ac_func_list " lstat"
3574124b
PA
3329as_fn_append ac_header_list " math.h"
3330as_fn_append ac_func_list " mbsinit"
3331as_fn_append ac_func_list " mbrtowc"
3332as_fn_append ac_header_list " sys/mman.h"
3333as_fn_append ac_func_list " mprotect"
6a29c58e 3334as_fn_append ac_func_list " link"
09607c9e 3335as_fn_append ac_header_list " sys/stat.h"
3574124b
PA
3336as_fn_append ac_header_list " features.h"
3337as_fn_append ac_func_list " iswcntrl"
c971b7fa
PA
3338# Check that the precious variables saved in the cache have kept the same
3339# value.
3340ac_cache_corrupted=false
3341for ac_var in $ac_precious_vars; do
3342 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3343 eval ac_new_set=\$ac_env_${ac_var}_set
3344 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3345 eval ac_new_val=\$ac_env_${ac_var}_value
3346 case $ac_old_set,$ac_new_set in
3347 set,)
3348 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3349$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3350 ac_cache_corrupted=: ;;
3351 ,set)
3352 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3353$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3354 ac_cache_corrupted=: ;;
3355 ,);;
3356 *)
3357 if test "x$ac_old_val" != "x$ac_new_val"; then
3358 # differences in whitespace do not lead to failure.
3359 ac_old_val_w=`echo x $ac_old_val`
3360 ac_new_val_w=`echo x $ac_new_val`
3361 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3362 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3363$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3364 ac_cache_corrupted=:
3365 else
3366 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3367$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3368 eval $ac_var=\$ac_old_val
3369 fi
3370 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3371$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3372 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3373$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3374 fi;;
3375 esac
3376 # Pass precious variables to config.status.
3377 if test "$ac_new_set" = set; then
3378 case $ac_new_val in
3379 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3380 *) ac_arg=$ac_var=$ac_new_val ;;
3381 esac
3382 case " $ac_configure_args " in
3383 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3384 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3385 esac
3386 fi
3387done
3388if $ac_cache_corrupted; then
3389 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3390$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3391 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3392$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3393 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3394fi
3395## -------------------- ##
3396## Main body of script. ##
3397## -------------------- ##
3398
3399ac_ext=c
3400ac_cpp='$CPP $CPPFLAGS'
3401ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3402ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3403ac_compiler_gnu=$ac_cv_c_compiler_gnu
3404
3405
3406ac_config_headers="$ac_config_headers config.h:config.in"
3407
3408
3409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
3410$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
3411 # Check whether --enable-maintainer-mode was given.
3412if test "${enable_maintainer_mode+set}" = set; then :
3413 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
3414else
3415 USE_MAINTAINER_MODE=no
3416fi
3417
3418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3419$as_echo "$USE_MAINTAINER_MODE" >&6; }
3420 if test $USE_MAINTAINER_MODE = yes; then
3421 MAINTAINER_MODE_TRUE=
3422 MAINTAINER_MODE_FALSE='#'
3423else
3424 MAINTAINER_MODE_TRUE='#'
3425 MAINTAINER_MODE_FALSE=
3426fi
3427
3428 MAINT=$MAINTAINER_MODE_TRUE
3429
3430
3431
3432ac_ext=c
3433ac_cpp='$CPP $CPPFLAGS'
3434ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3435ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3436ac_compiler_gnu=$ac_cv_c_compiler_gnu
3437if test -n "$ac_tool_prefix"; then
3438 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3439set dummy ${ac_tool_prefix}gcc; ac_word=$2
3440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3441$as_echo_n "checking for $ac_word... " >&6; }
3442if test "${ac_cv_prog_CC+set}" = set; then :
3443 $as_echo_n "(cached) " >&6
3444else
3445 if test -n "$CC"; then
3446 ac_cv_prog_CC="$CC" # Let the user override the test.
3447else
3448as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3449for as_dir in $PATH
3450do
3451 IFS=$as_save_IFS
3452 test -z "$as_dir" && as_dir=.
3453 for ac_exec_ext in '' $ac_executable_extensions; do
3454 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3455 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3456 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3457 break 2
3458 fi
3459done
3460 done
3461IFS=$as_save_IFS
3462
3463fi
3464fi
3465CC=$ac_cv_prog_CC
3466if test -n "$CC"; then
3467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3468$as_echo "$CC" >&6; }
3469else
3470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3471$as_echo "no" >&6; }
3472fi
3473
3474
3475fi
3476if test -z "$ac_cv_prog_CC"; then
3477 ac_ct_CC=$CC
3478 # Extract the first word of "gcc", so it can be a program name with args.
3479set dummy gcc; ac_word=$2
3480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3481$as_echo_n "checking for $ac_word... " >&6; }
3482if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3483 $as_echo_n "(cached) " >&6
3484else
3485 if test -n "$ac_ct_CC"; then
3486 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3487else
3488as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3489for as_dir in $PATH
3490do
3491 IFS=$as_save_IFS
3492 test -z "$as_dir" && as_dir=.
3493 for ac_exec_ext in '' $ac_executable_extensions; do
3494 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3495 ac_cv_prog_ac_ct_CC="gcc"
3496 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3497 break 2
3498 fi
3499done
3500 done
3501IFS=$as_save_IFS
3502
3503fi
3504fi
3505ac_ct_CC=$ac_cv_prog_ac_ct_CC
3506if test -n "$ac_ct_CC"; then
3507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3508$as_echo "$ac_ct_CC" >&6; }
3509else
3510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3511$as_echo "no" >&6; }
3512fi
3513
3514 if test "x$ac_ct_CC" = x; then
3515 CC=""
3516 else
3517 case $cross_compiling:$ac_tool_warned in
3518yes:)
3519{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3520$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3521ac_tool_warned=yes ;;
3522esac
3523 CC=$ac_ct_CC
3524 fi
3525else
3526 CC="$ac_cv_prog_CC"
3527fi
3528
3529if test -z "$CC"; then
3530 if test -n "$ac_tool_prefix"; then
3531 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3532set dummy ${ac_tool_prefix}cc; ac_word=$2
3533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3534$as_echo_n "checking for $ac_word... " >&6; }
3535if test "${ac_cv_prog_CC+set}" = set; then :
3536 $as_echo_n "(cached) " >&6
3537else
3538 if test -n "$CC"; then
3539 ac_cv_prog_CC="$CC" # Let the user override the test.
3540else
3541as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3542for as_dir in $PATH
3543do
3544 IFS=$as_save_IFS
3545 test -z "$as_dir" && as_dir=.
3546 for ac_exec_ext in '' $ac_executable_extensions; do
3547 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3548 ac_cv_prog_CC="${ac_tool_prefix}cc"
3549 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3550 break 2
3551 fi
3552done
3553 done
3554IFS=$as_save_IFS
3555
3556fi
3557fi
3558CC=$ac_cv_prog_CC
3559if test -n "$CC"; then
3560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3561$as_echo "$CC" >&6; }
3562else
3563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3564$as_echo "no" >&6; }
3565fi
3566
3567
3568 fi
3569fi
3570if test -z "$CC"; then
3571 # Extract the first word of "cc", so it can be a program name with args.
3572set dummy cc; ac_word=$2
3573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3574$as_echo_n "checking for $ac_word... " >&6; }
3575if test "${ac_cv_prog_CC+set}" = set; then :
3576 $as_echo_n "(cached) " >&6
3577else
3578 if test -n "$CC"; then
3579 ac_cv_prog_CC="$CC" # Let the user override the test.
3580else
3581 ac_prog_rejected=no
3582as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3583for as_dir in $PATH
3584do
3585 IFS=$as_save_IFS
3586 test -z "$as_dir" && as_dir=.
3587 for ac_exec_ext in '' $ac_executable_extensions; do
3588 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3589 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3590 ac_prog_rejected=yes
3591 continue
3592 fi
3593 ac_cv_prog_CC="cc"
3594 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3595 break 2
3596 fi
3597done
3598 done
3599IFS=$as_save_IFS
3600
3601if test $ac_prog_rejected = yes; then
3602 # We found a bogon in the path, so make sure we never use it.
3603 set dummy $ac_cv_prog_CC
3604 shift
3605 if test $# != 0; then
3606 # We chose a different compiler from the bogus one.
3607 # However, it has the same basename, so the bogon will be chosen
3608 # first if we set CC to just the basename; use the full file name.
3609 shift
3610 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3611 fi
3612fi
3613fi
3614fi
3615CC=$ac_cv_prog_CC
3616if test -n "$CC"; then
3617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3618$as_echo "$CC" >&6; }
3619else
3620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3621$as_echo "no" >&6; }
3622fi
3623
3624
3625fi
3626if test -z "$CC"; then
3627 if test -n "$ac_tool_prefix"; then
3628 for ac_prog in cl.exe
3629 do
3630 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3631set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3633$as_echo_n "checking for $ac_word... " >&6; }
3634if test "${ac_cv_prog_CC+set}" = set; then :
3635 $as_echo_n "(cached) " >&6
3636else
3637 if test -n "$CC"; then
3638 ac_cv_prog_CC="$CC" # Let the user override the test.
3639else
3640as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3641for as_dir in $PATH
3642do
3643 IFS=$as_save_IFS
3644 test -z "$as_dir" && as_dir=.
3645 for ac_exec_ext in '' $ac_executable_extensions; do
3646 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3647 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3648 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3649 break 2
3650 fi
3651done
3652 done
3653IFS=$as_save_IFS
3654
3655fi
3656fi
3657CC=$ac_cv_prog_CC
3658if test -n "$CC"; then
3659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3660$as_echo "$CC" >&6; }
3661else
3662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3663$as_echo "no" >&6; }
3664fi
3665
3666
3667 test -n "$CC" && break
3668 done
3669fi
3670if test -z "$CC"; then
3671 ac_ct_CC=$CC
3672 for ac_prog in cl.exe
3673do
3674 # Extract the first word of "$ac_prog", so it can be a program name with args.
3675set dummy $ac_prog; ac_word=$2
3676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3677$as_echo_n "checking for $ac_word... " >&6; }
3678if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3679 $as_echo_n "(cached) " >&6
3680else
3681 if test -n "$ac_ct_CC"; then
3682 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3683else
3684as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3685for as_dir in $PATH
3686do
3687 IFS=$as_save_IFS
3688 test -z "$as_dir" && as_dir=.
3689 for ac_exec_ext in '' $ac_executable_extensions; do
3690 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3691 ac_cv_prog_ac_ct_CC="$ac_prog"
3692 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3693 break 2
3694 fi
3695done
3696 done
3697IFS=$as_save_IFS
3698
3699fi
3700fi
3701ac_ct_CC=$ac_cv_prog_ac_ct_CC
3702if test -n "$ac_ct_CC"; then
3703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3704$as_echo "$ac_ct_CC" >&6; }
3705else
3706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3707$as_echo "no" >&6; }
3708fi
3709
3710
3711 test -n "$ac_ct_CC" && break
3712done
3713
3714 if test "x$ac_ct_CC" = x; then
3715 CC=""
3716 else
3717 case $cross_compiling:$ac_tool_warned in
3718yes:)
3719{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3720$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3721ac_tool_warned=yes ;;
3722esac
3723 CC=$ac_ct_CC
3724 fi
3725fi
3726
3727fi
3728
3729
3730test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3731$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3732as_fn_error "no acceptable C compiler found in \$PATH
3733See \`config.log' for more details." "$LINENO" 5; }
3734
3735# Provide some information about the compiler.
3736$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3737set X $ac_compile
3738ac_compiler=$2
3739for ac_option in --version -v -V -qversion; do
3740 { { ac_try="$ac_compiler $ac_option >&5"
3741case "(($ac_try" in
3742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3743 *) ac_try_echo=$ac_try;;
3744esac
3745eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3746$as_echo "$ac_try_echo"; } >&5
3747 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3748 ac_status=$?
3749 if test -s conftest.err; then
3750 sed '10a\
3751... rest of stderr output deleted ...
3752 10q' conftest.err >conftest.er1
3753 cat conftest.er1 >&5
3754 rm -f conftest.er1 conftest.err
3755 fi
3756 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3757 test $ac_status = 0; }
3758done
3759
3760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3761/* end confdefs.h. */
3762#include <stdio.h>
3763int
3764main ()
3765{
3766FILE *f = fopen ("conftest.out", "w");
3767 return ferror (f) || fclose (f) != 0;
3768
3769 ;
3770 return 0;
3771}
3772_ACEOF
3773ac_clean_files_save=$ac_clean_files
3774ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
3775# Try to create an executable without -o first, disregard a.out.
3776# It will help us diagnose broken compilers, and finding out an intuition
3777# of exeext.
3778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3779$as_echo_n "checking for C compiler default output file name... " >&6; }
3780ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3781
3782# The possible output files:
3783ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3784
3785ac_rmfiles=
3786for ac_file in $ac_files
3787do
3788 case $ac_file in
3789 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3790 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3791 esac
3792done
3793rm -f $ac_rmfiles
3794
3795if { { ac_try="$ac_link_default"
3796case "(($ac_try" in
3797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3798 *) ac_try_echo=$ac_try;;
3799esac
3800eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3801$as_echo "$ac_try_echo"; } >&5
3802 (eval "$ac_link_default") 2>&5
3803 ac_status=$?
3804 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3805 test $ac_status = 0; }; then :
3806 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3807# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3808# in a Makefile. We should not override ac_cv_exeext if it was cached,
3809# so that the user can short-circuit this test for compilers unknown to
3810# Autoconf.
3811for ac_file in $ac_files ''
3812do
3813 test -f "$ac_file" || continue
3814 case $ac_file in
3815 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3816 ;;
3817 [ab].out )
3818 # We found the default executable, but exeext='' is most
3819 # certainly right.
3820 break;;
3821 *.* )
3822 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3823 then :; else
3824 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3825 fi
3826 # We set ac_cv_exeext here because the later test for it is not
3827 # safe: cross compilers may not add the suffix if given an `-o'
3828 # argument, so we may need to know it at that point already.
3829 # Even if this section looks crufty: it has the advantage of
3830 # actually working.
3831 break;;
3832 * )
3833 break;;
3834 esac
3835done
3836test "$ac_cv_exeext" = no && ac_cv_exeext=
3837
3838else
3839 ac_file=''
3840fi
3841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3842$as_echo "$ac_file" >&6; }
3843if test -z "$ac_file"; then :
3844 $as_echo "$as_me: failed program was:" >&5
3845sed 's/^/| /' conftest.$ac_ext >&5
3846
3847{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3848$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3849{ as_fn_set_status 77
3850as_fn_error "C compiler cannot create executables
3851See \`config.log' for more details." "$LINENO" 5; }; }
3852fi
3853ac_exeext=$ac_cv_exeext
3854
3855# Check that the compiler produces executables we can run. If not, either
3856# the compiler is broken, or we cross compile.
3857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3858$as_echo_n "checking whether the C compiler works... " >&6; }
3859# If not cross compiling, check that we can run a simple program.
3860if test "$cross_compiling" != yes; then
3861 if { ac_try='./$ac_file'
3862 { { case "(($ac_try" in
3863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3864 *) ac_try_echo=$ac_try;;
3865esac
3866eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3867$as_echo "$ac_try_echo"; } >&5
3868 (eval "$ac_try") 2>&5
3869 ac_status=$?
3870 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3871 test $ac_status = 0; }; }; then
3872 cross_compiling=no
3873 else
3874 if test "$cross_compiling" = maybe; then
3875 cross_compiling=yes
3876 else
3877 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3878$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3879as_fn_error "cannot run C compiled programs.
3880If you meant to cross compile, use \`--host'.
3881See \`config.log' for more details." "$LINENO" 5; }
3882 fi
3883 fi
3884fi
3885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3886$as_echo "yes" >&6; }
3887
3888rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
3889ac_clean_files=$ac_clean_files_save
3890# Check that the compiler produces executables we can run. If not, either
3891# the compiler is broken, or we cross compile.
3892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3893$as_echo_n "checking whether we are cross compiling... " >&6; }
3894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3895$as_echo "$cross_compiling" >&6; }
3896
3897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3898$as_echo_n "checking for suffix of executables... " >&6; }
3899if { { ac_try="$ac_link"
3900case "(($ac_try" in
3901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3902 *) ac_try_echo=$ac_try;;
3903esac
3904eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3905$as_echo "$ac_try_echo"; } >&5
3906 (eval "$ac_link") 2>&5
3907 ac_status=$?
3908 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3909 test $ac_status = 0; }; then :
3910 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3911# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3912# work properly (i.e., refer to `conftest.exe'), while it won't with
3913# `rm'.
3914for ac_file in conftest.exe conftest 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 | *.o | *.obj ) ;;
3918 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3919 break;;
3920 * ) break;;
3921 esac
3922done
3923else
3924 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3925$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3926as_fn_error "cannot compute suffix of executables: cannot compile and link
3927See \`config.log' for more details." "$LINENO" 5; }
3928fi
3929rm -f conftest$ac_cv_exeext
3930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3931$as_echo "$ac_cv_exeext" >&6; }
3932
3933rm -f conftest.$ac_ext
3934EXEEXT=$ac_cv_exeext
3935ac_exeext=$EXEEXT
3936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3937$as_echo_n "checking for suffix of object files... " >&6; }
3938if test "${ac_cv_objext+set}" = set; then :
3939 $as_echo_n "(cached) " >&6
3940else
3941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3942/* end confdefs.h. */
3943
3944int
3945main ()
3946{
3947
3948 ;
3949 return 0;
3950}
3951_ACEOF
3952rm -f conftest.o conftest.obj
3953if { { ac_try="$ac_compile"
3954case "(($ac_try" in
3955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3956 *) ac_try_echo=$ac_try;;
3957esac
3958eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3959$as_echo "$ac_try_echo"; } >&5
3960 (eval "$ac_compile") 2>&5
3961 ac_status=$?
3962 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3963 test $ac_status = 0; }; then :
3964 for ac_file in conftest.o conftest.obj conftest.*; do
3965 test -f "$ac_file" || continue;
3966 case $ac_file in
3967 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3968 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3969 break;;
3970 esac
3971done
3972else
3973 $as_echo "$as_me: failed program was:" >&5
3974sed 's/^/| /' conftest.$ac_ext >&5
3975
3976{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3977$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3978as_fn_error "cannot compute suffix of object files: cannot compile
3979See \`config.log' for more details." "$LINENO" 5; }
3980fi
3981rm -f conftest.$ac_cv_objext conftest.$ac_ext
3982fi
3983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3984$as_echo "$ac_cv_objext" >&6; }
3985OBJEXT=$ac_cv_objext
3986ac_objext=$OBJEXT
3987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3988$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3989if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3990 $as_echo_n "(cached) " >&6
3991else
3992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3993/* end confdefs.h. */
3994
3995int
3996main ()
3997{
3998#ifndef __GNUC__
3999 choke me
4000#endif
4001
4002 ;
4003 return 0;
4004}
4005_ACEOF
4006if ac_fn_c_try_compile "$LINENO"; then :
4007 ac_compiler_gnu=yes
4008else
4009 ac_compiler_gnu=no
4010fi
4011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4012ac_cv_c_compiler_gnu=$ac_compiler_gnu
4013
4014fi
4015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4016$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4017if test $ac_compiler_gnu = yes; then
4018 GCC=yes
4019else
4020 GCC=
4021fi
4022ac_test_CFLAGS=${CFLAGS+set}
4023ac_save_CFLAGS=$CFLAGS
4024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4025$as_echo_n "checking whether $CC accepts -g... " >&6; }
4026if test "${ac_cv_prog_cc_g+set}" = set; then :
4027 $as_echo_n "(cached) " >&6
4028else
4029 ac_save_c_werror_flag=$ac_c_werror_flag
4030 ac_c_werror_flag=yes
4031 ac_cv_prog_cc_g=no
4032 CFLAGS="-g"
4033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4034/* end confdefs.h. */
4035
4036int
4037main ()
4038{
4039
4040 ;
4041 return 0;
4042}
4043_ACEOF
4044if ac_fn_c_try_compile "$LINENO"; then :
4045 ac_cv_prog_cc_g=yes
4046else
4047 CFLAGS=""
4048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4049/* end confdefs.h. */
4050
4051int
4052main ()
4053{
4054
4055 ;
4056 return 0;
4057}
4058_ACEOF
4059if ac_fn_c_try_compile "$LINENO"; then :
4060
4061else
4062 ac_c_werror_flag=$ac_save_c_werror_flag
4063 CFLAGS="-g"
4064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4065/* end confdefs.h. */
4066
4067int
4068main ()
4069{
4070
4071 ;
4072 return 0;
4073}
4074_ACEOF
4075if ac_fn_c_try_compile "$LINENO"; then :
4076 ac_cv_prog_cc_g=yes
4077fi
4078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4079fi
4080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4081fi
4082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4083 ac_c_werror_flag=$ac_save_c_werror_flag
4084fi
4085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4086$as_echo "$ac_cv_prog_cc_g" >&6; }
4087if test "$ac_test_CFLAGS" = set; then
4088 CFLAGS=$ac_save_CFLAGS
4089elif test $ac_cv_prog_cc_g = yes; then
4090 if test "$GCC" = yes; then
4091 CFLAGS="-g -O2"
4092 else
4093 CFLAGS="-g"
4094 fi
4095else
4096 if test "$GCC" = yes; then
4097 CFLAGS="-O2"
4098 else
4099 CFLAGS=
4100 fi
4101fi
4102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4103$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4104if test "${ac_cv_prog_cc_c89+set}" = set; then :
4105 $as_echo_n "(cached) " >&6
4106else
4107 ac_cv_prog_cc_c89=no
4108ac_save_CC=$CC
4109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4110/* end confdefs.h. */
4111#include <stdarg.h>
4112#include <stdio.h>
4113#include <sys/types.h>
4114#include <sys/stat.h>
4115/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4116struct buf { int x; };
4117FILE * (*rcsopen) (struct buf *, struct stat *, int);
4118static char *e (p, i)
4119 char **p;
4120 int i;
4121{
4122 return p[i];
4123}
4124static char *f (char * (*g) (char **, int), char **p, ...)
4125{
4126 char *s;
4127 va_list v;
4128 va_start (v,p);
4129 s = g (p, va_arg (v,int));
4130 va_end (v);
4131 return s;
4132}
4133
4134/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4135 function prototypes and stuff, but not '\xHH' hex character constants.
4136 These don't provoke an error unfortunately, instead are silently treated
4137 as 'x'. The following induces an error, until -std is added to get
4138 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4139 array size at least. It's necessary to write '\x00'==0 to get something
4140 that's true only with -std. */
4141int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4142
4143/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4144 inside strings and character constants. */
4145#define FOO(x) 'x'
4146int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4147
4148int test (int i, double x);
4149struct s1 {int (*f) (int a);};
4150struct s2 {int (*f) (double a);};
4151int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4152int argc;
4153char **argv;
4154int
4155main ()
4156{
4157return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4158 ;
4159 return 0;
4160}
4161_ACEOF
4162for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4163 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4164do
4165 CC="$ac_save_CC $ac_arg"
4166 if ac_fn_c_try_compile "$LINENO"; then :
4167 ac_cv_prog_cc_c89=$ac_arg
4168fi
4169rm -f core conftest.err conftest.$ac_objext
4170 test "x$ac_cv_prog_cc_c89" != "xno" && break
4171done
4172rm -f conftest.$ac_ext
4173CC=$ac_save_CC
4174
4175fi
4176# AC_CACHE_VAL
4177case "x$ac_cv_prog_cc_c89" in
4178 x)
4179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4180$as_echo "none needed" >&6; } ;;
4181 xno)
4182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4183$as_echo "unsupported" >&6; } ;;
4184 *)
4185 CC="$CC $ac_cv_prog_cc_c89"
4186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4187$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4188esac
4189if test "x$ac_cv_prog_cc_c89" != xno; then :
4190
4191fi
4192
4193ac_ext=c
4194ac_cpp='$CPP $CPPFLAGS'
4195ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4196ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4197ac_compiler_gnu=$ac_cv_c_compiler_gnu
4198
c971b7fa
PA
4199
4200ac_ext=c
4201ac_cpp='$CPP $CPPFLAGS'
4202ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4203ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4204ac_compiler_gnu=$ac_cv_c_compiler_gnu
4205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4206$as_echo_n "checking how to run the C preprocessor... " >&6; }
4207# On Suns, sometimes $CPP names a directory.
4208if test -n "$CPP" && test -d "$CPP"; then
4209 CPP=
4210fi
4211if test -z "$CPP"; then
4212 if test "${ac_cv_prog_CPP+set}" = set; then :
4213 $as_echo_n "(cached) " >&6
4214else
4215 # Double quotes because CPP needs to be expanded
4216 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4217 do
4218 ac_preproc_ok=false
4219for ac_c_preproc_warn_flag in '' yes
4220do
4221 # Use a header file that comes with gcc, so configuring glibc
4222 # with a fresh cross-compiler works.
4223 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4224 # <limits.h> exists even on freestanding compilers.
4225 # On the NeXT, cc -E runs the code through the compiler's parser,
4226 # not just through cpp. "Syntax error" is here to catch this case.
4227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4228/* end confdefs.h. */
4229#ifdef __STDC__
4230# include <limits.h>
4231#else
4232# include <assert.h>
4233#endif
4234 Syntax error
4235_ACEOF
4236if ac_fn_c_try_cpp "$LINENO"; then :
4237
4238else
4239 # Broken: fails on valid input.
4240continue
4241fi
4242rm -f conftest.err conftest.$ac_ext
4243
4244 # OK, works on sane cases. Now check whether nonexistent headers
4245 # can be detected and how.
4246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4247/* end confdefs.h. */
4248#include <ac_nonexistent.h>
4249_ACEOF
4250if ac_fn_c_try_cpp "$LINENO"; then :
4251 # Broken: success on invalid input.
4252continue
4253else
4254 # Passes both tests.
4255ac_preproc_ok=:
4256break
4257fi
4258rm -f conftest.err conftest.$ac_ext
4259
4260done
4261# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4262rm -f conftest.err conftest.$ac_ext
4263if $ac_preproc_ok; then :
4264 break
4265fi
4266
4267 done
4268 ac_cv_prog_CPP=$CPP
4269
4270fi
4271 CPP=$ac_cv_prog_CPP
4272else
4273 ac_cv_prog_CPP=$CPP
4274fi
4275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4276$as_echo "$CPP" >&6; }
4277ac_preproc_ok=false
4278for ac_c_preproc_warn_flag in '' yes
4279do
4280 # Use a header file that comes with gcc, so configuring glibc
4281 # with a fresh cross-compiler works.
4282 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4283 # <limits.h> exists even on freestanding compilers.
4284 # On the NeXT, cc -E runs the code through the compiler's parser,
4285 # not just through cpp. "Syntax error" is here to catch this case.
4286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4287/* end confdefs.h. */
4288#ifdef __STDC__
4289# include <limits.h>
4290#else
4291# include <assert.h>
4292#endif
4293 Syntax error
4294_ACEOF
4295if ac_fn_c_try_cpp "$LINENO"; then :
4296
4297else
4298 # Broken: fails on valid input.
4299continue
4300fi
4301rm -f conftest.err conftest.$ac_ext
4302
4303 # OK, works on sane cases. Now check whether nonexistent headers
4304 # can be detected and how.
4305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4306/* end confdefs.h. */
4307#include <ac_nonexistent.h>
4308_ACEOF
4309if ac_fn_c_try_cpp "$LINENO"; then :
4310 # Broken: success on invalid input.
4311continue
4312else
4313 # Passes both tests.
4314ac_preproc_ok=:
4315break
4316fi
4317rm -f conftest.err conftest.$ac_ext
4318
4319done
4320# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4321rm -f conftest.err conftest.$ac_ext
4322if $ac_preproc_ok; then :
4323
4324else
4325 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4326$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4327as_fn_error "C preprocessor \"$CPP\" fails sanity check
4328See \`config.log' for more details." "$LINENO" 5; }
4329fi
4330
4331ac_ext=c
4332ac_cpp='$CPP $CPPFLAGS'
4333ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4334ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4335ac_compiler_gnu=$ac_cv_c_compiler_gnu
4336
4337
4338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4339$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4340if test "${ac_cv_path_GREP+set}" = set; then :
4341 $as_echo_n "(cached) " >&6
4342else
4343 if test -z "$GREP"; then
4344 ac_path_GREP_found=false
4345 # Loop through the user's path and test for each of PROGNAME-LIST
4346 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4347for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4348do
4349 IFS=$as_save_IFS
4350 test -z "$as_dir" && as_dir=.
4351 for ac_prog in grep ggrep; do
4352 for ac_exec_ext in '' $ac_executable_extensions; do
4353 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4354 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4355# Check for GNU ac_path_GREP and select it if it is found.
4356 # Check for GNU $ac_path_GREP
4357case `"$ac_path_GREP" --version 2>&1` in
4358*GNU*)
4359 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4360*)
4361 ac_count=0
4362 $as_echo_n 0123456789 >"conftest.in"
4363 while :
4364 do
4365 cat "conftest.in" "conftest.in" >"conftest.tmp"
4366 mv "conftest.tmp" "conftest.in"
4367 cp "conftest.in" "conftest.nl"
4368 $as_echo 'GREP' >> "conftest.nl"
4369 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4370 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4371 as_fn_arith $ac_count + 1 && ac_count=$as_val
4372 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4373 # Best one so far, save it but keep looking for a better one
4374 ac_cv_path_GREP="$ac_path_GREP"
4375 ac_path_GREP_max=$ac_count
4376 fi
4377 # 10*(2^10) chars as input seems more than enough
4378 test $ac_count -gt 10 && break
4379 done
4380 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4381esac
4382
4383 $ac_path_GREP_found && break 3
4384 done
4385 done
4386 done
4387IFS=$as_save_IFS
4388 if test -z "$ac_cv_path_GREP"; then
4389 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4390 fi
4391else
4392 ac_cv_path_GREP=$GREP
4393fi
4394
4395fi
4396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4397$as_echo "$ac_cv_path_GREP" >&6; }
4398 GREP="$ac_cv_path_GREP"
4399
4400
4401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4402$as_echo_n "checking for egrep... " >&6; }
4403if test "${ac_cv_path_EGREP+set}" = set; then :
4404 $as_echo_n "(cached) " >&6
4405else
4406 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4407 then ac_cv_path_EGREP="$GREP -E"
4408 else
4409 if test -z "$EGREP"; then
4410 ac_path_EGREP_found=false
4411 # Loop through the user's path and test for each of PROGNAME-LIST
4412 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4413for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4414do
4415 IFS=$as_save_IFS
4416 test -z "$as_dir" && as_dir=.
4417 for ac_prog in egrep; do
4418 for ac_exec_ext in '' $ac_executable_extensions; do
4419 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4420 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4421# Check for GNU ac_path_EGREP and select it if it is found.
4422 # Check for GNU $ac_path_EGREP
4423case `"$ac_path_EGREP" --version 2>&1` in
4424*GNU*)
4425 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4426*)
4427 ac_count=0
4428 $as_echo_n 0123456789 >"conftest.in"
4429 while :
4430 do
4431 cat "conftest.in" "conftest.in" >"conftest.tmp"
4432 mv "conftest.tmp" "conftest.in"
4433 cp "conftest.in" "conftest.nl"
4434 $as_echo 'EGREP' >> "conftest.nl"
4435 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4436 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4437 as_fn_arith $ac_count + 1 && ac_count=$as_val
4438 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4439 # Best one so far, save it but keep looking for a better one
4440 ac_cv_path_EGREP="$ac_path_EGREP"
4441 ac_path_EGREP_max=$ac_count
4442 fi
4443 # 10*(2^10) chars as input seems more than enough
4444 test $ac_count -gt 10 && break
4445 done
4446 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4447esac
4448
4449 $ac_path_EGREP_found && break 3
4450 done
4451 done
4452 done
4453IFS=$as_save_IFS
4454 if test -z "$ac_cv_path_EGREP"; then
4455 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4456 fi
4457else
4458 ac_cv_path_EGREP=$EGREP
4459fi
4460
4461 fi
4462fi
4463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4464$as_echo "$ac_cv_path_EGREP" >&6; }
4465 EGREP="$ac_cv_path_EGREP"
4466
4467
4468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4469$as_echo_n "checking for ANSI C header files... " >&6; }
4470if test "${ac_cv_header_stdc+set}" = set; then :
4471 $as_echo_n "(cached) " >&6
4472else
4473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4474/* end confdefs.h. */
4475#include <stdlib.h>
4476#include <stdarg.h>
4477#include <string.h>
4478#include <float.h>
4479
4480int
4481main ()
4482{
4483
4484 ;
4485 return 0;
4486}
4487_ACEOF
4488if ac_fn_c_try_compile "$LINENO"; then :
4489 ac_cv_header_stdc=yes
4490else
4491 ac_cv_header_stdc=no
4492fi
4493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4494
4495if test $ac_cv_header_stdc = yes; then
4496 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4498/* end confdefs.h. */
4499#include <string.h>
4500
4501_ACEOF
4502if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4503 $EGREP "memchr" >/dev/null 2>&1; then :
4504
4505else
4506 ac_cv_header_stdc=no
4507fi
4508rm -f conftest*
4509
4510fi
4511
4512if test $ac_cv_header_stdc = yes; then
4513 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4515/* end confdefs.h. */
4516#include <stdlib.h>
4517
4518_ACEOF
4519if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4520 $EGREP "free" >/dev/null 2>&1; then :
4521
4522else
4523 ac_cv_header_stdc=no
4524fi
4525rm -f conftest*
4526
4527fi
4528
4529if test $ac_cv_header_stdc = yes; then
4530 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4531 if test "$cross_compiling" = yes; then :
4532 :
4533else
4534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4535/* end confdefs.h. */
4536#include <ctype.h>
4537#include <stdlib.h>
4538#if ((' ' & 0x0FF) == 0x020)
4539# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4540# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4541#else
4542# define ISLOWER(c) \
4543 (('a' <= (c) && (c) <= 'i') \
4544 || ('j' <= (c) && (c) <= 'r') \
4545 || ('s' <= (c) && (c) <= 'z'))
4546# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4547#endif
4548
4549#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4550int
4551main ()
4552{
4553 int i;
4554 for (i = 0; i < 256; i++)
4555 if (XOR (islower (i), ISLOWER (i))
4556 || toupper (i) != TOUPPER (i))
4557 return 2;
4558 return 0;
4559}
4560_ACEOF
4561if ac_fn_c_try_run "$LINENO"; then :
4562
4563else
4564 ac_cv_header_stdc=no
4565fi
4566rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4567 conftest.$ac_objext conftest.beam conftest.$ac_ext
4568fi
4569
4570fi
4571fi
4572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4573$as_echo "$ac_cv_header_stdc" >&6; }
4574if test $ac_cv_header_stdc = yes; then
4575
4576$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4577
4578fi
4579
4580# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4581for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4582 inttypes.h stdint.h unistd.h
4583do :
4584 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4585ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4586"
4587eval as_val=\$$as_ac_Header
4588 if test "x$as_val" = x""yes; then :
4589 cat >>confdefs.h <<_ACEOF
4590#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4591_ACEOF
4592
4593fi
4594
4595done
4596
4597
4598
c971b7fa
PA
4599 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4600if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4601 MINIX=yes
4602else
4603 MINIX=
4604fi
4605
4606
4607 if test "$MINIX" = yes; then
4608
4609$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4610
4611
4612$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4613
4614
4615$as_echo "#define _MINIX 1" >>confdefs.h
4616
c971b7fa 4617
4a626d0a 4618$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
c971b7fa 4619
4a626d0a 4620 fi
c971b7fa
PA
4621
4622
4623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4624$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4625if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4626 $as_echo_n "(cached) " >&6
4627else
4628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4629/* end confdefs.h. */
4630
4631# define __EXTENSIONS__ 1
4632 $ac_includes_default
4633int
4634main ()
4635{
4636
4637 ;
4638 return 0;
4639}
4640_ACEOF
4641if ac_fn_c_try_compile "$LINENO"; then :
4642 ac_cv_safe_to_define___extensions__=yes
4643else
4644 ac_cv_safe_to_define___extensions__=no
4645fi
4646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4647fi
4648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4649$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4650 test $ac_cv_safe_to_define___extensions__ = yes &&
4651 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4652
4653 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4654
4655 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
4656
4657 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4658
4659 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4660
49e4877c
PA
4661 $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
4662
4663 $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
4664
4665 $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
4666
4667 $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
4668
4669 $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
4670
4671 $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
4672
4673 $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
4674
c971b7fa
PA
4675 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4676
4a626d0a
PA
4677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
4678$as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
4679if test "${ac_cv_should_define__xopen_source+set}" = set; then :
4680 $as_echo_n "(cached) " >&6
4681else
4682 ac_cv_should_define__xopen_source=no
4683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4684/* end confdefs.h. */
4685
4686 #include <wchar.h>
4687 mbstate_t x;
4688int
4689main ()
4690{
4691
4692 ;
4693 return 0;
4694}
4695_ACEOF
4696if ac_fn_c_try_compile "$LINENO"; then :
4697
4698else
4699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4700/* end confdefs.h. */
4701
4702 #define _XOPEN_SOURCE 500
4703 #include <wchar.h>
4704 mbstate_t x;
4705int
4706main ()
4707{
4708
4709 ;
4710 return 0;
4711}
4712_ACEOF
4713if ac_fn_c_try_compile "$LINENO"; then :
4714 ac_cv_should_define__xopen_source=yes
4715fi
4716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4717fi
4718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4719fi
4720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
4721$as_echo "$ac_cv_should_define__xopen_source" >&6; }
4722 test $ac_cv_should_define__xopen_source = yes &&
4723 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
4724
c971b7fa
PA
4725
4726
4727
49e4877c
PA
4728
4729
4730
4731
4732
4733
4734
c971b7fa
PA
4735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
4736$as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
4737if test "${gl_cv_c_amsterdam_compiler+set}" = set; then :
4738 $as_echo_n "(cached) " >&6
4739else
4740
4741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4742/* end confdefs.h. */
4743
4744#ifdef __ACK__
4745Amsterdam
4746#endif
4747
4748_ACEOF
4749if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4750 $EGREP "Amsterdam" >/dev/null 2>&1; then :
4751 gl_cv_c_amsterdam_compiler=yes
4752else
4753 gl_cv_c_amsterdam_compiler=no
4754fi
4755rm -f conftest*
4756
4757
4758fi
4759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
4760$as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
49e4877c
PA
4761
4762 if test $gl_cv_c_amsterdam_compiler = yes; then
4763 if test -z "$AR"; then
c971b7fa 4764 AR='cc -c.a'
49e4877c
PA
4765 fi
4766 if test -z "$ARFLAGS"; then
4767 ARFLAGS='-o'
4768 fi
4769 else
4770 :
4771 fi
4772
4773 if test -n "$ac_tool_prefix"; then
c971b7fa
PA
4774 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4775set dummy ${ac_tool_prefix}ar; ac_word=$2
4776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4777$as_echo_n "checking for $ac_word... " >&6; }
4778if test "${ac_cv_prog_AR+set}" = set; then :
4779 $as_echo_n "(cached) " >&6
4780else
4781 if test -n "$AR"; then
4782 ac_cv_prog_AR="$AR" # Let the user override the test.
4783else
4784as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4785for as_dir in $PATH
4786do
4787 IFS=$as_save_IFS
4788 test -z "$as_dir" && as_dir=.
4789 for ac_exec_ext in '' $ac_executable_extensions; do
4790 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4791 ac_cv_prog_AR="${ac_tool_prefix}ar"
4792 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4793 break 2
4794 fi
4795done
4796 done
4797IFS=$as_save_IFS
4798
4799fi
4800fi
4801AR=$ac_cv_prog_AR
4802if test -n "$AR"; then
4803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
4804$as_echo "$AR" >&6; }
4805else
4806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4807$as_echo "no" >&6; }
4808fi
4809
4810
4811fi
4812if test -z "$ac_cv_prog_AR"; then
4813 ac_ct_AR=$AR
4814 # Extract the first word of "ar", so it can be a program name with args.
4815set dummy ar; ac_word=$2
4816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4817$as_echo_n "checking for $ac_word... " >&6; }
4818if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
4819 $as_echo_n "(cached) " >&6
4820else
4821 if test -n "$ac_ct_AR"; then
4822 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4823else
4824as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4825for as_dir in $PATH
4826do
4827 IFS=$as_save_IFS
4828 test -z "$as_dir" && as_dir=.
4829 for ac_exec_ext in '' $ac_executable_extensions; do
4830 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4831 ac_cv_prog_ac_ct_AR="ar"
4832 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4833 break 2
4834 fi
4835done
4836 done
4837IFS=$as_save_IFS
4838
4839fi
4840fi
4841ac_ct_AR=$ac_cv_prog_ac_ct_AR
4842if test -n "$ac_ct_AR"; then
4843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
4844$as_echo "$ac_ct_AR" >&6; }
4845else
4846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4847$as_echo "no" >&6; }
4848fi
4849
4850 if test "x$ac_ct_AR" = x; then
4851 AR="ar"
4852 else
4853 case $cross_compiling:$ac_tool_warned in
4854yes:)
4855{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4856$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4857ac_tool_warned=yes ;;
4858esac
4859 AR=$ac_ct_AR
4860 fi
4861else
4862 AR="$ac_cv_prog_AR"
4863fi
4864
49e4877c
PA
4865 if test -z "$ARFLAGS"; then
4866 ARFLAGS='cr'
c971b7fa
PA
4867 fi
4868
4869
49e4877c 4870
c971b7fa
PA
4871 if test -z "$RANLIB"; then
4872 if test $gl_cv_c_amsterdam_compiler = yes; then
4873 RANLIB=':'
4874 else
4875 if test -n "$ac_tool_prefix"; then
4876 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4877set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4879$as_echo_n "checking for $ac_word... " >&6; }
4880if test "${ac_cv_prog_RANLIB+set}" = set; then :
4881 $as_echo_n "(cached) " >&6
4882else
4883 if test -n "$RANLIB"; then
4884 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4885else
4886as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4887for as_dir in $PATH
4888do
4889 IFS=$as_save_IFS
4890 test -z "$as_dir" && as_dir=.
4891 for ac_exec_ext in '' $ac_executable_extensions; do
4892 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4893 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4894 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4895 break 2
4896 fi
4897done
4898 done
4899IFS=$as_save_IFS
4900
4901fi
4902fi
4903RANLIB=$ac_cv_prog_RANLIB
4904if test -n "$RANLIB"; then
4905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4906$as_echo "$RANLIB" >&6; }
4907else
4908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4909$as_echo "no" >&6; }
4910fi
4911
4912
4913fi
4914if test -z "$ac_cv_prog_RANLIB"; then
4915 ac_ct_RANLIB=$RANLIB
4916 # Extract the first word of "ranlib", so it can be a program name with args.
4917set dummy ranlib; ac_word=$2
4918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4919$as_echo_n "checking for $ac_word... " >&6; }
4920if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4921 $as_echo_n "(cached) " >&6
4922else
4923 if test -n "$ac_ct_RANLIB"; then
4924 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4925else
4926as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4927for as_dir in $PATH
4928do
4929 IFS=$as_save_IFS
4930 test -z "$as_dir" && as_dir=.
4931 for ac_exec_ext in '' $ac_executable_extensions; do
4932 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4933 ac_cv_prog_ac_ct_RANLIB="ranlib"
4934 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4935 break 2
4936 fi
4937done
4938 done
4939IFS=$as_save_IFS
4940
4941fi
4942fi
4943ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4944if test -n "$ac_ct_RANLIB"; then
4945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4946$as_echo "$ac_ct_RANLIB" >&6; }
4947else
4948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4949$as_echo "no" >&6; }
4950fi
4951
4952 if test "x$ac_ct_RANLIB" = x; then
4953 RANLIB=":"
4954 else
4955 case $cross_compiling:$ac_tool_warned in
4956yes:)
4957{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4958$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4959ac_tool_warned=yes ;;
4960esac
4961 RANLIB=$ac_ct_RANLIB
4962 fi
4963else
4964 RANLIB="$ac_cv_prog_RANLIB"
4965fi
4966
4967 fi
4968 fi
4969
4970
4a626d0a
PA
4971ac_aux_dir=
4972for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4973 for ac_t in install-sh install.sh shtool; do
4974 if test -f "$ac_dir/$ac_t"; then
4975 ac_aux_dir=$ac_dir
4976 ac_install_sh="$ac_aux_dir/$ac_t -c"
4977 break 2
4978 fi
4979 done
4980done
4981if test -z "$ac_aux_dir"; then
4982 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4983fi
4984
4985# These three variables are undocumented and unsupported,
4986# and are intended to be withdrawn in a future Autoconf release.
4987# They can cause serious problems if a builder's source tree is in a directory
4988# whose full name contains unusual characters.
4989ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4990ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4991ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4992
4993
4994# Make sure we can run config.sub.
4995$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4996 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4997
4998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4999$as_echo_n "checking build system type... " >&6; }
5000if test "${ac_cv_build+set}" = set; then :
5001 $as_echo_n "(cached) " >&6
5002else
5003 ac_build_alias=$build_alias
5004test "x$ac_build_alias" = x &&
5005 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5006test "x$ac_build_alias" = x &&
5007 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
5008ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
5009 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
5010
5011fi
5012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5013$as_echo "$ac_cv_build" >&6; }
5014case $ac_cv_build in
5015*-*-*) ;;
5016*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
5017esac
5018build=$ac_cv_build
5019ac_save_IFS=$IFS; IFS='-'
5020set x $ac_cv_build
5021shift
5022build_cpu=$1
5023build_vendor=$2
5024shift; shift
5025# Remember, the first character of IFS is used to create $*,
5026# except with old shells:
5027build_os=$*
5028IFS=$ac_save_IFS
5029case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5030
5031
5032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5033$as_echo_n "checking host system type... " >&6; }
5034if test "${ac_cv_host+set}" = set; then :
5035 $as_echo_n "(cached) " >&6
5036else
5037 if test "x$host_alias" = x; then
5038 ac_cv_host=$ac_cv_build
5039else
5040 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
5041 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
5042fi
5043
5044fi
5045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5046$as_echo "$ac_cv_host" >&6; }
5047case $ac_cv_host in
5048*-*-*) ;;
5049*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
5050esac
5051host=$ac_cv_host
5052ac_save_IFS=$IFS; IFS='-'
5053set x $ac_cv_host
5054shift
5055host_cpu=$1
5056host_vendor=$2
5057shift; shift
5058# Remember, the first character of IFS is used to create $*,
5059# except with old shells:
5060host_os=$*
5061IFS=$ac_save_IFS
5062case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5063
5064
c971b7fa
PA
5065
5066
88b48903
WN
5067
5068 # IEEE behaviour is the default on all CPUs except Alpha and SH
5069 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
5070 # and the GCC 4.1.2 manual).
5071 case "$host_cpu" in
5072 alpha*)
5073 # On Alpha systems, a compiler option provides the behaviour.
5074 # See the ieee(3) manual page, also available at
5075 # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
5076 if test -n "$GCC"; then
5077 # GCC has the option -mieee.
5078 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
5079 CPPFLAGS="$CPPFLAGS -mieee"
5080 else
5081 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
5082 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
5083 CPPFLAGS="$CPPFLAGS -ieee"
5084 fi
5085 ;;
5086 sh*)
5087 if test -n "$GCC"; then
5088 # GCC has the option -mieee.
5089 CPPFLAGS="$CPPFLAGS -mieee"
5090 fi
5091 ;;
5092 esac
5093
2196f55f
YQ
5094# Check whether --enable-largefile was given.
5095if test "${enable_largefile+set}" = set; then :
5096 enableval=$enable_largefile;
5097fi
5098
5099if test "$enable_largefile" != no; then
5100
5101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5102$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5103if test "${ac_cv_sys_largefile_CC+set}" = set; then :
5104 $as_echo_n "(cached) " >&6
5105else
5106 ac_cv_sys_largefile_CC=no
5107 if test "$GCC" != yes; then
5108 ac_save_CC=$CC
5109 while :; do
5110 # IRIX 6.2 and later do not support large files by default,
5111 # so use the C compiler's -n32 option if that helps.
5112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5113/* end confdefs.h. */
5114#include <sys/types.h>
5115 /* Check that off_t can represent 2**63 - 1 correctly.
5116 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5117 since some C++ compilers masquerading as C compilers
5118 incorrectly reject 9223372036854775807. */
5119#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5120 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5121 && LARGE_OFF_T % 2147483647 == 1)
5122 ? 1 : -1];
5123int
5124main ()
5125{
5126
5127 ;
5128 return 0;
5129}
5130_ACEOF
5131 if ac_fn_c_try_compile "$LINENO"; then :
5132 break
5133fi
5134rm -f core conftest.err conftest.$ac_objext
5135 CC="$CC -n32"
5136 if ac_fn_c_try_compile "$LINENO"; then :
5137 ac_cv_sys_largefile_CC=' -n32'; break
5138fi
5139rm -f core conftest.err conftest.$ac_objext
5140 break
5141 done
5142 CC=$ac_save_CC
5143 rm -f conftest.$ac_ext
5144 fi
5145fi
5146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5147$as_echo "$ac_cv_sys_largefile_CC" >&6; }
5148 if test "$ac_cv_sys_largefile_CC" != no; then
5149 CC=$CC$ac_cv_sys_largefile_CC
5150 fi
5151
5152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5153$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5154if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
5155 $as_echo_n "(cached) " >&6
5156else
5157 while :; do
5158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5159/* end confdefs.h. */
5160#include <sys/types.h>
5161 /* Check that off_t can represent 2**63 - 1 correctly.
5162 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5163 since some C++ compilers masquerading as C compilers
5164 incorrectly reject 9223372036854775807. */
5165#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5166 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5167 && LARGE_OFF_T % 2147483647 == 1)
5168 ? 1 : -1];
5169int
5170main ()
5171{
5172
5173 ;
5174 return 0;
5175}
5176_ACEOF
5177if ac_fn_c_try_compile "$LINENO"; then :
5178 ac_cv_sys_file_offset_bits=no; break
5179fi
5180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5182/* end confdefs.h. */
5183#define _FILE_OFFSET_BITS 64
5184#include <sys/types.h>
5185 /* Check that off_t can represent 2**63 - 1 correctly.
5186 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5187 since some C++ compilers masquerading as C compilers
5188 incorrectly reject 9223372036854775807. */
5189#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5190 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5191 && LARGE_OFF_T % 2147483647 == 1)
5192 ? 1 : -1];
5193int
5194main ()
5195{
5196
5197 ;
5198 return 0;
5199}
5200_ACEOF
5201if ac_fn_c_try_compile "$LINENO"; then :
5202 ac_cv_sys_file_offset_bits=64; break
5203fi
5204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5205 ac_cv_sys_file_offset_bits=unknown
5206 break
5207done
5208fi
5209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5210$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5211case $ac_cv_sys_file_offset_bits in #(
5212 no | unknown) ;;
5213 *)
5214cat >>confdefs.h <<_ACEOF
5215#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5216_ACEOF
5217;;
5218esac
5219rm -rf conftest*
5220 if test $ac_cv_sys_file_offset_bits = unknown; then
5221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5222$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5223if test "${ac_cv_sys_large_files+set}" = set; then :
5224 $as_echo_n "(cached) " >&6
5225else
5226 while :; do
5227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5228/* end confdefs.h. */
5229#include <sys/types.h>
5230 /* Check that off_t can represent 2**63 - 1 correctly.
5231 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5232 since some C++ compilers masquerading as C compilers
5233 incorrectly reject 9223372036854775807. */
5234#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5235 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5236 && LARGE_OFF_T % 2147483647 == 1)
5237 ? 1 : -1];
5238int
5239main ()
5240{
5241
5242 ;
5243 return 0;
5244}
5245_ACEOF
5246if ac_fn_c_try_compile "$LINENO"; then :
5247 ac_cv_sys_large_files=no; break
5248fi
5249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5251/* end confdefs.h. */
5252#define _LARGE_FILES 1
5253#include <sys/types.h>
5254 /* Check that off_t can represent 2**63 - 1 correctly.
5255 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5256 since some C++ compilers masquerading as C compilers
5257 incorrectly reject 9223372036854775807. */
5258#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5259 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5260 && LARGE_OFF_T % 2147483647 == 1)
5261 ? 1 : -1];
5262int
5263main ()
5264{
5265
5266 ;
5267 return 0;
5268}
5269_ACEOF
5270if ac_fn_c_try_compile "$LINENO"; then :
5271 ac_cv_sys_large_files=1; break
5272fi
5273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5274 ac_cv_sys_large_files=unknown
5275 break
5276done
5277fi
5278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5279$as_echo "$ac_cv_sys_large_files" >&6; }
5280case $ac_cv_sys_large_files in #(
5281 no | unknown) ;;
5282 *)
5283cat >>confdefs.h <<_ACEOF
5284#define _LARGE_FILES $ac_cv_sys_large_files
5285_ACEOF
5286;;
5287esac
5288rm -rf conftest*
5289 fi
5290
5291
4a626d0a
PA
5292$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
5293
2196f55f
YQ
5294fi
5295
88b48903
WN
5296
5297
49e4877c
PA
5298 # Pre-early section.
5299
5300
5301
4a626d0a 5302 # Code from module absolute-header:
8690e634
JK
5303 # Code from module alloca:
5304 # Code from module alloca-opt:
98399780 5305 # Code from module canonicalize-lgpl:
6a29c58e 5306 # Code from module chdir:
8690e634 5307 # Code from module configmake:
e26b6bb0 5308 # Code from module dirent:
18848e28 5309 # Code from module dirfd:
6a29c58e 5310 # Code from module dirname-lgpl:
2196f55f 5311 # Code from module dosname:
6a29c58e 5312 # Code from module double-slash-root:
18848e28 5313 # Code from module errno:
c971b7fa 5314 # Code from module extensions:
a512b375 5315 # Code from module extern-inline:
49e4877c 5316 # Code from module flexmember:
88b48903 5317 # Code from module float:
8690e634
JK
5318 # Code from module fnmatch:
5319 # Code from module fnmatch-gnu:
88b48903
WN
5320 # Code from module fpieee:
5321
5322 # Code from module fpucw:
5323 # Code from module frexp:
5324 # Code from module frexpl:
4a626d0a 5325 # Code from module gettimeofday:
49e4877c 5326 # Code from module hard-locale:
c971b7fa
PA
5327 # Code from module include_next:
5328 # Code from module inttypes:
5329 # Code from module inttypes-incomplete:
88b48903
WN
5330 # Code from module isnand-nolibm:
5331 # Code from module isnanl-nolibm:
2196f55f
YQ
5332 # Code from module largefile:
5333
49e4877c 5334 # Code from module limits-h:
8690e634 5335 # Code from module localcharset:
f45c62c4 5336 # Code from module lstat:
6a29c58e 5337 # Code from module malloc-posix:
98399780 5338 # Code from module malloca:
88b48903 5339 # Code from module math:
8690e634
JK
5340 # Code from module mbrtowc:
5341 # Code from module mbsinit:
5342 # Code from module mbsrtowcs:
c971b7fa
PA
5343 # Code from module memchr:
5344 # Code from module memmem:
5345 # Code from module memmem-simple:
5346 # Code from module multiarch:
98399780 5347 # Code from module nocrash:
38ec2207 5348 # Code from module pathmax:
8424cc97 5349 # Code from module rawmemchr:
2196f55f 5350 # Code from module readlink:
6a29c58e
YQ
5351 # Code from module rename:
5352 # Code from module rmdir:
5353 # Code from module same-inode:
0750520d 5354 # Code from module signal-h:
98399780 5355 # Code from module snippet/_Noreturn:
c971b7fa
PA
5356 # Code from module snippet/arg-nonnull:
5357 # Code from module snippet/c++defs:
5358 # Code from module snippet/warn-on-use:
8839a007 5359 # Code from module ssize_t:
2196f55f 5360 # Code from module stat:
8690e634 5361 # Code from module stdbool:
c971b7fa
PA
5362 # Code from module stddef:
5363 # Code from module stdint:
6a29c58e 5364 # Code from module stdio:
98399780 5365 # Code from module stdlib:
8424cc97 5366 # Code from module strchrnul:
8690e634 5367 # Code from module streq:
c971b7fa 5368 # Code from module string:
8690e634 5369 # Code from module strnlen1:
63ce7108
TT
5370 # Code from module strstr:
5371 # Code from module strstr-simple:
421693b0 5372 # Code from module strtok_r:
09607c9e 5373 # Code from module sys_stat:
4a626d0a 5374 # Code from module sys_time:
8839a007 5375 # Code from module sys_types:
09607c9e 5376 # Code from module time:
8839a007 5377 # Code from module unistd:
c971b7fa 5378 # Code from module update-copyright:
8690e634
JK
5379 # Code from module verify:
5380 # Code from module wchar:
5381 # Code from module wctype-h:
c971b7fa
PA
5382
5383ac_ext=c
5384ac_cpp='$CPP $CPPFLAGS'
5385ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5386ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5387ac_compiler_gnu=$ac_cv_c_compiler_gnu
5388if test -n "$ac_tool_prefix"; then
5389 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5390set dummy ${ac_tool_prefix}gcc; ac_word=$2
5391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5392$as_echo_n "checking for $ac_word... " >&6; }
5393if test "${ac_cv_prog_CC+set}" = set; then :
5394 $as_echo_n "(cached) " >&6
5395else
5396 if test -n "$CC"; then
5397 ac_cv_prog_CC="$CC" # Let the user override the test.
5398else
5399as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5400for as_dir in $PATH
5401do
5402 IFS=$as_save_IFS
5403 test -z "$as_dir" && as_dir=.
5404 for ac_exec_ext in '' $ac_executable_extensions; do
5405 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5406 ac_cv_prog_CC="${ac_tool_prefix}gcc"
5407 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5408 break 2
5409 fi
5410done
5411 done
5412IFS=$as_save_IFS
5413
5414fi
5415fi
5416CC=$ac_cv_prog_CC
5417if test -n "$CC"; then
5418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5419$as_echo "$CC" >&6; }
5420else
5421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5422$as_echo "no" >&6; }
5423fi
5424
5425
5426fi
5427if test -z "$ac_cv_prog_CC"; then
5428 ac_ct_CC=$CC
5429 # Extract the first word of "gcc", so it can be a program name with args.
5430set dummy gcc; ac_word=$2
5431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5432$as_echo_n "checking for $ac_word... " >&6; }
5433if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5434 $as_echo_n "(cached) " >&6
5435else
5436 if test -n "$ac_ct_CC"; then
5437 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5438else
5439as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5440for as_dir in $PATH
5441do
5442 IFS=$as_save_IFS
5443 test -z "$as_dir" && as_dir=.
5444 for ac_exec_ext in '' $ac_executable_extensions; do
5445 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5446 ac_cv_prog_ac_ct_CC="gcc"
5447 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5448 break 2
5449 fi
5450done
5451 done
5452IFS=$as_save_IFS
5453
5454fi
5455fi
5456ac_ct_CC=$ac_cv_prog_ac_ct_CC
5457if test -n "$ac_ct_CC"; then
5458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5459$as_echo "$ac_ct_CC" >&6; }
5460else
5461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5462$as_echo "no" >&6; }
5463fi
5464
5465 if test "x$ac_ct_CC" = x; then
5466 CC=""
5467 else
5468 case $cross_compiling:$ac_tool_warned in
5469yes:)
5470{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5471$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5472ac_tool_warned=yes ;;
5473esac
5474 CC=$ac_ct_CC
5475 fi
5476else
5477 CC="$ac_cv_prog_CC"
5478fi
5479
5480if test -z "$CC"; then
5481 if test -n "$ac_tool_prefix"; then
5482 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5483set dummy ${ac_tool_prefix}cc; ac_word=$2
5484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5485$as_echo_n "checking for $ac_word... " >&6; }
5486if test "${ac_cv_prog_CC+set}" = set; then :
5487 $as_echo_n "(cached) " >&6
5488else
5489 if test -n "$CC"; then
5490 ac_cv_prog_CC="$CC" # Let the user override the test.
5491else
5492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5493for as_dir in $PATH
5494do
5495 IFS=$as_save_IFS
5496 test -z "$as_dir" && as_dir=.
5497 for ac_exec_ext in '' $ac_executable_extensions; do
5498 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5499 ac_cv_prog_CC="${ac_tool_prefix}cc"
5500 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5501 break 2
5502 fi
5503done
5504 done
5505IFS=$as_save_IFS
5506
5507fi
5508fi
5509CC=$ac_cv_prog_CC
5510if test -n "$CC"; then
5511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5512$as_echo "$CC" >&6; }
5513else
5514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5515$as_echo "no" >&6; }
5516fi
5517
5518
5519 fi
5520fi
5521if test -z "$CC"; then
5522 # Extract the first word of "cc", so it can be a program name with args.
5523set dummy cc; ac_word=$2
5524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5525$as_echo_n "checking for $ac_word... " >&6; }
5526if test "${ac_cv_prog_CC+set}" = set; then :
5527 $as_echo_n "(cached) " >&6
5528else
5529 if test -n "$CC"; then
5530 ac_cv_prog_CC="$CC" # Let the user override the test.
5531else
5532 ac_prog_rejected=no
5533as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5534for as_dir in $PATH
5535do
5536 IFS=$as_save_IFS
5537 test -z "$as_dir" && as_dir=.
5538 for ac_exec_ext in '' $ac_executable_extensions; do
5539 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5540 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5541 ac_prog_rejected=yes
5542 continue
5543 fi
5544 ac_cv_prog_CC="cc"
5545 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5546 break 2
5547 fi
5548done
5549 done
5550IFS=$as_save_IFS
5551
5552if test $ac_prog_rejected = yes; then
5553 # We found a bogon in the path, so make sure we never use it.
5554 set dummy $ac_cv_prog_CC
5555 shift
5556 if test $# != 0; then
5557 # We chose a different compiler from the bogus one.
5558 # However, it has the same basename, so the bogon will be chosen
5559 # first if we set CC to just the basename; use the full file name.
5560 shift
5561 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
5562 fi
5563fi
5564fi
5565fi
5566CC=$ac_cv_prog_CC
5567if test -n "$CC"; then
5568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5569$as_echo "$CC" >&6; }
5570else
5571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5572$as_echo "no" >&6; }
5573fi
5574
5575
5576fi
5577if test -z "$CC"; then
5578 if test -n "$ac_tool_prefix"; then
5579 for ac_prog in cl.exe
5580 do
5581 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5582set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5584$as_echo_n "checking for $ac_word... " >&6; }
5585if test "${ac_cv_prog_CC+set}" = set; then :
5586 $as_echo_n "(cached) " >&6
5587else
5588 if test -n "$CC"; then
5589 ac_cv_prog_CC="$CC" # Let the user override the test.
5590else
5591as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5592for as_dir in $PATH
5593do
5594 IFS=$as_save_IFS
5595 test -z "$as_dir" && as_dir=.
5596 for ac_exec_ext in '' $ac_executable_extensions; do
5597 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5598 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5599 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5600 break 2
5601 fi
5602done
5603 done
5604IFS=$as_save_IFS
5605
5606fi
5607fi
5608CC=$ac_cv_prog_CC
5609if test -n "$CC"; then
5610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5611$as_echo "$CC" >&6; }
5612else
5613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5614$as_echo "no" >&6; }
5615fi
5616
5617
5618 test -n "$CC" && break
5619 done
5620fi
5621if test -z "$CC"; then
5622 ac_ct_CC=$CC
5623 for ac_prog in cl.exe
5624do
5625 # Extract the first word of "$ac_prog", so it can be a program name with args.
5626set dummy $ac_prog; ac_word=$2
5627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5628$as_echo_n "checking for $ac_word... " >&6; }
5629if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5630 $as_echo_n "(cached) " >&6
5631else
5632 if test -n "$ac_ct_CC"; then
5633 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5634else
5635as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5636for as_dir in $PATH
5637do
5638 IFS=$as_save_IFS
5639 test -z "$as_dir" && as_dir=.
5640 for ac_exec_ext in '' $ac_executable_extensions; do
5641 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5642 ac_cv_prog_ac_ct_CC="$ac_prog"
5643 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5644 break 2
5645 fi
5646done
5647 done
5648IFS=$as_save_IFS
5649
5650fi
5651fi
5652ac_ct_CC=$ac_cv_prog_ac_ct_CC
5653if test -n "$ac_ct_CC"; then
5654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5655$as_echo "$ac_ct_CC" >&6; }
5656else
5657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5658$as_echo "no" >&6; }
5659fi
5660
5661
5662 test -n "$ac_ct_CC" && break
5663done
5664
5665 if test "x$ac_ct_CC" = x; then
5666 CC=""
5667 else
5668 case $cross_compiling:$ac_tool_warned in
5669yes:)
5670{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5671$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5672ac_tool_warned=yes ;;
5673esac
5674 CC=$ac_ct_CC
5675 fi
5676fi
5677
5678fi
5679
5680
5681test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5682$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5683as_fn_error "no acceptable C compiler found in \$PATH
5684See \`config.log' for more details." "$LINENO" 5; }
5685
5686# Provide some information about the compiler.
5687$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5688set X $ac_compile
5689ac_compiler=$2
5690for ac_option in --version -v -V -qversion; do
5691 { { ac_try="$ac_compiler $ac_option >&5"
5692case "(($ac_try" in
5693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5694 *) ac_try_echo=$ac_try;;
5695esac
5696eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5697$as_echo "$ac_try_echo"; } >&5
5698 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5699 ac_status=$?
5700 if test -s conftest.err; then
5701 sed '10a\
5702... rest of stderr output deleted ...
5703 10q' conftest.err >conftest.er1
5704 cat conftest.er1 >&5
5705 rm -f conftest.er1 conftest.err
5706 fi
5707 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5708 test $ac_status = 0; }
5709done
5710
5711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5712$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
5713if test "${ac_cv_c_compiler_gnu+set}" = set; then :
5714 $as_echo_n "(cached) " >&6
5715else
5716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5717/* end confdefs.h. */
5718
5719int
5720main ()
5721{
5722#ifndef __GNUC__
5723 choke me
5724#endif
5725
5726 ;
5727 return 0;
5728}
5729_ACEOF
5730if ac_fn_c_try_compile "$LINENO"; then :
5731 ac_compiler_gnu=yes
5732else
5733 ac_compiler_gnu=no
5734fi
5735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5736ac_cv_c_compiler_gnu=$ac_compiler_gnu
5737
5738fi
5739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5740$as_echo "$ac_cv_c_compiler_gnu" >&6; }
5741if test $ac_compiler_gnu = yes; then
5742 GCC=yes
5743else
5744 GCC=
5745fi
5746ac_test_CFLAGS=${CFLAGS+set}
5747ac_save_CFLAGS=$CFLAGS
5748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5749$as_echo_n "checking whether $CC accepts -g... " >&6; }
5750if test "${ac_cv_prog_cc_g+set}" = set; then :
5751 $as_echo_n "(cached) " >&6
5752else
5753 ac_save_c_werror_flag=$ac_c_werror_flag
5754 ac_c_werror_flag=yes
5755 ac_cv_prog_cc_g=no
5756 CFLAGS="-g"
5757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5758/* end confdefs.h. */
5759
5760int
5761main ()
5762{
5763
5764 ;
5765 return 0;
5766}
5767_ACEOF
5768if ac_fn_c_try_compile "$LINENO"; then :
5769 ac_cv_prog_cc_g=yes
5770else
5771 CFLAGS=""
5772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5773/* end confdefs.h. */
5774
5775int
5776main ()
5777{
5778
5779 ;
5780 return 0;
5781}
5782_ACEOF
5783if ac_fn_c_try_compile "$LINENO"; then :
5784
5785else
5786 ac_c_werror_flag=$ac_save_c_werror_flag
5787 CFLAGS="-g"
5788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5789/* end confdefs.h. */
5790
5791int
5792main ()
5793{
5794
5795 ;
5796 return 0;
5797}
5798_ACEOF
5799if ac_fn_c_try_compile "$LINENO"; then :
5800 ac_cv_prog_cc_g=yes
5801fi
5802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5803fi
5804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5805fi
5806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5807 ac_c_werror_flag=$ac_save_c_werror_flag
5808fi
5809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5810$as_echo "$ac_cv_prog_cc_g" >&6; }
5811if test "$ac_test_CFLAGS" = set; then
5812 CFLAGS=$ac_save_CFLAGS
5813elif test $ac_cv_prog_cc_g = yes; then
5814 if test "$GCC" = yes; then
5815 CFLAGS="-g -O2"
5816 else
5817 CFLAGS="-g"
5818 fi
5819else
5820 if test "$GCC" = yes; then
5821 CFLAGS="-O2"
5822 else
5823 CFLAGS=
5824 fi
5825fi
5826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5827$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5828if test "${ac_cv_prog_cc_c89+set}" = set; then :
5829 $as_echo_n "(cached) " >&6
5830else
5831 ac_cv_prog_cc_c89=no
5832ac_save_CC=$CC
5833cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5834/* end confdefs.h. */
5835#include <stdarg.h>
5836#include <stdio.h>
5837#include <sys/types.h>
5838#include <sys/stat.h>
5839/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5840struct buf { int x; };
5841FILE * (*rcsopen) (struct buf *, struct stat *, int);
5842static char *e (p, i)
5843 char **p;
5844 int i;
5845{
5846 return p[i];
5847}
5848static char *f (char * (*g) (char **, int), char **p, ...)
5849{
5850 char *s;
5851 va_list v;
5852 va_start (v,p);
5853 s = g (p, va_arg (v,int));
5854 va_end (v);
5855 return s;
5856}
5857
5858/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5859 function prototypes and stuff, but not '\xHH' hex character constants.
5860 These don't provoke an error unfortunately, instead are silently treated
5861 as 'x'. The following induces an error, until -std is added to get
5862 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5863 array size at least. It's necessary to write '\x00'==0 to get something
5864 that's true only with -std. */
5865int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5866
5867/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5868 inside strings and character constants. */
5869#define FOO(x) 'x'
5870int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5871
5872int test (int i, double x);
5873struct s1 {int (*f) (int a);};
5874struct s2 {int (*f) (double a);};
5875int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5876int argc;
5877char **argv;
5878int
5879main ()
5880{
5881return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5882 ;
5883 return 0;
5884}
5885_ACEOF
5886for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5887 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5888do
5889 CC="$ac_save_CC $ac_arg"
5890 if ac_fn_c_try_compile "$LINENO"; then :
5891 ac_cv_prog_cc_c89=$ac_arg
5892fi
5893rm -f core conftest.err conftest.$ac_objext
5894 test "x$ac_cv_prog_cc_c89" != "xno" && break
5895done
5896rm -f conftest.$ac_ext
5897CC=$ac_save_CC
5898
5899fi
5900# AC_CACHE_VAL
5901case "x$ac_cv_prog_cc_c89" in
5902 x)
5903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5904$as_echo "none needed" >&6; } ;;
5905 xno)
5906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5907$as_echo "unsupported" >&6; } ;;
5908 *)
5909 CC="$CC $ac_cv_prog_cc_c89"
5910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5911$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5912esac
5913if test "x$ac_cv_prog_cc_c89" != xno; then :
5914
5915fi
5916
5917ac_ext=c
5918ac_cpp='$CPP $CPPFLAGS'
5919ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5920ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5921ac_compiler_gnu=$ac_cv_c_compiler_gnu
5922
5923
5924am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
5925
5926
5927ac_aux_dir=
5928for ac_dir in ../.. "$srcdir"/../..; do
5929 for ac_t in install-sh install.sh shtool; do
5930 if test -f "$ac_dir/$ac_t"; then
5931 ac_aux_dir=$ac_dir
5932 ac_install_sh="$ac_aux_dir/$ac_t -c"
5933 break 2
5934 fi
5935 done
5936done
5937if test -z "$ac_aux_dir"; then
5938 as_fn_error "cannot find install-sh, install.sh, or shtool in ../.. \"$srcdir\"/../.." "$LINENO" 5
5939fi
5940
5941# These three variables are undocumented and unsupported,
5942# and are intended to be withdrawn in a future Autoconf release.
5943# They can cause serious problems if a builder's source tree is in a directory
5944# whose full name contains unusual characters.
5945ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5946ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5947ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5948
5949
5950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
5951$as_echo_n "checking target system type... " >&6; }
5952if test "${ac_cv_target+set}" = set; then :
5953 $as_echo_n "(cached) " >&6
5954else
5955 if test "x$target_alias" = x; then
5956 ac_cv_target=$ac_cv_host
5957else
5958 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
5959 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
5960fi
5961
5962fi
5963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
5964$as_echo "$ac_cv_target" >&6; }
5965case $ac_cv_target in
5966*-*-*) ;;
5967*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
5968esac
5969target=$ac_cv_target
5970ac_save_IFS=$IFS; IFS='-'
5971set x $ac_cv_target
5972shift
5973target_cpu=$1
5974target_vendor=$2
5975shift; shift
5976# Remember, the first character of IFS is used to create $*,
5977# except with old shells:
5978target_os=$*
5979IFS=$ac_save_IFS
5980case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
5981
5982
5983# The aliases save the names the user supplied, while $host etc.
5984# will get canonicalized.
5985test -n "$target_alias" &&
5986 test "$program_prefix$program_suffix$program_transform_name" = \
5987 NONENONEs,x,x, &&
5988 program_prefix=${target_alias}-
5989
5990
5991
5992
5993
5994
5995
5996 LIBC_FATAL_STDERR_=1
5997 export LIBC_FATAL_STDERR_
5998
8690e634
JK
5999# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6000# for constant arguments. Useless!
6001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
6002$as_echo_n "checking for working alloca.h... " >&6; }
6003if test "${ac_cv_working_alloca_h+set}" = set; then :
c971b7fa
PA
6004 $as_echo_n "(cached) " >&6
6005else
8690e634 6006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 6007/* end confdefs.h. */
8690e634 6008#include <alloca.h>
c971b7fa
PA
6009int
6010main ()
6011{
8690e634
JK
6012char *p = (char *) alloca (2 * sizeof (int));
6013 if (p) return 0;
c971b7fa
PA
6014 ;
6015 return 0;
6016}
c971b7fa
PA
6017_ACEOF
6018if ac_fn_c_try_link "$LINENO"; then :
8690e634 6019 ac_cv_working_alloca_h=yes
c971b7fa 6020else
8690e634 6021 ac_cv_working_alloca_h=no
c971b7fa
PA
6022fi
6023rm -f core conftest.err conftest.$ac_objext \
6024 conftest$ac_exeext conftest.$ac_ext
c971b7fa 6025fi
8690e634
JK
6026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
6027$as_echo "$ac_cv_working_alloca_h" >&6; }
6028if test $ac_cv_working_alloca_h = yes; then
c971b7fa 6029
8690e634 6030$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c971b7fa 6031
8690e634 6032fi
c971b7fa 6033
8690e634
JK
6034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
6035$as_echo_n "checking for alloca... " >&6; }
6036if test "${ac_cv_func_alloca_works+set}" = set; then :
c971b7fa 6037 $as_echo_n "(cached) " >&6
c971b7fa
PA
6038else
6039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6040/* end confdefs.h. */
8690e634
JK
6041#ifdef __GNUC__
6042# define alloca __builtin_alloca
6043#else
6044# ifdef _MSC_VER
6045# include <malloc.h>
6046# define alloca _alloca
6047# else
6048# ifdef HAVE_ALLOCA_H
6049# include <alloca.h>
6050# else
6051# ifdef _AIX
6052 #pragma alloca
6053# else
6054# ifndef alloca /* predefined by HP cc +Olibcalls */
6055char *alloca ();
6056# endif
6057# endif
6058# endif
6059# endif
6060#endif
6061
c971b7fa
PA
6062int
6063main ()
6064{
8690e634
JK
6065char *p = (char *) alloca (1);
6066 if (p) return 0;
c971b7fa
PA
6067 ;
6068 return 0;
6069}
6070_ACEOF
8690e634
JK
6071if ac_fn_c_try_link "$LINENO"; then :
6072 ac_cv_func_alloca_works=yes
c971b7fa 6073else
8690e634 6074 ac_cv_func_alloca_works=no
c971b7fa 6075fi
8690e634
JK
6076rm -f core conftest.err conftest.$ac_objext \
6077 conftest$ac_exeext conftest.$ac_ext
c971b7fa 6078fi
a143c6de
JB
6079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
6080$as_echo "$ac_cv_func_alloca_works" >&6; }
c971b7fa 6081
a143c6de 6082if test $ac_cv_func_alloca_works = yes; then
c971b7fa 6083
a143c6de 6084$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c971b7fa 6085
a143c6de
JB
6086else
6087 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6088# that cause trouble. Some versions do not even contain alloca or
6089# contain a buggy version. If you still want to use their alloca,
6090# use ar to extract alloca.o from them instead of compiling alloca.c.
c971b7fa
PA
6091
6092
6093
6094
6095
a143c6de 6096ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
c971b7fa 6097
a143c6de 6098$as_echo "#define C_ALLOCA 1" >>confdefs.h
c971b7fa 6099
c971b7fa 6100
a143c6de
JB
6101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'alloca.c' needs Cray hooks" >&5
6102$as_echo_n "checking whether 'alloca.c' needs Cray hooks... " >&6; }
6103if test "${ac_cv_os_cray+set}" = set; then :
8690e634
JK
6104 $as_echo_n "(cached) " >&6
6105else
a143c6de 6106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 6107/* end confdefs.h. */
a143c6de
JB
6108#if defined CRAY && ! defined CRAY2
6109webecray
6110#else
6111wenotbecray
8690e634 6112#endif
c971b7fa 6113
8690e634
JK
6114_ACEOF
6115if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
a143c6de
JB
6116 $EGREP "webecray" >/dev/null 2>&1; then :
6117 ac_cv_os_cray=yes
8690e634 6118else
a143c6de 6119 ac_cv_os_cray=no
8690e634
JK
6120fi
6121rm -f conftest*
c971b7fa 6122
c0fc7f8b 6123fi
a143c6de
JB
6124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
6125$as_echo "$ac_cv_os_cray" >&6; }
6126if test $ac_cv_os_cray = yes; then
6127 for ac_func in _getb67 GETB67 getb67; do
6128 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6129ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6130eval as_val=\$$as_ac_var
6131 if test "x$as_val" = x""yes; then :
c0fc7f8b 6132
a143c6de
JB
6133cat >>confdefs.h <<_ACEOF
6134#define CRAY_STACKSEG_END $ac_func
6135_ACEOF
c971b7fa 6136
a143c6de 6137 break
8690e634 6138fi
c971b7fa 6139
a143c6de 6140 done
8690e634 6141fi
c0fc7f8b 6142
a143c6de
JB
6143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
6144$as_echo_n "checking stack direction for C alloca... " >&6; }
6145if test "${ac_cv_c_stack_direction+set}" = set; then :
c971b7fa
PA
6146 $as_echo_n "(cached) " >&6
6147else
a143c6de
JB
6148 if test "$cross_compiling" = yes; then :
6149 ac_cv_c_stack_direction=0
6150else
6151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 6152/* end confdefs.h. */
a143c6de
JB
6153$ac_includes_default
6154int
6155find_stack_direction (int *addr, int depth)
6156{
6157 int dir, dummy = 0;
6158 if (! addr)
6159 addr = &dummy;
6160 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
6161 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
6162 return dir + dummy;
6163}
8690e634 6164
a143c6de
JB
6165int
6166main (int argc, char **argv)
6167{
6168 return find_stack_direction (0, argc + !argv + 20) < 0;
6169}
c971b7fa 6170_ACEOF
a143c6de
JB
6171if ac_fn_c_try_run "$LINENO"; then :
6172 ac_cv_c_stack_direction=1
c971b7fa 6173else
a143c6de 6174 ac_cv_c_stack_direction=-1
8690e634 6175fi
a143c6de
JB
6176rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6177 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 6178fi
c971b7fa
PA
6179
6180fi
a143c6de
JB
6181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
6182$as_echo "$ac_cv_c_stack_direction" >&6; }
6183cat >>confdefs.h <<_ACEOF
6184#define STACK_DIRECTION $ac_cv_c_stack_direction
6185_ACEOF
8690e634 6186
c971b7fa
PA
6187
6188fi
c971b7fa
PA
6189
6190
98399780
YQ
6191 GNULIB__EXIT=0;
6192 GNULIB_ATOLL=0;
6193 GNULIB_CALLOC_POSIX=0;
6194 GNULIB_CANONICALIZE_FILE_NAME=0;
6195 GNULIB_GETLOADAVG=0;
6196 GNULIB_GETSUBOPT=0;
6197 GNULIB_GRANTPT=0;
6198 GNULIB_MALLOC_POSIX=0;
6199 GNULIB_MBTOWC=0;
6200 GNULIB_MKDTEMP=0;
6201 GNULIB_MKOSTEMP=0;
6202 GNULIB_MKOSTEMPS=0;
6203 GNULIB_MKSTEMP=0;
6204 GNULIB_MKSTEMPS=0;
6205 GNULIB_POSIX_OPENPT=0;
6206 GNULIB_PTSNAME=0;
6207 GNULIB_PTSNAME_R=0;
6208 GNULIB_PUTENV=0;
4a626d0a 6209 GNULIB_QSORT_R=0;
98399780
YQ
6210 GNULIB_RANDOM=0;
6211 GNULIB_RANDOM_R=0;
6212 GNULIB_REALLOC_POSIX=0;
6213 GNULIB_REALPATH=0;
6214 GNULIB_RPMATCH=0;
4a626d0a 6215 GNULIB_SECURE_GETENV=0;
98399780
YQ
6216 GNULIB_SETENV=0;
6217 GNULIB_STRTOD=0;
6218 GNULIB_STRTOLL=0;
6219 GNULIB_STRTOULL=0;
6220 GNULIB_SYSTEM_POSIX=0;
6221 GNULIB_UNLOCKPT=0;
6222 GNULIB_UNSETENV=0;
6223 GNULIB_WCTOMB=0;
6224 HAVE__EXIT=1;
6225 HAVE_ATOLL=1;
6226 HAVE_CANONICALIZE_FILE_NAME=1;
6227 HAVE_DECL_GETLOADAVG=1;
6228 HAVE_GETSUBOPT=1;
6229 HAVE_GRANTPT=1;
6230 HAVE_MKDTEMP=1;
6231 HAVE_MKOSTEMP=1;
6232 HAVE_MKOSTEMPS=1;
6233 HAVE_MKSTEMP=1;
6234 HAVE_MKSTEMPS=1;
6235 HAVE_POSIX_OPENPT=1;
6236 HAVE_PTSNAME=1;
6237 HAVE_PTSNAME_R=1;
6238 HAVE_RANDOM=1;
6239 HAVE_RANDOM_H=1;
6240 HAVE_RANDOM_R=1;
6241 HAVE_REALPATH=1;
6242 HAVE_RPMATCH=1;
4a626d0a 6243 HAVE_SECURE_GETENV=1;
98399780
YQ
6244 HAVE_SETENV=1;
6245 HAVE_DECL_SETENV=1;
6246 HAVE_STRTOD=1;
6247 HAVE_STRTOLL=1;
6248 HAVE_STRTOULL=1;
6249 HAVE_STRUCT_RANDOM_DATA=1;
6250 HAVE_SYS_LOADAVG_H=0;
6251 HAVE_UNLOCKPT=1;
6252 HAVE_DECL_UNSETENV=1;
6253 REPLACE_CALLOC=0;
6254 REPLACE_CANONICALIZE_FILE_NAME=0;
6255 REPLACE_MALLOC=0;
6256 REPLACE_MBTOWC=0;
6257 REPLACE_MKSTEMP=0;
6258 REPLACE_PTSNAME=0;
6259 REPLACE_PTSNAME_R=0;
6260 REPLACE_PUTENV=0;
4a626d0a 6261 REPLACE_QSORT_R=0;
98399780
YQ
6262 REPLACE_RANDOM_R=0;
6263 REPLACE_REALLOC=0;
6264 REPLACE_REALPATH=0;
6265 REPLACE_SETENV=0;
6266 REPLACE_STRTOD=0;
6267 REPLACE_UNSETENV=0;
6268 REPLACE_WCTOMB=0;
6269
6270
6271
6272
6273 for ac_func in $ac_func_list
6274do :
6275 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6276ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6277eval as_val=\$$as_ac_var
6278 if test "x$as_val" = x""yes; then :
6279 cat >>confdefs.h <<_ACEOF
6280#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6281_ACEOF
6282
6283fi
6284done
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
6295$as_echo_n "checking whether // is distinct from /... " >&6; }
6296if test "${gl_cv_double_slash_root+set}" = set; then :
6297 $as_echo_n "(cached) " >&6
6298else
6299 if test x"$cross_compiling" = xyes ; then
6300 # When cross-compiling, there is no way to tell whether // is special
6301 # short of a list of hosts. However, the only known hosts to date
6302 # that have a distinct // are Apollo DomainOS (too old to port to),
6303 # Cygwin, and z/OS. If anyone knows of another system for which // has
6304 # special semantics and is distinct from /, please report it to
6305 # <bug-gnulib@gnu.org>.
6306 case $host in
6307 *-cygwin | i370-ibm-openedition)
6308 gl_cv_double_slash_root=yes ;;
6309 *)
6310 # Be optimistic and assume that / and // are the same when we
6311 # don't know.
6312 gl_cv_double_slash_root='unknown, assuming no' ;;
6313 esac
6314 else
6315 set x `ls -di / // 2>/dev/null`
6316 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
6317 gl_cv_double_slash_root=no
6318 else
6319 gl_cv_double_slash_root=yes
6320 fi
6321 fi
6322fi
6323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
6324$as_echo "$gl_cv_double_slash_root" >&6; }
6325 if test "$gl_cv_double_slash_root" = yes; then
6326
6327$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
6328
6329 fi
6330
6331
6332
6333
6334
6335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
6336$as_echo_n "checking whether realpath works... " >&6; }
6337if test "${gl_cv_func_realpath_works+set}" = set; then :
6338 $as_echo_n "(cached) " >&6
6339else
6340
6341 touch conftest.a
6342 mkdir conftest.d
6343 if test "$cross_compiling" = yes; then :
6344 case "$host_os" in
6345 # Guess yes on glibc systems.
6346 *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
6347 # If we don't know, assume the worst.
6348 *) gl_cv_func_realpath_works="guessing no" ;;
6349 esac
6350
6351else
6352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6353/* end confdefs.h. */
6354
6355
6356
6357#include <stdlib.h>
6358#if defined __MACH__ && defined __APPLE__
6359/* Avoid a crash on Mac OS X. */
6360#include <mach/mach.h>
6361#include <mach/mach_error.h>
6362#include <mach/thread_status.h>
6363#include <mach/exception.h>
6364#include <mach/task.h>
6365#include <pthread.h>
6366/* The exception port on which our thread listens. */
6367static mach_port_t our_exception_port;
6368/* The main function of the thread listening for exceptions of type
6369 EXC_BAD_ACCESS. */
6370static void *
6371mach_exception_thread (void *arg)
6372{
6373 /* Buffer for a message to be received. */
6374 struct {
6375 mach_msg_header_t head;
6376 mach_msg_body_t msgh_body;
6377 char data[1024];
6378 } msg;
6379 mach_msg_return_t retval;
6380 /* Wait for a message on the exception port. */
6381 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
6382 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
6383 if (retval != MACH_MSG_SUCCESS)
6384 abort ();
6385 exit (1);
6386}
6387static void
6388nocrash_init (void)
6389{
6390 mach_port_t self = mach_task_self ();
6391 /* Allocate a port on which the thread shall listen for exceptions. */
6392 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
6393 == KERN_SUCCESS) {
6394 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
6395 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
6396 MACH_MSG_TYPE_MAKE_SEND)
6397 == KERN_SUCCESS) {
6398 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
6399 for us. */
6400 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
6401 /* Create the thread listening on the exception port. */
6402 pthread_attr_t attr;
6403 pthread_t thread;
6404 if (pthread_attr_init (&attr) == 0
6405 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
6406 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
6407 pthread_attr_destroy (&attr);
6408 /* Replace the exception port info for these exceptions with our own.
6409 Note that we replace the exception port for the entire task, not only
6410 for a particular thread. This has the effect that when our exception
6411 port gets the message, the thread specific exception port has already
6412 been asked, and we don't need to bother about it.
6413 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
6414 task_set_exception_ports (self, mask, our_exception_port,
6415 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
6416 }
6417 }
6418 }
6419}
6420#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6421/* Avoid a crash on native Windows. */
6422#define WIN32_LEAN_AND_MEAN
6423#include <windows.h>
6424#include <winerror.h>
6425static LONG WINAPI
6426exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
6427{
6428 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
6429 {
6430 case EXCEPTION_ACCESS_VIOLATION:
6431 case EXCEPTION_IN_PAGE_ERROR:
6432 case EXCEPTION_STACK_OVERFLOW:
6433 case EXCEPTION_GUARD_PAGE:
6434 case EXCEPTION_PRIV_INSTRUCTION:
6435 case EXCEPTION_ILLEGAL_INSTRUCTION:
6436 case EXCEPTION_DATATYPE_MISALIGNMENT:
6437 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
6438 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
6439 exit (1);
6440 }
6441 return EXCEPTION_CONTINUE_SEARCH;
6442}
6443static void
6444nocrash_init (void)
6445{
6446 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
6447}
6448#else
6449/* Avoid a crash on POSIX systems. */
6450#include <signal.h>
49e4877c 6451#include <unistd.h>
98399780
YQ
6452/* A POSIX signal handler. */
6453static void
6454exception_handler (int sig)
6455{
49e4877c 6456 _exit (1);
98399780
YQ
6457}
6458static void
6459nocrash_init (void)
6460{
6461#ifdef SIGSEGV
6462 signal (SIGSEGV, exception_handler);
6463#endif
6464#ifdef SIGBUS
6465 signal (SIGBUS, exception_handler);
6466#endif
6467}
6468#endif
6469
6470 #include <stdlib.h>
6471 #include <string.h>
6472
6473int
6474main ()
6475{
6476
6477 int result = 0;
6478 {
6479 char *name = realpath ("conftest.a", NULL);
6480 if (!(name && *name == '/'))
6481 result |= 1;
49e4877c 6482 free (name);
98399780
YQ
6483 }
6484 {
6485 char *name = realpath ("conftest.b/../conftest.a", NULL);
6486 if (name != NULL)
6487 result |= 2;
49e4877c 6488 free (name);
98399780
YQ
6489 }
6490 {
6491 char *name = realpath ("conftest.a/", NULL);
6492 if (name != NULL)
6493 result |= 4;
49e4877c 6494 free (name);
98399780
YQ
6495 }
6496 {
6497 char *name1 = realpath (".", NULL);
6498 char *name2 = realpath ("conftest.d//./..", NULL);
49e4877c 6499 if (! name1 || ! name2 || strcmp (name1, name2))
98399780 6500 result |= 8;
49e4877c
PA
6501 free (name1);
6502 free (name2);
98399780
YQ
6503 }
6504 return result;
6505
6506 ;
6507 return 0;
6508}
6509
6510_ACEOF
6511if ac_fn_c_try_run "$LINENO"; then :
6512 gl_cv_func_realpath_works=yes
6513else
6514 gl_cv_func_realpath_works=no
6515fi
6516rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6517 conftest.$ac_objext conftest.beam conftest.$ac_ext
6518fi
6519
6520 rm -rf conftest.a conftest.d
6521
6522fi
6523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
6524$as_echo "$gl_cv_func_realpath_works" >&6; }
6525 case "$gl_cv_func_realpath_works" in
6526 *yes)
6527
6528$as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
6529
6530 ;;
6531 esac
6532
6533
6534
6535
6536 for ac_header in $ac_header_list
6537do :
6538 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6539ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6540"
6541eval as_val=\$$as_ac_Header
6542 if test "x$as_val" = x""yes; then :
6543 cat >>confdefs.h <<_ACEOF
6544#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6545_ACEOF
6546
6547fi
6548
6549done
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
e26b6bb0
TT
6561 GNULIB_CHDIR=0;
6562 GNULIB_CHOWN=0;
6563 GNULIB_CLOSE=0;
6564 GNULIB_DUP=0;
6565 GNULIB_DUP2=0;
6566 GNULIB_DUP3=0;
6567 GNULIB_ENVIRON=0;
6568 GNULIB_EUIDACCESS=0;
6569 GNULIB_FACCESSAT=0;
6570 GNULIB_FCHDIR=0;
6571 GNULIB_FCHOWNAT=0;
6572 GNULIB_FDATASYNC=0;
6573 GNULIB_FSYNC=0;
6574 GNULIB_FTRUNCATE=0;
6575 GNULIB_GETCWD=0;
6576 GNULIB_GETDOMAINNAME=0;
6577 GNULIB_GETDTABLESIZE=0;
6578 GNULIB_GETGROUPS=0;
6579 GNULIB_GETHOSTNAME=0;
6580 GNULIB_GETLOGIN=0;
6581 GNULIB_GETLOGIN_R=0;
6582 GNULIB_GETPAGESIZE=0;
6583 GNULIB_GETUSERSHELL=0;
6584 GNULIB_GROUP_MEMBER=0;
6585 GNULIB_ISATTY=0;
6586 GNULIB_LCHOWN=0;
6587 GNULIB_LINK=0;
6588 GNULIB_LINKAT=0;
6589 GNULIB_LSEEK=0;
6590 GNULIB_PIPE=0;
6591 GNULIB_PIPE2=0;
6592 GNULIB_PREAD=0;
6593 GNULIB_PWRITE=0;
6594 GNULIB_READ=0;
6595 GNULIB_READLINK=0;
6596 GNULIB_READLINKAT=0;
6597 GNULIB_RMDIR=0;
6598 GNULIB_SETHOSTNAME=0;
6599 GNULIB_SLEEP=0;
6600 GNULIB_SYMLINK=0;
6601 GNULIB_SYMLINKAT=0;
6602 GNULIB_TTYNAME_R=0;
6603 GNULIB_UNISTD_H_NONBLOCKING=0;
6604 GNULIB_UNISTD_H_SIGPIPE=0;
6605 GNULIB_UNLINK=0;
6606 GNULIB_UNLINKAT=0;
6607 GNULIB_USLEEP=0;
6608 GNULIB_WRITE=0;
6609 HAVE_CHOWN=1;
6610 HAVE_DUP2=1;
6611 HAVE_DUP3=1;
6612 HAVE_EUIDACCESS=1;
6613 HAVE_FACCESSAT=1;
6614 HAVE_FCHDIR=1;
6615 HAVE_FCHOWNAT=1;
6616 HAVE_FDATASYNC=1;
6617 HAVE_FSYNC=1;
6618 HAVE_FTRUNCATE=1;
6619 HAVE_GETDTABLESIZE=1;
6620 HAVE_GETGROUPS=1;
6621 HAVE_GETHOSTNAME=1;
6622 HAVE_GETLOGIN=1;
6623 HAVE_GETPAGESIZE=1;
6624 HAVE_GROUP_MEMBER=1;
6625 HAVE_LCHOWN=1;
6626 HAVE_LINK=1;
6627 HAVE_LINKAT=1;
6628 HAVE_PIPE=1;
6629 HAVE_PIPE2=1;
6630 HAVE_PREAD=1;
6631 HAVE_PWRITE=1;
6632 HAVE_READLINK=1;
6633 HAVE_READLINKAT=1;
6634 HAVE_SETHOSTNAME=1;
6635 HAVE_SLEEP=1;
6636 HAVE_SYMLINK=1;
6637 HAVE_SYMLINKAT=1;
6638 HAVE_UNLINKAT=1;
6639 HAVE_USLEEP=1;
6640 HAVE_DECL_ENVIRON=1;
6641 HAVE_DECL_FCHDIR=1;
6642 HAVE_DECL_FDATASYNC=1;
6643 HAVE_DECL_GETDOMAINNAME=1;
6644 HAVE_DECL_GETLOGIN_R=1;
6645 HAVE_DECL_GETPAGESIZE=1;
6646 HAVE_DECL_GETUSERSHELL=1;
6647 HAVE_DECL_SETHOSTNAME=1;
6648 HAVE_DECL_TTYNAME_R=1;
6649 HAVE_OS_H=0;
6650 HAVE_SYS_PARAM_H=0;
6651 REPLACE_CHOWN=0;
6652 REPLACE_CLOSE=0;
6653 REPLACE_DUP=0;
6654 REPLACE_DUP2=0;
6655 REPLACE_FCHOWNAT=0;
6656 REPLACE_FTRUNCATE=0;
6657 REPLACE_GETCWD=0;
6658 REPLACE_GETDOMAINNAME=0;
4a626d0a 6659 REPLACE_GETDTABLESIZE=0;
e26b6bb0
TT
6660 REPLACE_GETLOGIN_R=0;
6661 REPLACE_GETGROUPS=0;
6662 REPLACE_GETPAGESIZE=0;
6663 REPLACE_ISATTY=0;
6664 REPLACE_LCHOWN=0;
6665 REPLACE_LINK=0;
6666 REPLACE_LINKAT=0;
6667 REPLACE_LSEEK=0;
6668 REPLACE_PREAD=0;
6669 REPLACE_PWRITE=0;
6670 REPLACE_READ=0;
6671 REPLACE_READLINK=0;
4a626d0a 6672 REPLACE_READLINKAT=0;
e26b6bb0
TT
6673 REPLACE_RMDIR=0;
6674 REPLACE_SLEEP=0;
6675 REPLACE_SYMLINK=0;
4a626d0a 6676 REPLACE_SYMLINKAT=0;
e26b6bb0
TT
6677 REPLACE_TTYNAME_R=0;
6678 REPLACE_UNLINK=0;
6679 REPLACE_UNLINKAT=0;
6680 REPLACE_USLEEP=0;
6681 REPLACE_WRITE=0;
6682 UNISTD_H_HAVE_WINSOCK2_H=0;
6683 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
6684
6685
6686
6687 GNULIB_OPENDIR=0;
6688 GNULIB_READDIR=0;
6689 GNULIB_REWINDDIR=0;
6690 GNULIB_CLOSEDIR=0;
6691 GNULIB_DIRFD=0;
6692 GNULIB_FDOPENDIR=0;
6693 GNULIB_SCANDIR=0;
6694 GNULIB_ALPHASORT=0;
6695 HAVE_OPENDIR=1;
6696 HAVE_READDIR=1;
6697 HAVE_REWINDDIR=1;
6698 HAVE_CLOSEDIR=1;
6699 HAVE_DECL_DIRFD=1;
6700 HAVE_DECL_FDOPENDIR=1;
6701 HAVE_FDOPENDIR=1;
6702 HAVE_SCANDIR=1;
6703 HAVE_ALPHASORT=1;
6704 REPLACE_OPENDIR=0;
6705 REPLACE_CLOSEDIR=0;
6706 REPLACE_DIRFD=0;
6707 REPLACE_FDOPENDIR=0;
6708
6709
6710
6711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
6712$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
6713if test "${gl_cv_have_include_next+set}" = set; then :
6714 $as_echo_n "(cached) " >&6
6715else
6716 rm -rf conftestd1a conftestd1b conftestd2
6717 mkdir conftestd1a conftestd1b conftestd2
6718 cat <<EOF > conftestd1a/conftest.h
6719#define DEFINED_IN_CONFTESTD1
6720#include_next <conftest.h>
6721#ifdef DEFINED_IN_CONFTESTD2
6722int foo;
6723#else
88b48903
WN
6724#error "include_next doesn't work"
6725#endif
6726EOF
6727 cat <<EOF > conftestd1b/conftest.h
6728#define DEFINED_IN_CONFTESTD1
6729#include <stdio.h>
6730#include_next <conftest.h>
6731#ifdef DEFINED_IN_CONFTESTD2
6732int foo;
6733#else
6734#error "include_next doesn't work"
6735#endif
6736EOF
6737 cat <<EOF > conftestd2/conftest.h
6738#ifndef DEFINED_IN_CONFTESTD1
6739#error "include_next test doesn't work"
6740#endif
6741#define DEFINED_IN_CONFTESTD2
6742EOF
6743 gl_save_CPPFLAGS="$CPPFLAGS"
6744 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
6745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6746/* end confdefs.h. */
6747#include <conftest.h>
6748_ACEOF
6749if ac_fn_c_try_compile "$LINENO"; then :
6750 gl_cv_have_include_next=yes
6751else
6752 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
6753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6754/* end confdefs.h. */
6755#include <conftest.h>
6756_ACEOF
6757if ac_fn_c_try_compile "$LINENO"; then :
6758 gl_cv_have_include_next=buggy
6759else
6760 gl_cv_have_include_next=no
6761fi
6762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6763
6764fi
6765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6766 CPPFLAGS="$gl_save_CPPFLAGS"
6767 rm -rf conftestd1a conftestd1b conftestd2
6768
6769fi
6770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
6771$as_echo "$gl_cv_have_include_next" >&6; }
6772 PRAGMA_SYSTEM_HEADER=
6773 if test $gl_cv_have_include_next = yes; then
6774 INCLUDE_NEXT=include_next
6775 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
6776 if test -n "$GCC"; then
6777 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
6778 fi
6779 else
6780 if test $gl_cv_have_include_next = buggy; then
6781 INCLUDE_NEXT=include
6782 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
6783 else
6784 INCLUDE_NEXT=include
6785 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
6786 fi
6787 fi
6788
6789
6790
6791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
6792$as_echo_n "checking whether system header files limit the line length... " >&6; }
6793if test "${gl_cv_pragma_columns+set}" = set; then :
6794 $as_echo_n "(cached) " >&6
6795else
6796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6797/* end confdefs.h. */
6798
6799#ifdef __TANDEM
6800choke me
6801#endif
6802
6803_ACEOF
6804if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6805 $EGREP "choke me" >/dev/null 2>&1; then :
6806 gl_cv_pragma_columns=yes
6807else
6808 gl_cv_pragma_columns=no
6809fi
6810rm -f conftest*
6811
6812
6813fi
6814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
6815$as_echo "$gl_cv_pragma_columns" >&6; }
6816 if test $gl_cv_pragma_columns = yes; then
6817 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
6818 else
6819 PRAGMA_COLUMNS=
6820 fi
6821
6822
6823
6824
e26b6bb0 6825
e26b6bb0 6826
18848e28
GF
6827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
6828$as_echo_n "checking for complete errno.h... " >&6; }
6829if test "${gl_cv_header_errno_h_complete+set}" = set; then :
6830 $as_echo_n "(cached) " >&6
6831else
6832
6833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6834/* end confdefs.h. */
6835
6836#include <errno.h>
6837#if !defined ETXTBSY
6838booboo
6839#endif
6840#if !defined ENOMSG
6841booboo
6842#endif
6843#if !defined EIDRM
6844booboo
6845#endif
6846#if !defined ENOLINK
6847booboo
6848#endif
6849#if !defined EPROTO
6850booboo
6851#endif
6852#if !defined EMULTIHOP
6853booboo
6854#endif
6855#if !defined EBADMSG
6856booboo
6857#endif
6858#if !defined EOVERFLOW
6859booboo
6860#endif
6861#if !defined ENOTSUP
6862booboo
6863#endif
6864#if !defined ENETRESET
6865booboo
6866#endif
6867#if !defined ECONNABORTED
6868booboo
6869#endif
6870#if !defined ESTALE
6871booboo
6872#endif
6873#if !defined EDQUOT
6874booboo
6875#endif
6876#if !defined ECANCELED
6877booboo
6878#endif
6879#if !defined EOWNERDEAD
6880booboo
6881#endif
6882#if !defined ENOTRECOVERABLE
6883booboo
6884#endif
6885#if !defined EILSEQ
6886booboo
6887#endif
6888
6889_ACEOF
6890if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6891 $EGREP "booboo" >/dev/null 2>&1; then :
6892 gl_cv_header_errno_h_complete=no
6893else
6894 gl_cv_header_errno_h_complete=yes
6895fi
6896rm -f conftest*
6897
6898
6899fi
6900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
6901$as_echo "$gl_cv_header_errno_h_complete" >&6; }
6902 if test $gl_cv_header_errno_h_complete = yes; then
6903 ERRNO_H=''
6904 else
6905
6906
6907
6908
6909
6910
6911
6912
6913 if test $gl_cv_have_include_next = yes; then
6914 gl_cv_next_errno_h='<'errno.h'>'
6915 else
6916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
6917$as_echo_n "checking absolute name of <errno.h>... " >&6; }
6918if test "${gl_cv_next_errno_h+set}" = set; then :
6919 $as_echo_n "(cached) " >&6
6920else
6921
4a626d0a
PA
6922
6923
6924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18848e28
GF
6925/* end confdefs.h. */
6926#include <errno.h>
18848e28 6927_ACEOF
4a626d0a
PA
6928 case "$host_os" in
6929 aix*) gl_absname_cpp="$ac_cpp -C" ;;
6930 *) gl_absname_cpp="$ac_cpp" ;;
6931 esac
18848e28 6932
4a626d0a
PA
6933 case "$host_os" in
6934 mingw*)
6935 gl_dirsep_regex='[/\\]'
6936 ;;
6937 *)
6938 gl_dirsep_regex='\/'
6939 ;;
6940 esac
6941 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6942 gl_header_literal_regex=`echo 'errno.h' \
6943 | sed -e "$gl_make_literal_regex_sed"`
6944 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
6945 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
6946 s|^/[^/]|//&|
6947 p
6948 q
6949 }'
6950
6951 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
6952 sed -n "$gl_absolute_header_sed"`
6953
6954 gl_header=$gl_cv_absolute_errno_h
6955 gl_cv_next_errno_h='"'$gl_header'"'
6956
6957
6958fi
6959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
18848e28
GF
6960$as_echo "$gl_cv_next_errno_h" >&6; }
6961 fi
6962 NEXT_ERRNO_H=$gl_cv_next_errno_h
6963
6964 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
6965 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6966 gl_next_as_first_directive='<'errno.h'>'
6967 else
6968 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6969 gl_next_as_first_directive=$gl_cv_next_errno_h
6970 fi
6971 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
6972
6973
6974
6975
6976 ERRNO_H='errno.h'
6977 fi
6978
6979 if test -n "$ERRNO_H"; then
6980 GL_GENERATE_ERRNO_H_TRUE=
6981 GL_GENERATE_ERRNO_H_FALSE='#'
6982else
6983 GL_GENERATE_ERRNO_H_TRUE='#'
6984 GL_GENERATE_ERRNO_H_FALSE=
6985fi
6986
6987
6988 if test -n "$ERRNO_H"; then
6989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
6990$as_echo_n "checking for EMULTIHOP value... " >&6; }
6991if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then :
6992 $as_echo_n "(cached) " >&6
6993else
6994
6995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6996/* end confdefs.h. */
6997
6998#include <errno.h>
6999#ifdef EMULTIHOP
7000yes
7001#endif
7002
7003_ACEOF
7004if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7005 $EGREP "yes" >/dev/null 2>&1; then :
7006 gl_cv_header_errno_h_EMULTIHOP=yes
7007else
7008 gl_cv_header_errno_h_EMULTIHOP=no
7009fi
7010rm -f conftest*
7011
7012 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
7013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7014/* end confdefs.h. */
7015
7016#define _XOPEN_SOURCE_EXTENDED 1
7017#include <errno.h>
7018#ifdef EMULTIHOP
7019yes
7020#endif
7021
7022_ACEOF
7023if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7024 $EGREP "yes" >/dev/null 2>&1; then :
7025 gl_cv_header_errno_h_EMULTIHOP=hidden
7026fi
7027rm -f conftest*
7028
7029 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
7030 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
7031#define _XOPEN_SOURCE_EXTENDED 1
7032#include <errno.h>
7033/* The following two lines are a workaround against an autoconf-2.52 bug. */
7034#include <stdio.h>
7035#include <stdlib.h>
7036"; then :
7037
7038fi
7039
7040 fi
7041 fi
7042
7043fi
7044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
7045$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
7046 case $gl_cv_header_errno_h_EMULTIHOP in
7047 yes | no)
7048 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
7049 ;;
7050 *)
7051 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
7052 ;;
7053 esac
7054
7055
7056 fi
7057
7058
7059 if test -n "$ERRNO_H"; then
7060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
7061$as_echo_n "checking for ENOLINK value... " >&6; }
7062if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then :
7063 $as_echo_n "(cached) " >&6
7064else
7065
7066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7067/* end confdefs.h. */
7068
7069#include <errno.h>
7070#ifdef ENOLINK
7071yes
7072#endif
7073
7074_ACEOF
7075if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7076 $EGREP "yes" >/dev/null 2>&1; then :
7077 gl_cv_header_errno_h_ENOLINK=yes
7078else
7079 gl_cv_header_errno_h_ENOLINK=no
7080fi
7081rm -f conftest*
7082
7083 if test $gl_cv_header_errno_h_ENOLINK = no; then
7084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7085/* end confdefs.h. */
7086
7087#define _XOPEN_SOURCE_EXTENDED 1
7088#include <errno.h>
7089#ifdef ENOLINK
7090yes
7091#endif
7092
7093_ACEOF
7094if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7095 $EGREP "yes" >/dev/null 2>&1; then :
7096 gl_cv_header_errno_h_ENOLINK=hidden
7097fi
7098rm -f conftest*
7099
7100 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
7101 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
7102#define _XOPEN_SOURCE_EXTENDED 1
7103#include <errno.h>
7104/* The following two lines are a workaround against an autoconf-2.52 bug. */
7105#include <stdio.h>
7106#include <stdlib.h>
7107"; then :
7108
7109fi
7110
7111 fi
7112 fi
7113
7114fi
7115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
7116$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
7117 case $gl_cv_header_errno_h_ENOLINK in
7118 yes | no)
7119 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
7120 ;;
7121 *)
7122 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
7123 ;;
7124 esac
7125
7126
7127 fi
7128
7129
7130 if test -n "$ERRNO_H"; then
7131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
7132$as_echo_n "checking for EOVERFLOW value... " >&6; }
7133if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then :
7134 $as_echo_n "(cached) " >&6
7135else
7136
7137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7138/* end confdefs.h. */
7139
7140#include <errno.h>
7141#ifdef EOVERFLOW
7142yes
7143#endif
7144
7145_ACEOF
7146if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7147 $EGREP "yes" >/dev/null 2>&1; then :
7148 gl_cv_header_errno_h_EOVERFLOW=yes
7149else
7150 gl_cv_header_errno_h_EOVERFLOW=no
7151fi
7152rm -f conftest*
7153
7154 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
7155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7156/* end confdefs.h. */
7157
7158#define _XOPEN_SOURCE_EXTENDED 1
7159#include <errno.h>
7160#ifdef EOVERFLOW
7161yes
7162#endif
7163
7164_ACEOF
7165if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7166 $EGREP "yes" >/dev/null 2>&1; then :
7167 gl_cv_header_errno_h_EOVERFLOW=hidden
7168fi
7169rm -f conftest*
7170
7171 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
7172 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
7173#define _XOPEN_SOURCE_EXTENDED 1
7174#include <errno.h>
7175/* The following two lines are a workaround against an autoconf-2.52 bug. */
7176#include <stdio.h>
7177#include <stdlib.h>
7178"; then :
7179
7180fi
7181
7182 fi
7183 fi
7184
7185fi
7186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
7187$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
7188 case $gl_cv_header_errno_h_EOVERFLOW in
7189 yes | no)
7190 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
7191 ;;
7192 *)
7193 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
7194 ;;
7195 esac
7196
7197
7198 fi
7199
7200
7201
7202
63ce7108
TT
7203
7204
7205
7206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
7207$as_echo_n "checking for mbstate_t... " >&6; }
7208if test "${ac_cv_type_mbstate_t+set}" = set; then :
7209 $as_echo_n "(cached) " >&6
7210else
7211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7212/* end confdefs.h. */
7213$ac_includes_default
7214/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
7215 <wchar.h>.
7216 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
7217 included before <wchar.h>. */
7218#include <stddef.h>
7219#include <stdio.h>
7220#include <time.h>
7221#include <wchar.h>
7222int
7223main ()
7224{
7225mbstate_t x; return sizeof x;
7226 ;
7227 return 0;
7228}
7229_ACEOF
7230if ac_fn_c_try_compile "$LINENO"; then :
7231 ac_cv_type_mbstate_t=yes
7232else
7233 ac_cv_type_mbstate_t=no
7234fi
7235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7236fi
7237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
7238$as_echo "$ac_cv_type_mbstate_t" >&6; }
7239 if test $ac_cv_type_mbstate_t = yes; then
7240
7241$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
7242
7243 else
7244
7245$as_echo "#define mbstate_t int" >>confdefs.h
7246
7247 fi
7248
7249
7250
7251
63ce7108
TT
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
63ce7108
TT
7268 GNULIB_ACOSF=0;
7269 GNULIB_ACOSL=0;
7270 GNULIB_ASINF=0;
7271 GNULIB_ASINL=0;
7272 GNULIB_ATANF=0;
7273 GNULIB_ATANL=0;
7274 GNULIB_ATAN2F=0;
7275 GNULIB_CBRT=0;
7276 GNULIB_CBRTF=0;
7277 GNULIB_CBRTL=0;
7278 GNULIB_CEIL=0;
7279 GNULIB_CEILF=0;
7280 GNULIB_CEILL=0;
7281 GNULIB_COPYSIGN=0;
7282 GNULIB_COPYSIGNF=0;
88b48903
WN
7283 GNULIB_COPYSIGNL=0;
7284 GNULIB_COSF=0;
7285 GNULIB_COSL=0;
7286 GNULIB_COSHF=0;
7287 GNULIB_EXPF=0;
7288 GNULIB_EXPL=0;
7289 GNULIB_EXP2=0;
7290 GNULIB_EXP2F=0;
7291 GNULIB_EXP2L=0;
7292 GNULIB_EXPM1=0;
7293 GNULIB_EXPM1F=0;
7294 GNULIB_EXPM1L=0;
7295 GNULIB_FABSF=0;
7296 GNULIB_FABSL=0;
7297 GNULIB_FLOOR=0;
7298 GNULIB_FLOORF=0;
7299 GNULIB_FLOORL=0;
7300 GNULIB_FMA=0;
7301 GNULIB_FMAF=0;
7302 GNULIB_FMAL=0;
7303 GNULIB_FMOD=0;
7304 GNULIB_FMODF=0;
7305 GNULIB_FMODL=0;
7306 GNULIB_FREXPF=0;
7307 GNULIB_FREXP=0;
7308 GNULIB_FREXPL=0;
7309 GNULIB_HYPOT=0;
7310 GNULIB_HYPOTF=0;
7311 GNULIB_HYPOTL=0;
7312 GNULIB_ILOGB=0;
7313 GNULIB_ILOGBF=0;
7314 GNULIB_ILOGBL=0;
7315 GNULIB_ISFINITE=0;
7316 GNULIB_ISINF=0;
7317 GNULIB_ISNAN=0;
7318 GNULIB_ISNANF=0;
7319 GNULIB_ISNAND=0;
7320 GNULIB_ISNANL=0;
7321 GNULIB_LDEXPF=0;
7322 GNULIB_LDEXPL=0;
7323 GNULIB_LOG=0;
7324 GNULIB_LOGF=0;
7325 GNULIB_LOGL=0;
7326 GNULIB_LOG10=0;
7327 GNULIB_LOG10F=0;
7328 GNULIB_LOG10L=0;
7329 GNULIB_LOG1P=0;
7330 GNULIB_LOG1PF=0;
7331 GNULIB_LOG1PL=0;
7332 GNULIB_LOG2=0;
7333 GNULIB_LOG2F=0;
7334 GNULIB_LOG2L=0;
7335 GNULIB_LOGB=0;
7336 GNULIB_LOGBF=0;
7337 GNULIB_LOGBL=0;
7338 GNULIB_MODF=0;
7339 GNULIB_MODFF=0;
7340 GNULIB_MODFL=0;
7341 GNULIB_POWF=0;
7342 GNULIB_REMAINDER=0;
7343 GNULIB_REMAINDERF=0;
7344 GNULIB_REMAINDERL=0;
7345 GNULIB_RINT=0;
7346 GNULIB_RINTF=0;
7347 GNULIB_RINTL=0;
7348 GNULIB_ROUND=0;
7349 GNULIB_ROUNDF=0;
7350 GNULIB_ROUNDL=0;
7351 GNULIB_SIGNBIT=0;
7352 GNULIB_SINF=0;
7353 GNULIB_SINL=0;
7354 GNULIB_SINHF=0;
7355 GNULIB_SQRTF=0;
7356 GNULIB_SQRTL=0;
7357 GNULIB_TANF=0;
7358 GNULIB_TANL=0;
7359 GNULIB_TANHF=0;
7360 GNULIB_TRUNC=0;
7361 GNULIB_TRUNCF=0;
7362 GNULIB_TRUNCL=0;
7363 HAVE_ACOSF=1;
7364 HAVE_ACOSL=1;
7365 HAVE_ASINF=1;
7366 HAVE_ASINL=1;
7367 HAVE_ATANF=1;
7368 HAVE_ATANL=1;
7369 HAVE_ATAN2F=1;
7370 HAVE_CBRT=1;
7371 HAVE_CBRTF=1;
7372 HAVE_CBRTL=1;
7373 HAVE_COPYSIGN=1;
7374 HAVE_COPYSIGNL=1;
7375 HAVE_COSF=1;
7376 HAVE_COSL=1;
7377 HAVE_COSHF=1;
7378 HAVE_EXPF=1;
7379 HAVE_EXPL=1;
7380 HAVE_EXPM1=1;
7381 HAVE_EXPM1F=1;
7382 HAVE_FABSF=1;
7383 HAVE_FABSL=1;
7384 HAVE_FMA=1;
7385 HAVE_FMAF=1;
7386 HAVE_FMAL=1;
7387 HAVE_FMODF=1;
7388 HAVE_FMODL=1;
7389 HAVE_FREXPF=1;
7390 HAVE_HYPOTF=1;
7391 HAVE_HYPOTL=1;
7392 HAVE_ILOGB=1;
7393 HAVE_ILOGBF=1;
7394 HAVE_ILOGBL=1;
7395 HAVE_ISNANF=1;
7396 HAVE_ISNAND=1;
7397 HAVE_ISNANL=1;
7398 HAVE_LDEXPF=1;
7399 HAVE_LOGF=1;
7400 HAVE_LOGL=1;
7401 HAVE_LOG10F=1;
7402 HAVE_LOG10L=1;
7403 HAVE_LOG1P=1;
7404 HAVE_LOG1PF=1;
7405 HAVE_LOG1PL=1;
7406 HAVE_LOGBF=1;
7407 HAVE_LOGBL=1;
7408 HAVE_MODFF=1;
7409 HAVE_MODFL=1;
7410 HAVE_POWF=1;
7411 HAVE_REMAINDER=1;
7412 HAVE_REMAINDERF=1;
7413 HAVE_RINT=1;
7414 HAVE_RINTL=1;
7415 HAVE_SINF=1;
7416 HAVE_SINL=1;
7417 HAVE_SINHF=1;
7418 HAVE_SQRTF=1;
7419 HAVE_SQRTL=1;
7420 HAVE_TANF=1;
7421 HAVE_TANL=1;
7422 HAVE_TANHF=1;
7423 HAVE_DECL_ACOSL=1;
7424 HAVE_DECL_ASINL=1;
7425 HAVE_DECL_ATANL=1;
7426 HAVE_DECL_CBRTF=1;
7427 HAVE_DECL_CBRTL=1;
7428 HAVE_DECL_CEILF=1;
7429 HAVE_DECL_CEILL=1;
7430 HAVE_DECL_COPYSIGNF=1;
7431 HAVE_DECL_COSL=1;
7432 HAVE_DECL_EXPL=1;
7433 HAVE_DECL_EXP2=1;
7434 HAVE_DECL_EXP2F=1;
7435 HAVE_DECL_EXP2L=1;
7436 HAVE_DECL_EXPM1L=1;
7437 HAVE_DECL_FLOORF=1;
7438 HAVE_DECL_FLOORL=1;
7439 HAVE_DECL_FREXPL=1;
7440 HAVE_DECL_LDEXPL=1;
7441 HAVE_DECL_LOGL=1;
7442 HAVE_DECL_LOG10L=1;
7443 HAVE_DECL_LOG2=1;
7444 HAVE_DECL_LOG2F=1;
7445 HAVE_DECL_LOG2L=1;
7446 HAVE_DECL_LOGB=1;
7447 HAVE_DECL_REMAINDER=1;
7448 HAVE_DECL_REMAINDERL=1;
7449 HAVE_DECL_RINTF=1;
7450 HAVE_DECL_ROUND=1;
7451 HAVE_DECL_ROUNDF=1;
7452 HAVE_DECL_ROUNDL=1;
7453 HAVE_DECL_SINL=1;
7454 HAVE_DECL_SQRTL=1;
7455 HAVE_DECL_TANL=1;
7456 HAVE_DECL_TRUNC=1;
7457 HAVE_DECL_TRUNCF=1;
7458 HAVE_DECL_TRUNCL=1;
7459 REPLACE_CBRTF=0;
7460 REPLACE_CBRTL=0;
7461 REPLACE_CEIL=0;
7462 REPLACE_CEILF=0;
7463 REPLACE_CEILL=0;
7464 REPLACE_EXPM1=0;
7465 REPLACE_EXPM1F=0;
7466 REPLACE_EXP2=0;
7467 REPLACE_EXP2L=0;
7468 REPLACE_FABSL=0;
7469 REPLACE_FLOOR=0;
7470 REPLACE_FLOORF=0;
7471 REPLACE_FLOORL=0;
7472 REPLACE_FMA=0;
7473 REPLACE_FMAF=0;
7474 REPLACE_FMAL=0;
7475 REPLACE_FMOD=0;
7476 REPLACE_FMODF=0;
7477 REPLACE_FMODL=0;
7478 REPLACE_FREXPF=0;
7479 REPLACE_FREXP=0;
7480 REPLACE_FREXPL=0;
7481 REPLACE_HUGE_VAL=0;
7482 REPLACE_HYPOT=0;
7483 REPLACE_HYPOTF=0;
7484 REPLACE_HYPOTL=0;
7485 REPLACE_ILOGB=0;
7486 REPLACE_ILOGBF=0;
7487 REPLACE_ISFINITE=0;
7488 REPLACE_ISINF=0;
7489 REPLACE_ISNAN=0;
7490 REPLACE_LDEXPL=0;
7491 REPLACE_LOG=0;
7492 REPLACE_LOGF=0;
7493 REPLACE_LOGL=0;
7494 REPLACE_LOG10=0;
7495 REPLACE_LOG10F=0;
7496 REPLACE_LOG10L=0;
7497 REPLACE_LOG1P=0;
7498 REPLACE_LOG1PF=0;
7499 REPLACE_LOG1PL=0;
7500 REPLACE_LOG2=0;
7501 REPLACE_LOG2F=0;
7502 REPLACE_LOG2L=0;
7503 REPLACE_LOGB=0;
7504 REPLACE_LOGBF=0;
7505 REPLACE_LOGBL=0;
7506 REPLACE_MODF=0;
7507 REPLACE_MODFF=0;
7508 REPLACE_MODFL=0;
7509 REPLACE_NAN=0;
7510 REPLACE_REMAINDER=0;
7511 REPLACE_REMAINDERF=0;
7512 REPLACE_REMAINDERL=0;
7513 REPLACE_ROUND=0;
7514 REPLACE_ROUNDF=0;
7515 REPLACE_ROUNDL=0;
7516 REPLACE_SIGNBIT=0;
7517 REPLACE_SIGNBIT_USING_GCC=0;
7518 REPLACE_SQRTL=0;
7519 REPLACE_TRUNC=0;
7520 REPLACE_TRUNCF=0;
7521 REPLACE_TRUNCL=0;
7522
7523
7524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
7525$as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
7526if test "${gl_cv_func_frexp_no_libm+set}" = set; then :
7527 $as_echo_n "(cached) " >&6
7528else
7529
7530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7531/* end confdefs.h. */
7532#include <math.h>
7533 double x;
7534int
7535main ()
7536{
7537int e; return frexp (x, &e) > 0;
7538 ;
7539 return 0;
7540}
7541_ACEOF
7542if ac_fn_c_try_link "$LINENO"; then :
7543 gl_cv_func_frexp_no_libm=yes
7544else
7545 gl_cv_func_frexp_no_libm=no
7546fi
7547rm -f core conftest.err conftest.$ac_objext \
7548 conftest$ac_exeext conftest.$ac_ext
7549
7550fi
7551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
7552$as_echo "$gl_cv_func_frexp_no_libm" >&6; }
7553
4a626d0a
PA
7554ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
7555if test "x$ac_cv_have_decl_alarm" = x""yes; then :
7556 ac_have_decl=1
7557else
7558 ac_have_decl=0
7559fi
88b48903 7560
4a626d0a
PA
7561cat >>confdefs.h <<_ACEOF
7562#define HAVE_DECL_ALARM $ac_have_decl
7563_ACEOF
88b48903
WN
7564
7565
88b48903
WN
7566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
7567$as_echo_n "checking whether long double and double are the same... " >&6; }
7568if test "${gl_cv_long_double_equals_double+set}" = set; then :
7569 $as_echo_n "(cached) " >&6
7570else
7571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7572/* end confdefs.h. */
7573#include <float.h>
7574int
7575main ()
7576{
7577typedef int check[sizeof (long double) == sizeof (double)
7578 && LDBL_MANT_DIG == DBL_MANT_DIG
7579 && LDBL_MAX_EXP == DBL_MAX_EXP
7580 && LDBL_MIN_EXP == DBL_MIN_EXP
7581 ? 1 : -1];
7582
7583 ;
7584 return 0;
7585}
7586_ACEOF
7587if ac_fn_c_try_compile "$LINENO"; then :
7588 gl_cv_long_double_equals_double=yes
7589else
7590 gl_cv_long_double_equals_double=no
7591fi
7592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7593
7594fi
7595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
7596$as_echo "$gl_cv_long_double_equals_double" >&6; }
7597 if test $gl_cv_long_double_equals_double = yes; then
7598
7599$as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
7600
7601 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
7602 else
7603 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
7604 fi
7605
7606
4a626d0a
PA
7607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
7608$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
7609if test "${ac_cv_c_restrict+set}" = set; then :
7610 $as_echo_n "(cached) " >&6
7611else
7612 ac_cv_c_restrict=no
7613 # The order here caters to the fact that C++ does not require restrict.
7614 for ac_kw in __restrict __restrict__ _Restrict restrict; do
7615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7616/* end confdefs.h. */
7617typedef int *int_ptr;
7618 int foo (int_ptr $ac_kw ip) { return ip[0]; }
7619 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
7620 int bar (int ip[$ac_kw]) { return ip[0]; }
7621
7622int
7623main ()
7624{
7625int s[1];
7626 int *$ac_kw t = s;
7627 t[0] = 0;
7628 return foo (t) + bar (t);
7629
7630 ;
7631 return 0;
7632}
7633_ACEOF
7634if ac_fn_c_try_compile "$LINENO"; then :
7635 ac_cv_c_restrict=$ac_kw
7636fi
7637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7638 test "$ac_cv_c_restrict" != no && break
7639 done
7640
7641fi
7642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
7643$as_echo "$ac_cv_c_restrict" >&6; }
7644
7645 case $ac_cv_c_restrict in
7646 restrict) ;;
7647 no) $as_echo "#define restrict /**/" >>confdefs.h
7648 ;;
7649 *) cat >>confdefs.h <<_ACEOF
7650#define restrict $ac_cv_c_restrict
7651_ACEOF
7652 ;;
7653 esac
7654
7655
7656 GNULIB_GETTIMEOFDAY=0;
7657 HAVE_GETTIMEOFDAY=1;
7658 HAVE_STRUCT_TIMEVAL=1;
7659 HAVE_SYS_TIME_H=1;
7660 HAVE_TIMEZONE_T=0;
7661 REPLACE_GETTIMEOFDAY=0;
7662 REPLACE_STRUCT_TIMEVAL=0;
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681 if test $gl_cv_have_include_next = yes; then
7682 gl_cv_next_sys_time_h='<'sys/time.h'>'
7683 else
7684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
7685$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
7686if test "${gl_cv_next_sys_time_h+set}" = set; then :
7687 $as_echo_n "(cached) " >&6
7688else
7689
7690 if test $ac_cv_header_sys_time_h = yes; then
7691
7692
7693
7694
7695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7696/* end confdefs.h. */
7697#include <sys/time.h>
7698_ACEOF
7699 case "$host_os" in
7700 aix*) gl_absname_cpp="$ac_cpp -C" ;;
7701 *) gl_absname_cpp="$ac_cpp" ;;
7702 esac
7703
7704 case "$host_os" in
7705 mingw*)
7706 gl_dirsep_regex='[/\\]'
7707 ;;
7708 *)
7709 gl_dirsep_regex='\/'
7710 ;;
7711 esac
7712 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
7713 gl_header_literal_regex=`echo 'sys/time.h' \
7714 | sed -e "$gl_make_literal_regex_sed"`
7715 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
7716 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
7717 s|^/[^/]|//&|
7718 p
7719 q
7720 }'
7721
7722 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7723 sed -n "$gl_absolute_header_sed"`
7724
7725 gl_header=$gl_cv_absolute_sys_time_h
7726 gl_cv_next_sys_time_h='"'$gl_header'"'
7727 else
7728 gl_cv_next_sys_time_h='<'sys/time.h'>'
7729 fi
7730
7731
7732fi
7733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
7734$as_echo "$gl_cv_next_sys_time_h" >&6; }
7735 fi
7736 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
7737
7738 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7739 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
7740 gl_next_as_first_directive='<'sys/time.h'>'
7741 else
7742 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
7743 gl_next_as_first_directive=$gl_cv_next_sys_time_h
7744 fi
7745 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
7746
7747
7748
7749
7750
7751 if test $ac_cv_header_sys_time_h != yes; then
7752 HAVE_SYS_TIME_H=0
7753 fi
7754
7755
7756
7757
7758
7759 if test $ac_cv_header_sys_socket_h != yes; then
7760 for ac_header in winsock2.h
7761do :
7762 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
7763if test "x$ac_cv_header_winsock2_h" = x""yes; then :
7764 cat >>confdefs.h <<_ACEOF
7765#define HAVE_WINSOCK2_H 1
7766_ACEOF
7767
7768fi
7769
7770done
7771
7772 fi
7773 if test "$ac_cv_header_winsock2_h" = yes; then
7774 HAVE_WINSOCK2_H=1
7775 UNISTD_H_HAVE_WINSOCK2_H=1
7776 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
7777 else
7778 HAVE_WINSOCK2_H=0
7779 fi
7780
7781
7782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
7783$as_echo_n "checking for struct timeval... " >&6; }
7784if test "${gl_cv_sys_struct_timeval+set}" = set; then :
7785 $as_echo_n "(cached) " >&6
7786else
7787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7788/* end confdefs.h. */
7789#if HAVE_SYS_TIME_H
7790 #include <sys/time.h>
7791 #endif
7792 #include <time.h>
7793 #if HAVE_WINSOCK2_H
7794 # include <winsock2.h>
7795 #endif
7796
7797int
7798main ()
7799{
7800static struct timeval x; x.tv_sec = x.tv_usec;
7801 ;
7802 return 0;
7803}
7804_ACEOF
7805if ac_fn_c_try_compile "$LINENO"; then :
7806 gl_cv_sys_struct_timeval=yes
7807else
7808 gl_cv_sys_struct_timeval=no
7809fi
7810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7811
7812fi
7813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
7814$as_echo "$gl_cv_sys_struct_timeval" >&6; }
7815 if test $gl_cv_sys_struct_timeval != yes; then
7816 HAVE_STRUCT_TIMEVAL=0
7817 else
7818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
7819$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
7820if test "${gl_cv_sys_struct_timeval_tv_sec+set}" = set; then :
7821 $as_echo_n "(cached) " >&6
7822else
7823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7824/* end confdefs.h. */
7825#if HAVE_SYS_TIME_H
7826 #include <sys/time.h>
7827 #endif
7828 #include <time.h>
7829 #if HAVE_WINSOCK2_H
7830 # include <winsock2.h>
7831 #endif
7832
7833int
7834main ()
7835{
7836static struct timeval x;
7837 typedef int verify_tv_sec_type[
7838 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
7839 ];
7840
7841 ;
7842 return 0;
7843}
7844_ACEOF
7845if ac_fn_c_try_compile "$LINENO"; then :
7846 gl_cv_sys_struct_timeval_tv_sec=yes
7847else
7848 gl_cv_sys_struct_timeval_tv_sec=no
7849fi
7850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7851
7852fi
7853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
7854$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
7855 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
7856 REPLACE_STRUCT_TIMEVAL=1
7857 fi
7858 fi
7859
7860
7861 for gl_func in gettimeofday; do
7862 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
7863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
7864$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
7865if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
7866 $as_echo_n "(cached) " >&6
7867else
7868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7869/* end confdefs.h. */
7870
7871#if HAVE_SYS_TIME_H
7872# include <sys/time.h>
7873#endif
7874#include <time.h>
7875
7876int
7877main ()
7878{
7879#undef $gl_func
7880 (void) $gl_func;
7881 ;
7882 return 0;
7883}
7884_ACEOF
7885if ac_fn_c_try_compile "$LINENO"; then :
7886 eval "$as_gl_Symbol=yes"
7887else
7888 eval "$as_gl_Symbol=no"
7889fi
7890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7891fi
7892eval ac_res=\$$as_gl_Symbol
7893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7894$as_echo "$ac_res" >&6; }
7895 eval as_val=\$$as_gl_Symbol
7896 if test "x$as_val" = x""yes; then :
7897 cat >>confdefs.h <<_ACEOF
7898#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
7899_ACEOF
7900
7901 eval ac_cv_have_decl_$gl_func=yes
7902fi
7903 done
7904
7905
7906
7907
7908
7909
7910
88b48903 7911
49e4877c
PA
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923 if test $gl_cv_have_include_next = yes; then
7924 gl_cv_next_limits_h='<'limits.h'>'
7925 else
7926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
7927$as_echo_n "checking absolute name of <limits.h>... " >&6; }
7928if test "${gl_cv_next_limits_h+set}" = set; then :
7929 $as_echo_n "(cached) " >&6
7930else
7931
7932 if test $ac_cv_header_limits_h = yes; then
7933
7934
7935
7936
7937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7938/* end confdefs.h. */
7939#include <limits.h>
7940_ACEOF
7941 case "$host_os" in
7942 aix*) gl_absname_cpp="$ac_cpp -C" ;;
7943 *) gl_absname_cpp="$ac_cpp" ;;
7944 esac
7945
7946 case "$host_os" in
7947 mingw*)
7948 gl_dirsep_regex='[/\\]'
7949 ;;
7950 *)
7951 gl_dirsep_regex='\/'
7952 ;;
7953 esac
7954 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
7955 gl_header_literal_regex=`echo 'limits.h' \
7956 | sed -e "$gl_make_literal_regex_sed"`
7957 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
7958 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
7959 s|^/[^/]|//&|
7960 p
7961 q
7962 }'
7963
7964 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7965 sed -n "$gl_absolute_header_sed"`
7966
7967 gl_header=$gl_cv_absolute_limits_h
7968 gl_cv_next_limits_h='"'$gl_header'"'
7969 else
7970 gl_cv_next_limits_h='<'limits.h'>'
7971 fi
7972
7973
7974fi
7975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
7976$as_echo "$gl_cv_next_limits_h" >&6; }
7977 fi
7978 NEXT_LIMITS_H=$gl_cv_next_limits_h
7979
7980 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7981 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
7982 gl_next_as_first_directive='<'limits.h'>'
7983 else
7984 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
7985 gl_next_as_first_directive=$gl_cv_next_limits_h
7986 fi
7987 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
7988
7989
7990
7991
7992
7993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has ULLONG_WIDTH etc." >&5
7994$as_echo_n "checking whether limits.h has ULLONG_WIDTH etc.... " >&6; }
7995if test "${gl_cv_header_limits_width+set}" = set; then :
7996 $as_echo_n "(cached) " >&6
7997else
7998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7999/* end confdefs.h. */
8000#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
8001 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
8002 #endif
8003 #include <limits.h>
8004 int ullw = ULLONG_WIDTH;
8005int
8006main ()
8007{
8008
8009 ;
8010 return 0;
8011}
8012_ACEOF
8013if ac_fn_c_try_compile "$LINENO"; then :
8014 gl_cv_header_limits_width=yes
8015else
8016 gl_cv_header_limits_width=no
8017fi
8018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8019fi
8020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
8021$as_echo "$gl_cv_header_limits_width" >&6; }
8022 if test "$gl_cv_header_limits_width" = yes; then
8023 LIMITS_H=
8024 else
8025 LIMITS_H=limits.h
8026 fi
8027
8028 if test -n "$LIMITS_H"; then
8029 GL_GENERATE_LIMITS_H_TRUE=
8030 GL_GENERATE_LIMITS_H_FALSE='#'
8031else
8032 GL_GENERATE_LIMITS_H_TRUE='#'
8033 GL_GENERATE_LIMITS_H_FALSE=
8034fi
8035
8036
8037
8690e634
JK
8038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
8039$as_echo_n "checking for unsigned long long int... " >&6; }
8040if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
8041 $as_echo_n "(cached) " >&6
8042else
8043 ac_cv_type_unsigned_long_long_int=yes
8044 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
8045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8046/* end confdefs.h. */
8047
8048 /* For now, do not test the preprocessor; as of 2007 there are too many
8049 implementations with broken preprocessors. Perhaps this can
8050 be revisited in 2012. In the meantime, code should not expect
8051 #if to work with literals wider than 32 bits. */
8052 /* Test literals. */
8053 long long int ll = 9223372036854775807ll;
8054 long long int nll = -9223372036854775807LL;
8055 unsigned long long int ull = 18446744073709551615ULL;
8056 /* Test constant expressions. */
8057 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
8058 ? 1 : -1)];
8059 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
8060 ? 1 : -1)];
8061 int i = 63;
8062int
8063main ()
8064{
8065/* Test availability of runtime routines for shift and division. */
8066 long long int llmax = 9223372036854775807ll;
8067 unsigned long long int ullmax = 18446744073709551615ull;
8068 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
8069 | (llmax / ll) | (llmax % ll)
8070 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
8071 | (ullmax / ull) | (ullmax % ull));
8072 ;
8073 return 0;
8074}
8075
8076_ACEOF
8077if ac_fn_c_try_link "$LINENO"; then :
8078
8079else
8080 ac_cv_type_unsigned_long_long_int=no
8081fi
8082rm -f core conftest.err conftest.$ac_objext \
8083 conftest$ac_exeext conftest.$ac_ext
8084 fi
8085fi
8086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
8087$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
8088 if test $ac_cv_type_unsigned_long_long_int = yes; then
8089
8090$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
8091
8092 fi
8093
8094
8095
8096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
8097$as_echo_n "checking for long long int... " >&6; }
8098if test "${ac_cv_type_long_long_int+set}" = set; then :
8099 $as_echo_n "(cached) " >&6
8100else
8101 ac_cv_type_long_long_int=yes
8102 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
8103 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
8104 if test $ac_cv_type_long_long_int = yes; then
8105 if test "$cross_compiling" = yes; then :
8106 :
8107else
8108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8109/* end confdefs.h. */
8110#include <limits.h>
8111 #ifndef LLONG_MAX
8112 # define HALF \
8113 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
8114 # define LLONG_MAX (HALF - 1 + HALF)
8115 #endif
8116int
8117main ()
8118{
8119long long int n = 1;
8120 int i;
8121 for (i = 0; ; i++)
8122 {
8123 long long int m = n << i;
8124 if (m >> i != n)
8125 return 1;
8126 if (LLONG_MAX / 2 < m)
8127 break;
8128 }
8129 return 0;
8130 ;
8131 return 0;
8132}
8133_ACEOF
8134if ac_fn_c_try_run "$LINENO"; then :
8135
8136else
8137 ac_cv_type_long_long_int=no
8138fi
8139rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8140 conftest.$ac_objext conftest.beam conftest.$ac_ext
8141fi
8142
8143 fi
8144 fi
8145fi
8146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
8147$as_echo "$ac_cv_type_long_long_int" >&6; }
8148 if test $ac_cv_type_long_long_int = yes; then
8149
8150$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
8151
8152 fi
8153
8154
8155
8156
8157
8158
88b48903
WN
8159 gl_cv_c_multiarch=no
8160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a143c6de 8161/* end confdefs.h. */
88b48903
WN
8162#ifndef __APPLE_CC__
8163 not a universal capable compiler
8164 #endif
8165 typedef int dummy;
8166
8690e634
JK
8167_ACEOF
8168if ac_fn_c_try_compile "$LINENO"; then :
8169
8170 arch=
8171 prev=
8172 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
8173 if test -n "$prev"; then
8174 case $word in
8175 i?86 | x86_64 | ppc | ppc64)
8176 if test -z "$arch" || test "$arch" = "$word"; then
8177 arch="$word"
8178 else
8179 gl_cv_c_multiarch=yes
8180 fi
8181 ;;
8182 esac
8183 prev=
8184 else
8185 if test "x$word" = "x-arch"; then
8186 prev=arch
8187 fi
8188 fi
8189 done
8190
8191fi
8192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8193 if test $gl_cv_c_multiarch = yes; then
8194 APPLE_UNIVERSAL_BUILD=1
8195 else
8196 APPLE_UNIVERSAL_BUILD=0
8197 fi
8198
8199
8200
8201
8202
49e4877c
PA
8203
8204
8690e634
JK
8205 if test $ac_cv_type_long_long_int = yes; then
8206 HAVE_LONG_LONG_INT=1
8207 else
8208 HAVE_LONG_LONG_INT=0
8209 fi
8210
8211
8212 if test $ac_cv_type_unsigned_long_long_int = yes; then
8213 HAVE_UNSIGNED_LONG_LONG_INT=1
8214 else
8215 HAVE_UNSIGNED_LONG_LONG_INT=0
8216 fi
8217
8218
8219
8690e634
JK
8220 if test $ac_cv_header_wchar_h = yes; then
8221 HAVE_WCHAR_H=1
8222 else
8223 HAVE_WCHAR_H=0
8224 fi
8225
8226
8227 if test $ac_cv_header_inttypes_h = yes; then
8228 HAVE_INTTYPES_H=1
8229 else
8230 HAVE_INTTYPES_H=0
8231 fi
8232
8233
8234 if test $ac_cv_header_sys_types_h = yes; then
8235 HAVE_SYS_TYPES_H=1
8236 else
8237 HAVE_SYS_TYPES_H=0
8238 fi
8239
8240
8241
8242
8243
8244
8245
8246
8690e634
JK
8247
8248
8249
8250 if test $gl_cv_have_include_next = yes; then
8251 gl_cv_next_stdint_h='<'stdint.h'>'
8252 else
8253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
8254$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
8255if test "${gl_cv_next_stdint_h+set}" = set; then :
8256 $as_echo_n "(cached) " >&6
8257else
8258
8259 if test $ac_cv_header_stdint_h = yes; then
8260
8261
4a626d0a
PA
8262
8263
8264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
8265/* end confdefs.h. */
8266#include <stdint.h>
8690e634 8267_ACEOF
4a626d0a
PA
8268 case "$host_os" in
8269 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8270 *) gl_absname_cpp="$ac_cpp" ;;
8271 esac
8272
8273 case "$host_os" in
8274 mingw*)
8275 gl_dirsep_regex='[/\\]'
8276 ;;
8277 *)
8278 gl_dirsep_regex='\/'
8279 ;;
8280 esac
8281 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
8282 gl_header_literal_regex=`echo 'stdint.h' \
8283 | sed -e "$gl_make_literal_regex_sed"`
8284 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8285 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8286 s|^/[^/]|//&|
8287 p
8288 q
8289 }'
8290
8291 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8292 sed -n "$gl_absolute_header_sed"`
8293
8294 gl_header=$gl_cv_absolute_stdint_h
8295 gl_cv_next_stdint_h='"'$gl_header'"'
8690e634
JK
8296 else
8297 gl_cv_next_stdint_h='<'stdint.h'>'
8298 fi
8299
8300
8301fi
8302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
8303$as_echo "$gl_cv_next_stdint_h" >&6; }
8304 fi
8305 NEXT_STDINT_H=$gl_cv_next_stdint_h
8306
8307 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8308 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8309 gl_next_as_first_directive='<'stdint.h'>'
8310 else
8311 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8312 gl_next_as_first_directive=$gl_cv_next_stdint_h
8313 fi
8314 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
8315
8316
8317
8318
8319 if test $ac_cv_header_stdint_h = yes; then
8320 HAVE_STDINT_H=1
8321 else
8322 HAVE_STDINT_H=0
8323 fi
8324
8325
8326 if test $ac_cv_header_stdint_h = yes; then
8327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
8328$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
8329if test "${gl_cv_header_working_stdint_h+set}" = set; then :
8330 $as_echo_n "(cached) " >&6
8331else
8332 gl_cv_header_working_stdint_h=no
8333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8334/* end confdefs.h. */
8335
8336
8337#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
49e4877c
PA
8338#define __STDC_CONSTANT_MACROS 1
8339#define __STDC_LIMIT_MACROS 1
8690e634
JK
8340#include <stdint.h>
8341/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
8342#if !(defined WCHAR_MIN && defined WCHAR_MAX)
8343#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
8344#endif
8345
8346
8347 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8348 included before <wchar.h>. */
8349 #include <stddef.h>
8350 #include <signal.h>
8351 #if HAVE_WCHAR_H
8352 # include <stdio.h>
8353 # include <time.h>
8354 # include <wchar.h>
8355 #endif
8356
8357
8358#ifdef INT8_MAX
8359int8_t a1 = INT8_MAX;
8360int8_t a1min = INT8_MIN;
8361#endif
8362#ifdef INT16_MAX
8363int16_t a2 = INT16_MAX;
8364int16_t a2min = INT16_MIN;
8365#endif
8366#ifdef INT32_MAX
8367int32_t a3 = INT32_MAX;
8368int32_t a3min = INT32_MIN;
8369#endif
8370#ifdef INT64_MAX
8371int64_t a4 = INT64_MAX;
8372int64_t a4min = INT64_MIN;
8373#endif
8374#ifdef UINT8_MAX
8375uint8_t b1 = UINT8_MAX;
8376#else
8377typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
8378#endif
8379#ifdef UINT16_MAX
8380uint16_t b2 = UINT16_MAX;
8381#endif
8382#ifdef UINT32_MAX
8383uint32_t b3 = UINT32_MAX;
8384#endif
8385#ifdef UINT64_MAX
8386uint64_t b4 = UINT64_MAX;
8387#endif
8388int_least8_t c1 = INT8_C (0x7f);
8389int_least8_t c1max = INT_LEAST8_MAX;
8390int_least8_t c1min = INT_LEAST8_MIN;
8391int_least16_t c2 = INT16_C (0x7fff);
8392int_least16_t c2max = INT_LEAST16_MAX;
8393int_least16_t c2min = INT_LEAST16_MIN;
8394int_least32_t c3 = INT32_C (0x7fffffff);
8395int_least32_t c3max = INT_LEAST32_MAX;
8396int_least32_t c3min = INT_LEAST32_MIN;
8397int_least64_t c4 = INT64_C (0x7fffffffffffffff);
8398int_least64_t c4max = INT_LEAST64_MAX;
8399int_least64_t c4min = INT_LEAST64_MIN;
8400uint_least8_t d1 = UINT8_C (0xff);
8401uint_least8_t d1max = UINT_LEAST8_MAX;
8402uint_least16_t d2 = UINT16_C (0xffff);
8403uint_least16_t d2max = UINT_LEAST16_MAX;
8404uint_least32_t d3 = UINT32_C (0xffffffff);
8405uint_least32_t d3max = UINT_LEAST32_MAX;
8406uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
8407uint_least64_t d4max = UINT_LEAST64_MAX;
8408int_fast8_t e1 = INT_FAST8_MAX;
8409int_fast8_t e1min = INT_FAST8_MIN;
8410int_fast16_t e2 = INT_FAST16_MAX;
8411int_fast16_t e2min = INT_FAST16_MIN;
8412int_fast32_t e3 = INT_FAST32_MAX;
8413int_fast32_t e3min = INT_FAST32_MIN;
8414int_fast64_t e4 = INT_FAST64_MAX;
8415int_fast64_t e4min = INT_FAST64_MIN;
8416uint_fast8_t f1 = UINT_FAST8_MAX;
8417uint_fast16_t f2 = UINT_FAST16_MAX;
8418uint_fast32_t f3 = UINT_FAST32_MAX;
8419uint_fast64_t f4 = UINT_FAST64_MAX;
8420#ifdef INTPTR_MAX
8421intptr_t g = INTPTR_MAX;
8422intptr_t gmin = INTPTR_MIN;
8423#endif
8424#ifdef UINTPTR_MAX
8425uintptr_t h = UINTPTR_MAX;
8426#endif
8427intmax_t i = INTMAX_MAX;
8428uintmax_t j = UINTMAX_MAX;
8429
8430#include <limits.h> /* for CHAR_BIT */
8431#define TYPE_MINIMUM(t) \
8432 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
8433#define TYPE_MAXIMUM(t) \
8434 ((t) ((t) 0 < (t) -1 \
8435 ? (t) -1 \
8436 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
8437struct s {
8438 int check_PTRDIFF:
8439 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
8440 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
8441 ? 1 : -1;
8442 /* Detect bug in FreeBSD 6.0 / ia64. */
8443 int check_SIG_ATOMIC:
8444 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
8445 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
8446 ? 1 : -1;
8447 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
8448 int check_WCHAR:
8449 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
8450 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
8451 ? 1 : -1;
8452 /* Detect bug in mingw. */
8453 int check_WINT:
8454 WINT_MIN == TYPE_MINIMUM (wint_t)
8455 && WINT_MAX == TYPE_MAXIMUM (wint_t)
8456 ? 1 : -1;
8457
8458 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
8459 int check_UINT8_C:
8460 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
8461 int check_UINT16_C:
8462 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
8463
8464 /* Detect bugs in OpenBSD 3.9 stdint.h. */
8465#ifdef UINT8_MAX
8466 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
8467#endif
8468#ifdef UINT16_MAX
8469 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
8470#endif
8471#ifdef UINT32_MAX
8472 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
8473#endif
8474#ifdef UINT64_MAX
8475 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
8476#endif
8477 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
8478 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
8479 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
8480 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
8481 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
8482 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
8483 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
8484 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
8485 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
8486 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
8487 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
8488};
8489
8490int
8491main ()
8492{
8493
8494 ;
8495 return 0;
8496}
8497_ACEOF
8498if ac_fn_c_try_compile "$LINENO"; then :
8499 if test "$cross_compiling" = yes; then :
8500 gl_cv_header_working_stdint_h=yes
8501
8502else
8503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8504/* end confdefs.h. */
8505
8506
8507#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
49e4877c
PA
8508#define __STDC_CONSTANT_MACROS 1
8509#define __STDC_LIMIT_MACROS 1
8690e634
JK
8510#include <stdint.h>
8511
8512
8513 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8514 included before <wchar.h>. */
8515 #include <stddef.h>
8516 #include <signal.h>
8517 #if HAVE_WCHAR_H
8518 # include <stdio.h>
8519 # include <time.h>
8520 # include <wchar.h>
8521 #endif
8522
8523
8524#include <stdio.h>
8525#include <string.h>
8526#define MVAL(macro) MVAL1(macro)
8527#define MVAL1(expression) #expression
8528static const char *macro_values[] =
8529 {
8530#ifdef INT8_MAX
8531 MVAL (INT8_MAX),
8532#endif
8533#ifdef INT16_MAX
8534 MVAL (INT16_MAX),
8535#endif
8536#ifdef INT32_MAX
8537 MVAL (INT32_MAX),
8538#endif
8539#ifdef INT64_MAX
8540 MVAL (INT64_MAX),
8541#endif
8542#ifdef UINT8_MAX
8543 MVAL (UINT8_MAX),
8544#endif
8545#ifdef UINT16_MAX
8546 MVAL (UINT16_MAX),
8547#endif
8548#ifdef UINT32_MAX
8549 MVAL (UINT32_MAX),
8550#endif
8551#ifdef UINT64_MAX
8552 MVAL (UINT64_MAX),
8553#endif
8554 NULL
8555 };
8556
8557int
8558main ()
8559{
8560
8561 const char **mv;
8562 for (mv = macro_values; *mv != NULL; mv++)
8563 {
8564 const char *value = *mv;
8565 /* Test whether it looks like a cast expression. */
8566 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
8567 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
8568 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
8569 || strncmp (value, "((int)"/*)*/, 6) == 0
8570 || strncmp (value, "((signed short)"/*)*/, 15) == 0
8571 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
8572 return mv - macro_values + 1;
8573 }
8574 return 0;
8575
8576 ;
8577 return 0;
8578}
8579_ACEOF
8580if ac_fn_c_try_run "$LINENO"; then :
8581 gl_cv_header_working_stdint_h=yes
8582fi
8583rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8584 conftest.$ac_objext conftest.beam conftest.$ac_ext
8585fi
8586
8587
8588fi
8589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8590
8591fi
8592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
8593$as_echo "$gl_cv_header_working_stdint_h" >&6; }
8594 fi
49e4877c
PA
8595
8596 HAVE_C99_STDINT_H=0
8597 HAVE_SYS_BITYPES_H=0
8598 HAVE_SYS_INTTYPES_H=0
8599 STDINT_H=stdint.h
8690e634 8600 if test "$gl_cv_header_working_stdint_h" = yes; then
49e4877c
PA
8601 HAVE_C99_STDINT_H=1
8602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
8603$as_echo_n "checking whether stdint.h predates C++11... " >&6; }
8604if test "${gl_cv_header_stdint_predates_cxx11_h+set}" = set; then :
8605 $as_echo_n "(cached) " >&6
8606else
8607 gl_cv_header_stdint_predates_cxx11_h=yes
8608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8609/* end confdefs.h. */
8610
8611
8612#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
8613#include <stdint.h>
8614
8615
8616 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8617 included before <wchar.h>. */
8618 #include <stddef.h>
8619 #include <signal.h>
8620 #if HAVE_WCHAR_H
8621 # include <stdio.h>
8622 # include <time.h>
8623 # include <wchar.h>
8624 #endif
8625
8626
8627intmax_t im = INTMAX_MAX;
8628int32_t i32 = INT32_C (0x7fffffff);
8629
8630int
8631main ()
8632{
8633
8634 ;
8635 return 0;
8636}
8637_ACEOF
8638if ac_fn_c_try_compile "$LINENO"; then :
8639 gl_cv_header_stdint_predates_cxx11_h=no
8640fi
8641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8642fi
8643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
8644$as_echo "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
8645
8646 if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
8647
8648$as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
8649
8650
8651$as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
8652
8653 fi
8654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
8655$as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
8656if test "${gl_cv_header_stdint_width+set}" = set; then :
8657 $as_echo_n "(cached) " >&6
8658else
8659 gl_cv_header_stdint_width=no
8660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8661/* end confdefs.h. */
8662
8663 /* Work if build is not clean. */
8664 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
8665 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
8666 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
8667 #endif
8668 #include <stdint.h>
8669
8670 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8671 included before <wchar.h>. */
8672 #include <stddef.h>
8673 #include <signal.h>
8674 #if HAVE_WCHAR_H
8675 # include <stdio.h>
8676 # include <time.h>
8677 # include <wchar.h>
8678 #endif
8679
8680 int iw = UINTMAX_WIDTH;
8681
8682int
8683main ()
8684{
8685
8686 ;
8687 return 0;
8688}
8689_ACEOF
8690if ac_fn_c_try_compile "$LINENO"; then :
8691 gl_cv_header_stdint_width=yes
8692fi
8693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8694fi
8695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
8696$as_echo "$gl_cv_header_stdint_width" >&6; }
8697 if test "$gl_cv_header_stdint_width" = yes; then
8698 STDINT_H=
8699 fi
8690e634
JK
8700 else
8701 for ac_header in sys/inttypes.h sys/bitypes.h
8702do :
8703 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8704ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8705eval as_val=\$$as_ac_Header
8706 if test "x$as_val" = x""yes; then :
8707 cat >>confdefs.h <<_ACEOF
8708#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8709_ACEOF
8710
8711fi
8712
8713done
8714
8715 if test $ac_cv_header_sys_inttypes_h = yes; then
8716 HAVE_SYS_INTTYPES_H=1
8690e634 8717 fi
8690e634
JK
8718 if test $ac_cv_header_sys_bitypes_h = yes; then
8719 HAVE_SYS_BITYPES_H=1
8690e634
JK
8720 fi
8721
8722
8690e634
JK
8723 if test $APPLE_UNIVERSAL_BUILD = 0; then
8724
8725
8726 for gltype in ptrdiff_t size_t ; do
8727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
8728$as_echo_n "checking for bit size of $gltype... " >&6; }
8729if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
8730 $as_echo_n "(cached) " >&6
8731else
8732 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
8733 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8734 included before <wchar.h>. */
8735 #include <stddef.h>
8736 #include <signal.h>
8737 #if HAVE_WCHAR_H
8738 # include <stdio.h>
8739 # include <time.h>
8740 # include <wchar.h>
8741 #endif
8742
8743#include <limits.h>"; then :
8744
8745else
8746 result=unknown
8747fi
8748
8749 eval gl_cv_bitsizeof_${gltype}=\$result
8750
8751fi
8752eval ac_res=\$gl_cv_bitsizeof_${gltype}
8753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8754$as_echo "$ac_res" >&6; }
8755 eval result=\$gl_cv_bitsizeof_${gltype}
8756 if test $result = unknown; then
8757 result=0
8758 fi
8759 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
8760 cat >>confdefs.h <<_ACEOF
8761#define BITSIZEOF_${GLTYPE} $result
8762_ACEOF
8763
8764 eval BITSIZEOF_${GLTYPE}=\$result
8765 done
8766
8767
8768 fi
8769
8770
8771 for gltype in sig_atomic_t wchar_t wint_t ; do
8772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
8773$as_echo_n "checking for bit size of $gltype... " >&6; }
8774if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
8775 $as_echo_n "(cached) " >&6
8776else
8777 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
8778 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8779 included before <wchar.h>. */
8780 #include <stddef.h>
8781 #include <signal.h>
8782 #if HAVE_WCHAR_H
8783 # include <stdio.h>
8784 # include <time.h>
8785 # include <wchar.h>
8786 #endif
8787
8788#include <limits.h>"; then :
8789
8790else
8791 result=unknown
8792fi
8793
8794 eval gl_cv_bitsizeof_${gltype}=\$result
8795
8796fi
8797eval ac_res=\$gl_cv_bitsizeof_${gltype}
8798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8799$as_echo "$ac_res" >&6; }
8800 eval result=\$gl_cv_bitsizeof_${gltype}
8801 if test $result = unknown; then
8802 result=0
8803 fi
8804 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
8805 cat >>confdefs.h <<_ACEOF
8806#define BITSIZEOF_${GLTYPE} $result
8807_ACEOF
8808
8809 eval BITSIZEOF_${GLTYPE}=\$result
8810 done
8811
8812
8813
8814
8815 for gltype in sig_atomic_t wchar_t wint_t ; do
8816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
8817$as_echo_n "checking whether $gltype is signed... " >&6; }
8818if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
8819 $as_echo_n "(cached) " >&6
8820else
8821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8822/* end confdefs.h. */
8823
8824 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8825 included before <wchar.h>. */
8826 #include <stddef.h>
8827 #include <signal.h>
8828 #if HAVE_WCHAR_H
8829 # include <stdio.h>
8830 # include <time.h>
8831 # include <wchar.h>
8832 #endif
8833
8834 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
8835int
8836main ()
8837{
8838
8839 ;
8840 return 0;
8841}
8842_ACEOF
8843if ac_fn_c_try_compile "$LINENO"; then :
8844 result=yes
8845else
8846 result=no
8847fi
8848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8849 eval gl_cv_type_${gltype}_signed=\$result
8850
8851fi
8852eval ac_res=\$gl_cv_type_${gltype}_signed
8853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8854$as_echo "$ac_res" >&6; }
8855 eval result=\$gl_cv_type_${gltype}_signed
8856 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
8857 if test "$result" = yes; then
8858 cat >>confdefs.h <<_ACEOF
8859#define HAVE_SIGNED_${GLTYPE} 1
8860_ACEOF
8861
8862 eval HAVE_SIGNED_${GLTYPE}=1
8863 else
8864 eval HAVE_SIGNED_${GLTYPE}=0
8865 fi
8866 done
8867
8868
8869 gl_cv_type_ptrdiff_t_signed=yes
8870 gl_cv_type_size_t_signed=no
8871 if test $APPLE_UNIVERSAL_BUILD = 0; then
8872
8873
8874 for gltype in ptrdiff_t size_t ; do
8875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
8876$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
8877if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
8878 $as_echo_n "(cached) " >&6
8879else
8880 eval gl_cv_type_${gltype}_suffix=no
8881 eval result=\$gl_cv_type_${gltype}_signed
8882 if test "$result" = yes; then
8883 glsufu=
8884 else
8885 glsufu=u
8886 fi
8887 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
8888 case $glsuf in
8889 '') gltype1='int';;
8890 l) gltype1='long int';;
8891 ll) gltype1='long long int';;
8892 i64) gltype1='__int64';;
8893 u) gltype1='unsigned int';;
8894 ul) gltype1='unsigned long int';;
8895 ull) gltype1='unsigned long long int';;
8896 ui64)gltype1='unsigned __int64';;
8897 esac
8898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8899/* end confdefs.h. */
8900
8901 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8902 included before <wchar.h>. */
8903 #include <stddef.h>
8904 #include <signal.h>
8905 #if HAVE_WCHAR_H
8906 # include <stdio.h>
8907 # include <time.h>
8908 # include <wchar.h>
8909 #endif
8910
8911 extern $gltype foo;
8912 extern $gltype1 foo;
8913int
8914main ()
8915{
8916
8917 ;
8918 return 0;
8919}
8920_ACEOF
8921if ac_fn_c_try_compile "$LINENO"; then :
8922 eval gl_cv_type_${gltype}_suffix=\$glsuf
8923fi
8924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8925 eval result=\$gl_cv_type_${gltype}_suffix
8926 test "$result" != no && break
8927 done
8928fi
8929eval ac_res=\$gl_cv_type_${gltype}_suffix
8930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8931$as_echo "$ac_res" >&6; }
8932 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
8933 eval result=\$gl_cv_type_${gltype}_suffix
8934 test "$result" = no && result=
8935 eval ${GLTYPE}_SUFFIX=\$result
8936 cat >>confdefs.h <<_ACEOF
8937#define ${GLTYPE}_SUFFIX $result
8938_ACEOF
8939
8940 done
8941
8942
8943 fi
8944
8945
8946 for gltype in sig_atomic_t wchar_t wint_t ; do
8947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
8948$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
8949if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
8950 $as_echo_n "(cached) " >&6
8951else
8952 eval gl_cv_type_${gltype}_suffix=no
8953 eval result=\$gl_cv_type_${gltype}_signed
8954 if test "$result" = yes; then
8955 glsufu=
8956 else
8957 glsufu=u
8958 fi
8959 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
8960 case $glsuf in
8961 '') gltype1='int';;
8962 l) gltype1='long int';;
8963 ll) gltype1='long long int';;
8964 i64) gltype1='__int64';;
8965 u) gltype1='unsigned int';;
8966 ul) gltype1='unsigned long int';;
8967 ull) gltype1='unsigned long long int';;
8968 ui64)gltype1='unsigned __int64';;
8969 esac
8970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8971/* end confdefs.h. */
8972
8973 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8974 included before <wchar.h>. */
8975 #include <stddef.h>
8976 #include <signal.h>
8977 #if HAVE_WCHAR_H
8978 # include <stdio.h>
8979 # include <time.h>
8980 # include <wchar.h>
8981 #endif
8982
8983 extern $gltype foo;
8984 extern $gltype1 foo;
8985int
8986main ()
8987{
8988
8989 ;
8990 return 0;
8991}
8992_ACEOF
8993if ac_fn_c_try_compile "$LINENO"; then :
8994 eval gl_cv_type_${gltype}_suffix=\$glsuf
8995fi
8996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8997 eval result=\$gl_cv_type_${gltype}_suffix
8998 test "$result" != no && break
8999 done
9000fi
9001eval ac_res=\$gl_cv_type_${gltype}_suffix
9002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9003$as_echo "$ac_res" >&6; }
9004 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
9005 eval result=\$gl_cv_type_${gltype}_suffix
9006 test "$result" = no && result=
9007 eval ${GLTYPE}_SUFFIX=\$result
9008 cat >>confdefs.h <<_ACEOF
9009#define ${GLTYPE}_SUFFIX $result
9010_ACEOF
9011
9012 done
9013
9014
9015
9016 if test $BITSIZEOF_WINT_T -lt 32; then
9017 BITSIZEOF_WINT_T=32
9018 fi
9019
8690e634
JK
9020 fi
9021
49e4877c
PA
9022 # The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH.
9023 LIMITS_H=limits.h
9024 if test -n "$LIMITS_H"; then
9025 GL_GENERATE_LIMITS_H_TRUE=
9026 GL_GENERATE_LIMITS_H_FALSE='#'
9027else
9028 GL_GENERATE_LIMITS_H_TRUE='#'
9029 GL_GENERATE_LIMITS_H_FALSE=
9030fi
9031
9032
9033
9034
9035
9036
8690e634
JK
9037 if test -n "$STDINT_H"; then
9038 GL_GENERATE_STDINT_H_TRUE=
9039 GL_GENERATE_STDINT_H_FALSE='#'
9040else
9041 GL_GENERATE_STDINT_H_TRUE='#'
9042 GL_GENERATE_STDINT_H_FALSE=
9043fi
9044
9045
9046
9047
9048
8690e634
JK
9049 GNULIB_IMAXABS=0;
9050 GNULIB_IMAXDIV=0;
9051 GNULIB_STRTOIMAX=0;
9052 GNULIB_STRTOUMAX=0;
9053 HAVE_DECL_IMAXABS=1;
9054 HAVE_DECL_IMAXDIV=1;
9055 HAVE_DECL_STRTOIMAX=1;
9056 HAVE_DECL_STRTOUMAX=1;
9057 REPLACE_STRTOIMAX=0;
4a626d0a 9058 REPLACE_STRTOUMAX=0;
8690e634
JK
9059 INT32_MAX_LT_INTMAX_MAX=1;
9060 INT64_MAX_EQ_LONG_MAX='defined _LP64';
9061 PRI_MACROS_BROKEN=0;
9062 PRIPTR_PREFIX=__PRIPTR_PREFIX;
9063 UINT32_MAX_LT_UINTMAX_MAX=1;
9064 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
9065
9066
9067
9068
8690e634
JK
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
8690e634
JK
9080 if test $gl_cv_have_include_next = yes; then
9081 gl_cv_next_inttypes_h='<'inttypes.h'>'
9082 else
9083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
9084$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
9085if test "${gl_cv_next_inttypes_h+set}" = set; then :
9086 $as_echo_n "(cached) " >&6
9087else
9088
9089 if test $ac_cv_header_inttypes_h = yes; then
9090
9091
4a626d0a
PA
9092
9093
9094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
9095/* end confdefs.h. */
9096#include <inttypes.h>
8690e634 9097_ACEOF
4a626d0a
PA
9098 case "$host_os" in
9099 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9100 *) gl_absname_cpp="$ac_cpp" ;;
9101 esac
9102
9103 case "$host_os" in
9104 mingw*)
9105 gl_dirsep_regex='[/\\]'
9106 ;;
9107 *)
9108 gl_dirsep_regex='\/'
9109 ;;
9110 esac
9111 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9112 gl_header_literal_regex=`echo 'inttypes.h' \
9113 | sed -e "$gl_make_literal_regex_sed"`
9114 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9115 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9116 s|^/[^/]|//&|
9117 p
9118 q
9119 }'
9120
9121 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9122 sed -n "$gl_absolute_header_sed"`
9123
9124 gl_header=$gl_cv_absolute_inttypes_h
9125 gl_cv_next_inttypes_h='"'$gl_header'"'
8690e634
JK
9126 else
9127 gl_cv_next_inttypes_h='<'inttypes.h'>'
9128 fi
9129
9130
9131fi
9132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
9133$as_echo "$gl_cv_next_inttypes_h" >&6; }
9134 fi
9135 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
9136
9137 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9138 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9139 gl_next_as_first_directive='<'inttypes.h'>'
9140 else
9141 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9142 gl_next_as_first_directive=$gl_cv_next_inttypes_h
9143 fi
9144 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
9145
9146
9147
9148
9149
9150
9151
9152
9153 for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
9154 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
9155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
9156$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
9157if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
9158 $as_echo_n "(cached) " >&6
9159else
9160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9161/* end confdefs.h. */
9162#include <inttypes.h>
9163
9164int
9165main ()
9166{
9167#undef $gl_func
9168 (void) $gl_func;
9169 ;
9170 return 0;
9171}
9172_ACEOF
9173if ac_fn_c_try_compile "$LINENO"; then :
9174 eval "$as_gl_Symbol=yes"
9175else
9176 eval "$as_gl_Symbol=no"
9177fi
9178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9179fi
9180eval ac_res=\$$as_gl_Symbol
9181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9182$as_echo "$ac_res" >&6; }
9183 eval as_val=\$$as_gl_Symbol
9184 if test "x$as_val" = x""yes; then :
9185 cat >>confdefs.h <<_ACEOF
9186#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
9187_ACEOF
9188
9189 eval ac_cv_have_decl_$gl_func=yes
9190fi
9191 done
9192
9193
9194
9195 for ac_header in inttypes.h
9196do :
9197 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
9198if test "x$ac_cv_header_inttypes_h" = x""yes; then :
9199 cat >>confdefs.h <<_ACEOF
9200#define HAVE_INTTYPES_H 1
9201_ACEOF
9202
9203fi
9204
9205done
9206
9207 if test $ac_cv_header_inttypes_h = yes; then
9208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
9209$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
9210if test "${gt_cv_inttypes_pri_broken+set}" = set; then :
9211 $as_echo_n "(cached) " >&6
9212else
9213
9214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9215/* end confdefs.h. */
9216
9217#include <inttypes.h>
9218#ifdef PRId32
9219char *p = PRId32;
9220#endif
9221
9222int
9223main ()
9224{
9225
9226 ;
9227 return 0;
9228}
9229_ACEOF
9230if ac_fn_c_try_compile "$LINENO"; then :
9231 gt_cv_inttypes_pri_broken=no
9232else
9233 gt_cv_inttypes_pri_broken=yes
9234fi
9235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9236
9237fi
9238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
9239$as_echo "$gt_cv_inttypes_pri_broken" >&6; }
9240 fi
9241 if test "$gt_cv_inttypes_pri_broken" = yes; then
9242
9243cat >>confdefs.h <<_ACEOF
9244#define PRI_MACROS_BROKEN 1
9245_ACEOF
9246
9247 PRI_MACROS_BROKEN=1
9248 else
9249 PRI_MACROS_BROKEN=0
9250 fi
9251
9252
9253
88b48903
WN
9254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
9255$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
9256if test "${gl_cv_cc_double_expbit0+set}" = set; then :
8690e634
JK
9257 $as_echo_n "(cached) " >&6
9258else
88b48903
WN
9259
9260 if test "$cross_compiling" = yes; then :
9261
9262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 9263/* end confdefs.h. */
88b48903
WN
9264
9265#if defined arm || defined __arm || defined __arm__
9266 mixed_endianness
9267#endif
9268
9269_ACEOF
9270if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9271 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
9272 gl_cv_cc_double_expbit0="unknown"
9273else
9274
9275 :
9276if test "${ac_cv_c_bigendian+set}" = set; then :
9277 $as_echo_n "(cached) " >&6
9278else
9279 ac_cv_c_bigendian=unknown
9280 # See if we're dealing with a universal compiler.
9281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9282/* end confdefs.h. */
9283#ifndef __APPLE_CC__
9284 not a universal capable compiler
9285 #endif
9286 typedef int dummy;
9287
9288_ACEOF
9289if ac_fn_c_try_compile "$LINENO"; then :
9290
9291 # Check for potential -arch flags. It is not universal unless
9292 # there are at least two -arch flags with different values.
9293 ac_arch=
9294 ac_prev=
9295 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9296 if test -n "$ac_prev"; then
9297 case $ac_word in
9298 i?86 | x86_64 | ppc | ppc64)
9299 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9300 ac_arch=$ac_word
9301 else
9302 ac_cv_c_bigendian=universal
9303 break
9304 fi
9305 ;;
9306 esac
9307 ac_prev=
9308 elif test "x$ac_word" = "x-arch"; then
9309 ac_prev=arch
9310 fi
9311 done
9312fi
9313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9314 if test $ac_cv_c_bigendian = unknown; then
9315 # See if sys/param.h defines the BYTE_ORDER macro.
9316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9317/* end confdefs.h. */
9318#include <sys/types.h>
9319 #include <sys/param.h>
9320
8690e634
JK
9321int
9322main ()
9323{
88b48903
WN
9324#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9325 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9326 && LITTLE_ENDIAN)
9327 bogus endian macros
9328 #endif
9329
8690e634
JK
9330 ;
9331 return 0;
9332}
9333_ACEOF
88b48903
WN
9334if ac_fn_c_try_compile "$LINENO"; then :
9335 # It does; now see whether it defined to BIG_ENDIAN or not.
9336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9337/* end confdefs.h. */
9338#include <sys/types.h>
9339 #include <sys/param.h>
9340
9341int
9342main ()
9343{
9344#if BYTE_ORDER != BIG_ENDIAN
9345 not big endian
9346 #endif
9347
9348 ;
9349 return 0;
9350}
9351_ACEOF
9352if ac_fn_c_try_compile "$LINENO"; then :
9353 ac_cv_c_bigendian=yes
8690e634 9354else
88b48903 9355 ac_cv_c_bigendian=no
8690e634 9356fi
88b48903 9357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 9358fi
88b48903
WN
9359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9360 fi
9361 if test $ac_cv_c_bigendian = unknown; then
9362 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9364/* end confdefs.h. */
9365#include <limits.h>
8690e634 9366
88b48903
WN
9367int
9368main ()
9369{
9370#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9371 bogus endian macros
9372 #endif
8690e634 9373
88b48903
WN
9374 ;
9375 return 0;
9376}
9377_ACEOF
9378if ac_fn_c_try_compile "$LINENO"; then :
9379 # It does; now see whether it defined to _BIG_ENDIAN or not.
9380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9381/* end confdefs.h. */
9382#include <limits.h>
8690e634 9383
88b48903
WN
9384int
9385main ()
9386{
9387#ifndef _BIG_ENDIAN
9388 not big endian
9389 #endif
8690e634 9390
88b48903
WN
9391 ;
9392 return 0;
9393}
9394_ACEOF
9395if ac_fn_c_try_compile "$LINENO"; then :
9396 ac_cv_c_bigendian=yes
9397else
9398 ac_cv_c_bigendian=no
9399fi
9400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9401fi
9402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9403 fi
9404 if test $ac_cv_c_bigendian = unknown; then
9405 # Compile a test program.
9406 if test "$cross_compiling" = yes; then :
9407 # Try to guess by grepping values from an object file.
9408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9409/* end confdefs.h. */
9410short int ascii_mm[] =
9411 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9412 short int ascii_ii[] =
9413 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9414 int use_ascii (int i) {
9415 return ascii_mm[i] + ascii_ii[i];
9416 }
9417 short int ebcdic_ii[] =
9418 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9419 short int ebcdic_mm[] =
9420 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9421 int use_ebcdic (int i) {
9422 return ebcdic_mm[i] + ebcdic_ii[i];
9423 }
9424 extern int foo;
8690e634 9425
88b48903
WN
9426int
9427main ()
9428{
9429return use_ascii (foo) == use_ebcdic (foo);
9430 ;
9431 return 0;
9432}
9433_ACEOF
9434if ac_fn_c_try_compile "$LINENO"; then :
9435 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9436 ac_cv_c_bigendian=yes
9437 fi
9438 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9439 if test "$ac_cv_c_bigendian" = unknown; then
9440 ac_cv_c_bigendian=no
9441 else
9442 # finding both strings is unlikely to happen, but who knows?
9443 ac_cv_c_bigendian=unknown
9444 fi
9445 fi
9446fi
9447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9448else
9449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9450/* end confdefs.h. */
9451$ac_includes_default
9452int
9453main ()
9454{
8690e634 9455
88b48903
WN
9456 /* Are we little or big endian? From Harbison&Steele. */
9457 union
9458 {
9459 long int l;
9460 char c[sizeof (long int)];
9461 } u;
9462 u.l = 1;
9463 return u.c[sizeof (long int) - 1] == 1;
8690e634 9464
88b48903
WN
9465 ;
9466 return 0;
9467}
9468_ACEOF
9469if ac_fn_c_try_run "$LINENO"; then :
9470 ac_cv_c_bigendian=no
9471else
9472 ac_cv_c_bigendian=yes
9473fi
9474rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9475 conftest.$ac_objext conftest.beam conftest.$ac_ext
9476fi
8690e634 9477
88b48903
WN
9478 fi
9479fi
9480:
9481 case $ac_cv_c_bigendian in #(
9482 yes)
9483 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
9484 no)
9485 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
9486 universal)
8690e634 9487
88b48903 9488$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
8690e634 9489
88b48903
WN
9490 ;; #(
9491 *)
9492 gl_cv_cc_double_expbit0="unknown" ;;
9493 esac
8690e634
JK
9494
9495
88b48903
WN
9496fi
9497rm -f conftest*
8690e634 9498
8690e634 9499
88b48903
WN
9500else
9501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9502/* end confdefs.h. */
8690e634 9503
88b48903
WN
9504#include <float.h>
9505#include <stddef.h>
9506#include <stdio.h>
9507#include <string.h>
9508#define NWORDS \
9509 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
9510typedef union { double value; unsigned int word[NWORDS]; } memory_double;
9511static unsigned int ored_words[NWORDS];
9512static unsigned int anded_words[NWORDS];
9513static void add_to_ored_words (double x)
9514{
9515 memory_double m;
9516 size_t i;
9517 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
9518 memset (&m, 0, sizeof (memory_double));
9519 m.value = x;
9520 for (i = 0; i < NWORDS; i++)
9521 {
9522 ored_words[i] |= m.word[i];
9523 anded_words[i] &= m.word[i];
9524 }
9525}
9526int main ()
9527{
9528 size_t j;
9529 FILE *fp = fopen ("conftest.out", "w");
9530 if (fp == NULL)
9531 return 1;
9532 for (j = 0; j < NWORDS; j++)
9533 anded_words[j] = ~ (unsigned int) 0;
9534 add_to_ored_words (0.25);
9535 add_to_ored_words (0.5);
9536 add_to_ored_words (1.0);
9537 add_to_ored_words (2.0);
9538 add_to_ored_words (4.0);
9539 /* Remove bits that are common (e.g. if representation of the first mantissa
9540 bit is explicit). */
9541 for (j = 0; j < NWORDS; j++)
9542 ored_words[j] &= ~anded_words[j];
9543 /* Now find the nonzero word. */
9544 for (j = 0; j < NWORDS; j++)
9545 if (ored_words[j] != 0)
9546 break;
9547 if (j < NWORDS)
9548 {
9549 size_t i;
9550 for (i = j + 1; i < NWORDS; i++)
9551 if (ored_words[i] != 0)
9552 {
9553 fprintf (fp, "unknown");
9554 return (fclose (fp) != 0);
9555 }
9556 for (i = 0; ; i++)
9557 if ((ored_words[j] >> i) & 1)
9558 {
9559 fprintf (fp, "word %d bit %d", (int) j, (int) i);
9560 return (fclose (fp) != 0);
9561 }
9562 }
9563 fprintf (fp, "unknown");
9564 return (fclose (fp) != 0);
9565}
8690e634 9566
88b48903
WN
9567_ACEOF
9568if ac_fn_c_try_run "$LINENO"; then :
9569 gl_cv_cc_double_expbit0=`cat conftest.out`
9570else
9571 gl_cv_cc_double_expbit0="unknown"
9572fi
9573rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9574 conftest.$ac_objext conftest.beam conftest.$ac_ext
9575fi
8690e634 9576
88b48903 9577 rm -f conftest.out
8690e634 9578
88b48903
WN
9579fi
9580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
9581$as_echo "$gl_cv_cc_double_expbit0" >&6; }
9582 case "$gl_cv_cc_double_expbit0" in
9583 word*bit*)
9584 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
9585 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
8690e634 9586
88b48903
WN
9587cat >>confdefs.h <<_ACEOF
9588#define DBL_EXPBIT0_WORD $word
9589_ACEOF
8690e634
JK
9590
9591
88b48903
WN
9592cat >>confdefs.h <<_ACEOF
9593#define DBL_EXPBIT0_BIT $bit
9594_ACEOF
8690e634 9595
88b48903
WN
9596 ;;
9597 esac
8690e634
JK
9598
9599
88b48903
WN
9600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9601$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
9602if test "${ac_cv_c_bigendian+set}" = set; then :
8690e634
JK
9603 $as_echo_n "(cached) " >&6
9604else
88b48903
WN
9605 ac_cv_c_bigendian=unknown
9606 # See if we're dealing with a universal compiler.
9607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9608/* end confdefs.h. */
9609#ifndef __APPLE_CC__
9610 not a universal capable compiler
9611 #endif
9612 typedef int dummy;
9613
9614_ACEOF
9615if ac_fn_c_try_compile "$LINENO"; then :
9616
9617 # Check for potential -arch flags. It is not universal unless
9618 # there are at least two -arch flags with different values.
9619 ac_arch=
9620 ac_prev=
9621 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9622 if test -n "$ac_prev"; then
9623 case $ac_word in
9624 i?86 | x86_64 | ppc | ppc64)
9625 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9626 ac_arch=$ac_word
9627 else
9628 ac_cv_c_bigendian=universal
9629 break
9630 fi
9631 ;;
9632 esac
9633 ac_prev=
9634 elif test "x$ac_word" = "x-arch"; then
9635 ac_prev=arch
9636 fi
9637 done
9638fi
9639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9640 if test $ac_cv_c_bigendian = unknown; then
9641 # See if sys/param.h defines the BYTE_ORDER macro.
9642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
9643/* end confdefs.h. */
9644#include <sys/types.h>
88b48903
WN
9645 #include <sys/param.h>
9646
9647int
9648main ()
9649{
9650#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9651 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9652 && LITTLE_ENDIAN)
9653 bogus endian macros
9654 #endif
9655
9656 ;
9657 return 0;
9658}
9659_ACEOF
9660if ac_fn_c_try_compile "$LINENO"; then :
9661 # It does; now see whether it defined to BIG_ENDIAN or not.
9662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9663/* end confdefs.h. */
9664#include <sys/types.h>
9665 #include <sys/param.h>
9666
9667int
9668main ()
9669{
9670#if BYTE_ORDER != BIG_ENDIAN
9671 not big endian
9672 #endif
9673
9674 ;
9675 return 0;
9676}
9677_ACEOF
9678if ac_fn_c_try_compile "$LINENO"; then :
9679 ac_cv_c_bigendian=yes
9680else
9681 ac_cv_c_bigendian=no
9682fi
9683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9684fi
9685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9686 fi
9687 if test $ac_cv_c_bigendian = unknown; then
9688 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9690/* end confdefs.h. */
9691#include <limits.h>
9692
9693int
9694main ()
9695{
9696#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9697 bogus endian macros
9698 #endif
9699
9700 ;
9701 return 0;
9702}
9703_ACEOF
9704if ac_fn_c_try_compile "$LINENO"; then :
9705 # It does; now see whether it defined to _BIG_ENDIAN or not.
9706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9707/* end confdefs.h. */
9708#include <limits.h>
9709
9710int
9711main ()
9712{
9713#ifndef _BIG_ENDIAN
9714 not big endian
9715 #endif
9716
9717 ;
9718 return 0;
9719}
9720_ACEOF
9721if ac_fn_c_try_compile "$LINENO"; then :
9722 ac_cv_c_bigendian=yes
9723else
9724 ac_cv_c_bigendian=no
9725fi
9726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9727fi
9728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9729 fi
9730 if test $ac_cv_c_bigendian = unknown; then
9731 # Compile a test program.
9732 if test "$cross_compiling" = yes; then :
9733 # Try to guess by grepping values from an object file.
9734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9735/* end confdefs.h. */
9736short int ascii_mm[] =
9737 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9738 short int ascii_ii[] =
9739 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9740 int use_ascii (int i) {
9741 return ascii_mm[i] + ascii_ii[i];
9742 }
9743 short int ebcdic_ii[] =
9744 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9745 short int ebcdic_mm[] =
9746 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9747 int use_ebcdic (int i) {
9748 return ebcdic_mm[i] + ebcdic_ii[i];
9749 }
9750 extern int foo;
9751
9752int
9753main ()
9754{
9755return use_ascii (foo) == use_ebcdic (foo);
9756 ;
9757 return 0;
9758}
9759_ACEOF
9760if ac_fn_c_try_compile "$LINENO"; then :
9761 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9762 ac_cv_c_bigendian=yes
9763 fi
9764 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9765 if test "$ac_cv_c_bigendian" = unknown; then
9766 ac_cv_c_bigendian=no
9767 else
9768 # finding both strings is unlikely to happen, but who knows?
9769 ac_cv_c_bigendian=unknown
9770 fi
9771 fi
9772fi
9773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9774else
9775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9776/* end confdefs.h. */
9777$ac_includes_default
9778int
9779main ()
9780{
9781
9782 /* Are we little or big endian? From Harbison&Steele. */
9783 union
9784 {
9785 long int l;
9786 char c[sizeof (long int)];
9787 } u;
9788 u.l = 1;
9789 return u.c[sizeof (long int) - 1] == 1;
9790
9791 ;
9792 return 0;
9793}
9794_ACEOF
9795if ac_fn_c_try_run "$LINENO"; then :
9796 ac_cv_c_bigendian=no
9797else
9798 ac_cv_c_bigendian=yes
9799fi
9800rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9801 conftest.$ac_objext conftest.beam conftest.$ac_ext
9802fi
9803
9804 fi
9805fi
9806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9807$as_echo "$ac_cv_c_bigendian" >&6; }
9808 case $ac_cv_c_bigendian in #(
9809 yes)
9810 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
9811;; #(
9812 no)
9813 ;; #(
9814 universal)
9815
9816$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9817
9818 ;; #(
9819 *)
9820 as_fn_error "unknown endianness
9821 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9822 esac
9823
9824
9825
2196f55f
YQ
9826
9827 case "$host_os" in
9828 mingw*)
9829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
9830$as_echo_n "checking for 64-bit off_t... " >&6; }
9831if test "${gl_cv_type_off_t_64+set}" = set; then :
9832 $as_echo_n "(cached) " >&6
9833else
9834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9835/* end confdefs.h. */
9836#include <sys/types.h>
9837 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
9838
9839int
9840main ()
9841{
9842
9843 ;
9844 return 0;
9845}
9846_ACEOF
9847if ac_fn_c_try_compile "$LINENO"; then :
9848 gl_cv_type_off_t_64=yes
9849else
9850 gl_cv_type_off_t_64=no
9851fi
9852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9853
9854fi
9855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
9856$as_echo "$gl_cv_type_off_t_64" >&6; }
9857 if test $gl_cv_type_off_t_64 = no; then
9858 WINDOWS_64_BIT_OFF_T=1
9859 else
9860 WINDOWS_64_BIT_OFF_T=0
9861 fi
9862 WINDOWS_64_BIT_ST_SIZE=1
9863 ;;
9864 *)
9865 WINDOWS_64_BIT_OFF_T=0
9866 WINDOWS_64_BIT_ST_SIZE=0
9867 ;;
9868 esac
9869
9870
88b48903
WN
9871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
9872$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
9873if test "${am_cv_langinfo_codeset+set}" = set; then :
9874 $as_echo_n "(cached) " >&6
9875else
9876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9877/* end confdefs.h. */
9878#include <langinfo.h>
9879int
9880main ()
9881{
9882char* cs = nl_langinfo(CODESET); return !cs;
9883 ;
9884 return 0;
9885}
9886_ACEOF
9887if ac_fn_c_try_link "$LINENO"; then :
9888 am_cv_langinfo_codeset=yes
9889else
9890 am_cv_langinfo_codeset=no
9891fi
9892rm -f core conftest.err conftest.$ac_objext \
9893 conftest$ac_exeext conftest.$ac_ext
9894
9895fi
9896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
9897$as_echo "$am_cv_langinfo_codeset" >&6; }
9898 if test $am_cv_langinfo_codeset = yes; then
9899
9900$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
9901
9902 fi
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
88b48903
WN
9913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
9914$as_echo_n "checking for working fcntl.h... " >&6; }
9915if test "${gl_cv_header_working_fcntl_h+set}" = set; then :
9916 $as_echo_n "(cached) " >&6
9917else
9918 if test "$cross_compiling" = yes; then :
9919 gl_cv_header_working_fcntl_h=cross-compiling
9920else
9921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9922/* end confdefs.h. */
9923#include <sys/types.h>
9924 #include <sys/stat.h>
9925 #if HAVE_UNISTD_H
9926 # include <unistd.h>
9927 #else /* on Windows with MSVC */
9928 # include <io.h>
9929 # include <stdlib.h>
8690e634
JK
9930 # defined sleep(n) _sleep ((n) * 1000)
9931 #endif
9932 #include <fcntl.h>
9933 #ifndef O_NOATIME
9934 #define O_NOATIME 0
9935 #endif
9936 #ifndef O_NOFOLLOW
9937 #define O_NOFOLLOW 0
9938 #endif
9939 static int const constants[] =
9940 {
9941 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
9942 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
9943 };
9944
9945int
9946main ()
9947{
9948
9949 int result = !constants;
9950 #if HAVE_SYMLINK
9951 {
9952 static char const sym[] = "conftest.sym";
a512b375
JB
9953 if (symlink ("/dev/null", sym) != 0)
9954 result |= 2;
9955 else
9956 {
9957 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
9958 if (fd >= 0)
9959 {
9960 close (fd);
9961 result |= 4;
9962 }
9963 }
9964 if (unlink (sym) != 0 || symlink (".", sym) != 0)
8690e634
JK
9965 result |= 2;
9966 else
9967 {
9968 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
9969 if (fd >= 0)
9970 {
9971 close (fd);
9972 result |= 4;
9973 }
9974 }
9975 unlink (sym);
9976 }
9977 #endif
9978 {
9979 static char const file[] = "confdefs.h";
9980 int fd = open (file, O_RDONLY | O_NOATIME);
9981 if (fd < 0)
9982 result |= 8;
9983 else
9984 {
9985 struct stat st0;
9986 if (fstat (fd, &st0) != 0)
9987 result |= 16;
9988 else
9989 {
9990 char c;
9991 sleep (1);
9992 if (read (fd, &c, 1) != 1)
9993 result |= 24;
9994 else
9995 {
9996 if (close (fd) != 0)
9997 result |= 32;
9998 else
9999 {
10000 struct stat st1;
10001 if (stat (file, &st1) != 0)
10002 result |= 40;
10003 else
10004 if (st0.st_atime != st1.st_atime)
10005 result |= 64;
10006 }
10007 }
10008 }
10009 }
10010 }
10011 return result;
10012 ;
10013 return 0;
10014}
10015_ACEOF
10016if ac_fn_c_try_run "$LINENO"; then :
10017 gl_cv_header_working_fcntl_h=yes
10018else
10019 case $? in #(
10020 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
10021 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
10022 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
10023 *) gl_cv_header_working_fcntl_h='no';;
10024 esac
10025fi
10026rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10027 conftest.$ac_objext conftest.beam conftest.$ac_ext
10028fi
10029
10030fi
10031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
10032$as_echo "$gl_cv_header_working_fcntl_h" >&6; }
10033
10034 case $gl_cv_header_working_fcntl_h in #(
10035 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
10036 *) ac_val=1;;
10037 esac
10038
10039cat >>confdefs.h <<_ACEOF
10040#define HAVE_WORKING_O_NOATIME $ac_val
10041_ACEOF
10042
10043
10044 case $gl_cv_header_working_fcntl_h in #(
10045 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
10046 *) ac_val=1;;
10047 esac
10048
10049cat >>confdefs.h <<_ACEOF
10050#define HAVE_WORKING_O_NOFOLLOW $ac_val
10051_ACEOF
10052
10053
3574124b 10054ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
8690e634
JK
10055if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then :
10056 ac_have_decl=1
10057else
10058 ac_have_decl=0
10059fi
10060
10061cat >>confdefs.h <<_ACEOF
10062#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
10063_ACEOF
10064
10065
8690e634
JK
10066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
10067$as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
10068if test "${ac_cv_gnu_library_2_1+set}" = set; then :
10069 $as_echo_n "(cached) " >&6
10070else
10071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10072/* end confdefs.h. */
10073
10074#include <features.h>
10075#ifdef __GNU_LIBRARY__
10076 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
10077 Lucky GNU user
10078 #endif
10079#endif
10080#ifdef __UCLIBC__
10081 Lucky user
10082#endif
10083
10084_ACEOF
10085if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10086 $EGREP "Lucky" >/dev/null 2>&1; then :
10087 ac_cv_gnu_library_2_1=yes
10088else
10089 ac_cv_gnu_library_2_1=no
10090fi
10091rm -f conftest*
10092
10093
10094
10095fi
10096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
10097$as_echo "$ac_cv_gnu_library_2_1" >&6; }
10098
10099 GLIBC21="$ac_cv_gnu_library_2_1"
10100
10101
10102
f45c62c4
YQ
10103 GNULIB_FCHMODAT=0;
10104 GNULIB_FSTAT=0;
10105 GNULIB_FSTATAT=0;
10106 GNULIB_FUTIMENS=0;
10107 GNULIB_LCHMOD=0;
10108 GNULIB_LSTAT=0;
10109 GNULIB_MKDIRAT=0;
10110 GNULIB_MKFIFO=0;
10111 GNULIB_MKFIFOAT=0;
10112 GNULIB_MKNOD=0;
10113 GNULIB_MKNODAT=0;
10114 GNULIB_STAT=0;
10115 GNULIB_UTIMENSAT=0;
10116 HAVE_FCHMODAT=1;
10117 HAVE_FSTATAT=1;
10118 HAVE_FUTIMENS=1;
10119 HAVE_LCHMOD=1;
10120 HAVE_LSTAT=1;
10121 HAVE_MKDIRAT=1;
10122 HAVE_MKFIFO=1;
10123 HAVE_MKFIFOAT=1;
10124 HAVE_MKNOD=1;
10125 HAVE_MKNODAT=1;
10126 HAVE_UTIMENSAT=1;
10127 REPLACE_FSTAT=0;
10128 REPLACE_FSTATAT=0;
10129 REPLACE_FUTIMENS=0;
10130 REPLACE_LSTAT=0;
10131 REPLACE_MKDIR=0;
10132 REPLACE_MKFIFO=0;
10133 REPLACE_MKNOD=0;
10134 REPLACE_STAT=0;
10135 REPLACE_UTIMENSAT=0;
10136
10137
10138
10139
10140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
10141$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
10142if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
10143 $as_echo_n "(cached) " >&6
10144else
10145 rm -f conftest.sym conftest.file
10146 echo >conftest.file
4a626d0a 10147 if test "$cross_compiling" = yes; then :
f45c62c4 10148 case "$host_os" in
4a626d0a
PA
10149 *-gnu*)
10150 # Guess yes on glibc systems.
10151 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
10152 *)
10153 # If we don't know, assume the worst.
10154 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
10155 esac
f45c62c4
YQ
10156
10157else
10158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10159/* end confdefs.h. */
10160$ac_includes_default
10161int
10162main ()
10163{
10164struct stat sbuf;
4a626d0a
PA
10165 if (symlink ("conftest.file", "conftest.sym") != 0)
10166 return 1;
10167 /* Linux will dereference the symlink and fail, as required by
10168 POSIX. That is better in the sense that it means we will not
10169 have to compile and use the lstat wrapper. */
10170 return lstat ("conftest.sym/", &sbuf) == 0;
f45c62c4
YQ
10171
10172 ;
10173 return 0;
10174}
10175_ACEOF
10176if ac_fn_c_try_run "$LINENO"; then :
10177 gl_cv_func_lstat_dereferences_slashed_symlink=yes
10178else
10179 gl_cv_func_lstat_dereferences_slashed_symlink=no
10180fi
10181rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10182 conftest.$ac_objext conftest.beam conftest.$ac_ext
10183fi
10184
f45c62c4
YQ
10185 rm -f conftest.sym conftest.file
10186
10187fi
10188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
10189$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
10190 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
10191 *yes)
10192
10193cat >>confdefs.h <<_ACEOF
10194#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
10195_ACEOF
10196
10197 ;;
10198 esac
10199
10200
6a29c58e
YQ
10201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
10202$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
10203if test "${gl_cv_func_malloc_posix+set}" = set; then :
10204 $as_echo_n "(cached) " >&6
10205else
10206
10207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10208/* end confdefs.h. */
10209
10210int
10211main ()
10212{
10213#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
10214 choke me
10215 #endif
10216
10217 ;
10218 return 0;
10219}
10220_ACEOF
10221if ac_fn_c_try_compile "$LINENO"; then :
10222 gl_cv_func_malloc_posix=yes
10223else
10224 gl_cv_func_malloc_posix=no
10225fi
10226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10227
10228fi
10229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
10230$as_echo "$gl_cv_func_malloc_posix" >&6; }
10231
10232
10233
10234 for ac_header in stdlib.h
98399780
YQ
10235do :
10236 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
10237if test "x$ac_cv_header_stdlib_h" = x""yes; then :
10238 cat >>confdefs.h <<_ACEOF
10239#define HAVE_STDLIB_H 1
10240_ACEOF
10241
10242fi
10243
10244done
10245
6a29c58e 10246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
98399780
YQ
10247$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
10248if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then :
10249 $as_echo_n "(cached) " >&6
10250else
10251 if test "$cross_compiling" = yes; then :
6a29c58e
YQ
10252 case "$host_os" in
10253 # Guess yes on platforms where we know the result.
10254 *-gnu* | freebsd* | netbsd* | openbsd* \
10255 | hpux* | solaris* | cygwin* | mingw*)
10256 ac_cv_func_malloc_0_nonnull=yes ;;
10257 # If we don't know, assume the worst.
10258 *) ac_cv_func_malloc_0_nonnull=no ;;
10259 esac
10260
98399780
YQ
10261else
10262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10263/* end confdefs.h. */
10264#if defined STDC_HEADERS || defined HAVE_STDLIB_H
6a29c58e
YQ
10265 # include <stdlib.h>
10266 #else
10267 char *malloc ();
10268 #endif
98399780
YQ
10269
10270int
10271main ()
10272{
49e4877c
PA
10273char *p = malloc (0);
10274 int result = !p;
10275 free (p);
10276 return result;
98399780
YQ
10277 ;
10278 return 0;
10279}
6a29c58e 10280
98399780
YQ
10281_ACEOF
10282if ac_fn_c_try_run "$LINENO"; then :
10283 ac_cv_func_malloc_0_nonnull=yes
10284else
10285 ac_cv_func_malloc_0_nonnull=no
10286fi
10287rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10288 conftest.$ac_objext conftest.beam conftest.$ac_ext
10289fi
10290
6a29c58e 10291
98399780
YQ
10292fi
10293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
10294$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
6a29c58e 10295 if test $ac_cv_func_malloc_0_nonnull = yes; then :
98399780
YQ
10296 gl_cv_func_malloc_0_nonnull=1
10297else
10298 gl_cv_func_malloc_0_nonnull=0
10299fi
10300
10301
10302cat >>confdefs.h <<_ACEOF
10303#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
10304_ACEOF
10305
10306
10307
88b48903
WN
10308
10309
8690e634
JK
10310 GNULIB_BTOWC=0;
10311 GNULIB_WCTOB=0;
10312 GNULIB_MBSINIT=0;
10313 GNULIB_MBRTOWC=0;
10314 GNULIB_MBRLEN=0;
10315 GNULIB_MBSRTOWCS=0;
10316 GNULIB_MBSNRTOWCS=0;
10317 GNULIB_WCRTOMB=0;
10318 GNULIB_WCSRTOMBS=0;
10319 GNULIB_WCSNRTOMBS=0;
10320 GNULIB_WCWIDTH=0;
10321 GNULIB_WMEMCHR=0;
10322 GNULIB_WMEMCMP=0;
10323 GNULIB_WMEMCPY=0;
10324 GNULIB_WMEMMOVE=0;
10325 GNULIB_WMEMSET=0;
10326 GNULIB_WCSLEN=0;
10327 GNULIB_WCSNLEN=0;
10328 GNULIB_WCSCPY=0;
10329 GNULIB_WCPCPY=0;
10330 GNULIB_WCSNCPY=0;
10331 GNULIB_WCPNCPY=0;
10332 GNULIB_WCSCAT=0;
10333 GNULIB_WCSNCAT=0;
10334 GNULIB_WCSCMP=0;
10335 GNULIB_WCSNCMP=0;
10336 GNULIB_WCSCASECMP=0;
10337 GNULIB_WCSNCASECMP=0;
10338 GNULIB_WCSCOLL=0;
10339 GNULIB_WCSXFRM=0;
10340 GNULIB_WCSDUP=0;
10341 GNULIB_WCSCHR=0;
10342 GNULIB_WCSRCHR=0;
10343 GNULIB_WCSCSPN=0;
10344 GNULIB_WCSSPN=0;
10345 GNULIB_WCSPBRK=0;
10346 GNULIB_WCSSTR=0;
10347 GNULIB_WCSTOK=0;
10348 GNULIB_WCSWIDTH=0;
10349 HAVE_BTOWC=1;
10350 HAVE_MBSINIT=1;
10351 HAVE_MBRTOWC=1;
10352 HAVE_MBRLEN=1;
10353 HAVE_MBSRTOWCS=1;
10354 HAVE_MBSNRTOWCS=1;
10355 HAVE_WCRTOMB=1;
10356 HAVE_WCSRTOMBS=1;
10357 HAVE_WCSNRTOMBS=1;
10358 HAVE_WMEMCHR=1;
10359 HAVE_WMEMCMP=1;
10360 HAVE_WMEMCPY=1;
10361 HAVE_WMEMMOVE=1;
10362 HAVE_WMEMSET=1;
10363 HAVE_WCSLEN=1;
10364 HAVE_WCSNLEN=1;
10365 HAVE_WCSCPY=1;
10366 HAVE_WCPCPY=1;
10367 HAVE_WCSNCPY=1;
10368 HAVE_WCPNCPY=1;
10369 HAVE_WCSCAT=1;
10370 HAVE_WCSNCAT=1;
10371 HAVE_WCSCMP=1;
10372 HAVE_WCSNCMP=1;
10373 HAVE_WCSCASECMP=1;
10374 HAVE_WCSNCASECMP=1;
10375 HAVE_WCSCOLL=1;
10376 HAVE_WCSXFRM=1;
10377 HAVE_WCSDUP=1;
10378 HAVE_WCSCHR=1;
10379 HAVE_WCSRCHR=1;
10380 HAVE_WCSCSPN=1;
10381 HAVE_WCSSPN=1;
10382 HAVE_WCSPBRK=1;
10383 HAVE_WCSSTR=1;
10384 HAVE_WCSTOK=1;
10385 HAVE_WCSWIDTH=1;
10386 HAVE_DECL_WCTOB=1;
10387 HAVE_DECL_WCWIDTH=1;
10388 REPLACE_MBSTATE_T=0;
10389 REPLACE_BTOWC=0;
10390 REPLACE_WCTOB=0;
10391 REPLACE_MBSINIT=0;
10392 REPLACE_MBRTOWC=0;
10393 REPLACE_MBRLEN=0;
10394 REPLACE_MBSRTOWCS=0;
10395 REPLACE_MBSNRTOWCS=0;
10396 REPLACE_WCRTOMB=0;
10397 REPLACE_WCSRTOMBS=0;
10398 REPLACE_WCSNRTOMBS=0;
10399 REPLACE_WCWIDTH=0;
10400 REPLACE_WCSWIDTH=0;
10401
10402
10403
10404
10405
10406
10407
10408
8690e634
JK
10409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
10410$as_echo_n "checking for a traditional japanese locale... " >&6; }
10411if test "${gt_cv_locale_ja+set}" = set; then :
10412 $as_echo_n "(cached) " >&6
10413else
10414
10415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10416/* end confdefs.h. */
10417
10418#include <locale.h>
10419#include <time.h>
10420#if HAVE_LANGINFO_CODESET
10421# include <langinfo.h>
10422#endif
10423#include <stdlib.h>
10424#include <string.h>
10425struct tm t;
10426char buf[16];
10427int main ()
10428{
10429 const char *p;
10430 /* Check whether the given locale name is recognized by the system. */
10431#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
10432 /* On native Windows, setlocale(category, "") looks at the system settings,
10433 not at the environment variables. Also, when an encoding suffix such
10434 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
10435 category of the locale to "C". */
10436 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
10437 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
10438 return 1;
10439#else
10440 if (setlocale (LC_ALL, "") == NULL) return 1;
10441#endif
10442 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
10443 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
10444 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
10445 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
10446 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
10447 some unit tests fail.
10448 On MirBSD 10, when an unsupported locale is specified, setlocale()
10449 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
10450#if HAVE_LANGINFO_CODESET
10451 {
10452 const char *cs = nl_langinfo (CODESET);
10453 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
10454 || strcmp (cs, "UTF-8") == 0)
10455 return 1;
10456 }
10457#endif
10458#ifdef __CYGWIN__
10459 /* On Cygwin, avoid locale names without encoding suffix, because the
10460 locale_charset() function relies on the encoding suffix. Note that
10461 LC_ALL is set on the command line. */
10462 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
10463#endif
10464 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
10465 on Cygwin 1.5.x. */
10466 if (MB_CUR_MAX == 1)
10467 return 1;
10468 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
10469 This excludes the UTF-8 encoding (except on MirBSD). */
10470 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
10471 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
10472 for (p = buf; *p != '\0'; p++)
10473 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
10474 return 1;
10475 return 0;
10476}
10477
10478_ACEOF
10479 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10480 (eval $ac_link) 2>&5
10481 ac_status=$?
10482 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10483 test $ac_status = 0; } && test -s conftest$ac_exeext; then
10484 case "$host_os" in
10485 # Handle native Windows specially, because there setlocale() interprets
10486 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
10487 # "fr" or "fra" as "French" or "French_France.1252",
10488 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
10489 # "ja" as "Japanese" or "Japanese_Japan.932",
10490 # and similar.
10491 mingw*)
10492 # Note that on native Windows, the Japanese locale is
10493 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
10494 # cannot use it here.
10495 gt_cv_locale_ja=none
10496 ;;
10497 *)
10498 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
10499 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
10500 # configure script would override the LC_ALL setting. Likewise for
10501 # LC_CTYPE, which is also set at the beginning of the configure script.
10502 # Test for the AIX locale name.
10503 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10504 gt_cv_locale_ja=ja_JP
10505 else
10506 # Test for the locale name with explicit encoding suffix.
10507 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10508 gt_cv_locale_ja=ja_JP.EUC-JP
10509 else
10510 # Test for the HP-UX, OSF/1, NetBSD locale name.
10511 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10512 gt_cv_locale_ja=ja_JP.eucJP
10513 else
10514 # Test for the IRIX, FreeBSD locale name.
10515 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10516 gt_cv_locale_ja=ja_JP.EUC
10517 else
10518 # Test for the Solaris 7 locale name.
10519 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10520 gt_cv_locale_ja=ja
10521 else
10522 # Special test for NetBSD 1.6.
10523 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
10524 gt_cv_locale_ja=ja_JP.eucJP
10525 else
10526 # None found.
10527 gt_cv_locale_ja=none
10528 fi
10529 fi
10530 fi
10531 fi
10532 fi
10533 fi
10534 ;;
10535 esac
10536 fi
10537 rm -fr conftest*
10538
10539fi
10540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
10541$as_echo "$gt_cv_locale_ja" >&6; }
10542 LOCALE_JA=$gt_cv_locale_ja
10543
10544
10545
10546
10547
10548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
10549$as_echo_n "checking for a transitional chinese locale... " >&6; }
10550if test "${gt_cv_locale_zh_CN+set}" = set; then :
10551 $as_echo_n "(cached) " >&6
10552else
10553
10554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10555/* end confdefs.h. */
10556
10557#include <locale.h>
10558#include <stdlib.h>
10559#include <time.h>
10560#if HAVE_LANGINFO_CODESET
10561# include <langinfo.h>
10562#endif
10563#include <stdlib.h>
10564#include <string.h>
10565struct tm t;
10566char buf[16];
10567int main ()
10568{
10569 const char *p;
10570 /* Check whether the given locale name is recognized by the system. */
10571#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
10572 /* On native Windows, setlocale(category, "") looks at the system settings,
10573 not at the environment variables. Also, when an encoding suffix such
10574 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
10575 category of the locale to "C". */
10576 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
10577 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
10578 return 1;
10579#else
10580 if (setlocale (LC_ALL, "") == NULL) return 1;
10581#endif
10582 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
10583 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
10584 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
10585 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
10586 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
10587 some unit tests fail.
10588 On MirBSD 10, when an unsupported locale is specified, setlocale()
10589 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
10590#if HAVE_LANGINFO_CODESET
10591 {
10592 const char *cs = nl_langinfo (CODESET);
10593 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
10594 || strcmp (cs, "UTF-8") == 0)
10595 return 1;
10596 }
10597#endif
10598#ifdef __CYGWIN__
10599 /* On Cygwin, avoid locale names without encoding suffix, because the
10600 locale_charset() function relies on the encoding suffix. Note that
10601 LC_ALL is set on the command line. */
10602 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
10603#endif
10604 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
10605 This excludes the UTF-8 encoding (except on MirBSD). */
10606 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
10607 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
10608 for (p = buf; *p != '\0'; p++)
10609 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
10610 return 1;
10611 /* Check whether a typical GB18030 multibyte sequence is recognized as a
10612 single wide character. This excludes the GB2312 and GBK encodings. */
10613 if (mblen ("\203\062\332\066", 5) != 4)
10614 return 1;
10615 return 0;
10616}
10617
10618_ACEOF
10619 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10620 (eval $ac_link) 2>&5
10621 ac_status=$?
10622 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10623 test $ac_status = 0; } && test -s conftest$ac_exeext; then
10624 case "$host_os" in
10625 # Handle native Windows specially, because there setlocale() interprets
10626 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
10627 # "fr" or "fra" as "French" or "French_France.1252",
10628 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
10629 # "ja" as "Japanese" or "Japanese_Japan.932",
10630 # and similar.
10631 mingw*)
10632 # Test for the hypothetical native Windows locale name.
10633 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10634 gt_cv_locale_zh_CN=Chinese_China.54936
10635 else
10636 # None found.
10637 gt_cv_locale_zh_CN=none
10638 fi
10639 ;;
10640 solaris2.8)
10641 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
10642 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
10643 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
10644 gt_cv_locale_zh_CN=none
10645 ;;
10646 *)
10647 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
10648 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
10649 # configure script would override the LC_ALL setting. Likewise for
10650 # LC_CTYPE, which is also set at the beginning of the configure script.
10651 # Test for the locale name without encoding suffix.
10652 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10653 gt_cv_locale_zh_CN=zh_CN
10654 else
10655 # Test for the locale name with explicit encoding suffix.
10656 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10657 gt_cv_locale_zh_CN=zh_CN.GB18030
10658 else
10659 # None found.
10660 gt_cv_locale_zh_CN=none
10661 fi
10662 fi
10663 ;;
10664 esac
10665 else
10666 # If there was a link error, due to mblen(), the system is so old that
10667 # it certainly doesn't have a chinese locale.
10668 gt_cv_locale_zh_CN=none
10669 fi
10670 rm -fr conftest*
10671
10672fi
10673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
10674$as_echo "$gt_cv_locale_zh_CN" >&6; }
10675 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
10676
10677
10678
10679
10680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
10681$as_echo_n "checking for a french Unicode locale... " >&6; }
10682if test "${gt_cv_locale_fr_utf8+set}" = set; then :
10683 $as_echo_n "(cached) " >&6
10684else
10685
10686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10687/* end confdefs.h. */
10688
10689#include <locale.h>
10690#include <time.h>
10691#if HAVE_LANGINFO_CODESET
10692# include <langinfo.h>
10693#endif
10694#include <stdlib.h>
10695#include <string.h>
10696struct tm t;
10697char buf[16];
10698int main () {
10699 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
10700 imitates locale dependent behaviour by looking at the environment
10701 variables, and all locales use the UTF-8 encoding. */
10702#if !(defined __BEOS__ || defined __HAIKU__)
10703 /* Check whether the given locale name is recognized by the system. */
10704# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
10705 /* On native Windows, setlocale(category, "") looks at the system settings,
10706 not at the environment variables. Also, when an encoding suffix such
10707 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
10708 category of the locale to "C". */
10709 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
10710 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
10711 return 1;
10712# else
10713 if (setlocale (LC_ALL, "") == NULL) return 1;
10714# endif
10715 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
10716 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
10717 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
10718 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
10719 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
10720 some unit tests fail. */
10721# if HAVE_LANGINFO_CODESET
10722 {
10723 const char *cs = nl_langinfo (CODESET);
10724 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
10725 return 1;
10726 }
10727# endif
10728# ifdef __CYGWIN__
10729 /* On Cygwin, avoid locale names without encoding suffix, because the
10730 locale_charset() function relies on the encoding suffix. Note that
10731 LC_ALL is set on the command line. */
10732 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
10733# endif
10734 /* Check whether in the abbreviation of the second month, the second
10735 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
10736 two bytes long, with UTF-8 encoding. */
10737 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
10738 if (strftime (buf, sizeof (buf), "%b", &t) < 4
10739 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
10740 return 1;
10741#endif
10742#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
10743 /* Check whether the decimal separator is a comma.
10744 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
10745 are nl_langinfo(RADIXCHAR) are both ".". */
10746 if (localeconv () ->decimal_point[0] != ',') return 1;
10747#endif
10748 return 0;
10749}
10750
10751_ACEOF
10752 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10753 (eval $ac_link) 2>&5
10754 ac_status=$?
10755 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10756 test $ac_status = 0; } && test -s conftest$ac_exeext; then
10757 case "$host_os" in
10758 # Handle native Windows specially, because there setlocale() interprets
10759 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
10760 # "fr" or "fra" as "French" or "French_France.1252",
10761 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
10762 # "ja" as "Japanese" or "Japanese_Japan.932",
10763 # and similar.
10764 mingw*)
10765 # Test for the hypothetical native Windows locale name.
10766 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10767 gt_cv_locale_fr_utf8=French_France.65001
10768 else
10769 # None found.
10770 gt_cv_locale_fr_utf8=none
10771 fi
10772 ;;
10773 *)
10774 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
10775 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
10776 # configure script would override the LC_ALL setting. Likewise for
10777 # LC_CTYPE, which is also set at the beginning of the configure script.
10778 # Test for the usual locale name.
10779 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10780 gt_cv_locale_fr_utf8=fr_FR
10781 else
10782 # Test for the locale name with explicit encoding suffix.
10783 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10784 gt_cv_locale_fr_utf8=fr_FR.UTF-8
10785 else
10786 # Test for the Solaris 7 locale name.
10787 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10788 gt_cv_locale_fr_utf8=fr.UTF-8
10789 else
10790 # None found.
10791 gt_cv_locale_fr_utf8=none
10792 fi
10793 fi
10794 fi
10795 ;;
10796 esac
10797 fi
10798 rm -fr conftest*
10799
10800fi
10801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
10802$as_echo "$gt_cv_locale_fr_utf8" >&6; }
10803 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
10804
10805
10806
10807
10808
10809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
10810$as_echo_n "checking for a traditional french locale... " >&6; }
10811if test "${gt_cv_locale_fr+set}" = set; then :
10812 $as_echo_n "(cached) " >&6
10813else
10814
10815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10816/* end confdefs.h. */
10817
10818#include <locale.h>
10819#include <time.h>
10820#if HAVE_LANGINFO_CODESET
10821# include <langinfo.h>
10822#endif
10823#include <stdlib.h>
10824#include <string.h>
10825struct tm t;
10826char buf[16];
10827int main () {
10828 /* Check whether the given locale name is recognized by the system. */
10829#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
10830 /* On native Windows, setlocale(category, "") looks at the system settings,
10831 not at the environment variables. Also, when an encoding suffix such
10832 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
10833 category of the locale to "C". */
10834 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
10835 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
10836 return 1;
10837#else
10838 if (setlocale (LC_ALL, "") == NULL) return 1;
10839#endif
10840 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
10841 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
10842 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
10843 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
10844 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
10845 some unit tests fail.
10846 On MirBSD 10, when an unsupported locale is specified, setlocale()
10847 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
10848#if HAVE_LANGINFO_CODESET
10849 {
10850 const char *cs = nl_langinfo (CODESET);
10851 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
10852 || strcmp (cs, "UTF-8") == 0)
10853 return 1;
10854 }
10855#endif
10856#ifdef __CYGWIN__
10857 /* On Cygwin, avoid locale names without encoding suffix, because the
10858 locale_charset() function relies on the encoding suffix. Note that
10859 LC_ALL is set on the command line. */
10860 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
10861#endif
10862 /* Check whether in the abbreviation of the second month, the second
10863 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
10864 one byte long. This excludes the UTF-8 encoding. */
10865 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
10866 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
10867#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
10868 /* Check whether the decimal separator is a comma.
10869 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
10870 are nl_langinfo(RADIXCHAR) are both ".". */
10871 if (localeconv () ->decimal_point[0] != ',') return 1;
10872#endif
10873 return 0;
10874}
10875
10876_ACEOF
10877 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10878 (eval $ac_link) 2>&5
10879 ac_status=$?
10880 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10881 test $ac_status = 0; } && test -s conftest$ac_exeext; then
10882 case "$host_os" in
10883 # Handle native Windows specially, because there setlocale() interprets
10884 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
10885 # "fr" or "fra" as "French" or "French_France.1252",
10886 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
10887 # "ja" as "Japanese" or "Japanese_Japan.932",
10888 # and similar.
10889 mingw*)
10890 # Test for the native Windows locale name.
10891 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10892 gt_cv_locale_fr=French_France.1252
10893 else
10894 # None found.
10895 gt_cv_locale_fr=none
10896 fi
10897 ;;
10898 *)
10899 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
10900 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
10901 # configure script would override the LC_ALL setting. Likewise for
10902 # LC_CTYPE, which is also set at the beginning of the configure script.
10903 # Test for the usual locale name.
10904 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10905 gt_cv_locale_fr=fr_FR
10906 else
10907 # Test for the locale name with explicit encoding suffix.
10908 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10909 gt_cv_locale_fr=fr_FR.ISO-8859-1
10910 else
10911 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
10912 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10913 gt_cv_locale_fr=fr_FR.ISO8859-1
10914 else
10915 # Test for the HP-UX locale name.
10916 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10917 gt_cv_locale_fr=fr_FR.iso88591
10918 else
10919 # Test for the Solaris 7 locale name.
10920 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10921 gt_cv_locale_fr=fr
10922 else
10923 # None found.
10924 gt_cv_locale_fr=none
10925 fi
10926 fi
10927 fi
10928 fi
10929 fi
10930 ;;
10931 esac
10932 fi
10933 rm -fr conftest*
10934
10935fi
10936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
10937$as_echo "$gt_cv_locale_fr" >&6; }
10938 LOCALE_FR=$gt_cv_locale_fr
10939
10940
10941
10942
10943
10944
10945
8690e634
JK
10946 GNULIB_FFSL=0;
10947 GNULIB_FFSLL=0;
10948 GNULIB_MEMCHR=0;
10949 GNULIB_MEMMEM=0;
10950 GNULIB_MEMPCPY=0;
10951 GNULIB_MEMRCHR=0;
10952 GNULIB_RAWMEMCHR=0;
10953 GNULIB_STPCPY=0;
10954 GNULIB_STPNCPY=0;
10955 GNULIB_STRCHRNUL=0;
10956 GNULIB_STRDUP=0;
10957 GNULIB_STRNCAT=0;
10958 GNULIB_STRNDUP=0;
10959 GNULIB_STRNLEN=0;
10960 GNULIB_STRPBRK=0;
10961 GNULIB_STRSEP=0;
10962 GNULIB_STRSTR=0;
10963 GNULIB_STRCASESTR=0;
10964 GNULIB_STRTOK_R=0;
10965 GNULIB_MBSLEN=0;
10966 GNULIB_MBSNLEN=0;
10967 GNULIB_MBSCHR=0;
10968 GNULIB_MBSRCHR=0;
10969 GNULIB_MBSSTR=0;
10970 GNULIB_MBSCASECMP=0;
10971 GNULIB_MBSNCASECMP=0;
10972 GNULIB_MBSPCASECMP=0;
10973 GNULIB_MBSCASESTR=0;
10974 GNULIB_MBSCSPN=0;
10975 GNULIB_MBSPBRK=0;
10976 GNULIB_MBSSPN=0;
10977 GNULIB_MBSSEP=0;
10978 GNULIB_MBSTOK_R=0;
10979 GNULIB_STRERROR=0;
10980 GNULIB_STRERROR_R=0;
10981 GNULIB_STRSIGNAL=0;
10982 GNULIB_STRVERSCMP=0;
10983 HAVE_MBSLEN=0;
10984 HAVE_FFSL=1;
10985 HAVE_FFSLL=1;
10986 HAVE_MEMCHR=1;
10987 HAVE_DECL_MEMMEM=1;
10988 HAVE_MEMPCPY=1;
10989 HAVE_DECL_MEMRCHR=1;
10990 HAVE_RAWMEMCHR=1;
10991 HAVE_STPCPY=1;
10992 HAVE_STPNCPY=1;
10993 HAVE_STRCHRNUL=1;
10994 HAVE_DECL_STRDUP=1;
10995 HAVE_DECL_STRNDUP=1;
10996 HAVE_DECL_STRNLEN=1;
10997 HAVE_STRPBRK=1;
10998 HAVE_STRSEP=1;
10999 HAVE_STRCASESTR=1;
11000 HAVE_DECL_STRTOK_R=1;
11001 HAVE_DECL_STRERROR_R=1;
11002 HAVE_DECL_STRSIGNAL=1;
11003 HAVE_STRVERSCMP=1;
11004 REPLACE_MEMCHR=0;
11005 REPLACE_MEMMEM=0;
11006 REPLACE_STPNCPY=0;
11007 REPLACE_STRDUP=0;
11008 REPLACE_STRSTR=0;
11009 REPLACE_STRCASESTR=0;
11010 REPLACE_STRCHRNUL=0;
11011 REPLACE_STRERROR=0;
11012 REPLACE_STRERROR_R=0;
11013 REPLACE_STRNCAT=0;
11014 REPLACE_STRNDUP=0;
11015 REPLACE_STRNLEN=0;
11016 REPLACE_STRSIGNAL=0;
11017 REPLACE_STRTOK_R=0;
11018 UNDEFINE_STRTOK_R=0;
11019
11020
11021
11022
11023
11024 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
11025 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
11026 # irrelevant for anonymous mappings.
11027 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
11028if test "x$ac_cv_func_mmap" = x""yes; then :
11029 gl_have_mmap=yes
11030else
11031 gl_have_mmap=no
11032fi
11033
11034
11035 # Try to allow MAP_ANONYMOUS.
11036 gl_have_mmap_anonymous=no
11037 if test $gl_have_mmap = yes; then
11038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
11039$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
11040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11041/* end confdefs.h. */
11042
11043#include <sys/mman.h>
11044#ifdef MAP_ANONYMOUS
11045 I cannot identify this map
11046#endif
11047
11048_ACEOF
11049if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11050 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
11051 gl_have_mmap_anonymous=yes
11052fi
11053rm -f conftest*
11054
11055 if test $gl_have_mmap_anonymous != yes; then
11056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11057/* end confdefs.h. */
11058
11059#include <sys/mman.h>
11060#ifdef MAP_ANON
11061 I cannot identify this map
11062#endif
11063
11064_ACEOF
11065if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11066 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
11067
11068$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
11069
11070 gl_have_mmap_anonymous=yes
11071fi
11072rm -f conftest*
11073
11074 fi
11075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
11076$as_echo "$gl_have_mmap_anonymous" >&6; }
11077 if test $gl_have_mmap_anonymous = yes; then
11078
11079$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
11080
11081 fi
11082 fi
11083
11084
8690e634
JK
11085
11086
11087
11088
11089 if test $HAVE_MEMCHR = 1; then
11090 # Detect platform-specific bugs in some versions of glibc:
11091 # memchr should not dereference anything with length 0
11092 # http://bugzilla.redhat.com/499689
11093 # memchr should not dereference overestimated length after a match
11094 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
11095 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
11096 # Assume that memchr works on platforms that lack mprotect.
11097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
11098$as_echo_n "checking whether memchr works... " >&6; }
11099if test "${gl_cv_func_memchr_works+set}" = set; then :
11100 $as_echo_n "(cached) " >&6
11101else
11102 if test "$cross_compiling" = yes; then :
11103 gl_cv_func_memchr_works="guessing no"
11104else
11105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11106/* end confdefs.h. */
11107
11108#include <string.h>
11109#if HAVE_SYS_MMAN_H
11110# include <fcntl.h>
11111# include <unistd.h>
11112# include <sys/types.h>
11113# include <sys/mman.h>
11114# ifndef MAP_FILE
11115# define MAP_FILE 0
11116# endif
11117#endif
11118
11119int
11120main ()
11121{
11122
11123 int result = 0;
11124 char *fence = NULL;
11125#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
11126# if HAVE_MAP_ANONYMOUS
11127 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
11128 const int fd = -1;
11129# else /* !HAVE_MAP_ANONYMOUS */
11130 const int flags = MAP_FILE | MAP_PRIVATE;
11131 int fd = open ("/dev/zero", O_RDONLY, 0666);
11132 if (fd >= 0)
11133# endif
11134 {
11135 int pagesize = getpagesize ();
11136 char *two_pages =
11137 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
11138 flags, fd, 0);
11139 if (two_pages != (char *)(-1)
11140 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
11141 fence = two_pages + pagesize;
11142 }
11143#endif
11144 if (fence)
11145 {
11146 if (memchr (fence, 0, 0))
11147 result |= 1;
11148 strcpy (fence - 9, "12345678");
11149 if (memchr (fence - 9, 0, 79) != fence - 1)
11150 result |= 2;
11151 if (memchr (fence - 1, 0, 3) != fence - 1)
11152 result |= 4;
11153 }
11154 return result;
11155
11156 ;
11157 return 0;
11158}
11159_ACEOF
11160if ac_fn_c_try_run "$LINENO"; then :
11161 gl_cv_func_memchr_works=yes
11162else
11163 gl_cv_func_memchr_works=no
11164fi
11165rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11166 conftest.$ac_objext conftest.beam conftest.$ac_ext
11167fi
11168
11169fi
11170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
11171$as_echo "$gl_cv_func_memchr_works" >&6; }
11172 if test "$gl_cv_func_memchr_works" != yes; then
11173 REPLACE_MEMCHR=1
11174 fi
11175 fi
11176
3574124b 11177ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
8690e634
JK
11178if test "x$ac_cv_have_decl_memmem" = x""yes; then :
11179 ac_have_decl=1
11180else
11181 ac_have_decl=0
11182fi
11183
11184cat >>confdefs.h <<_ACEOF
11185#define HAVE_DECL_MEMMEM $ac_have_decl
11186_ACEOF
11187
11188
11189
11190
11191
8690e634
JK
11192 for ac_func in memmem
11193do :
11194 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
11195if test "x$ac_cv_func_memmem" = x""yes; then :
11196 cat >>confdefs.h <<_ACEOF
11197#define HAVE_MEMMEM 1
11198_ACEOF
11199
11200fi
11201done
11202
11203 if test $ac_cv_func_memmem = yes; then
11204 HAVE_MEMMEM=1
11205 else
11206 HAVE_MEMMEM=0
11207 fi
11208
8690e634
JK
11209 if test $ac_cv_have_decl_memmem = no; then
11210 HAVE_DECL_MEMMEM=0
11211 else
11212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
11213$as_echo_n "checking whether memmem works... " >&6; }
11214if test "${gl_cv_func_memmem_works_always+set}" = set; then :
11215 $as_echo_n "(cached) " >&6
11216else
11217 if test "$cross_compiling" = yes; then :
11218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11219/* end confdefs.h. */
11220
11221#ifdef __GNU_LIBRARY__
11222 #include <features.h>
11223 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
11224 || __GLIBC_MINOR__ > 12)) \
11225 || (__GLIBC__ > 2)) \
11226 || defined __UCLIBC__
11227 Lucky user
11228 #endif
11229#elif defined __CYGWIN__
11230 #include <cygwin/version.h>
11231 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
11232 Lucky user
11233 #endif
11234#else
11235 Lucky user
11236#endif
11237
11238_ACEOF
11239if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11240 $EGREP "Lucky user" >/dev/null 2>&1; then :
11241 gl_cv_func_memmem_works_always="guessing yes"
11242else
11243 gl_cv_func_memmem_works_always="guessing no"
11244fi
11245rm -f conftest*
11246
11247
11248else
11249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11250/* end confdefs.h. */
11251
11252#include <string.h> /* for memmem */
11253#define P "_EF_BF_BD"
11254#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
11255#define NEEDLE P P P P P
11256
11257int
11258main ()
11259{
11260
11261 int result = 0;
11262 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
11263 result |= 1;
11264 /* Check for empty needle behavior. */
11265 {
11266 const char *haystack = "AAA";
11267 if (memmem (haystack, 3, NULL, 0) != haystack)
11268 result |= 2;
11269 }
11270 return result;
11271
11272 ;
11273 return 0;
11274}
11275_ACEOF
11276if ac_fn_c_try_run "$LINENO"; then :
11277 gl_cv_func_memmem_works_always=yes
11278else
11279 gl_cv_func_memmem_works_always=no
11280fi
11281rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11282 conftest.$ac_objext conftest.beam conftest.$ac_ext
11283fi
11284
11285
11286fi
11287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
11288$as_echo "$gl_cv_func_memmem_works_always" >&6; }
11289 case "$gl_cv_func_memmem_works_always" in
11290 *yes) ;;
11291 *)
11292 REPLACE_MEMMEM=1
11293 ;;
11294 esac
11295 fi
11296 :
11297
6a29c58e
YQ
11298
11299 GNULIB_DPRINTF=0;
11300 GNULIB_FCLOSE=0;
11301 GNULIB_FDOPEN=0;
11302 GNULIB_FFLUSH=0;
11303 GNULIB_FGETC=0;
11304 GNULIB_FGETS=0;
11305 GNULIB_FOPEN=0;
11306 GNULIB_FPRINTF=0;
11307 GNULIB_FPRINTF_POSIX=0;
11308 GNULIB_FPURGE=0;
11309 GNULIB_FPUTC=0;
11310 GNULIB_FPUTS=0;
11311 GNULIB_FREAD=0;
11312 GNULIB_FREOPEN=0;
11313 GNULIB_FSCANF=0;
11314 GNULIB_FSEEK=0;
11315 GNULIB_FSEEKO=0;
11316 GNULIB_FTELL=0;
11317 GNULIB_FTELLO=0;
11318 GNULIB_FWRITE=0;
11319 GNULIB_GETC=0;
11320 GNULIB_GETCHAR=0;
11321 GNULIB_GETDELIM=0;
11322 GNULIB_GETLINE=0;
11323 GNULIB_OBSTACK_PRINTF=0;
11324 GNULIB_OBSTACK_PRINTF_POSIX=0;
11325 GNULIB_PCLOSE=0;
11326 GNULIB_PERROR=0;
11327 GNULIB_POPEN=0;
11328 GNULIB_PRINTF=0;
11329 GNULIB_PRINTF_POSIX=0;
11330 GNULIB_PUTC=0;
11331 GNULIB_PUTCHAR=0;
11332 GNULIB_PUTS=0;
11333 GNULIB_REMOVE=0;
11334 GNULIB_RENAME=0;
11335 GNULIB_RENAMEAT=0;
11336 GNULIB_SCANF=0;
11337 GNULIB_SNPRINTF=0;
11338 GNULIB_SPRINTF_POSIX=0;
11339 GNULIB_STDIO_H_NONBLOCKING=0;
11340 GNULIB_STDIO_H_SIGPIPE=0;
11341 GNULIB_TMPFILE=0;
11342 GNULIB_VASPRINTF=0;
11343 GNULIB_VFSCANF=0;
11344 GNULIB_VSCANF=0;
11345 GNULIB_VDPRINTF=0;
11346 GNULIB_VFPRINTF=0;
11347 GNULIB_VFPRINTF_POSIX=0;
11348 GNULIB_VPRINTF=0;
11349 GNULIB_VPRINTF_POSIX=0;
11350 GNULIB_VSNPRINTF=0;
11351 GNULIB_VSPRINTF_POSIX=0;
11352 HAVE_DECL_FPURGE=1;
11353 HAVE_DECL_FSEEKO=1;
11354 HAVE_DECL_FTELLO=1;
11355 HAVE_DECL_GETDELIM=1;
11356 HAVE_DECL_GETLINE=1;
11357 HAVE_DECL_OBSTACK_PRINTF=1;
11358 HAVE_DECL_SNPRINTF=1;
11359 HAVE_DECL_VSNPRINTF=1;
11360 HAVE_DPRINTF=1;
11361 HAVE_FSEEKO=1;
11362 HAVE_FTELLO=1;
11363 HAVE_PCLOSE=1;
11364 HAVE_POPEN=1;
11365 HAVE_RENAMEAT=1;
11366 HAVE_VASPRINTF=1;
11367 HAVE_VDPRINTF=1;
11368 REPLACE_DPRINTF=0;
11369 REPLACE_FCLOSE=0;
11370 REPLACE_FDOPEN=0;
11371 REPLACE_FFLUSH=0;
11372 REPLACE_FOPEN=0;
11373 REPLACE_FPRINTF=0;
11374 REPLACE_FPURGE=0;
11375 REPLACE_FREOPEN=0;
11376 REPLACE_FSEEK=0;
11377 REPLACE_FSEEKO=0;
11378 REPLACE_FTELL=0;
11379 REPLACE_FTELLO=0;
11380 REPLACE_GETDELIM=0;
11381 REPLACE_GETLINE=0;
11382 REPLACE_OBSTACK_PRINTF=0;
11383 REPLACE_PERROR=0;
11384 REPLACE_POPEN=0;
11385 REPLACE_PRINTF=0;
11386 REPLACE_REMOVE=0;
11387 REPLACE_RENAME=0;
11388 REPLACE_RENAMEAT=0;
11389 REPLACE_SNPRINTF=0;
11390 REPLACE_SPRINTF=0;
11391 REPLACE_STDIO_READ_FUNCS=0;
11392 REPLACE_STDIO_WRITE_FUNCS=0;
11393 REPLACE_TMPFILE=0;
11394 REPLACE_VASPRINTF=0;
11395 REPLACE_VDPRINTF=0;
11396 REPLACE_VFPRINTF=0;
11397 REPLACE_VPRINTF=0;
11398 REPLACE_VSNPRINTF=0;
11399 REPLACE_VSPRINTF=0;
11400
11401
11402
0750520d
PA
11403
11404 GNULIB_PTHREAD_SIGMASK=0;
11405 GNULIB_RAISE=0;
11406 GNULIB_SIGNAL_H_SIGPIPE=0;
11407 GNULIB_SIGPROCMASK=0;
11408 GNULIB_SIGACTION=0;
11409 HAVE_POSIX_SIGNALBLOCKING=1;
11410 HAVE_PTHREAD_SIGMASK=1;
11411 HAVE_RAISE=1;
11412 HAVE_SIGSET_T=1;
11413 HAVE_SIGINFO_T=1;
11414 HAVE_SIGACTION=1;
11415 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
11416
11417 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
11418
11419 HAVE_SIGHANDLER_T=1;
11420 REPLACE_PTHREAD_SIGMASK=0;
11421 REPLACE_RAISE=0;
11422
11423
11424 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
11425 #include <signal.h>
11426 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
11427 #include <sys/types.h>
11428
11429"
11430if test "x$ac_cv_type_sigset_t" = x""yes; then :
11431
11432cat >>confdefs.h <<_ACEOF
11433#define HAVE_SIGSET_T 1
11434_ACEOF
11435
11436gl_cv_type_sigset_t=yes
11437else
11438 gl_cv_type_sigset_t=no
11439fi
11440
11441 if test $gl_cv_type_sigset_t != yes; then
11442 HAVE_SIGSET_T=0
11443 fi
11444
11445ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
11446if test "x$ac_cv_type_pid_t" = x""yes; then :
11447
11448else
11449
11450cat >>confdefs.h <<_ACEOF
11451#define pid_t int
11452_ACEOF
11453
11454fi
11455
11456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
11457$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
11458if test "${ac_cv_type_uid_t+set}" = set; then :
11459 $as_echo_n "(cached) " >&6
11460else
11461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11462/* end confdefs.h. */
11463#include <sys/types.h>
11464
11465_ACEOF
11466if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11467 $EGREP "uid_t" >/dev/null 2>&1; then :
11468 ac_cv_type_uid_t=yes
11469else
11470 ac_cv_type_uid_t=no
11471fi
11472rm -f conftest*
11473
11474fi
11475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
11476$as_echo "$ac_cv_type_uid_t" >&6; }
11477if test $ac_cv_type_uid_t = no; then
11478
11479$as_echo "#define uid_t int" >>confdefs.h
11480
11481
11482$as_echo "#define gid_t int" >>confdefs.h
11483
11484fi
11485
8690e634
JK
11486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
11487$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
11488if test "${ac_cv_header_stdbool_h+set}" = set; then :
11489 $as_echo_n "(cached) " >&6
11490else
11491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11492/* end confdefs.h. */
11493
11494 #include <stdbool.h>
49e4877c
PA
11495
11496 #ifdef __cplusplus
11497 typedef bool Bool;
11498 #else
11499 typedef _Bool Bool;
11500 #ifndef bool
11501 "error: bool is not defined"
11502 #endif
11503 #ifndef false
11504 "error: false is not defined"
11505 #endif
11506 #if false
11507 "error: false is not 0"
11508 #endif
11509 #ifndef true
11510 "error: true is not defined"
11511 #endif
11512 #if true != 1
11513 "error: true is not 1"
11514 #endif
8690e634 11515 #endif
49e4877c 11516
8690e634
JK
11517 #ifndef __bool_true_false_are_defined
11518 "error: __bool_true_false_are_defined is not defined"
11519 #endif
11520
49e4877c 11521 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
8690e634
JK
11522
11523 char a[true == 1 ? 1 : -1];
11524 char b[false == 0 ? 1 : -1];
11525 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
11526 char d[(bool) 0.5 == true ? 1 : -1];
11527 /* See body of main program for 'e'. */
49e4877c 11528 char f[(Bool) 0.0 == false ? 1 : -1];
8690e634 11529 char g[true];
49e4877c 11530 char h[sizeof (Bool)];
8690e634
JK
11531 char i[sizeof s.t];
11532 enum { j = false, k = true, l = false * true, m = true * 256 };
11533 /* The following fails for
11534 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
49e4877c 11535 Bool n[m];
8690e634 11536 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
49e4877c 11537 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
8690e634
JK
11538 /* Catch a bug in an HP-UX C compiler. See
11539 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
11540 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
11541 */
49e4877c
PA
11542 Bool q = true;
11543 Bool *pq = &q;
11544 bool *qq = &q;
8690e634
JK
11545
11546int
11547main ()
11548{
11549
11550 bool e = &s;
49e4877c
PA
11551 *pq |= q; *pq |= ! q;
11552 *qq |= q; *qq |= ! q;
8690e634
JK
11553 /* Refer to every declared value, to avoid compiler optimizations. */
11554 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
49e4877c 11555 + !m + !n + !o + !p + !q + !pq + !qq);
8690e634
JK
11556
11557 ;
11558 return 0;
11559}
11560_ACEOF
11561if ac_fn_c_try_compile "$LINENO"; then :
11562 ac_cv_header_stdbool_h=yes
11563else
11564 ac_cv_header_stdbool_h=no
11565fi
11566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11567fi
11568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
11569$as_echo "$ac_cv_header_stdbool_h" >&6; }
11570 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
11571if test "x$ac_cv_type__Bool" = x""yes; then :
11572
11573cat >>confdefs.h <<_ACEOF
11574#define HAVE__BOOL 1
11575_ACEOF
11576
11577
11578fi
11579
11580
11581
11582 REPLACE_NULL=0;
4a626d0a 11583 HAVE_MAX_ALIGN_T=1;
8690e634
JK
11584 HAVE_WCHAR_T=1;
11585
11586
11587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
11588$as_echo_n "checking for wchar_t... " >&6; }
11589if test "${gt_cv_c_wchar_t+set}" = set; then :
11590 $as_echo_n "(cached) " >&6
11591else
11592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11593/* end confdefs.h. */
11594#include <stddef.h>
11595 wchar_t foo = (wchar_t)'\0';
11596int
11597main ()
11598{
11599
11600 ;
11601 return 0;
11602}
11603_ACEOF
11604if ac_fn_c_try_compile "$LINENO"; then :
11605 gt_cv_c_wchar_t=yes
11606else
11607 gt_cv_c_wchar_t=no
11608fi
11609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11610fi
11611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
11612$as_echo "$gt_cv_c_wchar_t" >&6; }
11613 if test $gt_cv_c_wchar_t = yes; then
11614
11615$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
11616
11617 fi
11618
63ce7108
TT
11619
11620
11621
11622
8690e634
JK
11623
11624
11625
11626
11627
11628
11629
11630 if test $gl_cv_have_include_next = yes; then
11631 gl_cv_next_string_h='<'string.h'>'
11632 else
11633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
11634$as_echo_n "checking absolute name of <string.h>... " >&6; }
11635if test "${gl_cv_next_string_h+set}" = set; then :
11636 $as_echo_n "(cached) " >&6
11637else
11638
4a626d0a
PA
11639
11640
11641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
11642/* end confdefs.h. */
11643#include <string.h>
8690e634 11644_ACEOF
4a626d0a
PA
11645 case "$host_os" in
11646 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11647 *) gl_absname_cpp="$ac_cpp" ;;
11648 esac
11649
11650 case "$host_os" in
11651 mingw*)
11652 gl_dirsep_regex='[/\\]'
11653 ;;
11654 *)
11655 gl_dirsep_regex='\/'
11656 ;;
11657 esac
11658 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11659 gl_header_literal_regex=`echo 'string.h' \
11660 | sed -e "$gl_make_literal_regex_sed"`
11661 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11662 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11663 s|^/[^/]|//&|
11664 p
11665 q
11666 }'
8690e634 11667
4a626d0a
PA
11668 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11669 sed -n "$gl_absolute_header_sed"`
c971b7fa 11670
4a626d0a
PA
11671 gl_header=$gl_cv_absolute_string_h
11672 gl_cv_next_string_h='"'$gl_header'"'
8690e634
JK
11673
11674
11675fi
11676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
11677$as_echo "$gl_cv_next_string_h" >&6; }
11678 fi
11679 NEXT_STRING_H=$gl_cv_next_string_h
11680
11681 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11682 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11683 gl_next_as_first_directive='<'string.h'>'
11684 else
11685 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11686 gl_next_as_first_directive=$gl_cv_next_string_h
11687 fi
11688 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
11689
11690
11691
11692
11693
11694
11695 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
11696 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
11697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
11698$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
11699if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
11700 $as_echo_n "(cached) " >&6
11701else
11702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11703/* end confdefs.h. */
11704#include <string.h>
11705
11706int
11707main ()
11708{
11709#undef $gl_func
11710 (void) $gl_func;
11711 ;
11712 return 0;
11713}
11714_ACEOF
11715if ac_fn_c_try_compile "$LINENO"; then :
11716 eval "$as_gl_Symbol=yes"
11717else
11718 eval "$as_gl_Symbol=no"
11719fi
11720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11721fi
11722eval ac_res=\$$as_gl_Symbol
11723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11724$as_echo "$ac_res" >&6; }
11725 eval as_val=\$$as_gl_Symbol
11726 if test "x$as_val" = x""yes; then :
11727 cat >>confdefs.h <<_ACEOF
11728#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
11729_ACEOF
11730
11731 eval ac_cv_have_decl_$gl_func=yes
11732fi
11733 done
11734
11735
11736
8839a007 11737
63ce7108
TT
11738
11739 if test "$gl_cv_func_memchr_works" != yes; then
11740 REPLACE_STRSTR=1
11741 else
11742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
11743$as_echo_n "checking whether strstr works... " >&6; }
11744if test "${gl_cv_func_strstr_works_always+set}" = set; then :
11745 $as_echo_n "(cached) " >&6
11746else
11747 if test "$cross_compiling" = yes; then :
11748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11749/* end confdefs.h. */
11750
11751#ifdef __GNU_LIBRARY__
11752 #include <features.h>
11753 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
11754 || defined __UCLIBC__
11755 Lucky user
11756 #endif
11757#elif defined __CYGWIN__
11758 #include <cygwin/version.h>
11759 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
11760 Lucky user
11761 #endif
11762#else
11763 Lucky user
11764#endif
11765
11766_ACEOF
11767if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11768 $EGREP "Lucky user" >/dev/null 2>&1; then :
11769 gl_cv_func_strstr_works_always="guessing yes"
11770else
11771 gl_cv_func_strstr_works_always="guessing no"
11772fi
11773rm -f conftest*
11774
11775
11776else
11777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11778/* end confdefs.h. */
11779
11780#include <string.h> /* for strstr */
11781#define P "_EF_BF_BD"
11782#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
11783#define NEEDLE P P P P P
11784
11785int
11786main ()
11787{
11788return !!strstr (HAYSTACK, NEEDLE);
11789
11790 ;
11791 return 0;
11792}
11793_ACEOF
11794if ac_fn_c_try_run "$LINENO"; then :
11795 gl_cv_func_strstr_works_always=yes
11796else
11797 gl_cv_func_strstr_works_always=no
11798fi
11799rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11800 conftest.$ac_objext conftest.beam conftest.$ac_ext
11801fi
11802
11803
11804fi
11805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
11806$as_echo "$gl_cv_func_strstr_works_always" >&6; }
11807 case "$gl_cv_func_strstr_works_always" in
11808 *yes) ;;
11809 *)
11810 REPLACE_STRSTR=1
11811 ;;
11812 esac
11813 fi
11814
421693b0
PA
11815ac_fn_c_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default"
11816if test "x$ac_cv_have_decl_strtok_r" = x""yes; then :
11817 ac_have_decl=1
11818else
11819 ac_have_decl=0
11820fi
11821
11822cat >>confdefs.h <<_ACEOF
11823#define HAVE_DECL_STRTOK_R $ac_have_decl
11824_ACEOF
11825
09607c9e
TT
11826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
11827$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
11828if test "${ac_cv_header_stat_broken+set}" = set; then :
11829 $as_echo_n "(cached) " >&6
11830else
11831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11832/* end confdefs.h. */
11833#include <sys/types.h>
11834#include <sys/stat.h>
63ce7108 11835
09607c9e
TT
11836#if defined S_ISBLK && defined S_IFDIR
11837extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
11838#endif
8839a007 11839
09607c9e
TT
11840#if defined S_ISBLK && defined S_IFCHR
11841extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
11842#endif
11843
11844#if defined S_ISLNK && defined S_IFREG
11845extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
11846#endif
11847
11848#if defined S_ISSOCK && defined S_IFREG
11849extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
11850#endif
8839a007 11851
8839a007 11852_ACEOF
09607c9e
TT
11853if ac_fn_c_try_compile "$LINENO"; then :
11854 ac_cv_header_stat_broken=no
11855else
11856 ac_cv_header_stat_broken=yes
11857fi
11858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11859fi
11860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
11861$as_echo "$ac_cv_header_stat_broken" >&6; }
11862if test $ac_cv_header_stat_broken = yes; then
11863
11864$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
8839a007
PA
11865
11866fi
11867
09607c9e
TT
11868
11869
8839a007
PA
11870ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
11871if test "x$ac_cv_type_mode_t" = x""yes; then :
11872
11873else
11874
11875cat >>confdefs.h <<_ACEOF
11876#define mode_t int
11877_ACEOF
11878
11879fi
11880
8839a007
PA
11881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
11882$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
11883if test -z "$MKDIR_P"; then
11884 if test "${ac_cv_path_mkdir+set}" = set; then :
11885 $as_echo_n "(cached) " >&6
11886else
11887 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11888for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
11889do
11890 IFS=$as_save_IFS
11891 test -z "$as_dir" && as_dir=.
11892 for ac_prog in mkdir gmkdir; do
11893 for ac_exec_ext in '' $ac_executable_extensions; do
11894 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
11895 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
11896 'mkdir (GNU coreutils) '* | \
11897 'mkdir (coreutils) '* | \
11898 'mkdir (fileutils) '4.1*)
11899 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
11900 break 3;;
11901 esac
11902 done
11903 done
11904 done
11905IFS=$as_save_IFS
11906
11907fi
11908
11909 if test "${ac_cv_path_mkdir+set}" = set; then
11910 MKDIR_P="$ac_cv_path_mkdir -p"
11911 else
11912 # As a last resort, use the slow shell script. Don't cache a
11913 # value for MKDIR_P within a source directory, because that will
11914 # break other packages using the cache if that directory is
11915 # removed, or if the value is a relative name.
11916 test -d ./--version && rmdir ./--version
11917 MKDIR_P="$ac_install_sh -d"
11918 fi
11919fi
11920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
11921$as_echo "$MKDIR_P" >&6; }
11922
11923
09607c9e 11924
09607c9e
TT
11925
11926
2196f55f 11927
09607c9e
TT
11928
11929
11930
11931
4a626d0a
PA
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941 if test $gl_cv_have_include_next = yes; then
11942 gl_cv_next_sys_types_h='<'sys/types.h'>'
11943 else
11944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
11945$as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
11946if test "${gl_cv_next_sys_types_h+set}" = set; then :
11947 $as_echo_n "(cached) " >&6
11948else
11949
11950
11951
11952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11953/* end confdefs.h. */
11954#include <sys/types.h>
11955_ACEOF
11956 case "$host_os" in
11957 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11958 *) gl_absname_cpp="$ac_cpp" ;;
11959 esac
11960
11961 case "$host_os" in
11962 mingw*)
11963 gl_dirsep_regex='[/\\]'
11964 ;;
11965 *)
11966 gl_dirsep_regex='\/'
11967 ;;
11968 esac
11969 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11970 gl_header_literal_regex=`echo 'sys/types.h' \
11971 | sed -e "$gl_make_literal_regex_sed"`
11972 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11973 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11974 s|^/[^/]|//&|
11975 p
11976 q
11977 }'
11978
11979 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11980 sed -n "$gl_absolute_header_sed"`
11981
11982 gl_header=$gl_cv_absolute_sys_types_h
11983 gl_cv_next_sys_types_h='"'$gl_header'"'
11984
11985
11986fi
11987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
11988$as_echo "$gl_cv_next_sys_types_h" >&6; }
11989 fi
11990 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
11991
11992 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11993 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11994 gl_next_as_first_directive='<'sys/types.h'>'
11995 else
11996 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11997 gl_next_as_first_directive=$gl_cv_next_sys_types_h
11998 fi
11999 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
09607c9e
TT
12012 GNULIB_MKTIME=0;
12013 GNULIB_NANOSLEEP=0;
12014 GNULIB_STRPTIME=0;
12015 GNULIB_TIMEGM=0;
12016 GNULIB_TIME_R=0;
4a626d0a 12017 GNULIB_TIME_RZ=0;
09607c9e
TT
12018 HAVE_DECL_LOCALTIME_R=1;
12019 HAVE_NANOSLEEP=1;
12020 HAVE_STRPTIME=1;
12021 HAVE_TIMEGM=1;
12022 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
12023 REPLACE_MKTIME=GNULIB_PORTCHECK;
12024 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
12025 REPLACE_TIMEGM=GNULIB_PORTCHECK;
12026
4a626d0a
PA
12027 : ${GNULIB_GETTIMEOFDAY=0};
12028 REPLACE_GMTIME=0;
12029 REPLACE_LOCALTIME=0;
09607c9e
TT
12030
12031
12032
12033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
12034$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
12035if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
12036 $as_echo_n "(cached) " >&6
12037else
12038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12039/* end confdefs.h. */
12040#include <time.h>
12041
12042int
12043main ()
12044{
12045static struct timespec x; x.tv_sec = x.tv_nsec;
12046 ;
12047 return 0;
12048}
12049_ACEOF
12050if ac_fn_c_try_compile "$LINENO"; then :
12051 gl_cv_sys_struct_timespec_in_time_h=yes
12052else
12053 gl_cv_sys_struct_timespec_in_time_h=no
12054fi
12055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12056fi
12057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
12058$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
12059
12060 TIME_H_DEFINES_STRUCT_TIMESPEC=0
12061 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
12062 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
4a626d0a 12063 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
09607c9e
TT
12064 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
12065 TIME_H_DEFINES_STRUCT_TIMESPEC=1
12066 else
12067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
12068$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
12069if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
12070 $as_echo_n "(cached) " >&6
12071else
12072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12073/* end confdefs.h. */
12074#include <sys/time.h>
12075
12076int
12077main ()
12078{
12079static struct timespec x; x.tv_sec = x.tv_nsec;
12080 ;
12081 return 0;
12082}
12083_ACEOF
12084if ac_fn_c_try_compile "$LINENO"; then :
12085 gl_cv_sys_struct_timespec_in_sys_time_h=yes
12086else
12087 gl_cv_sys_struct_timespec_in_sys_time_h=no
12088fi
12089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12090fi
12091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
12092$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
12093 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
12094 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
12095 else
12096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
12097$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
12098if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then :
12099 $as_echo_n "(cached) " >&6
12100else
12101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12102/* end confdefs.h. */
12103#include <pthread.h>
12104
12105int
12106main ()
12107{
12108static struct timespec x; x.tv_sec = x.tv_nsec;
12109 ;
12110 return 0;
12111}
12112_ACEOF
12113if ac_fn_c_try_compile "$LINENO"; then :
12114 gl_cv_sys_struct_timespec_in_pthread_h=yes
12115else
12116 gl_cv_sys_struct_timespec_in_pthread_h=no
12117fi
12118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12119fi
12120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
12121$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
12122 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
12123 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
4a626d0a
PA
12124 else
12125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
12126$as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
12127if test "${gl_cv_sys_struct_timespec_in_unistd_h+set}" = set; then :
12128 $as_echo_n "(cached) " >&6
12129else
12130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12131/* end confdefs.h. */
12132#include <unistd.h>
12133
12134int
12135main ()
12136{
12137static struct timespec x; x.tv_sec = x.tv_nsec;
12138 ;
12139 return 0;
12140}
12141_ACEOF
12142if ac_fn_c_try_compile "$LINENO"; then :
12143 gl_cv_sys_struct_timespec_in_unistd_h=yes
12144else
12145 gl_cv_sys_struct_timespec_in_unistd_h=no
12146fi
12147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12148fi
12149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
12150$as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
12151 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
12152 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
12153 fi
09607c9e
TT
12154 fi
12155 fi
12156 fi
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
4a626d0a 12172
09607c9e
TT
12173 if test $gl_cv_have_include_next = yes; then
12174 gl_cv_next_time_h='<'time.h'>'
12175 else
12176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
12177$as_echo_n "checking absolute name of <time.h>... " >&6; }
12178if test "${gl_cv_next_time_h+set}" = set; then :
12179 $as_echo_n "(cached) " >&6
12180else
12181
4a626d0a
PA
12182
12183
12184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
09607c9e
TT
12185/* end confdefs.h. */
12186#include <time.h>
09607c9e 12187_ACEOF
4a626d0a
PA
12188 case "$host_os" in
12189 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12190 *) gl_absname_cpp="$ac_cpp" ;;
12191 esac
12192
12193 case "$host_os" in
12194 mingw*)
12195 gl_dirsep_regex='[/\\]'
12196 ;;
12197 *)
12198 gl_dirsep_regex='\/'
12199 ;;
12200 esac
12201 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12202 gl_header_literal_regex=`echo 'time.h' \
12203 | sed -e "$gl_make_literal_regex_sed"`
12204 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12205 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12206 s|^/[^/]|//&|
12207 p
12208 q
12209 }'
09607c9e 12210
4a626d0a
PA
12211 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12212 sed -n "$gl_absolute_header_sed"`
09607c9e 12213
4a626d0a
PA
12214 gl_header=$gl_cv_absolute_time_h
12215 gl_cv_next_time_h='"'$gl_header'"'
09607c9e
TT
12216
12217
12218fi
12219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
12220$as_echo "$gl_cv_next_time_h" >&6; }
12221 fi
12222 NEXT_TIME_H=$gl_cv_next_time_h
12223
12224 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12225 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12226 gl_next_as_first_directive='<'time.h'>'
12227 else
12228 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12229 gl_next_as_first_directive=$gl_cv_next_time_h
12230 fi
12231 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
12232
12233
12234
12235
12236
12237
12238
8690e634
JK
12239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
12240$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
12241if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then :
12242 $as_echo_n "(cached) " >&6
12243else
12244 gl_cv_header_wchar_h_correct_inline=yes
12245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12246/* end confdefs.h. */
12247
12248 #define wcstod renamed_wcstod
12249/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
12250 <wchar.h>.
12251 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12252 included before <wchar.h>. */
12253#include <stddef.h>
12254#include <stdio.h>
12255#include <time.h>
12256#include <wchar.h>
12257extern int zero (void);
12258int main () { return zero(); }
12259
12260_ACEOF
49e4877c
PA
12261 save_ac_compile="$ac_compile"
12262 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
8690e634
JK
12263 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12264 (eval $ac_compile) 2>&5
12265 ac_status=$?
12266 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12267 test $ac_status = 0; }; then
8690e634
JK
12268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12269/* end confdefs.h. */
12270
12271 #define wcstod renamed_wcstod
12272/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
12273 <wchar.h>.
12274 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12275 included before <wchar.h>. */
12276#include <stddef.h>
12277#include <stdio.h>
12278#include <time.h>
12279#include <wchar.h>
12280int zero (void) { return 0; }
12281
12282_ACEOF
49e4877c 12283 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
8690e634
JK
12284 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12285 (eval $ac_compile) 2>&5
12286 ac_status=$?
12287 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12288 test $ac_status = 0; }; then
8690e634
JK
12289 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
12290 :
12291 else
12292 gl_cv_header_wchar_h_correct_inline=no
12293 fi
12294 fi
12295 fi
49e4877c 12296 ac_compile="$save_ac_compile"
8690e634
JK
12297 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
12298
12299fi
12300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
12301$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
12302 if test $gl_cv_header_wchar_h_correct_inline = no; then
12303 as_fn_error "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
12304This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
12305C99 mode. You have four options:
12306 - Add the flag -fgnu89-inline to CC and reconfigure, or
12307 - Fix your include files, using parts of
12308 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
12309 - Use a gcc version older than 4.3, or
12310 - Don't use the flags -std=c99 or -std=gnu99.
12311Configuration aborted." "$LINENO" 5
12312 fi
12313
12314
12315
12316
12317
8690e634
JK
12318 if test $ac_cv_header_features_h = yes; then
12319 HAVE_FEATURES_H=1
12320 else
12321 HAVE_FEATURES_H=0
12322 fi
12323
12324
12325
12326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
12327$as_echo_n "checking for wint_t... " >&6; }
12328if test "${gt_cv_c_wint_t+set}" = set; then :
12329 $as_echo_n "(cached) " >&6
12330else
12331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12332/* end confdefs.h. */
12333
12334/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
12335 <wchar.h>.
12336 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
12337 before <wchar.h>. */
12338#include <stddef.h>
12339#include <stdio.h>
12340#include <time.h>
12341#include <wchar.h>
12342 wint_t foo = (wchar_t)'\0';
12343int
12344main ()
12345{
12346
12347 ;
12348 return 0;
12349}
12350_ACEOF
12351if ac_fn_c_try_compile "$LINENO"; then :
12352 gt_cv_c_wint_t=yes
12353else
12354 gt_cv_c_wint_t=no
12355fi
12356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12357fi
12358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
12359$as_echo "$gt_cv_c_wint_t" >&6; }
12360 if test $gt_cv_c_wint_t = yes; then
12361
12362$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
12363
12364 fi
12365
12366
12367 GNULIB_ISWBLANK=0;
12368 GNULIB_WCTYPE=0;
12369 GNULIB_ISWCTYPE=0;
12370 GNULIB_WCTRANS=0;
12371 GNULIB_TOWCTRANS=0;
12372 HAVE_ISWBLANK=1;
12373 HAVE_WCTYPE_T=1;
12374 HAVE_WCTRANS_T=1;
12375 REPLACE_ISWBLANK=0;
12376
12377
12378
12379
8690e634
JK
12380 if false; then
12381 GL_COND_LIBTOOL_TRUE=
12382 GL_COND_LIBTOOL_FALSE='#'
12383else
12384 GL_COND_LIBTOOL_TRUE='#'
12385 GL_COND_LIBTOOL_FALSE=
12386fi
12387
12388 gl_cond_libtool=false
12389 gl_libdeps=
12390 gl_ltlibdeps=
12391 gl_m4_base='import/m4'
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401 gl_source_base='import'
12402
12403
12404 if test $ac_cv_func_alloca_works = no; then
12405 :
12406 fi
12407
12408 # Define an additional variable used in the Makefile substitution.
12409 if test $ac_cv_working_alloca_h = yes; then
12410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
12411$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
12412if test "${gl_cv_rpl_alloca+set}" = set; then :
12413 $as_echo_n "(cached) " >&6
12414else
12415
12416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12417/* end confdefs.h. */
12418
12419#if defined __GNUC__ || defined _AIX || defined _MSC_VER
12420 Need own alloca
12421#endif
12422
12423_ACEOF
12424if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12425 $EGREP "Need own alloca" >/dev/null 2>&1; then :
12426 gl_cv_rpl_alloca=yes
12427else
12428 gl_cv_rpl_alloca=no
12429fi
12430rm -f conftest*
12431
12432
12433fi
12434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
12435$as_echo "$gl_cv_rpl_alloca" >&6; }
12436 if test $gl_cv_rpl_alloca = yes; then
12437
12438$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
12439
12440 ALLOCA_H=alloca.h
12441 else
12442 ALLOCA_H=
12443 fi
12444 else
12445 ALLOCA_H=alloca.h
12446 fi
12447
12448 if test -n "$ALLOCA_H"; then
12449 GL_GENERATE_ALLOCA_H_TRUE=
12450 GL_GENERATE_ALLOCA_H_FALSE='#'
12451else
12452 GL_GENERATE_ALLOCA_H_TRUE='#'
12453 GL_GENERATE_ALLOCA_H_FALSE=
12454fi
12455
12456
12457
98399780
YQ
12458
12459
12460 if test $ac_cv_func_canonicalize_file_name = no; then
12461 HAVE_CANONICALIZE_FILE_NAME=0
12462 if test $ac_cv_func_realpath = no; then
12463 HAVE_REALPATH=0
12464 else
12465 case "$gl_cv_func_realpath_works" in
12466 *yes) ;;
12467 *) REPLACE_REALPATH=1 ;;
12468 esac
12469 fi
12470 else
12471 case "$gl_cv_func_realpath_works" in
12472 *yes)
12473 ;;
12474 *)
12475 REPLACE_CANONICALIZE_FILE_NAME=1
12476 REPLACE_REALPATH=1
12477 ;;
12478 esac
12479 fi
12480
12481 if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
12482
12483
12484
12485
12486
12487
12488
12489
12490 gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
12491
12492 fi
12493
12494
12495cat >>confdefs.h <<_ACEOF
12496#define GNULIB_CANONICALIZE_LGPL 1
12497_ACEOF
12498
12499
12500
12501
12502
12503
12504
12505 GNULIB_CANONICALIZE_FILE_NAME=1
12506
12507
12508
12509
12510
12511$as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
12512
12513
12514
12515
12516
12517
12518
12519
12520 GNULIB_REALPATH=1
12521
12522
12523
12524
12525
12526$as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
12527
12528
12529
12530
6a29c58e
YQ
12531
12532
12533
12534
12535 GNULIB_CHDIR=1
12536
12537
12538
12539
12540
12541$as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
12542
12543
12544
12545
8690e634
JK
12546 if test "x$datarootdir" = x; then
12547 datarootdir='${datadir}'
12548
12549 fi
12550 if test "x$docdir" = x; then
12551 docdir='${datarootdir}/doc/${PACKAGE}'
12552
12553 fi
12554 if test "x$htmldir" = x; then
12555 htmldir='${docdir}'
12556
12557 fi
12558 if test "x$dvidir" = x; then
12559 dvidir='${docdir}'
12560
12561 fi
12562 if test "x$pdfdir" = x; then
12563 pdfdir='${docdir}'
12564
12565 fi
12566 if test "x$psdir" = x; then
12567 psdir='${docdir}'
12568
12569 fi
12570 if test "x$lispdir" = x; then
12571 lispdir='${datarootdir}/emacs/site-lisp'
12572
12573 fi
12574 if test "x$localedir" = x; then
12575 localedir='${datarootdir}/locale'
12576
4a626d0a
PA
12577 fi
12578 if test "x$runstatedir" = x; then
12579 runstatedir='${localstatedir}/run'
12580
8690e634
JK
12581 fi
12582
12583 pkglibexecdir='${libexecdir}/${PACKAGE}'
12584
12585
12586
12587
12588
12589
63ce7108 12590
e26b6bb0
TT
12591
12592
12593
12594
12595
12596
12597
12598 if test $gl_cv_have_include_next = yes; then
12599 gl_cv_next_dirent_h='<'dirent.h'>'
12600 else
12601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
12602$as_echo_n "checking absolute name of <dirent.h>... " >&6; }
12603if test "${gl_cv_next_dirent_h+set}" = set; then :
12604 $as_echo_n "(cached) " >&6
12605else
12606
12607 if test $ac_cv_header_dirent_h = yes; then
12608
12609
4a626d0a
PA
12610
12611
12612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e26b6bb0
TT
12613/* end confdefs.h. */
12614#include <dirent.h>
e26b6bb0 12615_ACEOF
4a626d0a
PA
12616 case "$host_os" in
12617 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12618 *) gl_absname_cpp="$ac_cpp" ;;
12619 esac
12620
12621 case "$host_os" in
12622 mingw*)
12623 gl_dirsep_regex='[/\\]'
12624 ;;
12625 *)
12626 gl_dirsep_regex='\/'
12627 ;;
12628 esac
12629 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12630 gl_header_literal_regex=`echo 'dirent.h' \
12631 | sed -e "$gl_make_literal_regex_sed"`
12632 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12633 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12634 s|^/[^/]|//&|
12635 p
12636 q
12637 }'
12638
12639 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12640 sed -n "$gl_absolute_header_sed"`
12641
12642 gl_header=$gl_cv_absolute_dirent_h
12643 gl_cv_next_dirent_h='"'$gl_header'"'
e26b6bb0
TT
12644 else
12645 gl_cv_next_dirent_h='<'dirent.h'>'
12646 fi
12647
12648
12649fi
12650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
12651$as_echo "$gl_cv_next_dirent_h" >&6; }
12652 fi
12653 NEXT_DIRENT_H=$gl_cv_next_dirent_h
12654
12655 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12656 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12657 gl_next_as_first_directive='<'dirent.h'>'
12658 else
12659 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12660 gl_next_as_first_directive=$gl_cv_next_dirent_h
12661 fi
12662 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
12663
12664
12665
12666
12667 if test $ac_cv_header_dirent_h = yes; then
12668 HAVE_DIRENT_H=1
12669 else
12670 HAVE_DIRENT_H=0
12671 fi
12672
12673
12674
12675 for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do
12676 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
12677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
12678$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
12679if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
12680 $as_echo_n "(cached) " >&6
12681else
12682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12683/* end confdefs.h. */
12684#include <dirent.h>
12685
12686int
12687main ()
12688{
12689#undef $gl_func
12690 (void) $gl_func;
12691 ;
12692 return 0;
12693}
12694_ACEOF
12695if ac_fn_c_try_compile "$LINENO"; then :
12696 eval "$as_gl_Symbol=yes"
12697else
12698 eval "$as_gl_Symbol=no"
12699fi
12700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12701fi
12702eval ac_res=\$$as_gl_Symbol
12703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12704$as_echo "$ac_res" >&6; }
12705 eval as_val=\$$as_gl_Symbol
12706 if test "x$as_val" = x""yes; then :
12707 cat >>confdefs.h <<_ACEOF
12708#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
12709_ACEOF
12710
12711 eval ac_cv_have_decl_$gl_func=yes
12712fi
12713 done
12714
12715
12716
12717
12718
12719
18848e28
GF
12720
12721 for ac_func in dirfd
12722do :
12723 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
12724if test "x$ac_cv_func_dirfd" = x""yes; then :
12725 cat >>confdefs.h <<_ACEOF
12726#define HAVE_DIRFD 1
12727_ACEOF
12728
12729fi
12730done
12731
12732 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
12733 #include <dirent.h>
12734"
12735if test "x$ac_cv_have_decl_dirfd" = x""yes; then :
12736 ac_have_decl=1
12737else
12738 ac_have_decl=0
12739fi
12740
12741cat >>confdefs.h <<_ACEOF
12742#define HAVE_DECL_DIRFD $ac_have_decl
12743_ACEOF
12744
12745 if test $ac_cv_have_decl_dirfd = no; then
12746 HAVE_DECL_DIRFD=0
12747 fi
12748
12749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
12750$as_echo_n "checking whether dirfd is a macro... " >&6; }
12751if test "${gl_cv_func_dirfd_macro+set}" = set; then :
12752 $as_echo_n "(cached) " >&6
12753else
12754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12755/* end confdefs.h. */
12756
12757#include <sys/types.h>
12758#include <dirent.h>
12759#ifdef dirfd
12760 dirent_header_defines_dirfd
12761#endif
12762_ACEOF
12763if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12764 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
12765 gl_cv_func_dirfd_macro=yes
12766else
12767 gl_cv_func_dirfd_macro=no
12768fi
12769rm -f conftest*
12770
12771fi
12772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
12773$as_echo "$gl_cv_func_dirfd_macro" >&6; }
12774
49e4877c
PA
12775 # Use the replacement if we have no function or macro with that name,
12776 # or if OS/2 kLIBC whose dirfd() does not work.
12777 # Replace only if the system declares dirfd already.
12778 case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
12779 no,no,*,yes | *,*,os2*,yes)
18848e28 12780 REPLACE_DIRFD=1
18848e28 12781
49e4877c
PA
12782$as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
12783;;
12784 esac
12785
12786 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
12787 || test $REPLACE_DIRFD = 1; then
18848e28
GF
12788
12789
12790
12791
12792
12793
12794
12795
12796 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
12797
12798
12799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
12800$as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
12801if test "${gl_cv_sys_dir_fd_member_name+set}" = set; then :
12802 $as_echo_n "(cached) " >&6
12803else
12804
12805 dirfd_save_CFLAGS=$CFLAGS
12806 for ac_expr in d_fd dd_fd; do
12807
12808 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
12809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12810/* end confdefs.h. */
12811
12812 #include <sys/types.h>
12813 #include <dirent.h>
12814int
12815main ()
12816{
12817DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
12818 ;
12819 return 0;
12820}
12821_ACEOF
12822if ac_fn_c_try_compile "$LINENO"; then :
12823 dir_fd_found=yes
12824
12825fi
12826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12827 CFLAGS=$dirfd_save_CFLAGS
12828 test "$dir_fd_found" = yes && break
12829 done
12830 test "$dir_fd_found" = yes || ac_expr=no_such_member
12831
12832 gl_cv_sys_dir_fd_member_name=$ac_expr
12833
12834
12835fi
12836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
12837$as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
12838 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
12839
12840cat >>confdefs.h <<_ACEOF
12841#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
12842_ACEOF
12843
12844 fi
12845
12846
12847 fi
12848
12849
12850
12851
12852
12853 GNULIB_DIRFD=1
12854
12855
12856
12857
12858
12859$as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
12860
12861
12862
12863
12864
12865
12866
12867
6a29c58e
YQ
12868
12869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
12870$as_echo_n "checking whether // is distinct from /... " >&6; }
12871if test "${gl_cv_double_slash_root+set}" = set; then :
12872 $as_echo_n "(cached) " >&6
12873else
12874 if test x"$cross_compiling" = xyes ; then
12875 # When cross-compiling, there is no way to tell whether // is special
12876 # short of a list of hosts. However, the only known hosts to date
12877 # that have a distinct // are Apollo DomainOS (too old to port to),
12878 # Cygwin, and z/OS. If anyone knows of another system for which // has
12879 # special semantics and is distinct from /, please report it to
12880 # <bug-gnulib@gnu.org>.
12881 case $host in
12882 *-cygwin | i370-ibm-openedition)
12883 gl_cv_double_slash_root=yes ;;
12884 *)
12885 # Be optimistic and assume that / and // are the same when we
12886 # don't know.
12887 gl_cv_double_slash_root='unknown, assuming no' ;;
12888 esac
12889 else
12890 set x `ls -di / // 2>/dev/null`
12891 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
12892 gl_cv_double_slash_root=no
12893 else
12894 gl_cv_double_slash_root=yes
12895 fi
12896 fi
12897fi
12898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
12899$as_echo "$gl_cv_double_slash_root" >&6; }
12900 if test "$gl_cv_double_slash_root" = yes; then
12901
12902$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
12903
12904 fi
12905
12906
12907
12908
49e4877c
PA
12909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
12910$as_echo_n "checking for flexible array member... " >&6; }
12911if test "${ac_cv_c_flexmember+set}" = set; then :
12912 $as_echo_n "(cached) " >&6
12913else
12914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12915/* end confdefs.h. */
12916#include <stdlib.h>
12917 #include <stdio.h>
12918 #include <stddef.h>
12919 struct s { int n; double d[]; };
12920int
12921main ()
12922{
12923int m = getchar ();
12924 size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
12925 nbytes += sizeof (struct s) - 1;
12926 nbytes -= nbytes % sizeof (struct s);
12927 struct s *p = malloc (nbytes);
12928 p->d[0] = 0.0;
12929 return p->d != (double *) NULL;
12930 ;
12931 return 0;
12932}
12933_ACEOF
12934if ac_fn_c_try_compile "$LINENO"; then :
12935 ac_cv_c_flexmember=yes
12936else
12937 ac_cv_c_flexmember=no
12938fi
12939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12940fi
12941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
12942$as_echo "$ac_cv_c_flexmember" >&6; }
12943 if test $ac_cv_c_flexmember = yes; then
12944
12945$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
12946
12947 else
12948 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
12949
12950 fi
12951
12952
6a29c58e
YQ
12953
12954
88b48903
WN
12955 FLOAT_H=
12956 REPLACE_FLOAT_LDBL=0
12957 case "$host_os" in
12958 aix* | beos* | openbsd* | mirbsd* | irix*)
12959 FLOAT_H=float.h
12960 ;;
12961 freebsd*)
12962 case "$host_cpu" in
12963 i[34567]86 )
12964 FLOAT_H=float.h
12965 ;;
12966 x86_64 )
12967 # On x86_64 systems, the C compiler may still be generating
12968 # 32-bit code.
12969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12970/* end confdefs.h. */
12971#if defined __LP64__ || defined __x86_64__ || defined __amd64__
12972 yes
12973 #endif
12974_ACEOF
12975if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12976 $EGREP "yes" >/dev/null 2>&1; then :
12977
12978else
12979 FLOAT_H=float.h
12980fi
12981rm -f conftest*
8690e634 12982
88b48903
WN
12983 ;;
12984 esac
12985 ;;
12986 linux*)
12987 case "$host_cpu" in
12988 powerpc*)
12989 FLOAT_H=float.h
12990 ;;
12991 esac
12992 ;;
12993 esac
12994 case "$host_os" in
12995 aix* | freebsd* | linux*)
12996 if test -n "$FLOAT_H"; then
12997 REPLACE_FLOAT_LDBL=1
12998 fi
12999 ;;
13000 esac
a512b375 13001
88b48903
WN
13002 REPLACE_ITOLD=0
13003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
13004$as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
13005if test "${gl_cv_func_itold_works+set}" = set; then :
8690e634
JK
13006 $as_echo_n "(cached) " >&6
13007else
88b48903
WN
13008
13009 if test "$cross_compiling" = yes; then :
13010 case "$host" in
13011 sparc*-*-linux*)
13012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13013/* end confdefs.h. */
13014#if defined __LP64__ || defined __arch64__
13015 yes
13016 #endif
13017_ACEOF
13018if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13019 $EGREP "yes" >/dev/null 2>&1; then :
13020 gl_cv_func_itold_works="guessing no"
13021else
13022 gl_cv_func_itold_works="guessing yes"
13023fi
13024rm -f conftest*
13025
13026 ;;
13027 *) gl_cv_func_itold_works="guessing yes" ;;
13028 esac
13029
8690e634
JK
13030else
13031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13032/* end confdefs.h. */
8690e634 13033
88b48903
WN
13034int i = -1;
13035volatile long double ld;
13036int main ()
8690e634 13037{
88b48903
WN
13038 ld += i * 1.0L;
13039 if (ld > 0)
13040 return 1;
13041 return 0;
13042}
13043_ACEOF
13044if ac_fn_c_try_run "$LINENO"; then :
13045 gl_cv_func_itold_works=yes
13046else
13047 gl_cv_func_itold_works=no
13048fi
13049rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13050 conftest.$ac_objext conftest.beam conftest.$ac_ext
13051fi
13052
13053
13054fi
13055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
13056$as_echo "$gl_cv_func_itold_works" >&6; }
13057 case "$gl_cv_func_itold_works" in
13058 *no)
13059 REPLACE_ITOLD=1
13060 FLOAT_H=float.h
13061 ;;
13062 esac
13063
13064 if test -n "$FLOAT_H"; then
13065
13066
13067
13068
13069
13070
13071
13072
13073 if test $gl_cv_have_include_next = yes; then
13074 gl_cv_next_float_h='<'float.h'>'
13075 else
13076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
13077$as_echo_n "checking absolute name of <float.h>... " >&6; }
13078if test "${gl_cv_next_float_h+set}" = set; then :
13079 $as_echo_n "(cached) " >&6
13080else
13081
4a626d0a
PA
13082
13083
13084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
88b48903
WN
13085/* end confdefs.h. */
13086#include <float.h>
88b48903 13087_ACEOF
4a626d0a
PA
13088 case "$host_os" in
13089 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13090 *) gl_absname_cpp="$ac_cpp" ;;
13091 esac
13092
13093 case "$host_os" in
13094 mingw*)
13095 gl_dirsep_regex='[/\\]'
13096 ;;
13097 *)
13098 gl_dirsep_regex='\/'
13099 ;;
13100 esac
13101 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13102 gl_header_literal_regex=`echo 'float.h' \
13103 | sed -e "$gl_make_literal_regex_sed"`
13104 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13105 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13106 s|^/[^/]|//&|
13107 p
13108 q
13109 }'
88b48903 13110
4a626d0a
PA
13111 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13112 sed -n "$gl_absolute_header_sed"`
88b48903 13113
4a626d0a
PA
13114 gl_header=$gl_cv_absolute_float_h
13115 gl_cv_next_float_h='"'$gl_header'"'
88b48903
WN
13116
13117
13118fi
13119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
13120$as_echo "$gl_cv_next_float_h" >&6; }
13121 fi
13122 NEXT_FLOAT_H=$gl_cv_next_float_h
13123
13124 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13125 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13126 gl_next_as_first_directive='<'float.h'>'
13127 else
13128 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13129 gl_next_as_first_directive=$gl_cv_next_float_h
13130 fi
13131 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
13132
13133
13134
13135
13136 fi
13137
13138 if test -n "$FLOAT_H"; then
13139 GL_GENERATE_FLOAT_H_TRUE=
13140 GL_GENERATE_FLOAT_H_FALSE='#'
13141else
13142 GL_GENERATE_FLOAT_H_TRUE='#'
13143 GL_GENERATE_FLOAT_H_FALSE=
13144fi
13145
13146
13147
13148 if test $REPLACE_FLOAT_LDBL = 1; then
13149
13150
13151
13152
13153
13154
13155
13156
13157 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
13158
13159 fi
13160 if test $REPLACE_ITOLD = 1; then
13161
13162
13163
13164
13165
13166
13167
13168
13169 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
13170
13171 fi
13172
13173
13174
13175
13176
13177 FNMATCH_H=
13178 gl_fnmatch_required_lowercase=`
13179 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
13180 `
13181 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
13182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
13183$as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
13184if { as_var=$gl_fnmatch_cache_var; eval "test \"\${$as_var+set}\" = set"; }; then :
13185 $as_echo_n "(cached) " >&6
13186else
13187 if test $gl_fnmatch_required = GNU; then
13188 gl_fnmatch_gnu_start=
13189 gl_fnmatch_gnu_end=
13190 else
13191 gl_fnmatch_gnu_start='#if 0'
13192 gl_fnmatch_gnu_end='#endif'
13193 fi
13194 if test "$cross_compiling" = yes; then :
13195 eval "$gl_fnmatch_cache_var=\"guessing no\""
13196else
13197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13198/* end confdefs.h. */
13199#include <fnmatch.h>
13200 static int
13201 y (char const *pattern, char const *string, int flags)
13202 {
13203 return fnmatch (pattern, string, flags) == 0;
13204 }
13205 static int
13206 n (char const *pattern, char const *string, int flags)
13207 {
13208 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
13209 }
13210
13211int
13212main ()
13213{
13214char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
13215 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
13216 static char const A_1[] = { 'A' - 1, 0 };
13217 static char const A01[] = { 'A' + 1, 0 };
13218 static char const a_1[] = { 'a' - 1, 0 };
13219 static char const a01[] = { 'a' + 1, 0 };
13220 static char const bs_1[] = { '\\\\' - 1, 0 };
8690e634
JK
13221 static char const bs01[] = { '\\\\' + 1, 0 };
13222 int result = 0;
13223 if (!n ("a*", "", 0))
13224 return 1;
13225 if (!y ("a*", "abc", 0))
13226 return 1;
13227 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
13228 return 1;
13229 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
13230 return 2;
13231 if (!y ("a\\\\bc", "abc", 0))
13232 return 3;
13233 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
13234 return 3;
13235 if (!y ("*x", ".x", 0))
13236 return 4;
13237 if (!n ("*x", ".x", FNM_PERIOD))
13238 return 4;
13239 if (!y (Apat, "\\\\", 0))
13240 return 5;
13241 if (!y (Apat, "A", 0))
13242 return 5;
13243 if (!y (apat, "\\\\", 0))
13244 return 5;
13245 if (!y (apat, "a", 0))
13246 return 5;
13247 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
13248 return 5;
13249 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
13250 return 5;
13251 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
13252 return 5;
13253 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
13254 return 5;
13255 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
13256 return 5;
13257 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
13258 return 5;
13259 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
13260 return 5;
13261 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
13262 return 5;
13263 $gl_fnmatch_gnu_start
13264 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
13265 result |= 8;
13266 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
13267 result |= 16;
13268 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
13269 result |= 32;
13270 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
13271 result |= 64;
13272 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
13273 result |= 64;
13274 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
13275 result |= 64;
13276 $gl_fnmatch_gnu_end
13277 return result;
13278
13279 ;
13280 return 0;
13281}
13282_ACEOF
13283if ac_fn_c_try_run "$LINENO"; then :
13284 eval "$gl_fnmatch_cache_var=yes"
13285else
13286 eval "$gl_fnmatch_cache_var=no"
13287fi
13288rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13289 conftest.$ac_objext conftest.beam conftest.$ac_ext
13290fi
13291
13292
13293fi
13294eval ac_res=\$$gl_fnmatch_cache_var
13295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13296$as_echo "$ac_res" >&6; }
13297 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
13298 if test "$gl_fnmatch_result" = yes; then
13299 rm -f "$gl_source_base/fnmatch.h"
13300 else
13301 FNMATCH_H=fnmatch.h
13302 fi
13303
13304 if test -n "$FNMATCH_H"; then
13305 GL_GENERATE_FNMATCH_H_TRUE=
13306 GL_GENERATE_FNMATCH_H_FALSE='#'
13307else
13308 GL_GENERATE_FNMATCH_H_TRUE='#'
13309 GL_GENERATE_FNMATCH_H_FALSE=
13310fi
13311
13312
a512b375 13313 if test -n "$FNMATCH_H"; then
8690e634
JK
13314
13315
13316
13317
13318
13319
13320
13321
13322 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
13323
13324
13325
13326cat >>confdefs.h <<_ACEOF
13327#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
13328_ACEOF
13329
13330
13331 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
13332"
13333if test "x$ac_cv_have_decl_isblank" = x""yes; then :
13334 ac_have_decl=1
13335else
13336 ac_have_decl=0
13337fi
13338
13339cat >>confdefs.h <<_ACEOF
13340#define HAVE_DECL_ISBLANK $ac_have_decl
13341_ACEOF
13342
13343
c971b7fa 13344
c971b7fa 13345
a512b375 13346 fi
c971b7fa 13347
c971b7fa 13348
c971b7fa 13349
c971b7fa 13350
c971b7fa 13351
a512b375 13352 if test -n "$FNMATCH_H"; then
c971b7fa 13353
c971b7fa 13354
c971b7fa
PA
13355
13356
c971b7fa
PA
13357
13358
c971b7fa
PA
13359
13360
8690e634 13361 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
c971b7fa 13362
c971b7fa 13363
c971b7fa 13364
8690e634
JK
13365cat >>confdefs.h <<_ACEOF
13366#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
13367_ACEOF
c971b7fa
PA
13368
13369
8690e634
JK
13370 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
13371"
13372if test "x$ac_cv_have_decl_isblank" = x""yes; then :
13373 ac_have_decl=1
13374else
13375 ac_have_decl=0
c971b7fa 13376fi
c971b7fa 13377
8690e634
JK
13378cat >>confdefs.h <<_ACEOF
13379#define HAVE_DECL_ISBLANK $ac_have_decl
c971b7fa
PA
13380_ACEOF
13381
c971b7fa 13382
8690e634 13383
c971b7fa 13384
88b48903
WN
13385 fi
13386
13387
13388
13389 FREXP_LIBM=
13390 if test $gl_cv_func_frexp_no_libm = no; then
13391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5
13392$as_echo_n "checking whether frexp() can be used with libm... " >&6; }
13393if test "${gl_cv_func_frexp_in_libm+set}" = set; then :
13394 $as_echo_n "(cached) " >&6
13395else
13396
13397 save_LIBS="$LIBS"
13398 LIBS="$LIBS -lm"
13399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13400/* end confdefs.h. */
13401#include <math.h>
13402 double x;
13403int
13404main ()
13405{
13406int e; return frexp (x, &e) > 0;
13407 ;
13408 return 0;
13409}
13410_ACEOF
13411if ac_fn_c_try_link "$LINENO"; then :
13412 gl_cv_func_frexp_in_libm=yes
13413else
13414 gl_cv_func_frexp_in_libm=no
13415fi
13416rm -f core conftest.err conftest.$ac_objext \
13417 conftest$ac_exeext conftest.$ac_ext
13418 LIBS="$save_LIBS"
13419
13420fi
13421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5
13422$as_echo "$gl_cv_func_frexp_in_libm" >&6; }
13423 if test $gl_cv_func_frexp_in_libm = yes; then
13424 FREXP_LIBM=-lm
13425 fi
13426 fi
13427 if test $gl_cv_func_frexp_no_libm = yes \
13428 || test $gl_cv_func_frexp_in_libm = yes; then
13429 save_LIBS="$LIBS"
13430 LIBS="$LIBS $FREXP_LIBM"
13431
13432
13433
88b48903
WN
13434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
13435$as_echo_n "checking whether frexp works... " >&6; }
13436if test "${gl_cv_func_frexp_works+set}" = set; then :
13437 $as_echo_n "(cached) " >&6
13438else
13439
13440 if test "$cross_compiling" = yes; then :
13441 case "$host_os" in
13442 netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
13443 *) gl_cv_func_frexp_works="guessing yes";;
13444 esac
13445
13446else
13447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13448/* end confdefs.h. */
13449
13450#include <float.h>
13451#include <math.h>
13452#include <string.h>
4a626d0a
PA
13453#if HAVE_DECL_ALARM
13454# include <signal.h>
88b48903
WN
13455# include <unistd.h>
13456#endif
13457/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
13458 ICC 10.0 has a bug when optimizing the expression -zero.
13459 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
13460 to PowerPC on Mac OS X 10.5. */
13461#if defined __hpux || defined __sgi || defined __ICC
13462static double
13463compute_minus_zero (void)
13464{
13465 return -DBL_MIN * DBL_MIN;
13466}
13467# define minus_zero compute_minus_zero ()
13468#else
13469double minus_zero = -0.0;
13470#endif
13471int main()
13472{
13473 int result = 0;
13474 int i;
13475 volatile double x;
13476 double zero = 0.0;
4a626d0a 13477#if HAVE_DECL_ALARM
88b48903
WN
13478 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
13479 number. Let the test fail in this case. */
4a626d0a 13480 signal (SIGALRM, SIG_DFL);
88b48903
WN
13481 alarm (5);
13482#endif
13483 /* Test on denormalized numbers. */
13484 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
13485 ;
13486 if (x > 0.0)
13487 {
13488 int exp;
13489 double y = frexp (x, &exp);
13490 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
13491 On NetBSD: y = 0.75. Correct: y = 0.5. */
13492 if (y != 0.5)
13493 result |= 1;
13494 }
13495 /* Test on infinite numbers. */
13496 x = 1.0 / zero;
13497 {
13498 int exp;
13499 double y = frexp (x, &exp);
13500 if (y != x)
13501 result |= 2;
13502 }
13503 /* Test on negative zero. */
13504 x = minus_zero;
13505 {
13506 int exp;
13507 double y = frexp (x, &exp);
13508 if (memcmp (&y, &x, sizeof x))
13509 result |= 4;
13510 }
13511 return result;
13512}
13513_ACEOF
13514if ac_fn_c_try_run "$LINENO"; then :
13515 gl_cv_func_frexp_works=yes
13516else
13517 gl_cv_func_frexp_works=no
13518fi
13519rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13520 conftest.$ac_objext conftest.beam conftest.$ac_ext
13521fi
13522
13523
13524fi
13525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
13526$as_echo "$gl_cv_func_frexp_works" >&6; }
13527
13528 LIBS="$save_LIBS"
13529 case "$gl_cv_func_frexp_works" in
13530 *yes) gl_func_frexp=yes ;;
13531 *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;;
13532 esac
13533 else
13534 gl_func_frexp=no
13535 fi
13536 if test $gl_func_frexp = yes; then
13537
13538$as_echo "#define HAVE_FREXP 1" >>confdefs.h
13539
13540 fi
13541
13542
13543 if test $gl_func_frexp != yes; then
13544
13545
13546
13547
13548
13549
13550
13551
13552 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
13553
13554 fi
13555
13556
13557
13558
13559
13560 GNULIB_FREXP=1
13561
13562
13563
13564
13565
13566$as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
13577"
13578if test "x$ac_cv_have_decl_frexpl" = x""yes; then :
13579
13580else
13581 HAVE_DECL_FREXPL=0
13582fi
13583
13584
13585 FREXPL_LIBM=
13586 if test $HAVE_DECL_FREXPL = 1; then
13587
13588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
13589$as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
13590if test "${gl_cv_func_frexpl_no_libm+set}" = set; then :
13591 $as_echo_n "(cached) " >&6
13592else
13593
13594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13595/* end confdefs.h. */
13596#include <math.h>
13597 long double x;
13598int
13599main ()
13600{
13601int e; return frexpl (x, &e) > 0;
13602 ;
13603 return 0;
13604}
13605_ACEOF
13606if ac_fn_c_try_link "$LINENO"; then :
13607 gl_cv_func_frexpl_no_libm=yes
13608else
13609 gl_cv_func_frexpl_no_libm=no
13610fi
13611rm -f core conftest.err conftest.$ac_objext \
13612 conftest$ac_exeext conftest.$ac_ext
13613
13614fi
13615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
13616$as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
13617
13618 if test $gl_cv_func_frexpl_no_libm = no; then
13619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5
13620$as_echo_n "checking whether frexpl() can be used with libm... " >&6; }
13621if test "${gl_cv_func_frexpl_in_libm+set}" = set; then :
13622 $as_echo_n "(cached) " >&6
13623else
13624
13625 save_LIBS="$LIBS"
13626 LIBS="$LIBS -lm"
13627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13628/* end confdefs.h. */
13629#include <math.h>
13630 long double x;
13631int
13632main ()
13633{
13634int e; return frexpl (x, &e) > 0;
13635 ;
13636 return 0;
13637}
13638_ACEOF
13639if ac_fn_c_try_link "$LINENO"; then :
13640 gl_cv_func_frexpl_in_libm=yes
13641else
13642 gl_cv_func_frexpl_in_libm=no
13643fi
13644rm -f core conftest.err conftest.$ac_objext \
13645 conftest$ac_exeext conftest.$ac_ext
13646 LIBS="$save_LIBS"
13647
13648fi
13649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5
13650$as_echo "$gl_cv_func_frexpl_in_libm" >&6; }
13651 if test $gl_cv_func_frexpl_in_libm = yes; then
13652 FREXPL_LIBM=-lm
13653 fi
13654 fi
13655 if test $gl_cv_func_frexpl_no_libm = yes \
13656 || test $gl_cv_func_frexpl_in_libm = yes; then
13657 save_LIBS="$LIBS"
13658 LIBS="$LIBS $FREXPL_LIBM"
13659
13660
13661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
13662$as_echo_n "checking whether frexpl works... " >&6; }
13663if test "${gl_cv_func_frexpl_works+set}" = set; then :
13664 $as_echo_n "(cached) " >&6
13665else
13666
13667 if test "$cross_compiling" = yes; then :
13668
13669 case "$host_os" in
13670 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
13671 gl_cv_func_frexpl_works="guessing no";;
13672 *) gl_cv_func_frexpl_works="guessing yes";;
13673 esac
13674
13675else
13676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13677/* end confdefs.h. */
13678
13679#include <float.h>
13680#include <math.h>
13681/* Override the values of <float.h>, like done in float.in.h. */
13682#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
13683# undef LDBL_MIN_EXP
13684# define LDBL_MIN_EXP (-16381)
13685#endif
13686#if defined __i386__ && defined __FreeBSD__
13687# undef LDBL_MIN_EXP
13688# define LDBL_MIN_EXP (-16381)
13689#endif
13690#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
13691# undef LDBL_MIN_EXP
13692# define LDBL_MIN_EXP DBL_MIN_EXP
13693#endif
13694#if defined __sgi && (LDBL_MANT_DIG >= 106)
13695# if defined __GNUC__
13696# undef LDBL_MIN_EXP
13697# define LDBL_MIN_EXP DBL_MIN_EXP
13698# endif
13699#endif
13700extern
13701#ifdef __cplusplus
13702"C"
13703#endif
13704long double frexpl (long double, int *);
13705int main()
13706{
13707 int result = 0;
13708 volatile long double x;
13709 /* Test on finite numbers that fails on AIX 5.1. */
13710 x = 16.0L;
13711 {
13712 int exp = -9999;
13713 frexpl (x, &exp);
13714 if (exp != 5)
13715 result |= 1;
13716 }
13717 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
13718 function returns an invalid (incorrectly normalized) value: it returns
13719 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
13720 but the correct result is
13721 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
13722 x = 1.01L;
13723 {
13724 int exp = -9999;
13725 long double y = frexpl (x, &exp);
13726 if (!(exp == 1 && y == 0.505L))
13727 result |= 2;
13728 }
13729 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
13730 LDBL_MAX_EXP = 16384.
13731 In the loop end test, we test x against Infinity, rather than comparing
13732 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
13733 {
13734 int i;
13735 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
13736 {
13737 int exp = -9999;
13738 frexpl (x, &exp);
13739 if (exp != i)
13740 {
13741 result |= 4;
13742 break;
13743 }
13744 }
13745 }
13746 /* Test on denormalized numbers. */
13747 {
13748 int i;
13749 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
13750 ;
13751 if (x > 0.0L)
13752 {
13753 int exp;
13754 long double y = frexpl (x, &exp);
13755 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
13756 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
13757 if (exp != LDBL_MIN_EXP - 1)
13758 result |= 8;
13759 }
13760 }
13761 /* Test on infinite numbers. */
13762 x = 1.0L / 0.0L;
13763 {
13764 int exp;
13765 long double y = frexpl (x, &exp);
13766 if (y != x)
13767 result |= 16;
13768 }
13769 return result;
13770}
13771_ACEOF
13772if ac_fn_c_try_run "$LINENO"; then :
13773 gl_cv_func_frexpl_works=yes
13774else
13775 gl_cv_func_frexpl_works=no
13776fi
13777rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13778 conftest.$ac_objext conftest.beam conftest.$ac_ext
13779fi
13780
13781
4a626d0a
PA
13782fi
13783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
13784$as_echo "$gl_cv_func_frexpl_works" >&6; }
13785
13786 LIBS="$save_LIBS"
13787 case "$gl_cv_func_frexpl_works" in
13788 *yes) gl_func_frexpl=yes ;;
13789 *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;;
13790 esac
13791 else
13792 gl_func_frexpl=no
13793 fi
13794 if test $gl_func_frexpl = yes; then
13795
13796$as_echo "#define HAVE_FREXPL 1" >>confdefs.h
13797
13798 fi
13799 fi
13800 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
13801 if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
13802
13803 FREXPL_LIBM="$FREXP_LIBM"
13804 else
13805 FREXPL_LIBM=
13806 fi
13807 fi
13808
13809
13810 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
13811
13812
13813
13814
13815
13816
13817
13818
13819 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
13820
13821 fi
13822
13823
13824
13825
13826
13827 GNULIB_FREXPL=1
13828
13829
13830
13831
13832
13833$as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843 gl_gettimeofday_timezone=void
13844 if test $ac_cv_func_gettimeofday != yes; then
13845 HAVE_GETTIMEOFDAY=0
13846 else
13847
13848
13849
13850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
13851$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
13852if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
13853 $as_echo_n "(cached) " >&6
13854else
13855 if test "$cross_compiling" = yes; then :
13856 # When cross-compiling:
13857 case "$host_os" in
13858 # Guess all is fine on glibc systems.
13859 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
13860 # If we don't know, assume the worst.
13861 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
13862 esac
13863
13864else
13865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13866/* end confdefs.h. */
13867#include <string.h>
13868 #include <sys/time.h>
13869 #include <time.h>
13870 #include <stdlib.h>
13871
13872int
13873main ()
13874{
13875
13876 time_t t = 0;
13877 struct tm *lt;
13878 struct tm saved_lt;
13879 struct timeval tv;
13880 lt = localtime (&t);
13881 saved_lt = *lt;
13882 gettimeofday (&tv, NULL);
13883 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
13884
13885 ;
13886 return 0;
13887}
13888_ACEOF
13889if ac_fn_c_try_run "$LINENO"; then :
13890 gl_cv_func_gettimeofday_clobber=no
13891else
13892 gl_cv_func_gettimeofday_clobber=yes
13893fi
13894rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13895 conftest.$ac_objext conftest.beam conftest.$ac_ext
13896fi
13897
13898fi
13899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
13900$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
13901
13902 case "$gl_cv_func_gettimeofday_clobber" in
13903 *yes)
13904 REPLACE_GETTIMEOFDAY=1
13905
13906 REPLACE_GMTIME=1
13907 REPLACE_LOCALTIME=1
13908
13909
13910$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
13911
13912 ;;
13913 esac
13914
13915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
13916$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
13917if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
13918 $as_echo_n "(cached) " >&6
13919else
13920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13921/* end confdefs.h. */
13922#include <sys/time.h>
13923 struct timeval c;
13924 int gettimeofday (struct timeval *restrict, void *restrict);
13925
13926int
13927main ()
13928{
13929/* glibc uses struct timezone * rather than the POSIX void *
13930 if _GNU_SOURCE is defined. However, since the only portable
13931 use of gettimeofday uses NULL as the second parameter, and
13932 since the glibc definition is actually more typesafe, it is
13933 not worth wrapping this to get a compliant signature. */
13934 int (*f) (struct timeval *restrict, void *restrict)
13935 = gettimeofday;
13936 int x = f (&c, 0);
13937 return !(x | c.tv_sec | c.tv_usec);
13938
13939 ;
13940 return 0;
13941}
13942_ACEOF
13943if ac_fn_c_try_compile "$LINENO"; then :
13944 gl_cv_func_gettimeofday_posix_signature=yes
13945else
13946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13947/* end confdefs.h. */
13948#include <sys/time.h>
13949int gettimeofday (struct timeval *restrict, struct timezone *restrict);
13950
13951int
13952main ()
13953{
13954
13955 ;
13956 return 0;
13957}
13958_ACEOF
13959if ac_fn_c_try_compile "$LINENO"; then :
13960 gl_cv_func_gettimeofday_posix_signature=almost
13961else
13962 gl_cv_func_gettimeofday_posix_signature=no
13963fi
13964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13965fi
13966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13967fi
13968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
13969$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
13970 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
13971 gl_gettimeofday_timezone='struct timezone'
13972 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
13973 REPLACE_GETTIMEOFDAY=1
13974 fi
13975 if test $REPLACE_STRUCT_TIMEVAL = 1; then
13976 REPLACE_GETTIMEOFDAY=1
13977 fi
13978
13979 fi
13980
13981cat >>confdefs.h <<_ACEOF
13982#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
13983_ACEOF
13984
88b48903 13985
4a626d0a 13986 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
88b48903 13987
88b48903 13988
88b48903 13989
88b48903
WN
13990
13991
88b48903
WN
13992
13993
13994
4a626d0a 13995 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
88b48903
WN
13996
13997
4a626d0a
PA
13998 for ac_header in sys/timeb.h
13999do :
14000 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
14001if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
14002 cat >>confdefs.h <<_ACEOF
14003#define HAVE_SYS_TIMEB_H 1
14004_ACEOF
88b48903 14005
4a626d0a 14006fi
88b48903 14007
4a626d0a
PA
14008done
14009
14010 for ac_func in _ftime
14011do :
14012 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
14013if test "x$ac_cv_func__ftime" = x""yes; then :
14014 cat >>confdefs.h <<_ACEOF
14015#define HAVE__FTIME 1
14016_ACEOF
14017
14018fi
14019done
88b48903 14020
88b48903
WN
14021
14022 fi
14023
14024
14025
14026
14027
4a626d0a 14028 GNULIB_GETTIMEOFDAY=1
88b48903
WN
14029
14030
14031
14032
14033
4a626d0a 14034$as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
88b48903
WN
14035
14036
14037
14038
49e4877c
PA
14039 :
14040
14041
88b48903
WN
14042
14043
14044
14045
14046 PRIPTR_PREFIX=
14047 if test -n "$STDINT_H"; then
14048 PRIPTR_PREFIX='"l"'
14049 else
14050 for glpfx in '' l ll I64; do
14051 case $glpfx in
14052 '') gltype1='int';;
14053 l) gltype1='long int';;
14054 ll) gltype1='long long int';;
14055 I64) gltype1='__int64';;
14056 esac
14057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14058/* end confdefs.h. */
14059#include <stdint.h>
14060 extern intptr_t foo;
14061 extern $gltype1 foo;
14062int
14063main ()
14064{
14065
14066 ;
14067 return 0;
14068}
14069_ACEOF
14070if ac_fn_c_try_compile "$LINENO"; then :
14071 PRIPTR_PREFIX='"'$glpfx'"'
14072fi
14073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14074 test -n "$PRIPTR_PREFIX" && break
14075 done
14076 fi
14077
14078
14079
14080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
14081$as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
14082if test "${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+set}" = set; then :
14083 $as_echo_n "(cached) " >&6
14084else
14085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14086/* end confdefs.h. */
14087/* Work also in C++ mode. */
14088 #define __STDC_LIMIT_MACROS 1
14089
14090 /* Work if build is not clean. */
14091 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
14092
14093 #include <limits.h>
14094 #if HAVE_STDINT_H
14095 #include <stdint.h>
14096 #endif
14097
14098 #if defined INT32_MAX && defined INTMAX_MAX
14099 #define CONDITION (INT32_MAX < INTMAX_MAX)
14100 #elif HAVE_LONG_LONG_INT
14101 #define CONDITION (sizeof (int) < sizeof (long long int))
14102 #else
14103 #define CONDITION 0
14104 #endif
14105 int test[CONDITION ? 1 : -1];
14106int
14107main ()
14108{
14109
14110 ;
14111 return 0;
14112}
14113_ACEOF
14114if ac_fn_c_try_compile "$LINENO"; then :
14115 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
14116else
14117 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
14118fi
14119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14120fi
14121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
14122$as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
14123 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
14124 INT32_MAX_LT_INTMAX_MAX=1;
14125 else
14126 INT32_MAX_LT_INTMAX_MAX=0;
14127 fi
14128
14129
14130 if test $APPLE_UNIVERSAL_BUILD = 0; then
14131
14132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
14133$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
14134if test "${gl_cv_test_INT64_MAX_EQ_LONG_MAX+set}" = set; then :
14135 $as_echo_n "(cached) " >&6
14136else
14137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14138/* end confdefs.h. */
14139/* Work also in C++ mode. */
14140 #define __STDC_LIMIT_MACROS 1
14141
14142 /* Work if build is not clean. */
14143 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
14144
14145 #include <limits.h>
14146 #if HAVE_STDINT_H
14147 #include <stdint.h>
14148 #endif
14149
14150 #if defined INT64_MAX
14151 #define CONDITION (INT64_MAX == LONG_MAX)
14152 #elif HAVE_LONG_LONG_INT
14153 #define CONDITION (sizeof (long long int) == sizeof (long int))
14154 #else
14155 #define CONDITION 0
14156 #endif
14157 int test[CONDITION ? 1 : -1];
14158int
14159main ()
14160{
14161
14162 ;
14163 return 0;
14164}
14165_ACEOF
14166if ac_fn_c_try_compile "$LINENO"; then :
14167 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
14168else
14169 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
14170fi
14171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14172fi
14173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
14174$as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
14175 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
14176 INT64_MAX_EQ_LONG_MAX=1;
14177 else
14178 INT64_MAX_EQ_LONG_MAX=0;
14179 fi
14180
14181
14182 else
14183 INT64_MAX_EQ_LONG_MAX=-1
14184 fi
14185
14186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
14187$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
14188if test "${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+set}" = set; then :
14189 $as_echo_n "(cached) " >&6
14190else
14191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14192/* end confdefs.h. */
14193/* Work also in C++ mode. */
14194 #define __STDC_LIMIT_MACROS 1
14195
14196 /* Work if build is not clean. */
14197 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
14198
14199 #include <limits.h>
14200 #if HAVE_STDINT_H
14201 #include <stdint.h>
14202 #endif
14203
14204 #if defined UINT32_MAX && defined UINTMAX_MAX
14205 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
14206 #elif HAVE_LONG_LONG_INT
14207 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
14208 #else
14209 #define CONDITION 0
14210 #endif
14211 int test[CONDITION ? 1 : -1];
14212int
14213main ()
14214{
14215
14216 ;
14217 return 0;
14218}
14219_ACEOF
14220if ac_fn_c_try_compile "$LINENO"; then :
14221 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
14222else
14223 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
14224fi
14225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14226fi
14227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
14228$as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
14229 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
14230 UINT32_MAX_LT_UINTMAX_MAX=1;
14231 else
14232 UINT32_MAX_LT_UINTMAX_MAX=0;
14233 fi
14234
14235
14236 if test $APPLE_UNIVERSAL_BUILD = 0; then
14237
14238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
14239$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
14240if test "${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+set}" = set; then :
14241 $as_echo_n "(cached) " >&6
14242else
14243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14244/* end confdefs.h. */
14245/* Work also in C++ mode. */
14246 #define __STDC_LIMIT_MACROS 1
14247
14248 /* Work if build is not clean. */
14249 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
14250
14251 #include <limits.h>
14252 #if HAVE_STDINT_H
14253 #include <stdint.h>
14254 #endif
14255
14256 #if defined UINT64_MAX
14257 #define CONDITION (UINT64_MAX == ULONG_MAX)
14258 #elif HAVE_LONG_LONG_INT
14259 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
14260 #else
14261 #define CONDITION 0
14262 #endif
14263 int test[CONDITION ? 1 : -1];
14264int
14265main ()
14266{
14267
14268 ;
14269 return 0;
14270}
14271_ACEOF
14272if ac_fn_c_try_compile "$LINENO"; then :
14273 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
14274else
14275 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
14276fi
14277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14278fi
14279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
14280$as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
14281 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
14282 UINT64_MAX_EQ_ULONG_MAX=1;
14283 else
14284 UINT64_MAX_EQ_ULONG_MAX=0;
14285 fi
14286
14287
14288 else
14289 UINT64_MAX_EQ_ULONG_MAX=-1
14290 fi
14291
14292
14293
14294
14295
14296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
14297$as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
14298if test "${gl_cv_func_isnand_no_libm+set}" = set; then :
14299 $as_echo_n "(cached) " >&6
14300else
14301
14302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14303/* end confdefs.h. */
14304#include <math.h>
14305 #if __GNUC__ >= 4
14306 # undef isnand
14307 # define isnand(x) __builtin_isnan ((double)(x))
14308 #else
14309 # undef isnand
14310 # define isnand(x) isnan ((double)(x))
14311 #endif
14312 double x;
14313int
14314main ()
14315{
14316return isnand (x);
14317 ;
14318 return 0;
14319}
14320_ACEOF
14321if ac_fn_c_try_link "$LINENO"; then :
14322 gl_cv_func_isnand_no_libm=yes
14323else
14324 gl_cv_func_isnand_no_libm=no
14325fi
14326rm -f core conftest.err conftest.$ac_objext \
14327 conftest$ac_exeext conftest.$ac_ext
14328
14329fi
14330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
14331$as_echo "$gl_cv_func_isnand_no_libm" >&6; }
14332
14333 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
14334 if test $gl_cv_func_isnand_no_libm = yes; then
14335
14336$as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
14337
14338 fi
14339
14340 if test $gl_func_isnand_no_libm != yes; then
14341
14342
14343
14344
14345
14346
14347
14348
14349 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
14350
14351
14352
14353
14354 fi
14355
14356
14357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
14358$as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
14359if test "${gl_cv_func_isnanl_no_libm+set}" = set; then :
14360 $as_echo_n "(cached) " >&6
14361else
14362
14363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14364/* end confdefs.h. */
14365#include <math.h>
14366 #if __GNUC__ >= 4
14367 # undef isnanl
14368 # define isnanl(x) __builtin_isnanl ((long double)(x))
14369 #elif defined isnan
14370 # undef isnanl
14371 # define isnanl(x) isnan ((long double)(x))
14372 #endif
14373 long double x;
14374int
14375main ()
14376{
14377return isnanl (x);
14378 ;
14379 return 0;
14380}
14381_ACEOF
14382if ac_fn_c_try_link "$LINENO"; then :
14383 gl_cv_func_isnanl_no_libm=yes
14384else
14385 gl_cv_func_isnanl_no_libm=no
14386fi
14387rm -f core conftest.err conftest.$ac_objext \
14388 conftest$ac_exeext conftest.$ac_ext
14389
14390fi
14391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
14392$as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
14393
14394 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
14395 if test $gl_func_isnanl_no_libm = yes; then
14396
14397
14398
14399
14400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
14401$as_echo_n "checking whether isnanl works... " >&6; }
14402if test "${gl_cv_func_isnanl_works+set}" = set; then :
14403 $as_echo_n "(cached) " >&6
14404else
14405
14406 if test "$cross_compiling" = yes; then :
4a626d0a 14407 gl_cv_func_isnanl_works="guessing yes"
88b48903
WN
14408else
14409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14410/* end confdefs.h. */
14411
14412#include <float.h>
14413#include <limits.h>
14414#include <math.h>
14415#if __GNUC__ >= 4
14416# undef isnanl
14417# define isnanl(x) __builtin_isnanl ((long double)(x))
14418#elif defined isnan
14419# undef isnanl
14420# define isnanl(x) isnan ((long double)(x))
14421#endif
14422#define NWORDS \
14423 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
14424typedef union { unsigned int word[NWORDS]; long double value; }
14425 memory_long_double;
14426/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
14427 runtime type conversion. */
14428#ifdef __sgi
14429static long double NaNl ()
14430{
14431 double zero = 0.0;
14432 return zero / zero;
14433}
14434#else
14435# define NaNl() (0.0L / 0.0L)
14436#endif
14437int main ()
14438{
14439 int result = 0;
14440
14441 if (!isnanl (NaNl ()))
14442 result |= 1;
14443
14444 {
14445 memory_long_double m;
14446 unsigned int i;
14447
14448 /* The isnanl function should be immune against changes in the sign bit and
14449 in the mantissa bits. The xor operation twiddles a bit that can only be
14450 a sign bit or a mantissa bit (since the exponent never extends to
14451 bit 31). */
14452 m.value = NaNl ();
14453 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
14454 for (i = 0; i < NWORDS; i++)
14455 m.word[i] |= 1;
14456 if (!isnanl (m.value))
14457 result |= 1;
14458 }
14459
14460#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
14461/* Representation of an 80-bit 'long double' as an initializer for a sequence
14462 of 'unsigned int' words. */
14463# ifdef WORDS_BIGENDIAN
14464# define LDBL80_WORDS(exponent,manthi,mantlo) \
14465 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
4a626d0a 14466 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
88b48903
WN
14467 (unsigned int) (mantlo) << 16 \
14468 }
14469# else
14470# define LDBL80_WORDS(exponent,manthi,mantlo) \
14471 { mantlo, manthi, exponent }
14472# endif
14473 { /* Quiet NaN. */
14474 static memory_long_double x =
14475 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
14476 if (!isnanl (x.value))
14477 result |= 2;
14478 }
14479 {
14480 /* Signalling NaN. */
14481 static memory_long_double x =
14482 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
14483 if (!isnanl (x.value))
14484 result |= 2;
14485 }
4a626d0a 14486 /* isnanl should return something even for noncanonical values. */
88b48903
WN
14487 { /* Pseudo-NaN. */
14488 static memory_long_double x =
14489 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
4a626d0a 14490 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
14491 result |= 4;
14492 }
14493 { /* Pseudo-Infinity. */
14494 static memory_long_double x =
14495 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
4a626d0a 14496 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
14497 result |= 8;
14498 }
14499 { /* Pseudo-Zero. */
14500 static memory_long_double x =
14501 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
4a626d0a 14502 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
14503 result |= 16;
14504 }
14505 { /* Unnormalized number. */
14506 static memory_long_double x =
14507 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
4a626d0a 14508 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
14509 result |= 32;
14510 }
14511 { /* Pseudo-Denormal. */
14512 static memory_long_double x =
14513 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
4a626d0a 14514 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
14515 result |= 64;
14516 }
14517#endif
14518
14519 return result;
14520}
14521_ACEOF
14522if ac_fn_c_try_run "$LINENO"; then :
14523 gl_cv_func_isnanl_works=yes
14524else
14525 gl_cv_func_isnanl_works=no
14526fi
14527rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14528 conftest.$ac_objext conftest.beam conftest.$ac_ext
14529fi
14530
14531
14532fi
14533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
14534$as_echo "$gl_cv_func_isnanl_works" >&6; }
14535
14536 case "$gl_cv_func_isnanl_works" in
14537 *yes) ;;
14538 *) gl_func_isnanl_no_libm=no ;;
14539 esac
14540 fi
14541 if test $gl_func_isnanl_no_libm = yes; then
14542
14543$as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
14544
14545 fi
14546
14547 if test $gl_func_isnanl_no_libm != yes; then
14548
14549
14550
14551
14552
14553
14554
14555
14556 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
14557
14558
14559
14560
14561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
14562$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
14563if test "${gl_cv_cc_long_double_expbit0+set}" = set; then :
14564 $as_echo_n "(cached) " >&6
14565else
14566
14567 if test "$cross_compiling" = yes; then :
14568
14569 gl_cv_cc_long_double_expbit0="unknown"
14570
14571else
14572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14573/* end confdefs.h. */
14574
14575#include <float.h>
14576#include <stddef.h>
14577#include <stdio.h>
14578#include <string.h>
14579#define NWORDS \
14580 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
14581typedef union { long double value; unsigned int word[NWORDS]; }
14582 memory_long_double;
14583static unsigned int ored_words[NWORDS];
14584static unsigned int anded_words[NWORDS];
14585static void add_to_ored_words (long double x)
14586{
14587 memory_long_double m;
14588 size_t i;
14589 /* Clear it first, in case
14590 sizeof (long double) < sizeof (memory_long_double). */
14591 memset (&m, 0, sizeof (memory_long_double));
14592 m.value = x;
14593 for (i = 0; i < NWORDS; i++)
14594 {
14595 ored_words[i] |= m.word[i];
14596 anded_words[i] &= m.word[i];
14597 }
14598}
14599int main ()
14600{
14601 size_t j;
14602 FILE *fp = fopen ("conftest.out", "w");
14603 if (fp == NULL)
14604 return 1;
14605 for (j = 0; j < NWORDS; j++)
14606 anded_words[j] = ~ (unsigned int) 0;
14607 add_to_ored_words (0.25L);
14608 add_to_ored_words (0.5L);
14609 add_to_ored_words (1.0L);
14610 add_to_ored_words (2.0L);
14611 add_to_ored_words (4.0L);
14612 /* Remove bits that are common (e.g. if representation of the first mantissa
14613 bit is explicit). */
14614 for (j = 0; j < NWORDS; j++)
14615 ored_words[j] &= ~anded_words[j];
14616 /* Now find the nonzero word. */
14617 for (j = 0; j < NWORDS; j++)
14618 if (ored_words[j] != 0)
14619 break;
14620 if (j < NWORDS)
14621 {
14622 size_t i;
14623 for (i = j + 1; i < NWORDS; i++)
14624 if (ored_words[i] != 0)
14625 {
14626 fprintf (fp, "unknown");
14627 return (fclose (fp) != 0);
14628 }
14629 for (i = 0; ; i++)
14630 if ((ored_words[j] >> i) & 1)
14631 {
14632 fprintf (fp, "word %d bit %d", (int) j, (int) i);
14633 return (fclose (fp) != 0);
14634 }
14635 }
14636 fprintf (fp, "unknown");
14637 return (fclose (fp) != 0);
14638}
14639
14640_ACEOF
14641if ac_fn_c_try_run "$LINENO"; then :
14642 gl_cv_cc_long_double_expbit0=`cat conftest.out`
14643else
14644 gl_cv_cc_long_double_expbit0="unknown"
14645fi
14646rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14647 conftest.$ac_objext conftest.beam conftest.$ac_ext
14648fi
14649
14650 rm -f conftest.out
14651
14652fi
14653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
14654$as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
14655 case "$gl_cv_cc_long_double_expbit0" in
14656 word*bit*)
14657 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
14658 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
14659
14660cat >>confdefs.h <<_ACEOF
14661#define LDBL_EXPBIT0_WORD $word
14662_ACEOF
14663
14664
14665cat >>confdefs.h <<_ACEOF
14666#define LDBL_EXPBIT0_BIT $bit
14667_ACEOF
14668
14669 ;;
14670 esac
14671
14672
14673
14674 fi
14675
14676
14677
14678
88b48903
WN
14679
14680
14681
14682
2196f55f 14683
49e4877c 14684
88b48903
WN
14685 LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
14686
14687
14688
14689
f45c62c4
YQ
14690 if test $ac_cv_func_lstat = yes; then
14691
14692 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
14693 *no)
14694 REPLACE_LSTAT=1
14695 ;;
14696 esac
14697 else
14698 HAVE_LSTAT=0
14699 fi
14700
14701 if test $REPLACE_LSTAT = 1; then
14702
14703
14704
14705
14706
14707
14708
14709
14710 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
14711
14712 :
14713 fi
14714
14715
14716
14717
14718
14719 GNULIB_LSTAT=1
14720
14721
14722
14723
14724
14725$as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
14726
14727
14728
14729
14730
14731
6a29c58e
YQ
14732 if test $gl_cv_func_malloc_posix = yes; then
14733
14734$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
14735
14736 else
14737 REPLACE_MALLOC=1
14738 fi
14739
14740 if test $REPLACE_MALLOC = 1; then
14741
14742
14743
14744
14745
14746
14747
14748
14749 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
14750
14751 fi
14752
14753
14754
14755
14756
14757 GNULIB_MALLOC_POSIX=1
14758
14759
14760
14761
14762
14763$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
14764
14765
14766
14767
14768
14769
88b48903
WN
14770
14771
14772
14773
14774
88b48903 14775
c971b7fa 14776
c971b7fa 14777
98399780
YQ
14778
14779
14780
14781
88b48903
WN
14782 if test $gl_cv_have_include_next = yes; then
14783 gl_cv_next_math_h='<'math.h'>'
14784 else
14785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
14786$as_echo_n "checking absolute name of <math.h>... " >&6; }
14787if test "${gl_cv_next_math_h+set}" = set; then :
14788 $as_echo_n "(cached) " >&6
14789else
c971b7fa 14790
88b48903 14791 if test $ac_cv_header_math_h = yes; then
c971b7fa
PA
14792
14793
4a626d0a
PA
14794
14795
14796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 14797/* end confdefs.h. */
88b48903 14798#include <math.h>
8690e634 14799_ACEOF
4a626d0a
PA
14800 case "$host_os" in
14801 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14802 *) gl_absname_cpp="$ac_cpp" ;;
14803 esac
14804
14805 case "$host_os" in
14806 mingw*)
14807 gl_dirsep_regex='[/\\]'
14808 ;;
14809 *)
14810 gl_dirsep_regex='\/'
14811 ;;
14812 esac
14813 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14814 gl_header_literal_regex=`echo 'math.h' \
14815 | sed -e "$gl_make_literal_regex_sed"`
14816 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14817 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14818 s|^/[^/]|//&|
14819 p
14820 q
14821 }'
14822
14823 gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14824 sed -n "$gl_absolute_header_sed"`
14825
14826 gl_header=$gl_cv_absolute_math_h
14827 gl_cv_next_math_h='"'$gl_header'"'
88b48903
WN
14828 else
14829 gl_cv_next_math_h='<'math.h'>'
14830 fi
8690e634 14831
c971b7fa 14832
88b48903
WN
14833fi
14834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
14835$as_echo "$gl_cv_next_math_h" >&6; }
14836 fi
14837 NEXT_MATH_H=$gl_cv_next_math_h
c971b7fa 14838
88b48903
WN
14839 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14840 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14841 gl_next_as_first_directive='<'math.h'>'
14842 else
14843 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14844 gl_next_as_first_directive=$gl_cv_next_math_h
14845 fi
14846 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
8690e634 14847
c971b7fa 14848
c971b7fa
PA
14849
14850
c971b7fa 14851
88b48903
WN
14852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
14853$as_echo_n "checking whether NAN macro works... " >&6; }
14854if test "${gl_cv_header_math_nan_works+set}" = set; then :
c971b7fa
PA
14855 $as_echo_n "(cached) " >&6
14856else
8690e634
JK
14857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14858/* end confdefs.h. */
88b48903 14859#include <math.h>
c971b7fa
PA
14860int
14861main ()
14862{
88b48903
WN
14863/* Solaris 10 has a broken definition of NAN. Other platforms
14864 fail to provide NAN, or provide it only in C99 mode; this
14865 test only needs to fail when NAN is provided but wrong. */
14866 float f = 1.0f;
14867#ifdef NAN
14868 f = NAN;
14869#endif
14870 return f == 0;
c971b7fa
PA
14871 ;
14872 return 0;
14873}
14874_ACEOF
14875if ac_fn_c_try_compile "$LINENO"; then :
88b48903 14876 gl_cv_header_math_nan_works=yes
8690e634 14877else
88b48903 14878 gl_cv_header_math_nan_works=no
c971b7fa
PA
14879fi
14880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 14881fi
88b48903
WN
14882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
14883$as_echo "$gl_cv_header_math_nan_works" >&6; }
14884 if test $gl_cv_header_math_nan_works = no; then
14885 REPLACE_NAN=1
c971b7fa 14886 fi
88b48903
WN
14887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
14888$as_echo_n "checking whether HUGE_VAL works... " >&6; }
14889if test "${gl_cv_header_math_huge_val_works+set}" = set; then :
c971b7fa
PA
14890 $as_echo_n "(cached) " >&6
14891else
8690e634 14892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 14893/* end confdefs.h. */
88b48903 14894#include <math.h>
c971b7fa
PA
14895int
14896main ()
14897{
88b48903
WN
14898/* Solaris 10 has a broken definition of HUGE_VAL. */
14899 double d = HUGE_VAL;
14900 return d == 0;
c971b7fa
PA
14901 ;
14902 return 0;
14903}
14904_ACEOF
14905if ac_fn_c_try_compile "$LINENO"; then :
88b48903 14906 gl_cv_header_math_huge_val_works=yes
8690e634 14907else
88b48903 14908 gl_cv_header_math_huge_val_works=no
c971b7fa
PA
14909fi
14910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 14911fi
88b48903
WN
14912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
14913$as_echo "$gl_cv_header_math_huge_val_works" >&6; }
14914 if test $gl_cv_header_math_huge_val_works = no; then
14915 REPLACE_HUGE_VAL=1
8690e634 14916 fi
c971b7fa 14917
c971b7fa 14918
88b48903
WN
14919 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
14920 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
14921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
14922$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
14923if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
8690e634
JK
14924 $as_echo_n "(cached) " >&6
14925else
14926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14927/* end confdefs.h. */
88b48903 14928#include <math.h>
8690e634
JK
14929int
14930main ()
14931{
88b48903
WN
14932#undef $gl_func
14933 (void) $gl_func;
8690e634
JK
14934 ;
14935 return 0;
14936}
14937_ACEOF
14938if ac_fn_c_try_compile "$LINENO"; then :
88b48903 14939 eval "$as_gl_Symbol=yes"
c971b7fa 14940else
88b48903 14941 eval "$as_gl_Symbol=no"
c971b7fa 14942fi
8690e634
JK
14943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14944fi
88b48903
WN
14945eval ac_res=\$$as_gl_Symbol
14946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14947$as_echo "$ac_res" >&6; }
14948 eval as_val=\$$as_gl_Symbol
14949 if test "x$as_val" = x""yes; then :
14950 cat >>confdefs.h <<_ACEOF
14951#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
14952_ACEOF
c971b7fa 14953
88b48903
WN
14954 eval ac_cv_have_decl_$gl_func=yes
14955fi
14956 done
c971b7fa
PA
14957
14958
14959
14960
14961
c971b7fa 14962
c971b7fa 14963
c971b7fa 14964
c971b7fa
PA
14965
14966
c971b7fa 14967
8690e634
JK
14968
14969 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
14970
14971
14972
14973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
14974$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
14975if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
c971b7fa
PA
14976 $as_echo_n "(cached) " >&6
14977else
8690e634
JK
14978
14979 case "$host_os" in
14980 # Guess no on AIX and OSF/1.
14981 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
14982 # Guess yes otherwise.
14983 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
14984 esac
14985 if test $LOCALE_JA != none; then
14986 if test "$cross_compiling" = yes; then :
14987 :
14988else
c971b7fa
PA
14989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14990/* end confdefs.h. */
c971b7fa 14991
8690e634
JK
14992#include <locale.h>
14993#include <string.h>
14994/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14995 <wchar.h>.
14996 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14997 included before <wchar.h>. */
14998#include <stddef.h>
14999#include <stdio.h>
15000#include <time.h>
15001#include <wchar.h>
15002int main ()
c971b7fa 15003{
8690e634
JK
15004 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
15005 {
15006 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
15007 mbstate_t state;
15008 wchar_t wc;
15009
15010 memset (&state, '\0', sizeof (mbstate_t));
15011 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
15012 if (mbsinit (&state))
15013 return 1;
15014 }
c971b7fa
PA
15015 return 0;
15016}
15017_ACEOF
8690e634
JK
15018if ac_fn_c_try_run "$LINENO"; then :
15019 gl_cv_func_mbrtowc_incomplete_state=yes
c971b7fa 15020else
8690e634 15021 gl_cv_func_mbrtowc_incomplete_state=no
c971b7fa 15022fi
8690e634
JK
15023rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15024 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 15025fi
c971b7fa 15026
8690e634 15027 fi
c971b7fa 15028
8690e634
JK
15029fi
15030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
15031$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
c971b7fa 15032
c971b7fa 15033
c971b7fa 15034
c971b7fa 15035
8690e634
JK
15036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
15037$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
15038if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
c971b7fa
PA
15039 $as_echo_n "(cached) " >&6
15040else
15041
8690e634
JK
15042 case "$host_os" in
15043 # Guess no on Solaris 8.
15044 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
15045 # Guess yes otherwise.
15046 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
15047 esac
15048 if test $LOCALE_ZH_CN != none; then
15049 if test "$cross_compiling" = yes; then :
15050 :
15051else
15052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
15053/* end confdefs.h. */
15054
8690e634
JK
15055#include <locale.h>
15056#include <stdlib.h>
15057#include <string.h>
15058/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15059 <wchar.h>.
15060 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15061 included before <wchar.h>. */
15062#include <stddef.h>
15063#include <stdio.h>
15064#include <time.h>
15065#include <wchar.h>
15066int main ()
c971b7fa 15067{
8690e634
JK
15068 /* This fails on Solaris 8:
15069 mbrtowc returns 2, and sets wc to 0x00F0.
15070 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
15071 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
15072 {
15073 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
15074 mbstate_t state;
15075 wchar_t wc;
15076
15077 memset (&state, '\0', sizeof (mbstate_t));
15078 if (mbrtowc (&wc, input + 3, 6, &state) != 4
15079 && mbtowc (&wc, input + 3, 6) == 4)
15080 return 1;
15081 }
c971b7fa
PA
15082 return 0;
15083}
15084_ACEOF
8690e634
JK
15085if ac_fn_c_try_run "$LINENO"; then :
15086 gl_cv_func_mbrtowc_sanitycheck=yes
c971b7fa 15087else
8690e634 15088 gl_cv_func_mbrtowc_sanitycheck=no
c971b7fa 15089fi
8690e634
JK
15090rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15091 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 15092fi
c971b7fa 15093
8690e634 15094 fi
c971b7fa 15095
8690e634
JK
15096fi
15097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
15098$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
15099
15100 REPLACE_MBSTATE_T=0
15101 case "$gl_cv_func_mbrtowc_incomplete_state" in
15102 *yes) ;;
15103 *) REPLACE_MBSTATE_T=1 ;;
15104 esac
15105 case "$gl_cv_func_mbrtowc_sanitycheck" in
15106 *yes) ;;
15107 *) REPLACE_MBSTATE_T=1 ;;
15108 esac
c971b7fa 15109 else
8690e634 15110 REPLACE_MBSTATE_T=1
c971b7fa
PA
15111 fi
15112
15113
15114
8690e634
JK
15115 if test $ac_cv_func_mbrtowc = no; then
15116 HAVE_MBRTOWC=0
15117 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
15118/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15119 <wchar.h>.
15120 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15121 included before <wchar.h>. */
15122#include <stddef.h>
15123#include <stdio.h>
15124#include <time.h>
15125#include <wchar.h>
c971b7fa 15126
8690e634
JK
15127"
15128if test "x$ac_cv_have_decl_mbrtowc" = x""yes; then :
15129 ac_have_decl=1
15130else
15131 ac_have_decl=0
c971b7fa 15132fi
c971b7fa 15133
8690e634
JK
15134cat >>confdefs.h <<_ACEOF
15135#define HAVE_DECL_MBRTOWC $ac_have_decl
15136_ACEOF
c971b7fa 15137
8690e634
JK
15138 if test $ac_cv_have_decl_mbrtowc = yes; then
15139 REPLACE_MBRTOWC=1
15140 fi
15141 else
15142 if test $REPLACE_MBSTATE_T = 1; then
15143 REPLACE_MBRTOWC=1
15144 else
c971b7fa
PA
15145
15146
15147
8690e634
JK
15148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
15149$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
15150if test "${gl_cv_func_mbrtowc_null_arg1+set}" = set; then :
15151 $as_echo_n "(cached) " >&6
c971b7fa 15152else
c971b7fa 15153
8690e634
JK
15154 case "$host_os" in
15155 # Guess no on Solaris.
15156 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
15157 # Guess yes otherwise.
15158 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
15159 esac
15160 if test $LOCALE_FR_UTF8 != none; then
15161 if test "$cross_compiling" = yes; then :
15162 :
15163else
15164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
15165/* end confdefs.h. */
15166
8690e634
JK
15167#include <locale.h>
15168#include <stdlib.h>
15169#include <string.h>
15170/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15171 <wchar.h>.
15172 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15173 included before <wchar.h>. */
15174#include <stddef.h>
15175#include <stdio.h>
15176#include <time.h>
15177#include <wchar.h>
15178int main ()
15179{
15180 int result = 0;
15181
15182 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
15183 {
15184 char input[] = "\303\237er";
15185 mbstate_t state;
15186 wchar_t wc;
15187 size_t ret;
15188
15189 memset (&state, '\0', sizeof (mbstate_t));
15190 wc = (wchar_t) 0xBADFACE;
15191 ret = mbrtowc (&wc, input, 5, &state);
15192 if (ret != 2)
15193 result |= 1;
15194 if (!mbsinit (&state))
15195 result |= 2;
c971b7fa 15196
8690e634
JK
15197 memset (&state, '\0', sizeof (mbstate_t));
15198 ret = mbrtowc (NULL, input, 5, &state);
15199 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
15200 result |= 4;
15201 if (!mbsinit (&state))
15202 result |= 8;
15203 }
15204 return result;
15205}
c971b7fa 15206_ACEOF
8690e634
JK
15207if ac_fn_c_try_run "$LINENO"; then :
15208 gl_cv_func_mbrtowc_null_arg1=yes
15209else
15210 gl_cv_func_mbrtowc_null_arg1=no
15211fi
15212rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15213 conftest.$ac_objext conftest.beam conftest.$ac_ext
15214fi
c971b7fa 15215
8690e634 15216 fi
c971b7fa 15217
c971b7fa 15218fi
8690e634
JK
15219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
15220$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
c971b7fa 15221
c971b7fa 15222
c971b7fa 15223
c971b7fa 15224
8690e634
JK
15225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
15226$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
15227if test "${gl_cv_func_mbrtowc_null_arg2+set}" = set; then :
15228 $as_echo_n "(cached) " >&6
15229else
c971b7fa 15230
8690e634
JK
15231 case "$host_os" in
15232 # Guess no on OSF/1.
15233 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
15234 # Guess yes otherwise.
15235 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
15236 esac
15237 if test $LOCALE_FR_UTF8 != none; then
15238 if test "$cross_compiling" = yes; then :
c971b7fa 15239 :
8690e634
JK
15240else
15241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15242/* end confdefs.h. */
15243
15244#include <locale.h>
15245#include <string.h>
15246/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15247 <wchar.h>.
15248 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15249 included before <wchar.h>. */
15250#include <stddef.h>
15251#include <stdio.h>
15252#include <time.h>
15253#include <wchar.h>
15254int main ()
15255{
15256 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
15257 {
15258 mbstate_t state;
15259 wchar_t wc;
15260 int ret;
15261
15262 memset (&state, '\0', sizeof (mbstate_t));
15263 wc = (wchar_t) 0xBADFACE;
15264 mbrtowc (&wc, NULL, 5, &state);
15265 /* Check that wc was not modified. */
15266 if (wc != (wchar_t) 0xBADFACE)
15267 return 1;
15268 }
15269 return 0;
15270}
15271_ACEOF
15272if ac_fn_c_try_run "$LINENO"; then :
15273 gl_cv_func_mbrtowc_null_arg2=yes
15274else
15275 gl_cv_func_mbrtowc_null_arg2=no
15276fi
15277rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15278 conftest.$ac_objext conftest.beam conftest.$ac_ext
15279fi
15280
15281 fi
15282
15283fi
15284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
15285$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
c971b7fa
PA
15286
15287
15288
15289
15290
15291
8690e634
JK
15292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
15293$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
15294if test "${gl_cv_func_mbrtowc_retval+set}" = set; then :
15295 $as_echo_n "(cached) " >&6
15296else
15297
15298 case "$host_os" in
15299 # Guess no on HP-UX, Solaris, native Windows.
15300 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
15301 # Guess yes otherwise.
15302 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
15303 esac
15304 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
15305 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
15306 if test "$cross_compiling" = yes; then :
c971b7fa 15307 :
8690e634
JK
15308else
15309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15310/* end confdefs.h. */
c971b7fa 15311
8690e634
JK
15312#include <locale.h>
15313#include <string.h>
15314/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15315 <wchar.h>.
15316 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15317 included before <wchar.h>. */
15318#include <stddef.h>
15319#include <stdio.h>
15320#include <time.h>
15321#include <wchar.h>
15322int main ()
15323{
15324 int result = 0;
15325 int found_some_locale = 0;
15326 /* This fails on Solaris. */
15327 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
15328 {
15329 char input[] = "B\303\274\303\237er"; /* "Büßer" */
15330 mbstate_t state;
15331 wchar_t wc;
15332
15333 memset (&state, '\0', sizeof (mbstate_t));
15334 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
15335 {
15336 input[1] = '\0';
15337 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
15338 result |= 1;
15339 }
15340 found_some_locale = 1;
15341 }
15342 /* This fails on HP-UX 11.11. */
15343 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
15344 {
15345 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
15346 mbstate_t state;
15347 wchar_t wc;
15348
15349 memset (&state, '\0', sizeof (mbstate_t));
15350 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
15351 {
15352 input[1] = '\0';
15353 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
15354 result |= 2;
15355 }
15356 found_some_locale = 1;
15357 }
15358 /* This fails on native Windows. */
15359 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
15360 {
15361 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
15362 mbstate_t state;
15363 wchar_t wc;
15364
15365 memset (&state, '\0', sizeof (mbstate_t));
15366 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
15367 {
15368 input[3] = '\0';
15369 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
15370 result |= 4;
15371 }
15372 found_some_locale = 1;
15373 }
15374 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
15375 {
15376 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
15377 mbstate_t state;
15378 wchar_t wc;
15379
15380 memset (&state, '\0', sizeof (mbstate_t));
15381 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
15382 {
15383 input[3] = '\0';
15384 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
15385 result |= 8;
15386 }
15387 found_some_locale = 1;
15388 }
15389 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
15390 {
15391 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
15392 mbstate_t state;
15393 wchar_t wc;
15394
15395 memset (&state, '\0', sizeof (mbstate_t));
15396 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
15397 {
15398 input[3] = '\0';
15399 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
15400 result |= 16;
15401 }
15402 found_some_locale = 1;
15403 }
15404 return (found_some_locale ? result : 77);
15405}
15406_ACEOF
15407if ac_fn_c_try_run "$LINENO"; then :
15408 gl_cv_func_mbrtowc_retval=yes
15409else
15410 if test $? != 77; then
15411 gl_cv_func_mbrtowc_retval=no
15412 fi
c971b7fa 15413
8690e634
JK
15414fi
15415rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15416 conftest.$ac_objext conftest.beam conftest.$ac_ext
15417fi
c971b7fa 15418
8690e634 15419 fi
c971b7fa 15420
8690e634
JK
15421fi
15422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
15423$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
c971b7fa
PA
15424
15425
15426
15427
8690e634
JK
15428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
15429$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
15430if test "${gl_cv_func_mbrtowc_nul_retval+set}" = set; then :
c971b7fa
PA
15431 $as_echo_n "(cached) " >&6
15432else
8690e634
JK
15433
15434 case "$host_os" in
15435 # Guess no on Solaris 8 and 9.
15436 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
15437 # Guess yes otherwise.
15438 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
15439 esac
15440 if test $LOCALE_ZH_CN != none; then
15441 if test "$cross_compiling" = yes; then :
15442 :
c971b7fa
PA
15443else
15444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15445/* end confdefs.h. */
15446
8690e634 15447#include <locale.h>
c971b7fa 15448#include <string.h>
8690e634
JK
15449/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15450 <wchar.h>.
15451 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15452 included before <wchar.h>. */
15453#include <stddef.h>
15454#include <stdio.h>
15455#include <time.h>
15456#include <wchar.h>
15457int main ()
c971b7fa 15458{
8690e634
JK
15459 /* This fails on Solaris 8 and 9. */
15460 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
c971b7fa 15461 {
8690e634
JK
15462 mbstate_t state;
15463 wchar_t wc;
c971b7fa 15464
8690e634
JK
15465 memset (&state, '\0', sizeof (mbstate_t));
15466 if (mbrtowc (&wc, "", 1, &state) != 0)
15467 return 1;
15468 }
c971b7fa
PA
15469 return 0;
15470}
15471_ACEOF
15472if ac_fn_c_try_run "$LINENO"; then :
8690e634 15473 gl_cv_func_mbrtowc_nul_retval=yes
c971b7fa 15474else
8690e634 15475 gl_cv_func_mbrtowc_nul_retval=no
c971b7fa
PA
15476fi
15477rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15478 conftest.$ac_objext conftest.beam conftest.$ac_ext
15479fi
15480
8690e634
JK
15481 fi
15482
c971b7fa 15483fi
8690e634
JK
15484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
15485$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
15486
4a626d0a
PA
15487
15488
15489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
15490$as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
15491if test "${gl_cv_func_mbrtowc_empty_input+set}" = set; then :
15492 $as_echo_n "(cached) " >&6
15493else
15494
15495 case "$host_os" in
15496 # Guess no on AIX and glibc systems.
15497 aix* | *-gnu*)
15498 gl_cv_func_mbrtowc_empty_input="guessing no" ;;
15499 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
15500 esac
15501 if test "$cross_compiling" = yes; then :
15502 :
15503else
15504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15505/* end confdefs.h. */
15506
15507 #include <wchar.h>
15508 static wchar_t wc;
15509 static mbstate_t mbs;
15510 int
15511 main (void)
15512 {
49e4877c 15513 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
4a626d0a
PA
15514 }
15515_ACEOF
15516if ac_fn_c_try_run "$LINENO"; then :
4a626d0a 15517 gl_cv_func_mbrtowc_empty_input=yes
49e4877c
PA
15518else
15519 gl_cv_func_mbrtowc_empty_input=no
4a626d0a
PA
15520fi
15521rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15522 conftest.$ac_objext conftest.beam conftest.$ac_ext
15523fi
15524
15525
15526fi
15527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
15528$as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
15529
49e4877c
PA
15530
15531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
15532$as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
15533if test "${gl_cv_C_locale_sans_EILSEQ+set}" = set; then :
15534 $as_echo_n "(cached) " >&6
15535else
15536
15537 gl_cv_C_locale_sans_EILSEQ="guessing no"
15538
15539 if test "$cross_compiling" = yes; then :
15540 :
15541else
15542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15543/* end confdefs.h. */
15544#include <limits.h>
15545 #include <locale.h>
15546 #include <wchar.h>
15547
15548int
15549main ()
15550{
15551
15552 int i;
15553 char *locale = setlocale (LC_ALL, "C");
15554 if (! locale)
15555 return 1;
15556 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
15557 {
15558 char c = i;
15559 wchar_t wc;
15560 mbstate_t mbs = { 0, };
15561 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
15562 if (1 < ss)
15563 return 1;
15564 }
15565 return 0;
15566
15567 ;
15568 return 0;
15569}
15570_ACEOF
15571if ac_fn_c_try_run "$LINENO"; then :
15572 gl_cv_C_locale_sans_EILSEQ=yes
15573else
15574 gl_cv_C_locale_sans_EILSEQ=no
15575fi
15576rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15577 conftest.$ac_objext conftest.beam conftest.$ac_ext
15578fi
15579
15580fi
15581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5
15582$as_echo "$gl_cv_C_locale_sans_EILSEQ" >&6; }
15583
8690e634
JK
15584 case "$gl_cv_func_mbrtowc_null_arg1" in
15585 *yes) ;;
15586 *)
15587$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
15588
15589 REPLACE_MBRTOWC=1
15590 ;;
15591 esac
15592 case "$gl_cv_func_mbrtowc_null_arg2" in
15593 *yes) ;;
15594 *)
15595$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
15596
15597 REPLACE_MBRTOWC=1
15598 ;;
15599 esac
15600 case "$gl_cv_func_mbrtowc_retval" in
15601 *yes) ;;
15602 *)
15603$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
15604
15605 REPLACE_MBRTOWC=1
15606 ;;
15607 esac
15608 case "$gl_cv_func_mbrtowc_nul_retval" in
15609 *yes) ;;
15610 *)
15611$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
15612
4a626d0a
PA
15613 REPLACE_MBRTOWC=1
15614 ;;
15615 esac
15616 case "$gl_cv_func_mbrtowc_empty_input" in
15617 *yes) ;;
15618 *)
15619$as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
15620
49e4877c
PA
15621 REPLACE_MBRTOWC=1
15622 ;;
15623 esac
15624 case $gl_cv_C_locale_sans_EILSEQ in
15625 *yes) ;;
15626 *)
15627$as_echo "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
15628
8690e634
JK
15629 REPLACE_MBRTOWC=1
15630 ;;
15631 esac
c971b7fa
PA
15632 fi
15633 fi
15634
a512b375 15635 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
c971b7fa 15636
c971b7fa 15637
c971b7fa
PA
15638
15639
15640
15641
15642
15643
8690e634
JK
15644 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
15645
15646
15647 :
c971b7fa 15648
a512b375 15649 fi
c971b7fa 15650
8690e634
JK
15651
15652
15653
15654
15655 GNULIB_MBRTOWC=1
15656
15657
15658
15659
15660
15661$as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
15662
15663
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673
c971b7fa 15674
c971b7fa 15675
8690e634 15676 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
c971b7fa 15677
8690e634
JK
15678
15679
15680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
15681$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
15682if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
15683 $as_echo_n "(cached) " >&6
15684else
15685
15686 case "$host_os" in
15687 # Guess no on AIX and OSF/1.
15688 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
15689 # Guess yes otherwise.
15690 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
15691 esac
15692 if test $LOCALE_JA != none; then
15693 if test "$cross_compiling" = yes; then :
15694 :
c971b7fa
PA
15695else
15696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15697/* end confdefs.h. */
15698
8690e634
JK
15699#include <locale.h>
15700#include <string.h>
15701/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15702 <wchar.h>.
15703 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15704 included before <wchar.h>. */
15705#include <stddef.h>
15706#include <stdio.h>
15707#include <time.h>
15708#include <wchar.h>
15709int main ()
c971b7fa 15710{
8690e634 15711 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
c971b7fa 15712 {
8690e634
JK
15713 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
15714 mbstate_t state;
15715 wchar_t wc;
15716
15717 memset (&state, '\0', sizeof (mbstate_t));
15718 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
15719 if (mbsinit (&state))
15720 return 1;
c971b7fa 15721 }
c971b7fa
PA
15722 return 0;
15723}
15724_ACEOF
15725if ac_fn_c_try_run "$LINENO"; then :
8690e634 15726 gl_cv_func_mbrtowc_incomplete_state=yes
c971b7fa 15727else
8690e634 15728 gl_cv_func_mbrtowc_incomplete_state=no
c971b7fa
PA
15729fi
15730rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15731 conftest.$ac_objext conftest.beam conftest.$ac_ext
15732fi
15733
8690e634 15734 fi
c971b7fa
PA
15735
15736fi
8690e634
JK
15737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
15738$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
c971b7fa
PA
15739
15740
c971b7fa
PA
15741
15742
8690e634
JK
15743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
15744$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
15745if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
c971b7fa
PA
15746 $as_echo_n "(cached) " >&6
15747else
8690e634
JK
15748
15749 case "$host_os" in
15750 # Guess no on Solaris 8.
15751 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
15752 # Guess yes otherwise.
15753 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
15754 esac
15755 if test $LOCALE_ZH_CN != none; then
15756 if test "$cross_compiling" = yes; then :
15757 :
15758else
c971b7fa
PA
15759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15760/* end confdefs.h. */
8690e634
JK
15761
15762#include <locale.h>
15763#include <stdlib.h>
15764#include <string.h>
15765/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15766 <wchar.h>.
15767 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15768 included before <wchar.h>. */
c971b7fa 15769#include <stddef.h>
8690e634
JK
15770#include <stdio.h>
15771#include <time.h>
15772#include <wchar.h>
15773int main ()
c971b7fa 15774{
8690e634
JK
15775 /* This fails on Solaris 8:
15776 mbrtowc returns 2, and sets wc to 0x00F0.
15777 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
15778 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
15779 {
15780 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
15781 mbstate_t state;
15782 wchar_t wc;
15783
15784 memset (&state, '\0', sizeof (mbstate_t));
15785 if (mbrtowc (&wc, input + 3, 6, &state) != 4
15786 && mbtowc (&wc, input + 3, 6) == 4)
15787 return 1;
15788 }
c971b7fa
PA
15789 return 0;
15790}
15791_ACEOF
8690e634
JK
15792if ac_fn_c_try_run "$LINENO"; then :
15793 gl_cv_func_mbrtowc_sanitycheck=yes
c971b7fa 15794else
8690e634 15795 gl_cv_func_mbrtowc_sanitycheck=no
c971b7fa 15796fi
8690e634
JK
15797rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15798 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 15799fi
c971b7fa 15800
8690e634
JK
15801 fi
15802
15803fi
15804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
15805$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
c971b7fa 15806
8690e634
JK
15807 REPLACE_MBSTATE_T=0
15808 case "$gl_cv_func_mbrtowc_incomplete_state" in
15809 *yes) ;;
15810 *) REPLACE_MBSTATE_T=1 ;;
15811 esac
15812 case "$gl_cv_func_mbrtowc_sanitycheck" in
15813 *yes) ;;
15814 *) REPLACE_MBSTATE_T=1 ;;
15815 esac
15816 else
15817 REPLACE_MBSTATE_T=1
c971b7fa
PA
15818 fi
15819
c971b7fa 15820
8690e634 15821
8690e634
JK
15822 if test $ac_cv_func_mbsinit = no; then
15823 HAVE_MBSINIT=0
15824 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
15825/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15826 <wchar.h>.
15827 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15828 included before <wchar.h>. */
15829#include <stddef.h>
15830#include <stdio.h>
15831#include <time.h>
15832#include <wchar.h>
15833
15834"
15835if test "x$ac_cv_have_decl_mbsinit" = x""yes; then :
15836 ac_have_decl=1
15837else
15838 ac_have_decl=0
c971b7fa 15839fi
c971b7fa 15840
8690e634
JK
15841cat >>confdefs.h <<_ACEOF
15842#define HAVE_DECL_MBSINIT $ac_have_decl
c971b7fa 15843_ACEOF
c971b7fa 15844
8690e634
JK
15845 if test $ac_cv_have_decl_mbsinit = yes; then
15846 REPLACE_MBSINIT=1
15847 fi
15848 else
15849 if test $REPLACE_MBSTATE_T = 1; then
15850 REPLACE_MBSINIT=1
15851 else
15852 case "$host_os" in
15853 mingw*) REPLACE_MBSINIT=1 ;;
15854 esac
15855 fi
15856 fi
c971b7fa 15857
a512b375 15858 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
c971b7fa
PA
15859
15860
15861
15862
15863
15864
15865
15866
8690e634 15867 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
c971b7fa
PA
15868
15869
8690e634 15870 :
c971b7fa 15871
a512b375 15872 fi
c971b7fa 15873
c971b7fa 15874
c971b7fa 15875
c971b7fa
PA
15876
15877
8690e634 15878 GNULIB_MBSINIT=1
c971b7fa 15879
c971b7fa
PA
15880
15881
15882
15883
8690e634 15884$as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
c971b7fa
PA
15885
15886
c971b7fa 15887
c971b7fa 15888
c971b7fa
PA
15889
15890
15891
c971b7fa 15892
c971b7fa
PA
15893
15894
15895
15896
8690e634
JK
15897
15898 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
c971b7fa
PA
15899
15900
15901
8690e634
JK
15902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
15903$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
15904if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
15905 $as_echo_n "(cached) " >&6
15906else
c971b7fa 15907
8690e634
JK
15908 case "$host_os" in
15909 # Guess no on AIX and OSF/1.
15910 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
15911 # Guess yes otherwise.
15912 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
c971b7fa 15913 esac
8690e634
JK
15914 if test $LOCALE_JA != none; then
15915 if test "$cross_compiling" = yes; then :
15916 :
15917else
15918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 15919/* end confdefs.h. */
c971b7fa 15920
8690e634
JK
15921#include <locale.h>
15922#include <string.h>
15923/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15924 <wchar.h>.
15925 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15926 included before <wchar.h>. */
15927#include <stddef.h>
15928#include <stdio.h>
15929#include <time.h>
15930#include <wchar.h>
15931int main ()
15932{
15933 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
15934 {
15935 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
15936 mbstate_t state;
15937 wchar_t wc;
15938
15939 memset (&state, '\0', sizeof (mbstate_t));
15940 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
15941 if (mbsinit (&state))
15942 return 1;
15943 }
c971b7fa
PA
15944 return 0;
15945}
15946_ACEOF
8690e634
JK
15947if ac_fn_c_try_run "$LINENO"; then :
15948 gl_cv_func_mbrtowc_incomplete_state=yes
15949else
15950 gl_cv_func_mbrtowc_incomplete_state=no
15951fi
15952rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15953 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 15954fi
c971b7fa 15955
8690e634 15956 fi
c971b7fa 15957
8690e634
JK
15958fi
15959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
15960$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
c971b7fa 15961
8690e634
JK
15962
15963
15964
15965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
15966$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
15967if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
c971b7fa
PA
15968 $as_echo_n "(cached) " >&6
15969else
8690e634
JK
15970
15971 case "$host_os" in
15972 # Guess no on Solaris 8.
15973 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
15974 # Guess yes otherwise.
15975 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
15976 esac
15977 if test $LOCALE_ZH_CN != none; then
15978 if test "$cross_compiling" = yes; then :
15979 :
15980else
c971b7fa
PA
15981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15982/* end confdefs.h. */
c971b7fa 15983
8690e634
JK
15984#include <locale.h>
15985#include <stdlib.h>
15986#include <string.h>
15987/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15988 <wchar.h>.
15989 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15990 included before <wchar.h>. */
15991#include <stddef.h>
15992#include <stdio.h>
15993#include <time.h>
15994#include <wchar.h>
15995int main ()
c971b7fa 15996{
8690e634
JK
15997 /* This fails on Solaris 8:
15998 mbrtowc returns 2, and sets wc to 0x00F0.
15999 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
16000 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
16001 {
16002 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
16003 mbstate_t state;
16004 wchar_t wc;
16005
16006 memset (&state, '\0', sizeof (mbstate_t));
16007 if (mbrtowc (&wc, input + 3, 6, &state) != 4
16008 && mbtowc (&wc, input + 3, 6) == 4)
16009 return 1;
16010 }
c971b7fa
PA
16011 return 0;
16012}
16013_ACEOF
8690e634
JK
16014if ac_fn_c_try_run "$LINENO"; then :
16015 gl_cv_func_mbrtowc_sanitycheck=yes
c971b7fa 16016else
8690e634 16017 gl_cv_func_mbrtowc_sanitycheck=no
c971b7fa 16018fi
8690e634
JK
16019rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16020 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 16021fi
8690e634
JK
16022
16023 fi
16024
16025fi
16026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
16027$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
16028
16029 REPLACE_MBSTATE_T=0
16030 case "$gl_cv_func_mbrtowc_incomplete_state" in
16031 *yes) ;;
16032 *) REPLACE_MBSTATE_T=1 ;;
16033 esac
16034 case "$gl_cv_func_mbrtowc_sanitycheck" in
16035 *yes) ;;
16036 *) REPLACE_MBSTATE_T=1 ;;
16037 esac
c971b7fa 16038 else
8690e634 16039 REPLACE_MBSTATE_T=1
c971b7fa
PA
16040 fi
16041
16042
c971b7fa 16043
8690e634
JK
16044 if test $ac_cv_func_mbsrtowcs = no; then
16045 HAVE_MBSRTOWCS=0
16046 ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
16047/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16048 <wchar.h>.
16049 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16050 included before <wchar.h>. */
16051#include <stddef.h>
16052#include <stdio.h>
16053#include <time.h>
16054#include <wchar.h>
16055
16056"
16057if test "x$ac_cv_have_decl_mbsrtowcs" = x""yes; then :
16058 ac_have_decl=1
c971b7fa 16059else
8690e634 16060 ac_have_decl=0
c971b7fa 16061fi
c971b7fa 16062
8690e634
JK
16063cat >>confdefs.h <<_ACEOF
16064#define HAVE_DECL_MBSRTOWCS $ac_have_decl
16065_ACEOF
c971b7fa 16066
8690e634
JK
16067 if test $ac_cv_have_decl_mbsrtowcs = yes; then
16068 REPLACE_MBSRTOWCS=1
16069 fi
c971b7fa 16070 else
8690e634
JK
16071 if test $REPLACE_MBSTATE_T = 1; then
16072 REPLACE_MBSRTOWCS=1
16073 else
c971b7fa 16074
8690e634
JK
16075
16076
16077
16078
16079
16080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
16081$as_echo_n "checking whether mbsrtowcs works... " >&6; }
16082if test "${gl_cv_func_mbsrtowcs_works+set}" = set; then :
c971b7fa
PA
16083 $as_echo_n "(cached) " >&6
16084else
8690e634
JK
16085
16086 case "$host_os" in
16087 # Guess no on HP-UX, Solaris, mingw.
16088 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
16089 # Guess yes otherwise.
16090 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
16091 esac
16092 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
16093 if test "$cross_compiling" = yes; then :
16094 :
16095else
c971b7fa
PA
16096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16097/* end confdefs.h. */
c971b7fa 16098
8690e634
JK
16099#include <locale.h>
16100#include <string.h>
16101/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16102 <wchar.h>.
16103 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16104 included before <wchar.h>. */
16105#include <stddef.h>
16106#include <stdio.h>
16107#include <time.h>
16108#include <wchar.h>
16109int main ()
c971b7fa 16110{
8690e634
JK
16111 int result = 0;
16112 /* Test whether the function supports a NULL destination argument.
16113 This fails on native Windows. */
16114 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
16115 {
16116 const char input[] = "\337er";
16117 const char *src = input;
16118 mbstate_t state;
c971b7fa 16119
8690e634
JK
16120 memset (&state, '\0', sizeof (mbstate_t));
16121 if (mbsrtowcs (NULL, &src, 1, &state) != 3
16122 || src != input)
16123 result |= 1;
16124 }
16125 /* Test whether the function works when started with a conversion state
16126 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
16127 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
16128 {
16129 const char input[] = "B\303\274\303\237er";
16130 mbstate_t state;
16131
16132 memset (&state, '\0', sizeof (mbstate_t));
16133 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
16134 if (!mbsinit (&state))
16135 {
16136 const char *src = input + 2;
16137 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
16138 result |= 2;
16139 }
16140 }
16141 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
16142 {
16143 const char input[] = "<\306\374\313\334\270\354>";
16144 mbstate_t state;
16145
16146 memset (&state, '\0', sizeof (mbstate_t));
16147 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
16148 if (!mbsinit (&state))
16149 {
16150 const char *src = input + 4;
16151 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
16152 result |= 4;
16153 }
16154 }
16155 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
16156 {
16157 const char input[] = "B\250\271\201\060\211\070er";
16158 mbstate_t state;
16159
16160 memset (&state, '\0', sizeof (mbstate_t));
16161 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
16162 if (!mbsinit (&state))
16163 {
16164 const char *src = input + 2;
16165 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
16166 result |= 8;
16167 }
16168 }
16169 return result;
c971b7fa
PA
16170}
16171_ACEOF
8690e634
JK
16172if ac_fn_c_try_run "$LINENO"; then :
16173 gl_cv_func_mbsrtowcs_works=yes
c971b7fa 16174else
8690e634 16175 gl_cv_func_mbsrtowcs_works=no
c971b7fa 16176fi
8690e634
JK
16177rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16178 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 16179fi
8690e634
JK
16180
16181 fi
16182
16183fi
16184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
16185$as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
16186
16187 case "$gl_cv_func_mbsrtowcs_works" in
16188 *yes) ;;
16189 *) REPLACE_MBSRTOWCS=1 ;;
16190 esac
16191 fi
c971b7fa
PA
16192 fi
16193
a512b375 16194 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
c971b7fa 16195
c971b7fa 16196
c971b7fa 16197
c971b7fa 16198
c971b7fa 16199
c971b7fa 16200
c971b7fa
PA
16201
16202
8690e634
JK
16203 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
16204
16205
16206
16207
16208
16209
16210
16211
16212
16213 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
16214
16215
16216 :
16217
a512b375 16218 fi
8690e634
JK
16219
16220
16221
16222
16223
16224 GNULIB_MBSRTOWCS=1
16225
16226
16227
16228
16229
16230$as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
c971b7fa
PA
16231
16232
16233
16234
a512b375 16235 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
c971b7fa
PA
16236
16237
16238
16239
16240
16241
16242
16243
16244 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
16245
16246
16247 for ac_header in bp-sym.h
16248do :
16249 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
16250if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
16251 cat >>confdefs.h <<_ACEOF
16252#define HAVE_BP_SYM_H 1
16253_ACEOF
16254
16255fi
16256
16257done
16258
16259
a512b375 16260 fi
c971b7fa
PA
16261
16262
16263
16264
16265
16266 GNULIB_MEMCHR=1
16267
16268
16269
16270
16271
16272$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
16273
16274
16275
16276
16277
16278 if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
16279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
16280$as_echo_n "checking whether memmem works in linear time... " >&6; }
16281if test "${gl_cv_func_memmem_works_fast+set}" = set; then :
16282 $as_echo_n "(cached) " >&6
16283else
16284 if test "$cross_compiling" = yes; then :
16285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16286/* end confdefs.h. */
16287
16288#include <features.h>
16289#ifdef __GNU_LIBRARY__
16290 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)) \
16291 && !defined __UCLIBC__
16292 Lucky user
16293 #endif
16294#endif
16295#ifdef __CYGWIN__
16296 #include <cygwin/version.h>
16297 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 0)
16298 Lucky user
16299 #endif
16300#endif
16301
16302_ACEOF
16303if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16304 $EGREP "Lucky user" >/dev/null 2>&1; then :
63ce7108
TT
16305 gl_cv_func_memmem_works_fast="guessing yes"
16306else
16307 gl_cv_func_memmem_works_fast="guessing no"
16308fi
16309rm -f conftest*
16310
16311
16312else
16313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16314/* end confdefs.h. */
16315
16316#include <signal.h> /* for signal */
16317#include <string.h> /* for memmem */
16318#include <stdlib.h> /* for malloc */
16319#include <unistd.h> /* for alarm */
49e4877c 16320static void quit (int sig) { _exit (sig + 128); }
63ce7108
TT
16321
16322int
16323main ()
16324{
16325
16326 int result = 0;
16327 size_t m = 1000000;
16328 char *haystack = (char *) malloc (2 * m + 1);
16329 char *needle = (char *) malloc (m + 1);
16330 /* Failure to compile this test due to missing alarm is okay,
16331 since all such platforms (mingw) also lack memmem. */
16332 signal (SIGALRM, quit);
16333 alarm (5);
16334 /* Check for quadratic performance. */
16335 if (haystack && needle)
16336 {
16337 memset (haystack, 'A', 2 * m);
16338 haystack[2 * m] = 'B';
16339 memset (needle, 'A', m);
16340 needle[m] = 'B';
16341 if (!memmem (haystack, 2 * m + 1, needle, m + 1))
16342 result |= 1;
16343 }
16344 return result;
16345
16346 ;
16347 return 0;
16348}
16349_ACEOF
16350if ac_fn_c_try_run "$LINENO"; then :
16351 gl_cv_func_memmem_works_fast=yes
16352else
16353 gl_cv_func_memmem_works_fast=no
16354fi
16355rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16356 conftest.$ac_objext conftest.beam conftest.$ac_ext
16357fi
16358
16359
16360fi
16361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_fast" >&5
16362$as_echo "$gl_cv_func_memmem_works_fast" >&6; }
16363 case "$gl_cv_func_memmem_works_fast" in
16364 *yes) ;;
16365 *)
16366 REPLACE_MEMMEM=1
16367 ;;
16368 esac
16369 fi
16370
16371 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
16372
16373
16374
16375
16376
16377
16378
16379
16380 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
16381
16382 fi
16383
16384
16385
16386
16387 for ac_func in memmem
16388do :
16389 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
16390if test "x$ac_cv_func_memmem" = x""yes; then :
16391 cat >>confdefs.h <<_ACEOF
16392#define HAVE_MEMMEM 1
16393_ACEOF
16394
16395fi
16396done
16397
16398 if test $ac_cv_func_memmem = yes; then
16399 HAVE_MEMMEM=1
16400 else
16401 HAVE_MEMMEM=0
16402 fi
16403
16404 if test $ac_cv_have_decl_memmem = no; then
16405 HAVE_DECL_MEMMEM=0
16406 else
16407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
16408$as_echo_n "checking whether memmem works... " >&6; }
16409if test "${gl_cv_func_memmem_works_always+set}" = set; then :
16410 $as_echo_n "(cached) " >&6
16411else
16412 if test "$cross_compiling" = yes; then :
16413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16414/* end confdefs.h. */
16415
16416#ifdef __GNU_LIBRARY__
16417 #include <features.h>
16418 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
16419 || __GLIBC_MINOR__ > 12)) \
16420 || (__GLIBC__ > 2)) \
16421 || defined __UCLIBC__
16422 Lucky user
16423 #endif
16424#elif defined __CYGWIN__
16425 #include <cygwin/version.h>
16426 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
16427 Lucky user
16428 #endif
16429#else
16430 Lucky user
16431#endif
16432
16433_ACEOF
16434if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16435 $EGREP "Lucky user" >/dev/null 2>&1; then :
16436 gl_cv_func_memmem_works_always="guessing yes"
16437else
16438 gl_cv_func_memmem_works_always="guessing no"
16439fi
16440rm -f conftest*
16441
16442
16443else
16444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16445/* end confdefs.h. */
16446
16447#include <string.h> /* for memmem */
16448#define P "_EF_BF_BD"
16449#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
16450#define NEEDLE P P P P P
16451
16452int
16453main ()
16454{
16455
16456 int result = 0;
16457 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
16458 result |= 1;
16459 /* Check for empty needle behavior. */
16460 {
16461 const char *haystack = "AAA";
16462 if (memmem (haystack, 3, NULL, 0) != haystack)
16463 result |= 2;
16464 }
16465 return result;
16466
16467 ;
16468 return 0;
16469}
16470_ACEOF
16471if ac_fn_c_try_run "$LINENO"; then :
16472 gl_cv_func_memmem_works_always=yes
16473else
16474 gl_cv_func_memmem_works_always=no
16475fi
16476rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16477 conftest.$ac_objext conftest.beam conftest.$ac_ext
16478fi
16479
16480
16481fi
16482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
16483$as_echo "$gl_cv_func_memmem_works_always" >&6; }
16484 case "$gl_cv_func_memmem_works_always" in
16485 *yes) ;;
16486 *)
16487 REPLACE_MEMMEM=1
16488 ;;
16489 esac
16490 fi
16491 :
16492
16493 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
16494
16495
16496
16497
16498
16499
16500
16501
16502 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
16503
16504 fi
16505
16506
16507
16508
16509
16510 GNULIB_MEMMEM=1
16511
16512
16513
16514
16515
16516$as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
16517
16518
16519
16520
16521
16522
16523
16524
2196f55f
YQ
16525
16526
8424cc97
SM
16527
16528 for ac_func in rawmemchr
16529do :
16530 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
16531if test "x$ac_cv_func_rawmemchr" = x""yes; then :
16532 cat >>confdefs.h <<_ACEOF
16533#define HAVE_RAWMEMCHR 1
16534_ACEOF
16535
16536fi
16537done
16538
16539 if test $ac_cv_func_rawmemchr = no; then
16540 HAVE_RAWMEMCHR=0
16541 fi
16542
16543 if test $HAVE_RAWMEMCHR = 0; then
16544
16545
16546
16547
16548
16549
16550
16551
16552 gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
16553
16554 :
16555 fi
16556
16557
16558
16559
16560
16561 GNULIB_RAWMEMCHR=1
16562
16563
16564
16565
16566
16567$as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
16568
16569
16570
16571
16572
16573
2196f55f
YQ
16574 if test $ac_cv_func_readlink = no; then
16575 HAVE_READLINK=0
16576 else
16577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
16578$as_echo_n "checking whether readlink signature is correct... " >&6; }
16579if test "${gl_cv_decl_readlink_works+set}" = set; then :
16580 $as_echo_n "(cached) " >&6
16581else
16582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16583/* end confdefs.h. */
16584#include <unistd.h>
16585 /* Cause compilation failure if original declaration has wrong type. */
16586 ssize_t readlink (const char *, char *, size_t);
16587int
16588main ()
16589{
16590
16591 ;
16592 return 0;
16593}
16594_ACEOF
16595if ac_fn_c_try_compile "$LINENO"; then :
16596 gl_cv_decl_readlink_works=yes
16597else
16598 gl_cv_decl_readlink_works=no
16599fi
16600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16601fi
16602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
16603$as_echo "$gl_cv_decl_readlink_works" >&6; }
16604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
16605$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
16606if test "${gl_cv_func_readlink_works+set}" = set; then :
16607 $as_echo_n "(cached) " >&6
16608else
16609 # We have readlink, so assume ln -s works.
16610 ln -s conftest.no-such conftest.link
16611 ln -s conftest.link conftest.lnk2
16612 if test "$cross_compiling" = yes; then :
16613 case "$host_os" in
16614 # Guess yes on glibc systems.
16615 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
16616 # If we don't know, assume the worst.
16617 *) gl_cv_func_readlink_works="guessing no" ;;
16618 esac
16619
16620else
16621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16622/* end confdefs.h. */
16623#include <unistd.h>
16624
16625int
16626main ()
16627{
16628char buf[20];
16629 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
16630 ;
16631 return 0;
16632}
16633_ACEOF
16634if ac_fn_c_try_run "$LINENO"; then :
16635 gl_cv_func_readlink_works=yes
16636else
16637 gl_cv_func_readlink_works=no
16638fi
16639rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16640 conftest.$ac_objext conftest.beam conftest.$ac_ext
16641fi
16642
16643 rm -f conftest.link conftest.lnk2
16644fi
16645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
16646$as_echo "$gl_cv_func_readlink_works" >&6; }
16647 case "$gl_cv_func_readlink_works" in
16648 *yes)
16649 if test "$gl_cv_decl_readlink_works" != yes; then
16650 REPLACE_READLINK=1
16651 fi
16652 ;;
16653 *)
16654
16655$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
16656
16657 REPLACE_READLINK=1
16658 ;;
16659 esac
16660 fi
16661
16662 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
16663
16664
16665
16666
16667
16668
16669
16670
16671 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
16672
16673
16674 :
16675
16676 fi
16677
16678
16679
16680
16681
16682 GNULIB_READLINK=1
16683
16684
16685
16686
16687
16688$as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
16689
16690
16691
16692
6a29c58e
YQ
16693
16694
16695
16696
16697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
16698$as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
16699if test "${gl_cv_func_rename_slash_dst_works+set}" = set; then :
16700 $as_echo_n "(cached) " >&6
16701else
16702 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
16703 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
16704 as_fn_error "cannot create temporary files" "$LINENO" 5
16705 # Assume that if we have lstat, we can also check symlinks.
16706 if test $ac_cv_func_lstat = yes; then
16707 ln -s conftest.f conftest.lnk
16708 fi
16709 if test "$cross_compiling" = yes; then :
16710 case "$host_os" in
16711 # Guess yes on glibc systems.
16712 *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
16713 # If we don't know, assume the worst.
16714 *) gl_cv_func_rename_slash_dst_works="guessing no" ;;
16715 esac
16716
16717else
16718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16719/* end confdefs.h. */
16720
16721# include <stdio.h>
16722# include <stdlib.h>
16723
16724int
16725main ()
16726{
16727int result = 0;
16728 if (rename ("conftest.f1", "conftest.f2/") == 0)
16729 result |= 1;
16730 if (rename ("conftest.d1", "conftest.d2/") != 0)
16731 result |= 2;
16732#if HAVE_LSTAT
16733 if (rename ("conftest.f", "conftest.lnk/") == 0)
16734 result |= 4;
16735#endif
16736 return result;
16737
16738 ;
16739 return 0;
16740}
16741_ACEOF
16742if ac_fn_c_try_run "$LINENO"; then :
16743 gl_cv_func_rename_slash_dst_works=yes
16744else
16745 gl_cv_func_rename_slash_dst_works=no
16746fi
16747rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16748 conftest.$ac_objext conftest.beam conftest.$ac_ext
16749fi
16750
16751 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
16752
16753fi
16754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
16755$as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
16756 case "$gl_cv_func_rename_slash_dst_works" in
16757 *yes) ;;
16758 *)
16759 REPLACE_RENAME=1
16760
16761$as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
16762
16763 ;;
16764 esac
16765
16766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
16767$as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
16768if test "${gl_cv_func_rename_slash_src_works+set}" = set; then :
16769 $as_echo_n "(cached) " >&6
16770else
16771 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
16772 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
16773 as_fn_error "cannot create temporary files" "$LINENO" 5
16774 # Assume that if we have lstat, we can also check symlinks.
16775 if test $ac_cv_func_lstat = yes; then
16776 ln -s conftest.f conftest.lnk
16777 fi
16778 if test "$cross_compiling" = yes; then :
16779 case "$host_os" in
16780 # Guess yes on glibc systems.
16781 *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
16782 # If we don't know, assume the worst.
16783 *) gl_cv_func_rename_slash_src_works="guessing no" ;;
16784 esac
16785
16786else
16787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16788/* end confdefs.h. */
16789
16790# include <stdio.h>
16791# include <stdlib.h>
16792
16793int
16794main ()
16795{
16796int result = 0;
16797 if (rename ("conftest.f1/", "conftest.d3") == 0)
16798 result |= 1;
16799 if (rename ("conftest.d1/", "conftest.d2") != 0)
16800 result |= 2;
16801#if HAVE_LSTAT
16802 if (rename ("conftest.lnk/", "conftest.f") == 0)
16803 result |= 4;
16804#endif
16805 return result;
16806
16807 ;
16808 return 0;
16809}
16810_ACEOF
16811if ac_fn_c_try_run "$LINENO"; then :
16812 gl_cv_func_rename_slash_src_works=yes
16813else
16814 gl_cv_func_rename_slash_src_works=no
16815fi
16816rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16817 conftest.$ac_objext conftest.beam conftest.$ac_ext
16818fi
16819
16820 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
16821
16822fi
16823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
16824$as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
16825 case "$gl_cv_func_rename_slash_src_works" in
16826 *yes) ;;
16827 *)
16828 REPLACE_RENAME=1
16829
16830$as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
16831
16832 ;;
16833 esac
16834
16835
16836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
16837$as_echo_n "checking whether rename manages hard links correctly... " >&6; }
16838if test "${gl_cv_func_rename_link_works+set}" = set; then :
16839 $as_echo_n "(cached) " >&6
16840else
16841 if test $ac_cv_func_link = yes; then
16842 rm -rf conftest.f conftest.f1
16843 if touch conftest.f && ln conftest.f conftest.f1 &&
16844 set x `ls -i conftest.f conftest.f1` && test "" = ""; then
16845 if test "$cross_compiling" = yes; then :
16846 case "$host_os" in
16847 # Guess yes on glibc systems.
16848 *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
16849 # If we don't know, assume the worst.
16850 *) gl_cv_func_rename_link_works="guessing no" ;;
16851 esac
16852
16853else
16854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16855/* end confdefs.h. */
16856
16857# include <stdio.h>
16858# include <stdlib.h>
16859# include <unistd.h>
16860
16861int
16862main ()
16863{
16864int result = 0;
16865 if (rename ("conftest.f", "conftest.f1"))
16866 result |= 1;
16867 if (unlink ("conftest.f1"))
16868 result |= 2;
16869 if (rename ("conftest.f", "conftest.f"))
16870 result |= 4;
16871 if (rename ("conftest.f1", "conftest.f1") == 0)
16872 result |= 8;
16873 return result;
16874
16875 ;
16876 return 0;
16877}
16878_ACEOF
16879if ac_fn_c_try_run "$LINENO"; then :
16880 gl_cv_func_rename_link_works=yes
16881else
16882 gl_cv_func_rename_link_works=no
16883fi
16884rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16885 conftest.$ac_objext conftest.beam conftest.$ac_ext
16886fi
16887
16888 else
16889 gl_cv_func_rename_link_works="guessing no"
16890 fi
16891 rm -rf conftest.f conftest.f1
16892 else
16893 gl_cv_func_rename_link_works=yes
16894 fi
16895
16896fi
16897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
16898$as_echo "$gl_cv_func_rename_link_works" >&6; }
16899 case "$gl_cv_func_rename_link_works" in
16900 *yes) ;;
16901 *)
16902 REPLACE_RENAME=1
16903
16904$as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
16905
16906 ;;
16907 esac
16908
16909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
16910$as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
16911if test "${gl_cv_func_rename_dest_works+set}" = set; then :
16912 $as_echo_n "(cached) " >&6
16913else
16914 rm -rf conftest.f conftest.d1 conftest.d2
16915 touch conftest.f && mkdir conftest.d1 conftest.d2 ||
16916 as_fn_error "cannot create temporary files" "$LINENO" 5
16917 if test "$cross_compiling" = yes; then :
16918 case "$host_os" in
16919 # Guess yes on glibc systems.
16920 *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
16921 # If we don't know, assume the worst.
16922 *) gl_cv_func_rename_dest_works="guessing no" ;;
16923 esac
16924
16925else
16926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16927/* end confdefs.h. */
16928
16929# include <stdio.h>
16930# include <stdlib.h>
16931
16932int
16933main ()
16934{
16935int result = 0;
16936 if (rename ("conftest.d1", "conftest.d2") != 0)
16937 result |= 1;
16938 if (rename ("conftest.d2", "conftest.f") == 0)
16939 result |= 2;
16940 return result;
16941
16942 ;
16943 return 0;
16944}
16945_ACEOF
16946if ac_fn_c_try_run "$LINENO"; then :
16947 gl_cv_func_rename_dest_works=yes
16948else
16949 gl_cv_func_rename_dest_works=no
16950fi
16951rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16952 conftest.$ac_objext conftest.beam conftest.$ac_ext
16953fi
16954
16955 rm -rf conftest.f conftest.d1 conftest.d2
16956
16957fi
16958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
16959$as_echo "$gl_cv_func_rename_dest_works" >&6; }
16960 case "$gl_cv_func_rename_dest_works" in
16961 *yes) ;;
16962 *)
16963 REPLACE_RENAME=1
16964
16965$as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
16966
16967 ;;
16968 esac
16969
16970 if test $REPLACE_RENAME = 1; then
16971
16972
16973
16974
16975
16976
16977
16978
16979 gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
16980
16981 fi
16982
16983
16984
16985
16986
16987 GNULIB_RENAME=1
16988
16989
16990
16991
16992
16993$as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
16994
16995
16996
16997
16998
16999
17000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
17001$as_echo_n "checking whether rmdir works... " >&6; }
17002if test "${gl_cv_func_rmdir_works+set}" = set; then :
17003 $as_echo_n "(cached) " >&6
17004else
17005 mkdir conftest.dir
17006 touch conftest.file
17007 if test "$cross_compiling" = yes; then :
17008 case "$host_os" in
17009 # Guess yes on glibc systems.
17010 *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
17011 # If we don't know, assume the worst.
17012 *) gl_cv_func_rmdir_works="guessing no" ;;
17013 esac
17014
17015else
17016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17017/* end confdefs.h. */
17018#include <stdio.h>
17019 #include <errno.h>
17020 #if HAVE_UNISTD_H
17021 # include <unistd.h>
17022 #else /* on Windows with MSVC */
17023 # include <direct.h>
17024 #endif
17025
17026int
17027main ()
17028{
17029int result = 0;
17030 if (!rmdir ("conftest.file/"))
17031 result |= 1;
17032 else if (errno != ENOTDIR)
17033 result |= 2;
17034 if (!rmdir ("conftest.dir/./"))
17035 result |= 4;
17036 return result;
17037
17038 ;
17039 return 0;
17040}
17041_ACEOF
17042if ac_fn_c_try_run "$LINENO"; then :
17043 gl_cv_func_rmdir_works=yes
17044else
17045 gl_cv_func_rmdir_works=no
17046fi
17047rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17048 conftest.$ac_objext conftest.beam conftest.$ac_ext
17049fi
17050
17051 rm -rf conftest.dir conftest.file
17052fi
17053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
17054$as_echo "$gl_cv_func_rmdir_works" >&6; }
17055 case "$gl_cv_func_rmdir_works" in
17056 *yes) ;;
17057 *)
17058 REPLACE_RMDIR=1
17059 ;;
17060 esac
17061
17062 if test $REPLACE_RMDIR = 1; then
17063
17064
17065
17066
17067
17068
17069
17070
17071 gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
17072
17073 fi
17074
17075
17076
17077
17078
17079 GNULIB_RMDIR=1
17080
17081
17082
17083
17084
17085$as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
17086
17087
17088
17089
0750520d
PA
17090
17091
17092
17093
17094
17095
17096
17097
17098
17099
17100 if test $gl_cv_have_include_next = yes; then
17101 gl_cv_next_signal_h='<'signal.h'>'
17102 else
17103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
17104$as_echo_n "checking absolute name of <signal.h>... " >&6; }
17105if test "${gl_cv_next_signal_h+set}" = set; then :
17106 $as_echo_n "(cached) " >&6
17107else
17108
17109
17110
17111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17112/* end confdefs.h. */
17113#include <signal.h>
17114_ACEOF
17115 case "$host_os" in
17116 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17117 *) gl_absname_cpp="$ac_cpp" ;;
17118 esac
17119
17120 case "$host_os" in
17121 mingw*)
17122 gl_dirsep_regex='[/\\]'
17123 ;;
17124 *)
17125 gl_dirsep_regex='\/'
17126 ;;
17127 esac
17128 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17129 gl_header_literal_regex=`echo 'signal.h' \
17130 | sed -e "$gl_make_literal_regex_sed"`
17131 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17132 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17133 s|^/[^/]|//&|
17134 p
17135 q
17136 }'
17137
17138 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17139 sed -n "$gl_absolute_header_sed"`
17140
17141 gl_header=$gl_cv_absolute_signal_h
17142 gl_cv_next_signal_h='"'$gl_header'"'
17143
17144
17145fi
17146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
17147$as_echo "$gl_cv_next_signal_h" >&6; }
17148 fi
17149 NEXT_SIGNAL_H=$gl_cv_next_signal_h
17150
17151 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17152 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17153 gl_next_as_first_directive='<'signal.h'>'
17154 else
17155 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17156 gl_next_as_first_directive=$gl_cv_next_signal_h
17157 fi
17158 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
17159
17160
17161
17162
17163
17164# AIX declares sig_atomic_t to already include volatile, and C89 compilers
17165# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
17166 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
17167#include <signal.h>
17168
17169"
17170if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
17171
17172else
17173 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
17174fi
17175
17176
17177
17178
17179
17180
17181
17182 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
17183#include <signal.h>
17184
17185"
17186if test "x$ac_cv_type_sighandler_t" = x""yes; then :
17187
17188else
17189 HAVE_SIGHANDLER_T=0
17190fi
17191
17192
17193
17194 for gl_func in pthread_sigmask sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask; do
17195 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
17196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
17197$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
17198if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
17199 $as_echo_n "(cached) " >&6
17200else
17201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17202/* end confdefs.h. */
17203#include <signal.h>
17204
17205int
17206main ()
17207{
17208#undef $gl_func
17209 (void) $gl_func;
17210 ;
17211 return 0;
17212}
17213_ACEOF
17214if ac_fn_c_try_compile "$LINENO"; then :
17215 eval "$as_gl_Symbol=yes"
17216else
17217 eval "$as_gl_Symbol=no"
17218fi
17219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17220fi
17221eval ac_res=\$$as_gl_Symbol
17222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17223$as_echo "$ac_res" >&6; }
17224 eval as_val=\$$as_gl_Symbol
17225 if test "x$as_val" = x""yes; then :
17226 cat >>confdefs.h <<_ACEOF
17227#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
17228_ACEOF
17229
17230 eval ac_cv_have_decl_$gl_func=yes
17231fi
17232 done
17233
17234
17235
63ce7108
TT
17236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
17237$as_echo_n "checking for ssize_t... " >&6; }
17238if test "${gt_cv_ssize_t+set}" = set; then :
17239 $as_echo_n "(cached) " >&6
17240else
17241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17242/* end confdefs.h. */
17243#include <sys/types.h>
17244int
17245main ()
17246{
17247int x = sizeof (ssize_t *) + sizeof (ssize_t);
17248 return !x;
17249 ;
17250 return 0;
17251}
17252_ACEOF
17253if ac_fn_c_try_compile "$LINENO"; then :
17254 gt_cv_ssize_t=yes
17255else
17256 gt_cv_ssize_t=no
17257fi
17258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17259fi
17260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
17261$as_echo "$gt_cv_ssize_t" >&6; }
17262 if test $gt_cv_ssize_t = no; then
17263
17264$as_echo "#define ssize_t int" >>confdefs.h
17265
17266 fi
17267
17268
17269
17270
2196f55f
YQ
17271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
17272$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
17273if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
17274 $as_echo_n "(cached) " >&6
17275else
17276 if test "$cross_compiling" = yes; then :
17277 case $host_os in
17278 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
17279 *) gl_cv_func_stat_dir_slash="guessing yes";;
17280 esac
17281else
17282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17283/* end confdefs.h. */
17284#include <sys/stat.h>
17285
17286int
17287main ()
17288{
17289struct stat st; return stat (".", &st) != stat ("./", &st);
17290 ;
17291 return 0;
17292}
17293_ACEOF
17294if ac_fn_c_try_run "$LINENO"; then :
17295 gl_cv_func_stat_dir_slash=yes
17296else
17297 gl_cv_func_stat_dir_slash=no
17298fi
17299rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17300 conftest.$ac_objext conftest.beam conftest.$ac_ext
17301fi
17302
17303fi
17304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
17305$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
17306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
17307$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
17308if test "${gl_cv_func_stat_file_slash+set}" = set; then :
17309 $as_echo_n "(cached) " >&6
17310else
17311 touch conftest.tmp
17312 # Assume that if we have lstat, we can also check symlinks.
17313 if test $ac_cv_func_lstat = yes; then
17314 ln -s conftest.tmp conftest.lnk
17315 fi
17316 if test "$cross_compiling" = yes; then :
17317 case "$host_os" in
17318 # Guess yes on glibc systems.
17319 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
17320 # If we don't know, assume the worst.
17321 *) gl_cv_func_stat_file_slash="guessing no" ;;
17322 esac
17323
17324else
17325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17326/* end confdefs.h. */
17327#include <sys/stat.h>
17328
17329int
17330main ()
17331{
17332int result = 0;
17333 struct stat st;
17334 if (!stat ("conftest.tmp/", &st))
17335 result |= 1;
17336#if HAVE_LSTAT
17337 if (!stat ("conftest.lnk/", &st))
17338 result |= 2;
17339#endif
17340 return result;
17341
17342 ;
17343 return 0;
17344}
17345_ACEOF
17346if ac_fn_c_try_run "$LINENO"; then :
17347 gl_cv_func_stat_file_slash=yes
17348else
17349 gl_cv_func_stat_file_slash=no
17350fi
17351rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17352 conftest.$ac_objext conftest.beam conftest.$ac_ext
17353fi
17354
17355 rm -f conftest.tmp conftest.lnk
17356fi
17357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
17358$as_echo "$gl_cv_func_stat_file_slash" >&6; }
17359 case $gl_cv_func_stat_dir_slash in
17360 *no) REPLACE_STAT=1
17361
17362$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
17363;;
17364 esac
17365 case $gl_cv_func_stat_file_slash in
17366 *no) REPLACE_STAT=1
17367
17368$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
17369;;
17370 esac
17371
17372 if test $REPLACE_STAT = 1; then
17373
17374
17375
17376
17377
17378
17379
17380
17381 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
17382
17383 :
17384 fi
17385
17386
17387
17388
17389
17390 GNULIB_STAT=1
17391
17392
17393
17394
17395
17396$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
17397
17398
17399
17400
17401
17402
63ce7108
TT
17403 # Define two additional variables used in the Makefile substitution.
17404
17405 if test "$ac_cv_header_stdbool_h" = yes; then
17406 STDBOOL_H=''
17407 else
17408 STDBOOL_H='stdbool.h'
17409 fi
17410
17411 if test -n "$STDBOOL_H"; then
17412 GL_GENERATE_STDBOOL_H_TRUE=
17413 GL_GENERATE_STDBOOL_H_FALSE='#'
17414else
17415 GL_GENERATE_STDBOOL_H_TRUE='#'
17416 GL_GENERATE_STDBOOL_H_FALSE=
17417fi
17418
17419
17420 if test "$ac_cv_type__Bool" = yes; then
17421 HAVE__BOOL=1
17422 else
17423 HAVE__BOOL=0
17424 fi
17425
17426
17427
17428
17429
17430 STDDEF_H=
4a626d0a
PA
17431 ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
17432
17433"
17434if test "x$ac_cv_type_max_align_t" = x""yes; then :
17435
17436else
17437 HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
17438fi
17439
63ce7108
TT
17440 if test $gt_cv_c_wchar_t = no; then
17441 HAVE_WCHAR_T=0
17442 STDDEF_H=stddef.h
17443 fi
17444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
17445$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
17446if test "${gl_cv_decl_null_works+set}" = set; then :
17447 $as_echo_n "(cached) " >&6
17448else
17449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17450/* end confdefs.h. */
17451#include <stddef.h>
17452 int test[2 * (sizeof NULL == sizeof (void *)) -1];
17453
17454int
17455main ()
17456{
17457
17458 ;
17459 return 0;
17460}
17461_ACEOF
17462if ac_fn_c_try_compile "$LINENO"; then :
17463 gl_cv_decl_null_works=yes
17464else
17465 gl_cv_decl_null_works=no
17466fi
17467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17468fi
17469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
17470$as_echo "$gl_cv_decl_null_works" >&6; }
17471 if test $gl_cv_decl_null_works = no; then
17472 REPLACE_NULL=1
17473 STDDEF_H=stddef.h
17474 fi
17475
17476 if test -n "$STDDEF_H"; then
17477 GL_GENERATE_STDDEF_H_TRUE=
17478 GL_GENERATE_STDDEF_H_FALSE='#'
17479else
17480 GL_GENERATE_STDDEF_H_TRUE='#'
17481 GL_GENERATE_STDDEF_H_FALSE=
17482fi
17483
17484 if test -n "$STDDEF_H"; then
17485
17486
17487
17488
17489
17490
17491
17492
17493 if test $gl_cv_have_include_next = yes; then
17494 gl_cv_next_stddef_h='<'stddef.h'>'
17495 else
17496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
17497$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
17498if test "${gl_cv_next_stddef_h+set}" = set; then :
17499 $as_echo_n "(cached) " >&6
17500else
17501
4a626d0a
PA
17502
17503
17504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63ce7108
TT
17505/* end confdefs.h. */
17506#include <stddef.h>
63ce7108 17507_ACEOF
4a626d0a
PA
17508 case "$host_os" in
17509 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17510 *) gl_absname_cpp="$ac_cpp" ;;
17511 esac
63ce7108 17512
4a626d0a
PA
17513 case "$host_os" in
17514 mingw*)
17515 gl_dirsep_regex='[/\\]'
17516 ;;
17517 *)
17518 gl_dirsep_regex='\/'
17519 ;;
17520 esac
17521 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17522 gl_header_literal_regex=`echo 'stddef.h' \
17523 | sed -e "$gl_make_literal_regex_sed"`
17524 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17525 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17526 s|^/[^/]|//&|
17527 p
17528 q
17529 }'
63ce7108 17530
4a626d0a
PA
17531 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17532 sed -n "$gl_absolute_header_sed"`
17533
17534 gl_header=$gl_cv_absolute_stddef_h
17535 gl_cv_next_stddef_h='"'$gl_header'"'
63ce7108
TT
17536
17537
17538fi
17539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
17540$as_echo "$gl_cv_next_stddef_h" >&6; }
17541 fi
17542 NEXT_STDDEF_H=$gl_cv_next_stddef_h
17543
17544 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17545 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17546 gl_next_as_first_directive='<'stddef.h'>'
17547 else
17548 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17549 gl_next_as_first_directive=$gl_cv_next_stddef_h
17550 fi
17551 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
17552
17553
17554
17555
17556 fi
17557
17558
17559
17560
49e4877c 17561 $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
63ce7108
TT
17562
17563
17564
98399780
YQ
17565
17566
17567
17568
17569
4a626d0a
PA
17570
17571
6a29c58e
YQ
17572 if test $gl_cv_have_include_next = yes; then
17573 gl_cv_next_stdio_h='<'stdio.h'>'
17574 else
17575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
17576$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
17577if test "${gl_cv_next_stdio_h+set}" = set; then :
17578 $as_echo_n "(cached) " >&6
17579else
17580
4a626d0a
PA
17581
17582
17583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6a29c58e
YQ
17584/* end confdefs.h. */
17585#include <stdio.h>
6a29c58e 17586_ACEOF
4a626d0a
PA
17587 case "$host_os" in
17588 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17589 *) gl_absname_cpp="$ac_cpp" ;;
17590 esac
17591
17592 case "$host_os" in
17593 mingw*)
17594 gl_dirsep_regex='[/\\]'
17595 ;;
17596 *)
17597 gl_dirsep_regex='\/'
17598 ;;
17599 esac
17600 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17601 gl_header_literal_regex=`echo 'stdio.h' \
17602 | sed -e "$gl_make_literal_regex_sed"`
17603 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17604 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17605 s|^/[^/]|//&|
17606 p
17607 q
17608 }'
6a29c58e 17609
4a626d0a
PA
17610 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17611 sed -n "$gl_absolute_header_sed"`
6a29c58e 17612
4a626d0a
PA
17613 gl_header=$gl_cv_absolute_stdio_h
17614 gl_cv_next_stdio_h='"'$gl_header'"'
6a29c58e
YQ
17615
17616
17617fi
17618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
17619$as_echo "$gl_cv_next_stdio_h" >&6; }
17620 fi
17621 NEXT_STDIO_H=$gl_cv_next_stdio_h
17622
17623 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17624 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17625 gl_next_as_first_directive='<'stdio.h'>'
17626 else
17627 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17628 gl_next_as_first_directive=$gl_cv_next_stdio_h
17629 fi
17630 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
17631
17632
17633
17634
17635
4a626d0a
PA
17636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
17637$as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
17638if test "${gl_cv_func_printf_attribute_flavor+set}" = set; then :
17639 $as_echo_n "(cached) " >&6
17640else
17641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17642/* end confdefs.h. */
17643
17644 #define __STDC_FORMAT_MACROS 1
17645 #include <stdio.h>
17646 #include <inttypes.h>
17647 /* For non-mingw systems, compilation will trivially succeed.
17648 For mingw, compilation will succeed for older mingw (system
17649 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
17650 #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
17651 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
17652 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
17653 #endif
17654
17655int
17656main ()
17657{
17658
17659 ;
17660 return 0;
17661}
17662_ACEOF
17663if ac_fn_c_try_compile "$LINENO"; then :
17664 gl_cv_func_printf_attribute_flavor=system
17665else
17666 gl_cv_func_printf_attribute_flavor=gnu
17667fi
17668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17669fi
17670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
17671$as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
17672 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
17673
17674$as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
17675
17676 fi
17677
6a29c58e
YQ
17678 GNULIB_FSCANF=1
17679
17680
17681cat >>confdefs.h <<_ACEOF
17682#define GNULIB_FSCANF 1
17683_ACEOF
17684
17685
17686 GNULIB_SCANF=1
17687
17688
17689cat >>confdefs.h <<_ACEOF
17690#define GNULIB_SCANF 1
17691_ACEOF
17692
17693
17694 GNULIB_FGETC=1
17695 GNULIB_GETC=1
17696 GNULIB_GETCHAR=1
17697 GNULIB_FGETS=1
17698 GNULIB_FREAD=1
17699
17700
17701 GNULIB_FPRINTF=1
17702 GNULIB_PRINTF=1
17703 GNULIB_VFPRINTF=1
17704 GNULIB_VPRINTF=1
17705 GNULIB_FPUTC=1
17706 GNULIB_PUTC=1
17707 GNULIB_PUTCHAR=1
17708 GNULIB_FPUTS=1
17709 GNULIB_PUTS=1
17710 GNULIB_FWRITE=1
17711
17712
17713
17714
17715 for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen renameat snprintf tmpfile vdprintf vsnprintf; do
17716 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
17717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
17718$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
17719if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
17720 $as_echo_n "(cached) " >&6
17721else
17722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17723/* end confdefs.h. */
17724#include <stdio.h>
17725
17726int
17727main ()
17728{
17729#undef $gl_func
17730 (void) $gl_func;
17731 ;
17732 return 0;
17733}
17734_ACEOF
17735if ac_fn_c_try_compile "$LINENO"; then :
17736 eval "$as_gl_Symbol=yes"
17737else
17738 eval "$as_gl_Symbol=no"
17739fi
17740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17741fi
17742eval ac_res=\$$as_gl_Symbol
17743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17744$as_echo "$ac_res" >&6; }
17745 eval as_val=\$$as_gl_Symbol
17746 if test "x$as_val" = x""yes; then :
17747 cat >>confdefs.h <<_ACEOF
17748#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
17749_ACEOF
17750
17751 eval ac_cv_have_decl_$gl_func=yes
17752fi
17753 done
17754
17755
17756
17757
17758
17759
17760
17761
17762
17763
17764
17765
98399780
YQ
17766 if test $gl_cv_have_include_next = yes; then
17767 gl_cv_next_stdlib_h='<'stdlib.h'>'
17768 else
17769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
17770$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
17771if test "${gl_cv_next_stdlib_h+set}" = set; then :
17772 $as_echo_n "(cached) " >&6
17773else
17774
4a626d0a
PA
17775
17776
17777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
98399780
YQ
17778/* end confdefs.h. */
17779#include <stdlib.h>
98399780 17780_ACEOF
4a626d0a
PA
17781 case "$host_os" in
17782 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17783 *) gl_absname_cpp="$ac_cpp" ;;
17784 esac
17785
17786 case "$host_os" in
17787 mingw*)
17788 gl_dirsep_regex='[/\\]'
17789 ;;
17790 *)
17791 gl_dirsep_regex='\/'
17792 ;;
17793 esac
17794 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17795 gl_header_literal_regex=`echo 'stdlib.h' \
17796 | sed -e "$gl_make_literal_regex_sed"`
17797 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17798 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17799 s|^/[^/]|//&|
17800 p
17801 q
17802 }'
98399780 17803
4a626d0a
PA
17804 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17805 sed -n "$gl_absolute_header_sed"`
98399780 17806
4a626d0a
PA
17807 gl_header=$gl_cv_absolute_stdlib_h
17808 gl_cv_next_stdlib_h='"'$gl_header'"'
98399780
YQ
17809
17810
17811fi
17812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
17813$as_echo "$gl_cv_next_stdlib_h" >&6; }
17814 fi
17815 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
17816
17817 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17818 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17819 gl_next_as_first_directive='<'stdlib.h'>'
17820 else
17821 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17822 gl_next_as_first_directive=$gl_cv_next_stdlib_h
17823 fi
17824 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
17825
17826
17827
17828
17829
17830
4a626d0a 17831 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 secure_getenv setenv setstate setstate_r srandom srandom_r strtod strtoll strtoull unlockpt unsetenv; do
98399780
YQ
17832 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
17833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
17834$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
17835if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
17836 $as_echo_n "(cached) " >&6
17837else
17838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17839/* end confdefs.h. */
17840#include <stdlib.h>
17841#if HAVE_SYS_LOADAVG_H
17842# include <sys/loadavg.h>
17843#endif
17844#if HAVE_RANDOM_H
17845# include <random.h>
17846#endif
17847
17848int
17849main ()
17850{
17851#undef $gl_func
17852 (void) $gl_func;
17853 ;
17854 return 0;
17855}
17856_ACEOF
17857if ac_fn_c_try_compile "$LINENO"; then :
17858 eval "$as_gl_Symbol=yes"
17859else
17860 eval "$as_gl_Symbol=no"
17861fi
17862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17863fi
17864eval ac_res=\$$as_gl_Symbol
17865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17866$as_echo "$ac_res" >&6; }
17867 eval as_val=\$$as_gl_Symbol
17868 if test "x$as_val" = x""yes; then :
17869 cat >>confdefs.h <<_ACEOF
17870#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
17871_ACEOF
17872
17873 eval ac_cv_have_decl_$gl_func=yes
17874fi
17875 done
17876
17877
17878
17879
17880
17881
8424cc97
SM
17882 for ac_func in strchrnul
17883do :
17884 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
17885if test "x$ac_cv_func_strchrnul" = x""yes; then :
17886 cat >>confdefs.h <<_ACEOF
17887#define HAVE_STRCHRNUL 1
17888_ACEOF
17889
17890fi
17891done
17892
17893 if test $ac_cv_func_strchrnul = no; then
17894 HAVE_STRCHRNUL=0
17895 else
17896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
17897$as_echo_n "checking whether strchrnul works... " >&6; }
17898if test "${gl_cv_func_strchrnul_works+set}" = set; then :
17899 $as_echo_n "(cached) " >&6
17900else
17901 if test "$cross_compiling" = yes; then :
17902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17903/* end confdefs.h. */
17904
17905#if defined __CYGWIN__
17906 #include <cygwin/version.h>
17907 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
17908 Lucky user
17909 #endif
17910#else
17911 Lucky user
17912#endif
17913
17914_ACEOF
17915if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17916 $EGREP "Lucky user" >/dev/null 2>&1; then :
17917 gl_cv_func_strchrnul_works="guessing yes"
17918else
17919 gl_cv_func_strchrnul_works="guessing no"
17920fi
17921rm -f conftest*
17922
17923
17924else
17925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17926/* end confdefs.h. */
17927
17928#include <string.h> /* for strchrnul */
17929
17930int
17931main ()
17932{
17933const char *buf = "a";
17934 return strchrnul (buf, 'b') != buf + 1;
17935
17936 ;
17937 return 0;
17938}
17939_ACEOF
17940if ac_fn_c_try_run "$LINENO"; then :
17941 gl_cv_func_strchrnul_works=yes
17942else
17943 gl_cv_func_strchrnul_works=no
17944fi
17945rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17946 conftest.$ac_objext conftest.beam conftest.$ac_ext
17947fi
17948
17949
17950fi
17951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
17952$as_echo "$gl_cv_func_strchrnul_works" >&6; }
17953 case "$gl_cv_func_strchrnul_works" in
17954 *yes) ;;
17955 *) REPLACE_STRCHRNUL=1 ;;
17956 esac
17957 fi
17958
17959 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
17960
17961
17962
17963
17964
17965
17966
17967
17968 gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
17969
17970 :
17971 fi
17972
17973
17974
17975
17976
17977 GNULIB_STRCHRNUL=1
17978
17979
17980
17981
17982
17983$as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
17984
17985
17986
17987
17988
17989
17990
98399780 17991
63ce7108
TT
17992 if test $REPLACE_STRSTR = 0; then
17993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
17994$as_echo_n "checking whether strstr works in linear time... " >&6; }
17995if test "${gl_cv_func_strstr_linear+set}" = set; then :
17996 $as_echo_n "(cached) " >&6
17997else
17998 if test "$cross_compiling" = yes; then :
17999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18000/* end confdefs.h. */
18001
18002#include <features.h>
18003#ifdef __GNU_LIBRARY__
18004 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
18005 && !(defined __i386__ || defined __x86_64__) \
18006 && !defined __UCLIBC__
18007 Lucky user
18008 #endif
18009#endif
18010#ifdef __CYGWIN__
18011 #include <cygwin/version.h>
18012 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
18013 Lucky user
18014 #endif
18015#endif
18016
18017_ACEOF
18018if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18019 $EGREP "Lucky user" >/dev/null 2>&1; then :
18020 gl_cv_func_strstr_linear="guessing yes"
c971b7fa 18021else
63ce7108 18022 gl_cv_func_strstr_linear="guessing no"
c971b7fa
PA
18023fi
18024rm -f conftest*
18025
18026
18027else
18028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18029/* end confdefs.h. */
18030
49e4877c
PA
18031#ifdef __MVS__
18032/* z/OS does not deliver signals while strstr() is running (thanks to
18033 restrictions on its LE runtime), which prevents us from limiting the
18034 running time of this test. */
18035# error "This test does not work properly on z/OS"
18036#endif
c971b7fa 18037#include <signal.h> /* for signal */
63ce7108 18038#include <string.h> /* for strstr */
c971b7fa
PA
18039#include <stdlib.h> /* for malloc */
18040#include <unistd.h> /* for alarm */
49e4877c 18041static void quit (int sig) { _exit (sig + 128); }
c971b7fa
PA
18042
18043int
18044main ()
18045{
18046
18047 int result = 0;
18048 size_t m = 1000000;
63ce7108
TT
18049 char *haystack = (char *) malloc (2 * m + 2);
18050 char *needle = (char *) malloc (m + 2);
c971b7fa 18051 /* Failure to compile this test due to missing alarm is okay,
63ce7108 18052 since all such platforms (mingw) also have quadratic strstr. */
c971b7fa
PA
18053 signal (SIGALRM, quit);
18054 alarm (5);
18055 /* Check for quadratic performance. */
18056 if (haystack && needle)
18057 {
18058 memset (haystack, 'A', 2 * m);
18059 haystack[2 * m] = 'B';
63ce7108 18060 haystack[2 * m + 1] = 0;
c971b7fa
PA
18061 memset (needle, 'A', m);
18062 needle[m] = 'B';
63ce7108
TT
18063 needle[m + 1] = 0;
18064 if (!strstr (haystack, needle))
c971b7fa
PA
18065 result |= 1;
18066 }
18067 return result;
18068
18069 ;
18070 return 0;
18071}
18072_ACEOF
18073if ac_fn_c_try_run "$LINENO"; then :
63ce7108 18074 gl_cv_func_strstr_linear=yes
c971b7fa 18075else
63ce7108 18076 gl_cv_func_strstr_linear=no
c971b7fa
PA
18077fi
18078rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18079 conftest.$ac_objext conftest.beam conftest.$ac_ext
18080fi
18081
18082
18083fi
63ce7108
TT
18084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
18085$as_echo "$gl_cv_func_strstr_linear" >&6; }
18086 case "$gl_cv_func_strstr_linear" in
40a73391
JK
18087 *yes) ;;
18088 *)
63ce7108 18089 REPLACE_STRSTR=1
40a73391
JK
18090 ;;
18091 esac
c971b7fa
PA
18092 fi
18093
63ce7108 18094 if test $REPLACE_STRSTR = 1; then
c971b7fa
PA
18095
18096
18097
18098
18099
18100
18101
18102
63ce7108 18103 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
c971b7fa 18104
a512b375 18105 fi
c971b7fa
PA
18106
18107
18108
63ce7108
TT
18109 if test "$gl_cv_func_memchr_works" != yes; then
18110 REPLACE_STRSTR=1
c971b7fa 18111 else
63ce7108
TT
18112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
18113$as_echo_n "checking whether strstr works... " >&6; }
18114if test "${gl_cv_func_strstr_works_always+set}" = set; then :
c971b7fa
PA
18115 $as_echo_n "(cached) " >&6
18116else
18117 if test "$cross_compiling" = yes; then :
63ce7108 18118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
18119/* end confdefs.h. */
18120
18121#ifdef __GNU_LIBRARY__
18122 #include <features.h>
63ce7108 18123 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
c971b7fa
PA
18124 || defined __UCLIBC__
18125 Lucky user
18126 #endif
18127#elif defined __CYGWIN__
18128 #include <cygwin/version.h>
18129 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
18130 Lucky user
18131 #endif
18132#else
18133 Lucky user
18134#endif
18135
18136_ACEOF
18137if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18138 $EGREP "Lucky user" >/dev/null 2>&1; then :
63ce7108 18139 gl_cv_func_strstr_works_always="guessing yes"
c971b7fa 18140else
63ce7108 18141 gl_cv_func_strstr_works_always="guessing no"
c971b7fa
PA
18142fi
18143rm -f conftest*
18144
18145
18146else
18147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18148/* end confdefs.h. */
18149
63ce7108 18150#include <string.h> /* for strstr */
c971b7fa
PA
18151#define P "_EF_BF_BD"
18152#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
18153#define NEEDLE P P P P P
18154
18155int
18156main ()
18157{
63ce7108 18158return !!strstr (HAYSTACK, NEEDLE);
c971b7fa
PA
18159
18160 ;
18161 return 0;
18162}
18163_ACEOF
18164if ac_fn_c_try_run "$LINENO"; then :
63ce7108 18165 gl_cv_func_strstr_works_always=yes
c971b7fa 18166else
63ce7108 18167 gl_cv_func_strstr_works_always=no
c971b7fa
PA
18168fi
18169rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18170 conftest.$ac_objext conftest.beam conftest.$ac_ext
18171fi
18172
18173
18174fi
63ce7108
TT
18175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
18176$as_echo "$gl_cv_func_strstr_works_always" >&6; }
18177 case "$gl_cv_func_strstr_works_always" in
40a73391
JK
18178 *yes) ;;
18179 *)
63ce7108 18180 REPLACE_STRSTR=1
40a73391
JK
18181 ;;
18182 esac
c971b7fa 18183 fi
8839a007 18184
63ce7108 18185 if test $REPLACE_STRSTR = 1; then
8839a007 18186
8690e634
JK
18187
18188
8690e634
JK
18189
18190
18191
18192
18193
63ce7108 18194 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
8690e634 18195
8690e634
JK
18196 fi
18197
8690e634
JK
18198
18199
8690e634 18200
8690e634 18201
63ce7108 18202 GNULIB_STRSTR=1
8690e634
JK
18203
18204
18205
8690e634
JK
18206
18207
63ce7108 18208$as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
8690e634
JK
18209
18210
18211
18212
18213
18214
18215
421693b0
PA
18216 for ac_func in strtok_r
18217do :
18218 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
18219if test "x$ac_cv_func_strtok_r" = x""yes; then :
18220 cat >>confdefs.h <<_ACEOF
18221#define HAVE_STRTOK_R 1
18222_ACEOF
18223
18224fi
18225done
18226
18227 if test $ac_cv_func_strtok_r = yes; then
18228 HAVE_STRTOK_R=1
18229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5
18230$as_echo_n "checking whether strtok_r works... " >&6; }
18231if test "${gl_cv_func_strtok_r_works+set}" = set; then :
18232 $as_echo_n "(cached) " >&6
18233else
18234 if test "$cross_compiling" = yes; then :
18235
18236 case "$host_os" in
18237 # Guess no on glibc systems.
18238 *-gnu*) gl_cv_func_strtok_r_works="guessing no";;
18239 *) gl_cv_func_strtok_r_works="guessing yes";;
18240 esac
18241
18242else
18243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18244/* end confdefs.h. */
18245
18246 #ifndef __OPTIMIZE__
18247 # define __OPTIMIZE__ 1
18248 #endif
18249 #undef __OPTIMIZE_SIZE__
18250 #undef __NO_INLINE__
18251 #include <stdlib.h>
18252 #include <string.h>
18253
18254int
18255main ()
18256{
18257static const char dummy[] = "\177\01a";
18258 char delimiters[] = "xxxxxxxx";
18259 char *save_ptr = (char *) dummy;
18260 strtok_r (delimiters, "x", &save_ptr);
18261 strtok_r (NULL, "x", &save_ptr);
18262 return 0;
18263
18264 ;
18265 return 0;
18266}
18267
18268_ACEOF
18269if ac_fn_c_try_run "$LINENO"; then :
18270 gl_cv_func_strtok_r_works=yes
18271else
18272 gl_cv_func_strtok_r_works=no
18273fi
18274rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18275 conftest.$ac_objext conftest.beam conftest.$ac_ext
18276fi
18277
18278
18279fi
18280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5
18281$as_echo "$gl_cv_func_strtok_r_works" >&6; }
18282 case "$gl_cv_func_strtok_r_works" in
18283 *no)
18284 UNDEFINE_STRTOK_R=1
18285 ;;
18286 esac
18287 else
18288 HAVE_STRTOK_R=0
18289 fi
18290
18291 if test $ac_cv_have_decl_strtok_r = no; then
18292 HAVE_DECL_STRTOK_R=0
18293 fi
18294
18295 if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
18296
18297
18298
18299
18300
18301
18302
18303
18304 gl_LIBOBJS="$gl_LIBOBJS strtok_r.$ac_objext"
18305
18306
18307 :
18308
18309 fi
18310
18311
18312
18313
18314
18315 GNULIB_STRTOK_R=1
18316
18317
18318
18319
18320
18321$as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h
18322
18323
18324
18325
18326
18327
18328
8690e634
JK
18329
18330
18331
18332
18333
8690e634 18334
09607c9e
TT
18335
18336
18337
18338
18339 if test $gl_cv_have_include_next = yes; then
18340 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
18341 else
18342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
18343$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
18344if test "${gl_cv_next_sys_stat_h+set}" = set; then :
18345 $as_echo_n "(cached) " >&6
18346else
18347
18348 if test $ac_cv_header_sys_stat_h = yes; then
18349
18350
4a626d0a
PA
18351
18352
18353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
09607c9e
TT
18354/* end confdefs.h. */
18355#include <sys/stat.h>
09607c9e 18356_ACEOF
4a626d0a
PA
18357 case "$host_os" in
18358 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18359 *) gl_absname_cpp="$ac_cpp" ;;
18360 esac
18361
18362 case "$host_os" in
18363 mingw*)
18364 gl_dirsep_regex='[/\\]'
18365 ;;
18366 *)
18367 gl_dirsep_regex='\/'
18368 ;;
18369 esac
18370 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18371 gl_header_literal_regex=`echo 'sys/stat.h' \
18372 | sed -e "$gl_make_literal_regex_sed"`
18373 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18374 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18375 s|^/[^/]|//&|
18376 p
18377 q
18378 }'
18379
18380 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18381 sed -n "$gl_absolute_header_sed"`
18382
18383 gl_header=$gl_cv_absolute_sys_stat_h
18384 gl_cv_next_sys_stat_h='"'$gl_header'"'
09607c9e
TT
18385 else
18386 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
18387 fi
18388
18389
18390fi
18391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
18392$as_echo "$gl_cv_next_sys_stat_h" >&6; }
18393 fi
18394 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
18395
18396 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18397 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18398 gl_next_as_first_directive='<'sys/stat.h'>'
18399 else
18400 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18401 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
18402 fi
18403 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
18404
18405
18406
18407
18408
18409
18410
18411
2196f55f 18412
09607c9e
TT
18413
18414
18415 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
18416
18417$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
18418
18419 fi
18420
18421 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
18422 #include <sys/stat.h>
18423"
18424if test "x$ac_cv_type_nlink_t" = x""yes; then :
18425
18426else
18427
18428$as_echo "#define nlink_t int" >>confdefs.h
18429
18430fi
18431
18432
18433
18434 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
18435 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
18436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
18437$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18438if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
18439 $as_echo_n "(cached) " >&6
18440else
18441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18442/* end confdefs.h. */
18443#include <sys/stat.h>
18444
18445int
18446main ()
18447{
18448#undef $gl_func
18449 (void) $gl_func;
18450 ;
18451 return 0;
18452}
18453_ACEOF
18454if ac_fn_c_try_compile "$LINENO"; then :
18455 eval "$as_gl_Symbol=yes"
18456else
18457 eval "$as_gl_Symbol=no"
18458fi
18459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18460fi
18461eval ac_res=\$$as_gl_Symbol
18462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18463$as_echo "$ac_res" >&6; }
18464 eval as_val=\$$as_gl_Symbol
18465 if test "x$as_val" = x""yes; then :
18466 cat >>confdefs.h <<_ACEOF
18467#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18468_ACEOF
18469
18470 eval ac_cv_have_decl_$gl_func=yes
18471fi
18472 done
18473
18474
18475
18476
18477
18478
18479
18480
18481
18482
18483
18484
18485
18486
8839a007
PA
18487
18488
18489
18490
09607c9e
TT
18491
18492
8839a007
PA
18493
18494
18495
18496
18497 if test $gl_cv_have_include_next = yes; then
18498 gl_cv_next_unistd_h='<'unistd.h'>'
18499 else
18500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
18501$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
18502if test "${gl_cv_next_unistd_h+set}" = set; then :
18503 $as_echo_n "(cached) " >&6
18504else
18505
18506 if test $ac_cv_header_unistd_h = yes; then
18507
18508
4a626d0a
PA
18509
18510
18511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8839a007
PA
18512/* end confdefs.h. */
18513#include <unistd.h>
8839a007 18514_ACEOF
4a626d0a
PA
18515 case "$host_os" in
18516 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18517 *) gl_absname_cpp="$ac_cpp" ;;
18518 esac
18519
18520 case "$host_os" in
18521 mingw*)
18522 gl_dirsep_regex='[/\\]'
18523 ;;
18524 *)
18525 gl_dirsep_regex='\/'
18526 ;;
18527 esac
18528 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18529 gl_header_literal_regex=`echo 'unistd.h' \
18530 | sed -e "$gl_make_literal_regex_sed"`
18531 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18532 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18533 s|^/[^/]|//&|
18534 p
18535 q
18536 }'
18537
18538 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18539 sed -n "$gl_absolute_header_sed"`
18540
18541 gl_header=$gl_cv_absolute_unistd_h
18542 gl_cv_next_unistd_h='"'$gl_header'"'
8839a007
PA
18543 else
18544 gl_cv_next_unistd_h='<'unistd.h'>'
18545 fi
18546
18547
18548fi
18549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
18550$as_echo "$gl_cv_next_unistd_h" >&6; }
18551 fi
18552 NEXT_UNISTD_H=$gl_cv_next_unistd_h
18553
18554 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18555 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18556 gl_next_as_first_directive='<'unistd.h'>'
18557 else
18558 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18559 gl_next_as_first_directive=$gl_cv_next_unistd_h
18560 fi
18561 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
18562
18563
18564
18565
18566 if test $ac_cv_header_unistd_h = yes; then
18567 HAVE_UNISTD_H=1
18568 else
18569 HAVE_UNISTD_H=0
18570 fi
18571
18572
18573
18574
18575
18576
18577
18578 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
18579 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
18580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
18581$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18582if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
18583 $as_echo_n "(cached) " >&6
18584else
18585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18586/* end confdefs.h. */
18587
18588#if HAVE_UNISTD_H
18589# include <unistd.h>
18590#endif
18591/* Some systems declare various items in the wrong headers. */
18592#if !(defined __GLIBC__ && !defined __UCLIBC__)
18593# include <fcntl.h>
18594# include <stdio.h>
18595# include <stdlib.h>
18596# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
18597# include <io.h>
18598# endif
18599#endif
18600
18601int
18602main ()
18603{
18604#undef $gl_func
18605 (void) $gl_func;
18606 ;
18607 return 0;
18608}
18609_ACEOF
18610if ac_fn_c_try_compile "$LINENO"; then :
18611 eval "$as_gl_Symbol=yes"
18612else
18613 eval "$as_gl_Symbol=no"
18614fi
18615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18616fi
18617eval ac_res=\$$as_gl_Symbol
18618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18619$as_echo "$ac_res" >&6; }
18620 eval as_val=\$$as_gl_Symbol
18621 if test "x$as_val" = x""yes; then :
18622 cat >>confdefs.h <<_ACEOF
18623#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18624_ACEOF
18625
18626 eval ac_cv_have_decl_$gl_func=yes
18627fi
18628 done
18629
18630
18631
18632
18633
18634
18635
18636
18637
18638
18639
18640
8690e634
JK
18641
18642
18643 if test $gl_cv_have_include_next = yes; then
18644 gl_cv_next_wchar_h='<'wchar.h'>'
18645 else
18646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
18647$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
18648if test "${gl_cv_next_wchar_h+set}" = set; then :
18649 $as_echo_n "(cached) " >&6
18650else
18651
18652 if test $ac_cv_header_wchar_h = yes; then
18653
18654
4a626d0a
PA
18655
18656
18657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
18658/* end confdefs.h. */
18659#include <wchar.h>
8690e634 18660_ACEOF
4a626d0a
PA
18661 case "$host_os" in
18662 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18663 *) gl_absname_cpp="$ac_cpp" ;;
18664 esac
18665
18666 case "$host_os" in
18667 mingw*)
18668 gl_dirsep_regex='[/\\]'
18669 ;;
18670 *)
18671 gl_dirsep_regex='\/'
18672 ;;
18673 esac
18674 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18675 gl_header_literal_regex=`echo 'wchar.h' \
18676 | sed -e "$gl_make_literal_regex_sed"`
18677 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18678 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18679 s|^/[^/]|//&|
18680 p
18681 q
18682 }'
18683
18684 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18685 sed -n "$gl_absolute_header_sed"`
18686
18687 gl_header=$gl_cv_absolute_wchar_h
18688 gl_cv_next_wchar_h='"'$gl_header'"'
8690e634
JK
18689 else
18690 gl_cv_next_wchar_h='<'wchar.h'>'
18691 fi
18692
18693
18694fi
18695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
18696$as_echo "$gl_cv_next_wchar_h" >&6; }
18697 fi
18698 NEXT_WCHAR_H=$gl_cv_next_wchar_h
18699
18700 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18701 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18702 gl_next_as_first_directive='<'wchar.h'>'
18703 else
18704 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18705 gl_next_as_first_directive=$gl_cv_next_wchar_h
18706 fi
18707 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
18708
18709
18710
18711
18712 if test $ac_cv_header_wchar_h = yes; then
18713 HAVE_WCHAR_H=1
18714 else
18715 HAVE_WCHAR_H=0
18716 fi
18717
c971b7fa
PA
18718
18719
18720
18721
8690e634
JK
18722 if test $gt_cv_c_wint_t = yes; then
18723 HAVE_WINT_T=1
18724 else
18725 HAVE_WINT_T=0
18726 fi
c971b7fa
PA
18727
18728
18729
8690e634
JK
18730 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
18731 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
18732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
18733$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18734if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
c971b7fa
PA
18735 $as_echo_n "(cached) " >&6
18736else
18737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18738/* end confdefs.h. */
8690e634
JK
18739
18740/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18741 <wchar.h>.
18742 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18743 included before <wchar.h>. */
18744#if !(defined __GLIBC__ && !defined __UCLIBC__)
18745# include <stddef.h>
18746# include <stdio.h>
18747# include <time.h>
18748#endif
18749#include <wchar.h>
c971b7fa
PA
18750
18751int
18752main ()
18753{
8690e634
JK
18754#undef $gl_func
18755 (void) $gl_func;
c971b7fa
PA
18756 ;
18757 return 0;
18758}
18759_ACEOF
18760if ac_fn_c_try_compile "$LINENO"; then :
8690e634 18761 eval "$as_gl_Symbol=yes"
c971b7fa 18762else
8690e634 18763 eval "$as_gl_Symbol=no"
c971b7fa
PA
18764fi
18765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18766fi
8690e634
JK
18767eval ac_res=\$$as_gl_Symbol
18768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18769$as_echo "$ac_res" >&6; }
18770 eval as_val=\$$as_gl_Symbol
18771 if test "x$as_val" = x""yes; then :
18772 cat >>confdefs.h <<_ACEOF
18773#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18774_ACEOF
c971b7fa 18775
8690e634 18776 eval ac_cv_have_decl_$gl_func=yes
c971b7fa 18777fi
8690e634
JK
18778 done
18779
18780
18781
18782
18783
18784
18785
8690e634
JK
18786 if test $ac_cv_func_iswcntrl = yes; then
18787 HAVE_ISWCNTRL=1
18788 else
18789 HAVE_ISWCNTRL=0
18790 fi
18791
18792
18793
8690e634
JK
18794 if test $gt_cv_c_wint_t = yes; then
18795 HAVE_WINT_T=1
18796 else
18797 HAVE_WINT_T=0
18798 fi
18799
18800
18801
18802
18803
18804
c971b7fa 18805
8690e634 18806
c971b7fa
PA
18807
18808
18809
18810 if test $gl_cv_have_include_next = yes; then
8690e634 18811 gl_cv_next_wctype_h='<'wctype.h'>'
c971b7fa 18812 else
8690e634
JK
18813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
18814$as_echo_n "checking absolute name of <wctype.h>... " >&6; }
18815if test "${gl_cv_next_wctype_h+set}" = set; then :
c971b7fa
PA
18816 $as_echo_n "(cached) " >&6
18817else
18818
8690e634
JK
18819 if test $ac_cv_header_wctype_h = yes; then
18820
18821
4a626d0a
PA
18822
18823
18824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 18825/* end confdefs.h. */
8690e634 18826#include <wctype.h>
c971b7fa 18827_ACEOF
4a626d0a
PA
18828 case "$host_os" in
18829 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18830 *) gl_absname_cpp="$ac_cpp" ;;
18831 esac
18832
18833 case "$host_os" in
18834 mingw*)
18835 gl_dirsep_regex='[/\\]'
18836 ;;
18837 *)
18838 gl_dirsep_regex='\/'
18839 ;;
18840 esac
18841 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18842 gl_header_literal_regex=`echo 'wctype.h' \
18843 | sed -e "$gl_make_literal_regex_sed"`
18844 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18845 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18846 s|^/[^/]|//&|
18847 p
18848 q
18849 }'
18850
18851 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18852 sed -n "$gl_absolute_header_sed"`
18853
18854 gl_header=$gl_cv_absolute_wctype_h
18855 gl_cv_next_wctype_h='"'$gl_header'"'
8690e634
JK
18856 else
18857 gl_cv_next_wctype_h='<'wctype.h'>'
18858 fi
c971b7fa
PA
18859
18860
18861fi
8690e634
JK
18862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
18863$as_echo "$gl_cv_next_wctype_h" >&6; }
c971b7fa 18864 fi
8690e634 18865 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
c971b7fa
PA
18866
18867 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18868 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8690e634 18869 gl_next_as_first_directive='<'wctype.h'>'
c971b7fa
PA
18870 else
18871 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8690e634 18872 gl_next_as_first_directive=$gl_cv_next_wctype_h
c971b7fa 18873 fi
8690e634
JK
18874 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
18875
18876
18877
18878
18879 if test $ac_cv_header_wctype_h = yes; then
18880 if test $ac_cv_func_iswcntrl = yes; then
18881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
18882$as_echo_n "checking whether iswcntrl works... " >&6; }
18883if test "${gl_cv_func_iswcntrl_works+set}" = set; then :
18884 $as_echo_n "(cached) " >&6
18885else
18886
18887 if test "$cross_compiling" = yes; then :
18888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18889/* end confdefs.h. */
18890#include <stdlib.h>
18891 #if __GNU_LIBRARY__ == 1
18892 Linux libc5 i18n is broken.
18893 #endif
18894int
18895main ()
18896{
18897
18898 ;
18899 return 0;
18900}
18901_ACEOF
18902if ac_fn_c_try_compile "$LINENO"; then :
18903 gl_cv_func_iswcntrl_works="guessing yes"
18904else
18905 gl_cv_func_iswcntrl_works="guessing no"
18906fi
18907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18908
18909else
18910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18911/* end confdefs.h. */
18912
18913 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
18914 included before <wchar.h>.
18915 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
18916 must be included before <wchar.h>. */
18917 #include <stddef.h>
18918 #include <stdio.h>
18919 #include <time.h>
18920 #include <wchar.h>
18921 #include <wctype.h>
18922 int main () { return iswprint ('x') == 0; }
18923
18924_ACEOF
18925if ac_fn_c_try_run "$LINENO"; then :
18926 gl_cv_func_iswcntrl_works=yes
18927else
18928 gl_cv_func_iswcntrl_works=no
18929fi
18930rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18931 conftest.$ac_objext conftest.beam conftest.$ac_ext
18932fi
18933
18934
18935fi
18936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
18937$as_echo "$gl_cv_func_iswcntrl_works" >&6; }
18938 fi
18939 HAVE_WCTYPE_H=1
18940 else
18941 HAVE_WCTYPE_H=0
18942 fi
18943
18944
18945 case "$gl_cv_func_iswcntrl_works" in
18946 *yes) REPLACE_ISWCNTRL=0 ;;
18947 *) REPLACE_ISWCNTRL=1 ;;
18948 esac
18949
18950
18951 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
18952 :
18953 fi
18954
18955 if test $REPLACE_ISWCNTRL = 1; then
18956 REPLACE_TOWLOWER=1
18957 else
18958 for ac_func in towlower
18959do :
18960 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
18961if test "x$ac_cv_func_towlower" = x""yes; then :
18962 cat >>confdefs.h <<_ACEOF
18963#define HAVE_TOWLOWER 1
18964_ACEOF
18965
18966fi
18967done
18968
18969 if test $ac_cv_func_towlower = yes; then
18970 REPLACE_TOWLOWER=0
18971 else
18972 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
18973 included before <wchar.h>.
18974 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
18975 must be included before <wchar.h>. */
18976 #include <stddef.h>
18977 #include <stdio.h>
18978 #include <time.h>
18979 #include <wchar.h>
18980 #if HAVE_WCTYPE_H
18981 # include <wctype.h>
18982 #endif
18983
18984"
18985if test "x$ac_cv_have_decl_towlower" = x""yes; then :
18986 ac_have_decl=1
18987else
18988 ac_have_decl=0
18989fi
18990
18991cat >>confdefs.h <<_ACEOF
18992#define HAVE_DECL_TOWLOWER $ac_have_decl
18993_ACEOF
18994
18995 if test $ac_cv_have_decl_towlower = yes; then
18996 REPLACE_TOWLOWER=1
18997 else
18998 REPLACE_TOWLOWER=0
18999 fi
19000 fi
19001 fi
19002
19003
19004 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
19005 :
19006 fi
19007
19008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
19009$as_echo_n "checking for wctype_t... " >&6; }
19010if test "${gl_cv_type_wctype_t+set}" = set; then :
19011 $as_echo_n "(cached) " >&6
19012else
19013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19014/* end confdefs.h. */
19015/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
19016 included before <wchar.h>.
19017 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
19018 must be included before <wchar.h>. */
19019 #include <stddef.h>
19020 #include <stdio.h>
19021 #include <time.h>
19022 #include <wchar.h>
19023 #if HAVE_WCTYPE_H
19024 # include <wctype.h>
19025 #endif
19026 wctype_t a;
19027
19028int
19029main ()
19030{
19031
19032 ;
19033 return 0;
19034}
19035_ACEOF
19036if ac_fn_c_try_compile "$LINENO"; then :
19037 gl_cv_type_wctype_t=yes
19038else
19039 gl_cv_type_wctype_t=no
19040fi
19041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 19042
8690e634
JK
19043fi
19044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
19045$as_echo "$gl_cv_type_wctype_t" >&6; }
19046 if test $gl_cv_type_wctype_t = no; then
19047 HAVE_WCTYPE_T=0
19048 fi
19049
19050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
19051$as_echo_n "checking for wctrans_t... " >&6; }
19052if test "${gl_cv_type_wctrans_t+set}" = set; then :
19053 $as_echo_n "(cached) " >&6
19054else
19055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19056/* end confdefs.h. */
19057/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
19058 included before <wchar.h>.
19059 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
19060 must be included before <wchar.h>. */
19061 #include <stddef.h>
19062 #include <stdio.h>
19063 #include <time.h>
19064 #include <wchar.h>
19065 #include <wctype.h>
19066 wctrans_t a;
c971b7fa 19067
8690e634
JK
19068int
19069main ()
19070{
c971b7fa 19071
8690e634
JK
19072 ;
19073 return 0;
19074}
19075_ACEOF
19076if ac_fn_c_try_compile "$LINENO"; then :
19077 gl_cv_type_wctrans_t=yes
19078else
19079 gl_cv_type_wctrans_t=no
19080fi
19081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 19082
8690e634
JK
19083fi
19084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
19085$as_echo "$gl_cv_type_wctrans_t" >&6; }
19086 if test $gl_cv_type_wctrans_t = no; then
19087 HAVE_WCTRANS_T=0
c971b7fa
PA
19088 fi
19089
19090
8690e634
JK
19091 for gl_func in wctype iswctype wctrans towctrans ; do
19092 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
19093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
19094$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
19095if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
19096 $as_echo_n "(cached) " >&6
19097else
19098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19099/* end confdefs.h. */
19100
19101/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19102 <wchar.h>.
19103 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19104 included before <wchar.h>. */
19105#if !(defined __GLIBC__ && !defined __UCLIBC__)
19106# include <stddef.h>
19107# include <stdio.h>
19108# include <time.h>
19109# include <wchar.h>
19110#endif
19111#include <wctype.h>
19112
19113int
19114main ()
19115{
19116#undef $gl_func
19117 (void) $gl_func;
19118 ;
19119 return 0;
19120}
19121_ACEOF
19122if ac_fn_c_try_compile "$LINENO"; then :
19123 eval "$as_gl_Symbol=yes"
19124else
19125 eval "$as_gl_Symbol=no"
19126fi
19127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19128fi
19129eval ac_res=\$$as_gl_Symbol
19130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19131$as_echo "$ac_res" >&6; }
19132 eval as_val=\$$as_gl_Symbol
19133 if test "x$as_val" = x""yes; then :
19134 cat >>confdefs.h <<_ACEOF
19135#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
19136_ACEOF
c971b7fa 19137
8690e634
JK
19138 eval ac_cv_have_decl_$gl_func=yes
19139fi
19140 done
c971b7fa
PA
19141
19142
19143 # End of code from modules
19144
19145
19146
19147
19148
19149
19150
19151
19152
19153 gltests_libdeps=
19154 gltests_ltlibdeps=
19155
19156
19157
19158
19159
19160
19161
19162
19163
19164 gl_source_base='tests'
19165 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
19166
19167 gl_module_indicator_condition=$gltests_WITNESS
19168
19169
19170
19171
19172
19173
19174
19175
19176
19177 LIBGNU_LIBDEPS="$gl_libdeps"
19178
19179 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
19180
19181
19182
19183# We don't use automake, but gnulib does. This line lets us generate
19184# its Makefile.in.
19185am__api_version='1.11'
19186
19187# Find a good install program. We prefer a C program (faster),
19188# so one script is as good as another. But avoid the broken or
19189# incompatible versions:
19190# SysV /etc/install, /usr/sbin/install
19191# SunOS /usr/etc/install
19192# IRIX /sbin/install
19193# AIX /bin/install
19194# AmigaOS /C/install, which installs bootblocks on floppy discs
19195# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
19196# AFS /usr/afsws/bin/install, which mishandles nonexistent args
19197# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
19198# OS/2's system install, which has a completely different semantic
19199# ./install, which can be erroneously created by make from ./install.sh.
19200# Reject install programs that cannot install multiple files.
19201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
19202$as_echo_n "checking for a BSD-compatible install... " >&6; }
19203if test -z "$INSTALL"; then
19204if test "${ac_cv_path_install+set}" = set; then :
19205 $as_echo_n "(cached) " >&6
19206else
19207 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19208for as_dir in $PATH
19209do
19210 IFS=$as_save_IFS
19211 test -z "$as_dir" && as_dir=.
19212 # Account for people who put trailing slashes in PATH elements.
19213case $as_dir/ in #((
19214 ./ | .// | /[cC]/* | \
19215 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
19216 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
19217 /usr/ucb/* ) ;;
19218 *)
19219 # OSF1 and SCO ODT 3.0 have their own names for install.
19220 # Don't use installbsd from OSF since it installs stuff as root
19221 # by default.
19222 for ac_prog in ginstall scoinst install; do
19223 for ac_exec_ext in '' $ac_executable_extensions; do
19224 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
19225 if test $ac_prog = install &&
19226 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
19227 # AIX install. It has an incompatible calling convention.
19228 :
19229 elif test $ac_prog = install &&
19230 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
19231 # program-specific install script used by HP pwplus--don't use.
19232 :
19233 else
19234 rm -rf conftest.one conftest.two conftest.dir
19235 echo one > conftest.one
19236 echo two > conftest.two
19237 mkdir conftest.dir
19238 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
19239 test -s conftest.one && test -s conftest.two &&
19240 test -s conftest.dir/conftest.one &&
19241 test -s conftest.dir/conftest.two
19242 then
19243 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
19244 break 3
19245 fi
19246 fi
19247 fi
19248 done
19249 done
19250 ;;
19251esac
19252
19253 done
19254IFS=$as_save_IFS
19255
19256rm -rf conftest.one conftest.two conftest.dir
19257
19258fi
19259 if test "${ac_cv_path_install+set}" = set; then
19260 INSTALL=$ac_cv_path_install
19261 else
19262 # As a last resort, use the slow shell script. Don't cache a
19263 # value for INSTALL within a source directory, because that will
19264 # break other packages using the cache if that directory is
19265 # removed, or if the value is a relative name.
19266 INSTALL=$ac_install_sh
19267 fi
19268fi
19269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
19270$as_echo "$INSTALL" >&6; }
19271
19272# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
19273# It thinks the first close brace ends the variable substitution.
19274test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
19275
19276test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
19277
19278test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
19279
19280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
19281$as_echo_n "checking whether build environment is sane... " >&6; }
19282# Just in case
19283sleep 1
19284echo timestamp > conftest.file
19285# Reject unsafe characters in $srcdir or the absolute working directory
19286# name. Accept space and tab only in the latter.
19287am_lf='
19288'
19289case `pwd` in
19290 *[\\\"\#\$\&\'\`$am_lf]*)
19291 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
19292esac
19293case $srcdir in
19294 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
19295 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
19296esac
19297
19298# Do `set' in a subshell so we don't clobber the current shell's
19299# arguments. Must try -L first in case configure is actually a
19300# symlink; some systems play weird games with the mod time of symlinks
19301# (eg FreeBSD returns the mod time of the symlink's containing
19302# directory).
19303if (
19304 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
19305 if test "$*" = "X"; then
19306 # -L didn't work.
19307 set X `ls -t "$srcdir/configure" conftest.file`
19308 fi
19309 rm -f conftest.file
19310 if test "$*" != "X $srcdir/configure conftest.file" \
19311 && test "$*" != "X conftest.file $srcdir/configure"; then
19312
19313 # If neither matched, then we have a broken ls. This can happen
19314 # if, for instance, CONFIG_SHELL is bash and it inherits a
19315 # broken ls alias from the environment. This has actually
19316 # happened. Such a system could not be considered "sane".
19317 as_fn_error "ls -t appears to fail. Make sure there is not a broken
19318alias in your environment" "$LINENO" 5
19319 fi
19320
19321 test "$2" = conftest.file
19322 )
19323then
19324 # Ok.
19325 :
19326else
19327 as_fn_error "newly created file is older than distributed files!
19328Check your system clock" "$LINENO" 5
19329fi
19330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19331$as_echo "yes" >&6; }
19332test "$program_prefix" != NONE &&
19333 program_transform_name="s&^&$program_prefix&;$program_transform_name"
19334# Use a double $ so make ignores it.
19335test "$program_suffix" != NONE &&
19336 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
19337# Double any \ or $.
19338# By default was `s,x,x', remove it if useless.
19339ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
19340program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
19341
19342# expand $ac_aux_dir to an absolute path
19343am_aux_dir=`cd $ac_aux_dir && pwd`
19344
19345if test x"${MISSING+set}" != xset; then
19346 case $am_aux_dir in
19347 *\ * | *\ *)
19348 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
19349 *)
19350 MISSING="\${SHELL} $am_aux_dir/missing" ;;
19351 esac
19352fi
19353# Use eval to expand $SHELL
19354if eval "$MISSING --run true"; then
19355 am_missing_run="$MISSING --run "
19356else
19357 am_missing_run=
19358 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
19359$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
19360fi
19361
19362if test x"${install_sh}" != xset; then
19363 case $am_aux_dir in
19364 *\ * | *\ *)
19365 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
19366 *)
19367 install_sh="\${SHELL} $am_aux_dir/install-sh"
19368 esac
19369fi
19370
19371# Installed binaries are usually stripped using `strip' when the user
19372# run `make install-strip'. However `strip' might not be the right
19373# tool to use in cross-compilation environments, therefore Automake
19374# will honor the `STRIP' environment variable to overrule this program.
19375if test "$cross_compiling" != no; then
19376 if test -n "$ac_tool_prefix"; then
19377 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
19378set dummy ${ac_tool_prefix}strip; ac_word=$2
19379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19380$as_echo_n "checking for $ac_word... " >&6; }
19381if test "${ac_cv_prog_STRIP+set}" = set; then :
19382 $as_echo_n "(cached) " >&6
19383else
19384 if test -n "$STRIP"; then
19385 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
19386else
19387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19388for as_dir in $PATH
19389do
19390 IFS=$as_save_IFS
19391 test -z "$as_dir" && as_dir=.
19392 for ac_exec_ext in '' $ac_executable_extensions; do
19393 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19394 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
19395 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19396 break 2
19397 fi
19398done
19399 done
19400IFS=$as_save_IFS
19401
19402fi
19403fi
19404STRIP=$ac_cv_prog_STRIP
19405if test -n "$STRIP"; then
19406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
19407$as_echo "$STRIP" >&6; }
19408else
19409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19410$as_echo "no" >&6; }
19411fi
19412
19413
19414fi
19415if test -z "$ac_cv_prog_STRIP"; then
19416 ac_ct_STRIP=$STRIP
19417 # Extract the first word of "strip", so it can be a program name with args.
19418set dummy strip; ac_word=$2
19419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19420$as_echo_n "checking for $ac_word... " >&6; }
19421if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
19422 $as_echo_n "(cached) " >&6
19423else
19424 if test -n "$ac_ct_STRIP"; then
19425 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
19426else
19427as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19428for as_dir in $PATH
19429do
19430 IFS=$as_save_IFS
19431 test -z "$as_dir" && as_dir=.
19432 for ac_exec_ext in '' $ac_executable_extensions; do
19433 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19434 ac_cv_prog_ac_ct_STRIP="strip"
19435 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19436 break 2
19437 fi
19438done
19439 done
19440IFS=$as_save_IFS
19441
19442fi
19443fi
19444ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
19445if test -n "$ac_ct_STRIP"; then
19446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
19447$as_echo "$ac_ct_STRIP" >&6; }
19448else
19449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19450$as_echo "no" >&6; }
19451fi
19452
19453 if test "x$ac_ct_STRIP" = x; then
19454 STRIP=":"
19455 else
19456 case $cross_compiling:$ac_tool_warned in
19457yes:)
19458{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19459$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19460ac_tool_warned=yes ;;
19461esac
19462 STRIP=$ac_ct_STRIP
19463 fi
19464else
19465 STRIP="$ac_cv_prog_STRIP"
19466fi
19467
19468fi
19469INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
19470
c971b7fa
PA
19471mkdir_p="$MKDIR_P"
19472case $mkdir_p in
19473 [\\/$]* | ?:[\\/]*) ;;
19474 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
19475esac
19476
19477for ac_prog in gawk mawk nawk awk
19478do
19479 # Extract the first word of "$ac_prog", so it can be a program name with args.
19480set dummy $ac_prog; ac_word=$2
19481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19482$as_echo_n "checking for $ac_word... " >&6; }
19483if test "${ac_cv_prog_AWK+set}" = set; then :
19484 $as_echo_n "(cached) " >&6
19485else
19486 if test -n "$AWK"; then
19487 ac_cv_prog_AWK="$AWK" # Let the user override the test.
19488else
19489as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19490for as_dir in $PATH
19491do
19492 IFS=$as_save_IFS
19493 test -z "$as_dir" && as_dir=.
19494 for ac_exec_ext in '' $ac_executable_extensions; do
19495 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19496 ac_cv_prog_AWK="$ac_prog"
19497 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19498 break 2
19499 fi
19500done
19501 done
19502IFS=$as_save_IFS
19503
19504fi
19505fi
19506AWK=$ac_cv_prog_AWK
19507if test -n "$AWK"; then
19508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
19509$as_echo "$AWK" >&6; }
19510else
19511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19512$as_echo "no" >&6; }
19513fi
19514
19515
19516 test -n "$AWK" && break
19517done
19518
19519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
19520$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
19521set x ${MAKE-make}
19522ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
19523if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
19524 $as_echo_n "(cached) " >&6
19525else
19526 cat >conftest.make <<\_ACEOF
19527SHELL = /bin/sh
19528all:
19529 @echo '@@@%%%=$(MAKE)=@@@%%%'
19530_ACEOF
19531# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
19532case `${MAKE-make} -f conftest.make 2>/dev/null` in
19533 *@@@%%%=?*=@@@%%%*)
19534 eval ac_cv_prog_make_${ac_make}_set=yes;;
19535 *)
19536 eval ac_cv_prog_make_${ac_make}_set=no;;
19537esac
19538rm -f conftest.make
19539fi
19540if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
19541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19542$as_echo "yes" >&6; }
19543 SET_MAKE=
19544else
19545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19546$as_echo "no" >&6; }
19547 SET_MAKE="MAKE=${MAKE-make}"
19548fi
19549
19550rm -rf .tst 2>/dev/null
19551mkdir .tst 2>/dev/null
19552if test -d .tst; then
19553 am__leading_dot=.
19554else
19555 am__leading_dot=_
19556fi
19557rmdir .tst 2>/dev/null
19558
19559DEPDIR="${am__leading_dot}deps"
19560
19561ac_config_commands="$ac_config_commands depfiles"
19562
19563
19564am_make=${MAKE-make}
19565cat > confinc << 'END'
19566am__doit:
19567 @echo this is the am__doit target
19568.PHONY: am__doit
19569END
19570# If we don't find an include directive, just comment out the code.
19571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
19572$as_echo_n "checking for style of include used by $am_make... " >&6; }
19573am__include="#"
19574am__quote=
19575_am_result=none
19576# First try GNU make style include.
19577echo "include confinc" > confmf
19578# Ignore all kinds of additional output from `make'.
19579case `$am_make -s -f confmf 2> /dev/null` in #(
19580*the\ am__doit\ target*)
19581 am__include=include
19582 am__quote=
19583 _am_result=GNU
19584 ;;
19585esac
19586# Now try BSD make style include.
19587if test "$am__include" = "#"; then
19588 echo '.include "confinc"' > confmf
19589 case `$am_make -s -f confmf 2> /dev/null` in #(
19590 *the\ am__doit\ target*)
19591 am__include=.include
19592 am__quote="\""
19593 _am_result=BSD
19594 ;;
19595 esac
19596fi
19597
19598
19599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
19600$as_echo "$_am_result" >&6; }
19601rm -f confinc confmf
19602
19603# Check whether --enable-dependency-tracking was given.
19604if test "${enable_dependency_tracking+set}" = set; then :
19605 enableval=$enable_dependency_tracking;
19606fi
19607
19608if test "x$enable_dependency_tracking" != xno; then
19609 am_depcomp="$ac_aux_dir/depcomp"
19610 AMDEPBACKSLASH='\'
19611fi
19612 if test "x$enable_dependency_tracking" != xno; then
19613 AMDEP_TRUE=
19614 AMDEP_FALSE='#'
19615else
19616 AMDEP_TRUE='#'
19617 AMDEP_FALSE=
19618fi
19619
19620
19621if test "`cd $srcdir && pwd`" != "`pwd`"; then
19622 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
19623 # is not polluted with repeated "-I."
19624 am__isrc=' -I$(srcdir)'
19625 # test to see if srcdir already configured
19626 if test -f $srcdir/config.status; then
19627 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
19628 fi
19629fi
19630
19631# test whether we have cygpath
19632if test -z "$CYGPATH_W"; then
19633 if (cygpath --version) >/dev/null 2>/dev/null; then
19634 CYGPATH_W='cygpath -w'
19635 else
19636 CYGPATH_W=echo
19637 fi
19638fi
19639
19640
19641# Define the identity of the package.
19642 PACKAGE=libgnu
19643 VERSION=UNUSED-VERSION
19644
19645
19646# Some tools Automake needs.
19647
19648ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
19649
19650
19651AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
19652
19653
19654AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
19655
19656
19657AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
19658
19659
19660MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
19661
19662# We need awk for the "check" target. The system "awk" is bad on
19663# some platforms.
19664# Always define AMTAR for backward compatibility.
19665
19666AMTAR=${AMTAR-"${am_missing_run}tar"}
19667
19668am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
19669
19670
19671
19672
19673depcc="$CC" am_compiler_list=
19674
19675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
19676$as_echo_n "checking dependency style of $depcc... " >&6; }
19677if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
19678 $as_echo_n "(cached) " >&6
19679else
19680 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
19681 # We make a subdir and do the tests there. Otherwise we can end up
19682 # making bogus files that we don't know about and never remove. For
19683 # instance it was reported that on HP-UX the gcc test will end up
19684 # making a dummy file named `D' -- because `-MD' means `put the output
19685 # in D'.
19686 mkdir conftest.dir
19687 # Copy depcomp to subdir because otherwise we won't find it if we're
19688 # using a relative directory.
19689 cp "$am_depcomp" conftest.dir
19690 cd conftest.dir
19691 # We will build objects and dependencies in a subdirectory because
19692 # it helps to detect inapplicable dependency modes. For instance
19693 # both Tru64's cc and ICC support -MD to output dependencies as a
19694 # side effect of compilation, but ICC will put the dependencies in
19695 # the current directory while Tru64 will put them in the object
19696 # directory.
19697 mkdir sub
19698
19699 am_cv_CC_dependencies_compiler_type=none
19700 if test "$am_compiler_list" = ""; then
19701 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
19702 fi
19703 am__universal=false
19704 case " $depcc " in #(
19705 *\ -arch\ *\ -arch\ *) am__universal=true ;;
19706 esac
19707
19708 for depmode in $am_compiler_list; do
19709 # Setup a source with many dependencies, because some compilers
19710 # like to wrap large dependency lists on column 80 (with \), and
19711 # we should not choose a depcomp mode which is confused by this.
19712 #
19713 # We need to recreate these files for each test, as the compiler may
19714 # overwrite some of them when testing with obscure command lines.
19715 # This happens at least with the AIX C compiler.
19716 : > sub/conftest.c
19717 for i in 1 2 3 4 5 6; do
19718 echo '#include "conftst'$i'.h"' >> sub/conftest.c
19719 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
19720 # Solaris 8's {/usr,}/bin/sh.
19721 touch sub/conftst$i.h
19722 done
19723 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
19724
19725 # We check with `-c' and `-o' for the sake of the "dashmstdout"
19726 # mode. It turns out that the SunPro C++ compiler does not properly
19727 # handle `-M -o', and we need to detect this. Also, some Intel
19728 # versions had trouble with output in subdirs
19729 am__obj=sub/conftest.${OBJEXT-o}
19730 am__minus_obj="-o $am__obj"
19731 case $depmode in
19732 gcc)
19733 # This depmode causes a compiler race in universal mode.
19734 test "$am__universal" = false || continue
19735 ;;
19736 nosideeffect)
19737 # after this tag, mechanisms are not by side-effect, so they'll
19738 # only be used when explicitly requested
19739 if test "x$enable_dependency_tracking" = xyes; then
19740 continue
19741 else
19742 break
19743 fi
19744 ;;
19745 msvisualcpp | msvcmsys)
19746 # This compiler won't grok `-c -o', but also, the minuso test has
19747 # not run yet. These depmodes are late enough in the game, and
19748 # so weak that their functioning should not be impacted.
19749 am__obj=conftest.${OBJEXT-o}
19750 am__minus_obj=
19751 ;;
19752 none) break ;;
19753 esac
19754 if depmode=$depmode \
19755 source=sub/conftest.c object=$am__obj \
19756 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
19757 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
19758 >/dev/null 2>conftest.err &&
19759 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
19760 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
19761 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
19762 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
19763 # icc doesn't choke on unknown options, it will just issue warnings
19764 # or remarks (even with -Werror). So we grep stderr for any message
19765 # that says an option was ignored or not supported.
19766 # When given -MP, icc 7.0 and 7.1 complain thusly:
19767 # icc: Command line warning: ignoring option '-M'; no argument required
19768 # The diagnosis changed in icc 8.0:
19769 # icc: Command line remark: option '-MP' not supported
19770 if (grep 'ignoring option' conftest.err ||
19771 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
19772 am_cv_CC_dependencies_compiler_type=$depmode
19773 break
19774 fi
19775 fi
19776 done
19777
19778 cd ..
19779 rm -rf conftest.dir
19780else
19781 am_cv_CC_dependencies_compiler_type=none
19782fi
19783
19784fi
19785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
19786$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
19787CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
19788
19789 if
19790 test "x$enable_dependency_tracking" != xno \
19791 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
19792 am__fastdepCC_TRUE=
19793 am__fastdepCC_FALSE='#'
19794else
19795 am__fastdepCC_TRUE='#'
19796 am__fastdepCC_FALSE=
19797fi
19798
19799
19800
19801
19802# --------------------- #
19803# Checks for programs. #
19804# --------------------- #
19805
19806
19807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
19808$as_echo_n "checking whether ln -s works... " >&6; }
19809LN_S=$as_ln_s
19810if test "$LN_S" = "ln -s"; then
19811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19812$as_echo "yes" >&6; }
19813else
19814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
19815$as_echo "no, using $LN_S" >&6; }
19816fi
19817
19818if test -n "$ac_tool_prefix"; then
19819 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
19820set dummy ${ac_tool_prefix}ranlib; ac_word=$2
19821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19822$as_echo_n "checking for $ac_word... " >&6; }
19823if test "${ac_cv_prog_RANLIB+set}" = set; then :
19824 $as_echo_n "(cached) " >&6
19825else
19826 if test -n "$RANLIB"; then
19827 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
19828else
19829as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19830for as_dir in $PATH
19831do
19832 IFS=$as_save_IFS
19833 test -z "$as_dir" && as_dir=.
19834 for ac_exec_ext in '' $ac_executable_extensions; do
19835 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19836 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
19837 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19838 break 2
19839 fi
19840done
19841 done
19842IFS=$as_save_IFS
19843
19844fi
19845fi
19846RANLIB=$ac_cv_prog_RANLIB
19847if test -n "$RANLIB"; then
19848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
19849$as_echo "$RANLIB" >&6; }
19850else
19851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19852$as_echo "no" >&6; }
19853fi
19854
19855
19856fi
19857if test -z "$ac_cv_prog_RANLIB"; then
19858 ac_ct_RANLIB=$RANLIB
19859 # Extract the first word of "ranlib", so it can be a program name with args.
19860set dummy ranlib; ac_word=$2
19861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19862$as_echo_n "checking for $ac_word... " >&6; }
19863if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
19864 $as_echo_n "(cached) " >&6
19865else
19866 if test -n "$ac_ct_RANLIB"; then
19867 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
19868else
19869as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19870for as_dir in $PATH
19871do
19872 IFS=$as_save_IFS
19873 test -z "$as_dir" && as_dir=.
19874 for ac_exec_ext in '' $ac_executable_extensions; do
19875 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19876 ac_cv_prog_ac_ct_RANLIB="ranlib"
19877 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19878 break 2
19879 fi
19880done
19881 done
19882IFS=$as_save_IFS
19883
19884fi
19885fi
19886ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
19887if test -n "$ac_ct_RANLIB"; then
19888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
19889$as_echo "$ac_ct_RANLIB" >&6; }
19890else
19891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19892$as_echo "no" >&6; }
19893fi
19894
19895 if test "x$ac_ct_RANLIB" = x; then
19896 RANLIB=":"
19897 else
19898 case $cross_compiling:$ac_tool_warned in
19899yes:)
19900{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19901$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19902ac_tool_warned=yes ;;
19903esac
19904 RANLIB=$ac_ct_RANLIB
19905 fi
19906else
19907 RANLIB="$ac_cv_prog_RANLIB"
19908fi
19909
19910
19911if test -n "$ac_tool_prefix"; then
19912 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
19913set dummy ${ac_tool_prefix}ar; ac_word=$2
19914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19915$as_echo_n "checking for $ac_word... " >&6; }
19916if test "${ac_cv_prog_AR+set}" = set; then :
19917 $as_echo_n "(cached) " >&6
19918else
19919 if test -n "$AR"; then
19920 ac_cv_prog_AR="$AR" # Let the user override the test.
19921else
19922as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19923for as_dir in $PATH
19924do
19925 IFS=$as_save_IFS
19926 test -z "$as_dir" && as_dir=.
19927 for ac_exec_ext in '' $ac_executable_extensions; do
19928 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19929 ac_cv_prog_AR="${ac_tool_prefix}ar"
19930 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19931 break 2
19932 fi
19933done
19934 done
19935IFS=$as_save_IFS
19936
19937fi
19938fi
19939AR=$ac_cv_prog_AR
19940if test -n "$AR"; then
19941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
19942$as_echo "$AR" >&6; }
19943else
19944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19945$as_echo "no" >&6; }
19946fi
19947
19948
19949fi
19950if test -z "$ac_cv_prog_AR"; then
19951 ac_ct_AR=$AR
19952 # Extract the first word of "ar", so it can be a program name with args.
19953set dummy ar; ac_word=$2
19954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19955$as_echo_n "checking for $ac_word... " >&6; }
19956if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
19957 $as_echo_n "(cached) " >&6
19958else
19959 if test -n "$ac_ct_AR"; then
19960 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
19961else
19962as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19963for as_dir in $PATH
19964do
19965 IFS=$as_save_IFS
19966 test -z "$as_dir" && as_dir=.
19967 for ac_exec_ext in '' $ac_executable_extensions; do
19968 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19969 ac_cv_prog_ac_ct_AR="ar"
19970 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19971 break 2
19972 fi
19973done
19974 done
19975IFS=$as_save_IFS
19976
19977fi
19978fi
19979ac_ct_AR=$ac_cv_prog_ac_ct_AR
19980if test -n "$ac_ct_AR"; then
19981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
19982$as_echo "$ac_ct_AR" >&6; }
19983else
19984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19985$as_echo "no" >&6; }
19986fi
19987
19988 if test "x$ac_ct_AR" = x; then
19989 AR=""
19990 else
19991 case $cross_compiling:$ac_tool_warned in
19992yes:)
19993{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19994$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19995ac_tool_warned=yes ;;
19996esac
19997 AR=$ac_ct_AR
19998 fi
19999else
20000 AR="$ac_cv_prog_AR"
20001fi
20002
20003
20004# ---------------------- #
20005# Checks for libraries. #
20006# ---------------------- #
20007
20008ac_config_files="$ac_config_files Makefile import/Makefile"
20009
20010ac_config_commands="$ac_config_commands default"
20011
20012cat >confcache <<\_ACEOF
20013# This file is a shell script that caches the results of configure
20014# tests run on this system so they can be shared between configure
20015# scripts and configure runs, see configure's option --config-cache.
20016# It is not useful on other systems. If it contains results you don't
20017# want to keep, you may remove or edit it.
20018#
20019# config.status only pays attention to the cache file if you give it
20020# the --recheck option to rerun configure.
20021#
20022# `ac_cv_env_foo' variables (set or unset) will be overridden when
20023# loading this file, other *unset* `ac_cv_foo' will be assigned the
20024# following values.
20025
20026_ACEOF
20027
20028# The following way of writing the cache mishandles newlines in values,
20029# but we know of no workaround that is simple, portable, and efficient.
20030# So, we kill variables containing newlines.
20031# Ultrix sh set writes to stderr and can't be redirected directly,
20032# and sets the high bit in the cache file unless we assign to the vars.
20033(
20034 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
20035 eval ac_val=\$$ac_var
20036 case $ac_val in #(
20037 *${as_nl}*)
20038 case $ac_var in #(
20039 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
20040$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
20041 esac
20042 case $ac_var in #(
20043 _ | IFS | as_nl) ;; #(
20044 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
20045 *) { eval $ac_var=; unset $ac_var;} ;;
20046 esac ;;
20047 esac
20048 done
20049
20050 (set) 2>&1 |
20051 case $as_nl`(ac_space=' '; set) 2>&1` in #(
20052 *${as_nl}ac_space=\ *)
20053 # `set' does not quote correctly, so add quotes: double-quote
20054 # substitution turns \\\\ into \\, and sed turns \\ into \.
20055 sed -n \
20056 "s/'/'\\\\''/g;
20057 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20058 ;; #(
20059 *)
20060 # `set' quotes correctly as required by POSIX, so do not add quotes.
20061 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
20062 ;;
20063 esac |
20064 sort
20065) |
20066 sed '
20067 /^ac_cv_env_/b end
20068 t clear
20069 :clear
20070 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20071 t end
20072 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20073 :end' >>confcache
20074if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
20075 if test -w "$cache_file"; then
20076 test "x$cache_file" != "x/dev/null" &&
20077 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
20078$as_echo "$as_me: updating cache $cache_file" >&6;}
20079 cat confcache >$cache_file
20080 else
20081 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
20082$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
20083 fi
20084fi
20085rm -f confcache
20086
20087test "x$prefix" = xNONE && prefix=$ac_default_prefix
20088# Let make expand exec_prefix.
20089test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20090
20091DEFS=-DHAVE_CONFIG_H
20092
20093ac_libobjs=
20094ac_ltlibobjs=
20095for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20096 # 1. Remove the extension, and $U if already installed.
20097 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
20098 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
20099 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
20100 # will be set to the directory where LIBOBJS objects are built.
20101 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
20102 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
20103done
20104LIBOBJS=$ac_libobjs
20105
20106LTLIBOBJS=$ac_ltlibobjs
20107
20108
20109if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
20110 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
20111Usually this means the macro was only invoked conditionally." "$LINENO" 5
20112fi
20113if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
20114 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
20115Usually this means the macro was only invoked conditionally." "$LINENO" 5
20116fi
8690e634
JK
20117if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
20118 as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
20119Usually this means the macro was only invoked conditionally." "$LINENO" 5
20120fi
18848e28
GF
20121if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
20122 as_fn_error "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
20123Usually this means the macro was only invoked conditionally." "$LINENO" 5
20124fi
88b48903
WN
20125if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
20126 as_fn_error "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
20127Usually this means the macro was only invoked conditionally." "$LINENO" 5
20128fi
8690e634
JK
20129if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
20130 as_fn_error "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
20131Usually this means the macro was only invoked conditionally." "$LINENO" 5
20132fi
49e4877c
PA
20133if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
20134 as_fn_error "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
20135Usually this means the macro was only invoked conditionally." "$LINENO" 5
20136fi
20137if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
20138 as_fn_error "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
20139Usually this means the macro was only invoked conditionally." "$LINENO" 5
20140fi
c971b7fa
PA
20141if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
20142 as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined.
20143Usually this means the macro was only invoked conditionally." "$LINENO" 5
20144fi
88b48903
WN
20145
20146
8690e634
JK
20147if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
20148 as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
20149Usually this means the macro was only invoked conditionally." "$LINENO" 5
20150fi
c971b7fa
PA
20151if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
20152 as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
20153Usually this means the macro was only invoked conditionally." "$LINENO" 5
20154fi
20155
20156 gl_libobjs=
20157 gl_ltlibobjs=
20158 if test -n "$gl_LIBOBJS"; then
20159 # Remove the extension.
20160 sed_drop_objext='s/\.o$//;s/\.obj$//'
20161 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
20162 gl_libobjs="$gl_libobjs $i.$ac_objext"
20163 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
20164 done
20165 fi
20166 gl_LIBOBJS=$gl_libobjs
20167
20168 gl_LTLIBOBJS=$gl_ltlibobjs
20169
20170
20171
20172 gltests_libobjs=
20173 gltests_ltlibobjs=
20174 if test -n "$gltests_LIBOBJS"; then
20175 # Remove the extension.
20176 sed_drop_objext='s/\.o$//;s/\.obj$//'
20177 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
20178 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
20179 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
20180 done
20181 fi
20182 gltests_LIBOBJS=$gltests_libobjs
20183
20184 gltests_LTLIBOBJS=$gltests_ltlibobjs
20185
20186
20187if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
20188 as_fn_error "conditional \"AMDEP\" was never defined.
20189Usually this means the macro was only invoked conditionally." "$LINENO" 5
20190fi
20191if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
20192 as_fn_error "conditional \"am__fastdepCC\" was never defined.
20193Usually this means the macro was only invoked conditionally." "$LINENO" 5
20194fi
20195 if test -n "$EXEEXT"; then
20196 am__EXEEXT_TRUE=
20197 am__EXEEXT_FALSE='#'
20198else
20199 am__EXEEXT_TRUE='#'
20200 am__EXEEXT_FALSE=
20201fi
20202
20203
20204: ${CONFIG_STATUS=./config.status}
20205ac_write_fail=0
20206ac_clean_files_save=$ac_clean_files
20207ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20208{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
20209$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
20210as_write_fail=0
20211cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
20212#! $SHELL
20213# Generated by $as_me.
20214# Run this file to recreate the current configuration.
20215# Compiler output produced by configure, useful for debugging
20216# configure, is in config.log if it exists.
20217
20218debug=false
20219ac_cs_recheck=false
20220ac_cs_silent=false
20221
20222SHELL=\${CONFIG_SHELL-$SHELL}
20223export SHELL
20224_ASEOF
20225cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
20226## -------------------- ##
20227## M4sh Initialization. ##
20228## -------------------- ##
20229
20230# Be more Bourne compatible
20231DUALCASE=1; export DUALCASE # for MKS sh
20232if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20233 emulate sh
20234 NULLCMD=:
20235 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
20236 # is contrary to our usage. Disable this feature.
20237 alias -g '${1+"$@"}'='"$@"'
20238 setopt NO_GLOB_SUBST
20239else
20240 case `(set -o) 2>/dev/null` in #(
20241 *posix*) :
20242 set -o posix ;; #(
20243 *) :
20244 ;;
20245esac
20246fi
20247
20248
20249as_nl='
20250'
20251export as_nl
20252# Printing a long string crashes Solaris 7 /usr/bin/printf.
20253as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
20254as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
20255as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
20256# Prefer a ksh shell builtin over an external printf program on Solaris,
20257# but without wasting forks for bash or zsh.
20258if test -z "$BASH_VERSION$ZSH_VERSION" \
20259 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
20260 as_echo='print -r --'
20261 as_echo_n='print -rn --'
20262elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
20263 as_echo='printf %s\n'
20264 as_echo_n='printf %s'
20265else
20266 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
20267 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
20268 as_echo_n='/usr/ucb/echo -n'
20269 else
20270 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
20271 as_echo_n_body='eval
20272 arg=$1;
20273 case $arg in #(
20274 *"$as_nl"*)
20275 expr "X$arg" : "X\\(.*\\)$as_nl";
20276 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
20277 esac;
20278 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
20279 '
20280 export as_echo_n_body
20281 as_echo_n='sh -c $as_echo_n_body as_echo'
20282 fi
20283 export as_echo_body
20284 as_echo='sh -c $as_echo_body as_echo'
20285fi
20286
20287# The user is always right.
20288if test "${PATH_SEPARATOR+set}" != set; then
20289 PATH_SEPARATOR=:
20290 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
20291 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
20292 PATH_SEPARATOR=';'
20293 }
20294fi
20295
20296
20297# IFS
20298# We need space, tab and new line, in precisely that order. Quoting is
20299# there to prevent editors from complaining about space-tab.
20300# (If _AS_PATH_WALK were called with IFS unset, it would disable word
20301# splitting by setting IFS to empty value.)
20302IFS=" "" $as_nl"
20303
20304# Find who we are. Look in the path if we contain no directory separator.
20305case $0 in #((
20306 *[\\/]* ) as_myself=$0 ;;
20307 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20308for as_dir in $PATH
20309do
20310 IFS=$as_save_IFS
20311 test -z "$as_dir" && as_dir=.
20312 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20313 done
20314IFS=$as_save_IFS
20315
20316 ;;
20317esac
20318# We did not find ourselves, most probably we were run as `sh COMMAND'
20319# in which case we are not to be found in the path.
20320if test "x$as_myself" = x; then
20321 as_myself=$0
20322fi
20323if test ! -f "$as_myself"; then
20324 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
20325 exit 1
20326fi
20327
20328# Unset variables that we do not need and which cause bugs (e.g. in
20329# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
20330# suppresses any "Segmentation fault" message there. '((' could
20331# trigger a bug in pdksh 5.2.14.
20332for as_var in BASH_ENV ENV MAIL MAILPATH
20333do eval test x\${$as_var+set} = xset \
20334 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
20335done
20336PS1='$ '
20337PS2='> '
20338PS4='+ '
20339
20340# NLS nuisances.
20341LC_ALL=C
20342export LC_ALL
20343LANGUAGE=C
20344export LANGUAGE
20345
20346# CDPATH.
20347(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
20348
20349
20350# as_fn_error ERROR [LINENO LOG_FD]
20351# ---------------------------------
20352# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
20353# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
20354# script with status $?, using 1 if that was 0.
20355as_fn_error ()
20356{
20357 as_status=$?; test $as_status -eq 0 && as_status=1
20358 if test "$3"; then
20359 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
20360 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
20361 fi
20362 $as_echo "$as_me: error: $1" >&2
20363 as_fn_exit $as_status
20364} # as_fn_error
20365
20366
20367# as_fn_set_status STATUS
20368# -----------------------
20369# Set $? to STATUS, without forking.
20370as_fn_set_status ()
20371{
20372 return $1
20373} # as_fn_set_status
20374
20375# as_fn_exit STATUS
20376# -----------------
20377# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
20378as_fn_exit ()
20379{
20380 set +e
20381 as_fn_set_status $1
20382 exit $1
20383} # as_fn_exit
20384
20385# as_fn_unset VAR
20386# ---------------
20387# Portably unset VAR.
20388as_fn_unset ()
20389{
20390 { eval $1=; unset $1;}
20391}
20392as_unset=as_fn_unset
20393# as_fn_append VAR VALUE
20394# ----------------------
20395# Append the text in VALUE to the end of the definition contained in VAR. Take
20396# advantage of any shell optimizations that allow amortized linear growth over
20397# repeated appends, instead of the typical quadratic growth present in naive
20398# implementations.
20399if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
20400 eval 'as_fn_append ()
20401 {
20402 eval $1+=\$2
20403 }'
20404else
20405 as_fn_append ()
20406 {
20407 eval $1=\$$1\$2
20408 }
20409fi # as_fn_append
20410
20411# as_fn_arith ARG...
20412# ------------------
20413# Perform arithmetic evaluation on the ARGs, and store the result in the
20414# global $as_val. Take advantage of shells that can avoid forks. The arguments
20415# must be portable across $(()) and expr.
20416if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
20417 eval 'as_fn_arith ()
20418 {
20419 as_val=$(( $* ))
20420 }'
20421else
20422 as_fn_arith ()
20423 {
20424 as_val=`expr "$@" || test $? -eq 1`
20425 }
20426fi # as_fn_arith
20427
20428
20429if expr a : '\(a\)' >/dev/null 2>&1 &&
20430 test "X`expr 00001 : '.*\(...\)'`" = X001; then
20431 as_expr=expr
20432else
20433 as_expr=false
20434fi
20435
20436if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
20437 as_basename=basename
20438else
20439 as_basename=false
20440fi
20441
20442if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
20443 as_dirname=dirname
20444else
20445 as_dirname=false
20446fi
20447
20448as_me=`$as_basename -- "$0" ||
20449$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20450 X"$0" : 'X\(//\)$' \| \
20451 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
20452$as_echo X/"$0" |
20453 sed '/^.*\/\([^/][^/]*\)\/*$/{
20454 s//\1/
20455 q
20456 }
20457 /^X\/\(\/\/\)$/{
20458 s//\1/
20459 q
20460 }
20461 /^X\/\(\/\).*/{
20462 s//\1/
20463 q
20464 }
20465 s/.*/./; q'`
20466
20467# Avoid depending upon Character Ranges.
20468as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20469as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20470as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20471as_cr_digits='0123456789'
20472as_cr_alnum=$as_cr_Letters$as_cr_digits
20473
20474ECHO_C= ECHO_N= ECHO_T=
20475case `echo -n x` in #(((((
20476-n*)
20477 case `echo 'xy\c'` in
20478 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
20479 xy) ECHO_C='\c';;
20480 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
20481 ECHO_T=' ';;
20482 esac;;
20483*)
20484 ECHO_N='-n';;
20485esac
20486
20487rm -f conf$$ conf$$.exe conf$$.file
20488if test -d conf$$.dir; then
20489 rm -f conf$$.dir/conf$$.file
20490else
20491 rm -f conf$$.dir
20492 mkdir conf$$.dir 2>/dev/null
20493fi
20494if (echo >conf$$.file) 2>/dev/null; then
20495 if ln -s conf$$.file conf$$ 2>/dev/null; then
20496 as_ln_s='ln -s'
20497 # ... but there are two gotchas:
20498 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20499 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
20500 # In both cases, we have to default to `cp -p'.
20501 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
20502 as_ln_s='cp -p'
20503 elif ln conf$$.file conf$$ 2>/dev/null; then
20504 as_ln_s=ln
20505 else
20506 as_ln_s='cp -p'
20507 fi
20508else
20509 as_ln_s='cp -p'
20510fi
20511rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20512rmdir conf$$.dir 2>/dev/null
20513
20514
20515# as_fn_mkdir_p
20516# -------------
20517# Create "$as_dir" as a directory, including parents if necessary.
20518as_fn_mkdir_p ()
20519{
20520
20521 case $as_dir in #(
20522 -*) as_dir=./$as_dir;;
20523 esac
20524 test -d "$as_dir" || eval $as_mkdir_p || {
20525 as_dirs=
20526 while :; do
20527 case $as_dir in #(
20528 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
20529 *) as_qdir=$as_dir;;
20530 esac
20531 as_dirs="'$as_qdir' $as_dirs"
20532 as_dir=`$as_dirname -- "$as_dir" ||
20533$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20534 X"$as_dir" : 'X\(//\)[^/]' \| \
20535 X"$as_dir" : 'X\(//\)$' \| \
20536 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
20537$as_echo X"$as_dir" |
20538 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20539 s//\1/
20540 q
20541 }
20542 /^X\(\/\/\)[^/].*/{
20543 s//\1/
20544 q
20545 }
20546 /^X\(\/\/\)$/{
20547 s//\1/
20548 q
20549 }
20550 /^X\(\/\).*/{
20551 s//\1/
20552 q
20553 }
20554 s/.*/./; q'`
20555 test -d "$as_dir" && break
20556 done
20557 test -z "$as_dirs" || eval "mkdir $as_dirs"
20558 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
20559
20560
20561} # as_fn_mkdir_p
20562if mkdir -p . 2>/dev/null; then
20563 as_mkdir_p='mkdir -p "$as_dir"'
20564else
20565 test -d ./-p && rmdir ./-p
20566 as_mkdir_p=false
20567fi
20568
20569if test -x / >/dev/null 2>&1; then
20570 as_test_x='test -x'
20571else
20572 if ls -dL / >/dev/null 2>&1; then
20573 as_ls_L_option=L
20574 else
20575 as_ls_L_option=
20576 fi
20577 as_test_x='
20578 eval sh -c '\''
20579 if test -d "$1"; then
20580 test -d "$1/.";
20581 else
20582 case $1 in #(
20583 -*)set "./$1";;
20584 esac;
20585 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
20586 ???[sx]*):;;*)false;;esac;fi
20587 '\'' sh
20588 '
20589fi
20590as_executable_p=$as_test_x
20591
20592# Sed expression to map a string onto a valid CPP name.
20593as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20594
20595# Sed expression to map a string onto a valid variable name.
20596as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20597
20598
20599exec 6>&1
20600## ----------------------------------- ##
20601## Main body of $CONFIG_STATUS script. ##
20602## ----------------------------------- ##
20603_ASEOF
20604test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
20605
20606cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20607# Save the log message, to keep $0 and so on meaningful, and to
20608# report actual input values of CONFIG_FILES etc. instead of their
20609# values after options handling.
20610ac_log="
20611This file was extended by $as_me, which was
20612generated by GNU Autoconf 2.64. Invocation command line was
20613
20614 CONFIG_FILES = $CONFIG_FILES
20615 CONFIG_HEADERS = $CONFIG_HEADERS
20616 CONFIG_LINKS = $CONFIG_LINKS
20617 CONFIG_COMMANDS = $CONFIG_COMMANDS
20618 $ $0 $@
20619
20620on `(hostname || uname -n) 2>/dev/null | sed 1q`
20621"
20622
20623_ACEOF
20624
20625case $ac_config_files in *"
20626"*) set x $ac_config_files; shift; ac_config_files=$*;;
20627esac
20628
20629case $ac_config_headers in *"
20630"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
20631esac
20632
20633
20634cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20635# Files that config.status was made for.
20636config_files="$ac_config_files"
20637config_headers="$ac_config_headers"
20638config_commands="$ac_config_commands"
20639
20640_ACEOF
20641
20642cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20643ac_cs_usage="\
20644\`$as_me' instantiates files and other configuration actions
20645from templates according to the current configuration. Unless the files
20646and actions are specified as TAGs, all are instantiated by default.
20647
20648Usage: $0 [OPTION]... [TAG]...
20649
20650 -h, --help print this help, then exit
20651 -V, --version print version number and configuration settings, then exit
20652 -q, --quiet, --silent
20653 do not print progress messages
20654 -d, --debug don't remove temporary files
20655 --recheck update $as_me by reconfiguring in the same conditions
20656 --file=FILE[:TEMPLATE]
20657 instantiate the configuration file FILE
20658 --header=FILE[:TEMPLATE]
20659 instantiate the configuration header FILE
20660
20661Configuration files:
20662$config_files
20663
20664Configuration headers:
20665$config_headers
20666
20667Configuration commands:
20668$config_commands
20669
20670Report bugs to the package provider."
20671
20672_ACEOF
20673cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20674ac_cs_version="\\
20675config.status
20676configured by $0, generated by GNU Autoconf 2.64,
20677 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
20678
20679Copyright (C) 2009 Free Software Foundation, Inc.
20680This config.status script is free software; the Free Software Foundation
20681gives unlimited permission to copy, distribute and modify it."
20682
20683ac_pwd='$ac_pwd'
20684srcdir='$srcdir'
20685INSTALL='$INSTALL'
20686MKDIR_P='$MKDIR_P'
20687AWK='$AWK'
20688test -n "\$AWK" || AWK=awk
20689_ACEOF
20690
20691cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20692# The default lists apply if the user does not specify any file.
20693ac_need_defaults=:
20694while test $# != 0
20695do
20696 case $1 in
20697 --*=*)
20698 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20699 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20700 ac_shift=:
20701 ;;
20702 *)
20703 ac_option=$1
20704 ac_optarg=$2
20705 ac_shift=shift
20706 ;;
20707 esac
20708
20709 case $ac_option in
20710 # Handling of the options.
20711 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20712 ac_cs_recheck=: ;;
20713 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20714 $as_echo "$ac_cs_version"; exit ;;
20715 --debug | --debu | --deb | --de | --d | -d )
20716 debug=: ;;
20717 --file | --fil | --fi | --f )
20718 $ac_shift
20719 case $ac_optarg in
20720 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20721 esac
20722 as_fn_append CONFIG_FILES " '$ac_optarg'"
20723 ac_need_defaults=false;;
20724 --header | --heade | --head | --hea )
20725 $ac_shift
20726 case $ac_optarg in
20727 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20728 esac
20729 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
20730 ac_need_defaults=false;;
20731 --he | --h)
20732 # Conflict between --help and --header
20733 as_fn_error "ambiguous option: \`$1'
20734Try \`$0 --help' for more information.";;
20735 --help | --hel | -h )
20736 $as_echo "$ac_cs_usage"; exit ;;
20737 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20738 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20739 ac_cs_silent=: ;;
20740
20741 # This is an error.
20742 -*) as_fn_error "unrecognized option: \`$1'
20743Try \`$0 --help' for more information." ;;
20744
20745 *) as_fn_append ac_config_targets " $1"
20746 ac_need_defaults=false ;;
20747
20748 esac
20749 shift
20750done
20751
20752ac_configure_extra_args=
20753
20754if $ac_cs_silent; then
20755 exec 6>/dev/null
20756 ac_configure_extra_args="$ac_configure_extra_args --silent"
20757fi
20758
20759_ACEOF
20760cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20761if \$ac_cs_recheck; then
20762 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20763 shift
20764 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20765 CONFIG_SHELL='$SHELL'
20766 export CONFIG_SHELL
20767 exec "\$@"
20768fi
20769
20770_ACEOF
20771cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20772exec 5>>config.log
20773{
20774 echo
20775 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20776## Running $as_me. ##
20777_ASBOX
20778 $as_echo "$ac_log"
20779} >&5
20780
20781_ACEOF
20782cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20783#
20784# INIT-COMMANDS
20785#
20786AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
20787
20788_ACEOF
20789
20790cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20791
20792# Handling of arguments.
20793for ac_config_target in $ac_config_targets
20794do
20795 case $ac_config_target in
20796 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
20797 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
20798 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20799 "import/Makefile") CONFIG_FILES="$CONFIG_FILES import/Makefile" ;;
20800 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
20801
20802 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20803 esac
20804done
20805
20806
20807# If the user did not use the arguments to specify the items to instantiate,
20808# then the envvar interface is used. Set only those that are not.
20809# We use the long form for the default assignment because of an extremely
20810# bizarre bug on SunOS 4.1.3.
20811if $ac_need_defaults; then
20812 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20813 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20814 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20815fi
20816
20817# Have a temporary directory for convenience. Make it in the build tree
20818# simply because there is no reason against having it here, and in addition,
20819# creating and moving files from /tmp can sometimes cause problems.
20820# Hook for its removal unless debugging.
20821# Note that there is a small window in which the directory will not be cleaned:
20822# after its creation but before its name has been assigned to `$tmp'.
20823$debug ||
20824{
20825 tmp=
20826 trap 'exit_status=$?
20827 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
20828' 0
20829 trap 'as_fn_exit 1' 1 2 13 15
20830}
20831# Create a (secure) tmp directory for tmp files.
20832
20833{
20834 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20835 test -n "$tmp" && test -d "$tmp"
20836} ||
20837{
20838 tmp=./conf$$-$RANDOM
20839 (umask 077 && mkdir "$tmp")
20840} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
20841
20842# Set up the scripts for CONFIG_FILES section.
20843# No need to generate them if there are no CONFIG_FILES.
20844# This happens for instance with `./config.status config.h'.
20845if test -n "$CONFIG_FILES"; then
20846
20847
20848ac_cr=`echo X | tr X '\015'`
20849# On cygwin, bash can eat \r inside `` if the user requested igncr.
20850# But we know of no other shell where ac_cr would be empty at this
20851# point, so we can use a bashism as a fallback.
20852if test "x$ac_cr" = x; then
20853 eval ac_cr=\$\'\\r\'
20854fi
20855ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20856if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20857 ac_cs_awk_cr='\r'
20858else
20859 ac_cs_awk_cr=$ac_cr
20860fi
20861
20862echo 'BEGIN {' >"$tmp/subs1.awk" &&
20863_ACEOF
20864
20865
20866{
20867 echo "cat >conf$$subs.awk <<_ACEOF" &&
20868 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20869 echo "_ACEOF"
20870} >conf$$subs.sh ||
20871 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
20872ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
20873ac_delim='%!_!# '
20874for ac_last_try in false false false false false :; do
20875 . ./conf$$subs.sh ||
20876 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
20877
20878 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20879 if test $ac_delim_n = $ac_delim_num; then
20880 break
20881 elif $ac_last_try; then
20882 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
20883 else
20884 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20885 fi
20886done
20887rm -f conf$$subs.sh
20888
20889cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20890cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
20891_ACEOF
20892sed -n '
20893h
20894s/^/S["/; s/!.*/"]=/
20895p
20896g
20897s/^[^!]*!//
20898:repl
20899t repl
20900s/'"$ac_delim"'$//
20901t delim
20902:nl
20903h
20904s/\(.\{148\}\).*/\1/
20905t more1
20906s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20907p
20908n
20909b repl
20910:more1
20911s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20912p
20913g
20914s/.\{148\}//
20915t nl
20916:delim
20917h
20918s/\(.\{148\}\).*/\1/
20919t more2
20920s/["\\]/\\&/g; s/^/"/; s/$/"/
20921p
20922b
20923:more2
20924s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20925p
20926g
20927s/.\{148\}//
20928t delim
20929' <conf$$subs.awk | sed '
20930/^[^""]/{
20931 N
20932 s/\n//
20933}
20934' >>$CONFIG_STATUS || ac_write_fail=1
20935rm -f conf$$subs.awk
20936cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20937_ACAWK
20938cat >>"\$tmp/subs1.awk" <<_ACAWK &&
20939 for (key in S) S_is_set[key] = 1
20940 FS = "\a"
20941
20942}
20943{
20944 line = $ 0
20945 nfields = split(line, field, "@")
20946 substed = 0
20947 len = length(field[1])
20948 for (i = 2; i < nfields; i++) {
20949 key = field[i]
20950 keylen = length(key)
20951 if (S_is_set[key]) {
20952 value = S[key]
20953 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20954 len += length(value) + length(field[++i])
20955 substed = 1
20956 } else
20957 len += 1 + keylen
20958 }
20959
20960 print line
20961}
20962
20963_ACAWK
20964_ACEOF
20965cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20966if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20967 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20968else
20969 cat
20970fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
20971 || as_fn_error "could not setup config files machinery" "$LINENO" 5
20972_ACEOF
20973
20974# VPATH may cause trouble with some makes, so we remove $(srcdir),
20975# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20976# trailing colons and then remove the whole line if VPATH becomes empty
20977# (actually we leave an empty line to preserve line numbers).
20978if test "x$srcdir" = x.; then
20979 ac_vpsub='/^[ ]*VPATH[ ]*=/{
20980s/:*\$(srcdir):*/:/
20981s/:*\${srcdir}:*/:/
20982s/:*@srcdir@:*/:/
20983s/^\([^=]*=[ ]*\):*/\1/
20984s/:*$//
20985s/^[^=]*=[ ]*$//
20986}'
20987fi
20988
20989cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20990fi # test -n "$CONFIG_FILES"
20991
20992# Set up the scripts for CONFIG_HEADERS section.
20993# No need to generate them if there are no CONFIG_HEADERS.
20994# This happens for instance with `./config.status Makefile'.
20995if test -n "$CONFIG_HEADERS"; then
20996cat >"$tmp/defines.awk" <<\_ACAWK ||
20997BEGIN {
20998_ACEOF
20999
21000# Transform confdefs.h into an awk script `defines.awk', embedded as
21001# here-document in config.status, that substitutes the proper values into
21002# config.h.in to produce config.h.
21003
21004# Create a delimiter string that does not exist in confdefs.h, to ease
21005# handling of long lines.
21006ac_delim='%!_!# '
21007for ac_last_try in false false :; do
21008 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
21009 if test -z "$ac_t"; then
21010 break
21011 elif $ac_last_try; then
21012 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
21013 else
21014 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
21015 fi
21016done
21017
21018# For the awk script, D is an array of macro values keyed by name,
21019# likewise P contains macro parameters if any. Preserve backslash
21020# newline sequences.
21021
21022ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
21023sed -n '
21024s/.\{148\}/&'"$ac_delim"'/g
21025t rset
21026:rset
21027s/^[ ]*#[ ]*define[ ][ ]*/ /
21028t def
21029d
21030:def
21031s/\\$//
21032t bsnl
21033s/["\\]/\\&/g
21034s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
21035D["\1"]=" \3"/p
21036s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
21037d
21038:bsnl
21039s/["\\]/\\&/g
21040s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
21041D["\1"]=" \3\\\\\\n"\\/p
21042t cont
21043s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
21044t cont
21045d
21046:cont
21047n
21048s/.\{148\}/&'"$ac_delim"'/g
21049t clear
21050:clear
21051s/\\$//
21052t bsnlc
21053s/["\\]/\\&/g; s/^/"/; s/$/"/p
21054d
21055:bsnlc
21056s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
21057b cont
21058' <confdefs.h | sed '
21059s/'"$ac_delim"'/"\\\
21060"/g' >>$CONFIG_STATUS || ac_write_fail=1
21061
21062cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21063 for (key in D) D_is_set[key] = 1
21064 FS = "\a"
21065}
21066/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
21067 line = \$ 0
21068 split(line, arg, " ")
21069 if (arg[1] == "#") {
21070 defundef = arg[2]
21071 mac1 = arg[3]
21072 } else {
21073 defundef = substr(arg[1], 2)
21074 mac1 = arg[2]
21075 }
21076 split(mac1, mac2, "(") #)
21077 macro = mac2[1]
21078 prefix = substr(line, 1, index(line, defundef) - 1)
21079 if (D_is_set[macro]) {
21080 # Preserve the white space surrounding the "#".
21081 print prefix "define", macro P[macro] D[macro]
21082 next
21083 } else {
21084 # Replace #undef with comments. This is necessary, for example,
21085 # in the case of _POSIX_SOURCE, which is predefined and required
21086 # on some systems where configure will not decide to define it.
21087 if (defundef == "undef") {
21088 print "/*", prefix defundef, macro, "*/"
21089 next
21090 }
21091 }
21092}
21093{ print }
21094_ACAWK
21095_ACEOF
21096cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21097 as_fn_error "could not setup config headers machinery" "$LINENO" 5
21098fi # test -n "$CONFIG_HEADERS"
21099
21100
21101eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
21102shift
21103for ac_tag
21104do
21105 case $ac_tag in
21106 :[FHLC]) ac_mode=$ac_tag; continue;;
21107 esac
21108 case $ac_mode$ac_tag in
21109 :[FHL]*:*);;
21110 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
21111 :[FH]-) ac_tag=-:-;;
21112 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
21113 esac
21114 ac_save_IFS=$IFS
21115 IFS=:
21116 set x $ac_tag
21117 IFS=$ac_save_IFS
21118 shift
21119 ac_file=$1
21120 shift
21121
21122 case $ac_mode in
21123 :L) ac_source=$1;;
21124 :[FH])
21125 ac_file_inputs=
21126 for ac_f
21127 do
21128 case $ac_f in
21129 -) ac_f="$tmp/stdin";;
21130 *) # Look for the file first in the build tree, then in the source tree
21131 # (if the path is not absolute). The absolute path cannot be DOS-style,
21132 # because $ac_f cannot contain `:'.
21133 test -f "$ac_f" ||
21134 case $ac_f in
21135 [\\/$]*) false;;
21136 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
21137 esac ||
21138 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
21139 esac
21140 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
21141 as_fn_append ac_file_inputs " '$ac_f'"
21142 done
21143
21144 # Let's still pretend it is `configure' which instantiates (i.e., don't
21145 # use $as_me), people would be surprised to read:
21146 # /* config.h. Generated by config.status. */
21147 configure_input='Generated from '`
21148 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
21149 `' by configure.'
21150 if test x"$ac_file" != x-; then
21151 configure_input="$ac_file. $configure_input"
21152 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
21153$as_echo "$as_me: creating $ac_file" >&6;}
21154 fi
21155 # Neutralize special characters interpreted by sed in replacement strings.
21156 case $configure_input in #(
21157 *\&* | *\|* | *\\* )
21158 ac_sed_conf_input=`$as_echo "$configure_input" |
21159 sed 's/[\\\\&|]/\\\\&/g'`;; #(
21160 *) ac_sed_conf_input=$configure_input;;
21161 esac
21162
21163 case $ac_tag in
21164 *:-:* | *:-) cat >"$tmp/stdin" \
21165 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
21166 esac
21167 ;;
21168 esac
21169
21170 ac_dir=`$as_dirname -- "$ac_file" ||
21171$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21172 X"$ac_file" : 'X\(//\)[^/]' \| \
21173 X"$ac_file" : 'X\(//\)$' \| \
21174 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
21175$as_echo X"$ac_file" |
21176 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21177 s//\1/
21178 q
21179 }
21180 /^X\(\/\/\)[^/].*/{
21181 s//\1/
21182 q
21183 }
21184 /^X\(\/\/\)$/{
21185 s//\1/
21186 q
21187 }
21188 /^X\(\/\).*/{
21189 s//\1/
21190 q
21191 }
21192 s/.*/./; q'`
21193 as_dir="$ac_dir"; as_fn_mkdir_p
21194 ac_builddir=.
21195
21196case "$ac_dir" in
21197.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21198*)
21199 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
21200 # A ".." for each directory in $ac_dir_suffix.
21201 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
21202 case $ac_top_builddir_sub in
21203 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21204 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21205 esac ;;
21206esac
21207ac_abs_top_builddir=$ac_pwd
21208ac_abs_builddir=$ac_pwd$ac_dir_suffix
21209# for backward compatibility:
21210ac_top_builddir=$ac_top_build_prefix
21211
21212case $srcdir in
21213 .) # We are building in place.
21214 ac_srcdir=.
21215 ac_top_srcdir=$ac_top_builddir_sub
21216 ac_abs_top_srcdir=$ac_pwd ;;
21217 [\\/]* | ?:[\\/]* ) # Absolute name.
21218 ac_srcdir=$srcdir$ac_dir_suffix;
21219 ac_top_srcdir=$srcdir
21220 ac_abs_top_srcdir=$srcdir ;;
21221 *) # Relative name.
21222 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21223 ac_top_srcdir=$ac_top_build_prefix$srcdir
21224 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
21225esac
21226ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
21227
21228
21229 case $ac_mode in
21230 :F)
21231 #
21232 # CONFIG_FILE
21233 #
21234
21235 case $INSTALL in
21236 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21237 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
21238 esac
21239 ac_MKDIR_P=$MKDIR_P
21240 case $MKDIR_P in
21241 [\\/$]* | ?:[\\/]* ) ;;
21242 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
21243 esac
21244_ACEOF
21245
21246cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21247# If the template does not know about datarootdir, expand it.
21248# FIXME: This hack should be removed a few years after 2.60.
21249ac_datarootdir_hack=; ac_datarootdir_seen=
21250ac_sed_dataroot='
21251/datarootdir/ {
21252 p
21253 q
21254}
21255/@datadir@/p
21256/@docdir@/p
21257/@infodir@/p
21258/@localedir@/p
21259/@mandir@/p'
21260case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
21261*datarootdir*) ac_datarootdir_seen=yes;;
21262*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
21263 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
21264$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
21265_ACEOF
21266cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21267 ac_datarootdir_hack='
21268 s&@datadir@&$datadir&g
21269 s&@docdir@&$docdir&g
21270 s&@infodir@&$infodir&g
21271 s&@localedir@&$localedir&g
21272 s&@mandir@&$mandir&g
21273 s&\\\${datarootdir}&$datarootdir&g' ;;
21274esac
21275_ACEOF
21276
21277# Neutralize VPATH when `$srcdir' = `.'.
21278# Shell code in configure.ac might set extrasub.
21279# FIXME: do we really want to maintain this feature?
21280cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21281ac_sed_extra="$ac_vpsub
21282$extrasub
21283_ACEOF
21284cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21285:t
21286/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21287s|@configure_input@|$ac_sed_conf_input|;t t
21288s&@top_builddir@&$ac_top_builddir_sub&;t t
21289s&@top_build_prefix@&$ac_top_build_prefix&;t t
21290s&@srcdir@&$ac_srcdir&;t t
21291s&@abs_srcdir@&$ac_abs_srcdir&;t t
21292s&@top_srcdir@&$ac_top_srcdir&;t t
21293s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
21294s&@builddir@&$ac_builddir&;t t
21295s&@abs_builddir@&$ac_abs_builddir&;t t
21296s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
21297s&@INSTALL@&$ac_INSTALL&;t t
21298s&@MKDIR_P@&$ac_MKDIR_P&;t t
21299$ac_datarootdir_hack
21300"
21301eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
21302 || as_fn_error "could not create $ac_file" "$LINENO" 5
21303
21304test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
21305 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
21306 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
21307 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21308which seems to be undefined. Please make sure it is defined." >&5
21309$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21310which seems to be undefined. Please make sure it is defined." >&2;}
21311
21312 rm -f "$tmp/stdin"
21313 case $ac_file in
21314 -) cat "$tmp/out" && rm -f "$tmp/out";;
21315 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
21316 esac \
21317 || as_fn_error "could not create $ac_file" "$LINENO" 5
21318 ;;
21319 :H)
21320 #
21321 # CONFIG_HEADER
21322 #
21323 if test x"$ac_file" != x-; then
21324 {
21325 $as_echo "/* $configure_input */" \
21326 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
21327 } >"$tmp/config.h" \
21328 || as_fn_error "could not create $ac_file" "$LINENO" 5
21329 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
21330 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
21331$as_echo "$as_me: $ac_file is unchanged" >&6;}
21332 else
21333 rm -f "$ac_file"
21334 mv "$tmp/config.h" "$ac_file" \
21335 || as_fn_error "could not create $ac_file" "$LINENO" 5
21336 fi
21337 else
21338 $as_echo "/* $configure_input */" \
21339 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
21340 || as_fn_error "could not create -" "$LINENO" 5
21341 fi
21342# Compute "$ac_file"'s index in $config_headers.
21343_am_arg="$ac_file"
21344_am_stamp_count=1
21345for _am_header in $config_headers :; do
21346 case $_am_header in
21347 $_am_arg | $_am_arg:* )
21348 break ;;
21349 * )
21350 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
21351 esac
21352done
21353echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
21354$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21355 X"$_am_arg" : 'X\(//\)[^/]' \| \
21356 X"$_am_arg" : 'X\(//\)$' \| \
21357 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
21358$as_echo X"$_am_arg" |
21359 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21360 s//\1/
21361 q
21362 }
21363 /^X\(\/\/\)[^/].*/{
21364 s//\1/
21365 q
21366 }
21367 /^X\(\/\/\)$/{
21368 s//\1/
21369 q
21370 }
21371 /^X\(\/\).*/{
21372 s//\1/
21373 q
21374 }
21375 s/.*/./; q'`/stamp-h$_am_stamp_count
21376 ;;
21377
21378 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
21379$as_echo "$as_me: executing $ac_file commands" >&6;}
21380 ;;
21381 esac
21382
21383
21384 case $ac_file$ac_mode in
21385 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
21386 # Autoconf 2.62 quotes --file arguments for eval, but not when files
21387 # are listed without --file. Let's play safe and only enable the eval
21388 # if we detect the quoting.
21389 case $CONFIG_FILES in
21390 *\'*) eval set x "$CONFIG_FILES" ;;
21391 *) set x $CONFIG_FILES ;;
21392 esac
21393 shift
21394 for mf
21395 do
21396 # Strip MF so we end up with the name of the file.
21397 mf=`echo "$mf" | sed -e 's/:.*$//'`
21398 # Check whether this is an Automake generated Makefile or not.
21399 # We used to match only the files named `Makefile.in', but
21400 # some people rename them; so instead we look at the file content.
21401 # Grep'ing the first line is not enough: some people post-process
21402 # each Makefile.in and add a new line on top of each file to say so.
21403 # Grep'ing the whole file is not good either: AIX grep has a line
21404 # limit of 2048, but all sed's we know have understand at least 4000.
21405 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
21406 dirpart=`$as_dirname -- "$mf" ||
21407$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21408 X"$mf" : 'X\(//\)[^/]' \| \
21409 X"$mf" : 'X\(//\)$' \| \
21410 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
21411$as_echo X"$mf" |
21412 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21413 s//\1/
21414 q
21415 }
21416 /^X\(\/\/\)[^/].*/{
21417 s//\1/
21418 q
21419 }
21420 /^X\(\/\/\)$/{
21421 s//\1/
21422 q
21423 }
21424 /^X\(\/\).*/{
21425 s//\1/
21426 q
21427 }
21428 s/.*/./; q'`
21429 else
21430 continue
21431 fi
21432 # Extract the definition of DEPDIR, am__include, and am__quote
21433 # from the Makefile without running `make'.
21434 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
21435 test -z "$DEPDIR" && continue
21436 am__include=`sed -n 's/^am__include = //p' < "$mf"`
21437 test -z "am__include" && continue
21438 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
21439 # When using ansi2knr, U may be empty or an underscore; expand it
21440 U=`sed -n 's/^U = //p' < "$mf"`
21441 # Find all dependency output files, they are included files with
21442 # $(DEPDIR) in their names. We invoke sed twice because it is the
21443 # simplest approach to changing $(DEPDIR) to its actual value in the
21444 # expansion.
21445 for file in `sed -n "
21446 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
21447 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
21448 # Make sure the directory exists.
21449 test -f "$dirpart/$file" && continue
21450 fdir=`$as_dirname -- "$file" ||
21451$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21452 X"$file" : 'X\(//\)[^/]' \| \
21453 X"$file" : 'X\(//\)$' \| \
21454 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
21455$as_echo X"$file" |
21456 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21457 s//\1/
21458 q
21459 }
21460 /^X\(\/\/\)[^/].*/{
21461 s//\1/
21462 q
21463 }
21464 /^X\(\/\/\)$/{
21465 s//\1/
21466 q
21467 }
21468 /^X\(\/\).*/{
21469 s//\1/
21470 q
21471 }
21472 s/.*/./; q'`
21473 as_dir=$dirpart/$fdir; as_fn_mkdir_p
21474 # echo "creating $dirpart/$file"
21475 echo '# dummy' > "$dirpart/$file"
21476 done
21477 done
21478}
21479 ;;
21480 "default":C)
21481case x$CONFIG_HEADERS in
21482xconfig.h:config.in)
21483echo > stamp-h ;;
21484esac
21485 ;;
21486
21487 esac
21488done # for ac_tag
21489
21490
21491as_fn_exit 0
21492_ACEOF
21493ac_clean_files=$ac_clean_files_save
21494
21495test $ac_write_fail = 0 ||
21496 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
21497
21498
21499# configure is writing to config.log, and then calls config.status.
21500# config.status does its own redirection, appending to config.log.
21501# Unfortunately, on DOS this fails, as config.log is still kept open
21502# by configure, so config.status won't be able to write to it; its
21503# output is simply discarded. So we exec the FD to /dev/null,
21504# effectively closing config.log, so it can be properly (re)opened and
21505# appended to by config.status. When coming back to configure, we
21506# need to make the FD available again.
21507if test "$no_create" != yes; then
21508 ac_cs_success=:
21509 ac_config_status_args=
21510 test "$silent" = yes &&
21511 ac_config_status_args="$ac_config_status_args --quiet"
21512 exec 5>/dev/null
21513 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
21514 exec 5>>config.log
21515 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21516 # would make configure fail if this is the last instruction.
21517 $ac_cs_success || as_fn_exit $?
21518fi
21519if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
21520 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
21521$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
21522fi
21523
21524
21525exit 0
This page took 1.357784 seconds and 4 git commands to generate.