Remove no-longer applicable maintainer entries
[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 684MKDIR_P
2196f55f
YQ
685NEXT_AS_FIRST_DIRECTIVE_STRING_H
686NEXT_STRING_H
98399780
YQ
687NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
688NEXT_STDLIB_H
6a29c58e
YQ
689NEXT_AS_FIRST_DIRECTIVE_STDIO_H
690NEXT_STDIO_H
2196f55f
YQ
691NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
692NEXT_STDDEF_H
693GL_GENERATE_STDDEF_H_FALSE
694GL_GENERATE_STDDEF_H_TRUE
695STDDEF_H
696HAVE_WCHAR_T
4a626d0a 697HAVE_MAX_ALIGN_T
2196f55f
YQ
698REPLACE_NULL
699HAVE__BOOL
700GL_GENERATE_STDBOOL_H_FALSE
701GL_GENERATE_STDBOOL_H_TRUE
702STDBOOL_H
0750520d
PA
703NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
704NEXT_SIGNAL_H
705REPLACE_RAISE
706REPLACE_PTHREAD_SIGMASK
707HAVE_SIGHANDLER_T
708HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
709HAVE_STRUCT_SIGACTION_SA_SIGACTION
710HAVE_SIGACTION
711HAVE_SIGINFO_T
712HAVE_SIGSET_T
713HAVE_RAISE
714HAVE_PTHREAD_SIGMASK
715HAVE_POSIX_SIGNALBLOCKING
716GNULIB_SIGACTION
717GNULIB_SIGPROCMASK
718GNULIB_SIGNAL_H_SIGPIPE
719GNULIB_RAISE
720GNULIB_PTHREAD_SIGMASK
6a29c58e
YQ
721REPLACE_VSPRINTF
722REPLACE_VSNPRINTF
723REPLACE_VPRINTF
724REPLACE_VFPRINTF
725REPLACE_VDPRINTF
726REPLACE_VASPRINTF
727REPLACE_TMPFILE
728REPLACE_STDIO_WRITE_FUNCS
729REPLACE_STDIO_READ_FUNCS
730REPLACE_SPRINTF
731REPLACE_SNPRINTF
732REPLACE_RENAMEAT
733REPLACE_RENAME
734REPLACE_REMOVE
735REPLACE_PRINTF
736REPLACE_POPEN
737REPLACE_PERROR
738REPLACE_OBSTACK_PRINTF
739REPLACE_GETLINE
740REPLACE_GETDELIM
741REPLACE_FTELLO
742REPLACE_FTELL
743REPLACE_FSEEKO
744REPLACE_FSEEK
745REPLACE_FREOPEN
746REPLACE_FPURGE
747REPLACE_FPRINTF
748REPLACE_FOPEN
749REPLACE_FFLUSH
750REPLACE_FDOPEN
751REPLACE_FCLOSE
752REPLACE_DPRINTF
753HAVE_VDPRINTF
754HAVE_VASPRINTF
755HAVE_RENAMEAT
756HAVE_POPEN
757HAVE_PCLOSE
758HAVE_FTELLO
759HAVE_FSEEKO
760HAVE_DPRINTF
761HAVE_DECL_VSNPRINTF
762HAVE_DECL_SNPRINTF
763HAVE_DECL_OBSTACK_PRINTF
764HAVE_DECL_GETLINE
765HAVE_DECL_GETDELIM
766HAVE_DECL_FTELLO
767HAVE_DECL_FSEEKO
768HAVE_DECL_FPURGE
769GNULIB_VSPRINTF_POSIX
770GNULIB_VSNPRINTF
771GNULIB_VPRINTF_POSIX
772GNULIB_VPRINTF
773GNULIB_VFPRINTF_POSIX
774GNULIB_VFPRINTF
775GNULIB_VDPRINTF
776GNULIB_VSCANF
777GNULIB_VFSCANF
778GNULIB_VASPRINTF
779GNULIB_TMPFILE
780GNULIB_STDIO_H_SIGPIPE
781GNULIB_STDIO_H_NONBLOCKING
782GNULIB_SPRINTF_POSIX
783GNULIB_SNPRINTF
784GNULIB_SCANF
785GNULIB_RENAMEAT
786GNULIB_RENAME
787GNULIB_REMOVE
788GNULIB_PUTS
789GNULIB_PUTCHAR
790GNULIB_PUTC
791GNULIB_PRINTF_POSIX
792GNULIB_PRINTF
793GNULIB_POPEN
794GNULIB_PERROR
795GNULIB_PCLOSE
796GNULIB_OBSTACK_PRINTF_POSIX
797GNULIB_OBSTACK_PRINTF
798GNULIB_GETLINE
799GNULIB_GETDELIM
800GNULIB_GETCHAR
801GNULIB_GETC
802GNULIB_FWRITE
803GNULIB_FTELLO
804GNULIB_FTELL
805GNULIB_FSEEKO
806GNULIB_FSEEK
807GNULIB_FSCANF
808GNULIB_FREOPEN
809GNULIB_FREAD
810GNULIB_FPUTS
811GNULIB_FPUTC
812GNULIB_FPURGE
813GNULIB_FPRINTF_POSIX
814GNULIB_FPRINTF
815GNULIB_FOPEN
816GNULIB_FGETS
817GNULIB_FGETC
818GNULIB_FFLUSH
819GNULIB_FDOPEN
820GNULIB_FCLOSE
821GNULIB_DPRINTF
c971b7fa
PA
822UNDEFINE_STRTOK_R
823REPLACE_STRTOK_R
824REPLACE_STRSIGNAL
825REPLACE_STRNLEN
826REPLACE_STRNDUP
827REPLACE_STRNCAT
828REPLACE_STRERROR_R
829REPLACE_STRERROR
830REPLACE_STRCHRNUL
831REPLACE_STRCASESTR
832REPLACE_STRSTR
833REPLACE_STRDUP
834REPLACE_STPNCPY
835REPLACE_MEMMEM
836REPLACE_MEMCHR
837HAVE_STRVERSCMP
838HAVE_DECL_STRSIGNAL
839HAVE_DECL_STRERROR_R
840HAVE_DECL_STRTOK_R
841HAVE_STRCASESTR
842HAVE_STRSEP
843HAVE_STRPBRK
844HAVE_DECL_STRNLEN
845HAVE_DECL_STRNDUP
846HAVE_DECL_STRDUP
847HAVE_STRCHRNUL
848HAVE_STPNCPY
849HAVE_STPCPY
850HAVE_RAWMEMCHR
851HAVE_DECL_MEMRCHR
852HAVE_MEMPCPY
853HAVE_DECL_MEMMEM
854HAVE_MEMCHR
855HAVE_FFSLL
856HAVE_FFSL
857HAVE_MBSLEN
858GNULIB_STRVERSCMP
859GNULIB_STRSIGNAL
860GNULIB_STRERROR_R
861GNULIB_STRERROR
862GNULIB_MBSTOK_R
863GNULIB_MBSSEP
864GNULIB_MBSSPN
865GNULIB_MBSPBRK
866GNULIB_MBSCSPN
867GNULIB_MBSCASESTR
868GNULIB_MBSPCASECMP
869GNULIB_MBSNCASECMP
870GNULIB_MBSCASECMP
871GNULIB_MBSSTR
872GNULIB_MBSRCHR
873GNULIB_MBSCHR
874GNULIB_MBSNLEN
875GNULIB_MBSLEN
876GNULIB_STRTOK_R
877GNULIB_STRCASESTR
878GNULIB_STRSTR
879GNULIB_STRSEP
880GNULIB_STRPBRK
881GNULIB_STRNLEN
882GNULIB_STRNDUP
883GNULIB_STRNCAT
884GNULIB_STRDUP
885GNULIB_STRCHRNUL
886GNULIB_STPNCPY
887GNULIB_STPCPY
888GNULIB_RAWMEMCHR
889GNULIB_MEMRCHR
890GNULIB_MEMPCPY
891GNULIB_MEMMEM
892GNULIB_MEMCHR
893GNULIB_FFSLL
894GNULIB_FFSL
8690e634
JK
895LOCALE_FR
896LOCALE_FR_UTF8
897LOCALE_ZH_CN
898LOCALE_JA
899REPLACE_WCSWIDTH
900REPLACE_WCWIDTH
901REPLACE_WCSNRTOMBS
902REPLACE_WCSRTOMBS
903REPLACE_WCRTOMB
904REPLACE_MBSNRTOWCS
905REPLACE_MBSRTOWCS
906REPLACE_MBRLEN
907REPLACE_MBRTOWC
908REPLACE_MBSINIT
909REPLACE_WCTOB
910REPLACE_BTOWC
911REPLACE_MBSTATE_T
912HAVE_DECL_WCWIDTH
913HAVE_DECL_WCTOB
914HAVE_WCSWIDTH
915HAVE_WCSTOK
916HAVE_WCSSTR
917HAVE_WCSPBRK
918HAVE_WCSSPN
919HAVE_WCSCSPN
920HAVE_WCSRCHR
921HAVE_WCSCHR
922HAVE_WCSDUP
923HAVE_WCSXFRM
924HAVE_WCSCOLL
925HAVE_WCSNCASECMP
926HAVE_WCSCASECMP
927HAVE_WCSNCMP
928HAVE_WCSCMP
929HAVE_WCSNCAT
930HAVE_WCSCAT
931HAVE_WCPNCPY
932HAVE_WCSNCPY
933HAVE_WCPCPY
934HAVE_WCSCPY
935HAVE_WCSNLEN
936HAVE_WCSLEN
937HAVE_WMEMSET
938HAVE_WMEMMOVE
939HAVE_WMEMCPY
940HAVE_WMEMCMP
941HAVE_WMEMCHR
942HAVE_WCSNRTOMBS
943HAVE_WCSRTOMBS
944HAVE_WCRTOMB
945HAVE_MBSNRTOWCS
946HAVE_MBSRTOWCS
947HAVE_MBRLEN
948HAVE_MBRTOWC
949HAVE_MBSINIT
950HAVE_BTOWC
951GNULIB_WCSWIDTH
952GNULIB_WCSTOK
953GNULIB_WCSSTR
954GNULIB_WCSPBRK
955GNULIB_WCSSPN
956GNULIB_WCSCSPN
957GNULIB_WCSRCHR
958GNULIB_WCSCHR
959GNULIB_WCSDUP
960GNULIB_WCSXFRM
961GNULIB_WCSCOLL
962GNULIB_WCSNCASECMP
963GNULIB_WCSCASECMP
964GNULIB_WCSNCMP
965GNULIB_WCSCMP
966GNULIB_WCSNCAT
967GNULIB_WCSCAT
968GNULIB_WCPNCPY
969GNULIB_WCSNCPY
970GNULIB_WCPCPY
971GNULIB_WCSCPY
972GNULIB_WCSNLEN
973GNULIB_WCSLEN
974GNULIB_WMEMSET
975GNULIB_WMEMMOVE
976GNULIB_WMEMCPY
977GNULIB_WMEMCMP
978GNULIB_WMEMCHR
979GNULIB_WCWIDTH
980GNULIB_WCSNRTOMBS
981GNULIB_WCSRTOMBS
982GNULIB_WCRTOMB
983GNULIB_MBSNRTOWCS
984GNULIB_MBSRTOWCS
985GNULIB_MBRLEN
986GNULIB_MBRTOWC
987GNULIB_MBSINIT
988GNULIB_WCTOB
989GNULIB_BTOWC
88b48903
WN
990NEXT_AS_FIRST_DIRECTIVE_MATH_H
991NEXT_MATH_H
8690e634
JK
992LOCALCHARSET_TESTS_ENVIRONMENT
993GLIBC21
c971b7fa
PA
994NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
995NEXT_INTTYPES_H
996UINT64_MAX_EQ_ULONG_MAX
997UINT32_MAX_LT_UINTMAX_MAX
998PRIPTR_PREFIX
999PRI_MACROS_BROKEN
1000INT64_MAX_EQ_LONG_MAX
1001INT32_MAX_LT_INTMAX_MAX
4a626d0a 1002REPLACE_STRTOUMAX
c971b7fa
PA
1003REPLACE_STRTOIMAX
1004HAVE_DECL_STRTOUMAX
1005HAVE_DECL_STRTOIMAX
1006HAVE_DECL_IMAXDIV
1007HAVE_DECL_IMAXABS
1008GNULIB_STRTOUMAX
1009GNULIB_STRTOIMAX
1010GNULIB_IMAXDIV
1011GNULIB_IMAXABS
1012GL_GENERATE_STDINT_H_FALSE
1013GL_GENERATE_STDINT_H_TRUE
1014STDINT_H
49e4877c
PA
1015HAVE_SYS_INTTYPES_H
1016HAVE_SYS_BITYPES_H
1017HAVE_C99_STDINT_H
c971b7fa
PA
1018WINT_T_SUFFIX
1019WCHAR_T_SUFFIX
1020SIG_ATOMIC_T_SUFFIX
1021SIZE_T_SUFFIX
1022PTRDIFF_T_SUFFIX
1023HAVE_SIGNED_WINT_T
1024HAVE_SIGNED_WCHAR_T
1025HAVE_SIGNED_SIG_ATOMIC_T
1026BITSIZEOF_WINT_T
1027BITSIZEOF_WCHAR_T
1028BITSIZEOF_SIG_ATOMIC_T
1029BITSIZEOF_SIZE_T
1030BITSIZEOF_PTRDIFF_T
1031APPLE_UNIVERSAL_BUILD
c971b7fa
PA
1032HAVE_STDINT_H
1033NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1034NEXT_STDINT_H
c971b7fa
PA
1035HAVE_SYS_TYPES_H
1036HAVE_INTTYPES_H
1037HAVE_WCHAR_H
1038HAVE_UNSIGNED_LONG_LONG_INT
1039HAVE_LONG_LONG_INT
49e4877c
PA
1040GL_GENERATE_LIMITS_H_FALSE
1041GL_GENERATE_LIMITS_H_TRUE
1042LIMITS_H
1043NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
1044NEXT_LIMITS_H
6ec2e0f5
SDJ
1045HAVE_SYS_CDEFS_H
1046GL_GENERATE_GLOB_H_FALSE
1047GL_GENERATE_GLOB_H_TRUE
1048GLOB_H
4a626d0a
PA
1049NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1050NEXT_SYS_TIME_H
1051REPLACE_STRUCT_TIMEVAL
1052REPLACE_GETTIMEOFDAY
1053HAVE_TIMEZONE_T
1054HAVE_SYS_TIME_H
1055HAVE_STRUCT_TIMEVAL
1056HAVE_GETTIMEOFDAY
1057GNULIB_GETTIMEOFDAY
6ec2e0f5
SDJ
1058LTLIBINTL
1059LIBINTL
1060WINDOWS_64_BIT_ST_SIZE
1061NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1062NEXT_SYS_STAT_H
1063REPLACE_UTIMENSAT
1064REPLACE_STAT
1065REPLACE_MKNOD
1066REPLACE_MKFIFO
1067REPLACE_MKDIR
1068REPLACE_LSTAT
1069REPLACE_FUTIMENS
1070REPLACE_FSTATAT
1071REPLACE_FSTAT
1072HAVE_UTIMENSAT
1073HAVE_MKNODAT
1074HAVE_MKNOD
1075HAVE_MKFIFOAT
1076HAVE_MKFIFO
1077HAVE_MKDIRAT
1078HAVE_LSTAT
1079HAVE_LCHMOD
1080HAVE_FUTIMENS
1081HAVE_FSTATAT
1082HAVE_FCHMODAT
1083GNULIB_UTIMENSAT
1084GNULIB_STAT
1085GNULIB_MKNODAT
1086GNULIB_MKNOD
1087GNULIB_MKFIFOAT
1088GNULIB_MKFIFO
1089GNULIB_MKDIRAT
1090GNULIB_LSTAT
1091GNULIB_LCHMOD
1092GNULIB_FUTIMENS
1093GNULIB_FSTATAT
1094GNULIB_FSTAT
1095GNULIB_FCHMODAT
88b48903
WN
1096FREXPL_LIBM
1097HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1098FREXP_LIBM
1099REPLACE_TRUNCL
1100REPLACE_TRUNCF
1101REPLACE_TRUNC
1102REPLACE_SQRTL
1103REPLACE_SIGNBIT_USING_GCC
1104REPLACE_SIGNBIT
1105REPLACE_ROUNDL
1106REPLACE_ROUNDF
1107REPLACE_ROUND
1108REPLACE_REMAINDERL
1109REPLACE_REMAINDERF
1110REPLACE_REMAINDER
1111REPLACE_NAN
1112REPLACE_MODFL
1113REPLACE_MODFF
1114REPLACE_MODF
1115REPLACE_LOGBL
1116REPLACE_LOGBF
1117REPLACE_LOGB
1118REPLACE_LOG2L
1119REPLACE_LOG2F
1120REPLACE_LOG2
1121REPLACE_LOG1PL
1122REPLACE_LOG1PF
1123REPLACE_LOG1P
1124REPLACE_LOG10L
1125REPLACE_LOG10F
1126REPLACE_LOG10
1127REPLACE_LOGL
1128REPLACE_LOGF
1129REPLACE_LOG
1130REPLACE_LDEXPL
1131REPLACE_ISNAN
1132REPLACE_ISINF
1133REPLACE_ISFINITE
1134REPLACE_ILOGBF
1135REPLACE_ILOGB
1136REPLACE_HYPOTL
1137REPLACE_HYPOTF
1138REPLACE_HYPOT
1139REPLACE_HUGE_VAL
1140REPLACE_FREXPL
1141REPLACE_FREXP
1142REPLACE_FREXPF
1143REPLACE_FMODL
1144REPLACE_FMODF
1145REPLACE_FMOD
1146REPLACE_FMAL
1147REPLACE_FMAF
1148REPLACE_FMA
1149REPLACE_FLOORL
1150REPLACE_FLOORF
1151REPLACE_FLOOR
1152REPLACE_FABSL
1153REPLACE_EXP2L
1154REPLACE_EXP2
1155REPLACE_EXPM1F
1156REPLACE_EXPM1
1157REPLACE_CEILL
1158REPLACE_CEILF
1159REPLACE_CEIL
1160REPLACE_CBRTL
1161REPLACE_CBRTF
1162HAVE_DECL_TRUNCL
1163HAVE_DECL_TRUNCF
1164HAVE_DECL_TRUNC
1165HAVE_DECL_TANL
1166HAVE_DECL_SQRTL
1167HAVE_DECL_SINL
1168HAVE_DECL_ROUNDL
1169HAVE_DECL_ROUNDF
1170HAVE_DECL_ROUND
1171HAVE_DECL_RINTF
1172HAVE_DECL_REMAINDERL
1173HAVE_DECL_REMAINDER
1174HAVE_DECL_LOGB
1175HAVE_DECL_LOG2L
1176HAVE_DECL_LOG2F
1177HAVE_DECL_LOG2
1178HAVE_DECL_LOG10L
1179HAVE_DECL_LOGL
1180HAVE_DECL_LDEXPL
1181HAVE_DECL_FREXPL
1182HAVE_DECL_FLOORL
1183HAVE_DECL_FLOORF
1184HAVE_DECL_EXPM1L
1185HAVE_DECL_EXP2L
1186HAVE_DECL_EXP2F
1187HAVE_DECL_EXP2
1188HAVE_DECL_EXPL
1189HAVE_DECL_COSL
1190HAVE_DECL_COPYSIGNF
1191HAVE_DECL_CEILL
1192HAVE_DECL_CEILF
1193HAVE_DECL_CBRTL
1194HAVE_DECL_CBRTF
1195HAVE_DECL_ATANL
1196HAVE_DECL_ASINL
1197HAVE_DECL_ACOSL
1198HAVE_TANHF
1199HAVE_TANL
1200HAVE_TANF
1201HAVE_SQRTL
1202HAVE_SQRTF
1203HAVE_SINHF
1204HAVE_SINL
1205HAVE_SINF
1206HAVE_RINTL
1207HAVE_RINT
1208HAVE_REMAINDERF
1209HAVE_REMAINDER
1210HAVE_POWF
1211HAVE_MODFL
1212HAVE_MODFF
1213HAVE_LOGBL
1214HAVE_LOGBF
1215HAVE_LOG1PL
1216HAVE_LOG1PF
1217HAVE_LOG1P
1218HAVE_LOG10L
1219HAVE_LOG10F
1220HAVE_LOGL
1221HAVE_LOGF
1222HAVE_LDEXPF
1223HAVE_ISNANL
1224HAVE_ISNAND
1225HAVE_ISNANF
1226HAVE_ILOGBL
1227HAVE_ILOGBF
1228HAVE_ILOGB
1229HAVE_HYPOTL
1230HAVE_HYPOTF
1231HAVE_FREXPF
1232HAVE_FMODL
1233HAVE_FMODF
1234HAVE_FMAL
1235HAVE_FMAF
1236HAVE_FMA
1237HAVE_FABSL
1238HAVE_FABSF
1239HAVE_EXPM1F
1240HAVE_EXPM1
1241HAVE_EXPL
1242HAVE_EXPF
1243HAVE_COSHF
1244HAVE_COSL
1245HAVE_COSF
1246HAVE_COPYSIGNL
1247HAVE_COPYSIGN
1248HAVE_CBRTL
1249HAVE_CBRTF
1250HAVE_CBRT
1251HAVE_ATAN2F
1252HAVE_ATANL
1253HAVE_ATANF
1254HAVE_ASINL
1255HAVE_ASINF
1256HAVE_ACOSL
1257HAVE_ACOSF
1258GNULIB_TRUNCL
1259GNULIB_TRUNCF
1260GNULIB_TRUNC
1261GNULIB_TANHF
1262GNULIB_TANL
1263GNULIB_TANF
1264GNULIB_SQRTL
1265GNULIB_SQRTF
1266GNULIB_SINHF
1267GNULIB_SINL
1268GNULIB_SINF
1269GNULIB_SIGNBIT
1270GNULIB_ROUNDL
1271GNULIB_ROUNDF
1272GNULIB_ROUND
1273GNULIB_RINTL
1274GNULIB_RINTF
1275GNULIB_RINT
1276GNULIB_REMAINDERL
1277GNULIB_REMAINDERF
1278GNULIB_REMAINDER
1279GNULIB_POWF
1280GNULIB_MODFL
1281GNULIB_MODFF
1282GNULIB_MODF
1283GNULIB_LOGBL
1284GNULIB_LOGBF
1285GNULIB_LOGB
1286GNULIB_LOG2L
1287GNULIB_LOG2F
1288GNULIB_LOG2
1289GNULIB_LOG1PL
1290GNULIB_LOG1PF
1291GNULIB_LOG1P
1292GNULIB_LOG10L
1293GNULIB_LOG10F
1294GNULIB_LOG10
1295GNULIB_LOGL
1296GNULIB_LOGF
1297GNULIB_LOG
1298GNULIB_LDEXPL
1299GNULIB_LDEXPF
1300GNULIB_ISNANL
1301GNULIB_ISNAND
1302GNULIB_ISNANF
1303GNULIB_ISNAN
1304GNULIB_ISINF
1305GNULIB_ISFINITE
1306GNULIB_ILOGBL
1307GNULIB_ILOGBF
1308GNULIB_ILOGB
1309GNULIB_HYPOTL
1310GNULIB_HYPOTF
1311GNULIB_HYPOT
1312GNULIB_FREXPL
1313GNULIB_FREXP
1314GNULIB_FREXPF
1315GNULIB_FMODL
1316GNULIB_FMODF
1317GNULIB_FMOD
1318GNULIB_FMAL
1319GNULIB_FMAF
1320GNULIB_FMA
1321GNULIB_FLOORL
1322GNULIB_FLOORF
1323GNULIB_FLOOR
1324GNULIB_FABSL
1325GNULIB_FABSF
1326GNULIB_EXPM1L
1327GNULIB_EXPM1F
1328GNULIB_EXPM1
1329GNULIB_EXP2L
1330GNULIB_EXP2F
1331GNULIB_EXP2
1332GNULIB_EXPL
1333GNULIB_EXPF
1334GNULIB_COSHF
1335GNULIB_COSL
1336GNULIB_COSF
1337GNULIB_COPYSIGNL
1338GNULIB_COPYSIGNF
1339GNULIB_COPYSIGN
1340GNULIB_CEILL
1341GNULIB_CEILF
1342GNULIB_CEIL
1343GNULIB_CBRTL
1344GNULIB_CBRTF
1345GNULIB_CBRT
1346GNULIB_ATAN2F
1347GNULIB_ATANL
1348GNULIB_ATANF
1349GNULIB_ASINL
1350GNULIB_ASINF
1351GNULIB_ACOSL
1352GNULIB_ACOSF
8690e634
JK
1353GL_GENERATE_FNMATCH_H_FALSE
1354GL_GENERATE_FNMATCH_H_TRUE
1355FNMATCH_H
88b48903
WN
1356REPLACE_ITOLD
1357GL_GENERATE_FLOAT_H_FALSE
1358GL_GENERATE_FLOAT_H_TRUE
1359FLOAT_H
1360NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1361NEXT_FLOAT_H
6ec2e0f5
SDJ
1362NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1363NEXT_FCNTL_H
1364REPLACE_OPENAT
1365REPLACE_OPEN
1366REPLACE_FCNTL
1367HAVE_OPENAT
1368HAVE_FCNTL
1369GNULIB_OPENAT
1370GNULIB_OPEN
1371GNULIB_NONBLOCKING
1372GNULIB_FCNTL
18848e28
GF
1373EOVERFLOW_VALUE
1374EOVERFLOW_HIDDEN
1375ENOLINK_VALUE
1376ENOLINK_HIDDEN
1377EMULTIHOP_VALUE
1378EMULTIHOP_HIDDEN
1379GL_GENERATE_ERRNO_H_FALSE
1380GL_GENERATE_ERRNO_H_TRUE
1381ERRNO_H
1382NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1383NEXT_ERRNO_H
e26b6bb0
TT
1384HAVE_DIRENT_H
1385NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1386NEXT_DIRENT_H
88b48903
WN
1387PRAGMA_COLUMNS
1388PRAGMA_SYSTEM_HEADER
1389INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1390INCLUDE_NEXT
6ec2e0f5
SDJ
1391pkglibexecdir
1392runstatedir
1393lispdir
e26b6bb0
TT
1394REPLACE_FDOPENDIR
1395REPLACE_DIRFD
1396REPLACE_CLOSEDIR
1397REPLACE_OPENDIR
1398HAVE_ALPHASORT
1399HAVE_SCANDIR
1400HAVE_FDOPENDIR
1401HAVE_DECL_FDOPENDIR
1402HAVE_DECL_DIRFD
1403HAVE_CLOSEDIR
1404HAVE_REWINDDIR
1405HAVE_READDIR
1406HAVE_OPENDIR
1407GNULIB_ALPHASORT
1408GNULIB_SCANDIR
1409GNULIB_FDOPENDIR
1410GNULIB_DIRFD
1411GNULIB_CLOSEDIR
1412GNULIB_REWINDDIR
1413GNULIB_READDIR
1414GNULIB_OPENDIR
6ec2e0f5
SDJ
1415HAVE_WINSOCK2_H
1416HAVE_MSVC_INVALID_PARAMETER_HANDLER
e26b6bb0
TT
1417UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1418UNISTD_H_HAVE_WINSOCK2_H
1419REPLACE_WRITE
1420REPLACE_USLEEP
1421REPLACE_UNLINKAT
1422REPLACE_UNLINK
1423REPLACE_TTYNAME_R
4a626d0a 1424REPLACE_SYMLINKAT
e26b6bb0
TT
1425REPLACE_SYMLINK
1426REPLACE_SLEEP
1427REPLACE_RMDIR
4a626d0a 1428REPLACE_READLINKAT
e26b6bb0
TT
1429REPLACE_READLINK
1430REPLACE_READ
1431REPLACE_PWRITE
1432REPLACE_PREAD
1433REPLACE_LSEEK
1434REPLACE_LINKAT
1435REPLACE_LINK
1436REPLACE_LCHOWN
1437REPLACE_ISATTY
1438REPLACE_GETPAGESIZE
1439REPLACE_GETGROUPS
1440REPLACE_GETLOGIN_R
4a626d0a 1441REPLACE_GETDTABLESIZE
e26b6bb0
TT
1442REPLACE_GETDOMAINNAME
1443REPLACE_GETCWD
1444REPLACE_FTRUNCATE
1445REPLACE_FCHOWNAT
1446REPLACE_DUP2
1447REPLACE_DUP
1448REPLACE_CLOSE
1449REPLACE_CHOWN
1450HAVE_SYS_PARAM_H
1451HAVE_OS_H
1452HAVE_DECL_TTYNAME_R
1453HAVE_DECL_SETHOSTNAME
1454HAVE_DECL_GETUSERSHELL
1455HAVE_DECL_GETPAGESIZE
1456HAVE_DECL_GETLOGIN_R
1457HAVE_DECL_GETDOMAINNAME
1458HAVE_DECL_FDATASYNC
1459HAVE_DECL_FCHDIR
1460HAVE_DECL_ENVIRON
1461HAVE_USLEEP
1462HAVE_UNLINKAT
1463HAVE_SYMLINKAT
1464HAVE_SYMLINK
1465HAVE_SLEEP
1466HAVE_SETHOSTNAME
1467HAVE_READLINKAT
1468HAVE_READLINK
1469HAVE_PWRITE
1470HAVE_PREAD
1471HAVE_PIPE2
1472HAVE_PIPE
1473HAVE_LINKAT
1474HAVE_LINK
1475HAVE_LCHOWN
1476HAVE_GROUP_MEMBER
1477HAVE_GETPAGESIZE
1478HAVE_GETLOGIN
1479HAVE_GETHOSTNAME
1480HAVE_GETGROUPS
1481HAVE_GETDTABLESIZE
1482HAVE_FTRUNCATE
1483HAVE_FSYNC
1484HAVE_FDATASYNC
1485HAVE_FCHOWNAT
1486HAVE_FCHDIR
1487HAVE_FACCESSAT
1488HAVE_EUIDACCESS
1489HAVE_DUP3
1490HAVE_DUP2
1491HAVE_CHOWN
1492GNULIB_WRITE
1493GNULIB_USLEEP
1494GNULIB_UNLINKAT
1495GNULIB_UNLINK
1496GNULIB_UNISTD_H_SIGPIPE
1497GNULIB_UNISTD_H_NONBLOCKING
1498GNULIB_TTYNAME_R
1499GNULIB_SYMLINKAT
1500GNULIB_SYMLINK
1501GNULIB_SLEEP
1502GNULIB_SETHOSTNAME
1503GNULIB_RMDIR
1504GNULIB_READLINKAT
1505GNULIB_READLINK
1506GNULIB_READ
1507GNULIB_PWRITE
1508GNULIB_PREAD
1509GNULIB_PIPE2
1510GNULIB_PIPE
1511GNULIB_LSEEK
1512GNULIB_LINKAT
1513GNULIB_LINK
1514GNULIB_LCHOWN
1515GNULIB_ISATTY
1516GNULIB_GROUP_MEMBER
1517GNULIB_GETUSERSHELL
1518GNULIB_GETPAGESIZE
1519GNULIB_GETLOGIN_R
1520GNULIB_GETLOGIN
1521GNULIB_GETHOSTNAME
1522GNULIB_GETGROUPS
1523GNULIB_GETDTABLESIZE
1524GNULIB_GETDOMAINNAME
1525GNULIB_GETCWD
1526GNULIB_FTRUNCATE
1527GNULIB_FSYNC
1528GNULIB_FDATASYNC
1529GNULIB_FCHOWNAT
1530GNULIB_FCHDIR
1531GNULIB_FACCESSAT
1532GNULIB_EUIDACCESS
1533GNULIB_ENVIRON
1534GNULIB_DUP3
1535GNULIB_DUP2
1536GNULIB_DUP
1537GNULIB_CLOSE
1538GNULIB_CHOWN
1539GNULIB_CHDIR
98399780
YQ
1540REPLACE_WCTOMB
1541REPLACE_UNSETENV
1542REPLACE_STRTOD
1543REPLACE_SETENV
1544REPLACE_REALPATH
1545REPLACE_REALLOC
1546REPLACE_RANDOM_R
4a626d0a 1547REPLACE_QSORT_R
98399780
YQ
1548REPLACE_PUTENV
1549REPLACE_PTSNAME_R
1550REPLACE_PTSNAME
1551REPLACE_MKSTEMP
1552REPLACE_MBTOWC
1553REPLACE_MALLOC
1554REPLACE_CANONICALIZE_FILE_NAME
1555REPLACE_CALLOC
1556HAVE_DECL_UNSETENV
1557HAVE_UNLOCKPT
1558HAVE_SYS_LOADAVG_H
1559HAVE_STRUCT_RANDOM_DATA
1560HAVE_STRTOULL
1561HAVE_STRTOLL
1562HAVE_STRTOD
1563HAVE_DECL_SETENV
1564HAVE_SETENV
4a626d0a 1565HAVE_SECURE_GETENV
98399780
YQ
1566HAVE_RPMATCH
1567HAVE_REALPATH
1568HAVE_RANDOM_R
1569HAVE_RANDOM_H
1570HAVE_RANDOM
4c62b19f 1571HAVE_QSORT_R
98399780
YQ
1572HAVE_PTSNAME_R
1573HAVE_PTSNAME
1574HAVE_POSIX_OPENPT
1575HAVE_MKSTEMPS
1576HAVE_MKSTEMP
1577HAVE_MKOSTEMPS
1578HAVE_MKOSTEMP
1579HAVE_MKDTEMP
1580HAVE_GRANTPT
1581HAVE_GETSUBOPT
1582HAVE_DECL_GETLOADAVG
1583HAVE_CANONICALIZE_FILE_NAME
1584HAVE_ATOLL
1585HAVE__EXIT
1586GNULIB_WCTOMB
1587GNULIB_UNSETENV
1588GNULIB_UNLOCKPT
1589GNULIB_SYSTEM_POSIX
1590GNULIB_STRTOULL
1591GNULIB_STRTOLL
1592GNULIB_STRTOD
1593GNULIB_SETENV
4a626d0a 1594GNULIB_SECURE_GETENV
98399780
YQ
1595GNULIB_RPMATCH
1596GNULIB_REALPATH
1597GNULIB_REALLOC_POSIX
1598GNULIB_RANDOM_R
1599GNULIB_RANDOM
4a626d0a 1600GNULIB_QSORT_R
98399780
YQ
1601GNULIB_PUTENV
1602GNULIB_PTSNAME_R
1603GNULIB_PTSNAME
1604GNULIB_POSIX_OPENPT
1605GNULIB_MKSTEMPS
1606GNULIB_MKSTEMP
1607GNULIB_MKOSTEMPS
1608GNULIB_MKOSTEMP
1609GNULIB_MKDTEMP
1610GNULIB_MBTOWC
1611GNULIB_MALLOC_POSIX
1612GNULIB_GRANTPT
1613GNULIB_GETSUBOPT
1614GNULIB_GETLOADAVG
1615GNULIB_CANONICALIZE_FILE_NAME
1616GNULIB_CALLOC_POSIX
1617GNULIB_ATOLL
1618GNULIB__EXIT
8690e634
JK
1619GL_GENERATE_ALLOCA_H_FALSE
1620GL_GENERATE_ALLOCA_H_TRUE
1621ALLOCA_H
1622ALLOCA
c971b7fa
PA
1623GL_COND_LIBTOOL_FALSE
1624GL_COND_LIBTOOL_TRUE
1625target_os
1626target_vendor
1627target_cpu
1628target
c971b7fa
PA
1629host_os
1630host_vendor
1631host_cpu
1632host
1633build_os
1634build_vendor
1635build_cpu
1636build
4a626d0a
PA
1637RANLIB
1638ARFLAGS
1639AR
1640EGREP
1641GREP
1642CPP
c971b7fa
PA
1643OBJEXT
1644EXEEXT
1645ac_ct_CC
1646CPPFLAGS
1647LDFLAGS
1648CFLAGS
1649CC
1650MAINT
1651MAINTAINER_MODE_FALSE
1652MAINTAINER_MODE_TRUE
1653target_alias
1654host_alias
1655build_alias
1656LIBS
1657ECHO_T
1658ECHO_N
1659ECHO_C
1660DEFS
1661mandir
1662localedir
1663libdir
1664psdir
1665pdfdir
1666dvidir
1667htmldir
1668infodir
1669docdir
1670oldincludedir
1671includedir
1672localstatedir
1673sharedstatedir
1674sysconfdir
1675datadir
1676datarootdir
1677libexecdir
1678sbindir
1679bindir
1680program_transform_name
1681prefix
1682exec_prefix
1683PACKAGE_URL
1684PACKAGE_BUGREPORT
1685PACKAGE_STRING
1686PACKAGE_VERSION
1687PACKAGE_TARNAME
1688PACKAGE_NAME
1689PATH_SEPARATOR
1690SHELL'
1691ac_subst_files=''
1692ac_user_opts='
1693enable_option_checking
1694enable_maintainer_mode
2196f55f 1695enable_largefile
c971b7fa
PA
1696enable_dependency_tracking
1697'
1698 ac_precious_vars='build_alias
1699host_alias
1700target_alias
1701CC
1702CFLAGS
1703LDFLAGS
1704LIBS
1705CPPFLAGS
1706CPP'
1707
1708
1709# Initialize some variables set by options.
1710ac_init_help=
1711ac_init_version=false
1712ac_unrecognized_opts=
1713ac_unrecognized_sep=
1714# The variables have the same names as the options, with
1715# dashes changed to underlines.
1716cache_file=/dev/null
1717exec_prefix=NONE
1718no_create=
1719no_recursion=
1720prefix=NONE
1721program_prefix=NONE
1722program_suffix=NONE
1723program_transform_name=s,x,x,
1724silent=
1725site=
1726srcdir=
1727verbose=
1728x_includes=NONE
1729x_libraries=NONE
1730
1731# Installation directory options.
1732# These are left unexpanded so users can "make install exec_prefix=/foo"
1733# and all the variables that are supposed to be based on exec_prefix
1734# by default will actually change.
1735# Use braces instead of parens because sh, perl, etc. also accept them.
1736# (The list follows the same order as the GNU Coding Standards.)
1737bindir='${exec_prefix}/bin'
1738sbindir='${exec_prefix}/sbin'
1739libexecdir='${exec_prefix}/libexec'
1740datarootdir='${prefix}/share'
1741datadir='${datarootdir}'
1742sysconfdir='${prefix}/etc'
1743sharedstatedir='${prefix}/com'
1744localstatedir='${prefix}/var'
1745includedir='${prefix}/include'
1746oldincludedir='/usr/include'
1747docdir='${datarootdir}/doc/${PACKAGE}'
1748infodir='${datarootdir}/info'
1749htmldir='${docdir}'
1750dvidir='${docdir}'
1751pdfdir='${docdir}'
1752psdir='${docdir}'
1753libdir='${exec_prefix}/lib'
1754localedir='${datarootdir}/locale'
1755mandir='${datarootdir}/man'
1756
1757ac_prev=
1758ac_dashdash=
1759for ac_option
1760do
1761 # If the previous option needs an argument, assign it.
1762 if test -n "$ac_prev"; then
1763 eval $ac_prev=\$ac_option
1764 ac_prev=
1765 continue
1766 fi
1767
1768 case $ac_option in
1769 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1770 *) ac_optarg=yes ;;
1771 esac
1772
1773 # Accept the important Cygnus configure options, so we can diagnose typos.
1774
1775 case $ac_dashdash$ac_option in
1776 --)
1777 ac_dashdash=yes ;;
1778
1779 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1780 ac_prev=bindir ;;
1781 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1782 bindir=$ac_optarg ;;
1783
1784 -build | --build | --buil | --bui | --bu)
1785 ac_prev=build_alias ;;
1786 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1787 build_alias=$ac_optarg ;;
1788
1789 -cache-file | --cache-file | --cache-fil | --cache-fi \
1790 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1791 ac_prev=cache_file ;;
1792 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1793 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1794 cache_file=$ac_optarg ;;
1795
1796 --config-cache | -C)
1797 cache_file=config.cache ;;
1798
1799 -datadir | --datadir | --datadi | --datad)
1800 ac_prev=datadir ;;
1801 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1802 datadir=$ac_optarg ;;
1803
1804 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1805 | --dataroo | --dataro | --datar)
1806 ac_prev=datarootdir ;;
1807 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1808 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1809 datarootdir=$ac_optarg ;;
1810
1811 -disable-* | --disable-*)
1812 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1813 # Reject names that are not valid shell variable names.
1814 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1815 as_fn_error "invalid feature name: $ac_useropt"
1816 ac_useropt_orig=$ac_useropt
1817 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1818 case $ac_user_opts in
1819 *"
1820"enable_$ac_useropt"
1821"*) ;;
1822 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1823 ac_unrecognized_sep=', ';;
1824 esac
1825 eval enable_$ac_useropt=no ;;
1826
1827 -docdir | --docdir | --docdi | --doc | --do)
1828 ac_prev=docdir ;;
1829 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1830 docdir=$ac_optarg ;;
1831
1832 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1833 ac_prev=dvidir ;;
1834 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1835 dvidir=$ac_optarg ;;
1836
1837 -enable-* | --enable-*)
1838 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1839 # Reject names that are not valid shell variable names.
1840 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1841 as_fn_error "invalid feature name: $ac_useropt"
1842 ac_useropt_orig=$ac_useropt
1843 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1844 case $ac_user_opts in
1845 *"
1846"enable_$ac_useropt"
1847"*) ;;
1848 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1849 ac_unrecognized_sep=', ';;
1850 esac
1851 eval enable_$ac_useropt=\$ac_optarg ;;
1852
1853 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1854 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1855 | --exec | --exe | --ex)
1856 ac_prev=exec_prefix ;;
1857 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1858 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1859 | --exec=* | --exe=* | --ex=*)
1860 exec_prefix=$ac_optarg ;;
1861
1862 -gas | --gas | --ga | --g)
1863 # Obsolete; use --with-gas.
1864 with_gas=yes ;;
1865
1866 -help | --help | --hel | --he | -h)
1867 ac_init_help=long ;;
1868 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1869 ac_init_help=recursive ;;
1870 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1871 ac_init_help=short ;;
1872
1873 -host | --host | --hos | --ho)
1874 ac_prev=host_alias ;;
1875 -host=* | --host=* | --hos=* | --ho=*)
1876 host_alias=$ac_optarg ;;
1877
1878 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1879 ac_prev=htmldir ;;
1880 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1881 | --ht=*)
1882 htmldir=$ac_optarg ;;
1883
1884 -includedir | --includedir | --includedi | --included | --include \
1885 | --includ | --inclu | --incl | --inc)
1886 ac_prev=includedir ;;
1887 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1888 | --includ=* | --inclu=* | --incl=* | --inc=*)
1889 includedir=$ac_optarg ;;
1890
1891 -infodir | --infodir | --infodi | --infod | --info | --inf)
1892 ac_prev=infodir ;;
1893 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1894 infodir=$ac_optarg ;;
1895
1896 -libdir | --libdir | --libdi | --libd)
1897 ac_prev=libdir ;;
1898 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1899 libdir=$ac_optarg ;;
1900
1901 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1902 | --libexe | --libex | --libe)
1903 ac_prev=libexecdir ;;
1904 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1905 | --libexe=* | --libex=* | --libe=*)
1906 libexecdir=$ac_optarg ;;
1907
1908 -localedir | --localedir | --localedi | --localed | --locale)
1909 ac_prev=localedir ;;
1910 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1911 localedir=$ac_optarg ;;
1912
1913 -localstatedir | --localstatedir | --localstatedi | --localstated \
1914 | --localstate | --localstat | --localsta | --localst | --locals)
1915 ac_prev=localstatedir ;;
1916 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1917 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1918 localstatedir=$ac_optarg ;;
1919
1920 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1921 ac_prev=mandir ;;
1922 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1923 mandir=$ac_optarg ;;
1924
1925 -nfp | --nfp | --nf)
1926 # Obsolete; use --without-fp.
1927 with_fp=no ;;
1928
1929 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1930 | --no-cr | --no-c | -n)
1931 no_create=yes ;;
1932
1933 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1934 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1935 no_recursion=yes ;;
1936
1937 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1938 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1939 | --oldin | --oldi | --old | --ol | --o)
1940 ac_prev=oldincludedir ;;
1941 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1942 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1943 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1944 oldincludedir=$ac_optarg ;;
1945
1946 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1947 ac_prev=prefix ;;
1948 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1949 prefix=$ac_optarg ;;
1950
1951 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1952 | --program-pre | --program-pr | --program-p)
1953 ac_prev=program_prefix ;;
1954 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1955 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1956 program_prefix=$ac_optarg ;;
1957
1958 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1959 | --program-suf | --program-su | --program-s)
1960 ac_prev=program_suffix ;;
1961 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1962 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1963 program_suffix=$ac_optarg ;;
1964
1965 -program-transform-name | --program-transform-name \
1966 | --program-transform-nam | --program-transform-na \
1967 | --program-transform-n | --program-transform- \
1968 | --program-transform | --program-transfor \
1969 | --program-transfo | --program-transf \
1970 | --program-trans | --program-tran \
1971 | --progr-tra | --program-tr | --program-t)
1972 ac_prev=program_transform_name ;;
1973 -program-transform-name=* | --program-transform-name=* \
1974 | --program-transform-nam=* | --program-transform-na=* \
1975 | --program-transform-n=* | --program-transform-=* \
1976 | --program-transform=* | --program-transfor=* \
1977 | --program-transfo=* | --program-transf=* \
1978 | --program-trans=* | --program-tran=* \
1979 | --progr-tra=* | --program-tr=* | --program-t=*)
1980 program_transform_name=$ac_optarg ;;
1981
1982 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1983 ac_prev=pdfdir ;;
1984 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1985 pdfdir=$ac_optarg ;;
1986
1987 -psdir | --psdir | --psdi | --psd | --ps)
1988 ac_prev=psdir ;;
1989 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1990 psdir=$ac_optarg ;;
1991
1992 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1993 | -silent | --silent | --silen | --sile | --sil)
1994 silent=yes ;;
1995
1996 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1997 ac_prev=sbindir ;;
1998 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1999 | --sbi=* | --sb=*)
2000 sbindir=$ac_optarg ;;
2001
2002 -sharedstatedir | --sharedstatedir | --sharedstatedi \
2003 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2004 | --sharedst | --shareds | --shared | --share | --shar \
2005 | --sha | --sh)
2006 ac_prev=sharedstatedir ;;
2007 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2008 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2009 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2010 | --sha=* | --sh=*)
2011 sharedstatedir=$ac_optarg ;;
2012
2013 -site | --site | --sit)
2014 ac_prev=site ;;
2015 -site=* | --site=* | --sit=*)
2016 site=$ac_optarg ;;
2017
2018 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2019 ac_prev=srcdir ;;
2020 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2021 srcdir=$ac_optarg ;;
2022
2023 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2024 | --syscon | --sysco | --sysc | --sys | --sy)
2025 ac_prev=sysconfdir ;;
2026 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2027 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2028 sysconfdir=$ac_optarg ;;
2029
2030 -target | --target | --targe | --targ | --tar | --ta | --t)
2031 ac_prev=target_alias ;;
2032 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2033 target_alias=$ac_optarg ;;
2034
2035 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2036 verbose=yes ;;
2037
2038 -version | --version | --versio | --versi | --vers | -V)
2039 ac_init_version=: ;;
2040
2041 -with-* | --with-*)
2042 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2043 # Reject names that are not valid shell variable names.
2044 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2045 as_fn_error "invalid package name: $ac_useropt"
2046 ac_useropt_orig=$ac_useropt
2047 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2048 case $ac_user_opts in
2049 *"
2050"with_$ac_useropt"
2051"*) ;;
2052 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2053 ac_unrecognized_sep=', ';;
2054 esac
2055 eval with_$ac_useropt=\$ac_optarg ;;
2056
2057 -without-* | --without-*)
2058 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2059 # Reject names that are not valid shell variable names.
2060 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2061 as_fn_error "invalid package name: $ac_useropt"
2062 ac_useropt_orig=$ac_useropt
2063 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2064 case $ac_user_opts in
2065 *"
2066"with_$ac_useropt"
2067"*) ;;
2068 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2069 ac_unrecognized_sep=', ';;
2070 esac
2071 eval with_$ac_useropt=no ;;
2072
2073 --x)
2074 # Obsolete; use --with-x.
2075 with_x=yes ;;
2076
2077 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2078 | --x-incl | --x-inc | --x-in | --x-i)
2079 ac_prev=x_includes ;;
2080 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2081 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2082 x_includes=$ac_optarg ;;
2083
2084 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2085 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2086 ac_prev=x_libraries ;;
2087 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2088 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2089 x_libraries=$ac_optarg ;;
2090
2091 -*) as_fn_error "unrecognized option: \`$ac_option'
2092Try \`$0 --help' for more information."
2093 ;;
2094
2095 *=*)
2096 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2097 # Reject names that are not valid shell variable names.
2098 case $ac_envvar in #(
2099 '' | [0-9]* | *[!_$as_cr_alnum]* )
2100 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
2101 esac
2102 eval $ac_envvar=\$ac_optarg
2103 export $ac_envvar ;;
2104
2105 *)
2106 # FIXME: should be removed in autoconf 3.0.
2107 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2108 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2109 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
2110 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
2111 ;;
2112
2113 esac
2114done
2115
2116if test -n "$ac_prev"; then
2117 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2118 as_fn_error "missing argument to $ac_option"
2119fi
2120
2121if test -n "$ac_unrecognized_opts"; then
2122 case $enable_option_checking in
2123 no) ;;
2124 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
2125 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2126 esac
2127fi
2128
2129# Check all directory arguments for consistency.
2130for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2131 datadir sysconfdir sharedstatedir localstatedir includedir \
2132 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2133 libdir localedir mandir
2134do
2135 eval ac_val=\$$ac_var
2136 # Remove trailing slashes.
2137 case $ac_val in
2138 */ )
2139 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2140 eval $ac_var=\$ac_val;;
2141 esac
2142 # Be sure to have absolute directory names.
2143 case $ac_val in
2144 [\\/$]* | ?:[\\/]* ) continue;;
2145 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2146 esac
2147 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
2148done
2149
2150# There might be people who depend on the old broken behavior: `$host'
2151# used to hold the argument of --host etc.
2152# FIXME: To remove some day.
2153build=$build_alias
2154host=$host_alias
2155target=$target_alias
2156
2157# FIXME: To remove some day.
2158if test "x$host_alias" != x; then
2159 if test "x$build_alias" = x; then
2160 cross_compiling=maybe
2161 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
2162 If a cross compiler is detected then cross compile mode will be used." >&2
2163 elif test "x$build_alias" != "x$host_alias"; then
2164 cross_compiling=yes
2165 fi
2166fi
2167
2168ac_tool_prefix=
2169test -n "$host_alias" && ac_tool_prefix=$host_alias-
2170
2171test "$silent" = yes && exec 6>/dev/null
2172
2173
2174ac_pwd=`pwd` && test -n "$ac_pwd" &&
2175ac_ls_di=`ls -di .` &&
2176ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2177 as_fn_error "working directory cannot be determined"
2178test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2179 as_fn_error "pwd does not report name of working directory"
2180
2181
2182# Find the source files, if location was not specified.
2183if test -z "$srcdir"; then
2184 ac_srcdir_defaulted=yes
2185 # Try the directory containing this script, then the parent directory.
2186 ac_confdir=`$as_dirname -- "$as_myself" ||
2187$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2188 X"$as_myself" : 'X\(//\)[^/]' \| \
2189 X"$as_myself" : 'X\(//\)$' \| \
2190 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2191$as_echo X"$as_myself" |
2192 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2193 s//\1/
2194 q
2195 }
2196 /^X\(\/\/\)[^/].*/{
2197 s//\1/
2198 q
2199 }
2200 /^X\(\/\/\)$/{
2201 s//\1/
2202 q
2203 }
2204 /^X\(\/\).*/{
2205 s//\1/
2206 q
2207 }
2208 s/.*/./; q'`
2209 srcdir=$ac_confdir
2210 if test ! -r "$srcdir/$ac_unique_file"; then
2211 srcdir=..
2212 fi
2213else
2214 ac_srcdir_defaulted=no
2215fi
2216if test ! -r "$srcdir/$ac_unique_file"; then
2217 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2218 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
2219fi
2220ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2221ac_abs_confdir=`(
2222 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
2223 pwd)`
2224# When building in place, set srcdir=.
2225if test "$ac_abs_confdir" = "$ac_pwd"; then
2226 srcdir=.
2227fi
2228# Remove unnecessary trailing slashes from srcdir.
2229# Double slashes in file names in object file debugging info
2230# mess up M-x gdb in Emacs.
2231case $srcdir in
2232*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2233esac
2234for ac_var in $ac_precious_vars; do
2235 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2236 eval ac_env_${ac_var}_value=\$${ac_var}
2237 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2238 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2239done
2240
2241#
2242# Report the --help message.
2243#
2244if test "$ac_init_help" = "long"; then
2245 # Omit some internal or obsolete options to make the list less imposing.
2246 # This message is too long to be a string in the A/UX 3.1 sh.
2247 cat <<_ACEOF
2248\`configure' configures this package to adapt to many kinds of systems.
2249
2250Usage: $0 [OPTION]... [VAR=VALUE]...
2251
2252To assign environment variables (e.g., CC, CFLAGS...), specify them as
2253VAR=VALUE. See below for descriptions of some of the useful variables.
2254
2255Defaults for the options are specified in brackets.
2256
2257Configuration:
2258 -h, --help display this help and exit
2259 --help=short display options specific to this package
2260 --help=recursive display the short help of all the included packages
2261 -V, --version display version information and exit
2262 -q, --quiet, --silent do not print \`checking...' messages
2263 --cache-file=FILE cache test results in FILE [disabled]
2264 -C, --config-cache alias for \`--cache-file=config.cache'
2265 -n, --no-create do not create output files
2266 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2267
2268Installation directories:
2269 --prefix=PREFIX install architecture-independent files in PREFIX
2270 [$ac_default_prefix]
2271 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2272 [PREFIX]
2273
2274By default, \`make install' will install all the files in
2275\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2276an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2277for instance \`--prefix=\$HOME'.
2278
2279For better control, use the options below.
2280
2281Fine tuning of the installation directories:
2282 --bindir=DIR user executables [EPREFIX/bin]
2283 --sbindir=DIR system admin executables [EPREFIX/sbin]
2284 --libexecdir=DIR program executables [EPREFIX/libexec]
2285 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2286 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2287 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2288 --libdir=DIR object code libraries [EPREFIX/lib]
2289 --includedir=DIR C header files [PREFIX/include]
2290 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2291 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2292 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2293 --infodir=DIR info documentation [DATAROOTDIR/info]
2294 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2295 --mandir=DIR man documentation [DATAROOTDIR/man]
2296 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
2297 --htmldir=DIR html documentation [DOCDIR]
2298 --dvidir=DIR dvi documentation [DOCDIR]
2299 --pdfdir=DIR pdf documentation [DOCDIR]
2300 --psdir=DIR ps documentation [DOCDIR]
2301_ACEOF
2302
2303 cat <<\_ACEOF
2304
2305Program names:
2306 --program-prefix=PREFIX prepend PREFIX to installed program names
2307 --program-suffix=SUFFIX append SUFFIX to installed program names
2308 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2309
2310System types:
2311 --build=BUILD configure for building on BUILD [guessed]
2312 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2313 --target=TARGET configure for building compilers for TARGET [HOST]
2314_ACEOF
2315fi
2316
2317if test -n "$ac_init_help"; then
2318
2319 cat <<\_ACEOF
2320
2321Optional Features:
2322 --disable-option-checking ignore unrecognized --enable/--with options
2323 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2324 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2325 --enable-maintainer-mode enable make rules and dependencies not useful
2326 (and sometimes confusing) to the casual installer
2196f55f 2327 --disable-largefile omit support for large files
c971b7fa
PA
2328 --disable-dependency-tracking speeds up one-time build
2329 --enable-dependency-tracking do not reject slow dependency extractors
2330
2331Some influential environment variables:
2332 CC C compiler command
2333 CFLAGS C compiler flags
2334 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2335 nonstandard directory <lib dir>
2336 LIBS libraries to pass to the linker, e.g. -l<library>
2337 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
2338 you have headers in a nonstandard directory <include dir>
2339 CPP C preprocessor
2340
2341Use these variables to override the choices made by `configure' or to help
2342it to find libraries and programs with nonstandard names/locations.
2343
2344Report bugs to the package provider.
2345_ACEOF
2346ac_status=$?
2347fi
2348
2349if test "$ac_init_help" = "recursive"; then
2350 # If there are subdirs, report their specific --help.
2351 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2352 test -d "$ac_dir" ||
2353 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2354 continue
2355 ac_builddir=.
2356
2357case "$ac_dir" in
2358.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2359*)
2360 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2361 # A ".." for each directory in $ac_dir_suffix.
2362 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2363 case $ac_top_builddir_sub in
2364 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2365 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2366 esac ;;
2367esac
2368ac_abs_top_builddir=$ac_pwd
2369ac_abs_builddir=$ac_pwd$ac_dir_suffix
2370# for backward compatibility:
2371ac_top_builddir=$ac_top_build_prefix
2372
2373case $srcdir in
2374 .) # We are building in place.
2375 ac_srcdir=.
2376 ac_top_srcdir=$ac_top_builddir_sub
2377 ac_abs_top_srcdir=$ac_pwd ;;
2378 [\\/]* | ?:[\\/]* ) # Absolute name.
2379 ac_srcdir=$srcdir$ac_dir_suffix;
2380 ac_top_srcdir=$srcdir
2381 ac_abs_top_srcdir=$srcdir ;;
2382 *) # Relative name.
2383 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2384 ac_top_srcdir=$ac_top_build_prefix$srcdir
2385 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2386esac
2387ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2388
2389 cd "$ac_dir" || { ac_status=$?; continue; }
2390 # Check for guested configure.
2391 if test -f "$ac_srcdir/configure.gnu"; then
2392 echo &&
2393 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2394 elif test -f "$ac_srcdir/configure"; then
2395 echo &&
2396 $SHELL "$ac_srcdir/configure" --help=recursive
2397 else
2398 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2399 fi || ac_status=$?
2400 cd "$ac_pwd" || { ac_status=$?; break; }
2401 done
2402fi
2403
2404test -n "$ac_init_help" && exit $ac_status
2405if $ac_init_version; then
2406 cat <<\_ACEOF
2407configure
2408generated by GNU Autoconf 2.64
2409
2410Copyright (C) 2009 Free Software Foundation, Inc.
2411This configure script is free software; the Free Software Foundation
2412gives unlimited permission to copy, distribute and modify it.
2413_ACEOF
2414 exit
2415fi
2416
2417## ------------------------ ##
2418## Autoconf initialization. ##
2419## ------------------------ ##
2420
2421# ac_fn_c_try_compile LINENO
2422# --------------------------
2423# Try to compile conftest.$ac_ext, and return whether this succeeded.
2424ac_fn_c_try_compile ()
2425{
2426 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2427 rm -f conftest.$ac_objext
2428 if { { ac_try="$ac_compile"
2429case "(($ac_try" in
2430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2431 *) ac_try_echo=$ac_try;;
2432esac
2433eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2434$as_echo "$ac_try_echo"; } >&5
2435 (eval "$ac_compile") 2>conftest.err
2436 ac_status=$?
2437 if test -s conftest.err; then
2438 grep -v '^ *+' conftest.err >conftest.er1
2439 cat conftest.er1 >&5
2440 mv -f conftest.er1 conftest.err
2441 fi
2442 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2443 test $ac_status = 0; } && {
2444 test -z "$ac_c_werror_flag" ||
2445 test ! -s conftest.err
2446 } && test -s conftest.$ac_objext; then :
2447 ac_retval=0
2448else
2449 $as_echo "$as_me: failed program was:" >&5
2450sed 's/^/| /' conftest.$ac_ext >&5
2451
2452 ac_retval=1
2453fi
2454 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2455 return $ac_retval
2456
2457} # ac_fn_c_try_compile
2458
2459# ac_fn_c_try_cpp LINENO
2460# ----------------------
2461# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2462ac_fn_c_try_cpp ()
2463{
2464 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2465 if { { ac_try="$ac_cpp conftest.$ac_ext"
2466case "(($ac_try" in
2467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2468 *) ac_try_echo=$ac_try;;
2469esac
2470eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2471$as_echo "$ac_try_echo"; } >&5
2472 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2473 ac_status=$?
2474 if test -s conftest.err; then
2475 grep -v '^ *+' conftest.err >conftest.er1
2476 cat conftest.er1 >&5
2477 mv -f conftest.er1 conftest.err
2478 fi
2479 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2480 test $ac_status = 0; } >/dev/null && {
2481 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2482 test ! -s conftest.err
2483 }; then :
2484 ac_retval=0
2485else
2486 $as_echo "$as_me: failed program was:" >&5
2487sed 's/^/| /' conftest.$ac_ext >&5
2488
2489 ac_retval=1
2490fi
2491 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2492 return $ac_retval
2493
2494} # ac_fn_c_try_cpp
2495
2496# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2497# -------------------------------------------------------
2498# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2499# the include files in INCLUDES and setting the cache variable VAR
2500# accordingly.
2501ac_fn_c_check_header_mongrel ()
2502{
2503 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2504 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2506$as_echo_n "checking for $2... " >&6; }
2507if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2508 $as_echo_n "(cached) " >&6
2509fi
2510eval ac_res=\$$3
2511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2512$as_echo "$ac_res" >&6; }
2513else
2514 # Is the header compilable?
2515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2516$as_echo_n "checking $2 usability... " >&6; }
2517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2518/* end confdefs.h. */
2519$4
2520#include <$2>
2521_ACEOF
2522if ac_fn_c_try_compile "$LINENO"; then :
2523 ac_header_compiler=yes
2524else
2525 ac_header_compiler=no
2526fi
2527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2529$as_echo "$ac_header_compiler" >&6; }
2530
2531# Is the header present?
2532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2533$as_echo_n "checking $2 presence... " >&6; }
2534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2535/* end confdefs.h. */
2536#include <$2>
2537_ACEOF
2538if ac_fn_c_try_cpp "$LINENO"; then :
2539 ac_header_preproc=yes
2540else
2541 ac_header_preproc=no
2542fi
2543rm -f conftest.err conftest.$ac_ext
2544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2545$as_echo "$ac_header_preproc" >&6; }
2546
2547# So? What about this header?
2548case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2549 yes:no: )
2550 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2551$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2552 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2553$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2554 ;;
2555 no:yes:* )
2556 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2557$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2558 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2559$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2560 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2561$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2562 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2563$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2564 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2565$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2566 ;;
2567esac
2568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2569$as_echo_n "checking for $2... " >&6; }
2570if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2571 $as_echo_n "(cached) " >&6
2572else
2573 eval "$3=\$ac_header_compiler"
2574fi
2575eval ac_res=\$$3
2576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2577$as_echo "$ac_res" >&6; }
2578fi
2579 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2580
2581} # ac_fn_c_check_header_mongrel
2582
2583# ac_fn_c_try_run LINENO
2584# ----------------------
2585# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2586# that executables *can* be run.
2587ac_fn_c_try_run ()
2588{
2589 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2590 if { { ac_try="$ac_link"
2591case "(($ac_try" in
2592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2593 *) ac_try_echo=$ac_try;;
2594esac
2595eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2596$as_echo "$ac_try_echo"; } >&5
2597 (eval "$ac_link") 2>&5
2598 ac_status=$?
2599 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2600 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2601 { { case "(($ac_try" in
2602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2603 *) ac_try_echo=$ac_try;;
2604esac
2605eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2606$as_echo "$ac_try_echo"; } >&5
2607 (eval "$ac_try") 2>&5
2608 ac_status=$?
2609 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2610 test $ac_status = 0; }; }; then :
2611 ac_retval=0
2612else
2613 $as_echo "$as_me: program exited with status $ac_status" >&5
2614 $as_echo "$as_me: failed program was:" >&5
2615sed 's/^/| /' conftest.$ac_ext >&5
2616
2617 ac_retval=$ac_status
2618fi
2619 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2620 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2621 return $ac_retval
2622
2623} # ac_fn_c_try_run
2624
2625# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2626# -------------------------------------------------------
2627# Tests whether HEADER exists and can be compiled using the include files in
2628# INCLUDES, setting the cache variable VAR accordingly.
2629ac_fn_c_check_header_compile ()
2630{
2631 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2633$as_echo_n "checking for $2... " >&6; }
2634if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2635 $as_echo_n "(cached) " >&6
2636else
2637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2638/* end confdefs.h. */
2639$4
2640#include <$2>
2641_ACEOF
2642if ac_fn_c_try_compile "$LINENO"; then :
2643 eval "$3=yes"
2644else
2645 eval "$3=no"
2646fi
2647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2648fi
2649eval ac_res=\$$3
2650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2651$as_echo "$ac_res" >&6; }
2652 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2653
2654} # ac_fn_c_check_header_compile
2655
2656# ac_fn_c_try_link LINENO
2657# -----------------------
2658# Try to link conftest.$ac_ext, and return whether this succeeded.
2659ac_fn_c_try_link ()
2660{
2661 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2662 rm -f conftest.$ac_objext conftest$ac_exeext
2663 if { { ac_try="$ac_link"
2664case "(($ac_try" in
2665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2666 *) ac_try_echo=$ac_try;;
2667esac
2668eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2669$as_echo "$ac_try_echo"; } >&5
2670 (eval "$ac_link") 2>conftest.err
2671 ac_status=$?
2672 if test -s conftest.err; then
2673 grep -v '^ *+' conftest.err >conftest.er1
2674 cat conftest.er1 >&5
2675 mv -f conftest.er1 conftest.err
2676 fi
2677 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2678 test $ac_status = 0; } && {
2679 test -z "$ac_c_werror_flag" ||
2680 test ! -s conftest.err
2681 } && test -s conftest$ac_exeext && {
2682 test "$cross_compiling" = yes ||
2683 $as_test_x conftest$ac_exeext
2684 }; then :
2685 ac_retval=0
2686else
2687 $as_echo "$as_me: failed program was:" >&5
2688sed 's/^/| /' conftest.$ac_ext >&5
2689
2690 ac_retval=1
2691fi
2692 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2693 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2694 # interfere with the next link command; also delete a directory that is
2695 # left behind by Apple's compiler. We do this before executing the actions.
2696 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2697 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2698 return $ac_retval
2699
2700} # ac_fn_c_try_link
2701
8690e634
JK
2702# ac_fn_c_check_func LINENO FUNC VAR
2703# ----------------------------------
2704# Tests whether FUNC exists, setting the cache variable VAR accordingly
2705ac_fn_c_check_func ()
2706{
2707 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2709$as_echo_n "checking for $2... " >&6; }
2710if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2711 $as_echo_n "(cached) " >&6
2712else
2713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2714/* end confdefs.h. */
2715/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2716 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2717#define $2 innocuous_$2
2718
2719/* System header to define __stub macros and hopefully few prototypes,
2720 which can conflict with char $2 (); below.
2721 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2722 <limits.h> exists even on freestanding compilers. */
2723
2724#ifdef __STDC__
2725# include <limits.h>
2726#else
2727# include <assert.h>
2728#endif
2729
2730#undef $2
2731
2732/* Override any GCC internal prototype to avoid an error.
2733 Use char because int might match the return type of a GCC
2734 builtin and then its argument prototype would still apply. */
2735#ifdef __cplusplus
2736extern "C"
2737#endif
2738char $2 ();
2739/* The GNU C library defines this for functions which it implements
2740 to always fail with ENOSYS. Some functions are actually named
2741 something starting with __ and the normal name is an alias. */
2742#if defined __stub_$2 || defined __stub___$2
2743choke me
2744#endif
2745
2746int
2747main ()
2748{
2749return $2 ();
2750 ;
2751 return 0;
2752}
2753_ACEOF
2754if ac_fn_c_try_link "$LINENO"; then :
2755 eval "$3=yes"
2756else
2757 eval "$3=no"
2758fi
2759rm -f core conftest.err conftest.$ac_objext \
2760 conftest$ac_exeext conftest.$ac_ext
2761fi
2762eval ac_res=\$$3
2763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2764$as_echo "$ac_res" >&6; }
2765 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2766
2767} # ac_fn_c_check_func
2768
8986e351
TT
2769# ac_fn_c_check_decl LINENO SYMBOL VAR
2770# ------------------------------------
2771# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2772ac_fn_c_check_decl ()
2773{
2774 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2776$as_echo_n "checking whether $2 is declared... " >&6; }
2777if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2778 $as_echo_n "(cached) " >&6
2779else
2780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2781/* end confdefs.h. */
2782$4
2783int
2784main ()
2785{
2786#ifndef $2
2787 (void) $2;
2788#endif
2789
2790 ;
2791 return 0;
2792}
2793_ACEOF
2794if ac_fn_c_try_compile "$LINENO"; then :
2795 eval "$3=yes"
2796else
2797 eval "$3=no"
2798fi
2799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2800fi
2801eval ac_res=\$$3
2802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2803$as_echo "$ac_res" >&6; }
2804 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2805
2806} # ac_fn_c_check_decl
2807
c971b7fa
PA
2808# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2809# --------------------------------------------
2810# Tries to find the compile-time value of EXPR in a program that includes
2811# INCLUDES, setting VAR accordingly. Returns whether the value could be
2812# computed
2813ac_fn_c_compute_int ()
2814{
2815 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2816 if test "$cross_compiling" = yes; then
2817 # Depending upon the size, compute the lo and hi bounds.
2818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2819/* end confdefs.h. */
2820$4
2821int
2822main ()
2823{
2824static int test_array [1 - 2 * !(($2) >= 0)];
2825test_array [0] = 0
2826
2827 ;
2828 return 0;
2829}
2830_ACEOF
2831if ac_fn_c_try_compile "$LINENO"; then :
2832 ac_lo=0 ac_mid=0
2833 while :; do
2834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2835/* end confdefs.h. */
2836$4
2837int
2838main ()
2839{
2840static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2841test_array [0] = 0
2842
2843 ;
2844 return 0;
2845}
2846_ACEOF
2847if ac_fn_c_try_compile "$LINENO"; then :
2848 ac_hi=$ac_mid; break
2849else
2850 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2851 if test $ac_lo -le $ac_mid; then
2852 ac_lo= ac_hi=
2853 break
2854 fi
2855 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2856fi
2857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2858 done
2859else
2860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2861/* end confdefs.h. */
2862$4
2863int
2864main ()
2865{
2866static int test_array [1 - 2 * !(($2) < 0)];
2867test_array [0] = 0
2868
2869 ;
2870 return 0;
2871}
2872_ACEOF
2873if ac_fn_c_try_compile "$LINENO"; then :
2874 ac_hi=-1 ac_mid=-1
2875 while :; do
2876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2877/* end confdefs.h. */
2878$4
2879int
2880main ()
2881{
2882static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2883test_array [0] = 0
2884
2885 ;
2886 return 0;
2887}
2888_ACEOF
2889if ac_fn_c_try_compile "$LINENO"; then :
2890 ac_lo=$ac_mid; break
2891else
2892 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2893 if test $ac_mid -le $ac_hi; then
2894 ac_lo= ac_hi=
2895 break
2896 fi
2897 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2898fi
2899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2900 done
2901else
2902 ac_lo= ac_hi=
2903fi
2904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2905fi
2906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2907# Binary search between lo and hi bounds.
2908while test "x$ac_lo" != "x$ac_hi"; do
2909 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2911/* end confdefs.h. */
2912$4
2913int
2914main ()
2915{
2916static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2917test_array [0] = 0
2918
2919 ;
2920 return 0;
2921}
2922_ACEOF
2923if ac_fn_c_try_compile "$LINENO"; then :
2924 ac_hi=$ac_mid
2925else
2926 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2927fi
2928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2929done
2930case $ac_lo in #((
2931?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2932'') ac_retval=1 ;;
2933esac
2934 else
2935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2936/* end confdefs.h. */
2937$4
2938static long int longval () { return $2; }
2939static unsigned long int ulongval () { return $2; }
2940#include <stdio.h>
2941#include <stdlib.h>
2942int
2943main ()
2944{
2945
2946 FILE *f = fopen ("conftest.val", "w");
2947 if (! f)
2948 return 1;
2949 if (($2) < 0)
2950 {
2951 long int i = longval ();
2952 if (i != ($2))
2953 return 1;
2954 fprintf (f, "%ld", i);
2955 }
2956 else
2957 {
2958 unsigned long int i = ulongval ();
2959 if (i != ($2))
2960 return 1;
2961 fprintf (f, "%lu", i);
2962 }
2963 /* Do not output a trailing newline, as this causes \r\n confusion
2964 on some platforms. */
2965 return ferror (f) || fclose (f) != 0;
2966
2967 ;
2968 return 0;
2969}
2970_ACEOF
2971if ac_fn_c_try_run "$LINENO"; then :
2972 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2973else
2974 ac_retval=1
2975fi
2976rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2977 conftest.$ac_objext conftest.beam conftest.$ac_ext
2978rm -f conftest.val
2979
2980 fi
2981 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2982 return $ac_retval
2983
2984} # ac_fn_c_compute_int
2985
8690e634
JK
2986# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2987# -------------------------------------------
2988# Tests whether TYPE exists after having included INCLUDES, setting cache
2989# variable VAR accordingly.
2990ac_fn_c_check_type ()
c971b7fa
PA
2991{
2992 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2994$as_echo_n "checking for $2... " >&6; }
2995if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2996 $as_echo_n "(cached) " >&6
2997else
8690e634 2998 eval "$3=no"
c971b7fa
PA
2999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3000/* end confdefs.h. */
8690e634 3001$4
c971b7fa
PA
3002int
3003main ()
3004{
8690e634
JK
3005if (sizeof ($2))
3006 return 0;
c971b7fa
PA
3007 ;
3008 return 0;
3009}
3010_ACEOF
8690e634 3011if ac_fn_c_try_compile "$LINENO"; then :
c971b7fa
PA
3012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3013/* end confdefs.h. */
3014$4
3015int
3016main ()
3017{
8690e634
JK
3018if (sizeof (($2)))
3019 return 0;
c971b7fa
PA
3020 ;
3021 return 0;
3022}
3023_ACEOF
3024if ac_fn_c_try_compile "$LINENO"; then :
8690e634 3025
c971b7fa 3026else
8690e634
JK
3027 eval "$3=yes"
3028fi
3029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa
PA
3030fi
3031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3032fi
3033eval ac_res=\$$3
3034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3035$as_echo "$ac_res" >&6; }
3036 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
3037
8690e634 3038} # ac_fn_c_check_type
c971b7fa
PA
3039cat >config.log <<_ACEOF
3040This file contains any messages produced by compilers while
3041running configure, to aid debugging if configure makes a mistake.
3042
3043It was created by $as_me, which was
3044generated by GNU Autoconf 2.64. Invocation command line was
3045
3046 $ $0 $@
3047
3048_ACEOF
3049exec 5>>config.log
3050{
3051cat <<_ASUNAME
3052## --------- ##
3053## Platform. ##
3054## --------- ##
3055
3056hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3057uname -m = `(uname -m) 2>/dev/null || echo unknown`
3058uname -r = `(uname -r) 2>/dev/null || echo unknown`
3059uname -s = `(uname -s) 2>/dev/null || echo unknown`
3060uname -v = `(uname -v) 2>/dev/null || echo unknown`
3061
3062/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3063/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3064
3065/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3066/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3067/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3068/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3069/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3070/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3071/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3072
3073_ASUNAME
3074
3075as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3076for as_dir in $PATH
3077do
3078 IFS=$as_save_IFS
3079 test -z "$as_dir" && as_dir=.
3080 $as_echo "PATH: $as_dir"
3081 done
3082IFS=$as_save_IFS
3083
3084} >&5
3085
3086cat >&5 <<_ACEOF
3087
3088
3089## ----------- ##
3090## Core tests. ##
3091## ----------- ##
3092
3093_ACEOF
3094
3095
3096# Keep a trace of the command line.
3097# Strip out --no-create and --no-recursion so they do not pile up.
3098# Strip out --silent because we don't want to record it for future runs.
3099# Also quote any args containing shell meta-characters.
3100# Make two passes to allow for proper duplicate-argument suppression.
3101ac_configure_args=
3102ac_configure_args0=
3103ac_configure_args1=
3104ac_must_keep_next=false
3105for ac_pass in 1 2
3106do
3107 for ac_arg
3108 do
3109 case $ac_arg in
3110 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3111 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3112 | -silent | --silent | --silen | --sile | --sil)
3113 continue ;;
3114 *\'*)
3115 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3116 esac
3117 case $ac_pass in
3118 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3119 2)
3120 as_fn_append ac_configure_args1 " '$ac_arg'"
3121 if test $ac_must_keep_next = true; then
3122 ac_must_keep_next=false # Got value, back to normal.
3123 else
3124 case $ac_arg in
3125 *=* | --config-cache | -C | -disable-* | --disable-* \
3126 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3127 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3128 | -with-* | --with-* | -without-* | --without-* | --x)
3129 case "$ac_configure_args0 " in
3130 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3131 esac
3132 ;;
3133 -* ) ac_must_keep_next=true ;;
3134 esac
3135 fi
3136 as_fn_append ac_configure_args " '$ac_arg'"
3137 ;;
3138 esac
3139 done
3140done
3141{ ac_configure_args0=; unset ac_configure_args0;}
3142{ ac_configure_args1=; unset ac_configure_args1;}
3143
3144# When interrupted or exit'd, cleanup temporary files, and complete
3145# config.log. We remove comments because anyway the quotes in there
3146# would cause problems or look ugly.
3147# WARNING: Use '\'' to represent an apostrophe within the trap.
3148# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3149trap 'exit_status=$?
3150 # Save into config.log some information that might help in debugging.
3151 {
3152 echo
3153
3154 cat <<\_ASBOX
3155## ---------------- ##
3156## Cache variables. ##
3157## ---------------- ##
3158_ASBOX
3159 echo
3160 # The following way of writing the cache mishandles newlines in values,
3161(
3162 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3163 eval ac_val=\$$ac_var
3164 case $ac_val in #(
3165 *${as_nl}*)
3166 case $ac_var in #(
3167 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3168$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3169 esac
3170 case $ac_var in #(
3171 _ | IFS | as_nl) ;; #(
3172 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3173 *) { eval $ac_var=; unset $ac_var;} ;;
3174 esac ;;
3175 esac
3176 done
3177 (set) 2>&1 |
3178 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3179 *${as_nl}ac_space=\ *)
3180 sed -n \
3181 "s/'\''/'\''\\\\'\'''\''/g;
3182 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3183 ;; #(
3184 *)
3185 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3186 ;;
3187 esac |
3188 sort
3189)
3190 echo
3191
3192 cat <<\_ASBOX
3193## ----------------- ##
3194## Output variables. ##
3195## ----------------- ##
3196_ASBOX
3197 echo
3198 for ac_var in $ac_subst_vars
3199 do
3200 eval ac_val=\$$ac_var
3201 case $ac_val in
3202 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3203 esac
3204 $as_echo "$ac_var='\''$ac_val'\''"
3205 done | sort
3206 echo
3207
3208 if test -n "$ac_subst_files"; then
3209 cat <<\_ASBOX
3210## ------------------- ##
3211## File substitutions. ##
3212## ------------------- ##
3213_ASBOX
3214 echo
3215 for ac_var in $ac_subst_files
3216 do
3217 eval ac_val=\$$ac_var
3218 case $ac_val in
3219 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3220 esac
3221 $as_echo "$ac_var='\''$ac_val'\''"
3222 done | sort
3223 echo
3224 fi
3225
3226 if test -s confdefs.h; then
3227 cat <<\_ASBOX
3228## ----------- ##
3229## confdefs.h. ##
3230## ----------- ##
3231_ASBOX
3232 echo
3233 cat confdefs.h
3234 echo
3235 fi
3236 test "$ac_signal" != 0 &&
3237 $as_echo "$as_me: caught signal $ac_signal"
3238 $as_echo "$as_me: exit $exit_status"
3239 } >&5
3240 rm -f core *.core core.conftest.* &&
3241 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3242 exit $exit_status
3243' 0
3244for ac_signal in 1 2 13 15; do
3245 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3246done
3247ac_signal=0
3248
3249# confdefs.h avoids OS command line length limits that DEFS can exceed.
3250rm -f -r conftest* confdefs.h
3251
3252$as_echo "/* confdefs.h */" > confdefs.h
3253
3254# Predefined preprocessor variables.
3255
3256cat >>confdefs.h <<_ACEOF
3257#define PACKAGE_NAME "$PACKAGE_NAME"
3258_ACEOF
3259
3260cat >>confdefs.h <<_ACEOF
3261#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3262_ACEOF
3263
3264cat >>confdefs.h <<_ACEOF
3265#define PACKAGE_VERSION "$PACKAGE_VERSION"
3266_ACEOF
3267
3268cat >>confdefs.h <<_ACEOF
3269#define PACKAGE_STRING "$PACKAGE_STRING"
3270_ACEOF
3271
3272cat >>confdefs.h <<_ACEOF
3273#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3274_ACEOF
3275
3276cat >>confdefs.h <<_ACEOF
3277#define PACKAGE_URL "$PACKAGE_URL"
3278_ACEOF
3279
3280
3281# Let the site file select an alternate cache file if it wants to.
3282# Prefer an explicitly selected file to automatically selected ones.
3283ac_site_file1=NONE
3284ac_site_file2=NONE
3285if test -n "$CONFIG_SITE"; then
3286 ac_site_file1=$CONFIG_SITE
3287elif test "x$prefix" != xNONE; then
3288 ac_site_file1=$prefix/share/config.site
3289 ac_site_file2=$prefix/etc/config.site
3290else
3291 ac_site_file1=$ac_default_prefix/share/config.site
3292 ac_site_file2=$ac_default_prefix/etc/config.site
3293fi
3294for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3295do
3296 test "x$ac_site_file" = xNONE && continue
3297 if test -r "$ac_site_file"; then
3298 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3299$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3300 sed 's/^/| /' "$ac_site_file" >&5
3301 . "$ac_site_file"
3302 fi
3303done
3304
3305if test -r "$cache_file"; then
3306 # Some versions of bash will fail to source /dev/null (special
3307 # files actually), so we avoid doing that.
3308 if test -f "$cache_file"; then
3309 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3310$as_echo "$as_me: loading cache $cache_file" >&6;}
3311 case $cache_file in
3312 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3313 *) . "./$cache_file";;
3314 esac
3315 fi
3316else
3317 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3318$as_echo "$as_me: creating cache $cache_file" >&6;}
3319 >$cache_file
3320fi
3321
98399780
YQ
3322as_fn_append ac_func_list " canonicalize_file_name"
3323as_fn_append ac_func_list " getcwd"
3324as_fn_append ac_func_list " readlink"
3325as_fn_append ac_func_list " realpath"
3326as_fn_append ac_header_list " sys/param.h"
3d99e817 3327as_fn_append ac_header_list " unistd.h"
6ec2e0f5
SDJ
3328as_fn_append ac_func_list " _set_invalid_parameter_handler"
3329as_fn_append ac_header_list " sys/socket.h"
3330as_fn_append ac_func_list " fchdir"
3331as_fn_append ac_header_list " dirent.h"
3332as_fn_append ac_func_list " fcntl"
3333as_fn_append ac_func_list " symlink"
3334as_fn_append ac_func_list " fdopendir"
3335as_fn_append ac_func_list " mempcpy"
3574124b
PA
3336as_fn_append ac_func_list " btowc"
3337as_fn_append ac_func_list " isblank"
3338as_fn_append ac_func_list " iswctype"
3339as_fn_append ac_func_list " mbsrtowcs"
3574124b
PA
3340as_fn_append ac_func_list " wmemchr"
3341as_fn_append ac_func_list " wmemcpy"
3342as_fn_append ac_func_list " wmempcpy"
3343as_fn_append ac_header_list " wctype.h"
8690e634 3344gl_fnmatch_required=GNU
6ec2e0f5
SDJ
3345as_fn_append ac_header_list " sys/stat.h"
3346as_fn_append ac_func_list " fstatat"
3347as_fn_append ac_func_list " getdtablesize"
3348as_fn_append ac_func_list " getlogin_r"
3349as_fn_append ac_func_list " getprogname"
3350as_fn_append ac_func_list " getexecname"
4a626d0a 3351as_fn_append ac_header_list " sys/time.h"
4a626d0a 3352as_fn_append ac_func_list " gettimeofday"
6ec2e0f5
SDJ
3353as_fn_append ac_header_list " sys/cdefs.h"
3354as_fn_append ac_func_list " getpwnam_r"
49e4877c 3355as_fn_append ac_header_list " limits.h"
3574124b
PA
3356as_fn_append ac_header_list " wchar.h"
3357as_fn_append ac_header_list " stdint.h"
3358as_fn_append ac_header_list " inttypes.h"
f45c62c4 3359as_fn_append ac_func_list " lstat"
3574124b
PA
3360as_fn_append ac_header_list " math.h"
3361as_fn_append ac_func_list " mbsinit"
3362as_fn_append ac_func_list " mbrtowc"
3363as_fn_append ac_header_list " sys/mman.h"
3364as_fn_append ac_func_list " mprotect"
6ec2e0f5 3365as_fn_append ac_func_list " openat"
6a29c58e 3366as_fn_append ac_func_list " link"
3d99e817 3367as_fn_append ac_func_list " setenv"
6ec2e0f5
SDJ
3368as_fn_append ac_func_list " strdup"
3369as_fn_append ac_func_list " pipe"
3574124b
PA
3370as_fn_append ac_header_list " features.h"
3371as_fn_append ac_func_list " iswcntrl"
c971b7fa
PA
3372# Check that the precious variables saved in the cache have kept the same
3373# value.
3374ac_cache_corrupted=false
3375for ac_var in $ac_precious_vars; do
3376 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3377 eval ac_new_set=\$ac_env_${ac_var}_set
3378 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3379 eval ac_new_val=\$ac_env_${ac_var}_value
3380 case $ac_old_set,$ac_new_set in
3381 set,)
3382 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3383$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3384 ac_cache_corrupted=: ;;
3385 ,set)
3386 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3387$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3388 ac_cache_corrupted=: ;;
3389 ,);;
3390 *)
3391 if test "x$ac_old_val" != "x$ac_new_val"; then
3392 # differences in whitespace do not lead to failure.
3393 ac_old_val_w=`echo x $ac_old_val`
3394 ac_new_val_w=`echo x $ac_new_val`
3395 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3396 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3397$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3398 ac_cache_corrupted=:
3399 else
3400 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3401$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3402 eval $ac_var=\$ac_old_val
3403 fi
3404 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3405$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3406 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3407$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3408 fi;;
3409 esac
3410 # Pass precious variables to config.status.
3411 if test "$ac_new_set" = set; then
3412 case $ac_new_val in
3413 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3414 *) ac_arg=$ac_var=$ac_new_val ;;
3415 esac
3416 case " $ac_configure_args " in
3417 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3418 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3419 esac
3420 fi
3421done
3422if $ac_cache_corrupted; then
3423 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3424$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3425 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3426$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3427 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3428fi
3429## -------------------- ##
3430## Main body of script. ##
3431## -------------------- ##
3432
3433ac_ext=c
3434ac_cpp='$CPP $CPPFLAGS'
3435ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3436ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3437ac_compiler_gnu=$ac_cv_c_compiler_gnu
3438
3439
3440ac_config_headers="$ac_config_headers config.h:config.in"
3441
3442
3443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
3444$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
3445 # Check whether --enable-maintainer-mode was given.
3446if test "${enable_maintainer_mode+set}" = set; then :
3447 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
3448else
3449 USE_MAINTAINER_MODE=no
3450fi
3451
3452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3453$as_echo "$USE_MAINTAINER_MODE" >&6; }
3454 if test $USE_MAINTAINER_MODE = yes; then
3455 MAINTAINER_MODE_TRUE=
3456 MAINTAINER_MODE_FALSE='#'
3457else
3458 MAINTAINER_MODE_TRUE='#'
3459 MAINTAINER_MODE_FALSE=
3460fi
3461
3462 MAINT=$MAINTAINER_MODE_TRUE
3463
3464
3465
3466ac_ext=c
3467ac_cpp='$CPP $CPPFLAGS'
3468ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3469ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3470ac_compiler_gnu=$ac_cv_c_compiler_gnu
3471if test -n "$ac_tool_prefix"; then
3472 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3473set dummy ${ac_tool_prefix}gcc; ac_word=$2
3474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3475$as_echo_n "checking for $ac_word... " >&6; }
3476if test "${ac_cv_prog_CC+set}" = set; then :
3477 $as_echo_n "(cached) " >&6
3478else
3479 if test -n "$CC"; then
3480 ac_cv_prog_CC="$CC" # Let the user override the test.
3481else
3482as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3483for as_dir in $PATH
3484do
3485 IFS=$as_save_IFS
3486 test -z "$as_dir" && as_dir=.
3487 for ac_exec_ext in '' $ac_executable_extensions; do
3488 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3489 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3490 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3491 break 2
3492 fi
3493done
3494 done
3495IFS=$as_save_IFS
3496
3497fi
3498fi
3499CC=$ac_cv_prog_CC
3500if test -n "$CC"; then
3501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3502$as_echo "$CC" >&6; }
3503else
3504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3505$as_echo "no" >&6; }
3506fi
3507
3508
3509fi
3510if test -z "$ac_cv_prog_CC"; then
3511 ac_ct_CC=$CC
3512 # Extract the first word of "gcc", so it can be a program name with args.
3513set dummy gcc; ac_word=$2
3514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3515$as_echo_n "checking for $ac_word... " >&6; }
3516if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3517 $as_echo_n "(cached) " >&6
3518else
3519 if test -n "$ac_ct_CC"; then
3520 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3521else
3522as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3523for as_dir in $PATH
3524do
3525 IFS=$as_save_IFS
3526 test -z "$as_dir" && as_dir=.
3527 for ac_exec_ext in '' $ac_executable_extensions; do
3528 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3529 ac_cv_prog_ac_ct_CC="gcc"
3530 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3531 break 2
3532 fi
3533done
3534 done
3535IFS=$as_save_IFS
3536
3537fi
3538fi
3539ac_ct_CC=$ac_cv_prog_ac_ct_CC
3540if test -n "$ac_ct_CC"; then
3541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3542$as_echo "$ac_ct_CC" >&6; }
3543else
3544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3545$as_echo "no" >&6; }
3546fi
3547
3548 if test "x$ac_ct_CC" = x; then
3549 CC=""
3550 else
3551 case $cross_compiling:$ac_tool_warned in
3552yes:)
3553{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3554$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3555ac_tool_warned=yes ;;
3556esac
3557 CC=$ac_ct_CC
3558 fi
3559else
3560 CC="$ac_cv_prog_CC"
3561fi
3562
3563if test -z "$CC"; then
3564 if test -n "$ac_tool_prefix"; then
3565 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3566set dummy ${ac_tool_prefix}cc; ac_word=$2
3567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3568$as_echo_n "checking for $ac_word... " >&6; }
3569if test "${ac_cv_prog_CC+set}" = set; then :
3570 $as_echo_n "(cached) " >&6
3571else
3572 if test -n "$CC"; then
3573 ac_cv_prog_CC="$CC" # Let the user override the test.
3574else
3575as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3576for as_dir in $PATH
3577do
3578 IFS=$as_save_IFS
3579 test -z "$as_dir" && as_dir=.
3580 for ac_exec_ext in '' $ac_executable_extensions; do
3581 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3582 ac_cv_prog_CC="${ac_tool_prefix}cc"
3583 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3584 break 2
3585 fi
3586done
3587 done
3588IFS=$as_save_IFS
3589
3590fi
3591fi
3592CC=$ac_cv_prog_CC
3593if test -n "$CC"; then
3594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3595$as_echo "$CC" >&6; }
3596else
3597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3598$as_echo "no" >&6; }
3599fi
3600
3601
3602 fi
3603fi
3604if test -z "$CC"; then
3605 # Extract the first word of "cc", so it can be a program name with args.
3606set dummy cc; ac_word=$2
3607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3608$as_echo_n "checking for $ac_word... " >&6; }
3609if test "${ac_cv_prog_CC+set}" = set; then :
3610 $as_echo_n "(cached) " >&6
3611else
3612 if test -n "$CC"; then
3613 ac_cv_prog_CC="$CC" # Let the user override the test.
3614else
3615 ac_prog_rejected=no
3616as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3617for as_dir in $PATH
3618do
3619 IFS=$as_save_IFS
3620 test -z "$as_dir" && as_dir=.
3621 for ac_exec_ext in '' $ac_executable_extensions; do
3622 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3623 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3624 ac_prog_rejected=yes
3625 continue
3626 fi
3627 ac_cv_prog_CC="cc"
3628 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3629 break 2
3630 fi
3631done
3632 done
3633IFS=$as_save_IFS
3634
3635if test $ac_prog_rejected = yes; then
3636 # We found a bogon in the path, so make sure we never use it.
3637 set dummy $ac_cv_prog_CC
3638 shift
3639 if test $# != 0; then
3640 # We chose a different compiler from the bogus one.
3641 # However, it has the same basename, so the bogon will be chosen
3642 # first if we set CC to just the basename; use the full file name.
3643 shift
3644 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3645 fi
3646fi
3647fi
3648fi
3649CC=$ac_cv_prog_CC
3650if test -n "$CC"; then
3651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3652$as_echo "$CC" >&6; }
3653else
3654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3655$as_echo "no" >&6; }
3656fi
3657
3658
3659fi
3660if test -z "$CC"; then
3661 if test -n "$ac_tool_prefix"; then
3662 for ac_prog in cl.exe
3663 do
3664 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3665set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3667$as_echo_n "checking for $ac_word... " >&6; }
3668if test "${ac_cv_prog_CC+set}" = set; then :
3669 $as_echo_n "(cached) " >&6
3670else
3671 if test -n "$CC"; then
3672 ac_cv_prog_CC="$CC" # Let the user override the test.
3673else
3674as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3675for as_dir in $PATH
3676do
3677 IFS=$as_save_IFS
3678 test -z "$as_dir" && as_dir=.
3679 for ac_exec_ext in '' $ac_executable_extensions; do
3680 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3681 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3682 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3683 break 2
3684 fi
3685done
3686 done
3687IFS=$as_save_IFS
3688
3689fi
3690fi
3691CC=$ac_cv_prog_CC
3692if test -n "$CC"; then
3693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3694$as_echo "$CC" >&6; }
3695else
3696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3697$as_echo "no" >&6; }
3698fi
3699
3700
3701 test -n "$CC" && break
3702 done
3703fi
3704if test -z "$CC"; then
3705 ac_ct_CC=$CC
3706 for ac_prog in cl.exe
3707do
3708 # Extract the first word of "$ac_prog", so it can be a program name with args.
3709set dummy $ac_prog; ac_word=$2
3710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3711$as_echo_n "checking for $ac_word... " >&6; }
3712if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3713 $as_echo_n "(cached) " >&6
3714else
3715 if test -n "$ac_ct_CC"; then
3716 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3717else
3718as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3719for as_dir in $PATH
3720do
3721 IFS=$as_save_IFS
3722 test -z "$as_dir" && as_dir=.
3723 for ac_exec_ext in '' $ac_executable_extensions; do
3724 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3725 ac_cv_prog_ac_ct_CC="$ac_prog"
3726 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3727 break 2
3728 fi
3729done
3730 done
3731IFS=$as_save_IFS
3732
3733fi
3734fi
3735ac_ct_CC=$ac_cv_prog_ac_ct_CC
3736if test -n "$ac_ct_CC"; then
3737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3738$as_echo "$ac_ct_CC" >&6; }
3739else
3740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3741$as_echo "no" >&6; }
3742fi
3743
3744
3745 test -n "$ac_ct_CC" && break
3746done
3747
3748 if test "x$ac_ct_CC" = x; then
3749 CC=""
3750 else
3751 case $cross_compiling:$ac_tool_warned in
3752yes:)
3753{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3754$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3755ac_tool_warned=yes ;;
3756esac
3757 CC=$ac_ct_CC
3758 fi
3759fi
3760
3761fi
3762
3763
3764test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3765$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3766as_fn_error "no acceptable C compiler found in \$PATH
3767See \`config.log' for more details." "$LINENO" 5; }
3768
3769# Provide some information about the compiler.
3770$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3771set X $ac_compile
3772ac_compiler=$2
3773for ac_option in --version -v -V -qversion; do
3774 { { ac_try="$ac_compiler $ac_option >&5"
3775case "(($ac_try" in
3776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3777 *) ac_try_echo=$ac_try;;
3778esac
3779eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3780$as_echo "$ac_try_echo"; } >&5
3781 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3782 ac_status=$?
3783 if test -s conftest.err; then
3784 sed '10a\
3785... rest of stderr output deleted ...
3786 10q' conftest.err >conftest.er1
3787 cat conftest.er1 >&5
3788 rm -f conftest.er1 conftest.err
3789 fi
3790 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3791 test $ac_status = 0; }
3792done
3793
3794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3795/* end confdefs.h. */
3796#include <stdio.h>
3797int
3798main ()
3799{
3800FILE *f = fopen ("conftest.out", "w");
3801 return ferror (f) || fclose (f) != 0;
3802
3803 ;
3804 return 0;
3805}
3806_ACEOF
3807ac_clean_files_save=$ac_clean_files
3808ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
3809# Try to create an executable without -o first, disregard a.out.
3810# It will help us diagnose broken compilers, and finding out an intuition
3811# of exeext.
3812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3813$as_echo_n "checking for C compiler default output file name... " >&6; }
3814ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3815
3816# The possible output files:
3817ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3818
3819ac_rmfiles=
3820for ac_file in $ac_files
3821do
3822 case $ac_file in
3823 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3824 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3825 esac
3826done
3827rm -f $ac_rmfiles
3828
3829if { { ac_try="$ac_link_default"
3830case "(($ac_try" in
3831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3832 *) ac_try_echo=$ac_try;;
3833esac
3834eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3835$as_echo "$ac_try_echo"; } >&5
3836 (eval "$ac_link_default") 2>&5
3837 ac_status=$?
3838 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3839 test $ac_status = 0; }; then :
3840 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3841# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3842# in a Makefile. We should not override ac_cv_exeext if it was cached,
3843# so that the user can short-circuit this test for compilers unknown to
3844# Autoconf.
3845for ac_file in $ac_files ''
3846do
3847 test -f "$ac_file" || continue
3848 case $ac_file in
3849 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3850 ;;
3851 [ab].out )
3852 # We found the default executable, but exeext='' is most
3853 # certainly right.
3854 break;;
3855 *.* )
3856 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3857 then :; else
3858 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3859 fi
3860 # We set ac_cv_exeext here because the later test for it is not
3861 # safe: cross compilers may not add the suffix if given an `-o'
3862 # argument, so we may need to know it at that point already.
3863 # Even if this section looks crufty: it has the advantage of
3864 # actually working.
3865 break;;
3866 * )
3867 break;;
3868 esac
3869done
3870test "$ac_cv_exeext" = no && ac_cv_exeext=
3871
3872else
3873 ac_file=''
3874fi
3875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3876$as_echo "$ac_file" >&6; }
3877if test -z "$ac_file"; then :
3878 $as_echo "$as_me: failed program was:" >&5
3879sed 's/^/| /' conftest.$ac_ext >&5
3880
3881{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3882$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3883{ as_fn_set_status 77
3884as_fn_error "C compiler cannot create executables
3885See \`config.log' for more details." "$LINENO" 5; }; }
3886fi
3887ac_exeext=$ac_cv_exeext
3888
3889# Check that the compiler produces executables we can run. If not, either
3890# the compiler is broken, or we cross compile.
3891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3892$as_echo_n "checking whether the C compiler works... " >&6; }
3893# If not cross compiling, check that we can run a simple program.
3894if test "$cross_compiling" != yes; then
3895 if { ac_try='./$ac_file'
3896 { { case "(($ac_try" in
3897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3898 *) ac_try_echo=$ac_try;;
3899esac
3900eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3901$as_echo "$ac_try_echo"; } >&5
3902 (eval "$ac_try") 2>&5
3903 ac_status=$?
3904 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3905 test $ac_status = 0; }; }; then
3906 cross_compiling=no
3907 else
3908 if test "$cross_compiling" = maybe; then
3909 cross_compiling=yes
3910 else
3911 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3912$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3913as_fn_error "cannot run C compiled programs.
3914If you meant to cross compile, use \`--host'.
3915See \`config.log' for more details." "$LINENO" 5; }
3916 fi
3917 fi
3918fi
3919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3920$as_echo "yes" >&6; }
3921
3922rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
3923ac_clean_files=$ac_clean_files_save
3924# Check that the compiler produces executables we can run. If not, either
3925# the compiler is broken, or we cross compile.
3926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3927$as_echo_n "checking whether we are cross compiling... " >&6; }
3928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3929$as_echo "$cross_compiling" >&6; }
3930
3931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3932$as_echo_n "checking for suffix of executables... " >&6; }
3933if { { ac_try="$ac_link"
3934case "(($ac_try" in
3935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3936 *) ac_try_echo=$ac_try;;
3937esac
3938eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3939$as_echo "$ac_try_echo"; } >&5
3940 (eval "$ac_link") 2>&5
3941 ac_status=$?
3942 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3943 test $ac_status = 0; }; then :
3944 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3945# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3946# work properly (i.e., refer to `conftest.exe'), while it won't with
3947# `rm'.
3948for ac_file in conftest.exe conftest conftest.*; do
3949 test -f "$ac_file" || continue
3950 case $ac_file in
3951 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3952 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3953 break;;
3954 * ) break;;
3955 esac
3956done
3957else
3958 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3959$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3960as_fn_error "cannot compute suffix of executables: cannot compile and link
3961See \`config.log' for more details." "$LINENO" 5; }
3962fi
3963rm -f conftest$ac_cv_exeext
3964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3965$as_echo "$ac_cv_exeext" >&6; }
3966
3967rm -f conftest.$ac_ext
3968EXEEXT=$ac_cv_exeext
3969ac_exeext=$EXEEXT
3970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3971$as_echo_n "checking for suffix of object files... " >&6; }
3972if test "${ac_cv_objext+set}" = set; then :
3973 $as_echo_n "(cached) " >&6
3974else
3975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3976/* end confdefs.h. */
3977
3978int
3979main ()
3980{
3981
3982 ;
3983 return 0;
3984}
3985_ACEOF
3986rm -f conftest.o conftest.obj
3987if { { ac_try="$ac_compile"
3988case "(($ac_try" in
3989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3990 *) ac_try_echo=$ac_try;;
3991esac
3992eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3993$as_echo "$ac_try_echo"; } >&5
3994 (eval "$ac_compile") 2>&5
3995 ac_status=$?
3996 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3997 test $ac_status = 0; }; then :
3998 for ac_file in conftest.o conftest.obj conftest.*; do
3999 test -f "$ac_file" || continue;
4000 case $ac_file in
4001 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4002 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4003 break;;
4004 esac
4005done
4006else
4007 $as_echo "$as_me: failed program was:" >&5
4008sed 's/^/| /' conftest.$ac_ext >&5
4009
4010{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4011$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4012as_fn_error "cannot compute suffix of object files: cannot compile
4013See \`config.log' for more details." "$LINENO" 5; }
4014fi
4015rm -f conftest.$ac_cv_objext conftest.$ac_ext
4016fi
4017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4018$as_echo "$ac_cv_objext" >&6; }
4019OBJEXT=$ac_cv_objext
4020ac_objext=$OBJEXT
4021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4022$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4023if test "${ac_cv_c_compiler_gnu+set}" = set; then :
4024 $as_echo_n "(cached) " >&6
4025else
4026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4027/* end confdefs.h. */
4028
4029int
4030main ()
4031{
4032#ifndef __GNUC__
4033 choke me
4034#endif
4035
4036 ;
4037 return 0;
4038}
4039_ACEOF
4040if ac_fn_c_try_compile "$LINENO"; then :
4041 ac_compiler_gnu=yes
4042else
4043 ac_compiler_gnu=no
4044fi
4045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4046ac_cv_c_compiler_gnu=$ac_compiler_gnu
4047
4048fi
4049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4050$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4051if test $ac_compiler_gnu = yes; then
4052 GCC=yes
4053else
4054 GCC=
4055fi
4056ac_test_CFLAGS=${CFLAGS+set}
4057ac_save_CFLAGS=$CFLAGS
4058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4059$as_echo_n "checking whether $CC accepts -g... " >&6; }
4060if test "${ac_cv_prog_cc_g+set}" = set; then :
4061 $as_echo_n "(cached) " >&6
4062else
4063 ac_save_c_werror_flag=$ac_c_werror_flag
4064 ac_c_werror_flag=yes
4065 ac_cv_prog_cc_g=no
4066 CFLAGS="-g"
4067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4068/* end confdefs.h. */
4069
4070int
4071main ()
4072{
4073
4074 ;
4075 return 0;
4076}
4077_ACEOF
4078if ac_fn_c_try_compile "$LINENO"; then :
4079 ac_cv_prog_cc_g=yes
4080else
4081 CFLAGS=""
4082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4083/* end confdefs.h. */
4084
4085int
4086main ()
4087{
4088
4089 ;
4090 return 0;
4091}
4092_ACEOF
4093if ac_fn_c_try_compile "$LINENO"; then :
4094
4095else
4096 ac_c_werror_flag=$ac_save_c_werror_flag
4097 CFLAGS="-g"
4098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4099/* end confdefs.h. */
4100
4101int
4102main ()
4103{
4104
4105 ;
4106 return 0;
4107}
4108_ACEOF
4109if ac_fn_c_try_compile "$LINENO"; then :
4110 ac_cv_prog_cc_g=yes
4111fi
4112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4113fi
4114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4115fi
4116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4117 ac_c_werror_flag=$ac_save_c_werror_flag
4118fi
4119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4120$as_echo "$ac_cv_prog_cc_g" >&6; }
4121if test "$ac_test_CFLAGS" = set; then
4122 CFLAGS=$ac_save_CFLAGS
4123elif test $ac_cv_prog_cc_g = yes; then
4124 if test "$GCC" = yes; then
4125 CFLAGS="-g -O2"
4126 else
4127 CFLAGS="-g"
4128 fi
4129else
4130 if test "$GCC" = yes; then
4131 CFLAGS="-O2"
4132 else
4133 CFLAGS=
4134 fi
4135fi
4136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4137$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4138if test "${ac_cv_prog_cc_c89+set}" = set; then :
4139 $as_echo_n "(cached) " >&6
4140else
4141 ac_cv_prog_cc_c89=no
4142ac_save_CC=$CC
4143cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4144/* end confdefs.h. */
4145#include <stdarg.h>
4146#include <stdio.h>
4147#include <sys/types.h>
4148#include <sys/stat.h>
4149/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4150struct buf { int x; };
4151FILE * (*rcsopen) (struct buf *, struct stat *, int);
4152static char *e (p, i)
4153 char **p;
4154 int i;
4155{
4156 return p[i];
4157}
4158static char *f (char * (*g) (char **, int), char **p, ...)
4159{
4160 char *s;
4161 va_list v;
4162 va_start (v,p);
4163 s = g (p, va_arg (v,int));
4164 va_end (v);
4165 return s;
4166}
4167
4168/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4169 function prototypes and stuff, but not '\xHH' hex character constants.
4170 These don't provoke an error unfortunately, instead are silently treated
4171 as 'x'. The following induces an error, until -std is added to get
4172 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4173 array size at least. It's necessary to write '\x00'==0 to get something
4174 that's true only with -std. */
4175int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4176
4177/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4178 inside strings and character constants. */
4179#define FOO(x) 'x'
4180int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4181
4182int test (int i, double x);
4183struct s1 {int (*f) (int a);};
4184struct s2 {int (*f) (double a);};
4185int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4186int argc;
4187char **argv;
4188int
4189main ()
4190{
4191return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4192 ;
4193 return 0;
4194}
4195_ACEOF
4196for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4197 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4198do
4199 CC="$ac_save_CC $ac_arg"
4200 if ac_fn_c_try_compile "$LINENO"; then :
4201 ac_cv_prog_cc_c89=$ac_arg
4202fi
4203rm -f core conftest.err conftest.$ac_objext
4204 test "x$ac_cv_prog_cc_c89" != "xno" && break
4205done
4206rm -f conftest.$ac_ext
4207CC=$ac_save_CC
4208
4209fi
4210# AC_CACHE_VAL
4211case "x$ac_cv_prog_cc_c89" in
4212 x)
4213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4214$as_echo "none needed" >&6; } ;;
4215 xno)
4216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4217$as_echo "unsupported" >&6; } ;;
4218 *)
4219 CC="$CC $ac_cv_prog_cc_c89"
4220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4221$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4222esac
4223if test "x$ac_cv_prog_cc_c89" != xno; then :
4224
4225fi
4226
4227ac_ext=c
4228ac_cpp='$CPP $CPPFLAGS'
4229ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4230ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4231ac_compiler_gnu=$ac_cv_c_compiler_gnu
4232
c971b7fa
PA
4233
4234ac_ext=c
4235ac_cpp='$CPP $CPPFLAGS'
4236ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4237ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4238ac_compiler_gnu=$ac_cv_c_compiler_gnu
4239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4240$as_echo_n "checking how to run the C preprocessor... " >&6; }
4241# On Suns, sometimes $CPP names a directory.
4242if test -n "$CPP" && test -d "$CPP"; then
4243 CPP=
4244fi
4245if test -z "$CPP"; then
4246 if test "${ac_cv_prog_CPP+set}" = set; then :
4247 $as_echo_n "(cached) " >&6
4248else
4249 # Double quotes because CPP needs to be expanded
4250 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4251 do
4252 ac_preproc_ok=false
4253for ac_c_preproc_warn_flag in '' yes
4254do
4255 # Use a header file that comes with gcc, so configuring glibc
4256 # with a fresh cross-compiler works.
4257 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4258 # <limits.h> exists even on freestanding compilers.
4259 # On the NeXT, cc -E runs the code through the compiler's parser,
4260 # not just through cpp. "Syntax error" is here to catch this case.
4261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4262/* end confdefs.h. */
4263#ifdef __STDC__
4264# include <limits.h>
4265#else
4266# include <assert.h>
4267#endif
4268 Syntax error
4269_ACEOF
4270if ac_fn_c_try_cpp "$LINENO"; then :
4271
4272else
4273 # Broken: fails on valid input.
4274continue
4275fi
4276rm -f conftest.err conftest.$ac_ext
4277
4278 # OK, works on sane cases. Now check whether nonexistent headers
4279 # can be detected and how.
4280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4281/* end confdefs.h. */
4282#include <ac_nonexistent.h>
4283_ACEOF
4284if ac_fn_c_try_cpp "$LINENO"; then :
4285 # Broken: success on invalid input.
4286continue
4287else
4288 # Passes both tests.
4289ac_preproc_ok=:
4290break
4291fi
4292rm -f conftest.err conftest.$ac_ext
4293
4294done
4295# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4296rm -f conftest.err conftest.$ac_ext
4297if $ac_preproc_ok; then :
4298 break
4299fi
4300
4301 done
4302 ac_cv_prog_CPP=$CPP
4303
4304fi
4305 CPP=$ac_cv_prog_CPP
4306else
4307 ac_cv_prog_CPP=$CPP
4308fi
4309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4310$as_echo "$CPP" >&6; }
4311ac_preproc_ok=false
4312for ac_c_preproc_warn_flag in '' yes
4313do
4314 # Use a header file that comes with gcc, so configuring glibc
4315 # with a fresh cross-compiler works.
4316 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4317 # <limits.h> exists even on freestanding compilers.
4318 # On the NeXT, cc -E runs the code through the compiler's parser,
4319 # not just through cpp. "Syntax error" is here to catch this case.
4320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4321/* end confdefs.h. */
4322#ifdef __STDC__
4323# include <limits.h>
4324#else
4325# include <assert.h>
4326#endif
4327 Syntax error
4328_ACEOF
4329if ac_fn_c_try_cpp "$LINENO"; then :
4330
4331else
4332 # Broken: fails on valid input.
4333continue
4334fi
4335rm -f conftest.err conftest.$ac_ext
4336
4337 # OK, works on sane cases. Now check whether nonexistent headers
4338 # can be detected and how.
4339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4340/* end confdefs.h. */
4341#include <ac_nonexistent.h>
4342_ACEOF
4343if ac_fn_c_try_cpp "$LINENO"; then :
4344 # Broken: success on invalid input.
4345continue
4346else
4347 # Passes both tests.
4348ac_preproc_ok=:
4349break
4350fi
4351rm -f conftest.err conftest.$ac_ext
4352
4353done
4354# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4355rm -f conftest.err conftest.$ac_ext
4356if $ac_preproc_ok; then :
4357
4358else
4359 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4360$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4361as_fn_error "C preprocessor \"$CPP\" fails sanity check
4362See \`config.log' for more details." "$LINENO" 5; }
4363fi
4364
4365ac_ext=c
4366ac_cpp='$CPP $CPPFLAGS'
4367ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4368ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4369ac_compiler_gnu=$ac_cv_c_compiler_gnu
4370
4371
4372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4373$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4374if test "${ac_cv_path_GREP+set}" = set; then :
4375 $as_echo_n "(cached) " >&6
4376else
4377 if test -z "$GREP"; then
4378 ac_path_GREP_found=false
4379 # Loop through the user's path and test for each of PROGNAME-LIST
4380 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4381for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4382do
4383 IFS=$as_save_IFS
4384 test -z "$as_dir" && as_dir=.
4385 for ac_prog in grep ggrep; do
4386 for ac_exec_ext in '' $ac_executable_extensions; do
4387 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4388 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4389# Check for GNU ac_path_GREP and select it if it is found.
4390 # Check for GNU $ac_path_GREP
4391case `"$ac_path_GREP" --version 2>&1` in
4392*GNU*)
4393 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4394*)
4395 ac_count=0
4396 $as_echo_n 0123456789 >"conftest.in"
4397 while :
4398 do
4399 cat "conftest.in" "conftest.in" >"conftest.tmp"
4400 mv "conftest.tmp" "conftest.in"
4401 cp "conftest.in" "conftest.nl"
4402 $as_echo 'GREP' >> "conftest.nl"
4403 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4404 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4405 as_fn_arith $ac_count + 1 && ac_count=$as_val
4406 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4407 # Best one so far, save it but keep looking for a better one
4408 ac_cv_path_GREP="$ac_path_GREP"
4409 ac_path_GREP_max=$ac_count
4410 fi
4411 # 10*(2^10) chars as input seems more than enough
4412 test $ac_count -gt 10 && break
4413 done
4414 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4415esac
4416
4417 $ac_path_GREP_found && break 3
4418 done
4419 done
4420 done
4421IFS=$as_save_IFS
4422 if test -z "$ac_cv_path_GREP"; then
4423 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4424 fi
4425else
4426 ac_cv_path_GREP=$GREP
4427fi
4428
4429fi
4430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4431$as_echo "$ac_cv_path_GREP" >&6; }
4432 GREP="$ac_cv_path_GREP"
4433
4434
4435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4436$as_echo_n "checking for egrep... " >&6; }
4437if test "${ac_cv_path_EGREP+set}" = set; then :
4438 $as_echo_n "(cached) " >&6
4439else
4440 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4441 then ac_cv_path_EGREP="$GREP -E"
4442 else
4443 if test -z "$EGREP"; then
4444 ac_path_EGREP_found=false
4445 # Loop through the user's path and test for each of PROGNAME-LIST
4446 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4447for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4448do
4449 IFS=$as_save_IFS
4450 test -z "$as_dir" && as_dir=.
4451 for ac_prog in egrep; do
4452 for ac_exec_ext in '' $ac_executable_extensions; do
4453 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4454 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4455# Check for GNU ac_path_EGREP and select it if it is found.
4456 # Check for GNU $ac_path_EGREP
4457case `"$ac_path_EGREP" --version 2>&1` in
4458*GNU*)
4459 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4460*)
4461 ac_count=0
4462 $as_echo_n 0123456789 >"conftest.in"
4463 while :
4464 do
4465 cat "conftest.in" "conftest.in" >"conftest.tmp"
4466 mv "conftest.tmp" "conftest.in"
4467 cp "conftest.in" "conftest.nl"
4468 $as_echo 'EGREP' >> "conftest.nl"
4469 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4470 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4471 as_fn_arith $ac_count + 1 && ac_count=$as_val
4472 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4473 # Best one so far, save it but keep looking for a better one
4474 ac_cv_path_EGREP="$ac_path_EGREP"
4475 ac_path_EGREP_max=$ac_count
4476 fi
4477 # 10*(2^10) chars as input seems more than enough
4478 test $ac_count -gt 10 && break
4479 done
4480 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4481esac
4482
4483 $ac_path_EGREP_found && break 3
4484 done
4485 done
4486 done
4487IFS=$as_save_IFS
4488 if test -z "$ac_cv_path_EGREP"; then
4489 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4490 fi
4491else
4492 ac_cv_path_EGREP=$EGREP
4493fi
4494
4495 fi
4496fi
4497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4498$as_echo "$ac_cv_path_EGREP" >&6; }
4499 EGREP="$ac_cv_path_EGREP"
4500
4501
4502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4503$as_echo_n "checking for ANSI C header files... " >&6; }
4504if test "${ac_cv_header_stdc+set}" = set; then :
4505 $as_echo_n "(cached) " >&6
4506else
4507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4508/* end confdefs.h. */
4509#include <stdlib.h>
4510#include <stdarg.h>
4511#include <string.h>
4512#include <float.h>
4513
4514int
4515main ()
4516{
4517
4518 ;
4519 return 0;
4520}
4521_ACEOF
4522if ac_fn_c_try_compile "$LINENO"; then :
4523 ac_cv_header_stdc=yes
4524else
4525 ac_cv_header_stdc=no
4526fi
4527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4528
4529if test $ac_cv_header_stdc = yes; then
4530 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4532/* end confdefs.h. */
4533#include <string.h>
4534
4535_ACEOF
4536if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4537 $EGREP "memchr" >/dev/null 2>&1; then :
4538
4539else
4540 ac_cv_header_stdc=no
4541fi
4542rm -f conftest*
4543
4544fi
4545
4546if test $ac_cv_header_stdc = yes; then
4547 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4549/* end confdefs.h. */
4550#include <stdlib.h>
4551
4552_ACEOF
4553if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4554 $EGREP "free" >/dev/null 2>&1; then :
4555
4556else
4557 ac_cv_header_stdc=no
4558fi
4559rm -f conftest*
4560
4561fi
4562
4563if test $ac_cv_header_stdc = yes; then
4564 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4565 if test "$cross_compiling" = yes; then :
4566 :
4567else
4568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4569/* end confdefs.h. */
4570#include <ctype.h>
4571#include <stdlib.h>
4572#if ((' ' & 0x0FF) == 0x020)
4573# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4574# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4575#else
4576# define ISLOWER(c) \
4577 (('a' <= (c) && (c) <= 'i') \
4578 || ('j' <= (c) && (c) <= 'r') \
4579 || ('s' <= (c) && (c) <= 'z'))
4580# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4581#endif
4582
4583#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4584int
4585main ()
4586{
4587 int i;
4588 for (i = 0; i < 256; i++)
4589 if (XOR (islower (i), ISLOWER (i))
4590 || toupper (i) != TOUPPER (i))
4591 return 2;
4592 return 0;
4593}
4594_ACEOF
4595if ac_fn_c_try_run "$LINENO"; then :
4596
4597else
4598 ac_cv_header_stdc=no
4599fi
4600rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4601 conftest.$ac_objext conftest.beam conftest.$ac_ext
4602fi
4603
4604fi
4605fi
4606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4607$as_echo "$ac_cv_header_stdc" >&6; }
4608if test $ac_cv_header_stdc = yes; then
4609
4610$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4611
4612fi
4613
4614# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4615for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4616 inttypes.h stdint.h unistd.h
4617do :
4618 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4619ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4620"
4621eval as_val=\$$as_ac_Header
4622 if test "x$as_val" = x""yes; then :
4623 cat >>confdefs.h <<_ACEOF
4624#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4625_ACEOF
4626
4627fi
4628
4629done
4630
4631
4632
c971b7fa
PA
4633 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4634if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4635 MINIX=yes
4636else
4637 MINIX=
4638fi
4639
4640
4641 if test "$MINIX" = yes; then
4642
4643$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4644
4645
4646$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4647
4648
4649$as_echo "#define _MINIX 1" >>confdefs.h
4650
c971b7fa 4651
4a626d0a 4652$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
c971b7fa 4653
4a626d0a 4654 fi
c971b7fa
PA
4655
4656
4657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4658$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4659if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4660 $as_echo_n "(cached) " >&6
4661else
4662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4663/* end confdefs.h. */
4664
4665# define __EXTENSIONS__ 1
4666 $ac_includes_default
4667int
4668main ()
4669{
4670
4671 ;
4672 return 0;
4673}
4674_ACEOF
4675if ac_fn_c_try_compile "$LINENO"; then :
4676 ac_cv_safe_to_define___extensions__=yes
4677else
4678 ac_cv_safe_to_define___extensions__=no
4679fi
4680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4681fi
4682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4683$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4684 test $ac_cv_safe_to_define___extensions__ = yes &&
4685 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4686
4687 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4688
4689 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
4690
4691 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4692
4693 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4694
49e4877c
PA
4695 $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
4696
4697 $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
4698
4699 $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
4700
4701 $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
4702
4703 $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
4704
4705 $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
4706
4707 $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
4708
c971b7fa
PA
4709 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4710
4a626d0a
PA
4711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
4712$as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
4713if test "${ac_cv_should_define__xopen_source+set}" = set; then :
4714 $as_echo_n "(cached) " >&6
4715else
4716 ac_cv_should_define__xopen_source=no
4717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4718/* end confdefs.h. */
4719
4720 #include <wchar.h>
4721 mbstate_t x;
4722int
4723main ()
4724{
4725
4726 ;
4727 return 0;
4728}
4729_ACEOF
4730if ac_fn_c_try_compile "$LINENO"; then :
4731
4732else
4733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4734/* end confdefs.h. */
4735
4736 #define _XOPEN_SOURCE 500
4737 #include <wchar.h>
4738 mbstate_t x;
4739int
4740main ()
4741{
4742
4743 ;
4744 return 0;
4745}
4746_ACEOF
4747if ac_fn_c_try_compile "$LINENO"; then :
4748 ac_cv_should_define__xopen_source=yes
4749fi
4750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4751fi
4752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4753fi
4754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
4755$as_echo "$ac_cv_should_define__xopen_source" >&6; }
4756 test $ac_cv_should_define__xopen_source = yes &&
4757 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
4758
c971b7fa
PA
4759
4760
4761
49e4877c
PA
4762
4763
4764
4765
4766
4767
4768
c971b7fa
PA
4769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
4770$as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
4771if test "${gl_cv_c_amsterdam_compiler+set}" = set; then :
4772 $as_echo_n "(cached) " >&6
4773else
4774
4775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4776/* end confdefs.h. */
4777
4778#ifdef __ACK__
4779Amsterdam
4780#endif
4781
4782_ACEOF
4783if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4784 $EGREP "Amsterdam" >/dev/null 2>&1; then :
4785 gl_cv_c_amsterdam_compiler=yes
4786else
4787 gl_cv_c_amsterdam_compiler=no
4788fi
4789rm -f conftest*
4790
4791
4792fi
4793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
4794$as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
49e4877c
PA
4795
4796 if test $gl_cv_c_amsterdam_compiler = yes; then
4797 if test -z "$AR"; then
c971b7fa 4798 AR='cc -c.a'
49e4877c
PA
4799 fi
4800 if test -z "$ARFLAGS"; then
4801 ARFLAGS='-o'
4802 fi
4803 else
4804 :
4805 fi
4806
4807 if test -n "$ac_tool_prefix"; then
c971b7fa
PA
4808 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4809set dummy ${ac_tool_prefix}ar; ac_word=$2
4810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4811$as_echo_n "checking for $ac_word... " >&6; }
4812if test "${ac_cv_prog_AR+set}" = set; then :
4813 $as_echo_n "(cached) " >&6
4814else
4815 if test -n "$AR"; then
4816 ac_cv_prog_AR="$AR" # Let the user override the test.
4817else
4818as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4819for as_dir in $PATH
4820do
4821 IFS=$as_save_IFS
4822 test -z "$as_dir" && as_dir=.
4823 for ac_exec_ext in '' $ac_executable_extensions; do
4824 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4825 ac_cv_prog_AR="${ac_tool_prefix}ar"
4826 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4827 break 2
4828 fi
4829done
4830 done
4831IFS=$as_save_IFS
4832
4833fi
4834fi
4835AR=$ac_cv_prog_AR
4836if test -n "$AR"; then
4837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
4838$as_echo "$AR" >&6; }
4839else
4840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4841$as_echo "no" >&6; }
4842fi
4843
4844
4845fi
4846if test -z "$ac_cv_prog_AR"; then
4847 ac_ct_AR=$AR
4848 # Extract the first word of "ar", so it can be a program name with args.
4849set dummy ar; ac_word=$2
4850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4851$as_echo_n "checking for $ac_word... " >&6; }
4852if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
4853 $as_echo_n "(cached) " >&6
4854else
4855 if test -n "$ac_ct_AR"; then
4856 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4857else
4858as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4859for as_dir in $PATH
4860do
4861 IFS=$as_save_IFS
4862 test -z "$as_dir" && as_dir=.
4863 for ac_exec_ext in '' $ac_executable_extensions; do
4864 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4865 ac_cv_prog_ac_ct_AR="ar"
4866 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4867 break 2
4868 fi
4869done
4870 done
4871IFS=$as_save_IFS
4872
4873fi
4874fi
4875ac_ct_AR=$ac_cv_prog_ac_ct_AR
4876if test -n "$ac_ct_AR"; then
4877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
4878$as_echo "$ac_ct_AR" >&6; }
4879else
4880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4881$as_echo "no" >&6; }
4882fi
4883
4884 if test "x$ac_ct_AR" = x; then
4885 AR="ar"
4886 else
4887 case $cross_compiling:$ac_tool_warned in
4888yes:)
4889{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4890$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4891ac_tool_warned=yes ;;
4892esac
4893 AR=$ac_ct_AR
4894 fi
4895else
4896 AR="$ac_cv_prog_AR"
4897fi
4898
49e4877c
PA
4899 if test -z "$ARFLAGS"; then
4900 ARFLAGS='cr'
c971b7fa
PA
4901 fi
4902
4903
49e4877c 4904
c971b7fa
PA
4905 if test -z "$RANLIB"; then
4906 if test $gl_cv_c_amsterdam_compiler = yes; then
4907 RANLIB=':'
4908 else
4909 if test -n "$ac_tool_prefix"; then
4910 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4911set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4913$as_echo_n "checking for $ac_word... " >&6; }
4914if test "${ac_cv_prog_RANLIB+set}" = set; then :
4915 $as_echo_n "(cached) " >&6
4916else
4917 if test -n "$RANLIB"; then
4918 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4919else
4920as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4921for as_dir in $PATH
4922do
4923 IFS=$as_save_IFS
4924 test -z "$as_dir" && as_dir=.
4925 for ac_exec_ext in '' $ac_executable_extensions; do
4926 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4927 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4928 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4929 break 2
4930 fi
4931done
4932 done
4933IFS=$as_save_IFS
4934
4935fi
4936fi
4937RANLIB=$ac_cv_prog_RANLIB
4938if test -n "$RANLIB"; then
4939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4940$as_echo "$RANLIB" >&6; }
4941else
4942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4943$as_echo "no" >&6; }
4944fi
4945
4946
4947fi
4948if test -z "$ac_cv_prog_RANLIB"; then
4949 ac_ct_RANLIB=$RANLIB
4950 # Extract the first word of "ranlib", so it can be a program name with args.
4951set dummy ranlib; ac_word=$2
4952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4953$as_echo_n "checking for $ac_word... " >&6; }
4954if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4955 $as_echo_n "(cached) " >&6
4956else
4957 if test -n "$ac_ct_RANLIB"; then
4958 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4959else
4960as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4961for as_dir in $PATH
4962do
4963 IFS=$as_save_IFS
4964 test -z "$as_dir" && as_dir=.
4965 for ac_exec_ext in '' $ac_executable_extensions; do
4966 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4967 ac_cv_prog_ac_ct_RANLIB="ranlib"
4968 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4969 break 2
4970 fi
4971done
4972 done
4973IFS=$as_save_IFS
4974
4975fi
4976fi
4977ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4978if test -n "$ac_ct_RANLIB"; then
4979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4980$as_echo "$ac_ct_RANLIB" >&6; }
4981else
4982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4983$as_echo "no" >&6; }
4984fi
4985
4986 if test "x$ac_ct_RANLIB" = x; then
4987 RANLIB=":"
4988 else
4989 case $cross_compiling:$ac_tool_warned in
4990yes:)
4991{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4992$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4993ac_tool_warned=yes ;;
4994esac
4995 RANLIB=$ac_ct_RANLIB
4996 fi
4997else
4998 RANLIB="$ac_cv_prog_RANLIB"
4999fi
5000
5001 fi
5002 fi
5003
5004
4a626d0a
PA
5005ac_aux_dir=
5006for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
5007 for ac_t in install-sh install.sh shtool; do
5008 if test -f "$ac_dir/$ac_t"; then
5009 ac_aux_dir=$ac_dir
5010 ac_install_sh="$ac_aux_dir/$ac_t -c"
5011 break 2
5012 fi
5013 done
5014done
5015if test -z "$ac_aux_dir"; then
5016 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
5017fi
5018
5019# These three variables are undocumented and unsupported,
5020# and are intended to be withdrawn in a future Autoconf release.
5021# They can cause serious problems if a builder's source tree is in a directory
5022# whose full name contains unusual characters.
5023ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5024ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5025ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5026
5027
5028# Make sure we can run config.sub.
5029$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
5030 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
5031
5032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5033$as_echo_n "checking build system type... " >&6; }
5034if test "${ac_cv_build+set}" = set; then :
5035 $as_echo_n "(cached) " >&6
5036else
5037 ac_build_alias=$build_alias
5038test "x$ac_build_alias" = x &&
5039 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5040test "x$ac_build_alias" = x &&
5041 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
5042ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
5043 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
5044
5045fi
5046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5047$as_echo "$ac_cv_build" >&6; }
5048case $ac_cv_build in
5049*-*-*) ;;
5050*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
5051esac
5052build=$ac_cv_build
5053ac_save_IFS=$IFS; IFS='-'
5054set x $ac_cv_build
5055shift
5056build_cpu=$1
5057build_vendor=$2
5058shift; shift
5059# Remember, the first character of IFS is used to create $*,
5060# except with old shells:
5061build_os=$*
5062IFS=$ac_save_IFS
5063case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5064
5065
5066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5067$as_echo_n "checking host system type... " >&6; }
5068if test "${ac_cv_host+set}" = set; then :
5069 $as_echo_n "(cached) " >&6
5070else
5071 if test "x$host_alias" = x; then
5072 ac_cv_host=$ac_cv_build
5073else
5074 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
5075 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
5076fi
5077
5078fi
5079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5080$as_echo "$ac_cv_host" >&6; }
5081case $ac_cv_host in
5082*-*-*) ;;
5083*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
5084esac
5085host=$ac_cv_host
5086ac_save_IFS=$IFS; IFS='-'
5087set x $ac_cv_host
5088shift
5089host_cpu=$1
5090host_vendor=$2
5091shift; shift
5092# Remember, the first character of IFS is used to create $*,
5093# except with old shells:
5094host_os=$*
5095IFS=$ac_save_IFS
5096case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5097
5098
c971b7fa
PA
5099
5100
88b48903
WN
5101
5102 # IEEE behaviour is the default on all CPUs except Alpha and SH
5103 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
5104 # and the GCC 4.1.2 manual).
5105 case "$host_cpu" in
5106 alpha*)
5107 # On Alpha systems, a compiler option provides the behaviour.
5108 # See the ieee(3) manual page, also available at
5109 # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
5110 if test -n "$GCC"; then
5111 # GCC has the option -mieee.
5112 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
5113 CPPFLAGS="$CPPFLAGS -mieee"
5114 else
5115 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
5116 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
5117 CPPFLAGS="$CPPFLAGS -ieee"
5118 fi
5119 ;;
5120 sh*)
5121 if test -n "$GCC"; then
5122 # GCC has the option -mieee.
5123 CPPFLAGS="$CPPFLAGS -mieee"
5124 fi
5125 ;;
5126 esac
5127
2196f55f
YQ
5128# Check whether --enable-largefile was given.
5129if test "${enable_largefile+set}" = set; then :
5130 enableval=$enable_largefile;
5131fi
5132
5133if test "$enable_largefile" != no; then
5134
5135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5136$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5137if test "${ac_cv_sys_largefile_CC+set}" = set; then :
5138 $as_echo_n "(cached) " >&6
5139else
5140 ac_cv_sys_largefile_CC=no
5141 if test "$GCC" != yes; then
5142 ac_save_CC=$CC
5143 while :; do
5144 # IRIX 6.2 and later do not support large files by default,
5145 # so use the C compiler's -n32 option if that helps.
5146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5147/* end confdefs.h. */
5148#include <sys/types.h>
5149 /* Check that off_t can represent 2**63 - 1 correctly.
5150 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5151 since some C++ compilers masquerading as C compilers
5152 incorrectly reject 9223372036854775807. */
5153#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5154 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5155 && LARGE_OFF_T % 2147483647 == 1)
5156 ? 1 : -1];
5157int
5158main ()
5159{
5160
5161 ;
5162 return 0;
5163}
5164_ACEOF
5165 if ac_fn_c_try_compile "$LINENO"; then :
5166 break
5167fi
5168rm -f core conftest.err conftest.$ac_objext
5169 CC="$CC -n32"
5170 if ac_fn_c_try_compile "$LINENO"; then :
5171 ac_cv_sys_largefile_CC=' -n32'; break
5172fi
5173rm -f core conftest.err conftest.$ac_objext
5174 break
5175 done
5176 CC=$ac_save_CC
5177 rm -f conftest.$ac_ext
5178 fi
5179fi
5180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5181$as_echo "$ac_cv_sys_largefile_CC" >&6; }
5182 if test "$ac_cv_sys_largefile_CC" != no; then
5183 CC=$CC$ac_cv_sys_largefile_CC
5184 fi
5185
5186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5187$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5188if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
5189 $as_echo_n "(cached) " >&6
5190else
5191 while :; do
5192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5193/* end confdefs.h. */
5194#include <sys/types.h>
5195 /* Check that off_t can represent 2**63 - 1 correctly.
5196 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5197 since some C++ compilers masquerading as C compilers
5198 incorrectly reject 9223372036854775807. */
5199#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5200 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5201 && LARGE_OFF_T % 2147483647 == 1)
5202 ? 1 : -1];
5203int
5204main ()
5205{
5206
5207 ;
5208 return 0;
5209}
5210_ACEOF
5211if ac_fn_c_try_compile "$LINENO"; then :
5212 ac_cv_sys_file_offset_bits=no; break
5213fi
5214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5216/* end confdefs.h. */
5217#define _FILE_OFFSET_BITS 64
5218#include <sys/types.h>
5219 /* Check that off_t can represent 2**63 - 1 correctly.
5220 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5221 since some C++ compilers masquerading as C compilers
5222 incorrectly reject 9223372036854775807. */
5223#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5224 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5225 && LARGE_OFF_T % 2147483647 == 1)
5226 ? 1 : -1];
5227int
5228main ()
5229{
5230
5231 ;
5232 return 0;
5233}
5234_ACEOF
5235if ac_fn_c_try_compile "$LINENO"; then :
5236 ac_cv_sys_file_offset_bits=64; break
5237fi
5238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5239 ac_cv_sys_file_offset_bits=unknown
5240 break
5241done
5242fi
5243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5244$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5245case $ac_cv_sys_file_offset_bits in #(
5246 no | unknown) ;;
5247 *)
5248cat >>confdefs.h <<_ACEOF
5249#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5250_ACEOF
5251;;
5252esac
5253rm -rf conftest*
5254 if test $ac_cv_sys_file_offset_bits = unknown; then
5255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5256$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5257if test "${ac_cv_sys_large_files+set}" = set; then :
5258 $as_echo_n "(cached) " >&6
5259else
5260 while :; do
5261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5262/* end confdefs.h. */
5263#include <sys/types.h>
5264 /* Check that off_t can represent 2**63 - 1 correctly.
5265 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5266 since some C++ compilers masquerading as C compilers
5267 incorrectly reject 9223372036854775807. */
5268#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5269 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5270 && LARGE_OFF_T % 2147483647 == 1)
5271 ? 1 : -1];
5272int
5273main ()
5274{
5275
5276 ;
5277 return 0;
5278}
5279_ACEOF
5280if ac_fn_c_try_compile "$LINENO"; then :
5281 ac_cv_sys_large_files=no; break
5282fi
5283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5285/* end confdefs.h. */
5286#define _LARGE_FILES 1
5287#include <sys/types.h>
5288 /* Check that off_t can represent 2**63 - 1 correctly.
5289 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5290 since some C++ compilers masquerading as C compilers
5291 incorrectly reject 9223372036854775807. */
5292#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5293 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5294 && LARGE_OFF_T % 2147483647 == 1)
5295 ? 1 : -1];
5296int
5297main ()
5298{
5299
5300 ;
5301 return 0;
5302}
5303_ACEOF
5304if ac_fn_c_try_compile "$LINENO"; then :
5305 ac_cv_sys_large_files=1; break
5306fi
5307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5308 ac_cv_sys_large_files=unknown
5309 break
5310done
5311fi
5312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5313$as_echo "$ac_cv_sys_large_files" >&6; }
5314case $ac_cv_sys_large_files in #(
5315 no | unknown) ;;
5316 *)
5317cat >>confdefs.h <<_ACEOF
5318#define _LARGE_FILES $ac_cv_sys_large_files
5319_ACEOF
5320;;
5321esac
5322rm -rf conftest*
5323 fi
5324
5325
4a626d0a
PA
5326$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
5327
2196f55f
YQ
5328fi
5329
88b48903
WN
5330
5331
49e4877c
PA
5332 # Pre-early section.
5333
5334
5335
4a626d0a 5336 # Code from module absolute-header:
8690e634
JK
5337 # Code from module alloca:
5338 # Code from module alloca-opt:
6ec2e0f5
SDJ
5339 # Code from module assure:
5340 # Code from module at-internal:
98399780 5341 # Code from module canonicalize-lgpl:
6a29c58e 5342 # Code from module chdir:
6ec2e0f5
SDJ
5343 # Code from module chdir-long:
5344 # Code from module cloexec:
5345 # Code from module close:
5346 # Code from module closedir:
8690e634 5347 # Code from module configmake:
6ec2e0f5
SDJ
5348 # Code from module d-ino:
5349 # Code from module d-type:
e26b6bb0 5350 # Code from module dirent:
18848e28 5351 # Code from module dirfd:
6a29c58e 5352 # Code from module dirname-lgpl:
2196f55f 5353 # Code from module dosname:
6a29c58e 5354 # Code from module double-slash-root:
6ec2e0f5
SDJ
5355 # Code from module dup:
5356 # Code from module dup2:
3d99e817 5357 # Code from module environ:
18848e28 5358 # Code from module errno:
6ec2e0f5
SDJ
5359 # Code from module error:
5360 # Code from module exitfail:
c971b7fa 5361 # Code from module extensions:
a512b375 5362 # Code from module extern-inline:
6ec2e0f5
SDJ
5363 # Code from module fchdir:
5364 # Code from module fcntl:
5365 # Code from module fcntl-h:
5366 # Code from module fd-hook:
5367 # Code from module fdopendir:
5368 # Code from module filename:
5369 # Code from module filenamecat-lgpl:
49e4877c 5370 # Code from module flexmember:
88b48903 5371 # Code from module float:
8690e634
JK
5372 # Code from module fnmatch:
5373 # Code from module fnmatch-gnu:
88b48903
WN
5374 # Code from module fpieee:
5375
5376 # Code from module fpucw:
5377 # Code from module frexp:
5378 # Code from module frexpl:
6ec2e0f5
SDJ
5379 # Code from module fstat:
5380 # Code from module fstatat:
5381 # Code from module getcwd:
5382 # Code from module getcwd-lgpl:
5383 # Code from module getdtablesize:
5384 # Code from module getlogin_r:
5385 # Code from module getprogname:
5386 # Code from module gettext-h:
4a626d0a 5387 # Code from module gettimeofday:
6ec2e0f5 5388 # Code from module glob:
49e4877c 5389 # Code from module hard-locale:
c971b7fa 5390 # Code from module include_next:
6ec2e0f5 5391 # Code from module intprops:
c971b7fa
PA
5392 # Code from module inttypes:
5393 # Code from module inttypes-incomplete:
88b48903
WN
5394 # Code from module isnand-nolibm:
5395 # Code from module isnanl-nolibm:
2196f55f
YQ
5396 # Code from module largefile:
5397
49e4877c 5398 # Code from module limits-h:
8690e634 5399 # Code from module localcharset:
f45c62c4 5400 # Code from module lstat:
6a29c58e 5401 # Code from module malloc-posix:
98399780 5402 # Code from module malloca:
88b48903 5403 # Code from module math:
8690e634
JK
5404 # Code from module mbrtowc:
5405 # Code from module mbsinit:
5406 # Code from module mbsrtowcs:
c971b7fa
PA
5407 # Code from module memchr:
5408 # Code from module memmem:
5409 # Code from module memmem-simple:
6ec2e0f5
SDJ
5410 # Code from module mempcpy:
5411 # Code from module memrchr:
5412 # Code from module msvc-inval:
5413 # Code from module msvc-nothrow:
c971b7fa 5414 # Code from module multiarch:
98399780 5415 # Code from module nocrash:
6ec2e0f5
SDJ
5416 # Code from module open:
5417 # Code from module openat:
5418 # Code from module openat-die:
5419 # Code from module openat-h:
5420 # Code from module opendir:
38ec2207 5421 # Code from module pathmax:
8424cc97 5422 # Code from module rawmemchr:
6ec2e0f5 5423 # Code from module readdir:
2196f55f 5424 # Code from module readlink:
6ec2e0f5 5425 # Code from module realloc-posix:
6a29c58e 5426 # Code from module rename:
6ec2e0f5 5427 # Code from module rewinddir:
6a29c58e
YQ
5428 # Code from module rmdir:
5429 # Code from module same-inode:
6ec2e0f5 5430 # Code from module save-cwd:
3d99e817 5431 # Code from module setenv:
0750520d 5432 # Code from module signal-h:
98399780 5433 # Code from module snippet/_Noreturn:
c971b7fa
PA
5434 # Code from module snippet/arg-nonnull:
5435 # Code from module snippet/c++defs:
5436 # Code from module snippet/warn-on-use:
8839a007 5437 # Code from module ssize_t:
2196f55f 5438 # Code from module stat:
8690e634 5439 # Code from module stdbool:
c971b7fa
PA
5440 # Code from module stddef:
5441 # Code from module stdint:
6a29c58e 5442 # Code from module stdio:
98399780 5443 # Code from module stdlib:
8424cc97 5444 # Code from module strchrnul:
6ec2e0f5 5445 # Code from module strdup-posix:
8690e634 5446 # Code from module streq:
6ec2e0f5
SDJ
5447 # Code from module strerror:
5448 # Code from module strerror-override:
c971b7fa 5449 # Code from module string:
8690e634 5450 # Code from module strnlen1:
63ce7108
TT
5451 # Code from module strstr:
5452 # Code from module strstr-simple:
421693b0 5453 # Code from module strtok_r:
09607c9e 5454 # Code from module sys_stat:
4a626d0a 5455 # Code from module sys_time:
8839a007 5456 # Code from module sys_types:
09607c9e 5457 # Code from module time:
8839a007 5458 # Code from module unistd:
6ec2e0f5 5459 # Code from module unistd-safer:
3d99e817 5460 # Code from module unsetenv:
c971b7fa 5461 # Code from module update-copyright:
8690e634
JK
5462 # Code from module verify:
5463 # Code from module wchar:
5464 # Code from module wctype-h:
c971b7fa
PA
5465
5466ac_ext=c
5467ac_cpp='$CPP $CPPFLAGS'
5468ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5469ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5470ac_compiler_gnu=$ac_cv_c_compiler_gnu
5471if test -n "$ac_tool_prefix"; then
5472 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5473set dummy ${ac_tool_prefix}gcc; ac_word=$2
5474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5475$as_echo_n "checking for $ac_word... " >&6; }
5476if test "${ac_cv_prog_CC+set}" = set; then :
5477 $as_echo_n "(cached) " >&6
5478else
5479 if test -n "$CC"; then
5480 ac_cv_prog_CC="$CC" # Let the user override the test.
5481else
5482as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5483for as_dir in $PATH
5484do
5485 IFS=$as_save_IFS
5486 test -z "$as_dir" && as_dir=.
5487 for ac_exec_ext in '' $ac_executable_extensions; do
5488 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5489 ac_cv_prog_CC="${ac_tool_prefix}gcc"
5490 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5491 break 2
5492 fi
5493done
5494 done
5495IFS=$as_save_IFS
5496
5497fi
5498fi
5499CC=$ac_cv_prog_CC
5500if test -n "$CC"; then
5501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5502$as_echo "$CC" >&6; }
5503else
5504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5505$as_echo "no" >&6; }
5506fi
5507
5508
5509fi
5510if test -z "$ac_cv_prog_CC"; then
5511 ac_ct_CC=$CC
5512 # Extract the first word of "gcc", so it can be a program name with args.
5513set dummy gcc; ac_word=$2
5514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5515$as_echo_n "checking for $ac_word... " >&6; }
5516if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5517 $as_echo_n "(cached) " >&6
5518else
5519 if test -n "$ac_ct_CC"; then
5520 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5521else
5522as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5523for as_dir in $PATH
5524do
5525 IFS=$as_save_IFS
5526 test -z "$as_dir" && as_dir=.
5527 for ac_exec_ext in '' $ac_executable_extensions; do
5528 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5529 ac_cv_prog_ac_ct_CC="gcc"
5530 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5531 break 2
5532 fi
5533done
5534 done
5535IFS=$as_save_IFS
5536
5537fi
5538fi
5539ac_ct_CC=$ac_cv_prog_ac_ct_CC
5540if test -n "$ac_ct_CC"; then
5541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5542$as_echo "$ac_ct_CC" >&6; }
5543else
5544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5545$as_echo "no" >&6; }
5546fi
5547
5548 if test "x$ac_ct_CC" = x; then
5549 CC=""
5550 else
5551 case $cross_compiling:$ac_tool_warned in
5552yes:)
5553{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5554$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5555ac_tool_warned=yes ;;
5556esac
5557 CC=$ac_ct_CC
5558 fi
5559else
5560 CC="$ac_cv_prog_CC"
5561fi
5562
5563if test -z "$CC"; then
5564 if test -n "$ac_tool_prefix"; then
5565 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5566set dummy ${ac_tool_prefix}cc; ac_word=$2
5567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5568$as_echo_n "checking for $ac_word... " >&6; }
5569if test "${ac_cv_prog_CC+set}" = set; then :
5570 $as_echo_n "(cached) " >&6
5571else
5572 if test -n "$CC"; then
5573 ac_cv_prog_CC="$CC" # Let the user override the test.
5574else
5575as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5576for as_dir in $PATH
5577do
5578 IFS=$as_save_IFS
5579 test -z "$as_dir" && as_dir=.
5580 for ac_exec_ext in '' $ac_executable_extensions; do
5581 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5582 ac_cv_prog_CC="${ac_tool_prefix}cc"
5583 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5584 break 2
5585 fi
5586done
5587 done
5588IFS=$as_save_IFS
5589
5590fi
5591fi
5592CC=$ac_cv_prog_CC
5593if test -n "$CC"; then
5594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5595$as_echo "$CC" >&6; }
5596else
5597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5598$as_echo "no" >&6; }
5599fi
5600
5601
5602 fi
5603fi
5604if test -z "$CC"; then
5605 # Extract the first word of "cc", so it can be a program name with args.
5606set dummy cc; ac_word=$2
5607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5608$as_echo_n "checking for $ac_word... " >&6; }
5609if test "${ac_cv_prog_CC+set}" = set; then :
5610 $as_echo_n "(cached) " >&6
5611else
5612 if test -n "$CC"; then
5613 ac_cv_prog_CC="$CC" # Let the user override the test.
5614else
5615 ac_prog_rejected=no
5616as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5617for as_dir in $PATH
5618do
5619 IFS=$as_save_IFS
5620 test -z "$as_dir" && as_dir=.
5621 for ac_exec_ext in '' $ac_executable_extensions; do
5622 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5623 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5624 ac_prog_rejected=yes
5625 continue
5626 fi
5627 ac_cv_prog_CC="cc"
5628 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5629 break 2
5630 fi
5631done
5632 done
5633IFS=$as_save_IFS
5634
5635if test $ac_prog_rejected = yes; then
5636 # We found a bogon in the path, so make sure we never use it.
5637 set dummy $ac_cv_prog_CC
5638 shift
5639 if test $# != 0; then
5640 # We chose a different compiler from the bogus one.
5641 # However, it has the same basename, so the bogon will be chosen
5642 # first if we set CC to just the basename; use the full file name.
5643 shift
5644 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
5645 fi
5646fi
5647fi
5648fi
5649CC=$ac_cv_prog_CC
5650if test -n "$CC"; then
5651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5652$as_echo "$CC" >&6; }
5653else
5654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5655$as_echo "no" >&6; }
5656fi
5657
5658
5659fi
5660if test -z "$CC"; then
5661 if test -n "$ac_tool_prefix"; then
5662 for ac_prog in cl.exe
5663 do
5664 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5665set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5667$as_echo_n "checking for $ac_word... " >&6; }
5668if test "${ac_cv_prog_CC+set}" = set; then :
5669 $as_echo_n "(cached) " >&6
5670else
5671 if test -n "$CC"; then
5672 ac_cv_prog_CC="$CC" # Let the user override the test.
5673else
5674as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5675for as_dir in $PATH
5676do
5677 IFS=$as_save_IFS
5678 test -z "$as_dir" && as_dir=.
5679 for ac_exec_ext in '' $ac_executable_extensions; do
5680 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5681 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5682 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5683 break 2
5684 fi
5685done
5686 done
5687IFS=$as_save_IFS
5688
5689fi
5690fi
5691CC=$ac_cv_prog_CC
5692if test -n "$CC"; then
5693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5694$as_echo "$CC" >&6; }
5695else
5696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5697$as_echo "no" >&6; }
5698fi
5699
5700
5701 test -n "$CC" && break
5702 done
5703fi
5704if test -z "$CC"; then
5705 ac_ct_CC=$CC
5706 for ac_prog in cl.exe
5707do
5708 # Extract the first word of "$ac_prog", so it can be a program name with args.
5709set dummy $ac_prog; ac_word=$2
5710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5711$as_echo_n "checking for $ac_word... " >&6; }
5712if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5713 $as_echo_n "(cached) " >&6
5714else
5715 if test -n "$ac_ct_CC"; then
5716 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5717else
5718as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5719for as_dir in $PATH
5720do
5721 IFS=$as_save_IFS
5722 test -z "$as_dir" && as_dir=.
5723 for ac_exec_ext in '' $ac_executable_extensions; do
5724 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5725 ac_cv_prog_ac_ct_CC="$ac_prog"
5726 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5727 break 2
5728 fi
5729done
5730 done
5731IFS=$as_save_IFS
5732
5733fi
5734fi
5735ac_ct_CC=$ac_cv_prog_ac_ct_CC
5736if test -n "$ac_ct_CC"; then
5737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5738$as_echo "$ac_ct_CC" >&6; }
5739else
5740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5741$as_echo "no" >&6; }
5742fi
5743
5744
5745 test -n "$ac_ct_CC" && break
5746done
5747
5748 if test "x$ac_ct_CC" = x; then
5749 CC=""
5750 else
5751 case $cross_compiling:$ac_tool_warned in
5752yes:)
5753{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5754$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5755ac_tool_warned=yes ;;
5756esac
5757 CC=$ac_ct_CC
5758 fi
5759fi
5760
5761fi
5762
5763
5764test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5765$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5766as_fn_error "no acceptable C compiler found in \$PATH
5767See \`config.log' for more details." "$LINENO" 5; }
5768
5769# Provide some information about the compiler.
5770$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5771set X $ac_compile
5772ac_compiler=$2
5773for ac_option in --version -v -V -qversion; do
5774 { { ac_try="$ac_compiler $ac_option >&5"
5775case "(($ac_try" in
5776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5777 *) ac_try_echo=$ac_try;;
5778esac
5779eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5780$as_echo "$ac_try_echo"; } >&5
5781 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5782 ac_status=$?
5783 if test -s conftest.err; then
5784 sed '10a\
5785... rest of stderr output deleted ...
5786 10q' conftest.err >conftest.er1
5787 cat conftest.er1 >&5
5788 rm -f conftest.er1 conftest.err
5789 fi
5790 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5791 test $ac_status = 0; }
5792done
5793
5794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5795$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
5796if test "${ac_cv_c_compiler_gnu+set}" = set; then :
5797 $as_echo_n "(cached) " >&6
5798else
5799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5800/* end confdefs.h. */
5801
5802int
5803main ()
5804{
5805#ifndef __GNUC__
5806 choke me
5807#endif
5808
5809 ;
5810 return 0;
5811}
5812_ACEOF
5813if ac_fn_c_try_compile "$LINENO"; then :
5814 ac_compiler_gnu=yes
5815else
5816 ac_compiler_gnu=no
5817fi
5818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5819ac_cv_c_compiler_gnu=$ac_compiler_gnu
5820
5821fi
5822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5823$as_echo "$ac_cv_c_compiler_gnu" >&6; }
5824if test $ac_compiler_gnu = yes; then
5825 GCC=yes
5826else
5827 GCC=
5828fi
5829ac_test_CFLAGS=${CFLAGS+set}
5830ac_save_CFLAGS=$CFLAGS
5831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5832$as_echo_n "checking whether $CC accepts -g... " >&6; }
5833if test "${ac_cv_prog_cc_g+set}" = set; then :
5834 $as_echo_n "(cached) " >&6
5835else
5836 ac_save_c_werror_flag=$ac_c_werror_flag
5837 ac_c_werror_flag=yes
5838 ac_cv_prog_cc_g=no
5839 CFLAGS="-g"
5840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5841/* end confdefs.h. */
5842
5843int
5844main ()
5845{
5846
5847 ;
5848 return 0;
5849}
5850_ACEOF
5851if ac_fn_c_try_compile "$LINENO"; then :
5852 ac_cv_prog_cc_g=yes
5853else
5854 CFLAGS=""
5855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5856/* end confdefs.h. */
5857
5858int
5859main ()
5860{
5861
5862 ;
5863 return 0;
5864}
5865_ACEOF
5866if ac_fn_c_try_compile "$LINENO"; then :
5867
5868else
5869 ac_c_werror_flag=$ac_save_c_werror_flag
5870 CFLAGS="-g"
5871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5872/* end confdefs.h. */
5873
5874int
5875main ()
5876{
5877
5878 ;
5879 return 0;
5880}
5881_ACEOF
5882if ac_fn_c_try_compile "$LINENO"; then :
5883 ac_cv_prog_cc_g=yes
5884fi
5885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5886fi
5887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5888fi
5889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5890 ac_c_werror_flag=$ac_save_c_werror_flag
5891fi
5892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5893$as_echo "$ac_cv_prog_cc_g" >&6; }
5894if test "$ac_test_CFLAGS" = set; then
5895 CFLAGS=$ac_save_CFLAGS
5896elif test $ac_cv_prog_cc_g = yes; then
5897 if test "$GCC" = yes; then
5898 CFLAGS="-g -O2"
5899 else
5900 CFLAGS="-g"
5901 fi
5902else
5903 if test "$GCC" = yes; then
5904 CFLAGS="-O2"
5905 else
5906 CFLAGS=
5907 fi
5908fi
5909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5910$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5911if test "${ac_cv_prog_cc_c89+set}" = set; then :
5912 $as_echo_n "(cached) " >&6
5913else
5914 ac_cv_prog_cc_c89=no
5915ac_save_CC=$CC
5916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5917/* end confdefs.h. */
5918#include <stdarg.h>
5919#include <stdio.h>
5920#include <sys/types.h>
5921#include <sys/stat.h>
5922/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5923struct buf { int x; };
5924FILE * (*rcsopen) (struct buf *, struct stat *, int);
5925static char *e (p, i)
5926 char **p;
5927 int i;
5928{
5929 return p[i];
5930}
5931static char *f (char * (*g) (char **, int), char **p, ...)
5932{
5933 char *s;
5934 va_list v;
5935 va_start (v,p);
5936 s = g (p, va_arg (v,int));
5937 va_end (v);
5938 return s;
5939}
5940
5941/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5942 function prototypes and stuff, but not '\xHH' hex character constants.
5943 These don't provoke an error unfortunately, instead are silently treated
5944 as 'x'. The following induces an error, until -std is added to get
5945 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5946 array size at least. It's necessary to write '\x00'==0 to get something
5947 that's true only with -std. */
5948int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5949
5950/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5951 inside strings and character constants. */
5952#define FOO(x) 'x'
5953int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5954
5955int test (int i, double x);
5956struct s1 {int (*f) (int a);};
5957struct s2 {int (*f) (double a);};
5958int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5959int argc;
5960char **argv;
5961int
5962main ()
5963{
5964return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5965 ;
5966 return 0;
5967}
5968_ACEOF
5969for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5970 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5971do
5972 CC="$ac_save_CC $ac_arg"
5973 if ac_fn_c_try_compile "$LINENO"; then :
5974 ac_cv_prog_cc_c89=$ac_arg
5975fi
5976rm -f core conftest.err conftest.$ac_objext
5977 test "x$ac_cv_prog_cc_c89" != "xno" && break
5978done
5979rm -f conftest.$ac_ext
5980CC=$ac_save_CC
5981
5982fi
5983# AC_CACHE_VAL
5984case "x$ac_cv_prog_cc_c89" in
5985 x)
5986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5987$as_echo "none needed" >&6; } ;;
5988 xno)
5989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5990$as_echo "unsupported" >&6; } ;;
5991 *)
5992 CC="$CC $ac_cv_prog_cc_c89"
5993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5994$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5995esac
5996if test "x$ac_cv_prog_cc_c89" != xno; then :
5997
5998fi
5999
6000ac_ext=c
6001ac_cpp='$CPP $CPPFLAGS'
6002ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6003ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6004ac_compiler_gnu=$ac_cv_c_compiler_gnu
6005
6006
6007am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
6008
6009
6010ac_aux_dir=
6011for ac_dir in ../.. "$srcdir"/../..; do
6012 for ac_t in install-sh install.sh shtool; do
6013 if test -f "$ac_dir/$ac_t"; then
6014 ac_aux_dir=$ac_dir
6015 ac_install_sh="$ac_aux_dir/$ac_t -c"
6016 break 2
6017 fi
6018 done
6019done
6020if test -z "$ac_aux_dir"; then
6021 as_fn_error "cannot find install-sh, install.sh, or shtool in ../.. \"$srcdir\"/../.." "$LINENO" 5
6022fi
6023
6024# These three variables are undocumented and unsupported,
6025# and are intended to be withdrawn in a future Autoconf release.
6026# They can cause serious problems if a builder's source tree is in a directory
6027# whose full name contains unusual characters.
6028ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
6029ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
6030ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
6031
6032
6033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6034$as_echo_n "checking target system type... " >&6; }
6035if test "${ac_cv_target+set}" = set; then :
6036 $as_echo_n "(cached) " >&6
6037else
6038 if test "x$target_alias" = x; then
6039 ac_cv_target=$ac_cv_host
6040else
6041 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6042 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6043fi
6044
6045fi
6046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6047$as_echo "$ac_cv_target" >&6; }
6048case $ac_cv_target in
6049*-*-*) ;;
6050*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
6051esac
6052target=$ac_cv_target
6053ac_save_IFS=$IFS; IFS='-'
6054set x $ac_cv_target
6055shift
6056target_cpu=$1
6057target_vendor=$2
6058shift; shift
6059# Remember, the first character of IFS is used to create $*,
6060# except with old shells:
6061target_os=$*
6062IFS=$ac_save_IFS
6063case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6064
6065
6066# The aliases save the names the user supplied, while $host etc.
6067# will get canonicalized.
6068test -n "$target_alias" &&
6069 test "$program_prefix$program_suffix$program_transform_name" = \
6070 NONENONEs,x,x, &&
6071 program_prefix=${target_alias}-
6072
6073
6074
6075
6076
6077
6078
6079 LIBC_FATAL_STDERR_=1
6080 export LIBC_FATAL_STDERR_
6081
8690e634
JK
6082# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6083# for constant arguments. Useless!
6084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
6085$as_echo_n "checking for working alloca.h... " >&6; }
6086if test "${ac_cv_working_alloca_h+set}" = set; then :
c971b7fa
PA
6087 $as_echo_n "(cached) " >&6
6088else
8690e634 6089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 6090/* end confdefs.h. */
8690e634 6091#include <alloca.h>
c971b7fa
PA
6092int
6093main ()
6094{
8690e634
JK
6095char *p = (char *) alloca (2 * sizeof (int));
6096 if (p) return 0;
c971b7fa
PA
6097 ;
6098 return 0;
6099}
c971b7fa
PA
6100_ACEOF
6101if ac_fn_c_try_link "$LINENO"; then :
8690e634 6102 ac_cv_working_alloca_h=yes
c971b7fa 6103else
8690e634 6104 ac_cv_working_alloca_h=no
c971b7fa
PA
6105fi
6106rm -f core conftest.err conftest.$ac_objext \
6107 conftest$ac_exeext conftest.$ac_ext
c971b7fa 6108fi
8690e634
JK
6109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
6110$as_echo "$ac_cv_working_alloca_h" >&6; }
6111if test $ac_cv_working_alloca_h = yes; then
c971b7fa 6112
8690e634 6113$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c971b7fa 6114
8690e634 6115fi
c971b7fa 6116
8690e634
JK
6117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
6118$as_echo_n "checking for alloca... " >&6; }
6119if test "${ac_cv_func_alloca_works+set}" = set; then :
c971b7fa 6120 $as_echo_n "(cached) " >&6
c971b7fa
PA
6121else
6122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6123/* end confdefs.h. */
8690e634
JK
6124#ifdef __GNUC__
6125# define alloca __builtin_alloca
6126#else
6127# ifdef _MSC_VER
6128# include <malloc.h>
6129# define alloca _alloca
6130# else
6131# ifdef HAVE_ALLOCA_H
6132# include <alloca.h>
6133# else
6134# ifdef _AIX
6135 #pragma alloca
6136# else
6137# ifndef alloca /* predefined by HP cc +Olibcalls */
6138char *alloca ();
6139# endif
6140# endif
6141# endif
6142# endif
6143#endif
6144
c971b7fa
PA
6145int
6146main ()
6147{
8690e634
JK
6148char *p = (char *) alloca (1);
6149 if (p) return 0;
c971b7fa
PA
6150 ;
6151 return 0;
6152}
6153_ACEOF
8690e634
JK
6154if ac_fn_c_try_link "$LINENO"; then :
6155 ac_cv_func_alloca_works=yes
c971b7fa 6156else
8690e634 6157 ac_cv_func_alloca_works=no
c971b7fa 6158fi
8690e634
JK
6159rm -f core conftest.err conftest.$ac_objext \
6160 conftest$ac_exeext conftest.$ac_ext
c971b7fa 6161fi
a143c6de
JB
6162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
6163$as_echo "$ac_cv_func_alloca_works" >&6; }
c971b7fa 6164
a143c6de 6165if test $ac_cv_func_alloca_works = yes; then
c971b7fa 6166
a143c6de 6167$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c971b7fa 6168
a143c6de
JB
6169else
6170 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6171# that cause trouble. Some versions do not even contain alloca or
6172# contain a buggy version. If you still want to use their alloca,
6173# use ar to extract alloca.o from them instead of compiling alloca.c.
c971b7fa
PA
6174
6175
6176
6177
6178
a143c6de 6179ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
c971b7fa 6180
a143c6de 6181$as_echo "#define C_ALLOCA 1" >>confdefs.h
c971b7fa 6182
c971b7fa 6183
a143c6de
JB
6184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'alloca.c' needs Cray hooks" >&5
6185$as_echo_n "checking whether 'alloca.c' needs Cray hooks... " >&6; }
6186if test "${ac_cv_os_cray+set}" = set; then :
8690e634
JK
6187 $as_echo_n "(cached) " >&6
6188else
a143c6de 6189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 6190/* end confdefs.h. */
a143c6de
JB
6191#if defined CRAY && ! defined CRAY2
6192webecray
6193#else
6194wenotbecray
8690e634 6195#endif
c971b7fa 6196
8690e634
JK
6197_ACEOF
6198if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
a143c6de
JB
6199 $EGREP "webecray" >/dev/null 2>&1; then :
6200 ac_cv_os_cray=yes
8690e634 6201else
a143c6de 6202 ac_cv_os_cray=no
8690e634
JK
6203fi
6204rm -f conftest*
c971b7fa 6205
c0fc7f8b 6206fi
a143c6de
JB
6207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
6208$as_echo "$ac_cv_os_cray" >&6; }
6209if test $ac_cv_os_cray = yes; then
6210 for ac_func in _getb67 GETB67 getb67; do
6211 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6212ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6213eval as_val=\$$as_ac_var
6214 if test "x$as_val" = x""yes; then :
c0fc7f8b 6215
a143c6de
JB
6216cat >>confdefs.h <<_ACEOF
6217#define CRAY_STACKSEG_END $ac_func
6218_ACEOF
c971b7fa 6219
a143c6de 6220 break
8690e634 6221fi
c971b7fa 6222
a143c6de 6223 done
8690e634 6224fi
c0fc7f8b 6225
a143c6de
JB
6226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
6227$as_echo_n "checking stack direction for C alloca... " >&6; }
6228if test "${ac_cv_c_stack_direction+set}" = set; then :
c971b7fa
PA
6229 $as_echo_n "(cached) " >&6
6230else
a143c6de
JB
6231 if test "$cross_compiling" = yes; then :
6232 ac_cv_c_stack_direction=0
6233else
6234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 6235/* end confdefs.h. */
a143c6de
JB
6236$ac_includes_default
6237int
6238find_stack_direction (int *addr, int depth)
6239{
6240 int dir, dummy = 0;
6241 if (! addr)
6242 addr = &dummy;
6243 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
6244 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
6245 return dir + dummy;
6246}
8690e634 6247
a143c6de
JB
6248int
6249main (int argc, char **argv)
6250{
6251 return find_stack_direction (0, argc + !argv + 20) < 0;
6252}
c971b7fa 6253_ACEOF
a143c6de
JB
6254if ac_fn_c_try_run "$LINENO"; then :
6255 ac_cv_c_stack_direction=1
c971b7fa 6256else
a143c6de 6257 ac_cv_c_stack_direction=-1
8690e634 6258fi
a143c6de
JB
6259rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6260 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 6261fi
c971b7fa
PA
6262
6263fi
a143c6de
JB
6264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
6265$as_echo "$ac_cv_c_stack_direction" >&6; }
6266cat >>confdefs.h <<_ACEOF
6267#define STACK_DIRECTION $ac_cv_c_stack_direction
6268_ACEOF
8690e634 6269
c971b7fa
PA
6270
6271fi
c971b7fa
PA
6272
6273
98399780
YQ
6274 GNULIB__EXIT=0;
6275 GNULIB_ATOLL=0;
6276 GNULIB_CALLOC_POSIX=0;
6277 GNULIB_CANONICALIZE_FILE_NAME=0;
6278 GNULIB_GETLOADAVG=0;
6279 GNULIB_GETSUBOPT=0;
6280 GNULIB_GRANTPT=0;
6281 GNULIB_MALLOC_POSIX=0;
6282 GNULIB_MBTOWC=0;
6283 GNULIB_MKDTEMP=0;
6284 GNULIB_MKOSTEMP=0;
6285 GNULIB_MKOSTEMPS=0;
6286 GNULIB_MKSTEMP=0;
6287 GNULIB_MKSTEMPS=0;
6288 GNULIB_POSIX_OPENPT=0;
6289 GNULIB_PTSNAME=0;
6290 GNULIB_PTSNAME_R=0;
6291 GNULIB_PUTENV=0;
4a626d0a 6292 GNULIB_QSORT_R=0;
98399780
YQ
6293 GNULIB_RANDOM=0;
6294 GNULIB_RANDOM_R=0;
6295 GNULIB_REALLOC_POSIX=0;
6296 GNULIB_REALPATH=0;
6297 GNULIB_RPMATCH=0;
4a626d0a 6298 GNULIB_SECURE_GETENV=0;
98399780
YQ
6299 GNULIB_SETENV=0;
6300 GNULIB_STRTOD=0;
6301 GNULIB_STRTOLL=0;
6302 GNULIB_STRTOULL=0;
6303 GNULIB_SYSTEM_POSIX=0;
6304 GNULIB_UNLOCKPT=0;
6305 GNULIB_UNSETENV=0;
6306 GNULIB_WCTOMB=0;
6307 HAVE__EXIT=1;
6308 HAVE_ATOLL=1;
6309 HAVE_CANONICALIZE_FILE_NAME=1;
6310 HAVE_DECL_GETLOADAVG=1;
6311 HAVE_GETSUBOPT=1;
6312 HAVE_GRANTPT=1;
6313 HAVE_MKDTEMP=1;
6314 HAVE_MKOSTEMP=1;
6315 HAVE_MKOSTEMPS=1;
6316 HAVE_MKSTEMP=1;
6317 HAVE_MKSTEMPS=1;
6318 HAVE_POSIX_OPENPT=1;
6319 HAVE_PTSNAME=1;
6320 HAVE_PTSNAME_R=1;
4c62b19f 6321 HAVE_QSORT_R=1;
98399780
YQ
6322 HAVE_RANDOM=1;
6323 HAVE_RANDOM_H=1;
6324 HAVE_RANDOM_R=1;
6325 HAVE_REALPATH=1;
6326 HAVE_RPMATCH=1;
4a626d0a 6327 HAVE_SECURE_GETENV=1;
98399780
YQ
6328 HAVE_SETENV=1;
6329 HAVE_DECL_SETENV=1;
6330 HAVE_STRTOD=1;
6331 HAVE_STRTOLL=1;
6332 HAVE_STRTOULL=1;
6333 HAVE_STRUCT_RANDOM_DATA=1;
6334 HAVE_SYS_LOADAVG_H=0;
6335 HAVE_UNLOCKPT=1;
6336 HAVE_DECL_UNSETENV=1;
6337 REPLACE_CALLOC=0;
6338 REPLACE_CANONICALIZE_FILE_NAME=0;
6339 REPLACE_MALLOC=0;
6340 REPLACE_MBTOWC=0;
6341 REPLACE_MKSTEMP=0;
6342 REPLACE_PTSNAME=0;
6343 REPLACE_PTSNAME_R=0;
6344 REPLACE_PUTENV=0;
4a626d0a 6345 REPLACE_QSORT_R=0;
98399780
YQ
6346 REPLACE_RANDOM_R=0;
6347 REPLACE_REALLOC=0;
6348 REPLACE_REALPATH=0;
6349 REPLACE_SETENV=0;
6350 REPLACE_STRTOD=0;
6351 REPLACE_UNSETENV=0;
6352 REPLACE_WCTOMB=0;
6353
6354
6355
6356
6357 for ac_func in $ac_func_list
6358do :
6359 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6360ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6361eval as_val=\$$as_ac_var
6362 if test "x$as_val" = x""yes; then :
6363 cat >>confdefs.h <<_ACEOF
6364#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6365_ACEOF
6366
6367fi
6368done
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
6379$as_echo_n "checking whether // is distinct from /... " >&6; }
6380if test "${gl_cv_double_slash_root+set}" = set; then :
6381 $as_echo_n "(cached) " >&6
6382else
6383 if test x"$cross_compiling" = xyes ; then
6384 # When cross-compiling, there is no way to tell whether // is special
6385 # short of a list of hosts. However, the only known hosts to date
6386 # that have a distinct // are Apollo DomainOS (too old to port to),
6387 # Cygwin, and z/OS. If anyone knows of another system for which // has
6388 # special semantics and is distinct from /, please report it to
6389 # <bug-gnulib@gnu.org>.
6390 case $host in
6391 *-cygwin | i370-ibm-openedition)
6392 gl_cv_double_slash_root=yes ;;
6393 *)
6394 # Be optimistic and assume that / and // are the same when we
6395 # don't know.
6396 gl_cv_double_slash_root='unknown, assuming no' ;;
6397 esac
6398 else
6399 set x `ls -di / // 2>/dev/null`
6400 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
6401 gl_cv_double_slash_root=no
6402 else
6403 gl_cv_double_slash_root=yes
6404 fi
6405 fi
6406fi
6407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
6408$as_echo "$gl_cv_double_slash_root" >&6; }
6409 if test "$gl_cv_double_slash_root" = yes; then
6410
6411$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
6412
6413 fi
6414
6415
6416
6417
6418
6419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
6420$as_echo_n "checking whether realpath works... " >&6; }
6421if test "${gl_cv_func_realpath_works+set}" = set; then :
6422 $as_echo_n "(cached) " >&6
6423else
6424
6425 touch conftest.a
6426 mkdir conftest.d
6427 if test "$cross_compiling" = yes; then :
6428 case "$host_os" in
6429 # Guess yes on glibc systems.
6430 *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
6431 # If we don't know, assume the worst.
6432 *) gl_cv_func_realpath_works="guessing no" ;;
6433 esac
6434
6435else
6436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6437/* end confdefs.h. */
6438
6439
6440
6441#include <stdlib.h>
6442#if defined __MACH__ && defined __APPLE__
6443/* Avoid a crash on Mac OS X. */
6444#include <mach/mach.h>
6445#include <mach/mach_error.h>
6446#include <mach/thread_status.h>
6447#include <mach/exception.h>
6448#include <mach/task.h>
6449#include <pthread.h>
6450/* The exception port on which our thread listens. */
6451static mach_port_t our_exception_port;
6452/* The main function of the thread listening for exceptions of type
6453 EXC_BAD_ACCESS. */
6454static void *
6455mach_exception_thread (void *arg)
6456{
6457 /* Buffer for a message to be received. */
6458 struct {
6459 mach_msg_header_t head;
6460 mach_msg_body_t msgh_body;
6461 char data[1024];
6462 } msg;
6463 mach_msg_return_t retval;
6464 /* Wait for a message on the exception port. */
6465 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
6466 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
6467 if (retval != MACH_MSG_SUCCESS)
6468 abort ();
6469 exit (1);
6470}
6471static void
6472nocrash_init (void)
6473{
6474 mach_port_t self = mach_task_self ();
6475 /* Allocate a port on which the thread shall listen for exceptions. */
6476 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
6477 == KERN_SUCCESS) {
6478 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
6479 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
6480 MACH_MSG_TYPE_MAKE_SEND)
6481 == KERN_SUCCESS) {
6482 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
6483 for us. */
6484 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
6485 /* Create the thread listening on the exception port. */
6486 pthread_attr_t attr;
6487 pthread_t thread;
6488 if (pthread_attr_init (&attr) == 0
6489 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
6490 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
6491 pthread_attr_destroy (&attr);
6492 /* Replace the exception port info for these exceptions with our own.
6493 Note that we replace the exception port for the entire task, not only
6494 for a particular thread. This has the effect that when our exception
6495 port gets the message, the thread specific exception port has already
6496 been asked, and we don't need to bother about it.
6497 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
6498 task_set_exception_ports (self, mask, our_exception_port,
6499 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
6500 }
6501 }
6502 }
6503}
6504#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6505/* Avoid a crash on native Windows. */
6506#define WIN32_LEAN_AND_MEAN
6507#include <windows.h>
6508#include <winerror.h>
6509static LONG WINAPI
6510exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
6511{
6512 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
6513 {
6514 case EXCEPTION_ACCESS_VIOLATION:
6515 case EXCEPTION_IN_PAGE_ERROR:
6516 case EXCEPTION_STACK_OVERFLOW:
6517 case EXCEPTION_GUARD_PAGE:
6518 case EXCEPTION_PRIV_INSTRUCTION:
6519 case EXCEPTION_ILLEGAL_INSTRUCTION:
6520 case EXCEPTION_DATATYPE_MISALIGNMENT:
6521 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
6522 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
6523 exit (1);
6524 }
6525 return EXCEPTION_CONTINUE_SEARCH;
6526}
6527static void
6528nocrash_init (void)
6529{
6530 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
6531}
6532#else
6533/* Avoid a crash on POSIX systems. */
6534#include <signal.h>
49e4877c 6535#include <unistd.h>
98399780
YQ
6536/* A POSIX signal handler. */
6537static void
6538exception_handler (int sig)
6539{
49e4877c 6540 _exit (1);
98399780
YQ
6541}
6542static void
6543nocrash_init (void)
6544{
6545#ifdef SIGSEGV
6546 signal (SIGSEGV, exception_handler);
6547#endif
6548#ifdef SIGBUS
6549 signal (SIGBUS, exception_handler);
6550#endif
6551}
6552#endif
6553
6554 #include <stdlib.h>
6555 #include <string.h>
6556
6557int
6558main ()
6559{
6560
6561 int result = 0;
6562 {
6563 char *name = realpath ("conftest.a", NULL);
6564 if (!(name && *name == '/'))
6565 result |= 1;
49e4877c 6566 free (name);
98399780
YQ
6567 }
6568 {
6569 char *name = realpath ("conftest.b/../conftest.a", NULL);
6570 if (name != NULL)
6571 result |= 2;
49e4877c 6572 free (name);
98399780
YQ
6573 }
6574 {
6575 char *name = realpath ("conftest.a/", NULL);
6576 if (name != NULL)
6577 result |= 4;
49e4877c 6578 free (name);
98399780
YQ
6579 }
6580 {
6581 char *name1 = realpath (".", NULL);
6582 char *name2 = realpath ("conftest.d//./..", NULL);
49e4877c 6583 if (! name1 || ! name2 || strcmp (name1, name2))
98399780 6584 result |= 8;
49e4877c
PA
6585 free (name1);
6586 free (name2);
98399780
YQ
6587 }
6588 return result;
6589
6590 ;
6591 return 0;
6592}
6593
6594_ACEOF
6595if ac_fn_c_try_run "$LINENO"; then :
6596 gl_cv_func_realpath_works=yes
6597else
6598 gl_cv_func_realpath_works=no
6599fi
6600rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6601 conftest.$ac_objext conftest.beam conftest.$ac_ext
6602fi
6603
6604 rm -rf conftest.a conftest.d
6605
6606fi
6607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
6608$as_echo "$gl_cv_func_realpath_works" >&6; }
6609 case "$gl_cv_func_realpath_works" in
6610 *yes)
6611
6612$as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
6613
6614 ;;
6615 esac
6616
6617
6618
6619
6620 for ac_header in $ac_header_list
6621do :
6622 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6623ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6624"
6625eval as_val=\$$as_ac_Header
6626 if test "x$as_val" = x""yes; then :
6627 cat >>confdefs.h <<_ACEOF
6628#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6629_ACEOF
6630
6631fi
6632
6633done
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
e26b6bb0
TT
6645 GNULIB_CHDIR=0;
6646 GNULIB_CHOWN=0;
6647 GNULIB_CLOSE=0;
6648 GNULIB_DUP=0;
6649 GNULIB_DUP2=0;
6650 GNULIB_DUP3=0;
6651 GNULIB_ENVIRON=0;
6652 GNULIB_EUIDACCESS=0;
6653 GNULIB_FACCESSAT=0;
6654 GNULIB_FCHDIR=0;
6655 GNULIB_FCHOWNAT=0;
6656 GNULIB_FDATASYNC=0;
6657 GNULIB_FSYNC=0;
6658 GNULIB_FTRUNCATE=0;
6659 GNULIB_GETCWD=0;
6660 GNULIB_GETDOMAINNAME=0;
6661 GNULIB_GETDTABLESIZE=0;
6662 GNULIB_GETGROUPS=0;
6663 GNULIB_GETHOSTNAME=0;
6664 GNULIB_GETLOGIN=0;
6665 GNULIB_GETLOGIN_R=0;
6666 GNULIB_GETPAGESIZE=0;
6667 GNULIB_GETUSERSHELL=0;
6668 GNULIB_GROUP_MEMBER=0;
6669 GNULIB_ISATTY=0;
6670 GNULIB_LCHOWN=0;
6671 GNULIB_LINK=0;
6672 GNULIB_LINKAT=0;
6673 GNULIB_LSEEK=0;
6674 GNULIB_PIPE=0;
6675 GNULIB_PIPE2=0;
6676 GNULIB_PREAD=0;
6677 GNULIB_PWRITE=0;
6678 GNULIB_READ=0;
6679 GNULIB_READLINK=0;
6680 GNULIB_READLINKAT=0;
6681 GNULIB_RMDIR=0;
6682 GNULIB_SETHOSTNAME=0;
6683 GNULIB_SLEEP=0;
6684 GNULIB_SYMLINK=0;
6685 GNULIB_SYMLINKAT=0;
6686 GNULIB_TTYNAME_R=0;
6687 GNULIB_UNISTD_H_NONBLOCKING=0;
6688 GNULIB_UNISTD_H_SIGPIPE=0;
6689 GNULIB_UNLINK=0;
6690 GNULIB_UNLINKAT=0;
6691 GNULIB_USLEEP=0;
6692 GNULIB_WRITE=0;
6693 HAVE_CHOWN=1;
6694 HAVE_DUP2=1;
6695 HAVE_DUP3=1;
6696 HAVE_EUIDACCESS=1;
6697 HAVE_FACCESSAT=1;
6698 HAVE_FCHDIR=1;
6699 HAVE_FCHOWNAT=1;
6700 HAVE_FDATASYNC=1;
6701 HAVE_FSYNC=1;
6702 HAVE_FTRUNCATE=1;
6703 HAVE_GETDTABLESIZE=1;
6704 HAVE_GETGROUPS=1;
6705 HAVE_GETHOSTNAME=1;
6706 HAVE_GETLOGIN=1;
6707 HAVE_GETPAGESIZE=1;
6708 HAVE_GROUP_MEMBER=1;
6709 HAVE_LCHOWN=1;
6710 HAVE_LINK=1;
6711 HAVE_LINKAT=1;
6712 HAVE_PIPE=1;
6713 HAVE_PIPE2=1;
6714 HAVE_PREAD=1;
6715 HAVE_PWRITE=1;
6716 HAVE_READLINK=1;
6717 HAVE_READLINKAT=1;
6718 HAVE_SETHOSTNAME=1;
6719 HAVE_SLEEP=1;
6720 HAVE_SYMLINK=1;
6721 HAVE_SYMLINKAT=1;
6722 HAVE_UNLINKAT=1;
6723 HAVE_USLEEP=1;
6724 HAVE_DECL_ENVIRON=1;
6725 HAVE_DECL_FCHDIR=1;
6726 HAVE_DECL_FDATASYNC=1;
6727 HAVE_DECL_GETDOMAINNAME=1;
6728 HAVE_DECL_GETLOGIN_R=1;
6729 HAVE_DECL_GETPAGESIZE=1;
6730 HAVE_DECL_GETUSERSHELL=1;
6731 HAVE_DECL_SETHOSTNAME=1;
6732 HAVE_DECL_TTYNAME_R=1;
6733 HAVE_OS_H=0;
6734 HAVE_SYS_PARAM_H=0;
6735 REPLACE_CHOWN=0;
6736 REPLACE_CLOSE=0;
6737 REPLACE_DUP=0;
6738 REPLACE_DUP2=0;
6739 REPLACE_FCHOWNAT=0;
6740 REPLACE_FTRUNCATE=0;
6741 REPLACE_GETCWD=0;
6742 REPLACE_GETDOMAINNAME=0;
4a626d0a 6743 REPLACE_GETDTABLESIZE=0;
e26b6bb0
TT
6744 REPLACE_GETLOGIN_R=0;
6745 REPLACE_GETGROUPS=0;
6746 REPLACE_GETPAGESIZE=0;
6747 REPLACE_ISATTY=0;
6748 REPLACE_LCHOWN=0;
6749 REPLACE_LINK=0;
6750 REPLACE_LINKAT=0;
6751 REPLACE_LSEEK=0;
6752 REPLACE_PREAD=0;
6753 REPLACE_PWRITE=0;
6754 REPLACE_READ=0;
6755 REPLACE_READLINK=0;
4a626d0a 6756 REPLACE_READLINKAT=0;
e26b6bb0
TT
6757 REPLACE_RMDIR=0;
6758 REPLACE_SLEEP=0;
6759 REPLACE_SYMLINK=0;
4a626d0a 6760 REPLACE_SYMLINKAT=0;
e26b6bb0
TT
6761 REPLACE_TTYNAME_R=0;
6762 REPLACE_UNLINK=0;
6763 REPLACE_UNLINKAT=0;
6764 REPLACE_USLEEP=0;
6765 REPLACE_WRITE=0;
6766 UNISTD_H_HAVE_WINSOCK2_H=0;
6767 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
6768
6769
6770
6ec2e0f5
SDJ
6771
6772
6773
6774
6775
6776
6777
6778
6779 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
6780 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
6781
6782$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
6783
6784 else
6785 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
6786 fi
6787
6788
6789
6790
6791
6792
6793
e26b6bb0
TT
6794 GNULIB_OPENDIR=0;
6795 GNULIB_READDIR=0;
6796 GNULIB_REWINDDIR=0;
6797 GNULIB_CLOSEDIR=0;
6798 GNULIB_DIRFD=0;
6799 GNULIB_FDOPENDIR=0;
6800 GNULIB_SCANDIR=0;
6801 GNULIB_ALPHASORT=0;
6802 HAVE_OPENDIR=1;
6803 HAVE_READDIR=1;
6804 HAVE_REWINDDIR=1;
6805 HAVE_CLOSEDIR=1;
6806 HAVE_DECL_DIRFD=1;
6807 HAVE_DECL_FDOPENDIR=1;
6808 HAVE_FDOPENDIR=1;
6809 HAVE_SCANDIR=1;
6810 HAVE_ALPHASORT=1;
6811 REPLACE_OPENDIR=0;
6812 REPLACE_CLOSEDIR=0;
6813 REPLACE_DIRFD=0;
6814 REPLACE_FDOPENDIR=0;
6815
6816
6817
6818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
6819$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
6820if test "${gl_cv_have_include_next+set}" = set; then :
6821 $as_echo_n "(cached) " >&6
6822else
6823 rm -rf conftestd1a conftestd1b conftestd2
6824 mkdir conftestd1a conftestd1b conftestd2
6825 cat <<EOF > conftestd1a/conftest.h
6826#define DEFINED_IN_CONFTESTD1
6827#include_next <conftest.h>
6828#ifdef DEFINED_IN_CONFTESTD2
6829int foo;
6830#else
88b48903
WN
6831#error "include_next doesn't work"
6832#endif
6833EOF
6834 cat <<EOF > conftestd1b/conftest.h
6835#define DEFINED_IN_CONFTESTD1
6836#include <stdio.h>
6837#include_next <conftest.h>
6838#ifdef DEFINED_IN_CONFTESTD2
6839int foo;
6840#else
6841#error "include_next doesn't work"
6842#endif
6843EOF
6844 cat <<EOF > conftestd2/conftest.h
6845#ifndef DEFINED_IN_CONFTESTD1
6846#error "include_next test doesn't work"
6847#endif
6848#define DEFINED_IN_CONFTESTD2
6849EOF
6850 gl_save_CPPFLAGS="$CPPFLAGS"
6851 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
6852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6853/* end confdefs.h. */
6854#include <conftest.h>
6855_ACEOF
6856if ac_fn_c_try_compile "$LINENO"; then :
6857 gl_cv_have_include_next=yes
6858else
6859 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
6860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6861/* end confdefs.h. */
6862#include <conftest.h>
6863_ACEOF
6864if ac_fn_c_try_compile "$LINENO"; then :
6865 gl_cv_have_include_next=buggy
6866else
6867 gl_cv_have_include_next=no
6868fi
6869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6870
6871fi
6872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6873 CPPFLAGS="$gl_save_CPPFLAGS"
6874 rm -rf conftestd1a conftestd1b conftestd2
6875
6876fi
6877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
6878$as_echo "$gl_cv_have_include_next" >&6; }
6879 PRAGMA_SYSTEM_HEADER=
6880 if test $gl_cv_have_include_next = yes; then
6881 INCLUDE_NEXT=include_next
6882 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
6883 if test -n "$GCC"; then
6884 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
6885 fi
6886 else
6887 if test $gl_cv_have_include_next = buggy; then
6888 INCLUDE_NEXT=include
6889 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
6890 else
6891 INCLUDE_NEXT=include
6892 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
6893 fi
6894 fi
6895
6896
6897
6898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
6899$as_echo_n "checking whether system header files limit the line length... " >&6; }
6900if test "${gl_cv_pragma_columns+set}" = set; then :
6901 $as_echo_n "(cached) " >&6
6902else
6903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6904/* end confdefs.h. */
6905
6906#ifdef __TANDEM
6907choke me
6908#endif
6909
6910_ACEOF
6911if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6912 $EGREP "choke me" >/dev/null 2>&1; then :
6913 gl_cv_pragma_columns=yes
6914else
6915 gl_cv_pragma_columns=no
6916fi
6917rm -f conftest*
6918
6919
6920fi
6921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
6922$as_echo "$gl_cv_pragma_columns" >&6; }
6923 if test $gl_cv_pragma_columns = yes; then
6924 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
6925 else
6926 PRAGMA_COLUMNS=
6927 fi
6928
6929
6930
6931
e26b6bb0 6932
e26b6bb0 6933
3d99e817
AK
6934
6935
6936
6937
6938
3d99e817
AK
6939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
6940$as_echo_n "checking if environ is properly declared... " >&6; }
6941 if test "${gt_cv_var_environ_declaration+set}" = set; then :
6942 $as_echo_n "(cached) " >&6
6943else
6944
6945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6946/* end confdefs.h. */
6947#if HAVE_UNISTD_H
6948 #include <unistd.h>
6949 #endif
6950 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
6951 #include <stdlib.h>
6952
6953 extern struct { int foo; } environ;
6954int
6955main ()
6956{
6957environ.foo = 1;
6958 ;
6959 return 0;
6960}
6961_ACEOF
6962if ac_fn_c_try_compile "$LINENO"; then :
6963 gt_cv_var_environ_declaration=no
6964else
6965 gt_cv_var_environ_declaration=yes
6966fi
6967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6968fi
6969
6970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
6971$as_echo "$gt_cv_var_environ_declaration" >&6; }
6972 if test $gt_cv_var_environ_declaration = yes; then
6973
6974$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
6975
6976 fi
6977
6978
6979 if test $gt_cv_var_environ_declaration != yes; then
6980 HAVE_DECL_ENVIRON=0
6981 fi
6982
6983
6984
18848e28
GF
6985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
6986$as_echo_n "checking for complete errno.h... " >&6; }
6987if test "${gl_cv_header_errno_h_complete+set}" = set; then :
6988 $as_echo_n "(cached) " >&6
6989else
6990
6991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6992/* end confdefs.h. */
6993
6994#include <errno.h>
6995#if !defined ETXTBSY
6996booboo
6997#endif
6998#if !defined ENOMSG
6999booboo
7000#endif
7001#if !defined EIDRM
7002booboo
7003#endif
7004#if !defined ENOLINK
7005booboo
7006#endif
7007#if !defined EPROTO
7008booboo
7009#endif
7010#if !defined EMULTIHOP
7011booboo
7012#endif
7013#if !defined EBADMSG
7014booboo
7015#endif
7016#if !defined EOVERFLOW
7017booboo
7018#endif
7019#if !defined ENOTSUP
7020booboo
7021#endif
7022#if !defined ENETRESET
7023booboo
7024#endif
7025#if !defined ECONNABORTED
7026booboo
7027#endif
7028#if !defined ESTALE
7029booboo
7030#endif
7031#if !defined EDQUOT
7032booboo
7033#endif
7034#if !defined ECANCELED
7035booboo
7036#endif
7037#if !defined EOWNERDEAD
7038booboo
7039#endif
7040#if !defined ENOTRECOVERABLE
7041booboo
7042#endif
7043#if !defined EILSEQ
7044booboo
7045#endif
7046
7047_ACEOF
7048if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7049 $EGREP "booboo" >/dev/null 2>&1; then :
7050 gl_cv_header_errno_h_complete=no
7051else
7052 gl_cv_header_errno_h_complete=yes
7053fi
7054rm -f conftest*
7055
7056
7057fi
7058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
7059$as_echo "$gl_cv_header_errno_h_complete" >&6; }
7060 if test $gl_cv_header_errno_h_complete = yes; then
7061 ERRNO_H=''
7062 else
7063
7064
7065
7066
7067
7068
7069
7070
7071 if test $gl_cv_have_include_next = yes; then
7072 gl_cv_next_errno_h='<'errno.h'>'
7073 else
7074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
7075$as_echo_n "checking absolute name of <errno.h>... " >&6; }
7076if test "${gl_cv_next_errno_h+set}" = set; then :
7077 $as_echo_n "(cached) " >&6
7078else
7079
4a626d0a
PA
7080
7081
7082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18848e28
GF
7083/* end confdefs.h. */
7084#include <errno.h>
18848e28 7085_ACEOF
4a626d0a
PA
7086 case "$host_os" in
7087 aix*) gl_absname_cpp="$ac_cpp -C" ;;
7088 *) gl_absname_cpp="$ac_cpp" ;;
7089 esac
18848e28 7090
4a626d0a
PA
7091 case "$host_os" in
7092 mingw*)
7093 gl_dirsep_regex='[/\\]'
7094 ;;
7095 *)
7096 gl_dirsep_regex='\/'
7097 ;;
7098 esac
7099 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
7100 gl_header_literal_regex=`echo 'errno.h' \
7101 | sed -e "$gl_make_literal_regex_sed"`
7102 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
7103 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
7104 s|^/[^/]|//&|
7105 p
7106 q
7107 }'
7108
7109 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7110 sed -n "$gl_absolute_header_sed"`
7111
7112 gl_header=$gl_cv_absolute_errno_h
7113 gl_cv_next_errno_h='"'$gl_header'"'
7114
7115
7116fi
7117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
18848e28
GF
7118$as_echo "$gl_cv_next_errno_h" >&6; }
7119 fi
7120 NEXT_ERRNO_H=$gl_cv_next_errno_h
7121
7122 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7123 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
7124 gl_next_as_first_directive='<'errno.h'>'
7125 else
7126 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
7127 gl_next_as_first_directive=$gl_cv_next_errno_h
7128 fi
7129 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
7130
7131
7132
7133
7134 ERRNO_H='errno.h'
7135 fi
7136
7137 if test -n "$ERRNO_H"; then
7138 GL_GENERATE_ERRNO_H_TRUE=
7139 GL_GENERATE_ERRNO_H_FALSE='#'
7140else
7141 GL_GENERATE_ERRNO_H_TRUE='#'
7142 GL_GENERATE_ERRNO_H_FALSE=
7143fi
7144
7145
7146 if test -n "$ERRNO_H"; then
7147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
7148$as_echo_n "checking for EMULTIHOP value... " >&6; }
7149if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then :
7150 $as_echo_n "(cached) " >&6
7151else
7152
7153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7154/* end confdefs.h. */
7155
7156#include <errno.h>
7157#ifdef EMULTIHOP
7158yes
7159#endif
7160
7161_ACEOF
7162if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7163 $EGREP "yes" >/dev/null 2>&1; then :
7164 gl_cv_header_errno_h_EMULTIHOP=yes
7165else
7166 gl_cv_header_errno_h_EMULTIHOP=no
7167fi
7168rm -f conftest*
7169
7170 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
7171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7172/* end confdefs.h. */
7173
7174#define _XOPEN_SOURCE_EXTENDED 1
7175#include <errno.h>
7176#ifdef EMULTIHOP
7177yes
7178#endif
7179
7180_ACEOF
7181if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7182 $EGREP "yes" >/dev/null 2>&1; then :
7183 gl_cv_header_errno_h_EMULTIHOP=hidden
7184fi
7185rm -f conftest*
7186
7187 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
7188 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
7189#define _XOPEN_SOURCE_EXTENDED 1
7190#include <errno.h>
7191/* The following two lines are a workaround against an autoconf-2.52 bug. */
7192#include <stdio.h>
7193#include <stdlib.h>
7194"; then :
7195
7196fi
7197
7198 fi
7199 fi
7200
7201fi
7202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
7203$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
7204 case $gl_cv_header_errno_h_EMULTIHOP in
7205 yes | no)
7206 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
7207 ;;
7208 *)
7209 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
7210 ;;
7211 esac
7212
7213
7214 fi
7215
7216
7217 if test -n "$ERRNO_H"; then
7218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
7219$as_echo_n "checking for ENOLINK value... " >&6; }
7220if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then :
7221 $as_echo_n "(cached) " >&6
7222else
7223
7224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7225/* end confdefs.h. */
7226
7227#include <errno.h>
7228#ifdef ENOLINK
7229yes
7230#endif
7231
7232_ACEOF
7233if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7234 $EGREP "yes" >/dev/null 2>&1; then :
7235 gl_cv_header_errno_h_ENOLINK=yes
7236else
7237 gl_cv_header_errno_h_ENOLINK=no
7238fi
7239rm -f conftest*
7240
7241 if test $gl_cv_header_errno_h_ENOLINK = no; then
7242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7243/* end confdefs.h. */
7244
7245#define _XOPEN_SOURCE_EXTENDED 1
7246#include <errno.h>
7247#ifdef ENOLINK
7248yes
7249#endif
7250
7251_ACEOF
7252if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7253 $EGREP "yes" >/dev/null 2>&1; then :
7254 gl_cv_header_errno_h_ENOLINK=hidden
7255fi
7256rm -f conftest*
7257
7258 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
7259 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
7260#define _XOPEN_SOURCE_EXTENDED 1
7261#include <errno.h>
7262/* The following two lines are a workaround against an autoconf-2.52 bug. */
7263#include <stdio.h>
7264#include <stdlib.h>
7265"; then :
7266
7267fi
7268
7269 fi
7270 fi
7271
7272fi
7273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
7274$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
7275 case $gl_cv_header_errno_h_ENOLINK in
7276 yes | no)
7277 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
7278 ;;
7279 *)
7280 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
7281 ;;
7282 esac
7283
7284
7285 fi
7286
7287
7288 if test -n "$ERRNO_H"; then
7289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
7290$as_echo_n "checking for EOVERFLOW value... " >&6; }
7291if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then :
7292 $as_echo_n "(cached) " >&6
7293else
7294
7295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7296/* end confdefs.h. */
7297
7298#include <errno.h>
7299#ifdef EOVERFLOW
7300yes
7301#endif
7302
7303_ACEOF
7304if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7305 $EGREP "yes" >/dev/null 2>&1; then :
7306 gl_cv_header_errno_h_EOVERFLOW=yes
7307else
7308 gl_cv_header_errno_h_EOVERFLOW=no
7309fi
7310rm -f conftest*
7311
7312 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
7313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7314/* end confdefs.h. */
7315
7316#define _XOPEN_SOURCE_EXTENDED 1
7317#include <errno.h>
7318#ifdef EOVERFLOW
7319yes
7320#endif
7321
7322_ACEOF
7323if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7324 $EGREP "yes" >/dev/null 2>&1; then :
7325 gl_cv_header_errno_h_EOVERFLOW=hidden
7326fi
7327rm -f conftest*
7328
7329 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
7330 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
7331#define _XOPEN_SOURCE_EXTENDED 1
7332#include <errno.h>
7333/* The following two lines are a workaround against an autoconf-2.52 bug. */
7334#include <stdio.h>
7335#include <stdlib.h>
7336"; then :
7337
7338fi
7339
7340 fi
7341 fi
7342
7343fi
7344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
7345$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
7346 case $gl_cv_header_errno_h_EOVERFLOW in
7347 yes | no)
7348 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
7349 ;;
7350 *)
7351 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
7352 ;;
7353 esac
7354
7355
7356 fi
7357
7358
6ec2e0f5
SDJ
7359ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
7360if test "x$ac_cv_have_decl_strerror_r" = x""yes; then :
7361 ac_have_decl=1
7362else
7363 ac_have_decl=0
7364fi
18848e28 7365
6ec2e0f5
SDJ
7366cat >>confdefs.h <<_ACEOF
7367#define HAVE_DECL_STRERROR_R $ac_have_decl
7368_ACEOF
18848e28 7369
6ec2e0f5
SDJ
7370for ac_func in strerror_r
7371do :
7372 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
7373if test "x$ac_cv_func_strerror_r" = x""yes; then :
7374 cat >>confdefs.h <<_ACEOF
7375#define HAVE_STRERROR_R 1
7376_ACEOF
63ce7108 7377
6ec2e0f5
SDJ
7378fi
7379done
63ce7108 7380
6ec2e0f5
SDJ
7381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
7382$as_echo_n "checking whether strerror_r returns char *... " >&6; }
7383if test "${ac_cv_func_strerror_r_char_p+set}" = set; then :
63ce7108
TT
7384 $as_echo_n "(cached) " >&6
7385else
6ec2e0f5
SDJ
7386
7387 ac_cv_func_strerror_r_char_p=no
7388 if test $ac_cv_have_decl_strerror_r = yes; then
7389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63ce7108
TT
7390/* end confdefs.h. */
7391$ac_includes_default
63ce7108
TT
7392int
7393main ()
7394{
6ec2e0f5
SDJ
7395
7396 char buf[100];
7397 char x = *strerror_r (0, buf, sizeof buf);
7398 char *p = strerror_r (0, buf, sizeof buf);
7399 return !p || x;
7400
63ce7108
TT
7401 ;
7402 return 0;
7403}
7404_ACEOF
7405if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 7406 ac_cv_func_strerror_r_char_p=yes
63ce7108
TT
7407fi
7408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
7409 else
7410 # strerror_r is not declared. Choose between
7411 # systems that have relatively inaccessible declarations for the
7412 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
7413 # former has a strerror_r that returns char*, while the latter
7414 # has a strerror_r that returns `int'.
7415 # This test should segfault on the DEC system.
7416 if test "$cross_compiling" = yes; then :
7417 :
7418else
7419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7420/* end confdefs.h. */
7421$ac_includes_default
7422 extern char *strerror_r ();
7423int
7424main ()
7425{
7426char buf[100];
7427 char x = *strerror_r (0, buf, sizeof buf);
7428 return ! isalpha (x);
7429 ;
7430 return 0;
7431}
7432_ACEOF
7433if ac_fn_c_try_run "$LINENO"; then :
7434 ac_cv_func_strerror_r_char_p=yes
7435fi
7436rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7437 conftest.$ac_objext conftest.beam conftest.$ac_ext
63ce7108 7438fi
63ce7108 7439
6ec2e0f5 7440 fi
63ce7108 7441
6ec2e0f5
SDJ
7442fi
7443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
7444$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
7445if test $ac_cv_func_strerror_r_char_p = yes; then
63ce7108 7446
6ec2e0f5 7447$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
63ce7108 7448
6ec2e0f5 7449fi
63ce7108
TT
7450
7451
7452
63ce7108 7453
6ec2e0f5
SDJ
7454ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
7455if test "x$ac_cv_have_decl_fchdir" = x""yes; then :
7456 ac_have_decl=1
7457else
7458 ac_have_decl=0
7459fi
63ce7108 7460
6ec2e0f5
SDJ
7461cat >>confdefs.h <<_ACEOF
7462#define HAVE_DECL_FCHDIR $ac_have_decl
7463_ACEOF
63ce7108
TT
7464
7465
6ec2e0f5
SDJ
7466 GNULIB_FCNTL=0;
7467 GNULIB_NONBLOCKING=0;
7468 GNULIB_OPEN=0;
7469 GNULIB_OPENAT=0;
7470 HAVE_FCNTL=1;
7471 HAVE_OPENAT=1;
7472 REPLACE_FCNTL=0;
7473 REPLACE_OPEN=0;
7474 REPLACE_OPENAT=0;
63ce7108
TT
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
6ec2e0f5
SDJ
7485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
7486$as_echo_n "checking for working fcntl.h... " >&6; }
7487if test "${gl_cv_header_working_fcntl_h+set}" = set; then :
7488 $as_echo_n "(cached) " >&6
7489else
7490 if test "$cross_compiling" = yes; then :
7491 gl_cv_header_working_fcntl_h=cross-compiling
7492else
7493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7494/* end confdefs.h. */
7495#include <sys/types.h>
7496 #include <sys/stat.h>
7497 #if HAVE_UNISTD_H
7498 # include <unistd.h>
7499 #else /* on Windows with MSVC */
7500 # include <io.h>
7501 # include <stdlib.h>
7502 # defined sleep(n) _sleep ((n) * 1000)
7503 #endif
7504 #include <fcntl.h>
7505 #ifndef O_NOATIME
7506 #define O_NOATIME 0
7507 #endif
7508 #ifndef O_NOFOLLOW
7509 #define O_NOFOLLOW 0
7510 #endif
7511 static int const constants[] =
7512 {
7513 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
7514 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
7515 };
63ce7108 7516
6ec2e0f5
SDJ
7517int
7518main ()
7519{
63ce7108 7520
6ec2e0f5
SDJ
7521 int result = !constants;
7522 #if HAVE_SYMLINK
7523 {
7524 static char const sym[] = "conftest.sym";
7525 if (symlink ("/dev/null", sym) != 0)
7526 result |= 2;
7527 else
7528 {
7529 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
7530 if (fd >= 0)
7531 {
7532 close (fd);
7533 result |= 4;
7534 }
7535 }
7536 if (unlink (sym) != 0 || symlink (".", sym) != 0)
7537 result |= 2;
7538 else
7539 {
7540 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
7541 if (fd >= 0)
7542 {
7543 close (fd);
7544 result |= 4;
7545 }
7546 }
7547 unlink (sym);
7548 }
7549 #endif
7550 {
7551 static char const file[] = "confdefs.h";
7552 int fd = open (file, O_RDONLY | O_NOATIME);
7553 if (fd < 0)
7554 result |= 8;
7555 else
7556 {
7557 struct stat st0;
7558 if (fstat (fd, &st0) != 0)
7559 result |= 16;
7560 else
7561 {
7562 char c;
7563 sleep (1);
7564 if (read (fd, &c, 1) != 1)
7565 result |= 24;
7566 else
7567 {
7568 if (close (fd) != 0)
7569 result |= 32;
7570 else
7571 {
7572 struct stat st1;
7573 if (stat (file, &st1) != 0)
7574 result |= 40;
7575 else
7576 if (st0.st_atime != st1.st_atime)
7577 result |= 64;
7578 }
7579 }
7580 }
7581 }
7582 }
7583 return result;
7584 ;
7585 return 0;
7586}
7587_ACEOF
7588if ac_fn_c_try_run "$LINENO"; then :
7589 gl_cv_header_working_fcntl_h=yes
7590else
7591 case $? in #(
7592 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
7593 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
7594 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
7595 *) gl_cv_header_working_fcntl_h='no';;
7596 esac
7597fi
7598rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7599 conftest.$ac_objext conftest.beam conftest.$ac_ext
7600fi
7601
7602fi
7603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
7604$as_echo "$gl_cv_header_working_fcntl_h" >&6; }
7605
7606 case $gl_cv_header_working_fcntl_h in #(
7607 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
7608 *) ac_val=1;;
7609 esac
7610
7611cat >>confdefs.h <<_ACEOF
7612#define HAVE_WORKING_O_NOATIME $ac_val
7613_ACEOF
7614
7615
7616 case $gl_cv_header_working_fcntl_h in #(
7617 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
7618 *) ac_val=1;;
7619 esac
7620
7621cat >>confdefs.h <<_ACEOF
7622#define HAVE_WORKING_O_NOFOLLOW $ac_val
7623_ACEOF
7624
7625
7626ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
7627if test "x$ac_cv_type_pid_t" = x""yes; then :
7628
7629else
7630
7631cat >>confdefs.h <<_ACEOF
7632#define pid_t int
7633_ACEOF
7634
7635fi
7636
7637ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
7638if test "x$ac_cv_type_mode_t" = x""yes; then :
7639
7640else
7641
7642cat >>confdefs.h <<_ACEOF
7643#define mode_t int
7644_ACEOF
7645
7646fi
7647
7648
7649
7650
7651
7652
7653
7654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
7655$as_echo_n "checking for mbstate_t... " >&6; }
7656if test "${ac_cv_type_mbstate_t+set}" = set; then :
7657 $as_echo_n "(cached) " >&6
7658else
7659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7660/* end confdefs.h. */
7661$ac_includes_default
7662/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
7663 <wchar.h>.
7664 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
7665 included before <wchar.h>. */
7666#include <stddef.h>
7667#include <stdio.h>
7668#include <time.h>
7669#include <wchar.h>
7670int
7671main ()
7672{
7673mbstate_t x; return sizeof x;
7674 ;
7675 return 0;
7676}
7677_ACEOF
7678if ac_fn_c_try_compile "$LINENO"; then :
7679 ac_cv_type_mbstate_t=yes
7680else
7681 ac_cv_type_mbstate_t=no
7682fi
7683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7684fi
7685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
7686$as_echo "$ac_cv_type_mbstate_t" >&6; }
7687 if test $ac_cv_type_mbstate_t = yes; then
7688
7689$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
7690
7691 else
7692
7693$as_echo "#define mbstate_t int" >>confdefs.h
7694
7695 fi
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714 GNULIB_ACOSF=0;
7715 GNULIB_ACOSL=0;
7716 GNULIB_ASINF=0;
7717 GNULIB_ASINL=0;
7718 GNULIB_ATANF=0;
7719 GNULIB_ATANL=0;
7720 GNULIB_ATAN2F=0;
7721 GNULIB_CBRT=0;
7722 GNULIB_CBRTF=0;
7723 GNULIB_CBRTL=0;
7724 GNULIB_CEIL=0;
7725 GNULIB_CEILF=0;
7726 GNULIB_CEILL=0;
7727 GNULIB_COPYSIGN=0;
7728 GNULIB_COPYSIGNF=0;
7729 GNULIB_COPYSIGNL=0;
7730 GNULIB_COSF=0;
7731 GNULIB_COSL=0;
7732 GNULIB_COSHF=0;
7733 GNULIB_EXPF=0;
7734 GNULIB_EXPL=0;
7735 GNULIB_EXP2=0;
7736 GNULIB_EXP2F=0;
7737 GNULIB_EXP2L=0;
7738 GNULIB_EXPM1=0;
7739 GNULIB_EXPM1F=0;
7740 GNULIB_EXPM1L=0;
7741 GNULIB_FABSF=0;
7742 GNULIB_FABSL=0;
7743 GNULIB_FLOOR=0;
7744 GNULIB_FLOORF=0;
7745 GNULIB_FLOORL=0;
7746 GNULIB_FMA=0;
7747 GNULIB_FMAF=0;
7748 GNULIB_FMAL=0;
7749 GNULIB_FMOD=0;
7750 GNULIB_FMODF=0;
7751 GNULIB_FMODL=0;
7752 GNULIB_FREXPF=0;
7753 GNULIB_FREXP=0;
7754 GNULIB_FREXPL=0;
7755 GNULIB_HYPOT=0;
7756 GNULIB_HYPOTF=0;
7757 GNULIB_HYPOTL=0;
88b48903
WN
7758 GNULIB_ILOGB=0;
7759 GNULIB_ILOGBF=0;
7760 GNULIB_ILOGBL=0;
7761 GNULIB_ISFINITE=0;
7762 GNULIB_ISINF=0;
7763 GNULIB_ISNAN=0;
7764 GNULIB_ISNANF=0;
7765 GNULIB_ISNAND=0;
7766 GNULIB_ISNANL=0;
7767 GNULIB_LDEXPF=0;
7768 GNULIB_LDEXPL=0;
7769 GNULIB_LOG=0;
7770 GNULIB_LOGF=0;
7771 GNULIB_LOGL=0;
7772 GNULIB_LOG10=0;
7773 GNULIB_LOG10F=0;
7774 GNULIB_LOG10L=0;
7775 GNULIB_LOG1P=0;
7776 GNULIB_LOG1PF=0;
7777 GNULIB_LOG1PL=0;
7778 GNULIB_LOG2=0;
7779 GNULIB_LOG2F=0;
7780 GNULIB_LOG2L=0;
7781 GNULIB_LOGB=0;
7782 GNULIB_LOGBF=0;
7783 GNULIB_LOGBL=0;
7784 GNULIB_MODF=0;
7785 GNULIB_MODFF=0;
7786 GNULIB_MODFL=0;
7787 GNULIB_POWF=0;
7788 GNULIB_REMAINDER=0;
7789 GNULIB_REMAINDERF=0;
7790 GNULIB_REMAINDERL=0;
7791 GNULIB_RINT=0;
7792 GNULIB_RINTF=0;
7793 GNULIB_RINTL=0;
7794 GNULIB_ROUND=0;
7795 GNULIB_ROUNDF=0;
7796 GNULIB_ROUNDL=0;
7797 GNULIB_SIGNBIT=0;
7798 GNULIB_SINF=0;
7799 GNULIB_SINL=0;
7800 GNULIB_SINHF=0;
7801 GNULIB_SQRTF=0;
7802 GNULIB_SQRTL=0;
7803 GNULIB_TANF=0;
7804 GNULIB_TANL=0;
7805 GNULIB_TANHF=0;
7806 GNULIB_TRUNC=0;
7807 GNULIB_TRUNCF=0;
7808 GNULIB_TRUNCL=0;
7809 HAVE_ACOSF=1;
7810 HAVE_ACOSL=1;
7811 HAVE_ASINF=1;
7812 HAVE_ASINL=1;
7813 HAVE_ATANF=1;
7814 HAVE_ATANL=1;
7815 HAVE_ATAN2F=1;
7816 HAVE_CBRT=1;
7817 HAVE_CBRTF=1;
7818 HAVE_CBRTL=1;
7819 HAVE_COPYSIGN=1;
7820 HAVE_COPYSIGNL=1;
7821 HAVE_COSF=1;
7822 HAVE_COSL=1;
7823 HAVE_COSHF=1;
7824 HAVE_EXPF=1;
7825 HAVE_EXPL=1;
7826 HAVE_EXPM1=1;
7827 HAVE_EXPM1F=1;
7828 HAVE_FABSF=1;
7829 HAVE_FABSL=1;
7830 HAVE_FMA=1;
7831 HAVE_FMAF=1;
7832 HAVE_FMAL=1;
7833 HAVE_FMODF=1;
7834 HAVE_FMODL=1;
7835 HAVE_FREXPF=1;
7836 HAVE_HYPOTF=1;
7837 HAVE_HYPOTL=1;
7838 HAVE_ILOGB=1;
7839 HAVE_ILOGBF=1;
7840 HAVE_ILOGBL=1;
7841 HAVE_ISNANF=1;
7842 HAVE_ISNAND=1;
7843 HAVE_ISNANL=1;
7844 HAVE_LDEXPF=1;
7845 HAVE_LOGF=1;
7846 HAVE_LOGL=1;
7847 HAVE_LOG10F=1;
7848 HAVE_LOG10L=1;
7849 HAVE_LOG1P=1;
7850 HAVE_LOG1PF=1;
7851 HAVE_LOG1PL=1;
7852 HAVE_LOGBF=1;
7853 HAVE_LOGBL=1;
7854 HAVE_MODFF=1;
7855 HAVE_MODFL=1;
7856 HAVE_POWF=1;
7857 HAVE_REMAINDER=1;
7858 HAVE_REMAINDERF=1;
7859 HAVE_RINT=1;
7860 HAVE_RINTL=1;
7861 HAVE_SINF=1;
7862 HAVE_SINL=1;
7863 HAVE_SINHF=1;
7864 HAVE_SQRTF=1;
7865 HAVE_SQRTL=1;
7866 HAVE_TANF=1;
7867 HAVE_TANL=1;
7868 HAVE_TANHF=1;
7869 HAVE_DECL_ACOSL=1;
7870 HAVE_DECL_ASINL=1;
7871 HAVE_DECL_ATANL=1;
7872 HAVE_DECL_CBRTF=1;
7873 HAVE_DECL_CBRTL=1;
7874 HAVE_DECL_CEILF=1;
7875 HAVE_DECL_CEILL=1;
7876 HAVE_DECL_COPYSIGNF=1;
7877 HAVE_DECL_COSL=1;
7878 HAVE_DECL_EXPL=1;
7879 HAVE_DECL_EXP2=1;
7880 HAVE_DECL_EXP2F=1;
7881 HAVE_DECL_EXP2L=1;
7882 HAVE_DECL_EXPM1L=1;
7883 HAVE_DECL_FLOORF=1;
7884 HAVE_DECL_FLOORL=1;
7885 HAVE_DECL_FREXPL=1;
7886 HAVE_DECL_LDEXPL=1;
7887 HAVE_DECL_LOGL=1;
7888 HAVE_DECL_LOG10L=1;
7889 HAVE_DECL_LOG2=1;
7890 HAVE_DECL_LOG2F=1;
7891 HAVE_DECL_LOG2L=1;
7892 HAVE_DECL_LOGB=1;
7893 HAVE_DECL_REMAINDER=1;
7894 HAVE_DECL_REMAINDERL=1;
7895 HAVE_DECL_RINTF=1;
7896 HAVE_DECL_ROUND=1;
7897 HAVE_DECL_ROUNDF=1;
7898 HAVE_DECL_ROUNDL=1;
7899 HAVE_DECL_SINL=1;
7900 HAVE_DECL_SQRTL=1;
7901 HAVE_DECL_TANL=1;
7902 HAVE_DECL_TRUNC=1;
7903 HAVE_DECL_TRUNCF=1;
7904 HAVE_DECL_TRUNCL=1;
7905 REPLACE_CBRTF=0;
7906 REPLACE_CBRTL=0;
7907 REPLACE_CEIL=0;
7908 REPLACE_CEILF=0;
7909 REPLACE_CEILL=0;
7910 REPLACE_EXPM1=0;
7911 REPLACE_EXPM1F=0;
7912 REPLACE_EXP2=0;
7913 REPLACE_EXP2L=0;
7914 REPLACE_FABSL=0;
7915 REPLACE_FLOOR=0;
7916 REPLACE_FLOORF=0;
7917 REPLACE_FLOORL=0;
7918 REPLACE_FMA=0;
7919 REPLACE_FMAF=0;
7920 REPLACE_FMAL=0;
7921 REPLACE_FMOD=0;
7922 REPLACE_FMODF=0;
7923 REPLACE_FMODL=0;
7924 REPLACE_FREXPF=0;
7925 REPLACE_FREXP=0;
7926 REPLACE_FREXPL=0;
7927 REPLACE_HUGE_VAL=0;
7928 REPLACE_HYPOT=0;
7929 REPLACE_HYPOTF=0;
7930 REPLACE_HYPOTL=0;
7931 REPLACE_ILOGB=0;
7932 REPLACE_ILOGBF=0;
7933 REPLACE_ISFINITE=0;
7934 REPLACE_ISINF=0;
7935 REPLACE_ISNAN=0;
7936 REPLACE_LDEXPL=0;
7937 REPLACE_LOG=0;
7938 REPLACE_LOGF=0;
7939 REPLACE_LOGL=0;
7940 REPLACE_LOG10=0;
7941 REPLACE_LOG10F=0;
7942 REPLACE_LOG10L=0;
7943 REPLACE_LOG1P=0;
7944 REPLACE_LOG1PF=0;
7945 REPLACE_LOG1PL=0;
7946 REPLACE_LOG2=0;
7947 REPLACE_LOG2F=0;
7948 REPLACE_LOG2L=0;
7949 REPLACE_LOGB=0;
7950 REPLACE_LOGBF=0;
7951 REPLACE_LOGBL=0;
7952 REPLACE_MODF=0;
7953 REPLACE_MODFF=0;
7954 REPLACE_MODFL=0;
7955 REPLACE_NAN=0;
7956 REPLACE_REMAINDER=0;
7957 REPLACE_REMAINDERF=0;
7958 REPLACE_REMAINDERL=0;
7959 REPLACE_ROUND=0;
7960 REPLACE_ROUNDF=0;
7961 REPLACE_ROUNDL=0;
7962 REPLACE_SIGNBIT=0;
7963 REPLACE_SIGNBIT_USING_GCC=0;
7964 REPLACE_SQRTL=0;
7965 REPLACE_TRUNC=0;
7966 REPLACE_TRUNCF=0;
7967 REPLACE_TRUNCL=0;
7968
7969
7970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
7971$as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
7972if test "${gl_cv_func_frexp_no_libm+set}" = set; then :
7973 $as_echo_n "(cached) " >&6
7974else
7975
7976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7977/* end confdefs.h. */
7978#include <math.h>
7979 double x;
7980int
7981main ()
7982{
7983int e; return frexp (x, &e) > 0;
7984 ;
7985 return 0;
7986}
7987_ACEOF
7988if ac_fn_c_try_link "$LINENO"; then :
7989 gl_cv_func_frexp_no_libm=yes
7990else
7991 gl_cv_func_frexp_no_libm=no
7992fi
7993rm -f core conftest.err conftest.$ac_objext \
7994 conftest$ac_exeext conftest.$ac_ext
7995
7996fi
7997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
7998$as_echo "$gl_cv_func_frexp_no_libm" >&6; }
7999
4a626d0a
PA
8000ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
8001if test "x$ac_cv_have_decl_alarm" = x""yes; then :
8002 ac_have_decl=1
8003else
8004 ac_have_decl=0
8005fi
88b48903 8006
4a626d0a
PA
8007cat >>confdefs.h <<_ACEOF
8008#define HAVE_DECL_ALARM $ac_have_decl
8009_ACEOF
88b48903
WN
8010
8011
88b48903
WN
8012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
8013$as_echo_n "checking whether long double and double are the same... " >&6; }
8014if test "${gl_cv_long_double_equals_double+set}" = set; then :
8015 $as_echo_n "(cached) " >&6
8016else
8017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8018/* end confdefs.h. */
8019#include <float.h>
8020int
8021main ()
8022{
8023typedef int check[sizeof (long double) == sizeof (double)
8024 && LDBL_MANT_DIG == DBL_MANT_DIG
8025 && LDBL_MAX_EXP == DBL_MAX_EXP
8026 && LDBL_MIN_EXP == DBL_MIN_EXP
8027 ? 1 : -1];
8028
8029 ;
8030 return 0;
8031}
8032_ACEOF
8033if ac_fn_c_try_compile "$LINENO"; then :
8034 gl_cv_long_double_equals_double=yes
8035else
8036 gl_cv_long_double_equals_double=no
8037fi
8038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8039
8040fi
8041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
8042$as_echo "$gl_cv_long_double_equals_double" >&6; }
8043 if test $gl_cv_long_double_equals_double = yes; then
8044
8045$as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
8046
8047 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
8048 else
8049 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
8050 fi
8051
8052
4a626d0a 8053
6ec2e0f5
SDJ
8054 GNULIB_FCHMODAT=0;
8055 GNULIB_FSTAT=0;
8056 GNULIB_FSTATAT=0;
8057 GNULIB_FUTIMENS=0;
8058 GNULIB_LCHMOD=0;
8059 GNULIB_LSTAT=0;
8060 GNULIB_MKDIRAT=0;
8061 GNULIB_MKFIFO=0;
8062 GNULIB_MKFIFOAT=0;
8063 GNULIB_MKNOD=0;
8064 GNULIB_MKNODAT=0;
8065 GNULIB_STAT=0;
8066 GNULIB_UTIMENSAT=0;
8067 HAVE_FCHMODAT=1;
8068 HAVE_FSTATAT=1;
8069 HAVE_FUTIMENS=1;
8070 HAVE_LCHMOD=1;
8071 HAVE_LSTAT=1;
8072 HAVE_MKDIRAT=1;
8073 HAVE_MKFIFO=1;
8074 HAVE_MKFIFOAT=1;
8075 HAVE_MKNOD=1;
8076 HAVE_MKNODAT=1;
8077 HAVE_UTIMENSAT=1;
8078 REPLACE_FSTAT=0;
8079 REPLACE_FSTATAT=0;
8080 REPLACE_FUTIMENS=0;
8081 REPLACE_LSTAT=0;
8082 REPLACE_MKDIR=0;
8083 REPLACE_MKFIFO=0;
8084 REPLACE_MKNOD=0;
8085 REPLACE_STAT=0;
8086 REPLACE_UTIMENSAT=0;
8087
8088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
8089$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
8090if test "${ac_cv_header_stat_broken+set}" = set; then :
8091 $as_echo_n "(cached) " >&6
8092else
8093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8094/* end confdefs.h. */
8095#include <sys/types.h>
8096#include <sys/stat.h>
8097
8098#if defined S_ISBLK && defined S_IFDIR
8099extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
8100#endif
8101
8102#if defined S_ISBLK && defined S_IFCHR
8103extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
8104#endif
8105
8106#if defined S_ISLNK && defined S_IFREG
8107extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
8108#endif
8109
8110#if defined S_ISSOCK && defined S_IFREG
8111extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
8112#endif
4a626d0a 8113
4a626d0a
PA
8114_ACEOF
8115if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5
SDJ
8116 ac_cv_header_stat_broken=no
8117else
8118 ac_cv_header_stat_broken=yes
4a626d0a
PA
8119fi
8120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
8121fi
8122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
8123$as_echo "$ac_cv_header_stat_broken" >&6; }
8124if test $ac_cv_header_stat_broken = yes; then
8125
8126$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
4a626d0a
PA
8127
8128fi
4a626d0a 8129
4a626d0a
PA
8130
8131
4a626d0a
PA
8132
8133
6ec2e0f5
SDJ
8134 case "$host_os" in
8135 mingw*)
8136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
8137$as_echo_n "checking for 64-bit off_t... " >&6; }
8138if test "${gl_cv_type_off_t_64+set}" = set; then :
8139 $as_echo_n "(cached) " >&6
8140else
8141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8142/* end confdefs.h. */
8143#include <sys/types.h>
8144 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
8145
8146int
8147main ()
8148{
8149
8150 ;
8151 return 0;
8152}
8153_ACEOF
8154if ac_fn_c_try_compile "$LINENO"; then :
8155 gl_cv_type_off_t_64=yes
8156else
8157 gl_cv_type_off_t_64=no
8158fi
8159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4a626d0a 8160
6ec2e0f5
SDJ
8161fi
8162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
8163$as_echo "$gl_cv_type_off_t_64" >&6; }
8164 if test $gl_cv_type_off_t_64 = no; then
8165 WINDOWS_64_BIT_OFF_T=1
8166 else
8167 WINDOWS_64_BIT_OFF_T=0
8168 fi
8169 WINDOWS_64_BIT_ST_SIZE=1
8170 ;;
8171 *)
8172 WINDOWS_64_BIT_OFF_T=0
8173 WINDOWS_64_BIT_ST_SIZE=0
8174 ;;
8175 esac
4a626d0a
PA
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 8192 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
4a626d0a 8193 else
6ec2e0f5
SDJ
8194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
8195$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
8196if test "${gl_cv_next_sys_stat_h+set}" = set; then :
4a626d0a
PA
8197 $as_echo_n "(cached) " >&6
8198else
8199
6ec2e0f5 8200 if test $ac_cv_header_sys_stat_h = yes; then
4a626d0a
PA
8201
8202
8203
8204
8205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8206/* end confdefs.h. */
6ec2e0f5 8207#include <sys/stat.h>
4a626d0a
PA
8208_ACEOF
8209 case "$host_os" in
8210 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8211 *) gl_absname_cpp="$ac_cpp" ;;
8212 esac
8213
8214 case "$host_os" in
8215 mingw*)
8216 gl_dirsep_regex='[/\\]'
8217 ;;
8218 *)
8219 gl_dirsep_regex='\/'
8220 ;;
8221 esac
8222 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 8223 gl_header_literal_regex=`echo 'sys/stat.h' \
4a626d0a
PA
8224 | sed -e "$gl_make_literal_regex_sed"`
8225 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8226 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8227 s|^/[^/]|//&|
8228 p
8229 q
8230 }'
8231
6ec2e0f5 8232 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a
PA
8233 sed -n "$gl_absolute_header_sed"`
8234
6ec2e0f5
SDJ
8235 gl_header=$gl_cv_absolute_sys_stat_h
8236 gl_cv_next_sys_stat_h='"'$gl_header'"'
4a626d0a 8237 else
6ec2e0f5 8238 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
4a626d0a
PA
8239 fi
8240
8241
8242fi
6ec2e0f5
SDJ
8243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
8244$as_echo "$gl_cv_next_sys_stat_h" >&6; }
4a626d0a 8245 fi
6ec2e0f5 8246 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
4a626d0a
PA
8247
8248 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8249 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 8250 gl_next_as_first_directive='<'sys/stat.h'>'
4a626d0a
PA
8251 else
8252 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 8253 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
4a626d0a 8254 fi
6ec2e0f5 8255 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
4a626d0a
PA
8256
8257
8258
8259
8260
4a626d0a
PA
8261
8262
8263
8264
8265
4a626d0a 8266
6ec2e0f5 8267 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
4a626d0a 8268
6ec2e0f5 8269$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
4a626d0a
PA
8270
8271 fi
4a626d0a 8272
6ec2e0f5
SDJ
8273 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
8274 #include <sys/stat.h>
8275"
8276if test "x$ac_cv_type_nlink_t" = x""yes; then :
8277
8278else
4a626d0a 8279
6ec2e0f5
SDJ
8280$as_echo "#define nlink_t int" >>confdefs.h
8281
8282fi
8283
8284
8285
8286 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
8287 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
8288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
8289$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
8290if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
4a626d0a
PA
8291 $as_echo_n "(cached) " >&6
8292else
8293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8294/* end confdefs.h. */
6ec2e0f5 8295#include <sys/stat.h>
4a626d0a
PA
8296
8297int
8298main ()
8299{
6ec2e0f5
SDJ
8300#undef $gl_func
8301 (void) $gl_func;
4a626d0a
PA
8302 ;
8303 return 0;
8304}
8305_ACEOF
8306if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 8307 eval "$as_gl_Symbol=yes"
4a626d0a 8308else
6ec2e0f5 8309 eval "$as_gl_Symbol=no"
4a626d0a
PA
8310fi
8311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
8312fi
8313eval ac_res=\$$as_gl_Symbol
8314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8315$as_echo "$ac_res" >&6; }
8316 eval as_val=\$$as_gl_Symbol
8317 if test "x$as_val" = x""yes; then :
8318 cat >>confdefs.h <<_ACEOF
8319#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
8320_ACEOF
4a626d0a 8321
6ec2e0f5 8322 eval ac_cv_have_decl_$gl_func=yes
4a626d0a 8323fi
6ec2e0f5
SDJ
8324 done
8325
8326
8327
8328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
8329$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
8330if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
4a626d0a
PA
8331 $as_echo_n "(cached) " >&6
8332else
6ec2e0f5
SDJ
8333 rm -f conftest.sym conftest.file
8334 echo >conftest.file
8335 if test "$cross_compiling" = yes; then :
8336 case "$host_os" in
8337 *-gnu*)
8338 # Guess yes on glibc systems.
8339 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
8340 *)
8341 # If we don't know, assume the worst.
8342 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
8343 esac
4a626d0a 8344
6ec2e0f5
SDJ
8345else
8346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8347/* end confdefs.h. */
8348$ac_includes_default
4a626d0a
PA
8349int
8350main ()
8351{
6ec2e0f5
SDJ
8352struct stat sbuf;
8353 if (symlink ("conftest.file", "conftest.sym") != 0)
8354 return 1;
8355 /* Linux will dereference the symlink and fail, as required by
8356 POSIX. That is better in the sense that it means we will not
8357 have to compile and use the lstat wrapper. */
8358 return lstat ("conftest.sym/", &sbuf) == 0;
4a626d0a
PA
8359
8360 ;
8361 return 0;
8362}
8363_ACEOF
6ec2e0f5
SDJ
8364if ac_fn_c_try_run "$LINENO"; then :
8365 gl_cv_func_lstat_dereferences_slashed_symlink=yes
4a626d0a 8366else
6ec2e0f5
SDJ
8367 gl_cv_func_lstat_dereferences_slashed_symlink=no
8368fi
8369rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8370 conftest.$ac_objext conftest.beam conftest.$ac_ext
4a626d0a 8371fi
6ec2e0f5
SDJ
8372
8373 rm -f conftest.sym conftest.file
4a626d0a
PA
8374
8375fi
6ec2e0f5
SDJ
8376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
8377$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
8378 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
8379 *yes)
4a626d0a 8380
6ec2e0f5
SDJ
8381cat >>confdefs.h <<_ACEOF
8382#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
8383_ACEOF
4a626d0a 8384
6ec2e0f5
SDJ
8385 ;;
8386 esac
8387
8388
8389
8390
8391
8392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
8393$as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
8394if test "${gl_cv_func_getcwd_null+set}" = set; then :
4a626d0a 8395 $as_echo_n "(cached) " >&6
6ec2e0f5
SDJ
8396else
8397 if test "$cross_compiling" = yes; then :
8398 case "$host_os" in
8399 # Guess yes on glibc systems.
8400 *-gnu*) gl_cv_func_getcwd_null="guessing yes";;
8401 # Guess yes on Cygwin.
8402 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
8403 # If we don't know, assume the worst.
8404 *) gl_cv_func_getcwd_null="guessing no";;
8405 esac
8406
4a626d0a
PA
8407else
8408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8409/* end confdefs.h. */
8410
6ec2e0f5
SDJ
8411# include <stdlib.h>
8412# if HAVE_UNISTD_H
8413# include <unistd.h>
8414# else /* on Windows with MSVC */
8415# include <direct.h>
8416# endif
8417# ifndef getcwd
8418 char *getcwd ();
8419# endif
8420
8421int
8422main ()
8423{
8424
8425#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
8426/* mingw cwd does not start with '/', but getcwd does allocate.
8427 However, mingw fails to honor non-zero size. */
8428#else
8429 if (chdir ("/") != 0)
8430 return 1;
8431 else
8432 {
8433 char *f = getcwd (NULL, 0);
8434 if (! f)
8435 return 2;
8436 if (f[0] != '/')
8437 return 3;
8438 if (f[1] != '\0')
8439 return 4;
8440 free (f);
8441 return 0;
8442 }
4a626d0a 8443#endif
4a626d0a 8444
6ec2e0f5
SDJ
8445 ;
8446 return 0;
8447}
8448_ACEOF
8449if ac_fn_c_try_run "$LINENO"; then :
8450 gl_cv_func_getcwd_null=yes
8451else
8452 gl_cv_func_getcwd_null=no
8453fi
8454rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8455 conftest.$ac_objext conftest.beam conftest.$ac_ext
8456fi
8457
8458fi
8459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
8460$as_echo "$gl_cv_func_getcwd_null" >&6; }
8461
8462
8463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
8464$as_echo_n "checking for getcwd with POSIX signature... " >&6; }
8465if test "${gl_cv_func_getcwd_posix_signature+set}" = set; then :
8466 $as_echo_n "(cached) " >&6
8467else
8468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8469/* end confdefs.h. */
8470#include <unistd.h>
4a626d0a
PA
8471int
8472main ()
8473{
6ec2e0f5
SDJ
8474extern
8475 #ifdef __cplusplus
8476 "C"
8477 #endif
8478 char *getcwd (char *, size_t);
8479
4a626d0a
PA
8480 ;
8481 return 0;
8482}
6ec2e0f5 8483
4a626d0a
PA
8484_ACEOF
8485if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 8486 gl_cv_func_getcwd_posix_signature=yes
4a626d0a 8487else
6ec2e0f5 8488 gl_cv_func_getcwd_posix_signature=no
4a626d0a
PA
8489fi
8490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5 8491
4a626d0a 8492fi
6ec2e0f5
SDJ
8493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
8494$as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
8495
8496ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
8497if test "x$ac_cv_have_decl_getcwd" = x""yes; then :
8498 ac_have_decl=1
8499else
8500 ac_have_decl=0
8501fi
8502
8503cat >>confdefs.h <<_ACEOF
8504#define HAVE_DECL_GETCWD $ac_have_decl
4a626d0a
PA
8505_ACEOF
8506
6ec2e0f5
SDJ
8507
8508
8509ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
8510if test "x$ac_cv_have_decl_getdtablesize" = x""yes; then :
8511 ac_have_decl=1
8512else
8513 ac_have_decl=0
4a626d0a 8514fi
4a626d0a 8515
6ec2e0f5
SDJ
8516cat >>confdefs.h <<_ACEOF
8517#define HAVE_DECL_GETDTABLESIZE $ac_have_decl
8518_ACEOF
8519
8520ac_fn_c_check_decl "$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default"
8521if test "x$ac_cv_have_decl_getlogin_r" = x""yes; then :
8522 ac_have_decl=1
8523else
8524 ac_have_decl=0
8525fi
8526
8527cat >>confdefs.h <<_ACEOF
8528#define HAVE_DECL_GETLOGIN_R $ac_have_decl
8529_ACEOF
8530
8531
8532
8533ac_fn_c_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default"
8534if test "x$ac_cv_have_decl_getlogin" = x""yes; then :
8535 ac_have_decl=1
8536else
8537 ac_have_decl=0
8538fi
8539
8540cat >>confdefs.h <<_ACEOF
8541#define HAVE_DECL_GETLOGIN $ac_have_decl
8542_ACEOF
8543
8544
8545
8546
8547
8548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
8549$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
8550if test "${ac_cv_c_restrict+set}" = set; then :
8551 $as_echo_n "(cached) " >&6
8552else
8553 ac_cv_c_restrict=no
8554 # The order here caters to the fact that C++ does not require restrict.
8555 for ac_kw in __restrict __restrict__ _Restrict restrict; do
8556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8557/* end confdefs.h. */
8558typedef int *int_ptr;
8559 int foo (int_ptr $ac_kw ip) { return ip[0]; }
8560 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
8561 int bar (int ip[$ac_kw]) { return ip[0]; }
8562
8563int
8564main ()
8565{
8566int s[1];
8567 int *$ac_kw t = s;
8568 t[0] = 0;
8569 return foo (t) + bar (t);
8570
8571 ;
8572 return 0;
8573}
8574_ACEOF
8575if ac_fn_c_try_compile "$LINENO"; then :
8576 ac_cv_c_restrict=$ac_kw
8577fi
8578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8579 test "$ac_cv_c_restrict" != no && break
8580 done
8581
8582fi
8583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
8584$as_echo "$ac_cv_c_restrict" >&6; }
8585
8586 case $ac_cv_c_restrict in
8587 restrict) ;;
8588 no) $as_echo "#define restrict /**/" >>confdefs.h
8589 ;;
8590 *) cat >>confdefs.h <<_ACEOF
8591#define restrict $ac_cv_c_restrict
8592_ACEOF
8593 ;;
8594 esac
4a626d0a
PA
8595
8596
6ec2e0f5
SDJ
8597 GNULIB_GETTIMEOFDAY=0;
8598 HAVE_GETTIMEOFDAY=1;
8599 HAVE_STRUCT_TIMEVAL=1;
8600 HAVE_SYS_TIME_H=1;
8601 HAVE_TIMEZONE_T=0;
8602 REPLACE_GETTIMEOFDAY=0;
8603 REPLACE_STRUCT_TIMEVAL=0;
4a626d0a
PA
8604
8605
8606
8607
88b48903 8608
49e4877c
PA
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 8621 gl_cv_next_sys_time_h='<'sys/time.h'>'
49e4877c 8622 else
6ec2e0f5
SDJ
8623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
8624$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
8625if test "${gl_cv_next_sys_time_h+set}" = set; then :
49e4877c
PA
8626 $as_echo_n "(cached) " >&6
8627else
8628
6ec2e0f5 8629 if test $ac_cv_header_sys_time_h = yes; then
49e4877c
PA
8630
8631
8632
8633
8634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8635/* end confdefs.h. */
6ec2e0f5 8636#include <sys/time.h>
49e4877c
PA
8637_ACEOF
8638 case "$host_os" in
8639 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8640 *) gl_absname_cpp="$ac_cpp" ;;
8641 esac
8642
8643 case "$host_os" in
8644 mingw*)
8645 gl_dirsep_regex='[/\\]'
8646 ;;
8647 *)
8648 gl_dirsep_regex='\/'
8649 ;;
8650 esac
8651 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 8652 gl_header_literal_regex=`echo 'sys/time.h' \
49e4877c
PA
8653 | sed -e "$gl_make_literal_regex_sed"`
8654 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8655 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8656 s|^/[^/]|//&|
8657 p
8658 q
8659 }'
8660
6ec2e0f5 8661 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
49e4877c
PA
8662 sed -n "$gl_absolute_header_sed"`
8663
6ec2e0f5
SDJ
8664 gl_header=$gl_cv_absolute_sys_time_h
8665 gl_cv_next_sys_time_h='"'$gl_header'"'
49e4877c 8666 else
6ec2e0f5 8667 gl_cv_next_sys_time_h='<'sys/time.h'>'
49e4877c
PA
8668 fi
8669
8670
8671fi
6ec2e0f5
SDJ
8672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
8673$as_echo "$gl_cv_next_sys_time_h" >&6; }
49e4877c 8674 fi
6ec2e0f5 8675 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
49e4877c
PA
8676
8677 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8678 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 8679 gl_next_as_first_directive='<'sys/time.h'>'
49e4877c
PA
8680 else
8681 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 8682 gl_next_as_first_directive=$gl_cv_next_sys_time_h
49e4877c 8683 fi
6ec2e0f5 8684 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
49e4877c
PA
8685
8686
8687
8688
8689
6ec2e0f5
SDJ
8690 if test $ac_cv_header_sys_time_h != yes; then
8691 HAVE_SYS_TIME_H=0
8692 fi
8693
8694
8695
8696
8697
8698 if test $ac_cv_header_sys_socket_h != yes; then
8699 for ac_header in winsock2.h
8700do :
8701 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
8702if test "x$ac_cv_header_winsock2_h" = x""yes; then :
8703 cat >>confdefs.h <<_ACEOF
8704#define HAVE_WINSOCK2_H 1
8705_ACEOF
8706
8707fi
8708
8709done
8710
8711 fi
8712 if test "$ac_cv_header_winsock2_h" = yes; then
8713 HAVE_WINSOCK2_H=1
8714 UNISTD_H_HAVE_WINSOCK2_H=1
8715 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
8716 else
8717 HAVE_WINSOCK2_H=0
8718 fi
8719
8720
8721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
8722$as_echo_n "checking for struct timeval... " >&6; }
8723if test "${gl_cv_sys_struct_timeval+set}" = set; then :
8724 $as_echo_n "(cached) " >&6
8725else
8726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8727/* end confdefs.h. */
8728#if HAVE_SYS_TIME_H
8729 #include <sys/time.h>
8730 #endif
8731 #include <time.h>
8732 #if HAVE_WINSOCK2_H
8733 # include <winsock2.h>
8734 #endif
8735
49e4877c
PA
8736int
8737main ()
8738{
6ec2e0f5 8739static struct timeval x; x.tv_sec = x.tv_usec;
49e4877c
PA
8740 ;
8741 return 0;
8742}
8743_ACEOF
8744if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 8745 gl_cv_sys_struct_timeval=yes
49e4877c 8746else
6ec2e0f5 8747 gl_cv_sys_struct_timeval=no
49e4877c
PA
8748fi
8749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49e4877c 8750
49e4877c 8751fi
6ec2e0f5
SDJ
8752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
8753$as_echo "$gl_cv_sys_struct_timeval" >&6; }
8754 if test $gl_cv_sys_struct_timeval != yes; then
8755 HAVE_STRUCT_TIMEVAL=0
8756 else
8757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
8758$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
8759if test "${gl_cv_sys_struct_timeval_tv_sec+set}" = set; then :
8690e634
JK
8760 $as_echo_n "(cached) " >&6
8761else
6ec2e0f5 8762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 8763/* end confdefs.h. */
6ec2e0f5
SDJ
8764#if HAVE_SYS_TIME_H
8765 #include <sys/time.h>
8766 #endif
8767 #include <time.h>
8768 #if HAVE_WINSOCK2_H
8769 # include <winsock2.h>
8770 #endif
8690e634 8771
8690e634
JK
8772int
8773main ()
8774{
6ec2e0f5
SDJ
8775static struct timeval x;
8776 typedef int verify_tv_sec_type[
8777 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
8778 ];
8779
8690e634
JK
8780 ;
8781 return 0;
8782}
8690e634 8783_ACEOF
6ec2e0f5
SDJ
8784if ac_fn_c_try_compile "$LINENO"; then :
8785 gl_cv_sys_struct_timeval_tv_sec=yes
8690e634 8786else
6ec2e0f5 8787 gl_cv_sys_struct_timeval_tv_sec=no
8690e634 8788fi
6ec2e0f5 8789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 8790
6ec2e0f5
SDJ
8791fi
8792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
8793$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
8794 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
8795 REPLACE_STRUCT_TIMEVAL=1
8796 fi
8690e634
JK
8797 fi
8798
8799
6ec2e0f5
SDJ
8800 for gl_func in gettimeofday; do
8801 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
8802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
8803$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
8804if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
8690e634 8805 $as_echo_n "(cached) " >&6
8690e634
JK
8806else
8807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8808/* end confdefs.h. */
6ec2e0f5
SDJ
8809
8810#if HAVE_SYS_TIME_H
8811# include <sys/time.h>
8812#endif
8813#include <time.h>
8814
8690e634
JK
8815int
8816main ()
8817{
6ec2e0f5
SDJ
8818#undef $gl_func
8819 (void) $gl_func;
8690e634
JK
8820 ;
8821 return 0;
8822}
8823_ACEOF
6ec2e0f5
SDJ
8824if ac_fn_c_try_compile "$LINENO"; then :
8825 eval "$as_gl_Symbol=yes"
8690e634 8826else
6ec2e0f5 8827 eval "$as_gl_Symbol=no"
8690e634 8828fi
6ec2e0f5 8829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 8830fi
6ec2e0f5
SDJ
8831eval ac_res=\$$as_gl_Symbol
8832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8833$as_echo "$ac_res" >&6; }
8834 eval as_val=\$$as_gl_Symbol
8835 if test "x$as_val" = x""yes; then :
8836 cat >>confdefs.h <<_ACEOF
8837#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
8838_ACEOF
8690e634 8839
6ec2e0f5 8840 eval ac_cv_have_decl_$gl_func=yes
8690e634 8841fi
6ec2e0f5 8842 done
8690e634 8843
8690e634 8844
8690e634
JK
8845
8846
8847
8848
8849
8850
88b48903 8851
8690e634 8852
8690e634 8853
8690e634
JK
8854
8855
8856
8857
8858
49e4877c
PA
8859
8860
8690e634
JK
8861
8862
8690e634
JK
8863
8864
8865
8866 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 8867 gl_cv_next_limits_h='<'limits.h'>'
8690e634 8868 else
6ec2e0f5
SDJ
8869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
8870$as_echo_n "checking absolute name of <limits.h>... " >&6; }
8871if test "${gl_cv_next_limits_h+set}" = set; then :
8690e634
JK
8872 $as_echo_n "(cached) " >&6
8873else
8874
6ec2e0f5 8875 if test $ac_cv_header_limits_h = yes; then
8690e634
JK
8876
8877
4a626d0a
PA
8878
8879
8880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 8881/* end confdefs.h. */
6ec2e0f5 8882#include <limits.h>
8690e634 8883_ACEOF
4a626d0a
PA
8884 case "$host_os" in
8885 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8886 *) gl_absname_cpp="$ac_cpp" ;;
8887 esac
8888
8889 case "$host_os" in
8890 mingw*)
8891 gl_dirsep_regex='[/\\]'
8892 ;;
8893 *)
8894 gl_dirsep_regex='\/'
8895 ;;
8896 esac
8897 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 8898 gl_header_literal_regex=`echo 'limits.h' \
4a626d0a
PA
8899 | sed -e "$gl_make_literal_regex_sed"`
8900 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8901 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8902 s|^/[^/]|//&|
8903 p
8904 q
8905 }'
8906
6ec2e0f5 8907 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a
PA
8908 sed -n "$gl_absolute_header_sed"`
8909
6ec2e0f5
SDJ
8910 gl_header=$gl_cv_absolute_limits_h
8911 gl_cv_next_limits_h='"'$gl_header'"'
8690e634 8912 else
6ec2e0f5 8913 gl_cv_next_limits_h='<'limits.h'>'
8690e634
JK
8914 fi
8915
8916
8917fi
6ec2e0f5
SDJ
8918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
8919$as_echo "$gl_cv_next_limits_h" >&6; }
8690e634 8920 fi
6ec2e0f5 8921 NEXT_LIMITS_H=$gl_cv_next_limits_h
8690e634
JK
8922
8923 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8924 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 8925 gl_next_as_first_directive='<'limits.h'>'
8690e634
JK
8926 else
8927 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 8928 gl_next_as_first_directive=$gl_cv_next_limits_h
8690e634 8929 fi
6ec2e0f5 8930 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
8690e634
JK
8931
8932
8933
8934
6ec2e0f5
SDJ
8935
8936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has ULLONG_WIDTH etc." >&5
8937$as_echo_n "checking whether limits.h has ULLONG_WIDTH etc.... " >&6; }
8938if test "${gl_cv_header_limits_width+set}" = set; then :
8939 $as_echo_n "(cached) " >&6
8940else
8941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8942/* end confdefs.h. */
8943#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
8944 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
8945 #endif
8946 #include <limits.h>
8947 int ullw = ULLONG_WIDTH;
8948int
8949main ()
8950{
8951
8952 ;
8953 return 0;
8954}
8955_ACEOF
8956if ac_fn_c_try_compile "$LINENO"; then :
8957 gl_cv_header_limits_width=yes
8958else
8959 gl_cv_header_limits_width=no
8960fi
8961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8962fi
8963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
8964$as_echo "$gl_cv_header_limits_width" >&6; }
8965 if test "$gl_cv_header_limits_width" = yes; then
8966 LIMITS_H=
8690e634 8967 else
6ec2e0f5 8968 LIMITS_H=limits.h
8690e634
JK
8969 fi
8970
6ec2e0f5
SDJ
8971 if test -n "$LIMITS_H"; then
8972 GL_GENERATE_LIMITS_H_TRUE=
8973 GL_GENERATE_LIMITS_H_FALSE='#'
8974else
8975 GL_GENERATE_LIMITS_H_TRUE='#'
8976 GL_GENERATE_LIMITS_H_FALSE=
8977fi
8978
8690e634 8979
6ec2e0f5
SDJ
8980
8981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
8982$as_echo_n "checking for unsigned long long int... " >&6; }
8983if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
8690e634
JK
8984 $as_echo_n "(cached) " >&6
8985else
6ec2e0f5
SDJ
8986 ac_cv_type_unsigned_long_long_int=yes
8987 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
8690e634
JK
8988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8989/* end confdefs.h. */
8990
6ec2e0f5
SDJ
8991 /* For now, do not test the preprocessor; as of 2007 there are too many
8992 implementations with broken preprocessors. Perhaps this can
8993 be revisited in 2012. In the meantime, code should not expect
8994 #if to work with literals wider than 32 bits. */
8995 /* Test literals. */
8996 long long int ll = 9223372036854775807ll;
8997 long long int nll = -9223372036854775807LL;
8998 unsigned long long int ull = 18446744073709551615ULL;
8999 /* Test constant expressions. */
9000 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
9001 ? 1 : -1)];
9002 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
9003 ? 1 : -1)];
9004 int i = 63;
9005int
9006main ()
9007{
9008/* Test availability of runtime routines for shift and division. */
9009 long long int llmax = 9223372036854775807ll;
9010 unsigned long long int ullmax = 18446744073709551615ull;
9011 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
9012 | (llmax / ll) | (llmax % ll)
9013 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
9014 | (ullmax / ull) | (ullmax % ull));
9015 ;
9016 return 0;
9017}
8690e634 9018
6ec2e0f5
SDJ
9019_ACEOF
9020if ac_fn_c_try_link "$LINENO"; then :
8690e634 9021
6ec2e0f5
SDJ
9022else
9023 ac_cv_type_unsigned_long_long_int=no
9024fi
9025rm -f core conftest.err conftest.$ac_objext \
9026 conftest$ac_exeext conftest.$ac_ext
9027 fi
9028fi
9029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
9030$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
9031 if test $ac_cv_type_unsigned_long_long_int = yes; then
8690e634 9032
6ec2e0f5 9033$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
8690e634 9034
6ec2e0f5 9035 fi
8690e634 9036
8690e634 9037
8690e634 9038
6ec2e0f5
SDJ
9039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
9040$as_echo_n "checking for long long int... " >&6; }
9041if test "${ac_cv_type_long_long_int+set}" = set; then :
9042 $as_echo_n "(cached) " >&6
9043else
9044 ac_cv_type_long_long_int=yes
9045 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
9046 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
9047 if test $ac_cv_type_long_long_int = yes; then
9048 if test "$cross_compiling" = yes; then :
9049 :
8690e634
JK
9050else
9051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9052/* end confdefs.h. */
6ec2e0f5
SDJ
9053#include <limits.h>
9054 #ifndef LLONG_MAX
9055 # define HALF \
9056 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
9057 # define LLONG_MAX (HALF - 1 + HALF)
9058 #endif
8690e634
JK
9059int
9060main ()
9061{
6ec2e0f5
SDJ
9062long long int n = 1;
9063 int i;
9064 for (i = 0; ; i++)
9065 {
9066 long long int m = n << i;
9067 if (m >> i != n)
9068 return 1;
9069 if (LLONG_MAX / 2 < m)
9070 break;
9071 }
9072 return 0;
8690e634
JK
9073 ;
9074 return 0;
9075}
9076_ACEOF
9077if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5
SDJ
9078
9079else
9080 ac_cv_type_long_long_int=no
8690e634
JK
9081fi
9082rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9083 conftest.$ac_objext conftest.beam conftest.$ac_ext
9084fi
9085
6ec2e0f5
SDJ
9086 fi
9087 fi
8690e634 9088fi
6ec2e0f5
SDJ
9089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
9090$as_echo "$ac_cv_type_long_long_int" >&6; }
9091 if test $ac_cv_type_long_long_int = yes; then
49e4877c 9092
6ec2e0f5 9093$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
49e4877c 9094
6ec2e0f5 9095 fi
49e4877c 9096
49e4877c
PA
9097
9098
49e4877c
PA
9099
9100
49e4877c 9101
6ec2e0f5
SDJ
9102 gl_cv_c_multiarch=no
9103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9104/* end confdefs.h. */
9105#ifndef __APPLE_CC__
9106 not a universal capable compiler
9107 #endif
9108 typedef int dummy;
49e4877c 9109
49e4877c
PA
9110_ACEOF
9111if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5
SDJ
9112
9113 arch=
9114 prev=
9115 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
9116 if test -n "$prev"; then
9117 case $word in
9118 i?86 | x86_64 | ppc | ppc64)
9119 if test -z "$arch" || test "$arch" = "$word"; then
9120 arch="$word"
9121 else
9122 gl_cv_c_multiarch=yes
9123 fi
9124 ;;
9125 esac
9126 prev=
9127 else
9128 if test "x$word" = "x-arch"; then
9129 prev=arch
9130 fi
9131 fi
9132 done
9133
49e4877c
PA
9134fi
9135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
9136 if test $gl_cv_c_multiarch = yes; then
9137 APPLE_UNIVERSAL_BUILD=1
9138 else
9139 APPLE_UNIVERSAL_BUILD=0
9140 fi
49e4877c 9141
49e4877c 9142
49e4877c
PA
9143
9144
49e4877c 9145
49e4877c 9146
49e4877c 9147
6ec2e0f5
SDJ
9148 if test $ac_cv_type_long_long_int = yes; then
9149 HAVE_LONG_LONG_INT=1
9150 else
9151 HAVE_LONG_LONG_INT=0
9152 fi
49e4877c 9153
49e4877c 9154
6ec2e0f5
SDJ
9155 if test $ac_cv_type_unsigned_long_long_int = yes; then
9156 HAVE_UNSIGNED_LONG_LONG_INT=1
8690e634 9157 else
6ec2e0f5
SDJ
9158 HAVE_UNSIGNED_LONG_LONG_INT=0
9159 fi
8690e634 9160
8690e634 9161
8690e634 9162
6ec2e0f5
SDJ
9163 if test $ac_cv_header_wchar_h = yes; then
9164 HAVE_WCHAR_H=1
9165 else
9166 HAVE_WCHAR_H=0
9167 fi
8690e634
JK
9168
9169
6ec2e0f5
SDJ
9170 if test $ac_cv_header_inttypes_h = yes; then
9171 HAVE_INTTYPES_H=1
9172 else
9173 HAVE_INTTYPES_H=0
9174 fi
8690e634
JK
9175
9176
6ec2e0f5
SDJ
9177 if test $ac_cv_header_sys_types_h = yes; then
9178 HAVE_SYS_TYPES_H=1
9179 else
9180 HAVE_SYS_TYPES_H=0
9181 fi
8690e634 9182
8690e634 9183
8690e634 9184
8690e634 9185
8690e634 9186
8690e634
JK
9187
9188
8690e634
JK
9189
9190
6ec2e0f5
SDJ
9191
9192
9193 if test $gl_cv_have_include_next = yes; then
9194 gl_cv_next_stdint_h='<'stdint.h'>'
9195 else
9196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
9197$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
9198if test "${gl_cv_next_stdint_h+set}" = set; then :
8690e634
JK
9199 $as_echo_n "(cached) " >&6
9200else
8690e634 9201
6ec2e0f5 9202 if test $ac_cv_header_stdint_h = yes; then
8690e634 9203
8690e634 9204
8690e634 9205
6ec2e0f5
SDJ
9206
9207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9208/* end confdefs.h. */
9209#include <stdint.h>
8690e634 9210_ACEOF
6ec2e0f5
SDJ
9211 case "$host_os" in
9212 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9213 *) gl_absname_cpp="$ac_cpp" ;;
9214 esac
8690e634 9215
6ec2e0f5
SDJ
9216 case "$host_os" in
9217 mingw*)
9218 gl_dirsep_regex='[/\\]'
9219 ;;
9220 *)
9221 gl_dirsep_regex='\/'
9222 ;;
9223 esac
9224 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9225 gl_header_literal_regex=`echo 'stdint.h' \
9226 | sed -e "$gl_make_literal_regex_sed"`
9227 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9228 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9229 s|^/[^/]|//&|
9230 p
9231 q
9232 }'
9233
9234 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9235 sed -n "$gl_absolute_header_sed"`
9236
9237 gl_header=$gl_cv_absolute_stdint_h
9238 gl_cv_next_stdint_h='"'$gl_header'"'
9239 else
9240 gl_cv_next_stdint_h='<'stdint.h'>'
9241 fi
9242
9243
9244fi
9245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
9246$as_echo "$gl_cv_next_stdint_h" >&6; }
9247 fi
9248 NEXT_STDINT_H=$gl_cv_next_stdint_h
9249
9250 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9251 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9252 gl_next_as_first_directive='<'stdint.h'>'
9253 else
9254 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9255 gl_next_as_first_directive=$gl_cv_next_stdint_h
9256 fi
9257 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
8690e634
JK
9258
9259
9260
9261
6ec2e0f5
SDJ
9262 if test $ac_cv_header_stdint_h = yes; then
9263 HAVE_STDINT_H=1
9264 else
9265 HAVE_STDINT_H=0
9266 fi
9267
9268
9269 if test $ac_cv_header_stdint_h = yes; then
9270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
9271$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
9272if test "${gl_cv_header_working_stdint_h+set}" = set; then :
8690e634
JK
9273 $as_echo_n "(cached) " >&6
9274else
6ec2e0f5
SDJ
9275 gl_cv_header_working_stdint_h=no
9276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
9277/* end confdefs.h. */
9278
6ec2e0f5
SDJ
9279
9280#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
9281#define __STDC_CONSTANT_MACROS 1
9282#define __STDC_LIMIT_MACROS 1
9283#include <stdint.h>
9284/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
9285#if !(defined WCHAR_MIN && defined WCHAR_MAX)
9286#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
9287#endif
9288
9289
8690e634
JK
9290 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9291 included before <wchar.h>. */
9292 #include <stddef.h>
9293 #include <signal.h>
9294 #if HAVE_WCHAR_H
9295 # include <stdio.h>
9296 # include <time.h>
9297 # include <wchar.h>
9298 #endif
9299
8690e634 9300
6ec2e0f5
SDJ
9301#ifdef INT8_MAX
9302int8_t a1 = INT8_MAX;
9303int8_t a1min = INT8_MIN;
9304#endif
9305#ifdef INT16_MAX
9306int16_t a2 = INT16_MAX;
9307int16_t a2min = INT16_MIN;
9308#endif
9309#ifdef INT32_MAX
9310int32_t a3 = INT32_MAX;
9311int32_t a3min = INT32_MIN;
9312#endif
9313#ifdef INT64_MAX
9314int64_t a4 = INT64_MAX;
9315int64_t a4min = INT64_MIN;
9316#endif
9317#ifdef UINT8_MAX
9318uint8_t b1 = UINT8_MAX;
9319#else
9320typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
9321#endif
9322#ifdef UINT16_MAX
9323uint16_t b2 = UINT16_MAX;
9324#endif
9325#ifdef UINT32_MAX
9326uint32_t b3 = UINT32_MAX;
9327#endif
9328#ifdef UINT64_MAX
9329uint64_t b4 = UINT64_MAX;
9330#endif
9331int_least8_t c1 = INT8_C (0x7f);
9332int_least8_t c1max = INT_LEAST8_MAX;
9333int_least8_t c1min = INT_LEAST8_MIN;
9334int_least16_t c2 = INT16_C (0x7fff);
9335int_least16_t c2max = INT_LEAST16_MAX;
9336int_least16_t c2min = INT_LEAST16_MIN;
9337int_least32_t c3 = INT32_C (0x7fffffff);
9338int_least32_t c3max = INT_LEAST32_MAX;
9339int_least32_t c3min = INT_LEAST32_MIN;
9340int_least64_t c4 = INT64_C (0x7fffffffffffffff);
9341int_least64_t c4max = INT_LEAST64_MAX;
9342int_least64_t c4min = INT_LEAST64_MIN;
9343uint_least8_t d1 = UINT8_C (0xff);
9344uint_least8_t d1max = UINT_LEAST8_MAX;
9345uint_least16_t d2 = UINT16_C (0xffff);
9346uint_least16_t d2max = UINT_LEAST16_MAX;
9347uint_least32_t d3 = UINT32_C (0xffffffff);
9348uint_least32_t d3max = UINT_LEAST32_MAX;
9349uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
9350uint_least64_t d4max = UINT_LEAST64_MAX;
9351int_fast8_t e1 = INT_FAST8_MAX;
9352int_fast8_t e1min = INT_FAST8_MIN;
9353int_fast16_t e2 = INT_FAST16_MAX;
9354int_fast16_t e2min = INT_FAST16_MIN;
9355int_fast32_t e3 = INT_FAST32_MAX;
9356int_fast32_t e3min = INT_FAST32_MIN;
9357int_fast64_t e4 = INT_FAST64_MAX;
9358int_fast64_t e4min = INT_FAST64_MIN;
9359uint_fast8_t f1 = UINT_FAST8_MAX;
9360uint_fast16_t f2 = UINT_FAST16_MAX;
9361uint_fast32_t f3 = UINT_FAST32_MAX;
9362uint_fast64_t f4 = UINT_FAST64_MAX;
9363#ifdef INTPTR_MAX
9364intptr_t g = INTPTR_MAX;
9365intptr_t gmin = INTPTR_MIN;
9366#endif
9367#ifdef UINTPTR_MAX
9368uintptr_t h = UINTPTR_MAX;
9369#endif
9370intmax_t i = INTMAX_MAX;
9371uintmax_t j = UINTMAX_MAX;
8690e634 9372
6ec2e0f5
SDJ
9373/* Check that SIZE_MAX has the correct type, if possible. */
9374#if 201112 <= __STDC_VERSION__
9375int k = _Generic (SIZE_MAX, size_t: 0);
9376#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
9377 || (0x5110 <= __SUNPRO_C && !__STDC__))
9378extern size_t k;
9379extern __typeof__ (SIZE_MAX) k;
9380#endif
8690e634 9381
6ec2e0f5
SDJ
9382#include <limits.h> /* for CHAR_BIT */
9383#define TYPE_MINIMUM(t) \
9384 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
9385#define TYPE_MAXIMUM(t) \
9386 ((t) ((t) 0 < (t) -1 \
9387 ? (t) -1 \
9388 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
9389struct s {
9390 int check_PTRDIFF:
9391 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
9392 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
9393 ? 1 : -1;
9394 /* Detect bug in FreeBSD 6.0 / ia64. */
9395 int check_SIG_ATOMIC:
9396 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
9397 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
9398 ? 1 : -1;
9399 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
9400 int check_WCHAR:
9401 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
9402 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
9403 ? 1 : -1;
9404 /* Detect bug in mingw. */
9405 int check_WINT:
9406 WINT_MIN == TYPE_MINIMUM (wint_t)
9407 && WINT_MAX == TYPE_MAXIMUM (wint_t)
9408 ? 1 : -1;
8690e634 9409
6ec2e0f5
SDJ
9410 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
9411 int check_UINT8_C:
9412 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
9413 int check_UINT16_C:
9414 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
8690e634 9415
6ec2e0f5
SDJ
9416 /* Detect bugs in OpenBSD 3.9 stdint.h. */
9417#ifdef UINT8_MAX
9418 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
9419#endif
9420#ifdef UINT16_MAX
9421 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
9422#endif
9423#ifdef UINT32_MAX
9424 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
9425#endif
9426#ifdef UINT64_MAX
9427 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
9428#endif
9429 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
9430 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
9431 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
9432 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
9433 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
9434 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
9435 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
9436 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
9437 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
9438 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
9439 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
9440};
8690e634 9441
8690e634
JK
9442int
9443main ()
9444{
9445
9446 ;
9447 return 0;
9448}
9449_ACEOF
9450if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5
SDJ
9451 if test "$cross_compiling" = yes; then :
9452 gl_cv_header_working_stdint_h=yes
8690e634 9453
6ec2e0f5
SDJ
9454else
9455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9456/* end confdefs.h. */
8690e634 9457
8690e634 9458
6ec2e0f5
SDJ
9459#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
9460#define __STDC_CONSTANT_MACROS 1
9461#define __STDC_LIMIT_MACROS 1
9462#include <stdint.h>
8690e634 9463
8690e634
JK
9464
9465 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9466 included before <wchar.h>. */
9467 #include <stddef.h>
9468 #include <signal.h>
9469 #if HAVE_WCHAR_H
9470 # include <stdio.h>
9471 # include <time.h>
9472 # include <wchar.h>
9473 #endif
9474
8690e634 9475
6ec2e0f5
SDJ
9476#include <stdio.h>
9477#include <string.h>
9478#define MVAL(macro) MVAL1(macro)
9479#define MVAL1(expression) #expression
9480static const char *macro_values[] =
9481 {
9482#ifdef INT8_MAX
9483 MVAL (INT8_MAX),
9484#endif
9485#ifdef INT16_MAX
9486 MVAL (INT16_MAX),
9487#endif
9488#ifdef INT32_MAX
9489 MVAL (INT32_MAX),
9490#endif
9491#ifdef INT64_MAX
9492 MVAL (INT64_MAX),
9493#endif
9494#ifdef UINT8_MAX
9495 MVAL (UINT8_MAX),
9496#endif
9497#ifdef UINT16_MAX
9498 MVAL (UINT16_MAX),
9499#endif
9500#ifdef UINT32_MAX
9501 MVAL (UINT32_MAX),
9502#endif
9503#ifdef UINT64_MAX
9504 MVAL (UINT64_MAX),
9505#endif
9506 NULL
9507 };
9508
9509int
9510main ()
9511{
9512
9513 const char **mv;
9514 for (mv = macro_values; *mv != NULL; mv++)
9515 {
9516 const char *value = *mv;
9517 /* Test whether it looks like a cast expression. */
9518 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
9519 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
9520 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
9521 || strncmp (value, "((int)"/*)*/, 6) == 0
9522 || strncmp (value, "((signed short)"/*)*/, 15) == 0
9523 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
9524 return mv - macro_values + 1;
9525 }
9526 return 0;
9527
9528 ;
8690e634
JK
9529 return 0;
9530}
9531_ACEOF
6ec2e0f5
SDJ
9532if ac_fn_c_try_run "$LINENO"; then :
9533 gl_cv_header_working_stdint_h=yes
8690e634 9534fi
6ec2e0f5
SDJ
9535rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9536 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 9537fi
8690e634
JK
9538
9539
6ec2e0f5
SDJ
9540fi
9541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 9542
6ec2e0f5
SDJ
9543fi
9544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
9545$as_echo "$gl_cv_header_working_stdint_h" >&6; }
8690e634
JK
9546 fi
9547
6ec2e0f5
SDJ
9548 HAVE_C99_STDINT_H=0
9549 HAVE_SYS_BITYPES_H=0
9550 HAVE_SYS_INTTYPES_H=0
9551 STDINT_H=stdint.h
9552 if test "$gl_cv_header_working_stdint_h" = yes; then
9553 HAVE_C99_STDINT_H=1
9554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
9555$as_echo_n "checking whether stdint.h predates C++11... " >&6; }
9556if test "${gl_cv_header_stdint_predates_cxx11_h+set}" = set; then :
9557 $as_echo_n "(cached) " >&6
49e4877c 9558else
6ec2e0f5
SDJ
9559 gl_cv_header_stdint_predates_cxx11_h=yes
9560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9561/* end confdefs.h. */
49e4877c
PA
9562
9563
6ec2e0f5
SDJ
9564#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
9565#include <stdint.h>
49e4877c
PA
9566
9567
6ec2e0f5
SDJ
9568 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9569 included before <wchar.h>. */
9570 #include <stddef.h>
9571 #include <signal.h>
9572 #if HAVE_WCHAR_H
9573 # include <stdio.h>
9574 # include <time.h>
9575 # include <wchar.h>
9576 #endif
49e4877c 9577
8690e634 9578
6ec2e0f5
SDJ
9579intmax_t im = INTMAX_MAX;
9580int32_t i32 = INT32_C (0x7fffffff);
8690e634 9581
6ec2e0f5
SDJ
9582int
9583main ()
9584{
8690e634 9585
6ec2e0f5
SDJ
9586 ;
9587 return 0;
9588}
9589_ACEOF
9590if ac_fn_c_try_compile "$LINENO"; then :
9591 gl_cv_header_stdint_predates_cxx11_h=no
9592fi
9593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9594fi
9595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
9596$as_echo "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
8690e634 9597
6ec2e0f5 9598 if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
8690e634 9599
6ec2e0f5 9600$as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
8690e634
JK
9601
9602
6ec2e0f5 9603$as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
8690e634 9604
6ec2e0f5
SDJ
9605 fi
9606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
9607$as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
9608if test "${gl_cv_header_stdint_width+set}" = set; then :
9609 $as_echo_n "(cached) " >&6
9610else
9611 gl_cv_header_stdint_width=no
9612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9613/* end confdefs.h. */
8690e634 9614
6ec2e0f5
SDJ
9615 /* Work if build is not clean. */
9616 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
9617 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
9618 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
9619 #endif
9620 #include <stdint.h>
8690e634 9621
6ec2e0f5
SDJ
9622 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9623 included before <wchar.h>. */
9624 #include <stddef.h>
9625 #include <signal.h>
9626 #if HAVE_WCHAR_H
9627 # include <stdio.h>
9628 # include <time.h>
9629 # include <wchar.h>
9630 #endif
8690e634 9631
6ec2e0f5 9632 int iw = UINTMAX_WIDTH;
8690e634 9633
6ec2e0f5
SDJ
9634int
9635main ()
9636{
8690e634 9637
6ec2e0f5
SDJ
9638 ;
9639 return 0;
9640}
9641_ACEOF
9642if ac_fn_c_try_compile "$LINENO"; then :
9643 gl_cv_header_stdint_width=yes
9644fi
9645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9646fi
9647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
9648$as_echo "$gl_cv_header_stdint_width" >&6; }
9649 if test "$gl_cv_header_stdint_width" = yes; then
9650 STDINT_H=
9651 fi
9652 else
9653 for ac_header in sys/inttypes.h sys/bitypes.h
9654do :
9655 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9656ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9657eval as_val=\$$as_ac_Header
9658 if test "x$as_val" = x""yes; then :
9659 cat >>confdefs.h <<_ACEOF
9660#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9661_ACEOF
8690e634 9662
6ec2e0f5 9663fi
8690e634 9664
6ec2e0f5 9665done
8690e634 9666
6ec2e0f5
SDJ
9667 if test $ac_cv_header_sys_inttypes_h = yes; then
9668 HAVE_SYS_INTTYPES_H=1
9669 fi
9670 if test $ac_cv_header_sys_bitypes_h = yes; then
9671 HAVE_SYS_BITYPES_H=1
9672 fi
8690e634
JK
9673
9674
6ec2e0f5 9675 if test $APPLE_UNIVERSAL_BUILD = 0; then
8690e634
JK
9676
9677
6ec2e0f5
SDJ
9678 for gltype in ptrdiff_t size_t ; do
9679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
9680$as_echo_n "checking for bit size of $gltype... " >&6; }
9681if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
8690e634
JK
9682 $as_echo_n "(cached) " >&6
9683else
6ec2e0f5
SDJ
9684 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
9685 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9686 included before <wchar.h>. */
9687 #include <stddef.h>
9688 #include <signal.h>
9689 #if HAVE_WCHAR_H
9690 # include <stdio.h>
9691 # include <time.h>
9692 # include <wchar.h>
9693 #endif
8690e634 9694
6ec2e0f5 9695#include <limits.h>"; then :
4a626d0a 9696
6ec2e0f5
SDJ
9697else
9698 result=unknown
9699fi
4a626d0a 9700
6ec2e0f5 9701 eval gl_cv_bitsizeof_${gltype}=\$result
4a626d0a 9702
6ec2e0f5
SDJ
9703fi
9704eval ac_res=\$gl_cv_bitsizeof_${gltype}
9705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9706$as_echo "$ac_res" >&6; }
9707 eval result=\$gl_cv_bitsizeof_${gltype}
9708 if test $result = unknown; then
9709 result=0
9710 fi
9711 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
9712 cat >>confdefs.h <<_ACEOF
9713#define BITSIZEOF_${GLTYPE} $result
9714_ACEOF
4a626d0a 9715
6ec2e0f5
SDJ
9716 eval BITSIZEOF_${GLTYPE}=\$result
9717 done
4a626d0a 9718
8690e634 9719
6ec2e0f5 9720 fi
8690e634 9721
8690e634 9722
6ec2e0f5
SDJ
9723 for gltype in sig_atomic_t wchar_t wint_t ; do
9724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
9725$as_echo_n "checking for bit size of $gltype... " >&6; }
9726if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
9727 $as_echo_n "(cached) " >&6
9728else
9729 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
9730 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9731 included before <wchar.h>. */
9732 #include <stddef.h>
9733 #include <signal.h>
9734 #if HAVE_WCHAR_H
9735 # include <stdio.h>
9736 # include <time.h>
9737 # include <wchar.h>
9738 #endif
8690e634 9739
6ec2e0f5
SDJ
9740#include <limits.h>"; then :
9741
9742else
9743 result=unknown
9744fi
8690e634 9745
6ec2e0f5 9746 eval gl_cv_bitsizeof_${gltype}=\$result
8690e634 9747
6ec2e0f5
SDJ
9748fi
9749eval ac_res=\$gl_cv_bitsizeof_${gltype}
9750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9751$as_echo "$ac_res" >&6; }
9752 eval result=\$gl_cv_bitsizeof_${gltype}
9753 if test $result = unknown; then
9754 result=0
9755 fi
9756 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
9757 cat >>confdefs.h <<_ACEOF
9758#define BITSIZEOF_${GLTYPE} $result
9759_ACEOF
8690e634 9760
6ec2e0f5
SDJ
9761 eval BITSIZEOF_${GLTYPE}=\$result
9762 done
8690e634
JK
9763
9764
9765
9766
6ec2e0f5
SDJ
9767 for gltype in sig_atomic_t wchar_t wint_t ; do
9768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
9769$as_echo_n "checking whether $gltype is signed... " >&6; }
9770if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
8690e634
JK
9771 $as_echo_n "(cached) " >&6
9772else
9773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9774/* end confdefs.h. */
8690e634 9775
6ec2e0f5
SDJ
9776 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9777 included before <wchar.h>. */
9778 #include <stddef.h>
9779 #include <signal.h>
9780 #if HAVE_WCHAR_H
9781 # include <stdio.h>
9782 # include <time.h>
9783 # include <wchar.h>
9784 #endif
9785
9786 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
8690e634
JK
9787int
9788main ()
9789{
6ec2e0f5 9790
8690e634
JK
9791 ;
9792 return 0;
9793}
9794_ACEOF
9795if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 9796 result=yes
8690e634 9797else
6ec2e0f5 9798 result=no
8690e634
JK
9799fi
9800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
9801 eval gl_cv_type_${gltype}_signed=\$result
9802
8690e634 9803fi
6ec2e0f5 9804eval ac_res=\$gl_cv_type_${gltype}_signed
8690e634
JK
9805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9806$as_echo "$ac_res" >&6; }
6ec2e0f5
SDJ
9807 eval result=\$gl_cv_type_${gltype}_signed
9808 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
9809 if test "$result" = yes; then
9810 cat >>confdefs.h <<_ACEOF
9811#define HAVE_SIGNED_${GLTYPE} 1
8690e634
JK
9812_ACEOF
9813
6ec2e0f5
SDJ
9814 eval HAVE_SIGNED_${GLTYPE}=1
9815 else
9816 eval HAVE_SIGNED_${GLTYPE}=0
9817 fi
9818 done
8690e634 9819
8690e634 9820
6ec2e0f5
SDJ
9821 gl_cv_type_ptrdiff_t_signed=yes
9822 gl_cv_type_size_t_signed=no
9823 if test $APPLE_UNIVERSAL_BUILD = 0; then
8690e634 9824
8690e634 9825
6ec2e0f5
SDJ
9826 for gltype in ptrdiff_t size_t ; do
9827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
9828$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
9829if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
8690e634
JK
9830 $as_echo_n "(cached) " >&6
9831else
6ec2e0f5
SDJ
9832 eval gl_cv_type_${gltype}_suffix=no
9833 eval result=\$gl_cv_type_${gltype}_signed
9834 if test "$result" = yes; then
9835 glsufu=
9836 else
9837 glsufu=u
9838 fi
9839 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
9840 case $glsuf in
9841 '') gltype1='int';;
9842 l) gltype1='long int';;
9843 ll) gltype1='long long int';;
9844 i64) gltype1='__int64';;
9845 u) gltype1='unsigned int';;
9846 ul) gltype1='unsigned long int';;
9847 ull) gltype1='unsigned long long int';;
9848 ui64)gltype1='unsigned __int64';;
9849 esac
9850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
9851/* end confdefs.h. */
9852
6ec2e0f5
SDJ
9853 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9854 included before <wchar.h>. */
9855 #include <stddef.h>
9856 #include <signal.h>
9857 #if HAVE_WCHAR_H
9858 # include <stdio.h>
9859 # include <time.h>
9860 # include <wchar.h>
9861 #endif
8690e634 9862
6ec2e0f5
SDJ
9863 extern $gltype foo;
9864 extern $gltype1 foo;
8690e634
JK
9865int
9866main ()
9867{
9868
9869 ;
9870 return 0;
9871}
9872_ACEOF
9873if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 9874 eval gl_cv_type_${gltype}_suffix=\$glsuf
8690e634
JK
9875fi
9876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
9877 eval result=\$gl_cv_type_${gltype}_suffix
9878 test "$result" != no && break
9879 done
8690e634 9880fi
6ec2e0f5
SDJ
9881eval ac_res=\$gl_cv_type_${gltype}_suffix
9882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9883$as_echo "$ac_res" >&6; }
9884 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
9885 eval result=\$gl_cv_type_${gltype}_suffix
9886 test "$result" = no && result=
9887 eval ${GLTYPE}_SUFFIX=\$result
9888 cat >>confdefs.h <<_ACEOF
9889#define ${GLTYPE}_SUFFIX $result
8690e634
JK
9890_ACEOF
9891
6ec2e0f5 9892 done
8690e634
JK
9893
9894
6ec2e0f5 9895 fi
8690e634 9896
6ec2e0f5
SDJ
9897
9898 for gltype in sig_atomic_t wchar_t wint_t ; do
9899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
9900$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
9901if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
8690e634
JK
9902 $as_echo_n "(cached) " >&6
9903else
6ec2e0f5
SDJ
9904 eval gl_cv_type_${gltype}_suffix=no
9905 eval result=\$gl_cv_type_${gltype}_signed
9906 if test "$result" = yes; then
9907 glsufu=
9908 else
9909 glsufu=u
9910 fi
9911 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
9912 case $glsuf in
9913 '') gltype1='int';;
9914 l) gltype1='long int';;
9915 ll) gltype1='long long int';;
9916 i64) gltype1='__int64';;
9917 u) gltype1='unsigned int';;
9918 ul) gltype1='unsigned long int';;
9919 ull) gltype1='unsigned long long int';;
9920 ui64)gltype1='unsigned __int64';;
9921 esac
9922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 9923/* end confdefs.h. */
88b48903 9924
6ec2e0f5
SDJ
9925 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9926 included before <wchar.h>. */
9927 #include <stddef.h>
9928 #include <signal.h>
9929 #if HAVE_WCHAR_H
9930 # include <stdio.h>
9931 # include <time.h>
9932 # include <wchar.h>
9933 #endif
88b48903 9934
6ec2e0f5
SDJ
9935 extern $gltype foo;
9936 extern $gltype1 foo;
88b48903
WN
9937int
9938main ()
9939{
88b48903
WN
9940
9941 ;
9942 return 0;
9943}
9944_ACEOF
9945if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 9946 eval gl_cv_type_${gltype}_suffix=\$glsuf
8690e634 9947fi
88b48903 9948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
9949 eval result=\$gl_cv_type_${gltype}_suffix
9950 test "$result" != no && break
9951 done
8690e634 9952fi
6ec2e0f5
SDJ
9953eval ac_res=\$gl_cv_type_${gltype}_suffix
9954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9955$as_echo "$ac_res" >&6; }
9956 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
9957 eval result=\$gl_cv_type_${gltype}_suffix
9958 test "$result" = no && result=
9959 eval ${GLTYPE}_SUFFIX=\$result
9960 cat >>confdefs.h <<_ACEOF
9961#define ${GLTYPE}_SUFFIX $result
88b48903 9962_ACEOF
8690e634 9963
6ec2e0f5 9964 done
8690e634
JK
9965
9966
9967
6ec2e0f5
SDJ
9968 if test $BITSIZEOF_WINT_T -lt 32; then
9969 BITSIZEOF_WINT_T=32
9970 fi
8690e634 9971
6ec2e0f5
SDJ
9972 fi
9973
9974 # The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH.
9975 LIMITS_H=limits.h
9976 if test -n "$LIMITS_H"; then
9977 GL_GENERATE_LIMITS_H_TRUE=
9978 GL_GENERATE_LIMITS_H_FALSE='#'
88b48903 9979else
6ec2e0f5
SDJ
9980 GL_GENERATE_LIMITS_H_TRUE='#'
9981 GL_GENERATE_LIMITS_H_FALSE=
88b48903 9982fi
8690e634
JK
9983
9984
9985
9986
9987
6ec2e0f5
SDJ
9988
9989 if test -n "$STDINT_H"; then
9990 GL_GENERATE_STDINT_H_TRUE=
9991 GL_GENERATE_STDINT_H_FALSE='#'
9992else
9993 GL_GENERATE_STDINT_H_TRUE='#'
9994 GL_GENERATE_STDINT_H_FALSE=
88b48903 9995fi
8690e634 9996
8690e634
JK
9997
9998
9999
6ec2e0f5
SDJ
10000
10001 GNULIB_IMAXABS=0;
10002 GNULIB_IMAXDIV=0;
10003 GNULIB_STRTOIMAX=0;
10004 GNULIB_STRTOUMAX=0;
10005 HAVE_DECL_IMAXABS=1;
10006 HAVE_DECL_IMAXDIV=1;
10007 HAVE_DECL_STRTOIMAX=1;
10008 HAVE_DECL_STRTOUMAX=1;
10009 REPLACE_STRTOIMAX=0;
10010 REPLACE_STRTOUMAX=0;
10011 INT32_MAX_LT_INTMAX_MAX=1;
10012 INT64_MAX_EQ_LONG_MAX='defined _LP64';
10013 PRI_MACROS_BROKEN=0;
10014 PRIPTR_PREFIX=__PRIPTR_PREFIX;
10015 UINT32_MAX_LT_UINTMAX_MAX=1;
10016 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032 if test $gl_cv_have_include_next = yes; then
10033 gl_cv_next_inttypes_h='<'inttypes.h'>'
10034 else
10035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
10036$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
10037if test "${gl_cv_next_inttypes_h+set}" = set; then :
10038 $as_echo_n "(cached) " >&6
88b48903 10039else
8690e634 10040
6ec2e0f5 10041 if test $ac_cv_header_inttypes_h = yes; then
8690e634
JK
10042
10043
8690e634
JK
10044
10045
6ec2e0f5
SDJ
10046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10047/* end confdefs.h. */
10048#include <inttypes.h>
88b48903 10049_ACEOF
6ec2e0f5
SDJ
10050 case "$host_os" in
10051 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10052 *) gl_absname_cpp="$ac_cpp" ;;
10053 esac
8690e634 10054
6ec2e0f5
SDJ
10055 case "$host_os" in
10056 mingw*)
10057 gl_dirsep_regex='[/\\]'
10058 ;;
10059 *)
10060 gl_dirsep_regex='\/'
88b48903
WN
10061 ;;
10062 esac
6ec2e0f5
SDJ
10063 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10064 gl_header_literal_regex=`echo 'inttypes.h' \
10065 | sed -e "$gl_make_literal_regex_sed"`
10066 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10067 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10068 s|^/[^/]|//&|
10069 p
10070 q
10071 }'
8690e634 10072
6ec2e0f5
SDJ
10073 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10074 sed -n "$gl_absolute_header_sed"`
8690e634 10075
6ec2e0f5
SDJ
10076 gl_header=$gl_cv_absolute_inttypes_h
10077 gl_cv_next_inttypes_h='"'$gl_header'"'
10078 else
10079 gl_cv_next_inttypes_h='<'inttypes.h'>'
10080 fi
88b48903 10081
88b48903 10082
88b48903 10083fi
6ec2e0f5
SDJ
10084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
10085$as_echo "$gl_cv_next_inttypes_h" >&6; }
10086 fi
10087 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
88b48903 10088
6ec2e0f5
SDJ
10089 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10090 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10091 gl_next_as_first_directive='<'inttypes.h'>'
10092 else
10093 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10094 gl_next_as_first_directive=$gl_cv_next_inttypes_h
10095 fi
10096 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
88b48903 10097
6ec2e0f5
SDJ
10098
10099
10100
10101
10102
10103
10104
10105 for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
10106 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
10107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
10108$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
10109if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
10110 $as_echo_n "(cached) " >&6
10111else
10112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
88b48903 10113/* end confdefs.h. */
6ec2e0f5 10114#include <inttypes.h>
88b48903
WN
10115
10116int
10117main ()
10118{
6ec2e0f5
SDJ
10119#undef $gl_func
10120 (void) $gl_func;
88b48903
WN
10121 ;
10122 return 0;
10123}
10124_ACEOF
10125if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 10126 eval "$as_gl_Symbol=yes"
88b48903 10127else
6ec2e0f5 10128 eval "$as_gl_Symbol=no"
88b48903
WN
10129fi
10130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10131fi
6ec2e0f5
SDJ
10132eval ac_res=\$$as_gl_Symbol
10133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10134$as_echo "$ac_res" >&6; }
10135 eval as_val=\$$as_gl_Symbol
10136 if test "x$as_val" = x""yes; then :
10137 cat >>confdefs.h <<_ACEOF
10138#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
10139_ACEOF
10140
10141 eval ac_cv_have_decl_$gl_func=yes
10142fi
10143 done
10144
10145
10146
10147 for ac_header in inttypes.h
10148do :
10149 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
10150if test "x$ac_cv_header_inttypes_h" = x""yes; then :
10151 cat >>confdefs.h <<_ACEOF
10152#define HAVE_INTTYPES_H 1
10153_ACEOF
10154
10155fi
10156
10157done
10158
10159 if test $ac_cv_header_inttypes_h = yes; then
10160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
10161$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
10162if test "${gt_cv_inttypes_pri_broken+set}" = set; then :
10163 $as_echo_n "(cached) " >&6
10164else
10165
10166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10167/* end confdefs.h. */
10168
10169#include <inttypes.h>
10170#ifdef PRId32
10171char *p = PRId32;
10172#endif
10173
10174int
10175main ()
10176{
10177
10178 ;
10179 return 0;
10180}
10181_ACEOF
10182if ac_fn_c_try_compile "$LINENO"; then :
10183 gt_cv_inttypes_pri_broken=no
10184else
10185 gt_cv_inttypes_pri_broken=yes
10186fi
10187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10188
10189fi
10190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
10191$as_echo "$gt_cv_inttypes_pri_broken" >&6; }
10192 fi
10193 if test "$gt_cv_inttypes_pri_broken" = yes; then
10194
10195cat >>confdefs.h <<_ACEOF
10196#define PRI_MACROS_BROKEN 1
10197_ACEOF
10198
10199 PRI_MACROS_BROKEN=1
10200 else
10201 PRI_MACROS_BROKEN=0
10202 fi
10203
10204
10205
10206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
10207$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
10208if test "${gl_cv_cc_double_expbit0+set}" = set; then :
10209 $as_echo_n "(cached) " >&6
10210else
10211
10212 if test "$cross_compiling" = yes; then :
10213
10214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10215/* end confdefs.h. */
10216
10217#if defined arm || defined __arm || defined __arm__
10218 mixed_endianness
10219#endif
10220
10221_ACEOF
10222if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10223 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
10224 gl_cv_cc_double_expbit0="unknown"
10225else
10226
10227 :
10228if test "${ac_cv_c_bigendian+set}" = set; then :
10229 $as_echo_n "(cached) " >&6
10230else
10231 ac_cv_c_bigendian=unknown
10232 # See if we're dealing with a universal compiler.
10233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10234/* end confdefs.h. */
10235#ifndef __APPLE_CC__
10236 not a universal capable compiler
10237 #endif
10238 typedef int dummy;
10239
10240_ACEOF
10241if ac_fn_c_try_compile "$LINENO"; then :
10242
10243 # Check for potential -arch flags. It is not universal unless
10244 # there are at least two -arch flags with different values.
10245 ac_arch=
10246 ac_prev=
10247 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
10248 if test -n "$ac_prev"; then
10249 case $ac_word in
10250 i?86 | x86_64 | ppc | ppc64)
10251 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
10252 ac_arch=$ac_word
10253 else
10254 ac_cv_c_bigendian=universal
10255 break
10256 fi
10257 ;;
10258 esac
10259 ac_prev=
10260 elif test "x$ac_word" = "x-arch"; then
10261 ac_prev=arch
10262 fi
10263 done
10264fi
10265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10266 if test $ac_cv_c_bigendian = unknown; then
10267 # See if sys/param.h defines the BYTE_ORDER macro.
10268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10269/* end confdefs.h. */
10270#include <sys/types.h>
10271 #include <sys/param.h>
10272
10273int
10274main ()
10275{
10276#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
10277 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
10278 && LITTLE_ENDIAN)
10279 bogus endian macros
10280 #endif
10281
10282 ;
10283 return 0;
10284}
10285_ACEOF
10286if ac_fn_c_try_compile "$LINENO"; then :
10287 # It does; now see whether it defined to BIG_ENDIAN or not.
10288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10289/* end confdefs.h. */
10290#include <sys/types.h>
10291 #include <sys/param.h>
10292
10293int
10294main ()
10295{
10296#if BYTE_ORDER != BIG_ENDIAN
10297 not big endian
10298 #endif
10299
10300 ;
10301 return 0;
10302}
10303_ACEOF
10304if ac_fn_c_try_compile "$LINENO"; then :
10305 ac_cv_c_bigendian=yes
10306else
10307 ac_cv_c_bigendian=no
10308fi
10309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10310fi
10311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10312 fi
10313 if test $ac_cv_c_bigendian = unknown; then
10314 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
10315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10316/* end confdefs.h. */
10317#include <limits.h>
10318
10319int
88b48903
WN
10320main ()
10321{
10322#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
10323 bogus endian macros
10324 #endif
10325
10326 ;
10327 return 0;
10328}
10329_ACEOF
10330if ac_fn_c_try_compile "$LINENO"; then :
10331 # It does; now see whether it defined to _BIG_ENDIAN or not.
10332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10333/* end confdefs.h. */
10334#include <limits.h>
10335
10336int
10337main ()
10338{
10339#ifndef _BIG_ENDIAN
10340 not big endian
10341 #endif
10342
10343 ;
10344 return 0;
10345}
10346_ACEOF
10347if ac_fn_c_try_compile "$LINENO"; then :
10348 ac_cv_c_bigendian=yes
10349else
10350 ac_cv_c_bigendian=no
10351fi
10352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10353fi
10354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10355 fi
10356 if test $ac_cv_c_bigendian = unknown; then
10357 # Compile a test program.
10358 if test "$cross_compiling" = yes; then :
10359 # Try to guess by grepping values from an object file.
10360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10361/* end confdefs.h. */
10362short int ascii_mm[] =
10363 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
10364 short int ascii_ii[] =
10365 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
10366 int use_ascii (int i) {
10367 return ascii_mm[i] + ascii_ii[i];
10368 }
10369 short int ebcdic_ii[] =
10370 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
10371 short int ebcdic_mm[] =
10372 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
10373 int use_ebcdic (int i) {
10374 return ebcdic_mm[i] + ebcdic_ii[i];
10375 }
10376 extern int foo;
10377
10378int
10379main ()
10380{
10381return use_ascii (foo) == use_ebcdic (foo);
10382 ;
10383 return 0;
10384}
10385_ACEOF
10386if ac_fn_c_try_compile "$LINENO"; then :
10387 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
10388 ac_cv_c_bigendian=yes
10389 fi
10390 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
10391 if test "$ac_cv_c_bigendian" = unknown; then
10392 ac_cv_c_bigendian=no
10393 else
10394 # finding both strings is unlikely to happen, but who knows?
10395 ac_cv_c_bigendian=unknown
10396 fi
10397 fi
10398fi
10399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10400else
10401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10402/* end confdefs.h. */
10403$ac_includes_default
10404int
10405main ()
10406{
10407
10408 /* Are we little or big endian? From Harbison&Steele. */
10409 union
10410 {
10411 long int l;
10412 char c[sizeof (long int)];
10413 } u;
10414 u.l = 1;
10415 return u.c[sizeof (long int) - 1] == 1;
10416
10417 ;
10418 return 0;
10419}
10420_ACEOF
10421if ac_fn_c_try_run "$LINENO"; then :
10422 ac_cv_c_bigendian=no
10423else
10424 ac_cv_c_bigendian=yes
10425fi
10426rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10427 conftest.$ac_objext conftest.beam conftest.$ac_ext
10428fi
10429
10430 fi
10431fi
6ec2e0f5 10432:
88b48903
WN
10433 case $ac_cv_c_bigendian in #(
10434 yes)
6ec2e0f5 10435 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
88b48903 10436 no)
6ec2e0f5 10437 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
88b48903
WN
10438 universal)
10439
10440$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
10441
10442 ;; #(
10443 *)
6ec2e0f5 10444 gl_cv_cc_double_expbit0="unknown" ;;
88b48903
WN
10445 esac
10446
10447
6ec2e0f5
SDJ
10448fi
10449rm -f conftest*
88b48903 10450
2196f55f 10451
2196f55f
YQ
10452else
10453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10454/* end confdefs.h. */
2196f55f 10455
6ec2e0f5
SDJ
10456#include <float.h>
10457#include <stddef.h>
10458#include <stdio.h>
10459#include <string.h>
10460#define NWORDS \
10461 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
10462typedef union { double value; unsigned int word[NWORDS]; } memory_double;
10463static unsigned int ored_words[NWORDS];
10464static unsigned int anded_words[NWORDS];
10465static void add_to_ored_words (double x)
2196f55f 10466{
6ec2e0f5
SDJ
10467 memory_double m;
10468 size_t i;
10469 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
10470 memset (&m, 0, sizeof (memory_double));
10471 m.value = x;
10472 for (i = 0; i < NWORDS; i++)
10473 {
10474 ored_words[i] |= m.word[i];
10475 anded_words[i] &= m.word[i];
10476 }
2196f55f 10477}
6ec2e0f5 10478int main ()
88b48903 10479{
6ec2e0f5
SDJ
10480 size_t j;
10481 FILE *fp = fopen ("conftest.out", "w");
10482 if (fp == NULL)
10483 return 1;
10484 for (j = 0; j < NWORDS; j++)
10485 anded_words[j] = ~ (unsigned int) 0;
10486 add_to_ored_words (0.25);
10487 add_to_ored_words (0.5);
10488 add_to_ored_words (1.0);
10489 add_to_ored_words (2.0);
10490 add_to_ored_words (4.0);
10491 /* Remove bits that are common (e.g. if representation of the first mantissa
10492 bit is explicit). */
10493 for (j = 0; j < NWORDS; j++)
10494 ored_words[j] &= ~anded_words[j];
10495 /* Now find the nonzero word. */
10496 for (j = 0; j < NWORDS; j++)
10497 if (ored_words[j] != 0)
10498 break;
10499 if (j < NWORDS)
10500 {
10501 size_t i;
10502 for (i = j + 1; i < NWORDS; i++)
10503 if (ored_words[i] != 0)
10504 {
10505 fprintf (fp, "unknown");
10506 return (fclose (fp) != 0);
10507 }
10508 for (i = 0; ; i++)
10509 if ((ored_words[j] >> i) & 1)
10510 {
10511 fprintf (fp, "word %d bit %d", (int) j, (int) i);
10512 return (fclose (fp) != 0);
10513 }
10514 }
10515 fprintf (fp, "unknown");
10516 return (fclose (fp) != 0);
88b48903 10517}
6ec2e0f5 10518
88b48903 10519_ACEOF
6ec2e0f5
SDJ
10520if ac_fn_c_try_run "$LINENO"; then :
10521 gl_cv_cc_double_expbit0=`cat conftest.out`
88b48903 10522else
6ec2e0f5 10523 gl_cv_cc_double_expbit0="unknown"
88b48903 10524fi
6ec2e0f5
SDJ
10525rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10526 conftest.$ac_objext conftest.beam conftest.$ac_ext
10527fi
10528
10529 rm -f conftest.out
88b48903
WN
10530
10531fi
6ec2e0f5
SDJ
10532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
10533$as_echo "$gl_cv_cc_double_expbit0" >&6; }
10534 case "$gl_cv_cc_double_expbit0" in
10535 word*bit*)
10536 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
10537 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
88b48903 10538
6ec2e0f5
SDJ
10539cat >>confdefs.h <<_ACEOF
10540#define DBL_EXPBIT0_WORD $word
10541_ACEOF
88b48903 10542
88b48903 10543
6ec2e0f5
SDJ
10544cat >>confdefs.h <<_ACEOF
10545#define DBL_EXPBIT0_BIT $bit
10546_ACEOF
88b48903 10547
6ec2e0f5
SDJ
10548 ;;
10549 esac
88b48903
WN
10550
10551
6ec2e0f5
SDJ
10552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
10553$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
10554if test "${ac_cv_c_bigendian+set}" = set; then :
10555 $as_echo_n "(cached) " >&6
10556else
10557 ac_cv_c_bigendian=unknown
10558 # See if we're dealing with a universal compiler.
10559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10560/* end confdefs.h. */
10561#ifndef __APPLE_CC__
10562 not a universal capable compiler
10563 #endif
10564 typedef int dummy;
88b48903 10565
6ec2e0f5
SDJ
10566_ACEOF
10567if ac_fn_c_try_compile "$LINENO"; then :
88b48903 10568
6ec2e0f5
SDJ
10569 # Check for potential -arch flags. It is not universal unless
10570 # there are at least two -arch flags with different values.
10571 ac_arch=
10572 ac_prev=
10573 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
10574 if test -n "$ac_prev"; then
10575 case $ac_word in
10576 i?86 | x86_64 | ppc | ppc64)
10577 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
10578 ac_arch=$ac_word
10579 else
10580 ac_cv_c_bigendian=universal
10581 break
10582 fi
10583 ;;
10584 esac
10585 ac_prev=
10586 elif test "x$ac_word" = "x-arch"; then
10587 ac_prev=arch
10588 fi
10589 done
10590fi
10591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10592 if test $ac_cv_c_bigendian = unknown; then
10593 # See if sys/param.h defines the BYTE_ORDER macro.
10594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10595/* end confdefs.h. */
10596#include <sys/types.h>
10597 #include <sys/param.h>
88b48903 10598
6ec2e0f5
SDJ
10599int
10600main ()
10601{
10602#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
10603 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
10604 && LITTLE_ENDIAN)
10605 bogus endian macros
10606 #endif
88b48903 10607
6ec2e0f5
SDJ
10608 ;
10609 return 0;
10610}
10611_ACEOF
10612if ac_fn_c_try_compile "$LINENO"; then :
10613 # It does; now see whether it defined to BIG_ENDIAN or not.
10614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
88b48903
WN
10615/* end confdefs.h. */
10616#include <sys/types.h>
6ec2e0f5 10617 #include <sys/param.h>
8690e634
JK
10618
10619int
10620main ()
10621{
6ec2e0f5
SDJ
10622#if BYTE_ORDER != BIG_ENDIAN
10623 not big endian
10624 #endif
8690e634 10625
8690e634
JK
10626 ;
10627 return 0;
10628}
10629_ACEOF
6ec2e0f5
SDJ
10630if ac_fn_c_try_compile "$LINENO"; then :
10631 ac_cv_c_bigendian=yes
8690e634 10632else
6ec2e0f5 10633 ac_cv_c_bigendian=no
8690e634 10634fi
6ec2e0f5 10635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 10636fi
6ec2e0f5
SDJ
10637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10638 fi
10639 if test $ac_cv_c_bigendian = unknown; then
10640 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
10641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10642/* end confdefs.h. */
10643#include <limits.h>
10644
10645int
10646main ()
10647{
10648#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
10649 bogus endian macros
10650 #endif
10651
10652 ;
10653 return 0;
10654}
10655_ACEOF
10656if ac_fn_c_try_compile "$LINENO"; then :
10657 # It does; now see whether it defined to _BIG_ENDIAN or not.
10658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10659/* end confdefs.h. */
10660#include <limits.h>
8690e634 10661
6ec2e0f5
SDJ
10662int
10663main ()
10664{
10665#ifndef _BIG_ENDIAN
10666 not big endian
10667 #endif
10668
10669 ;
10670 return 0;
10671}
10672_ACEOF
10673if ac_fn_c_try_compile "$LINENO"; then :
10674 ac_cv_c_bigendian=yes
10675else
10676 ac_cv_c_bigendian=no
8690e634 10677fi
6ec2e0f5
SDJ
10678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10679fi
10680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10681 fi
10682 if test $ac_cv_c_bigendian = unknown; then
10683 # Compile a test program.
10684 if test "$cross_compiling" = yes; then :
10685 # Try to guess by grepping values from an object file.
10686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10687/* end confdefs.h. */
10688short int ascii_mm[] =
10689 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
10690 short int ascii_ii[] =
10691 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
10692 int use_ascii (int i) {
10693 return ascii_mm[i] + ascii_ii[i];
10694 }
10695 short int ebcdic_ii[] =
10696 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
10697 short int ebcdic_mm[] =
10698 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
10699 int use_ebcdic (int i) {
10700 return ebcdic_mm[i] + ebcdic_ii[i];
10701 }
10702 extern int foo;
8690e634 10703
6ec2e0f5
SDJ
10704int
10705main ()
10706{
10707return use_ascii (foo) == use_ebcdic (foo);
10708 ;
10709 return 0;
10710}
10711_ACEOF
10712if ac_fn_c_try_compile "$LINENO"; then :
10713 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
10714 ac_cv_c_bigendian=yes
10715 fi
10716 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
10717 if test "$ac_cv_c_bigendian" = unknown; then
10718 ac_cv_c_bigendian=no
10719 else
10720 # finding both strings is unlikely to happen, but who knows?
10721 ac_cv_c_bigendian=unknown
10722 fi
10723 fi
10724fi
10725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10726else
10727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10728/* end confdefs.h. */
10729$ac_includes_default
10730int
10731main ()
10732{
8690e634 10733
6ec2e0f5
SDJ
10734 /* Are we little or big endian? From Harbison&Steele. */
10735 union
10736 {
10737 long int l;
10738 char c[sizeof (long int)];
10739 } u;
10740 u.l = 1;
10741 return u.c[sizeof (long int) - 1] == 1;
10742
10743 ;
10744 return 0;
10745}
8690e634 10746_ACEOF
6ec2e0f5
SDJ
10747if ac_fn_c_try_run "$LINENO"; then :
10748 ac_cv_c_bigendian=no
10749else
10750 ac_cv_c_bigendian=yes
10751fi
10752rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10753 conftest.$ac_objext conftest.beam conftest.$ac_ext
10754fi
10755
10756 fi
10757fi
10758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
10759$as_echo "$ac_cv_c_bigendian" >&6; }
10760 case $ac_cv_c_bigendian in #(
10761 yes)
10762 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
10763;; #(
10764 no)
10765 ;; #(
10766 universal)
8690e634 10767
6ec2e0f5 10768$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
8690e634 10769
6ec2e0f5
SDJ
10770 ;; #(
10771 *)
10772 as_fn_error "unknown endianness
10773 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
10774 esac
8690e634 10775
6ec2e0f5
SDJ
10776
10777
10778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10779$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
10780if test "${am_cv_langinfo_codeset+set}" = set; then :
10781 $as_echo_n "(cached) " >&6
10782else
10783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10784/* end confdefs.h. */
10785#include <langinfo.h>
10786int
10787main ()
10788{
10789char* cs = nl_langinfo(CODESET); return !cs;
10790 ;
10791 return 0;
10792}
8690e634 10793_ACEOF
6ec2e0f5
SDJ
10794if ac_fn_c_try_link "$LINENO"; then :
10795 am_cv_langinfo_codeset=yes
10796else
10797 am_cv_langinfo_codeset=no
10798fi
10799rm -f core conftest.err conftest.$ac_objext \
10800 conftest$ac_exeext conftest.$ac_ext
10801
10802fi
10803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10804$as_echo "$am_cv_langinfo_codeset" >&6; }
10805 if test $am_cv_langinfo_codeset = yes; then
10806
10807$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8690e634 10808
6ec2e0f5 10809 fi
8690e634 10810
3574124b 10811ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
8690e634
JK
10812if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then :
10813 ac_have_decl=1
10814else
10815 ac_have_decl=0
10816fi
10817
10818cat >>confdefs.h <<_ACEOF
10819#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
10820_ACEOF
10821
10822
8690e634
JK
10823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
10824$as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
10825if test "${ac_cv_gnu_library_2_1+set}" = set; then :
10826 $as_echo_n "(cached) " >&6
10827else
10828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10829/* end confdefs.h. */
10830
10831#include <features.h>
10832#ifdef __GNU_LIBRARY__
10833 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
10834 Lucky GNU user
10835 #endif
10836#endif
10837#ifdef __UCLIBC__
10838 Lucky user
10839#endif
10840
10841_ACEOF
10842if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10843 $EGREP "Lucky" >/dev/null 2>&1; then :
10844 ac_cv_gnu_library_2_1=yes
10845else
10846 ac_cv_gnu_library_2_1=no
10847fi
10848rm -f conftest*
10849
10850
10851
10852fi
10853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
10854$as_echo "$ac_cv_gnu_library_2_1" >&6; }
10855
10856 GLIBC21="$ac_cv_gnu_library_2_1"
10857
10858
10859
f45c62c4
YQ
10860
10861
6ec2e0f5
SDJ
10862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
10863$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
10864if test "${gl_cv_func_malloc_posix+set}" = set; then :
f45c62c4
YQ
10865 $as_echo_n "(cached) " >&6
10866else
f45c62c4 10867
6ec2e0f5 10868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f45c62c4 10869/* end confdefs.h. */
6ec2e0f5 10870
f45c62c4
YQ
10871int
10872main ()
10873{
6ec2e0f5
SDJ
10874#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
10875 choke me
10876 #endif
f45c62c4
YQ
10877
10878 ;
10879 return 0;
10880}
10881_ACEOF
6ec2e0f5
SDJ
10882if ac_fn_c_try_compile "$LINENO"; then :
10883 gl_cv_func_malloc_posix=yes
f45c62c4 10884else
6ec2e0f5 10885 gl_cv_func_malloc_posix=no
f45c62c4 10886fi
6ec2e0f5 10887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6a29c58e
YQ
10888
10889fi
10890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
10891$as_echo "$gl_cv_func_malloc_posix" >&6; }
10892
10893
10894
10895 for ac_header in stdlib.h
98399780
YQ
10896do :
10897 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
10898if test "x$ac_cv_header_stdlib_h" = x""yes; then :
10899 cat >>confdefs.h <<_ACEOF
10900#define HAVE_STDLIB_H 1
10901_ACEOF
10902
10903fi
10904
10905done
10906
6a29c58e 10907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
98399780
YQ
10908$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
10909if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then :
10910 $as_echo_n "(cached) " >&6
10911else
10912 if test "$cross_compiling" = yes; then :
6a29c58e
YQ
10913 case "$host_os" in
10914 # Guess yes on platforms where we know the result.
10915 *-gnu* | freebsd* | netbsd* | openbsd* \
10916 | hpux* | solaris* | cygwin* | mingw*)
10917 ac_cv_func_malloc_0_nonnull=yes ;;
10918 # If we don't know, assume the worst.
10919 *) ac_cv_func_malloc_0_nonnull=no ;;
10920 esac
10921
98399780
YQ
10922else
10923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10924/* end confdefs.h. */
10925#if defined STDC_HEADERS || defined HAVE_STDLIB_H
6a29c58e
YQ
10926 # include <stdlib.h>
10927 #else
10928 char *malloc ();
10929 #endif
98399780
YQ
10930
10931int
10932main ()
10933{
49e4877c
PA
10934char *p = malloc (0);
10935 int result = !p;
10936 free (p);
10937 return result;
98399780
YQ
10938 ;
10939 return 0;
10940}
6a29c58e 10941
98399780
YQ
10942_ACEOF
10943if ac_fn_c_try_run "$LINENO"; then :
10944 ac_cv_func_malloc_0_nonnull=yes
10945else
10946 ac_cv_func_malloc_0_nonnull=no
10947fi
10948rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10949 conftest.$ac_objext conftest.beam conftest.$ac_ext
10950fi
10951
6a29c58e 10952
98399780
YQ
10953fi
10954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
10955$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
6a29c58e 10956 if test $ac_cv_func_malloc_0_nonnull = yes; then :
98399780
YQ
10957 gl_cv_func_malloc_0_nonnull=1
10958else
10959 gl_cv_func_malloc_0_nonnull=0
10960fi
10961
10962
10963cat >>confdefs.h <<_ACEOF
10964#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
10965_ACEOF
10966
10967
10968
88b48903
WN
10969
10970
8690e634
JK
10971 GNULIB_BTOWC=0;
10972 GNULIB_WCTOB=0;
10973 GNULIB_MBSINIT=0;
10974 GNULIB_MBRTOWC=0;
10975 GNULIB_MBRLEN=0;
10976 GNULIB_MBSRTOWCS=0;
10977 GNULIB_MBSNRTOWCS=0;
10978 GNULIB_WCRTOMB=0;
10979 GNULIB_WCSRTOMBS=0;
10980 GNULIB_WCSNRTOMBS=0;
10981 GNULIB_WCWIDTH=0;
10982 GNULIB_WMEMCHR=0;
10983 GNULIB_WMEMCMP=0;
10984 GNULIB_WMEMCPY=0;
10985 GNULIB_WMEMMOVE=0;
10986 GNULIB_WMEMSET=0;
10987 GNULIB_WCSLEN=0;
10988 GNULIB_WCSNLEN=0;
10989 GNULIB_WCSCPY=0;
10990 GNULIB_WCPCPY=0;
10991 GNULIB_WCSNCPY=0;
10992 GNULIB_WCPNCPY=0;
10993 GNULIB_WCSCAT=0;
10994 GNULIB_WCSNCAT=0;
10995 GNULIB_WCSCMP=0;
10996 GNULIB_WCSNCMP=0;
10997 GNULIB_WCSCASECMP=0;
10998 GNULIB_WCSNCASECMP=0;
10999 GNULIB_WCSCOLL=0;
11000 GNULIB_WCSXFRM=0;
11001 GNULIB_WCSDUP=0;
11002 GNULIB_WCSCHR=0;
11003 GNULIB_WCSRCHR=0;
11004 GNULIB_WCSCSPN=0;
11005 GNULIB_WCSSPN=0;
11006 GNULIB_WCSPBRK=0;
11007 GNULIB_WCSSTR=0;
11008 GNULIB_WCSTOK=0;
11009 GNULIB_WCSWIDTH=0;
11010 HAVE_BTOWC=1;
11011 HAVE_MBSINIT=1;
11012 HAVE_MBRTOWC=1;
11013 HAVE_MBRLEN=1;
11014 HAVE_MBSRTOWCS=1;
11015 HAVE_MBSNRTOWCS=1;
11016 HAVE_WCRTOMB=1;
11017 HAVE_WCSRTOMBS=1;
11018 HAVE_WCSNRTOMBS=1;
11019 HAVE_WMEMCHR=1;
11020 HAVE_WMEMCMP=1;
11021 HAVE_WMEMCPY=1;
11022 HAVE_WMEMMOVE=1;
11023 HAVE_WMEMSET=1;
11024 HAVE_WCSLEN=1;
11025 HAVE_WCSNLEN=1;
11026 HAVE_WCSCPY=1;
11027 HAVE_WCPCPY=1;
11028 HAVE_WCSNCPY=1;
11029 HAVE_WCPNCPY=1;
11030 HAVE_WCSCAT=1;
11031 HAVE_WCSNCAT=1;
11032 HAVE_WCSCMP=1;
11033 HAVE_WCSNCMP=1;
11034 HAVE_WCSCASECMP=1;
11035 HAVE_WCSNCASECMP=1;
11036 HAVE_WCSCOLL=1;
11037 HAVE_WCSXFRM=1;
11038 HAVE_WCSDUP=1;
11039 HAVE_WCSCHR=1;
11040 HAVE_WCSRCHR=1;
11041 HAVE_WCSCSPN=1;
11042 HAVE_WCSSPN=1;
11043 HAVE_WCSPBRK=1;
11044 HAVE_WCSSTR=1;
11045 HAVE_WCSTOK=1;
11046 HAVE_WCSWIDTH=1;
11047 HAVE_DECL_WCTOB=1;
11048 HAVE_DECL_WCWIDTH=1;
11049 REPLACE_MBSTATE_T=0;
11050 REPLACE_BTOWC=0;
11051 REPLACE_WCTOB=0;
11052 REPLACE_MBSINIT=0;
11053 REPLACE_MBRTOWC=0;
11054 REPLACE_MBRLEN=0;
11055 REPLACE_MBSRTOWCS=0;
11056 REPLACE_MBSNRTOWCS=0;
11057 REPLACE_WCRTOMB=0;
11058 REPLACE_WCSRTOMBS=0;
11059 REPLACE_WCSNRTOMBS=0;
11060 REPLACE_WCWIDTH=0;
11061 REPLACE_WCSWIDTH=0;
11062
11063
11064
11065
11066
11067
11068
11069
8690e634
JK
11070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
11071$as_echo_n "checking for a traditional japanese locale... " >&6; }
11072if test "${gt_cv_locale_ja+set}" = set; then :
11073 $as_echo_n "(cached) " >&6
11074else
11075
11076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11077/* end confdefs.h. */
11078
11079#include <locale.h>
11080#include <time.h>
11081#if HAVE_LANGINFO_CODESET
11082# include <langinfo.h>
11083#endif
11084#include <stdlib.h>
11085#include <string.h>
11086struct tm t;
11087char buf[16];
11088int main ()
11089{
11090 const char *p;
11091 /* Check whether the given locale name is recognized by the system. */
11092#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
11093 /* On native Windows, setlocale(category, "") looks at the system settings,
11094 not at the environment variables. Also, when an encoding suffix such
11095 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
11096 category of the locale to "C". */
11097 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
11098 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
11099 return 1;
11100#else
11101 if (setlocale (LC_ALL, "") == NULL) return 1;
11102#endif
11103 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
11104 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
11105 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
11106 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
11107 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
11108 some unit tests fail.
11109 On MirBSD 10, when an unsupported locale is specified, setlocale()
11110 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
11111#if HAVE_LANGINFO_CODESET
11112 {
11113 const char *cs = nl_langinfo (CODESET);
11114 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
11115 || strcmp (cs, "UTF-8") == 0)
11116 return 1;
11117 }
11118#endif
11119#ifdef __CYGWIN__
11120 /* On Cygwin, avoid locale names without encoding suffix, because the
11121 locale_charset() function relies on the encoding suffix. Note that
11122 LC_ALL is set on the command line. */
11123 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
11124#endif
11125 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
11126 on Cygwin 1.5.x. */
11127 if (MB_CUR_MAX == 1)
11128 return 1;
11129 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
11130 This excludes the UTF-8 encoding (except on MirBSD). */
11131 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
11132 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
11133 for (p = buf; *p != '\0'; p++)
11134 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
11135 return 1;
11136 return 0;
11137}
11138
11139_ACEOF
11140 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11141 (eval $ac_link) 2>&5
11142 ac_status=$?
11143 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11144 test $ac_status = 0; } && test -s conftest$ac_exeext; then
11145 case "$host_os" in
11146 # Handle native Windows specially, because there setlocale() interprets
11147 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
11148 # "fr" or "fra" as "French" or "French_France.1252",
11149 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
11150 # "ja" as "Japanese" or "Japanese_Japan.932",
11151 # and similar.
11152 mingw*)
11153 # Note that on native Windows, the Japanese locale is
11154 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
11155 # cannot use it here.
11156 gt_cv_locale_ja=none
11157 ;;
11158 *)
11159 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
11160 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
11161 # configure script would override the LC_ALL setting. Likewise for
11162 # LC_CTYPE, which is also set at the beginning of the configure script.
11163 # Test for the AIX locale name.
11164 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11165 gt_cv_locale_ja=ja_JP
11166 else
11167 # Test for the locale name with explicit encoding suffix.
11168 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11169 gt_cv_locale_ja=ja_JP.EUC-JP
11170 else
11171 # Test for the HP-UX, OSF/1, NetBSD locale name.
11172 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11173 gt_cv_locale_ja=ja_JP.eucJP
11174 else
11175 # Test for the IRIX, FreeBSD locale name.
11176 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11177 gt_cv_locale_ja=ja_JP.EUC
11178 else
11179 # Test for the Solaris 7 locale name.
11180 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11181 gt_cv_locale_ja=ja
11182 else
11183 # Special test for NetBSD 1.6.
11184 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
11185 gt_cv_locale_ja=ja_JP.eucJP
11186 else
11187 # None found.
11188 gt_cv_locale_ja=none
11189 fi
11190 fi
11191 fi
11192 fi
11193 fi
11194 fi
11195 ;;
11196 esac
11197 fi
11198 rm -fr conftest*
11199
11200fi
11201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
11202$as_echo "$gt_cv_locale_ja" >&6; }
11203 LOCALE_JA=$gt_cv_locale_ja
11204
11205
11206
11207
11208
11209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
11210$as_echo_n "checking for a transitional chinese locale... " >&6; }
11211if test "${gt_cv_locale_zh_CN+set}" = set; then :
11212 $as_echo_n "(cached) " >&6
11213else
11214
11215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11216/* end confdefs.h. */
11217
11218#include <locale.h>
11219#include <stdlib.h>
11220#include <time.h>
11221#if HAVE_LANGINFO_CODESET
11222# include <langinfo.h>
11223#endif
11224#include <stdlib.h>
11225#include <string.h>
11226struct tm t;
11227char buf[16];
11228int main ()
11229{
11230 const char *p;
11231 /* Check whether the given locale name is recognized by the system. */
11232#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
11233 /* On native Windows, setlocale(category, "") looks at the system settings,
11234 not at the environment variables. Also, when an encoding suffix such
11235 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
11236 category of the locale to "C". */
11237 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
11238 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
11239 return 1;
11240#else
11241 if (setlocale (LC_ALL, "") == NULL) return 1;
11242#endif
11243 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
11244 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
11245 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
11246 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
11247 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
11248 some unit tests fail.
11249 On MirBSD 10, when an unsupported locale is specified, setlocale()
11250 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
11251#if HAVE_LANGINFO_CODESET
11252 {
11253 const char *cs = nl_langinfo (CODESET);
11254 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
11255 || strcmp (cs, "UTF-8") == 0)
11256 return 1;
11257 }
11258#endif
11259#ifdef __CYGWIN__
11260 /* On Cygwin, avoid locale names without encoding suffix, because the
11261 locale_charset() function relies on the encoding suffix. Note that
11262 LC_ALL is set on the command line. */
11263 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
11264#endif
11265 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
11266 This excludes the UTF-8 encoding (except on MirBSD). */
11267 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
11268 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
11269 for (p = buf; *p != '\0'; p++)
11270 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
11271 return 1;
11272 /* Check whether a typical GB18030 multibyte sequence is recognized as a
11273 single wide character. This excludes the GB2312 and GBK encodings. */
11274 if (mblen ("\203\062\332\066", 5) != 4)
11275 return 1;
11276 return 0;
11277}
11278
11279_ACEOF
11280 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11281 (eval $ac_link) 2>&5
11282 ac_status=$?
11283 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11284 test $ac_status = 0; } && test -s conftest$ac_exeext; then
11285 case "$host_os" in
11286 # Handle native Windows specially, because there setlocale() interprets
11287 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
11288 # "fr" or "fra" as "French" or "French_France.1252",
11289 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
11290 # "ja" as "Japanese" or "Japanese_Japan.932",
11291 # and similar.
11292 mingw*)
11293 # Test for the hypothetical native Windows locale name.
11294 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11295 gt_cv_locale_zh_CN=Chinese_China.54936
11296 else
11297 # None found.
11298 gt_cv_locale_zh_CN=none
11299 fi
11300 ;;
11301 solaris2.8)
11302 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
11303 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
11304 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
11305 gt_cv_locale_zh_CN=none
11306 ;;
11307 *)
11308 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
11309 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
11310 # configure script would override the LC_ALL setting. Likewise for
11311 # LC_CTYPE, which is also set at the beginning of the configure script.
11312 # Test for the locale name without encoding suffix.
11313 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11314 gt_cv_locale_zh_CN=zh_CN
11315 else
11316 # Test for the locale name with explicit encoding suffix.
11317 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11318 gt_cv_locale_zh_CN=zh_CN.GB18030
11319 else
11320 # None found.
11321 gt_cv_locale_zh_CN=none
11322 fi
11323 fi
11324 ;;
11325 esac
11326 else
11327 # If there was a link error, due to mblen(), the system is so old that
11328 # it certainly doesn't have a chinese locale.
11329 gt_cv_locale_zh_CN=none
11330 fi
11331 rm -fr conftest*
11332
11333fi
11334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
11335$as_echo "$gt_cv_locale_zh_CN" >&6; }
11336 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
11337
11338
11339
11340
11341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
11342$as_echo_n "checking for a french Unicode locale... " >&6; }
11343if test "${gt_cv_locale_fr_utf8+set}" = set; then :
11344 $as_echo_n "(cached) " >&6
11345else
11346
11347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11348/* end confdefs.h. */
11349
11350#include <locale.h>
11351#include <time.h>
11352#if HAVE_LANGINFO_CODESET
11353# include <langinfo.h>
11354#endif
11355#include <stdlib.h>
11356#include <string.h>
11357struct tm t;
11358char buf[16];
11359int main () {
11360 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
11361 imitates locale dependent behaviour by looking at the environment
11362 variables, and all locales use the UTF-8 encoding. */
11363#if !(defined __BEOS__ || defined __HAIKU__)
11364 /* Check whether the given locale name is recognized by the system. */
11365# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
11366 /* On native Windows, setlocale(category, "") looks at the system settings,
11367 not at the environment variables. Also, when an encoding suffix such
11368 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
11369 category of the locale to "C". */
11370 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
11371 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
11372 return 1;
11373# else
11374 if (setlocale (LC_ALL, "") == NULL) return 1;
11375# endif
11376 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
11377 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
11378 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
11379 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
11380 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
11381 some unit tests fail. */
11382# if HAVE_LANGINFO_CODESET
11383 {
11384 const char *cs = nl_langinfo (CODESET);
11385 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
11386 return 1;
11387 }
11388# endif
11389# ifdef __CYGWIN__
11390 /* On Cygwin, avoid locale names without encoding suffix, because the
11391 locale_charset() function relies on the encoding suffix. Note that
11392 LC_ALL is set on the command line. */
11393 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
11394# endif
11395 /* Check whether in the abbreviation of the second month, the second
11396 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
11397 two bytes long, with UTF-8 encoding. */
11398 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
11399 if (strftime (buf, sizeof (buf), "%b", &t) < 4
11400 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
11401 return 1;
11402#endif
11403#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
11404 /* Check whether the decimal separator is a comma.
11405 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
11406 are nl_langinfo(RADIXCHAR) are both ".". */
11407 if (localeconv () ->decimal_point[0] != ',') return 1;
11408#endif
11409 return 0;
11410}
11411
11412_ACEOF
11413 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11414 (eval $ac_link) 2>&5
11415 ac_status=$?
11416 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11417 test $ac_status = 0; } && test -s conftest$ac_exeext; then
11418 case "$host_os" in
11419 # Handle native Windows specially, because there setlocale() interprets
11420 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
11421 # "fr" or "fra" as "French" or "French_France.1252",
11422 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
11423 # "ja" as "Japanese" or "Japanese_Japan.932",
11424 # and similar.
11425 mingw*)
11426 # Test for the hypothetical native Windows locale name.
11427 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11428 gt_cv_locale_fr_utf8=French_France.65001
11429 else
11430 # None found.
11431 gt_cv_locale_fr_utf8=none
11432 fi
11433 ;;
11434 *)
11435 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
11436 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
11437 # configure script would override the LC_ALL setting. Likewise for
11438 # LC_CTYPE, which is also set at the beginning of the configure script.
11439 # Test for the usual locale name.
11440 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11441 gt_cv_locale_fr_utf8=fr_FR
11442 else
11443 # Test for the locale name with explicit encoding suffix.
11444 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11445 gt_cv_locale_fr_utf8=fr_FR.UTF-8
11446 else
11447 # Test for the Solaris 7 locale name.
11448 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11449 gt_cv_locale_fr_utf8=fr.UTF-8
11450 else
11451 # None found.
11452 gt_cv_locale_fr_utf8=none
11453 fi
11454 fi
11455 fi
11456 ;;
11457 esac
11458 fi
11459 rm -fr conftest*
11460
11461fi
11462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
11463$as_echo "$gt_cv_locale_fr_utf8" >&6; }
11464 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
11465
11466
11467
11468
11469
11470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
11471$as_echo_n "checking for a traditional french locale... " >&6; }
11472if test "${gt_cv_locale_fr+set}" = set; then :
11473 $as_echo_n "(cached) " >&6
11474else
11475
11476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11477/* end confdefs.h. */
11478
11479#include <locale.h>
11480#include <time.h>
11481#if HAVE_LANGINFO_CODESET
11482# include <langinfo.h>
11483#endif
11484#include <stdlib.h>
11485#include <string.h>
11486struct tm t;
11487char buf[16];
11488int main () {
11489 /* Check whether the given locale name is recognized by the system. */
11490#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
11491 /* On native Windows, setlocale(category, "") looks at the system settings,
11492 not at the environment variables. Also, when an encoding suffix such
11493 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
11494 category of the locale to "C". */
11495 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
11496 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
11497 return 1;
11498#else
11499 if (setlocale (LC_ALL, "") == NULL) return 1;
11500#endif
11501 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
11502 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
11503 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
11504 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
11505 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
11506 some unit tests fail.
11507 On MirBSD 10, when an unsupported locale is specified, setlocale()
11508 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
11509#if HAVE_LANGINFO_CODESET
11510 {
11511 const char *cs = nl_langinfo (CODESET);
11512 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
11513 || strcmp (cs, "UTF-8") == 0)
11514 return 1;
11515 }
11516#endif
11517#ifdef __CYGWIN__
11518 /* On Cygwin, avoid locale names without encoding suffix, because the
11519 locale_charset() function relies on the encoding suffix. Note that
11520 LC_ALL is set on the command line. */
11521 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
11522#endif
11523 /* Check whether in the abbreviation of the second month, the second
11524 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
11525 one byte long. This excludes the UTF-8 encoding. */
11526 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
11527 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
11528#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
11529 /* Check whether the decimal separator is a comma.
11530 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
11531 are nl_langinfo(RADIXCHAR) are both ".". */
11532 if (localeconv () ->decimal_point[0] != ',') return 1;
11533#endif
11534 return 0;
11535}
11536
11537_ACEOF
11538 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11539 (eval $ac_link) 2>&5
11540 ac_status=$?
11541 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11542 test $ac_status = 0; } && test -s conftest$ac_exeext; then
11543 case "$host_os" in
11544 # Handle native Windows specially, because there setlocale() interprets
11545 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
11546 # "fr" or "fra" as "French" or "French_France.1252",
11547 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
11548 # "ja" as "Japanese" or "Japanese_Japan.932",
11549 # and similar.
11550 mingw*)
11551 # Test for the native Windows locale name.
11552 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11553 gt_cv_locale_fr=French_France.1252
11554 else
11555 # None found.
11556 gt_cv_locale_fr=none
11557 fi
11558 ;;
11559 *)
11560 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
11561 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
11562 # configure script would override the LC_ALL setting. Likewise for
11563 # LC_CTYPE, which is also set at the beginning of the configure script.
11564 # Test for the usual locale name.
11565 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11566 gt_cv_locale_fr=fr_FR
11567 else
11568 # Test for the locale name with explicit encoding suffix.
11569 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11570 gt_cv_locale_fr=fr_FR.ISO-8859-1
11571 else
11572 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
11573 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11574 gt_cv_locale_fr=fr_FR.ISO8859-1
11575 else
11576 # Test for the HP-UX locale name.
11577 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11578 gt_cv_locale_fr=fr_FR.iso88591
11579 else
11580 # Test for the Solaris 7 locale name.
11581 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11582 gt_cv_locale_fr=fr
11583 else
11584 # None found.
11585 gt_cv_locale_fr=none
11586 fi
11587 fi
11588 fi
11589 fi
11590 fi
11591 ;;
11592 esac
11593 fi
11594 rm -fr conftest*
11595
11596fi
6ec2e0f5
SDJ
11597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
11598$as_echo "$gt_cv_locale_fr" >&6; }
11599 LOCALE_FR=$gt_cv_locale_fr
11600
11601
11602
11603
11604
11605
11606
11607 GNULIB_FFSL=0;
11608 GNULIB_FFSLL=0;
11609 GNULIB_MEMCHR=0;
11610 GNULIB_MEMMEM=0;
11611 GNULIB_MEMPCPY=0;
11612 GNULIB_MEMRCHR=0;
11613 GNULIB_RAWMEMCHR=0;
11614 GNULIB_STPCPY=0;
11615 GNULIB_STPNCPY=0;
11616 GNULIB_STRCHRNUL=0;
11617 GNULIB_STRDUP=0;
11618 GNULIB_STRNCAT=0;
11619 GNULIB_STRNDUP=0;
11620 GNULIB_STRNLEN=0;
11621 GNULIB_STRPBRK=0;
11622 GNULIB_STRSEP=0;
11623 GNULIB_STRSTR=0;
11624 GNULIB_STRCASESTR=0;
11625 GNULIB_STRTOK_R=0;
11626 GNULIB_MBSLEN=0;
11627 GNULIB_MBSNLEN=0;
11628 GNULIB_MBSCHR=0;
11629 GNULIB_MBSRCHR=0;
11630 GNULIB_MBSSTR=0;
11631 GNULIB_MBSCASECMP=0;
11632 GNULIB_MBSNCASECMP=0;
11633 GNULIB_MBSPCASECMP=0;
11634 GNULIB_MBSCASESTR=0;
11635 GNULIB_MBSCSPN=0;
11636 GNULIB_MBSPBRK=0;
11637 GNULIB_MBSSPN=0;
11638 GNULIB_MBSSEP=0;
11639 GNULIB_MBSTOK_R=0;
11640 GNULIB_STRERROR=0;
11641 GNULIB_STRERROR_R=0;
11642 GNULIB_STRSIGNAL=0;
11643 GNULIB_STRVERSCMP=0;
11644 HAVE_MBSLEN=0;
11645 HAVE_FFSL=1;
11646 HAVE_FFSLL=1;
11647 HAVE_MEMCHR=1;
11648 HAVE_DECL_MEMMEM=1;
11649 HAVE_MEMPCPY=1;
11650 HAVE_DECL_MEMRCHR=1;
11651 HAVE_RAWMEMCHR=1;
11652 HAVE_STPCPY=1;
11653 HAVE_STPNCPY=1;
11654 HAVE_STRCHRNUL=1;
11655 HAVE_DECL_STRDUP=1;
11656 HAVE_DECL_STRNDUP=1;
11657 HAVE_DECL_STRNLEN=1;
11658 HAVE_STRPBRK=1;
11659 HAVE_STRSEP=1;
11660 HAVE_STRCASESTR=1;
11661 HAVE_DECL_STRTOK_R=1;
11662 HAVE_DECL_STRERROR_R=1;
11663 HAVE_DECL_STRSIGNAL=1;
11664 HAVE_STRVERSCMP=1;
11665 REPLACE_MEMCHR=0;
11666 REPLACE_MEMMEM=0;
11667 REPLACE_STPNCPY=0;
11668 REPLACE_STRDUP=0;
11669 REPLACE_STRSTR=0;
11670 REPLACE_STRCASESTR=0;
11671 REPLACE_STRCHRNUL=0;
11672 REPLACE_STRERROR=0;
11673 REPLACE_STRERROR_R=0;
11674 REPLACE_STRNCAT=0;
11675 REPLACE_STRNDUP=0;
11676 REPLACE_STRNLEN=0;
11677 REPLACE_STRSIGNAL=0;
11678 REPLACE_STRTOK_R=0;
11679 UNDEFINE_STRTOK_R=0;
11680
11681
11682
11683
11684
11685 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
11686 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
11687 # irrelevant for anonymous mappings.
11688 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
11689if test "x$ac_cv_func_mmap" = x""yes; then :
11690 gl_have_mmap=yes
11691else
11692 gl_have_mmap=no
11693fi
11694
11695
11696 # Try to allow MAP_ANONYMOUS.
11697 gl_have_mmap_anonymous=no
11698 if test $gl_have_mmap = yes; then
11699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
11700$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
11701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11702/* end confdefs.h. */
11703
11704#include <sys/mman.h>
11705#ifdef MAP_ANONYMOUS
11706 I cannot identify this map
11707#endif
11708
11709_ACEOF
11710if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11711 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
11712 gl_have_mmap_anonymous=yes
11713fi
11714rm -f conftest*
11715
11716 if test $gl_have_mmap_anonymous != yes; then
11717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11718/* end confdefs.h. */
11719
11720#include <sys/mman.h>
11721#ifdef MAP_ANON
11722 I cannot identify this map
11723#endif
11724
11725_ACEOF
11726if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11727 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
11728
11729$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
11730
11731 gl_have_mmap_anonymous=yes
11732fi
11733rm -f conftest*
11734
11735 fi
11736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
11737$as_echo "$gl_have_mmap_anonymous" >&6; }
11738 if test $gl_have_mmap_anonymous = yes; then
11739
11740$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
11741
11742 fi
11743 fi
11744
11745
11746
11747
11748
11749
11750 if test $HAVE_MEMCHR = 1; then
11751 # Detect platform-specific bugs in some versions of glibc:
11752 # memchr should not dereference anything with length 0
11753 # http://bugzilla.redhat.com/499689
11754 # memchr should not dereference overestimated length after a match
11755 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
11756 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
11757 # Assume that memchr works on platforms that lack mprotect.
11758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
11759$as_echo_n "checking whether memchr works... " >&6; }
11760if test "${gl_cv_func_memchr_works+set}" = set; then :
11761 $as_echo_n "(cached) " >&6
11762else
11763 if test "$cross_compiling" = yes; then :
11764 gl_cv_func_memchr_works="guessing no"
11765else
11766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11767/* end confdefs.h. */
11768
11769#include <string.h>
11770#if HAVE_SYS_MMAN_H
11771# include <fcntl.h>
11772# include <unistd.h>
11773# include <sys/types.h>
11774# include <sys/mman.h>
11775# ifndef MAP_FILE
11776# define MAP_FILE 0
11777# endif
11778#endif
11779
11780int
11781main ()
11782{
11783
11784 int result = 0;
11785 char *fence = NULL;
11786#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
11787# if HAVE_MAP_ANONYMOUS
11788 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
11789 const int fd = -1;
11790# else /* !HAVE_MAP_ANONYMOUS */
11791 const int flags = MAP_FILE | MAP_PRIVATE;
11792 int fd = open ("/dev/zero", O_RDONLY, 0666);
11793 if (fd >= 0)
11794# endif
11795 {
11796 int pagesize = getpagesize ();
11797 char *two_pages =
11798 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
11799 flags, fd, 0);
11800 if (two_pages != (char *)(-1)
11801 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
11802 fence = two_pages + pagesize;
11803 }
11804#endif
11805 if (fence)
11806 {
11807 if (memchr (fence, 0, 0))
11808 result |= 1;
11809 strcpy (fence - 9, "12345678");
11810 if (memchr (fence - 9, 0, 79) != fence - 1)
11811 result |= 2;
11812 if (memchr (fence - 1, 0, 3) != fence - 1)
11813 result |= 4;
11814 }
11815 return result;
11816
11817 ;
11818 return 0;
11819}
11820_ACEOF
11821if ac_fn_c_try_run "$LINENO"; then :
11822 gl_cv_func_memchr_works=yes
11823else
11824 gl_cv_func_memchr_works=no
11825fi
11826rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11827 conftest.$ac_objext conftest.beam conftest.$ac_ext
11828fi
11829
11830fi
11831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
11832$as_echo "$gl_cv_func_memchr_works" >&6; }
11833 if test "$gl_cv_func_memchr_works" != yes; then
11834 REPLACE_MEMCHR=1
11835 fi
11836 fi
11837
11838ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
11839if test "x$ac_cv_have_decl_memmem" = x""yes; then :
11840 ac_have_decl=1
11841else
11842 ac_have_decl=0
11843fi
11844
11845cat >>confdefs.h <<_ACEOF
11846#define HAVE_DECL_MEMMEM $ac_have_decl
11847_ACEOF
11848
11849
11850
11851
11852
11853 for ac_func in memmem
11854do :
11855 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
11856if test "x$ac_cv_func_memmem" = x""yes; then :
11857 cat >>confdefs.h <<_ACEOF
11858#define HAVE_MEMMEM 1
11859_ACEOF
11860
11861fi
11862done
11863
11864 if test $ac_cv_func_memmem = yes; then
11865 HAVE_MEMMEM=1
11866 else
11867 HAVE_MEMMEM=0
11868 fi
11869
11870 if test $ac_cv_have_decl_memmem = no; then
11871 HAVE_DECL_MEMMEM=0
11872 else
11873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
11874$as_echo_n "checking whether memmem works... " >&6; }
11875if test "${gl_cv_func_memmem_works_always+set}" = set; then :
11876 $as_echo_n "(cached) " >&6
11877else
11878 if test "$cross_compiling" = yes; then :
11879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11880/* end confdefs.h. */
11881
11882#ifdef __GNU_LIBRARY__
11883 #include <features.h>
11884 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
11885 || __GLIBC_MINOR__ > 12)) \
11886 || (__GLIBC__ > 2)) \
11887 || defined __UCLIBC__
11888 Lucky user
11889 #endif
11890#elif defined __CYGWIN__
11891 #include <cygwin/version.h>
11892 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
11893 Lucky user
11894 #endif
11895#else
11896 Lucky user
11897#endif
11898
11899_ACEOF
11900if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11901 $EGREP "Lucky user" >/dev/null 2>&1; then :
11902 gl_cv_func_memmem_works_always="guessing yes"
11903else
11904 gl_cv_func_memmem_works_always="guessing no"
11905fi
11906rm -f conftest*
11907
11908
11909else
11910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11911/* end confdefs.h. */
11912
11913#include <string.h> /* for memmem */
11914#define P "_EF_BF_BD"
11915#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
11916#define NEEDLE P P P P P
11917
11918int
11919main ()
11920{
11921
11922 int result = 0;
11923 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
11924 result |= 1;
11925 /* Check for empty needle behavior. */
11926 {
11927 const char *haystack = "AAA";
11928 if (memmem (haystack, 3, NULL, 0) != haystack)
11929 result |= 2;
11930 }
11931 return result;
11932
11933 ;
11934 return 0;
11935}
11936_ACEOF
11937if ac_fn_c_try_run "$LINENO"; then :
11938 gl_cv_func_memmem_works_always=yes
11939else
11940 gl_cv_func_memmem_works_always=no
11941fi
11942rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11943 conftest.$ac_objext conftest.beam conftest.$ac_ext
11944fi
11945
11946
11947fi
11948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
11949$as_echo "$gl_cv_func_memmem_works_always" >&6; }
11950 case "$gl_cv_func_memmem_works_always" in
11951 *yes) ;;
11952 *)
11953 REPLACE_MEMMEM=1
11954 ;;
11955 esac
11956 fi
11957 :
11958
11959ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
11960if test "x$ac_cv_have_decl_memrchr" = x""yes; then :
11961 ac_have_decl=1
11962else
11963 ac_have_decl=0
11964fi
11965
11966cat >>confdefs.h <<_ACEOF
11967#define HAVE_DECL_MEMRCHR $ac_have_decl
11968_ACEOF
11969
11970
11971
11972
11973
11974
11975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
11976$as_echo_n "checking for promoted mode_t type... " >&6; }
11977if test "${gl_cv_promoted_mode_t+set}" = set; then :
11978 $as_echo_n "(cached) " >&6
11979else
11980
11981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11982/* end confdefs.h. */
11983#include <sys/types.h>
11984int
11985main ()
11986{
11987typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
11988 ;
11989 return 0;
11990}
11991_ACEOF
11992if ac_fn_c_try_compile "$LINENO"; then :
11993 gl_cv_promoted_mode_t='int'
11994else
11995 gl_cv_promoted_mode_t='mode_t'
11996fi
11997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11998
11999fi
12000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
12001$as_echo "$gl_cv_promoted_mode_t" >&6; }
12002
12003cat >>confdefs.h <<_ACEOF
12004#define PROMOTED_MODE_T $gl_cv_promoted_mode_t
12005_ACEOF
12006
12007
12008
12009
12010
12011 GNULIB_DPRINTF=0;
12012 GNULIB_FCLOSE=0;
12013 GNULIB_FDOPEN=0;
12014 GNULIB_FFLUSH=0;
12015 GNULIB_FGETC=0;
12016 GNULIB_FGETS=0;
12017 GNULIB_FOPEN=0;
12018 GNULIB_FPRINTF=0;
12019 GNULIB_FPRINTF_POSIX=0;
12020 GNULIB_FPURGE=0;
12021 GNULIB_FPUTC=0;
12022 GNULIB_FPUTS=0;
12023 GNULIB_FREAD=0;
12024 GNULIB_FREOPEN=0;
12025 GNULIB_FSCANF=0;
12026 GNULIB_FSEEK=0;
12027 GNULIB_FSEEKO=0;
12028 GNULIB_FTELL=0;
12029 GNULIB_FTELLO=0;
12030 GNULIB_FWRITE=0;
12031 GNULIB_GETC=0;
12032 GNULIB_GETCHAR=0;
12033 GNULIB_GETDELIM=0;
12034 GNULIB_GETLINE=0;
12035 GNULIB_OBSTACK_PRINTF=0;
12036 GNULIB_OBSTACK_PRINTF_POSIX=0;
12037 GNULIB_PCLOSE=0;
12038 GNULIB_PERROR=0;
12039 GNULIB_POPEN=0;
12040 GNULIB_PRINTF=0;
12041 GNULIB_PRINTF_POSIX=0;
12042 GNULIB_PUTC=0;
12043 GNULIB_PUTCHAR=0;
12044 GNULIB_PUTS=0;
12045 GNULIB_REMOVE=0;
12046 GNULIB_RENAME=0;
12047 GNULIB_RENAMEAT=0;
12048 GNULIB_SCANF=0;
12049 GNULIB_SNPRINTF=0;
12050 GNULIB_SPRINTF_POSIX=0;
12051 GNULIB_STDIO_H_NONBLOCKING=0;
12052 GNULIB_STDIO_H_SIGPIPE=0;
12053 GNULIB_TMPFILE=0;
12054 GNULIB_VASPRINTF=0;
12055 GNULIB_VFSCANF=0;
12056 GNULIB_VSCANF=0;
12057 GNULIB_VDPRINTF=0;
12058 GNULIB_VFPRINTF=0;
12059 GNULIB_VFPRINTF_POSIX=0;
12060 GNULIB_VPRINTF=0;
12061 GNULIB_VPRINTF_POSIX=0;
12062 GNULIB_VSNPRINTF=0;
12063 GNULIB_VSPRINTF_POSIX=0;
12064 HAVE_DECL_FPURGE=1;
12065 HAVE_DECL_FSEEKO=1;
12066 HAVE_DECL_FTELLO=1;
12067 HAVE_DECL_GETDELIM=1;
12068 HAVE_DECL_GETLINE=1;
12069 HAVE_DECL_OBSTACK_PRINTF=1;
12070 HAVE_DECL_SNPRINTF=1;
12071 HAVE_DECL_VSNPRINTF=1;
12072 HAVE_DPRINTF=1;
12073 HAVE_FSEEKO=1;
12074 HAVE_FTELLO=1;
12075 HAVE_PCLOSE=1;
12076 HAVE_POPEN=1;
12077 HAVE_RENAMEAT=1;
12078 HAVE_VASPRINTF=1;
12079 HAVE_VDPRINTF=1;
12080 REPLACE_DPRINTF=0;
12081 REPLACE_FCLOSE=0;
12082 REPLACE_FDOPEN=0;
12083 REPLACE_FFLUSH=0;
12084 REPLACE_FOPEN=0;
12085 REPLACE_FPRINTF=0;
12086 REPLACE_FPURGE=0;
12087 REPLACE_FREOPEN=0;
12088 REPLACE_FSEEK=0;
12089 REPLACE_FSEEKO=0;
12090 REPLACE_FTELL=0;
12091 REPLACE_FTELLO=0;
12092 REPLACE_GETDELIM=0;
12093 REPLACE_GETLINE=0;
12094 REPLACE_OBSTACK_PRINTF=0;
12095 REPLACE_PERROR=0;
12096 REPLACE_POPEN=0;
12097 REPLACE_PRINTF=0;
12098 REPLACE_REMOVE=0;
12099 REPLACE_RENAME=0;
12100 REPLACE_RENAMEAT=0;
12101 REPLACE_SNPRINTF=0;
12102 REPLACE_SPRINTF=0;
12103 REPLACE_STDIO_READ_FUNCS=0;
12104 REPLACE_STDIO_WRITE_FUNCS=0;
12105 REPLACE_TMPFILE=0;
12106 REPLACE_VASPRINTF=0;
12107 REPLACE_VDPRINTF=0;
12108 REPLACE_VFPRINTF=0;
12109 REPLACE_VPRINTF=0;
12110 REPLACE_VSNPRINTF=0;
12111 REPLACE_VSPRINTF=0;
12112
12113
12114
12115ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
12116if test "x$ac_cv_have_decl_setenv" = x""yes; then :
12117 ac_have_decl=1
12118else
12119 ac_have_decl=0
12120fi
12121
12122cat >>confdefs.h <<_ACEOF
12123#define HAVE_DECL_SETENV $ac_have_decl
12124_ACEOF
12125
12126
12127
12128
12129
12130
12131 if test $ac_cv_have_decl_setenv = no; then
12132 HAVE_DECL_SETENV=0
12133 fi
12134
12135
12136
12137
12138
12139 for ac_header in search.h
12140do :
12141 ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
12142if test "x$ac_cv_header_search_h" = x""yes; then :
12143 cat >>confdefs.h <<_ACEOF
12144#define HAVE_SEARCH_H 1
12145_ACEOF
12146
12147fi
12148
12149done
12150
12151 for ac_func in tsearch
12152do :
12153 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
12154if test "x$ac_cv_func_tsearch" = x""yes; then :
12155 cat >>confdefs.h <<_ACEOF
12156#define HAVE_TSEARCH 1
12157_ACEOF
12158
12159fi
12160done
12161
12162
12163
12164
12165 GNULIB_PTHREAD_SIGMASK=0;
12166 GNULIB_RAISE=0;
12167 GNULIB_SIGNAL_H_SIGPIPE=0;
12168 GNULIB_SIGPROCMASK=0;
12169 GNULIB_SIGACTION=0;
12170 HAVE_POSIX_SIGNALBLOCKING=1;
12171 HAVE_PTHREAD_SIGMASK=1;
12172 HAVE_RAISE=1;
12173 HAVE_SIGSET_T=1;
12174 HAVE_SIGINFO_T=1;
12175 HAVE_SIGACTION=1;
12176 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
12177
12178 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
12179
12180 HAVE_SIGHANDLER_T=1;
12181 REPLACE_PTHREAD_SIGMASK=0;
12182 REPLACE_RAISE=0;
12183
12184
12185 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
12186 #include <signal.h>
12187 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
12188 #include <sys/types.h>
12189
12190"
12191if test "x$ac_cv_type_sigset_t" = x""yes; then :
12192
12193cat >>confdefs.h <<_ACEOF
12194#define HAVE_SIGSET_T 1
12195_ACEOF
12196
12197gl_cv_type_sigset_t=yes
12198else
12199 gl_cv_type_sigset_t=no
12200fi
12201
12202 if test $gl_cv_type_sigset_t != yes; then
12203 HAVE_SIGSET_T=0
12204 fi
12205
12206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
12207$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
12208if test "${ac_cv_type_uid_t+set}" = set; then :
12209 $as_echo_n "(cached) " >&6
12210else
12211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12212/* end confdefs.h. */
12213#include <sys/types.h>
12214
12215_ACEOF
12216if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12217 $EGREP "uid_t" >/dev/null 2>&1; then :
12218 ac_cv_type_uid_t=yes
12219else
12220 ac_cv_type_uid_t=no
12221fi
12222rm -f conftest*
12223
12224fi
12225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
12226$as_echo "$ac_cv_type_uid_t" >&6; }
12227if test $ac_cv_type_uid_t = no; then
12228
12229$as_echo "#define uid_t int" >>confdefs.h
12230
12231
12232$as_echo "#define gid_t int" >>confdefs.h
12233
12234fi
12235
12236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
12237$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
12238if test "${ac_cv_header_stdbool_h+set}" = set; then :
12239 $as_echo_n "(cached) " >&6
12240else
12241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12242/* end confdefs.h. */
12243
12244 #include <stdbool.h>
12245
12246 #ifdef __cplusplus
12247 typedef bool Bool;
12248 #else
12249 typedef _Bool Bool;
12250 #ifndef bool
12251 "error: bool is not defined"
12252 #endif
12253 #ifndef false
12254 "error: false is not defined"
12255 #endif
12256 #if false
12257 "error: false is not 0"
12258 #endif
12259 #ifndef true
12260 "error: true is not defined"
12261 #endif
12262 #if true != 1
12263 "error: true is not 1"
12264 #endif
12265 #endif
12266
12267 #ifndef __bool_true_false_are_defined
12268 "error: __bool_true_false_are_defined is not defined"
12269 #endif
12270
12271 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
12272
12273 char a[true == 1 ? 1 : -1];
12274 char b[false == 0 ? 1 : -1];
12275 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
12276 char d[(bool) 0.5 == true ? 1 : -1];
12277 /* See body of main program for 'e'. */
12278 char f[(Bool) 0.0 == false ? 1 : -1];
12279 char g[true];
12280 char h[sizeof (Bool)];
12281 char i[sizeof s.t];
12282 enum { j = false, k = true, l = false * true, m = true * 256 };
12283 /* The following fails for
12284 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
12285 Bool n[m];
12286 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
12287 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
12288 /* Catch a bug in an HP-UX C compiler. See
12289 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
12290 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
12291 */
12292 Bool q = true;
12293 Bool *pq = &q;
12294 bool *qq = &q;
12295
12296int
12297main ()
12298{
12299
12300 bool e = &s;
12301 *pq |= q; *pq |= ! q;
12302 *qq |= q; *qq |= ! q;
12303 /* Refer to every declared value, to avoid compiler optimizations. */
12304 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
12305 + !m + !n + !o + !p + !q + !pq + !qq);
12306
12307 ;
12308 return 0;
12309}
12310_ACEOF
12311if ac_fn_c_try_compile "$LINENO"; then :
12312 ac_cv_header_stdbool_h=yes
12313else
12314 ac_cv_header_stdbool_h=no
12315fi
12316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12317fi
12318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
12319$as_echo "$ac_cv_header_stdbool_h" >&6; }
12320 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
12321if test "x$ac_cv_type__Bool" = x""yes; then :
12322
12323cat >>confdefs.h <<_ACEOF
12324#define HAVE__BOOL 1
12325_ACEOF
12326
12327
12328fi
12329
12330
12331
12332 REPLACE_NULL=0;
12333 HAVE_MAX_ALIGN_T=1;
12334 HAVE_WCHAR_T=1;
12335
12336
12337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
12338$as_echo_n "checking for wchar_t... " >&6; }
12339if test "${gt_cv_c_wchar_t+set}" = set; then :
12340 $as_echo_n "(cached) " >&6
12341else
12342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12343/* end confdefs.h. */
12344#include <stddef.h>
12345 wchar_t foo = (wchar_t)'\0';
12346int
12347main ()
12348{
12349
12350 ;
12351 return 0;
12352}
12353_ACEOF
12354if ac_fn_c_try_compile "$LINENO"; then :
12355 gt_cv_c_wchar_t=yes
12356else
12357 gt_cv_c_wchar_t=no
12358fi
12359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12360fi
12361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
12362$as_echo "$gt_cv_c_wchar_t" >&6; }
12363 if test $gt_cv_c_wchar_t = yes; then
12364
12365$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
12366
12367 fi
12368
12369
12370
12371ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
12372if test "x$ac_cv_have_decl_strdup" = x""yes; then :
12373 ac_have_decl=1
12374else
12375 ac_have_decl=0
12376fi
12377
12378cat >>confdefs.h <<_ACEOF
12379#define HAVE_DECL_STRDUP $ac_have_decl
12380_ACEOF
12381
12382
12383 REPLACE_STRERROR_0=0
12384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
12385$as_echo_n "checking whether strerror(0) succeeds... " >&6; }
12386if test "${gl_cv_func_strerror_0_works+set}" = set; then :
12387 $as_echo_n "(cached) " >&6
12388else
12389 if test "$cross_compiling" = yes; then :
12390 case "$host_os" in
12391 # Guess yes on glibc systems.
12392 *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
12393 # If we don't know, assume the worst.
12394 *) gl_cv_func_strerror_0_works="guessing no" ;;
12395 esac
12396
12397else
12398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12399/* end confdefs.h. */
12400#include <string.h>
12401 #include <errno.h>
12402
12403int
12404main ()
12405{
12406int result = 0;
12407 char *str;
12408 errno = 0;
12409 str = strerror (0);
12410 if (!*str) result |= 1;
12411 if (errno) result |= 2;
12412 if (strstr (str, "nknown") || strstr (str, "ndefined"))
12413 result |= 4;
12414 return result;
12415 ;
12416 return 0;
12417}
12418_ACEOF
12419if ac_fn_c_try_run "$LINENO"; then :
12420 gl_cv_func_strerror_0_works=yes
12421else
12422 gl_cv_func_strerror_0_works=no
12423fi
12424rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12425 conftest.$ac_objext conftest.beam conftest.$ac_ext
12426fi
12427
12428
12429fi
12430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
12431$as_echo "$gl_cv_func_strerror_0_works" >&6; }
12432 case "$gl_cv_func_strerror_0_works" in
12433 *yes) ;;
12434 *)
12435 REPLACE_STRERROR_0=1
12436
12437$as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
12438
12439 ;;
12440 esac
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453 if test $gl_cv_have_include_next = yes; then
12454 gl_cv_next_string_h='<'string.h'>'
12455 else
12456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
12457$as_echo_n "checking absolute name of <string.h>... " >&6; }
12458if test "${gl_cv_next_string_h+set}" = set; then :
12459 $as_echo_n "(cached) " >&6
12460else
12461
12462
12463
12464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12465/* end confdefs.h. */
12466#include <string.h>
12467_ACEOF
12468 case "$host_os" in
12469 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12470 *) gl_absname_cpp="$ac_cpp" ;;
12471 esac
12472
12473 case "$host_os" in
12474 mingw*)
12475 gl_dirsep_regex='[/\\]'
12476 ;;
12477 *)
12478 gl_dirsep_regex='\/'
12479 ;;
12480 esac
12481 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12482 gl_header_literal_regex=`echo 'string.h' \
12483 | sed -e "$gl_make_literal_regex_sed"`
12484 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12485 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12486 s|^/[^/]|//&|
12487 p
12488 q
12489 }'
12490
12491 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12492 sed -n "$gl_absolute_header_sed"`
12493
12494 gl_header=$gl_cv_absolute_string_h
12495 gl_cv_next_string_h='"'$gl_header'"'
12496
12497
12498fi
12499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
12500$as_echo "$gl_cv_next_string_h" >&6; }
12501 fi
12502 NEXT_STRING_H=$gl_cv_next_string_h
12503
12504 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12505 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12506 gl_next_as_first_directive='<'string.h'>'
12507 else
12508 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12509 gl_next_as_first_directive=$gl_cv_next_string_h
12510 fi
12511 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
12512
12513
12514
12515
12516
12517
12518 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
12519 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
12520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
12521$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
12522if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
12523 $as_echo_n "(cached) " >&6
12524else
12525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12526/* end confdefs.h. */
12527#include <string.h>
12528
12529int
12530main ()
12531{
12532#undef $gl_func
12533 (void) $gl_func;
12534 ;
12535 return 0;
12536}
12537_ACEOF
12538if ac_fn_c_try_compile "$LINENO"; then :
12539 eval "$as_gl_Symbol=yes"
12540else
12541 eval "$as_gl_Symbol=no"
12542fi
12543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12544fi
12545eval ac_res=\$$as_gl_Symbol
12546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12547$as_echo "$ac_res" >&6; }
12548 eval as_val=\$$as_gl_Symbol
12549 if test "x$as_val" = x""yes; then :
12550 cat >>confdefs.h <<_ACEOF
12551#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
12552_ACEOF
12553
12554 eval ac_cv_have_decl_$gl_func=yes
12555fi
12556 done
12557
12558
12559
12560
12561
12562 if test "$gl_cv_func_memchr_works" != yes; then
12563 REPLACE_STRSTR=1
12564 else
12565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
12566$as_echo_n "checking whether strstr works... " >&6; }
12567if test "${gl_cv_func_strstr_works_always+set}" = set; then :
12568 $as_echo_n "(cached) " >&6
12569else
12570 if test "$cross_compiling" = yes; then :
12571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12572/* end confdefs.h. */
12573
12574#ifdef __GNU_LIBRARY__
12575 #include <features.h>
12576 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
12577 || defined __UCLIBC__
12578 Lucky user
12579 #endif
12580#elif defined __CYGWIN__
12581 #include <cygwin/version.h>
12582 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
12583 Lucky user
12584 #endif
12585#else
12586 Lucky user
12587#endif
12588
12589_ACEOF
12590if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12591 $EGREP "Lucky user" >/dev/null 2>&1; then :
12592 gl_cv_func_strstr_works_always="guessing yes"
12593else
12594 gl_cv_func_strstr_works_always="guessing no"
12595fi
12596rm -f conftest*
12597
12598
12599else
12600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12601/* end confdefs.h. */
12602
12603#include <string.h> /* for strstr */
12604#define P "_EF_BF_BD"
12605#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
12606#define NEEDLE P P P P P
12607
12608int
12609main ()
12610{
12611return !!strstr (HAYSTACK, NEEDLE);
12612
12613 ;
12614 return 0;
12615}
12616_ACEOF
12617if ac_fn_c_try_run "$LINENO"; then :
12618 gl_cv_func_strstr_works_always=yes
12619else
12620 gl_cv_func_strstr_works_always=no
12621fi
12622rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12623 conftest.$ac_objext conftest.beam conftest.$ac_ext
12624fi
12625
12626
12627fi
12628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
12629$as_echo "$gl_cv_func_strstr_works_always" >&6; }
12630 case "$gl_cv_func_strstr_works_always" in
12631 *yes) ;;
12632 *)
12633 REPLACE_STRSTR=1
12634 ;;
12635 esac
12636 fi
12637
12638ac_fn_c_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default"
12639if test "x$ac_cv_have_decl_strtok_r" = x""yes; then :
12640 ac_have_decl=1
12641else
12642 ac_have_decl=0
12643fi
12644
12645cat >>confdefs.h <<_ACEOF
12646#define HAVE_DECL_STRTOK_R $ac_have_decl
12647_ACEOF
12648
12649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
12650$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
12651if test -z "$MKDIR_P"; then
12652 if test "${ac_cv_path_mkdir+set}" = set; then :
12653 $as_echo_n "(cached) " >&6
12654else
12655 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12656for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
12657do
12658 IFS=$as_save_IFS
12659 test -z "$as_dir" && as_dir=.
12660 for ac_prog in mkdir gmkdir; do
12661 for ac_exec_ext in '' $ac_executable_extensions; do
12662 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
12663 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
12664 'mkdir (GNU coreutils) '* | \
12665 'mkdir (coreutils) '* | \
12666 'mkdir (fileutils) '4.1*)
12667 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
12668 break 3;;
12669 esac
12670 done
12671 done
12672 done
12673IFS=$as_save_IFS
12674
12675fi
12676
12677 if test "${ac_cv_path_mkdir+set}" = set; then
12678 MKDIR_P="$ac_cv_path_mkdir -p"
12679 else
12680 # As a last resort, use the slow shell script. Don't cache a
12681 # value for MKDIR_P within a source directory, because that will
12682 # break other packages using the cache if that directory is
12683 # removed, or if the value is a relative name.
12684 test -d ./--version && rmdir ./--version
12685 MKDIR_P="$ac_install_sh -d"
12686 fi
12687fi
12688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
12689$as_echo "$MKDIR_P" >&6; }
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709 if test $gl_cv_have_include_next = yes; then
12710 gl_cv_next_sys_types_h='<'sys/types.h'>'
12711 else
12712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
12713$as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
12714if test "${gl_cv_next_sys_types_h+set}" = set; then :
12715 $as_echo_n "(cached) " >&6
12716else
12717
12718
12719
12720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12721/* end confdefs.h. */
12722#include <sys/types.h>
12723_ACEOF
12724 case "$host_os" in
12725 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12726 *) gl_absname_cpp="$ac_cpp" ;;
12727 esac
12728
12729 case "$host_os" in
12730 mingw*)
12731 gl_dirsep_regex='[/\\]'
12732 ;;
12733 *)
12734 gl_dirsep_regex='\/'
12735 ;;
12736 esac
12737 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12738 gl_header_literal_regex=`echo 'sys/types.h' \
12739 | sed -e "$gl_make_literal_regex_sed"`
12740 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12741 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12742 s|^/[^/]|//&|
12743 p
12744 q
12745 }'
12746
12747 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12748 sed -n "$gl_absolute_header_sed"`
12749
12750 gl_header=$gl_cv_absolute_sys_types_h
12751 gl_cv_next_sys_types_h='"'$gl_header'"'
12752
12753
12754fi
12755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
12756$as_echo "$gl_cv_next_sys_types_h" >&6; }
12757 fi
12758 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
12759
12760 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12761 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12762 gl_next_as_first_directive='<'sys/types.h'>'
12763 else
12764 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12765 gl_next_as_first_directive=$gl_cv_next_sys_types_h
12766 fi
12767 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780 GNULIB_MKTIME=0;
12781 GNULIB_NANOSLEEP=0;
12782 GNULIB_STRPTIME=0;
12783 GNULIB_TIMEGM=0;
12784 GNULIB_TIME_R=0;
12785 GNULIB_TIME_RZ=0;
12786 HAVE_DECL_LOCALTIME_R=1;
12787 HAVE_NANOSLEEP=1;
12788 HAVE_STRPTIME=1;
12789 HAVE_TIMEGM=1;
12790 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
12791 REPLACE_MKTIME=GNULIB_PORTCHECK;
12792 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
12793 REPLACE_TIMEGM=GNULIB_PORTCHECK;
12794
12795 : ${GNULIB_GETTIMEOFDAY=0};
12796 REPLACE_GMTIME=0;
12797 REPLACE_LOCALTIME=0;
12798
12799
12800
12801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
12802$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
12803if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
12804 $as_echo_n "(cached) " >&6
12805else
12806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12807/* end confdefs.h. */
12808#include <time.h>
12809
12810int
12811main ()
12812{
12813static struct timespec x; x.tv_sec = x.tv_nsec;
12814 ;
12815 return 0;
12816}
12817_ACEOF
12818if ac_fn_c_try_compile "$LINENO"; then :
12819 gl_cv_sys_struct_timespec_in_time_h=yes
12820else
12821 gl_cv_sys_struct_timespec_in_time_h=no
12822fi
12823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12824fi
12825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
12826$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
12827
12828 TIME_H_DEFINES_STRUCT_TIMESPEC=0
12829 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
12830 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
12831 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
12832 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
12833 TIME_H_DEFINES_STRUCT_TIMESPEC=1
12834 else
12835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
12836$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
12837if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
12838 $as_echo_n "(cached) " >&6
12839else
12840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12841/* end confdefs.h. */
12842#include <sys/time.h>
12843
12844int
12845main ()
12846{
12847static struct timespec x; x.tv_sec = x.tv_nsec;
12848 ;
12849 return 0;
12850}
12851_ACEOF
12852if ac_fn_c_try_compile "$LINENO"; then :
12853 gl_cv_sys_struct_timespec_in_sys_time_h=yes
12854else
12855 gl_cv_sys_struct_timespec_in_sys_time_h=no
12856fi
12857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12858fi
12859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
12860$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
12861 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
12862 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
12863 else
12864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
12865$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
12866if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then :
12867 $as_echo_n "(cached) " >&6
12868else
12869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12870/* end confdefs.h. */
12871#include <pthread.h>
12872
12873int
12874main ()
12875{
12876static struct timespec x; x.tv_sec = x.tv_nsec;
12877 ;
12878 return 0;
12879}
12880_ACEOF
12881if ac_fn_c_try_compile "$LINENO"; then :
12882 gl_cv_sys_struct_timespec_in_pthread_h=yes
12883else
12884 gl_cv_sys_struct_timespec_in_pthread_h=no
12885fi
12886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12887fi
12888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
12889$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
12890 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
12891 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
12892 else
12893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
12894$as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
12895if test "${gl_cv_sys_struct_timespec_in_unistd_h+set}" = set; then :
12896 $as_echo_n "(cached) " >&6
12897else
12898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12899/* end confdefs.h. */
12900#include <unistd.h>
12901
12902int
12903main ()
12904{
12905static struct timespec x; x.tv_sec = x.tv_nsec;
12906 ;
12907 return 0;
12908}
12909_ACEOF
12910if ac_fn_c_try_compile "$LINENO"; then :
12911 gl_cv_sys_struct_timespec_in_unistd_h=yes
12912else
12913 gl_cv_sys_struct_timespec_in_unistd_h=no
12914fi
12915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12916fi
12917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
12918$as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
12919 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
12920 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
12921 fi
12922 fi
12923 fi
12924 fi
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941 if test $gl_cv_have_include_next = yes; then
12942 gl_cv_next_time_h='<'time.h'>'
12943 else
12944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
12945$as_echo_n "checking absolute name of <time.h>... " >&6; }
12946if test "${gl_cv_next_time_h+set}" = set; then :
12947 $as_echo_n "(cached) " >&6
12948else
12949
12950
12951
12952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12953/* end confdefs.h. */
12954#include <time.h>
12955_ACEOF
12956 case "$host_os" in
12957 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12958 *) gl_absname_cpp="$ac_cpp" ;;
12959 esac
12960
12961 case "$host_os" in
12962 mingw*)
12963 gl_dirsep_regex='[/\\]'
12964 ;;
12965 *)
12966 gl_dirsep_regex='\/'
12967 ;;
12968 esac
12969 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12970 gl_header_literal_regex=`echo 'time.h' \
12971 | sed -e "$gl_make_literal_regex_sed"`
12972 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12973 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12974 s|^/[^/]|//&|
12975 p
12976 q
12977 }'
12978
12979 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12980 sed -n "$gl_absolute_header_sed"`
12981
12982 gl_header=$gl_cv_absolute_time_h
12983 gl_cv_next_time_h='"'$gl_header'"'
12984
12985
12986fi
12987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
12988$as_echo "$gl_cv_next_time_h" >&6; }
12989 fi
12990 NEXT_TIME_H=$gl_cv_next_time_h
12991
12992 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12993 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12994 gl_next_as_first_directive='<'time.h'>'
12995 else
12996 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12997 gl_next_as_first_directive=$gl_cv_next_time_h
12998 fi
12999 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
13000
13001
13002
13003
13004
13005
13006
13007
13008ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
13009if test "x$ac_cv_have_decl_unsetenv" = x""yes; then :
13010 ac_have_decl=1
13011else
13012 ac_have_decl=0
13013fi
13014
13015cat >>confdefs.h <<_ACEOF
13016#define HAVE_DECL_UNSETENV $ac_have_decl
13017_ACEOF
13018
13019
13020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
13021$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
13022if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then :
13023 $as_echo_n "(cached) " >&6
13024else
13025 gl_cv_header_wchar_h_correct_inline=yes
13026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13027/* end confdefs.h. */
13028
13029 #define wcstod renamed_wcstod
13030/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13031 <wchar.h>.
13032 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13033 included before <wchar.h>. */
13034#include <stddef.h>
13035#include <stdio.h>
13036#include <time.h>
13037#include <wchar.h>
13038extern int zero (void);
13039int main () { return zero(); }
13040
13041_ACEOF
13042 save_ac_compile="$ac_compile"
13043 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
13044 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
13045 (eval $ac_compile) 2>&5
13046 ac_status=$?
13047 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13048 test $ac_status = 0; }; then
13049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13050/* end confdefs.h. */
13051
13052 #define wcstod renamed_wcstod
13053/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13054 <wchar.h>.
13055 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13056 included before <wchar.h>. */
13057#include <stddef.h>
13058#include <stdio.h>
13059#include <time.h>
13060#include <wchar.h>
13061int zero (void) { return 0; }
13062
13063_ACEOF
13064 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
13065 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
13066 (eval $ac_compile) 2>&5
13067 ac_status=$?
13068 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13069 test $ac_status = 0; }; then
13070 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
13071 :
13072 else
13073 gl_cv_header_wchar_h_correct_inline=no
13074 fi
13075 fi
13076 fi
13077 ac_compile="$save_ac_compile"
13078 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
13079
13080fi
13081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
13082$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
13083 if test $gl_cv_header_wchar_h_correct_inline = no; then
13084 as_fn_error "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
13085This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
13086C99 mode. You have four options:
13087 - Add the flag -fgnu89-inline to CC and reconfigure, or
13088 - Fix your include files, using parts of
13089 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
13090 - Use a gcc version older than 4.3, or
13091 - Don't use the flags -std=c99 or -std=gnu99.
13092Configuration aborted." "$LINENO" 5
13093 fi
13094
13095
13096
13097
13098
13099 if test $ac_cv_header_features_h = yes; then
13100 HAVE_FEATURES_H=1
13101 else
13102 HAVE_FEATURES_H=0
13103 fi
13104
13105
13106
13107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
13108$as_echo_n "checking for wint_t... " >&6; }
13109if test "${gt_cv_c_wint_t+set}" = set; then :
13110 $as_echo_n "(cached) " >&6
13111else
13112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13113/* end confdefs.h. */
13114
13115/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13116 <wchar.h>.
13117 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
13118 before <wchar.h>. */
13119#include <stddef.h>
13120#include <stdio.h>
13121#include <time.h>
13122#include <wchar.h>
13123 wint_t foo = (wchar_t)'\0';
13124int
13125main ()
13126{
13127
13128 ;
13129 return 0;
13130}
13131_ACEOF
13132if ac_fn_c_try_compile "$LINENO"; then :
13133 gt_cv_c_wint_t=yes
13134else
13135 gt_cv_c_wint_t=no
13136fi
13137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13138fi
13139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
13140$as_echo "$gt_cv_c_wint_t" >&6; }
13141 if test $gt_cv_c_wint_t = yes; then
13142
13143$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
13144
13145 fi
13146
13147
13148 GNULIB_ISWBLANK=0;
13149 GNULIB_WCTYPE=0;
13150 GNULIB_ISWCTYPE=0;
13151 GNULIB_WCTRANS=0;
13152 GNULIB_TOWCTRANS=0;
13153 HAVE_ISWBLANK=1;
13154 HAVE_WCTYPE_T=1;
13155 HAVE_WCTRANS_T=1;
13156 REPLACE_ISWBLANK=0;
13157
13158
13159
13160
13161 if false; then
13162 GL_COND_LIBTOOL_TRUE=
13163 GL_COND_LIBTOOL_FALSE='#'
13164else
13165 GL_COND_LIBTOOL_TRUE='#'
13166 GL_COND_LIBTOOL_FALSE=
13167fi
13168
13169 gl_cond_libtool=false
13170 gl_libdeps=
13171 gl_ltlibdeps=
13172 gl_m4_base='import/m4'
13173
13174
13175
13176
13177
13178
13179
13180
13181
13182 gl_source_base='import'
13183
13184
13185 if test $ac_cv_func_alloca_works = no; then
13186 :
13187 fi
13188
13189 # Define an additional variable used in the Makefile substitution.
13190 if test $ac_cv_working_alloca_h = yes; then
13191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
13192$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
13193if test "${gl_cv_rpl_alloca+set}" = set; then :
13194 $as_echo_n "(cached) " >&6
13195else
13196
13197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13198/* end confdefs.h. */
13199
13200#if defined __GNUC__ || defined _AIX || defined _MSC_VER
13201 Need own alloca
13202#endif
13203
13204_ACEOF
13205if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13206 $EGREP "Need own alloca" >/dev/null 2>&1; then :
13207 gl_cv_rpl_alloca=yes
13208else
13209 gl_cv_rpl_alloca=no
13210fi
13211rm -f conftest*
13212
13213
13214fi
13215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
13216$as_echo "$gl_cv_rpl_alloca" >&6; }
13217 if test $gl_cv_rpl_alloca = yes; then
13218
13219$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13220
13221 ALLOCA_H=alloca.h
13222 else
13223 ALLOCA_H=
13224 fi
13225 else
13226 ALLOCA_H=alloca.h
13227 fi
13228
13229 if test -n "$ALLOCA_H"; then
13230 GL_GENERATE_ALLOCA_H_TRUE=
13231 GL_GENERATE_ALLOCA_H_FALSE='#'
13232else
13233 GL_GENERATE_ALLOCA_H_TRUE='#'
13234 GL_GENERATE_ALLOCA_H_FALSE=
13235fi
13236
13237
13238
13239
13240
13241
13242
13243
13244
13245
13246 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
13247
13248
13249
13250
13251 if test $ac_cv_func_canonicalize_file_name = no; then
13252 HAVE_CANONICALIZE_FILE_NAME=0
13253 if test $ac_cv_func_realpath = no; then
13254 HAVE_REALPATH=0
13255 else
13256 case "$gl_cv_func_realpath_works" in
13257 *yes) ;;
13258 *) REPLACE_REALPATH=1 ;;
13259 esac
13260 fi
13261 else
13262 case "$gl_cv_func_realpath_works" in
13263 *yes)
13264 ;;
13265 *)
13266 REPLACE_CANONICALIZE_FILE_NAME=1
13267 REPLACE_REALPATH=1
13268 ;;
13269 esac
13270 fi
13271
13272 if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
13273
13274
13275
13276
13277
13278
13279
13280
13281 gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
13282
13283 fi
13284
13285
13286cat >>confdefs.h <<_ACEOF
13287#define GNULIB_CANONICALIZE_LGPL 1
13288_ACEOF
13289
13290
13291
13292
13293
13294
13295
13296 GNULIB_CANONICALIZE_FILE_NAME=1
13297
13298
13299
13300
13301
13302$as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
13303
13304
13305
13306
13307
13308
13309
13310
13311 GNULIB_REALPATH=1
13312
13313
13314
13315
13316
13317$as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
13318
13319
13320
13321
13322
13323
13324
13325
13326 GNULIB_CHDIR=1
13327
13328
13329
13330
13331
13332$as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
13333
13334
13335
13336
13337
13338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
13339$as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; }
13340if test "${gl_cv_have_arbitrary_file_name_length_limit+set}" = set; then :
13341 $as_echo_n "(cached) " >&6
13342else
13343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13344/* end confdefs.h. */
13345
13346/* Arrange to define PATH_MAX, like "pathmax.h" does. */
13347#if HAVE_UNISTD_H
13348# include <unistd.h>
13349#endif
13350#include <limits.h>
13351#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
13352# include <sys/param.h>
13353#endif
13354#if !defined PATH_MAX && defined MAXPATHLEN
13355# define PATH_MAX MAXPATHLEN
13356#endif
13357#ifdef __hpux
13358# undef PATH_MAX
13359# define PATH_MAX 1024
13360#endif
13361#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
13362# undef PATH_MAX
13363# define PATH_MAX 260
13364#endif
13365
13366#ifdef PATH_MAX
13367have_arbitrary_file_name_length_limit
13368#endif
13369_ACEOF
13370if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13371 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
13372 gl_cv_have_arbitrary_file_name_length_limit=yes
13373else
13374 gl_cv_have_arbitrary_file_name_length_limit=no
13375fi
13376rm -f conftest*
13377
13378fi
13379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
13380$as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
13381
13382 if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
13383
13384
13385
13386
13387
13388
13389
13390
13391 gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
13392
13393 :
13394 fi
13395
13396
13397$as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
13398
13399
13400
13401
13402
13403 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
13404 REPLACE_CLOSE=1
13405 fi
13406
13407
13408
13409
13410
13411 if test $ac_cv_header_sys_socket_h != yes; then
13412 for ac_header in winsock2.h
13413do :
13414 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
13415if test "x$ac_cv_header_winsock2_h" = x""yes; then :
13416 cat >>confdefs.h <<_ACEOF
13417#define HAVE_WINSOCK2_H 1
13418_ACEOF
13419
13420fi
13421
13422done
13423
13424 fi
13425 if test "$ac_cv_header_winsock2_h" = yes; then
13426 HAVE_WINSOCK2_H=1
13427 UNISTD_H_HAVE_WINSOCK2_H=1
13428 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
13429 else
13430 HAVE_WINSOCK2_H=0
13431 fi
13432
13433
13434 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
13435 REPLACE_CLOSE=1
13436 fi
13437
13438
13439 if test $REPLACE_CLOSE = 0; then
13440
13441
13442
13443 if test $ac_cv_func_fchdir = no; then
13444 HAVE_FCHDIR=0
13445 fi
13446
13447 if test $HAVE_FCHDIR = 0; then
13448 REPLACE_CLOSE=1
13449 fi
13450 fi
13451
13452
13453 if test $REPLACE_CLOSE = 1; then
13454
13455
13456
13457
13458
13459
13460
13461
13462 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
13463
13464 fi
13465
13466
13467
13468
13469
13470 GNULIB_CLOSE=1
13471
13472
13473
13474
13475
13476$as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
13477
13478
13479
13480
13481
13482
13483 for ac_func in closedir
13484do :
13485 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
13486if test "x$ac_cv_func_closedir" = x""yes; then :
13487 cat >>confdefs.h <<_ACEOF
13488#define HAVE_CLOSEDIR 1
13489_ACEOF
13490
13491fi
13492done
13493
13494 if test $ac_cv_func_closedir = no; then
13495 HAVE_CLOSEDIR=0
13496 fi
13497
13498
13499
13500
13501 if test $ac_cv_func_fchdir = no; then
13502 HAVE_FCHDIR=0
13503 fi
13504
13505 if test $HAVE_FCHDIR = 0; then
13506 if test $HAVE_CLOSEDIR = 1; then
13507 REPLACE_CLOSEDIR=1
13508 fi
13509 fi
13510
13511 case $host_os,$HAVE_CLOSEDIR in
13512 os2*,1)
13513 REPLACE_CLOSEDIR=1;;
13514 esac
13515
13516 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
13517
13518
13519
13520
13521
13522
13523
13524
13525 gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
13526
13527 fi
13528
13529
13530
13531
13532
13533 GNULIB_CLOSEDIR=1
13534
13535
13536
13537
13538
13539$as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
13540
13541
13542
13543
13544 if test "x$datarootdir" = x; then
13545 datarootdir='${datadir}'
13546
13547 fi
13548 if test "x$docdir" = x; then
13549 docdir='${datarootdir}/doc/${PACKAGE}'
13550
13551 fi
13552 if test "x$htmldir" = x; then
13553 htmldir='${docdir}'
13554
13555 fi
13556 if test "x$dvidir" = x; then
13557 dvidir='${docdir}'
13558
13559 fi
13560 if test "x$pdfdir" = x; then
13561 pdfdir='${docdir}'
13562
13563 fi
13564 if test "x$psdir" = x; then
13565 psdir='${docdir}'
13566
13567 fi
13568 if test "x$lispdir" = x; then
13569 lispdir='${datarootdir}/emacs/site-lisp'
13570
13571 fi
13572 if test "x$localedir" = x; then
13573 localedir='${datarootdir}/locale'
13574
13575 fi
13576 if test "x$runstatedir" = x; then
13577 runstatedir='${localstatedir}/run'
13578
13579 fi
13580
13581 pkglibexecdir='${libexecdir}/${PACKAGE}'
13582
13583
13584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
13585$as_echo_n "checking for d_ino member in directory struct... " >&6; }
13586if test "${gl_cv_struct_dirent_d_ino+set}" = set; then :
13587 $as_echo_n "(cached) " >&6
13588else
13589 if test "$cross_compiling" = yes; then :
13590 case "$host_os" in
13591 # Guess yes on glibc systems with Linux kernel.
13592 linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
13593 # If we don't know, assume the worst.
13594 *) gl_cv_struct_dirent_d_ino="guessing no" ;;
13595 esac
13596
13597else
13598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13599/* end confdefs.h. */
13600#include <sys/types.h>
13601 #include <sys/stat.h>
13602 #include <dirent.h>
13603
13604int
13605main ()
13606{
13607DIR *dp = opendir (".");
13608 struct dirent *e;
13609 struct stat st;
13610 if (! dp)
13611 return 1;
13612 e = readdir (dp);
13613 if (! e)
13614 return 2;
13615 if (lstat (e->d_name, &st) != 0)
13616 return 3;
13617 if (e->d_ino != st.st_ino)
13618 return 4;
13619 closedir (dp);
13620 return 0;
13621
13622 ;
13623 return 0;
13624}
13625_ACEOF
13626if ac_fn_c_try_run "$LINENO"; then :
13627 gl_cv_struct_dirent_d_ino=yes
13628else
13629 gl_cv_struct_dirent_d_ino=no
13630fi
13631rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13632 conftest.$ac_objext conftest.beam conftest.$ac_ext
13633fi
13634
13635fi
13636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
13637$as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
13638 case "$gl_cv_struct_dirent_d_ino" in
13639 *yes)
13640
13641$as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
13642
13643 ;;
13644 esac
13645
13646
13647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
13648$as_echo_n "checking for d_type member in directory struct... " >&6; }
13649if test "${gl_cv_struct_dirent_d_type+set}" = set; then :
13650 $as_echo_n "(cached) " >&6
13651else
13652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13653/* end confdefs.h. */
13654
13655#include <sys/types.h>
13656#include <dirent.h>
13657
13658int
13659main ()
13660{
13661struct dirent dp; dp.d_type = 0;
13662 ;
13663 return 0;
13664}
13665_ACEOF
13666if ac_fn_c_try_link "$LINENO"; then :
13667 gl_cv_struct_dirent_d_type=yes
13668else
13669 gl_cv_struct_dirent_d_type=no
13670fi
13671rm -f core conftest.err conftest.$ac_objext \
13672 conftest$ac_exeext conftest.$ac_ext
13673
13674
13675fi
13676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5
13677$as_echo "$gl_cv_struct_dirent_d_type" >&6; }
13678 if test $gl_cv_struct_dirent_d_type = yes; then
13679
13680$as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
13681
13682 fi
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
13695
13696
13697 if test $gl_cv_have_include_next = yes; then
13698 gl_cv_next_dirent_h='<'dirent.h'>'
13699 else
13700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
13701$as_echo_n "checking absolute name of <dirent.h>... " >&6; }
13702if test "${gl_cv_next_dirent_h+set}" = set; then :
13703 $as_echo_n "(cached) " >&6
13704else
13705
13706 if test $ac_cv_header_dirent_h = yes; then
13707
13708
13709
13710
13711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13712/* end confdefs.h. */
13713#include <dirent.h>
13714_ACEOF
13715 case "$host_os" in
13716 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13717 *) gl_absname_cpp="$ac_cpp" ;;
13718 esac
13719
13720 case "$host_os" in
13721 mingw*)
13722 gl_dirsep_regex='[/\\]'
13723 ;;
13724 *)
13725 gl_dirsep_regex='\/'
13726 ;;
13727 esac
13728 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13729 gl_header_literal_regex=`echo 'dirent.h' \
13730 | sed -e "$gl_make_literal_regex_sed"`
13731 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13732 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13733 s|^/[^/]|//&|
13734 p
13735 q
13736 }'
13737
13738 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13739 sed -n "$gl_absolute_header_sed"`
13740
13741 gl_header=$gl_cv_absolute_dirent_h
13742 gl_cv_next_dirent_h='"'$gl_header'"'
13743 else
13744 gl_cv_next_dirent_h='<'dirent.h'>'
13745 fi
13746
13747
13748fi
13749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
13750$as_echo "$gl_cv_next_dirent_h" >&6; }
13751 fi
13752 NEXT_DIRENT_H=$gl_cv_next_dirent_h
13753
13754 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13755 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13756 gl_next_as_first_directive='<'dirent.h'>'
13757 else
13758 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13759 gl_next_as_first_directive=$gl_cv_next_dirent_h
13760 fi
13761 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
13762
13763
13764
13765
13766 if test $ac_cv_header_dirent_h = yes; then
13767 HAVE_DIRENT_H=1
13768 else
13769 HAVE_DIRENT_H=0
13770 fi
13771
13772
13773
13774 for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do
13775 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
13776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
13777$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
13778if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
13779 $as_echo_n "(cached) " >&6
13780else
13781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13782/* end confdefs.h. */
13783#include <dirent.h>
13784
13785int
13786main ()
13787{
13788#undef $gl_func
13789 (void) $gl_func;
13790 ;
13791 return 0;
13792}
13793_ACEOF
13794if ac_fn_c_try_compile "$LINENO"; then :
13795 eval "$as_gl_Symbol=yes"
13796else
13797 eval "$as_gl_Symbol=no"
13798fi
13799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13800fi
13801eval ac_res=\$$as_gl_Symbol
13802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13803$as_echo "$ac_res" >&6; }
13804 eval as_val=\$$as_gl_Symbol
13805 if test "x$as_val" = x""yes; then :
13806 cat >>confdefs.h <<_ACEOF
13807#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
13808_ACEOF
13809
13810 eval ac_cv_have_decl_$gl_func=yes
13811fi
13812 done
13813
13814
13815
13816
13817
13818
13819
13820 for ac_func in dirfd
13821do :
13822 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
13823if test "x$ac_cv_func_dirfd" = x""yes; then :
13824 cat >>confdefs.h <<_ACEOF
13825#define HAVE_DIRFD 1
13826_ACEOF
13827
13828fi
13829done
13830
13831 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
13832 #include <dirent.h>
13833"
13834if test "x$ac_cv_have_decl_dirfd" = x""yes; then :
13835 ac_have_decl=1
13836else
13837 ac_have_decl=0
13838fi
13839
13840cat >>confdefs.h <<_ACEOF
13841#define HAVE_DECL_DIRFD $ac_have_decl
13842_ACEOF
13843
13844 if test $ac_cv_have_decl_dirfd = no; then
13845 HAVE_DECL_DIRFD=0
13846 fi
13847
13848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
13849$as_echo_n "checking whether dirfd is a macro... " >&6; }
13850if test "${gl_cv_func_dirfd_macro+set}" = set; then :
13851 $as_echo_n "(cached) " >&6
13852else
13853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13854/* end confdefs.h. */
13855
13856#include <sys/types.h>
13857#include <dirent.h>
13858#ifdef dirfd
13859 dirent_header_defines_dirfd
13860#endif
13861_ACEOF
13862if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13863 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
13864 gl_cv_func_dirfd_macro=yes
13865else
13866 gl_cv_func_dirfd_macro=no
13867fi
13868rm -f conftest*
13869
13870fi
13871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
13872$as_echo "$gl_cv_func_dirfd_macro" >&6; }
13873
13874 # Use the replacement if we have no function or macro with that name,
13875 # or if OS/2 kLIBC whose dirfd() does not work.
13876 # Replace only if the system declares dirfd already.
13877 case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
13878 no,no,*,yes | *,*,os2*,yes)
13879 REPLACE_DIRFD=1
13880
13881$as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
13882;;
13883 esac
13884
13885 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
13886 || test $REPLACE_DIRFD = 1; then
13887
13888
13889
13890
13891
13892
13893
13894
13895 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
13896
13897
13898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
13899$as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
13900if test "${gl_cv_sys_dir_fd_member_name+set}" = set; then :
13901 $as_echo_n "(cached) " >&6
13902else
13903
13904 dirfd_save_CFLAGS=$CFLAGS
13905 for ac_expr in d_fd dd_fd; do
13906
13907 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
13908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13909/* end confdefs.h. */
13910
13911 #include <sys/types.h>
13912 #include <dirent.h>
13913int
13914main ()
13915{
13916DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
13917 ;
13918 return 0;
13919}
13920_ACEOF
13921if ac_fn_c_try_compile "$LINENO"; then :
13922 dir_fd_found=yes
13923
13924fi
13925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13926 CFLAGS=$dirfd_save_CFLAGS
13927 test "$dir_fd_found" = yes && break
13928 done
13929 test "$dir_fd_found" = yes || ac_expr=no_such_member
13930
13931 gl_cv_sys_dir_fd_member_name=$ac_expr
13932
13933
13934fi
13935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
13936$as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
13937 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
13938
13939cat >>confdefs.h <<_ACEOF
13940#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
13941_ACEOF
13942
13943 fi
13944
13945
13946 fi
13947
13948
13949
13950
13951
13952 GNULIB_DIRFD=1
13953
13954
13955
13956
13957
13958$as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
13959
13960
13961
13962
13963
13964
13965
13966
13967
13968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
13969$as_echo_n "checking whether // is distinct from /... " >&6; }
13970if test "${gl_cv_double_slash_root+set}" = set; then :
13971 $as_echo_n "(cached) " >&6
13972else
13973 if test x"$cross_compiling" = xyes ; then
13974 # When cross-compiling, there is no way to tell whether // is special
13975 # short of a list of hosts. However, the only known hosts to date
13976 # that have a distinct // are Apollo DomainOS (too old to port to),
13977 # Cygwin, and z/OS. If anyone knows of another system for which // has
13978 # special semantics and is distinct from /, please report it to
13979 # <bug-gnulib@gnu.org>.
13980 case $host in
13981 *-cygwin | i370-ibm-openedition)
13982 gl_cv_double_slash_root=yes ;;
13983 *)
13984 # Be optimistic and assume that / and // are the same when we
13985 # don't know.
13986 gl_cv_double_slash_root='unknown, assuming no' ;;
13987 esac
13988 else
13989 set x `ls -di / // 2>/dev/null`
13990 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
13991 gl_cv_double_slash_root=no
13992 else
13993 gl_cv_double_slash_root=yes
13994 fi
13995 fi
13996fi
13997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
13998$as_echo "$gl_cv_double_slash_root" >&6; }
13999 if test "$gl_cv_double_slash_root" = yes; then
8690e634 14000
6ec2e0f5 14001$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
8690e634 14002
6ec2e0f5 14003 fi
8690e634
JK
14004
14005
14006
14007
6ec2e0f5
SDJ
14008 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
14009 REPLACE_DUP=1
14010 fi
8690e634 14011
8690e634
JK
14012
14013
14014
6ec2e0f5
SDJ
14015 if test $ac_cv_func_fchdir = no; then
14016 HAVE_FCHDIR=0
14017 fi
8690e634 14018
6ec2e0f5
SDJ
14019 if test $HAVE_FCHDIR = 0; then
14020 REPLACE_DUP=1
14021 fi
8690e634 14022
6ec2e0f5
SDJ
14023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
14024$as_echo_n "checking whether dup works... " >&6; }
14025if test "${gl_cv_func_dup_works+set}" = set; then :
14026 $as_echo_n "(cached) " >&6
8690e634 14027else
6ec2e0f5
SDJ
14028 if test "$cross_compiling" = yes; then :
14029 gl_cv_func_dup_works='guessing yes'
14030else
14031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 14032/* end confdefs.h. */
6ec2e0f5
SDJ
14033#include <unistd.h>
14034 #include <fcntl.h>
14035 #include <errno.h>
14036int
14037main ()
14038{
14039/* On OS/2 kLIBC, dup does not work on a directory fd. */
14040 int fd = open (".", O_RDONLY);
14041 return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
8690e634 14042
6ec2e0f5
SDJ
14043 ;
14044 return 0;
14045}
8690e634
JK
14046
14047_ACEOF
6ec2e0f5
SDJ
14048if ac_fn_c_try_run "$LINENO"; then :
14049 gl_cv_func_dup_works=yes
14050else
14051 gl_cv_func_dup_works=no
14052fi
14053rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14054 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 14055fi
8690e634 14056
8690e634 14057
6ec2e0f5
SDJ
14058fi
14059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
14060$as_echo "$gl_cv_func_dup_works" >&6; }
14061 case "$gl_cv_func_dup_works" in
14062 *yes) ;;
14063 *)
14064 REPLACE_DUP=1
14065 ;;
14066 esac
8690e634 14067
6ec2e0f5 14068 if test $REPLACE_DUP = 1; then
8690e634 14069
8690e634 14070
8690e634 14071
8690e634 14072
8690e634 14073
6ec2e0f5
SDJ
14074
14075
14076
14077 gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
14078
14079 :
8690e634
JK
14080 fi
14081
14082
8690e634
JK
14083
14084
14085
6ec2e0f5 14086 GNULIB_DUP=1
8690e634 14087
6ec2e0f5
SDJ
14088
14089
14090
14091
14092$as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
14093
14094
14095
14096
14097
14098
14099
14100
14101$as_echo "#define HAVE_DUP2 1" >>confdefs.h
14102
14103
14104 if test $HAVE_DUP2 = 1; then
14105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
14106$as_echo_n "checking whether dup2 works... " >&6; }
14107if test "${gl_cv_func_dup2_works+set}" = set; then :
8690e634
JK
14108 $as_echo_n "(cached) " >&6
14109else
14110 if test "$cross_compiling" = yes; then :
6ec2e0f5
SDJ
14111 case "$host_os" in
14112 mingw*) # on this platform, dup2 always returns 0 for success
14113 gl_cv_func_dup2_works="guessing no" ;;
14114 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
14115 gl_cv_func_dup2_works="guessing no" ;;
14116 aix* | freebsd*)
14117 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
14118 # not EBADF.
14119 gl_cv_func_dup2_works="guessing no" ;;
14120 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
14121 gl_cv_func_dup2_works="guessing no" ;;
14122 *-android*) # implemented using dup3(), which fails if oldfd == newfd
14123 gl_cv_func_dup2_works="guessing no" ;;
14124 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
14125 gl_cv_func_dup2_works="guessing no" ;;
14126 *) gl_cv_func_dup2_works="guessing yes" ;;
14127 esac
8690e634
JK
14128else
14129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14130/* end confdefs.h. */
14131
6ec2e0f5
SDJ
14132 #include <errno.h>
14133 #include <fcntl.h>
14134 #include <limits.h>
14135 #include <sys/resource.h>
14136 #include <unistd.h>
14137 #ifndef RLIM_SAVED_CUR
14138 # define RLIM_SAVED_CUR RLIM_INFINITY
14139 #endif
14140 #ifndef RLIM_SAVED_MAX
14141 # define RLIM_SAVED_MAX RLIM_INFINITY
14142 #endif
8690e634
JK
14143
14144int
14145main ()
14146{
6ec2e0f5
SDJ
14147int result = 0;
14148 int bad_fd = INT_MAX;
14149 struct rlimit rlim;
14150 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
14151 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
14152 && rlim.rlim_cur != RLIM_INFINITY
14153 && rlim.rlim_cur != RLIM_SAVED_MAX
14154 && rlim.rlim_cur != RLIM_SAVED_CUR)
14155 bad_fd = rlim.rlim_cur;
14156 #ifdef FD_CLOEXEC
14157 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
14158 result |= 1;
14159 #endif
14160 if (dup2 (1, 1) != 1)
14161 result |= 2;
14162 #ifdef FD_CLOEXEC
14163 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
14164 result |= 4;
14165 #endif
14166 close (0);
14167 if (dup2 (0, 0) != -1)
14168 result |= 8;
14169 /* Many gnulib modules require POSIX conformance of EBADF. */
14170 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
14171 result |= 16;
14172 /* Flush out some cygwin core dumps. */
14173 if (dup2 (2, -1) != -1 || errno != EBADF)
14174 result |= 32;
14175 dup2 (2, 255);
14176 dup2 (2, 256);
14177 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
14178 {
14179 int fd = open (".", O_RDONLY);
14180 if (fd == -1)
14181 result |= 64;
14182 else if (dup2 (fd, fd + 1) == -1)
14183 result |= 128;
14184
14185 close (fd);
14186 }
14187 return result;
8690e634
JK
14188 ;
14189 return 0;
14190}
6ec2e0f5 14191
8690e634
JK
14192_ACEOF
14193if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 14194 gl_cv_func_dup2_works=yes
8690e634 14195else
6ec2e0f5 14196 gl_cv_func_dup2_works=no
8690e634
JK
14197fi
14198rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14199 conftest.$ac_objext conftest.beam conftest.$ac_ext
14200fi
14201
6ec2e0f5
SDJ
14202
14203fi
14204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
14205$as_echo "$gl_cv_func_dup2_works" >&6; }
14206 case "$gl_cv_func_dup2_works" in
14207 *yes) ;;
14208 *)
14209 REPLACE_DUP2=1
14210 for ac_func in setdtablesize
14211do :
14212 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
14213if test "x$ac_cv_func_setdtablesize" = x""yes; then :
14214 cat >>confdefs.h <<_ACEOF
14215#define HAVE_SETDTABLESIZE 1
14216_ACEOF
14217
14218fi
14219done
14220
14221 ;;
14222 esac
14223 fi
14224
14225
14226
14227
14228 if test $ac_cv_func_fchdir = no; then
14229 HAVE_FCHDIR=0
8690e634
JK
14230 fi
14231
6ec2e0f5
SDJ
14232 if test $HAVE_FCHDIR = 0; then
14233 if test $HAVE_DUP2 = 1; then
14234 REPLACE_DUP2=1
14235 fi
14236 fi
8690e634 14237
8690e634 14238
6ec2e0f5 14239 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
8690e634
JK
14240
14241
14242
14243
8690e634 14244
8690e634 14245
6ec2e0f5
SDJ
14246
14247
14248 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
14249
14250
8690e634
JK
14251 fi
14252
8690e634 14253
8690e634 14254
8690e634
JK
14255
14256
6ec2e0f5
SDJ
14257 GNULIB_DUP2=1
14258
14259
14260
14261
14262
14263$as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
14264
14265
14266
14267
14268
14269
14270
14271
14272
14273 GNULIB_ENVIRON=1
14274
14275
14276
14277
14278
14279$as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
14280
14281
14282
14283
14284
14285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
14286$as_echo_n "checking for error_at_line... " >&6; }
14287if test "${ac_cv_lib_error_at_line+set}" = set; then :
14288 $as_echo_n "(cached) " >&6
8690e634
JK
14289else
14290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14291/* end confdefs.h. */
6ec2e0f5 14292#include <error.h>
8690e634
JK
14293int
14294main ()
14295{
6ec2e0f5 14296error_at_line (0, 0, "", 0, "an error occurred");
8690e634
JK
14297 ;
14298 return 0;
14299}
14300_ACEOF
6ec2e0f5
SDJ
14301if ac_fn_c_try_link "$LINENO"; then :
14302 ac_cv_lib_error_at_line=yes
8690e634 14303else
6ec2e0f5 14304 ac_cv_lib_error_at_line=no
8690e634 14305fi
6ec2e0f5
SDJ
14306rm -f core conftest.err conftest.$ac_objext \
14307 conftest$ac_exeext conftest.$ac_ext
8690e634 14308fi
6ec2e0f5
SDJ
14309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
14310$as_echo "$ac_cv_lib_error_at_line" >&6; }
14311
14312 if test $ac_cv_lib_error_at_line = no; then
14313
14314
14315
14316
14317
14318
14319
14320
14321 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
14322
8690e634
JK
14323
14324
8690e634
JK
14325 :
14326
6ec2e0f5 14327 fi
6a29c58e 14328
6a29c58e
YQ
14329
14330
14331
3d99e817 14332
6ec2e0f5
SDJ
14333
14334
14335 if test $ac_cv_have_decl_fchdir = no; then
14336 HAVE_DECL_FCHDIR=0
14337 fi
14338
14339
14340 if test $HAVE_FCHDIR = 0; then
14341
14342
3d99e817
AK
14343
14344
14345
14346
14347
14348
6ec2e0f5 14349 gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
3d99e817 14350
6ec2e0f5 14351 :
3d99e817 14352
6ec2e0f5 14353$as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
3d99e817 14354
6ec2e0f5
SDJ
14355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
14356$as_echo_n "checking whether open can visit directories... " >&6; }
14357if test "${gl_cv_func_open_directory_works+set}" = set; then :
14358 $as_echo_n "(cached) " >&6
14359else
14360 if test "$cross_compiling" = yes; then :
14361 case "$host_os" in
14362 # Guess yes on glibc systems.
14363 *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
14364 # If we don't know, assume the worst.
14365 *) gl_cv_func_open_directory_works="guessing no" ;;
14366 esac
3d99e817 14367
6ec2e0f5
SDJ
14368else
14369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14370/* end confdefs.h. */
14371#include <fcntl.h>
3d99e817 14372
6ec2e0f5
SDJ
14373int
14374main ()
14375{
14376return open(".", O_RDONLY) < 0;
14377 ;
14378 return 0;
14379}
3d99e817 14380_ACEOF
6ec2e0f5
SDJ
14381if ac_fn_c_try_run "$LINENO"; then :
14382 gl_cv_func_open_directory_works=yes
14383else
14384 gl_cv_func_open_directory_works=no
14385fi
14386rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14387 conftest.$ac_objext conftest.beam conftest.$ac_ext
14388fi
3d99e817
AK
14389
14390fi
6ec2e0f5
SDJ
14391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
14392$as_echo "$gl_cv_func_open_directory_works" >&6; }
14393 case "$gl_cv_func_open_directory_works" in
14394 *yes) ;;
14395 *)
3d99e817 14396
6ec2e0f5 14397$as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
3d99e817 14398
6ec2e0f5
SDJ
14399 ;;
14400 esac
14401 fi
3d99e817 14402
3d99e817
AK
14403
14404
14405
0750520d 14406
0750520d 14407
6ec2e0f5 14408 GNULIB_FCHDIR=1
0750520d 14409
0750520d
PA
14410
14411
0750520d 14412
0750520d 14413
6ec2e0f5 14414$as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
0750520d 14415
0750520d 14416
0750520d 14417
0750520d 14418
0750520d 14419
0750520d 14420
0750520d 14421
6ec2e0f5
SDJ
14422
14423 if test $ac_cv_func_fcntl = no; then
14424
14425
14426
14427 if test $ac_cv_func_fcntl = no; then
14428 HAVE_FCNTL=0
14429 else
14430 REPLACE_FCNTL=1
14431 fi
14432
14433 else
14434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
14435$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
14436if test "${gl_cv_func_fcntl_f_dupfd_works+set}" = set; then :
0750520d 14437 $as_echo_n "(cached) " >&6
6ec2e0f5
SDJ
14438else
14439 if test "$cross_compiling" = yes; then :
14440 case $host_os in
14441 aix* | cygwin* | haiku*)
14442 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
14443 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
14444 esac
0750520d
PA
14445else
14446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14447/* end confdefs.h. */
6ec2e0f5
SDJ
14448#include <errno.h>
14449 #include <fcntl.h>
14450 #include <limits.h>
14451 #include <sys/resource.h>
14452 #include <unistd.h>
14453 #ifndef RLIM_SAVED_CUR
14454 # define RLIM_SAVED_CUR RLIM_INFINITY
14455 #endif
14456 #ifndef RLIM_SAVED_MAX
14457 # define RLIM_SAVED_MAX RLIM_INFINITY
14458 #endif
0750520d 14459
6ec2e0f5
SDJ
14460int
14461main ()
14462{
14463int result = 0;
14464 int bad_fd = INT_MAX;
14465 struct rlimit rlim;
14466 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
14467 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
14468 && rlim.rlim_cur != RLIM_INFINITY
14469 && rlim.rlim_cur != RLIM_SAVED_MAX
14470 && rlim.rlim_cur != RLIM_SAVED_CUR)
14471 bad_fd = rlim.rlim_cur;
14472 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
14473 if (errno != EINVAL) result |= 2;
14474 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
14475 if (errno != EINVAL) result |= 8;
14476 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
14477 {
14478 int fd;
14479 fd = open (".", O_RDONLY);
14480 if (fd == -1)
14481 result |= 16;
14482 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
14483 result |= 32;
14484
14485 close (fd);
14486 }
14487 return result;
14488 ;
14489 return 0;
14490}
0750520d 14491_ACEOF
6ec2e0f5
SDJ
14492if ac_fn_c_try_run "$LINENO"; then :
14493 gl_cv_func_fcntl_f_dupfd_works=yes
0750520d 14494else
6ec2e0f5
SDJ
14495 gl_cv_func_fcntl_f_dupfd_works=no
14496fi
14497rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14498 conftest.$ac_objext conftest.beam conftest.$ac_ext
0750520d 14499fi
0750520d
PA
14500
14501fi
6ec2e0f5
SDJ
14502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
14503$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
14504 case $gl_cv_func_fcntl_f_dupfd_works in
14505 *yes) ;;
14506 *)
0750520d 14507
0750520d 14508
6ec2e0f5
SDJ
14509 if test $ac_cv_func_fcntl = no; then
14510 HAVE_FCNTL=0
14511 else
14512 REPLACE_FCNTL=1
14513 fi
0750520d 14514
0750520d 14515
6ec2e0f5
SDJ
14516$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
14517 ;;
14518 esac
0750520d 14519
6ec2e0f5
SDJ
14520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
14521$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
14522if test "${gl_cv_func_fcntl_f_dupfd_cloexec+set}" = set; then :
8690e634
JK
14523 $as_echo_n "(cached) " >&6
14524else
14525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14526/* end confdefs.h. */
14527
6ec2e0f5
SDJ
14528#include <fcntl.h>
14529#ifndef F_DUPFD_CLOEXEC
14530choke me
14531#endif
49e4877c 14532
6ec2e0f5
SDJ
14533int
14534main ()
14535{
8690e634 14536
6ec2e0f5
SDJ
14537 ;
14538 return 0;
14539}
14540_ACEOF
14541if ac_fn_c_try_compile "$LINENO"; then :
14542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14543/* end confdefs.h. */
8690e634 14544
6ec2e0f5
SDJ
14545#ifdef __linux__
14546/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
14547 it to support the semantics on older kernels that failed with EINVAL. */
14548choke me
14549#endif
8690e634
JK
14550
14551int
14552main ()
14553{
14554
8690e634
JK
14555 ;
14556 return 0;
14557}
14558_ACEOF
14559if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 14560 gl_cv_func_fcntl_f_dupfd_cloexec=yes
8690e634 14561else
6ec2e0f5 14562 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
8690e634
JK
14563fi
14564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
14565else
14566 gl_cv_func_fcntl_f_dupfd_cloexec=no
8690e634 14567fi
6ec2e0f5
SDJ
14568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14569fi
14570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
14571$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
14572 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
14573
14574
14575
14576 if test $ac_cv_func_fcntl = no; then
14577 HAVE_FCNTL=0
14578 else
14579 REPLACE_FCNTL=1
14580 fi
14581
14582 fi
14583 fi
14584
14585
14586
14587
14588 if test $ac_cv_func_fchdir = no; then
14589 HAVE_FCHDIR=0
14590 fi
14591
14592 if test $HAVE_FCHDIR = 0; then
14593
14594
14595
14596 if test $ac_cv_func_fcntl = no; then
14597 HAVE_FCNTL=0
14598 else
14599 REPLACE_FCNTL=1
14600 fi
14601
14602 fi
14603
14604
14605 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
14606
14607
14608
14609
14610
14611
14612
14613
14614 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
14615
14616 fi
8690e634 14617
8690e634
JK
14618
14619
8690e634
JK
14620
14621
6ec2e0f5 14622 GNULIB_FCNTL=1
8690e634 14623
8690e634
JK
14624
14625
8690e634 14626
8690e634 14627
6ec2e0f5
SDJ
14628$as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
14629
8690e634 14630
8690e634 14631
63ce7108
TT
14632
14633
14634
14635
8690e634
JK
14636
14637
14638
14639
14640
14641
14642
14643 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 14644 gl_cv_next_fcntl_h='<'fcntl.h'>'
8690e634 14645 else
6ec2e0f5
SDJ
14646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
14647$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
14648if test "${gl_cv_next_fcntl_h+set}" = set; then :
8690e634
JK
14649 $as_echo_n "(cached) " >&6
14650else
14651
4a626d0a
PA
14652
14653
14654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 14655/* end confdefs.h. */
6ec2e0f5 14656#include <fcntl.h>
8690e634 14657_ACEOF
4a626d0a
PA
14658 case "$host_os" in
14659 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14660 *) gl_absname_cpp="$ac_cpp" ;;
14661 esac
14662
14663 case "$host_os" in
14664 mingw*)
14665 gl_dirsep_regex='[/\\]'
14666 ;;
14667 *)
14668 gl_dirsep_regex='\/'
14669 ;;
14670 esac
14671 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 14672 gl_header_literal_regex=`echo 'fcntl.h' \
4a626d0a
PA
14673 | sed -e "$gl_make_literal_regex_sed"`
14674 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14675 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14676 s|^/[^/]|//&|
14677 p
14678 q
14679 }'
8690e634 14680
6ec2e0f5 14681 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a 14682 sed -n "$gl_absolute_header_sed"`
c971b7fa 14683
6ec2e0f5
SDJ
14684 gl_header=$gl_cv_absolute_fcntl_h
14685 gl_cv_next_fcntl_h='"'$gl_header'"'
8690e634
JK
14686
14687
14688fi
6ec2e0f5
SDJ
14689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
14690$as_echo "$gl_cv_next_fcntl_h" >&6; }
8690e634 14691 fi
6ec2e0f5 14692 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
8690e634
JK
14693
14694 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14695 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 14696 gl_next_as_first_directive='<'fcntl.h'>'
8690e634
JK
14697 else
14698 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 14699 gl_next_as_first_directive=$gl_cv_next_fcntl_h
8690e634 14700 fi
6ec2e0f5 14701 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
8690e634
JK
14702
14703
14704
14705
14706
14707
6ec2e0f5
SDJ
14708
14709
14710
14711
14712 for gl_func in fcntl openat; do
8690e634
JK
14713 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
14714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
14715$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
14716if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
14717 $as_echo_n "(cached) " >&6
14718else
14719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14720/* end confdefs.h. */
6ec2e0f5 14721#include <fcntl.h>
8690e634
JK
14722
14723int
14724main ()
14725{
14726#undef $gl_func
14727 (void) $gl_func;
14728 ;
14729 return 0;
14730}
14731_ACEOF
14732if ac_fn_c_try_compile "$LINENO"; then :
14733 eval "$as_gl_Symbol=yes"
14734else
14735 eval "$as_gl_Symbol=no"
14736fi
14737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14738fi
14739eval ac_res=\$$as_gl_Symbol
14740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14741$as_echo "$ac_res" >&6; }
14742 eval as_val=\$$as_gl_Symbol
14743 if test "x$as_val" = x""yes; then :
14744 cat >>confdefs.h <<_ACEOF
14745#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
14746_ACEOF
14747
14748 eval ac_cv_have_decl_$gl_func=yes
14749fi
14750 done
14751
14752
14753
8839a007 14754
63ce7108 14755
63ce7108 14756
63ce7108 14757
6ec2e0f5
SDJ
14758 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
14759#include <dirent.h>
14760
14761"
14762if test "x$ac_cv_have_decl_fdopendir" = x""yes; then :
14763 ac_have_decl=1
14764else
14765 ac_have_decl=0
14766fi
14767
14768cat >>confdefs.h <<_ACEOF
14769#define HAVE_DECL_FDOPENDIR $ac_have_decl
63ce7108 14770_ACEOF
6ec2e0f5
SDJ
14771if test $ac_have_decl = 1; then :
14772
63ce7108 14773else
6ec2e0f5 14774 HAVE_DECL_FDOPENDIR=0
63ce7108 14775fi
63ce7108
TT
14776
14777
6ec2e0f5
SDJ
14778 if test $ac_cv_func_fdopendir = no; then
14779 HAVE_FDOPENDIR=0
14780 else
14781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
14782$as_echo_n "checking whether fdopendir works... " >&6; }
14783if test "${gl_cv_func_fdopendir_works+set}" = set; then :
14784 $as_echo_n "(cached) " >&6
14785else
14786 if test "$cross_compiling" = yes; then :
14787 case "$host_os" in
14788 # Guess yes on glibc systems.
14789 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
14790 # If we don't know, assume the worst.
14791 *) gl_cv_func_fdopendir_works="guessing no" ;;
14792 esac
14793
63ce7108
TT
14794else
14795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14796/* end confdefs.h. */
14797
6ec2e0f5
SDJ
14798#include <dirent.h>
14799#include <fcntl.h>
14800#include <unistd.h>
14801#if !HAVE_DECL_FDOPENDIR
14802extern
14803# ifdef __cplusplus
14804"C"
14805# endif
14806DIR *fdopendir (int);
14807#endif
63ce7108
TT
14808
14809int
14810main ()
14811{
6ec2e0f5
SDJ
14812int result = 0;
14813 int fd = open ("conftest.c", O_RDONLY);
14814 if (fd < 0) result |= 1;
14815 if (fdopendir (fd)) result |= 2;
14816 if (close (fd)) result |= 4;
14817 return result;
63ce7108
TT
14818 ;
14819 return 0;
14820}
14821_ACEOF
14822if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 14823 gl_cv_func_fdopendir_works=yes
63ce7108 14824else
6ec2e0f5 14825 gl_cv_func_fdopendir_works=no
63ce7108
TT
14826fi
14827rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14828 conftest.$ac_objext conftest.beam conftest.$ac_ext
14829fi
14830
63ce7108 14831fi
6ec2e0f5
SDJ
14832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
14833$as_echo "$gl_cv_func_fdopendir_works" >&6; }
14834 case "$gl_cv_func_fdopendir_works" in
63ce7108
TT
14835 *yes) ;;
14836 *)
6ec2e0f5 14837 REPLACE_FDOPENDIR=1
63ce7108
TT
14838 ;;
14839 esac
14840 fi
14841
6ec2e0f5 14842 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
09607c9e
TT
14843
14844
14845
4a626d0a
PA
14846
14847
14848
14849
14850
6ec2e0f5 14851 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
4a626d0a 14852
6ec2e0f5 14853 fi
4a626d0a
PA
14854
14855
14856
4a626d0a 14857
4a626d0a 14858
6ec2e0f5 14859 GNULIB_FDOPENDIR=1
4a626d0a
PA
14860
14861
14862
14863
14864
6ec2e0f5 14865$as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
4a626d0a
PA
14866
14867
14868
14869
14870
6ec2e0f5
SDJ
14871cat >>confdefs.h <<_ACEOF
14872#define GNULIB_FDOPENDIR 1
14873_ACEOF
4a626d0a 14874
09607c9e 14875
09607c9e
TT
14876
14877
14878
6ec2e0f5
SDJ
14879
14880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
14881$as_echo_n "checking for flexible array member... " >&6; }
14882if test "${ac_cv_c_flexmember+set}" = set; then :
09607c9e
TT
14883 $as_echo_n "(cached) " >&6
14884else
14885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14886/* end confdefs.h. */
6ec2e0f5
SDJ
14887#include <stdlib.h>
14888 #include <stdio.h>
14889 #include <stddef.h>
14890 struct s { int n; double d[]; };
09607c9e
TT
14891int
14892main ()
14893{
6ec2e0f5
SDJ
14894int m = getchar ();
14895 size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
14896 nbytes += sizeof (struct s) - 1;
14897 nbytes -= nbytes % sizeof (struct s);
14898 struct s *p = malloc (nbytes);
14899 p->d[0] = 0.0;
14900 return p->d != (double *) NULL;
09607c9e
TT
14901 ;
14902 return 0;
14903}
14904_ACEOF
14905if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 14906 ac_cv_c_flexmember=yes
09607c9e 14907else
6ec2e0f5 14908 ac_cv_c_flexmember=no
09607c9e
TT
14909fi
14910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14911fi
6ec2e0f5
SDJ
14912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
14913$as_echo "$ac_cv_c_flexmember" >&6; }
14914 if test $ac_cv_c_flexmember = yes; then
14915
14916$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
09607c9e 14917
09607c9e 14918 else
6ec2e0f5 14919 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
09607c9e 14920
6ec2e0f5
SDJ
14921 fi
14922
14923
14924
14925
14926 FLOAT_H=
14927 REPLACE_FLOAT_LDBL=0
14928 case "$host_os" in
14929 aix* | beos* | openbsd* | mirbsd* | irix*)
14930 FLOAT_H=float.h
14931 ;;
14932 freebsd*)
14933 case "$host_cpu" in
14934 i[34567]86 )
14935 FLOAT_H=float.h
14936 ;;
14937 x86_64 )
14938 # On x86_64 systems, the C compiler may still be generating
14939 # 32-bit code.
14940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14941/* end confdefs.h. */
14942#if defined __LP64__ || defined __x86_64__ || defined __amd64__
14943 yes
14944 #endif
09607c9e 14945_ACEOF
6ec2e0f5
SDJ
14946if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14947 $EGREP "yes" >/dev/null 2>&1; then :
14948
09607c9e 14949else
6ec2e0f5 14950 FLOAT_H=float.h
09607c9e 14951fi
6ec2e0f5
SDJ
14952rm -f conftest*
14953
14954 ;;
14955 esac
14956 ;;
14957 linux*)
14958 case "$host_cpu" in
14959 powerpc*)
14960 FLOAT_H=float.h
14961 ;;
14962 esac
14963 ;;
14964 esac
14965 case "$host_os" in
14966 aix* | freebsd* | linux*)
14967 if test -n "$FLOAT_H"; then
14968 REPLACE_FLOAT_LDBL=1
14969 fi
14970 ;;
14971 esac
14972
14973 REPLACE_ITOLD=0
14974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
14975$as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
14976if test "${gl_cv_func_itold_works+set}" = set; then :
09607c9e
TT
14977 $as_echo_n "(cached) " >&6
14978else
09607c9e 14979
6ec2e0f5
SDJ
14980 if test "$cross_compiling" = yes; then :
14981 case "$host" in
14982 sparc*-*-linux*)
14983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14984/* end confdefs.h. */
14985#if defined __LP64__ || defined __arch64__
14986 yes
14987 #endif
09607c9e 14988_ACEOF
6ec2e0f5
SDJ
14989if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14990 $EGREP "yes" >/dev/null 2>&1; then :
14991 gl_cv_func_itold_works="guessing no"
09607c9e 14992else
6ec2e0f5 14993 gl_cv_func_itold_works="guessing yes"
09607c9e 14994fi
6ec2e0f5
SDJ
14995rm -f conftest*
14996
14997 ;;
14998 *) gl_cv_func_itold_works="guessing yes" ;;
14999 esac
15000
4a626d0a
PA
15001else
15002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15003/* end confdefs.h. */
4a626d0a 15004
6ec2e0f5
SDJ
15005int i = -1;
15006volatile long double ld;
15007int main ()
4a626d0a 15008{
6ec2e0f5
SDJ
15009 ld += i * 1.0L;
15010 if (ld > 0)
15011 return 1;
4a626d0a
PA
15012 return 0;
15013}
15014_ACEOF
6ec2e0f5
SDJ
15015if ac_fn_c_try_run "$LINENO"; then :
15016 gl_cv_func_itold_works=yes
4a626d0a 15017else
6ec2e0f5
SDJ
15018 gl_cv_func_itold_works=no
15019fi
15020rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15021 conftest.$ac_objext conftest.beam conftest.$ac_ext
15022fi
09607c9e
TT
15023
15024
6ec2e0f5
SDJ
15025fi
15026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
15027$as_echo "$gl_cv_func_itold_works" >&6; }
15028 case "$gl_cv_func_itold_works" in
15029 *no)
15030 REPLACE_ITOLD=1
15031 FLOAT_H=float.h
15032 ;;
15033 esac
09607c9e 15034
6ec2e0f5 15035 if test -n "$FLOAT_H"; then
09607c9e
TT
15036
15037
15038
15039
15040
15041
15042
4a626d0a 15043
09607c9e 15044 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 15045 gl_cv_next_float_h='<'float.h'>'
09607c9e 15046 else
6ec2e0f5
SDJ
15047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
15048$as_echo_n "checking absolute name of <float.h>... " >&6; }
15049if test "${gl_cv_next_float_h+set}" = set; then :
09607c9e
TT
15050 $as_echo_n "(cached) " >&6
15051else
15052
4a626d0a
PA
15053
15054
15055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
09607c9e 15056/* end confdefs.h. */
6ec2e0f5 15057#include <float.h>
09607c9e 15058_ACEOF
4a626d0a
PA
15059 case "$host_os" in
15060 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15061 *) gl_absname_cpp="$ac_cpp" ;;
15062 esac
15063
15064 case "$host_os" in
15065 mingw*)
15066 gl_dirsep_regex='[/\\]'
15067 ;;
15068 *)
15069 gl_dirsep_regex='\/'
15070 ;;
15071 esac
15072 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 15073 gl_header_literal_regex=`echo 'float.h' \
4a626d0a
PA
15074 | sed -e "$gl_make_literal_regex_sed"`
15075 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15076 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15077 s|^/[^/]|//&|
15078 p
15079 q
15080 }'
09607c9e 15081
6ec2e0f5 15082 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a 15083 sed -n "$gl_absolute_header_sed"`
09607c9e 15084
6ec2e0f5
SDJ
15085 gl_header=$gl_cv_absolute_float_h
15086 gl_cv_next_float_h='"'$gl_header'"'
09607c9e
TT
15087
15088
15089fi
6ec2e0f5
SDJ
15090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
15091$as_echo "$gl_cv_next_float_h" >&6; }
09607c9e 15092 fi
6ec2e0f5 15093 NEXT_FLOAT_H=$gl_cv_next_float_h
09607c9e
TT
15094
15095 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15096 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 15097 gl_next_as_first_directive='<'float.h'>'
09607c9e
TT
15098 else
15099 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 15100 gl_next_as_first_directive=$gl_cv_next_float_h
09607c9e 15101 fi
6ec2e0f5 15102 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
09607c9e
TT
15103
15104
15105
15106
6ec2e0f5 15107 fi
09607c9e 15108
6ec2e0f5
SDJ
15109 if test -n "$FLOAT_H"; then
15110 GL_GENERATE_FLOAT_H_TRUE=
15111 GL_GENERATE_FLOAT_H_FALSE='#'
3d99e817 15112else
6ec2e0f5
SDJ
15113 GL_GENERATE_FLOAT_H_TRUE='#'
15114 GL_GENERATE_FLOAT_H_FALSE=
3d99e817
AK
15115fi
15116
3d99e817 15117
09607c9e 15118
6ec2e0f5 15119 if test $REPLACE_FLOAT_LDBL = 1; then
8690e634 15120
8690e634 15121
8690e634 15122
8690e634 15123
8690e634 15124
6ec2e0f5
SDJ
15125
15126
15127
15128 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
15129
8690e634 15130 fi
6ec2e0f5 15131 if test $REPLACE_ITOLD = 1; then
8690e634
JK
15132
15133
15134
15135
15136
6ec2e0f5
SDJ
15137
15138
15139
15140 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
15141
8690e634
JK
15142 fi
15143
15144
15145
6ec2e0f5
SDJ
15146
15147
15148 FNMATCH_H=
15149 gl_fnmatch_required_lowercase=`
15150 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
15151 `
15152 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
15153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
15154$as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
15155if { as_var=$gl_fnmatch_cache_var; eval "test \"\${$as_var+set}\" = set"; }; then :
8690e634 15156 $as_echo_n "(cached) " >&6
6ec2e0f5
SDJ
15157else
15158 if test $gl_fnmatch_required = GNU; then
15159 gl_fnmatch_gnu_start=
15160 gl_fnmatch_gnu_end=
15161 else
15162 gl_fnmatch_gnu_start='#if 0'
15163 gl_fnmatch_gnu_end='#endif'
15164 fi
15165 if test "$cross_compiling" = yes; then :
15166 eval "$gl_fnmatch_cache_var=\"guessing no\""
8690e634
JK
15167else
15168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15169/* end confdefs.h. */
6ec2e0f5
SDJ
15170#include <fnmatch.h>
15171 static int
15172 y (char const *pattern, char const *string, int flags)
15173 {
15174 return fnmatch (pattern, string, flags) == 0;
15175 }
15176 static int
15177 n (char const *pattern, char const *string, int flags)
15178 {
15179 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
15180 }
8690e634 15181
8690e634
JK
15182int
15183main ()
15184{
6ec2e0f5
SDJ
15185char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
15186 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
15187 static char const A_1[] = { 'A' - 1, 0 };
15188 static char const A01[] = { 'A' + 1, 0 };
15189 static char const a_1[] = { 'a' - 1, 0 };
15190 static char const a01[] = { 'a' + 1, 0 };
15191 static char const bs_1[] = { '\\\\' - 1, 0 };
15192 static char const bs01[] = { '\\\\' + 1, 0 };
15193 int result = 0;
15194 if (!n ("a*", "", 0))
15195 return 1;
15196 if (!y ("a*", "abc", 0))
15197 return 1;
15198 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
15199 return 1;
15200 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
15201 return 2;
15202 if (!y ("a\\\\bc", "abc", 0))
15203 return 3;
15204 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
15205 return 3;
15206 if (!y ("*x", ".x", 0))
15207 return 4;
15208 if (!n ("*x", ".x", FNM_PERIOD))
15209 return 4;
15210 if (!y (Apat, "\\\\", 0))
15211 return 5;
15212 if (!y (Apat, "A", 0))
15213 return 5;
15214 if (!y (apat, "\\\\", 0))
15215 return 5;
15216 if (!y (apat, "a", 0))
15217 return 5;
15218 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
15219 return 5;
15220 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
15221 return 5;
15222 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
15223 return 5;
15224 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
15225 return 5;
15226 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
15227 return 5;
15228 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
15229 return 5;
15230 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
15231 return 5;
15232 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
15233 return 5;
15234 $gl_fnmatch_gnu_start
15235 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
15236 result |= 8;
15237 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
15238 result |= 16;
15239 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
15240 result |= 32;
15241 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
15242 result |= 64;
15243 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
15244 result |= 64;
15245 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
15246 result |= 64;
15247 $gl_fnmatch_gnu_end
15248 return result;
8690e634
JK
15249
15250 ;
15251 return 0;
15252}
15253_ACEOF
6ec2e0f5
SDJ
15254if ac_fn_c_try_run "$LINENO"; then :
15255 eval "$gl_fnmatch_cache_var=yes"
8690e634 15256else
6ec2e0f5 15257 eval "$gl_fnmatch_cache_var=no"
8690e634 15258fi
6ec2e0f5
SDJ
15259rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15260 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 15261fi
8690e634 15262
8690e634 15263
6ec2e0f5
SDJ
15264fi
15265eval ac_res=\$$gl_fnmatch_cache_var
15266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15267$as_echo "$ac_res" >&6; }
15268 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
15269 if test "$gl_fnmatch_result" = yes; then
15270 rm -f "$gl_source_base/fnmatch.h"
15271 else
15272 FNMATCH_H=fnmatch.h
8690e634
JK
15273 fi
15274
6ec2e0f5
SDJ
15275 if test -n "$FNMATCH_H"; then
15276 GL_GENERATE_FNMATCH_H_TRUE=
15277 GL_GENERATE_FNMATCH_H_FALSE='#'
15278else
15279 GL_GENERATE_FNMATCH_H_TRUE='#'
15280 GL_GENERATE_FNMATCH_H_FALSE=
15281fi
8690e634 15282
8690e634 15283
6ec2e0f5 15284 if test -n "$FNMATCH_H"; then
8690e634
JK
15285
15286
15287
6ec2e0f5
SDJ
15288
15289
15290
15291
15292
15293 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
15294
15295
15296
15297cat >>confdefs.h <<_ACEOF
15298#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
15299_ACEOF
15300
15301
15302 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
15303"
15304if test "x$ac_cv_have_decl_isblank" = x""yes; then :
15305 ac_have_decl=1
8690e634 15306else
6ec2e0f5 15307 ac_have_decl=0
8690e634
JK
15308fi
15309
6ec2e0f5
SDJ
15310cat >>confdefs.h <<_ACEOF
15311#define HAVE_DECL_ISBLANK $ac_have_decl
15312_ACEOF
8690e634
JK
15313
15314
15315
15316
6ec2e0f5 15317 fi
8690e634
JK
15318
15319
15320
15321
15322
6ec2e0f5 15323 if test -n "$FNMATCH_H"; then
8690e634
JK
15324
15325
8690e634 15326
8690e634 15327
8690e634 15328
8690e634 15329
8690e634
JK
15330
15331
6ec2e0f5 15332 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
8690e634 15333
8690e634 15334
8690e634 15335
6ec2e0f5
SDJ
15336cat >>confdefs.h <<_ACEOF
15337#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
15338_ACEOF
15339
15340
15341 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
15342"
15343if test "x$ac_cv_have_decl_isblank" = x""yes; then :
15344 ac_have_decl=1
8690e634 15345else
6ec2e0f5 15346 ac_have_decl=0
8690e634
JK
15347fi
15348
6ec2e0f5
SDJ
15349cat >>confdefs.h <<_ACEOF
15350#define HAVE_DECL_ISBLANK $ac_have_decl
15351_ACEOF
8690e634
JK
15352
15353
98399780
YQ
15354
15355
98399780
YQ
15356 fi
15357
98399780
YQ
15358
15359
6ec2e0f5
SDJ
15360 FREXP_LIBM=
15361 if test $gl_cv_func_frexp_no_libm = no; then
15362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5
15363$as_echo_n "checking whether frexp() can be used with libm... " >&6; }
15364if test "${gl_cv_func_frexp_in_libm+set}" = set; then :
15365 $as_echo_n "(cached) " >&6
15366else
98399780 15367
6ec2e0f5
SDJ
15368 save_LIBS="$LIBS"
15369 LIBS="$LIBS -lm"
15370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15371/* end confdefs.h. */
15372#include <math.h>
15373 double x;
15374int
15375main ()
15376{
15377int e; return frexp (x, &e) > 0;
15378 ;
15379 return 0;
15380}
15381_ACEOF
15382if ac_fn_c_try_link "$LINENO"; then :
15383 gl_cv_func_frexp_in_libm=yes
15384else
15385 gl_cv_func_frexp_in_libm=no
15386fi
15387rm -f core conftest.err conftest.$ac_objext \
15388 conftest$ac_exeext conftest.$ac_ext
15389 LIBS="$save_LIBS"
98399780 15390
6ec2e0f5
SDJ
15391fi
15392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5
15393$as_echo "$gl_cv_func_frexp_in_libm" >&6; }
15394 if test $gl_cv_func_frexp_in_libm = yes; then
15395 FREXP_LIBM=-lm
15396 fi
15397 fi
15398 if test $gl_cv_func_frexp_no_libm = yes \
15399 || test $gl_cv_func_frexp_in_libm = yes; then
15400 save_LIBS="$LIBS"
15401 LIBS="$LIBS $FREXP_LIBM"
98399780
YQ
15402
15403
15404
6ec2e0f5
SDJ
15405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
15406$as_echo_n "checking whether frexp works... " >&6; }
15407if test "${gl_cv_func_frexp_works+set}" = set; then :
15408 $as_echo_n "(cached) " >&6
15409else
98399780 15410
6ec2e0f5
SDJ
15411 if test "$cross_compiling" = yes; then :
15412 case "$host_os" in
15413 netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
15414 *) gl_cv_func_frexp_works="guessing yes";;
15415 esac
98399780 15416
6ec2e0f5
SDJ
15417else
15418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15419/* end confdefs.h. */
98399780 15420
6ec2e0f5
SDJ
15421#include <float.h>
15422#include <math.h>
15423#include <string.h>
15424#if HAVE_DECL_ALARM
15425# include <signal.h>
15426# include <unistd.h>
15427#endif
15428/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
15429 ICC 10.0 has a bug when optimizing the expression -zero.
15430 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
15431 to PowerPC on Mac OS X 10.5. */
15432#if defined __hpux || defined __sgi || defined __ICC
15433static double
15434compute_minus_zero (void)
15435{
15436 return -DBL_MIN * DBL_MIN;
15437}
15438# define minus_zero compute_minus_zero ()
15439#else
15440double minus_zero = -0.0;
15441#endif
15442int main()
15443{
15444 int result = 0;
15445 int i;
15446 volatile double x;
15447 double zero = 0.0;
15448#if HAVE_DECL_ALARM
15449 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
15450 number. Let the test fail in this case. */
15451 signal (SIGALRM, SIG_DFL);
15452 alarm (5);
15453#endif
15454 /* Test on denormalized numbers. */
15455 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
15456 ;
15457 if (x > 0.0)
15458 {
15459 int exp;
15460 double y = frexp (x, &exp);
15461 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
15462 On NetBSD: y = 0.75. Correct: y = 0.5. */
15463 if (y != 0.5)
15464 result |= 1;
15465 }
15466 /* Test on infinite numbers. */
15467 x = 1.0 / zero;
15468 {
15469 int exp;
15470 double y = frexp (x, &exp);
15471 if (y != x)
15472 result |= 2;
15473 }
15474 /* Test on negative zero. */
15475 x = minus_zero;
15476 {
15477 int exp;
15478 double y = frexp (x, &exp);
15479 if (memcmp (&y, &x, sizeof x))
15480 result |= 4;
15481 }
15482 return result;
15483}
98399780 15484_ACEOF
6ec2e0f5
SDJ
15485if ac_fn_c_try_run "$LINENO"; then :
15486 gl_cv_func_frexp_works=yes
15487else
15488 gl_cv_func_frexp_works=no
15489fi
15490rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15491 conftest.$ac_objext conftest.beam conftest.$ac_ext
15492fi
98399780
YQ
15493
15494
6ec2e0f5
SDJ
15495fi
15496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
15497$as_echo "$gl_cv_func_frexp_works" >&6; }
98399780 15498
6ec2e0f5
SDJ
15499 LIBS="$save_LIBS"
15500 case "$gl_cv_func_frexp_works" in
15501 *yes) gl_func_frexp=yes ;;
15502 *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;;
15503 esac
15504 else
15505 gl_func_frexp=no
15506 fi
15507 if test $gl_func_frexp = yes; then
98399780 15508
6ec2e0f5 15509$as_echo "#define HAVE_FREXP 1" >>confdefs.h
98399780 15510
6ec2e0f5 15511 fi
98399780
YQ
15512
15513
6ec2e0f5 15514 if test $gl_func_frexp != yes; then
6a29c58e
YQ
15515
15516
15517
15518
6a29c58e
YQ
15519
15520
15521
15522
6ec2e0f5 15523 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
8690e634
JK
15524
15525 fi
8690e634 15526
8690e634 15527
8690e634 15528
8690e634 15529
8690e634 15530
6ec2e0f5 15531 GNULIB_FREXP=1
8690e634 15532
8690e634 15533
4a626d0a 15534
8690e634 15535
8690e634 15536
6ec2e0f5 15537$as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
8690e634
JK
15538
15539
15540
15541
15542
63ce7108 15543
e26b6bb0
TT
15544
15545
15546
6ec2e0f5
SDJ
15547 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
15548"
15549if test "x$ac_cv_have_decl_frexpl" = x""yes; then :
e26b6bb0 15550
6ec2e0f5
SDJ
15551else
15552 HAVE_DECL_FREXPL=0
15553fi
e26b6bb0
TT
15554
15555
6ec2e0f5
SDJ
15556 FREXPL_LIBM=
15557 if test $HAVE_DECL_FREXPL = 1; then
e26b6bb0 15558
6ec2e0f5
SDJ
15559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
15560$as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
15561if test "${gl_cv_func_frexpl_no_libm+set}" = set; then :
e26b6bb0
TT
15562 $as_echo_n "(cached) " >&6
15563else
15564
6ec2e0f5 15565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e26b6bb0 15566/* end confdefs.h. */
6ec2e0f5
SDJ
15567#include <math.h>
15568 long double x;
15569int
15570main ()
15571{
15572int e; return frexpl (x, &e) > 0;
15573 ;
15574 return 0;
15575}
e26b6bb0 15576_ACEOF
6ec2e0f5
SDJ
15577if ac_fn_c_try_link "$LINENO"; then :
15578 gl_cv_func_frexpl_no_libm=yes
15579else
15580 gl_cv_func_frexpl_no_libm=no
e26b6bb0 15581fi
6ec2e0f5
SDJ
15582rm -f core conftest.err conftest.$ac_objext \
15583 conftest$ac_exeext conftest.$ac_ext
e26b6bb0 15584
6ec2e0f5
SDJ
15585fi
15586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
15587$as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
e26b6bb0 15588
6ec2e0f5
SDJ
15589 if test $gl_cv_func_frexpl_no_libm = no; then
15590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5
15591$as_echo_n "checking whether frexpl() can be used with libm... " >&6; }
15592if test "${gl_cv_func_frexpl_in_libm+set}" = set; then :
e26b6bb0
TT
15593 $as_echo_n "(cached) " >&6
15594else
e26b6bb0 15595
6ec2e0f5
SDJ
15596 save_LIBS="$LIBS"
15597 LIBS="$LIBS -lm"
15598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15599/* end confdefs.h. */
15600#include <math.h>
15601 long double x;
e26b6bb0
TT
15602int
15603main ()
15604{
6ec2e0f5 15605int e; return frexpl (x, &e) > 0;
e26b6bb0
TT
15606 ;
15607 return 0;
15608}
15609_ACEOF
6ec2e0f5
SDJ
15610if ac_fn_c_try_link "$LINENO"; then :
15611 gl_cv_func_frexpl_in_libm=yes
e26b6bb0 15612else
6ec2e0f5 15613 gl_cv_func_frexpl_in_libm=no
e26b6bb0 15614fi
6ec2e0f5
SDJ
15615rm -f core conftest.err conftest.$ac_objext \
15616 conftest$ac_exeext conftest.$ac_ext
15617 LIBS="$save_LIBS"
e26b6bb0 15618
e26b6bb0 15619fi
6ec2e0f5
SDJ
15620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5
15621$as_echo "$gl_cv_func_frexpl_in_libm" >&6; }
15622 if test $gl_cv_func_frexpl_in_libm = yes; then
15623 FREXPL_LIBM=-lm
15624 fi
15625 fi
15626 if test $gl_cv_func_frexpl_no_libm = yes \
15627 || test $gl_cv_func_frexpl_in_libm = yes; then
15628 save_LIBS="$LIBS"
15629 LIBS="$LIBS $FREXPL_LIBM"
18848e28 15630
18848e28 15631
6ec2e0f5
SDJ
15632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
15633$as_echo_n "checking whether frexpl works... " >&6; }
15634if test "${gl_cv_func_frexpl_works+set}" = set; then :
15635 $as_echo_n "(cached) " >&6
18848e28 15636else
18848e28 15637
6ec2e0f5 15638 if test "$cross_compiling" = yes; then :
18848e28 15639
6ec2e0f5
SDJ
15640 case "$host_os" in
15641 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
15642 gl_cv_func_frexpl_works="guessing no";;
15643 *) gl_cv_func_frexpl_works="guessing yes";;
15644 esac
18848e28 15645
18848e28
GF
15646else
15647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15648/* end confdefs.h. */
15649
6ec2e0f5
SDJ
15650#include <float.h>
15651#include <math.h>
15652/* Override the values of <float.h>, like done in float.in.h. */
15653#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
15654# undef LDBL_MIN_EXP
15655# define LDBL_MIN_EXP (-16381)
15656#endif
15657#if defined __i386__ && defined __FreeBSD__
15658# undef LDBL_MIN_EXP
15659# define LDBL_MIN_EXP (-16381)
15660#endif
15661#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
15662# undef LDBL_MIN_EXP
15663# define LDBL_MIN_EXP DBL_MIN_EXP
18848e28 15664#endif
6ec2e0f5
SDJ
15665#if defined __sgi && (LDBL_MANT_DIG >= 106)
15666# if defined __GNUC__
15667# undef LDBL_MIN_EXP
15668# define LDBL_MIN_EXP DBL_MIN_EXP
15669# endif
15670#endif
15671extern
15672#ifdef __cplusplus
15673"C"
15674#endif
15675long double frexpl (long double, int *);
15676int main()
15677{
15678 int result = 0;
15679 volatile long double x;
15680 /* Test on finite numbers that fails on AIX 5.1. */
15681 x = 16.0L;
15682 {
15683 int exp = -9999;
15684 frexpl (x, &exp);
15685 if (exp != 5)
15686 result |= 1;
15687 }
15688 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
15689 function returns an invalid (incorrectly normalized) value: it returns
15690 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
15691 but the correct result is
15692 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
15693 x = 1.01L;
15694 {
15695 int exp = -9999;
15696 long double y = frexpl (x, &exp);
15697 if (!(exp == 1 && y == 0.505L))
15698 result |= 2;
15699 }
15700 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
15701 LDBL_MAX_EXP = 16384.
15702 In the loop end test, we test x against Infinity, rather than comparing
15703 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
15704 {
15705 int i;
15706 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
15707 {
15708 int exp = -9999;
15709 frexpl (x, &exp);
15710 if (exp != i)
15711 {
15712 result |= 4;
15713 break;
15714 }
15715 }
15716 }
15717 /* Test on denormalized numbers. */
15718 {
15719 int i;
15720 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
15721 ;
15722 if (x > 0.0L)
15723 {
15724 int exp;
15725 long double y = frexpl (x, &exp);
15726 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
15727 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
15728 if (exp != LDBL_MIN_EXP - 1)
15729 result |= 8;
15730 }
15731 }
15732 /* Test on infinite numbers. */
15733 x = 1.0L / 0.0L;
15734 {
15735 int exp;
15736 long double y = frexpl (x, &exp);
15737 if (y != x)
15738 result |= 16;
15739 }
15740 return result;
15741}
18848e28 15742_ACEOF
6ec2e0f5
SDJ
15743if ac_fn_c_try_run "$LINENO"; then :
15744 gl_cv_func_frexpl_works=yes
18848e28 15745else
6ec2e0f5 15746 gl_cv_func_frexpl_works=no
18848e28 15747fi
6ec2e0f5
SDJ
15748rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15749 conftest.$ac_objext conftest.beam conftest.$ac_ext
18848e28 15750fi
18848e28
GF
15751
15752
6ec2e0f5
SDJ
15753fi
15754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
15755$as_echo "$gl_cv_func_frexpl_works" >&6; }
18848e28 15756
6ec2e0f5
SDJ
15757 LIBS="$save_LIBS"
15758 case "$gl_cv_func_frexpl_works" in
15759 *yes) gl_func_frexpl=yes ;;
15760 *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;;
15761 esac
15762 else
15763 gl_func_frexpl=no
15764 fi
15765 if test $gl_func_frexpl = yes; then
18848e28 15766
6ec2e0f5 15767$as_echo "#define HAVE_FREXPL 1" >>confdefs.h
18848e28 15768
6ec2e0f5
SDJ
15769 fi
15770 fi
15771 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
15772 if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
18848e28 15773
6ec2e0f5
SDJ
15774 FREXPL_LIBM="$FREXP_LIBM"
15775 else
15776 FREXPL_LIBM=
15777 fi
15778 fi
18848e28 15779
18848e28 15780
6ec2e0f5 15781 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
18848e28 15782
18848e28 15783
18848e28 15784
18848e28
GF
15785
15786
18848e28 15787
18848e28 15788
18848e28 15789
6ec2e0f5 15790 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
18848e28
GF
15791
15792 fi
15793
15794
15795
15796
15797
6ec2e0f5 15798 GNULIB_FREXPL=1
18848e28
GF
15799
15800
15801
15802
15803
6ec2e0f5 15804$as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
18848e28
GF
15805
15806
15807
15808
15809
15810
15811
6ec2e0f5
SDJ
15812 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
15813 REPLACE_FSTAT=1
15814 fi
15815
15816
15817 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
15818 REPLACE_FSTAT=1
15819 fi
18848e28 15820
6a29c58e 15821
6a29c58e 15822
6a29c58e 15823
6ec2e0f5
SDJ
15824
15825 if test $ac_cv_func_fchdir = no; then
15826 HAVE_FCHDIR=0
6a29c58e
YQ
15827 fi
15828
6ec2e0f5
SDJ
15829 if test $HAVE_FCHDIR = 0; then
15830 case "$gl_cv_func_open_directory_works" in
15831 *yes) ;;
15832 *)
15833 REPLACE_FSTAT=1
15834 ;;
15835 esac
15836 fi
6a29c58e
YQ
15837
15838
6ec2e0f5 15839 if test $REPLACE_FSTAT = 1; then
6a29c58e 15840
3d99e817
AK
15841
15842
15843
3d99e817
AK
15844
15845
15846
15847
6ec2e0f5 15848 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
3d99e817 15849
6ec2e0f5
SDJ
15850 :
15851 fi
3d99e817
AK
15852
15853
15854
15855
15856
6ec2e0f5 15857 GNULIB_FSTAT=1
3d99e817 15858
49e4877c 15859
49e4877c 15860
49e4877c 15861
49e4877c 15862
6ec2e0f5 15863$as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
49e4877c 15864
6a29c58e
YQ
15865
15866
88b48903 15867
8690e634 15868
a512b375 15869
88b48903 15870
88b48903 15871
6ec2e0f5
SDJ
15872
15873 if test $ac_cv_func_fstatat = no; then
15874 HAVE_FSTATAT=0
15875 else
15876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
15877$as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
15878if test "${gl_cv_func_fstatat_zero_flag+set}" = set; then :
15879 $as_echo_n "(cached) " >&6
15880else
15881 if test "$cross_compiling" = yes; then :
15882 case "$host_os" in
15883 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
15884 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
15885 esac
88b48903 15886
8690e634
JK
15887else
15888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15889/* end confdefs.h. */
8690e634 15890
6ec2e0f5
SDJ
15891 #include <fcntl.h>
15892 #include <sys/stat.h>
15893 int
15894 main (void)
15895 {
15896 struct stat a;
15897 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
15898 }
15899
88b48903
WN
15900_ACEOF
15901if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 15902 gl_cv_func_fstatat_zero_flag=yes
88b48903 15903else
6ec2e0f5 15904 gl_cv_func_fstatat_zero_flag=no
88b48903
WN
15905fi
15906rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15907 conftest.$ac_objext conftest.beam conftest.$ac_ext
15908fi
15909
15910
15911fi
6ec2e0f5
SDJ
15912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
15913$as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
88b48903 15914
6ec2e0f5
SDJ
15915 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
15916 *yes+*yes) ;;
15917 *) REPLACE_FSTATAT=1
15918 case $gl_cv_func_fstatat_zero_flag in
15919 *yes)
88b48903 15920
6ec2e0f5 15921$as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
88b48903 15922
6ec2e0f5
SDJ
15923 ;;
15924 esac
15925 ;;
15926 esac
15927 fi
88b48903 15928
6ec2e0f5 15929 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
88b48903
WN
15930
15931
15932
15933
15934
88b48903 15935
4a626d0a
PA
15936
15937
6ec2e0f5
SDJ
15938 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
15939
15940 fi
15941
15942
15943
4a626d0a 15944
6ec2e0f5
SDJ
15945
15946 GNULIB_FSTATAT=1
15947
15948
15949
15950
15951
15952$as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
15953
15954
15955
15956
15957
15958
15959
15960
15961 gl_abort_bug=no
4a626d0a
PA
15962 case "$host_os" in
15963 mingw*)
6ec2e0f5 15964 gl_cv_func_getcwd_path_max=yes
4a626d0a
PA
15965 ;;
15966 *)
88b48903 15967
88b48903 15968
88b48903
WN
15969
15970
88b48903 15971
6ec2e0f5
SDJ
15972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
15973$as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
15974if test "${gl_cv_func_getcwd_path_max+set}" = set; then :
15975 $as_echo_n "(cached) " >&6
15976else
15977 # Arrange for deletion of the temporary directory this test creates.
15978 ac_clean_files="$ac_clean_files confdir3"
15979 if test "$cross_compiling" = yes; then :
15980 case "$host_os" in
15981 aix*) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
15982 *) gl_cv_func_getcwd_path_max=no;;
15983 esac
15984else
15985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15986/* end confdefs.h. */
88b48903 15987
6ec2e0f5
SDJ
15988#include <errno.h>
15989#include <stdlib.h>
15990#if HAVE_UNISTD_H
15991# include <unistd.h>
15992#else
15993# include <direct.h>
15994#endif
15995#include <string.h>
15996#include <limits.h>
15997#include <sys/stat.h>
15998#include <sys/types.h>
15999#include <fcntl.h>
88b48903
WN
16000
16001
6ec2e0f5
SDJ
16002/* Arrange to define PATH_MAX, like "pathmax.h" does. */
16003#if HAVE_UNISTD_H
16004# include <unistd.h>
16005#endif
16006#include <limits.h>
16007#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
16008# include <sys/param.h>
16009#endif
16010#if !defined PATH_MAX && defined MAXPATHLEN
16011# define PATH_MAX MAXPATHLEN
16012#endif
16013#ifdef __hpux
16014# undef PATH_MAX
16015# define PATH_MAX 1024
16016#endif
16017#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
16018# undef PATH_MAX
16019# define PATH_MAX 260
16020#endif
88b48903 16021
88b48903 16022
6ec2e0f5
SDJ
16023#ifndef AT_FDCWD
16024# define AT_FDCWD 0
16025#endif
16026#ifdef ENAMETOOLONG
16027# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
16028#else
16029# define is_ENAMETOOLONG(x) 0
16030#endif
88b48903 16031
6ec2e0f5
SDJ
16032/* Use the getcwd function, not any macro. */
16033#undef getcwd
88b48903 16034
6ec2e0f5
SDJ
16035/* Don't get link errors because mkdir is redefined to rpl_mkdir. */
16036#undef mkdir
88b48903 16037
6ec2e0f5
SDJ
16038#ifndef S_IRWXU
16039# define S_IRWXU 0700
16040#endif
88b48903 16041
6ec2e0f5
SDJ
16042/* The length of this name must be 8. */
16043#define DIR_NAME "confdir3"
16044#define DIR_NAME_LEN 8
16045#define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
88b48903 16046
6ec2e0f5
SDJ
16047/* The length of "../". */
16048#define DOTDOTSLASH_LEN 3
88b48903 16049
6ec2e0f5
SDJ
16050/* Leftover bytes in the buffer, to work around library or OS bugs. */
16051#define BUF_SLOP 20
88b48903 16052
6ec2e0f5
SDJ
16053int
16054main ()
16055{
16056#ifndef PATH_MAX
16057 /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
16058 at least not on a local file system. And if we were to start worrying
16059 about remote file systems, we'd have to enable the wrapper function
16060 all of the time, just to be safe. That's not worth the cost. */
16061 exit (0);
16062#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
16063 - DIR_NAME_SIZE - BUF_SLOP) \
16064 <= PATH_MAX)
16065 /* FIXME: Assuming there's a system for which this is true,
16066 this should be done in a compile test. */
16067 exit (0);
16068#else
16069 char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
16070 + DIR_NAME_SIZE + BUF_SLOP];
16071 char *cwd = getcwd (buf, PATH_MAX);
16072 size_t initial_cwd_len;
16073 size_t cwd_len;
16074 int fail = 0;
16075 size_t n_chdirs = 0;
88b48903 16076
6ec2e0f5
SDJ
16077 if (cwd == NULL)
16078 exit (10);
88b48903 16079
6ec2e0f5 16080 cwd_len = initial_cwd_len = strlen (cwd);
88b48903 16081
6ec2e0f5
SDJ
16082 while (1)
16083 {
16084 size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
16085 char *c = NULL;
16086
16087 cwd_len += DIR_NAME_SIZE;
16088 /* If mkdir or chdir fails, it could be that this system cannot create
16089 any file with an absolute name longer than PATH_MAX, such as cygwin.
16090 If so, leave fail as 0, because the current working directory can't
16091 be too long for getcwd if it can't even be created. For other
16092 errors, be pessimistic and consider that as a failure, too. */
16093 if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
16094 {
16095 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
16096 fail = 20;
16097 break;
16098 }
88b48903 16099
6ec2e0f5
SDJ
16100 if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
16101 {
16102 struct stat sb;
88b48903 16103
6ec2e0f5
SDJ
16104 c = getcwd (buf, PATH_MAX);
16105 if (!c && errno == ENOENT)
16106 {
16107 fail = 11;
16108 break;
16109 }
16110 if (c)
16111 {
16112 fail = 31;
16113 break;
16114 }
16115 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
16116 {
16117 fail = 21;
16118 break;
16119 }
88b48903 16120
6ec2e0f5
SDJ
16121 /* Our replacement needs to be able to stat() long ../../paths,
16122 so generate a path larger than PATH_MAX to check,
16123 avoiding the replacement if we can't stat(). */
16124 c = getcwd (buf, cwd_len + 1);
16125 if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno))
16126 {
16127 fail = 32;
16128 break;
16129 }
16130 }
88b48903 16131
6ec2e0f5
SDJ
16132 if (dotdot_max <= cwd_len - initial_cwd_len)
16133 {
16134 if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
16135 break;
16136 c = getcwd (buf, cwd_len + 1);
16137 if (!c)
16138 {
16139 if (! (errno == ERANGE || errno == ENOENT
16140 || is_ENAMETOOLONG (errno)))
16141 {
16142 fail = 22;
16143 break;
16144 }
16145 if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
16146 {
16147 fail = 12;
16148 break;
16149 }
16150 }
16151 }
88b48903 16152
6ec2e0f5
SDJ
16153 if (c && strlen (c) != cwd_len)
16154 {
16155 fail = 23;
16156 break;
16157 }
16158 ++n_chdirs;
16159 }
88b48903 16160
6ec2e0f5
SDJ
16161 /* Leaving behind such a deep directory is not polite.
16162 So clean up here, right away, even though the driving
16163 shell script would also clean up. */
16164 {
16165 size_t i;
88b48903 16166
6ec2e0f5
SDJ
16167 /* Try rmdir first, in case the chdir failed. */
16168 rmdir (DIR_NAME);
16169 for (i = 0; i <= n_chdirs; i++)
16170 {
16171 if (chdir ("..") < 0)
16172 break;
16173 if (rmdir (DIR_NAME) != 0)
16174 break;
16175 }
16176 }
88b48903 16177
6ec2e0f5
SDJ
16178 exit (fail);
16179#endif
16180}
88b48903 16181
6ec2e0f5
SDJ
16182_ACEOF
16183if ac_fn_c_try_run "$LINENO"; then :
16184 gl_cv_func_getcwd_path_max=yes
16185else
16186 case $? in
16187 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
16188 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
16189 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
16190 *) gl_cv_func_getcwd_path_max=no;;
16191 esac
16192fi
16193rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16194 conftest.$ac_objext conftest.beam conftest.$ac_ext
16195fi
88b48903 16196
88b48903 16197
6ec2e0f5
SDJ
16198fi
16199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
16200$as_echo "$gl_cv_func_getcwd_path_max" >&6; }
88b48903 16201
6ec2e0f5
SDJ
16202 case "$gl_cv_func_getcwd_null" in
16203 *yes)
88b48903
WN
16204
16205
16206
16207
6ec2e0f5
SDJ
16208 for ac_func in getpagesize
16209do :
16210 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
16211if test "x$ac_cv_func_getpagesize" = x""yes; then :
16212 cat >>confdefs.h <<_ACEOF
16213#define HAVE_GETPAGESIZE 1
16214_ACEOF
16215
16216fi
16217done
16218
16219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5
16220$as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; }
16221if test "${gl_cv_func_getcwd_abort_bug+set}" = set; then :
88b48903
WN
16222 $as_echo_n "(cached) " >&6
16223else
6ec2e0f5
SDJ
16224 # Remove any remnants of a previous test.
16225 rm -rf confdir-14B---
16226 # Arrange for deletion of the temporary directory this test creates.
16227 ac_clean_files="$ac_clean_files confdir-14B---"
16228 if test "$cross_compiling" = yes; then :
16229 gl_cv_func_getcwd_abort_bug=yes
88b48903
WN
16230else
16231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16232/* end confdefs.h. */
6ec2e0f5
SDJ
16233
16234#include <errno.h>
16235#include <stdlib.h>
16236#if HAVE_UNISTD_H
16237# include <unistd.h>
16238#else /* on Windows with MSVC */
16239# include <direct.h>
16240#endif
16241#include <string.h>
16242#include <sys/stat.h>
16243
16244
16245/* Arrange to define PATH_MAX, like "pathmax.h" does. */
16246#if HAVE_UNISTD_H
16247# include <unistd.h>
16248#endif
16249#include <limits.h>
16250#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
16251# include <sys/param.h>
16252#endif
16253#if !defined PATH_MAX && defined MAXPATHLEN
16254# define PATH_MAX MAXPATHLEN
16255#endif
16256#ifdef __hpux
16257# undef PATH_MAX
16258# define PATH_MAX 1024
16259#endif
16260#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
16261# undef PATH_MAX
16262# define PATH_MAX 260
16263#endif
16264
16265
16266/* Don't get link errors because mkdir is redefined to rpl_mkdir. */
16267#undef mkdir
16268
16269#ifndef S_IRWXU
16270# define S_IRWXU 0700
16271#endif
16272
16273/* FIXME: skip the run-test altogether on systems without getpagesize. */
16274#if ! HAVE_GETPAGESIZE
16275# define getpagesize() 0
16276#endif
16277
16278/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
16279 the 16kB pagesize on ia64 linux. Those conditions make the code below
16280 trigger a bug in glibc's getcwd implementation before 2.4.90-10. */
16281#define TARGET_LEN (5 * 1024)
88b48903
WN
16282
16283int
16284main ()
16285{
6ec2e0f5
SDJ
16286 char *cwd;
16287 size_t initial_cwd_len;
16288 int fail = 0;
16289
16290 /* The bug is triggered when PATH_MAX < getpagesize (), so skip
16291 this relatively expensive and invasive test if that's not true. */
16292#ifdef PATH_MAX
16293 int bug_possible = PATH_MAX < getpagesize ();
16294#else
16295 int bug_possible = 0;
16296#endif
16297 if (! bug_possible)
16298 return 0;
8690e634 16299
6ec2e0f5
SDJ
16300 cwd = getcwd (NULL, 0);
16301 if (cwd == NULL)
16302 return 2;
16303
16304 initial_cwd_len = strlen (cwd);
16305 free (cwd);
16306
16307 if (1)
16308 {
16309 static char const dir_name[] = "confdir-14B---";
16310 size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
16311 / sizeof dir_name);
16312 size_t d;
16313 for (d = 0; d < desired_depth; d++)
16314 {
16315 if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
16316 {
16317 if (! (errno == ERANGE || errno == ENAMETOOLONG
16318 || errno == ENOENT))
16319 fail = 3; /* Unable to construct deep hierarchy. */
16320 break;
16321 }
16322 }
16323
16324 /* If libc has the bug in question, this invocation of getcwd
16325 results in a failed assertion. */
16326 cwd = getcwd (NULL, 0);
16327 if (cwd == NULL)
16328 fail = 4; /* getcwd didn't assert, but it failed for a long name
16329 where the answer could have been learned. */
16330 free (cwd);
16331
16332 /* Call rmdir first, in case the above chdir failed. */
16333 rmdir (dir_name);
16334 while (0 < d--)
16335 {
16336 if (chdir ("..") < 0)
16337 {
16338 fail = 5;
16339 break;
16340 }
16341 rmdir (dir_name);
16342 }
16343 }
16344
16345 return fail;
8690e634 16346}
6ec2e0f5 16347
8690e634
JK
16348_ACEOF
16349if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 16350 gl_cv_func_getcwd_abort_bug=no
8690e634 16351else
6ec2e0f5
SDJ
16352 ret=$?
16353 if test $ret -ge 128 || test $ret = 4; then
16354 gl_cv_func_getcwd_abort_bug=yes
16355 else
16356 gl_cv_func_getcwd_abort_bug=no
16357 fi
8690e634
JK
16358fi
16359rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16360 conftest.$ac_objext conftest.beam conftest.$ac_ext
16361fi
16362
16363
16364fi
6ec2e0f5
SDJ
16365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5
16366$as_echo "$gl_cv_func_getcwd_abort_bug" >&6; }
16367 if test $gl_cv_func_getcwd_abort_bug = yes; then :
16368 gl_abort_bug=yes
16369fi
16370
16371 ;;
16372 esac
16373 ;;
16374 esac
16375 case "$gl_cv_func_getcwd_path_max" in
16376 "no"|"no, it has the AIX bug") ;;
16377 *)
16378
16379$as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
16380
16381 ;;
16382 esac
16383 case "$gl_cv_func_getcwd_path_max" in
16384 "no, but it is partly working")
16385
16386$as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
16387
16388 ;;
16389 "yes, but with shorter paths")
16390
16391$as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
16392
16393 ;;
16394 esac
16395
16396 if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
16397 || test $gl_cv_func_getcwd_posix_signature != yes \
16398 || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \
16399 || test $gl_abort_bug = yes; then
16400 REPLACE_GETCWD=1
8690e634
JK
16401 fi
16402
6ec2e0f5 16403 if test $REPLACE_GETCWD = 1; then
8690e634
JK
16404
16405
8690e634
JK
16406
16407
16408
16409
16410
16411
6ec2e0f5 16412 gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
8690e634
JK
16413
16414
8690e634
JK
16415
16416
6ec2e0f5
SDJ
16417 :
16418
16419 fi
16420
8690e634
JK
16421
16422cat >>confdefs.h <<_ACEOF
6ec2e0f5 16423#define GNULIB_GETCWD 1
8690e634
JK
16424_ACEOF
16425
16426
8690e634 16427
8690e634
JK
16428
16429
c971b7fa 16430
c971b7fa 16431
6ec2e0f5
SDJ
16432 GNULIB_GETCWD=1
16433
16434
16435
16436
16437
16438$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
16439
c971b7fa 16440
c971b7fa 16441
c971b7fa 16442
c971b7fa 16443
c971b7fa 16444
c971b7fa 16445
c971b7fa 16446
6ec2e0f5
SDJ
16447 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
16448 *yes,yes) ;;
16449 *)
16450 REPLACE_GETCWD=1
16451 ;;
16452 esac
c971b7fa 16453
6ec2e0f5 16454 if test $REPLACE_GETCWD = 1; then
c971b7fa 16455
c971b7fa
PA
16456
16457
c971b7fa
PA
16458
16459
c971b7fa 16460
c971b7fa 16461
c971b7fa 16462
6ec2e0f5 16463 gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
c971b7fa 16464
6ec2e0f5 16465 fi
c971b7fa 16466
c971b7fa 16467
c971b7fa 16468
c971b7fa 16469
8690e634 16470
6ec2e0f5 16471 GNULIB_GETCWD=1
c971b7fa 16472
88b48903
WN
16473
16474
16475
88b48903 16476
6ec2e0f5 16477$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
88b48903 16478
88b48903
WN
16479
16480
16481
6ec2e0f5
SDJ
16482
16483
16484
16485
16486 if test $ac_cv_func_getdtablesize = yes &&
16487 test $ac_cv_have_decl_getdtablesize = yes; then
16488 # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit
16489 # up to an unchangeable hard limit; all other platforms correctly
16490 # require setrlimit before getdtablesize() can report a larger value.
16491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
16492$as_echo_n "checking whether getdtablesize works... " >&6; }
16493if test "${gl_cv_func_getdtablesize_works+set}" = set; then :
88b48903
WN
16494 $as_echo_n "(cached) " >&6
16495else
6ec2e0f5 16496 if test "$cross_compiling" = yes; then :
88b48903 16497 case "$host_os" in
6ec2e0f5
SDJ
16498 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
16499 gl_cv_func_getdtablesize_works="guessing no" ;;
16500 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
88b48903 16501 esac
88b48903
WN
16502else
16503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16504/* end confdefs.h. */
16505
6ec2e0f5
SDJ
16506 #include <unistd.h>
16507int
16508main ()
88b48903 16509{
6ec2e0f5
SDJ
16510int size = getdtablesize();
16511 if (dup2 (0, getdtablesize()) != -1)
16512 return 1;
16513 if (size != getdtablesize())
16514 return 2;
16515
16516 ;
16517 return 0;
88b48903
WN
16518}
16519_ACEOF
16520if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 16521 gl_cv_func_getdtablesize_works=yes
88b48903 16522else
6ec2e0f5 16523 gl_cv_func_getdtablesize_works=no
88b48903
WN
16524fi
16525rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16526 conftest.$ac_objext conftest.beam conftest.$ac_ext
16527fi
16528
16529
16530fi
6ec2e0f5
SDJ
16531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
16532$as_echo "$gl_cv_func_getdtablesize_works" >&6; }
16533 case "$gl_cv_func_getdtablesize_works" in
16534 *yes) ;;
16535 *) REPLACE_GETDTABLESIZE=1 ;;
88b48903
WN
16536 esac
16537 else
6ec2e0f5 16538 HAVE_GETDTABLESIZE=0
88b48903
WN
16539 fi
16540
6ec2e0f5 16541 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
88b48903
WN
16542
16543
16544
16545
16546
16547
16548
16549
6ec2e0f5 16550 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
88b48903 16551
6ec2e0f5 16552 :
88b48903
WN
16553 fi
16554
16555
16556
16557
16558
6ec2e0f5 16559 GNULIB_GETDTABLESIZE=1
88b48903
WN
16560
16561
16562
88b48903 16563
88b48903 16564
6ec2e0f5 16565$as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
88b48903 16566
88b48903 16567
88b48903 16568
88b48903 16569
88b48903 16570
88b48903 16571
88b48903 16572
88b48903
WN
16573
16574
6ec2e0f5
SDJ
16575 if test $ac_cv_have_decl_getlogin_r = no; then
16576 HAVE_DECL_GETLOGIN_R=0
16577 fi
88b48903 16578
88b48903 16579
6ec2e0f5
SDJ
16580 if test $ac_cv_func_getlogin_r = no; then
16581 HAVE_GETLOGIN_R=0
16582 else
16583 HAVE_GETLOGIN_R=1
16584
16585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getlogin_r works with small buffers" >&5
16586$as_echo_n "checking whether getlogin_r works with small buffers... " >&6; }
16587if test "${gl_cv_func_getlogin_r_works+set}" = set; then :
16588 $as_echo_n "(cached) " >&6
16589else
88b48903 16590
6ec2e0f5
SDJ
16591 case "$host_os" in
16592 # Guess no on OSF/1.
16593 osf*) gl_cv_func_getlogin_r_works="guessing no" ;;
16594 # Guess yes otherwise.
16595 *) gl_cv_func_getlogin_r_works="guessing yes" ;;
16596 esac
16597 if test "$cross_compiling" = yes; then :
16598 :
88b48903
WN
16599else
16600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16601/* end confdefs.h. */
16602
6ec2e0f5
SDJ
16603#include <stddef.h>
16604#include <unistd.h>
16605#if !HAVE_DECL_GETLOGIN_R
88b48903 16606extern
6ec2e0f5 16607# ifdef __cplusplus
88b48903 16608"C"
6ec2e0f5
SDJ
16609# endif
16610int getlogin_r (char *, size_t);
88b48903 16611#endif
6ec2e0f5
SDJ
16612int
16613main (void)
88b48903
WN
16614{
16615 int result = 0;
6ec2e0f5
SDJ
16616 char buf[100];
16617
16618 if (getlogin_r (buf, 0) == 0)
16619 result |= 16;
16620 if (getlogin_r (buf, 1) == 0)
16621 result |= 17;
88b48903
WN
16622 return result;
16623}
16624_ACEOF
16625if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 16626 gl_cv_func_getlogin_r_works=yes
88b48903 16627else
6ec2e0f5
SDJ
16628 case $? in
16629 16 | 17) gl_cv_func_getlogin_r_works=no ;;
16630 esac
16631
88b48903
WN
16632fi
16633rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16634 conftest.$ac_objext conftest.beam conftest.$ac_ext
16635fi
16636
16637
4a626d0a 16638fi
6ec2e0f5
SDJ
16639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getlogin_r_works" >&5
16640$as_echo "$gl_cv_func_getlogin_r_works" >&6; }
16641 case "$gl_cv_func_getlogin_r_works" in
16642 *yes) ;;
16643 *) REPLACE_GETLOGIN_R=1 ;;
16644 esac
16645 fi
16646
16647 if test $HAVE_GETLOGIN_R = 0 || test $REPLACE_GETLOGIN_R = 1; then
16648
16649
16650
16651
16652
16653
16654
16655
16656 gl_LIBOBJS="$gl_LIBOBJS getlogin_r.$ac_objext"
4a626d0a 16657
4a626d0a 16658
4a626d0a 16659
4a626d0a 16660
4a626d0a
PA
16661 fi
16662
16663
4a626d0a
PA
16664
16665
16666
6ec2e0f5 16667 GNULIB_GETLOGIN_R=1
4a626d0a
PA
16668
16669
16670
16671
16672
6ec2e0f5 16673$as_echo "#define GNULIB_TEST_GETLOGIN_R 1" >>confdefs.h
4a626d0a 16674
4a626d0a
PA
16675
16676
16677
16678
16679
6ec2e0f5
SDJ
16680 ac_found=0
16681 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
16682"
16683if test "x$ac_cv_have_decl_program_invocation_name" = x""yes; then :
16684 ac_have_decl=1
16685else
16686 ac_have_decl=0
16687fi
16688
16689cat >>confdefs.h <<_ACEOF
16690#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
16691_ACEOF
16692if test $ac_have_decl = 1; then :
16693 ac_found=1
16694fi
16695
16696 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
16697"
16698if test "x$ac_cv_have_decl_program_invocation_short_name" = x""yes; then :
16699 ac_have_decl=1
16700else
16701 ac_have_decl=0
16702fi
16703
16704cat >>confdefs.h <<_ACEOF
16705#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
16706_ACEOF
16707if test $ac_have_decl = 1; then :
16708 ac_found=1
16709fi
4a626d0a 16710
6ec2e0f5
SDJ
16711 ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
16712"
16713if test "x$ac_cv_have_decl___argv" = x""yes; then :
16714 ac_have_decl=1
16715else
16716 ac_have_decl=0
16717fi
4a626d0a 16718
6ec2e0f5
SDJ
16719cat >>confdefs.h <<_ACEOF
16720#define HAVE_DECL___ARGV $ac_have_decl
16721_ACEOF
16722if test $ac_have_decl = 1; then :
16723 ac_found=1
16724fi
4a626d0a
PA
16725
16726
6ec2e0f5
SDJ
16727 # Incur the cost of this test only if none of the above worked.
16728 if test $ac_found = 0; then
16729 # On OpenBSD 5.1, using the global __progname variable appears to be
16730 # the only way to implement getprogname.
16731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
16732$as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
16733if test "${gl_cv_var___progname+set}" = set; then :
16734 $as_echo_n "(cached) " >&6
16735else
4a626d0a 16736
6ec2e0f5
SDJ
16737 gl_cv_var___progname=
16738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16739/* end confdefs.h. */
16740extern char *__progname;
16741int
16742main ()
16743{
16744return *__progname;
16745
16746 ;
16747 return 0;
16748}
16749_ACEOF
16750if ac_fn_c_try_link "$LINENO"; then :
16751 gl_cv_var___progname=yes
16752
16753fi
16754rm -f core conftest.err conftest.$ac_objext \
16755 conftest$ac_exeext conftest.$ac_ext
16756
16757
16758fi
16759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
16760$as_echo "$gl_cv_var___progname" >&6; }
16761 if test "$gl_cv_var___progname" = yes; then
16762
16763$as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
16764
16765 fi
16766 fi
4a626d0a
PA
16767
16768
16769
16770
16771
16772
16773
16774
16775
16776 gl_gettimeofday_timezone=void
16777 if test $ac_cv_func_gettimeofday != yes; then
16778 HAVE_GETTIMEOFDAY=0
16779 else
16780
16781
16782
16783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
16784$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
16785if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
16786 $as_echo_n "(cached) " >&6
16787else
16788 if test "$cross_compiling" = yes; then :
16789 # When cross-compiling:
16790 case "$host_os" in
16791 # Guess all is fine on glibc systems.
16792 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
16793 # If we don't know, assume the worst.
16794 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
16795 esac
16796
16797else
16798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16799/* end confdefs.h. */
16800#include <string.h>
16801 #include <sys/time.h>
16802 #include <time.h>
16803 #include <stdlib.h>
16804
16805int
16806main ()
16807{
16808
16809 time_t t = 0;
16810 struct tm *lt;
16811 struct tm saved_lt;
16812 struct timeval tv;
16813 lt = localtime (&t);
16814 saved_lt = *lt;
16815 gettimeofday (&tv, NULL);
16816 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
16817
16818 ;
16819 return 0;
16820}
16821_ACEOF
16822if ac_fn_c_try_run "$LINENO"; then :
16823 gl_cv_func_gettimeofday_clobber=no
16824else
16825 gl_cv_func_gettimeofday_clobber=yes
16826fi
16827rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16828 conftest.$ac_objext conftest.beam conftest.$ac_ext
16829fi
16830
16831fi
16832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
16833$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
16834
16835 case "$gl_cv_func_gettimeofday_clobber" in
16836 *yes)
16837 REPLACE_GETTIMEOFDAY=1
16838
16839 REPLACE_GMTIME=1
16840 REPLACE_LOCALTIME=1
16841
16842
16843$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
16844
16845 ;;
16846 esac
16847
16848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
16849$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
16850if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
16851 $as_echo_n "(cached) " >&6
16852else
16853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16854/* end confdefs.h. */
16855#include <sys/time.h>
16856 struct timeval c;
16857 int gettimeofday (struct timeval *restrict, void *restrict);
16858
16859int
16860main ()
16861{
16862/* glibc uses struct timezone * rather than the POSIX void *
16863 if _GNU_SOURCE is defined. However, since the only portable
16864 use of gettimeofday uses NULL as the second parameter, and
16865 since the glibc definition is actually more typesafe, it is
16866 not worth wrapping this to get a compliant signature. */
16867 int (*f) (struct timeval *restrict, void *restrict)
16868 = gettimeofday;
16869 int x = f (&c, 0);
16870 return !(x | c.tv_sec | c.tv_usec);
16871
16872 ;
16873 return 0;
16874}
16875_ACEOF
16876if ac_fn_c_try_compile "$LINENO"; then :
16877 gl_cv_func_gettimeofday_posix_signature=yes
16878else
16879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16880/* end confdefs.h. */
16881#include <sys/time.h>
16882int gettimeofday (struct timeval *restrict, struct timezone *restrict);
16883
16884int
16885main ()
16886{
16887
16888 ;
16889 return 0;
16890}
16891_ACEOF
16892if ac_fn_c_try_compile "$LINENO"; then :
16893 gl_cv_func_gettimeofday_posix_signature=almost
16894else
16895 gl_cv_func_gettimeofday_posix_signature=no
16896fi
16897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16898fi
16899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16900fi
16901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
16902$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
16903 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
16904 gl_gettimeofday_timezone='struct timezone'
16905 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
16906 REPLACE_GETTIMEOFDAY=1
16907 fi
16908 if test $REPLACE_STRUCT_TIMEVAL = 1; then
16909 REPLACE_GETTIMEOFDAY=1
16910 fi
16911
16912 fi
16913
16914cat >>confdefs.h <<_ACEOF
16915#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
16916_ACEOF
16917
88b48903 16918
4a626d0a 16919 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
88b48903 16920
88b48903 16921
88b48903 16922
88b48903
WN
16923
16924
88b48903
WN
16925
16926
16927
6ec2e0f5
SDJ
16928 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
16929
16930
16931 for ac_header in sys/timeb.h
16932do :
16933 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
16934if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
16935 cat >>confdefs.h <<_ACEOF
16936#define HAVE_SYS_TIMEB_H 1
16937_ACEOF
16938
16939fi
16940
16941done
16942
16943 for ac_func in _ftime
16944do :
16945 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
16946if test "x$ac_cv_func__ftime" = x""yes; then :
16947 cat >>confdefs.h <<_ACEOF
16948#define HAVE__FTIME 1
16949_ACEOF
16950
16951fi
16952done
16953
16954
16955 fi
16956
16957
16958
16959
16960
16961 GNULIB_GETTIMEOFDAY=1
16962
16963
16964
16965
16966
16967$as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
16968
16969
16970
16971 GLOB_H=
16972 for ac_header in glob.h
16973do :
16974 ac_fn_c_check_header_mongrel "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default"
16975if test "x$ac_cv_header_glob_h" = x""yes; then :
16976 cat >>confdefs.h <<_ACEOF
16977#define HAVE_GLOB_H 1
16978_ACEOF
16979
16980else
16981 GLOB_H=glob.h
16982fi
16983
16984done
16985
16986
16987 if test -z "$GLOB_H"; then
16988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU glob interface version 1" >&5
16989$as_echo_n "checking for GNU glob interface version 1... " >&6; }
16990if test "${gl_cv_gnu_glob_interface_version_1+set}" = set; then :
16991 $as_echo_n "(cached) " >&6
16992else
16993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16994/* end confdefs.h. */
16995#include <gnu-versions.h>
16996char a[_GNU_GLOB_INTERFACE_VERSION == 1 ? 1 : -1];
16997_ACEOF
16998if ac_fn_c_try_compile "$LINENO"; then :
16999 gl_cv_gnu_glob_interface_version_1=yes
17000else
17001 gl_cv_gnu_glob_interface_version_1=no
17002fi
17003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17004fi
17005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_gnu_glob_interface_version_1" >&5
17006$as_echo "$gl_cv_gnu_glob_interface_version_1" >&6; }
17007
17008 if test "$gl_cv_gnu_glob_interface_version_1" = "no"; then
17009 GLOB_H=glob.h
17010 fi
17011 fi
17012
17013 if test -z "$GLOB_H"; then
17014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether glob lists broken symlinks" >&5
17015$as_echo_n "checking whether glob lists broken symlinks... " >&6; }
17016if test "${gl_cv_glob_lists_symlinks+set}" = set; then :
17017 $as_echo_n "(cached) " >&6
17018else
17019 if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then
17020 gl_cv_glob_lists_symlinks=maybe
17021 else
17022 # If we can't make a symlink, then we cannot test this issue. Be
17023 # pessimistic about this.
17024 gl_cv_glob_lists_symlinks=no
17025 fi
88b48903 17026
6ec2e0f5
SDJ
17027 if test $gl_cv_glob_lists_symlinks = maybe; then
17028 if test "$cross_compiling" = yes; then :
17029 gl_cv_glob_lists_symlinks=no
17030else
17031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17032/* end confdefs.h. */
88b48903 17033
6ec2e0f5
SDJ
17034#include <stddef.h>
17035#include <glob.h>
17036int
17037main ()
17038{
17039glob_t found;
17040if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH) return 1;
17041 ;
17042 return 0;
17043}
4a626d0a 17044_ACEOF
6ec2e0f5
SDJ
17045if ac_fn_c_try_run "$LINENO"; then :
17046 gl_cv_glob_lists_symlinks=yes
17047else
17048 gl_cv_glob_lists_symlinks=no
17049fi
17050rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17051 conftest.$ac_objext conftest.beam conftest.$ac_ext
17052fi
88b48903 17053
6ec2e0f5 17054 fi
4a626d0a 17055fi
6ec2e0f5
SDJ
17056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_glob_lists_symlinks" >&5
17057$as_echo "$gl_cv_glob_lists_symlinks" >&6; }
88b48903 17058
6ec2e0f5
SDJ
17059 if test $gl_cv_glob_lists_symlinks = no; then
17060 GLOB_H=glob.h
17061 fi
17062 fi
4a626d0a 17063
6ec2e0f5 17064 rm -f conf$$-globtest
4a626d0a 17065
88b48903 17066
6ec2e0f5
SDJ
17067 if test -n "$GLOB_H"; then
17068 GL_GENERATE_GLOB_H_TRUE=
17069 GL_GENERATE_GLOB_H_FALSE='#'
17070else
17071 GL_GENERATE_GLOB_H_TRUE='#'
17072 GL_GENERATE_GLOB_H_FALSE=
17073fi
88b48903 17074
88b48903 17075
6ec2e0f5 17076 if test -n "$GLOB_H"; then
88b48903
WN
17077
17078
17079
17080
88b48903
WN
17081
17082
17083
17084
6ec2e0f5 17085 gl_LIBOBJS="$gl_LIBOBJS glob.$ac_objext"
88b48903 17086
88b48903 17087
6ec2e0f5
SDJ
17088 if test $ac_cv_header_sys_cdefs_h = yes; then
17089 HAVE_SYS_CDEFS_H=1
17090 else
17091 HAVE_SYS_CDEFS_H=0
17092 fi
88b48903
WN
17093
17094
6ec2e0f5 17095 fi
88b48903 17096
49e4877c
PA
17097 :
17098
17099
88b48903
WN
17100
17101
17102
17103
17104 PRIPTR_PREFIX=
17105 if test -n "$STDINT_H"; then
17106 PRIPTR_PREFIX='"l"'
17107 else
17108 for glpfx in '' l ll I64; do
17109 case $glpfx in
17110 '') gltype1='int';;
17111 l) gltype1='long int';;
17112 ll) gltype1='long long int';;
17113 I64) gltype1='__int64';;
17114 esac
17115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17116/* end confdefs.h. */
17117#include <stdint.h>
17118 extern intptr_t foo;
17119 extern $gltype1 foo;
17120int
17121main ()
17122{
17123
17124 ;
17125 return 0;
17126}
17127_ACEOF
17128if ac_fn_c_try_compile "$LINENO"; then :
17129 PRIPTR_PREFIX='"'$glpfx'"'
17130fi
17131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17132 test -n "$PRIPTR_PREFIX" && break
17133 done
17134 fi
17135
17136
17137
17138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
17139$as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
17140if test "${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+set}" = set; then :
17141 $as_echo_n "(cached) " >&6
17142else
17143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17144/* end confdefs.h. */
17145/* Work also in C++ mode. */
17146 #define __STDC_LIMIT_MACROS 1
17147
17148 /* Work if build is not clean. */
17149 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
17150
17151 #include <limits.h>
17152 #if HAVE_STDINT_H
17153 #include <stdint.h>
17154 #endif
17155
17156 #if defined INT32_MAX && defined INTMAX_MAX
17157 #define CONDITION (INT32_MAX < INTMAX_MAX)
17158 #elif HAVE_LONG_LONG_INT
17159 #define CONDITION (sizeof (int) < sizeof (long long int))
17160 #else
17161 #define CONDITION 0
17162 #endif
17163 int test[CONDITION ? 1 : -1];
17164int
17165main ()
17166{
17167
17168 ;
17169 return 0;
17170}
17171_ACEOF
17172if ac_fn_c_try_compile "$LINENO"; then :
17173 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
17174else
17175 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
17176fi
17177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17178fi
17179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
17180$as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
17181 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
17182 INT32_MAX_LT_INTMAX_MAX=1;
17183 else
17184 INT32_MAX_LT_INTMAX_MAX=0;
17185 fi
17186
17187
17188 if test $APPLE_UNIVERSAL_BUILD = 0; then
17189
17190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
17191$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
17192if test "${gl_cv_test_INT64_MAX_EQ_LONG_MAX+set}" = set; then :
17193 $as_echo_n "(cached) " >&6
17194else
17195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17196/* end confdefs.h. */
17197/* Work also in C++ mode. */
17198 #define __STDC_LIMIT_MACROS 1
17199
17200 /* Work if build is not clean. */
17201 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
17202
17203 #include <limits.h>
17204 #if HAVE_STDINT_H
17205 #include <stdint.h>
17206 #endif
17207
17208 #if defined INT64_MAX
17209 #define CONDITION (INT64_MAX == LONG_MAX)
17210 #elif HAVE_LONG_LONG_INT
17211 #define CONDITION (sizeof (long long int) == sizeof (long int))
17212 #else
17213 #define CONDITION 0
17214 #endif
17215 int test[CONDITION ? 1 : -1];
17216int
17217main ()
17218{
17219
17220 ;
17221 return 0;
17222}
17223_ACEOF
17224if ac_fn_c_try_compile "$LINENO"; then :
17225 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
17226else
17227 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
17228fi
17229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17230fi
17231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
17232$as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
17233 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
17234 INT64_MAX_EQ_LONG_MAX=1;
17235 else
17236 INT64_MAX_EQ_LONG_MAX=0;
17237 fi
17238
17239
17240 else
17241 INT64_MAX_EQ_LONG_MAX=-1
17242 fi
17243
17244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
17245$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
17246if test "${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+set}" = set; then :
17247 $as_echo_n "(cached) " >&6
17248else
17249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17250/* end confdefs.h. */
17251/* Work also in C++ mode. */
17252 #define __STDC_LIMIT_MACROS 1
17253
17254 /* Work if build is not clean. */
17255 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
17256
17257 #include <limits.h>
17258 #if HAVE_STDINT_H
17259 #include <stdint.h>
17260 #endif
17261
17262 #if defined UINT32_MAX && defined UINTMAX_MAX
17263 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
17264 #elif HAVE_LONG_LONG_INT
17265 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
17266 #else
17267 #define CONDITION 0
17268 #endif
17269 int test[CONDITION ? 1 : -1];
17270int
17271main ()
17272{
17273
17274 ;
17275 return 0;
17276}
17277_ACEOF
17278if ac_fn_c_try_compile "$LINENO"; then :
17279 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
17280else
17281 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
17282fi
17283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17284fi
17285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
17286$as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
17287 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
17288 UINT32_MAX_LT_UINTMAX_MAX=1;
17289 else
17290 UINT32_MAX_LT_UINTMAX_MAX=0;
17291 fi
17292
17293
17294 if test $APPLE_UNIVERSAL_BUILD = 0; then
17295
17296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
17297$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
17298if test "${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+set}" = set; then :
17299 $as_echo_n "(cached) " >&6
17300else
17301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17302/* end confdefs.h. */
17303/* Work also in C++ mode. */
17304 #define __STDC_LIMIT_MACROS 1
17305
17306 /* Work if build is not clean. */
17307 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
17308
17309 #include <limits.h>
17310 #if HAVE_STDINT_H
17311 #include <stdint.h>
17312 #endif
17313
17314 #if defined UINT64_MAX
17315 #define CONDITION (UINT64_MAX == ULONG_MAX)
17316 #elif HAVE_LONG_LONG_INT
17317 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
17318 #else
17319 #define CONDITION 0
17320 #endif
17321 int test[CONDITION ? 1 : -1];
17322int
17323main ()
17324{
17325
17326 ;
17327 return 0;
17328}
17329_ACEOF
17330if ac_fn_c_try_compile "$LINENO"; then :
17331 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
17332else
17333 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
17334fi
17335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17336fi
17337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
17338$as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
17339 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
17340 UINT64_MAX_EQ_ULONG_MAX=1;
17341 else
17342 UINT64_MAX_EQ_ULONG_MAX=0;
17343 fi
17344
17345
17346 else
17347 UINT64_MAX_EQ_ULONG_MAX=-1
17348 fi
17349
17350
17351
17352
17353
17354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
17355$as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
17356if test "${gl_cv_func_isnand_no_libm+set}" = set; then :
17357 $as_echo_n "(cached) " >&6
17358else
17359
17360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17361/* end confdefs.h. */
17362#include <math.h>
17363 #if __GNUC__ >= 4
17364 # undef isnand
17365 # define isnand(x) __builtin_isnan ((double)(x))
17366 #else
17367 # undef isnand
17368 # define isnand(x) isnan ((double)(x))
17369 #endif
17370 double x;
17371int
17372main ()
17373{
17374return isnand (x);
17375 ;
17376 return 0;
17377}
17378_ACEOF
17379if ac_fn_c_try_link "$LINENO"; then :
17380 gl_cv_func_isnand_no_libm=yes
17381else
17382 gl_cv_func_isnand_no_libm=no
17383fi
17384rm -f core conftest.err conftest.$ac_objext \
17385 conftest$ac_exeext conftest.$ac_ext
17386
17387fi
17388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
17389$as_echo "$gl_cv_func_isnand_no_libm" >&6; }
17390
17391 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
17392 if test $gl_cv_func_isnand_no_libm = yes; then
17393
17394$as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
17395
17396 fi
17397
17398 if test $gl_func_isnand_no_libm != yes; then
17399
17400
17401
17402
17403
17404
17405
17406
17407 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
17408
17409
17410
17411
17412 fi
17413
17414
17415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
17416$as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
17417if test "${gl_cv_func_isnanl_no_libm+set}" = set; then :
17418 $as_echo_n "(cached) " >&6
17419else
17420
17421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17422/* end confdefs.h. */
17423#include <math.h>
17424 #if __GNUC__ >= 4
17425 # undef isnanl
17426 # define isnanl(x) __builtin_isnanl ((long double)(x))
17427 #elif defined isnan
17428 # undef isnanl
17429 # define isnanl(x) isnan ((long double)(x))
17430 #endif
17431 long double x;
17432int
17433main ()
17434{
17435return isnanl (x);
17436 ;
17437 return 0;
17438}
17439_ACEOF
17440if ac_fn_c_try_link "$LINENO"; then :
17441 gl_cv_func_isnanl_no_libm=yes
17442else
17443 gl_cv_func_isnanl_no_libm=no
17444fi
17445rm -f core conftest.err conftest.$ac_objext \
17446 conftest$ac_exeext conftest.$ac_ext
17447
17448fi
17449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
17450$as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
17451
17452 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
17453 if test $gl_func_isnanl_no_libm = yes; then
17454
17455
17456
17457
17458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
17459$as_echo_n "checking whether isnanl works... " >&6; }
17460if test "${gl_cv_func_isnanl_works+set}" = set; then :
17461 $as_echo_n "(cached) " >&6
17462else
17463
17464 if test "$cross_compiling" = yes; then :
4a626d0a 17465 gl_cv_func_isnanl_works="guessing yes"
88b48903
WN
17466else
17467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17468/* end confdefs.h. */
17469
17470#include <float.h>
17471#include <limits.h>
17472#include <math.h>
17473#if __GNUC__ >= 4
17474# undef isnanl
17475# define isnanl(x) __builtin_isnanl ((long double)(x))
17476#elif defined isnan
17477# undef isnanl
17478# define isnanl(x) isnan ((long double)(x))
17479#endif
17480#define NWORDS \
17481 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
17482typedef union { unsigned int word[NWORDS]; long double value; }
17483 memory_long_double;
17484/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
17485 runtime type conversion. */
17486#ifdef __sgi
17487static long double NaNl ()
17488{
17489 double zero = 0.0;
17490 return zero / zero;
17491}
17492#else
17493# define NaNl() (0.0L / 0.0L)
17494#endif
17495int main ()
17496{
17497 int result = 0;
17498
17499 if (!isnanl (NaNl ()))
17500 result |= 1;
17501
17502 {
17503 memory_long_double m;
17504 unsigned int i;
17505
17506 /* The isnanl function should be immune against changes in the sign bit and
17507 in the mantissa bits. The xor operation twiddles a bit that can only be
17508 a sign bit or a mantissa bit (since the exponent never extends to
17509 bit 31). */
17510 m.value = NaNl ();
17511 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
17512 for (i = 0; i < NWORDS; i++)
17513 m.word[i] |= 1;
17514 if (!isnanl (m.value))
17515 result |= 1;
17516 }
17517
17518#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
17519/* Representation of an 80-bit 'long double' as an initializer for a sequence
17520 of 'unsigned int' words. */
17521# ifdef WORDS_BIGENDIAN
17522# define LDBL80_WORDS(exponent,manthi,mantlo) \
17523 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
4a626d0a 17524 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
88b48903
WN
17525 (unsigned int) (mantlo) << 16 \
17526 }
17527# else
17528# define LDBL80_WORDS(exponent,manthi,mantlo) \
17529 { mantlo, manthi, exponent }
17530# endif
17531 { /* Quiet NaN. */
17532 static memory_long_double x =
17533 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
17534 if (!isnanl (x.value))
17535 result |= 2;
17536 }
17537 {
17538 /* Signalling NaN. */
17539 static memory_long_double x =
17540 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
17541 if (!isnanl (x.value))
17542 result |= 2;
17543 }
4a626d0a 17544 /* isnanl should return something even for noncanonical values. */
88b48903
WN
17545 { /* Pseudo-NaN. */
17546 static memory_long_double x =
17547 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
4a626d0a 17548 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
17549 result |= 4;
17550 }
17551 { /* Pseudo-Infinity. */
17552 static memory_long_double x =
17553 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
4a626d0a 17554 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
17555 result |= 8;
17556 }
17557 { /* Pseudo-Zero. */
17558 static memory_long_double x =
17559 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
4a626d0a 17560 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
17561 result |= 16;
17562 }
17563 { /* Unnormalized number. */
17564 static memory_long_double x =
17565 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
4a626d0a 17566 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
17567 result |= 32;
17568 }
17569 { /* Pseudo-Denormal. */
17570 static memory_long_double x =
17571 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
4a626d0a 17572 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
17573 result |= 64;
17574 }
17575#endif
17576
17577 return result;
17578}
17579_ACEOF
17580if ac_fn_c_try_run "$LINENO"; then :
17581 gl_cv_func_isnanl_works=yes
17582else
17583 gl_cv_func_isnanl_works=no
17584fi
17585rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17586 conftest.$ac_objext conftest.beam conftest.$ac_ext
17587fi
17588
17589
17590fi
17591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
17592$as_echo "$gl_cv_func_isnanl_works" >&6; }
17593
17594 case "$gl_cv_func_isnanl_works" in
17595 *yes) ;;
17596 *) gl_func_isnanl_no_libm=no ;;
17597 esac
17598 fi
17599 if test $gl_func_isnanl_no_libm = yes; then
17600
17601$as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
17602
17603 fi
17604
17605 if test $gl_func_isnanl_no_libm != yes; then
17606
17607
17608
17609
17610
17611
17612
17613
17614 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
17615
17616
17617
17618
17619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
17620$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
17621if test "${gl_cv_cc_long_double_expbit0+set}" = set; then :
17622 $as_echo_n "(cached) " >&6
17623else
17624
17625 if test "$cross_compiling" = yes; then :
17626
17627 gl_cv_cc_long_double_expbit0="unknown"
17628
17629else
17630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17631/* end confdefs.h. */
17632
17633#include <float.h>
17634#include <stddef.h>
17635#include <stdio.h>
17636#include <string.h>
17637#define NWORDS \
17638 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
17639typedef union { long double value; unsigned int word[NWORDS]; }
17640 memory_long_double;
17641static unsigned int ored_words[NWORDS];
17642static unsigned int anded_words[NWORDS];
17643static void add_to_ored_words (long double x)
17644{
17645 memory_long_double m;
17646 size_t i;
17647 /* Clear it first, in case
17648 sizeof (long double) < sizeof (memory_long_double). */
17649 memset (&m, 0, sizeof (memory_long_double));
17650 m.value = x;
17651 for (i = 0; i < NWORDS; i++)
17652 {
17653 ored_words[i] |= m.word[i];
17654 anded_words[i] &= m.word[i];
17655 }
17656}
17657int main ()
17658{
17659 size_t j;
17660 FILE *fp = fopen ("conftest.out", "w");
17661 if (fp == NULL)
17662 return 1;
17663 for (j = 0; j < NWORDS; j++)
17664 anded_words[j] = ~ (unsigned int) 0;
17665 add_to_ored_words (0.25L);
17666 add_to_ored_words (0.5L);
17667 add_to_ored_words (1.0L);
17668 add_to_ored_words (2.0L);
17669 add_to_ored_words (4.0L);
17670 /* Remove bits that are common (e.g. if representation of the first mantissa
17671 bit is explicit). */
17672 for (j = 0; j < NWORDS; j++)
17673 ored_words[j] &= ~anded_words[j];
17674 /* Now find the nonzero word. */
17675 for (j = 0; j < NWORDS; j++)
17676 if (ored_words[j] != 0)
17677 break;
17678 if (j < NWORDS)
17679 {
17680 size_t i;
17681 for (i = j + 1; i < NWORDS; i++)
17682 if (ored_words[i] != 0)
17683 {
17684 fprintf (fp, "unknown");
17685 return (fclose (fp) != 0);
17686 }
17687 for (i = 0; ; i++)
17688 if ((ored_words[j] >> i) & 1)
17689 {
17690 fprintf (fp, "word %d bit %d", (int) j, (int) i);
17691 return (fclose (fp) != 0);
17692 }
17693 }
17694 fprintf (fp, "unknown");
17695 return (fclose (fp) != 0);
17696}
17697
17698_ACEOF
17699if ac_fn_c_try_run "$LINENO"; then :
17700 gl_cv_cc_long_double_expbit0=`cat conftest.out`
17701else
17702 gl_cv_cc_long_double_expbit0="unknown"
17703fi
17704rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17705 conftest.$ac_objext conftest.beam conftest.$ac_ext
17706fi
17707
17708 rm -f conftest.out
17709
17710fi
17711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
17712$as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
17713 case "$gl_cv_cc_long_double_expbit0" in
17714 word*bit*)
17715 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
17716 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
17717
17718cat >>confdefs.h <<_ACEOF
17719#define LDBL_EXPBIT0_WORD $word
17720_ACEOF
17721
17722
17723cat >>confdefs.h <<_ACEOF
17724#define LDBL_EXPBIT0_BIT $bit
17725_ACEOF
17726
17727 ;;
17728 esac
17729
17730
17731
17732 fi
17733
17734
17735
17736
88b48903
WN
17737
17738
17739
17740
2196f55f 17741
49e4877c 17742
88b48903
WN
17743 LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
17744
17745
17746
17747
f45c62c4
YQ
17748 if test $ac_cv_func_lstat = yes; then
17749
17750 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
17751 *no)
17752 REPLACE_LSTAT=1
17753 ;;
17754 esac
17755 else
17756 HAVE_LSTAT=0
17757 fi
17758
17759 if test $REPLACE_LSTAT = 1; then
17760
17761
17762
17763
17764
17765
17766
17767
17768 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
17769
17770 :
17771 fi
17772
17773
17774
17775
17776
17777 GNULIB_LSTAT=1
17778
17779
17780
17781
17782
17783$as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
17784
17785
17786
17787
17788
17789
6a29c58e
YQ
17790 if test $gl_cv_func_malloc_posix = yes; then
17791
17792$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
17793
17794 else
17795 REPLACE_MALLOC=1
17796 fi
17797
17798 if test $REPLACE_MALLOC = 1; then
17799
17800
17801
17802
17803
17804
17805
17806
17807 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
17808
17809 fi
17810
17811
17812
17813
17814
17815 GNULIB_MALLOC_POSIX=1
17816
17817
17818
17819
17820
17821$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
17822
17823
17824
17825
17826
17827
88b48903
WN
17828
17829
17830
17831
17832
88b48903 17833
c971b7fa 17834
c971b7fa 17835
98399780
YQ
17836
17837
17838
17839
88b48903
WN
17840 if test $gl_cv_have_include_next = yes; then
17841 gl_cv_next_math_h='<'math.h'>'
17842 else
17843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
17844$as_echo_n "checking absolute name of <math.h>... " >&6; }
17845if test "${gl_cv_next_math_h+set}" = set; then :
17846 $as_echo_n "(cached) " >&6
17847else
c971b7fa 17848
88b48903 17849 if test $ac_cv_header_math_h = yes; then
c971b7fa
PA
17850
17851
4a626d0a
PA
17852
17853
17854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 17855/* end confdefs.h. */
88b48903 17856#include <math.h>
8690e634 17857_ACEOF
4a626d0a
PA
17858 case "$host_os" in
17859 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17860 *) gl_absname_cpp="$ac_cpp" ;;
17861 esac
17862
17863 case "$host_os" in
17864 mingw*)
17865 gl_dirsep_regex='[/\\]'
17866 ;;
17867 *)
17868 gl_dirsep_regex='\/'
17869 ;;
17870 esac
17871 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17872 gl_header_literal_regex=`echo 'math.h' \
17873 | sed -e "$gl_make_literal_regex_sed"`
17874 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17875 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17876 s|^/[^/]|//&|
17877 p
17878 q
17879 }'
17880
17881 gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17882 sed -n "$gl_absolute_header_sed"`
17883
17884 gl_header=$gl_cv_absolute_math_h
17885 gl_cv_next_math_h='"'$gl_header'"'
88b48903
WN
17886 else
17887 gl_cv_next_math_h='<'math.h'>'
17888 fi
8690e634 17889
c971b7fa 17890
88b48903
WN
17891fi
17892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
17893$as_echo "$gl_cv_next_math_h" >&6; }
17894 fi
17895 NEXT_MATH_H=$gl_cv_next_math_h
c971b7fa 17896
88b48903
WN
17897 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17898 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17899 gl_next_as_first_directive='<'math.h'>'
17900 else
17901 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17902 gl_next_as_first_directive=$gl_cv_next_math_h
17903 fi
17904 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
8690e634 17905
c971b7fa 17906
c971b7fa
PA
17907
17908
c971b7fa 17909
88b48903
WN
17910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
17911$as_echo_n "checking whether NAN macro works... " >&6; }
17912if test "${gl_cv_header_math_nan_works+set}" = set; then :
c971b7fa
PA
17913 $as_echo_n "(cached) " >&6
17914else
8690e634
JK
17915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17916/* end confdefs.h. */
88b48903 17917#include <math.h>
c971b7fa
PA
17918int
17919main ()
17920{
88b48903
WN
17921/* Solaris 10 has a broken definition of NAN. Other platforms
17922 fail to provide NAN, or provide it only in C99 mode; this
17923 test only needs to fail when NAN is provided but wrong. */
17924 float f = 1.0f;
17925#ifdef NAN
17926 f = NAN;
17927#endif
17928 return f == 0;
c971b7fa
PA
17929 ;
17930 return 0;
17931}
17932_ACEOF
17933if ac_fn_c_try_compile "$LINENO"; then :
88b48903 17934 gl_cv_header_math_nan_works=yes
8690e634 17935else
88b48903 17936 gl_cv_header_math_nan_works=no
c971b7fa
PA
17937fi
17938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 17939fi
88b48903
WN
17940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
17941$as_echo "$gl_cv_header_math_nan_works" >&6; }
17942 if test $gl_cv_header_math_nan_works = no; then
17943 REPLACE_NAN=1
c971b7fa 17944 fi
88b48903
WN
17945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
17946$as_echo_n "checking whether HUGE_VAL works... " >&6; }
17947if test "${gl_cv_header_math_huge_val_works+set}" = set; then :
c971b7fa
PA
17948 $as_echo_n "(cached) " >&6
17949else
8690e634 17950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 17951/* end confdefs.h. */
88b48903 17952#include <math.h>
c971b7fa
PA
17953int
17954main ()
17955{
88b48903
WN
17956/* Solaris 10 has a broken definition of HUGE_VAL. */
17957 double d = HUGE_VAL;
17958 return d == 0;
c971b7fa
PA
17959 ;
17960 return 0;
17961}
17962_ACEOF
17963if ac_fn_c_try_compile "$LINENO"; then :
88b48903 17964 gl_cv_header_math_huge_val_works=yes
8690e634 17965else
88b48903 17966 gl_cv_header_math_huge_val_works=no
c971b7fa
PA
17967fi
17968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 17969fi
88b48903
WN
17970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
17971$as_echo "$gl_cv_header_math_huge_val_works" >&6; }
17972 if test $gl_cv_header_math_huge_val_works = no; then
17973 REPLACE_HUGE_VAL=1
8690e634 17974 fi
c971b7fa 17975
c971b7fa 17976
88b48903
WN
17977 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
17978 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
17979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
17980$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
17981if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
8690e634
JK
17982 $as_echo_n "(cached) " >&6
17983else
17984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17985/* end confdefs.h. */
88b48903 17986#include <math.h>
8690e634
JK
17987int
17988main ()
17989{
88b48903
WN
17990#undef $gl_func
17991 (void) $gl_func;
8690e634
JK
17992 ;
17993 return 0;
17994}
17995_ACEOF
17996if ac_fn_c_try_compile "$LINENO"; then :
88b48903 17997 eval "$as_gl_Symbol=yes"
c971b7fa 17998else
88b48903 17999 eval "$as_gl_Symbol=no"
c971b7fa 18000fi
8690e634
JK
18001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18002fi
88b48903
WN
18003eval ac_res=\$$as_gl_Symbol
18004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18005$as_echo "$ac_res" >&6; }
18006 eval as_val=\$$as_gl_Symbol
18007 if test "x$as_val" = x""yes; then :
18008 cat >>confdefs.h <<_ACEOF
18009#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18010_ACEOF
c971b7fa 18011
88b48903
WN
18012 eval ac_cv_have_decl_$gl_func=yes
18013fi
18014 done
c971b7fa
PA
18015
18016
18017
18018
18019
c971b7fa 18020
c971b7fa 18021
c971b7fa 18022
c971b7fa
PA
18023
18024
c971b7fa 18025
8690e634
JK
18026
18027 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
18028
18029
18030
18031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
18032$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
18033if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
c971b7fa
PA
18034 $as_echo_n "(cached) " >&6
18035else
8690e634
JK
18036
18037 case "$host_os" in
18038 # Guess no on AIX and OSF/1.
18039 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
18040 # Guess yes otherwise.
18041 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
18042 esac
18043 if test $LOCALE_JA != none; then
18044 if test "$cross_compiling" = yes; then :
18045 :
18046else
c971b7fa
PA
18047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18048/* end confdefs.h. */
c971b7fa 18049
8690e634
JK
18050#include <locale.h>
18051#include <string.h>
18052/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18053 <wchar.h>.
18054 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18055 included before <wchar.h>. */
18056#include <stddef.h>
18057#include <stdio.h>
18058#include <time.h>
18059#include <wchar.h>
18060int main ()
c971b7fa 18061{
8690e634
JK
18062 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
18063 {
18064 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
18065 mbstate_t state;
18066 wchar_t wc;
18067
18068 memset (&state, '\0', sizeof (mbstate_t));
18069 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
18070 if (mbsinit (&state))
18071 return 1;
18072 }
c971b7fa
PA
18073 return 0;
18074}
18075_ACEOF
8690e634
JK
18076if ac_fn_c_try_run "$LINENO"; then :
18077 gl_cv_func_mbrtowc_incomplete_state=yes
c971b7fa 18078else
8690e634 18079 gl_cv_func_mbrtowc_incomplete_state=no
c971b7fa 18080fi
8690e634
JK
18081rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18082 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 18083fi
c971b7fa 18084
8690e634 18085 fi
c971b7fa 18086
8690e634
JK
18087fi
18088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
18089$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
c971b7fa 18090
c971b7fa 18091
c971b7fa 18092
c971b7fa 18093
8690e634
JK
18094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
18095$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
18096if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
c971b7fa
PA
18097 $as_echo_n "(cached) " >&6
18098else
18099
8690e634
JK
18100 case "$host_os" in
18101 # Guess no on Solaris 8.
18102 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
18103 # Guess yes otherwise.
18104 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
18105 esac
18106 if test $LOCALE_ZH_CN != none; then
18107 if test "$cross_compiling" = yes; then :
18108 :
18109else
18110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
18111/* end confdefs.h. */
18112
8690e634
JK
18113#include <locale.h>
18114#include <stdlib.h>
18115#include <string.h>
18116/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18117 <wchar.h>.
18118 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18119 included before <wchar.h>. */
18120#include <stddef.h>
18121#include <stdio.h>
18122#include <time.h>
18123#include <wchar.h>
18124int main ()
c971b7fa 18125{
8690e634
JK
18126 /* This fails on Solaris 8:
18127 mbrtowc returns 2, and sets wc to 0x00F0.
18128 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
18129 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
18130 {
18131 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
18132 mbstate_t state;
18133 wchar_t wc;
18134
18135 memset (&state, '\0', sizeof (mbstate_t));
18136 if (mbrtowc (&wc, input + 3, 6, &state) != 4
18137 && mbtowc (&wc, input + 3, 6) == 4)
18138 return 1;
18139 }
c971b7fa
PA
18140 return 0;
18141}
18142_ACEOF
8690e634
JK
18143if ac_fn_c_try_run "$LINENO"; then :
18144 gl_cv_func_mbrtowc_sanitycheck=yes
c971b7fa 18145else
8690e634 18146 gl_cv_func_mbrtowc_sanitycheck=no
c971b7fa 18147fi
8690e634
JK
18148rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18149 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 18150fi
c971b7fa 18151
8690e634 18152 fi
c971b7fa 18153
8690e634
JK
18154fi
18155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
18156$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
18157
18158 REPLACE_MBSTATE_T=0
18159 case "$gl_cv_func_mbrtowc_incomplete_state" in
18160 *yes) ;;
18161 *) REPLACE_MBSTATE_T=1 ;;
18162 esac
18163 case "$gl_cv_func_mbrtowc_sanitycheck" in
18164 *yes) ;;
18165 *) REPLACE_MBSTATE_T=1 ;;
18166 esac
c971b7fa 18167 else
8690e634 18168 REPLACE_MBSTATE_T=1
c971b7fa
PA
18169 fi
18170
18171
18172
8690e634
JK
18173 if test $ac_cv_func_mbrtowc = no; then
18174 HAVE_MBRTOWC=0
18175 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
18176/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18177 <wchar.h>.
18178 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18179 included before <wchar.h>. */
18180#include <stddef.h>
18181#include <stdio.h>
18182#include <time.h>
18183#include <wchar.h>
c971b7fa 18184
8690e634
JK
18185"
18186if test "x$ac_cv_have_decl_mbrtowc" = x""yes; then :
18187 ac_have_decl=1
18188else
18189 ac_have_decl=0
c971b7fa 18190fi
c971b7fa 18191
8690e634
JK
18192cat >>confdefs.h <<_ACEOF
18193#define HAVE_DECL_MBRTOWC $ac_have_decl
18194_ACEOF
c971b7fa 18195
8690e634
JK
18196 if test $ac_cv_have_decl_mbrtowc = yes; then
18197 REPLACE_MBRTOWC=1
18198 fi
18199 else
18200 if test $REPLACE_MBSTATE_T = 1; then
18201 REPLACE_MBRTOWC=1
18202 else
c971b7fa
PA
18203
18204
18205
8690e634
JK
18206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
18207$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
18208if test "${gl_cv_func_mbrtowc_null_arg1+set}" = set; then :
18209 $as_echo_n "(cached) " >&6
c971b7fa 18210else
c971b7fa 18211
8690e634
JK
18212 case "$host_os" in
18213 # Guess no on Solaris.
18214 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
18215 # Guess yes otherwise.
18216 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
18217 esac
18218 if test $LOCALE_FR_UTF8 != none; then
18219 if test "$cross_compiling" = yes; then :
18220 :
18221else
18222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
18223/* end confdefs.h. */
18224
8690e634
JK
18225#include <locale.h>
18226#include <stdlib.h>
18227#include <string.h>
18228/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18229 <wchar.h>.
18230 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18231 included before <wchar.h>. */
18232#include <stddef.h>
18233#include <stdio.h>
18234#include <time.h>
18235#include <wchar.h>
18236int main ()
18237{
18238 int result = 0;
18239
18240 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
18241 {
18242 char input[] = "\303\237er";
18243 mbstate_t state;
18244 wchar_t wc;
18245 size_t ret;
18246
18247 memset (&state, '\0', sizeof (mbstate_t));
18248 wc = (wchar_t) 0xBADFACE;
18249 ret = mbrtowc (&wc, input, 5, &state);
18250 if (ret != 2)
18251 result |= 1;
18252 if (!mbsinit (&state))
18253 result |= 2;
c971b7fa 18254
8690e634
JK
18255 memset (&state, '\0', sizeof (mbstate_t));
18256 ret = mbrtowc (NULL, input, 5, &state);
18257 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
18258 result |= 4;
18259 if (!mbsinit (&state))
18260 result |= 8;
18261 }
18262 return result;
18263}
c971b7fa 18264_ACEOF
8690e634
JK
18265if ac_fn_c_try_run "$LINENO"; then :
18266 gl_cv_func_mbrtowc_null_arg1=yes
18267else
18268 gl_cv_func_mbrtowc_null_arg1=no
18269fi
18270rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18271 conftest.$ac_objext conftest.beam conftest.$ac_ext
18272fi
c971b7fa 18273
8690e634 18274 fi
c971b7fa 18275
c971b7fa 18276fi
8690e634
JK
18277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
18278$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
c971b7fa 18279
c971b7fa 18280
c971b7fa 18281
c971b7fa 18282
8690e634
JK
18283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
18284$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
18285if test "${gl_cv_func_mbrtowc_null_arg2+set}" = set; then :
18286 $as_echo_n "(cached) " >&6
18287else
c971b7fa 18288
8690e634
JK
18289 case "$host_os" in
18290 # Guess no on OSF/1.
18291 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
18292 # Guess yes otherwise.
18293 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
18294 esac
18295 if test $LOCALE_FR_UTF8 != none; then
18296 if test "$cross_compiling" = yes; then :
c971b7fa 18297 :
8690e634
JK
18298else
18299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18300/* end confdefs.h. */
18301
18302#include <locale.h>
18303#include <string.h>
18304/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18305 <wchar.h>.
18306 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18307 included before <wchar.h>. */
18308#include <stddef.h>
18309#include <stdio.h>
18310#include <time.h>
18311#include <wchar.h>
18312int main ()
18313{
18314 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
18315 {
18316 mbstate_t state;
18317 wchar_t wc;
18318 int ret;
18319
18320 memset (&state, '\0', sizeof (mbstate_t));
18321 wc = (wchar_t) 0xBADFACE;
18322 mbrtowc (&wc, NULL, 5, &state);
18323 /* Check that wc was not modified. */
18324 if (wc != (wchar_t) 0xBADFACE)
18325 return 1;
18326 }
18327 return 0;
18328}
18329_ACEOF
18330if ac_fn_c_try_run "$LINENO"; then :
18331 gl_cv_func_mbrtowc_null_arg2=yes
18332else
18333 gl_cv_func_mbrtowc_null_arg2=no
18334fi
18335rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18336 conftest.$ac_objext conftest.beam conftest.$ac_ext
18337fi
18338
18339 fi
18340
18341fi
18342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
18343$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
c971b7fa
PA
18344
18345
18346
18347
18348
18349
8690e634
JK
18350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
18351$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
18352if test "${gl_cv_func_mbrtowc_retval+set}" = set; then :
18353 $as_echo_n "(cached) " >&6
18354else
18355
18356 case "$host_os" in
18357 # Guess no on HP-UX, Solaris, native Windows.
18358 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
18359 # Guess yes otherwise.
18360 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
18361 esac
18362 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
18363 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
18364 if test "$cross_compiling" = yes; then :
c971b7fa 18365 :
8690e634
JK
18366else
18367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18368/* end confdefs.h. */
c971b7fa 18369
8690e634
JK
18370#include <locale.h>
18371#include <string.h>
18372/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18373 <wchar.h>.
18374 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18375 included before <wchar.h>. */
18376#include <stddef.h>
18377#include <stdio.h>
18378#include <time.h>
18379#include <wchar.h>
18380int main ()
18381{
18382 int result = 0;
18383 int found_some_locale = 0;
18384 /* This fails on Solaris. */
18385 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
18386 {
18387 char input[] = "B\303\274\303\237er"; /* "Büßer" */
18388 mbstate_t state;
18389 wchar_t wc;
18390
18391 memset (&state, '\0', sizeof (mbstate_t));
18392 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
18393 {
18394 input[1] = '\0';
18395 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
18396 result |= 1;
18397 }
18398 found_some_locale = 1;
18399 }
18400 /* This fails on HP-UX 11.11. */
18401 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
18402 {
18403 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
18404 mbstate_t state;
18405 wchar_t wc;
18406
18407 memset (&state, '\0', sizeof (mbstate_t));
18408 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
18409 {
18410 input[1] = '\0';
18411 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
18412 result |= 2;
18413 }
18414 found_some_locale = 1;
18415 }
18416 /* This fails on native Windows. */
18417 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
18418 {
18419 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
18420 mbstate_t state;
18421 wchar_t wc;
18422
18423 memset (&state, '\0', sizeof (mbstate_t));
18424 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
18425 {
18426 input[3] = '\0';
18427 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
18428 result |= 4;
18429 }
18430 found_some_locale = 1;
18431 }
18432 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
18433 {
18434 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
18435 mbstate_t state;
18436 wchar_t wc;
18437
18438 memset (&state, '\0', sizeof (mbstate_t));
18439 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
18440 {
18441 input[3] = '\0';
18442 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
18443 result |= 8;
18444 }
18445 found_some_locale = 1;
18446 }
18447 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
18448 {
18449 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
18450 mbstate_t state;
18451 wchar_t wc;
18452
18453 memset (&state, '\0', sizeof (mbstate_t));
18454 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
18455 {
18456 input[3] = '\0';
18457 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
18458 result |= 16;
18459 }
18460 found_some_locale = 1;
18461 }
18462 return (found_some_locale ? result : 77);
18463}
18464_ACEOF
18465if ac_fn_c_try_run "$LINENO"; then :
18466 gl_cv_func_mbrtowc_retval=yes
18467else
18468 if test $? != 77; then
18469 gl_cv_func_mbrtowc_retval=no
18470 fi
c971b7fa 18471
8690e634
JK
18472fi
18473rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18474 conftest.$ac_objext conftest.beam conftest.$ac_ext
18475fi
c971b7fa 18476
8690e634 18477 fi
c971b7fa 18478
8690e634
JK
18479fi
18480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
18481$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
c971b7fa
PA
18482
18483
18484
18485
8690e634
JK
18486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
18487$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
18488if test "${gl_cv_func_mbrtowc_nul_retval+set}" = set; then :
c971b7fa
PA
18489 $as_echo_n "(cached) " >&6
18490else
8690e634
JK
18491
18492 case "$host_os" in
18493 # Guess no on Solaris 8 and 9.
18494 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
18495 # Guess yes otherwise.
18496 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
18497 esac
18498 if test $LOCALE_ZH_CN != none; then
18499 if test "$cross_compiling" = yes; then :
18500 :
c971b7fa
PA
18501else
18502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18503/* end confdefs.h. */
18504
8690e634 18505#include <locale.h>
c971b7fa 18506#include <string.h>
8690e634
JK
18507/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18508 <wchar.h>.
18509 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18510 included before <wchar.h>. */
18511#include <stddef.h>
18512#include <stdio.h>
18513#include <time.h>
18514#include <wchar.h>
18515int main ()
c971b7fa 18516{
8690e634
JK
18517 /* This fails on Solaris 8 and 9. */
18518 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
c971b7fa 18519 {
8690e634
JK
18520 mbstate_t state;
18521 wchar_t wc;
c971b7fa 18522
8690e634
JK
18523 memset (&state, '\0', sizeof (mbstate_t));
18524 if (mbrtowc (&wc, "", 1, &state) != 0)
18525 return 1;
18526 }
c971b7fa
PA
18527 return 0;
18528}
18529_ACEOF
18530if ac_fn_c_try_run "$LINENO"; then :
8690e634 18531 gl_cv_func_mbrtowc_nul_retval=yes
c971b7fa 18532else
8690e634 18533 gl_cv_func_mbrtowc_nul_retval=no
c971b7fa
PA
18534fi
18535rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18536 conftest.$ac_objext conftest.beam conftest.$ac_ext
18537fi
18538
8690e634
JK
18539 fi
18540
c971b7fa 18541fi
8690e634
JK
18542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
18543$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
18544
4a626d0a
PA
18545
18546
18547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
18548$as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
18549if test "${gl_cv_func_mbrtowc_empty_input+set}" = set; then :
18550 $as_echo_n "(cached) " >&6
18551else
18552
18553 case "$host_os" in
18554 # Guess no on AIX and glibc systems.
18555 aix* | *-gnu*)
18556 gl_cv_func_mbrtowc_empty_input="guessing no" ;;
18557 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
18558 esac
18559 if test "$cross_compiling" = yes; then :
18560 :
18561else
18562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18563/* end confdefs.h. */
18564
18565 #include <wchar.h>
18566 static wchar_t wc;
18567 static mbstate_t mbs;
18568 int
18569 main (void)
18570 {
49e4877c 18571 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
4a626d0a
PA
18572 }
18573_ACEOF
18574if ac_fn_c_try_run "$LINENO"; then :
4a626d0a 18575 gl_cv_func_mbrtowc_empty_input=yes
49e4877c
PA
18576else
18577 gl_cv_func_mbrtowc_empty_input=no
4a626d0a
PA
18578fi
18579rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18580 conftest.$ac_objext conftest.beam conftest.$ac_ext
18581fi
18582
18583
18584fi
18585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
18586$as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
18587
49e4877c
PA
18588
18589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
18590$as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
18591if test "${gl_cv_C_locale_sans_EILSEQ+set}" = set; then :
18592 $as_echo_n "(cached) " >&6
18593else
18594
18595 gl_cv_C_locale_sans_EILSEQ="guessing no"
18596
18597 if test "$cross_compiling" = yes; then :
18598 :
18599else
18600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18601/* end confdefs.h. */
18602#include <limits.h>
18603 #include <locale.h>
18604 #include <wchar.h>
18605
18606int
18607main ()
18608{
18609
18610 int i;
18611 char *locale = setlocale (LC_ALL, "C");
18612 if (! locale)
18613 return 1;
18614 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
18615 {
18616 char c = i;
18617 wchar_t wc;
18618 mbstate_t mbs = { 0, };
18619 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
18620 if (1 < ss)
18621 return 1;
18622 }
18623 return 0;
18624
6ec2e0f5
SDJ
18625 ;
18626 return 0;
18627}
18628_ACEOF
18629if ac_fn_c_try_run "$LINENO"; then :
18630 gl_cv_C_locale_sans_EILSEQ=yes
18631else
18632 gl_cv_C_locale_sans_EILSEQ=no
18633fi
18634rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18635 conftest.$ac_objext conftest.beam conftest.$ac_ext
18636fi
18637
18638fi
18639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5
18640$as_echo "$gl_cv_C_locale_sans_EILSEQ" >&6; }
18641
18642 case "$gl_cv_func_mbrtowc_null_arg1" in
18643 *yes) ;;
18644 *)
18645$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
18646
18647 REPLACE_MBRTOWC=1
18648 ;;
18649 esac
18650 case "$gl_cv_func_mbrtowc_null_arg2" in
18651 *yes) ;;
18652 *)
18653$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
18654
18655 REPLACE_MBRTOWC=1
18656 ;;
18657 esac
18658 case "$gl_cv_func_mbrtowc_retval" in
18659 *yes) ;;
18660 *)
18661$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
18662
18663 REPLACE_MBRTOWC=1
18664 ;;
18665 esac
18666 case "$gl_cv_func_mbrtowc_nul_retval" in
18667 *yes) ;;
18668 *)
18669$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
18670
18671 REPLACE_MBRTOWC=1
18672 ;;
18673 esac
18674 case "$gl_cv_func_mbrtowc_empty_input" in
18675 *yes) ;;
18676 *)
18677$as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
18678
18679 REPLACE_MBRTOWC=1
18680 ;;
18681 esac
18682 case $gl_cv_C_locale_sans_EILSEQ in
18683 *yes) ;;
18684 *)
18685$as_echo "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
18686
18687 REPLACE_MBRTOWC=1
18688 ;;
18689 esac
18690 fi
18691 fi
18692
18693 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
18694
18695
18696
18697
18698
18699
18700
18701
18702 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
18703
18704
18705 :
18706
18707 fi
18708
18709
18710
18711
18712
18713 GNULIB_MBRTOWC=1
18714
18715
18716
18717
18718
18719$as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
18720
18721
18722
18723
18724
18725
18726
18727
18728
18729
18730
18731
18732
18733
18734 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
18735
18736
18737
18738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
18739$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
18740if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
18741 $as_echo_n "(cached) " >&6
18742else
18743
18744 case "$host_os" in
18745 # Guess no on AIX and OSF/1.
18746 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
18747 # Guess yes otherwise.
18748 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
18749 esac
18750 if test $LOCALE_JA != none; then
18751 if test "$cross_compiling" = yes; then :
18752 :
18753else
18754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18755/* end confdefs.h. */
18756
18757#include <locale.h>
18758#include <string.h>
18759/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18760 <wchar.h>.
18761 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18762 included before <wchar.h>. */
18763#include <stddef.h>
18764#include <stdio.h>
18765#include <time.h>
18766#include <wchar.h>
18767int main ()
18768{
18769 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
18770 {
18771 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
18772 mbstate_t state;
18773 wchar_t wc;
18774
18775 memset (&state, '\0', sizeof (mbstate_t));
18776 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
18777 if (mbsinit (&state))
18778 return 1;
18779 }
18780 return 0;
18781}
18782_ACEOF
18783if ac_fn_c_try_run "$LINENO"; then :
18784 gl_cv_func_mbrtowc_incomplete_state=yes
18785else
18786 gl_cv_func_mbrtowc_incomplete_state=no
18787fi
18788rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18789 conftest.$ac_objext conftest.beam conftest.$ac_ext
18790fi
18791
18792 fi
18793
18794fi
18795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
18796$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
18797
18798
18799
18800
18801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
18802$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
18803if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
18804 $as_echo_n "(cached) " >&6
18805else
18806
18807 case "$host_os" in
18808 # Guess no on Solaris 8.
18809 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
18810 # Guess yes otherwise.
18811 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
18812 esac
18813 if test $LOCALE_ZH_CN != none; then
18814 if test "$cross_compiling" = yes; then :
18815 :
18816else
18817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18818/* end confdefs.h. */
18819
18820#include <locale.h>
18821#include <stdlib.h>
18822#include <string.h>
18823/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18824 <wchar.h>.
18825 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18826 included before <wchar.h>. */
18827#include <stddef.h>
18828#include <stdio.h>
18829#include <time.h>
18830#include <wchar.h>
18831int main ()
18832{
18833 /* This fails on Solaris 8:
18834 mbrtowc returns 2, and sets wc to 0x00F0.
18835 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
18836 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
18837 {
18838 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
18839 mbstate_t state;
18840 wchar_t wc;
18841
18842 memset (&state, '\0', sizeof (mbstate_t));
18843 if (mbrtowc (&wc, input + 3, 6, &state) != 4
18844 && mbtowc (&wc, input + 3, 6) == 4)
18845 return 1;
18846 }
49e4877c
PA
18847 return 0;
18848}
18849_ACEOF
18850if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 18851 gl_cv_func_mbrtowc_sanitycheck=yes
49e4877c 18852else
6ec2e0f5 18853 gl_cv_func_mbrtowc_sanitycheck=no
49e4877c
PA
18854fi
18855rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18856 conftest.$ac_objext conftest.beam conftest.$ac_ext
18857fi
18858
6ec2e0f5
SDJ
18859 fi
18860
49e4877c 18861fi
6ec2e0f5
SDJ
18862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
18863$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
49e4877c 18864
6ec2e0f5
SDJ
18865 REPLACE_MBSTATE_T=0
18866 case "$gl_cv_func_mbrtowc_incomplete_state" in
18867 *yes) ;;
18868 *) REPLACE_MBSTATE_T=1 ;;
18869 esac
18870 case "$gl_cv_func_mbrtowc_sanitycheck" in
18871 *yes) ;;
18872 *) REPLACE_MBSTATE_T=1 ;;
18873 esac
18874 else
18875 REPLACE_MBSTATE_T=1
18876 fi
8690e634 18877
8690e634 18878
8690e634 18879
6ec2e0f5
SDJ
18880 if test $ac_cv_func_mbsinit = no; then
18881 HAVE_MBSINIT=0
18882 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
18883/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18884 <wchar.h>.
18885 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18886 included before <wchar.h>. */
18887#include <stddef.h>
18888#include <stdio.h>
18889#include <time.h>
18890#include <wchar.h>
8690e634 18891
6ec2e0f5
SDJ
18892"
18893if test "x$ac_cv_have_decl_mbsinit" = x""yes; then :
18894 ac_have_decl=1
18895else
18896 ac_have_decl=0
18897fi
4a626d0a 18898
6ec2e0f5
SDJ
18899cat >>confdefs.h <<_ACEOF
18900#define HAVE_DECL_MBSINIT $ac_have_decl
18901_ACEOF
49e4877c 18902
6ec2e0f5
SDJ
18903 if test $ac_cv_have_decl_mbsinit = yes; then
18904 REPLACE_MBSINIT=1
18905 fi
18906 else
18907 if test $REPLACE_MBSTATE_T = 1; then
18908 REPLACE_MBSINIT=1
18909 else
18910 case "$host_os" in
18911 mingw*) REPLACE_MBSINIT=1 ;;
8690e634 18912 esac
c971b7fa
PA
18913 fi
18914 fi
18915
6ec2e0f5 18916 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
c971b7fa 18917
c971b7fa 18918
c971b7fa
PA
18919
18920
18921
18922
18923
18924
6ec2e0f5 18925 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
8690e634
JK
18926
18927
18928 :
c971b7fa 18929
a512b375 18930 fi
c971b7fa 18931
8690e634
JK
18932
18933
18934
18935
6ec2e0f5 18936 GNULIB_MBSINIT=1
8690e634
JK
18937
18938
18939
18940
8690e634 18941
6ec2e0f5 18942$as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
8690e634
JK
18943
18944
18945
18946
18947
18948
18949
18950
18951
18952
18953
c971b7fa 18954
c971b7fa 18955
8690e634 18956 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
c971b7fa 18957
8690e634
JK
18958
18959
18960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
18961$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
18962if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
18963 $as_echo_n "(cached) " >&6
18964else
18965
18966 case "$host_os" in
18967 # Guess no on AIX and OSF/1.
18968 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
18969 # Guess yes otherwise.
18970 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
18971 esac
18972 if test $LOCALE_JA != none; then
18973 if test "$cross_compiling" = yes; then :
18974 :
c971b7fa
PA
18975else
18976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18977/* end confdefs.h. */
18978
8690e634
JK
18979#include <locale.h>
18980#include <string.h>
18981/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18982 <wchar.h>.
18983 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18984 included before <wchar.h>. */
18985#include <stddef.h>
18986#include <stdio.h>
18987#include <time.h>
18988#include <wchar.h>
18989int main ()
c971b7fa 18990{
8690e634 18991 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
c971b7fa 18992 {
8690e634
JK
18993 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
18994 mbstate_t state;
18995 wchar_t wc;
18996
18997 memset (&state, '\0', sizeof (mbstate_t));
18998 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
18999 if (mbsinit (&state))
19000 return 1;
c971b7fa 19001 }
c971b7fa
PA
19002 return 0;
19003}
19004_ACEOF
19005if ac_fn_c_try_run "$LINENO"; then :
8690e634 19006 gl_cv_func_mbrtowc_incomplete_state=yes
c971b7fa 19007else
8690e634 19008 gl_cv_func_mbrtowc_incomplete_state=no
c971b7fa
PA
19009fi
19010rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19011 conftest.$ac_objext conftest.beam conftest.$ac_ext
19012fi
19013
8690e634 19014 fi
c971b7fa
PA
19015
19016fi
8690e634
JK
19017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
19018$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
c971b7fa
PA
19019
19020
c971b7fa
PA
19021
19022
8690e634
JK
19023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
19024$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
19025if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
c971b7fa
PA
19026 $as_echo_n "(cached) " >&6
19027else
8690e634
JK
19028
19029 case "$host_os" in
19030 # Guess no on Solaris 8.
19031 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
19032 # Guess yes otherwise.
19033 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
19034 esac
19035 if test $LOCALE_ZH_CN != none; then
19036 if test "$cross_compiling" = yes; then :
19037 :
19038else
c971b7fa
PA
19039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19040/* end confdefs.h. */
8690e634
JK
19041
19042#include <locale.h>
19043#include <stdlib.h>
19044#include <string.h>
19045/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19046 <wchar.h>.
19047 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19048 included before <wchar.h>. */
c971b7fa 19049#include <stddef.h>
8690e634
JK
19050#include <stdio.h>
19051#include <time.h>
19052#include <wchar.h>
19053int main ()
c971b7fa 19054{
8690e634
JK
19055 /* This fails on Solaris 8:
19056 mbrtowc returns 2, and sets wc to 0x00F0.
19057 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
19058 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
19059 {
19060 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
19061 mbstate_t state;
19062 wchar_t wc;
19063
19064 memset (&state, '\0', sizeof (mbstate_t));
19065 if (mbrtowc (&wc, input + 3, 6, &state) != 4
19066 && mbtowc (&wc, input + 3, 6) == 4)
19067 return 1;
19068 }
c971b7fa
PA
19069 return 0;
19070}
19071_ACEOF
8690e634
JK
19072if ac_fn_c_try_run "$LINENO"; then :
19073 gl_cv_func_mbrtowc_sanitycheck=yes
c971b7fa 19074else
8690e634 19075 gl_cv_func_mbrtowc_sanitycheck=no
c971b7fa 19076fi
8690e634
JK
19077rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19078 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 19079fi
c971b7fa 19080
8690e634
JK
19081 fi
19082
19083fi
19084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
19085$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
c971b7fa 19086
8690e634
JK
19087 REPLACE_MBSTATE_T=0
19088 case "$gl_cv_func_mbrtowc_incomplete_state" in
19089 *yes) ;;
19090 *) REPLACE_MBSTATE_T=1 ;;
19091 esac
19092 case "$gl_cv_func_mbrtowc_sanitycheck" in
19093 *yes) ;;
19094 *) REPLACE_MBSTATE_T=1 ;;
19095 esac
19096 else
19097 REPLACE_MBSTATE_T=1
c971b7fa
PA
19098 fi
19099
c971b7fa 19100
8690e634 19101
6ec2e0f5
SDJ
19102 if test $ac_cv_func_mbsrtowcs = no; then
19103 HAVE_MBSRTOWCS=0
19104 ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
8690e634
JK
19105/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19106 <wchar.h>.
19107 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19108 included before <wchar.h>. */
19109#include <stddef.h>
19110#include <stdio.h>
19111#include <time.h>
19112#include <wchar.h>
19113
19114"
6ec2e0f5 19115if test "x$ac_cv_have_decl_mbsrtowcs" = x""yes; then :
8690e634
JK
19116 ac_have_decl=1
19117else
19118 ac_have_decl=0
c971b7fa 19119fi
c971b7fa 19120
8690e634 19121cat >>confdefs.h <<_ACEOF
6ec2e0f5 19122#define HAVE_DECL_MBSRTOWCS $ac_have_decl
c971b7fa 19123_ACEOF
c971b7fa 19124
6ec2e0f5
SDJ
19125 if test $ac_cv_have_decl_mbsrtowcs = yes; then
19126 REPLACE_MBSRTOWCS=1
8690e634
JK
19127 fi
19128 else
19129 if test $REPLACE_MBSTATE_T = 1; then
6ec2e0f5 19130 REPLACE_MBSRTOWCS=1
8690e634 19131 else
6ec2e0f5
SDJ
19132
19133
19134
19135
19136
19137
19138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
19139$as_echo_n "checking whether mbsrtowcs works... " >&6; }
19140if test "${gl_cv_func_mbsrtowcs_works+set}" = set; then :
19141 $as_echo_n "(cached) " >&6
19142else
19143
19144 case "$host_os" in
19145 # Guess no on HP-UX, Solaris, mingw.
19146 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
19147 # Guess yes otherwise.
19148 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
19149 esac
19150 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
19151 if test "$cross_compiling" = yes; then :
19152 :
19153else
19154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19155/* end confdefs.h. */
19156
19157#include <locale.h>
19158#include <string.h>
19159/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19160 <wchar.h>.
19161 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19162 included before <wchar.h>. */
19163#include <stddef.h>
19164#include <stdio.h>
19165#include <time.h>
19166#include <wchar.h>
19167int main ()
19168{
19169 int result = 0;
19170 /* Test whether the function supports a NULL destination argument.
19171 This fails on native Windows. */
19172 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
19173 {
19174 const char input[] = "\337er";
19175 const char *src = input;
19176 mbstate_t state;
19177
19178 memset (&state, '\0', sizeof (mbstate_t));
19179 if (mbsrtowcs (NULL, &src, 1, &state) != 3
19180 || src != input)
19181 result |= 1;
19182 }
19183 /* Test whether the function works when started with a conversion state
19184 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
19185 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
19186 {
19187 const char input[] = "B\303\274\303\237er";
19188 mbstate_t state;
19189
19190 memset (&state, '\0', sizeof (mbstate_t));
19191 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
19192 if (!mbsinit (&state))
19193 {
19194 const char *src = input + 2;
19195 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
19196 result |= 2;
19197 }
19198 }
19199 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
19200 {
19201 const char input[] = "<\306\374\313\334\270\354>";
19202 mbstate_t state;
19203
19204 memset (&state, '\0', sizeof (mbstate_t));
19205 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
19206 if (!mbsinit (&state))
19207 {
19208 const char *src = input + 4;
19209 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
19210 result |= 4;
19211 }
19212 }
19213 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
19214 {
19215 const char input[] = "B\250\271\201\060\211\070er";
19216 mbstate_t state;
19217
19218 memset (&state, '\0', sizeof (mbstate_t));
19219 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
19220 if (!mbsinit (&state))
19221 {
19222 const char *src = input + 2;
19223 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
19224 result |= 8;
19225 }
19226 }
19227 return result;
19228}
19229_ACEOF
19230if ac_fn_c_try_run "$LINENO"; then :
19231 gl_cv_func_mbsrtowcs_works=yes
19232else
19233 gl_cv_func_mbsrtowcs_works=no
19234fi
19235rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19236 conftest.$ac_objext conftest.beam conftest.$ac_ext
19237fi
19238
19239 fi
19240
19241fi
19242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
19243$as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
19244
19245 case "$gl_cv_func_mbsrtowcs_works" in
19246 *yes) ;;
19247 *) REPLACE_MBSRTOWCS=1 ;;
8690e634
JK
19248 esac
19249 fi
19250 fi
c971b7fa 19251
6ec2e0f5 19252 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
c971b7fa
PA
19253
19254
19255
19256
19257
19258
19259
19260
6ec2e0f5
SDJ
19261 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
19262
19263
19264
19265
19266
19267
19268
19269
19270
19271 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
c971b7fa
PA
19272
19273
8690e634 19274 :
c971b7fa 19275
a512b375 19276 fi
c971b7fa 19277
c971b7fa 19278
c971b7fa 19279
c971b7fa
PA
19280
19281
6ec2e0f5 19282 GNULIB_MBSRTOWCS=1
c971b7fa 19283
c971b7fa
PA
19284
19285
19286
19287
6ec2e0f5 19288$as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
c971b7fa
PA
19289
19290
c971b7fa 19291
c971b7fa 19292
6ec2e0f5 19293 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
c971b7fa
PA
19294
19295
19296
c971b7fa 19297
c971b7fa
PA
19298
19299
19300
19301
6ec2e0f5 19302 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
8690e634 19303
c971b7fa 19304
6ec2e0f5
SDJ
19305 for ac_header in bp-sym.h
19306do :
19307 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
19308if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
19309 cat >>confdefs.h <<_ACEOF
19310#define HAVE_BP_SYM_H 1
19311_ACEOF
c971b7fa 19312
6ec2e0f5 19313fi
c971b7fa 19314
6ec2e0f5
SDJ
19315done
19316
19317
19318 fi
19319
19320
19321
19322
19323
19324 GNULIB_MEMCHR=1
19325
19326
19327
19328
19329
19330$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
19331
19332
19333
19334
19335
19336 if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
19337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
19338$as_echo_n "checking whether memmem works in linear time... " >&6; }
19339if test "${gl_cv_func_memmem_works_fast+set}" = set; then :
8690e634
JK
19340 $as_echo_n "(cached) " >&6
19341else
6ec2e0f5
SDJ
19342 if test "$cross_compiling" = yes; then :
19343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19344/* end confdefs.h. */
19345
19346#include <features.h>
19347#ifdef __GNU_LIBRARY__
19348 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)) \
19349 && !defined __UCLIBC__
19350 Lucky user
19351 #endif
19352#endif
19353#ifdef __CYGWIN__
19354 #include <cygwin/version.h>
19355 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 0)
19356 Lucky user
19357 #endif
19358#endif
19359
19360_ACEOF
19361if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19362 $EGREP "Lucky user" >/dev/null 2>&1; then :
19363 gl_cv_func_memmem_works_fast="guessing yes"
19364else
19365 gl_cv_func_memmem_works_fast="guessing no"
19366fi
19367rm -f conftest*
19368
c971b7fa 19369
8690e634
JK
19370else
19371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 19372/* end confdefs.h. */
c971b7fa 19373
6ec2e0f5
SDJ
19374#include <signal.h> /* for signal */
19375#include <string.h> /* for memmem */
19376#include <stdlib.h> /* for malloc */
19377#include <unistd.h> /* for alarm */
19378static void quit (int sig) { _exit (sig + 128); }
19379
19380int
19381main ()
8690e634 19382{
8690e634 19383
6ec2e0f5
SDJ
19384 int result = 0;
19385 size_t m = 1000000;
19386 char *haystack = (char *) malloc (2 * m + 1);
19387 char *needle = (char *) malloc (m + 1);
19388 /* Failure to compile this test due to missing alarm is okay,
19389 since all such platforms (mingw) also lack memmem. */
19390 signal (SIGALRM, quit);
19391 alarm (5);
19392 /* Check for quadratic performance. */
19393 if (haystack && needle)
19394 {
19395 memset (haystack, 'A', 2 * m);
19396 haystack[2 * m] = 'B';
19397 memset (needle, 'A', m);
19398 needle[m] = 'B';
19399 if (!memmem (haystack, 2 * m + 1, needle, m + 1))
19400 result |= 1;
19401 }
19402 return result;
19403
19404 ;
c971b7fa
PA
19405 return 0;
19406}
19407_ACEOF
8690e634 19408if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 19409 gl_cv_func_memmem_works_fast=yes
8690e634 19410else
6ec2e0f5 19411 gl_cv_func_memmem_works_fast=no
8690e634
JK
19412fi
19413rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19414 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 19415fi
c971b7fa
PA
19416
19417
8690e634 19418fi
6ec2e0f5
SDJ
19419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_fast" >&5
19420$as_echo "$gl_cv_func_memmem_works_fast" >&6; }
19421 case "$gl_cv_func_memmem_works_fast" in
19422 *yes) ;;
19423 *)
19424 REPLACE_MEMMEM=1
19425 ;;
19426 esac
19427 fi
c971b7fa 19428
6ec2e0f5 19429 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
8690e634
JK
19430
19431
19432
6ec2e0f5
SDJ
19433
19434
19435
19436
19437
19438 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
19439
19440 fi
19441
19442
19443
19444
19445 for ac_func in memmem
19446do :
19447 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
19448if test "x$ac_cv_func_memmem" = x""yes; then :
19449 cat >>confdefs.h <<_ACEOF
19450#define HAVE_MEMMEM 1
19451_ACEOF
19452
19453fi
19454done
19455
19456 if test $ac_cv_func_memmem = yes; then
19457 HAVE_MEMMEM=1
19458 else
19459 HAVE_MEMMEM=0
19460 fi
19461
19462 if test $ac_cv_have_decl_memmem = no; then
19463 HAVE_DECL_MEMMEM=0
19464 else
19465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
19466$as_echo_n "checking whether memmem works... " >&6; }
19467if test "${gl_cv_func_memmem_works_always+set}" = set; then :
c971b7fa
PA
19468 $as_echo_n "(cached) " >&6
19469else
6ec2e0f5
SDJ
19470 if test "$cross_compiling" = yes; then :
19471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19472/* end confdefs.h. */
19473
19474#ifdef __GNU_LIBRARY__
19475 #include <features.h>
19476 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
19477 || __GLIBC_MINOR__ > 12)) \
19478 || (__GLIBC__ > 2)) \
19479 || defined __UCLIBC__
19480 Lucky user
19481 #endif
19482#elif defined __CYGWIN__
19483 #include <cygwin/version.h>
19484 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
19485 Lucky user
19486 #endif
19487#else
19488 Lucky user
19489#endif
19490
19491_ACEOF
19492if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19493 $EGREP "Lucky user" >/dev/null 2>&1; then :
19494 gl_cv_func_memmem_works_always="guessing yes"
19495else
19496 gl_cv_func_memmem_works_always="guessing no"
19497fi
19498rm -f conftest*
19499
8690e634 19500
8690e634 19501else
c971b7fa
PA
19502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19503/* end confdefs.h. */
c971b7fa 19504
6ec2e0f5
SDJ
19505#include <string.h> /* for memmem */
19506#define P "_EF_BF_BD"
19507#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
19508#define NEEDLE P P P P P
19509
19510int
19511main ()
c971b7fa 19512{
8690e634 19513
6ec2e0f5
SDJ
19514 int result = 0;
19515 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
19516 result |= 1;
19517 /* Check for empty needle behavior. */
19518 {
19519 const char *haystack = "AAA";
19520 if (memmem (haystack, 3, NULL, 0) != haystack)
19521 result |= 2;
8690e634 19522 }
6ec2e0f5
SDJ
19523 return result;
19524
19525 ;
c971b7fa
PA
19526 return 0;
19527}
19528_ACEOF
8690e634 19529if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 19530 gl_cv_func_memmem_works_always=yes
c971b7fa 19531else
6ec2e0f5 19532 gl_cv_func_memmem_works_always=no
c971b7fa 19533fi
8690e634
JK
19534rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19535 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 19536fi
8690e634 19537
8690e634
JK
19538
19539fi
6ec2e0f5
SDJ
19540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
19541$as_echo "$gl_cv_func_memmem_works_always" >&6; }
19542 case "$gl_cv_func_memmem_works_always" in
8690e634 19543 *yes) ;;
6ec2e0f5
SDJ
19544 *)
19545 REPLACE_MEMMEM=1
19546 ;;
8690e634 19547 esac
c971b7fa 19548 fi
6ec2e0f5 19549 :
c971b7fa 19550
6ec2e0f5 19551 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
c971b7fa 19552
c971b7fa 19553
8690e634 19554
c971b7fa 19555
6ec2e0f5
SDJ
19556
19557
19558
19559
19560 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
19561
19562 fi
19563
19564
19565
19566
19567
19568 GNULIB_MEMMEM=1
19569
19570
19571
19572
19573
19574$as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
19575
19576
19577
19578
19579
19580
19581
19582
19583
19584 for ac_func in mempcpy
19585do :
19586 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
19587if test "x$ac_cv_func_mempcpy" = x""yes; then :
19588 cat >>confdefs.h <<_ACEOF
19589#define HAVE_MEMPCPY 1
8690e634 19590_ACEOF
c971b7fa 19591
6ec2e0f5
SDJ
19592fi
19593done
c971b7fa 19594
6ec2e0f5
SDJ
19595 if test $ac_cv_func_mempcpy = no; then
19596 HAVE_MEMPCPY=0
19597 fi
8690e634 19598
6ec2e0f5 19599 if test $HAVE_MEMPCPY = 0; then
8690e634
JK
19600
19601
19602
19603
8690e634 19604
6ec2e0f5
SDJ
19605
19606
19607
19608 gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
19609
19610
8690e634 19611 :
c971b7fa 19612
6ec2e0f5 19613 fi
c971b7fa 19614
8690e634 19615
8690e634 19616
8690e634 19617
6ec2e0f5
SDJ
19618
19619 GNULIB_MEMPCPY=1
19620
19621
19622
19623
19624
19625$as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
19626
19627
19628
19629
19630
19631
19632
19633
19634 if test $ac_cv_have_decl_memrchr = no; then
19635 HAVE_DECL_MEMRCHR=0
19636 fi
19637
19638 for ac_func in memrchr
19639do :
19640 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
19641if test "x$ac_cv_func_memrchr" = x""yes; then :
19642 cat >>confdefs.h <<_ACEOF
19643#define HAVE_MEMRCHR 1
c971b7fa 19644_ACEOF
6ec2e0f5 19645
c971b7fa 19646fi
6ec2e0f5 19647done
8690e634 19648
8690e634 19649
6ec2e0f5 19650 if test $ac_cv_func_memrchr = no; then
8690e634 19651
6ec2e0f5
SDJ
19652
19653
19654
19655
19656
19657
19658
19659 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
19660
19661 :
c971b7fa
PA
19662 fi
19663
19664
c971b7fa 19665
c971b7fa 19666
c971b7fa 19667
6ec2e0f5
SDJ
19668 GNULIB_MEMRCHR=1
19669
19670
19671
19672
19673
19674$as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
19675
19676
19677
19678
19679 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
19680
19681
19682
c971b7fa 19683
c971b7fa 19684
c971b7fa
PA
19685
19686
8690e634 19687
6ec2e0f5 19688 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
8690e634 19689
6ec2e0f5 19690 fi
8690e634 19691
6ec2e0f5 19692 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
8690e634
JK
19693
19694
19695
19696
19697
19698
8690e634
JK
19699
19700
6ec2e0f5 19701 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
8690e634 19702
a512b375 19703 fi
8690e634
JK
19704
19705
19706
6ec2e0f5
SDJ
19707 case "$host_os" in
19708 mingw* | pw*)
19709 REPLACE_OPEN=1
19710 ;;
19711 *)
19712
19713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
19714$as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
19715if test "${gl_cv_func_open_slash+set}" = set; then :
19716 $as_echo_n "(cached) " >&6
19717else
19718 # Assume that if we have lstat, we can also check symlinks.
19719 if test $ac_cv_func_lstat = yes; then
19720 touch conftest.tmp
19721 ln -s conftest.tmp conftest.lnk
19722 fi
19723 if test "$cross_compiling" = yes; then :
8690e634 19724
6ec2e0f5
SDJ
19725 case "$host_os" in
19726 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
19727 gl_cv_func_open_slash="guessing no" ;;
19728 *)
19729 gl_cv_func_open_slash="guessing yes" ;;
19730 esac
8690e634 19731
6ec2e0f5
SDJ
19732else
19733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19734/* end confdefs.h. */
19735
19736#include <fcntl.h>
19737#if HAVE_UNISTD_H
19738# include <unistd.h>
19739#endif
19740int main ()
19741{
19742 int result = 0;
19743#if HAVE_LSTAT
19744 if (open ("conftest.lnk/", O_RDONLY) != -1)
19745 result |= 1;
19746#endif
19747 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
19748 result |= 2;
19749 return result;
19750}
19751_ACEOF
19752if ac_fn_c_try_run "$LINENO"; then :
19753 gl_cv_func_open_slash=yes
19754else
19755 gl_cv_func_open_slash=no
19756fi
19757rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19758 conftest.$ac_objext conftest.beam conftest.$ac_ext
19759fi
8690e634 19760
6ec2e0f5 19761 rm -f conftest.sl conftest.tmp conftest.lnk
8690e634 19762
6ec2e0f5
SDJ
19763fi
19764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
19765$as_echo "$gl_cv_func_open_slash" >&6; }
19766 case "$gl_cv_func_open_slash" in
19767 *no)
8690e634 19768
6ec2e0f5 19769$as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
8690e634 19770
6ec2e0f5
SDJ
19771 REPLACE_OPEN=1
19772 ;;
19773 esac
19774 ;;
19775 esac
8690e634 19776
6ec2e0f5 19777 if test $REPLACE_OPEN = 0; then
c971b7fa
PA
19778
19779
19780
6ec2e0f5
SDJ
19781 if test $ac_cv_func_fchdir = no; then
19782 HAVE_FCHDIR=0
19783 fi
c971b7fa 19784
6ec2e0f5
SDJ
19785 if test $HAVE_FCHDIR = 0; then
19786 REPLACE_OPEN=1
19787 fi
19788 fi
c971b7fa
PA
19789
19790
19791
6ec2e0f5 19792 if test $REPLACE_OPEN = 1; then
c971b7fa
PA
19793
19794
19795
19796
19797
c971b7fa
PA
19798
19799
c971b7fa 19800
6ec2e0f5 19801 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
c971b7fa 19802
c971b7fa
PA
19803
19804
6ec2e0f5
SDJ
19805 :
19806
a512b375 19807 fi
c971b7fa
PA
19808
19809
19810
19811
19812
6ec2e0f5 19813 GNULIB_OPEN=1
c971b7fa
PA
19814
19815
19816
19817
19818
6ec2e0f5 19819$as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
c971b7fa
PA
19820
19821
19822
19823
19824
c971b7fa 19825
c971b7fa 19826
63ce7108 19827
6ec2e0f5
SDJ
19828 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
19829 yes+*yes)
19830 ;;
19831 yes+*)
19832 # Solaris 9 has *at functions, but uniformly mishandles trailing
19833 # slash in all of them.
19834 REPLACE_OPENAT=1
19835 ;;
19836 *)
19837 HAVE_OPENAT=0
19838 ;;
19839 esac
63ce7108 19840
6ec2e0f5 19841 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
63ce7108 19842
63ce7108 19843
63ce7108 19844
63ce7108 19845
63ce7108
TT
19846
19847
63ce7108 19848
63ce7108 19849
6ec2e0f5 19850 gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
63ce7108
TT
19851
19852
19853
6ec2e0f5 19854 :
63ce7108 19855
6ec2e0f5 19856 fi
63ce7108
TT
19857
19858
6ec2e0f5
SDJ
19859cat >>confdefs.h <<_ACEOF
19860#define GNULIB_OPENAT 1
19861_ACEOF
63ce7108 19862
63ce7108 19863
63ce7108
TT
19864
19865
19866
19867
6ec2e0f5 19868 GNULIB_OPENAT=1
63ce7108 19869
63ce7108 19870
63ce7108 19871
63ce7108 19872
63ce7108 19873
6ec2e0f5 19874$as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
63ce7108
TT
19875
19876
63ce7108 19877
63ce7108 19878
63ce7108 19879
63ce7108 19880
6ec2e0f5
SDJ
19881 for ac_func in opendir
19882do :
19883 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
19884if test "x$ac_cv_func_opendir" = x""yes; then :
19885 cat >>confdefs.h <<_ACEOF
19886#define HAVE_OPENDIR 1
63ce7108 19887_ACEOF
6ec2e0f5 19888
63ce7108 19889fi
6ec2e0f5 19890done
63ce7108 19891
6ec2e0f5
SDJ
19892 if test $ac_cv_func_opendir = no; then
19893 HAVE_OPENDIR=0
19894 fi
63ce7108 19895
6ec2e0f5
SDJ
19896
19897
19898
19899 if test $ac_cv_func_fchdir = no; then
19900 HAVE_FCHDIR=0
63ce7108 19901 fi
63ce7108 19902
6ec2e0f5
SDJ
19903 if test $HAVE_FCHDIR = 0; then
19904 if test $HAVE_OPENDIR = 1; then
19905 REPLACE_OPENDIR=1
19906 fi
19907 fi
19908
19909 case $host_os,$HAVE_OPENDIR in
19910 os2*,1)
19911 REPLACE_OPENDIR=1;;
19912 esac
19913
19914 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
63ce7108
TT
19915
19916
19917
19918
19919
19920
19921
19922
6ec2e0f5 19923 gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
63ce7108
TT
19924
19925 fi
19926
19927
19928
19929
19930
6ec2e0f5 19931 GNULIB_OPENDIR=1
63ce7108
TT
19932
19933
19934
19935
63ce7108 19936
6ec2e0f5 19937$as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
63ce7108
TT
19938
19939
19940
19941
19942
19943
19944
2196f55f
YQ
19945
19946
8424cc97
SM
19947
19948 for ac_func in rawmemchr
19949do :
19950 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
19951if test "x$ac_cv_func_rawmemchr" = x""yes; then :
19952 cat >>confdefs.h <<_ACEOF
19953#define HAVE_RAWMEMCHR 1
19954_ACEOF
19955
19956fi
19957done
19958
19959 if test $ac_cv_func_rawmemchr = no; then
19960 HAVE_RAWMEMCHR=0
19961 fi
19962
19963 if test $HAVE_RAWMEMCHR = 0; then
19964
19965
19966
19967
19968
19969
19970
19971
19972 gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
19973
19974 :
19975 fi
19976
19977
19978
19979
19980
19981 GNULIB_RAWMEMCHR=1
19982
19983
19984
19985
19986
19987$as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
19988
19989
19990
19991
19992
19993
6ec2e0f5
SDJ
19994 for ac_func in readdir
19995do :
19996 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
19997if test "x$ac_cv_func_readdir" = x""yes; then :
19998 cat >>confdefs.h <<_ACEOF
19999#define HAVE_READDIR 1
20000_ACEOF
20001
20002fi
20003done
20004
20005 if test $ac_cv_func_readdir = no; then
20006 HAVE_READDIR=0
20007 fi
20008
20009 if test $HAVE_READDIR = 0; then
20010
20011
20012
20013
20014
20015
20016
20017
20018 gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
20019
20020 fi
20021
20022
20023
20024
20025
20026 GNULIB_READDIR=1
20027
20028
20029
20030
20031
20032$as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
20033
20034
20035
20036
20037
20038
2196f55f
YQ
20039 if test $ac_cv_func_readlink = no; then
20040 HAVE_READLINK=0
20041 else
20042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
20043$as_echo_n "checking whether readlink signature is correct... " >&6; }
20044if test "${gl_cv_decl_readlink_works+set}" = set; then :
20045 $as_echo_n "(cached) " >&6
20046else
20047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20048/* end confdefs.h. */
20049#include <unistd.h>
20050 /* Cause compilation failure if original declaration has wrong type. */
20051 ssize_t readlink (const char *, char *, size_t);
20052int
20053main ()
20054{
20055
20056 ;
20057 return 0;
20058}
20059_ACEOF
20060if ac_fn_c_try_compile "$LINENO"; then :
20061 gl_cv_decl_readlink_works=yes
20062else
20063 gl_cv_decl_readlink_works=no
20064fi
20065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20066fi
20067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
20068$as_echo "$gl_cv_decl_readlink_works" >&6; }
20069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
20070$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
20071if test "${gl_cv_func_readlink_works+set}" = set; then :
20072 $as_echo_n "(cached) " >&6
20073else
20074 # We have readlink, so assume ln -s works.
20075 ln -s conftest.no-such conftest.link
20076 ln -s conftest.link conftest.lnk2
20077 if test "$cross_compiling" = yes; then :
20078 case "$host_os" in
20079 # Guess yes on glibc systems.
20080 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
20081 # If we don't know, assume the worst.
20082 *) gl_cv_func_readlink_works="guessing no" ;;
20083 esac
20084
20085else
20086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20087/* end confdefs.h. */
20088#include <unistd.h>
20089
20090int
20091main ()
20092{
20093char buf[20];
20094 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
20095 ;
20096 return 0;
20097}
20098_ACEOF
20099if ac_fn_c_try_run "$LINENO"; then :
20100 gl_cv_func_readlink_works=yes
20101else
20102 gl_cv_func_readlink_works=no
20103fi
20104rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20105 conftest.$ac_objext conftest.beam conftest.$ac_ext
20106fi
20107
20108 rm -f conftest.link conftest.lnk2
20109fi
20110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
20111$as_echo "$gl_cv_func_readlink_works" >&6; }
20112 case "$gl_cv_func_readlink_works" in
20113 *yes)
20114 if test "$gl_cv_decl_readlink_works" != yes; then
20115 REPLACE_READLINK=1
20116 fi
20117 ;;
20118 *)
20119
20120$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
20121
20122 REPLACE_READLINK=1
20123 ;;
20124 esac
20125 fi
20126
20127 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
20128
20129
20130
20131
20132
20133
20134
20135
20136 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
20137
20138
20139 :
20140
20141 fi
20142
20143
20144
20145
20146
20147 GNULIB_READLINK=1
20148
20149
20150
20151
20152
20153$as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
20154
20155
20156
20157
6a29c58e
YQ
20158
20159
6ec2e0f5
SDJ
20160 if test $gl_cv_func_malloc_posix = yes; then
20161
20162$as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
20163
20164 else
20165 REPLACE_REALLOC=1
20166 fi
20167
20168 if test $REPLACE_REALLOC = 1; then
20169
20170
20171
20172
20173
20174
20175
20176
20177 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
20178
20179 fi
20180
20181
20182
20183
20184
20185 GNULIB_REALLOC_POSIX=1
20186
20187
20188
20189
20190
20191$as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
20192
20193
20194
20195
20196
20197
6a29c58e
YQ
20198
20199
20200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
20201$as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
20202if test "${gl_cv_func_rename_slash_dst_works+set}" = set; then :
20203 $as_echo_n "(cached) " >&6
20204else
20205 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
20206 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
20207 as_fn_error "cannot create temporary files" "$LINENO" 5
20208 # Assume that if we have lstat, we can also check symlinks.
20209 if test $ac_cv_func_lstat = yes; then
20210 ln -s conftest.f conftest.lnk
20211 fi
20212 if test "$cross_compiling" = yes; then :
20213 case "$host_os" in
20214 # Guess yes on glibc systems.
20215 *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
20216 # If we don't know, assume the worst.
20217 *) gl_cv_func_rename_slash_dst_works="guessing no" ;;
20218 esac
20219
20220else
20221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20222/* end confdefs.h. */
20223
20224# include <stdio.h>
20225# include <stdlib.h>
20226
20227int
20228main ()
20229{
20230int result = 0;
20231 if (rename ("conftest.f1", "conftest.f2/") == 0)
20232 result |= 1;
20233 if (rename ("conftest.d1", "conftest.d2/") != 0)
20234 result |= 2;
20235#if HAVE_LSTAT
20236 if (rename ("conftest.f", "conftest.lnk/") == 0)
20237 result |= 4;
20238#endif
20239 return result;
20240
20241 ;
20242 return 0;
20243}
20244_ACEOF
20245if ac_fn_c_try_run "$LINENO"; then :
20246 gl_cv_func_rename_slash_dst_works=yes
20247else
20248 gl_cv_func_rename_slash_dst_works=no
20249fi
20250rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20251 conftest.$ac_objext conftest.beam conftest.$ac_ext
20252fi
20253
20254 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
20255
20256fi
20257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
20258$as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
20259 case "$gl_cv_func_rename_slash_dst_works" in
20260 *yes) ;;
20261 *)
20262 REPLACE_RENAME=1
20263
20264$as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
20265
20266 ;;
20267 esac
20268
20269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
20270$as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
20271if test "${gl_cv_func_rename_slash_src_works+set}" = set; then :
20272 $as_echo_n "(cached) " >&6
20273else
20274 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
20275 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
20276 as_fn_error "cannot create temporary files" "$LINENO" 5
20277 # Assume that if we have lstat, we can also check symlinks.
20278 if test $ac_cv_func_lstat = yes; then
20279 ln -s conftest.f conftest.lnk
20280 fi
20281 if test "$cross_compiling" = yes; then :
20282 case "$host_os" in
20283 # Guess yes on glibc systems.
20284 *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
20285 # If we don't know, assume the worst.
20286 *) gl_cv_func_rename_slash_src_works="guessing no" ;;
20287 esac
20288
20289else
20290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20291/* end confdefs.h. */
20292
20293# include <stdio.h>
20294# include <stdlib.h>
20295
20296int
20297main ()
20298{
20299int result = 0;
20300 if (rename ("conftest.f1/", "conftest.d3") == 0)
20301 result |= 1;
20302 if (rename ("conftest.d1/", "conftest.d2") != 0)
20303 result |= 2;
20304#if HAVE_LSTAT
20305 if (rename ("conftest.lnk/", "conftest.f") == 0)
20306 result |= 4;
20307#endif
20308 return result;
20309
20310 ;
20311 return 0;
20312}
20313_ACEOF
20314if ac_fn_c_try_run "$LINENO"; then :
20315 gl_cv_func_rename_slash_src_works=yes
20316else
20317 gl_cv_func_rename_slash_src_works=no
20318fi
20319rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20320 conftest.$ac_objext conftest.beam conftest.$ac_ext
20321fi
20322
20323 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
20324
20325fi
20326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
20327$as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
20328 case "$gl_cv_func_rename_slash_src_works" in
20329 *yes) ;;
20330 *)
20331 REPLACE_RENAME=1
20332
20333$as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
20334
20335 ;;
20336 esac
20337
20338
20339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
20340$as_echo_n "checking whether rename manages hard links correctly... " >&6; }
20341if test "${gl_cv_func_rename_link_works+set}" = set; then :
20342 $as_echo_n "(cached) " >&6
20343else
20344 if test $ac_cv_func_link = yes; then
20345 rm -rf conftest.f conftest.f1
20346 if touch conftest.f && ln conftest.f conftest.f1 &&
20347 set x `ls -i conftest.f conftest.f1` && test "" = ""; then
20348 if test "$cross_compiling" = yes; then :
20349 case "$host_os" in
20350 # Guess yes on glibc systems.
20351 *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
20352 # If we don't know, assume the worst.
20353 *) gl_cv_func_rename_link_works="guessing no" ;;
20354 esac
20355
20356else
20357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20358/* end confdefs.h. */
20359
20360# include <stdio.h>
20361# include <stdlib.h>
20362# include <unistd.h>
20363
20364int
20365main ()
20366{
20367int result = 0;
20368 if (rename ("conftest.f", "conftest.f1"))
20369 result |= 1;
20370 if (unlink ("conftest.f1"))
20371 result |= 2;
20372 if (rename ("conftest.f", "conftest.f"))
20373 result |= 4;
20374 if (rename ("conftest.f1", "conftest.f1") == 0)
20375 result |= 8;
20376 return result;
20377
20378 ;
20379 return 0;
20380}
20381_ACEOF
20382if ac_fn_c_try_run "$LINENO"; then :
20383 gl_cv_func_rename_link_works=yes
20384else
20385 gl_cv_func_rename_link_works=no
20386fi
20387rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20388 conftest.$ac_objext conftest.beam conftest.$ac_ext
20389fi
20390
20391 else
20392 gl_cv_func_rename_link_works="guessing no"
20393 fi
20394 rm -rf conftest.f conftest.f1
20395 else
20396 gl_cv_func_rename_link_works=yes
20397 fi
20398
20399fi
20400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
20401$as_echo "$gl_cv_func_rename_link_works" >&6; }
20402 case "$gl_cv_func_rename_link_works" in
20403 *yes) ;;
20404 *)
20405 REPLACE_RENAME=1
20406
20407$as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
20408
20409 ;;
20410 esac
20411
20412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
20413$as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
20414if test "${gl_cv_func_rename_dest_works+set}" = set; then :
20415 $as_echo_n "(cached) " >&6
20416else
20417 rm -rf conftest.f conftest.d1 conftest.d2
20418 touch conftest.f && mkdir conftest.d1 conftest.d2 ||
20419 as_fn_error "cannot create temporary files" "$LINENO" 5
20420 if test "$cross_compiling" = yes; then :
20421 case "$host_os" in
20422 # Guess yes on glibc systems.
20423 *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
20424 # If we don't know, assume the worst.
20425 *) gl_cv_func_rename_dest_works="guessing no" ;;
20426 esac
20427
20428else
20429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20430/* end confdefs.h. */
20431
20432# include <stdio.h>
20433# include <stdlib.h>
20434
20435int
20436main ()
20437{
20438int result = 0;
20439 if (rename ("conftest.d1", "conftest.d2") != 0)
20440 result |= 1;
20441 if (rename ("conftest.d2", "conftest.f") == 0)
20442 result |= 2;
20443 return result;
20444
20445 ;
20446 return 0;
20447}
20448_ACEOF
20449if ac_fn_c_try_run "$LINENO"; then :
20450 gl_cv_func_rename_dest_works=yes
20451else
20452 gl_cv_func_rename_dest_works=no
20453fi
20454rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20455 conftest.$ac_objext conftest.beam conftest.$ac_ext
20456fi
20457
20458 rm -rf conftest.f conftest.d1 conftest.d2
20459
20460fi
20461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
20462$as_echo "$gl_cv_func_rename_dest_works" >&6; }
20463 case "$gl_cv_func_rename_dest_works" in
20464 *yes) ;;
20465 *)
20466 REPLACE_RENAME=1
20467
20468$as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
20469
20470 ;;
20471 esac
20472
20473 if test $REPLACE_RENAME = 1; then
20474
20475
20476
20477
20478
20479
20480
20481
20482 gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
20483
20484 fi
20485
20486
20487
20488
20489
20490 GNULIB_RENAME=1
20491
20492
20493
20494
20495
20496$as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
20497
20498
20499
20500
20501
20502
6ec2e0f5
SDJ
20503 for ac_func in rewinddir
20504do :
20505 ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
20506if test "x$ac_cv_func_rewinddir" = x""yes; then :
20507 cat >>confdefs.h <<_ACEOF
20508#define HAVE_REWINDDIR 1
20509_ACEOF
20510
20511fi
20512done
20513
20514 if test $ac_cv_func_rewinddir = no; then
20515 HAVE_REWINDDIR=0
20516 fi
20517
20518 if test $HAVE_REWINDDIR = 0; then
20519
20520
20521
20522
20523
20524
20525
20526
20527 gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
20528
20529 fi
20530
20531
20532
20533
20534
20535 GNULIB_REWINDDIR=1
20536
20537
20538
20539
20540
20541$as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
20542
20543
20544
20545
20546
20547
6a29c58e
YQ
20548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
20549$as_echo_n "checking whether rmdir works... " >&6; }
20550if test "${gl_cv_func_rmdir_works+set}" = set; then :
20551 $as_echo_n "(cached) " >&6
20552else
20553 mkdir conftest.dir
20554 touch conftest.file
20555 if test "$cross_compiling" = yes; then :
20556 case "$host_os" in
20557 # Guess yes on glibc systems.
20558 *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
20559 # If we don't know, assume the worst.
20560 *) gl_cv_func_rmdir_works="guessing no" ;;
20561 esac
20562
20563else
20564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20565/* end confdefs.h. */
20566#include <stdio.h>
20567 #include <errno.h>
20568 #if HAVE_UNISTD_H
20569 # include <unistd.h>
20570 #else /* on Windows with MSVC */
20571 # include <direct.h>
20572 #endif
20573
20574int
20575main ()
20576{
20577int result = 0;
20578 if (!rmdir ("conftest.file/"))
20579 result |= 1;
20580 else if (errno != ENOTDIR)
20581 result |= 2;
20582 if (!rmdir ("conftest.dir/./"))
20583 result |= 4;
20584 return result;
20585
20586 ;
20587 return 0;
20588}
20589_ACEOF
20590if ac_fn_c_try_run "$LINENO"; then :
20591 gl_cv_func_rmdir_works=yes
20592else
20593 gl_cv_func_rmdir_works=no
20594fi
20595rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20596 conftest.$ac_objext conftest.beam conftest.$ac_ext
20597fi
20598
20599 rm -rf conftest.dir conftest.file
20600fi
20601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
20602$as_echo "$gl_cv_func_rmdir_works" >&6; }
20603 case "$gl_cv_func_rmdir_works" in
20604 *yes) ;;
20605 *)
20606 REPLACE_RMDIR=1
20607 ;;
20608 esac
20609
20610 if test $REPLACE_RMDIR = 1; then
20611
20612
20613
20614
20615
20616
20617
20618
20619 gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
20620
20621 fi
20622
20623
20624
20625
20626
20627 GNULIB_RMDIR=1
20628
20629
20630
20631
20632
20633$as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
20634
20635
20636
20637
0750520d 20638
6ec2e0f5
SDJ
20639
20640
20641
3d99e817
AK
20642 if test $ac_cv_func_setenv = no; then
20643 HAVE_SETENV=0
20644 else
20645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
20646$as_echo_n "checking whether setenv validates arguments... " >&6; }
20647if test "${gl_cv_func_setenv_works+set}" = set; then :
20648 $as_echo_n "(cached) " >&6
20649else
20650 if test "$cross_compiling" = yes; then :
20651 case "$host_os" in
20652 # Guess yes on glibc systems.
20653 *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
20654 # If we don't know, assume the worst.
20655 *) gl_cv_func_setenv_works="guessing no" ;;
20656 esac
20657
20658else
20659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20660/* end confdefs.h. */
20661
20662 #include <stdlib.h>
20663 #include <errno.h>
20664 #include <string.h>
20665
20666int
20667main ()
20668{
20669
20670 int result = 0;
20671 {
20672 if (setenv ("", "", 0) != -1)
20673 result |= 1;
20674 else if (errno != EINVAL)
20675 result |= 2;
20676 }
20677 {
20678 if (setenv ("a", "=", 1) != 0)
20679 result |= 4;
20680 else if (strcmp (getenv ("a"), "=") != 0)
20681 result |= 8;
20682 }
20683 return result;
20684
20685 ;
20686 return 0;
20687}
20688_ACEOF
20689if ac_fn_c_try_run "$LINENO"; then :
20690 gl_cv_func_setenv_works=yes
20691else
20692 gl_cv_func_setenv_works=no
20693fi
20694rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20695 conftest.$ac_objext conftest.beam conftest.$ac_ext
20696fi
20697
20698fi
20699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
20700$as_echo "$gl_cv_func_setenv_works" >&6; }
20701 case "$gl_cv_func_setenv_works" in
20702 *yes) ;;
20703 *)
20704 REPLACE_SETENV=1
20705 ;;
20706 esac
20707 fi
20708
20709 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
20710
20711
20712
20713
20714
20715
20716
20717
20718 gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
20719
20720 fi
20721
20722
20723
20724
20725
20726 GNULIB_SETENV=1
20727
20728
20729
20730
20731
20732$as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
20733
20734
20735
20736
20737
0750520d
PA
20738
20739
20740
20741
20742
20743
20744
20745
20746
20747 if test $gl_cv_have_include_next = yes; then
20748 gl_cv_next_signal_h='<'signal.h'>'
20749 else
20750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
20751$as_echo_n "checking absolute name of <signal.h>... " >&6; }
20752if test "${gl_cv_next_signal_h+set}" = set; then :
20753 $as_echo_n "(cached) " >&6
20754else
20755
20756
20757
20758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20759/* end confdefs.h. */
20760#include <signal.h>
20761_ACEOF
20762 case "$host_os" in
20763 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20764 *) gl_absname_cpp="$ac_cpp" ;;
20765 esac
20766
20767 case "$host_os" in
20768 mingw*)
20769 gl_dirsep_regex='[/\\]'
20770 ;;
20771 *)
20772 gl_dirsep_regex='\/'
20773 ;;
20774 esac
20775 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20776 gl_header_literal_regex=`echo 'signal.h' \
20777 | sed -e "$gl_make_literal_regex_sed"`
20778 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20779 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20780 s|^/[^/]|//&|
20781 p
20782 q
20783 }'
20784
20785 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20786 sed -n "$gl_absolute_header_sed"`
20787
20788 gl_header=$gl_cv_absolute_signal_h
20789 gl_cv_next_signal_h='"'$gl_header'"'
20790
20791
20792fi
20793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
20794$as_echo "$gl_cv_next_signal_h" >&6; }
20795 fi
20796 NEXT_SIGNAL_H=$gl_cv_next_signal_h
20797
20798 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20799 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20800 gl_next_as_first_directive='<'signal.h'>'
20801 else
20802 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20803 gl_next_as_first_directive=$gl_cv_next_signal_h
20804 fi
20805 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
20806
20807
20808
20809
20810
20811# AIX declares sig_atomic_t to already include volatile, and C89 compilers
20812# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
20813 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
20814#include <signal.h>
20815
20816"
20817if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
20818
20819else
20820 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
20821fi
20822
20823
20824
20825
20826
20827
20828
20829 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
20830#include <signal.h>
20831
20832"
20833if test "x$ac_cv_type_sighandler_t" = x""yes; then :
20834
20835else
20836 HAVE_SIGHANDLER_T=0
20837fi
20838
20839
20840
20841 for gl_func in pthread_sigmask sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask; do
20842 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
20843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
20844$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
20845if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
20846 $as_echo_n "(cached) " >&6
20847else
20848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20849/* end confdefs.h. */
20850#include <signal.h>
20851
20852int
20853main ()
20854{
20855#undef $gl_func
20856 (void) $gl_func;
20857 ;
20858 return 0;
20859}
20860_ACEOF
20861if ac_fn_c_try_compile "$LINENO"; then :
20862 eval "$as_gl_Symbol=yes"
20863else
20864 eval "$as_gl_Symbol=no"
20865fi
20866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20867fi
20868eval ac_res=\$$as_gl_Symbol
20869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20870$as_echo "$ac_res" >&6; }
20871 eval as_val=\$$as_gl_Symbol
20872 if test "x$as_val" = x""yes; then :
20873 cat >>confdefs.h <<_ACEOF
20874#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
20875_ACEOF
20876
20877 eval ac_cv_have_decl_$gl_func=yes
20878fi
20879 done
20880
20881
20882
63ce7108
TT
20883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
20884$as_echo_n "checking for ssize_t... " >&6; }
20885if test "${gt_cv_ssize_t+set}" = set; then :
20886 $as_echo_n "(cached) " >&6
20887else
20888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20889/* end confdefs.h. */
20890#include <sys/types.h>
20891int
20892main ()
20893{
20894int x = sizeof (ssize_t *) + sizeof (ssize_t);
20895 return !x;
20896 ;
20897 return 0;
20898}
20899_ACEOF
20900if ac_fn_c_try_compile "$LINENO"; then :
20901 gt_cv_ssize_t=yes
20902else
20903 gt_cv_ssize_t=no
20904fi
20905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20906fi
20907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
20908$as_echo "$gt_cv_ssize_t" >&6; }
20909 if test $gt_cv_ssize_t = no; then
20910
20911$as_echo "#define ssize_t int" >>confdefs.h
20912
20913 fi
20914
20915
20916
20917
2196f55f
YQ
20918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
20919$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
20920if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
20921 $as_echo_n "(cached) " >&6
20922else
20923 if test "$cross_compiling" = yes; then :
20924 case $host_os in
20925 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
20926 *) gl_cv_func_stat_dir_slash="guessing yes";;
20927 esac
20928else
20929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20930/* end confdefs.h. */
20931#include <sys/stat.h>
20932
20933int
20934main ()
20935{
20936struct stat st; return stat (".", &st) != stat ("./", &st);
20937 ;
20938 return 0;
20939}
20940_ACEOF
20941if ac_fn_c_try_run "$LINENO"; then :
20942 gl_cv_func_stat_dir_slash=yes
20943else
20944 gl_cv_func_stat_dir_slash=no
20945fi
20946rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20947 conftest.$ac_objext conftest.beam conftest.$ac_ext
20948fi
20949
20950fi
20951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
20952$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
20953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
20954$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
20955if test "${gl_cv_func_stat_file_slash+set}" = set; then :
20956 $as_echo_n "(cached) " >&6
20957else
20958 touch conftest.tmp
20959 # Assume that if we have lstat, we can also check symlinks.
20960 if test $ac_cv_func_lstat = yes; then
20961 ln -s conftest.tmp conftest.lnk
20962 fi
20963 if test "$cross_compiling" = yes; then :
20964 case "$host_os" in
20965 # Guess yes on glibc systems.
20966 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
20967 # If we don't know, assume the worst.
20968 *) gl_cv_func_stat_file_slash="guessing no" ;;
20969 esac
20970
20971else
20972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20973/* end confdefs.h. */
20974#include <sys/stat.h>
20975
20976int
20977main ()
20978{
20979int result = 0;
20980 struct stat st;
20981 if (!stat ("conftest.tmp/", &st))
20982 result |= 1;
20983#if HAVE_LSTAT
20984 if (!stat ("conftest.lnk/", &st))
20985 result |= 2;
20986#endif
20987 return result;
20988
20989 ;
20990 return 0;
20991}
20992_ACEOF
20993if ac_fn_c_try_run "$LINENO"; then :
20994 gl_cv_func_stat_file_slash=yes
20995else
20996 gl_cv_func_stat_file_slash=no
20997fi
20998rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20999 conftest.$ac_objext conftest.beam conftest.$ac_ext
21000fi
21001
21002 rm -f conftest.tmp conftest.lnk
21003fi
21004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
21005$as_echo "$gl_cv_func_stat_file_slash" >&6; }
21006 case $gl_cv_func_stat_dir_slash in
21007 *no) REPLACE_STAT=1
21008
21009$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
21010;;
21011 esac
21012 case $gl_cv_func_stat_file_slash in
21013 *no) REPLACE_STAT=1
21014
21015$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
21016;;
21017 esac
21018
21019 if test $REPLACE_STAT = 1; then
21020
21021
21022
21023
21024
21025
21026
21027
21028 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
21029
21030 :
21031 fi
21032
21033
21034
21035
21036
21037 GNULIB_STAT=1
21038
21039
21040
21041
21042
21043$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
21044
21045
21046
21047
21048
21049
63ce7108
TT
21050 # Define two additional variables used in the Makefile substitution.
21051
21052 if test "$ac_cv_header_stdbool_h" = yes; then
21053 STDBOOL_H=''
21054 else
21055 STDBOOL_H='stdbool.h'
21056 fi
21057
21058 if test -n "$STDBOOL_H"; then
21059 GL_GENERATE_STDBOOL_H_TRUE=
21060 GL_GENERATE_STDBOOL_H_FALSE='#'
21061else
21062 GL_GENERATE_STDBOOL_H_TRUE='#'
21063 GL_GENERATE_STDBOOL_H_FALSE=
21064fi
21065
21066
21067 if test "$ac_cv_type__Bool" = yes; then
21068 HAVE__BOOL=1
21069 else
21070 HAVE__BOOL=0
21071 fi
21072
21073
21074
21075
21076
21077 STDDEF_H=
4a626d0a
PA
21078 ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
21079
21080"
21081if test "x$ac_cv_type_max_align_t" = x""yes; then :
21082
21083else
21084 HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
21085fi
21086
63ce7108
TT
21087 if test $gt_cv_c_wchar_t = no; then
21088 HAVE_WCHAR_T=0
21089 STDDEF_H=stddef.h
21090 fi
21091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
21092$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
21093if test "${gl_cv_decl_null_works+set}" = set; then :
21094 $as_echo_n "(cached) " >&6
21095else
21096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21097/* end confdefs.h. */
21098#include <stddef.h>
21099 int test[2 * (sizeof NULL == sizeof (void *)) -1];
21100
21101int
21102main ()
21103{
21104
21105 ;
21106 return 0;
21107}
21108_ACEOF
21109if ac_fn_c_try_compile "$LINENO"; then :
21110 gl_cv_decl_null_works=yes
21111else
21112 gl_cv_decl_null_works=no
21113fi
21114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21115fi
21116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
21117$as_echo "$gl_cv_decl_null_works" >&6; }
21118 if test $gl_cv_decl_null_works = no; then
21119 REPLACE_NULL=1
21120 STDDEF_H=stddef.h
21121 fi
21122
21123 if test -n "$STDDEF_H"; then
21124 GL_GENERATE_STDDEF_H_TRUE=
21125 GL_GENERATE_STDDEF_H_FALSE='#'
21126else
21127 GL_GENERATE_STDDEF_H_TRUE='#'
21128 GL_GENERATE_STDDEF_H_FALSE=
21129fi
21130
21131 if test -n "$STDDEF_H"; then
21132
21133
21134
21135
21136
21137
21138
21139
21140 if test $gl_cv_have_include_next = yes; then
21141 gl_cv_next_stddef_h='<'stddef.h'>'
21142 else
21143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
21144$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
21145if test "${gl_cv_next_stddef_h+set}" = set; then :
21146 $as_echo_n "(cached) " >&6
21147else
21148
4a626d0a
PA
21149
21150
21151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63ce7108
TT
21152/* end confdefs.h. */
21153#include <stddef.h>
63ce7108 21154_ACEOF
4a626d0a
PA
21155 case "$host_os" in
21156 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21157 *) gl_absname_cpp="$ac_cpp" ;;
21158 esac
63ce7108 21159
4a626d0a
PA
21160 case "$host_os" in
21161 mingw*)
21162 gl_dirsep_regex='[/\\]'
21163 ;;
21164 *)
21165 gl_dirsep_regex='\/'
21166 ;;
21167 esac
21168 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21169 gl_header_literal_regex=`echo 'stddef.h' \
21170 | sed -e "$gl_make_literal_regex_sed"`
21171 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21172 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21173 s|^/[^/]|//&|
21174 p
21175 q
21176 }'
63ce7108 21177
4a626d0a
PA
21178 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21179 sed -n "$gl_absolute_header_sed"`
21180
21181 gl_header=$gl_cv_absolute_stddef_h
21182 gl_cv_next_stddef_h='"'$gl_header'"'
63ce7108
TT
21183
21184
21185fi
21186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
21187$as_echo "$gl_cv_next_stddef_h" >&6; }
21188 fi
21189 NEXT_STDDEF_H=$gl_cv_next_stddef_h
21190
21191 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21192 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21193 gl_next_as_first_directive='<'stddef.h'>'
21194 else
21195 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21196 gl_next_as_first_directive=$gl_cv_next_stddef_h
21197 fi
21198 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
21199
21200
21201
21202
21203 fi
21204
21205
21206
21207
49e4877c 21208 $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
63ce7108
TT
21209
21210
21211
98399780
YQ
21212
21213
21214
21215
21216
4a626d0a
PA
21217
21218
6a29c58e
YQ
21219 if test $gl_cv_have_include_next = yes; then
21220 gl_cv_next_stdio_h='<'stdio.h'>'
21221 else
21222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
21223$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
21224if test "${gl_cv_next_stdio_h+set}" = set; then :
21225 $as_echo_n "(cached) " >&6
21226else
21227
4a626d0a
PA
21228
21229
21230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6a29c58e
YQ
21231/* end confdefs.h. */
21232#include <stdio.h>
6a29c58e 21233_ACEOF
4a626d0a
PA
21234 case "$host_os" in
21235 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21236 *) gl_absname_cpp="$ac_cpp" ;;
21237 esac
21238
21239 case "$host_os" in
21240 mingw*)
21241 gl_dirsep_regex='[/\\]'
21242 ;;
21243 *)
21244 gl_dirsep_regex='\/'
21245 ;;
21246 esac
21247 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21248 gl_header_literal_regex=`echo 'stdio.h' \
21249 | sed -e "$gl_make_literal_regex_sed"`
21250 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21251 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21252 s|^/[^/]|//&|
21253 p
21254 q
21255 }'
6a29c58e 21256
4a626d0a
PA
21257 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21258 sed -n "$gl_absolute_header_sed"`
6a29c58e 21259
4a626d0a
PA
21260 gl_header=$gl_cv_absolute_stdio_h
21261 gl_cv_next_stdio_h='"'$gl_header'"'
6a29c58e
YQ
21262
21263
21264fi
21265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
21266$as_echo "$gl_cv_next_stdio_h" >&6; }
21267 fi
21268 NEXT_STDIO_H=$gl_cv_next_stdio_h
21269
21270 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21271 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21272 gl_next_as_first_directive='<'stdio.h'>'
21273 else
21274 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21275 gl_next_as_first_directive=$gl_cv_next_stdio_h
21276 fi
21277 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
21278
21279
21280
21281
21282
4a626d0a
PA
21283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
21284$as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
21285if test "${gl_cv_func_printf_attribute_flavor+set}" = set; then :
21286 $as_echo_n "(cached) " >&6
21287else
21288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21289/* end confdefs.h. */
21290
21291 #define __STDC_FORMAT_MACROS 1
21292 #include <stdio.h>
21293 #include <inttypes.h>
21294 /* For non-mingw systems, compilation will trivially succeed.
21295 For mingw, compilation will succeed for older mingw (system
21296 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
21297 #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
21298 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
21299 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
21300 #endif
21301
21302int
21303main ()
21304{
21305
21306 ;
21307 return 0;
21308}
21309_ACEOF
21310if ac_fn_c_try_compile "$LINENO"; then :
21311 gl_cv_func_printf_attribute_flavor=system
21312else
21313 gl_cv_func_printf_attribute_flavor=gnu
21314fi
21315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21316fi
21317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
21318$as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
21319 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
21320
21321$as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
21322
21323 fi
21324
6a29c58e
YQ
21325 GNULIB_FSCANF=1
21326
21327
21328cat >>confdefs.h <<_ACEOF
21329#define GNULIB_FSCANF 1
21330_ACEOF
21331
21332
21333 GNULIB_SCANF=1
21334
21335
21336cat >>confdefs.h <<_ACEOF
21337#define GNULIB_SCANF 1
21338_ACEOF
21339
21340
21341 GNULIB_FGETC=1
21342 GNULIB_GETC=1
21343 GNULIB_GETCHAR=1
21344 GNULIB_FGETS=1
21345 GNULIB_FREAD=1
21346
21347
21348 GNULIB_FPRINTF=1
21349 GNULIB_PRINTF=1
21350 GNULIB_VFPRINTF=1
21351 GNULIB_VPRINTF=1
21352 GNULIB_FPUTC=1
21353 GNULIB_PUTC=1
21354 GNULIB_PUTCHAR=1
21355 GNULIB_FPUTS=1
21356 GNULIB_PUTS=1
21357 GNULIB_FWRITE=1
21358
21359
21360
21361
21362 for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen renameat snprintf tmpfile vdprintf vsnprintf; do
21363 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
21364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
21365$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
21366if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
21367 $as_echo_n "(cached) " >&6
21368else
21369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21370/* end confdefs.h. */
21371#include <stdio.h>
21372
21373int
21374main ()
21375{
21376#undef $gl_func
21377 (void) $gl_func;
21378 ;
21379 return 0;
21380}
21381_ACEOF
21382if ac_fn_c_try_compile "$LINENO"; then :
21383 eval "$as_gl_Symbol=yes"
21384else
21385 eval "$as_gl_Symbol=no"
21386fi
21387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21388fi
21389eval ac_res=\$$as_gl_Symbol
21390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21391$as_echo "$ac_res" >&6; }
21392 eval as_val=\$$as_gl_Symbol
21393 if test "x$as_val" = x""yes; then :
21394 cat >>confdefs.h <<_ACEOF
21395#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
21396_ACEOF
21397
21398 eval ac_cv_have_decl_$gl_func=yes
21399fi
21400 done
21401
21402
21403
21404
21405
21406
21407
21408
21409
21410
21411
21412
98399780
YQ
21413 if test $gl_cv_have_include_next = yes; then
21414 gl_cv_next_stdlib_h='<'stdlib.h'>'
21415 else
21416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
21417$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
21418if test "${gl_cv_next_stdlib_h+set}" = set; then :
21419 $as_echo_n "(cached) " >&6
21420else
21421
4a626d0a
PA
21422
21423
21424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
98399780
YQ
21425/* end confdefs.h. */
21426#include <stdlib.h>
98399780 21427_ACEOF
4a626d0a
PA
21428 case "$host_os" in
21429 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21430 *) gl_absname_cpp="$ac_cpp" ;;
21431 esac
21432
21433 case "$host_os" in
21434 mingw*)
21435 gl_dirsep_regex='[/\\]'
21436 ;;
21437 *)
21438 gl_dirsep_regex='\/'
21439 ;;
21440 esac
21441 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21442 gl_header_literal_regex=`echo 'stdlib.h' \
21443 | sed -e "$gl_make_literal_regex_sed"`
21444 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21445 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21446 s|^/[^/]|//&|
21447 p
21448 q
21449 }'
98399780 21450
4a626d0a
PA
21451 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21452 sed -n "$gl_absolute_header_sed"`
98399780 21453
4a626d0a
PA
21454 gl_header=$gl_cv_absolute_stdlib_h
21455 gl_cv_next_stdlib_h='"'$gl_header'"'
98399780
YQ
21456
21457
21458fi
21459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
21460$as_echo "$gl_cv_next_stdlib_h" >&6; }
21461 fi
21462 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
21463
21464 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21465 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21466 gl_next_as_first_directive='<'stdlib.h'>'
21467 else
21468 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21469 gl_next_as_first_directive=$gl_cv_next_stdlib_h
21470 fi
21471 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
21472
21473
21474
21475
21476
21477
4c62b19f 21478 for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt ptsname ptsname_r qsort_r random random_r realpath rpmatch secure_getenv setenv setstate setstate_r srandom srandom_r strtod strtoll strtoull unlockpt unsetenv; do
98399780
YQ
21479 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
21480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
21481$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
21482if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
21483 $as_echo_n "(cached) " >&6
21484else
21485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21486/* end confdefs.h. */
21487#include <stdlib.h>
21488#if HAVE_SYS_LOADAVG_H
21489# include <sys/loadavg.h>
21490#endif
21491#if HAVE_RANDOM_H
21492# include <random.h>
21493#endif
21494
21495int
21496main ()
21497{
21498#undef $gl_func
21499 (void) $gl_func;
21500 ;
21501 return 0;
21502}
21503_ACEOF
21504if ac_fn_c_try_compile "$LINENO"; then :
21505 eval "$as_gl_Symbol=yes"
21506else
21507 eval "$as_gl_Symbol=no"
21508fi
21509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21510fi
21511eval ac_res=\$$as_gl_Symbol
21512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21513$as_echo "$ac_res" >&6; }
21514 eval as_val=\$$as_gl_Symbol
21515 if test "x$as_val" = x""yes; then :
21516 cat >>confdefs.h <<_ACEOF
21517#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
21518_ACEOF
21519
21520 eval ac_cv_have_decl_$gl_func=yes
21521fi
21522 done
21523
21524
21525
21526
21527
21528
8424cc97
SM
21529 for ac_func in strchrnul
21530do :
21531 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
21532if test "x$ac_cv_func_strchrnul" = x""yes; then :
21533 cat >>confdefs.h <<_ACEOF
21534#define HAVE_STRCHRNUL 1
21535_ACEOF
21536
21537fi
21538done
21539
21540 if test $ac_cv_func_strchrnul = no; then
21541 HAVE_STRCHRNUL=0
21542 else
21543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
21544$as_echo_n "checking whether strchrnul works... " >&6; }
21545if test "${gl_cv_func_strchrnul_works+set}" = set; then :
21546 $as_echo_n "(cached) " >&6
21547else
21548 if test "$cross_compiling" = yes; then :
21549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21550/* end confdefs.h. */
21551
21552#if defined __CYGWIN__
21553 #include <cygwin/version.h>
21554 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
21555 Lucky user
21556 #endif
21557#else
21558 Lucky user
21559#endif
21560
21561_ACEOF
21562if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21563 $EGREP "Lucky user" >/dev/null 2>&1; then :
21564 gl_cv_func_strchrnul_works="guessing yes"
21565else
21566 gl_cv_func_strchrnul_works="guessing no"
21567fi
21568rm -f conftest*
21569
21570
21571else
21572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21573/* end confdefs.h. */
21574
21575#include <string.h> /* for strchrnul */
21576
21577int
21578main ()
21579{
21580const char *buf = "a";
21581 return strchrnul (buf, 'b') != buf + 1;
21582
21583 ;
21584 return 0;
21585}
21586_ACEOF
21587if ac_fn_c_try_run "$LINENO"; then :
21588 gl_cv_func_strchrnul_works=yes
21589else
21590 gl_cv_func_strchrnul_works=no
21591fi
21592rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21593 conftest.$ac_objext conftest.beam conftest.$ac_ext
21594fi
21595
21596
21597fi
21598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
21599$as_echo "$gl_cv_func_strchrnul_works" >&6; }
21600 case "$gl_cv_func_strchrnul_works" in
21601 *yes) ;;
21602 *) REPLACE_STRCHRNUL=1 ;;
21603 esac
21604 fi
21605
21606 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
21607
21608
21609
21610
21611
21612
21613
21614
21615 gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
21616
21617 :
21618 fi
21619
21620
21621
21622
21623
21624 GNULIB_STRCHRNUL=1
21625
21626
21627
21628
21629
21630$as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
21631
21632
21633
21634
21635
21636
21637
6ec2e0f5
SDJ
21638 if test $ac_cv_func_strdup = yes; then
21639 if test $gl_cv_func_malloc_posix != yes; then
21640 REPLACE_STRDUP=1
21641 fi
21642 fi
21643
21644 if test $ac_cv_have_decl_strdup = no; then
21645 HAVE_DECL_STRDUP=0
21646 fi
21647
21648 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
21649
21650
21651
21652
21653
21654
21655
21656
21657 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
21658
21659 :
21660 fi
21661
21662
21663
21664
21665
21666 GNULIB_STRDUP=1
21667
21668
21669
21670
21671
21672$as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
21673
21674
21675
21676
21677
21678
21679
21680
21681 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
21682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
21683$as_echo_n "checking for working strerror function... " >&6; }
21684if test "${gl_cv_func_working_strerror+set}" = set; then :
21685 $as_echo_n "(cached) " >&6
21686else
21687 if test "$cross_compiling" = yes; then :
21688 case "$host_os" in
21689 # Guess yes on glibc systems.
21690 *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
21691 # If we don't know, assume the worst.
21692 *) gl_cv_func_working_strerror="guessing no" ;;
21693 esac
21694
21695else
21696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21697/* end confdefs.h. */
21698#include <string.h>
21699
21700int
21701main ()
21702{
21703if (!*strerror (-2)) return 1;
21704 ;
21705 return 0;
21706}
21707_ACEOF
21708if ac_fn_c_try_run "$LINENO"; then :
21709 gl_cv_func_working_strerror=yes
21710else
21711 gl_cv_func_working_strerror=no
21712fi
21713rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21714 conftest.$ac_objext conftest.beam conftest.$ac_ext
21715fi
21716
21717
21718fi
21719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
21720$as_echo "$gl_cv_func_working_strerror" >&6; }
21721 case "$gl_cv_func_working_strerror" in
21722 *yes) ;;
21723 *)
21724 REPLACE_STRERROR=1
21725 ;;
21726 esac
21727
21728 else
21729 REPLACE_STRERROR=1
21730 fi
21731
21732 if test $REPLACE_STRERROR = 1; then
21733
21734
21735
21736
21737
21738
21739
21740
21741 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
21742
21743 fi
21744
21745
21746cat >>confdefs.h <<_ACEOF
21747#define GNULIB_STRERROR 1
21748_ACEOF
21749
21750
21751
21752
21753
21754
21755
21756 GNULIB_STRERROR=1
21757
21758
21759
21760
21761
21762$as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
21763
21764
21765
21766
21767
21768 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
21769
21770
21771
21772
21773
21774
21775
21776
21777 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
21778
21779
21780
21781
21782
21783 if test $ac_cv_header_sys_socket_h != yes; then
21784 for ac_header in winsock2.h
21785do :
21786 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
21787if test "x$ac_cv_header_winsock2_h" = x""yes; then :
21788 cat >>confdefs.h <<_ACEOF
21789#define HAVE_WINSOCK2_H 1
21790_ACEOF
21791
21792fi
21793
21794done
21795
21796 fi
21797 if test "$ac_cv_header_winsock2_h" = yes; then
21798 HAVE_WINSOCK2_H=1
21799 UNISTD_H_HAVE_WINSOCK2_H=1
21800 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
21801 else
21802 HAVE_WINSOCK2_H=0
21803 fi
21804
21805
21806 fi
21807
21808
21809
21810
98399780 21811
63ce7108
TT
21812 if test $REPLACE_STRSTR = 0; then
21813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
21814$as_echo_n "checking whether strstr works in linear time... " >&6; }
21815if test "${gl_cv_func_strstr_linear+set}" = set; then :
21816 $as_echo_n "(cached) " >&6
21817else
21818 if test "$cross_compiling" = yes; then :
21819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21820/* end confdefs.h. */
21821
21822#include <features.h>
21823#ifdef __GNU_LIBRARY__
21824 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
21825 && !(defined __i386__ || defined __x86_64__) \
21826 && !defined __UCLIBC__
21827 Lucky user
21828 #endif
21829#endif
21830#ifdef __CYGWIN__
21831 #include <cygwin/version.h>
21832 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
21833 Lucky user
21834 #endif
21835#endif
21836
21837_ACEOF
21838if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21839 $EGREP "Lucky user" >/dev/null 2>&1; then :
21840 gl_cv_func_strstr_linear="guessing yes"
c971b7fa 21841else
63ce7108 21842 gl_cv_func_strstr_linear="guessing no"
c971b7fa
PA
21843fi
21844rm -f conftest*
21845
21846
21847else
21848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21849/* end confdefs.h. */
21850
49e4877c
PA
21851#ifdef __MVS__
21852/* z/OS does not deliver signals while strstr() is running (thanks to
21853 restrictions on its LE runtime), which prevents us from limiting the
21854 running time of this test. */
21855# error "This test does not work properly on z/OS"
21856#endif
c971b7fa 21857#include <signal.h> /* for signal */
63ce7108 21858#include <string.h> /* for strstr */
c971b7fa
PA
21859#include <stdlib.h> /* for malloc */
21860#include <unistd.h> /* for alarm */
49e4877c 21861static void quit (int sig) { _exit (sig + 128); }
c971b7fa
PA
21862
21863int
21864main ()
21865{
21866
21867 int result = 0;
21868 size_t m = 1000000;
63ce7108
TT
21869 char *haystack = (char *) malloc (2 * m + 2);
21870 char *needle = (char *) malloc (m + 2);
c971b7fa 21871 /* Failure to compile this test due to missing alarm is okay,
63ce7108 21872 since all such platforms (mingw) also have quadratic strstr. */
c971b7fa
PA
21873 signal (SIGALRM, quit);
21874 alarm (5);
21875 /* Check for quadratic performance. */
21876 if (haystack && needle)
21877 {
21878 memset (haystack, 'A', 2 * m);
21879 haystack[2 * m] = 'B';
63ce7108 21880 haystack[2 * m + 1] = 0;
c971b7fa
PA
21881 memset (needle, 'A', m);
21882 needle[m] = 'B';
63ce7108
TT
21883 needle[m + 1] = 0;
21884 if (!strstr (haystack, needle))
c971b7fa
PA
21885 result |= 1;
21886 }
21887 return result;
21888
21889 ;
21890 return 0;
21891}
21892_ACEOF
21893if ac_fn_c_try_run "$LINENO"; then :
63ce7108 21894 gl_cv_func_strstr_linear=yes
c971b7fa 21895else
63ce7108 21896 gl_cv_func_strstr_linear=no
c971b7fa
PA
21897fi
21898rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21899 conftest.$ac_objext conftest.beam conftest.$ac_ext
21900fi
21901
21902
21903fi
63ce7108
TT
21904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
21905$as_echo "$gl_cv_func_strstr_linear" >&6; }
21906 case "$gl_cv_func_strstr_linear" in
40a73391
JK
21907 *yes) ;;
21908 *)
63ce7108 21909 REPLACE_STRSTR=1
40a73391
JK
21910 ;;
21911 esac
c971b7fa
PA
21912 fi
21913
63ce7108 21914 if test $REPLACE_STRSTR = 1; then
c971b7fa
PA
21915
21916
21917
21918
21919
21920
21921
21922
63ce7108 21923 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
c971b7fa 21924
a512b375 21925 fi
c971b7fa
PA
21926
21927
21928
63ce7108
TT
21929 if test "$gl_cv_func_memchr_works" != yes; then
21930 REPLACE_STRSTR=1
c971b7fa 21931 else
63ce7108
TT
21932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
21933$as_echo_n "checking whether strstr works... " >&6; }
21934if test "${gl_cv_func_strstr_works_always+set}" = set; then :
c971b7fa
PA
21935 $as_echo_n "(cached) " >&6
21936else
21937 if test "$cross_compiling" = yes; then :
63ce7108 21938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
21939/* end confdefs.h. */
21940
21941#ifdef __GNU_LIBRARY__
21942 #include <features.h>
63ce7108 21943 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
c971b7fa
PA
21944 || defined __UCLIBC__
21945 Lucky user
21946 #endif
21947#elif defined __CYGWIN__
21948 #include <cygwin/version.h>
21949 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
21950 Lucky user
21951 #endif
21952#else
21953 Lucky user
21954#endif
21955
21956_ACEOF
21957if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21958 $EGREP "Lucky user" >/dev/null 2>&1; then :
63ce7108 21959 gl_cv_func_strstr_works_always="guessing yes"
c971b7fa 21960else
63ce7108 21961 gl_cv_func_strstr_works_always="guessing no"
c971b7fa
PA
21962fi
21963rm -f conftest*
21964
21965
21966else
21967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21968/* end confdefs.h. */
21969
63ce7108 21970#include <string.h> /* for strstr */
c971b7fa
PA
21971#define P "_EF_BF_BD"
21972#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
21973#define NEEDLE P P P P P
21974
21975int
21976main ()
21977{
63ce7108 21978return !!strstr (HAYSTACK, NEEDLE);
c971b7fa
PA
21979
21980 ;
21981 return 0;
21982}
21983_ACEOF
21984if ac_fn_c_try_run "$LINENO"; then :
63ce7108 21985 gl_cv_func_strstr_works_always=yes
c971b7fa 21986else
63ce7108 21987 gl_cv_func_strstr_works_always=no
c971b7fa
PA
21988fi
21989rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21990 conftest.$ac_objext conftest.beam conftest.$ac_ext
21991fi
21992
21993
21994fi
63ce7108
TT
21995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
21996$as_echo "$gl_cv_func_strstr_works_always" >&6; }
21997 case "$gl_cv_func_strstr_works_always" in
40a73391
JK
21998 *yes) ;;
21999 *)
63ce7108 22000 REPLACE_STRSTR=1
40a73391
JK
22001 ;;
22002 esac
c971b7fa 22003 fi
8839a007 22004
63ce7108 22005 if test $REPLACE_STRSTR = 1; then
8839a007 22006
8690e634
JK
22007
22008
8690e634
JK
22009
22010
22011
22012
22013
63ce7108 22014 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
8690e634 22015
8690e634
JK
22016 fi
22017
8690e634
JK
22018
22019
8690e634 22020
8690e634 22021
63ce7108 22022 GNULIB_STRSTR=1
8690e634
JK
22023
22024
22025
8690e634
JK
22026
22027
63ce7108 22028$as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
8690e634
JK
22029
22030
22031
22032
22033
22034
22035
421693b0
PA
22036 for ac_func in strtok_r
22037do :
22038 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
22039if test "x$ac_cv_func_strtok_r" = x""yes; then :
22040 cat >>confdefs.h <<_ACEOF
22041#define HAVE_STRTOK_R 1
22042_ACEOF
22043
22044fi
22045done
22046
22047 if test $ac_cv_func_strtok_r = yes; then
22048 HAVE_STRTOK_R=1
22049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5
22050$as_echo_n "checking whether strtok_r works... " >&6; }
22051if test "${gl_cv_func_strtok_r_works+set}" = set; then :
22052 $as_echo_n "(cached) " >&6
22053else
22054 if test "$cross_compiling" = yes; then :
22055
22056 case "$host_os" in
22057 # Guess no on glibc systems.
22058 *-gnu*) gl_cv_func_strtok_r_works="guessing no";;
22059 *) gl_cv_func_strtok_r_works="guessing yes";;
22060 esac
22061
22062else
22063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22064/* end confdefs.h. */
22065
22066 #ifndef __OPTIMIZE__
22067 # define __OPTIMIZE__ 1
22068 #endif
22069 #undef __OPTIMIZE_SIZE__
22070 #undef __NO_INLINE__
22071 #include <stdlib.h>
22072 #include <string.h>
22073
22074int
22075main ()
22076{
22077static const char dummy[] = "\177\01a";
22078 char delimiters[] = "xxxxxxxx";
22079 char *save_ptr = (char *) dummy;
22080 strtok_r (delimiters, "x", &save_ptr);
22081 strtok_r (NULL, "x", &save_ptr);
22082 return 0;
22083
22084 ;
22085 return 0;
22086}
22087
22088_ACEOF
22089if ac_fn_c_try_run "$LINENO"; then :
22090 gl_cv_func_strtok_r_works=yes
22091else
22092 gl_cv_func_strtok_r_works=no
22093fi
22094rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22095 conftest.$ac_objext conftest.beam conftest.$ac_ext
22096fi
22097
22098
22099fi
22100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5
22101$as_echo "$gl_cv_func_strtok_r_works" >&6; }
22102 case "$gl_cv_func_strtok_r_works" in
22103 *no)
22104 UNDEFINE_STRTOK_R=1
22105 ;;
22106 esac
22107 else
22108 HAVE_STRTOK_R=0
22109 fi
22110
22111 if test $ac_cv_have_decl_strtok_r = no; then
22112 HAVE_DECL_STRTOK_R=0
22113 fi
22114
22115 if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
22116
22117
22118
22119
22120
22121
22122
22123
22124 gl_LIBOBJS="$gl_LIBOBJS strtok_r.$ac_objext"
22125
22126
22127 :
22128
22129 fi
22130
22131
22132
22133
22134
22135 GNULIB_STRTOK_R=1
22136
22137
22138
22139
22140
22141$as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h
22142
22143
22144
22145
22146
22147
22148
8690e634
JK
22149
22150
22151
22152
22153
8690e634 22154
09607c9e
TT
22155
22156
22157
22158
22159 if test $gl_cv_have_include_next = yes; then
22160 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
22161 else
22162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
22163$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
22164if test "${gl_cv_next_sys_stat_h+set}" = set; then :
22165 $as_echo_n "(cached) " >&6
22166else
22167
22168 if test $ac_cv_header_sys_stat_h = yes; then
22169
22170
4a626d0a
PA
22171
22172
22173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
09607c9e
TT
22174/* end confdefs.h. */
22175#include <sys/stat.h>
09607c9e 22176_ACEOF
4a626d0a
PA
22177 case "$host_os" in
22178 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22179 *) gl_absname_cpp="$ac_cpp" ;;
22180 esac
22181
22182 case "$host_os" in
22183 mingw*)
22184 gl_dirsep_regex='[/\\]'
22185 ;;
22186 *)
22187 gl_dirsep_regex='\/'
22188 ;;
22189 esac
22190 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22191 gl_header_literal_regex=`echo 'sys/stat.h' \
22192 | sed -e "$gl_make_literal_regex_sed"`
22193 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22194 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22195 s|^/[^/]|//&|
22196 p
22197 q
22198 }'
22199
22200 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22201 sed -n "$gl_absolute_header_sed"`
22202
22203 gl_header=$gl_cv_absolute_sys_stat_h
22204 gl_cv_next_sys_stat_h='"'$gl_header'"'
09607c9e
TT
22205 else
22206 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
22207 fi
22208
22209
22210fi
22211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
22212$as_echo "$gl_cv_next_sys_stat_h" >&6; }
22213 fi
22214 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
22215
22216 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22217 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22218 gl_next_as_first_directive='<'sys/stat.h'>'
22219 else
22220 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22221 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
22222 fi
22223 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
22224
22225
22226
22227
22228
22229
22230
22231
2196f55f 22232
09607c9e
TT
22233
22234
22235 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
22236
22237$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
22238
22239 fi
22240
22241 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
22242 #include <sys/stat.h>
22243"
22244if test "x$ac_cv_type_nlink_t" = x""yes; then :
22245
22246else
22247
22248$as_echo "#define nlink_t int" >>confdefs.h
22249
22250fi
22251
22252
22253
22254 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
22255 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22257$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
22258if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
22259 $as_echo_n "(cached) " >&6
22260else
22261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22262/* end confdefs.h. */
22263#include <sys/stat.h>
22264
22265int
22266main ()
22267{
22268#undef $gl_func
22269 (void) $gl_func;
22270 ;
22271 return 0;
22272}
22273_ACEOF
22274if ac_fn_c_try_compile "$LINENO"; then :
22275 eval "$as_gl_Symbol=yes"
22276else
22277 eval "$as_gl_Symbol=no"
22278fi
22279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22280fi
22281eval ac_res=\$$as_gl_Symbol
22282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22283$as_echo "$ac_res" >&6; }
22284 eval as_val=\$$as_gl_Symbol
22285 if test "x$as_val" = x""yes; then :
22286 cat >>confdefs.h <<_ACEOF
22287#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22288_ACEOF
22289
22290 eval ac_cv_have_decl_$gl_func=yes
22291fi
22292 done
22293
22294
22295
22296
22297
22298
22299
22300
22301
22302
22303
22304
22305
22306
8839a007
PA
22307
22308
22309
22310
09607c9e
TT
22311
22312
8839a007
PA
22313
22314
22315
22316
22317 if test $gl_cv_have_include_next = yes; then
22318 gl_cv_next_unistd_h='<'unistd.h'>'
22319 else
22320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
22321$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
22322if test "${gl_cv_next_unistd_h+set}" = set; then :
22323 $as_echo_n "(cached) " >&6
22324else
22325
22326 if test $ac_cv_header_unistd_h = yes; then
22327
22328
4a626d0a
PA
22329
22330
22331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8839a007
PA
22332/* end confdefs.h. */
22333#include <unistd.h>
8839a007 22334_ACEOF
4a626d0a
PA
22335 case "$host_os" in
22336 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22337 *) gl_absname_cpp="$ac_cpp" ;;
22338 esac
22339
22340 case "$host_os" in
22341 mingw*)
22342 gl_dirsep_regex='[/\\]'
22343 ;;
22344 *)
22345 gl_dirsep_regex='\/'
22346 ;;
22347 esac
22348 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22349 gl_header_literal_regex=`echo 'unistd.h' \
22350 | sed -e "$gl_make_literal_regex_sed"`
22351 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22352 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22353 s|^/[^/]|//&|
22354 p
22355 q
22356 }'
22357
22358 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22359 sed -n "$gl_absolute_header_sed"`
22360
22361 gl_header=$gl_cv_absolute_unistd_h
22362 gl_cv_next_unistd_h='"'$gl_header'"'
8839a007
PA
22363 else
22364 gl_cv_next_unistd_h='<'unistd.h'>'
22365 fi
22366
22367
22368fi
22369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
22370$as_echo "$gl_cv_next_unistd_h" >&6; }
22371 fi
22372 NEXT_UNISTD_H=$gl_cv_next_unistd_h
22373
22374 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22375 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22376 gl_next_as_first_directive='<'unistd.h'>'
22377 else
22378 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22379 gl_next_as_first_directive=$gl_cv_next_unistd_h
22380 fi
22381 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
22382
22383
22384
22385
22386 if test $ac_cv_header_unistd_h = yes; then
22387 HAVE_UNISTD_H=1
22388 else
22389 HAVE_UNISTD_H=0
22390 fi
22391
22392
22393
22394
22395
22396
22397
22398 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
22399 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22401$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
22402if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
22403 $as_echo_n "(cached) " >&6
22404else
22405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22406/* end confdefs.h. */
22407
22408#if HAVE_UNISTD_H
22409# include <unistd.h>
22410#endif
22411/* Some systems declare various items in the wrong headers. */
22412#if !(defined __GLIBC__ && !defined __UCLIBC__)
22413# include <fcntl.h>
22414# include <stdio.h>
22415# include <stdlib.h>
22416# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
22417# include <io.h>
22418# endif
22419#endif
22420
22421int
22422main ()
22423{
22424#undef $gl_func
22425 (void) $gl_func;
22426 ;
22427 return 0;
22428}
22429_ACEOF
22430if ac_fn_c_try_compile "$LINENO"; then :
22431 eval "$as_gl_Symbol=yes"
22432else
22433 eval "$as_gl_Symbol=no"
22434fi
22435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22436fi
22437eval ac_res=\$$as_gl_Symbol
22438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22439$as_echo "$ac_res" >&6; }
22440 eval as_val=\$$as_gl_Symbol
22441 if test "x$as_val" = x""yes; then :
22442 cat >>confdefs.h <<_ACEOF
22443#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22444_ACEOF
22445
22446 eval ac_cv_have_decl_$gl_func=yes
22447fi
22448 done
22449
22450
22451
22452
22453
6ec2e0f5
SDJ
22454
22455
22456
3d99e817
AK
22457 if test $ac_cv_have_decl_unsetenv = no; then
22458 HAVE_DECL_UNSETENV=0
22459 fi
22460 for ac_func in unsetenv
22461do :
22462 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
22463if test "x$ac_cv_func_unsetenv" = x""yes; then :
22464 cat >>confdefs.h <<_ACEOF
22465#define HAVE_UNSETENV 1
22466_ACEOF
22467
22468fi
22469done
22470
22471 if test $ac_cv_func_unsetenv = no; then
22472 HAVE_UNSETENV=0
22473 else
22474 HAVE_UNSETENV=1
22475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
22476$as_echo_n "checking for unsetenv() return type... " >&6; }
22477if test "${gt_cv_func_unsetenv_ret+set}" = set; then :
22478 $as_echo_n "(cached) " >&6
22479else
22480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22481/* end confdefs.h. */
22482
22483#undef _BSD
22484#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
22485#include <stdlib.h>
22486extern
22487#ifdef __cplusplus
22488"C"
22489#endif
22490int unsetenv (const char *name);
22491
22492int
22493main ()
22494{
22495
22496 ;
22497 return 0;
22498}
22499_ACEOF
22500if ac_fn_c_try_compile "$LINENO"; then :
22501 gt_cv_func_unsetenv_ret='int'
22502else
22503 gt_cv_func_unsetenv_ret='void'
22504fi
22505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22506fi
22507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
22508$as_echo "$gt_cv_func_unsetenv_ret" >&6; }
22509 if test $gt_cv_func_unsetenv_ret = 'void'; then
22510
22511$as_echo "#define VOID_UNSETENV 1" >>confdefs.h
22512
22513 REPLACE_UNSETENV=1
22514 fi
22515
22516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
22517$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
22518if test "${gl_cv_func_unsetenv_works+set}" = set; then :
22519 $as_echo_n "(cached) " >&6
22520else
22521 if test "$cross_compiling" = yes; then :
22522 case "$host_os" in
22523 # Guess yes on glibc systems.
22524 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
22525 # If we don't know, assume the worst.
22526 *) gl_cv_func_unsetenv_works="guessing no" ;;
22527 esac
22528
22529else
22530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22531/* end confdefs.h. */
22532
22533 #include <stdlib.h>
22534 #include <errno.h>
22535 extern char **environ;
22536
22537int
22538main ()
22539{
22540
22541 char entry1[] = "a=1";
22542 char entry2[] = "b=2";
22543 char *env[] = { entry1, entry2, NULL };
22544 if (putenv ((char *) "a=1")) return 1;
22545 if (putenv (entry2)) return 2;
22546 entry2[0] = 'a';
22547 unsetenv ("a");
22548 if (getenv ("a")) return 3;
22549 if (!unsetenv ("") || errno != EINVAL) return 4;
22550 entry2[0] = 'b';
22551 environ = env;
22552 if (!getenv ("a")) return 5;
22553 entry2[0] = 'a';
22554 unsetenv ("a");
22555 if (getenv ("a")) return 6;
22556
22557 ;
22558 return 0;
22559}
22560_ACEOF
22561if ac_fn_c_try_run "$LINENO"; then :
22562 gl_cv_func_unsetenv_works=yes
22563else
22564 gl_cv_func_unsetenv_works=no
22565fi
22566rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22567 conftest.$ac_objext conftest.beam conftest.$ac_ext
22568fi
22569
22570fi
22571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
22572$as_echo "$gl_cv_func_unsetenv_works" >&6; }
22573 case "$gl_cv_func_unsetenv_works" in
22574 *yes) ;;
22575 *)
22576 REPLACE_UNSETENV=1
22577 ;;
22578 esac
22579 fi
22580
22581 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
22582
22583
22584
22585
22586
22587
22588
22589
22590 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
22591
22592
22593
22594
22595
22596 fi
22597
22598
22599
22600
22601
22602 GNULIB_UNSETENV=1
22603
22604
22605
22606
22607
22608$as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
22609
22610
22611
22612
22613
22614
8839a007
PA
22615
22616
22617
22618
22619
22620
22621
8690e634
JK
22622
22623
22624 if test $gl_cv_have_include_next = yes; then
22625 gl_cv_next_wchar_h='<'wchar.h'>'
22626 else
22627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
22628$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
22629if test "${gl_cv_next_wchar_h+set}" = set; then :
22630 $as_echo_n "(cached) " >&6
22631else
22632
22633 if test $ac_cv_header_wchar_h = yes; then
22634
22635
4a626d0a
PA
22636
22637
22638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
22639/* end confdefs.h. */
22640#include <wchar.h>
8690e634 22641_ACEOF
4a626d0a
PA
22642 case "$host_os" in
22643 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22644 *) gl_absname_cpp="$ac_cpp" ;;
22645 esac
22646
22647 case "$host_os" in
22648 mingw*)
22649 gl_dirsep_regex='[/\\]'
22650 ;;
22651 *)
22652 gl_dirsep_regex='\/'
22653 ;;
22654 esac
22655 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22656 gl_header_literal_regex=`echo 'wchar.h' \
22657 | sed -e "$gl_make_literal_regex_sed"`
22658 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22659 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22660 s|^/[^/]|//&|
22661 p
22662 q
22663 }'
22664
22665 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22666 sed -n "$gl_absolute_header_sed"`
22667
22668 gl_header=$gl_cv_absolute_wchar_h
22669 gl_cv_next_wchar_h='"'$gl_header'"'
8690e634
JK
22670 else
22671 gl_cv_next_wchar_h='<'wchar.h'>'
22672 fi
22673
22674
22675fi
22676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
22677$as_echo "$gl_cv_next_wchar_h" >&6; }
22678 fi
22679 NEXT_WCHAR_H=$gl_cv_next_wchar_h
22680
22681 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22682 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22683 gl_next_as_first_directive='<'wchar.h'>'
22684 else
22685 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22686 gl_next_as_first_directive=$gl_cv_next_wchar_h
22687 fi
22688 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
22689
22690
22691
22692
22693 if test $ac_cv_header_wchar_h = yes; then
22694 HAVE_WCHAR_H=1
22695 else
22696 HAVE_WCHAR_H=0
22697 fi
22698
c971b7fa
PA
22699
22700
22701
22702
8690e634
JK
22703 if test $gt_cv_c_wint_t = yes; then
22704 HAVE_WINT_T=1
22705 else
22706 HAVE_WINT_T=0
22707 fi
c971b7fa
PA
22708
22709
22710
8690e634
JK
22711 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
22712 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22714$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
22715if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
c971b7fa
PA
22716 $as_echo_n "(cached) " >&6
22717else
22718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22719/* end confdefs.h. */
8690e634
JK
22720
22721/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22722 <wchar.h>.
22723 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22724 included before <wchar.h>. */
22725#if !(defined __GLIBC__ && !defined __UCLIBC__)
22726# include <stddef.h>
22727# include <stdio.h>
22728# include <time.h>
22729#endif
22730#include <wchar.h>
c971b7fa
PA
22731
22732int
22733main ()
22734{
8690e634
JK
22735#undef $gl_func
22736 (void) $gl_func;
c971b7fa
PA
22737 ;
22738 return 0;
22739}
22740_ACEOF
22741if ac_fn_c_try_compile "$LINENO"; then :
8690e634 22742 eval "$as_gl_Symbol=yes"
c971b7fa 22743else
8690e634 22744 eval "$as_gl_Symbol=no"
c971b7fa
PA
22745fi
22746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22747fi
8690e634
JK
22748eval ac_res=\$$as_gl_Symbol
22749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22750$as_echo "$ac_res" >&6; }
22751 eval as_val=\$$as_gl_Symbol
22752 if test "x$as_val" = x""yes; then :
22753 cat >>confdefs.h <<_ACEOF
22754#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22755_ACEOF
c971b7fa 22756
8690e634 22757 eval ac_cv_have_decl_$gl_func=yes
c971b7fa 22758fi
8690e634
JK
22759 done
22760
22761
22762
22763
22764
22765
22766
8690e634
JK
22767 if test $ac_cv_func_iswcntrl = yes; then
22768 HAVE_ISWCNTRL=1
22769 else
22770 HAVE_ISWCNTRL=0
22771 fi
22772
22773
22774
8690e634
JK
22775 if test $gt_cv_c_wint_t = yes; then
22776 HAVE_WINT_T=1
22777 else
22778 HAVE_WINT_T=0
22779 fi
22780
22781
22782
22783
22784
22785
c971b7fa 22786
8690e634 22787
c971b7fa
PA
22788
22789
22790
22791 if test $gl_cv_have_include_next = yes; then
8690e634 22792 gl_cv_next_wctype_h='<'wctype.h'>'
c971b7fa 22793 else
8690e634
JK
22794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
22795$as_echo_n "checking absolute name of <wctype.h>... " >&6; }
22796if test "${gl_cv_next_wctype_h+set}" = set; then :
c971b7fa
PA
22797 $as_echo_n "(cached) " >&6
22798else
22799
8690e634
JK
22800 if test $ac_cv_header_wctype_h = yes; then
22801
22802
4a626d0a
PA
22803
22804
22805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 22806/* end confdefs.h. */
8690e634 22807#include <wctype.h>
c971b7fa 22808_ACEOF
4a626d0a
PA
22809 case "$host_os" in
22810 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22811 *) gl_absname_cpp="$ac_cpp" ;;
22812 esac
22813
22814 case "$host_os" in
22815 mingw*)
22816 gl_dirsep_regex='[/\\]'
22817 ;;
22818 *)
22819 gl_dirsep_regex='\/'
22820 ;;
22821 esac
22822 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22823 gl_header_literal_regex=`echo 'wctype.h' \
22824 | sed -e "$gl_make_literal_regex_sed"`
22825 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22826 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22827 s|^/[^/]|//&|
22828 p
22829 q
22830 }'
22831
22832 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22833 sed -n "$gl_absolute_header_sed"`
22834
22835 gl_header=$gl_cv_absolute_wctype_h
22836 gl_cv_next_wctype_h='"'$gl_header'"'
8690e634
JK
22837 else
22838 gl_cv_next_wctype_h='<'wctype.h'>'
22839 fi
c971b7fa
PA
22840
22841
22842fi
8690e634
JK
22843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
22844$as_echo "$gl_cv_next_wctype_h" >&6; }
c971b7fa 22845 fi
8690e634 22846 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
c971b7fa
PA
22847
22848 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22849 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8690e634 22850 gl_next_as_first_directive='<'wctype.h'>'
c971b7fa
PA
22851 else
22852 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8690e634 22853 gl_next_as_first_directive=$gl_cv_next_wctype_h
c971b7fa 22854 fi
8690e634
JK
22855 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
22856
22857
22858
22859
22860 if test $ac_cv_header_wctype_h = yes; then
22861 if test $ac_cv_func_iswcntrl = yes; then
22862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
22863$as_echo_n "checking whether iswcntrl works... " >&6; }
22864if test "${gl_cv_func_iswcntrl_works+set}" = set; then :
22865 $as_echo_n "(cached) " >&6
22866else
22867
22868 if test "$cross_compiling" = yes; then :
22869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22870/* end confdefs.h. */
22871#include <stdlib.h>
22872 #if __GNU_LIBRARY__ == 1
22873 Linux libc5 i18n is broken.
22874 #endif
22875int
22876main ()
22877{
22878
22879 ;
22880 return 0;
22881}
22882_ACEOF
22883if ac_fn_c_try_compile "$LINENO"; then :
22884 gl_cv_func_iswcntrl_works="guessing yes"
22885else
22886 gl_cv_func_iswcntrl_works="guessing no"
22887fi
22888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22889
22890else
22891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22892/* end confdefs.h. */
22893
22894 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
22895 included before <wchar.h>.
22896 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
22897 must be included before <wchar.h>. */
22898 #include <stddef.h>
22899 #include <stdio.h>
22900 #include <time.h>
22901 #include <wchar.h>
22902 #include <wctype.h>
22903 int main () { return iswprint ('x') == 0; }
22904
22905_ACEOF
22906if ac_fn_c_try_run "$LINENO"; then :
22907 gl_cv_func_iswcntrl_works=yes
22908else
22909 gl_cv_func_iswcntrl_works=no
22910fi
22911rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22912 conftest.$ac_objext conftest.beam conftest.$ac_ext
22913fi
22914
22915
22916fi
22917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
22918$as_echo "$gl_cv_func_iswcntrl_works" >&6; }
22919 fi
22920 HAVE_WCTYPE_H=1
22921 else
22922 HAVE_WCTYPE_H=0
22923 fi
22924
22925
22926 case "$gl_cv_func_iswcntrl_works" in
22927 *yes) REPLACE_ISWCNTRL=0 ;;
22928 *) REPLACE_ISWCNTRL=1 ;;
22929 esac
22930
22931
22932 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
22933 :
22934 fi
22935
22936 if test $REPLACE_ISWCNTRL = 1; then
22937 REPLACE_TOWLOWER=1
22938 else
22939 for ac_func in towlower
22940do :
22941 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
22942if test "x$ac_cv_func_towlower" = x""yes; then :
22943 cat >>confdefs.h <<_ACEOF
22944#define HAVE_TOWLOWER 1
22945_ACEOF
22946
22947fi
22948done
22949
22950 if test $ac_cv_func_towlower = yes; then
22951 REPLACE_TOWLOWER=0
22952 else
22953 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
22954 included before <wchar.h>.
22955 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
22956 must be included before <wchar.h>. */
22957 #include <stddef.h>
22958 #include <stdio.h>
22959 #include <time.h>
22960 #include <wchar.h>
22961 #if HAVE_WCTYPE_H
22962 # include <wctype.h>
22963 #endif
22964
22965"
22966if test "x$ac_cv_have_decl_towlower" = x""yes; then :
22967 ac_have_decl=1
22968else
22969 ac_have_decl=0
22970fi
22971
22972cat >>confdefs.h <<_ACEOF
22973#define HAVE_DECL_TOWLOWER $ac_have_decl
22974_ACEOF
22975
22976 if test $ac_cv_have_decl_towlower = yes; then
22977 REPLACE_TOWLOWER=1
22978 else
22979 REPLACE_TOWLOWER=0
22980 fi
22981 fi
22982 fi
22983
22984
22985 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
22986 :
22987 fi
22988
22989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
22990$as_echo_n "checking for wctype_t... " >&6; }
22991if test "${gl_cv_type_wctype_t+set}" = set; then :
22992 $as_echo_n "(cached) " >&6
22993else
22994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22995/* end confdefs.h. */
22996/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
22997 included before <wchar.h>.
22998 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
22999 must be included before <wchar.h>. */
23000 #include <stddef.h>
23001 #include <stdio.h>
23002 #include <time.h>
23003 #include <wchar.h>
23004 #if HAVE_WCTYPE_H
23005 # include <wctype.h>
23006 #endif
23007 wctype_t a;
23008
23009int
23010main ()
23011{
23012
23013 ;
23014 return 0;
23015}
23016_ACEOF
23017if ac_fn_c_try_compile "$LINENO"; then :
23018 gl_cv_type_wctype_t=yes
23019else
23020 gl_cv_type_wctype_t=no
23021fi
23022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 23023
8690e634
JK
23024fi
23025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
23026$as_echo "$gl_cv_type_wctype_t" >&6; }
23027 if test $gl_cv_type_wctype_t = no; then
23028 HAVE_WCTYPE_T=0
23029 fi
23030
23031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
23032$as_echo_n "checking for wctrans_t... " >&6; }
23033if test "${gl_cv_type_wctrans_t+set}" = set; then :
23034 $as_echo_n "(cached) " >&6
23035else
23036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23037/* end confdefs.h. */
23038/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
23039 included before <wchar.h>.
23040 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
23041 must be included before <wchar.h>. */
23042 #include <stddef.h>
23043 #include <stdio.h>
23044 #include <time.h>
23045 #include <wchar.h>
23046 #include <wctype.h>
23047 wctrans_t a;
c971b7fa 23048
8690e634
JK
23049int
23050main ()
23051{
c971b7fa 23052
8690e634
JK
23053 ;
23054 return 0;
23055}
23056_ACEOF
23057if ac_fn_c_try_compile "$LINENO"; then :
23058 gl_cv_type_wctrans_t=yes
23059else
23060 gl_cv_type_wctrans_t=no
23061fi
23062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 23063
8690e634
JK
23064fi
23065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
23066$as_echo "$gl_cv_type_wctrans_t" >&6; }
23067 if test $gl_cv_type_wctrans_t = no; then
23068 HAVE_WCTRANS_T=0
c971b7fa
PA
23069 fi
23070
23071
8690e634
JK
23072 for gl_func in wctype iswctype wctrans towctrans ; do
23073 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
23074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
23075$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
23076if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
23077 $as_echo_n "(cached) " >&6
23078else
23079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23080/* end confdefs.h. */
23081
23082/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23083 <wchar.h>.
23084 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23085 included before <wchar.h>. */
23086#if !(defined __GLIBC__ && !defined __UCLIBC__)
23087# include <stddef.h>
23088# include <stdio.h>
23089# include <time.h>
23090# include <wchar.h>
23091#endif
23092#include <wctype.h>
23093
23094int
23095main ()
23096{
23097#undef $gl_func
23098 (void) $gl_func;
23099 ;
23100 return 0;
23101}
23102_ACEOF
23103if ac_fn_c_try_compile "$LINENO"; then :
23104 eval "$as_gl_Symbol=yes"
23105else
23106 eval "$as_gl_Symbol=no"
23107fi
23108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23109fi
23110eval ac_res=\$$as_gl_Symbol
23111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23112$as_echo "$ac_res" >&6; }
23113 eval as_val=\$$as_gl_Symbol
23114 if test "x$as_val" = x""yes; then :
23115 cat >>confdefs.h <<_ACEOF
23116#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
23117_ACEOF
c971b7fa 23118
8690e634
JK
23119 eval ac_cv_have_decl_$gl_func=yes
23120fi
23121 done
c971b7fa
PA
23122
23123
23124 # End of code from modules
23125
23126
23127
23128
23129
23130
23131
23132
23133
23134 gltests_libdeps=
23135 gltests_ltlibdeps=
23136
23137
23138
23139
23140
23141
23142
23143
23144
23145 gl_source_base='tests'
23146 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
23147
23148 gl_module_indicator_condition=$gltests_WITNESS
23149
23150
23151
23152
23153
23154
23155
23156
23157
23158 LIBGNU_LIBDEPS="$gl_libdeps"
23159
23160 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
23161
23162
23163
23164# We don't use automake, but gnulib does. This line lets us generate
23165# its Makefile.in.
23166am__api_version='1.11'
23167
23168# Find a good install program. We prefer a C program (faster),
23169# so one script is as good as another. But avoid the broken or
23170# incompatible versions:
23171# SysV /etc/install, /usr/sbin/install
23172# SunOS /usr/etc/install
23173# IRIX /sbin/install
23174# AIX /bin/install
23175# AmigaOS /C/install, which installs bootblocks on floppy discs
23176# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
23177# AFS /usr/afsws/bin/install, which mishandles nonexistent args
23178# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
23179# OS/2's system install, which has a completely different semantic
23180# ./install, which can be erroneously created by make from ./install.sh.
23181# Reject install programs that cannot install multiple files.
23182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
23183$as_echo_n "checking for a BSD-compatible install... " >&6; }
23184if test -z "$INSTALL"; then
23185if test "${ac_cv_path_install+set}" = set; then :
23186 $as_echo_n "(cached) " >&6
23187else
23188 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23189for as_dir in $PATH
23190do
23191 IFS=$as_save_IFS
23192 test -z "$as_dir" && as_dir=.
23193 # Account for people who put trailing slashes in PATH elements.
23194case $as_dir/ in #((
23195 ./ | .// | /[cC]/* | \
23196 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
23197 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
23198 /usr/ucb/* ) ;;
23199 *)
23200 # OSF1 and SCO ODT 3.0 have their own names for install.
23201 # Don't use installbsd from OSF since it installs stuff as root
23202 # by default.
23203 for ac_prog in ginstall scoinst install; do
23204 for ac_exec_ext in '' $ac_executable_extensions; do
23205 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
23206 if test $ac_prog = install &&
23207 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
23208 # AIX install. It has an incompatible calling convention.
23209 :
23210 elif test $ac_prog = install &&
23211 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
23212 # program-specific install script used by HP pwplus--don't use.
23213 :
23214 else
23215 rm -rf conftest.one conftest.two conftest.dir
23216 echo one > conftest.one
23217 echo two > conftest.two
23218 mkdir conftest.dir
23219 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
23220 test -s conftest.one && test -s conftest.two &&
23221 test -s conftest.dir/conftest.one &&
23222 test -s conftest.dir/conftest.two
23223 then
23224 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
23225 break 3
23226 fi
23227 fi
23228 fi
23229 done
23230 done
23231 ;;
23232esac
23233
23234 done
23235IFS=$as_save_IFS
23236
23237rm -rf conftest.one conftest.two conftest.dir
23238
23239fi
23240 if test "${ac_cv_path_install+set}" = set; then
23241 INSTALL=$ac_cv_path_install
23242 else
23243 # As a last resort, use the slow shell script. Don't cache a
23244 # value for INSTALL within a source directory, because that will
23245 # break other packages using the cache if that directory is
23246 # removed, or if the value is a relative name.
23247 INSTALL=$ac_install_sh
23248 fi
23249fi
23250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
23251$as_echo "$INSTALL" >&6; }
23252
23253# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
23254# It thinks the first close brace ends the variable substitution.
23255test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
23256
23257test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
23258
23259test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
23260
23261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
23262$as_echo_n "checking whether build environment is sane... " >&6; }
23263# Just in case
23264sleep 1
23265echo timestamp > conftest.file
23266# Reject unsafe characters in $srcdir or the absolute working directory
23267# name. Accept space and tab only in the latter.
23268am_lf='
23269'
23270case `pwd` in
23271 *[\\\"\#\$\&\'\`$am_lf]*)
23272 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
23273esac
23274case $srcdir in
23275 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
23276 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
23277esac
23278
23279# Do `set' in a subshell so we don't clobber the current shell's
23280# arguments. Must try -L first in case configure is actually a
23281# symlink; some systems play weird games with the mod time of symlinks
23282# (eg FreeBSD returns the mod time of the symlink's containing
23283# directory).
23284if (
23285 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
23286 if test "$*" = "X"; then
23287 # -L didn't work.
23288 set X `ls -t "$srcdir/configure" conftest.file`
23289 fi
23290 rm -f conftest.file
23291 if test "$*" != "X $srcdir/configure conftest.file" \
23292 && test "$*" != "X conftest.file $srcdir/configure"; then
23293
23294 # If neither matched, then we have a broken ls. This can happen
23295 # if, for instance, CONFIG_SHELL is bash and it inherits a
23296 # broken ls alias from the environment. This has actually
23297 # happened. Such a system could not be considered "sane".
23298 as_fn_error "ls -t appears to fail. Make sure there is not a broken
23299alias in your environment" "$LINENO" 5
23300 fi
23301
23302 test "$2" = conftest.file
23303 )
23304then
23305 # Ok.
23306 :
23307else
23308 as_fn_error "newly created file is older than distributed files!
23309Check your system clock" "$LINENO" 5
23310fi
23311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23312$as_echo "yes" >&6; }
23313test "$program_prefix" != NONE &&
23314 program_transform_name="s&^&$program_prefix&;$program_transform_name"
23315# Use a double $ so make ignores it.
23316test "$program_suffix" != NONE &&
23317 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
23318# Double any \ or $.
23319# By default was `s,x,x', remove it if useless.
23320ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
23321program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
23322
23323# expand $ac_aux_dir to an absolute path
23324am_aux_dir=`cd $ac_aux_dir && pwd`
23325
23326if test x"${MISSING+set}" != xset; then
23327 case $am_aux_dir in
23328 *\ * | *\ *)
23329 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
23330 *)
23331 MISSING="\${SHELL} $am_aux_dir/missing" ;;
23332 esac
23333fi
23334# Use eval to expand $SHELL
23335if eval "$MISSING --run true"; then
23336 am_missing_run="$MISSING --run "
23337else
23338 am_missing_run=
23339 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
23340$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
23341fi
23342
23343if test x"${install_sh}" != xset; then
23344 case $am_aux_dir in
23345 *\ * | *\ *)
23346 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
23347 *)
23348 install_sh="\${SHELL} $am_aux_dir/install-sh"
23349 esac
23350fi
23351
23352# Installed binaries are usually stripped using `strip' when the user
23353# run `make install-strip'. However `strip' might not be the right
23354# tool to use in cross-compilation environments, therefore Automake
23355# will honor the `STRIP' environment variable to overrule this program.
23356if test "$cross_compiling" != no; then
23357 if test -n "$ac_tool_prefix"; then
23358 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
23359set dummy ${ac_tool_prefix}strip; ac_word=$2
23360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23361$as_echo_n "checking for $ac_word... " >&6; }
23362if test "${ac_cv_prog_STRIP+set}" = set; then :
23363 $as_echo_n "(cached) " >&6
23364else
23365 if test -n "$STRIP"; then
23366 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
23367else
23368as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23369for as_dir in $PATH
23370do
23371 IFS=$as_save_IFS
23372 test -z "$as_dir" && as_dir=.
23373 for ac_exec_ext in '' $ac_executable_extensions; do
23374 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23375 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
23376 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23377 break 2
23378 fi
23379done
23380 done
23381IFS=$as_save_IFS
23382
23383fi
23384fi
23385STRIP=$ac_cv_prog_STRIP
23386if test -n "$STRIP"; then
23387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
23388$as_echo "$STRIP" >&6; }
23389else
23390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23391$as_echo "no" >&6; }
23392fi
23393
23394
23395fi
23396if test -z "$ac_cv_prog_STRIP"; then
23397 ac_ct_STRIP=$STRIP
23398 # Extract the first word of "strip", so it can be a program name with args.
23399set dummy strip; ac_word=$2
23400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23401$as_echo_n "checking for $ac_word... " >&6; }
23402if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
23403 $as_echo_n "(cached) " >&6
23404else
23405 if test -n "$ac_ct_STRIP"; then
23406 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
23407else
23408as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23409for as_dir in $PATH
23410do
23411 IFS=$as_save_IFS
23412 test -z "$as_dir" && as_dir=.
23413 for ac_exec_ext in '' $ac_executable_extensions; do
23414 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23415 ac_cv_prog_ac_ct_STRIP="strip"
23416 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23417 break 2
23418 fi
23419done
23420 done
23421IFS=$as_save_IFS
23422
23423fi
23424fi
23425ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
23426if test -n "$ac_ct_STRIP"; then
23427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
23428$as_echo "$ac_ct_STRIP" >&6; }
23429else
23430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23431$as_echo "no" >&6; }
23432fi
23433
23434 if test "x$ac_ct_STRIP" = x; then
23435 STRIP=":"
23436 else
23437 case $cross_compiling:$ac_tool_warned in
23438yes:)
23439{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23440$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23441ac_tool_warned=yes ;;
23442esac
23443 STRIP=$ac_ct_STRIP
23444 fi
23445else
23446 STRIP="$ac_cv_prog_STRIP"
23447fi
23448
23449fi
23450INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
23451
c971b7fa
PA
23452mkdir_p="$MKDIR_P"
23453case $mkdir_p in
23454 [\\/$]* | ?:[\\/]*) ;;
23455 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
23456esac
23457
23458for ac_prog in gawk mawk nawk awk
23459do
23460 # Extract the first word of "$ac_prog", so it can be a program name with args.
23461set dummy $ac_prog; ac_word=$2
23462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23463$as_echo_n "checking for $ac_word... " >&6; }
23464if test "${ac_cv_prog_AWK+set}" = set; then :
23465 $as_echo_n "(cached) " >&6
23466else
23467 if test -n "$AWK"; then
23468 ac_cv_prog_AWK="$AWK" # Let the user override the test.
23469else
23470as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23471for as_dir in $PATH
23472do
23473 IFS=$as_save_IFS
23474 test -z "$as_dir" && as_dir=.
23475 for ac_exec_ext in '' $ac_executable_extensions; do
23476 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23477 ac_cv_prog_AWK="$ac_prog"
23478 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23479 break 2
23480 fi
23481done
23482 done
23483IFS=$as_save_IFS
23484
23485fi
23486fi
23487AWK=$ac_cv_prog_AWK
23488if test -n "$AWK"; then
23489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
23490$as_echo "$AWK" >&6; }
23491else
23492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23493$as_echo "no" >&6; }
23494fi
23495
23496
23497 test -n "$AWK" && break
23498done
23499
23500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
23501$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
23502set x ${MAKE-make}
23503ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
23504if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
23505 $as_echo_n "(cached) " >&6
23506else
23507 cat >conftest.make <<\_ACEOF
23508SHELL = /bin/sh
23509all:
23510 @echo '@@@%%%=$(MAKE)=@@@%%%'
23511_ACEOF
23512# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
23513case `${MAKE-make} -f conftest.make 2>/dev/null` in
23514 *@@@%%%=?*=@@@%%%*)
23515 eval ac_cv_prog_make_${ac_make}_set=yes;;
23516 *)
23517 eval ac_cv_prog_make_${ac_make}_set=no;;
23518esac
23519rm -f conftest.make
23520fi
23521if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
23522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23523$as_echo "yes" >&6; }
23524 SET_MAKE=
23525else
23526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23527$as_echo "no" >&6; }
23528 SET_MAKE="MAKE=${MAKE-make}"
23529fi
23530
23531rm -rf .tst 2>/dev/null
23532mkdir .tst 2>/dev/null
23533if test -d .tst; then
23534 am__leading_dot=.
23535else
23536 am__leading_dot=_
23537fi
23538rmdir .tst 2>/dev/null
23539
23540DEPDIR="${am__leading_dot}deps"
23541
23542ac_config_commands="$ac_config_commands depfiles"
23543
23544
23545am_make=${MAKE-make}
23546cat > confinc << 'END'
23547am__doit:
23548 @echo this is the am__doit target
23549.PHONY: am__doit
23550END
23551# If we don't find an include directive, just comment out the code.
23552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
23553$as_echo_n "checking for style of include used by $am_make... " >&6; }
23554am__include="#"
23555am__quote=
23556_am_result=none
23557# First try GNU make style include.
23558echo "include confinc" > confmf
23559# Ignore all kinds of additional output from `make'.
23560case `$am_make -s -f confmf 2> /dev/null` in #(
23561*the\ am__doit\ target*)
23562 am__include=include
23563 am__quote=
23564 _am_result=GNU
23565 ;;
23566esac
23567# Now try BSD make style include.
23568if test "$am__include" = "#"; then
23569 echo '.include "confinc"' > confmf
23570 case `$am_make -s -f confmf 2> /dev/null` in #(
23571 *the\ am__doit\ target*)
23572 am__include=.include
23573 am__quote="\""
23574 _am_result=BSD
23575 ;;
23576 esac
23577fi
23578
23579
23580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
23581$as_echo "$_am_result" >&6; }
23582rm -f confinc confmf
23583
23584# Check whether --enable-dependency-tracking was given.
23585if test "${enable_dependency_tracking+set}" = set; then :
23586 enableval=$enable_dependency_tracking;
23587fi
23588
23589if test "x$enable_dependency_tracking" != xno; then
23590 am_depcomp="$ac_aux_dir/depcomp"
23591 AMDEPBACKSLASH='\'
23592fi
23593 if test "x$enable_dependency_tracking" != xno; then
23594 AMDEP_TRUE=
23595 AMDEP_FALSE='#'
23596else
23597 AMDEP_TRUE='#'
23598 AMDEP_FALSE=
23599fi
23600
23601
23602if test "`cd $srcdir && pwd`" != "`pwd`"; then
23603 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
23604 # is not polluted with repeated "-I."
23605 am__isrc=' -I$(srcdir)'
23606 # test to see if srcdir already configured
23607 if test -f $srcdir/config.status; then
23608 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
23609 fi
23610fi
23611
23612# test whether we have cygpath
23613if test -z "$CYGPATH_W"; then
23614 if (cygpath --version) >/dev/null 2>/dev/null; then
23615 CYGPATH_W='cygpath -w'
23616 else
23617 CYGPATH_W=echo
23618 fi
23619fi
23620
23621
23622# Define the identity of the package.
23623 PACKAGE=libgnu
23624 VERSION=UNUSED-VERSION
23625
23626
23627# Some tools Automake needs.
23628
23629ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
23630
23631
23632AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
23633
23634
23635AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
23636
23637
23638AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
23639
23640
23641MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
23642
23643# We need awk for the "check" target. The system "awk" is bad on
23644# some platforms.
23645# Always define AMTAR for backward compatibility.
23646
23647AMTAR=${AMTAR-"${am_missing_run}tar"}
23648
23649am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
23650
23651
23652
23653
23654depcc="$CC" am_compiler_list=
23655
23656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
23657$as_echo_n "checking dependency style of $depcc... " >&6; }
23658if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
23659 $as_echo_n "(cached) " >&6
23660else
23661 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
23662 # We make a subdir and do the tests there. Otherwise we can end up
23663 # making bogus files that we don't know about and never remove. For
23664 # instance it was reported that on HP-UX the gcc test will end up
23665 # making a dummy file named `D' -- because `-MD' means `put the output
23666 # in D'.
23667 mkdir conftest.dir
23668 # Copy depcomp to subdir because otherwise we won't find it if we're
23669 # using a relative directory.
23670 cp "$am_depcomp" conftest.dir
23671 cd conftest.dir
23672 # We will build objects and dependencies in a subdirectory because
23673 # it helps to detect inapplicable dependency modes. For instance
23674 # both Tru64's cc and ICC support -MD to output dependencies as a
23675 # side effect of compilation, but ICC will put the dependencies in
23676 # the current directory while Tru64 will put them in the object
23677 # directory.
23678 mkdir sub
23679
23680 am_cv_CC_dependencies_compiler_type=none
23681 if test "$am_compiler_list" = ""; then
23682 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
23683 fi
23684 am__universal=false
23685 case " $depcc " in #(
23686 *\ -arch\ *\ -arch\ *) am__universal=true ;;
23687 esac
23688
23689 for depmode in $am_compiler_list; do
23690 # Setup a source with many dependencies, because some compilers
23691 # like to wrap large dependency lists on column 80 (with \), and
23692 # we should not choose a depcomp mode which is confused by this.
23693 #
23694 # We need to recreate these files for each test, as the compiler may
23695 # overwrite some of them when testing with obscure command lines.
23696 # This happens at least with the AIX C compiler.
23697 : > sub/conftest.c
23698 for i in 1 2 3 4 5 6; do
23699 echo '#include "conftst'$i'.h"' >> sub/conftest.c
23700 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
23701 # Solaris 8's {/usr,}/bin/sh.
23702 touch sub/conftst$i.h
23703 done
23704 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
23705
23706 # We check with `-c' and `-o' for the sake of the "dashmstdout"
23707 # mode. It turns out that the SunPro C++ compiler does not properly
23708 # handle `-M -o', and we need to detect this. Also, some Intel
23709 # versions had trouble with output in subdirs
23710 am__obj=sub/conftest.${OBJEXT-o}
23711 am__minus_obj="-o $am__obj"
23712 case $depmode in
23713 gcc)
23714 # This depmode causes a compiler race in universal mode.
23715 test "$am__universal" = false || continue
23716 ;;
23717 nosideeffect)
23718 # after this tag, mechanisms are not by side-effect, so they'll
23719 # only be used when explicitly requested
23720 if test "x$enable_dependency_tracking" = xyes; then
23721 continue
23722 else
23723 break
23724 fi
23725 ;;
23726 msvisualcpp | msvcmsys)
23727 # This compiler won't grok `-c -o', but also, the minuso test has
23728 # not run yet. These depmodes are late enough in the game, and
23729 # so weak that their functioning should not be impacted.
23730 am__obj=conftest.${OBJEXT-o}
23731 am__minus_obj=
23732 ;;
23733 none) break ;;
23734 esac
23735 if depmode=$depmode \
23736 source=sub/conftest.c object=$am__obj \
23737 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
23738 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
23739 >/dev/null 2>conftest.err &&
23740 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
23741 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
23742 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
23743 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
23744 # icc doesn't choke on unknown options, it will just issue warnings
23745 # or remarks (even with -Werror). So we grep stderr for any message
23746 # that says an option was ignored or not supported.
23747 # When given -MP, icc 7.0 and 7.1 complain thusly:
23748 # icc: Command line warning: ignoring option '-M'; no argument required
23749 # The diagnosis changed in icc 8.0:
23750 # icc: Command line remark: option '-MP' not supported
23751 if (grep 'ignoring option' conftest.err ||
23752 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
23753 am_cv_CC_dependencies_compiler_type=$depmode
23754 break
23755 fi
23756 fi
23757 done
23758
23759 cd ..
23760 rm -rf conftest.dir
23761else
23762 am_cv_CC_dependencies_compiler_type=none
23763fi
23764
23765fi
23766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
23767$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
23768CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
23769
23770 if
23771 test "x$enable_dependency_tracking" != xno \
23772 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
23773 am__fastdepCC_TRUE=
23774 am__fastdepCC_FALSE='#'
23775else
23776 am__fastdepCC_TRUE='#'
23777 am__fastdepCC_FALSE=
23778fi
23779
23780
23781
23782
23783# --------------------- #
23784# Checks for programs. #
23785# --------------------- #
23786
23787
23788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
23789$as_echo_n "checking whether ln -s works... " >&6; }
23790LN_S=$as_ln_s
23791if test "$LN_S" = "ln -s"; then
23792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23793$as_echo "yes" >&6; }
23794else
23795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
23796$as_echo "no, using $LN_S" >&6; }
23797fi
23798
23799if test -n "$ac_tool_prefix"; then
23800 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
23801set dummy ${ac_tool_prefix}ranlib; ac_word=$2
23802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23803$as_echo_n "checking for $ac_word... " >&6; }
23804if test "${ac_cv_prog_RANLIB+set}" = set; then :
23805 $as_echo_n "(cached) " >&6
23806else
23807 if test -n "$RANLIB"; then
23808 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
23809else
23810as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23811for as_dir in $PATH
23812do
23813 IFS=$as_save_IFS
23814 test -z "$as_dir" && as_dir=.
23815 for ac_exec_ext in '' $ac_executable_extensions; do
23816 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23817 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
23818 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23819 break 2
23820 fi
23821done
23822 done
23823IFS=$as_save_IFS
23824
23825fi
23826fi
23827RANLIB=$ac_cv_prog_RANLIB
23828if test -n "$RANLIB"; then
23829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
23830$as_echo "$RANLIB" >&6; }
23831else
23832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23833$as_echo "no" >&6; }
23834fi
23835
23836
23837fi
23838if test -z "$ac_cv_prog_RANLIB"; then
23839 ac_ct_RANLIB=$RANLIB
23840 # Extract the first word of "ranlib", so it can be a program name with args.
23841set dummy ranlib; ac_word=$2
23842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23843$as_echo_n "checking for $ac_word... " >&6; }
23844if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
23845 $as_echo_n "(cached) " >&6
23846else
23847 if test -n "$ac_ct_RANLIB"; then
23848 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
23849else
23850as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23851for as_dir in $PATH
23852do
23853 IFS=$as_save_IFS
23854 test -z "$as_dir" && as_dir=.
23855 for ac_exec_ext in '' $ac_executable_extensions; do
23856 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23857 ac_cv_prog_ac_ct_RANLIB="ranlib"
23858 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23859 break 2
23860 fi
23861done
23862 done
23863IFS=$as_save_IFS
23864
23865fi
23866fi
23867ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
23868if test -n "$ac_ct_RANLIB"; then
23869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
23870$as_echo "$ac_ct_RANLIB" >&6; }
23871else
23872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23873$as_echo "no" >&6; }
23874fi
23875
23876 if test "x$ac_ct_RANLIB" = x; then
23877 RANLIB=":"
23878 else
23879 case $cross_compiling:$ac_tool_warned in
23880yes:)
23881{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23882$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23883ac_tool_warned=yes ;;
23884esac
23885 RANLIB=$ac_ct_RANLIB
23886 fi
23887else
23888 RANLIB="$ac_cv_prog_RANLIB"
23889fi
23890
23891
23892if test -n "$ac_tool_prefix"; then
23893 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
23894set dummy ${ac_tool_prefix}ar; ac_word=$2
23895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23896$as_echo_n "checking for $ac_word... " >&6; }
23897if test "${ac_cv_prog_AR+set}" = set; then :
23898 $as_echo_n "(cached) " >&6
23899else
23900 if test -n "$AR"; then
23901 ac_cv_prog_AR="$AR" # Let the user override the test.
23902else
23903as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23904for as_dir in $PATH
23905do
23906 IFS=$as_save_IFS
23907 test -z "$as_dir" && as_dir=.
23908 for ac_exec_ext in '' $ac_executable_extensions; do
23909 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23910 ac_cv_prog_AR="${ac_tool_prefix}ar"
23911 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23912 break 2
23913 fi
23914done
23915 done
23916IFS=$as_save_IFS
23917
23918fi
23919fi
23920AR=$ac_cv_prog_AR
23921if test -n "$AR"; then
23922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
23923$as_echo "$AR" >&6; }
23924else
23925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23926$as_echo "no" >&6; }
23927fi
23928
23929
23930fi
23931if test -z "$ac_cv_prog_AR"; then
23932 ac_ct_AR=$AR
23933 # Extract the first word of "ar", so it can be a program name with args.
23934set dummy ar; ac_word=$2
23935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23936$as_echo_n "checking for $ac_word... " >&6; }
23937if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
23938 $as_echo_n "(cached) " >&6
23939else
23940 if test -n "$ac_ct_AR"; then
23941 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
23942else
23943as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23944for as_dir in $PATH
23945do
23946 IFS=$as_save_IFS
23947 test -z "$as_dir" && as_dir=.
23948 for ac_exec_ext in '' $ac_executable_extensions; do
23949 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23950 ac_cv_prog_ac_ct_AR="ar"
23951 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23952 break 2
23953 fi
23954done
23955 done
23956IFS=$as_save_IFS
23957
23958fi
23959fi
23960ac_ct_AR=$ac_cv_prog_ac_ct_AR
23961if test -n "$ac_ct_AR"; then
23962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
23963$as_echo "$ac_ct_AR" >&6; }
23964else
23965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23966$as_echo "no" >&6; }
23967fi
23968
23969 if test "x$ac_ct_AR" = x; then
23970 AR=""
23971 else
23972 case $cross_compiling:$ac_tool_warned in
23973yes:)
23974{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23975$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23976ac_tool_warned=yes ;;
23977esac
23978 AR=$ac_ct_AR
23979 fi
23980else
23981 AR="$ac_cv_prog_AR"
23982fi
23983
23984
23985# ---------------------- #
23986# Checks for libraries. #
23987# ---------------------- #
23988
23989ac_config_files="$ac_config_files Makefile import/Makefile"
23990
23991ac_config_commands="$ac_config_commands default"
23992
23993cat >confcache <<\_ACEOF
23994# This file is a shell script that caches the results of configure
23995# tests run on this system so they can be shared between configure
23996# scripts and configure runs, see configure's option --config-cache.
23997# It is not useful on other systems. If it contains results you don't
23998# want to keep, you may remove or edit it.
23999#
24000# config.status only pays attention to the cache file if you give it
24001# the --recheck option to rerun configure.
24002#
24003# `ac_cv_env_foo' variables (set or unset) will be overridden when
24004# loading this file, other *unset* `ac_cv_foo' will be assigned the
24005# following values.
24006
24007_ACEOF
24008
24009# The following way of writing the cache mishandles newlines in values,
24010# but we know of no workaround that is simple, portable, and efficient.
24011# So, we kill variables containing newlines.
24012# Ultrix sh set writes to stderr and can't be redirected directly,
24013# and sets the high bit in the cache file unless we assign to the vars.
24014(
24015 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24016 eval ac_val=\$$ac_var
24017 case $ac_val in #(
24018 *${as_nl}*)
24019 case $ac_var in #(
24020 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
24021$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
24022 esac
24023 case $ac_var in #(
24024 _ | IFS | as_nl) ;; #(
24025 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
24026 *) { eval $ac_var=; unset $ac_var;} ;;
24027 esac ;;
24028 esac
24029 done
24030
24031 (set) 2>&1 |
24032 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24033 *${as_nl}ac_space=\ *)
24034 # `set' does not quote correctly, so add quotes: double-quote
24035 # substitution turns \\\\ into \\, and sed turns \\ into \.
24036 sed -n \
24037 "s/'/'\\\\''/g;
24038 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
24039 ;; #(
24040 *)
24041 # `set' quotes correctly as required by POSIX, so do not add quotes.
24042 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
24043 ;;
24044 esac |
24045 sort
24046) |
24047 sed '
24048 /^ac_cv_env_/b end
24049 t clear
24050 :clear
24051 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24052 t end
24053 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24054 :end' >>confcache
24055if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24056 if test -w "$cache_file"; then
24057 test "x$cache_file" != "x/dev/null" &&
24058 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
24059$as_echo "$as_me: updating cache $cache_file" >&6;}
24060 cat confcache >$cache_file
24061 else
24062 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
24063$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
24064 fi
24065fi
24066rm -f confcache
24067
24068test "x$prefix" = xNONE && prefix=$ac_default_prefix
24069# Let make expand exec_prefix.
24070test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24071
24072DEFS=-DHAVE_CONFIG_H
24073
24074ac_libobjs=
24075ac_ltlibobjs=
24076for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24077 # 1. Remove the extension, and $U if already installed.
24078 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24079 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
24080 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24081 # will be set to the directory where LIBOBJS objects are built.
24082 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24083 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
24084done
24085LIBOBJS=$ac_libobjs
24086
24087LTLIBOBJS=$ac_ltlibobjs
24088
24089
24090if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
24091 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
24092Usually this means the macro was only invoked conditionally." "$LINENO" 5
24093fi
24094if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
24095 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
24096Usually this means the macro was only invoked conditionally." "$LINENO" 5
24097fi
8690e634
JK
24098if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
24099 as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
24100Usually this means the macro was only invoked conditionally." "$LINENO" 5
24101fi
18848e28
GF
24102if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
24103 as_fn_error "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
24104Usually this means the macro was only invoked conditionally." "$LINENO" 5
24105fi
88b48903
WN
24106if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
24107 as_fn_error "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
24108Usually this means the macro was only invoked conditionally." "$LINENO" 5
24109fi
8690e634
JK
24110if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
24111 as_fn_error "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
24112Usually this means the macro was only invoked conditionally." "$LINENO" 5
24113fi
6ec2e0f5
SDJ
24114if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
24115 as_fn_error "conditional \"GL_GENERATE_GLOB_H\" was never defined.
24116Usually this means the macro was only invoked conditionally." "$LINENO" 5
24117fi
49e4877c
PA
24118if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
24119 as_fn_error "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
24120Usually this means the macro was only invoked conditionally." "$LINENO" 5
24121fi
24122if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
24123 as_fn_error "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
24124Usually this means the macro was only invoked conditionally." "$LINENO" 5
24125fi
c971b7fa
PA
24126if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
24127 as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined.
24128Usually this means the macro was only invoked conditionally." "$LINENO" 5
24129fi
88b48903
WN
24130
24131
8690e634
JK
24132if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
24133 as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
24134Usually this means the macro was only invoked conditionally." "$LINENO" 5
24135fi
c971b7fa
PA
24136if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
24137 as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
24138Usually this means the macro was only invoked conditionally." "$LINENO" 5
24139fi
24140
24141 gl_libobjs=
24142 gl_ltlibobjs=
24143 if test -n "$gl_LIBOBJS"; then
24144 # Remove the extension.
24145 sed_drop_objext='s/\.o$//;s/\.obj$//'
24146 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
24147 gl_libobjs="$gl_libobjs $i.$ac_objext"
24148 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
24149 done
24150 fi
24151 gl_LIBOBJS=$gl_libobjs
24152
24153 gl_LTLIBOBJS=$gl_ltlibobjs
24154
24155
24156
24157 gltests_libobjs=
24158 gltests_ltlibobjs=
24159 if test -n "$gltests_LIBOBJS"; then
24160 # Remove the extension.
24161 sed_drop_objext='s/\.o$//;s/\.obj$//'
24162 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
24163 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
24164 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
24165 done
24166 fi
24167 gltests_LIBOBJS=$gltests_libobjs
24168
24169 gltests_LTLIBOBJS=$gltests_ltlibobjs
24170
24171
24172if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
24173 as_fn_error "conditional \"AMDEP\" was never defined.
24174Usually this means the macro was only invoked conditionally." "$LINENO" 5
24175fi
24176if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
24177 as_fn_error "conditional \"am__fastdepCC\" was never defined.
24178Usually this means the macro was only invoked conditionally." "$LINENO" 5
24179fi
24180 if test -n "$EXEEXT"; then
24181 am__EXEEXT_TRUE=
24182 am__EXEEXT_FALSE='#'
24183else
24184 am__EXEEXT_TRUE='#'
24185 am__EXEEXT_FALSE=
24186fi
24187
24188
24189: ${CONFIG_STATUS=./config.status}
24190ac_write_fail=0
24191ac_clean_files_save=$ac_clean_files
24192ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24193{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
24194$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
24195as_write_fail=0
24196cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
24197#! $SHELL
24198# Generated by $as_me.
24199# Run this file to recreate the current configuration.
24200# Compiler output produced by configure, useful for debugging
24201# configure, is in config.log if it exists.
24202
24203debug=false
24204ac_cs_recheck=false
24205ac_cs_silent=false
24206
24207SHELL=\${CONFIG_SHELL-$SHELL}
24208export SHELL
24209_ASEOF
24210cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
24211## -------------------- ##
24212## M4sh Initialization. ##
24213## -------------------- ##
24214
24215# Be more Bourne compatible
24216DUALCASE=1; export DUALCASE # for MKS sh
24217if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
24218 emulate sh
24219 NULLCMD=:
24220 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
24221 # is contrary to our usage. Disable this feature.
24222 alias -g '${1+"$@"}'='"$@"'
24223 setopt NO_GLOB_SUBST
24224else
24225 case `(set -o) 2>/dev/null` in #(
24226 *posix*) :
24227 set -o posix ;; #(
24228 *) :
24229 ;;
24230esac
24231fi
24232
24233
24234as_nl='
24235'
24236export as_nl
24237# Printing a long string crashes Solaris 7 /usr/bin/printf.
24238as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
24239as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
24240as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
24241# Prefer a ksh shell builtin over an external printf program on Solaris,
24242# but without wasting forks for bash or zsh.
24243if test -z "$BASH_VERSION$ZSH_VERSION" \
24244 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
24245 as_echo='print -r --'
24246 as_echo_n='print -rn --'
24247elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
24248 as_echo='printf %s\n'
24249 as_echo_n='printf %s'
24250else
24251 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
24252 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
24253 as_echo_n='/usr/ucb/echo -n'
24254 else
24255 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
24256 as_echo_n_body='eval
24257 arg=$1;
24258 case $arg in #(
24259 *"$as_nl"*)
24260 expr "X$arg" : "X\\(.*\\)$as_nl";
24261 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
24262 esac;
24263 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
24264 '
24265 export as_echo_n_body
24266 as_echo_n='sh -c $as_echo_n_body as_echo'
24267 fi
24268 export as_echo_body
24269 as_echo='sh -c $as_echo_body as_echo'
24270fi
24271
24272# The user is always right.
24273if test "${PATH_SEPARATOR+set}" != set; then
24274 PATH_SEPARATOR=:
24275 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
24276 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
24277 PATH_SEPARATOR=';'
24278 }
24279fi
24280
24281
24282# IFS
24283# We need space, tab and new line, in precisely that order. Quoting is
24284# there to prevent editors from complaining about space-tab.
24285# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24286# splitting by setting IFS to empty value.)
24287IFS=" "" $as_nl"
24288
24289# Find who we are. Look in the path if we contain no directory separator.
24290case $0 in #((
24291 *[\\/]* ) as_myself=$0 ;;
24292 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24293for as_dir in $PATH
24294do
24295 IFS=$as_save_IFS
24296 test -z "$as_dir" && as_dir=.
24297 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24298 done
24299IFS=$as_save_IFS
24300
24301 ;;
24302esac
24303# We did not find ourselves, most probably we were run as `sh COMMAND'
24304# in which case we are not to be found in the path.
24305if test "x$as_myself" = x; then
24306 as_myself=$0
24307fi
24308if test ! -f "$as_myself"; then
24309 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24310 exit 1
24311fi
24312
24313# Unset variables that we do not need and which cause bugs (e.g. in
24314# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
24315# suppresses any "Segmentation fault" message there. '((' could
24316# trigger a bug in pdksh 5.2.14.
24317for as_var in BASH_ENV ENV MAIL MAILPATH
24318do eval test x\${$as_var+set} = xset \
24319 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
24320done
24321PS1='$ '
24322PS2='> '
24323PS4='+ '
24324
24325# NLS nuisances.
24326LC_ALL=C
24327export LC_ALL
24328LANGUAGE=C
24329export LANGUAGE
24330
24331# CDPATH.
24332(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
24333
24334
24335# as_fn_error ERROR [LINENO LOG_FD]
24336# ---------------------------------
24337# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
24338# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
24339# script with status $?, using 1 if that was 0.
24340as_fn_error ()
24341{
24342 as_status=$?; test $as_status -eq 0 && as_status=1
24343 if test "$3"; then
24344 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
24345 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
24346 fi
24347 $as_echo "$as_me: error: $1" >&2
24348 as_fn_exit $as_status
24349} # as_fn_error
24350
24351
24352# as_fn_set_status STATUS
24353# -----------------------
24354# Set $? to STATUS, without forking.
24355as_fn_set_status ()
24356{
24357 return $1
24358} # as_fn_set_status
24359
24360# as_fn_exit STATUS
24361# -----------------
24362# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
24363as_fn_exit ()
24364{
24365 set +e
24366 as_fn_set_status $1
24367 exit $1
24368} # as_fn_exit
24369
24370# as_fn_unset VAR
24371# ---------------
24372# Portably unset VAR.
24373as_fn_unset ()
24374{
24375 { eval $1=; unset $1;}
24376}
24377as_unset=as_fn_unset
24378# as_fn_append VAR VALUE
24379# ----------------------
24380# Append the text in VALUE to the end of the definition contained in VAR. Take
24381# advantage of any shell optimizations that allow amortized linear growth over
24382# repeated appends, instead of the typical quadratic growth present in naive
24383# implementations.
24384if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
24385 eval 'as_fn_append ()
24386 {
24387 eval $1+=\$2
24388 }'
24389else
24390 as_fn_append ()
24391 {
24392 eval $1=\$$1\$2
24393 }
24394fi # as_fn_append
24395
24396# as_fn_arith ARG...
24397# ------------------
24398# Perform arithmetic evaluation on the ARGs, and store the result in the
24399# global $as_val. Take advantage of shells that can avoid forks. The arguments
24400# must be portable across $(()) and expr.
24401if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
24402 eval 'as_fn_arith ()
24403 {
24404 as_val=$(( $* ))
24405 }'
24406else
24407 as_fn_arith ()
24408 {
24409 as_val=`expr "$@" || test $? -eq 1`
24410 }
24411fi # as_fn_arith
24412
24413
24414if expr a : '\(a\)' >/dev/null 2>&1 &&
24415 test "X`expr 00001 : '.*\(...\)'`" = X001; then
24416 as_expr=expr
24417else
24418 as_expr=false
24419fi
24420
24421if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
24422 as_basename=basename
24423else
24424 as_basename=false
24425fi
24426
24427if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24428 as_dirname=dirname
24429else
24430 as_dirname=false
24431fi
24432
24433as_me=`$as_basename -- "$0" ||
24434$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24435 X"$0" : 'X\(//\)$' \| \
24436 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
24437$as_echo X/"$0" |
24438 sed '/^.*\/\([^/][^/]*\)\/*$/{
24439 s//\1/
24440 q
24441 }
24442 /^X\/\(\/\/\)$/{
24443 s//\1/
24444 q
24445 }
24446 /^X\/\(\/\).*/{
24447 s//\1/
24448 q
24449 }
24450 s/.*/./; q'`
24451
24452# Avoid depending upon Character Ranges.
24453as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24454as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24455as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24456as_cr_digits='0123456789'
24457as_cr_alnum=$as_cr_Letters$as_cr_digits
24458
24459ECHO_C= ECHO_N= ECHO_T=
24460case `echo -n x` in #(((((
24461-n*)
24462 case `echo 'xy\c'` in
24463 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24464 xy) ECHO_C='\c';;
24465 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
24466 ECHO_T=' ';;
24467 esac;;
24468*)
24469 ECHO_N='-n';;
24470esac
24471
24472rm -f conf$$ conf$$.exe conf$$.file
24473if test -d conf$$.dir; then
24474 rm -f conf$$.dir/conf$$.file
24475else
24476 rm -f conf$$.dir
24477 mkdir conf$$.dir 2>/dev/null
24478fi
24479if (echo >conf$$.file) 2>/dev/null; then
24480 if ln -s conf$$.file conf$$ 2>/dev/null; then
24481 as_ln_s='ln -s'
24482 # ... but there are two gotchas:
24483 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24484 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24485 # In both cases, we have to default to `cp -p'.
24486 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
24487 as_ln_s='cp -p'
24488 elif ln conf$$.file conf$$ 2>/dev/null; then
24489 as_ln_s=ln
24490 else
24491 as_ln_s='cp -p'
24492 fi
24493else
24494 as_ln_s='cp -p'
24495fi
24496rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24497rmdir conf$$.dir 2>/dev/null
24498
24499
24500# as_fn_mkdir_p
24501# -------------
24502# Create "$as_dir" as a directory, including parents if necessary.
24503as_fn_mkdir_p ()
24504{
24505
24506 case $as_dir in #(
24507 -*) as_dir=./$as_dir;;
24508 esac
24509 test -d "$as_dir" || eval $as_mkdir_p || {
24510 as_dirs=
24511 while :; do
24512 case $as_dir in #(
24513 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
24514 *) as_qdir=$as_dir;;
24515 esac
24516 as_dirs="'$as_qdir' $as_dirs"
24517 as_dir=`$as_dirname -- "$as_dir" ||
24518$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24519 X"$as_dir" : 'X\(//\)[^/]' \| \
24520 X"$as_dir" : 'X\(//\)$' \| \
24521 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
24522$as_echo X"$as_dir" |
24523 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24524 s//\1/
24525 q
24526 }
24527 /^X\(\/\/\)[^/].*/{
24528 s//\1/
24529 q
24530 }
24531 /^X\(\/\/\)$/{
24532 s//\1/
24533 q
24534 }
24535 /^X\(\/\).*/{
24536 s//\1/
24537 q
24538 }
24539 s/.*/./; q'`
24540 test -d "$as_dir" && break
24541 done
24542 test -z "$as_dirs" || eval "mkdir $as_dirs"
24543 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
24544
24545
24546} # as_fn_mkdir_p
24547if mkdir -p . 2>/dev/null; then
24548 as_mkdir_p='mkdir -p "$as_dir"'
24549else
24550 test -d ./-p && rmdir ./-p
24551 as_mkdir_p=false
24552fi
24553
24554if test -x / >/dev/null 2>&1; then
24555 as_test_x='test -x'
24556else
24557 if ls -dL / >/dev/null 2>&1; then
24558 as_ls_L_option=L
24559 else
24560 as_ls_L_option=
24561 fi
24562 as_test_x='
24563 eval sh -c '\''
24564 if test -d "$1"; then
24565 test -d "$1/.";
24566 else
24567 case $1 in #(
24568 -*)set "./$1";;
24569 esac;
24570 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
24571 ???[sx]*):;;*)false;;esac;fi
24572 '\'' sh
24573 '
24574fi
24575as_executable_p=$as_test_x
24576
24577# Sed expression to map a string onto a valid CPP name.
24578as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
24579
24580# Sed expression to map a string onto a valid variable name.
24581as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
24582
24583
24584exec 6>&1
24585## ----------------------------------- ##
24586## Main body of $CONFIG_STATUS script. ##
24587## ----------------------------------- ##
24588_ASEOF
24589test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
24590
24591cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24592# Save the log message, to keep $0 and so on meaningful, and to
24593# report actual input values of CONFIG_FILES etc. instead of their
24594# values after options handling.
24595ac_log="
24596This file was extended by $as_me, which was
24597generated by GNU Autoconf 2.64. Invocation command line was
24598
24599 CONFIG_FILES = $CONFIG_FILES
24600 CONFIG_HEADERS = $CONFIG_HEADERS
24601 CONFIG_LINKS = $CONFIG_LINKS
24602 CONFIG_COMMANDS = $CONFIG_COMMANDS
24603 $ $0 $@
24604
24605on `(hostname || uname -n) 2>/dev/null | sed 1q`
24606"
24607
24608_ACEOF
24609
24610case $ac_config_files in *"
24611"*) set x $ac_config_files; shift; ac_config_files=$*;;
24612esac
24613
24614case $ac_config_headers in *"
24615"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
24616esac
24617
24618
24619cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24620# Files that config.status was made for.
24621config_files="$ac_config_files"
24622config_headers="$ac_config_headers"
24623config_commands="$ac_config_commands"
24624
24625_ACEOF
24626
24627cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24628ac_cs_usage="\
24629\`$as_me' instantiates files and other configuration actions
24630from templates according to the current configuration. Unless the files
24631and actions are specified as TAGs, all are instantiated by default.
24632
24633Usage: $0 [OPTION]... [TAG]...
24634
24635 -h, --help print this help, then exit
24636 -V, --version print version number and configuration settings, then exit
24637 -q, --quiet, --silent
24638 do not print progress messages
24639 -d, --debug don't remove temporary files
24640 --recheck update $as_me by reconfiguring in the same conditions
24641 --file=FILE[:TEMPLATE]
24642 instantiate the configuration file FILE
24643 --header=FILE[:TEMPLATE]
24644 instantiate the configuration header FILE
24645
24646Configuration files:
24647$config_files
24648
24649Configuration headers:
24650$config_headers
24651
24652Configuration commands:
24653$config_commands
24654
24655Report bugs to the package provider."
24656
24657_ACEOF
24658cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24659ac_cs_version="\\
24660config.status
24661configured by $0, generated by GNU Autoconf 2.64,
24662 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
24663
24664Copyright (C) 2009 Free Software Foundation, Inc.
24665This config.status script is free software; the Free Software Foundation
24666gives unlimited permission to copy, distribute and modify it."
24667
24668ac_pwd='$ac_pwd'
24669srcdir='$srcdir'
24670INSTALL='$INSTALL'
24671MKDIR_P='$MKDIR_P'
24672AWK='$AWK'
24673test -n "\$AWK" || AWK=awk
24674_ACEOF
24675
24676cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24677# The default lists apply if the user does not specify any file.
24678ac_need_defaults=:
24679while test $# != 0
24680do
24681 case $1 in
24682 --*=*)
24683 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24684 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
24685 ac_shift=:
24686 ;;
24687 *)
24688 ac_option=$1
24689 ac_optarg=$2
24690 ac_shift=shift
24691 ;;
24692 esac
24693
24694 case $ac_option in
24695 # Handling of the options.
24696 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24697 ac_cs_recheck=: ;;
24698 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24699 $as_echo "$ac_cs_version"; exit ;;
24700 --debug | --debu | --deb | --de | --d | -d )
24701 debug=: ;;
24702 --file | --fil | --fi | --f )
24703 $ac_shift
24704 case $ac_optarg in
24705 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
24706 esac
24707 as_fn_append CONFIG_FILES " '$ac_optarg'"
24708 ac_need_defaults=false;;
24709 --header | --heade | --head | --hea )
24710 $ac_shift
24711 case $ac_optarg in
24712 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
24713 esac
24714 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
24715 ac_need_defaults=false;;
24716 --he | --h)
24717 # Conflict between --help and --header
24718 as_fn_error "ambiguous option: \`$1'
24719Try \`$0 --help' for more information.";;
24720 --help | --hel | -h )
24721 $as_echo "$ac_cs_usage"; exit ;;
24722 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24723 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24724 ac_cs_silent=: ;;
24725
24726 # This is an error.
24727 -*) as_fn_error "unrecognized option: \`$1'
24728Try \`$0 --help' for more information." ;;
24729
24730 *) as_fn_append ac_config_targets " $1"
24731 ac_need_defaults=false ;;
24732
24733 esac
24734 shift
24735done
24736
24737ac_configure_extra_args=
24738
24739if $ac_cs_silent; then
24740 exec 6>/dev/null
24741 ac_configure_extra_args="$ac_configure_extra_args --silent"
24742fi
24743
24744_ACEOF
24745cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24746if \$ac_cs_recheck; then
24747 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
24748 shift
24749 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
24750 CONFIG_SHELL='$SHELL'
24751 export CONFIG_SHELL
24752 exec "\$@"
24753fi
24754
24755_ACEOF
24756cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24757exec 5>>config.log
24758{
24759 echo
24760 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24761## Running $as_me. ##
24762_ASBOX
24763 $as_echo "$ac_log"
24764} >&5
24765
24766_ACEOF
24767cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24768#
24769# INIT-COMMANDS
24770#
24771AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
24772
24773_ACEOF
24774
24775cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24776
24777# Handling of arguments.
24778for ac_config_target in $ac_config_targets
24779do
24780 case $ac_config_target in
24781 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
24782 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
24783 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
24784 "import/Makefile") CONFIG_FILES="$CONFIG_FILES import/Makefile" ;;
24785 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
24786
24787 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
24788 esac
24789done
24790
24791
24792# If the user did not use the arguments to specify the items to instantiate,
24793# then the envvar interface is used. Set only those that are not.
24794# We use the long form for the default assignment because of an extremely
24795# bizarre bug on SunOS 4.1.3.
24796if $ac_need_defaults; then
24797 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24798 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24799 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
24800fi
24801
24802# Have a temporary directory for convenience. Make it in the build tree
24803# simply because there is no reason against having it here, and in addition,
24804# creating and moving files from /tmp can sometimes cause problems.
24805# Hook for its removal unless debugging.
24806# Note that there is a small window in which the directory will not be cleaned:
24807# after its creation but before its name has been assigned to `$tmp'.
24808$debug ||
24809{
24810 tmp=
24811 trap 'exit_status=$?
24812 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
24813' 0
24814 trap 'as_fn_exit 1' 1 2 13 15
24815}
24816# Create a (secure) tmp directory for tmp files.
24817
24818{
24819 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
24820 test -n "$tmp" && test -d "$tmp"
24821} ||
24822{
24823 tmp=./conf$$-$RANDOM
24824 (umask 077 && mkdir "$tmp")
24825} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
24826
24827# Set up the scripts for CONFIG_FILES section.
24828# No need to generate them if there are no CONFIG_FILES.
24829# This happens for instance with `./config.status config.h'.
24830if test -n "$CONFIG_FILES"; then
24831
24832
24833ac_cr=`echo X | tr X '\015'`
24834# On cygwin, bash can eat \r inside `` if the user requested igncr.
24835# But we know of no other shell where ac_cr would be empty at this
24836# point, so we can use a bashism as a fallback.
24837if test "x$ac_cr" = x; then
24838 eval ac_cr=\$\'\\r\'
24839fi
24840ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
24841if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
24842 ac_cs_awk_cr='\r'
24843else
24844 ac_cs_awk_cr=$ac_cr
24845fi
24846
24847echo 'BEGIN {' >"$tmp/subs1.awk" &&
24848_ACEOF
24849
24850
24851{
24852 echo "cat >conf$$subs.awk <<_ACEOF" &&
24853 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
24854 echo "_ACEOF"
24855} >conf$$subs.sh ||
24856 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
24857ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
24858ac_delim='%!_!# '
24859for ac_last_try in false false false false false :; do
24860 . ./conf$$subs.sh ||
24861 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
24862
24863 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
24864 if test $ac_delim_n = $ac_delim_num; then
24865 break
24866 elif $ac_last_try; then
24867 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
24868 else
24869 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
24870 fi
24871done
24872rm -f conf$$subs.sh
24873
24874cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24875cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
24876_ACEOF
24877sed -n '
24878h
24879s/^/S["/; s/!.*/"]=/
24880p
24881g
24882s/^[^!]*!//
24883:repl
24884t repl
24885s/'"$ac_delim"'$//
24886t delim
24887:nl
24888h
24889s/\(.\{148\}\).*/\1/
24890t more1
24891s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
24892p
24893n
24894b repl
24895:more1
24896s/["\\]/\\&/g; s/^/"/; s/$/"\\/
24897p
24898g
24899s/.\{148\}//
24900t nl
24901:delim
24902h
24903s/\(.\{148\}\).*/\1/
24904t more2
24905s/["\\]/\\&/g; s/^/"/; s/$/"/
24906p
24907b
24908:more2
24909s/["\\]/\\&/g; s/^/"/; s/$/"\\/
24910p
24911g
24912s/.\{148\}//
24913t delim
24914' <conf$$subs.awk | sed '
24915/^[^""]/{
24916 N
24917 s/\n//
24918}
24919' >>$CONFIG_STATUS || ac_write_fail=1
24920rm -f conf$$subs.awk
24921cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24922_ACAWK
24923cat >>"\$tmp/subs1.awk" <<_ACAWK &&
24924 for (key in S) S_is_set[key] = 1
24925 FS = "\a"
24926
24927}
24928{
24929 line = $ 0
24930 nfields = split(line, field, "@")
24931 substed = 0
24932 len = length(field[1])
24933 for (i = 2; i < nfields; i++) {
24934 key = field[i]
24935 keylen = length(key)
24936 if (S_is_set[key]) {
24937 value = S[key]
24938 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
24939 len += length(value) + length(field[++i])
24940 substed = 1
24941 } else
24942 len += 1 + keylen
24943 }
24944
24945 print line
24946}
24947
24948_ACAWK
24949_ACEOF
24950cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24951if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
24952 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
24953else
24954 cat
24955fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
24956 || as_fn_error "could not setup config files machinery" "$LINENO" 5
24957_ACEOF
24958
24959# VPATH may cause trouble with some makes, so we remove $(srcdir),
24960# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24961# trailing colons and then remove the whole line if VPATH becomes empty
24962# (actually we leave an empty line to preserve line numbers).
24963if test "x$srcdir" = x.; then
24964 ac_vpsub='/^[ ]*VPATH[ ]*=/{
24965s/:*\$(srcdir):*/:/
24966s/:*\${srcdir}:*/:/
24967s/:*@srcdir@:*/:/
24968s/^\([^=]*=[ ]*\):*/\1/
24969s/:*$//
24970s/^[^=]*=[ ]*$//
24971}'
24972fi
24973
24974cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24975fi # test -n "$CONFIG_FILES"
24976
24977# Set up the scripts for CONFIG_HEADERS section.
24978# No need to generate them if there are no CONFIG_HEADERS.
24979# This happens for instance with `./config.status Makefile'.
24980if test -n "$CONFIG_HEADERS"; then
24981cat >"$tmp/defines.awk" <<\_ACAWK ||
24982BEGIN {
24983_ACEOF
24984
24985# Transform confdefs.h into an awk script `defines.awk', embedded as
24986# here-document in config.status, that substitutes the proper values into
24987# config.h.in to produce config.h.
24988
24989# Create a delimiter string that does not exist in confdefs.h, to ease
24990# handling of long lines.
24991ac_delim='%!_!# '
24992for ac_last_try in false false :; do
24993 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
24994 if test -z "$ac_t"; then
24995 break
24996 elif $ac_last_try; then
24997 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
24998 else
24999 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25000 fi
25001done
25002
25003# For the awk script, D is an array of macro values keyed by name,
25004# likewise P contains macro parameters if any. Preserve backslash
25005# newline sequences.
25006
25007ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25008sed -n '
25009s/.\{148\}/&'"$ac_delim"'/g
25010t rset
25011:rset
25012s/^[ ]*#[ ]*define[ ][ ]*/ /
25013t def
25014d
25015:def
25016s/\\$//
25017t bsnl
25018s/["\\]/\\&/g
25019s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
25020D["\1"]=" \3"/p
25021s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
25022d
25023:bsnl
25024s/["\\]/\\&/g
25025s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
25026D["\1"]=" \3\\\\\\n"\\/p
25027t cont
25028s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
25029t cont
25030d
25031:cont
25032n
25033s/.\{148\}/&'"$ac_delim"'/g
25034t clear
25035:clear
25036s/\\$//
25037t bsnlc
25038s/["\\]/\\&/g; s/^/"/; s/$/"/p
25039d
25040:bsnlc
25041s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
25042b cont
25043' <confdefs.h | sed '
25044s/'"$ac_delim"'/"\\\
25045"/g' >>$CONFIG_STATUS || ac_write_fail=1
25046
25047cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25048 for (key in D) D_is_set[key] = 1
25049 FS = "\a"
25050}
25051/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
25052 line = \$ 0
25053 split(line, arg, " ")
25054 if (arg[1] == "#") {
25055 defundef = arg[2]
25056 mac1 = arg[3]
25057 } else {
25058 defundef = substr(arg[1], 2)
25059 mac1 = arg[2]
25060 }
25061 split(mac1, mac2, "(") #)
25062 macro = mac2[1]
25063 prefix = substr(line, 1, index(line, defundef) - 1)
25064 if (D_is_set[macro]) {
25065 # Preserve the white space surrounding the "#".
25066 print prefix "define", macro P[macro] D[macro]
25067 next
25068 } else {
25069 # Replace #undef with comments. This is necessary, for example,
25070 # in the case of _POSIX_SOURCE, which is predefined and required
25071 # on some systems where configure will not decide to define it.
25072 if (defundef == "undef") {
25073 print "/*", prefix defundef, macro, "*/"
25074 next
25075 }
25076 }
25077}
25078{ print }
25079_ACAWK
25080_ACEOF
25081cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25082 as_fn_error "could not setup config headers machinery" "$LINENO" 5
25083fi # test -n "$CONFIG_HEADERS"
25084
25085
25086eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
25087shift
25088for ac_tag
25089do
25090 case $ac_tag in
25091 :[FHLC]) ac_mode=$ac_tag; continue;;
25092 esac
25093 case $ac_mode$ac_tag in
25094 :[FHL]*:*);;
25095 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
25096 :[FH]-) ac_tag=-:-;;
25097 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25098 esac
25099 ac_save_IFS=$IFS
25100 IFS=:
25101 set x $ac_tag
25102 IFS=$ac_save_IFS
25103 shift
25104 ac_file=$1
25105 shift
25106
25107 case $ac_mode in
25108 :L) ac_source=$1;;
25109 :[FH])
25110 ac_file_inputs=
25111 for ac_f
25112 do
25113 case $ac_f in
25114 -) ac_f="$tmp/stdin";;
25115 *) # Look for the file first in the build tree, then in the source tree
25116 # (if the path is not absolute). The absolute path cannot be DOS-style,
25117 # because $ac_f cannot contain `:'.
25118 test -f "$ac_f" ||
25119 case $ac_f in
25120 [\\/$]*) false;;
25121 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25122 esac ||
25123 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
25124 esac
25125 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
25126 as_fn_append ac_file_inputs " '$ac_f'"
25127 done
25128
25129 # Let's still pretend it is `configure' which instantiates (i.e., don't
25130 # use $as_me), people would be surprised to read:
25131 # /* config.h. Generated by config.status. */
25132 configure_input='Generated from '`
25133 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
25134 `' by configure.'
25135 if test x"$ac_file" != x-; then
25136 configure_input="$ac_file. $configure_input"
25137 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
25138$as_echo "$as_me: creating $ac_file" >&6;}
25139 fi
25140 # Neutralize special characters interpreted by sed in replacement strings.
25141 case $configure_input in #(
25142 *\&* | *\|* | *\\* )
25143 ac_sed_conf_input=`$as_echo "$configure_input" |
25144 sed 's/[\\\\&|]/\\\\&/g'`;; #(
25145 *) ac_sed_conf_input=$configure_input;;
25146 esac
25147
25148 case $ac_tag in
25149 *:-:* | *:-) cat >"$tmp/stdin" \
25150 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
25151 esac
25152 ;;
25153 esac
25154
25155 ac_dir=`$as_dirname -- "$ac_file" ||
25156$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25157 X"$ac_file" : 'X\(//\)[^/]' \| \
25158 X"$ac_file" : 'X\(//\)$' \| \
25159 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
25160$as_echo X"$ac_file" |
25161 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25162 s//\1/
25163 q
25164 }
25165 /^X\(\/\/\)[^/].*/{
25166 s//\1/
25167 q
25168 }
25169 /^X\(\/\/\)$/{
25170 s//\1/
25171 q
25172 }
25173 /^X\(\/\).*/{
25174 s//\1/
25175 q
25176 }
25177 s/.*/./; q'`
25178 as_dir="$ac_dir"; as_fn_mkdir_p
25179 ac_builddir=.
25180
25181case "$ac_dir" in
25182.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25183*)
25184 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
25185 # A ".." for each directory in $ac_dir_suffix.
25186 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
25187 case $ac_top_builddir_sub in
25188 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25189 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25190 esac ;;
25191esac
25192ac_abs_top_builddir=$ac_pwd
25193ac_abs_builddir=$ac_pwd$ac_dir_suffix
25194# for backward compatibility:
25195ac_top_builddir=$ac_top_build_prefix
25196
25197case $srcdir in
25198 .) # We are building in place.
25199 ac_srcdir=.
25200 ac_top_srcdir=$ac_top_builddir_sub
25201 ac_abs_top_srcdir=$ac_pwd ;;
25202 [\\/]* | ?:[\\/]* ) # Absolute name.
25203 ac_srcdir=$srcdir$ac_dir_suffix;
25204 ac_top_srcdir=$srcdir
25205 ac_abs_top_srcdir=$srcdir ;;
25206 *) # Relative name.
25207 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25208 ac_top_srcdir=$ac_top_build_prefix$srcdir
25209 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
25210esac
25211ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
25212
25213
25214 case $ac_mode in
25215 :F)
25216 #
25217 # CONFIG_FILE
25218 #
25219
25220 case $INSTALL in
25221 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
25222 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
25223 esac
25224 ac_MKDIR_P=$MKDIR_P
25225 case $MKDIR_P in
25226 [\\/$]* | ?:[\\/]* ) ;;
25227 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
25228 esac
25229_ACEOF
25230
25231cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25232# If the template does not know about datarootdir, expand it.
25233# FIXME: This hack should be removed a few years after 2.60.
25234ac_datarootdir_hack=; ac_datarootdir_seen=
25235ac_sed_dataroot='
25236/datarootdir/ {
25237 p
25238 q
25239}
25240/@datadir@/p
25241/@docdir@/p
25242/@infodir@/p
25243/@localedir@/p
25244/@mandir@/p'
25245case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
25246*datarootdir*) ac_datarootdir_seen=yes;;
25247*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25248 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25249$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25250_ACEOF
25251cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25252 ac_datarootdir_hack='
25253 s&@datadir@&$datadir&g
25254 s&@docdir@&$docdir&g
25255 s&@infodir@&$infodir&g
25256 s&@localedir@&$localedir&g
25257 s&@mandir@&$mandir&g
25258 s&\\\${datarootdir}&$datarootdir&g' ;;
25259esac
25260_ACEOF
25261
25262# Neutralize VPATH when `$srcdir' = `.'.
25263# Shell code in configure.ac might set extrasub.
25264# FIXME: do we really want to maintain this feature?
25265cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25266ac_sed_extra="$ac_vpsub
25267$extrasub
25268_ACEOF
25269cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25270:t
25271/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25272s|@configure_input@|$ac_sed_conf_input|;t t
25273s&@top_builddir@&$ac_top_builddir_sub&;t t
25274s&@top_build_prefix@&$ac_top_build_prefix&;t t
25275s&@srcdir@&$ac_srcdir&;t t
25276s&@abs_srcdir@&$ac_abs_srcdir&;t t
25277s&@top_srcdir@&$ac_top_srcdir&;t t
25278s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25279s&@builddir@&$ac_builddir&;t t
25280s&@abs_builddir@&$ac_abs_builddir&;t t
25281s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25282s&@INSTALL@&$ac_INSTALL&;t t
25283s&@MKDIR_P@&$ac_MKDIR_P&;t t
25284$ac_datarootdir_hack
25285"
25286eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
25287 || as_fn_error "could not create $ac_file" "$LINENO" 5
25288
25289test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25290 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25291 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25292 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25293which seems to be undefined. Please make sure it is defined." >&5
25294$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25295which seems to be undefined. Please make sure it is defined." >&2;}
25296
25297 rm -f "$tmp/stdin"
25298 case $ac_file in
25299 -) cat "$tmp/out" && rm -f "$tmp/out";;
25300 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
25301 esac \
25302 || as_fn_error "could not create $ac_file" "$LINENO" 5
25303 ;;
25304 :H)
25305 #
25306 # CONFIG_HEADER
25307 #
25308 if test x"$ac_file" != x-; then
25309 {
25310 $as_echo "/* $configure_input */" \
25311 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
25312 } >"$tmp/config.h" \
25313 || as_fn_error "could not create $ac_file" "$LINENO" 5
25314 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
25315 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
25316$as_echo "$as_me: $ac_file is unchanged" >&6;}
25317 else
25318 rm -f "$ac_file"
25319 mv "$tmp/config.h" "$ac_file" \
25320 || as_fn_error "could not create $ac_file" "$LINENO" 5
25321 fi
25322 else
25323 $as_echo "/* $configure_input */" \
25324 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
25325 || as_fn_error "could not create -" "$LINENO" 5
25326 fi
25327# Compute "$ac_file"'s index in $config_headers.
25328_am_arg="$ac_file"
25329_am_stamp_count=1
25330for _am_header in $config_headers :; do
25331 case $_am_header in
25332 $_am_arg | $_am_arg:* )
25333 break ;;
25334 * )
25335 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
25336 esac
25337done
25338echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
25339$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25340 X"$_am_arg" : 'X\(//\)[^/]' \| \
25341 X"$_am_arg" : 'X\(//\)$' \| \
25342 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
25343$as_echo X"$_am_arg" |
25344 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25345 s//\1/
25346 q
25347 }
25348 /^X\(\/\/\)[^/].*/{
25349 s//\1/
25350 q
25351 }
25352 /^X\(\/\/\)$/{
25353 s//\1/
25354 q
25355 }
25356 /^X\(\/\).*/{
25357 s//\1/
25358 q
25359 }
25360 s/.*/./; q'`/stamp-h$_am_stamp_count
25361 ;;
25362
25363 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
25364$as_echo "$as_me: executing $ac_file commands" >&6;}
25365 ;;
25366 esac
25367
25368
25369 case $ac_file$ac_mode in
25370 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
25371 # Autoconf 2.62 quotes --file arguments for eval, but not when files
25372 # are listed without --file. Let's play safe and only enable the eval
25373 # if we detect the quoting.
25374 case $CONFIG_FILES in
25375 *\'*) eval set x "$CONFIG_FILES" ;;
25376 *) set x $CONFIG_FILES ;;
25377 esac
25378 shift
25379 for mf
25380 do
25381 # Strip MF so we end up with the name of the file.
25382 mf=`echo "$mf" | sed -e 's/:.*$//'`
25383 # Check whether this is an Automake generated Makefile or not.
25384 # We used to match only the files named `Makefile.in', but
25385 # some people rename them; so instead we look at the file content.
25386 # Grep'ing the first line is not enough: some people post-process
25387 # each Makefile.in and add a new line on top of each file to say so.
25388 # Grep'ing the whole file is not good either: AIX grep has a line
25389 # limit of 2048, but all sed's we know have understand at least 4000.
25390 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
25391 dirpart=`$as_dirname -- "$mf" ||
25392$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25393 X"$mf" : 'X\(//\)[^/]' \| \
25394 X"$mf" : 'X\(//\)$' \| \
25395 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
25396$as_echo X"$mf" |
25397 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25398 s//\1/
25399 q
25400 }
25401 /^X\(\/\/\)[^/].*/{
25402 s//\1/
25403 q
25404 }
25405 /^X\(\/\/\)$/{
25406 s//\1/
25407 q
25408 }
25409 /^X\(\/\).*/{
25410 s//\1/
25411 q
25412 }
25413 s/.*/./; q'`
25414 else
25415 continue
25416 fi
25417 # Extract the definition of DEPDIR, am__include, and am__quote
25418 # from the Makefile without running `make'.
25419 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
25420 test -z "$DEPDIR" && continue
25421 am__include=`sed -n 's/^am__include = //p' < "$mf"`
25422 test -z "am__include" && continue
25423 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
25424 # When using ansi2knr, U may be empty or an underscore; expand it
25425 U=`sed -n 's/^U = //p' < "$mf"`
25426 # Find all dependency output files, they are included files with
25427 # $(DEPDIR) in their names. We invoke sed twice because it is the
25428 # simplest approach to changing $(DEPDIR) to its actual value in the
25429 # expansion.
25430 for file in `sed -n "
25431 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
25432 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
25433 # Make sure the directory exists.
25434 test -f "$dirpart/$file" && continue
25435 fdir=`$as_dirname -- "$file" ||
25436$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25437 X"$file" : 'X\(//\)[^/]' \| \
25438 X"$file" : 'X\(//\)$' \| \
25439 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
25440$as_echo X"$file" |
25441 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25442 s//\1/
25443 q
25444 }
25445 /^X\(\/\/\)[^/].*/{
25446 s//\1/
25447 q
25448 }
25449 /^X\(\/\/\)$/{
25450 s//\1/
25451 q
25452 }
25453 /^X\(\/\).*/{
25454 s//\1/
25455 q
25456 }
25457 s/.*/./; q'`
25458 as_dir=$dirpart/$fdir; as_fn_mkdir_p
25459 # echo "creating $dirpart/$file"
25460 echo '# dummy' > "$dirpart/$file"
25461 done
25462 done
25463}
25464 ;;
25465 "default":C)
25466case x$CONFIG_HEADERS in
25467xconfig.h:config.in)
25468echo > stamp-h ;;
25469esac
25470 ;;
25471
25472 esac
25473done # for ac_tag
25474
25475
25476as_fn_exit 0
25477_ACEOF
25478ac_clean_files=$ac_clean_files_save
25479
25480test $ac_write_fail = 0 ||
25481 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
25482
25483
25484# configure is writing to config.log, and then calls config.status.
25485# config.status does its own redirection, appending to config.log.
25486# Unfortunately, on DOS this fails, as config.log is still kept open
25487# by configure, so config.status won't be able to write to it; its
25488# output is simply discarded. So we exec the FD to /dev/null,
25489# effectively closing config.log, so it can be properly (re)opened and
25490# appended to by config.status. When coming back to configure, we
25491# need to make the FD available again.
25492if test "$no_create" != yes; then
25493 ac_cs_success=:
25494 ac_config_status_args=
25495 test "$silent" = yes &&
25496 ac_config_status_args="$ac_config_status_args --quiet"
25497 exec 5>/dev/null
25498 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
25499 exec 5>>config.log
25500 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25501 # would make configure fail if this is the last instruction.
25502 $ac_cs_success || as_fn_exit $?
25503fi
25504if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
25505 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
25506$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
25507fi
25508
25509
25510exit 0
This page took 2.611451 seconds and 4 git commands to generate.