Remove long_long_align_bit gdbarch attribute
[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
39be3c7e
SM
603AM_BACKSLASH
604AM_DEFAULT_VERBOSITY
c971b7fa
PA
605am__fastdepCC_FALSE
606am__fastdepCC_TRUE
607CCDEPMODE
608AMDEPBACKSLASH
609AMDEP_FALSE
610AMDEP_TRUE
611am__quote
612am__include
613DEPDIR
614am__untar
615am__tar
616AMTAR
617am__leading_dot
618SET_MAKE
619AWK
620mkdir_p
c971b7fa
PA
621INSTALL_STRIP_PROGRAM
622STRIP
623install_sh
624MAKEINFO
625AUTOHEADER
626AUTOMAKE
627AUTOCONF
628ACLOCAL
629VERSION
630PACKAGE
631CYGPATH_W
632am__isrc
633INSTALL_DATA
634INSTALL_SCRIPT
635INSTALL_PROGRAM
636LIBGNU_LTLIBDEPS
637LIBGNU_LIBDEPS
638gltests_WITNESS
8690e634
JK
639REPLACE_TOWLOWER
640REPLACE_ISWCNTRL
641HAVE_WCTYPE_H
642NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
643NEXT_WCTYPE_H
644HAVE_ISWCNTRL
645REPLACE_ISWBLANK
646HAVE_WCTRANS_T
647HAVE_WCTYPE_T
648HAVE_ISWBLANK
649GNULIB_TOWCTRANS
650GNULIB_WCTRANS
651GNULIB_ISWCTYPE
652GNULIB_WCTYPE
653GNULIB_ISWBLANK
654HAVE_WINT_T
655HAVE_FEATURES_H
656NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
657NEXT_WCHAR_H
8839a007
PA
658HAVE_UNISTD_H
659NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
660NEXT_UNISTD_H
4a626d0a 661UNISTD_H_DEFINES_STRUCT_TIMESPEC
09607c9e
TT
662PTHREAD_H_DEFINES_STRUCT_TIMESPEC
663SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
664TIME_H_DEFINES_STRUCT_TIMESPEC
665NEXT_AS_FIRST_DIRECTIVE_TIME_H
666NEXT_TIME_H
4a626d0a
PA
667REPLACE_LOCALTIME
668REPLACE_GMTIME
09607c9e
TT
669REPLACE_TIMEGM
670REPLACE_NANOSLEEP
671REPLACE_MKTIME
672REPLACE_LOCALTIME_R
673HAVE_TIMEGM
674HAVE_STRPTIME
675HAVE_NANOSLEEP
676HAVE_DECL_LOCALTIME_R
4a626d0a 677GNULIB_TIME_RZ
09607c9e
TT
678GNULIB_TIME_R
679GNULIB_TIMEGM
680GNULIB_STRPTIME
681GNULIB_NANOSLEEP
682GNULIB_MKTIME
63ce7108
TT
683WINDOWS_64_BIT_OFF_T
684NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
685NEXT_SYS_TYPES_H
09607c9e 686MKDIR_P
2196f55f
YQ
687NEXT_AS_FIRST_DIRECTIVE_STRING_H
688NEXT_STRING_H
98399780
YQ
689NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
690NEXT_STDLIB_H
6a29c58e
YQ
691NEXT_AS_FIRST_DIRECTIVE_STDIO_H
692NEXT_STDIO_H
2196f55f
YQ
693NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
694NEXT_STDDEF_H
695GL_GENERATE_STDDEF_H_FALSE
696GL_GENERATE_STDDEF_H_TRUE
697STDDEF_H
698HAVE_WCHAR_T
4a626d0a 699HAVE_MAX_ALIGN_T
2196f55f
YQ
700REPLACE_NULL
701HAVE__BOOL
702GL_GENERATE_STDBOOL_H_FALSE
703GL_GENERATE_STDBOOL_H_TRUE
704STDBOOL_H
0750520d
PA
705NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
706NEXT_SIGNAL_H
707REPLACE_RAISE
708REPLACE_PTHREAD_SIGMASK
709HAVE_SIGHANDLER_T
710HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
711HAVE_STRUCT_SIGACTION_SA_SIGACTION
712HAVE_SIGACTION
713HAVE_SIGINFO_T
714HAVE_SIGSET_T
715HAVE_RAISE
716HAVE_PTHREAD_SIGMASK
717HAVE_POSIX_SIGNALBLOCKING
718GNULIB_SIGACTION
719GNULIB_SIGPROCMASK
720GNULIB_SIGNAL_H_SIGPIPE
721GNULIB_RAISE
722GNULIB_PTHREAD_SIGMASK
6a29c58e
YQ
723REPLACE_VSPRINTF
724REPLACE_VSNPRINTF
725REPLACE_VPRINTF
726REPLACE_VFPRINTF
727REPLACE_VDPRINTF
728REPLACE_VASPRINTF
729REPLACE_TMPFILE
730REPLACE_STDIO_WRITE_FUNCS
731REPLACE_STDIO_READ_FUNCS
732REPLACE_SPRINTF
733REPLACE_SNPRINTF
734REPLACE_RENAMEAT
735REPLACE_RENAME
736REPLACE_REMOVE
737REPLACE_PRINTF
738REPLACE_POPEN
739REPLACE_PERROR
740REPLACE_OBSTACK_PRINTF
741REPLACE_GETLINE
742REPLACE_GETDELIM
743REPLACE_FTELLO
744REPLACE_FTELL
745REPLACE_FSEEKO
746REPLACE_FSEEK
747REPLACE_FREOPEN
748REPLACE_FPURGE
749REPLACE_FPRINTF
750REPLACE_FOPEN
751REPLACE_FFLUSH
752REPLACE_FDOPEN
753REPLACE_FCLOSE
754REPLACE_DPRINTF
755HAVE_VDPRINTF
756HAVE_VASPRINTF
757HAVE_RENAMEAT
758HAVE_POPEN
759HAVE_PCLOSE
760HAVE_FTELLO
761HAVE_FSEEKO
762HAVE_DPRINTF
763HAVE_DECL_VSNPRINTF
764HAVE_DECL_SNPRINTF
765HAVE_DECL_OBSTACK_PRINTF
766HAVE_DECL_GETLINE
767HAVE_DECL_GETDELIM
768HAVE_DECL_FTELLO
769HAVE_DECL_FSEEKO
770HAVE_DECL_FPURGE
771GNULIB_VSPRINTF_POSIX
772GNULIB_VSNPRINTF
773GNULIB_VPRINTF_POSIX
774GNULIB_VPRINTF
775GNULIB_VFPRINTF_POSIX
776GNULIB_VFPRINTF
777GNULIB_VDPRINTF
778GNULIB_VSCANF
779GNULIB_VFSCANF
780GNULIB_VASPRINTF
781GNULIB_TMPFILE
782GNULIB_STDIO_H_SIGPIPE
783GNULIB_STDIO_H_NONBLOCKING
784GNULIB_SPRINTF_POSIX
785GNULIB_SNPRINTF
786GNULIB_SCANF
787GNULIB_RENAMEAT
788GNULIB_RENAME
789GNULIB_REMOVE
790GNULIB_PUTS
791GNULIB_PUTCHAR
792GNULIB_PUTC
793GNULIB_PRINTF_POSIX
794GNULIB_PRINTF
795GNULIB_POPEN
796GNULIB_PERROR
797GNULIB_PCLOSE
798GNULIB_OBSTACK_PRINTF_POSIX
799GNULIB_OBSTACK_PRINTF
800GNULIB_GETLINE
801GNULIB_GETDELIM
802GNULIB_GETCHAR
803GNULIB_GETC
804GNULIB_FWRITE
805GNULIB_FTELLO
806GNULIB_FTELL
807GNULIB_FSEEKO
808GNULIB_FSEEK
809GNULIB_FSCANF
810GNULIB_FREOPEN
811GNULIB_FREAD
812GNULIB_FPUTS
813GNULIB_FPUTC
814GNULIB_FPURGE
815GNULIB_FPRINTF_POSIX
816GNULIB_FPRINTF
817GNULIB_FOPEN
818GNULIB_FGETS
819GNULIB_FGETC
820GNULIB_FFLUSH
821GNULIB_FDOPEN
822GNULIB_FCLOSE
823GNULIB_DPRINTF
c971b7fa
PA
824UNDEFINE_STRTOK_R
825REPLACE_STRTOK_R
826REPLACE_STRSIGNAL
827REPLACE_STRNLEN
828REPLACE_STRNDUP
829REPLACE_STRNCAT
830REPLACE_STRERROR_R
831REPLACE_STRERROR
832REPLACE_STRCHRNUL
833REPLACE_STRCASESTR
834REPLACE_STRSTR
835REPLACE_STRDUP
836REPLACE_STPNCPY
837REPLACE_MEMMEM
838REPLACE_MEMCHR
839HAVE_STRVERSCMP
840HAVE_DECL_STRSIGNAL
841HAVE_DECL_STRERROR_R
842HAVE_DECL_STRTOK_R
843HAVE_STRCASESTR
844HAVE_STRSEP
845HAVE_STRPBRK
846HAVE_DECL_STRNLEN
847HAVE_DECL_STRNDUP
848HAVE_DECL_STRDUP
849HAVE_STRCHRNUL
850HAVE_STPNCPY
851HAVE_STPCPY
852HAVE_RAWMEMCHR
853HAVE_DECL_MEMRCHR
854HAVE_MEMPCPY
855HAVE_DECL_MEMMEM
856HAVE_MEMCHR
857HAVE_FFSLL
858HAVE_FFSL
859HAVE_MBSLEN
860GNULIB_STRVERSCMP
861GNULIB_STRSIGNAL
862GNULIB_STRERROR_R
863GNULIB_STRERROR
864GNULIB_MBSTOK_R
865GNULIB_MBSSEP
866GNULIB_MBSSPN
867GNULIB_MBSPBRK
868GNULIB_MBSCSPN
869GNULIB_MBSCASESTR
870GNULIB_MBSPCASECMP
871GNULIB_MBSNCASECMP
872GNULIB_MBSCASECMP
873GNULIB_MBSSTR
874GNULIB_MBSRCHR
875GNULIB_MBSCHR
876GNULIB_MBSNLEN
877GNULIB_MBSLEN
878GNULIB_STRTOK_R
879GNULIB_STRCASESTR
880GNULIB_STRSTR
881GNULIB_STRSEP
882GNULIB_STRPBRK
883GNULIB_STRNLEN
884GNULIB_STRNDUP
885GNULIB_STRNCAT
886GNULIB_STRDUP
887GNULIB_STRCHRNUL
888GNULIB_STPNCPY
889GNULIB_STPCPY
890GNULIB_RAWMEMCHR
891GNULIB_MEMRCHR
892GNULIB_MEMPCPY
893GNULIB_MEMMEM
894GNULIB_MEMCHR
895GNULIB_FFSLL
896GNULIB_FFSL
8690e634
JK
897LOCALE_FR
898LOCALE_FR_UTF8
899LOCALE_ZH_CN
900LOCALE_JA
901REPLACE_WCSWIDTH
902REPLACE_WCWIDTH
903REPLACE_WCSNRTOMBS
904REPLACE_WCSRTOMBS
905REPLACE_WCRTOMB
906REPLACE_MBSNRTOWCS
907REPLACE_MBSRTOWCS
908REPLACE_MBRLEN
909REPLACE_MBRTOWC
910REPLACE_MBSINIT
911REPLACE_WCTOB
912REPLACE_BTOWC
913REPLACE_MBSTATE_T
914HAVE_DECL_WCWIDTH
915HAVE_DECL_WCTOB
916HAVE_WCSWIDTH
917HAVE_WCSTOK
918HAVE_WCSSTR
919HAVE_WCSPBRK
920HAVE_WCSSPN
921HAVE_WCSCSPN
922HAVE_WCSRCHR
923HAVE_WCSCHR
924HAVE_WCSDUP
925HAVE_WCSXFRM
926HAVE_WCSCOLL
927HAVE_WCSNCASECMP
928HAVE_WCSCASECMP
929HAVE_WCSNCMP
930HAVE_WCSCMP
931HAVE_WCSNCAT
932HAVE_WCSCAT
933HAVE_WCPNCPY
934HAVE_WCSNCPY
935HAVE_WCPCPY
936HAVE_WCSCPY
937HAVE_WCSNLEN
938HAVE_WCSLEN
939HAVE_WMEMSET
940HAVE_WMEMMOVE
941HAVE_WMEMCPY
942HAVE_WMEMCMP
943HAVE_WMEMCHR
944HAVE_WCSNRTOMBS
945HAVE_WCSRTOMBS
946HAVE_WCRTOMB
947HAVE_MBSNRTOWCS
948HAVE_MBSRTOWCS
949HAVE_MBRLEN
950HAVE_MBRTOWC
951HAVE_MBSINIT
952HAVE_BTOWC
953GNULIB_WCSWIDTH
954GNULIB_WCSTOK
955GNULIB_WCSSTR
956GNULIB_WCSPBRK
957GNULIB_WCSSPN
958GNULIB_WCSCSPN
959GNULIB_WCSRCHR
960GNULIB_WCSCHR
961GNULIB_WCSDUP
962GNULIB_WCSXFRM
963GNULIB_WCSCOLL
964GNULIB_WCSNCASECMP
965GNULIB_WCSCASECMP
966GNULIB_WCSNCMP
967GNULIB_WCSCMP
968GNULIB_WCSNCAT
969GNULIB_WCSCAT
970GNULIB_WCPNCPY
971GNULIB_WCSNCPY
972GNULIB_WCPCPY
973GNULIB_WCSCPY
974GNULIB_WCSNLEN
975GNULIB_WCSLEN
976GNULIB_WMEMSET
977GNULIB_WMEMMOVE
978GNULIB_WMEMCPY
979GNULIB_WMEMCMP
980GNULIB_WMEMCHR
981GNULIB_WCWIDTH
982GNULIB_WCSNRTOMBS
983GNULIB_WCSRTOMBS
984GNULIB_WCRTOMB
985GNULIB_MBSNRTOWCS
986GNULIB_MBSRTOWCS
987GNULIB_MBRLEN
988GNULIB_MBRTOWC
989GNULIB_MBSINIT
990GNULIB_WCTOB
991GNULIB_BTOWC
88b48903
WN
992NEXT_AS_FIRST_DIRECTIVE_MATH_H
993NEXT_MATH_H
8690e634
JK
994LOCALCHARSET_TESTS_ENVIRONMENT
995GLIBC21
c971b7fa
PA
996NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
997NEXT_INTTYPES_H
998UINT64_MAX_EQ_ULONG_MAX
999UINT32_MAX_LT_UINTMAX_MAX
1000PRIPTR_PREFIX
1001PRI_MACROS_BROKEN
1002INT64_MAX_EQ_LONG_MAX
1003INT32_MAX_LT_INTMAX_MAX
4a626d0a 1004REPLACE_STRTOUMAX
c971b7fa
PA
1005REPLACE_STRTOIMAX
1006HAVE_DECL_STRTOUMAX
1007HAVE_DECL_STRTOIMAX
1008HAVE_DECL_IMAXDIV
1009HAVE_DECL_IMAXABS
1010GNULIB_STRTOUMAX
1011GNULIB_STRTOIMAX
1012GNULIB_IMAXDIV
1013GNULIB_IMAXABS
1014GL_GENERATE_STDINT_H_FALSE
1015GL_GENERATE_STDINT_H_TRUE
1016STDINT_H
49e4877c
PA
1017HAVE_SYS_INTTYPES_H
1018HAVE_SYS_BITYPES_H
1019HAVE_C99_STDINT_H
c971b7fa
PA
1020WINT_T_SUFFIX
1021WCHAR_T_SUFFIX
1022SIG_ATOMIC_T_SUFFIX
1023SIZE_T_SUFFIX
1024PTRDIFF_T_SUFFIX
1025HAVE_SIGNED_WINT_T
1026HAVE_SIGNED_WCHAR_T
1027HAVE_SIGNED_SIG_ATOMIC_T
1028BITSIZEOF_WINT_T
1029BITSIZEOF_WCHAR_T
1030BITSIZEOF_SIG_ATOMIC_T
1031BITSIZEOF_SIZE_T
1032BITSIZEOF_PTRDIFF_T
1033APPLE_UNIVERSAL_BUILD
c971b7fa
PA
1034HAVE_STDINT_H
1035NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1036NEXT_STDINT_H
c971b7fa
PA
1037HAVE_SYS_TYPES_H
1038HAVE_INTTYPES_H
1039HAVE_WCHAR_H
1040HAVE_UNSIGNED_LONG_LONG_INT
1041HAVE_LONG_LONG_INT
49e4877c
PA
1042GL_GENERATE_LIMITS_H_FALSE
1043GL_GENERATE_LIMITS_H_TRUE
1044LIMITS_H
1045NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
1046NEXT_LIMITS_H
6ec2e0f5
SDJ
1047HAVE_SYS_CDEFS_H
1048GL_GENERATE_GLOB_H_FALSE
1049GL_GENERATE_GLOB_H_TRUE
1050GLOB_H
4a626d0a
PA
1051NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1052NEXT_SYS_TIME_H
1053REPLACE_STRUCT_TIMEVAL
1054REPLACE_GETTIMEOFDAY
1055HAVE_TIMEZONE_T
1056HAVE_SYS_TIME_H
1057HAVE_STRUCT_TIMEVAL
1058HAVE_GETTIMEOFDAY
1059GNULIB_GETTIMEOFDAY
6ec2e0f5
SDJ
1060LTLIBINTL
1061LIBINTL
1062WINDOWS_64_BIT_ST_SIZE
1063NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1064NEXT_SYS_STAT_H
1065REPLACE_UTIMENSAT
1066REPLACE_STAT
1067REPLACE_MKNOD
1068REPLACE_MKFIFO
1069REPLACE_MKDIR
1070REPLACE_LSTAT
1071REPLACE_FUTIMENS
1072REPLACE_FSTATAT
1073REPLACE_FSTAT
1074HAVE_UTIMENSAT
1075HAVE_MKNODAT
1076HAVE_MKNOD
1077HAVE_MKFIFOAT
1078HAVE_MKFIFO
1079HAVE_MKDIRAT
1080HAVE_LSTAT
1081HAVE_LCHMOD
1082HAVE_FUTIMENS
1083HAVE_FSTATAT
1084HAVE_FCHMODAT
1085GNULIB_UTIMENSAT
1086GNULIB_STAT
1087GNULIB_MKNODAT
1088GNULIB_MKNOD
1089GNULIB_MKFIFOAT
1090GNULIB_MKFIFO
1091GNULIB_MKDIRAT
1092GNULIB_LSTAT
1093GNULIB_LCHMOD
1094GNULIB_FUTIMENS
1095GNULIB_FSTATAT
1096GNULIB_FSTAT
1097GNULIB_FCHMODAT
88b48903
WN
1098FREXPL_LIBM
1099HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1100FREXP_LIBM
1101REPLACE_TRUNCL
1102REPLACE_TRUNCF
1103REPLACE_TRUNC
1104REPLACE_SQRTL
1105REPLACE_SIGNBIT_USING_GCC
1106REPLACE_SIGNBIT
1107REPLACE_ROUNDL
1108REPLACE_ROUNDF
1109REPLACE_ROUND
1110REPLACE_REMAINDERL
1111REPLACE_REMAINDERF
1112REPLACE_REMAINDER
1113REPLACE_NAN
1114REPLACE_MODFL
1115REPLACE_MODFF
1116REPLACE_MODF
1117REPLACE_LOGBL
1118REPLACE_LOGBF
1119REPLACE_LOGB
1120REPLACE_LOG2L
1121REPLACE_LOG2F
1122REPLACE_LOG2
1123REPLACE_LOG1PL
1124REPLACE_LOG1PF
1125REPLACE_LOG1P
1126REPLACE_LOG10L
1127REPLACE_LOG10F
1128REPLACE_LOG10
1129REPLACE_LOGL
1130REPLACE_LOGF
1131REPLACE_LOG
1132REPLACE_LDEXPL
1133REPLACE_ISNAN
1134REPLACE_ISINF
1135REPLACE_ISFINITE
1136REPLACE_ILOGBF
1137REPLACE_ILOGB
1138REPLACE_HYPOTL
1139REPLACE_HYPOTF
1140REPLACE_HYPOT
1141REPLACE_HUGE_VAL
1142REPLACE_FREXPL
1143REPLACE_FREXP
1144REPLACE_FREXPF
1145REPLACE_FMODL
1146REPLACE_FMODF
1147REPLACE_FMOD
1148REPLACE_FMAL
1149REPLACE_FMAF
1150REPLACE_FMA
1151REPLACE_FLOORL
1152REPLACE_FLOORF
1153REPLACE_FLOOR
1154REPLACE_FABSL
1155REPLACE_EXP2L
1156REPLACE_EXP2
1157REPLACE_EXPM1F
1158REPLACE_EXPM1
1159REPLACE_CEILL
1160REPLACE_CEILF
1161REPLACE_CEIL
1162REPLACE_CBRTL
1163REPLACE_CBRTF
1164HAVE_DECL_TRUNCL
1165HAVE_DECL_TRUNCF
1166HAVE_DECL_TRUNC
1167HAVE_DECL_TANL
1168HAVE_DECL_SQRTL
1169HAVE_DECL_SINL
1170HAVE_DECL_ROUNDL
1171HAVE_DECL_ROUNDF
1172HAVE_DECL_ROUND
1173HAVE_DECL_RINTF
1174HAVE_DECL_REMAINDERL
1175HAVE_DECL_REMAINDER
1176HAVE_DECL_LOGB
1177HAVE_DECL_LOG2L
1178HAVE_DECL_LOG2F
1179HAVE_DECL_LOG2
1180HAVE_DECL_LOG10L
1181HAVE_DECL_LOGL
1182HAVE_DECL_LDEXPL
1183HAVE_DECL_FREXPL
1184HAVE_DECL_FLOORL
1185HAVE_DECL_FLOORF
1186HAVE_DECL_EXPM1L
1187HAVE_DECL_EXP2L
1188HAVE_DECL_EXP2F
1189HAVE_DECL_EXP2
1190HAVE_DECL_EXPL
1191HAVE_DECL_COSL
1192HAVE_DECL_COPYSIGNF
1193HAVE_DECL_CEILL
1194HAVE_DECL_CEILF
1195HAVE_DECL_CBRTL
1196HAVE_DECL_CBRTF
1197HAVE_DECL_ATANL
1198HAVE_DECL_ASINL
1199HAVE_DECL_ACOSL
1200HAVE_TANHF
1201HAVE_TANL
1202HAVE_TANF
1203HAVE_SQRTL
1204HAVE_SQRTF
1205HAVE_SINHF
1206HAVE_SINL
1207HAVE_SINF
1208HAVE_RINTL
1209HAVE_RINT
1210HAVE_REMAINDERF
1211HAVE_REMAINDER
1212HAVE_POWF
1213HAVE_MODFL
1214HAVE_MODFF
1215HAVE_LOGBL
1216HAVE_LOGBF
1217HAVE_LOG1PL
1218HAVE_LOG1PF
1219HAVE_LOG1P
1220HAVE_LOG10L
1221HAVE_LOG10F
1222HAVE_LOGL
1223HAVE_LOGF
1224HAVE_LDEXPF
1225HAVE_ISNANL
1226HAVE_ISNAND
1227HAVE_ISNANF
1228HAVE_ILOGBL
1229HAVE_ILOGBF
1230HAVE_ILOGB
1231HAVE_HYPOTL
1232HAVE_HYPOTF
1233HAVE_FREXPF
1234HAVE_FMODL
1235HAVE_FMODF
1236HAVE_FMAL
1237HAVE_FMAF
1238HAVE_FMA
1239HAVE_FABSL
1240HAVE_FABSF
1241HAVE_EXPM1F
1242HAVE_EXPM1
1243HAVE_EXPL
1244HAVE_EXPF
1245HAVE_COSHF
1246HAVE_COSL
1247HAVE_COSF
1248HAVE_COPYSIGNL
1249HAVE_COPYSIGN
1250HAVE_CBRTL
1251HAVE_CBRTF
1252HAVE_CBRT
1253HAVE_ATAN2F
1254HAVE_ATANL
1255HAVE_ATANF
1256HAVE_ASINL
1257HAVE_ASINF
1258HAVE_ACOSL
1259HAVE_ACOSF
1260GNULIB_TRUNCL
1261GNULIB_TRUNCF
1262GNULIB_TRUNC
1263GNULIB_TANHF
1264GNULIB_TANL
1265GNULIB_TANF
1266GNULIB_SQRTL
1267GNULIB_SQRTF
1268GNULIB_SINHF
1269GNULIB_SINL
1270GNULIB_SINF
1271GNULIB_SIGNBIT
1272GNULIB_ROUNDL
1273GNULIB_ROUNDF
1274GNULIB_ROUND
1275GNULIB_RINTL
1276GNULIB_RINTF
1277GNULIB_RINT
1278GNULIB_REMAINDERL
1279GNULIB_REMAINDERF
1280GNULIB_REMAINDER
1281GNULIB_POWF
1282GNULIB_MODFL
1283GNULIB_MODFF
1284GNULIB_MODF
1285GNULIB_LOGBL
1286GNULIB_LOGBF
1287GNULIB_LOGB
1288GNULIB_LOG2L
1289GNULIB_LOG2F
1290GNULIB_LOG2
1291GNULIB_LOG1PL
1292GNULIB_LOG1PF
1293GNULIB_LOG1P
1294GNULIB_LOG10L
1295GNULIB_LOG10F
1296GNULIB_LOG10
1297GNULIB_LOGL
1298GNULIB_LOGF
1299GNULIB_LOG
1300GNULIB_LDEXPL
1301GNULIB_LDEXPF
1302GNULIB_ISNANL
1303GNULIB_ISNAND
1304GNULIB_ISNANF
1305GNULIB_ISNAN
1306GNULIB_ISINF
1307GNULIB_ISFINITE
1308GNULIB_ILOGBL
1309GNULIB_ILOGBF
1310GNULIB_ILOGB
1311GNULIB_HYPOTL
1312GNULIB_HYPOTF
1313GNULIB_HYPOT
1314GNULIB_FREXPL
1315GNULIB_FREXP
1316GNULIB_FREXPF
1317GNULIB_FMODL
1318GNULIB_FMODF
1319GNULIB_FMOD
1320GNULIB_FMAL
1321GNULIB_FMAF
1322GNULIB_FMA
1323GNULIB_FLOORL
1324GNULIB_FLOORF
1325GNULIB_FLOOR
1326GNULIB_FABSL
1327GNULIB_FABSF
1328GNULIB_EXPM1L
1329GNULIB_EXPM1F
1330GNULIB_EXPM1
1331GNULIB_EXP2L
1332GNULIB_EXP2F
1333GNULIB_EXP2
1334GNULIB_EXPL
1335GNULIB_EXPF
1336GNULIB_COSHF
1337GNULIB_COSL
1338GNULIB_COSF
1339GNULIB_COPYSIGNL
1340GNULIB_COPYSIGNF
1341GNULIB_COPYSIGN
1342GNULIB_CEILL
1343GNULIB_CEILF
1344GNULIB_CEIL
1345GNULIB_CBRTL
1346GNULIB_CBRTF
1347GNULIB_CBRT
1348GNULIB_ATAN2F
1349GNULIB_ATANL
1350GNULIB_ATANF
1351GNULIB_ASINL
1352GNULIB_ASINF
1353GNULIB_ACOSL
1354GNULIB_ACOSF
8690e634
JK
1355GL_GENERATE_FNMATCH_H_FALSE
1356GL_GENERATE_FNMATCH_H_TRUE
1357FNMATCH_H
88b48903
WN
1358REPLACE_ITOLD
1359GL_GENERATE_FLOAT_H_FALSE
1360GL_GENERATE_FLOAT_H_TRUE
1361FLOAT_H
1362NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1363NEXT_FLOAT_H
6ec2e0f5
SDJ
1364NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1365NEXT_FCNTL_H
1366REPLACE_OPENAT
1367REPLACE_OPEN
1368REPLACE_FCNTL
1369HAVE_OPENAT
1370HAVE_FCNTL
1371GNULIB_OPENAT
1372GNULIB_OPEN
1373GNULIB_NONBLOCKING
1374GNULIB_FCNTL
18848e28
GF
1375EOVERFLOW_VALUE
1376EOVERFLOW_HIDDEN
1377ENOLINK_VALUE
1378ENOLINK_HIDDEN
1379EMULTIHOP_VALUE
1380EMULTIHOP_HIDDEN
1381GL_GENERATE_ERRNO_H_FALSE
1382GL_GENERATE_ERRNO_H_TRUE
1383ERRNO_H
1384NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1385NEXT_ERRNO_H
e26b6bb0
TT
1386HAVE_DIRENT_H
1387NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1388NEXT_DIRENT_H
88b48903
WN
1389PRAGMA_COLUMNS
1390PRAGMA_SYSTEM_HEADER
1391INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1392INCLUDE_NEXT
6ec2e0f5
SDJ
1393pkglibexecdir
1394runstatedir
1395lispdir
e26b6bb0
TT
1396REPLACE_FDOPENDIR
1397REPLACE_DIRFD
1398REPLACE_CLOSEDIR
1399REPLACE_OPENDIR
1400HAVE_ALPHASORT
1401HAVE_SCANDIR
1402HAVE_FDOPENDIR
1403HAVE_DECL_FDOPENDIR
1404HAVE_DECL_DIRFD
1405HAVE_CLOSEDIR
1406HAVE_REWINDDIR
1407HAVE_READDIR
1408HAVE_OPENDIR
1409GNULIB_ALPHASORT
1410GNULIB_SCANDIR
1411GNULIB_FDOPENDIR
1412GNULIB_DIRFD
1413GNULIB_CLOSEDIR
1414GNULIB_REWINDDIR
1415GNULIB_READDIR
1416GNULIB_OPENDIR
6ec2e0f5
SDJ
1417HAVE_WINSOCK2_H
1418HAVE_MSVC_INVALID_PARAMETER_HANDLER
e26b6bb0
TT
1419UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1420UNISTD_H_HAVE_WINSOCK2_H
1421REPLACE_WRITE
1422REPLACE_USLEEP
1423REPLACE_UNLINKAT
1424REPLACE_UNLINK
1425REPLACE_TTYNAME_R
4a626d0a 1426REPLACE_SYMLINKAT
e26b6bb0
TT
1427REPLACE_SYMLINK
1428REPLACE_SLEEP
1429REPLACE_RMDIR
4a626d0a 1430REPLACE_READLINKAT
e26b6bb0
TT
1431REPLACE_READLINK
1432REPLACE_READ
1433REPLACE_PWRITE
1434REPLACE_PREAD
1435REPLACE_LSEEK
1436REPLACE_LINKAT
1437REPLACE_LINK
1438REPLACE_LCHOWN
1439REPLACE_ISATTY
1440REPLACE_GETPAGESIZE
1441REPLACE_GETGROUPS
1442REPLACE_GETLOGIN_R
4a626d0a 1443REPLACE_GETDTABLESIZE
e26b6bb0
TT
1444REPLACE_GETDOMAINNAME
1445REPLACE_GETCWD
1446REPLACE_FTRUNCATE
1447REPLACE_FCHOWNAT
1448REPLACE_DUP2
1449REPLACE_DUP
1450REPLACE_CLOSE
1451REPLACE_CHOWN
1452HAVE_SYS_PARAM_H
1453HAVE_OS_H
1454HAVE_DECL_TTYNAME_R
1455HAVE_DECL_SETHOSTNAME
1456HAVE_DECL_GETUSERSHELL
1457HAVE_DECL_GETPAGESIZE
1458HAVE_DECL_GETLOGIN_R
1459HAVE_DECL_GETDOMAINNAME
1460HAVE_DECL_FDATASYNC
1461HAVE_DECL_FCHDIR
1462HAVE_DECL_ENVIRON
1463HAVE_USLEEP
1464HAVE_UNLINKAT
1465HAVE_SYMLINKAT
1466HAVE_SYMLINK
1467HAVE_SLEEP
1468HAVE_SETHOSTNAME
1469HAVE_READLINKAT
1470HAVE_READLINK
1471HAVE_PWRITE
1472HAVE_PREAD
1473HAVE_PIPE2
1474HAVE_PIPE
1475HAVE_LINKAT
1476HAVE_LINK
1477HAVE_LCHOWN
1478HAVE_GROUP_MEMBER
1479HAVE_GETPAGESIZE
1480HAVE_GETLOGIN
1481HAVE_GETHOSTNAME
1482HAVE_GETGROUPS
1483HAVE_GETDTABLESIZE
1484HAVE_FTRUNCATE
1485HAVE_FSYNC
1486HAVE_FDATASYNC
1487HAVE_FCHOWNAT
1488HAVE_FCHDIR
1489HAVE_FACCESSAT
1490HAVE_EUIDACCESS
1491HAVE_DUP3
1492HAVE_DUP2
1493HAVE_CHOWN
1494GNULIB_WRITE
1495GNULIB_USLEEP
1496GNULIB_UNLINKAT
1497GNULIB_UNLINK
1498GNULIB_UNISTD_H_SIGPIPE
1499GNULIB_UNISTD_H_NONBLOCKING
1500GNULIB_TTYNAME_R
1501GNULIB_SYMLINKAT
1502GNULIB_SYMLINK
1503GNULIB_SLEEP
1504GNULIB_SETHOSTNAME
1505GNULIB_RMDIR
1506GNULIB_READLINKAT
1507GNULIB_READLINK
1508GNULIB_READ
1509GNULIB_PWRITE
1510GNULIB_PREAD
1511GNULIB_PIPE2
1512GNULIB_PIPE
1513GNULIB_LSEEK
1514GNULIB_LINKAT
1515GNULIB_LINK
1516GNULIB_LCHOWN
1517GNULIB_ISATTY
1518GNULIB_GROUP_MEMBER
1519GNULIB_GETUSERSHELL
1520GNULIB_GETPAGESIZE
1521GNULIB_GETLOGIN_R
1522GNULIB_GETLOGIN
1523GNULIB_GETHOSTNAME
1524GNULIB_GETGROUPS
1525GNULIB_GETDTABLESIZE
1526GNULIB_GETDOMAINNAME
1527GNULIB_GETCWD
1528GNULIB_FTRUNCATE
1529GNULIB_FSYNC
1530GNULIB_FDATASYNC
1531GNULIB_FCHOWNAT
1532GNULIB_FCHDIR
1533GNULIB_FACCESSAT
1534GNULIB_EUIDACCESS
1535GNULIB_ENVIRON
1536GNULIB_DUP3
1537GNULIB_DUP2
1538GNULIB_DUP
1539GNULIB_CLOSE
1540GNULIB_CHOWN
1541GNULIB_CHDIR
98399780
YQ
1542REPLACE_WCTOMB
1543REPLACE_UNSETENV
1544REPLACE_STRTOD
1545REPLACE_SETENV
1546REPLACE_REALPATH
1547REPLACE_REALLOC
1548REPLACE_RANDOM_R
4a626d0a 1549REPLACE_QSORT_R
98399780
YQ
1550REPLACE_PUTENV
1551REPLACE_PTSNAME_R
1552REPLACE_PTSNAME
1553REPLACE_MKSTEMP
1554REPLACE_MBTOWC
1555REPLACE_MALLOC
1556REPLACE_CANONICALIZE_FILE_NAME
1557REPLACE_CALLOC
1558HAVE_DECL_UNSETENV
1559HAVE_UNLOCKPT
1560HAVE_SYS_LOADAVG_H
1561HAVE_STRUCT_RANDOM_DATA
1562HAVE_STRTOULL
1563HAVE_STRTOLL
1564HAVE_STRTOD
1565HAVE_DECL_SETENV
1566HAVE_SETENV
4a626d0a 1567HAVE_SECURE_GETENV
98399780
YQ
1568HAVE_RPMATCH
1569HAVE_REALPATH
1570HAVE_RANDOM_R
1571HAVE_RANDOM_H
1572HAVE_RANDOM
4c62b19f 1573HAVE_QSORT_R
98399780
YQ
1574HAVE_PTSNAME_R
1575HAVE_PTSNAME
1576HAVE_POSIX_OPENPT
1577HAVE_MKSTEMPS
1578HAVE_MKSTEMP
1579HAVE_MKOSTEMPS
1580HAVE_MKOSTEMP
1581HAVE_MKDTEMP
1582HAVE_GRANTPT
1583HAVE_GETSUBOPT
1584HAVE_DECL_GETLOADAVG
1585HAVE_CANONICALIZE_FILE_NAME
1586HAVE_ATOLL
1587HAVE__EXIT
1588GNULIB_WCTOMB
1589GNULIB_UNSETENV
1590GNULIB_UNLOCKPT
1591GNULIB_SYSTEM_POSIX
1592GNULIB_STRTOULL
1593GNULIB_STRTOLL
1594GNULIB_STRTOD
1595GNULIB_SETENV
4a626d0a 1596GNULIB_SECURE_GETENV
98399780
YQ
1597GNULIB_RPMATCH
1598GNULIB_REALPATH
1599GNULIB_REALLOC_POSIX
1600GNULIB_RANDOM_R
1601GNULIB_RANDOM
4a626d0a 1602GNULIB_QSORT_R
98399780
YQ
1603GNULIB_PUTENV
1604GNULIB_PTSNAME_R
1605GNULIB_PTSNAME
1606GNULIB_POSIX_OPENPT
1607GNULIB_MKSTEMPS
1608GNULIB_MKSTEMP
1609GNULIB_MKOSTEMPS
1610GNULIB_MKOSTEMP
1611GNULIB_MKDTEMP
1612GNULIB_MBTOWC
1613GNULIB_MALLOC_POSIX
1614GNULIB_GRANTPT
1615GNULIB_GETSUBOPT
1616GNULIB_GETLOADAVG
1617GNULIB_CANONICALIZE_FILE_NAME
1618GNULIB_CALLOC_POSIX
1619GNULIB_ATOLL
1620GNULIB__EXIT
8690e634
JK
1621GL_GENERATE_ALLOCA_H_FALSE
1622GL_GENERATE_ALLOCA_H_TRUE
1623ALLOCA_H
1624ALLOCA
c971b7fa
PA
1625GL_COND_LIBTOOL_FALSE
1626GL_COND_LIBTOOL_TRUE
1627target_os
1628target_vendor
1629target_cpu
1630target
c971b7fa
PA
1631host_os
1632host_vendor
1633host_cpu
1634host
1635build_os
1636build_vendor
1637build_cpu
1638build
4a626d0a
PA
1639RANLIB
1640ARFLAGS
1641AR
1642EGREP
1643GREP
1644CPP
c971b7fa
PA
1645OBJEXT
1646EXEEXT
1647ac_ct_CC
1648CPPFLAGS
1649LDFLAGS
1650CFLAGS
1651CC
1652MAINT
1653MAINTAINER_MODE_FALSE
1654MAINTAINER_MODE_TRUE
1655target_alias
1656host_alias
1657build_alias
1658LIBS
1659ECHO_T
1660ECHO_N
1661ECHO_C
1662DEFS
1663mandir
1664localedir
1665libdir
1666psdir
1667pdfdir
1668dvidir
1669htmldir
1670infodir
1671docdir
1672oldincludedir
1673includedir
1674localstatedir
1675sharedstatedir
1676sysconfdir
1677datadir
1678datarootdir
1679libexecdir
1680sbindir
1681bindir
1682program_transform_name
1683prefix
1684exec_prefix
1685PACKAGE_URL
1686PACKAGE_BUGREPORT
1687PACKAGE_STRING
1688PACKAGE_VERSION
1689PACKAGE_TARNAME
1690PACKAGE_NAME
1691PATH_SEPARATOR
1692SHELL'
1693ac_subst_files=''
1694ac_user_opts='
1695enable_option_checking
1696enable_maintainer_mode
2196f55f 1697enable_largefile
c971b7fa 1698enable_dependency_tracking
39be3c7e 1699enable_silent_rules
c971b7fa
PA
1700'
1701 ac_precious_vars='build_alias
1702host_alias
1703target_alias
1704CC
1705CFLAGS
1706LDFLAGS
1707LIBS
1708CPPFLAGS
1709CPP'
1710
1711
1712# Initialize some variables set by options.
1713ac_init_help=
1714ac_init_version=false
1715ac_unrecognized_opts=
1716ac_unrecognized_sep=
1717# The variables have the same names as the options, with
1718# dashes changed to underlines.
1719cache_file=/dev/null
1720exec_prefix=NONE
1721no_create=
1722no_recursion=
1723prefix=NONE
1724program_prefix=NONE
1725program_suffix=NONE
1726program_transform_name=s,x,x,
1727silent=
1728site=
1729srcdir=
1730verbose=
1731x_includes=NONE
1732x_libraries=NONE
1733
1734# Installation directory options.
1735# These are left unexpanded so users can "make install exec_prefix=/foo"
1736# and all the variables that are supposed to be based on exec_prefix
1737# by default will actually change.
1738# Use braces instead of parens because sh, perl, etc. also accept them.
1739# (The list follows the same order as the GNU Coding Standards.)
1740bindir='${exec_prefix}/bin'
1741sbindir='${exec_prefix}/sbin'
1742libexecdir='${exec_prefix}/libexec'
1743datarootdir='${prefix}/share'
1744datadir='${datarootdir}'
1745sysconfdir='${prefix}/etc'
1746sharedstatedir='${prefix}/com'
1747localstatedir='${prefix}/var'
1748includedir='${prefix}/include'
1749oldincludedir='/usr/include'
1750docdir='${datarootdir}/doc/${PACKAGE}'
1751infodir='${datarootdir}/info'
1752htmldir='${docdir}'
1753dvidir='${docdir}'
1754pdfdir='${docdir}'
1755psdir='${docdir}'
1756libdir='${exec_prefix}/lib'
1757localedir='${datarootdir}/locale'
1758mandir='${datarootdir}/man'
1759
1760ac_prev=
1761ac_dashdash=
1762for ac_option
1763do
1764 # If the previous option needs an argument, assign it.
1765 if test -n "$ac_prev"; then
1766 eval $ac_prev=\$ac_option
1767 ac_prev=
1768 continue
1769 fi
1770
1771 case $ac_option in
1772 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1773 *) ac_optarg=yes ;;
1774 esac
1775
1776 # Accept the important Cygnus configure options, so we can diagnose typos.
1777
1778 case $ac_dashdash$ac_option in
1779 --)
1780 ac_dashdash=yes ;;
1781
1782 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1783 ac_prev=bindir ;;
1784 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1785 bindir=$ac_optarg ;;
1786
1787 -build | --build | --buil | --bui | --bu)
1788 ac_prev=build_alias ;;
1789 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1790 build_alias=$ac_optarg ;;
1791
1792 -cache-file | --cache-file | --cache-fil | --cache-fi \
1793 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1794 ac_prev=cache_file ;;
1795 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1796 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1797 cache_file=$ac_optarg ;;
1798
1799 --config-cache | -C)
1800 cache_file=config.cache ;;
1801
1802 -datadir | --datadir | --datadi | --datad)
1803 ac_prev=datadir ;;
1804 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1805 datadir=$ac_optarg ;;
1806
1807 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1808 | --dataroo | --dataro | --datar)
1809 ac_prev=datarootdir ;;
1810 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1811 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1812 datarootdir=$ac_optarg ;;
1813
1814 -disable-* | --disable-*)
1815 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1816 # Reject names that are not valid shell variable names.
1817 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1818 as_fn_error "invalid feature name: $ac_useropt"
1819 ac_useropt_orig=$ac_useropt
1820 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1821 case $ac_user_opts in
1822 *"
1823"enable_$ac_useropt"
1824"*) ;;
1825 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1826 ac_unrecognized_sep=', ';;
1827 esac
1828 eval enable_$ac_useropt=no ;;
1829
1830 -docdir | --docdir | --docdi | --doc | --do)
1831 ac_prev=docdir ;;
1832 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1833 docdir=$ac_optarg ;;
1834
1835 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1836 ac_prev=dvidir ;;
1837 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1838 dvidir=$ac_optarg ;;
1839
1840 -enable-* | --enable-*)
1841 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1842 # Reject names that are not valid shell variable names.
1843 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1844 as_fn_error "invalid feature name: $ac_useropt"
1845 ac_useropt_orig=$ac_useropt
1846 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1847 case $ac_user_opts in
1848 *"
1849"enable_$ac_useropt"
1850"*) ;;
1851 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1852 ac_unrecognized_sep=', ';;
1853 esac
1854 eval enable_$ac_useropt=\$ac_optarg ;;
1855
1856 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1857 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1858 | --exec | --exe | --ex)
1859 ac_prev=exec_prefix ;;
1860 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1861 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1862 | --exec=* | --exe=* | --ex=*)
1863 exec_prefix=$ac_optarg ;;
1864
1865 -gas | --gas | --ga | --g)
1866 # Obsolete; use --with-gas.
1867 with_gas=yes ;;
1868
1869 -help | --help | --hel | --he | -h)
1870 ac_init_help=long ;;
1871 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1872 ac_init_help=recursive ;;
1873 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1874 ac_init_help=short ;;
1875
1876 -host | --host | --hos | --ho)
1877 ac_prev=host_alias ;;
1878 -host=* | --host=* | --hos=* | --ho=*)
1879 host_alias=$ac_optarg ;;
1880
1881 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1882 ac_prev=htmldir ;;
1883 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1884 | --ht=*)
1885 htmldir=$ac_optarg ;;
1886
1887 -includedir | --includedir | --includedi | --included | --include \
1888 | --includ | --inclu | --incl | --inc)
1889 ac_prev=includedir ;;
1890 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1891 | --includ=* | --inclu=* | --incl=* | --inc=*)
1892 includedir=$ac_optarg ;;
1893
1894 -infodir | --infodir | --infodi | --infod | --info | --inf)
1895 ac_prev=infodir ;;
1896 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1897 infodir=$ac_optarg ;;
1898
1899 -libdir | --libdir | --libdi | --libd)
1900 ac_prev=libdir ;;
1901 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1902 libdir=$ac_optarg ;;
1903
1904 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1905 | --libexe | --libex | --libe)
1906 ac_prev=libexecdir ;;
1907 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1908 | --libexe=* | --libex=* | --libe=*)
1909 libexecdir=$ac_optarg ;;
1910
1911 -localedir | --localedir | --localedi | --localed | --locale)
1912 ac_prev=localedir ;;
1913 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1914 localedir=$ac_optarg ;;
1915
1916 -localstatedir | --localstatedir | --localstatedi | --localstated \
1917 | --localstate | --localstat | --localsta | --localst | --locals)
1918 ac_prev=localstatedir ;;
1919 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1920 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1921 localstatedir=$ac_optarg ;;
1922
1923 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1924 ac_prev=mandir ;;
1925 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1926 mandir=$ac_optarg ;;
1927
1928 -nfp | --nfp | --nf)
1929 # Obsolete; use --without-fp.
1930 with_fp=no ;;
1931
1932 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1933 | --no-cr | --no-c | -n)
1934 no_create=yes ;;
1935
1936 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1937 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1938 no_recursion=yes ;;
1939
1940 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1941 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1942 | --oldin | --oldi | --old | --ol | --o)
1943 ac_prev=oldincludedir ;;
1944 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1945 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1946 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1947 oldincludedir=$ac_optarg ;;
1948
1949 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1950 ac_prev=prefix ;;
1951 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1952 prefix=$ac_optarg ;;
1953
1954 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1955 | --program-pre | --program-pr | --program-p)
1956 ac_prev=program_prefix ;;
1957 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1958 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1959 program_prefix=$ac_optarg ;;
1960
1961 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1962 | --program-suf | --program-su | --program-s)
1963 ac_prev=program_suffix ;;
1964 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1965 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1966 program_suffix=$ac_optarg ;;
1967
1968 -program-transform-name | --program-transform-name \
1969 | --program-transform-nam | --program-transform-na \
1970 | --program-transform-n | --program-transform- \
1971 | --program-transform | --program-transfor \
1972 | --program-transfo | --program-transf \
1973 | --program-trans | --program-tran \
1974 | --progr-tra | --program-tr | --program-t)
1975 ac_prev=program_transform_name ;;
1976 -program-transform-name=* | --program-transform-name=* \
1977 | --program-transform-nam=* | --program-transform-na=* \
1978 | --program-transform-n=* | --program-transform-=* \
1979 | --program-transform=* | --program-transfor=* \
1980 | --program-transfo=* | --program-transf=* \
1981 | --program-trans=* | --program-tran=* \
1982 | --progr-tra=* | --program-tr=* | --program-t=*)
1983 program_transform_name=$ac_optarg ;;
1984
1985 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1986 ac_prev=pdfdir ;;
1987 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1988 pdfdir=$ac_optarg ;;
1989
1990 -psdir | --psdir | --psdi | --psd | --ps)
1991 ac_prev=psdir ;;
1992 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1993 psdir=$ac_optarg ;;
1994
1995 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1996 | -silent | --silent | --silen | --sile | --sil)
1997 silent=yes ;;
1998
1999 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2000 ac_prev=sbindir ;;
2001 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2002 | --sbi=* | --sb=*)
2003 sbindir=$ac_optarg ;;
2004
2005 -sharedstatedir | --sharedstatedir | --sharedstatedi \
2006 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2007 | --sharedst | --shareds | --shared | --share | --shar \
2008 | --sha | --sh)
2009 ac_prev=sharedstatedir ;;
2010 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2011 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2012 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2013 | --sha=* | --sh=*)
2014 sharedstatedir=$ac_optarg ;;
2015
2016 -site | --site | --sit)
2017 ac_prev=site ;;
2018 -site=* | --site=* | --sit=*)
2019 site=$ac_optarg ;;
2020
2021 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2022 ac_prev=srcdir ;;
2023 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2024 srcdir=$ac_optarg ;;
2025
2026 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2027 | --syscon | --sysco | --sysc | --sys | --sy)
2028 ac_prev=sysconfdir ;;
2029 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2030 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2031 sysconfdir=$ac_optarg ;;
2032
2033 -target | --target | --targe | --targ | --tar | --ta | --t)
2034 ac_prev=target_alias ;;
2035 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2036 target_alias=$ac_optarg ;;
2037
2038 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2039 verbose=yes ;;
2040
2041 -version | --version | --versio | --versi | --vers | -V)
2042 ac_init_version=: ;;
2043
2044 -with-* | --with-*)
2045 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2046 # Reject names that are not valid shell variable names.
2047 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2048 as_fn_error "invalid package name: $ac_useropt"
2049 ac_useropt_orig=$ac_useropt
2050 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2051 case $ac_user_opts in
2052 *"
2053"with_$ac_useropt"
2054"*) ;;
2055 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2056 ac_unrecognized_sep=', ';;
2057 esac
2058 eval with_$ac_useropt=\$ac_optarg ;;
2059
2060 -without-* | --without-*)
2061 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2062 # Reject names that are not valid shell variable names.
2063 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2064 as_fn_error "invalid package name: $ac_useropt"
2065 ac_useropt_orig=$ac_useropt
2066 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2067 case $ac_user_opts in
2068 *"
2069"with_$ac_useropt"
2070"*) ;;
2071 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2072 ac_unrecognized_sep=', ';;
2073 esac
2074 eval with_$ac_useropt=no ;;
2075
2076 --x)
2077 # Obsolete; use --with-x.
2078 with_x=yes ;;
2079
2080 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2081 | --x-incl | --x-inc | --x-in | --x-i)
2082 ac_prev=x_includes ;;
2083 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2084 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2085 x_includes=$ac_optarg ;;
2086
2087 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2088 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2089 ac_prev=x_libraries ;;
2090 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2091 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2092 x_libraries=$ac_optarg ;;
2093
2094 -*) as_fn_error "unrecognized option: \`$ac_option'
2095Try \`$0 --help' for more information."
2096 ;;
2097
2098 *=*)
2099 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2100 # Reject names that are not valid shell variable names.
2101 case $ac_envvar in #(
2102 '' | [0-9]* | *[!_$as_cr_alnum]* )
2103 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
2104 esac
2105 eval $ac_envvar=\$ac_optarg
2106 export $ac_envvar ;;
2107
2108 *)
2109 # FIXME: should be removed in autoconf 3.0.
2110 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2111 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2112 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
2113 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
2114 ;;
2115
2116 esac
2117done
2118
2119if test -n "$ac_prev"; then
2120 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2121 as_fn_error "missing argument to $ac_option"
2122fi
2123
2124if test -n "$ac_unrecognized_opts"; then
2125 case $enable_option_checking in
2126 no) ;;
2127 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
2128 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2129 esac
2130fi
2131
2132# Check all directory arguments for consistency.
2133for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2134 datadir sysconfdir sharedstatedir localstatedir includedir \
2135 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2136 libdir localedir mandir
2137do
2138 eval ac_val=\$$ac_var
2139 # Remove trailing slashes.
2140 case $ac_val in
2141 */ )
2142 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2143 eval $ac_var=\$ac_val;;
2144 esac
2145 # Be sure to have absolute directory names.
2146 case $ac_val in
2147 [\\/$]* | ?:[\\/]* ) continue;;
2148 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2149 esac
2150 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
2151done
2152
2153# There might be people who depend on the old broken behavior: `$host'
2154# used to hold the argument of --host etc.
2155# FIXME: To remove some day.
2156build=$build_alias
2157host=$host_alias
2158target=$target_alias
2159
2160# FIXME: To remove some day.
2161if test "x$host_alias" != x; then
2162 if test "x$build_alias" = x; then
2163 cross_compiling=maybe
2164 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
2165 If a cross compiler is detected then cross compile mode will be used." >&2
2166 elif test "x$build_alias" != "x$host_alias"; then
2167 cross_compiling=yes
2168 fi
2169fi
2170
2171ac_tool_prefix=
2172test -n "$host_alias" && ac_tool_prefix=$host_alias-
2173
2174test "$silent" = yes && exec 6>/dev/null
2175
2176
2177ac_pwd=`pwd` && test -n "$ac_pwd" &&
2178ac_ls_di=`ls -di .` &&
2179ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2180 as_fn_error "working directory cannot be determined"
2181test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2182 as_fn_error "pwd does not report name of working directory"
2183
2184
2185# Find the source files, if location was not specified.
2186if test -z "$srcdir"; then
2187 ac_srcdir_defaulted=yes
2188 # Try the directory containing this script, then the parent directory.
2189 ac_confdir=`$as_dirname -- "$as_myself" ||
2190$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2191 X"$as_myself" : 'X\(//\)[^/]' \| \
2192 X"$as_myself" : 'X\(//\)$' \| \
2193 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2194$as_echo X"$as_myself" |
2195 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2196 s//\1/
2197 q
2198 }
2199 /^X\(\/\/\)[^/].*/{
2200 s//\1/
2201 q
2202 }
2203 /^X\(\/\/\)$/{
2204 s//\1/
2205 q
2206 }
2207 /^X\(\/\).*/{
2208 s//\1/
2209 q
2210 }
2211 s/.*/./; q'`
2212 srcdir=$ac_confdir
2213 if test ! -r "$srcdir/$ac_unique_file"; then
2214 srcdir=..
2215 fi
2216else
2217 ac_srcdir_defaulted=no
2218fi
2219if test ! -r "$srcdir/$ac_unique_file"; then
2220 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2221 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
2222fi
2223ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2224ac_abs_confdir=`(
2225 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
2226 pwd)`
2227# When building in place, set srcdir=.
2228if test "$ac_abs_confdir" = "$ac_pwd"; then
2229 srcdir=.
2230fi
2231# Remove unnecessary trailing slashes from srcdir.
2232# Double slashes in file names in object file debugging info
2233# mess up M-x gdb in Emacs.
2234case $srcdir in
2235*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2236esac
2237for ac_var in $ac_precious_vars; do
2238 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2239 eval ac_env_${ac_var}_value=\$${ac_var}
2240 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2241 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2242done
2243
2244#
2245# Report the --help message.
2246#
2247if test "$ac_init_help" = "long"; then
2248 # Omit some internal or obsolete options to make the list less imposing.
2249 # This message is too long to be a string in the A/UX 3.1 sh.
2250 cat <<_ACEOF
2251\`configure' configures this package to adapt to many kinds of systems.
2252
2253Usage: $0 [OPTION]... [VAR=VALUE]...
2254
2255To assign environment variables (e.g., CC, CFLAGS...), specify them as
2256VAR=VALUE. See below for descriptions of some of the useful variables.
2257
2258Defaults for the options are specified in brackets.
2259
2260Configuration:
2261 -h, --help display this help and exit
2262 --help=short display options specific to this package
2263 --help=recursive display the short help of all the included packages
2264 -V, --version display version information and exit
2265 -q, --quiet, --silent do not print \`checking...' messages
2266 --cache-file=FILE cache test results in FILE [disabled]
2267 -C, --config-cache alias for \`--cache-file=config.cache'
2268 -n, --no-create do not create output files
2269 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2270
2271Installation directories:
2272 --prefix=PREFIX install architecture-independent files in PREFIX
2273 [$ac_default_prefix]
2274 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2275 [PREFIX]
2276
2277By default, \`make install' will install all the files in
2278\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2279an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2280for instance \`--prefix=\$HOME'.
2281
2282For better control, use the options below.
2283
2284Fine tuning of the installation directories:
2285 --bindir=DIR user executables [EPREFIX/bin]
2286 --sbindir=DIR system admin executables [EPREFIX/sbin]
2287 --libexecdir=DIR program executables [EPREFIX/libexec]
2288 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2289 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2290 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2291 --libdir=DIR object code libraries [EPREFIX/lib]
2292 --includedir=DIR C header files [PREFIX/include]
2293 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2294 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2295 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2296 --infodir=DIR info documentation [DATAROOTDIR/info]
2297 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2298 --mandir=DIR man documentation [DATAROOTDIR/man]
2299 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
2300 --htmldir=DIR html documentation [DOCDIR]
2301 --dvidir=DIR dvi documentation [DOCDIR]
2302 --pdfdir=DIR pdf documentation [DOCDIR]
2303 --psdir=DIR ps documentation [DOCDIR]
2304_ACEOF
2305
2306 cat <<\_ACEOF
2307
2308Program names:
2309 --program-prefix=PREFIX prepend PREFIX to installed program names
2310 --program-suffix=SUFFIX append SUFFIX to installed program names
2311 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2312
2313System types:
2314 --build=BUILD configure for building on BUILD [guessed]
2315 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2316 --target=TARGET configure for building compilers for TARGET [HOST]
2317_ACEOF
2318fi
2319
2320if test -n "$ac_init_help"; then
2321
2322 cat <<\_ACEOF
2323
2324Optional Features:
2325 --disable-option-checking ignore unrecognized --enable/--with options
2326 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2327 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2328 --enable-maintainer-mode enable make rules and dependencies not useful
2329 (and sometimes confusing) to the casual installer
2196f55f 2330 --disable-largefile omit support for large files
c971b7fa
PA
2331 --disable-dependency-tracking speeds up one-time build
2332 --enable-dependency-tracking do not reject slow dependency extractors
39be3c7e
SM
2333 --enable-silent-rules less verbose build output (undo: `make V=1')
2334 --disable-silent-rules verbose build output (undo: `make V=0')
c971b7fa
PA
2335
2336Some influential environment variables:
2337 CC C compiler command
2338 CFLAGS C compiler flags
2339 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2340 nonstandard directory <lib dir>
2341 LIBS libraries to pass to the linker, e.g. -l<library>
2342 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
2343 you have headers in a nonstandard directory <include dir>
2344 CPP C preprocessor
2345
2346Use these variables to override the choices made by `configure' or to help
2347it to find libraries and programs with nonstandard names/locations.
2348
2349Report bugs to the package provider.
2350_ACEOF
2351ac_status=$?
2352fi
2353
2354if test "$ac_init_help" = "recursive"; then
2355 # If there are subdirs, report their specific --help.
2356 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2357 test -d "$ac_dir" ||
2358 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2359 continue
2360 ac_builddir=.
2361
2362case "$ac_dir" in
2363.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2364*)
2365 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2366 # A ".." for each directory in $ac_dir_suffix.
2367 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2368 case $ac_top_builddir_sub in
2369 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2370 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2371 esac ;;
2372esac
2373ac_abs_top_builddir=$ac_pwd
2374ac_abs_builddir=$ac_pwd$ac_dir_suffix
2375# for backward compatibility:
2376ac_top_builddir=$ac_top_build_prefix
2377
2378case $srcdir in
2379 .) # We are building in place.
2380 ac_srcdir=.
2381 ac_top_srcdir=$ac_top_builddir_sub
2382 ac_abs_top_srcdir=$ac_pwd ;;
2383 [\\/]* | ?:[\\/]* ) # Absolute name.
2384 ac_srcdir=$srcdir$ac_dir_suffix;
2385 ac_top_srcdir=$srcdir
2386 ac_abs_top_srcdir=$srcdir ;;
2387 *) # Relative name.
2388 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2389 ac_top_srcdir=$ac_top_build_prefix$srcdir
2390 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2391esac
2392ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2393
2394 cd "$ac_dir" || { ac_status=$?; continue; }
2395 # Check for guested configure.
2396 if test -f "$ac_srcdir/configure.gnu"; then
2397 echo &&
2398 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2399 elif test -f "$ac_srcdir/configure"; then
2400 echo &&
2401 $SHELL "$ac_srcdir/configure" --help=recursive
2402 else
2403 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2404 fi || ac_status=$?
2405 cd "$ac_pwd" || { ac_status=$?; break; }
2406 done
2407fi
2408
2409test -n "$ac_init_help" && exit $ac_status
2410if $ac_init_version; then
2411 cat <<\_ACEOF
2412configure
2413generated by GNU Autoconf 2.64
2414
2415Copyright (C) 2009 Free Software Foundation, Inc.
2416This configure script is free software; the Free Software Foundation
2417gives unlimited permission to copy, distribute and modify it.
2418_ACEOF
2419 exit
2420fi
2421
2422## ------------------------ ##
2423## Autoconf initialization. ##
2424## ------------------------ ##
2425
2426# ac_fn_c_try_compile LINENO
2427# --------------------------
2428# Try to compile conftest.$ac_ext, and return whether this succeeded.
2429ac_fn_c_try_compile ()
2430{
2431 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2432 rm -f conftest.$ac_objext
2433 if { { ac_try="$ac_compile"
2434case "(($ac_try" in
2435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2436 *) ac_try_echo=$ac_try;;
2437esac
2438eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2439$as_echo "$ac_try_echo"; } >&5
2440 (eval "$ac_compile") 2>conftest.err
2441 ac_status=$?
2442 if test -s conftest.err; then
2443 grep -v '^ *+' conftest.err >conftest.er1
2444 cat conftest.er1 >&5
2445 mv -f conftest.er1 conftest.err
2446 fi
2447 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2448 test $ac_status = 0; } && {
2449 test -z "$ac_c_werror_flag" ||
2450 test ! -s conftest.err
2451 } && test -s conftest.$ac_objext; then :
2452 ac_retval=0
2453else
2454 $as_echo "$as_me: failed program was:" >&5
2455sed 's/^/| /' conftest.$ac_ext >&5
2456
2457 ac_retval=1
2458fi
2459 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2460 return $ac_retval
2461
2462} # ac_fn_c_try_compile
2463
2464# ac_fn_c_try_cpp LINENO
2465# ----------------------
2466# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2467ac_fn_c_try_cpp ()
2468{
2469 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2470 if { { ac_try="$ac_cpp conftest.$ac_ext"
2471case "(($ac_try" in
2472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2473 *) ac_try_echo=$ac_try;;
2474esac
2475eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2476$as_echo "$ac_try_echo"; } >&5
2477 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2478 ac_status=$?
2479 if test -s conftest.err; then
2480 grep -v '^ *+' conftest.err >conftest.er1
2481 cat conftest.er1 >&5
2482 mv -f conftest.er1 conftest.err
2483 fi
2484 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2485 test $ac_status = 0; } >/dev/null && {
2486 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2487 test ! -s conftest.err
2488 }; then :
2489 ac_retval=0
2490else
2491 $as_echo "$as_me: failed program was:" >&5
2492sed 's/^/| /' conftest.$ac_ext >&5
2493
2494 ac_retval=1
2495fi
2496 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2497 return $ac_retval
2498
2499} # ac_fn_c_try_cpp
2500
2501# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2502# -------------------------------------------------------
2503# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2504# the include files in INCLUDES and setting the cache variable VAR
2505# accordingly.
2506ac_fn_c_check_header_mongrel ()
2507{
2508 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2509 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2511$as_echo_n "checking for $2... " >&6; }
2512if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2513 $as_echo_n "(cached) " >&6
2514fi
2515eval ac_res=\$$3
2516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2517$as_echo "$ac_res" >&6; }
2518else
2519 # Is the header compilable?
2520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2521$as_echo_n "checking $2 usability... " >&6; }
2522cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2523/* end confdefs.h. */
2524$4
2525#include <$2>
2526_ACEOF
2527if ac_fn_c_try_compile "$LINENO"; then :
2528 ac_header_compiler=yes
2529else
2530 ac_header_compiler=no
2531fi
2532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2534$as_echo "$ac_header_compiler" >&6; }
2535
2536# Is the header present?
2537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2538$as_echo_n "checking $2 presence... " >&6; }
2539cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2540/* end confdefs.h. */
2541#include <$2>
2542_ACEOF
2543if ac_fn_c_try_cpp "$LINENO"; then :
2544 ac_header_preproc=yes
2545else
2546 ac_header_preproc=no
2547fi
2548rm -f conftest.err conftest.$ac_ext
2549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2550$as_echo "$ac_header_preproc" >&6; }
2551
2552# So? What about this header?
2553case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2554 yes:no: )
2555 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2556$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2557 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2558$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2559 ;;
2560 no:yes:* )
2561 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2562$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2563 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2564$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2565 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2566$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2567 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2568$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2569 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2570$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2571 ;;
2572esac
2573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2574$as_echo_n "checking for $2... " >&6; }
2575if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2576 $as_echo_n "(cached) " >&6
2577else
2578 eval "$3=\$ac_header_compiler"
2579fi
2580eval ac_res=\$$3
2581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2582$as_echo "$ac_res" >&6; }
2583fi
2584 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2585
2586} # ac_fn_c_check_header_mongrel
2587
2588# ac_fn_c_try_run LINENO
2589# ----------------------
2590# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2591# that executables *can* be run.
2592ac_fn_c_try_run ()
2593{
2594 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2595 if { { ac_try="$ac_link"
2596case "(($ac_try" in
2597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2598 *) ac_try_echo=$ac_try;;
2599esac
2600eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2601$as_echo "$ac_try_echo"; } >&5
2602 (eval "$ac_link") 2>&5
2603 ac_status=$?
2604 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2605 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2606 { { case "(($ac_try" in
2607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2608 *) ac_try_echo=$ac_try;;
2609esac
2610eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2611$as_echo "$ac_try_echo"; } >&5
2612 (eval "$ac_try") 2>&5
2613 ac_status=$?
2614 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2615 test $ac_status = 0; }; }; then :
2616 ac_retval=0
2617else
2618 $as_echo "$as_me: program exited with status $ac_status" >&5
2619 $as_echo "$as_me: failed program was:" >&5
2620sed 's/^/| /' conftest.$ac_ext >&5
2621
2622 ac_retval=$ac_status
2623fi
2624 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2625 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2626 return $ac_retval
2627
2628} # ac_fn_c_try_run
2629
2630# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2631# -------------------------------------------------------
2632# Tests whether HEADER exists and can be compiled using the include files in
2633# INCLUDES, setting the cache variable VAR accordingly.
2634ac_fn_c_check_header_compile ()
2635{
2636 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2638$as_echo_n "checking for $2... " >&6; }
2639if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2640 $as_echo_n "(cached) " >&6
2641else
2642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2643/* end confdefs.h. */
2644$4
2645#include <$2>
2646_ACEOF
2647if ac_fn_c_try_compile "$LINENO"; then :
2648 eval "$3=yes"
2649else
2650 eval "$3=no"
2651fi
2652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2653fi
2654eval ac_res=\$$3
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2656$as_echo "$ac_res" >&6; }
2657 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2658
2659} # ac_fn_c_check_header_compile
2660
2661# ac_fn_c_try_link LINENO
2662# -----------------------
2663# Try to link conftest.$ac_ext, and return whether this succeeded.
2664ac_fn_c_try_link ()
2665{
2666 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2667 rm -f conftest.$ac_objext conftest$ac_exeext
2668 if { { ac_try="$ac_link"
2669case "(($ac_try" in
2670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2671 *) ac_try_echo=$ac_try;;
2672esac
2673eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2674$as_echo "$ac_try_echo"; } >&5
2675 (eval "$ac_link") 2>conftest.err
2676 ac_status=$?
2677 if test -s conftest.err; then
2678 grep -v '^ *+' conftest.err >conftest.er1
2679 cat conftest.er1 >&5
2680 mv -f conftest.er1 conftest.err
2681 fi
2682 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2683 test $ac_status = 0; } && {
2684 test -z "$ac_c_werror_flag" ||
2685 test ! -s conftest.err
2686 } && test -s conftest$ac_exeext && {
2687 test "$cross_compiling" = yes ||
2688 $as_test_x conftest$ac_exeext
2689 }; then :
2690 ac_retval=0
2691else
2692 $as_echo "$as_me: failed program was:" >&5
2693sed 's/^/| /' conftest.$ac_ext >&5
2694
2695 ac_retval=1
2696fi
2697 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2698 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2699 # interfere with the next link command; also delete a directory that is
2700 # left behind by Apple's compiler. We do this before executing the actions.
2701 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2702 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2703 return $ac_retval
2704
2705} # ac_fn_c_try_link
2706
8690e634
JK
2707# ac_fn_c_check_func LINENO FUNC VAR
2708# ----------------------------------
2709# Tests whether FUNC exists, setting the cache variable VAR accordingly
2710ac_fn_c_check_func ()
2711{
2712 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2714$as_echo_n "checking for $2... " >&6; }
2715if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2716 $as_echo_n "(cached) " >&6
2717else
2718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2719/* end confdefs.h. */
2720/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2721 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2722#define $2 innocuous_$2
2723
2724/* System header to define __stub macros and hopefully few prototypes,
2725 which can conflict with char $2 (); below.
2726 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2727 <limits.h> exists even on freestanding compilers. */
2728
2729#ifdef __STDC__
2730# include <limits.h>
2731#else
2732# include <assert.h>
2733#endif
2734
2735#undef $2
2736
2737/* Override any GCC internal prototype to avoid an error.
2738 Use char because int might match the return type of a GCC
2739 builtin and then its argument prototype would still apply. */
2740#ifdef __cplusplus
2741extern "C"
2742#endif
2743char $2 ();
2744/* The GNU C library defines this for functions which it implements
2745 to always fail with ENOSYS. Some functions are actually named
2746 something starting with __ and the normal name is an alias. */
2747#if defined __stub_$2 || defined __stub___$2
2748choke me
2749#endif
2750
2751int
2752main ()
2753{
2754return $2 ();
2755 ;
2756 return 0;
2757}
2758_ACEOF
2759if ac_fn_c_try_link "$LINENO"; then :
2760 eval "$3=yes"
2761else
2762 eval "$3=no"
2763fi
2764rm -f core conftest.err conftest.$ac_objext \
2765 conftest$ac_exeext conftest.$ac_ext
2766fi
2767eval ac_res=\$$3
2768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2769$as_echo "$ac_res" >&6; }
2770 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2771
2772} # ac_fn_c_check_func
2773
8986e351
TT
2774# ac_fn_c_check_decl LINENO SYMBOL VAR
2775# ------------------------------------
2776# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2777ac_fn_c_check_decl ()
2778{
2779 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2781$as_echo_n "checking whether $2 is declared... " >&6; }
2782if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2783 $as_echo_n "(cached) " >&6
2784else
2785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2786/* end confdefs.h. */
2787$4
2788int
2789main ()
2790{
2791#ifndef $2
2792 (void) $2;
2793#endif
2794
2795 ;
2796 return 0;
2797}
2798_ACEOF
2799if ac_fn_c_try_compile "$LINENO"; then :
2800 eval "$3=yes"
2801else
2802 eval "$3=no"
2803fi
2804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2805fi
2806eval ac_res=\$$3
2807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2808$as_echo "$ac_res" >&6; }
2809 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2810
2811} # ac_fn_c_check_decl
2812
c971b7fa
PA
2813# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2814# --------------------------------------------
2815# Tries to find the compile-time value of EXPR in a program that includes
2816# INCLUDES, setting VAR accordingly. Returns whether the value could be
2817# computed
2818ac_fn_c_compute_int ()
2819{
2820 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2821 if test "$cross_compiling" = yes; then
2822 # Depending upon the size, compute the lo and hi bounds.
2823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2824/* end confdefs.h. */
2825$4
2826int
2827main ()
2828{
2829static int test_array [1 - 2 * !(($2) >= 0)];
2830test_array [0] = 0
2831
2832 ;
2833 return 0;
2834}
2835_ACEOF
2836if ac_fn_c_try_compile "$LINENO"; then :
2837 ac_lo=0 ac_mid=0
2838 while :; do
2839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2840/* end confdefs.h. */
2841$4
2842int
2843main ()
2844{
2845static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2846test_array [0] = 0
2847
2848 ;
2849 return 0;
2850}
2851_ACEOF
2852if ac_fn_c_try_compile "$LINENO"; then :
2853 ac_hi=$ac_mid; break
2854else
2855 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2856 if test $ac_lo -le $ac_mid; then
2857 ac_lo= ac_hi=
2858 break
2859 fi
2860 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2861fi
2862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2863 done
2864else
2865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2866/* end confdefs.h. */
2867$4
2868int
2869main ()
2870{
2871static int test_array [1 - 2 * !(($2) < 0)];
2872test_array [0] = 0
2873
2874 ;
2875 return 0;
2876}
2877_ACEOF
2878if ac_fn_c_try_compile "$LINENO"; then :
2879 ac_hi=-1 ac_mid=-1
2880 while :; do
2881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2882/* end confdefs.h. */
2883$4
2884int
2885main ()
2886{
2887static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2888test_array [0] = 0
2889
2890 ;
2891 return 0;
2892}
2893_ACEOF
2894if ac_fn_c_try_compile "$LINENO"; then :
2895 ac_lo=$ac_mid; break
2896else
2897 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2898 if test $ac_mid -le $ac_hi; then
2899 ac_lo= ac_hi=
2900 break
2901 fi
2902 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2903fi
2904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2905 done
2906else
2907 ac_lo= ac_hi=
2908fi
2909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2910fi
2911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2912# Binary search between lo and hi bounds.
2913while test "x$ac_lo" != "x$ac_hi"; do
2914 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2916/* end confdefs.h. */
2917$4
2918int
2919main ()
2920{
2921static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2922test_array [0] = 0
2923
2924 ;
2925 return 0;
2926}
2927_ACEOF
2928if ac_fn_c_try_compile "$LINENO"; then :
2929 ac_hi=$ac_mid
2930else
2931 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2932fi
2933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2934done
2935case $ac_lo in #((
2936?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2937'') ac_retval=1 ;;
2938esac
2939 else
2940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2941/* end confdefs.h. */
2942$4
2943static long int longval () { return $2; }
2944static unsigned long int ulongval () { return $2; }
2945#include <stdio.h>
2946#include <stdlib.h>
2947int
2948main ()
2949{
2950
2951 FILE *f = fopen ("conftest.val", "w");
2952 if (! f)
2953 return 1;
2954 if (($2) < 0)
2955 {
2956 long int i = longval ();
2957 if (i != ($2))
2958 return 1;
2959 fprintf (f, "%ld", i);
2960 }
2961 else
2962 {
2963 unsigned long int i = ulongval ();
2964 if (i != ($2))
2965 return 1;
2966 fprintf (f, "%lu", i);
2967 }
2968 /* Do not output a trailing newline, as this causes \r\n confusion
2969 on some platforms. */
2970 return ferror (f) || fclose (f) != 0;
2971
2972 ;
2973 return 0;
2974}
2975_ACEOF
2976if ac_fn_c_try_run "$LINENO"; then :
2977 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2978else
2979 ac_retval=1
2980fi
2981rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2982 conftest.$ac_objext conftest.beam conftest.$ac_ext
2983rm -f conftest.val
2984
2985 fi
2986 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2987 return $ac_retval
2988
2989} # ac_fn_c_compute_int
2990
8690e634
JK
2991# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2992# -------------------------------------------
2993# Tests whether TYPE exists after having included INCLUDES, setting cache
2994# variable VAR accordingly.
2995ac_fn_c_check_type ()
c971b7fa
PA
2996{
2997 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2999$as_echo_n "checking for $2... " >&6; }
3000if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
3001 $as_echo_n "(cached) " >&6
3002else
8690e634 3003 eval "$3=no"
c971b7fa
PA
3004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3005/* end confdefs.h. */
8690e634 3006$4
c971b7fa
PA
3007int
3008main ()
3009{
8690e634
JK
3010if (sizeof ($2))
3011 return 0;
c971b7fa
PA
3012 ;
3013 return 0;
3014}
3015_ACEOF
8690e634 3016if ac_fn_c_try_compile "$LINENO"; then :
c971b7fa
PA
3017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3018/* end confdefs.h. */
3019$4
3020int
3021main ()
3022{
8690e634
JK
3023if (sizeof (($2)))
3024 return 0;
c971b7fa
PA
3025 ;
3026 return 0;
3027}
3028_ACEOF
3029if ac_fn_c_try_compile "$LINENO"; then :
8690e634 3030
c971b7fa 3031else
8690e634
JK
3032 eval "$3=yes"
3033fi
3034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa
PA
3035fi
3036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3037fi
3038eval ac_res=\$$3
3039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3040$as_echo "$ac_res" >&6; }
3041 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
3042
8690e634 3043} # ac_fn_c_check_type
c971b7fa
PA
3044cat >config.log <<_ACEOF
3045This file contains any messages produced by compilers while
3046running configure, to aid debugging if configure makes a mistake.
3047
3048It was created by $as_me, which was
3049generated by GNU Autoconf 2.64. Invocation command line was
3050
3051 $ $0 $@
3052
3053_ACEOF
3054exec 5>>config.log
3055{
3056cat <<_ASUNAME
3057## --------- ##
3058## Platform. ##
3059## --------- ##
3060
3061hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3062uname -m = `(uname -m) 2>/dev/null || echo unknown`
3063uname -r = `(uname -r) 2>/dev/null || echo unknown`
3064uname -s = `(uname -s) 2>/dev/null || echo unknown`
3065uname -v = `(uname -v) 2>/dev/null || echo unknown`
3066
3067/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3068/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3069
3070/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3071/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3072/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3073/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3074/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3075/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3076/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3077
3078_ASUNAME
3079
3080as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3081for as_dir in $PATH
3082do
3083 IFS=$as_save_IFS
3084 test -z "$as_dir" && as_dir=.
3085 $as_echo "PATH: $as_dir"
3086 done
3087IFS=$as_save_IFS
3088
3089} >&5
3090
3091cat >&5 <<_ACEOF
3092
3093
3094## ----------- ##
3095## Core tests. ##
3096## ----------- ##
3097
3098_ACEOF
3099
3100
3101# Keep a trace of the command line.
3102# Strip out --no-create and --no-recursion so they do not pile up.
3103# Strip out --silent because we don't want to record it for future runs.
3104# Also quote any args containing shell meta-characters.
3105# Make two passes to allow for proper duplicate-argument suppression.
3106ac_configure_args=
3107ac_configure_args0=
3108ac_configure_args1=
3109ac_must_keep_next=false
3110for ac_pass in 1 2
3111do
3112 for ac_arg
3113 do
3114 case $ac_arg in
3115 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3116 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3117 | -silent | --silent | --silen | --sile | --sil)
3118 continue ;;
3119 *\'*)
3120 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3121 esac
3122 case $ac_pass in
3123 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3124 2)
3125 as_fn_append ac_configure_args1 " '$ac_arg'"
3126 if test $ac_must_keep_next = true; then
3127 ac_must_keep_next=false # Got value, back to normal.
3128 else
3129 case $ac_arg in
3130 *=* | --config-cache | -C | -disable-* | --disable-* \
3131 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3132 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3133 | -with-* | --with-* | -without-* | --without-* | --x)
3134 case "$ac_configure_args0 " in
3135 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3136 esac
3137 ;;
3138 -* ) ac_must_keep_next=true ;;
3139 esac
3140 fi
3141 as_fn_append ac_configure_args " '$ac_arg'"
3142 ;;
3143 esac
3144 done
3145done
3146{ ac_configure_args0=; unset ac_configure_args0;}
3147{ ac_configure_args1=; unset ac_configure_args1;}
3148
3149# When interrupted or exit'd, cleanup temporary files, and complete
3150# config.log. We remove comments because anyway the quotes in there
3151# would cause problems or look ugly.
3152# WARNING: Use '\'' to represent an apostrophe within the trap.
3153# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3154trap 'exit_status=$?
3155 # Save into config.log some information that might help in debugging.
3156 {
3157 echo
3158
3159 cat <<\_ASBOX
3160## ---------------- ##
3161## Cache variables. ##
3162## ---------------- ##
3163_ASBOX
3164 echo
3165 # The following way of writing the cache mishandles newlines in values,
3166(
3167 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3168 eval ac_val=\$$ac_var
3169 case $ac_val in #(
3170 *${as_nl}*)
3171 case $ac_var in #(
3172 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3173$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3174 esac
3175 case $ac_var in #(
3176 _ | IFS | as_nl) ;; #(
3177 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3178 *) { eval $ac_var=; unset $ac_var;} ;;
3179 esac ;;
3180 esac
3181 done
3182 (set) 2>&1 |
3183 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3184 *${as_nl}ac_space=\ *)
3185 sed -n \
3186 "s/'\''/'\''\\\\'\'''\''/g;
3187 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3188 ;; #(
3189 *)
3190 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3191 ;;
3192 esac |
3193 sort
3194)
3195 echo
3196
3197 cat <<\_ASBOX
3198## ----------------- ##
3199## Output variables. ##
3200## ----------------- ##
3201_ASBOX
3202 echo
3203 for ac_var in $ac_subst_vars
3204 do
3205 eval ac_val=\$$ac_var
3206 case $ac_val in
3207 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3208 esac
3209 $as_echo "$ac_var='\''$ac_val'\''"
3210 done | sort
3211 echo
3212
3213 if test -n "$ac_subst_files"; then
3214 cat <<\_ASBOX
3215## ------------------- ##
3216## File substitutions. ##
3217## ------------------- ##
3218_ASBOX
3219 echo
3220 for ac_var in $ac_subst_files
3221 do
3222 eval ac_val=\$$ac_var
3223 case $ac_val in
3224 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3225 esac
3226 $as_echo "$ac_var='\''$ac_val'\''"
3227 done | sort
3228 echo
3229 fi
3230
3231 if test -s confdefs.h; then
3232 cat <<\_ASBOX
3233## ----------- ##
3234## confdefs.h. ##
3235## ----------- ##
3236_ASBOX
3237 echo
3238 cat confdefs.h
3239 echo
3240 fi
3241 test "$ac_signal" != 0 &&
3242 $as_echo "$as_me: caught signal $ac_signal"
3243 $as_echo "$as_me: exit $exit_status"
3244 } >&5
3245 rm -f core *.core core.conftest.* &&
3246 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3247 exit $exit_status
3248' 0
3249for ac_signal in 1 2 13 15; do
3250 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3251done
3252ac_signal=0
3253
3254# confdefs.h avoids OS command line length limits that DEFS can exceed.
3255rm -f -r conftest* confdefs.h
3256
3257$as_echo "/* confdefs.h */" > confdefs.h
3258
3259# Predefined preprocessor variables.
3260
3261cat >>confdefs.h <<_ACEOF
3262#define PACKAGE_NAME "$PACKAGE_NAME"
3263_ACEOF
3264
3265cat >>confdefs.h <<_ACEOF
3266#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3267_ACEOF
3268
3269cat >>confdefs.h <<_ACEOF
3270#define PACKAGE_VERSION "$PACKAGE_VERSION"
3271_ACEOF
3272
3273cat >>confdefs.h <<_ACEOF
3274#define PACKAGE_STRING "$PACKAGE_STRING"
3275_ACEOF
3276
3277cat >>confdefs.h <<_ACEOF
3278#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3279_ACEOF
3280
3281cat >>confdefs.h <<_ACEOF
3282#define PACKAGE_URL "$PACKAGE_URL"
3283_ACEOF
3284
3285
3286# Let the site file select an alternate cache file if it wants to.
3287# Prefer an explicitly selected file to automatically selected ones.
3288ac_site_file1=NONE
3289ac_site_file2=NONE
3290if test -n "$CONFIG_SITE"; then
3291 ac_site_file1=$CONFIG_SITE
3292elif test "x$prefix" != xNONE; then
3293 ac_site_file1=$prefix/share/config.site
3294 ac_site_file2=$prefix/etc/config.site
3295else
3296 ac_site_file1=$ac_default_prefix/share/config.site
3297 ac_site_file2=$ac_default_prefix/etc/config.site
3298fi
3299for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3300do
3301 test "x$ac_site_file" = xNONE && continue
3302 if test -r "$ac_site_file"; then
3303 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3304$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3305 sed 's/^/| /' "$ac_site_file" >&5
3306 . "$ac_site_file"
3307 fi
3308done
3309
3310if test -r "$cache_file"; then
3311 # Some versions of bash will fail to source /dev/null (special
3312 # files actually), so we avoid doing that.
3313 if test -f "$cache_file"; then
3314 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3315$as_echo "$as_me: loading cache $cache_file" >&6;}
3316 case $cache_file in
3317 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3318 *) . "./$cache_file";;
3319 esac
3320 fi
3321else
3322 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3323$as_echo "$as_me: creating cache $cache_file" >&6;}
3324 >$cache_file
3325fi
3326
98399780
YQ
3327as_fn_append ac_func_list " canonicalize_file_name"
3328as_fn_append ac_func_list " getcwd"
3329as_fn_append ac_func_list " readlink"
3330as_fn_append ac_func_list " realpath"
3331as_fn_append ac_header_list " sys/param.h"
3d99e817 3332as_fn_append ac_header_list " unistd.h"
6ec2e0f5
SDJ
3333as_fn_append ac_func_list " _set_invalid_parameter_handler"
3334as_fn_append ac_header_list " sys/socket.h"
3335as_fn_append ac_func_list " fchdir"
3336as_fn_append ac_header_list " dirent.h"
3337as_fn_append ac_func_list " fcntl"
3338as_fn_append ac_func_list " symlink"
3339as_fn_append ac_func_list " fdopendir"
3340as_fn_append ac_func_list " mempcpy"
3574124b
PA
3341as_fn_append ac_func_list " btowc"
3342as_fn_append ac_func_list " isblank"
3343as_fn_append ac_func_list " iswctype"
3344as_fn_append ac_func_list " mbsrtowcs"
3574124b
PA
3345as_fn_append ac_func_list " wmemchr"
3346as_fn_append ac_func_list " wmemcpy"
3347as_fn_append ac_func_list " wmempcpy"
3348as_fn_append ac_header_list " wctype.h"
8690e634 3349gl_fnmatch_required=GNU
6ec2e0f5
SDJ
3350as_fn_append ac_header_list " sys/stat.h"
3351as_fn_append ac_func_list " fstatat"
3352as_fn_append ac_func_list " getdtablesize"
3353as_fn_append ac_func_list " getlogin_r"
3354as_fn_append ac_func_list " getprogname"
3355as_fn_append ac_func_list " getexecname"
4a626d0a 3356as_fn_append ac_header_list " sys/time.h"
4a626d0a 3357as_fn_append ac_func_list " gettimeofday"
6ec2e0f5
SDJ
3358as_fn_append ac_header_list " sys/cdefs.h"
3359as_fn_append ac_func_list " getpwnam_r"
49e4877c 3360as_fn_append ac_header_list " limits.h"
3574124b
PA
3361as_fn_append ac_header_list " wchar.h"
3362as_fn_append ac_header_list " stdint.h"
3363as_fn_append ac_header_list " inttypes.h"
f45c62c4 3364as_fn_append ac_func_list " lstat"
3574124b
PA
3365as_fn_append ac_header_list " math.h"
3366as_fn_append ac_func_list " mbsinit"
3367as_fn_append ac_func_list " mbrtowc"
3368as_fn_append ac_header_list " sys/mman.h"
3369as_fn_append ac_func_list " mprotect"
2d8adcbd 3370as_fn_append ac_func_list " mkstemp"
6ec2e0f5 3371as_fn_append ac_func_list " openat"
6a29c58e 3372as_fn_append ac_func_list " link"
2d8adcbd
MM
3373as_fn_append ac_func_list " secure_getenv"
3374as_fn_append ac_func_list " getuid"
3375as_fn_append ac_func_list " geteuid"
3376as_fn_append ac_func_list " getgid"
3377as_fn_append ac_func_list " getegid"
3d99e817 3378as_fn_append ac_func_list " setenv"
6ec2e0f5
SDJ
3379as_fn_append ac_func_list " strdup"
3380as_fn_append ac_func_list " pipe"
3574124b
PA
3381as_fn_append ac_header_list " features.h"
3382as_fn_append ac_func_list " iswcntrl"
c971b7fa
PA
3383# Check that the precious variables saved in the cache have kept the same
3384# value.
3385ac_cache_corrupted=false
3386for ac_var in $ac_precious_vars; do
3387 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3388 eval ac_new_set=\$ac_env_${ac_var}_set
3389 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3390 eval ac_new_val=\$ac_env_${ac_var}_value
3391 case $ac_old_set,$ac_new_set in
3392 set,)
3393 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3394$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3395 ac_cache_corrupted=: ;;
3396 ,set)
3397 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3398$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3399 ac_cache_corrupted=: ;;
3400 ,);;
3401 *)
3402 if test "x$ac_old_val" != "x$ac_new_val"; then
3403 # differences in whitespace do not lead to failure.
3404 ac_old_val_w=`echo x $ac_old_val`
3405 ac_new_val_w=`echo x $ac_new_val`
3406 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3407 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3408$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3409 ac_cache_corrupted=:
3410 else
3411 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3412$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3413 eval $ac_var=\$ac_old_val
3414 fi
3415 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3416$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3417 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3418$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3419 fi;;
3420 esac
3421 # Pass precious variables to config.status.
3422 if test "$ac_new_set" = set; then
3423 case $ac_new_val in
3424 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3425 *) ac_arg=$ac_var=$ac_new_val ;;
3426 esac
3427 case " $ac_configure_args " in
3428 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3429 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3430 esac
3431 fi
3432done
3433if $ac_cache_corrupted; then
3434 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3435$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3436 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3437$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3438 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3439fi
3440## -------------------- ##
3441## Main body of script. ##
3442## -------------------- ##
3443
3444ac_ext=c
3445ac_cpp='$CPP $CPPFLAGS'
3446ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3447ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3448ac_compiler_gnu=$ac_cv_c_compiler_gnu
3449
3450
3451ac_config_headers="$ac_config_headers config.h:config.in"
3452
3453
3454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
3455$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
3456 # Check whether --enable-maintainer-mode was given.
3457if test "${enable_maintainer_mode+set}" = set; then :
3458 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
3459else
3460 USE_MAINTAINER_MODE=no
3461fi
3462
3463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3464$as_echo "$USE_MAINTAINER_MODE" >&6; }
3465 if test $USE_MAINTAINER_MODE = yes; then
3466 MAINTAINER_MODE_TRUE=
3467 MAINTAINER_MODE_FALSE='#'
3468else
3469 MAINTAINER_MODE_TRUE='#'
3470 MAINTAINER_MODE_FALSE=
3471fi
3472
3473 MAINT=$MAINTAINER_MODE_TRUE
3474
3475
3476
3477ac_ext=c
3478ac_cpp='$CPP $CPPFLAGS'
3479ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3480ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3481ac_compiler_gnu=$ac_cv_c_compiler_gnu
3482if test -n "$ac_tool_prefix"; then
3483 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3484set dummy ${ac_tool_prefix}gcc; ac_word=$2
3485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3486$as_echo_n "checking for $ac_word... " >&6; }
3487if test "${ac_cv_prog_CC+set}" = set; then :
3488 $as_echo_n "(cached) " >&6
3489else
3490 if test -n "$CC"; then
3491 ac_cv_prog_CC="$CC" # Let the user override the test.
3492else
3493as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3494for as_dir in $PATH
3495do
3496 IFS=$as_save_IFS
3497 test -z "$as_dir" && as_dir=.
3498 for ac_exec_ext in '' $ac_executable_extensions; do
3499 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3500 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3501 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3502 break 2
3503 fi
3504done
3505 done
3506IFS=$as_save_IFS
3507
3508fi
3509fi
3510CC=$ac_cv_prog_CC
3511if test -n "$CC"; then
3512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3513$as_echo "$CC" >&6; }
3514else
3515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3516$as_echo "no" >&6; }
3517fi
3518
3519
3520fi
3521if test -z "$ac_cv_prog_CC"; then
3522 ac_ct_CC=$CC
3523 # Extract the first word of "gcc", so it can be a program name with args.
3524set dummy gcc; ac_word=$2
3525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3526$as_echo_n "checking for $ac_word... " >&6; }
3527if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3528 $as_echo_n "(cached) " >&6
3529else
3530 if test -n "$ac_ct_CC"; then
3531 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3532else
3533as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3534for as_dir in $PATH
3535do
3536 IFS=$as_save_IFS
3537 test -z "$as_dir" && as_dir=.
3538 for ac_exec_ext in '' $ac_executable_extensions; do
3539 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3540 ac_cv_prog_ac_ct_CC="gcc"
3541 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3542 break 2
3543 fi
3544done
3545 done
3546IFS=$as_save_IFS
3547
3548fi
3549fi
3550ac_ct_CC=$ac_cv_prog_ac_ct_CC
3551if test -n "$ac_ct_CC"; then
3552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3553$as_echo "$ac_ct_CC" >&6; }
3554else
3555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3556$as_echo "no" >&6; }
3557fi
3558
3559 if test "x$ac_ct_CC" = x; then
3560 CC=""
3561 else
3562 case $cross_compiling:$ac_tool_warned in
3563yes:)
3564{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3565$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3566ac_tool_warned=yes ;;
3567esac
3568 CC=$ac_ct_CC
3569 fi
3570else
3571 CC="$ac_cv_prog_CC"
3572fi
3573
3574if test -z "$CC"; then
3575 if test -n "$ac_tool_prefix"; then
3576 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3577set dummy ${ac_tool_prefix}cc; ac_word=$2
3578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3579$as_echo_n "checking for $ac_word... " >&6; }
3580if test "${ac_cv_prog_CC+set}" = set; then :
3581 $as_echo_n "(cached) " >&6
3582else
3583 if test -n "$CC"; then
3584 ac_cv_prog_CC="$CC" # Let the user override the test.
3585else
3586as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3587for as_dir in $PATH
3588do
3589 IFS=$as_save_IFS
3590 test -z "$as_dir" && as_dir=.
3591 for ac_exec_ext in '' $ac_executable_extensions; do
3592 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3593 ac_cv_prog_CC="${ac_tool_prefix}cc"
3594 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3595 break 2
3596 fi
3597done
3598 done
3599IFS=$as_save_IFS
3600
3601fi
3602fi
3603CC=$ac_cv_prog_CC
3604if test -n "$CC"; then
3605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3606$as_echo "$CC" >&6; }
3607else
3608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3609$as_echo "no" >&6; }
3610fi
3611
3612
3613 fi
3614fi
3615if test -z "$CC"; then
3616 # Extract the first word of "cc", so it can be a program name with args.
3617set dummy cc; ac_word=$2
3618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3619$as_echo_n "checking for $ac_word... " >&6; }
3620if test "${ac_cv_prog_CC+set}" = set; then :
3621 $as_echo_n "(cached) " >&6
3622else
3623 if test -n "$CC"; then
3624 ac_cv_prog_CC="$CC" # Let the user override the test.
3625else
3626 ac_prog_rejected=no
3627as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3628for as_dir in $PATH
3629do
3630 IFS=$as_save_IFS
3631 test -z "$as_dir" && as_dir=.
3632 for ac_exec_ext in '' $ac_executable_extensions; do
3633 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3634 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3635 ac_prog_rejected=yes
3636 continue
3637 fi
3638 ac_cv_prog_CC="cc"
3639 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3640 break 2
3641 fi
3642done
3643 done
3644IFS=$as_save_IFS
3645
3646if test $ac_prog_rejected = yes; then
3647 # We found a bogon in the path, so make sure we never use it.
3648 set dummy $ac_cv_prog_CC
3649 shift
3650 if test $# != 0; then
3651 # We chose a different compiler from the bogus one.
3652 # However, it has the same basename, so the bogon will be chosen
3653 # first if we set CC to just the basename; use the full file name.
3654 shift
3655 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3656 fi
3657fi
3658fi
3659fi
3660CC=$ac_cv_prog_CC
3661if test -n "$CC"; then
3662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3663$as_echo "$CC" >&6; }
3664else
3665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3666$as_echo "no" >&6; }
3667fi
3668
3669
3670fi
3671if test -z "$CC"; then
3672 if test -n "$ac_tool_prefix"; then
3673 for ac_prog in cl.exe
3674 do
3675 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3676set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3678$as_echo_n "checking for $ac_word... " >&6; }
3679if test "${ac_cv_prog_CC+set}" = set; then :
3680 $as_echo_n "(cached) " >&6
3681else
3682 if test -n "$CC"; then
3683 ac_cv_prog_CC="$CC" # Let the user override the test.
3684else
3685as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3686for as_dir in $PATH
3687do
3688 IFS=$as_save_IFS
3689 test -z "$as_dir" && as_dir=.
3690 for ac_exec_ext in '' $ac_executable_extensions; do
3691 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3692 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3693 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3694 break 2
3695 fi
3696done
3697 done
3698IFS=$as_save_IFS
3699
3700fi
3701fi
3702CC=$ac_cv_prog_CC
3703if test -n "$CC"; then
3704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3705$as_echo "$CC" >&6; }
3706else
3707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3708$as_echo "no" >&6; }
3709fi
3710
3711
3712 test -n "$CC" && break
3713 done
3714fi
3715if test -z "$CC"; then
3716 ac_ct_CC=$CC
3717 for ac_prog in cl.exe
3718do
3719 # Extract the first word of "$ac_prog", so it can be a program name with args.
3720set dummy $ac_prog; ac_word=$2
3721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3722$as_echo_n "checking for $ac_word... " >&6; }
3723if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3724 $as_echo_n "(cached) " >&6
3725else
3726 if test -n "$ac_ct_CC"; then
3727 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3728else
3729as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3730for as_dir in $PATH
3731do
3732 IFS=$as_save_IFS
3733 test -z "$as_dir" && as_dir=.
3734 for ac_exec_ext in '' $ac_executable_extensions; do
3735 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3736 ac_cv_prog_ac_ct_CC="$ac_prog"
3737 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3738 break 2
3739 fi
3740done
3741 done
3742IFS=$as_save_IFS
3743
3744fi
3745fi
3746ac_ct_CC=$ac_cv_prog_ac_ct_CC
3747if test -n "$ac_ct_CC"; then
3748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3749$as_echo "$ac_ct_CC" >&6; }
3750else
3751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3752$as_echo "no" >&6; }
3753fi
3754
3755
3756 test -n "$ac_ct_CC" && break
3757done
3758
3759 if test "x$ac_ct_CC" = x; then
3760 CC=""
3761 else
3762 case $cross_compiling:$ac_tool_warned in
3763yes:)
3764{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3765$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3766ac_tool_warned=yes ;;
3767esac
3768 CC=$ac_ct_CC
3769 fi
3770fi
3771
3772fi
3773
3774
3775test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3776$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3777as_fn_error "no acceptable C compiler found in \$PATH
3778See \`config.log' for more details." "$LINENO" 5; }
3779
3780# Provide some information about the compiler.
3781$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3782set X $ac_compile
3783ac_compiler=$2
3784for ac_option in --version -v -V -qversion; do
3785 { { ac_try="$ac_compiler $ac_option >&5"
3786case "(($ac_try" in
3787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3788 *) ac_try_echo=$ac_try;;
3789esac
3790eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3791$as_echo "$ac_try_echo"; } >&5
3792 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3793 ac_status=$?
3794 if test -s conftest.err; then
3795 sed '10a\
3796... rest of stderr output deleted ...
3797 10q' conftest.err >conftest.er1
3798 cat conftest.er1 >&5
3799 rm -f conftest.er1 conftest.err
3800 fi
3801 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3802 test $ac_status = 0; }
3803done
3804
3805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3806/* end confdefs.h. */
3807#include <stdio.h>
3808int
3809main ()
3810{
3811FILE *f = fopen ("conftest.out", "w");
3812 return ferror (f) || fclose (f) != 0;
3813
3814 ;
3815 return 0;
3816}
3817_ACEOF
3818ac_clean_files_save=$ac_clean_files
3819ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
3820# Try to create an executable without -o first, disregard a.out.
3821# It will help us diagnose broken compilers, and finding out an intuition
3822# of exeext.
3823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3824$as_echo_n "checking for C compiler default output file name... " >&6; }
3825ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3826
3827# The possible output files:
3828ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3829
3830ac_rmfiles=
3831for ac_file in $ac_files
3832do
3833 case $ac_file in
3834 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3835 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3836 esac
3837done
3838rm -f $ac_rmfiles
3839
3840if { { ac_try="$ac_link_default"
3841case "(($ac_try" in
3842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3843 *) ac_try_echo=$ac_try;;
3844esac
3845eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3846$as_echo "$ac_try_echo"; } >&5
3847 (eval "$ac_link_default") 2>&5
3848 ac_status=$?
3849 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3850 test $ac_status = 0; }; then :
3851 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3852# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3853# in a Makefile. We should not override ac_cv_exeext if it was cached,
3854# so that the user can short-circuit this test for compilers unknown to
3855# Autoconf.
3856for ac_file in $ac_files ''
3857do
3858 test -f "$ac_file" || continue
3859 case $ac_file in
3860 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3861 ;;
3862 [ab].out )
3863 # We found the default executable, but exeext='' is most
3864 # certainly right.
3865 break;;
3866 *.* )
3867 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3868 then :; else
3869 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3870 fi
3871 # We set ac_cv_exeext here because the later test for it is not
3872 # safe: cross compilers may not add the suffix if given an `-o'
3873 # argument, so we may need to know it at that point already.
3874 # Even if this section looks crufty: it has the advantage of
3875 # actually working.
3876 break;;
3877 * )
3878 break;;
3879 esac
3880done
3881test "$ac_cv_exeext" = no && ac_cv_exeext=
3882
3883else
3884 ac_file=''
3885fi
3886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3887$as_echo "$ac_file" >&6; }
3888if test -z "$ac_file"; then :
3889 $as_echo "$as_me: failed program was:" >&5
3890sed 's/^/| /' conftest.$ac_ext >&5
3891
3892{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3893$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3894{ as_fn_set_status 77
3895as_fn_error "C compiler cannot create executables
3896See \`config.log' for more details." "$LINENO" 5; }; }
3897fi
3898ac_exeext=$ac_cv_exeext
3899
3900# Check that the compiler produces executables we can run. If not, either
3901# the compiler is broken, or we cross compile.
3902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3903$as_echo_n "checking whether the C compiler works... " >&6; }
3904# If not cross compiling, check that we can run a simple program.
3905if test "$cross_compiling" != yes; then
3906 if { ac_try='./$ac_file'
3907 { { case "(($ac_try" in
3908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3909 *) ac_try_echo=$ac_try;;
3910esac
3911eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3912$as_echo "$ac_try_echo"; } >&5
3913 (eval "$ac_try") 2>&5
3914 ac_status=$?
3915 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3916 test $ac_status = 0; }; }; then
3917 cross_compiling=no
3918 else
3919 if test "$cross_compiling" = maybe; then
3920 cross_compiling=yes
3921 else
3922 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3923$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3924as_fn_error "cannot run C compiled programs.
3925If you meant to cross compile, use \`--host'.
3926See \`config.log' for more details." "$LINENO" 5; }
3927 fi
3928 fi
3929fi
3930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3931$as_echo "yes" >&6; }
3932
3933rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
3934ac_clean_files=$ac_clean_files_save
3935# Check that the compiler produces executables we can run. If not, either
3936# the compiler is broken, or we cross compile.
3937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3938$as_echo_n "checking whether we are cross compiling... " >&6; }
3939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3940$as_echo "$cross_compiling" >&6; }
3941
3942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3943$as_echo_n "checking for suffix of executables... " >&6; }
3944if { { ac_try="$ac_link"
3945case "(($ac_try" in
3946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3947 *) ac_try_echo=$ac_try;;
3948esac
3949eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3950$as_echo "$ac_try_echo"; } >&5
3951 (eval "$ac_link") 2>&5
3952 ac_status=$?
3953 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3954 test $ac_status = 0; }; then :
3955 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3956# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3957# work properly (i.e., refer to `conftest.exe'), while it won't with
3958# `rm'.
3959for ac_file in conftest.exe conftest conftest.*; do
3960 test -f "$ac_file" || continue
3961 case $ac_file in
3962 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3963 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3964 break;;
3965 * ) break;;
3966 esac
3967done
3968else
3969 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3970$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3971as_fn_error "cannot compute suffix of executables: cannot compile and link
3972See \`config.log' for more details." "$LINENO" 5; }
3973fi
3974rm -f conftest$ac_cv_exeext
3975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3976$as_echo "$ac_cv_exeext" >&6; }
3977
3978rm -f conftest.$ac_ext
3979EXEEXT=$ac_cv_exeext
3980ac_exeext=$EXEEXT
3981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3982$as_echo_n "checking for suffix of object files... " >&6; }
3983if test "${ac_cv_objext+set}" = set; then :
3984 $as_echo_n "(cached) " >&6
3985else
3986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3987/* end confdefs.h. */
3988
3989int
3990main ()
3991{
3992
3993 ;
3994 return 0;
3995}
3996_ACEOF
3997rm -f conftest.o conftest.obj
3998if { { ac_try="$ac_compile"
3999case "(($ac_try" in
4000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4001 *) ac_try_echo=$ac_try;;
4002esac
4003eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4004$as_echo "$ac_try_echo"; } >&5
4005 (eval "$ac_compile") 2>&5
4006 ac_status=$?
4007 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4008 test $ac_status = 0; }; then :
4009 for ac_file in conftest.o conftest.obj conftest.*; do
4010 test -f "$ac_file" || continue;
4011 case $ac_file in
4012 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4013 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4014 break;;
4015 esac
4016done
4017else
4018 $as_echo "$as_me: failed program was:" >&5
4019sed 's/^/| /' conftest.$ac_ext >&5
4020
4021{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4022$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4023as_fn_error "cannot compute suffix of object files: cannot compile
4024See \`config.log' for more details." "$LINENO" 5; }
4025fi
4026rm -f conftest.$ac_cv_objext conftest.$ac_ext
4027fi
4028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4029$as_echo "$ac_cv_objext" >&6; }
4030OBJEXT=$ac_cv_objext
4031ac_objext=$OBJEXT
4032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4033$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4034if test "${ac_cv_c_compiler_gnu+set}" = set; then :
4035 $as_echo_n "(cached) " >&6
4036else
4037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4038/* end confdefs.h. */
4039
4040int
4041main ()
4042{
4043#ifndef __GNUC__
4044 choke me
4045#endif
4046
4047 ;
4048 return 0;
4049}
4050_ACEOF
4051if ac_fn_c_try_compile "$LINENO"; then :
4052 ac_compiler_gnu=yes
4053else
4054 ac_compiler_gnu=no
4055fi
4056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4057ac_cv_c_compiler_gnu=$ac_compiler_gnu
4058
4059fi
4060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4061$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4062if test $ac_compiler_gnu = yes; then
4063 GCC=yes
4064else
4065 GCC=
4066fi
4067ac_test_CFLAGS=${CFLAGS+set}
4068ac_save_CFLAGS=$CFLAGS
4069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4070$as_echo_n "checking whether $CC accepts -g... " >&6; }
4071if test "${ac_cv_prog_cc_g+set}" = set; then :
4072 $as_echo_n "(cached) " >&6
4073else
4074 ac_save_c_werror_flag=$ac_c_werror_flag
4075 ac_c_werror_flag=yes
4076 ac_cv_prog_cc_g=no
4077 CFLAGS="-g"
4078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4079/* end confdefs.h. */
4080
4081int
4082main ()
4083{
4084
4085 ;
4086 return 0;
4087}
4088_ACEOF
4089if ac_fn_c_try_compile "$LINENO"; then :
4090 ac_cv_prog_cc_g=yes
4091else
4092 CFLAGS=""
4093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4094/* end confdefs.h. */
4095
4096int
4097main ()
4098{
4099
4100 ;
4101 return 0;
4102}
4103_ACEOF
4104if ac_fn_c_try_compile "$LINENO"; then :
4105
4106else
4107 ac_c_werror_flag=$ac_save_c_werror_flag
4108 CFLAGS="-g"
4109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4110/* end confdefs.h. */
4111
4112int
4113main ()
4114{
4115
4116 ;
4117 return 0;
4118}
4119_ACEOF
4120if ac_fn_c_try_compile "$LINENO"; then :
4121 ac_cv_prog_cc_g=yes
4122fi
4123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4124fi
4125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4126fi
4127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4128 ac_c_werror_flag=$ac_save_c_werror_flag
4129fi
4130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4131$as_echo "$ac_cv_prog_cc_g" >&6; }
4132if test "$ac_test_CFLAGS" = set; then
4133 CFLAGS=$ac_save_CFLAGS
4134elif test $ac_cv_prog_cc_g = yes; then
4135 if test "$GCC" = yes; then
4136 CFLAGS="-g -O2"
4137 else
4138 CFLAGS="-g"
4139 fi
4140else
4141 if test "$GCC" = yes; then
4142 CFLAGS="-O2"
4143 else
4144 CFLAGS=
4145 fi
4146fi
4147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4148$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4149if test "${ac_cv_prog_cc_c89+set}" = set; then :
4150 $as_echo_n "(cached) " >&6
4151else
4152 ac_cv_prog_cc_c89=no
4153ac_save_CC=$CC
4154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4155/* end confdefs.h. */
4156#include <stdarg.h>
4157#include <stdio.h>
4158#include <sys/types.h>
4159#include <sys/stat.h>
4160/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4161struct buf { int x; };
4162FILE * (*rcsopen) (struct buf *, struct stat *, int);
4163static char *e (p, i)
4164 char **p;
4165 int i;
4166{
4167 return p[i];
4168}
4169static char *f (char * (*g) (char **, int), char **p, ...)
4170{
4171 char *s;
4172 va_list v;
4173 va_start (v,p);
4174 s = g (p, va_arg (v,int));
4175 va_end (v);
4176 return s;
4177}
4178
4179/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4180 function prototypes and stuff, but not '\xHH' hex character constants.
4181 These don't provoke an error unfortunately, instead are silently treated
4182 as 'x'. The following induces an error, until -std is added to get
4183 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4184 array size at least. It's necessary to write '\x00'==0 to get something
4185 that's true only with -std. */
4186int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4187
4188/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4189 inside strings and character constants. */
4190#define FOO(x) 'x'
4191int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4192
4193int test (int i, double x);
4194struct s1 {int (*f) (int a);};
4195struct s2 {int (*f) (double a);};
4196int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4197int argc;
4198char **argv;
4199int
4200main ()
4201{
4202return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4203 ;
4204 return 0;
4205}
4206_ACEOF
4207for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4208 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4209do
4210 CC="$ac_save_CC $ac_arg"
4211 if ac_fn_c_try_compile "$LINENO"; then :
4212 ac_cv_prog_cc_c89=$ac_arg
4213fi
4214rm -f core conftest.err conftest.$ac_objext
4215 test "x$ac_cv_prog_cc_c89" != "xno" && break
4216done
4217rm -f conftest.$ac_ext
4218CC=$ac_save_CC
4219
4220fi
4221# AC_CACHE_VAL
4222case "x$ac_cv_prog_cc_c89" in
4223 x)
4224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4225$as_echo "none needed" >&6; } ;;
4226 xno)
4227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4228$as_echo "unsupported" >&6; } ;;
4229 *)
4230 CC="$CC $ac_cv_prog_cc_c89"
4231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4232$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4233esac
4234if test "x$ac_cv_prog_cc_c89" != xno; then :
4235
4236fi
4237
4238ac_ext=c
4239ac_cpp='$CPP $CPPFLAGS'
4240ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4241ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4242ac_compiler_gnu=$ac_cv_c_compiler_gnu
4243
c971b7fa
PA
4244
4245ac_ext=c
4246ac_cpp='$CPP $CPPFLAGS'
4247ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4248ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4249ac_compiler_gnu=$ac_cv_c_compiler_gnu
4250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4251$as_echo_n "checking how to run the C preprocessor... " >&6; }
4252# On Suns, sometimes $CPP names a directory.
4253if test -n "$CPP" && test -d "$CPP"; then
4254 CPP=
4255fi
4256if test -z "$CPP"; then
4257 if test "${ac_cv_prog_CPP+set}" = set; then :
4258 $as_echo_n "(cached) " >&6
4259else
4260 # Double quotes because CPP needs to be expanded
4261 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4262 do
4263 ac_preproc_ok=false
4264for ac_c_preproc_warn_flag in '' yes
4265do
4266 # Use a header file that comes with gcc, so configuring glibc
4267 # with a fresh cross-compiler works.
4268 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4269 # <limits.h> exists even on freestanding compilers.
4270 # On the NeXT, cc -E runs the code through the compiler's parser,
4271 # not just through cpp. "Syntax error" is here to catch this case.
4272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4273/* end confdefs.h. */
4274#ifdef __STDC__
4275# include <limits.h>
4276#else
4277# include <assert.h>
4278#endif
4279 Syntax error
4280_ACEOF
4281if ac_fn_c_try_cpp "$LINENO"; then :
4282
4283else
4284 # Broken: fails on valid input.
4285continue
4286fi
4287rm -f conftest.err conftest.$ac_ext
4288
4289 # OK, works on sane cases. Now check whether nonexistent headers
4290 # can be detected and how.
4291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4292/* end confdefs.h. */
4293#include <ac_nonexistent.h>
4294_ACEOF
4295if ac_fn_c_try_cpp "$LINENO"; then :
4296 # Broken: success on invalid input.
4297continue
4298else
4299 # Passes both tests.
4300ac_preproc_ok=:
4301break
4302fi
4303rm -f conftest.err conftest.$ac_ext
4304
4305done
4306# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4307rm -f conftest.err conftest.$ac_ext
4308if $ac_preproc_ok; then :
4309 break
4310fi
4311
4312 done
4313 ac_cv_prog_CPP=$CPP
4314
4315fi
4316 CPP=$ac_cv_prog_CPP
4317else
4318 ac_cv_prog_CPP=$CPP
4319fi
4320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4321$as_echo "$CPP" >&6; }
4322ac_preproc_ok=false
4323for ac_c_preproc_warn_flag in '' yes
4324do
4325 # Use a header file that comes with gcc, so configuring glibc
4326 # with a fresh cross-compiler works.
4327 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4328 # <limits.h> exists even on freestanding compilers.
4329 # On the NeXT, cc -E runs the code through the compiler's parser,
4330 # not just through cpp. "Syntax error" is here to catch this case.
4331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4332/* end confdefs.h. */
4333#ifdef __STDC__
4334# include <limits.h>
4335#else
4336# include <assert.h>
4337#endif
4338 Syntax error
4339_ACEOF
4340if ac_fn_c_try_cpp "$LINENO"; then :
4341
4342else
4343 # Broken: fails on valid input.
4344continue
4345fi
4346rm -f conftest.err conftest.$ac_ext
4347
4348 # OK, works on sane cases. Now check whether nonexistent headers
4349 # can be detected and how.
4350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4351/* end confdefs.h. */
4352#include <ac_nonexistent.h>
4353_ACEOF
4354if ac_fn_c_try_cpp "$LINENO"; then :
4355 # Broken: success on invalid input.
4356continue
4357else
4358 # Passes both tests.
4359ac_preproc_ok=:
4360break
4361fi
4362rm -f conftest.err conftest.$ac_ext
4363
4364done
4365# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4366rm -f conftest.err conftest.$ac_ext
4367if $ac_preproc_ok; then :
4368
4369else
4370 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4371$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4372as_fn_error "C preprocessor \"$CPP\" fails sanity check
4373See \`config.log' for more details." "$LINENO" 5; }
4374fi
4375
4376ac_ext=c
4377ac_cpp='$CPP $CPPFLAGS'
4378ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4379ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4380ac_compiler_gnu=$ac_cv_c_compiler_gnu
4381
4382
4383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4384$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4385if test "${ac_cv_path_GREP+set}" = set; then :
4386 $as_echo_n "(cached) " >&6
4387else
4388 if test -z "$GREP"; then
4389 ac_path_GREP_found=false
4390 # Loop through the user's path and test for each of PROGNAME-LIST
4391 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4392for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4393do
4394 IFS=$as_save_IFS
4395 test -z "$as_dir" && as_dir=.
4396 for ac_prog in grep ggrep; do
4397 for ac_exec_ext in '' $ac_executable_extensions; do
4398 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4399 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4400# Check for GNU ac_path_GREP and select it if it is found.
4401 # Check for GNU $ac_path_GREP
4402case `"$ac_path_GREP" --version 2>&1` in
4403*GNU*)
4404 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4405*)
4406 ac_count=0
4407 $as_echo_n 0123456789 >"conftest.in"
4408 while :
4409 do
4410 cat "conftest.in" "conftest.in" >"conftest.tmp"
4411 mv "conftest.tmp" "conftest.in"
4412 cp "conftest.in" "conftest.nl"
4413 $as_echo 'GREP' >> "conftest.nl"
4414 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4415 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4416 as_fn_arith $ac_count + 1 && ac_count=$as_val
4417 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4418 # Best one so far, save it but keep looking for a better one
4419 ac_cv_path_GREP="$ac_path_GREP"
4420 ac_path_GREP_max=$ac_count
4421 fi
4422 # 10*(2^10) chars as input seems more than enough
4423 test $ac_count -gt 10 && break
4424 done
4425 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4426esac
4427
4428 $ac_path_GREP_found && break 3
4429 done
4430 done
4431 done
4432IFS=$as_save_IFS
4433 if test -z "$ac_cv_path_GREP"; then
4434 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4435 fi
4436else
4437 ac_cv_path_GREP=$GREP
4438fi
4439
4440fi
4441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4442$as_echo "$ac_cv_path_GREP" >&6; }
4443 GREP="$ac_cv_path_GREP"
4444
4445
4446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4447$as_echo_n "checking for egrep... " >&6; }
4448if test "${ac_cv_path_EGREP+set}" = set; then :
4449 $as_echo_n "(cached) " >&6
4450else
4451 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4452 then ac_cv_path_EGREP="$GREP -E"
4453 else
4454 if test -z "$EGREP"; then
4455 ac_path_EGREP_found=false
4456 # Loop through the user's path and test for each of PROGNAME-LIST
4457 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4458for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4459do
4460 IFS=$as_save_IFS
4461 test -z "$as_dir" && as_dir=.
4462 for ac_prog in egrep; do
4463 for ac_exec_ext in '' $ac_executable_extensions; do
4464 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4465 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4466# Check for GNU ac_path_EGREP and select it if it is found.
4467 # Check for GNU $ac_path_EGREP
4468case `"$ac_path_EGREP" --version 2>&1` in
4469*GNU*)
4470 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4471*)
4472 ac_count=0
4473 $as_echo_n 0123456789 >"conftest.in"
4474 while :
4475 do
4476 cat "conftest.in" "conftest.in" >"conftest.tmp"
4477 mv "conftest.tmp" "conftest.in"
4478 cp "conftest.in" "conftest.nl"
4479 $as_echo 'EGREP' >> "conftest.nl"
4480 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4481 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4482 as_fn_arith $ac_count + 1 && ac_count=$as_val
4483 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4484 # Best one so far, save it but keep looking for a better one
4485 ac_cv_path_EGREP="$ac_path_EGREP"
4486 ac_path_EGREP_max=$ac_count
4487 fi
4488 # 10*(2^10) chars as input seems more than enough
4489 test $ac_count -gt 10 && break
4490 done
4491 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4492esac
4493
4494 $ac_path_EGREP_found && break 3
4495 done
4496 done
4497 done
4498IFS=$as_save_IFS
4499 if test -z "$ac_cv_path_EGREP"; then
4500 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4501 fi
4502else
4503 ac_cv_path_EGREP=$EGREP
4504fi
4505
4506 fi
4507fi
4508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4509$as_echo "$ac_cv_path_EGREP" >&6; }
4510 EGREP="$ac_cv_path_EGREP"
4511
4512
4513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4514$as_echo_n "checking for ANSI C header files... " >&6; }
4515if test "${ac_cv_header_stdc+set}" = set; then :
4516 $as_echo_n "(cached) " >&6
4517else
4518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4519/* end confdefs.h. */
4520#include <stdlib.h>
4521#include <stdarg.h>
4522#include <string.h>
4523#include <float.h>
4524
4525int
4526main ()
4527{
4528
4529 ;
4530 return 0;
4531}
4532_ACEOF
4533if ac_fn_c_try_compile "$LINENO"; then :
4534 ac_cv_header_stdc=yes
4535else
4536 ac_cv_header_stdc=no
4537fi
4538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4539
4540if test $ac_cv_header_stdc = yes; then
4541 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4543/* end confdefs.h. */
4544#include <string.h>
4545
4546_ACEOF
4547if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4548 $EGREP "memchr" >/dev/null 2>&1; then :
4549
4550else
4551 ac_cv_header_stdc=no
4552fi
4553rm -f conftest*
4554
4555fi
4556
4557if test $ac_cv_header_stdc = yes; then
4558 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4560/* end confdefs.h. */
4561#include <stdlib.h>
4562
4563_ACEOF
4564if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4565 $EGREP "free" >/dev/null 2>&1; then :
4566
4567else
4568 ac_cv_header_stdc=no
4569fi
4570rm -f conftest*
4571
4572fi
4573
4574if test $ac_cv_header_stdc = yes; then
4575 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4576 if test "$cross_compiling" = yes; then :
4577 :
4578else
4579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4580/* end confdefs.h. */
4581#include <ctype.h>
4582#include <stdlib.h>
4583#if ((' ' & 0x0FF) == 0x020)
4584# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4585# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4586#else
4587# define ISLOWER(c) \
4588 (('a' <= (c) && (c) <= 'i') \
4589 || ('j' <= (c) && (c) <= 'r') \
4590 || ('s' <= (c) && (c) <= 'z'))
4591# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4592#endif
4593
4594#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4595int
4596main ()
4597{
4598 int i;
4599 for (i = 0; i < 256; i++)
4600 if (XOR (islower (i), ISLOWER (i))
4601 || toupper (i) != TOUPPER (i))
4602 return 2;
4603 return 0;
4604}
4605_ACEOF
4606if ac_fn_c_try_run "$LINENO"; then :
4607
4608else
4609 ac_cv_header_stdc=no
4610fi
4611rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4612 conftest.$ac_objext conftest.beam conftest.$ac_ext
4613fi
4614
4615fi
4616fi
4617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4618$as_echo "$ac_cv_header_stdc" >&6; }
4619if test $ac_cv_header_stdc = yes; then
4620
4621$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4622
4623fi
4624
4625# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4626for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4627 inttypes.h stdint.h unistd.h
4628do :
4629 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4630ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4631"
4632eval as_val=\$$as_ac_Header
4633 if test "x$as_val" = x""yes; then :
4634 cat >>confdefs.h <<_ACEOF
4635#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4636_ACEOF
4637
4638fi
4639
4640done
4641
4642
4643
c971b7fa
PA
4644 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4645if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4646 MINIX=yes
4647else
4648 MINIX=
4649fi
4650
4651
4652 if test "$MINIX" = yes; then
4653
4654$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4655
4656
4657$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4658
4659
4660$as_echo "#define _MINIX 1" >>confdefs.h
4661
c971b7fa 4662
4a626d0a 4663$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
c971b7fa 4664
4a626d0a 4665 fi
c971b7fa
PA
4666
4667
4668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4669$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4670if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4671 $as_echo_n "(cached) " >&6
4672else
4673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4674/* end confdefs.h. */
4675
4676# define __EXTENSIONS__ 1
4677 $ac_includes_default
4678int
4679main ()
4680{
4681
4682 ;
4683 return 0;
4684}
4685_ACEOF
4686if ac_fn_c_try_compile "$LINENO"; then :
4687 ac_cv_safe_to_define___extensions__=yes
4688else
4689 ac_cv_safe_to_define___extensions__=no
4690fi
4691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4692fi
4693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4694$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4695 test $ac_cv_safe_to_define___extensions__ = yes &&
4696 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4697
4698 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4699
4700 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
4701
4702 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4703
4704 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4705
49e4877c
PA
4706 $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
4707
4708 $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
4709
4710 $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
4711
4712 $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
4713
4714 $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
4715
4716 $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
4717
4718 $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
4719
c971b7fa
PA
4720 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4721
4a626d0a
PA
4722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
4723$as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
4724if test "${ac_cv_should_define__xopen_source+set}" = set; then :
4725 $as_echo_n "(cached) " >&6
4726else
4727 ac_cv_should_define__xopen_source=no
4728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4729/* end confdefs.h. */
4730
4731 #include <wchar.h>
4732 mbstate_t x;
4733int
4734main ()
4735{
4736
4737 ;
4738 return 0;
4739}
4740_ACEOF
4741if ac_fn_c_try_compile "$LINENO"; then :
4742
4743else
4744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4745/* end confdefs.h. */
4746
4747 #define _XOPEN_SOURCE 500
4748 #include <wchar.h>
4749 mbstate_t x;
4750int
4751main ()
4752{
4753
4754 ;
4755 return 0;
4756}
4757_ACEOF
4758if ac_fn_c_try_compile "$LINENO"; then :
4759 ac_cv_should_define__xopen_source=yes
4760fi
4761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4762fi
4763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4764fi
4765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
4766$as_echo "$ac_cv_should_define__xopen_source" >&6; }
4767 test $ac_cv_should_define__xopen_source = yes &&
4768 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
4769
c971b7fa
PA
4770
4771
4772
49e4877c
PA
4773
4774
4775
4776
4777
4778
4779
c971b7fa
PA
4780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
4781$as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
4782if test "${gl_cv_c_amsterdam_compiler+set}" = set; then :
4783 $as_echo_n "(cached) " >&6
4784else
4785
4786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4787/* end confdefs.h. */
4788
4789#ifdef __ACK__
4790Amsterdam
4791#endif
4792
4793_ACEOF
4794if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4795 $EGREP "Amsterdam" >/dev/null 2>&1; then :
4796 gl_cv_c_amsterdam_compiler=yes
4797else
4798 gl_cv_c_amsterdam_compiler=no
4799fi
4800rm -f conftest*
4801
4802
4803fi
4804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
4805$as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
49e4877c
PA
4806
4807 if test $gl_cv_c_amsterdam_compiler = yes; then
4808 if test -z "$AR"; then
c971b7fa 4809 AR='cc -c.a'
49e4877c
PA
4810 fi
4811 if test -z "$ARFLAGS"; then
4812 ARFLAGS='-o'
4813 fi
4814 else
4815 :
4816 fi
4817
4818 if test -n "$ac_tool_prefix"; then
c971b7fa
PA
4819 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4820set dummy ${ac_tool_prefix}ar; ac_word=$2
4821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4822$as_echo_n "checking for $ac_word... " >&6; }
4823if test "${ac_cv_prog_AR+set}" = set; then :
4824 $as_echo_n "(cached) " >&6
4825else
4826 if test -n "$AR"; then
4827 ac_cv_prog_AR="$AR" # Let the user override the test.
4828else
4829as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4830for as_dir in $PATH
4831do
4832 IFS=$as_save_IFS
4833 test -z "$as_dir" && as_dir=.
4834 for ac_exec_ext in '' $ac_executable_extensions; do
4835 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4836 ac_cv_prog_AR="${ac_tool_prefix}ar"
4837 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4838 break 2
4839 fi
4840done
4841 done
4842IFS=$as_save_IFS
4843
4844fi
4845fi
4846AR=$ac_cv_prog_AR
4847if test -n "$AR"; then
4848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
4849$as_echo "$AR" >&6; }
4850else
4851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4852$as_echo "no" >&6; }
4853fi
4854
4855
4856fi
4857if test -z "$ac_cv_prog_AR"; then
4858 ac_ct_AR=$AR
4859 # Extract the first word of "ar", so it can be a program name with args.
4860set dummy ar; ac_word=$2
4861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4862$as_echo_n "checking for $ac_word... " >&6; }
4863if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
4864 $as_echo_n "(cached) " >&6
4865else
4866 if test -n "$ac_ct_AR"; then
4867 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4868else
4869as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4870for as_dir in $PATH
4871do
4872 IFS=$as_save_IFS
4873 test -z "$as_dir" && as_dir=.
4874 for ac_exec_ext in '' $ac_executable_extensions; do
4875 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4876 ac_cv_prog_ac_ct_AR="ar"
4877 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4878 break 2
4879 fi
4880done
4881 done
4882IFS=$as_save_IFS
4883
4884fi
4885fi
4886ac_ct_AR=$ac_cv_prog_ac_ct_AR
4887if test -n "$ac_ct_AR"; then
4888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
4889$as_echo "$ac_ct_AR" >&6; }
4890else
4891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4892$as_echo "no" >&6; }
4893fi
4894
4895 if test "x$ac_ct_AR" = x; then
4896 AR="ar"
4897 else
4898 case $cross_compiling:$ac_tool_warned in
4899yes:)
4900{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4901$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4902ac_tool_warned=yes ;;
4903esac
4904 AR=$ac_ct_AR
4905 fi
4906else
4907 AR="$ac_cv_prog_AR"
4908fi
4909
49e4877c
PA
4910 if test -z "$ARFLAGS"; then
4911 ARFLAGS='cr'
c971b7fa
PA
4912 fi
4913
4914
49e4877c 4915
c971b7fa
PA
4916 if test -z "$RANLIB"; then
4917 if test $gl_cv_c_amsterdam_compiler = yes; then
4918 RANLIB=':'
4919 else
4920 if test -n "$ac_tool_prefix"; then
4921 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4922set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4924$as_echo_n "checking for $ac_word... " >&6; }
4925if test "${ac_cv_prog_RANLIB+set}" = set; then :
4926 $as_echo_n "(cached) " >&6
4927else
4928 if test -n "$RANLIB"; then
4929 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4930else
4931as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4932for as_dir in $PATH
4933do
4934 IFS=$as_save_IFS
4935 test -z "$as_dir" && as_dir=.
4936 for ac_exec_ext in '' $ac_executable_extensions; do
4937 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4938 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4939 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4940 break 2
4941 fi
4942done
4943 done
4944IFS=$as_save_IFS
4945
4946fi
4947fi
4948RANLIB=$ac_cv_prog_RANLIB
4949if test -n "$RANLIB"; then
4950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4951$as_echo "$RANLIB" >&6; }
4952else
4953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4954$as_echo "no" >&6; }
4955fi
4956
4957
4958fi
4959if test -z "$ac_cv_prog_RANLIB"; then
4960 ac_ct_RANLIB=$RANLIB
4961 # Extract the first word of "ranlib", so it can be a program name with args.
4962set dummy ranlib; ac_word=$2
4963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4964$as_echo_n "checking for $ac_word... " >&6; }
4965if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4966 $as_echo_n "(cached) " >&6
4967else
4968 if test -n "$ac_ct_RANLIB"; then
4969 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4970else
4971as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4972for as_dir in $PATH
4973do
4974 IFS=$as_save_IFS
4975 test -z "$as_dir" && as_dir=.
4976 for ac_exec_ext in '' $ac_executable_extensions; do
4977 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4978 ac_cv_prog_ac_ct_RANLIB="ranlib"
4979 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4980 break 2
4981 fi
4982done
4983 done
4984IFS=$as_save_IFS
4985
4986fi
4987fi
4988ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4989if test -n "$ac_ct_RANLIB"; then
4990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4991$as_echo "$ac_ct_RANLIB" >&6; }
4992else
4993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4994$as_echo "no" >&6; }
4995fi
4996
4997 if test "x$ac_ct_RANLIB" = x; then
4998 RANLIB=":"
4999 else
5000 case $cross_compiling:$ac_tool_warned in
5001yes:)
5002{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5003$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5004ac_tool_warned=yes ;;
5005esac
5006 RANLIB=$ac_ct_RANLIB
5007 fi
5008else
5009 RANLIB="$ac_cv_prog_RANLIB"
5010fi
5011
5012 fi
5013 fi
5014
5015
4a626d0a
PA
5016ac_aux_dir=
5017for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
5018 for ac_t in install-sh install.sh shtool; do
5019 if test -f "$ac_dir/$ac_t"; then
5020 ac_aux_dir=$ac_dir
5021 ac_install_sh="$ac_aux_dir/$ac_t -c"
5022 break 2
5023 fi
5024 done
5025done
5026if test -z "$ac_aux_dir"; then
5027 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
5028fi
5029
5030# These three variables are undocumented and unsupported,
5031# and are intended to be withdrawn in a future Autoconf release.
5032# They can cause serious problems if a builder's source tree is in a directory
5033# whose full name contains unusual characters.
5034ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5035ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5036ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5037
5038
5039# Make sure we can run config.sub.
5040$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
5041 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
5042
5043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5044$as_echo_n "checking build system type... " >&6; }
5045if test "${ac_cv_build+set}" = set; then :
5046 $as_echo_n "(cached) " >&6
5047else
5048 ac_build_alias=$build_alias
5049test "x$ac_build_alias" = x &&
5050 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5051test "x$ac_build_alias" = x &&
5052 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
5053ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
5054 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
5055
5056fi
5057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5058$as_echo "$ac_cv_build" >&6; }
5059case $ac_cv_build in
5060*-*-*) ;;
5061*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
5062esac
5063build=$ac_cv_build
5064ac_save_IFS=$IFS; IFS='-'
5065set x $ac_cv_build
5066shift
5067build_cpu=$1
5068build_vendor=$2
5069shift; shift
5070# Remember, the first character of IFS is used to create $*,
5071# except with old shells:
5072build_os=$*
5073IFS=$ac_save_IFS
5074case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5075
5076
5077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5078$as_echo_n "checking host system type... " >&6; }
5079if test "${ac_cv_host+set}" = set; then :
5080 $as_echo_n "(cached) " >&6
5081else
5082 if test "x$host_alias" = x; then
5083 ac_cv_host=$ac_cv_build
5084else
5085 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
5086 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
5087fi
5088
5089fi
5090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5091$as_echo "$ac_cv_host" >&6; }
5092case $ac_cv_host in
5093*-*-*) ;;
5094*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
5095esac
5096host=$ac_cv_host
5097ac_save_IFS=$IFS; IFS='-'
5098set x $ac_cv_host
5099shift
5100host_cpu=$1
5101host_vendor=$2
5102shift; shift
5103# Remember, the first character of IFS is used to create $*,
5104# except with old shells:
5105host_os=$*
5106IFS=$ac_save_IFS
5107case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5108
5109
c971b7fa
PA
5110
5111
88b48903
WN
5112
5113 # IEEE behaviour is the default on all CPUs except Alpha and SH
5114 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
5115 # and the GCC 4.1.2 manual).
5116 case "$host_cpu" in
5117 alpha*)
5118 # On Alpha systems, a compiler option provides the behaviour.
5119 # See the ieee(3) manual page, also available at
5120 # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
5121 if test -n "$GCC"; then
5122 # GCC has the option -mieee.
5123 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
5124 CPPFLAGS="$CPPFLAGS -mieee"
5125 else
5126 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
5127 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
5128 CPPFLAGS="$CPPFLAGS -ieee"
5129 fi
5130 ;;
5131 sh*)
5132 if test -n "$GCC"; then
5133 # GCC has the option -mieee.
5134 CPPFLAGS="$CPPFLAGS -mieee"
5135 fi
5136 ;;
5137 esac
5138
2196f55f
YQ
5139# Check whether --enable-largefile was given.
5140if test "${enable_largefile+set}" = set; then :
5141 enableval=$enable_largefile;
5142fi
5143
5144if test "$enable_largefile" != no; then
5145
5146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5147$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5148if test "${ac_cv_sys_largefile_CC+set}" = set; then :
5149 $as_echo_n "(cached) " >&6
5150else
5151 ac_cv_sys_largefile_CC=no
5152 if test "$GCC" != yes; then
5153 ac_save_CC=$CC
5154 while :; do
5155 # IRIX 6.2 and later do not support large files by default,
5156 # so use the C compiler's -n32 option if that helps.
5157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5158/* end confdefs.h. */
5159#include <sys/types.h>
5160 /* Check that off_t can represent 2**63 - 1 correctly.
5161 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5162 since some C++ compilers masquerading as C compilers
5163 incorrectly reject 9223372036854775807. */
5164#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5165 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5166 && LARGE_OFF_T % 2147483647 == 1)
5167 ? 1 : -1];
5168int
5169main ()
5170{
5171
5172 ;
5173 return 0;
5174}
5175_ACEOF
5176 if ac_fn_c_try_compile "$LINENO"; then :
5177 break
5178fi
5179rm -f core conftest.err conftest.$ac_objext
5180 CC="$CC -n32"
5181 if ac_fn_c_try_compile "$LINENO"; then :
5182 ac_cv_sys_largefile_CC=' -n32'; break
5183fi
5184rm -f core conftest.err conftest.$ac_objext
5185 break
5186 done
5187 CC=$ac_save_CC
5188 rm -f conftest.$ac_ext
5189 fi
5190fi
5191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5192$as_echo "$ac_cv_sys_largefile_CC" >&6; }
5193 if test "$ac_cv_sys_largefile_CC" != no; then
5194 CC=$CC$ac_cv_sys_largefile_CC
5195 fi
5196
5197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5198$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5199if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
5200 $as_echo_n "(cached) " >&6
5201else
5202 while :; do
5203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5204/* end confdefs.h. */
5205#include <sys/types.h>
5206 /* Check that off_t can represent 2**63 - 1 correctly.
5207 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5208 since some C++ compilers masquerading as C compilers
5209 incorrectly reject 9223372036854775807. */
5210#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5211 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5212 && LARGE_OFF_T % 2147483647 == 1)
5213 ? 1 : -1];
5214int
5215main ()
5216{
5217
5218 ;
5219 return 0;
5220}
5221_ACEOF
5222if ac_fn_c_try_compile "$LINENO"; then :
5223 ac_cv_sys_file_offset_bits=no; break
5224fi
5225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5227/* end confdefs.h. */
5228#define _FILE_OFFSET_BITS 64
5229#include <sys/types.h>
5230 /* Check that off_t can represent 2**63 - 1 correctly.
5231 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5232 since some C++ compilers masquerading as C compilers
5233 incorrectly reject 9223372036854775807. */
5234#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5235 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5236 && LARGE_OFF_T % 2147483647 == 1)
5237 ? 1 : -1];
5238int
5239main ()
5240{
5241
5242 ;
5243 return 0;
5244}
5245_ACEOF
5246if ac_fn_c_try_compile "$LINENO"; then :
5247 ac_cv_sys_file_offset_bits=64; break
5248fi
5249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5250 ac_cv_sys_file_offset_bits=unknown
5251 break
5252done
5253fi
5254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5255$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5256case $ac_cv_sys_file_offset_bits in #(
5257 no | unknown) ;;
5258 *)
5259cat >>confdefs.h <<_ACEOF
5260#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5261_ACEOF
5262;;
5263esac
5264rm -rf conftest*
5265 if test $ac_cv_sys_file_offset_bits = unknown; then
5266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5267$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5268if test "${ac_cv_sys_large_files+set}" = set; then :
5269 $as_echo_n "(cached) " >&6
5270else
5271 while :; do
5272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5273/* end confdefs.h. */
5274#include <sys/types.h>
5275 /* Check that off_t can represent 2**63 - 1 correctly.
5276 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5277 since some C++ compilers masquerading as C compilers
5278 incorrectly reject 9223372036854775807. */
5279#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5280 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5281 && LARGE_OFF_T % 2147483647 == 1)
5282 ? 1 : -1];
5283int
5284main ()
5285{
5286
5287 ;
5288 return 0;
5289}
5290_ACEOF
5291if ac_fn_c_try_compile "$LINENO"; then :
5292 ac_cv_sys_large_files=no; break
5293fi
5294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5296/* end confdefs.h. */
5297#define _LARGE_FILES 1
5298#include <sys/types.h>
5299 /* Check that off_t can represent 2**63 - 1 correctly.
5300 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5301 since some C++ compilers masquerading as C compilers
5302 incorrectly reject 9223372036854775807. */
5303#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5304 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5305 && LARGE_OFF_T % 2147483647 == 1)
5306 ? 1 : -1];
5307int
5308main ()
5309{
5310
5311 ;
5312 return 0;
5313}
5314_ACEOF
5315if ac_fn_c_try_compile "$LINENO"; then :
5316 ac_cv_sys_large_files=1; break
5317fi
5318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5319 ac_cv_sys_large_files=unknown
5320 break
5321done
5322fi
5323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5324$as_echo "$ac_cv_sys_large_files" >&6; }
5325case $ac_cv_sys_large_files in #(
5326 no | unknown) ;;
5327 *)
5328cat >>confdefs.h <<_ACEOF
5329#define _LARGE_FILES $ac_cv_sys_large_files
5330_ACEOF
5331;;
5332esac
5333rm -rf conftest*
5334 fi
5335
5336
4a626d0a
PA
5337$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
5338
2196f55f
YQ
5339fi
5340
88b48903
WN
5341
5342
49e4877c
PA
5343 # Pre-early section.
5344
5345
5346
4a626d0a 5347 # Code from module absolute-header:
8690e634
JK
5348 # Code from module alloca:
5349 # Code from module alloca-opt:
6ec2e0f5
SDJ
5350 # Code from module assure:
5351 # Code from module at-internal:
98399780 5352 # Code from module canonicalize-lgpl:
6a29c58e 5353 # Code from module chdir:
6ec2e0f5
SDJ
5354 # Code from module chdir-long:
5355 # Code from module cloexec:
5356 # Code from module close:
5357 # Code from module closedir:
8690e634 5358 # Code from module configmake:
6ec2e0f5
SDJ
5359 # Code from module d-ino:
5360 # Code from module d-type:
e26b6bb0 5361 # Code from module dirent:
18848e28 5362 # Code from module dirfd:
6a29c58e 5363 # Code from module dirname-lgpl:
2196f55f 5364 # Code from module dosname:
6a29c58e 5365 # Code from module double-slash-root:
6ec2e0f5
SDJ
5366 # Code from module dup:
5367 # Code from module dup2:
3d99e817 5368 # Code from module environ:
18848e28 5369 # Code from module errno:
6ec2e0f5
SDJ
5370 # Code from module error:
5371 # Code from module exitfail:
c971b7fa 5372 # Code from module extensions:
a512b375 5373 # Code from module extern-inline:
6ec2e0f5
SDJ
5374 # Code from module fchdir:
5375 # Code from module fcntl:
5376 # Code from module fcntl-h:
5377 # Code from module fd-hook:
5378 # Code from module fdopendir:
5379 # Code from module filename:
5380 # Code from module filenamecat-lgpl:
49e4877c 5381 # Code from module flexmember:
88b48903 5382 # Code from module float:
8690e634
JK
5383 # Code from module fnmatch:
5384 # Code from module fnmatch-gnu:
88b48903
WN
5385 # Code from module fpieee:
5386
5387 # Code from module fpucw:
5388 # Code from module frexp:
5389 # Code from module frexpl:
6ec2e0f5
SDJ
5390 # Code from module fstat:
5391 # Code from module fstatat:
5392 # Code from module getcwd:
5393 # Code from module getcwd-lgpl:
5394 # Code from module getdtablesize:
5395 # Code from module getlogin_r:
5396 # Code from module getprogname:
5397 # Code from module gettext-h:
4a626d0a 5398 # Code from module gettimeofday:
6ec2e0f5 5399 # Code from module glob:
49e4877c 5400 # Code from module hard-locale:
c971b7fa 5401 # Code from module include_next:
6ec2e0f5 5402 # Code from module intprops:
c971b7fa
PA
5403 # Code from module inttypes:
5404 # Code from module inttypes-incomplete:
88b48903
WN
5405 # Code from module isnand-nolibm:
5406 # Code from module isnanl-nolibm:
2196f55f
YQ
5407 # Code from module largefile:
5408
49e4877c 5409 # Code from module limits-h:
8690e634 5410 # Code from module localcharset:
f45c62c4 5411 # Code from module lstat:
6a29c58e 5412 # Code from module malloc-posix:
98399780 5413 # Code from module malloca:
88b48903 5414 # Code from module math:
8690e634
JK
5415 # Code from module mbrtowc:
5416 # Code from module mbsinit:
5417 # Code from module mbsrtowcs:
c971b7fa
PA
5418 # Code from module memchr:
5419 # Code from module memmem:
5420 # Code from module memmem-simple:
6ec2e0f5
SDJ
5421 # Code from module mempcpy:
5422 # Code from module memrchr:
2d8adcbd 5423 # Code from module mkstemp:
6ec2e0f5
SDJ
5424 # Code from module msvc-inval:
5425 # Code from module msvc-nothrow:
c971b7fa 5426 # Code from module multiarch:
98399780 5427 # Code from module nocrash:
6ec2e0f5
SDJ
5428 # Code from module open:
5429 # Code from module openat:
5430 # Code from module openat-die:
5431 # Code from module openat-h:
5432 # Code from module opendir:
38ec2207 5433 # Code from module pathmax:
8424cc97 5434 # Code from module rawmemchr:
6ec2e0f5 5435 # Code from module readdir:
2196f55f 5436 # Code from module readlink:
6ec2e0f5 5437 # Code from module realloc-posix:
6a29c58e 5438 # Code from module rename:
6ec2e0f5 5439 # Code from module rewinddir:
6a29c58e
YQ
5440 # Code from module rmdir:
5441 # Code from module same-inode:
6ec2e0f5 5442 # Code from module save-cwd:
2d8adcbd 5443 # Code from module secure_getenv:
3d99e817 5444 # Code from module setenv:
0750520d 5445 # Code from module signal-h:
98399780 5446 # Code from module snippet/_Noreturn:
c971b7fa
PA
5447 # Code from module snippet/arg-nonnull:
5448 # Code from module snippet/c++defs:
5449 # Code from module snippet/warn-on-use:
8839a007 5450 # Code from module ssize_t:
2196f55f 5451 # Code from module stat:
8690e634 5452 # Code from module stdbool:
c971b7fa
PA
5453 # Code from module stddef:
5454 # Code from module stdint:
6a29c58e 5455 # Code from module stdio:
98399780 5456 # Code from module stdlib:
8424cc97 5457 # Code from module strchrnul:
6ec2e0f5 5458 # Code from module strdup-posix:
8690e634 5459 # Code from module streq:
6ec2e0f5
SDJ
5460 # Code from module strerror:
5461 # Code from module strerror-override:
c971b7fa 5462 # Code from module string:
8690e634 5463 # Code from module strnlen1:
63ce7108
TT
5464 # Code from module strstr:
5465 # Code from module strstr-simple:
421693b0 5466 # Code from module strtok_r:
09607c9e 5467 # Code from module sys_stat:
4a626d0a 5468 # Code from module sys_time:
8839a007 5469 # Code from module sys_types:
2d8adcbd 5470 # Code from module tempname:
09607c9e 5471 # Code from module time:
8839a007 5472 # Code from module unistd:
6ec2e0f5 5473 # Code from module unistd-safer:
3d99e817 5474 # Code from module unsetenv:
c971b7fa 5475 # Code from module update-copyright:
8690e634
JK
5476 # Code from module verify:
5477 # Code from module wchar:
5478 # Code from module wctype-h:
c971b7fa
PA
5479
5480ac_ext=c
5481ac_cpp='$CPP $CPPFLAGS'
5482ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5483ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5484ac_compiler_gnu=$ac_cv_c_compiler_gnu
5485if test -n "$ac_tool_prefix"; then
5486 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5487set dummy ${ac_tool_prefix}gcc; ac_word=$2
5488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5489$as_echo_n "checking for $ac_word... " >&6; }
5490if test "${ac_cv_prog_CC+set}" = set; then :
5491 $as_echo_n "(cached) " >&6
5492else
5493 if test -n "$CC"; then
5494 ac_cv_prog_CC="$CC" # Let the user override the test.
5495else
5496as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5497for as_dir in $PATH
5498do
5499 IFS=$as_save_IFS
5500 test -z "$as_dir" && as_dir=.
5501 for ac_exec_ext in '' $ac_executable_extensions; do
5502 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5503 ac_cv_prog_CC="${ac_tool_prefix}gcc"
5504 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5505 break 2
5506 fi
5507done
5508 done
5509IFS=$as_save_IFS
5510
5511fi
5512fi
5513CC=$ac_cv_prog_CC
5514if test -n "$CC"; then
5515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5516$as_echo "$CC" >&6; }
5517else
5518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5519$as_echo "no" >&6; }
5520fi
5521
5522
5523fi
5524if test -z "$ac_cv_prog_CC"; then
5525 ac_ct_CC=$CC
5526 # Extract the first word of "gcc", so it can be a program name with args.
5527set dummy gcc; ac_word=$2
5528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5529$as_echo_n "checking for $ac_word... " >&6; }
5530if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5531 $as_echo_n "(cached) " >&6
5532else
5533 if test -n "$ac_ct_CC"; then
5534 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5535else
5536as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5537for as_dir in $PATH
5538do
5539 IFS=$as_save_IFS
5540 test -z "$as_dir" && as_dir=.
5541 for ac_exec_ext in '' $ac_executable_extensions; do
5542 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5543 ac_cv_prog_ac_ct_CC="gcc"
5544 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5545 break 2
5546 fi
5547done
5548 done
5549IFS=$as_save_IFS
5550
5551fi
5552fi
5553ac_ct_CC=$ac_cv_prog_ac_ct_CC
5554if test -n "$ac_ct_CC"; then
5555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5556$as_echo "$ac_ct_CC" >&6; }
5557else
5558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5559$as_echo "no" >&6; }
5560fi
5561
5562 if test "x$ac_ct_CC" = x; then
5563 CC=""
5564 else
5565 case $cross_compiling:$ac_tool_warned in
5566yes:)
5567{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5568$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5569ac_tool_warned=yes ;;
5570esac
5571 CC=$ac_ct_CC
5572 fi
5573else
5574 CC="$ac_cv_prog_CC"
5575fi
5576
5577if test -z "$CC"; then
5578 if test -n "$ac_tool_prefix"; then
5579 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5580set dummy ${ac_tool_prefix}cc; ac_word=$2
5581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5582$as_echo_n "checking for $ac_word... " >&6; }
5583if test "${ac_cv_prog_CC+set}" = set; then :
5584 $as_echo_n "(cached) " >&6
5585else
5586 if test -n "$CC"; then
5587 ac_cv_prog_CC="$CC" # Let the user override the test.
5588else
5589as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5590for as_dir in $PATH
5591do
5592 IFS=$as_save_IFS
5593 test -z "$as_dir" && as_dir=.
5594 for ac_exec_ext in '' $ac_executable_extensions; do
5595 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5596 ac_cv_prog_CC="${ac_tool_prefix}cc"
5597 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5598 break 2
5599 fi
5600done
5601 done
5602IFS=$as_save_IFS
5603
5604fi
5605fi
5606CC=$ac_cv_prog_CC
5607if test -n "$CC"; then
5608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5609$as_echo "$CC" >&6; }
5610else
5611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5612$as_echo "no" >&6; }
5613fi
5614
5615
5616 fi
5617fi
5618if test -z "$CC"; then
5619 # Extract the first word of "cc", so it can be a program name with args.
5620set dummy cc; ac_word=$2
5621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5622$as_echo_n "checking for $ac_word... " >&6; }
5623if test "${ac_cv_prog_CC+set}" = set; then :
5624 $as_echo_n "(cached) " >&6
5625else
5626 if test -n "$CC"; then
5627 ac_cv_prog_CC="$CC" # Let the user override the test.
5628else
5629 ac_prog_rejected=no
5630as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5631for as_dir in $PATH
5632do
5633 IFS=$as_save_IFS
5634 test -z "$as_dir" && as_dir=.
5635 for ac_exec_ext in '' $ac_executable_extensions; do
5636 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5637 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5638 ac_prog_rejected=yes
5639 continue
5640 fi
5641 ac_cv_prog_CC="cc"
5642 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5643 break 2
5644 fi
5645done
5646 done
5647IFS=$as_save_IFS
5648
5649if test $ac_prog_rejected = yes; then
5650 # We found a bogon in the path, so make sure we never use it.
5651 set dummy $ac_cv_prog_CC
5652 shift
5653 if test $# != 0; then
5654 # We chose a different compiler from the bogus one.
5655 # However, it has the same basename, so the bogon will be chosen
5656 # first if we set CC to just the basename; use the full file name.
5657 shift
5658 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
5659 fi
5660fi
5661fi
5662fi
5663CC=$ac_cv_prog_CC
5664if test -n "$CC"; then
5665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5666$as_echo "$CC" >&6; }
5667else
5668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5669$as_echo "no" >&6; }
5670fi
5671
5672
5673fi
5674if test -z "$CC"; then
5675 if test -n "$ac_tool_prefix"; then
5676 for ac_prog in cl.exe
5677 do
5678 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5679set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5681$as_echo_n "checking for $ac_word... " >&6; }
5682if test "${ac_cv_prog_CC+set}" = set; then :
5683 $as_echo_n "(cached) " >&6
5684else
5685 if test -n "$CC"; then
5686 ac_cv_prog_CC="$CC" # Let the user override the test.
5687else
5688as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5689for as_dir in $PATH
5690do
5691 IFS=$as_save_IFS
5692 test -z "$as_dir" && as_dir=.
5693 for ac_exec_ext in '' $ac_executable_extensions; do
5694 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5695 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5696 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5697 break 2
5698 fi
5699done
5700 done
5701IFS=$as_save_IFS
5702
5703fi
5704fi
5705CC=$ac_cv_prog_CC
5706if test -n "$CC"; then
5707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5708$as_echo "$CC" >&6; }
5709else
5710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5711$as_echo "no" >&6; }
5712fi
5713
5714
5715 test -n "$CC" && break
5716 done
5717fi
5718if test -z "$CC"; then
5719 ac_ct_CC=$CC
5720 for ac_prog in cl.exe
5721do
5722 # Extract the first word of "$ac_prog", so it can be a program name with args.
5723set dummy $ac_prog; ac_word=$2
5724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5725$as_echo_n "checking for $ac_word... " >&6; }
5726if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5727 $as_echo_n "(cached) " >&6
5728else
5729 if test -n "$ac_ct_CC"; then
5730 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5731else
5732as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5733for as_dir in $PATH
5734do
5735 IFS=$as_save_IFS
5736 test -z "$as_dir" && as_dir=.
5737 for ac_exec_ext in '' $ac_executable_extensions; do
5738 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5739 ac_cv_prog_ac_ct_CC="$ac_prog"
5740 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5741 break 2
5742 fi
5743done
5744 done
5745IFS=$as_save_IFS
5746
5747fi
5748fi
5749ac_ct_CC=$ac_cv_prog_ac_ct_CC
5750if test -n "$ac_ct_CC"; then
5751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5752$as_echo "$ac_ct_CC" >&6; }
5753else
5754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5755$as_echo "no" >&6; }
5756fi
5757
5758
5759 test -n "$ac_ct_CC" && break
5760done
5761
5762 if test "x$ac_ct_CC" = x; then
5763 CC=""
5764 else
5765 case $cross_compiling:$ac_tool_warned in
5766yes:)
5767{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5768$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5769ac_tool_warned=yes ;;
5770esac
5771 CC=$ac_ct_CC
5772 fi
5773fi
5774
5775fi
5776
5777
5778test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5779$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5780as_fn_error "no acceptable C compiler found in \$PATH
5781See \`config.log' for more details." "$LINENO" 5; }
5782
5783# Provide some information about the compiler.
5784$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5785set X $ac_compile
5786ac_compiler=$2
5787for ac_option in --version -v -V -qversion; do
5788 { { ac_try="$ac_compiler $ac_option >&5"
5789case "(($ac_try" in
5790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5791 *) ac_try_echo=$ac_try;;
5792esac
5793eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5794$as_echo "$ac_try_echo"; } >&5
5795 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5796 ac_status=$?
5797 if test -s conftest.err; then
5798 sed '10a\
5799... rest of stderr output deleted ...
5800 10q' conftest.err >conftest.er1
5801 cat conftest.er1 >&5
5802 rm -f conftest.er1 conftest.err
5803 fi
5804 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5805 test $ac_status = 0; }
5806done
5807
5808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5809$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
5810if test "${ac_cv_c_compiler_gnu+set}" = set; then :
5811 $as_echo_n "(cached) " >&6
5812else
5813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5814/* end confdefs.h. */
5815
5816int
5817main ()
5818{
5819#ifndef __GNUC__
5820 choke me
5821#endif
5822
5823 ;
5824 return 0;
5825}
5826_ACEOF
5827if ac_fn_c_try_compile "$LINENO"; then :
5828 ac_compiler_gnu=yes
5829else
5830 ac_compiler_gnu=no
5831fi
5832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5833ac_cv_c_compiler_gnu=$ac_compiler_gnu
5834
5835fi
5836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5837$as_echo "$ac_cv_c_compiler_gnu" >&6; }
5838if test $ac_compiler_gnu = yes; then
5839 GCC=yes
5840else
5841 GCC=
5842fi
5843ac_test_CFLAGS=${CFLAGS+set}
5844ac_save_CFLAGS=$CFLAGS
5845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5846$as_echo_n "checking whether $CC accepts -g... " >&6; }
5847if test "${ac_cv_prog_cc_g+set}" = set; then :
5848 $as_echo_n "(cached) " >&6
5849else
5850 ac_save_c_werror_flag=$ac_c_werror_flag
5851 ac_c_werror_flag=yes
5852 ac_cv_prog_cc_g=no
5853 CFLAGS="-g"
5854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5855/* end confdefs.h. */
5856
5857int
5858main ()
5859{
5860
5861 ;
5862 return 0;
5863}
5864_ACEOF
5865if ac_fn_c_try_compile "$LINENO"; then :
5866 ac_cv_prog_cc_g=yes
5867else
5868 CFLAGS=""
5869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5870/* end confdefs.h. */
5871
5872int
5873main ()
5874{
5875
5876 ;
5877 return 0;
5878}
5879_ACEOF
5880if ac_fn_c_try_compile "$LINENO"; then :
5881
5882else
5883 ac_c_werror_flag=$ac_save_c_werror_flag
5884 CFLAGS="-g"
5885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5886/* end confdefs.h. */
5887
5888int
5889main ()
5890{
5891
5892 ;
5893 return 0;
5894}
5895_ACEOF
5896if ac_fn_c_try_compile "$LINENO"; then :
5897 ac_cv_prog_cc_g=yes
5898fi
5899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5900fi
5901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5902fi
5903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5904 ac_c_werror_flag=$ac_save_c_werror_flag
5905fi
5906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5907$as_echo "$ac_cv_prog_cc_g" >&6; }
5908if test "$ac_test_CFLAGS" = set; then
5909 CFLAGS=$ac_save_CFLAGS
5910elif test $ac_cv_prog_cc_g = yes; then
5911 if test "$GCC" = yes; then
5912 CFLAGS="-g -O2"
5913 else
5914 CFLAGS="-g"
5915 fi
5916else
5917 if test "$GCC" = yes; then
5918 CFLAGS="-O2"
5919 else
5920 CFLAGS=
5921 fi
5922fi
5923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5924$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5925if test "${ac_cv_prog_cc_c89+set}" = set; then :
5926 $as_echo_n "(cached) " >&6
5927else
5928 ac_cv_prog_cc_c89=no
5929ac_save_CC=$CC
5930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5931/* end confdefs.h. */
5932#include <stdarg.h>
5933#include <stdio.h>
5934#include <sys/types.h>
5935#include <sys/stat.h>
5936/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5937struct buf { int x; };
5938FILE * (*rcsopen) (struct buf *, struct stat *, int);
5939static char *e (p, i)
5940 char **p;
5941 int i;
5942{
5943 return p[i];
5944}
5945static char *f (char * (*g) (char **, int), char **p, ...)
5946{
5947 char *s;
5948 va_list v;
5949 va_start (v,p);
5950 s = g (p, va_arg (v,int));
5951 va_end (v);
5952 return s;
5953}
5954
5955/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5956 function prototypes and stuff, but not '\xHH' hex character constants.
5957 These don't provoke an error unfortunately, instead are silently treated
5958 as 'x'. The following induces an error, until -std is added to get
5959 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5960 array size at least. It's necessary to write '\x00'==0 to get something
5961 that's true only with -std. */
5962int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5963
5964/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5965 inside strings and character constants. */
5966#define FOO(x) 'x'
5967int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5968
5969int test (int i, double x);
5970struct s1 {int (*f) (int a);};
5971struct s2 {int (*f) (double a);};
5972int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5973int argc;
5974char **argv;
5975int
5976main ()
5977{
5978return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5979 ;
5980 return 0;
5981}
5982_ACEOF
5983for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5984 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5985do
5986 CC="$ac_save_CC $ac_arg"
5987 if ac_fn_c_try_compile "$LINENO"; then :
5988 ac_cv_prog_cc_c89=$ac_arg
5989fi
5990rm -f core conftest.err conftest.$ac_objext
5991 test "x$ac_cv_prog_cc_c89" != "xno" && break
5992done
5993rm -f conftest.$ac_ext
5994CC=$ac_save_CC
5995
5996fi
5997# AC_CACHE_VAL
5998case "x$ac_cv_prog_cc_c89" in
5999 x)
6000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6001$as_echo "none needed" >&6; } ;;
6002 xno)
6003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6004$as_echo "unsupported" >&6; } ;;
6005 *)
6006 CC="$CC $ac_cv_prog_cc_c89"
6007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6008$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6009esac
6010if test "x$ac_cv_prog_cc_c89" != xno; then :
6011
6012fi
6013
6014ac_ext=c
6015ac_cpp='$CPP $CPPFLAGS'
6016ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6017ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6018ac_compiler_gnu=$ac_cv_c_compiler_gnu
6019
6020
6021am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
6022
6023
6024ac_aux_dir=
6025for ac_dir in ../.. "$srcdir"/../..; do
6026 for ac_t in install-sh install.sh shtool; do
6027 if test -f "$ac_dir/$ac_t"; then
6028 ac_aux_dir=$ac_dir
6029 ac_install_sh="$ac_aux_dir/$ac_t -c"
6030 break 2
6031 fi
6032 done
6033done
6034if test -z "$ac_aux_dir"; then
6035 as_fn_error "cannot find install-sh, install.sh, or shtool in ../.. \"$srcdir\"/../.." "$LINENO" 5
6036fi
6037
6038# These three variables are undocumented and unsupported,
6039# and are intended to be withdrawn in a future Autoconf release.
6040# They can cause serious problems if a builder's source tree is in a directory
6041# whose full name contains unusual characters.
6042ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
6043ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
6044ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
6045
6046
6047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6048$as_echo_n "checking target system type... " >&6; }
6049if test "${ac_cv_target+set}" = set; then :
6050 $as_echo_n "(cached) " >&6
6051else
6052 if test "x$target_alias" = x; then
6053 ac_cv_target=$ac_cv_host
6054else
6055 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6056 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6057fi
6058
6059fi
6060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6061$as_echo "$ac_cv_target" >&6; }
6062case $ac_cv_target in
6063*-*-*) ;;
6064*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
6065esac
6066target=$ac_cv_target
6067ac_save_IFS=$IFS; IFS='-'
6068set x $ac_cv_target
6069shift
6070target_cpu=$1
6071target_vendor=$2
6072shift; shift
6073# Remember, the first character of IFS is used to create $*,
6074# except with old shells:
6075target_os=$*
6076IFS=$ac_save_IFS
6077case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6078
6079
6080# The aliases save the names the user supplied, while $host etc.
6081# will get canonicalized.
6082test -n "$target_alias" &&
6083 test "$program_prefix$program_suffix$program_transform_name" = \
6084 NONENONEs,x,x, &&
6085 program_prefix=${target_alias}-
6086
6087
6088
6089
6090
6091
6092
6093 LIBC_FATAL_STDERR_=1
6094 export LIBC_FATAL_STDERR_
6095
8690e634
JK
6096# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6097# for constant arguments. Useless!
6098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
6099$as_echo_n "checking for working alloca.h... " >&6; }
6100if test "${ac_cv_working_alloca_h+set}" = set; then :
c971b7fa
PA
6101 $as_echo_n "(cached) " >&6
6102else
8690e634 6103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 6104/* end confdefs.h. */
8690e634 6105#include <alloca.h>
c971b7fa
PA
6106int
6107main ()
6108{
8690e634
JK
6109char *p = (char *) alloca (2 * sizeof (int));
6110 if (p) return 0;
c971b7fa
PA
6111 ;
6112 return 0;
6113}
c971b7fa
PA
6114_ACEOF
6115if ac_fn_c_try_link "$LINENO"; then :
8690e634 6116 ac_cv_working_alloca_h=yes
c971b7fa 6117else
8690e634 6118 ac_cv_working_alloca_h=no
c971b7fa
PA
6119fi
6120rm -f core conftest.err conftest.$ac_objext \
6121 conftest$ac_exeext conftest.$ac_ext
c971b7fa 6122fi
8690e634
JK
6123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
6124$as_echo "$ac_cv_working_alloca_h" >&6; }
6125if test $ac_cv_working_alloca_h = yes; then
c971b7fa 6126
8690e634 6127$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c971b7fa 6128
8690e634 6129fi
c971b7fa 6130
8690e634
JK
6131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
6132$as_echo_n "checking for alloca... " >&6; }
6133if test "${ac_cv_func_alloca_works+set}" = set; then :
c971b7fa 6134 $as_echo_n "(cached) " >&6
c971b7fa
PA
6135else
6136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6137/* end confdefs.h. */
8690e634
JK
6138#ifdef __GNUC__
6139# define alloca __builtin_alloca
6140#else
6141# ifdef _MSC_VER
6142# include <malloc.h>
6143# define alloca _alloca
6144# else
6145# ifdef HAVE_ALLOCA_H
6146# include <alloca.h>
6147# else
6148# ifdef _AIX
6149 #pragma alloca
6150# else
6151# ifndef alloca /* predefined by HP cc +Olibcalls */
6152char *alloca ();
6153# endif
6154# endif
6155# endif
6156# endif
6157#endif
6158
c971b7fa
PA
6159int
6160main ()
6161{
8690e634
JK
6162char *p = (char *) alloca (1);
6163 if (p) return 0;
c971b7fa
PA
6164 ;
6165 return 0;
6166}
6167_ACEOF
8690e634
JK
6168if ac_fn_c_try_link "$LINENO"; then :
6169 ac_cv_func_alloca_works=yes
c971b7fa 6170else
8690e634 6171 ac_cv_func_alloca_works=no
c971b7fa 6172fi
8690e634
JK
6173rm -f core conftest.err conftest.$ac_objext \
6174 conftest$ac_exeext conftest.$ac_ext
c971b7fa 6175fi
a143c6de
JB
6176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
6177$as_echo "$ac_cv_func_alloca_works" >&6; }
c971b7fa 6178
a143c6de 6179if test $ac_cv_func_alloca_works = yes; then
c971b7fa 6180
a143c6de 6181$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c971b7fa 6182
a143c6de
JB
6183else
6184 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6185# that cause trouble. Some versions do not even contain alloca or
6186# contain a buggy version. If you still want to use their alloca,
6187# use ar to extract alloca.o from them instead of compiling alloca.c.
c971b7fa
PA
6188
6189
6190
6191
6192
a143c6de 6193ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
c971b7fa 6194
a143c6de 6195$as_echo "#define C_ALLOCA 1" >>confdefs.h
c971b7fa 6196
c971b7fa 6197
a143c6de
JB
6198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'alloca.c' needs Cray hooks" >&5
6199$as_echo_n "checking whether 'alloca.c' needs Cray hooks... " >&6; }
6200if test "${ac_cv_os_cray+set}" = set; then :
8690e634
JK
6201 $as_echo_n "(cached) " >&6
6202else
a143c6de 6203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 6204/* end confdefs.h. */
a143c6de
JB
6205#if defined CRAY && ! defined CRAY2
6206webecray
6207#else
6208wenotbecray
8690e634 6209#endif
c971b7fa 6210
8690e634
JK
6211_ACEOF
6212if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
a143c6de
JB
6213 $EGREP "webecray" >/dev/null 2>&1; then :
6214 ac_cv_os_cray=yes
8690e634 6215else
a143c6de 6216 ac_cv_os_cray=no
8690e634
JK
6217fi
6218rm -f conftest*
c971b7fa 6219
c0fc7f8b 6220fi
a143c6de
JB
6221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
6222$as_echo "$ac_cv_os_cray" >&6; }
6223if test $ac_cv_os_cray = yes; then
6224 for ac_func in _getb67 GETB67 getb67; do
6225 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6226ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6227eval as_val=\$$as_ac_var
6228 if test "x$as_val" = x""yes; then :
c0fc7f8b 6229
a143c6de
JB
6230cat >>confdefs.h <<_ACEOF
6231#define CRAY_STACKSEG_END $ac_func
6232_ACEOF
c971b7fa 6233
a143c6de 6234 break
8690e634 6235fi
c971b7fa 6236
a143c6de 6237 done
8690e634 6238fi
c0fc7f8b 6239
a143c6de
JB
6240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
6241$as_echo_n "checking stack direction for C alloca... " >&6; }
6242if test "${ac_cv_c_stack_direction+set}" = set; then :
c971b7fa
PA
6243 $as_echo_n "(cached) " >&6
6244else
a143c6de
JB
6245 if test "$cross_compiling" = yes; then :
6246 ac_cv_c_stack_direction=0
6247else
6248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 6249/* end confdefs.h. */
a143c6de
JB
6250$ac_includes_default
6251int
6252find_stack_direction (int *addr, int depth)
6253{
6254 int dir, dummy = 0;
6255 if (! addr)
6256 addr = &dummy;
6257 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
6258 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
6259 return dir + dummy;
6260}
8690e634 6261
a143c6de
JB
6262int
6263main (int argc, char **argv)
6264{
6265 return find_stack_direction (0, argc + !argv + 20) < 0;
6266}
c971b7fa 6267_ACEOF
a143c6de
JB
6268if ac_fn_c_try_run "$LINENO"; then :
6269 ac_cv_c_stack_direction=1
c971b7fa 6270else
a143c6de 6271 ac_cv_c_stack_direction=-1
8690e634 6272fi
a143c6de
JB
6273rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6274 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 6275fi
c971b7fa
PA
6276
6277fi
a143c6de
JB
6278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
6279$as_echo "$ac_cv_c_stack_direction" >&6; }
6280cat >>confdefs.h <<_ACEOF
6281#define STACK_DIRECTION $ac_cv_c_stack_direction
6282_ACEOF
8690e634 6283
c971b7fa
PA
6284
6285fi
c971b7fa
PA
6286
6287
98399780
YQ
6288 GNULIB__EXIT=0;
6289 GNULIB_ATOLL=0;
6290 GNULIB_CALLOC_POSIX=0;
6291 GNULIB_CANONICALIZE_FILE_NAME=0;
6292 GNULIB_GETLOADAVG=0;
6293 GNULIB_GETSUBOPT=0;
6294 GNULIB_GRANTPT=0;
6295 GNULIB_MALLOC_POSIX=0;
6296 GNULIB_MBTOWC=0;
6297 GNULIB_MKDTEMP=0;
6298 GNULIB_MKOSTEMP=0;
6299 GNULIB_MKOSTEMPS=0;
6300 GNULIB_MKSTEMP=0;
6301 GNULIB_MKSTEMPS=0;
6302 GNULIB_POSIX_OPENPT=0;
6303 GNULIB_PTSNAME=0;
6304 GNULIB_PTSNAME_R=0;
6305 GNULIB_PUTENV=0;
4a626d0a 6306 GNULIB_QSORT_R=0;
98399780
YQ
6307 GNULIB_RANDOM=0;
6308 GNULIB_RANDOM_R=0;
6309 GNULIB_REALLOC_POSIX=0;
6310 GNULIB_REALPATH=0;
6311 GNULIB_RPMATCH=0;
4a626d0a 6312 GNULIB_SECURE_GETENV=0;
98399780
YQ
6313 GNULIB_SETENV=0;
6314 GNULIB_STRTOD=0;
6315 GNULIB_STRTOLL=0;
6316 GNULIB_STRTOULL=0;
6317 GNULIB_SYSTEM_POSIX=0;
6318 GNULIB_UNLOCKPT=0;
6319 GNULIB_UNSETENV=0;
6320 GNULIB_WCTOMB=0;
6321 HAVE__EXIT=1;
6322 HAVE_ATOLL=1;
6323 HAVE_CANONICALIZE_FILE_NAME=1;
6324 HAVE_DECL_GETLOADAVG=1;
6325 HAVE_GETSUBOPT=1;
6326 HAVE_GRANTPT=1;
6327 HAVE_MKDTEMP=1;
6328 HAVE_MKOSTEMP=1;
6329 HAVE_MKOSTEMPS=1;
6330 HAVE_MKSTEMP=1;
6331 HAVE_MKSTEMPS=1;
6332 HAVE_POSIX_OPENPT=1;
6333 HAVE_PTSNAME=1;
6334 HAVE_PTSNAME_R=1;
4c62b19f 6335 HAVE_QSORT_R=1;
98399780
YQ
6336 HAVE_RANDOM=1;
6337 HAVE_RANDOM_H=1;
6338 HAVE_RANDOM_R=1;
6339 HAVE_REALPATH=1;
6340 HAVE_RPMATCH=1;
4a626d0a 6341 HAVE_SECURE_GETENV=1;
98399780
YQ
6342 HAVE_SETENV=1;
6343 HAVE_DECL_SETENV=1;
6344 HAVE_STRTOD=1;
6345 HAVE_STRTOLL=1;
6346 HAVE_STRTOULL=1;
6347 HAVE_STRUCT_RANDOM_DATA=1;
6348 HAVE_SYS_LOADAVG_H=0;
6349 HAVE_UNLOCKPT=1;
6350 HAVE_DECL_UNSETENV=1;
6351 REPLACE_CALLOC=0;
6352 REPLACE_CANONICALIZE_FILE_NAME=0;
6353 REPLACE_MALLOC=0;
6354 REPLACE_MBTOWC=0;
6355 REPLACE_MKSTEMP=0;
6356 REPLACE_PTSNAME=0;
6357 REPLACE_PTSNAME_R=0;
6358 REPLACE_PUTENV=0;
4a626d0a 6359 REPLACE_QSORT_R=0;
98399780
YQ
6360 REPLACE_RANDOM_R=0;
6361 REPLACE_REALLOC=0;
6362 REPLACE_REALPATH=0;
6363 REPLACE_SETENV=0;
6364 REPLACE_STRTOD=0;
6365 REPLACE_UNSETENV=0;
6366 REPLACE_WCTOMB=0;
6367
6368
6369
6370
6371 for ac_func in $ac_func_list
6372do :
6373 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6374ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6375eval as_val=\$$as_ac_var
6376 if test "x$as_val" = x""yes; then :
6377 cat >>confdefs.h <<_ACEOF
6378#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6379_ACEOF
6380
6381fi
6382done
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
6393$as_echo_n "checking whether // is distinct from /... " >&6; }
6394if test "${gl_cv_double_slash_root+set}" = set; then :
6395 $as_echo_n "(cached) " >&6
6396else
6397 if test x"$cross_compiling" = xyes ; then
6398 # When cross-compiling, there is no way to tell whether // is special
6399 # short of a list of hosts. However, the only known hosts to date
6400 # that have a distinct // are Apollo DomainOS (too old to port to),
6401 # Cygwin, and z/OS. If anyone knows of another system for which // has
6402 # special semantics and is distinct from /, please report it to
6403 # <bug-gnulib@gnu.org>.
6404 case $host in
6405 *-cygwin | i370-ibm-openedition)
6406 gl_cv_double_slash_root=yes ;;
6407 *)
6408 # Be optimistic and assume that / and // are the same when we
6409 # don't know.
6410 gl_cv_double_slash_root='unknown, assuming no' ;;
6411 esac
6412 else
6413 set x `ls -di / // 2>/dev/null`
6414 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
6415 gl_cv_double_slash_root=no
6416 else
6417 gl_cv_double_slash_root=yes
6418 fi
6419 fi
6420fi
6421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
6422$as_echo "$gl_cv_double_slash_root" >&6; }
6423 if test "$gl_cv_double_slash_root" = yes; then
6424
6425$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
6426
6427 fi
6428
6429
6430
6431
6432
6433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
6434$as_echo_n "checking whether realpath works... " >&6; }
6435if test "${gl_cv_func_realpath_works+set}" = set; then :
6436 $as_echo_n "(cached) " >&6
6437else
6438
6439 touch conftest.a
6440 mkdir conftest.d
6441 if test "$cross_compiling" = yes; then :
6442 case "$host_os" in
6443 # Guess yes on glibc systems.
6444 *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
6445 # If we don't know, assume the worst.
6446 *) gl_cv_func_realpath_works="guessing no" ;;
6447 esac
6448
6449else
6450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6451/* end confdefs.h. */
6452
6453
6454
6455#include <stdlib.h>
6456#if defined __MACH__ && defined __APPLE__
6457/* Avoid a crash on Mac OS X. */
6458#include <mach/mach.h>
6459#include <mach/mach_error.h>
6460#include <mach/thread_status.h>
6461#include <mach/exception.h>
6462#include <mach/task.h>
6463#include <pthread.h>
6464/* The exception port on which our thread listens. */
6465static mach_port_t our_exception_port;
6466/* The main function of the thread listening for exceptions of type
6467 EXC_BAD_ACCESS. */
6468static void *
6469mach_exception_thread (void *arg)
6470{
6471 /* Buffer for a message to be received. */
6472 struct {
6473 mach_msg_header_t head;
6474 mach_msg_body_t msgh_body;
6475 char data[1024];
6476 } msg;
6477 mach_msg_return_t retval;
6478 /* Wait for a message on the exception port. */
6479 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
6480 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
6481 if (retval != MACH_MSG_SUCCESS)
6482 abort ();
6483 exit (1);
6484}
6485static void
6486nocrash_init (void)
6487{
6488 mach_port_t self = mach_task_self ();
6489 /* Allocate a port on which the thread shall listen for exceptions. */
6490 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
6491 == KERN_SUCCESS) {
6492 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
6493 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
6494 MACH_MSG_TYPE_MAKE_SEND)
6495 == KERN_SUCCESS) {
6496 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
6497 for us. */
6498 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
6499 /* Create the thread listening on the exception port. */
6500 pthread_attr_t attr;
6501 pthread_t thread;
6502 if (pthread_attr_init (&attr) == 0
6503 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
6504 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
6505 pthread_attr_destroy (&attr);
6506 /* Replace the exception port info for these exceptions with our own.
6507 Note that we replace the exception port for the entire task, not only
6508 for a particular thread. This has the effect that when our exception
6509 port gets the message, the thread specific exception port has already
6510 been asked, and we don't need to bother about it.
6511 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
6512 task_set_exception_ports (self, mask, our_exception_port,
6513 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
6514 }
6515 }
6516 }
6517}
6518#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6519/* Avoid a crash on native Windows. */
6520#define WIN32_LEAN_AND_MEAN
6521#include <windows.h>
6522#include <winerror.h>
6523static LONG WINAPI
6524exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
6525{
6526 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
6527 {
6528 case EXCEPTION_ACCESS_VIOLATION:
6529 case EXCEPTION_IN_PAGE_ERROR:
6530 case EXCEPTION_STACK_OVERFLOW:
6531 case EXCEPTION_GUARD_PAGE:
6532 case EXCEPTION_PRIV_INSTRUCTION:
6533 case EXCEPTION_ILLEGAL_INSTRUCTION:
6534 case EXCEPTION_DATATYPE_MISALIGNMENT:
6535 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
6536 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
6537 exit (1);
6538 }
6539 return EXCEPTION_CONTINUE_SEARCH;
6540}
6541static void
6542nocrash_init (void)
6543{
6544 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
6545}
6546#else
6547/* Avoid a crash on POSIX systems. */
6548#include <signal.h>
49e4877c 6549#include <unistd.h>
98399780
YQ
6550/* A POSIX signal handler. */
6551static void
6552exception_handler (int sig)
6553{
49e4877c 6554 _exit (1);
98399780
YQ
6555}
6556static void
6557nocrash_init (void)
6558{
6559#ifdef SIGSEGV
6560 signal (SIGSEGV, exception_handler);
6561#endif
6562#ifdef SIGBUS
6563 signal (SIGBUS, exception_handler);
6564#endif
6565}
6566#endif
6567
6568 #include <stdlib.h>
6569 #include <string.h>
6570
6571int
6572main ()
6573{
6574
6575 int result = 0;
6576 {
6577 char *name = realpath ("conftest.a", NULL);
6578 if (!(name && *name == '/'))
6579 result |= 1;
49e4877c 6580 free (name);
98399780
YQ
6581 }
6582 {
6583 char *name = realpath ("conftest.b/../conftest.a", NULL);
6584 if (name != NULL)
6585 result |= 2;
49e4877c 6586 free (name);
98399780
YQ
6587 }
6588 {
6589 char *name = realpath ("conftest.a/", NULL);
6590 if (name != NULL)
6591 result |= 4;
49e4877c 6592 free (name);
98399780
YQ
6593 }
6594 {
6595 char *name1 = realpath (".", NULL);
6596 char *name2 = realpath ("conftest.d//./..", NULL);
49e4877c 6597 if (! name1 || ! name2 || strcmp (name1, name2))
98399780 6598 result |= 8;
49e4877c
PA
6599 free (name1);
6600 free (name2);
98399780
YQ
6601 }
6602 return result;
6603
6604 ;
6605 return 0;
6606}
6607
6608_ACEOF
6609if ac_fn_c_try_run "$LINENO"; then :
6610 gl_cv_func_realpath_works=yes
6611else
6612 gl_cv_func_realpath_works=no
6613fi
6614rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6615 conftest.$ac_objext conftest.beam conftest.$ac_ext
6616fi
6617
6618 rm -rf conftest.a conftest.d
6619
6620fi
6621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
6622$as_echo "$gl_cv_func_realpath_works" >&6; }
6623 case "$gl_cv_func_realpath_works" in
6624 *yes)
6625
6626$as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
6627
6628 ;;
6629 esac
6630
6631
6632
6633
6634 for ac_header in $ac_header_list
6635do :
6636 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6637ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6638"
6639eval as_val=\$$as_ac_Header
6640 if test "x$as_val" = x""yes; then :
6641 cat >>confdefs.h <<_ACEOF
6642#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6643_ACEOF
6644
6645fi
6646
6647done
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
e26b6bb0
TT
6659 GNULIB_CHDIR=0;
6660 GNULIB_CHOWN=0;
6661 GNULIB_CLOSE=0;
6662 GNULIB_DUP=0;
6663 GNULIB_DUP2=0;
6664 GNULIB_DUP3=0;
6665 GNULIB_ENVIRON=0;
6666 GNULIB_EUIDACCESS=0;
6667 GNULIB_FACCESSAT=0;
6668 GNULIB_FCHDIR=0;
6669 GNULIB_FCHOWNAT=0;
6670 GNULIB_FDATASYNC=0;
6671 GNULIB_FSYNC=0;
6672 GNULIB_FTRUNCATE=0;
6673 GNULIB_GETCWD=0;
6674 GNULIB_GETDOMAINNAME=0;
6675 GNULIB_GETDTABLESIZE=0;
6676 GNULIB_GETGROUPS=0;
6677 GNULIB_GETHOSTNAME=0;
6678 GNULIB_GETLOGIN=0;
6679 GNULIB_GETLOGIN_R=0;
6680 GNULIB_GETPAGESIZE=0;
6681 GNULIB_GETUSERSHELL=0;
6682 GNULIB_GROUP_MEMBER=0;
6683 GNULIB_ISATTY=0;
6684 GNULIB_LCHOWN=0;
6685 GNULIB_LINK=0;
6686 GNULIB_LINKAT=0;
6687 GNULIB_LSEEK=0;
6688 GNULIB_PIPE=0;
6689 GNULIB_PIPE2=0;
6690 GNULIB_PREAD=0;
6691 GNULIB_PWRITE=0;
6692 GNULIB_READ=0;
6693 GNULIB_READLINK=0;
6694 GNULIB_READLINKAT=0;
6695 GNULIB_RMDIR=0;
6696 GNULIB_SETHOSTNAME=0;
6697 GNULIB_SLEEP=0;
6698 GNULIB_SYMLINK=0;
6699 GNULIB_SYMLINKAT=0;
6700 GNULIB_TTYNAME_R=0;
6701 GNULIB_UNISTD_H_NONBLOCKING=0;
6702 GNULIB_UNISTD_H_SIGPIPE=0;
6703 GNULIB_UNLINK=0;
6704 GNULIB_UNLINKAT=0;
6705 GNULIB_USLEEP=0;
6706 GNULIB_WRITE=0;
6707 HAVE_CHOWN=1;
6708 HAVE_DUP2=1;
6709 HAVE_DUP3=1;
6710 HAVE_EUIDACCESS=1;
6711 HAVE_FACCESSAT=1;
6712 HAVE_FCHDIR=1;
6713 HAVE_FCHOWNAT=1;
6714 HAVE_FDATASYNC=1;
6715 HAVE_FSYNC=1;
6716 HAVE_FTRUNCATE=1;
6717 HAVE_GETDTABLESIZE=1;
6718 HAVE_GETGROUPS=1;
6719 HAVE_GETHOSTNAME=1;
6720 HAVE_GETLOGIN=1;
6721 HAVE_GETPAGESIZE=1;
6722 HAVE_GROUP_MEMBER=1;
6723 HAVE_LCHOWN=1;
6724 HAVE_LINK=1;
6725 HAVE_LINKAT=1;
6726 HAVE_PIPE=1;
6727 HAVE_PIPE2=1;
6728 HAVE_PREAD=1;
6729 HAVE_PWRITE=1;
6730 HAVE_READLINK=1;
6731 HAVE_READLINKAT=1;
6732 HAVE_SETHOSTNAME=1;
6733 HAVE_SLEEP=1;
6734 HAVE_SYMLINK=1;
6735 HAVE_SYMLINKAT=1;
6736 HAVE_UNLINKAT=1;
6737 HAVE_USLEEP=1;
6738 HAVE_DECL_ENVIRON=1;
6739 HAVE_DECL_FCHDIR=1;
6740 HAVE_DECL_FDATASYNC=1;
6741 HAVE_DECL_GETDOMAINNAME=1;
6742 HAVE_DECL_GETLOGIN_R=1;
6743 HAVE_DECL_GETPAGESIZE=1;
6744 HAVE_DECL_GETUSERSHELL=1;
6745 HAVE_DECL_SETHOSTNAME=1;
6746 HAVE_DECL_TTYNAME_R=1;
6747 HAVE_OS_H=0;
6748 HAVE_SYS_PARAM_H=0;
6749 REPLACE_CHOWN=0;
6750 REPLACE_CLOSE=0;
6751 REPLACE_DUP=0;
6752 REPLACE_DUP2=0;
6753 REPLACE_FCHOWNAT=0;
6754 REPLACE_FTRUNCATE=0;
6755 REPLACE_GETCWD=0;
6756 REPLACE_GETDOMAINNAME=0;
4a626d0a 6757 REPLACE_GETDTABLESIZE=0;
e26b6bb0
TT
6758 REPLACE_GETLOGIN_R=0;
6759 REPLACE_GETGROUPS=0;
6760 REPLACE_GETPAGESIZE=0;
6761 REPLACE_ISATTY=0;
6762 REPLACE_LCHOWN=0;
6763 REPLACE_LINK=0;
6764 REPLACE_LINKAT=0;
6765 REPLACE_LSEEK=0;
6766 REPLACE_PREAD=0;
6767 REPLACE_PWRITE=0;
6768 REPLACE_READ=0;
6769 REPLACE_READLINK=0;
4a626d0a 6770 REPLACE_READLINKAT=0;
e26b6bb0
TT
6771 REPLACE_RMDIR=0;
6772 REPLACE_SLEEP=0;
6773 REPLACE_SYMLINK=0;
4a626d0a 6774 REPLACE_SYMLINKAT=0;
e26b6bb0
TT
6775 REPLACE_TTYNAME_R=0;
6776 REPLACE_UNLINK=0;
6777 REPLACE_UNLINKAT=0;
6778 REPLACE_USLEEP=0;
6779 REPLACE_WRITE=0;
6780 UNISTD_H_HAVE_WINSOCK2_H=0;
6781 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
6782
6783
6784
6ec2e0f5
SDJ
6785
6786
6787
6788
6789
6790
6791
6792
6793 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
6794 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
6795
6796$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
6797
6798 else
6799 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
6800 fi
6801
6802
6803
6804
6805
6806
6807
e26b6bb0
TT
6808 GNULIB_OPENDIR=0;
6809 GNULIB_READDIR=0;
6810 GNULIB_REWINDDIR=0;
6811 GNULIB_CLOSEDIR=0;
6812 GNULIB_DIRFD=0;
6813 GNULIB_FDOPENDIR=0;
6814 GNULIB_SCANDIR=0;
6815 GNULIB_ALPHASORT=0;
6816 HAVE_OPENDIR=1;
6817 HAVE_READDIR=1;
6818 HAVE_REWINDDIR=1;
6819 HAVE_CLOSEDIR=1;
6820 HAVE_DECL_DIRFD=1;
6821 HAVE_DECL_FDOPENDIR=1;
6822 HAVE_FDOPENDIR=1;
6823 HAVE_SCANDIR=1;
6824 HAVE_ALPHASORT=1;
6825 REPLACE_OPENDIR=0;
6826 REPLACE_CLOSEDIR=0;
6827 REPLACE_DIRFD=0;
6828 REPLACE_FDOPENDIR=0;
6829
6830
6831
6832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
6833$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
6834if test "${gl_cv_have_include_next+set}" = set; then :
6835 $as_echo_n "(cached) " >&6
6836else
6837 rm -rf conftestd1a conftestd1b conftestd2
6838 mkdir conftestd1a conftestd1b conftestd2
6839 cat <<EOF > conftestd1a/conftest.h
6840#define DEFINED_IN_CONFTESTD1
6841#include_next <conftest.h>
6842#ifdef DEFINED_IN_CONFTESTD2
6843int foo;
6844#else
88b48903
WN
6845#error "include_next doesn't work"
6846#endif
6847EOF
6848 cat <<EOF > conftestd1b/conftest.h
6849#define DEFINED_IN_CONFTESTD1
6850#include <stdio.h>
6851#include_next <conftest.h>
6852#ifdef DEFINED_IN_CONFTESTD2
6853int foo;
6854#else
6855#error "include_next doesn't work"
6856#endif
6857EOF
6858 cat <<EOF > conftestd2/conftest.h
6859#ifndef DEFINED_IN_CONFTESTD1
6860#error "include_next test doesn't work"
6861#endif
6862#define DEFINED_IN_CONFTESTD2
6863EOF
6864 gl_save_CPPFLAGS="$CPPFLAGS"
6865 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
6866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6867/* end confdefs.h. */
6868#include <conftest.h>
6869_ACEOF
6870if ac_fn_c_try_compile "$LINENO"; then :
6871 gl_cv_have_include_next=yes
6872else
6873 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
6874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6875/* end confdefs.h. */
6876#include <conftest.h>
6877_ACEOF
6878if ac_fn_c_try_compile "$LINENO"; then :
6879 gl_cv_have_include_next=buggy
6880else
6881 gl_cv_have_include_next=no
6882fi
6883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6884
6885fi
6886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6887 CPPFLAGS="$gl_save_CPPFLAGS"
6888 rm -rf conftestd1a conftestd1b conftestd2
6889
6890fi
6891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
6892$as_echo "$gl_cv_have_include_next" >&6; }
6893 PRAGMA_SYSTEM_HEADER=
6894 if test $gl_cv_have_include_next = yes; then
6895 INCLUDE_NEXT=include_next
6896 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
6897 if test -n "$GCC"; then
6898 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
6899 fi
6900 else
6901 if test $gl_cv_have_include_next = buggy; then
6902 INCLUDE_NEXT=include
6903 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
6904 else
6905 INCLUDE_NEXT=include
6906 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
6907 fi
6908 fi
6909
6910
6911
6912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
6913$as_echo_n "checking whether system header files limit the line length... " >&6; }
6914if test "${gl_cv_pragma_columns+set}" = set; then :
6915 $as_echo_n "(cached) " >&6
6916else
6917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6918/* end confdefs.h. */
6919
6920#ifdef __TANDEM
6921choke me
6922#endif
6923
6924_ACEOF
6925if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6926 $EGREP "choke me" >/dev/null 2>&1; then :
6927 gl_cv_pragma_columns=yes
6928else
6929 gl_cv_pragma_columns=no
6930fi
6931rm -f conftest*
6932
6933
6934fi
6935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
6936$as_echo "$gl_cv_pragma_columns" >&6; }
6937 if test $gl_cv_pragma_columns = yes; then
6938 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
6939 else
6940 PRAGMA_COLUMNS=
6941 fi
6942
6943
6944
6945
e26b6bb0 6946
e26b6bb0 6947
3d99e817
AK
6948
6949
6950
6951
6952
3d99e817
AK
6953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
6954$as_echo_n "checking if environ is properly declared... " >&6; }
6955 if test "${gt_cv_var_environ_declaration+set}" = set; then :
6956 $as_echo_n "(cached) " >&6
6957else
6958
6959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6960/* end confdefs.h. */
6961#if HAVE_UNISTD_H
6962 #include <unistd.h>
6963 #endif
6964 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
6965 #include <stdlib.h>
6966
6967 extern struct { int foo; } environ;
6968int
6969main ()
6970{
6971environ.foo = 1;
6972 ;
6973 return 0;
6974}
6975_ACEOF
6976if ac_fn_c_try_compile "$LINENO"; then :
6977 gt_cv_var_environ_declaration=no
6978else
6979 gt_cv_var_environ_declaration=yes
6980fi
6981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6982fi
6983
6984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
6985$as_echo "$gt_cv_var_environ_declaration" >&6; }
6986 if test $gt_cv_var_environ_declaration = yes; then
6987
6988$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
6989
6990 fi
6991
6992
6993 if test $gt_cv_var_environ_declaration != yes; then
6994 HAVE_DECL_ENVIRON=0
6995 fi
6996
6997
6998
18848e28
GF
6999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
7000$as_echo_n "checking for complete errno.h... " >&6; }
7001if test "${gl_cv_header_errno_h_complete+set}" = set; then :
7002 $as_echo_n "(cached) " >&6
7003else
7004
7005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7006/* end confdefs.h. */
7007
7008#include <errno.h>
7009#if !defined ETXTBSY
7010booboo
7011#endif
7012#if !defined ENOMSG
7013booboo
7014#endif
7015#if !defined EIDRM
7016booboo
7017#endif
7018#if !defined ENOLINK
7019booboo
7020#endif
7021#if !defined EPROTO
7022booboo
7023#endif
7024#if !defined EMULTIHOP
7025booboo
7026#endif
7027#if !defined EBADMSG
7028booboo
7029#endif
7030#if !defined EOVERFLOW
7031booboo
7032#endif
7033#if !defined ENOTSUP
7034booboo
7035#endif
7036#if !defined ENETRESET
7037booboo
7038#endif
7039#if !defined ECONNABORTED
7040booboo
7041#endif
7042#if !defined ESTALE
7043booboo
7044#endif
7045#if !defined EDQUOT
7046booboo
7047#endif
7048#if !defined ECANCELED
7049booboo
7050#endif
7051#if !defined EOWNERDEAD
7052booboo
7053#endif
7054#if !defined ENOTRECOVERABLE
7055booboo
7056#endif
7057#if !defined EILSEQ
7058booboo
7059#endif
7060
7061_ACEOF
7062if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7063 $EGREP "booboo" >/dev/null 2>&1; then :
7064 gl_cv_header_errno_h_complete=no
7065else
7066 gl_cv_header_errno_h_complete=yes
7067fi
7068rm -f conftest*
7069
7070
7071fi
7072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
7073$as_echo "$gl_cv_header_errno_h_complete" >&6; }
7074 if test $gl_cv_header_errno_h_complete = yes; then
7075 ERRNO_H=''
7076 else
7077
7078
7079
7080
7081
7082
7083
7084
7085 if test $gl_cv_have_include_next = yes; then
7086 gl_cv_next_errno_h='<'errno.h'>'
7087 else
7088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
7089$as_echo_n "checking absolute name of <errno.h>... " >&6; }
7090if test "${gl_cv_next_errno_h+set}" = set; then :
7091 $as_echo_n "(cached) " >&6
7092else
7093
4a626d0a
PA
7094
7095
7096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18848e28
GF
7097/* end confdefs.h. */
7098#include <errno.h>
18848e28 7099_ACEOF
4a626d0a
PA
7100 case "$host_os" in
7101 aix*) gl_absname_cpp="$ac_cpp -C" ;;
7102 *) gl_absname_cpp="$ac_cpp" ;;
7103 esac
18848e28 7104
4a626d0a
PA
7105 case "$host_os" in
7106 mingw*)
7107 gl_dirsep_regex='[/\\]'
7108 ;;
7109 *)
7110 gl_dirsep_regex='\/'
7111 ;;
7112 esac
7113 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
7114 gl_header_literal_regex=`echo 'errno.h' \
7115 | sed -e "$gl_make_literal_regex_sed"`
7116 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
7117 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
7118 s|^/[^/]|//&|
7119 p
7120 q
7121 }'
7122
7123 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7124 sed -n "$gl_absolute_header_sed"`
7125
7126 gl_header=$gl_cv_absolute_errno_h
7127 gl_cv_next_errno_h='"'$gl_header'"'
7128
7129
7130fi
7131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
18848e28
GF
7132$as_echo "$gl_cv_next_errno_h" >&6; }
7133 fi
7134 NEXT_ERRNO_H=$gl_cv_next_errno_h
7135
7136 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7137 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
7138 gl_next_as_first_directive='<'errno.h'>'
7139 else
7140 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
7141 gl_next_as_first_directive=$gl_cv_next_errno_h
7142 fi
7143 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
7144
7145
7146
7147
7148 ERRNO_H='errno.h'
7149 fi
7150
7151 if test -n "$ERRNO_H"; then
7152 GL_GENERATE_ERRNO_H_TRUE=
7153 GL_GENERATE_ERRNO_H_FALSE='#'
7154else
7155 GL_GENERATE_ERRNO_H_TRUE='#'
7156 GL_GENERATE_ERRNO_H_FALSE=
7157fi
7158
7159
7160 if test -n "$ERRNO_H"; then
7161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
7162$as_echo_n "checking for EMULTIHOP value... " >&6; }
7163if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then :
7164 $as_echo_n "(cached) " >&6
7165else
7166
7167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7168/* end confdefs.h. */
7169
7170#include <errno.h>
7171#ifdef EMULTIHOP
7172yes
7173#endif
7174
7175_ACEOF
7176if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7177 $EGREP "yes" >/dev/null 2>&1; then :
7178 gl_cv_header_errno_h_EMULTIHOP=yes
7179else
7180 gl_cv_header_errno_h_EMULTIHOP=no
7181fi
7182rm -f conftest*
7183
7184 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
7185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7186/* end confdefs.h. */
7187
7188#define _XOPEN_SOURCE_EXTENDED 1
7189#include <errno.h>
7190#ifdef EMULTIHOP
7191yes
7192#endif
7193
7194_ACEOF
7195if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7196 $EGREP "yes" >/dev/null 2>&1; then :
7197 gl_cv_header_errno_h_EMULTIHOP=hidden
7198fi
7199rm -f conftest*
7200
7201 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
7202 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
7203#define _XOPEN_SOURCE_EXTENDED 1
7204#include <errno.h>
7205/* The following two lines are a workaround against an autoconf-2.52 bug. */
7206#include <stdio.h>
7207#include <stdlib.h>
7208"; then :
7209
7210fi
7211
7212 fi
7213 fi
7214
7215fi
7216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
7217$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
7218 case $gl_cv_header_errno_h_EMULTIHOP in
7219 yes | no)
7220 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
7221 ;;
7222 *)
7223 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
7224 ;;
7225 esac
7226
7227
7228 fi
7229
7230
7231 if test -n "$ERRNO_H"; then
7232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
7233$as_echo_n "checking for ENOLINK value... " >&6; }
7234if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then :
7235 $as_echo_n "(cached) " >&6
7236else
7237
7238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7239/* end confdefs.h. */
7240
7241#include <errno.h>
7242#ifdef ENOLINK
7243yes
7244#endif
7245
7246_ACEOF
7247if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7248 $EGREP "yes" >/dev/null 2>&1; then :
7249 gl_cv_header_errno_h_ENOLINK=yes
7250else
7251 gl_cv_header_errno_h_ENOLINK=no
7252fi
7253rm -f conftest*
7254
7255 if test $gl_cv_header_errno_h_ENOLINK = no; then
7256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7257/* end confdefs.h. */
7258
7259#define _XOPEN_SOURCE_EXTENDED 1
7260#include <errno.h>
7261#ifdef ENOLINK
7262yes
7263#endif
7264
7265_ACEOF
7266if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7267 $EGREP "yes" >/dev/null 2>&1; then :
7268 gl_cv_header_errno_h_ENOLINK=hidden
7269fi
7270rm -f conftest*
7271
7272 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
7273 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
7274#define _XOPEN_SOURCE_EXTENDED 1
7275#include <errno.h>
7276/* The following two lines are a workaround against an autoconf-2.52 bug. */
7277#include <stdio.h>
7278#include <stdlib.h>
7279"; then :
7280
7281fi
7282
7283 fi
7284 fi
7285
7286fi
7287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
7288$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
7289 case $gl_cv_header_errno_h_ENOLINK in
7290 yes | no)
7291 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
7292 ;;
7293 *)
7294 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
7295 ;;
7296 esac
7297
7298
7299 fi
7300
7301
7302 if test -n "$ERRNO_H"; then
7303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
7304$as_echo_n "checking for EOVERFLOW value... " >&6; }
7305if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then :
7306 $as_echo_n "(cached) " >&6
7307else
7308
7309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7310/* end confdefs.h. */
7311
7312#include <errno.h>
7313#ifdef EOVERFLOW
7314yes
7315#endif
7316
7317_ACEOF
7318if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7319 $EGREP "yes" >/dev/null 2>&1; then :
7320 gl_cv_header_errno_h_EOVERFLOW=yes
7321else
7322 gl_cv_header_errno_h_EOVERFLOW=no
7323fi
7324rm -f conftest*
7325
7326 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
7327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7328/* end confdefs.h. */
7329
7330#define _XOPEN_SOURCE_EXTENDED 1
7331#include <errno.h>
7332#ifdef EOVERFLOW
7333yes
7334#endif
7335
7336_ACEOF
7337if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7338 $EGREP "yes" >/dev/null 2>&1; then :
7339 gl_cv_header_errno_h_EOVERFLOW=hidden
7340fi
7341rm -f conftest*
7342
7343 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
7344 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
7345#define _XOPEN_SOURCE_EXTENDED 1
7346#include <errno.h>
7347/* The following two lines are a workaround against an autoconf-2.52 bug. */
7348#include <stdio.h>
7349#include <stdlib.h>
7350"; then :
7351
7352fi
7353
7354 fi
7355 fi
7356
7357fi
7358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
7359$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
7360 case $gl_cv_header_errno_h_EOVERFLOW in
7361 yes | no)
7362 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
7363 ;;
7364 *)
7365 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
7366 ;;
7367 esac
7368
7369
7370 fi
7371
7372
6ec2e0f5
SDJ
7373ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
7374if test "x$ac_cv_have_decl_strerror_r" = x""yes; then :
7375 ac_have_decl=1
7376else
7377 ac_have_decl=0
7378fi
18848e28 7379
6ec2e0f5
SDJ
7380cat >>confdefs.h <<_ACEOF
7381#define HAVE_DECL_STRERROR_R $ac_have_decl
7382_ACEOF
18848e28 7383
6ec2e0f5
SDJ
7384for ac_func in strerror_r
7385do :
7386 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
7387if test "x$ac_cv_func_strerror_r" = x""yes; then :
7388 cat >>confdefs.h <<_ACEOF
7389#define HAVE_STRERROR_R 1
7390_ACEOF
63ce7108 7391
6ec2e0f5
SDJ
7392fi
7393done
63ce7108 7394
6ec2e0f5
SDJ
7395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
7396$as_echo_n "checking whether strerror_r returns char *... " >&6; }
7397if test "${ac_cv_func_strerror_r_char_p+set}" = set; then :
63ce7108
TT
7398 $as_echo_n "(cached) " >&6
7399else
6ec2e0f5
SDJ
7400
7401 ac_cv_func_strerror_r_char_p=no
7402 if test $ac_cv_have_decl_strerror_r = yes; then
7403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63ce7108
TT
7404/* end confdefs.h. */
7405$ac_includes_default
63ce7108
TT
7406int
7407main ()
7408{
6ec2e0f5
SDJ
7409
7410 char buf[100];
7411 char x = *strerror_r (0, buf, sizeof buf);
7412 char *p = strerror_r (0, buf, sizeof buf);
7413 return !p || x;
7414
63ce7108
TT
7415 ;
7416 return 0;
7417}
7418_ACEOF
7419if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 7420 ac_cv_func_strerror_r_char_p=yes
63ce7108
TT
7421fi
7422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
7423 else
7424 # strerror_r is not declared. Choose between
7425 # systems that have relatively inaccessible declarations for the
7426 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
7427 # former has a strerror_r that returns char*, while the latter
7428 # has a strerror_r that returns `int'.
7429 # This test should segfault on the DEC system.
7430 if test "$cross_compiling" = yes; then :
7431 :
7432else
7433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7434/* end confdefs.h. */
7435$ac_includes_default
7436 extern char *strerror_r ();
7437int
7438main ()
7439{
7440char buf[100];
7441 char x = *strerror_r (0, buf, sizeof buf);
7442 return ! isalpha (x);
7443 ;
7444 return 0;
7445}
7446_ACEOF
7447if ac_fn_c_try_run "$LINENO"; then :
7448 ac_cv_func_strerror_r_char_p=yes
7449fi
7450rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7451 conftest.$ac_objext conftest.beam conftest.$ac_ext
63ce7108 7452fi
63ce7108 7453
6ec2e0f5 7454 fi
63ce7108 7455
6ec2e0f5
SDJ
7456fi
7457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
7458$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
7459if test $ac_cv_func_strerror_r_char_p = yes; then
63ce7108 7460
6ec2e0f5 7461$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
63ce7108 7462
6ec2e0f5 7463fi
63ce7108
TT
7464
7465
7466
63ce7108 7467
6ec2e0f5
SDJ
7468ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
7469if test "x$ac_cv_have_decl_fchdir" = x""yes; then :
7470 ac_have_decl=1
7471else
7472 ac_have_decl=0
7473fi
63ce7108 7474
6ec2e0f5
SDJ
7475cat >>confdefs.h <<_ACEOF
7476#define HAVE_DECL_FCHDIR $ac_have_decl
7477_ACEOF
63ce7108
TT
7478
7479
6ec2e0f5
SDJ
7480 GNULIB_FCNTL=0;
7481 GNULIB_NONBLOCKING=0;
7482 GNULIB_OPEN=0;
7483 GNULIB_OPENAT=0;
7484 HAVE_FCNTL=1;
7485 HAVE_OPENAT=1;
7486 REPLACE_FCNTL=0;
7487 REPLACE_OPEN=0;
7488 REPLACE_OPENAT=0;
63ce7108
TT
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
6ec2e0f5
SDJ
7499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
7500$as_echo_n "checking for working fcntl.h... " >&6; }
7501if test "${gl_cv_header_working_fcntl_h+set}" = set; then :
7502 $as_echo_n "(cached) " >&6
7503else
7504 if test "$cross_compiling" = yes; then :
7505 gl_cv_header_working_fcntl_h=cross-compiling
7506else
7507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7508/* end confdefs.h. */
7509#include <sys/types.h>
7510 #include <sys/stat.h>
7511 #if HAVE_UNISTD_H
7512 # include <unistd.h>
7513 #else /* on Windows with MSVC */
7514 # include <io.h>
7515 # include <stdlib.h>
7516 # defined sleep(n) _sleep ((n) * 1000)
7517 #endif
7518 #include <fcntl.h>
7519 #ifndef O_NOATIME
7520 #define O_NOATIME 0
7521 #endif
7522 #ifndef O_NOFOLLOW
7523 #define O_NOFOLLOW 0
7524 #endif
7525 static int const constants[] =
7526 {
7527 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
7528 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
7529 };
63ce7108 7530
6ec2e0f5
SDJ
7531int
7532main ()
7533{
63ce7108 7534
6ec2e0f5
SDJ
7535 int result = !constants;
7536 #if HAVE_SYMLINK
7537 {
7538 static char const sym[] = "conftest.sym";
7539 if (symlink ("/dev/null", sym) != 0)
7540 result |= 2;
7541 else
7542 {
7543 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
7544 if (fd >= 0)
7545 {
7546 close (fd);
7547 result |= 4;
7548 }
7549 }
7550 if (unlink (sym) != 0 || symlink (".", sym) != 0)
7551 result |= 2;
7552 else
7553 {
7554 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
7555 if (fd >= 0)
7556 {
7557 close (fd);
7558 result |= 4;
7559 }
7560 }
7561 unlink (sym);
7562 }
7563 #endif
7564 {
7565 static char const file[] = "confdefs.h";
7566 int fd = open (file, O_RDONLY | O_NOATIME);
7567 if (fd < 0)
7568 result |= 8;
7569 else
7570 {
7571 struct stat st0;
7572 if (fstat (fd, &st0) != 0)
7573 result |= 16;
7574 else
7575 {
7576 char c;
7577 sleep (1);
7578 if (read (fd, &c, 1) != 1)
7579 result |= 24;
7580 else
7581 {
7582 if (close (fd) != 0)
7583 result |= 32;
7584 else
7585 {
7586 struct stat st1;
7587 if (stat (file, &st1) != 0)
7588 result |= 40;
7589 else
7590 if (st0.st_atime != st1.st_atime)
7591 result |= 64;
7592 }
7593 }
7594 }
7595 }
7596 }
7597 return result;
7598 ;
7599 return 0;
7600}
7601_ACEOF
7602if ac_fn_c_try_run "$LINENO"; then :
7603 gl_cv_header_working_fcntl_h=yes
7604else
7605 case $? in #(
7606 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
7607 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
7608 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
7609 *) gl_cv_header_working_fcntl_h='no';;
7610 esac
7611fi
7612rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7613 conftest.$ac_objext conftest.beam conftest.$ac_ext
7614fi
7615
7616fi
7617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
7618$as_echo "$gl_cv_header_working_fcntl_h" >&6; }
7619
7620 case $gl_cv_header_working_fcntl_h in #(
7621 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
7622 *) ac_val=1;;
7623 esac
7624
7625cat >>confdefs.h <<_ACEOF
7626#define HAVE_WORKING_O_NOATIME $ac_val
7627_ACEOF
7628
7629
7630 case $gl_cv_header_working_fcntl_h in #(
7631 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
7632 *) ac_val=1;;
7633 esac
7634
7635cat >>confdefs.h <<_ACEOF
7636#define HAVE_WORKING_O_NOFOLLOW $ac_val
7637_ACEOF
7638
7639
7640ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
7641if test "x$ac_cv_type_pid_t" = x""yes; then :
7642
7643else
7644
7645cat >>confdefs.h <<_ACEOF
7646#define pid_t int
7647_ACEOF
7648
7649fi
7650
7651ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
7652if test "x$ac_cv_type_mode_t" = x""yes; then :
7653
7654else
7655
7656cat >>confdefs.h <<_ACEOF
7657#define mode_t int
7658_ACEOF
7659
7660fi
7661
7662
7663
7664
7665
7666
7667
7668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
7669$as_echo_n "checking for mbstate_t... " >&6; }
7670if test "${ac_cv_type_mbstate_t+set}" = set; then :
7671 $as_echo_n "(cached) " >&6
7672else
7673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7674/* end confdefs.h. */
7675$ac_includes_default
7676/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
7677 <wchar.h>.
7678 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
7679 included before <wchar.h>. */
7680#include <stddef.h>
7681#include <stdio.h>
7682#include <time.h>
7683#include <wchar.h>
7684int
7685main ()
7686{
7687mbstate_t x; return sizeof x;
7688 ;
7689 return 0;
7690}
7691_ACEOF
7692if ac_fn_c_try_compile "$LINENO"; then :
7693 ac_cv_type_mbstate_t=yes
7694else
7695 ac_cv_type_mbstate_t=no
7696fi
7697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7698fi
7699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
7700$as_echo "$ac_cv_type_mbstate_t" >&6; }
7701 if test $ac_cv_type_mbstate_t = yes; then
7702
7703$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
7704
7705 else
7706
7707$as_echo "#define mbstate_t int" >>confdefs.h
7708
7709 fi
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728 GNULIB_ACOSF=0;
7729 GNULIB_ACOSL=0;
7730 GNULIB_ASINF=0;
7731 GNULIB_ASINL=0;
7732 GNULIB_ATANF=0;
7733 GNULIB_ATANL=0;
7734 GNULIB_ATAN2F=0;
7735 GNULIB_CBRT=0;
7736 GNULIB_CBRTF=0;
7737 GNULIB_CBRTL=0;
7738 GNULIB_CEIL=0;
7739 GNULIB_CEILF=0;
7740 GNULIB_CEILL=0;
7741 GNULIB_COPYSIGN=0;
7742 GNULIB_COPYSIGNF=0;
7743 GNULIB_COPYSIGNL=0;
7744 GNULIB_COSF=0;
7745 GNULIB_COSL=0;
7746 GNULIB_COSHF=0;
7747 GNULIB_EXPF=0;
7748 GNULIB_EXPL=0;
7749 GNULIB_EXP2=0;
7750 GNULIB_EXP2F=0;
7751 GNULIB_EXP2L=0;
7752 GNULIB_EXPM1=0;
7753 GNULIB_EXPM1F=0;
7754 GNULIB_EXPM1L=0;
7755 GNULIB_FABSF=0;
7756 GNULIB_FABSL=0;
7757 GNULIB_FLOOR=0;
7758 GNULIB_FLOORF=0;
7759 GNULIB_FLOORL=0;
7760 GNULIB_FMA=0;
7761 GNULIB_FMAF=0;
7762 GNULIB_FMAL=0;
7763 GNULIB_FMOD=0;
7764 GNULIB_FMODF=0;
7765 GNULIB_FMODL=0;
7766 GNULIB_FREXPF=0;
7767 GNULIB_FREXP=0;
7768 GNULIB_FREXPL=0;
7769 GNULIB_HYPOT=0;
7770 GNULIB_HYPOTF=0;
7771 GNULIB_HYPOTL=0;
88b48903
WN
7772 GNULIB_ILOGB=0;
7773 GNULIB_ILOGBF=0;
7774 GNULIB_ILOGBL=0;
7775 GNULIB_ISFINITE=0;
7776 GNULIB_ISINF=0;
7777 GNULIB_ISNAN=0;
7778 GNULIB_ISNANF=0;
7779 GNULIB_ISNAND=0;
7780 GNULIB_ISNANL=0;
7781 GNULIB_LDEXPF=0;
7782 GNULIB_LDEXPL=0;
7783 GNULIB_LOG=0;
7784 GNULIB_LOGF=0;
7785 GNULIB_LOGL=0;
7786 GNULIB_LOG10=0;
7787 GNULIB_LOG10F=0;
7788 GNULIB_LOG10L=0;
7789 GNULIB_LOG1P=0;
7790 GNULIB_LOG1PF=0;
7791 GNULIB_LOG1PL=0;
7792 GNULIB_LOG2=0;
7793 GNULIB_LOG2F=0;
7794 GNULIB_LOG2L=0;
7795 GNULIB_LOGB=0;
7796 GNULIB_LOGBF=0;
7797 GNULIB_LOGBL=0;
7798 GNULIB_MODF=0;
7799 GNULIB_MODFF=0;
7800 GNULIB_MODFL=0;
7801 GNULIB_POWF=0;
7802 GNULIB_REMAINDER=0;
7803 GNULIB_REMAINDERF=0;
7804 GNULIB_REMAINDERL=0;
7805 GNULIB_RINT=0;
7806 GNULIB_RINTF=0;
7807 GNULIB_RINTL=0;
7808 GNULIB_ROUND=0;
7809 GNULIB_ROUNDF=0;
7810 GNULIB_ROUNDL=0;
7811 GNULIB_SIGNBIT=0;
7812 GNULIB_SINF=0;
7813 GNULIB_SINL=0;
7814 GNULIB_SINHF=0;
7815 GNULIB_SQRTF=0;
7816 GNULIB_SQRTL=0;
7817 GNULIB_TANF=0;
7818 GNULIB_TANL=0;
7819 GNULIB_TANHF=0;
7820 GNULIB_TRUNC=0;
7821 GNULIB_TRUNCF=0;
7822 GNULIB_TRUNCL=0;
7823 HAVE_ACOSF=1;
7824 HAVE_ACOSL=1;
7825 HAVE_ASINF=1;
7826 HAVE_ASINL=1;
7827 HAVE_ATANF=1;
7828 HAVE_ATANL=1;
7829 HAVE_ATAN2F=1;
7830 HAVE_CBRT=1;
7831 HAVE_CBRTF=1;
7832 HAVE_CBRTL=1;
7833 HAVE_COPYSIGN=1;
7834 HAVE_COPYSIGNL=1;
7835 HAVE_COSF=1;
7836 HAVE_COSL=1;
7837 HAVE_COSHF=1;
7838 HAVE_EXPF=1;
7839 HAVE_EXPL=1;
7840 HAVE_EXPM1=1;
7841 HAVE_EXPM1F=1;
7842 HAVE_FABSF=1;
7843 HAVE_FABSL=1;
7844 HAVE_FMA=1;
7845 HAVE_FMAF=1;
7846 HAVE_FMAL=1;
7847 HAVE_FMODF=1;
7848 HAVE_FMODL=1;
7849 HAVE_FREXPF=1;
7850 HAVE_HYPOTF=1;
7851 HAVE_HYPOTL=1;
7852 HAVE_ILOGB=1;
7853 HAVE_ILOGBF=1;
7854 HAVE_ILOGBL=1;
7855 HAVE_ISNANF=1;
7856 HAVE_ISNAND=1;
7857 HAVE_ISNANL=1;
7858 HAVE_LDEXPF=1;
7859 HAVE_LOGF=1;
7860 HAVE_LOGL=1;
7861 HAVE_LOG10F=1;
7862 HAVE_LOG10L=1;
7863 HAVE_LOG1P=1;
7864 HAVE_LOG1PF=1;
7865 HAVE_LOG1PL=1;
7866 HAVE_LOGBF=1;
7867 HAVE_LOGBL=1;
7868 HAVE_MODFF=1;
7869 HAVE_MODFL=1;
7870 HAVE_POWF=1;
7871 HAVE_REMAINDER=1;
7872 HAVE_REMAINDERF=1;
7873 HAVE_RINT=1;
7874 HAVE_RINTL=1;
7875 HAVE_SINF=1;
7876 HAVE_SINL=1;
7877 HAVE_SINHF=1;
7878 HAVE_SQRTF=1;
7879 HAVE_SQRTL=1;
7880 HAVE_TANF=1;
7881 HAVE_TANL=1;
7882 HAVE_TANHF=1;
7883 HAVE_DECL_ACOSL=1;
7884 HAVE_DECL_ASINL=1;
7885 HAVE_DECL_ATANL=1;
7886 HAVE_DECL_CBRTF=1;
7887 HAVE_DECL_CBRTL=1;
7888 HAVE_DECL_CEILF=1;
7889 HAVE_DECL_CEILL=1;
7890 HAVE_DECL_COPYSIGNF=1;
7891 HAVE_DECL_COSL=1;
7892 HAVE_DECL_EXPL=1;
7893 HAVE_DECL_EXP2=1;
7894 HAVE_DECL_EXP2F=1;
7895 HAVE_DECL_EXP2L=1;
7896 HAVE_DECL_EXPM1L=1;
7897 HAVE_DECL_FLOORF=1;
7898 HAVE_DECL_FLOORL=1;
7899 HAVE_DECL_FREXPL=1;
7900 HAVE_DECL_LDEXPL=1;
7901 HAVE_DECL_LOGL=1;
7902 HAVE_DECL_LOG10L=1;
7903 HAVE_DECL_LOG2=1;
7904 HAVE_DECL_LOG2F=1;
7905 HAVE_DECL_LOG2L=1;
7906 HAVE_DECL_LOGB=1;
7907 HAVE_DECL_REMAINDER=1;
7908 HAVE_DECL_REMAINDERL=1;
7909 HAVE_DECL_RINTF=1;
7910 HAVE_DECL_ROUND=1;
7911 HAVE_DECL_ROUNDF=1;
7912 HAVE_DECL_ROUNDL=1;
7913 HAVE_DECL_SINL=1;
7914 HAVE_DECL_SQRTL=1;
7915 HAVE_DECL_TANL=1;
7916 HAVE_DECL_TRUNC=1;
7917 HAVE_DECL_TRUNCF=1;
7918 HAVE_DECL_TRUNCL=1;
7919 REPLACE_CBRTF=0;
7920 REPLACE_CBRTL=0;
7921 REPLACE_CEIL=0;
7922 REPLACE_CEILF=0;
7923 REPLACE_CEILL=0;
7924 REPLACE_EXPM1=0;
7925 REPLACE_EXPM1F=0;
7926 REPLACE_EXP2=0;
7927 REPLACE_EXP2L=0;
7928 REPLACE_FABSL=0;
7929 REPLACE_FLOOR=0;
7930 REPLACE_FLOORF=0;
7931 REPLACE_FLOORL=0;
7932 REPLACE_FMA=0;
7933 REPLACE_FMAF=0;
7934 REPLACE_FMAL=0;
7935 REPLACE_FMOD=0;
7936 REPLACE_FMODF=0;
7937 REPLACE_FMODL=0;
7938 REPLACE_FREXPF=0;
7939 REPLACE_FREXP=0;
7940 REPLACE_FREXPL=0;
7941 REPLACE_HUGE_VAL=0;
7942 REPLACE_HYPOT=0;
7943 REPLACE_HYPOTF=0;
7944 REPLACE_HYPOTL=0;
7945 REPLACE_ILOGB=0;
7946 REPLACE_ILOGBF=0;
7947 REPLACE_ISFINITE=0;
7948 REPLACE_ISINF=0;
7949 REPLACE_ISNAN=0;
7950 REPLACE_LDEXPL=0;
7951 REPLACE_LOG=0;
7952 REPLACE_LOGF=0;
7953 REPLACE_LOGL=0;
7954 REPLACE_LOG10=0;
7955 REPLACE_LOG10F=0;
7956 REPLACE_LOG10L=0;
7957 REPLACE_LOG1P=0;
7958 REPLACE_LOG1PF=0;
7959 REPLACE_LOG1PL=0;
7960 REPLACE_LOG2=0;
7961 REPLACE_LOG2F=0;
7962 REPLACE_LOG2L=0;
7963 REPLACE_LOGB=0;
7964 REPLACE_LOGBF=0;
7965 REPLACE_LOGBL=0;
7966 REPLACE_MODF=0;
7967 REPLACE_MODFF=0;
7968 REPLACE_MODFL=0;
7969 REPLACE_NAN=0;
7970 REPLACE_REMAINDER=0;
7971 REPLACE_REMAINDERF=0;
7972 REPLACE_REMAINDERL=0;
7973 REPLACE_ROUND=0;
7974 REPLACE_ROUNDF=0;
7975 REPLACE_ROUNDL=0;
7976 REPLACE_SIGNBIT=0;
7977 REPLACE_SIGNBIT_USING_GCC=0;
7978 REPLACE_SQRTL=0;
7979 REPLACE_TRUNC=0;
7980 REPLACE_TRUNCF=0;
7981 REPLACE_TRUNCL=0;
7982
7983
7984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
7985$as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
7986if test "${gl_cv_func_frexp_no_libm+set}" = set; then :
7987 $as_echo_n "(cached) " >&6
7988else
7989
7990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7991/* end confdefs.h. */
7992#include <math.h>
7993 double x;
7994int
7995main ()
7996{
7997int e; return frexp (x, &e) > 0;
7998 ;
7999 return 0;
8000}
8001_ACEOF
8002if ac_fn_c_try_link "$LINENO"; then :
8003 gl_cv_func_frexp_no_libm=yes
8004else
8005 gl_cv_func_frexp_no_libm=no
8006fi
8007rm -f core conftest.err conftest.$ac_objext \
8008 conftest$ac_exeext conftest.$ac_ext
8009
8010fi
8011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
8012$as_echo "$gl_cv_func_frexp_no_libm" >&6; }
8013
4a626d0a
PA
8014ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
8015if test "x$ac_cv_have_decl_alarm" = x""yes; then :
8016 ac_have_decl=1
8017else
8018 ac_have_decl=0
8019fi
88b48903 8020
4a626d0a
PA
8021cat >>confdefs.h <<_ACEOF
8022#define HAVE_DECL_ALARM $ac_have_decl
8023_ACEOF
88b48903
WN
8024
8025
88b48903
WN
8026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
8027$as_echo_n "checking whether long double and double are the same... " >&6; }
8028if test "${gl_cv_long_double_equals_double+set}" = set; then :
8029 $as_echo_n "(cached) " >&6
8030else
8031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8032/* end confdefs.h. */
8033#include <float.h>
8034int
8035main ()
8036{
8037typedef int check[sizeof (long double) == sizeof (double)
8038 && LDBL_MANT_DIG == DBL_MANT_DIG
8039 && LDBL_MAX_EXP == DBL_MAX_EXP
8040 && LDBL_MIN_EXP == DBL_MIN_EXP
8041 ? 1 : -1];
8042
8043 ;
8044 return 0;
8045}
8046_ACEOF
8047if ac_fn_c_try_compile "$LINENO"; then :
8048 gl_cv_long_double_equals_double=yes
8049else
8050 gl_cv_long_double_equals_double=no
8051fi
8052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8053
8054fi
8055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
8056$as_echo "$gl_cv_long_double_equals_double" >&6; }
8057 if test $gl_cv_long_double_equals_double = yes; then
8058
8059$as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
8060
8061 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
8062 else
8063 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
8064 fi
8065
8066
4a626d0a 8067
6ec2e0f5
SDJ
8068 GNULIB_FCHMODAT=0;
8069 GNULIB_FSTAT=0;
8070 GNULIB_FSTATAT=0;
8071 GNULIB_FUTIMENS=0;
8072 GNULIB_LCHMOD=0;
8073 GNULIB_LSTAT=0;
8074 GNULIB_MKDIRAT=0;
8075 GNULIB_MKFIFO=0;
8076 GNULIB_MKFIFOAT=0;
8077 GNULIB_MKNOD=0;
8078 GNULIB_MKNODAT=0;
8079 GNULIB_STAT=0;
8080 GNULIB_UTIMENSAT=0;
8081 HAVE_FCHMODAT=1;
8082 HAVE_FSTATAT=1;
8083 HAVE_FUTIMENS=1;
8084 HAVE_LCHMOD=1;
8085 HAVE_LSTAT=1;
8086 HAVE_MKDIRAT=1;
8087 HAVE_MKFIFO=1;
8088 HAVE_MKFIFOAT=1;
8089 HAVE_MKNOD=1;
8090 HAVE_MKNODAT=1;
8091 HAVE_UTIMENSAT=1;
8092 REPLACE_FSTAT=0;
8093 REPLACE_FSTATAT=0;
8094 REPLACE_FUTIMENS=0;
8095 REPLACE_LSTAT=0;
8096 REPLACE_MKDIR=0;
8097 REPLACE_MKFIFO=0;
8098 REPLACE_MKNOD=0;
8099 REPLACE_STAT=0;
8100 REPLACE_UTIMENSAT=0;
8101
8102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
8103$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
8104if test "${ac_cv_header_stat_broken+set}" = set; then :
8105 $as_echo_n "(cached) " >&6
8106else
8107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8108/* end confdefs.h. */
8109#include <sys/types.h>
8110#include <sys/stat.h>
8111
8112#if defined S_ISBLK && defined S_IFDIR
8113extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
8114#endif
8115
8116#if defined S_ISBLK && defined S_IFCHR
8117extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
8118#endif
8119
8120#if defined S_ISLNK && defined S_IFREG
8121extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
8122#endif
8123
8124#if defined S_ISSOCK && defined S_IFREG
8125extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
8126#endif
4a626d0a 8127
4a626d0a
PA
8128_ACEOF
8129if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5
SDJ
8130 ac_cv_header_stat_broken=no
8131else
8132 ac_cv_header_stat_broken=yes
4a626d0a
PA
8133fi
8134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
8135fi
8136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
8137$as_echo "$ac_cv_header_stat_broken" >&6; }
8138if test $ac_cv_header_stat_broken = yes; then
8139
8140$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
4a626d0a
PA
8141
8142fi
4a626d0a 8143
4a626d0a
PA
8144
8145
4a626d0a
PA
8146
8147
6ec2e0f5
SDJ
8148 case "$host_os" in
8149 mingw*)
8150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
8151$as_echo_n "checking for 64-bit off_t... " >&6; }
8152if test "${gl_cv_type_off_t_64+set}" = set; then :
8153 $as_echo_n "(cached) " >&6
8154else
8155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8156/* end confdefs.h. */
8157#include <sys/types.h>
8158 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
8159
8160int
8161main ()
8162{
8163
8164 ;
8165 return 0;
8166}
8167_ACEOF
8168if ac_fn_c_try_compile "$LINENO"; then :
8169 gl_cv_type_off_t_64=yes
8170else
8171 gl_cv_type_off_t_64=no
8172fi
8173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4a626d0a 8174
6ec2e0f5
SDJ
8175fi
8176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
8177$as_echo "$gl_cv_type_off_t_64" >&6; }
8178 if test $gl_cv_type_off_t_64 = no; then
8179 WINDOWS_64_BIT_OFF_T=1
8180 else
8181 WINDOWS_64_BIT_OFF_T=0
8182 fi
8183 WINDOWS_64_BIT_ST_SIZE=1
8184 ;;
8185 *)
8186 WINDOWS_64_BIT_OFF_T=0
8187 WINDOWS_64_BIT_ST_SIZE=0
8188 ;;
8189 esac
4a626d0a
PA
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 8206 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
4a626d0a 8207 else
6ec2e0f5
SDJ
8208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
8209$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
8210if test "${gl_cv_next_sys_stat_h+set}" = set; then :
4a626d0a
PA
8211 $as_echo_n "(cached) " >&6
8212else
8213
6ec2e0f5 8214 if test $ac_cv_header_sys_stat_h = yes; then
4a626d0a
PA
8215
8216
8217
8218
8219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8220/* end confdefs.h. */
6ec2e0f5 8221#include <sys/stat.h>
4a626d0a
PA
8222_ACEOF
8223 case "$host_os" in
8224 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8225 *) gl_absname_cpp="$ac_cpp" ;;
8226 esac
8227
8228 case "$host_os" in
8229 mingw*)
8230 gl_dirsep_regex='[/\\]'
8231 ;;
8232 *)
8233 gl_dirsep_regex='\/'
8234 ;;
8235 esac
8236 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 8237 gl_header_literal_regex=`echo 'sys/stat.h' \
4a626d0a
PA
8238 | sed -e "$gl_make_literal_regex_sed"`
8239 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8240 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8241 s|^/[^/]|//&|
8242 p
8243 q
8244 }'
8245
6ec2e0f5 8246 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a
PA
8247 sed -n "$gl_absolute_header_sed"`
8248
6ec2e0f5
SDJ
8249 gl_header=$gl_cv_absolute_sys_stat_h
8250 gl_cv_next_sys_stat_h='"'$gl_header'"'
4a626d0a 8251 else
6ec2e0f5 8252 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
4a626d0a
PA
8253 fi
8254
8255
8256fi
6ec2e0f5
SDJ
8257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
8258$as_echo "$gl_cv_next_sys_stat_h" >&6; }
4a626d0a 8259 fi
6ec2e0f5 8260 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
4a626d0a
PA
8261
8262 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8263 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 8264 gl_next_as_first_directive='<'sys/stat.h'>'
4a626d0a
PA
8265 else
8266 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 8267 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
4a626d0a 8268 fi
6ec2e0f5 8269 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
4a626d0a
PA
8270
8271
8272
8273
8274
4a626d0a
PA
8275
8276
8277
8278
8279
4a626d0a 8280
6ec2e0f5 8281 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
4a626d0a 8282
6ec2e0f5 8283$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
4a626d0a
PA
8284
8285 fi
4a626d0a 8286
6ec2e0f5
SDJ
8287 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
8288 #include <sys/stat.h>
8289"
8290if test "x$ac_cv_type_nlink_t" = x""yes; then :
8291
8292else
4a626d0a 8293
6ec2e0f5
SDJ
8294$as_echo "#define nlink_t int" >>confdefs.h
8295
8296fi
8297
8298
8299
8300 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
8301 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
8302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
8303$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
8304if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
4a626d0a
PA
8305 $as_echo_n "(cached) " >&6
8306else
8307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8308/* end confdefs.h. */
6ec2e0f5 8309#include <sys/stat.h>
4a626d0a
PA
8310
8311int
8312main ()
8313{
6ec2e0f5
SDJ
8314#undef $gl_func
8315 (void) $gl_func;
4a626d0a
PA
8316 ;
8317 return 0;
8318}
8319_ACEOF
8320if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 8321 eval "$as_gl_Symbol=yes"
4a626d0a 8322else
6ec2e0f5 8323 eval "$as_gl_Symbol=no"
4a626d0a
PA
8324fi
8325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
8326fi
8327eval ac_res=\$$as_gl_Symbol
8328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8329$as_echo "$ac_res" >&6; }
8330 eval as_val=\$$as_gl_Symbol
8331 if test "x$as_val" = x""yes; then :
8332 cat >>confdefs.h <<_ACEOF
8333#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
8334_ACEOF
4a626d0a 8335
6ec2e0f5 8336 eval ac_cv_have_decl_$gl_func=yes
4a626d0a 8337fi
6ec2e0f5
SDJ
8338 done
8339
8340
8341
8342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
8343$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
8344if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
4a626d0a
PA
8345 $as_echo_n "(cached) " >&6
8346else
6ec2e0f5
SDJ
8347 rm -f conftest.sym conftest.file
8348 echo >conftest.file
8349 if test "$cross_compiling" = yes; then :
8350 case "$host_os" in
8351 *-gnu*)
8352 # Guess yes on glibc systems.
8353 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
8354 *)
8355 # If we don't know, assume the worst.
8356 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
8357 esac
4a626d0a 8358
6ec2e0f5
SDJ
8359else
8360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8361/* end confdefs.h. */
8362$ac_includes_default
4a626d0a
PA
8363int
8364main ()
8365{
6ec2e0f5
SDJ
8366struct stat sbuf;
8367 if (symlink ("conftest.file", "conftest.sym") != 0)
8368 return 1;
8369 /* Linux will dereference the symlink and fail, as required by
8370 POSIX. That is better in the sense that it means we will not
8371 have to compile and use the lstat wrapper. */
8372 return lstat ("conftest.sym/", &sbuf) == 0;
4a626d0a
PA
8373
8374 ;
8375 return 0;
8376}
8377_ACEOF
6ec2e0f5
SDJ
8378if ac_fn_c_try_run "$LINENO"; then :
8379 gl_cv_func_lstat_dereferences_slashed_symlink=yes
4a626d0a 8380else
6ec2e0f5
SDJ
8381 gl_cv_func_lstat_dereferences_slashed_symlink=no
8382fi
8383rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8384 conftest.$ac_objext conftest.beam conftest.$ac_ext
4a626d0a 8385fi
6ec2e0f5
SDJ
8386
8387 rm -f conftest.sym conftest.file
4a626d0a
PA
8388
8389fi
6ec2e0f5
SDJ
8390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
8391$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
8392 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
8393 *yes)
4a626d0a 8394
6ec2e0f5
SDJ
8395cat >>confdefs.h <<_ACEOF
8396#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
8397_ACEOF
4a626d0a 8398
6ec2e0f5
SDJ
8399 ;;
8400 esac
8401
8402
8403
8404
8405
8406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
8407$as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
8408if test "${gl_cv_func_getcwd_null+set}" = set; then :
4a626d0a 8409 $as_echo_n "(cached) " >&6
6ec2e0f5
SDJ
8410else
8411 if test "$cross_compiling" = yes; then :
8412 case "$host_os" in
8413 # Guess yes on glibc systems.
8414 *-gnu*) gl_cv_func_getcwd_null="guessing yes";;
8415 # Guess yes on Cygwin.
8416 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
8417 # If we don't know, assume the worst.
8418 *) gl_cv_func_getcwd_null="guessing no";;
8419 esac
8420
4a626d0a
PA
8421else
8422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8423/* end confdefs.h. */
8424
6ec2e0f5
SDJ
8425# include <stdlib.h>
8426# if HAVE_UNISTD_H
8427# include <unistd.h>
8428# else /* on Windows with MSVC */
8429# include <direct.h>
8430# endif
8431# ifndef getcwd
8432 char *getcwd ();
8433# endif
8434
8435int
8436main ()
8437{
8438
8439#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
8440/* mingw cwd does not start with '/', but getcwd does allocate.
8441 However, mingw fails to honor non-zero size. */
8442#else
8443 if (chdir ("/") != 0)
8444 return 1;
8445 else
8446 {
8447 char *f = getcwd (NULL, 0);
8448 if (! f)
8449 return 2;
8450 if (f[0] != '/')
8451 return 3;
8452 if (f[1] != '\0')
8453 return 4;
8454 free (f);
8455 return 0;
8456 }
4a626d0a 8457#endif
4a626d0a 8458
6ec2e0f5
SDJ
8459 ;
8460 return 0;
8461}
8462_ACEOF
8463if ac_fn_c_try_run "$LINENO"; then :
8464 gl_cv_func_getcwd_null=yes
8465else
8466 gl_cv_func_getcwd_null=no
8467fi
8468rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8469 conftest.$ac_objext conftest.beam conftest.$ac_ext
8470fi
8471
8472fi
8473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
8474$as_echo "$gl_cv_func_getcwd_null" >&6; }
8475
8476
8477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
8478$as_echo_n "checking for getcwd with POSIX signature... " >&6; }
8479if test "${gl_cv_func_getcwd_posix_signature+set}" = set; then :
8480 $as_echo_n "(cached) " >&6
8481else
8482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8483/* end confdefs.h. */
8484#include <unistd.h>
4a626d0a
PA
8485int
8486main ()
8487{
6ec2e0f5
SDJ
8488extern
8489 #ifdef __cplusplus
8490 "C"
8491 #endif
8492 char *getcwd (char *, size_t);
8493
4a626d0a
PA
8494 ;
8495 return 0;
8496}
6ec2e0f5 8497
4a626d0a
PA
8498_ACEOF
8499if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 8500 gl_cv_func_getcwd_posix_signature=yes
4a626d0a 8501else
6ec2e0f5 8502 gl_cv_func_getcwd_posix_signature=no
4a626d0a
PA
8503fi
8504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5 8505
4a626d0a 8506fi
6ec2e0f5
SDJ
8507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
8508$as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
8509
8510ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
8511if test "x$ac_cv_have_decl_getcwd" = x""yes; then :
8512 ac_have_decl=1
8513else
8514 ac_have_decl=0
8515fi
8516
8517cat >>confdefs.h <<_ACEOF
8518#define HAVE_DECL_GETCWD $ac_have_decl
4a626d0a
PA
8519_ACEOF
8520
6ec2e0f5
SDJ
8521
8522
8523ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
8524if test "x$ac_cv_have_decl_getdtablesize" = x""yes; then :
8525 ac_have_decl=1
8526else
8527 ac_have_decl=0
4a626d0a 8528fi
4a626d0a 8529
6ec2e0f5
SDJ
8530cat >>confdefs.h <<_ACEOF
8531#define HAVE_DECL_GETDTABLESIZE $ac_have_decl
8532_ACEOF
8533
8534ac_fn_c_check_decl "$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default"
8535if test "x$ac_cv_have_decl_getlogin_r" = x""yes; then :
8536 ac_have_decl=1
8537else
8538 ac_have_decl=0
8539fi
8540
8541cat >>confdefs.h <<_ACEOF
8542#define HAVE_DECL_GETLOGIN_R $ac_have_decl
8543_ACEOF
8544
8545
8546
8547ac_fn_c_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default"
8548if test "x$ac_cv_have_decl_getlogin" = x""yes; then :
8549 ac_have_decl=1
8550else
8551 ac_have_decl=0
8552fi
8553
8554cat >>confdefs.h <<_ACEOF
8555#define HAVE_DECL_GETLOGIN $ac_have_decl
8556_ACEOF
8557
8558
8559
8560
8561
8562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
8563$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
8564if test "${ac_cv_c_restrict+set}" = set; then :
8565 $as_echo_n "(cached) " >&6
8566else
8567 ac_cv_c_restrict=no
8568 # The order here caters to the fact that C++ does not require restrict.
8569 for ac_kw in __restrict __restrict__ _Restrict restrict; do
8570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8571/* end confdefs.h. */
8572typedef int *int_ptr;
8573 int foo (int_ptr $ac_kw ip) { return ip[0]; }
8574 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
8575 int bar (int ip[$ac_kw]) { return ip[0]; }
8576
8577int
8578main ()
8579{
8580int s[1];
8581 int *$ac_kw t = s;
8582 t[0] = 0;
8583 return foo (t) + bar (t);
8584
8585 ;
8586 return 0;
8587}
8588_ACEOF
8589if ac_fn_c_try_compile "$LINENO"; then :
8590 ac_cv_c_restrict=$ac_kw
8591fi
8592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8593 test "$ac_cv_c_restrict" != no && break
8594 done
8595
8596fi
8597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
8598$as_echo "$ac_cv_c_restrict" >&6; }
8599
8600 case $ac_cv_c_restrict in
8601 restrict) ;;
8602 no) $as_echo "#define restrict /**/" >>confdefs.h
8603 ;;
8604 *) cat >>confdefs.h <<_ACEOF
8605#define restrict $ac_cv_c_restrict
8606_ACEOF
8607 ;;
8608 esac
4a626d0a
PA
8609
8610
6ec2e0f5
SDJ
8611 GNULIB_GETTIMEOFDAY=0;
8612 HAVE_GETTIMEOFDAY=1;
8613 HAVE_STRUCT_TIMEVAL=1;
8614 HAVE_SYS_TIME_H=1;
8615 HAVE_TIMEZONE_T=0;
8616 REPLACE_GETTIMEOFDAY=0;
8617 REPLACE_STRUCT_TIMEVAL=0;
4a626d0a
PA
8618
8619
8620
8621
88b48903 8622
49e4877c
PA
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 8635 gl_cv_next_sys_time_h='<'sys/time.h'>'
49e4877c 8636 else
6ec2e0f5
SDJ
8637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
8638$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
8639if test "${gl_cv_next_sys_time_h+set}" = set; then :
49e4877c
PA
8640 $as_echo_n "(cached) " >&6
8641else
8642
6ec2e0f5 8643 if test $ac_cv_header_sys_time_h = yes; then
49e4877c
PA
8644
8645
8646
8647
8648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8649/* end confdefs.h. */
6ec2e0f5 8650#include <sys/time.h>
49e4877c
PA
8651_ACEOF
8652 case "$host_os" in
8653 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8654 *) gl_absname_cpp="$ac_cpp" ;;
8655 esac
8656
8657 case "$host_os" in
8658 mingw*)
8659 gl_dirsep_regex='[/\\]'
8660 ;;
8661 *)
8662 gl_dirsep_regex='\/'
8663 ;;
8664 esac
8665 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 8666 gl_header_literal_regex=`echo 'sys/time.h' \
49e4877c
PA
8667 | sed -e "$gl_make_literal_regex_sed"`
8668 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8669 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8670 s|^/[^/]|//&|
8671 p
8672 q
8673 }'
8674
6ec2e0f5 8675 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
49e4877c
PA
8676 sed -n "$gl_absolute_header_sed"`
8677
6ec2e0f5
SDJ
8678 gl_header=$gl_cv_absolute_sys_time_h
8679 gl_cv_next_sys_time_h='"'$gl_header'"'
49e4877c 8680 else
6ec2e0f5 8681 gl_cv_next_sys_time_h='<'sys/time.h'>'
49e4877c
PA
8682 fi
8683
8684
8685fi
6ec2e0f5
SDJ
8686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
8687$as_echo "$gl_cv_next_sys_time_h" >&6; }
49e4877c 8688 fi
6ec2e0f5 8689 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
49e4877c
PA
8690
8691 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8692 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 8693 gl_next_as_first_directive='<'sys/time.h'>'
49e4877c
PA
8694 else
8695 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 8696 gl_next_as_first_directive=$gl_cv_next_sys_time_h
49e4877c 8697 fi
6ec2e0f5 8698 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
49e4877c
PA
8699
8700
8701
8702
8703
6ec2e0f5
SDJ
8704 if test $ac_cv_header_sys_time_h != yes; then
8705 HAVE_SYS_TIME_H=0
8706 fi
8707
8708
8709
8710
8711
8712 if test $ac_cv_header_sys_socket_h != yes; then
8713 for ac_header in winsock2.h
8714do :
8715 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
8716if test "x$ac_cv_header_winsock2_h" = x""yes; then :
8717 cat >>confdefs.h <<_ACEOF
8718#define HAVE_WINSOCK2_H 1
8719_ACEOF
8720
8721fi
8722
8723done
8724
8725 fi
8726 if test "$ac_cv_header_winsock2_h" = yes; then
8727 HAVE_WINSOCK2_H=1
8728 UNISTD_H_HAVE_WINSOCK2_H=1
8729 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
8730 else
8731 HAVE_WINSOCK2_H=0
8732 fi
8733
8734
8735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
8736$as_echo_n "checking for struct timeval... " >&6; }
8737if test "${gl_cv_sys_struct_timeval+set}" = set; then :
8738 $as_echo_n "(cached) " >&6
8739else
8740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8741/* end confdefs.h. */
8742#if HAVE_SYS_TIME_H
8743 #include <sys/time.h>
8744 #endif
8745 #include <time.h>
8746 #if HAVE_WINSOCK2_H
8747 # include <winsock2.h>
8748 #endif
8749
49e4877c
PA
8750int
8751main ()
8752{
6ec2e0f5 8753static struct timeval x; x.tv_sec = x.tv_usec;
49e4877c
PA
8754 ;
8755 return 0;
8756}
8757_ACEOF
8758if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 8759 gl_cv_sys_struct_timeval=yes
49e4877c 8760else
6ec2e0f5 8761 gl_cv_sys_struct_timeval=no
49e4877c
PA
8762fi
8763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49e4877c 8764
49e4877c 8765fi
6ec2e0f5
SDJ
8766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
8767$as_echo "$gl_cv_sys_struct_timeval" >&6; }
8768 if test $gl_cv_sys_struct_timeval != yes; then
8769 HAVE_STRUCT_TIMEVAL=0
8770 else
8771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
8772$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
8773if test "${gl_cv_sys_struct_timeval_tv_sec+set}" = set; then :
8690e634
JK
8774 $as_echo_n "(cached) " >&6
8775else
6ec2e0f5 8776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 8777/* end confdefs.h. */
6ec2e0f5
SDJ
8778#if HAVE_SYS_TIME_H
8779 #include <sys/time.h>
8780 #endif
8781 #include <time.h>
8782 #if HAVE_WINSOCK2_H
8783 # include <winsock2.h>
8784 #endif
8690e634 8785
8690e634
JK
8786int
8787main ()
8788{
6ec2e0f5
SDJ
8789static struct timeval x;
8790 typedef int verify_tv_sec_type[
8791 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
8792 ];
8793
8690e634
JK
8794 ;
8795 return 0;
8796}
8690e634 8797_ACEOF
6ec2e0f5
SDJ
8798if ac_fn_c_try_compile "$LINENO"; then :
8799 gl_cv_sys_struct_timeval_tv_sec=yes
8690e634 8800else
6ec2e0f5 8801 gl_cv_sys_struct_timeval_tv_sec=no
8690e634 8802fi
6ec2e0f5 8803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 8804
6ec2e0f5
SDJ
8805fi
8806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
8807$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
8808 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
8809 REPLACE_STRUCT_TIMEVAL=1
8810 fi
8690e634
JK
8811 fi
8812
8813
6ec2e0f5
SDJ
8814 for gl_func in gettimeofday; do
8815 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
8816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
8817$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
8818if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
8690e634 8819 $as_echo_n "(cached) " >&6
8690e634
JK
8820else
8821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8822/* end confdefs.h. */
6ec2e0f5
SDJ
8823
8824#if HAVE_SYS_TIME_H
8825# include <sys/time.h>
8826#endif
8827#include <time.h>
8828
8690e634
JK
8829int
8830main ()
8831{
6ec2e0f5
SDJ
8832#undef $gl_func
8833 (void) $gl_func;
8690e634
JK
8834 ;
8835 return 0;
8836}
8837_ACEOF
6ec2e0f5
SDJ
8838if ac_fn_c_try_compile "$LINENO"; then :
8839 eval "$as_gl_Symbol=yes"
8690e634 8840else
6ec2e0f5 8841 eval "$as_gl_Symbol=no"
8690e634 8842fi
6ec2e0f5 8843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 8844fi
6ec2e0f5
SDJ
8845eval ac_res=\$$as_gl_Symbol
8846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8847$as_echo "$ac_res" >&6; }
8848 eval as_val=\$$as_gl_Symbol
8849 if test "x$as_val" = x""yes; then :
8850 cat >>confdefs.h <<_ACEOF
8851#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
8852_ACEOF
8690e634 8853
6ec2e0f5 8854 eval ac_cv_have_decl_$gl_func=yes
8690e634 8855fi
6ec2e0f5 8856 done
8690e634 8857
8690e634 8858
8690e634
JK
8859
8860
8861
8862
8863
8864
88b48903 8865
8690e634 8866
8690e634 8867
8690e634
JK
8868
8869
8870
8871
8872
49e4877c
PA
8873
8874
8690e634
JK
8875
8876
8690e634
JK
8877
8878
8879
8880 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 8881 gl_cv_next_limits_h='<'limits.h'>'
8690e634 8882 else
6ec2e0f5
SDJ
8883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
8884$as_echo_n "checking absolute name of <limits.h>... " >&6; }
8885if test "${gl_cv_next_limits_h+set}" = set; then :
8690e634
JK
8886 $as_echo_n "(cached) " >&6
8887else
8888
6ec2e0f5 8889 if test $ac_cv_header_limits_h = yes; then
8690e634
JK
8890
8891
4a626d0a
PA
8892
8893
8894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 8895/* end confdefs.h. */
6ec2e0f5 8896#include <limits.h>
8690e634 8897_ACEOF
4a626d0a
PA
8898 case "$host_os" in
8899 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8900 *) gl_absname_cpp="$ac_cpp" ;;
8901 esac
8902
8903 case "$host_os" in
8904 mingw*)
8905 gl_dirsep_regex='[/\\]'
8906 ;;
8907 *)
8908 gl_dirsep_regex='\/'
8909 ;;
8910 esac
8911 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 8912 gl_header_literal_regex=`echo 'limits.h' \
4a626d0a
PA
8913 | sed -e "$gl_make_literal_regex_sed"`
8914 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8915 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8916 s|^/[^/]|//&|
8917 p
8918 q
8919 }'
8920
6ec2e0f5 8921 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a
PA
8922 sed -n "$gl_absolute_header_sed"`
8923
6ec2e0f5
SDJ
8924 gl_header=$gl_cv_absolute_limits_h
8925 gl_cv_next_limits_h='"'$gl_header'"'
8690e634 8926 else
6ec2e0f5 8927 gl_cv_next_limits_h='<'limits.h'>'
8690e634
JK
8928 fi
8929
8930
8931fi
6ec2e0f5
SDJ
8932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
8933$as_echo "$gl_cv_next_limits_h" >&6; }
8690e634 8934 fi
6ec2e0f5 8935 NEXT_LIMITS_H=$gl_cv_next_limits_h
8690e634
JK
8936
8937 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8938 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 8939 gl_next_as_first_directive='<'limits.h'>'
8690e634
JK
8940 else
8941 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 8942 gl_next_as_first_directive=$gl_cv_next_limits_h
8690e634 8943 fi
6ec2e0f5 8944 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
8690e634
JK
8945
8946
8947
8948
6ec2e0f5
SDJ
8949
8950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has ULLONG_WIDTH etc." >&5
8951$as_echo_n "checking whether limits.h has ULLONG_WIDTH etc.... " >&6; }
8952if test "${gl_cv_header_limits_width+set}" = set; then :
8953 $as_echo_n "(cached) " >&6
8954else
8955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8956/* end confdefs.h. */
8957#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
8958 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
8959 #endif
8960 #include <limits.h>
8961 int ullw = ULLONG_WIDTH;
8962int
8963main ()
8964{
8965
8966 ;
8967 return 0;
8968}
8969_ACEOF
8970if ac_fn_c_try_compile "$LINENO"; then :
8971 gl_cv_header_limits_width=yes
8972else
8973 gl_cv_header_limits_width=no
8974fi
8975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8976fi
8977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
8978$as_echo "$gl_cv_header_limits_width" >&6; }
8979 if test "$gl_cv_header_limits_width" = yes; then
8980 LIMITS_H=
8690e634 8981 else
6ec2e0f5 8982 LIMITS_H=limits.h
8690e634
JK
8983 fi
8984
6ec2e0f5
SDJ
8985 if test -n "$LIMITS_H"; then
8986 GL_GENERATE_LIMITS_H_TRUE=
8987 GL_GENERATE_LIMITS_H_FALSE='#'
8988else
8989 GL_GENERATE_LIMITS_H_TRUE='#'
8990 GL_GENERATE_LIMITS_H_FALSE=
8991fi
8992
8690e634 8993
6ec2e0f5
SDJ
8994
8995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
8996$as_echo_n "checking for unsigned long long int... " >&6; }
8997if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
8690e634
JK
8998 $as_echo_n "(cached) " >&6
8999else
6ec2e0f5
SDJ
9000 ac_cv_type_unsigned_long_long_int=yes
9001 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
8690e634
JK
9002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9003/* end confdefs.h. */
9004
6ec2e0f5
SDJ
9005 /* For now, do not test the preprocessor; as of 2007 there are too many
9006 implementations with broken preprocessors. Perhaps this can
9007 be revisited in 2012. In the meantime, code should not expect
9008 #if to work with literals wider than 32 bits. */
9009 /* Test literals. */
9010 long long int ll = 9223372036854775807ll;
9011 long long int nll = -9223372036854775807LL;
9012 unsigned long long int ull = 18446744073709551615ULL;
9013 /* Test constant expressions. */
9014 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
9015 ? 1 : -1)];
9016 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
9017 ? 1 : -1)];
9018 int i = 63;
9019int
9020main ()
9021{
9022/* Test availability of runtime routines for shift and division. */
9023 long long int llmax = 9223372036854775807ll;
9024 unsigned long long int ullmax = 18446744073709551615ull;
9025 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
9026 | (llmax / ll) | (llmax % ll)
9027 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
9028 | (ullmax / ull) | (ullmax % ull));
9029 ;
9030 return 0;
9031}
8690e634 9032
6ec2e0f5
SDJ
9033_ACEOF
9034if ac_fn_c_try_link "$LINENO"; then :
8690e634 9035
6ec2e0f5
SDJ
9036else
9037 ac_cv_type_unsigned_long_long_int=no
9038fi
9039rm -f core conftest.err conftest.$ac_objext \
9040 conftest$ac_exeext conftest.$ac_ext
9041 fi
9042fi
9043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
9044$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
9045 if test $ac_cv_type_unsigned_long_long_int = yes; then
8690e634 9046
6ec2e0f5 9047$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
8690e634 9048
6ec2e0f5 9049 fi
8690e634 9050
8690e634 9051
8690e634 9052
6ec2e0f5
SDJ
9053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
9054$as_echo_n "checking for long long int... " >&6; }
9055if test "${ac_cv_type_long_long_int+set}" = set; then :
9056 $as_echo_n "(cached) " >&6
9057else
9058 ac_cv_type_long_long_int=yes
9059 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
9060 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
9061 if test $ac_cv_type_long_long_int = yes; then
9062 if test "$cross_compiling" = yes; then :
9063 :
8690e634
JK
9064else
9065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9066/* end confdefs.h. */
6ec2e0f5
SDJ
9067#include <limits.h>
9068 #ifndef LLONG_MAX
9069 # define HALF \
9070 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
9071 # define LLONG_MAX (HALF - 1 + HALF)
9072 #endif
8690e634
JK
9073int
9074main ()
9075{
6ec2e0f5
SDJ
9076long long int n = 1;
9077 int i;
9078 for (i = 0; ; i++)
9079 {
9080 long long int m = n << i;
9081 if (m >> i != n)
9082 return 1;
9083 if (LLONG_MAX / 2 < m)
9084 break;
9085 }
9086 return 0;
8690e634
JK
9087 ;
9088 return 0;
9089}
9090_ACEOF
9091if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5
SDJ
9092
9093else
9094 ac_cv_type_long_long_int=no
8690e634
JK
9095fi
9096rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9097 conftest.$ac_objext conftest.beam conftest.$ac_ext
9098fi
9099
6ec2e0f5
SDJ
9100 fi
9101 fi
8690e634 9102fi
6ec2e0f5
SDJ
9103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
9104$as_echo "$ac_cv_type_long_long_int" >&6; }
9105 if test $ac_cv_type_long_long_int = yes; then
49e4877c 9106
6ec2e0f5 9107$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
49e4877c 9108
6ec2e0f5 9109 fi
49e4877c 9110
49e4877c
PA
9111
9112
49e4877c
PA
9113
9114
49e4877c 9115
6ec2e0f5
SDJ
9116 gl_cv_c_multiarch=no
9117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9118/* end confdefs.h. */
9119#ifndef __APPLE_CC__
9120 not a universal capable compiler
9121 #endif
9122 typedef int dummy;
49e4877c 9123
49e4877c
PA
9124_ACEOF
9125if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5
SDJ
9126
9127 arch=
9128 prev=
9129 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
9130 if test -n "$prev"; then
9131 case $word in
9132 i?86 | x86_64 | ppc | ppc64)
9133 if test -z "$arch" || test "$arch" = "$word"; then
9134 arch="$word"
9135 else
9136 gl_cv_c_multiarch=yes
9137 fi
9138 ;;
9139 esac
9140 prev=
9141 else
9142 if test "x$word" = "x-arch"; then
9143 prev=arch
9144 fi
9145 fi
9146 done
9147
49e4877c
PA
9148fi
9149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
9150 if test $gl_cv_c_multiarch = yes; then
9151 APPLE_UNIVERSAL_BUILD=1
9152 else
9153 APPLE_UNIVERSAL_BUILD=0
9154 fi
49e4877c 9155
49e4877c 9156
49e4877c
PA
9157
9158
49e4877c 9159
49e4877c 9160
49e4877c 9161
6ec2e0f5
SDJ
9162 if test $ac_cv_type_long_long_int = yes; then
9163 HAVE_LONG_LONG_INT=1
9164 else
9165 HAVE_LONG_LONG_INT=0
9166 fi
49e4877c 9167
49e4877c 9168
6ec2e0f5
SDJ
9169 if test $ac_cv_type_unsigned_long_long_int = yes; then
9170 HAVE_UNSIGNED_LONG_LONG_INT=1
8690e634 9171 else
6ec2e0f5
SDJ
9172 HAVE_UNSIGNED_LONG_LONG_INT=0
9173 fi
8690e634 9174
8690e634 9175
8690e634 9176
6ec2e0f5
SDJ
9177 if test $ac_cv_header_wchar_h = yes; then
9178 HAVE_WCHAR_H=1
9179 else
9180 HAVE_WCHAR_H=0
9181 fi
8690e634
JK
9182
9183
6ec2e0f5
SDJ
9184 if test $ac_cv_header_inttypes_h = yes; then
9185 HAVE_INTTYPES_H=1
9186 else
9187 HAVE_INTTYPES_H=0
9188 fi
8690e634
JK
9189
9190
6ec2e0f5
SDJ
9191 if test $ac_cv_header_sys_types_h = yes; then
9192 HAVE_SYS_TYPES_H=1
9193 else
9194 HAVE_SYS_TYPES_H=0
9195 fi
8690e634 9196
8690e634 9197
8690e634 9198
8690e634 9199
8690e634 9200
8690e634
JK
9201
9202
8690e634
JK
9203
9204
6ec2e0f5
SDJ
9205
9206
9207 if test $gl_cv_have_include_next = yes; then
9208 gl_cv_next_stdint_h='<'stdint.h'>'
9209 else
9210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
9211$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
9212if test "${gl_cv_next_stdint_h+set}" = set; then :
8690e634
JK
9213 $as_echo_n "(cached) " >&6
9214else
8690e634 9215
6ec2e0f5 9216 if test $ac_cv_header_stdint_h = yes; then
8690e634 9217
8690e634 9218
8690e634 9219
6ec2e0f5
SDJ
9220
9221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9222/* end confdefs.h. */
9223#include <stdint.h>
8690e634 9224_ACEOF
6ec2e0f5
SDJ
9225 case "$host_os" in
9226 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9227 *) gl_absname_cpp="$ac_cpp" ;;
9228 esac
8690e634 9229
6ec2e0f5
SDJ
9230 case "$host_os" in
9231 mingw*)
9232 gl_dirsep_regex='[/\\]'
9233 ;;
9234 *)
9235 gl_dirsep_regex='\/'
9236 ;;
9237 esac
9238 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9239 gl_header_literal_regex=`echo 'stdint.h' \
9240 | sed -e "$gl_make_literal_regex_sed"`
9241 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9242 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9243 s|^/[^/]|//&|
9244 p
9245 q
9246 }'
9247
9248 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9249 sed -n "$gl_absolute_header_sed"`
9250
9251 gl_header=$gl_cv_absolute_stdint_h
9252 gl_cv_next_stdint_h='"'$gl_header'"'
9253 else
9254 gl_cv_next_stdint_h='<'stdint.h'>'
9255 fi
9256
9257
9258fi
9259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
9260$as_echo "$gl_cv_next_stdint_h" >&6; }
9261 fi
9262 NEXT_STDINT_H=$gl_cv_next_stdint_h
9263
9264 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9265 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9266 gl_next_as_first_directive='<'stdint.h'>'
9267 else
9268 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9269 gl_next_as_first_directive=$gl_cv_next_stdint_h
9270 fi
9271 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
8690e634
JK
9272
9273
9274
9275
6ec2e0f5
SDJ
9276 if test $ac_cv_header_stdint_h = yes; then
9277 HAVE_STDINT_H=1
9278 else
9279 HAVE_STDINT_H=0
9280 fi
9281
9282
9283 if test $ac_cv_header_stdint_h = yes; then
9284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
9285$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
9286if test "${gl_cv_header_working_stdint_h+set}" = set; then :
8690e634
JK
9287 $as_echo_n "(cached) " >&6
9288else
6ec2e0f5
SDJ
9289 gl_cv_header_working_stdint_h=no
9290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
9291/* end confdefs.h. */
9292
6ec2e0f5
SDJ
9293
9294#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
9295#define __STDC_CONSTANT_MACROS 1
9296#define __STDC_LIMIT_MACROS 1
9297#include <stdint.h>
9298/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
9299#if !(defined WCHAR_MIN && defined WCHAR_MAX)
9300#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
9301#endif
9302
9303
8690e634
JK
9304 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9305 included before <wchar.h>. */
9306 #include <stddef.h>
9307 #include <signal.h>
9308 #if HAVE_WCHAR_H
9309 # include <stdio.h>
9310 # include <time.h>
9311 # include <wchar.h>
9312 #endif
9313
8690e634 9314
6ec2e0f5
SDJ
9315#ifdef INT8_MAX
9316int8_t a1 = INT8_MAX;
9317int8_t a1min = INT8_MIN;
9318#endif
9319#ifdef INT16_MAX
9320int16_t a2 = INT16_MAX;
9321int16_t a2min = INT16_MIN;
9322#endif
9323#ifdef INT32_MAX
9324int32_t a3 = INT32_MAX;
9325int32_t a3min = INT32_MIN;
9326#endif
9327#ifdef INT64_MAX
9328int64_t a4 = INT64_MAX;
9329int64_t a4min = INT64_MIN;
9330#endif
9331#ifdef UINT8_MAX
9332uint8_t b1 = UINT8_MAX;
9333#else
9334typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
9335#endif
9336#ifdef UINT16_MAX
9337uint16_t b2 = UINT16_MAX;
9338#endif
9339#ifdef UINT32_MAX
9340uint32_t b3 = UINT32_MAX;
9341#endif
9342#ifdef UINT64_MAX
9343uint64_t b4 = UINT64_MAX;
9344#endif
9345int_least8_t c1 = INT8_C (0x7f);
9346int_least8_t c1max = INT_LEAST8_MAX;
9347int_least8_t c1min = INT_LEAST8_MIN;
9348int_least16_t c2 = INT16_C (0x7fff);
9349int_least16_t c2max = INT_LEAST16_MAX;
9350int_least16_t c2min = INT_LEAST16_MIN;
9351int_least32_t c3 = INT32_C (0x7fffffff);
9352int_least32_t c3max = INT_LEAST32_MAX;
9353int_least32_t c3min = INT_LEAST32_MIN;
9354int_least64_t c4 = INT64_C (0x7fffffffffffffff);
9355int_least64_t c4max = INT_LEAST64_MAX;
9356int_least64_t c4min = INT_LEAST64_MIN;
9357uint_least8_t d1 = UINT8_C (0xff);
9358uint_least8_t d1max = UINT_LEAST8_MAX;
9359uint_least16_t d2 = UINT16_C (0xffff);
9360uint_least16_t d2max = UINT_LEAST16_MAX;
9361uint_least32_t d3 = UINT32_C (0xffffffff);
9362uint_least32_t d3max = UINT_LEAST32_MAX;
9363uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
9364uint_least64_t d4max = UINT_LEAST64_MAX;
9365int_fast8_t e1 = INT_FAST8_MAX;
9366int_fast8_t e1min = INT_FAST8_MIN;
9367int_fast16_t e2 = INT_FAST16_MAX;
9368int_fast16_t e2min = INT_FAST16_MIN;
9369int_fast32_t e3 = INT_FAST32_MAX;
9370int_fast32_t e3min = INT_FAST32_MIN;
9371int_fast64_t e4 = INT_FAST64_MAX;
9372int_fast64_t e4min = INT_FAST64_MIN;
9373uint_fast8_t f1 = UINT_FAST8_MAX;
9374uint_fast16_t f2 = UINT_FAST16_MAX;
9375uint_fast32_t f3 = UINT_FAST32_MAX;
9376uint_fast64_t f4 = UINT_FAST64_MAX;
9377#ifdef INTPTR_MAX
9378intptr_t g = INTPTR_MAX;
9379intptr_t gmin = INTPTR_MIN;
9380#endif
9381#ifdef UINTPTR_MAX
9382uintptr_t h = UINTPTR_MAX;
9383#endif
9384intmax_t i = INTMAX_MAX;
9385uintmax_t j = UINTMAX_MAX;
8690e634 9386
6ec2e0f5
SDJ
9387/* Check that SIZE_MAX has the correct type, if possible. */
9388#if 201112 <= __STDC_VERSION__
9389int k = _Generic (SIZE_MAX, size_t: 0);
9390#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
9391 || (0x5110 <= __SUNPRO_C && !__STDC__))
9392extern size_t k;
9393extern __typeof__ (SIZE_MAX) k;
9394#endif
8690e634 9395
6ec2e0f5
SDJ
9396#include <limits.h> /* for CHAR_BIT */
9397#define TYPE_MINIMUM(t) \
9398 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
9399#define TYPE_MAXIMUM(t) \
9400 ((t) ((t) 0 < (t) -1 \
9401 ? (t) -1 \
9402 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
9403struct s {
9404 int check_PTRDIFF:
9405 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
9406 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
9407 ? 1 : -1;
9408 /* Detect bug in FreeBSD 6.0 / ia64. */
9409 int check_SIG_ATOMIC:
9410 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
9411 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
9412 ? 1 : -1;
9413 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
9414 int check_WCHAR:
9415 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
9416 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
9417 ? 1 : -1;
9418 /* Detect bug in mingw. */
9419 int check_WINT:
9420 WINT_MIN == TYPE_MINIMUM (wint_t)
9421 && WINT_MAX == TYPE_MAXIMUM (wint_t)
9422 ? 1 : -1;
8690e634 9423
6ec2e0f5
SDJ
9424 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
9425 int check_UINT8_C:
9426 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
9427 int check_UINT16_C:
9428 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
8690e634 9429
6ec2e0f5
SDJ
9430 /* Detect bugs in OpenBSD 3.9 stdint.h. */
9431#ifdef UINT8_MAX
9432 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
9433#endif
9434#ifdef UINT16_MAX
9435 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
9436#endif
9437#ifdef UINT32_MAX
9438 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
9439#endif
9440#ifdef UINT64_MAX
9441 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
9442#endif
9443 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
9444 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
9445 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
9446 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
9447 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
9448 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
9449 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
9450 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
9451 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
9452 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
9453 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
9454};
8690e634 9455
8690e634
JK
9456int
9457main ()
9458{
9459
9460 ;
9461 return 0;
9462}
9463_ACEOF
9464if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5
SDJ
9465 if test "$cross_compiling" = yes; then :
9466 gl_cv_header_working_stdint_h=yes
8690e634 9467
6ec2e0f5
SDJ
9468else
9469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9470/* end confdefs.h. */
8690e634 9471
8690e634 9472
6ec2e0f5
SDJ
9473#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
9474#define __STDC_CONSTANT_MACROS 1
9475#define __STDC_LIMIT_MACROS 1
9476#include <stdint.h>
8690e634 9477
8690e634
JK
9478
9479 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9480 included before <wchar.h>. */
9481 #include <stddef.h>
9482 #include <signal.h>
9483 #if HAVE_WCHAR_H
9484 # include <stdio.h>
9485 # include <time.h>
9486 # include <wchar.h>
9487 #endif
9488
8690e634 9489
6ec2e0f5
SDJ
9490#include <stdio.h>
9491#include <string.h>
9492#define MVAL(macro) MVAL1(macro)
9493#define MVAL1(expression) #expression
9494static const char *macro_values[] =
9495 {
9496#ifdef INT8_MAX
9497 MVAL (INT8_MAX),
9498#endif
9499#ifdef INT16_MAX
9500 MVAL (INT16_MAX),
9501#endif
9502#ifdef INT32_MAX
9503 MVAL (INT32_MAX),
9504#endif
9505#ifdef INT64_MAX
9506 MVAL (INT64_MAX),
9507#endif
9508#ifdef UINT8_MAX
9509 MVAL (UINT8_MAX),
9510#endif
9511#ifdef UINT16_MAX
9512 MVAL (UINT16_MAX),
9513#endif
9514#ifdef UINT32_MAX
9515 MVAL (UINT32_MAX),
9516#endif
9517#ifdef UINT64_MAX
9518 MVAL (UINT64_MAX),
9519#endif
9520 NULL
9521 };
9522
9523int
9524main ()
9525{
9526
9527 const char **mv;
9528 for (mv = macro_values; *mv != NULL; mv++)
9529 {
9530 const char *value = *mv;
9531 /* Test whether it looks like a cast expression. */
9532 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
9533 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
9534 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
9535 || strncmp (value, "((int)"/*)*/, 6) == 0
9536 || strncmp (value, "((signed short)"/*)*/, 15) == 0
9537 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
9538 return mv - macro_values + 1;
9539 }
9540 return 0;
9541
9542 ;
8690e634
JK
9543 return 0;
9544}
9545_ACEOF
6ec2e0f5
SDJ
9546if ac_fn_c_try_run "$LINENO"; then :
9547 gl_cv_header_working_stdint_h=yes
8690e634 9548fi
6ec2e0f5
SDJ
9549rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9550 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 9551fi
8690e634
JK
9552
9553
6ec2e0f5
SDJ
9554fi
9555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 9556
6ec2e0f5
SDJ
9557fi
9558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
9559$as_echo "$gl_cv_header_working_stdint_h" >&6; }
8690e634
JK
9560 fi
9561
6ec2e0f5
SDJ
9562 HAVE_C99_STDINT_H=0
9563 HAVE_SYS_BITYPES_H=0
9564 HAVE_SYS_INTTYPES_H=0
9565 STDINT_H=stdint.h
9566 if test "$gl_cv_header_working_stdint_h" = yes; then
9567 HAVE_C99_STDINT_H=1
9568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
9569$as_echo_n "checking whether stdint.h predates C++11... " >&6; }
9570if test "${gl_cv_header_stdint_predates_cxx11_h+set}" = set; then :
9571 $as_echo_n "(cached) " >&6
49e4877c 9572else
6ec2e0f5
SDJ
9573 gl_cv_header_stdint_predates_cxx11_h=yes
9574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9575/* end confdefs.h. */
49e4877c
PA
9576
9577
6ec2e0f5
SDJ
9578#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
9579#include <stdint.h>
49e4877c
PA
9580
9581
6ec2e0f5
SDJ
9582 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9583 included before <wchar.h>. */
9584 #include <stddef.h>
9585 #include <signal.h>
9586 #if HAVE_WCHAR_H
9587 # include <stdio.h>
9588 # include <time.h>
9589 # include <wchar.h>
9590 #endif
49e4877c 9591
8690e634 9592
6ec2e0f5
SDJ
9593intmax_t im = INTMAX_MAX;
9594int32_t i32 = INT32_C (0x7fffffff);
8690e634 9595
6ec2e0f5
SDJ
9596int
9597main ()
9598{
8690e634 9599
6ec2e0f5
SDJ
9600 ;
9601 return 0;
9602}
9603_ACEOF
9604if ac_fn_c_try_compile "$LINENO"; then :
9605 gl_cv_header_stdint_predates_cxx11_h=no
9606fi
9607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9608fi
9609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
9610$as_echo "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
8690e634 9611
6ec2e0f5 9612 if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
8690e634 9613
6ec2e0f5 9614$as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
8690e634
JK
9615
9616
6ec2e0f5 9617$as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
8690e634 9618
6ec2e0f5
SDJ
9619 fi
9620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
9621$as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
9622if test "${gl_cv_header_stdint_width+set}" = set; then :
9623 $as_echo_n "(cached) " >&6
9624else
9625 gl_cv_header_stdint_width=no
9626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9627/* end confdefs.h. */
8690e634 9628
6ec2e0f5
SDJ
9629 /* Work if build is not clean. */
9630 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
9631 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
9632 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
9633 #endif
9634 #include <stdint.h>
8690e634 9635
6ec2e0f5
SDJ
9636 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9637 included before <wchar.h>. */
9638 #include <stddef.h>
9639 #include <signal.h>
9640 #if HAVE_WCHAR_H
9641 # include <stdio.h>
9642 # include <time.h>
9643 # include <wchar.h>
9644 #endif
8690e634 9645
6ec2e0f5 9646 int iw = UINTMAX_WIDTH;
8690e634 9647
6ec2e0f5
SDJ
9648int
9649main ()
9650{
8690e634 9651
6ec2e0f5
SDJ
9652 ;
9653 return 0;
9654}
9655_ACEOF
9656if ac_fn_c_try_compile "$LINENO"; then :
9657 gl_cv_header_stdint_width=yes
9658fi
9659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9660fi
9661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
9662$as_echo "$gl_cv_header_stdint_width" >&6; }
9663 if test "$gl_cv_header_stdint_width" = yes; then
9664 STDINT_H=
9665 fi
9666 else
9667 for ac_header in sys/inttypes.h sys/bitypes.h
9668do :
9669 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9670ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9671eval as_val=\$$as_ac_Header
9672 if test "x$as_val" = x""yes; then :
9673 cat >>confdefs.h <<_ACEOF
9674#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9675_ACEOF
8690e634 9676
6ec2e0f5 9677fi
8690e634 9678
6ec2e0f5 9679done
8690e634 9680
6ec2e0f5
SDJ
9681 if test $ac_cv_header_sys_inttypes_h = yes; then
9682 HAVE_SYS_INTTYPES_H=1
9683 fi
9684 if test $ac_cv_header_sys_bitypes_h = yes; then
9685 HAVE_SYS_BITYPES_H=1
9686 fi
8690e634
JK
9687
9688
6ec2e0f5 9689 if test $APPLE_UNIVERSAL_BUILD = 0; then
8690e634
JK
9690
9691
6ec2e0f5
SDJ
9692 for gltype in ptrdiff_t size_t ; do
9693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
9694$as_echo_n "checking for bit size of $gltype... " >&6; }
9695if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
8690e634
JK
9696 $as_echo_n "(cached) " >&6
9697else
6ec2e0f5
SDJ
9698 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
9699 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9700 included before <wchar.h>. */
9701 #include <stddef.h>
9702 #include <signal.h>
9703 #if HAVE_WCHAR_H
9704 # include <stdio.h>
9705 # include <time.h>
9706 # include <wchar.h>
9707 #endif
8690e634 9708
6ec2e0f5 9709#include <limits.h>"; then :
4a626d0a 9710
6ec2e0f5
SDJ
9711else
9712 result=unknown
9713fi
4a626d0a 9714
6ec2e0f5 9715 eval gl_cv_bitsizeof_${gltype}=\$result
4a626d0a 9716
6ec2e0f5
SDJ
9717fi
9718eval ac_res=\$gl_cv_bitsizeof_${gltype}
9719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9720$as_echo "$ac_res" >&6; }
9721 eval result=\$gl_cv_bitsizeof_${gltype}
9722 if test $result = unknown; then
9723 result=0
9724 fi
9725 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
9726 cat >>confdefs.h <<_ACEOF
9727#define BITSIZEOF_${GLTYPE} $result
9728_ACEOF
4a626d0a 9729
6ec2e0f5
SDJ
9730 eval BITSIZEOF_${GLTYPE}=\$result
9731 done
4a626d0a 9732
8690e634 9733
6ec2e0f5 9734 fi
8690e634 9735
8690e634 9736
6ec2e0f5
SDJ
9737 for gltype in sig_atomic_t wchar_t wint_t ; do
9738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
9739$as_echo_n "checking for bit size of $gltype... " >&6; }
9740if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
9741 $as_echo_n "(cached) " >&6
9742else
9743 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
9744 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9745 included before <wchar.h>. */
9746 #include <stddef.h>
9747 #include <signal.h>
9748 #if HAVE_WCHAR_H
9749 # include <stdio.h>
9750 # include <time.h>
9751 # include <wchar.h>
9752 #endif
8690e634 9753
6ec2e0f5
SDJ
9754#include <limits.h>"; then :
9755
9756else
9757 result=unknown
9758fi
8690e634 9759
6ec2e0f5 9760 eval gl_cv_bitsizeof_${gltype}=\$result
8690e634 9761
6ec2e0f5
SDJ
9762fi
9763eval ac_res=\$gl_cv_bitsizeof_${gltype}
9764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9765$as_echo "$ac_res" >&6; }
9766 eval result=\$gl_cv_bitsizeof_${gltype}
9767 if test $result = unknown; then
9768 result=0
9769 fi
9770 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
9771 cat >>confdefs.h <<_ACEOF
9772#define BITSIZEOF_${GLTYPE} $result
9773_ACEOF
8690e634 9774
6ec2e0f5
SDJ
9775 eval BITSIZEOF_${GLTYPE}=\$result
9776 done
8690e634
JK
9777
9778
9779
9780
6ec2e0f5
SDJ
9781 for gltype in sig_atomic_t wchar_t wint_t ; do
9782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
9783$as_echo_n "checking whether $gltype is signed... " >&6; }
9784if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
8690e634
JK
9785 $as_echo_n "(cached) " >&6
9786else
9787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9788/* end confdefs.h. */
8690e634 9789
6ec2e0f5
SDJ
9790 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9791 included before <wchar.h>. */
9792 #include <stddef.h>
9793 #include <signal.h>
9794 #if HAVE_WCHAR_H
9795 # include <stdio.h>
9796 # include <time.h>
9797 # include <wchar.h>
9798 #endif
9799
9800 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
8690e634
JK
9801int
9802main ()
9803{
6ec2e0f5 9804
8690e634
JK
9805 ;
9806 return 0;
9807}
9808_ACEOF
9809if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 9810 result=yes
8690e634 9811else
6ec2e0f5 9812 result=no
8690e634
JK
9813fi
9814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
9815 eval gl_cv_type_${gltype}_signed=\$result
9816
8690e634 9817fi
6ec2e0f5 9818eval ac_res=\$gl_cv_type_${gltype}_signed
8690e634
JK
9819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9820$as_echo "$ac_res" >&6; }
6ec2e0f5
SDJ
9821 eval result=\$gl_cv_type_${gltype}_signed
9822 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
9823 if test "$result" = yes; then
9824 cat >>confdefs.h <<_ACEOF
9825#define HAVE_SIGNED_${GLTYPE} 1
8690e634
JK
9826_ACEOF
9827
6ec2e0f5
SDJ
9828 eval HAVE_SIGNED_${GLTYPE}=1
9829 else
9830 eval HAVE_SIGNED_${GLTYPE}=0
9831 fi
9832 done
8690e634 9833
8690e634 9834
6ec2e0f5
SDJ
9835 gl_cv_type_ptrdiff_t_signed=yes
9836 gl_cv_type_size_t_signed=no
9837 if test $APPLE_UNIVERSAL_BUILD = 0; then
8690e634 9838
8690e634 9839
6ec2e0f5
SDJ
9840 for gltype in ptrdiff_t size_t ; do
9841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
9842$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
9843if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
8690e634
JK
9844 $as_echo_n "(cached) " >&6
9845else
6ec2e0f5
SDJ
9846 eval gl_cv_type_${gltype}_suffix=no
9847 eval result=\$gl_cv_type_${gltype}_signed
9848 if test "$result" = yes; then
9849 glsufu=
9850 else
9851 glsufu=u
9852 fi
9853 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
9854 case $glsuf in
9855 '') gltype1='int';;
9856 l) gltype1='long int';;
9857 ll) gltype1='long long int';;
9858 i64) gltype1='__int64';;
9859 u) gltype1='unsigned int';;
9860 ul) gltype1='unsigned long int';;
9861 ull) gltype1='unsigned long long int';;
9862 ui64)gltype1='unsigned __int64';;
9863 esac
9864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
9865/* end confdefs.h. */
9866
6ec2e0f5
SDJ
9867 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9868 included before <wchar.h>. */
9869 #include <stddef.h>
9870 #include <signal.h>
9871 #if HAVE_WCHAR_H
9872 # include <stdio.h>
9873 # include <time.h>
9874 # include <wchar.h>
9875 #endif
8690e634 9876
6ec2e0f5
SDJ
9877 extern $gltype foo;
9878 extern $gltype1 foo;
8690e634
JK
9879int
9880main ()
9881{
9882
9883 ;
9884 return 0;
9885}
9886_ACEOF
9887if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 9888 eval gl_cv_type_${gltype}_suffix=\$glsuf
8690e634
JK
9889fi
9890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
9891 eval result=\$gl_cv_type_${gltype}_suffix
9892 test "$result" != no && break
9893 done
8690e634 9894fi
6ec2e0f5
SDJ
9895eval ac_res=\$gl_cv_type_${gltype}_suffix
9896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9897$as_echo "$ac_res" >&6; }
9898 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
9899 eval result=\$gl_cv_type_${gltype}_suffix
9900 test "$result" = no && result=
9901 eval ${GLTYPE}_SUFFIX=\$result
9902 cat >>confdefs.h <<_ACEOF
9903#define ${GLTYPE}_SUFFIX $result
8690e634
JK
9904_ACEOF
9905
6ec2e0f5 9906 done
8690e634
JK
9907
9908
6ec2e0f5 9909 fi
8690e634 9910
6ec2e0f5
SDJ
9911
9912 for gltype in sig_atomic_t wchar_t wint_t ; do
9913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
9914$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
9915if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
8690e634
JK
9916 $as_echo_n "(cached) " >&6
9917else
6ec2e0f5
SDJ
9918 eval gl_cv_type_${gltype}_suffix=no
9919 eval result=\$gl_cv_type_${gltype}_signed
9920 if test "$result" = yes; then
9921 glsufu=
9922 else
9923 glsufu=u
9924 fi
9925 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
9926 case $glsuf in
9927 '') gltype1='int';;
9928 l) gltype1='long int';;
9929 ll) gltype1='long long int';;
9930 i64) gltype1='__int64';;
9931 u) gltype1='unsigned int';;
9932 ul) gltype1='unsigned long int';;
9933 ull) gltype1='unsigned long long int';;
9934 ui64)gltype1='unsigned __int64';;
9935 esac
9936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 9937/* end confdefs.h. */
88b48903 9938
6ec2e0f5
SDJ
9939 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9940 included before <wchar.h>. */
9941 #include <stddef.h>
9942 #include <signal.h>
9943 #if HAVE_WCHAR_H
9944 # include <stdio.h>
9945 # include <time.h>
9946 # include <wchar.h>
9947 #endif
88b48903 9948
6ec2e0f5
SDJ
9949 extern $gltype foo;
9950 extern $gltype1 foo;
88b48903
WN
9951int
9952main ()
9953{
88b48903
WN
9954
9955 ;
9956 return 0;
9957}
9958_ACEOF
9959if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 9960 eval gl_cv_type_${gltype}_suffix=\$glsuf
8690e634 9961fi
88b48903 9962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
9963 eval result=\$gl_cv_type_${gltype}_suffix
9964 test "$result" != no && break
9965 done
8690e634 9966fi
6ec2e0f5
SDJ
9967eval ac_res=\$gl_cv_type_${gltype}_suffix
9968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9969$as_echo "$ac_res" >&6; }
9970 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
9971 eval result=\$gl_cv_type_${gltype}_suffix
9972 test "$result" = no && result=
9973 eval ${GLTYPE}_SUFFIX=\$result
9974 cat >>confdefs.h <<_ACEOF
9975#define ${GLTYPE}_SUFFIX $result
88b48903 9976_ACEOF
8690e634 9977
6ec2e0f5 9978 done
8690e634
JK
9979
9980
9981
6ec2e0f5
SDJ
9982 if test $BITSIZEOF_WINT_T -lt 32; then
9983 BITSIZEOF_WINT_T=32
9984 fi
8690e634 9985
6ec2e0f5
SDJ
9986 fi
9987
9988 # The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH.
9989 LIMITS_H=limits.h
9990 if test -n "$LIMITS_H"; then
9991 GL_GENERATE_LIMITS_H_TRUE=
9992 GL_GENERATE_LIMITS_H_FALSE='#'
88b48903 9993else
6ec2e0f5
SDJ
9994 GL_GENERATE_LIMITS_H_TRUE='#'
9995 GL_GENERATE_LIMITS_H_FALSE=
88b48903 9996fi
8690e634
JK
9997
9998
9999
10000
10001
6ec2e0f5
SDJ
10002
10003 if test -n "$STDINT_H"; then
10004 GL_GENERATE_STDINT_H_TRUE=
10005 GL_GENERATE_STDINT_H_FALSE='#'
10006else
10007 GL_GENERATE_STDINT_H_TRUE='#'
10008 GL_GENERATE_STDINT_H_FALSE=
88b48903 10009fi
8690e634 10010
8690e634
JK
10011
10012
10013
6ec2e0f5
SDJ
10014
10015 GNULIB_IMAXABS=0;
10016 GNULIB_IMAXDIV=0;
10017 GNULIB_STRTOIMAX=0;
10018 GNULIB_STRTOUMAX=0;
10019 HAVE_DECL_IMAXABS=1;
10020 HAVE_DECL_IMAXDIV=1;
10021 HAVE_DECL_STRTOIMAX=1;
10022 HAVE_DECL_STRTOUMAX=1;
10023 REPLACE_STRTOIMAX=0;
10024 REPLACE_STRTOUMAX=0;
10025 INT32_MAX_LT_INTMAX_MAX=1;
10026 INT64_MAX_EQ_LONG_MAX='defined _LP64';
10027 PRI_MACROS_BROKEN=0;
10028 PRIPTR_PREFIX=__PRIPTR_PREFIX;
10029 UINT32_MAX_LT_UINTMAX_MAX=1;
10030 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046 if test $gl_cv_have_include_next = yes; then
10047 gl_cv_next_inttypes_h='<'inttypes.h'>'
10048 else
10049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
10050$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
10051if test "${gl_cv_next_inttypes_h+set}" = set; then :
10052 $as_echo_n "(cached) " >&6
88b48903 10053else
8690e634 10054
6ec2e0f5 10055 if test $ac_cv_header_inttypes_h = yes; then
8690e634
JK
10056
10057
8690e634
JK
10058
10059
6ec2e0f5
SDJ
10060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10061/* end confdefs.h. */
10062#include <inttypes.h>
88b48903 10063_ACEOF
6ec2e0f5
SDJ
10064 case "$host_os" in
10065 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10066 *) gl_absname_cpp="$ac_cpp" ;;
10067 esac
8690e634 10068
6ec2e0f5
SDJ
10069 case "$host_os" in
10070 mingw*)
10071 gl_dirsep_regex='[/\\]'
10072 ;;
10073 *)
10074 gl_dirsep_regex='\/'
88b48903
WN
10075 ;;
10076 esac
6ec2e0f5
SDJ
10077 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10078 gl_header_literal_regex=`echo 'inttypes.h' \
10079 | sed -e "$gl_make_literal_regex_sed"`
10080 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10081 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10082 s|^/[^/]|//&|
10083 p
10084 q
10085 }'
8690e634 10086
6ec2e0f5
SDJ
10087 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10088 sed -n "$gl_absolute_header_sed"`
8690e634 10089
6ec2e0f5
SDJ
10090 gl_header=$gl_cv_absolute_inttypes_h
10091 gl_cv_next_inttypes_h='"'$gl_header'"'
10092 else
10093 gl_cv_next_inttypes_h='<'inttypes.h'>'
10094 fi
88b48903 10095
88b48903 10096
88b48903 10097fi
6ec2e0f5
SDJ
10098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
10099$as_echo "$gl_cv_next_inttypes_h" >&6; }
10100 fi
10101 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
88b48903 10102
6ec2e0f5
SDJ
10103 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10104 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10105 gl_next_as_first_directive='<'inttypes.h'>'
10106 else
10107 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10108 gl_next_as_first_directive=$gl_cv_next_inttypes_h
10109 fi
10110 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
88b48903 10111
6ec2e0f5
SDJ
10112
10113
10114
10115
10116
10117
10118
10119 for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
10120 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
10121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
10122$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
10123if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
10124 $as_echo_n "(cached) " >&6
10125else
10126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
88b48903 10127/* end confdefs.h. */
6ec2e0f5 10128#include <inttypes.h>
88b48903
WN
10129
10130int
10131main ()
10132{
6ec2e0f5
SDJ
10133#undef $gl_func
10134 (void) $gl_func;
88b48903
WN
10135 ;
10136 return 0;
10137}
10138_ACEOF
10139if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 10140 eval "$as_gl_Symbol=yes"
88b48903 10141else
6ec2e0f5 10142 eval "$as_gl_Symbol=no"
88b48903
WN
10143fi
10144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10145fi
6ec2e0f5
SDJ
10146eval ac_res=\$$as_gl_Symbol
10147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10148$as_echo "$ac_res" >&6; }
10149 eval as_val=\$$as_gl_Symbol
10150 if test "x$as_val" = x""yes; then :
10151 cat >>confdefs.h <<_ACEOF
10152#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
10153_ACEOF
10154
10155 eval ac_cv_have_decl_$gl_func=yes
10156fi
10157 done
10158
10159
10160
10161 for ac_header in inttypes.h
10162do :
10163 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
10164if test "x$ac_cv_header_inttypes_h" = x""yes; then :
10165 cat >>confdefs.h <<_ACEOF
10166#define HAVE_INTTYPES_H 1
10167_ACEOF
10168
10169fi
10170
10171done
10172
10173 if test $ac_cv_header_inttypes_h = yes; then
10174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
10175$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
10176if test "${gt_cv_inttypes_pri_broken+set}" = set; then :
10177 $as_echo_n "(cached) " >&6
10178else
10179
10180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10181/* end confdefs.h. */
10182
10183#include <inttypes.h>
10184#ifdef PRId32
10185char *p = PRId32;
10186#endif
10187
10188int
10189main ()
10190{
10191
10192 ;
10193 return 0;
10194}
10195_ACEOF
10196if ac_fn_c_try_compile "$LINENO"; then :
10197 gt_cv_inttypes_pri_broken=no
10198else
10199 gt_cv_inttypes_pri_broken=yes
10200fi
10201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10202
10203fi
10204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
10205$as_echo "$gt_cv_inttypes_pri_broken" >&6; }
10206 fi
10207 if test "$gt_cv_inttypes_pri_broken" = yes; then
10208
10209cat >>confdefs.h <<_ACEOF
10210#define PRI_MACROS_BROKEN 1
10211_ACEOF
10212
10213 PRI_MACROS_BROKEN=1
10214 else
10215 PRI_MACROS_BROKEN=0
10216 fi
10217
10218
10219
10220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
10221$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
10222if test "${gl_cv_cc_double_expbit0+set}" = set; then :
10223 $as_echo_n "(cached) " >&6
10224else
10225
10226 if test "$cross_compiling" = yes; then :
10227
10228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10229/* end confdefs.h. */
10230
10231#if defined arm || defined __arm || defined __arm__
10232 mixed_endianness
10233#endif
10234
10235_ACEOF
10236if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10237 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
10238 gl_cv_cc_double_expbit0="unknown"
10239else
10240
10241 :
10242if test "${ac_cv_c_bigendian+set}" = set; then :
10243 $as_echo_n "(cached) " >&6
10244else
10245 ac_cv_c_bigendian=unknown
10246 # See if we're dealing with a universal compiler.
10247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10248/* end confdefs.h. */
10249#ifndef __APPLE_CC__
10250 not a universal capable compiler
10251 #endif
10252 typedef int dummy;
10253
10254_ACEOF
10255if ac_fn_c_try_compile "$LINENO"; then :
10256
10257 # Check for potential -arch flags. It is not universal unless
10258 # there are at least two -arch flags with different values.
10259 ac_arch=
10260 ac_prev=
10261 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
10262 if test -n "$ac_prev"; then
10263 case $ac_word in
10264 i?86 | x86_64 | ppc | ppc64)
10265 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
10266 ac_arch=$ac_word
10267 else
10268 ac_cv_c_bigendian=universal
10269 break
10270 fi
10271 ;;
10272 esac
10273 ac_prev=
10274 elif test "x$ac_word" = "x-arch"; then
10275 ac_prev=arch
10276 fi
10277 done
10278fi
10279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10280 if test $ac_cv_c_bigendian = unknown; then
10281 # See if sys/param.h defines the BYTE_ORDER macro.
10282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10283/* end confdefs.h. */
10284#include <sys/types.h>
10285 #include <sys/param.h>
10286
10287int
10288main ()
10289{
10290#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
10291 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
10292 && LITTLE_ENDIAN)
10293 bogus endian macros
10294 #endif
10295
10296 ;
10297 return 0;
10298}
10299_ACEOF
10300if ac_fn_c_try_compile "$LINENO"; then :
10301 # It does; now see whether it defined to BIG_ENDIAN or not.
10302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10303/* end confdefs.h. */
10304#include <sys/types.h>
10305 #include <sys/param.h>
10306
10307int
10308main ()
10309{
10310#if BYTE_ORDER != BIG_ENDIAN
10311 not big endian
10312 #endif
10313
10314 ;
10315 return 0;
10316}
10317_ACEOF
10318if ac_fn_c_try_compile "$LINENO"; then :
10319 ac_cv_c_bigendian=yes
10320else
10321 ac_cv_c_bigendian=no
10322fi
10323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10324fi
10325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10326 fi
10327 if test $ac_cv_c_bigendian = unknown; then
10328 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
10329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10330/* end confdefs.h. */
10331#include <limits.h>
10332
10333int
88b48903
WN
10334main ()
10335{
10336#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
10337 bogus endian macros
10338 #endif
10339
10340 ;
10341 return 0;
10342}
10343_ACEOF
10344if ac_fn_c_try_compile "$LINENO"; then :
10345 # It does; now see whether it defined to _BIG_ENDIAN or not.
10346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10347/* end confdefs.h. */
10348#include <limits.h>
10349
10350int
10351main ()
10352{
10353#ifndef _BIG_ENDIAN
10354 not big endian
10355 #endif
10356
10357 ;
10358 return 0;
10359}
10360_ACEOF
10361if ac_fn_c_try_compile "$LINENO"; then :
10362 ac_cv_c_bigendian=yes
10363else
10364 ac_cv_c_bigendian=no
10365fi
10366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10367fi
10368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10369 fi
10370 if test $ac_cv_c_bigendian = unknown; then
10371 # Compile a test program.
10372 if test "$cross_compiling" = yes; then :
10373 # Try to guess by grepping values from an object file.
10374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10375/* end confdefs.h. */
10376short int ascii_mm[] =
10377 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
10378 short int ascii_ii[] =
10379 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
10380 int use_ascii (int i) {
10381 return ascii_mm[i] + ascii_ii[i];
10382 }
10383 short int ebcdic_ii[] =
10384 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
10385 short int ebcdic_mm[] =
10386 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
10387 int use_ebcdic (int i) {
10388 return ebcdic_mm[i] + ebcdic_ii[i];
10389 }
10390 extern int foo;
10391
10392int
10393main ()
10394{
10395return use_ascii (foo) == use_ebcdic (foo);
10396 ;
10397 return 0;
10398}
10399_ACEOF
10400if ac_fn_c_try_compile "$LINENO"; then :
10401 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
10402 ac_cv_c_bigendian=yes
10403 fi
10404 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
10405 if test "$ac_cv_c_bigendian" = unknown; then
10406 ac_cv_c_bigendian=no
10407 else
10408 # finding both strings is unlikely to happen, but who knows?
10409 ac_cv_c_bigendian=unknown
10410 fi
10411 fi
10412fi
10413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10414else
10415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10416/* end confdefs.h. */
10417$ac_includes_default
10418int
10419main ()
10420{
10421
10422 /* Are we little or big endian? From Harbison&Steele. */
10423 union
10424 {
10425 long int l;
10426 char c[sizeof (long int)];
10427 } u;
10428 u.l = 1;
10429 return u.c[sizeof (long int) - 1] == 1;
10430
10431 ;
10432 return 0;
10433}
10434_ACEOF
10435if ac_fn_c_try_run "$LINENO"; then :
10436 ac_cv_c_bigendian=no
10437else
10438 ac_cv_c_bigendian=yes
10439fi
10440rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10441 conftest.$ac_objext conftest.beam conftest.$ac_ext
10442fi
10443
10444 fi
10445fi
6ec2e0f5 10446:
88b48903
WN
10447 case $ac_cv_c_bigendian in #(
10448 yes)
6ec2e0f5 10449 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
88b48903 10450 no)
6ec2e0f5 10451 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
88b48903
WN
10452 universal)
10453
10454$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
10455
10456 ;; #(
10457 *)
6ec2e0f5 10458 gl_cv_cc_double_expbit0="unknown" ;;
88b48903
WN
10459 esac
10460
10461
6ec2e0f5
SDJ
10462fi
10463rm -f conftest*
88b48903 10464
2196f55f 10465
2196f55f
YQ
10466else
10467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10468/* end confdefs.h. */
2196f55f 10469
6ec2e0f5
SDJ
10470#include <float.h>
10471#include <stddef.h>
10472#include <stdio.h>
10473#include <string.h>
10474#define NWORDS \
10475 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
10476typedef union { double value; unsigned int word[NWORDS]; } memory_double;
10477static unsigned int ored_words[NWORDS];
10478static unsigned int anded_words[NWORDS];
10479static void add_to_ored_words (double x)
2196f55f 10480{
6ec2e0f5
SDJ
10481 memory_double m;
10482 size_t i;
10483 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
10484 memset (&m, 0, sizeof (memory_double));
10485 m.value = x;
10486 for (i = 0; i < NWORDS; i++)
10487 {
10488 ored_words[i] |= m.word[i];
10489 anded_words[i] &= m.word[i];
10490 }
2196f55f 10491}
6ec2e0f5 10492int main ()
88b48903 10493{
6ec2e0f5
SDJ
10494 size_t j;
10495 FILE *fp = fopen ("conftest.out", "w");
10496 if (fp == NULL)
10497 return 1;
10498 for (j = 0; j < NWORDS; j++)
10499 anded_words[j] = ~ (unsigned int) 0;
10500 add_to_ored_words (0.25);
10501 add_to_ored_words (0.5);
10502 add_to_ored_words (1.0);
10503 add_to_ored_words (2.0);
10504 add_to_ored_words (4.0);
10505 /* Remove bits that are common (e.g. if representation of the first mantissa
10506 bit is explicit). */
10507 for (j = 0; j < NWORDS; j++)
10508 ored_words[j] &= ~anded_words[j];
10509 /* Now find the nonzero word. */
10510 for (j = 0; j < NWORDS; j++)
10511 if (ored_words[j] != 0)
10512 break;
10513 if (j < NWORDS)
10514 {
10515 size_t i;
10516 for (i = j + 1; i < NWORDS; i++)
10517 if (ored_words[i] != 0)
10518 {
10519 fprintf (fp, "unknown");
10520 return (fclose (fp) != 0);
10521 }
10522 for (i = 0; ; i++)
10523 if ((ored_words[j] >> i) & 1)
10524 {
10525 fprintf (fp, "word %d bit %d", (int) j, (int) i);
10526 return (fclose (fp) != 0);
10527 }
10528 }
10529 fprintf (fp, "unknown");
10530 return (fclose (fp) != 0);
88b48903 10531}
6ec2e0f5 10532
88b48903 10533_ACEOF
6ec2e0f5
SDJ
10534if ac_fn_c_try_run "$LINENO"; then :
10535 gl_cv_cc_double_expbit0=`cat conftest.out`
88b48903 10536else
6ec2e0f5 10537 gl_cv_cc_double_expbit0="unknown"
88b48903 10538fi
6ec2e0f5
SDJ
10539rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10540 conftest.$ac_objext conftest.beam conftest.$ac_ext
10541fi
10542
10543 rm -f conftest.out
88b48903
WN
10544
10545fi
6ec2e0f5
SDJ
10546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
10547$as_echo "$gl_cv_cc_double_expbit0" >&6; }
10548 case "$gl_cv_cc_double_expbit0" in
10549 word*bit*)
10550 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
10551 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
88b48903 10552
6ec2e0f5
SDJ
10553cat >>confdefs.h <<_ACEOF
10554#define DBL_EXPBIT0_WORD $word
10555_ACEOF
88b48903 10556
88b48903 10557
6ec2e0f5
SDJ
10558cat >>confdefs.h <<_ACEOF
10559#define DBL_EXPBIT0_BIT $bit
10560_ACEOF
88b48903 10561
6ec2e0f5
SDJ
10562 ;;
10563 esac
88b48903
WN
10564
10565
6ec2e0f5
SDJ
10566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
10567$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
10568if test "${ac_cv_c_bigendian+set}" = set; then :
10569 $as_echo_n "(cached) " >&6
10570else
10571 ac_cv_c_bigendian=unknown
10572 # See if we're dealing with a universal compiler.
10573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10574/* end confdefs.h. */
10575#ifndef __APPLE_CC__
10576 not a universal capable compiler
10577 #endif
10578 typedef int dummy;
88b48903 10579
6ec2e0f5
SDJ
10580_ACEOF
10581if ac_fn_c_try_compile "$LINENO"; then :
88b48903 10582
6ec2e0f5
SDJ
10583 # Check for potential -arch flags. It is not universal unless
10584 # there are at least two -arch flags with different values.
10585 ac_arch=
10586 ac_prev=
10587 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
10588 if test -n "$ac_prev"; then
10589 case $ac_word in
10590 i?86 | x86_64 | ppc | ppc64)
10591 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
10592 ac_arch=$ac_word
10593 else
10594 ac_cv_c_bigendian=universal
10595 break
10596 fi
10597 ;;
10598 esac
10599 ac_prev=
10600 elif test "x$ac_word" = "x-arch"; then
10601 ac_prev=arch
10602 fi
10603 done
10604fi
10605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10606 if test $ac_cv_c_bigendian = unknown; then
10607 # See if sys/param.h defines the BYTE_ORDER macro.
10608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10609/* end confdefs.h. */
10610#include <sys/types.h>
10611 #include <sys/param.h>
88b48903 10612
6ec2e0f5
SDJ
10613int
10614main ()
10615{
10616#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
10617 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
10618 && LITTLE_ENDIAN)
10619 bogus endian macros
10620 #endif
88b48903 10621
6ec2e0f5
SDJ
10622 ;
10623 return 0;
10624}
10625_ACEOF
10626if ac_fn_c_try_compile "$LINENO"; then :
10627 # It does; now see whether it defined to BIG_ENDIAN or not.
10628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
88b48903
WN
10629/* end confdefs.h. */
10630#include <sys/types.h>
6ec2e0f5 10631 #include <sys/param.h>
8690e634
JK
10632
10633int
10634main ()
10635{
6ec2e0f5
SDJ
10636#if BYTE_ORDER != BIG_ENDIAN
10637 not big endian
10638 #endif
8690e634 10639
8690e634
JK
10640 ;
10641 return 0;
10642}
10643_ACEOF
6ec2e0f5
SDJ
10644if ac_fn_c_try_compile "$LINENO"; then :
10645 ac_cv_c_bigendian=yes
8690e634 10646else
6ec2e0f5 10647 ac_cv_c_bigendian=no
8690e634 10648fi
6ec2e0f5 10649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 10650fi
6ec2e0f5
SDJ
10651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10652 fi
10653 if test $ac_cv_c_bigendian = unknown; then
10654 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
10655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10656/* end confdefs.h. */
10657#include <limits.h>
10658
10659int
10660main ()
10661{
10662#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
10663 bogus endian macros
10664 #endif
10665
10666 ;
10667 return 0;
10668}
10669_ACEOF
10670if ac_fn_c_try_compile "$LINENO"; then :
10671 # It does; now see whether it defined to _BIG_ENDIAN or not.
10672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10673/* end confdefs.h. */
10674#include <limits.h>
8690e634 10675
6ec2e0f5
SDJ
10676int
10677main ()
10678{
10679#ifndef _BIG_ENDIAN
10680 not big endian
10681 #endif
10682
10683 ;
10684 return 0;
10685}
10686_ACEOF
10687if ac_fn_c_try_compile "$LINENO"; then :
10688 ac_cv_c_bigendian=yes
10689else
10690 ac_cv_c_bigendian=no
8690e634 10691fi
6ec2e0f5
SDJ
10692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10693fi
10694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10695 fi
10696 if test $ac_cv_c_bigendian = unknown; then
10697 # Compile a test program.
10698 if test "$cross_compiling" = yes; then :
10699 # Try to guess by grepping values from an object file.
10700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10701/* end confdefs.h. */
10702short int ascii_mm[] =
10703 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
10704 short int ascii_ii[] =
10705 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
10706 int use_ascii (int i) {
10707 return ascii_mm[i] + ascii_ii[i];
10708 }
10709 short int ebcdic_ii[] =
10710 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
10711 short int ebcdic_mm[] =
10712 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
10713 int use_ebcdic (int i) {
10714 return ebcdic_mm[i] + ebcdic_ii[i];
10715 }
10716 extern int foo;
8690e634 10717
6ec2e0f5
SDJ
10718int
10719main ()
10720{
10721return use_ascii (foo) == use_ebcdic (foo);
10722 ;
10723 return 0;
10724}
10725_ACEOF
10726if ac_fn_c_try_compile "$LINENO"; then :
10727 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
10728 ac_cv_c_bigendian=yes
10729 fi
10730 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
10731 if test "$ac_cv_c_bigendian" = unknown; then
10732 ac_cv_c_bigendian=no
10733 else
10734 # finding both strings is unlikely to happen, but who knows?
10735 ac_cv_c_bigendian=unknown
10736 fi
10737 fi
10738fi
10739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10740else
10741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10742/* end confdefs.h. */
10743$ac_includes_default
10744int
10745main ()
10746{
8690e634 10747
6ec2e0f5
SDJ
10748 /* Are we little or big endian? From Harbison&Steele. */
10749 union
10750 {
10751 long int l;
10752 char c[sizeof (long int)];
10753 } u;
10754 u.l = 1;
10755 return u.c[sizeof (long int) - 1] == 1;
10756
10757 ;
10758 return 0;
10759}
8690e634 10760_ACEOF
6ec2e0f5
SDJ
10761if ac_fn_c_try_run "$LINENO"; then :
10762 ac_cv_c_bigendian=no
10763else
10764 ac_cv_c_bigendian=yes
10765fi
10766rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10767 conftest.$ac_objext conftest.beam conftest.$ac_ext
10768fi
10769
10770 fi
10771fi
10772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
10773$as_echo "$ac_cv_c_bigendian" >&6; }
10774 case $ac_cv_c_bigendian in #(
10775 yes)
10776 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
10777;; #(
10778 no)
10779 ;; #(
10780 universal)
8690e634 10781
6ec2e0f5 10782$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
8690e634 10783
6ec2e0f5
SDJ
10784 ;; #(
10785 *)
10786 as_fn_error "unknown endianness
10787 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
10788 esac
8690e634 10789
6ec2e0f5
SDJ
10790
10791
10792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10793$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
10794if test "${am_cv_langinfo_codeset+set}" = set; then :
10795 $as_echo_n "(cached) " >&6
10796else
10797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10798/* end confdefs.h. */
10799#include <langinfo.h>
10800int
10801main ()
10802{
10803char* cs = nl_langinfo(CODESET); return !cs;
10804 ;
10805 return 0;
10806}
8690e634 10807_ACEOF
6ec2e0f5
SDJ
10808if ac_fn_c_try_link "$LINENO"; then :
10809 am_cv_langinfo_codeset=yes
10810else
10811 am_cv_langinfo_codeset=no
10812fi
10813rm -f core conftest.err conftest.$ac_objext \
10814 conftest$ac_exeext conftest.$ac_ext
10815
10816fi
10817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10818$as_echo "$am_cv_langinfo_codeset" >&6; }
10819 if test $am_cv_langinfo_codeset = yes; then
10820
10821$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8690e634 10822
6ec2e0f5 10823 fi
8690e634 10824
3574124b 10825ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
8690e634
JK
10826if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then :
10827 ac_have_decl=1
10828else
10829 ac_have_decl=0
10830fi
10831
10832cat >>confdefs.h <<_ACEOF
10833#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
10834_ACEOF
10835
10836
8690e634
JK
10837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
10838$as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
10839if test "${ac_cv_gnu_library_2_1+set}" = set; then :
10840 $as_echo_n "(cached) " >&6
10841else
10842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10843/* end confdefs.h. */
10844
10845#include <features.h>
10846#ifdef __GNU_LIBRARY__
10847 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
10848 Lucky GNU user
10849 #endif
10850#endif
10851#ifdef __UCLIBC__
10852 Lucky user
10853#endif
10854
10855_ACEOF
10856if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10857 $EGREP "Lucky" >/dev/null 2>&1; then :
10858 ac_cv_gnu_library_2_1=yes
10859else
10860 ac_cv_gnu_library_2_1=no
10861fi
10862rm -f conftest*
10863
10864
10865
10866fi
10867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
10868$as_echo "$ac_cv_gnu_library_2_1" >&6; }
10869
10870 GLIBC21="$ac_cv_gnu_library_2_1"
10871
10872
10873
f45c62c4
YQ
10874
10875
6ec2e0f5
SDJ
10876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
10877$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
10878if test "${gl_cv_func_malloc_posix+set}" = set; then :
f45c62c4
YQ
10879 $as_echo_n "(cached) " >&6
10880else
f45c62c4 10881
6ec2e0f5 10882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f45c62c4 10883/* end confdefs.h. */
6ec2e0f5 10884
f45c62c4
YQ
10885int
10886main ()
10887{
6ec2e0f5
SDJ
10888#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
10889 choke me
10890 #endif
f45c62c4
YQ
10891
10892 ;
10893 return 0;
10894}
10895_ACEOF
6ec2e0f5
SDJ
10896if ac_fn_c_try_compile "$LINENO"; then :
10897 gl_cv_func_malloc_posix=yes
f45c62c4 10898else
6ec2e0f5 10899 gl_cv_func_malloc_posix=no
f45c62c4 10900fi
6ec2e0f5 10901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6a29c58e
YQ
10902
10903fi
10904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
10905$as_echo "$gl_cv_func_malloc_posix" >&6; }
10906
10907
10908
10909 for ac_header in stdlib.h
98399780
YQ
10910do :
10911 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
10912if test "x$ac_cv_header_stdlib_h" = x""yes; then :
10913 cat >>confdefs.h <<_ACEOF
10914#define HAVE_STDLIB_H 1
10915_ACEOF
10916
10917fi
10918
10919done
10920
6a29c58e 10921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
98399780
YQ
10922$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
10923if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then :
10924 $as_echo_n "(cached) " >&6
10925else
10926 if test "$cross_compiling" = yes; then :
6a29c58e
YQ
10927 case "$host_os" in
10928 # Guess yes on platforms where we know the result.
10929 *-gnu* | freebsd* | netbsd* | openbsd* \
10930 | hpux* | solaris* | cygwin* | mingw*)
10931 ac_cv_func_malloc_0_nonnull=yes ;;
10932 # If we don't know, assume the worst.
10933 *) ac_cv_func_malloc_0_nonnull=no ;;
10934 esac
10935
98399780
YQ
10936else
10937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10938/* end confdefs.h. */
10939#if defined STDC_HEADERS || defined HAVE_STDLIB_H
6a29c58e
YQ
10940 # include <stdlib.h>
10941 #else
10942 char *malloc ();
10943 #endif
98399780
YQ
10944
10945int
10946main ()
10947{
49e4877c
PA
10948char *p = malloc (0);
10949 int result = !p;
10950 free (p);
10951 return result;
98399780
YQ
10952 ;
10953 return 0;
10954}
6a29c58e 10955
98399780
YQ
10956_ACEOF
10957if ac_fn_c_try_run "$LINENO"; then :
10958 ac_cv_func_malloc_0_nonnull=yes
10959else
10960 ac_cv_func_malloc_0_nonnull=no
10961fi
10962rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10963 conftest.$ac_objext conftest.beam conftest.$ac_ext
10964fi
10965
6a29c58e 10966
98399780
YQ
10967fi
10968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
10969$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
6a29c58e 10970 if test $ac_cv_func_malloc_0_nonnull = yes; then :
98399780
YQ
10971 gl_cv_func_malloc_0_nonnull=1
10972else
10973 gl_cv_func_malloc_0_nonnull=0
10974fi
10975
10976
10977cat >>confdefs.h <<_ACEOF
10978#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
10979_ACEOF
10980
10981
10982
88b48903
WN
10983
10984
8690e634
JK
10985 GNULIB_BTOWC=0;
10986 GNULIB_WCTOB=0;
10987 GNULIB_MBSINIT=0;
10988 GNULIB_MBRTOWC=0;
10989 GNULIB_MBRLEN=0;
10990 GNULIB_MBSRTOWCS=0;
10991 GNULIB_MBSNRTOWCS=0;
10992 GNULIB_WCRTOMB=0;
10993 GNULIB_WCSRTOMBS=0;
10994 GNULIB_WCSNRTOMBS=0;
10995 GNULIB_WCWIDTH=0;
10996 GNULIB_WMEMCHR=0;
10997 GNULIB_WMEMCMP=0;
10998 GNULIB_WMEMCPY=0;
10999 GNULIB_WMEMMOVE=0;
11000 GNULIB_WMEMSET=0;
11001 GNULIB_WCSLEN=0;
11002 GNULIB_WCSNLEN=0;
11003 GNULIB_WCSCPY=0;
11004 GNULIB_WCPCPY=0;
11005 GNULIB_WCSNCPY=0;
11006 GNULIB_WCPNCPY=0;
11007 GNULIB_WCSCAT=0;
11008 GNULIB_WCSNCAT=0;
11009 GNULIB_WCSCMP=0;
11010 GNULIB_WCSNCMP=0;
11011 GNULIB_WCSCASECMP=0;
11012 GNULIB_WCSNCASECMP=0;
11013 GNULIB_WCSCOLL=0;
11014 GNULIB_WCSXFRM=0;
11015 GNULIB_WCSDUP=0;
11016 GNULIB_WCSCHR=0;
11017 GNULIB_WCSRCHR=0;
11018 GNULIB_WCSCSPN=0;
11019 GNULIB_WCSSPN=0;
11020 GNULIB_WCSPBRK=0;
11021 GNULIB_WCSSTR=0;
11022 GNULIB_WCSTOK=0;
11023 GNULIB_WCSWIDTH=0;
11024 HAVE_BTOWC=1;
11025 HAVE_MBSINIT=1;
11026 HAVE_MBRTOWC=1;
11027 HAVE_MBRLEN=1;
11028 HAVE_MBSRTOWCS=1;
11029 HAVE_MBSNRTOWCS=1;
11030 HAVE_WCRTOMB=1;
11031 HAVE_WCSRTOMBS=1;
11032 HAVE_WCSNRTOMBS=1;
11033 HAVE_WMEMCHR=1;
11034 HAVE_WMEMCMP=1;
11035 HAVE_WMEMCPY=1;
11036 HAVE_WMEMMOVE=1;
11037 HAVE_WMEMSET=1;
11038 HAVE_WCSLEN=1;
11039 HAVE_WCSNLEN=1;
11040 HAVE_WCSCPY=1;
11041 HAVE_WCPCPY=1;
11042 HAVE_WCSNCPY=1;
11043 HAVE_WCPNCPY=1;
11044 HAVE_WCSCAT=1;
11045 HAVE_WCSNCAT=1;
11046 HAVE_WCSCMP=1;
11047 HAVE_WCSNCMP=1;
11048 HAVE_WCSCASECMP=1;
11049 HAVE_WCSNCASECMP=1;
11050 HAVE_WCSCOLL=1;
11051 HAVE_WCSXFRM=1;
11052 HAVE_WCSDUP=1;
11053 HAVE_WCSCHR=1;
11054 HAVE_WCSRCHR=1;
11055 HAVE_WCSCSPN=1;
11056 HAVE_WCSSPN=1;
11057 HAVE_WCSPBRK=1;
11058 HAVE_WCSSTR=1;
11059 HAVE_WCSTOK=1;
11060 HAVE_WCSWIDTH=1;
11061 HAVE_DECL_WCTOB=1;
11062 HAVE_DECL_WCWIDTH=1;
11063 REPLACE_MBSTATE_T=0;
11064 REPLACE_BTOWC=0;
11065 REPLACE_WCTOB=0;
11066 REPLACE_MBSINIT=0;
11067 REPLACE_MBRTOWC=0;
11068 REPLACE_MBRLEN=0;
11069 REPLACE_MBSRTOWCS=0;
11070 REPLACE_MBSNRTOWCS=0;
11071 REPLACE_WCRTOMB=0;
11072 REPLACE_WCSRTOMBS=0;
11073 REPLACE_WCSNRTOMBS=0;
11074 REPLACE_WCWIDTH=0;
11075 REPLACE_WCSWIDTH=0;
11076
11077
11078
11079
11080
11081
11082
11083
8690e634
JK
11084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
11085$as_echo_n "checking for a traditional japanese locale... " >&6; }
11086if test "${gt_cv_locale_ja+set}" = set; then :
11087 $as_echo_n "(cached) " >&6
11088else
11089
11090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11091/* end confdefs.h. */
11092
11093#include <locale.h>
11094#include <time.h>
11095#if HAVE_LANGINFO_CODESET
11096# include <langinfo.h>
11097#endif
11098#include <stdlib.h>
11099#include <string.h>
11100struct tm t;
11101char buf[16];
11102int main ()
11103{
11104 const char *p;
11105 /* Check whether the given locale name is recognized by the system. */
11106#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
11107 /* On native Windows, setlocale(category, "") looks at the system settings,
11108 not at the environment variables. Also, when an encoding suffix such
11109 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
11110 category of the locale to "C". */
11111 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
11112 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
11113 return 1;
11114#else
11115 if (setlocale (LC_ALL, "") == NULL) return 1;
11116#endif
11117 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
11118 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
11119 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
11120 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
11121 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
11122 some unit tests fail.
11123 On MirBSD 10, when an unsupported locale is specified, setlocale()
11124 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
11125#if HAVE_LANGINFO_CODESET
11126 {
11127 const char *cs = nl_langinfo (CODESET);
11128 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
11129 || strcmp (cs, "UTF-8") == 0)
11130 return 1;
11131 }
11132#endif
11133#ifdef __CYGWIN__
11134 /* On Cygwin, avoid locale names without encoding suffix, because the
11135 locale_charset() function relies on the encoding suffix. Note that
11136 LC_ALL is set on the command line. */
11137 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
11138#endif
11139 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
11140 on Cygwin 1.5.x. */
11141 if (MB_CUR_MAX == 1)
11142 return 1;
11143 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
11144 This excludes the UTF-8 encoding (except on MirBSD). */
11145 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
11146 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
11147 for (p = buf; *p != '\0'; p++)
11148 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
11149 return 1;
11150 return 0;
11151}
11152
11153_ACEOF
11154 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11155 (eval $ac_link) 2>&5
11156 ac_status=$?
11157 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11158 test $ac_status = 0; } && test -s conftest$ac_exeext; then
11159 case "$host_os" in
11160 # Handle native Windows specially, because there setlocale() interprets
11161 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
11162 # "fr" or "fra" as "French" or "French_France.1252",
11163 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
11164 # "ja" as "Japanese" or "Japanese_Japan.932",
11165 # and similar.
11166 mingw*)
11167 # Note that on native Windows, the Japanese locale is
11168 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
11169 # cannot use it here.
11170 gt_cv_locale_ja=none
11171 ;;
11172 *)
11173 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
11174 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
11175 # configure script would override the LC_ALL setting. Likewise for
11176 # LC_CTYPE, which is also set at the beginning of the configure script.
11177 # Test for the AIX locale name.
11178 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11179 gt_cv_locale_ja=ja_JP
11180 else
11181 # Test for the locale name with explicit encoding suffix.
11182 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11183 gt_cv_locale_ja=ja_JP.EUC-JP
11184 else
11185 # Test for the HP-UX, OSF/1, NetBSD locale name.
11186 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11187 gt_cv_locale_ja=ja_JP.eucJP
11188 else
11189 # Test for the IRIX, FreeBSD locale name.
11190 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11191 gt_cv_locale_ja=ja_JP.EUC
11192 else
11193 # Test for the Solaris 7 locale name.
11194 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11195 gt_cv_locale_ja=ja
11196 else
11197 # Special test for NetBSD 1.6.
11198 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
11199 gt_cv_locale_ja=ja_JP.eucJP
11200 else
11201 # None found.
11202 gt_cv_locale_ja=none
11203 fi
11204 fi
11205 fi
11206 fi
11207 fi
11208 fi
11209 ;;
11210 esac
11211 fi
11212 rm -fr conftest*
11213
11214fi
11215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
11216$as_echo "$gt_cv_locale_ja" >&6; }
11217 LOCALE_JA=$gt_cv_locale_ja
11218
11219
11220
11221
11222
11223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
11224$as_echo_n "checking for a transitional chinese locale... " >&6; }
11225if test "${gt_cv_locale_zh_CN+set}" = set; then :
11226 $as_echo_n "(cached) " >&6
11227else
11228
11229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11230/* end confdefs.h. */
11231
11232#include <locale.h>
11233#include <stdlib.h>
11234#include <time.h>
11235#if HAVE_LANGINFO_CODESET
11236# include <langinfo.h>
11237#endif
11238#include <stdlib.h>
11239#include <string.h>
11240struct tm t;
11241char buf[16];
11242int main ()
11243{
11244 const char *p;
11245 /* Check whether the given locale name is recognized by the system. */
11246#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
11247 /* On native Windows, setlocale(category, "") looks at the system settings,
11248 not at the environment variables. Also, when an encoding suffix such
11249 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
11250 category of the locale to "C". */
11251 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
11252 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
11253 return 1;
11254#else
11255 if (setlocale (LC_ALL, "") == NULL) return 1;
11256#endif
11257 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
11258 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
11259 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
11260 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
11261 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
11262 some unit tests fail.
11263 On MirBSD 10, when an unsupported locale is specified, setlocale()
11264 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
11265#if HAVE_LANGINFO_CODESET
11266 {
11267 const char *cs = nl_langinfo (CODESET);
11268 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
11269 || strcmp (cs, "UTF-8") == 0)
11270 return 1;
11271 }
11272#endif
11273#ifdef __CYGWIN__
11274 /* On Cygwin, avoid locale names without encoding suffix, because the
11275 locale_charset() function relies on the encoding suffix. Note that
11276 LC_ALL is set on the command line. */
11277 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
11278#endif
11279 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
11280 This excludes the UTF-8 encoding (except on MirBSD). */
11281 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
11282 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
11283 for (p = buf; *p != '\0'; p++)
11284 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
11285 return 1;
11286 /* Check whether a typical GB18030 multibyte sequence is recognized as a
11287 single wide character. This excludes the GB2312 and GBK encodings. */
11288 if (mblen ("\203\062\332\066", 5) != 4)
11289 return 1;
11290 return 0;
11291}
11292
11293_ACEOF
11294 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11295 (eval $ac_link) 2>&5
11296 ac_status=$?
11297 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11298 test $ac_status = 0; } && test -s conftest$ac_exeext; then
11299 case "$host_os" in
11300 # Handle native Windows specially, because there setlocale() interprets
11301 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
11302 # "fr" or "fra" as "French" or "French_France.1252",
11303 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
11304 # "ja" as "Japanese" or "Japanese_Japan.932",
11305 # and similar.
11306 mingw*)
11307 # Test for the hypothetical native Windows locale name.
11308 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11309 gt_cv_locale_zh_CN=Chinese_China.54936
11310 else
11311 # None found.
11312 gt_cv_locale_zh_CN=none
11313 fi
11314 ;;
11315 solaris2.8)
11316 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
11317 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
11318 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
11319 gt_cv_locale_zh_CN=none
11320 ;;
11321 *)
11322 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
11323 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
11324 # configure script would override the LC_ALL setting. Likewise for
11325 # LC_CTYPE, which is also set at the beginning of the configure script.
11326 # Test for the locale name without encoding suffix.
11327 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11328 gt_cv_locale_zh_CN=zh_CN
11329 else
11330 # Test for the locale name with explicit encoding suffix.
11331 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11332 gt_cv_locale_zh_CN=zh_CN.GB18030
11333 else
11334 # None found.
11335 gt_cv_locale_zh_CN=none
11336 fi
11337 fi
11338 ;;
11339 esac
11340 else
11341 # If there was a link error, due to mblen(), the system is so old that
11342 # it certainly doesn't have a chinese locale.
11343 gt_cv_locale_zh_CN=none
11344 fi
11345 rm -fr conftest*
11346
11347fi
11348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
11349$as_echo "$gt_cv_locale_zh_CN" >&6; }
11350 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
11351
11352
11353
11354
11355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
11356$as_echo_n "checking for a french Unicode locale... " >&6; }
11357if test "${gt_cv_locale_fr_utf8+set}" = set; then :
11358 $as_echo_n "(cached) " >&6
11359else
11360
11361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11362/* end confdefs.h. */
11363
11364#include <locale.h>
11365#include <time.h>
11366#if HAVE_LANGINFO_CODESET
11367# include <langinfo.h>
11368#endif
11369#include <stdlib.h>
11370#include <string.h>
11371struct tm t;
11372char buf[16];
11373int main () {
11374 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
11375 imitates locale dependent behaviour by looking at the environment
11376 variables, and all locales use the UTF-8 encoding. */
11377#if !(defined __BEOS__ || defined __HAIKU__)
11378 /* Check whether the given locale name is recognized by the system. */
11379# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
11380 /* On native Windows, setlocale(category, "") looks at the system settings,
11381 not at the environment variables. Also, when an encoding suffix such
11382 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
11383 category of the locale to "C". */
11384 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
11385 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
11386 return 1;
11387# else
11388 if (setlocale (LC_ALL, "") == NULL) return 1;
11389# endif
11390 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
11391 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
11392 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
11393 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
11394 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
11395 some unit tests fail. */
11396# if HAVE_LANGINFO_CODESET
11397 {
11398 const char *cs = nl_langinfo (CODESET);
11399 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
11400 return 1;
11401 }
11402# endif
11403# ifdef __CYGWIN__
11404 /* On Cygwin, avoid locale names without encoding suffix, because the
11405 locale_charset() function relies on the encoding suffix. Note that
11406 LC_ALL is set on the command line. */
11407 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
11408# endif
11409 /* Check whether in the abbreviation of the second month, the second
11410 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
11411 two bytes long, with UTF-8 encoding. */
11412 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
11413 if (strftime (buf, sizeof (buf), "%b", &t) < 4
11414 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
11415 return 1;
11416#endif
11417#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
11418 /* Check whether the decimal separator is a comma.
11419 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
11420 are nl_langinfo(RADIXCHAR) are both ".". */
11421 if (localeconv () ->decimal_point[0] != ',') return 1;
11422#endif
11423 return 0;
11424}
11425
11426_ACEOF
11427 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11428 (eval $ac_link) 2>&5
11429 ac_status=$?
11430 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11431 test $ac_status = 0; } && test -s conftest$ac_exeext; then
11432 case "$host_os" in
11433 # Handle native Windows specially, because there setlocale() interprets
11434 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
11435 # "fr" or "fra" as "French" or "French_France.1252",
11436 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
11437 # "ja" as "Japanese" or "Japanese_Japan.932",
11438 # and similar.
11439 mingw*)
11440 # Test for the hypothetical native Windows locale name.
11441 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11442 gt_cv_locale_fr_utf8=French_France.65001
11443 else
11444 # None found.
11445 gt_cv_locale_fr_utf8=none
11446 fi
11447 ;;
11448 *)
11449 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
11450 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
11451 # configure script would override the LC_ALL setting. Likewise for
11452 # LC_CTYPE, which is also set at the beginning of the configure script.
11453 # Test for the usual locale name.
11454 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11455 gt_cv_locale_fr_utf8=fr_FR
11456 else
11457 # Test for the locale name with explicit encoding suffix.
11458 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11459 gt_cv_locale_fr_utf8=fr_FR.UTF-8
11460 else
11461 # Test for the Solaris 7 locale name.
11462 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11463 gt_cv_locale_fr_utf8=fr.UTF-8
11464 else
11465 # None found.
11466 gt_cv_locale_fr_utf8=none
11467 fi
11468 fi
11469 fi
11470 ;;
11471 esac
11472 fi
11473 rm -fr conftest*
11474
11475fi
11476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
11477$as_echo "$gt_cv_locale_fr_utf8" >&6; }
11478 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
11479
11480
11481
11482
11483
11484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
11485$as_echo_n "checking for a traditional french locale... " >&6; }
11486if test "${gt_cv_locale_fr+set}" = set; then :
11487 $as_echo_n "(cached) " >&6
11488else
11489
11490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11491/* end confdefs.h. */
11492
11493#include <locale.h>
11494#include <time.h>
11495#if HAVE_LANGINFO_CODESET
11496# include <langinfo.h>
11497#endif
11498#include <stdlib.h>
11499#include <string.h>
11500struct tm t;
11501char buf[16];
11502int main () {
11503 /* Check whether the given locale name is recognized by the system. */
11504#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
11505 /* On native Windows, setlocale(category, "") looks at the system settings,
11506 not at the environment variables. Also, when an encoding suffix such
11507 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
11508 category of the locale to "C". */
11509 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
11510 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
11511 return 1;
11512#else
11513 if (setlocale (LC_ALL, "") == NULL) return 1;
11514#endif
11515 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
11516 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
11517 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
11518 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
11519 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
11520 some unit tests fail.
11521 On MirBSD 10, when an unsupported locale is specified, setlocale()
11522 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
11523#if HAVE_LANGINFO_CODESET
11524 {
11525 const char *cs = nl_langinfo (CODESET);
11526 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
11527 || strcmp (cs, "UTF-8") == 0)
11528 return 1;
11529 }
11530#endif
11531#ifdef __CYGWIN__
11532 /* On Cygwin, avoid locale names without encoding suffix, because the
11533 locale_charset() function relies on the encoding suffix. Note that
11534 LC_ALL is set on the command line. */
11535 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
11536#endif
11537 /* Check whether in the abbreviation of the second month, the second
11538 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
11539 one byte long. This excludes the UTF-8 encoding. */
11540 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
11541 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
11542#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
11543 /* Check whether the decimal separator is a comma.
11544 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
11545 are nl_langinfo(RADIXCHAR) are both ".". */
11546 if (localeconv () ->decimal_point[0] != ',') return 1;
11547#endif
11548 return 0;
11549}
11550
11551_ACEOF
11552 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11553 (eval $ac_link) 2>&5
11554 ac_status=$?
11555 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11556 test $ac_status = 0; } && test -s conftest$ac_exeext; then
11557 case "$host_os" in
11558 # Handle native Windows specially, because there setlocale() interprets
11559 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
11560 # "fr" or "fra" as "French" or "French_France.1252",
11561 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
11562 # "ja" as "Japanese" or "Japanese_Japan.932",
11563 # and similar.
11564 mingw*)
11565 # Test for the native Windows locale name.
11566 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11567 gt_cv_locale_fr=French_France.1252
11568 else
11569 # None found.
11570 gt_cv_locale_fr=none
11571 fi
11572 ;;
11573 *)
11574 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
11575 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
11576 # configure script would override the LC_ALL setting. Likewise for
11577 # LC_CTYPE, which is also set at the beginning of the configure script.
11578 # Test for the usual locale name.
11579 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11580 gt_cv_locale_fr=fr_FR
11581 else
11582 # Test for the locale name with explicit encoding suffix.
11583 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11584 gt_cv_locale_fr=fr_FR.ISO-8859-1
11585 else
11586 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
11587 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11588 gt_cv_locale_fr=fr_FR.ISO8859-1
11589 else
11590 # Test for the HP-UX locale name.
11591 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11592 gt_cv_locale_fr=fr_FR.iso88591
11593 else
11594 # Test for the Solaris 7 locale name.
11595 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11596 gt_cv_locale_fr=fr
11597 else
11598 # None found.
11599 gt_cv_locale_fr=none
11600 fi
11601 fi
11602 fi
11603 fi
11604 fi
11605 ;;
11606 esac
11607 fi
11608 rm -fr conftest*
11609
11610fi
6ec2e0f5
SDJ
11611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
11612$as_echo "$gt_cv_locale_fr" >&6; }
11613 LOCALE_FR=$gt_cv_locale_fr
11614
11615
11616
11617
11618
11619
11620
11621 GNULIB_FFSL=0;
11622 GNULIB_FFSLL=0;
11623 GNULIB_MEMCHR=0;
11624 GNULIB_MEMMEM=0;
11625 GNULIB_MEMPCPY=0;
11626 GNULIB_MEMRCHR=0;
11627 GNULIB_RAWMEMCHR=0;
11628 GNULIB_STPCPY=0;
11629 GNULIB_STPNCPY=0;
11630 GNULIB_STRCHRNUL=0;
11631 GNULIB_STRDUP=0;
11632 GNULIB_STRNCAT=0;
11633 GNULIB_STRNDUP=0;
11634 GNULIB_STRNLEN=0;
11635 GNULIB_STRPBRK=0;
11636 GNULIB_STRSEP=0;
11637 GNULIB_STRSTR=0;
11638 GNULIB_STRCASESTR=0;
11639 GNULIB_STRTOK_R=0;
11640 GNULIB_MBSLEN=0;
11641 GNULIB_MBSNLEN=0;
11642 GNULIB_MBSCHR=0;
11643 GNULIB_MBSRCHR=0;
11644 GNULIB_MBSSTR=0;
11645 GNULIB_MBSCASECMP=0;
11646 GNULIB_MBSNCASECMP=0;
11647 GNULIB_MBSPCASECMP=0;
11648 GNULIB_MBSCASESTR=0;
11649 GNULIB_MBSCSPN=0;
11650 GNULIB_MBSPBRK=0;
11651 GNULIB_MBSSPN=0;
11652 GNULIB_MBSSEP=0;
11653 GNULIB_MBSTOK_R=0;
11654 GNULIB_STRERROR=0;
11655 GNULIB_STRERROR_R=0;
11656 GNULIB_STRSIGNAL=0;
11657 GNULIB_STRVERSCMP=0;
11658 HAVE_MBSLEN=0;
11659 HAVE_FFSL=1;
11660 HAVE_FFSLL=1;
11661 HAVE_MEMCHR=1;
11662 HAVE_DECL_MEMMEM=1;
11663 HAVE_MEMPCPY=1;
11664 HAVE_DECL_MEMRCHR=1;
11665 HAVE_RAWMEMCHR=1;
11666 HAVE_STPCPY=1;
11667 HAVE_STPNCPY=1;
11668 HAVE_STRCHRNUL=1;
11669 HAVE_DECL_STRDUP=1;
11670 HAVE_DECL_STRNDUP=1;
11671 HAVE_DECL_STRNLEN=1;
11672 HAVE_STRPBRK=1;
11673 HAVE_STRSEP=1;
11674 HAVE_STRCASESTR=1;
11675 HAVE_DECL_STRTOK_R=1;
11676 HAVE_DECL_STRERROR_R=1;
11677 HAVE_DECL_STRSIGNAL=1;
11678 HAVE_STRVERSCMP=1;
11679 REPLACE_MEMCHR=0;
11680 REPLACE_MEMMEM=0;
11681 REPLACE_STPNCPY=0;
11682 REPLACE_STRDUP=0;
11683 REPLACE_STRSTR=0;
11684 REPLACE_STRCASESTR=0;
11685 REPLACE_STRCHRNUL=0;
11686 REPLACE_STRERROR=0;
11687 REPLACE_STRERROR_R=0;
11688 REPLACE_STRNCAT=0;
11689 REPLACE_STRNDUP=0;
11690 REPLACE_STRNLEN=0;
11691 REPLACE_STRSIGNAL=0;
11692 REPLACE_STRTOK_R=0;
11693 UNDEFINE_STRTOK_R=0;
11694
11695
11696
11697
11698
11699 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
11700 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
11701 # irrelevant for anonymous mappings.
11702 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
11703if test "x$ac_cv_func_mmap" = x""yes; then :
11704 gl_have_mmap=yes
11705else
11706 gl_have_mmap=no
11707fi
11708
11709
11710 # Try to allow MAP_ANONYMOUS.
11711 gl_have_mmap_anonymous=no
11712 if test $gl_have_mmap = yes; then
11713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
11714$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
11715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11716/* end confdefs.h. */
11717
11718#include <sys/mman.h>
11719#ifdef MAP_ANONYMOUS
11720 I cannot identify this map
11721#endif
11722
11723_ACEOF
11724if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11725 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
11726 gl_have_mmap_anonymous=yes
11727fi
11728rm -f conftest*
11729
11730 if test $gl_have_mmap_anonymous != yes; then
11731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11732/* end confdefs.h. */
11733
11734#include <sys/mman.h>
11735#ifdef MAP_ANON
11736 I cannot identify this map
11737#endif
11738
11739_ACEOF
11740if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11741 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
11742
11743$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
11744
11745 gl_have_mmap_anonymous=yes
11746fi
11747rm -f conftest*
11748
11749 fi
11750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
11751$as_echo "$gl_have_mmap_anonymous" >&6; }
11752 if test $gl_have_mmap_anonymous = yes; then
11753
11754$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
11755
11756 fi
11757 fi
11758
11759
11760
11761
11762
11763
11764 if test $HAVE_MEMCHR = 1; then
11765 # Detect platform-specific bugs in some versions of glibc:
11766 # memchr should not dereference anything with length 0
11767 # http://bugzilla.redhat.com/499689
11768 # memchr should not dereference overestimated length after a match
11769 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
11770 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
11771 # Assume that memchr works on platforms that lack mprotect.
11772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
11773$as_echo_n "checking whether memchr works... " >&6; }
11774if test "${gl_cv_func_memchr_works+set}" = set; then :
11775 $as_echo_n "(cached) " >&6
11776else
11777 if test "$cross_compiling" = yes; then :
11778 gl_cv_func_memchr_works="guessing no"
11779else
11780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11781/* end confdefs.h. */
11782
11783#include <string.h>
11784#if HAVE_SYS_MMAN_H
11785# include <fcntl.h>
11786# include <unistd.h>
11787# include <sys/types.h>
11788# include <sys/mman.h>
11789# ifndef MAP_FILE
11790# define MAP_FILE 0
11791# endif
11792#endif
11793
11794int
11795main ()
11796{
11797
11798 int result = 0;
11799 char *fence = NULL;
11800#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
11801# if HAVE_MAP_ANONYMOUS
11802 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
11803 const int fd = -1;
11804# else /* !HAVE_MAP_ANONYMOUS */
11805 const int flags = MAP_FILE | MAP_PRIVATE;
11806 int fd = open ("/dev/zero", O_RDONLY, 0666);
11807 if (fd >= 0)
11808# endif
11809 {
11810 int pagesize = getpagesize ();
11811 char *two_pages =
11812 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
11813 flags, fd, 0);
11814 if (two_pages != (char *)(-1)
11815 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
11816 fence = two_pages + pagesize;
11817 }
11818#endif
11819 if (fence)
11820 {
11821 if (memchr (fence, 0, 0))
11822 result |= 1;
11823 strcpy (fence - 9, "12345678");
11824 if (memchr (fence - 9, 0, 79) != fence - 1)
11825 result |= 2;
11826 if (memchr (fence - 1, 0, 3) != fence - 1)
11827 result |= 4;
11828 }
11829 return result;
11830
11831 ;
11832 return 0;
11833}
11834_ACEOF
11835if ac_fn_c_try_run "$LINENO"; then :
11836 gl_cv_func_memchr_works=yes
11837else
11838 gl_cv_func_memchr_works=no
11839fi
11840rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11841 conftest.$ac_objext conftest.beam conftest.$ac_ext
11842fi
11843
11844fi
11845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
11846$as_echo "$gl_cv_func_memchr_works" >&6; }
11847 if test "$gl_cv_func_memchr_works" != yes; then
11848 REPLACE_MEMCHR=1
11849 fi
11850 fi
11851
11852ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
11853if test "x$ac_cv_have_decl_memmem" = x""yes; then :
11854 ac_have_decl=1
11855else
11856 ac_have_decl=0
11857fi
11858
11859cat >>confdefs.h <<_ACEOF
11860#define HAVE_DECL_MEMMEM $ac_have_decl
11861_ACEOF
11862
11863
11864
11865
11866
11867 for ac_func in memmem
11868do :
11869 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
11870if test "x$ac_cv_func_memmem" = x""yes; then :
11871 cat >>confdefs.h <<_ACEOF
11872#define HAVE_MEMMEM 1
11873_ACEOF
11874
11875fi
11876done
11877
11878 if test $ac_cv_func_memmem = yes; then
11879 HAVE_MEMMEM=1
11880 else
11881 HAVE_MEMMEM=0
11882 fi
11883
11884 if test $ac_cv_have_decl_memmem = no; then
11885 HAVE_DECL_MEMMEM=0
11886 else
11887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
11888$as_echo_n "checking whether memmem works... " >&6; }
11889if test "${gl_cv_func_memmem_works_always+set}" = set; then :
11890 $as_echo_n "(cached) " >&6
11891else
11892 if test "$cross_compiling" = yes; then :
11893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11894/* end confdefs.h. */
11895
11896#ifdef __GNU_LIBRARY__
11897 #include <features.h>
11898 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
11899 || __GLIBC_MINOR__ > 12)) \
11900 || (__GLIBC__ > 2)) \
11901 || defined __UCLIBC__
11902 Lucky user
11903 #endif
11904#elif defined __CYGWIN__
11905 #include <cygwin/version.h>
11906 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
11907 Lucky user
11908 #endif
11909#else
11910 Lucky user
11911#endif
11912
11913_ACEOF
11914if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11915 $EGREP "Lucky user" >/dev/null 2>&1; then :
11916 gl_cv_func_memmem_works_always="guessing yes"
11917else
11918 gl_cv_func_memmem_works_always="guessing no"
11919fi
11920rm -f conftest*
11921
11922
11923else
11924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11925/* end confdefs.h. */
11926
11927#include <string.h> /* for memmem */
11928#define P "_EF_BF_BD"
11929#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
11930#define NEEDLE P P P P P
11931
11932int
11933main ()
11934{
11935
11936 int result = 0;
11937 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
11938 result |= 1;
11939 /* Check for empty needle behavior. */
11940 {
11941 const char *haystack = "AAA";
11942 if (memmem (haystack, 3, NULL, 0) != haystack)
11943 result |= 2;
11944 }
11945 return result;
11946
11947 ;
11948 return 0;
11949}
11950_ACEOF
11951if ac_fn_c_try_run "$LINENO"; then :
11952 gl_cv_func_memmem_works_always=yes
11953else
11954 gl_cv_func_memmem_works_always=no
11955fi
11956rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11957 conftest.$ac_objext conftest.beam conftest.$ac_ext
11958fi
11959
11960
11961fi
11962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
11963$as_echo "$gl_cv_func_memmem_works_always" >&6; }
11964 case "$gl_cv_func_memmem_works_always" in
11965 *yes) ;;
11966 *)
11967 REPLACE_MEMMEM=1
11968 ;;
11969 esac
11970 fi
11971 :
11972
11973ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
11974if test "x$ac_cv_have_decl_memrchr" = x""yes; then :
11975 ac_have_decl=1
11976else
11977 ac_have_decl=0
11978fi
11979
11980cat >>confdefs.h <<_ACEOF
11981#define HAVE_DECL_MEMRCHR $ac_have_decl
11982_ACEOF
11983
11984
11985
11986
11987
11988
2d8adcbd
MM
11989
11990
6ec2e0f5
SDJ
11991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
11992$as_echo_n "checking for promoted mode_t type... " >&6; }
11993if test "${gl_cv_promoted_mode_t+set}" = set; then :
11994 $as_echo_n "(cached) " >&6
11995else
11996
11997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11998/* end confdefs.h. */
11999#include <sys/types.h>
12000int
12001main ()
12002{
12003typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
12004 ;
12005 return 0;
12006}
12007_ACEOF
12008if ac_fn_c_try_compile "$LINENO"; then :
12009 gl_cv_promoted_mode_t='int'
12010else
12011 gl_cv_promoted_mode_t='mode_t'
12012fi
12013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12014
12015fi
12016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
12017$as_echo "$gl_cv_promoted_mode_t" >&6; }
12018
12019cat >>confdefs.h <<_ACEOF
12020#define PROMOTED_MODE_T $gl_cv_promoted_mode_t
12021_ACEOF
12022
12023
12024
12025
12026
12027 GNULIB_DPRINTF=0;
12028 GNULIB_FCLOSE=0;
12029 GNULIB_FDOPEN=0;
12030 GNULIB_FFLUSH=0;
12031 GNULIB_FGETC=0;
12032 GNULIB_FGETS=0;
12033 GNULIB_FOPEN=0;
12034 GNULIB_FPRINTF=0;
12035 GNULIB_FPRINTF_POSIX=0;
12036 GNULIB_FPURGE=0;
12037 GNULIB_FPUTC=0;
12038 GNULIB_FPUTS=0;
12039 GNULIB_FREAD=0;
12040 GNULIB_FREOPEN=0;
12041 GNULIB_FSCANF=0;
12042 GNULIB_FSEEK=0;
12043 GNULIB_FSEEKO=0;
12044 GNULIB_FTELL=0;
12045 GNULIB_FTELLO=0;
12046 GNULIB_FWRITE=0;
12047 GNULIB_GETC=0;
12048 GNULIB_GETCHAR=0;
12049 GNULIB_GETDELIM=0;
12050 GNULIB_GETLINE=0;
12051 GNULIB_OBSTACK_PRINTF=0;
12052 GNULIB_OBSTACK_PRINTF_POSIX=0;
12053 GNULIB_PCLOSE=0;
12054 GNULIB_PERROR=0;
12055 GNULIB_POPEN=0;
12056 GNULIB_PRINTF=0;
12057 GNULIB_PRINTF_POSIX=0;
12058 GNULIB_PUTC=0;
12059 GNULIB_PUTCHAR=0;
12060 GNULIB_PUTS=0;
12061 GNULIB_REMOVE=0;
12062 GNULIB_RENAME=0;
12063 GNULIB_RENAMEAT=0;
12064 GNULIB_SCANF=0;
12065 GNULIB_SNPRINTF=0;
12066 GNULIB_SPRINTF_POSIX=0;
12067 GNULIB_STDIO_H_NONBLOCKING=0;
12068 GNULIB_STDIO_H_SIGPIPE=0;
12069 GNULIB_TMPFILE=0;
12070 GNULIB_VASPRINTF=0;
12071 GNULIB_VFSCANF=0;
12072 GNULIB_VSCANF=0;
12073 GNULIB_VDPRINTF=0;
12074 GNULIB_VFPRINTF=0;
12075 GNULIB_VFPRINTF_POSIX=0;
12076 GNULIB_VPRINTF=0;
12077 GNULIB_VPRINTF_POSIX=0;
12078 GNULIB_VSNPRINTF=0;
12079 GNULIB_VSPRINTF_POSIX=0;
12080 HAVE_DECL_FPURGE=1;
12081 HAVE_DECL_FSEEKO=1;
12082 HAVE_DECL_FTELLO=1;
12083 HAVE_DECL_GETDELIM=1;
12084 HAVE_DECL_GETLINE=1;
12085 HAVE_DECL_OBSTACK_PRINTF=1;
12086 HAVE_DECL_SNPRINTF=1;
12087 HAVE_DECL_VSNPRINTF=1;
12088 HAVE_DPRINTF=1;
12089 HAVE_FSEEKO=1;
12090 HAVE_FTELLO=1;
12091 HAVE_PCLOSE=1;
12092 HAVE_POPEN=1;
12093 HAVE_RENAMEAT=1;
12094 HAVE_VASPRINTF=1;
12095 HAVE_VDPRINTF=1;
12096 REPLACE_DPRINTF=0;
12097 REPLACE_FCLOSE=0;
12098 REPLACE_FDOPEN=0;
12099 REPLACE_FFLUSH=0;
12100 REPLACE_FOPEN=0;
12101 REPLACE_FPRINTF=0;
12102 REPLACE_FPURGE=0;
12103 REPLACE_FREOPEN=0;
12104 REPLACE_FSEEK=0;
12105 REPLACE_FSEEKO=0;
12106 REPLACE_FTELL=0;
12107 REPLACE_FTELLO=0;
12108 REPLACE_GETDELIM=0;
12109 REPLACE_GETLINE=0;
12110 REPLACE_OBSTACK_PRINTF=0;
12111 REPLACE_PERROR=0;
12112 REPLACE_POPEN=0;
12113 REPLACE_PRINTF=0;
12114 REPLACE_REMOVE=0;
12115 REPLACE_RENAME=0;
12116 REPLACE_RENAMEAT=0;
12117 REPLACE_SNPRINTF=0;
12118 REPLACE_SPRINTF=0;
12119 REPLACE_STDIO_READ_FUNCS=0;
12120 REPLACE_STDIO_WRITE_FUNCS=0;
12121 REPLACE_TMPFILE=0;
12122 REPLACE_VASPRINTF=0;
12123 REPLACE_VDPRINTF=0;
12124 REPLACE_VFPRINTF=0;
12125 REPLACE_VPRINTF=0;
12126 REPLACE_VSNPRINTF=0;
12127 REPLACE_VSPRINTF=0;
12128
12129
12130
2d8adcbd
MM
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
6ec2e0f5
SDJ
12141ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
12142if test "x$ac_cv_have_decl_setenv" = x""yes; then :
12143 ac_have_decl=1
12144else
12145 ac_have_decl=0
12146fi
12147
12148cat >>confdefs.h <<_ACEOF
12149#define HAVE_DECL_SETENV $ac_have_decl
12150_ACEOF
12151
12152
12153
12154
12155
12156
12157 if test $ac_cv_have_decl_setenv = no; then
12158 HAVE_DECL_SETENV=0
12159 fi
12160
12161
12162
12163
12164
12165 for ac_header in search.h
12166do :
12167 ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
12168if test "x$ac_cv_header_search_h" = x""yes; then :
12169 cat >>confdefs.h <<_ACEOF
12170#define HAVE_SEARCH_H 1
12171_ACEOF
12172
12173fi
12174
12175done
12176
12177 for ac_func in tsearch
12178do :
12179 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
12180if test "x$ac_cv_func_tsearch" = x""yes; then :
12181 cat >>confdefs.h <<_ACEOF
12182#define HAVE_TSEARCH 1
12183_ACEOF
12184
12185fi
12186done
12187
12188
12189
12190
12191 GNULIB_PTHREAD_SIGMASK=0;
12192 GNULIB_RAISE=0;
12193 GNULIB_SIGNAL_H_SIGPIPE=0;
12194 GNULIB_SIGPROCMASK=0;
12195 GNULIB_SIGACTION=0;
12196 HAVE_POSIX_SIGNALBLOCKING=1;
12197 HAVE_PTHREAD_SIGMASK=1;
12198 HAVE_RAISE=1;
12199 HAVE_SIGSET_T=1;
12200 HAVE_SIGINFO_T=1;
12201 HAVE_SIGACTION=1;
12202 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
12203
12204 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
12205
12206 HAVE_SIGHANDLER_T=1;
12207 REPLACE_PTHREAD_SIGMASK=0;
12208 REPLACE_RAISE=0;
12209
12210
12211 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
12212 #include <signal.h>
12213 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
12214 #include <sys/types.h>
12215
12216"
12217if test "x$ac_cv_type_sigset_t" = x""yes; then :
12218
12219cat >>confdefs.h <<_ACEOF
12220#define HAVE_SIGSET_T 1
12221_ACEOF
12222
12223gl_cv_type_sigset_t=yes
12224else
12225 gl_cv_type_sigset_t=no
12226fi
12227
12228 if test $gl_cv_type_sigset_t != yes; then
12229 HAVE_SIGSET_T=0
12230 fi
12231
12232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
12233$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
12234if test "${ac_cv_type_uid_t+set}" = set; then :
12235 $as_echo_n "(cached) " >&6
12236else
12237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12238/* end confdefs.h. */
12239#include <sys/types.h>
12240
12241_ACEOF
12242if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12243 $EGREP "uid_t" >/dev/null 2>&1; then :
12244 ac_cv_type_uid_t=yes
12245else
12246 ac_cv_type_uid_t=no
12247fi
12248rm -f conftest*
12249
12250fi
12251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
12252$as_echo "$ac_cv_type_uid_t" >&6; }
12253if test $ac_cv_type_uid_t = no; then
12254
12255$as_echo "#define uid_t int" >>confdefs.h
12256
12257
12258$as_echo "#define gid_t int" >>confdefs.h
12259
12260fi
12261
12262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
12263$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
12264if test "${ac_cv_header_stdbool_h+set}" = set; then :
12265 $as_echo_n "(cached) " >&6
12266else
12267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12268/* end confdefs.h. */
12269
12270 #include <stdbool.h>
12271
12272 #ifdef __cplusplus
12273 typedef bool Bool;
12274 #else
12275 typedef _Bool Bool;
12276 #ifndef bool
12277 "error: bool is not defined"
12278 #endif
12279 #ifndef false
12280 "error: false is not defined"
12281 #endif
12282 #if false
12283 "error: false is not 0"
12284 #endif
12285 #ifndef true
12286 "error: true is not defined"
12287 #endif
12288 #if true != 1
12289 "error: true is not 1"
12290 #endif
12291 #endif
12292
12293 #ifndef __bool_true_false_are_defined
12294 "error: __bool_true_false_are_defined is not defined"
12295 #endif
12296
12297 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
12298
12299 char a[true == 1 ? 1 : -1];
12300 char b[false == 0 ? 1 : -1];
12301 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
12302 char d[(bool) 0.5 == true ? 1 : -1];
12303 /* See body of main program for 'e'. */
12304 char f[(Bool) 0.0 == false ? 1 : -1];
12305 char g[true];
12306 char h[sizeof (Bool)];
12307 char i[sizeof s.t];
12308 enum { j = false, k = true, l = false * true, m = true * 256 };
12309 /* The following fails for
12310 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
12311 Bool n[m];
12312 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
12313 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
12314 /* Catch a bug in an HP-UX C compiler. See
12315 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
12316 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
12317 */
12318 Bool q = true;
12319 Bool *pq = &q;
12320 bool *qq = &q;
12321
12322int
12323main ()
12324{
12325
12326 bool e = &s;
12327 *pq |= q; *pq |= ! q;
12328 *qq |= q; *qq |= ! q;
12329 /* Refer to every declared value, to avoid compiler optimizations. */
12330 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
12331 + !m + !n + !o + !p + !q + !pq + !qq);
12332
12333 ;
12334 return 0;
12335}
12336_ACEOF
12337if ac_fn_c_try_compile "$LINENO"; then :
12338 ac_cv_header_stdbool_h=yes
12339else
12340 ac_cv_header_stdbool_h=no
12341fi
12342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12343fi
12344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
12345$as_echo "$ac_cv_header_stdbool_h" >&6; }
12346 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
12347if test "x$ac_cv_type__Bool" = x""yes; then :
12348
12349cat >>confdefs.h <<_ACEOF
12350#define HAVE__BOOL 1
12351_ACEOF
12352
12353
12354fi
12355
12356
12357
12358 REPLACE_NULL=0;
12359 HAVE_MAX_ALIGN_T=1;
12360 HAVE_WCHAR_T=1;
12361
12362
12363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
12364$as_echo_n "checking for wchar_t... " >&6; }
12365if test "${gt_cv_c_wchar_t+set}" = set; then :
12366 $as_echo_n "(cached) " >&6
12367else
12368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12369/* end confdefs.h. */
12370#include <stddef.h>
12371 wchar_t foo = (wchar_t)'\0';
12372int
12373main ()
12374{
12375
12376 ;
12377 return 0;
12378}
12379_ACEOF
12380if ac_fn_c_try_compile "$LINENO"; then :
12381 gt_cv_c_wchar_t=yes
12382else
12383 gt_cv_c_wchar_t=no
12384fi
12385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12386fi
12387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
12388$as_echo "$gt_cv_c_wchar_t" >&6; }
12389 if test $gt_cv_c_wchar_t = yes; then
12390
12391$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
12392
12393 fi
12394
12395
12396
12397ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
12398if test "x$ac_cv_have_decl_strdup" = x""yes; then :
12399 ac_have_decl=1
12400else
12401 ac_have_decl=0
12402fi
12403
12404cat >>confdefs.h <<_ACEOF
12405#define HAVE_DECL_STRDUP $ac_have_decl
12406_ACEOF
12407
12408
12409 REPLACE_STRERROR_0=0
12410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
12411$as_echo_n "checking whether strerror(0) succeeds... " >&6; }
12412if test "${gl_cv_func_strerror_0_works+set}" = set; then :
12413 $as_echo_n "(cached) " >&6
12414else
12415 if test "$cross_compiling" = yes; then :
12416 case "$host_os" in
12417 # Guess yes on glibc systems.
12418 *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
12419 # If we don't know, assume the worst.
12420 *) gl_cv_func_strerror_0_works="guessing no" ;;
12421 esac
12422
12423else
12424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12425/* end confdefs.h. */
12426#include <string.h>
12427 #include <errno.h>
12428
12429int
12430main ()
12431{
12432int result = 0;
12433 char *str;
12434 errno = 0;
12435 str = strerror (0);
12436 if (!*str) result |= 1;
12437 if (errno) result |= 2;
12438 if (strstr (str, "nknown") || strstr (str, "ndefined"))
12439 result |= 4;
12440 return result;
12441 ;
12442 return 0;
12443}
12444_ACEOF
12445if ac_fn_c_try_run "$LINENO"; then :
12446 gl_cv_func_strerror_0_works=yes
12447else
12448 gl_cv_func_strerror_0_works=no
12449fi
12450rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12451 conftest.$ac_objext conftest.beam conftest.$ac_ext
12452fi
12453
12454
12455fi
12456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
12457$as_echo "$gl_cv_func_strerror_0_works" >&6; }
12458 case "$gl_cv_func_strerror_0_works" in
12459 *yes) ;;
12460 *)
12461 REPLACE_STRERROR_0=1
12462
12463$as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
12464
12465 ;;
12466 esac
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479 if test $gl_cv_have_include_next = yes; then
12480 gl_cv_next_string_h='<'string.h'>'
12481 else
12482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
12483$as_echo_n "checking absolute name of <string.h>... " >&6; }
12484if test "${gl_cv_next_string_h+set}" = set; then :
12485 $as_echo_n "(cached) " >&6
12486else
12487
12488
12489
12490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12491/* end confdefs.h. */
12492#include <string.h>
12493_ACEOF
12494 case "$host_os" in
12495 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12496 *) gl_absname_cpp="$ac_cpp" ;;
12497 esac
12498
12499 case "$host_os" in
12500 mingw*)
12501 gl_dirsep_regex='[/\\]'
12502 ;;
12503 *)
12504 gl_dirsep_regex='\/'
12505 ;;
12506 esac
12507 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12508 gl_header_literal_regex=`echo 'string.h' \
12509 | sed -e "$gl_make_literal_regex_sed"`
12510 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12511 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12512 s|^/[^/]|//&|
12513 p
12514 q
12515 }'
12516
12517 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12518 sed -n "$gl_absolute_header_sed"`
12519
12520 gl_header=$gl_cv_absolute_string_h
12521 gl_cv_next_string_h='"'$gl_header'"'
12522
12523
12524fi
12525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
12526$as_echo "$gl_cv_next_string_h" >&6; }
12527 fi
12528 NEXT_STRING_H=$gl_cv_next_string_h
12529
12530 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12531 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12532 gl_next_as_first_directive='<'string.h'>'
12533 else
12534 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12535 gl_next_as_first_directive=$gl_cv_next_string_h
12536 fi
12537 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
12538
12539
12540
12541
12542
12543
12544 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
12545 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
12546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
12547$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
12548if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
12549 $as_echo_n "(cached) " >&6
12550else
12551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12552/* end confdefs.h. */
12553#include <string.h>
12554
12555int
12556main ()
12557{
12558#undef $gl_func
12559 (void) $gl_func;
12560 ;
12561 return 0;
12562}
12563_ACEOF
12564if ac_fn_c_try_compile "$LINENO"; then :
12565 eval "$as_gl_Symbol=yes"
12566else
12567 eval "$as_gl_Symbol=no"
12568fi
12569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12570fi
12571eval ac_res=\$$as_gl_Symbol
12572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12573$as_echo "$ac_res" >&6; }
12574 eval as_val=\$$as_gl_Symbol
12575 if test "x$as_val" = x""yes; then :
12576 cat >>confdefs.h <<_ACEOF
12577#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
12578_ACEOF
12579
12580 eval ac_cv_have_decl_$gl_func=yes
12581fi
12582 done
12583
12584
12585
12586
12587
12588 if test "$gl_cv_func_memchr_works" != yes; then
12589 REPLACE_STRSTR=1
12590 else
12591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
12592$as_echo_n "checking whether strstr works... " >&6; }
12593if test "${gl_cv_func_strstr_works_always+set}" = set; then :
12594 $as_echo_n "(cached) " >&6
12595else
12596 if test "$cross_compiling" = yes; then :
12597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12598/* end confdefs.h. */
12599
12600#ifdef __GNU_LIBRARY__
12601 #include <features.h>
12602 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
12603 || defined __UCLIBC__
12604 Lucky user
12605 #endif
12606#elif defined __CYGWIN__
12607 #include <cygwin/version.h>
12608 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
12609 Lucky user
12610 #endif
12611#else
12612 Lucky user
12613#endif
12614
12615_ACEOF
12616if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12617 $EGREP "Lucky user" >/dev/null 2>&1; then :
12618 gl_cv_func_strstr_works_always="guessing yes"
12619else
12620 gl_cv_func_strstr_works_always="guessing no"
12621fi
12622rm -f conftest*
12623
12624
12625else
12626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12627/* end confdefs.h. */
12628
12629#include <string.h> /* for strstr */
12630#define P "_EF_BF_BD"
12631#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
12632#define NEEDLE P P P P P
12633
12634int
12635main ()
12636{
12637return !!strstr (HAYSTACK, NEEDLE);
12638
12639 ;
12640 return 0;
12641}
12642_ACEOF
12643if ac_fn_c_try_run "$LINENO"; then :
12644 gl_cv_func_strstr_works_always=yes
12645else
12646 gl_cv_func_strstr_works_always=no
12647fi
12648rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12649 conftest.$ac_objext conftest.beam conftest.$ac_ext
12650fi
12651
12652
12653fi
12654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
12655$as_echo "$gl_cv_func_strstr_works_always" >&6; }
12656 case "$gl_cv_func_strstr_works_always" in
12657 *yes) ;;
12658 *)
12659 REPLACE_STRSTR=1
12660 ;;
12661 esac
12662 fi
12663
12664ac_fn_c_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default"
12665if test "x$ac_cv_have_decl_strtok_r" = x""yes; then :
12666 ac_have_decl=1
12667else
12668 ac_have_decl=0
12669fi
12670
12671cat >>confdefs.h <<_ACEOF
12672#define HAVE_DECL_STRTOK_R $ac_have_decl
12673_ACEOF
12674
12675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
12676$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
12677if test -z "$MKDIR_P"; then
12678 if test "${ac_cv_path_mkdir+set}" = set; then :
12679 $as_echo_n "(cached) " >&6
12680else
12681 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12682for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
12683do
12684 IFS=$as_save_IFS
12685 test -z "$as_dir" && as_dir=.
12686 for ac_prog in mkdir gmkdir; do
12687 for ac_exec_ext in '' $ac_executable_extensions; do
12688 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
12689 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
12690 'mkdir (GNU coreutils) '* | \
12691 'mkdir (coreutils) '* | \
12692 'mkdir (fileutils) '4.1*)
12693 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
12694 break 3;;
12695 esac
12696 done
12697 done
12698 done
12699IFS=$as_save_IFS
12700
12701fi
12702
12703 if test "${ac_cv_path_mkdir+set}" = set; then
12704 MKDIR_P="$ac_cv_path_mkdir -p"
12705 else
12706 # As a last resort, use the slow shell script. Don't cache a
12707 # value for MKDIR_P within a source directory, because that will
12708 # break other packages using the cache if that directory is
12709 # removed, or if the value is a relative name.
12710 test -d ./--version && rmdir ./--version
12711 MKDIR_P="$ac_install_sh -d"
12712 fi
12713fi
12714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
12715$as_echo "$MKDIR_P" >&6; }
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735 if test $gl_cv_have_include_next = yes; then
12736 gl_cv_next_sys_types_h='<'sys/types.h'>'
12737 else
12738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
12739$as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
12740if test "${gl_cv_next_sys_types_h+set}" = set; then :
12741 $as_echo_n "(cached) " >&6
12742else
12743
12744
12745
12746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12747/* end confdefs.h. */
12748#include <sys/types.h>
12749_ACEOF
12750 case "$host_os" in
12751 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12752 *) gl_absname_cpp="$ac_cpp" ;;
12753 esac
12754
12755 case "$host_os" in
12756 mingw*)
12757 gl_dirsep_regex='[/\\]'
12758 ;;
12759 *)
12760 gl_dirsep_regex='\/'
12761 ;;
12762 esac
12763 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12764 gl_header_literal_regex=`echo 'sys/types.h' \
12765 | sed -e "$gl_make_literal_regex_sed"`
12766 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12767 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12768 s|^/[^/]|//&|
12769 p
12770 q
12771 }'
12772
12773 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12774 sed -n "$gl_absolute_header_sed"`
12775
12776 gl_header=$gl_cv_absolute_sys_types_h
12777 gl_cv_next_sys_types_h='"'$gl_header'"'
12778
12779
12780fi
12781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
12782$as_echo "$gl_cv_next_sys_types_h" >&6; }
12783 fi
12784 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
12785
12786 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12787 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12788 gl_next_as_first_directive='<'sys/types.h'>'
12789 else
12790 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12791 gl_next_as_first_directive=$gl_cv_next_sys_types_h
12792 fi
12793 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806 GNULIB_MKTIME=0;
12807 GNULIB_NANOSLEEP=0;
12808 GNULIB_STRPTIME=0;
12809 GNULIB_TIMEGM=0;
12810 GNULIB_TIME_R=0;
12811 GNULIB_TIME_RZ=0;
12812 HAVE_DECL_LOCALTIME_R=1;
12813 HAVE_NANOSLEEP=1;
12814 HAVE_STRPTIME=1;
12815 HAVE_TIMEGM=1;
12816 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
12817 REPLACE_MKTIME=GNULIB_PORTCHECK;
12818 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
12819 REPLACE_TIMEGM=GNULIB_PORTCHECK;
12820
12821 : ${GNULIB_GETTIMEOFDAY=0};
12822 REPLACE_GMTIME=0;
12823 REPLACE_LOCALTIME=0;
12824
12825
12826
12827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
12828$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
12829if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
12830 $as_echo_n "(cached) " >&6
12831else
12832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12833/* end confdefs.h. */
12834#include <time.h>
12835
12836int
12837main ()
12838{
12839static struct timespec x; x.tv_sec = x.tv_nsec;
12840 ;
12841 return 0;
12842}
12843_ACEOF
12844if ac_fn_c_try_compile "$LINENO"; then :
12845 gl_cv_sys_struct_timespec_in_time_h=yes
12846else
12847 gl_cv_sys_struct_timespec_in_time_h=no
12848fi
12849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12850fi
12851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
12852$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
12853
12854 TIME_H_DEFINES_STRUCT_TIMESPEC=0
12855 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
12856 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
12857 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
12858 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
12859 TIME_H_DEFINES_STRUCT_TIMESPEC=1
12860 else
12861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
12862$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
12863if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
12864 $as_echo_n "(cached) " >&6
12865else
12866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12867/* end confdefs.h. */
12868#include <sys/time.h>
12869
12870int
12871main ()
12872{
12873static struct timespec x; x.tv_sec = x.tv_nsec;
12874 ;
12875 return 0;
12876}
12877_ACEOF
12878if ac_fn_c_try_compile "$LINENO"; then :
12879 gl_cv_sys_struct_timespec_in_sys_time_h=yes
12880else
12881 gl_cv_sys_struct_timespec_in_sys_time_h=no
12882fi
12883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12884fi
12885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
12886$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
12887 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
12888 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
12889 else
12890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
12891$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
12892if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then :
12893 $as_echo_n "(cached) " >&6
12894else
12895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12896/* end confdefs.h. */
12897#include <pthread.h>
12898
12899int
12900main ()
12901{
12902static struct timespec x; x.tv_sec = x.tv_nsec;
12903 ;
12904 return 0;
12905}
12906_ACEOF
12907if ac_fn_c_try_compile "$LINENO"; then :
12908 gl_cv_sys_struct_timespec_in_pthread_h=yes
12909else
12910 gl_cv_sys_struct_timespec_in_pthread_h=no
12911fi
12912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12913fi
12914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
12915$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
12916 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
12917 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
12918 else
12919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
12920$as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
12921if test "${gl_cv_sys_struct_timespec_in_unistd_h+set}" = set; then :
12922 $as_echo_n "(cached) " >&6
12923else
12924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12925/* end confdefs.h. */
12926#include <unistd.h>
12927
12928int
12929main ()
12930{
12931static struct timespec x; x.tv_sec = x.tv_nsec;
12932 ;
12933 return 0;
12934}
12935_ACEOF
12936if ac_fn_c_try_compile "$LINENO"; then :
12937 gl_cv_sys_struct_timespec_in_unistd_h=yes
12938else
12939 gl_cv_sys_struct_timespec_in_unistd_h=no
12940fi
12941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12942fi
12943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
12944$as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
12945 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
12946 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
12947 fi
12948 fi
12949 fi
12950 fi
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967 if test $gl_cv_have_include_next = yes; then
12968 gl_cv_next_time_h='<'time.h'>'
12969 else
12970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
12971$as_echo_n "checking absolute name of <time.h>... " >&6; }
12972if test "${gl_cv_next_time_h+set}" = set; then :
12973 $as_echo_n "(cached) " >&6
12974else
12975
12976
12977
12978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12979/* end confdefs.h. */
12980#include <time.h>
12981_ACEOF
12982 case "$host_os" in
12983 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12984 *) gl_absname_cpp="$ac_cpp" ;;
12985 esac
12986
12987 case "$host_os" in
12988 mingw*)
12989 gl_dirsep_regex='[/\\]'
12990 ;;
12991 *)
12992 gl_dirsep_regex='\/'
12993 ;;
12994 esac
12995 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12996 gl_header_literal_regex=`echo 'time.h' \
12997 | sed -e "$gl_make_literal_regex_sed"`
12998 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12999 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13000 s|^/[^/]|//&|
13001 p
13002 q
13003 }'
13004
13005 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13006 sed -n "$gl_absolute_header_sed"`
13007
13008 gl_header=$gl_cv_absolute_time_h
13009 gl_cv_next_time_h='"'$gl_header'"'
13010
13011
13012fi
13013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
13014$as_echo "$gl_cv_next_time_h" >&6; }
13015 fi
13016 NEXT_TIME_H=$gl_cv_next_time_h
13017
13018 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13019 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13020 gl_next_as_first_directive='<'time.h'>'
13021 else
13022 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13023 gl_next_as_first_directive=$gl_cv_next_time_h
13024 fi
13025 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
13026
13027
13028
13029
13030
13031
13032
13033
13034ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
13035if test "x$ac_cv_have_decl_unsetenv" = x""yes; then :
13036 ac_have_decl=1
13037else
13038 ac_have_decl=0
13039fi
13040
13041cat >>confdefs.h <<_ACEOF
13042#define HAVE_DECL_UNSETENV $ac_have_decl
13043_ACEOF
13044
13045
13046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
13047$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
13048if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then :
13049 $as_echo_n "(cached) " >&6
13050else
13051 gl_cv_header_wchar_h_correct_inline=yes
13052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13053/* end confdefs.h. */
13054
13055 #define wcstod renamed_wcstod
13056/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13057 <wchar.h>.
13058 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13059 included before <wchar.h>. */
13060#include <stddef.h>
13061#include <stdio.h>
13062#include <time.h>
13063#include <wchar.h>
13064extern int zero (void);
13065int main () { return zero(); }
13066
13067_ACEOF
13068 save_ac_compile="$ac_compile"
13069 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
13070 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
13071 (eval $ac_compile) 2>&5
13072 ac_status=$?
13073 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13074 test $ac_status = 0; }; then
13075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13076/* end confdefs.h. */
13077
13078 #define wcstod renamed_wcstod
13079/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13080 <wchar.h>.
13081 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13082 included before <wchar.h>. */
13083#include <stddef.h>
13084#include <stdio.h>
13085#include <time.h>
13086#include <wchar.h>
13087int zero (void) { return 0; }
13088
13089_ACEOF
13090 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
13091 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
13092 (eval $ac_compile) 2>&5
13093 ac_status=$?
13094 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13095 test $ac_status = 0; }; then
13096 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
13097 :
13098 else
13099 gl_cv_header_wchar_h_correct_inline=no
13100 fi
13101 fi
13102 fi
13103 ac_compile="$save_ac_compile"
13104 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
13105
13106fi
13107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
13108$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
13109 if test $gl_cv_header_wchar_h_correct_inline = no; then
13110 as_fn_error "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
13111This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
13112C99 mode. You have four options:
13113 - Add the flag -fgnu89-inline to CC and reconfigure, or
13114 - Fix your include files, using parts of
13115 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
13116 - Use a gcc version older than 4.3, or
13117 - Don't use the flags -std=c99 or -std=gnu99.
13118Configuration aborted." "$LINENO" 5
13119 fi
13120
13121
13122
13123
13124
13125 if test $ac_cv_header_features_h = yes; then
13126 HAVE_FEATURES_H=1
13127 else
13128 HAVE_FEATURES_H=0
13129 fi
13130
13131
13132
13133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
13134$as_echo_n "checking for wint_t... " >&6; }
13135if test "${gt_cv_c_wint_t+set}" = set; then :
13136 $as_echo_n "(cached) " >&6
13137else
13138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13139/* end confdefs.h. */
13140
13141/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13142 <wchar.h>.
13143 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
13144 before <wchar.h>. */
13145#include <stddef.h>
13146#include <stdio.h>
13147#include <time.h>
13148#include <wchar.h>
13149 wint_t foo = (wchar_t)'\0';
13150int
13151main ()
13152{
13153
13154 ;
13155 return 0;
13156}
13157_ACEOF
13158if ac_fn_c_try_compile "$LINENO"; then :
13159 gt_cv_c_wint_t=yes
13160else
13161 gt_cv_c_wint_t=no
13162fi
13163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13164fi
13165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
13166$as_echo "$gt_cv_c_wint_t" >&6; }
13167 if test $gt_cv_c_wint_t = yes; then
13168
13169$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
13170
13171 fi
13172
13173
13174 GNULIB_ISWBLANK=0;
13175 GNULIB_WCTYPE=0;
13176 GNULIB_ISWCTYPE=0;
13177 GNULIB_WCTRANS=0;
13178 GNULIB_TOWCTRANS=0;
13179 HAVE_ISWBLANK=1;
13180 HAVE_WCTYPE_T=1;
13181 HAVE_WCTRANS_T=1;
13182 REPLACE_ISWBLANK=0;
13183
13184
13185
13186
13187 if false; then
13188 GL_COND_LIBTOOL_TRUE=
13189 GL_COND_LIBTOOL_FALSE='#'
13190else
13191 GL_COND_LIBTOOL_TRUE='#'
13192 GL_COND_LIBTOOL_FALSE=
13193fi
13194
13195 gl_cond_libtool=false
13196 gl_libdeps=
13197 gl_ltlibdeps=
13198 gl_m4_base='import/m4'
13199
13200
13201
13202
13203
13204
13205
13206
13207
13208 gl_source_base='import'
13209
13210
13211 if test $ac_cv_func_alloca_works = no; then
13212 :
13213 fi
13214
13215 # Define an additional variable used in the Makefile substitution.
13216 if test $ac_cv_working_alloca_h = yes; then
13217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
13218$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
13219if test "${gl_cv_rpl_alloca+set}" = set; then :
13220 $as_echo_n "(cached) " >&6
13221else
13222
13223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13224/* end confdefs.h. */
13225
13226#if defined __GNUC__ || defined _AIX || defined _MSC_VER
13227 Need own alloca
13228#endif
13229
13230_ACEOF
13231if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13232 $EGREP "Need own alloca" >/dev/null 2>&1; then :
13233 gl_cv_rpl_alloca=yes
13234else
13235 gl_cv_rpl_alloca=no
13236fi
13237rm -f conftest*
13238
13239
13240fi
13241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
13242$as_echo "$gl_cv_rpl_alloca" >&6; }
13243 if test $gl_cv_rpl_alloca = yes; then
13244
13245$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13246
13247 ALLOCA_H=alloca.h
13248 else
13249 ALLOCA_H=
13250 fi
13251 else
13252 ALLOCA_H=alloca.h
13253 fi
13254
13255 if test -n "$ALLOCA_H"; then
13256 GL_GENERATE_ALLOCA_H_TRUE=
13257 GL_GENERATE_ALLOCA_H_FALSE='#'
13258else
13259 GL_GENERATE_ALLOCA_H_TRUE='#'
13260 GL_GENERATE_ALLOCA_H_FALSE=
13261fi
13262
13263
13264
13265
13266
13267
13268
13269
13270
13271
13272 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
13273
13274
13275
13276
13277 if test $ac_cv_func_canonicalize_file_name = no; then
13278 HAVE_CANONICALIZE_FILE_NAME=0
13279 if test $ac_cv_func_realpath = no; then
13280 HAVE_REALPATH=0
13281 else
13282 case "$gl_cv_func_realpath_works" in
13283 *yes) ;;
13284 *) REPLACE_REALPATH=1 ;;
13285 esac
13286 fi
13287 else
13288 case "$gl_cv_func_realpath_works" in
13289 *yes)
13290 ;;
13291 *)
13292 REPLACE_CANONICALIZE_FILE_NAME=1
13293 REPLACE_REALPATH=1
13294 ;;
13295 esac
13296 fi
13297
13298 if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
13299
13300
13301
13302
13303
13304
13305
13306
13307 gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
13308
13309 fi
13310
13311
13312cat >>confdefs.h <<_ACEOF
13313#define GNULIB_CANONICALIZE_LGPL 1
13314_ACEOF
13315
13316
13317
13318
13319
13320
13321
13322 GNULIB_CANONICALIZE_FILE_NAME=1
13323
13324
13325
13326
13327
13328$as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
13329
13330
13331
13332
13333
13334
13335
13336
13337 GNULIB_REALPATH=1
13338
13339
13340
13341
13342
13343$as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
13344
13345
13346
13347
13348
13349
13350
13351
13352 GNULIB_CHDIR=1
13353
13354
13355
13356
13357
13358$as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
13359
13360
13361
13362
13363
13364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
13365$as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; }
13366if test "${gl_cv_have_arbitrary_file_name_length_limit+set}" = set; then :
13367 $as_echo_n "(cached) " >&6
13368else
13369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13370/* end confdefs.h. */
13371
13372/* Arrange to define PATH_MAX, like "pathmax.h" does. */
13373#if HAVE_UNISTD_H
13374# include <unistd.h>
13375#endif
13376#include <limits.h>
13377#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
13378# include <sys/param.h>
13379#endif
13380#if !defined PATH_MAX && defined MAXPATHLEN
13381# define PATH_MAX MAXPATHLEN
13382#endif
13383#ifdef __hpux
13384# undef PATH_MAX
13385# define PATH_MAX 1024
13386#endif
13387#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
13388# undef PATH_MAX
13389# define PATH_MAX 260
13390#endif
13391
13392#ifdef PATH_MAX
13393have_arbitrary_file_name_length_limit
13394#endif
13395_ACEOF
13396if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13397 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
13398 gl_cv_have_arbitrary_file_name_length_limit=yes
13399else
13400 gl_cv_have_arbitrary_file_name_length_limit=no
13401fi
13402rm -f conftest*
13403
13404fi
13405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
13406$as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
13407
13408 if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
13409
13410
13411
13412
13413
13414
13415
13416
13417 gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
13418
13419 :
13420 fi
13421
13422
13423$as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
13424
13425
13426
13427
13428
13429 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
13430 REPLACE_CLOSE=1
13431 fi
13432
13433
13434
13435
13436
13437 if test $ac_cv_header_sys_socket_h != yes; then
13438 for ac_header in winsock2.h
13439do :
13440 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
13441if test "x$ac_cv_header_winsock2_h" = x""yes; then :
13442 cat >>confdefs.h <<_ACEOF
13443#define HAVE_WINSOCK2_H 1
13444_ACEOF
13445
13446fi
13447
13448done
13449
13450 fi
13451 if test "$ac_cv_header_winsock2_h" = yes; then
13452 HAVE_WINSOCK2_H=1
13453 UNISTD_H_HAVE_WINSOCK2_H=1
13454 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
13455 else
13456 HAVE_WINSOCK2_H=0
13457 fi
13458
13459
13460 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
13461 REPLACE_CLOSE=1
13462 fi
13463
13464
13465 if test $REPLACE_CLOSE = 0; then
13466
13467
13468
13469 if test $ac_cv_func_fchdir = no; then
13470 HAVE_FCHDIR=0
13471 fi
13472
13473 if test $HAVE_FCHDIR = 0; then
13474 REPLACE_CLOSE=1
13475 fi
13476 fi
13477
13478
13479 if test $REPLACE_CLOSE = 1; then
13480
13481
13482
13483
13484
13485
13486
13487
13488 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
13489
13490 fi
13491
13492
13493
13494
13495
13496 GNULIB_CLOSE=1
13497
13498
13499
13500
13501
13502$as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
13503
13504
13505
13506
13507
13508
13509 for ac_func in closedir
13510do :
13511 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
13512if test "x$ac_cv_func_closedir" = x""yes; then :
13513 cat >>confdefs.h <<_ACEOF
13514#define HAVE_CLOSEDIR 1
13515_ACEOF
13516
13517fi
13518done
13519
13520 if test $ac_cv_func_closedir = no; then
13521 HAVE_CLOSEDIR=0
13522 fi
13523
13524
13525
13526
13527 if test $ac_cv_func_fchdir = no; then
13528 HAVE_FCHDIR=0
13529 fi
13530
13531 if test $HAVE_FCHDIR = 0; then
13532 if test $HAVE_CLOSEDIR = 1; then
13533 REPLACE_CLOSEDIR=1
13534 fi
13535 fi
13536
13537 case $host_os,$HAVE_CLOSEDIR in
13538 os2*,1)
13539 REPLACE_CLOSEDIR=1;;
13540 esac
13541
13542 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
13543
13544
13545
13546
13547
13548
13549
13550
13551 gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
13552
13553 fi
13554
13555
13556
13557
13558
13559 GNULIB_CLOSEDIR=1
13560
13561
13562
13563
13564
13565$as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
13566
13567
13568
13569
13570 if test "x$datarootdir" = x; then
13571 datarootdir='${datadir}'
13572
13573 fi
13574 if test "x$docdir" = x; then
13575 docdir='${datarootdir}/doc/${PACKAGE}'
13576
13577 fi
13578 if test "x$htmldir" = x; then
13579 htmldir='${docdir}'
13580
13581 fi
13582 if test "x$dvidir" = x; then
13583 dvidir='${docdir}'
13584
13585 fi
13586 if test "x$pdfdir" = x; then
13587 pdfdir='${docdir}'
13588
13589 fi
13590 if test "x$psdir" = x; then
13591 psdir='${docdir}'
13592
13593 fi
13594 if test "x$lispdir" = x; then
13595 lispdir='${datarootdir}/emacs/site-lisp'
13596
13597 fi
13598 if test "x$localedir" = x; then
13599 localedir='${datarootdir}/locale'
13600
13601 fi
13602 if test "x$runstatedir" = x; then
13603 runstatedir='${localstatedir}/run'
13604
13605 fi
13606
13607 pkglibexecdir='${libexecdir}/${PACKAGE}'
13608
13609
13610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
13611$as_echo_n "checking for d_ino member in directory struct... " >&6; }
13612if test "${gl_cv_struct_dirent_d_ino+set}" = set; then :
13613 $as_echo_n "(cached) " >&6
13614else
13615 if test "$cross_compiling" = yes; then :
13616 case "$host_os" in
13617 # Guess yes on glibc systems with Linux kernel.
13618 linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
13619 # If we don't know, assume the worst.
13620 *) gl_cv_struct_dirent_d_ino="guessing no" ;;
13621 esac
13622
13623else
13624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13625/* end confdefs.h. */
13626#include <sys/types.h>
13627 #include <sys/stat.h>
13628 #include <dirent.h>
13629
13630int
13631main ()
13632{
13633DIR *dp = opendir (".");
13634 struct dirent *e;
13635 struct stat st;
13636 if (! dp)
13637 return 1;
13638 e = readdir (dp);
13639 if (! e)
13640 return 2;
13641 if (lstat (e->d_name, &st) != 0)
13642 return 3;
13643 if (e->d_ino != st.st_ino)
13644 return 4;
13645 closedir (dp);
13646 return 0;
13647
13648 ;
13649 return 0;
13650}
13651_ACEOF
13652if ac_fn_c_try_run "$LINENO"; then :
13653 gl_cv_struct_dirent_d_ino=yes
13654else
13655 gl_cv_struct_dirent_d_ino=no
13656fi
13657rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13658 conftest.$ac_objext conftest.beam conftest.$ac_ext
13659fi
13660
13661fi
13662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
13663$as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
13664 case "$gl_cv_struct_dirent_d_ino" in
13665 *yes)
13666
13667$as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
13668
13669 ;;
13670 esac
13671
13672
13673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
13674$as_echo_n "checking for d_type member in directory struct... " >&6; }
13675if test "${gl_cv_struct_dirent_d_type+set}" = set; then :
13676 $as_echo_n "(cached) " >&6
13677else
13678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13679/* end confdefs.h. */
13680
13681#include <sys/types.h>
13682#include <dirent.h>
13683
13684int
13685main ()
13686{
13687struct dirent dp; dp.d_type = 0;
13688 ;
13689 return 0;
13690}
13691_ACEOF
13692if ac_fn_c_try_link "$LINENO"; then :
13693 gl_cv_struct_dirent_d_type=yes
13694else
13695 gl_cv_struct_dirent_d_type=no
13696fi
13697rm -f core conftest.err conftest.$ac_objext \
13698 conftest$ac_exeext conftest.$ac_ext
13699
13700
13701fi
13702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5
13703$as_echo "$gl_cv_struct_dirent_d_type" >&6; }
13704 if test $gl_cv_struct_dirent_d_type = yes; then
13705
13706$as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
13707
13708 fi
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723 if test $gl_cv_have_include_next = yes; then
13724 gl_cv_next_dirent_h='<'dirent.h'>'
13725 else
13726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
13727$as_echo_n "checking absolute name of <dirent.h>... " >&6; }
13728if test "${gl_cv_next_dirent_h+set}" = set; then :
13729 $as_echo_n "(cached) " >&6
13730else
13731
13732 if test $ac_cv_header_dirent_h = yes; then
13733
13734
13735
13736
13737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13738/* end confdefs.h. */
13739#include <dirent.h>
13740_ACEOF
13741 case "$host_os" in
13742 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13743 *) gl_absname_cpp="$ac_cpp" ;;
13744 esac
13745
13746 case "$host_os" in
13747 mingw*)
13748 gl_dirsep_regex='[/\\]'
13749 ;;
13750 *)
13751 gl_dirsep_regex='\/'
13752 ;;
13753 esac
13754 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13755 gl_header_literal_regex=`echo 'dirent.h' \
13756 | sed -e "$gl_make_literal_regex_sed"`
13757 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13758 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13759 s|^/[^/]|//&|
13760 p
13761 q
13762 }'
13763
13764 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13765 sed -n "$gl_absolute_header_sed"`
13766
13767 gl_header=$gl_cv_absolute_dirent_h
13768 gl_cv_next_dirent_h='"'$gl_header'"'
13769 else
13770 gl_cv_next_dirent_h='<'dirent.h'>'
13771 fi
13772
13773
13774fi
13775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
13776$as_echo "$gl_cv_next_dirent_h" >&6; }
13777 fi
13778 NEXT_DIRENT_H=$gl_cv_next_dirent_h
13779
13780 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13781 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13782 gl_next_as_first_directive='<'dirent.h'>'
13783 else
13784 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13785 gl_next_as_first_directive=$gl_cv_next_dirent_h
13786 fi
13787 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
13788
13789
13790
13791
13792 if test $ac_cv_header_dirent_h = yes; then
13793 HAVE_DIRENT_H=1
13794 else
13795 HAVE_DIRENT_H=0
13796 fi
13797
13798
13799
13800 for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do
13801 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
13802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
13803$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
13804if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
13805 $as_echo_n "(cached) " >&6
13806else
13807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13808/* end confdefs.h. */
13809#include <dirent.h>
13810
13811int
13812main ()
13813{
13814#undef $gl_func
13815 (void) $gl_func;
13816 ;
13817 return 0;
13818}
13819_ACEOF
13820if ac_fn_c_try_compile "$LINENO"; then :
13821 eval "$as_gl_Symbol=yes"
13822else
13823 eval "$as_gl_Symbol=no"
13824fi
13825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13826fi
13827eval ac_res=\$$as_gl_Symbol
13828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13829$as_echo "$ac_res" >&6; }
13830 eval as_val=\$$as_gl_Symbol
13831 if test "x$as_val" = x""yes; then :
13832 cat >>confdefs.h <<_ACEOF
13833#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
13834_ACEOF
13835
13836 eval ac_cv_have_decl_$gl_func=yes
13837fi
13838 done
13839
13840
13841
13842
13843
13844
13845
13846 for ac_func in dirfd
13847do :
13848 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
13849if test "x$ac_cv_func_dirfd" = x""yes; then :
13850 cat >>confdefs.h <<_ACEOF
13851#define HAVE_DIRFD 1
13852_ACEOF
13853
13854fi
13855done
13856
13857 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
13858 #include <dirent.h>
13859"
13860if test "x$ac_cv_have_decl_dirfd" = x""yes; then :
13861 ac_have_decl=1
13862else
13863 ac_have_decl=0
13864fi
13865
13866cat >>confdefs.h <<_ACEOF
13867#define HAVE_DECL_DIRFD $ac_have_decl
13868_ACEOF
13869
13870 if test $ac_cv_have_decl_dirfd = no; then
13871 HAVE_DECL_DIRFD=0
13872 fi
13873
13874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
13875$as_echo_n "checking whether dirfd is a macro... " >&6; }
13876if test "${gl_cv_func_dirfd_macro+set}" = set; then :
13877 $as_echo_n "(cached) " >&6
13878else
13879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13880/* end confdefs.h. */
13881
13882#include <sys/types.h>
13883#include <dirent.h>
13884#ifdef dirfd
13885 dirent_header_defines_dirfd
13886#endif
13887_ACEOF
13888if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13889 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
13890 gl_cv_func_dirfd_macro=yes
13891else
13892 gl_cv_func_dirfd_macro=no
13893fi
13894rm -f conftest*
13895
13896fi
13897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
13898$as_echo "$gl_cv_func_dirfd_macro" >&6; }
13899
13900 # Use the replacement if we have no function or macro with that name,
13901 # or if OS/2 kLIBC whose dirfd() does not work.
13902 # Replace only if the system declares dirfd already.
13903 case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
13904 no,no,*,yes | *,*,os2*,yes)
13905 REPLACE_DIRFD=1
13906
13907$as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
13908;;
13909 esac
13910
13911 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
13912 || test $REPLACE_DIRFD = 1; then
13913
13914
13915
13916
13917
13918
13919
13920
13921 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
13922
13923
13924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
13925$as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
13926if test "${gl_cv_sys_dir_fd_member_name+set}" = set; then :
13927 $as_echo_n "(cached) " >&6
13928else
13929
13930 dirfd_save_CFLAGS=$CFLAGS
13931 for ac_expr in d_fd dd_fd; do
13932
13933 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
13934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13935/* end confdefs.h. */
13936
13937 #include <sys/types.h>
13938 #include <dirent.h>
13939int
13940main ()
13941{
13942DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
13943 ;
13944 return 0;
13945}
13946_ACEOF
13947if ac_fn_c_try_compile "$LINENO"; then :
13948 dir_fd_found=yes
13949
13950fi
13951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13952 CFLAGS=$dirfd_save_CFLAGS
13953 test "$dir_fd_found" = yes && break
13954 done
13955 test "$dir_fd_found" = yes || ac_expr=no_such_member
13956
13957 gl_cv_sys_dir_fd_member_name=$ac_expr
13958
13959
13960fi
13961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
13962$as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
13963 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
13964
13965cat >>confdefs.h <<_ACEOF
13966#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
13967_ACEOF
13968
13969 fi
13970
13971
13972 fi
13973
13974
13975
13976
13977
13978 GNULIB_DIRFD=1
13979
13980
13981
13982
13983
13984$as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
13995$as_echo_n "checking whether // is distinct from /... " >&6; }
13996if test "${gl_cv_double_slash_root+set}" = set; then :
13997 $as_echo_n "(cached) " >&6
13998else
13999 if test x"$cross_compiling" = xyes ; then
14000 # When cross-compiling, there is no way to tell whether // is special
14001 # short of a list of hosts. However, the only known hosts to date
14002 # that have a distinct // are Apollo DomainOS (too old to port to),
14003 # Cygwin, and z/OS. If anyone knows of another system for which // has
14004 # special semantics and is distinct from /, please report it to
14005 # <bug-gnulib@gnu.org>.
14006 case $host in
14007 *-cygwin | i370-ibm-openedition)
14008 gl_cv_double_slash_root=yes ;;
14009 *)
14010 # Be optimistic and assume that / and // are the same when we
14011 # don't know.
14012 gl_cv_double_slash_root='unknown, assuming no' ;;
14013 esac
14014 else
14015 set x `ls -di / // 2>/dev/null`
14016 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
14017 gl_cv_double_slash_root=no
14018 else
14019 gl_cv_double_slash_root=yes
14020 fi
14021 fi
14022fi
14023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
14024$as_echo "$gl_cv_double_slash_root" >&6; }
14025 if test "$gl_cv_double_slash_root" = yes; then
8690e634 14026
6ec2e0f5 14027$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
8690e634 14028
6ec2e0f5 14029 fi
8690e634
JK
14030
14031
14032
14033
6ec2e0f5
SDJ
14034 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
14035 REPLACE_DUP=1
14036 fi
8690e634 14037
8690e634
JK
14038
14039
14040
6ec2e0f5
SDJ
14041 if test $ac_cv_func_fchdir = no; then
14042 HAVE_FCHDIR=0
14043 fi
8690e634 14044
6ec2e0f5
SDJ
14045 if test $HAVE_FCHDIR = 0; then
14046 REPLACE_DUP=1
14047 fi
8690e634 14048
6ec2e0f5
SDJ
14049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
14050$as_echo_n "checking whether dup works... " >&6; }
14051if test "${gl_cv_func_dup_works+set}" = set; then :
14052 $as_echo_n "(cached) " >&6
8690e634 14053else
6ec2e0f5
SDJ
14054 if test "$cross_compiling" = yes; then :
14055 gl_cv_func_dup_works='guessing yes'
14056else
14057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 14058/* end confdefs.h. */
6ec2e0f5
SDJ
14059#include <unistd.h>
14060 #include <fcntl.h>
14061 #include <errno.h>
14062int
14063main ()
14064{
14065/* On OS/2 kLIBC, dup does not work on a directory fd. */
14066 int fd = open (".", O_RDONLY);
14067 return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
8690e634 14068
6ec2e0f5
SDJ
14069 ;
14070 return 0;
14071}
8690e634
JK
14072
14073_ACEOF
6ec2e0f5
SDJ
14074if ac_fn_c_try_run "$LINENO"; then :
14075 gl_cv_func_dup_works=yes
14076else
14077 gl_cv_func_dup_works=no
14078fi
14079rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14080 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 14081fi
8690e634 14082
8690e634 14083
6ec2e0f5
SDJ
14084fi
14085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
14086$as_echo "$gl_cv_func_dup_works" >&6; }
14087 case "$gl_cv_func_dup_works" in
14088 *yes) ;;
14089 *)
14090 REPLACE_DUP=1
14091 ;;
14092 esac
8690e634 14093
6ec2e0f5 14094 if test $REPLACE_DUP = 1; then
8690e634 14095
8690e634 14096
8690e634 14097
8690e634 14098
8690e634 14099
6ec2e0f5
SDJ
14100
14101
14102
14103 gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
14104
14105 :
8690e634
JK
14106 fi
14107
14108
8690e634
JK
14109
14110
14111
6ec2e0f5 14112 GNULIB_DUP=1
8690e634 14113
6ec2e0f5
SDJ
14114
14115
14116
14117
14118$as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
14119
14120
14121
14122
14123
14124
14125
14126
14127$as_echo "#define HAVE_DUP2 1" >>confdefs.h
14128
14129
14130 if test $HAVE_DUP2 = 1; then
14131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
14132$as_echo_n "checking whether dup2 works... " >&6; }
14133if test "${gl_cv_func_dup2_works+set}" = set; then :
8690e634
JK
14134 $as_echo_n "(cached) " >&6
14135else
14136 if test "$cross_compiling" = yes; then :
6ec2e0f5
SDJ
14137 case "$host_os" in
14138 mingw*) # on this platform, dup2 always returns 0 for success
14139 gl_cv_func_dup2_works="guessing no" ;;
14140 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
14141 gl_cv_func_dup2_works="guessing no" ;;
14142 aix* | freebsd*)
14143 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
14144 # not EBADF.
14145 gl_cv_func_dup2_works="guessing no" ;;
14146 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
14147 gl_cv_func_dup2_works="guessing no" ;;
14148 *-android*) # implemented using dup3(), which fails if oldfd == newfd
14149 gl_cv_func_dup2_works="guessing no" ;;
14150 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
14151 gl_cv_func_dup2_works="guessing no" ;;
14152 *) gl_cv_func_dup2_works="guessing yes" ;;
14153 esac
8690e634
JK
14154else
14155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14156/* end confdefs.h. */
14157
6ec2e0f5
SDJ
14158 #include <errno.h>
14159 #include <fcntl.h>
14160 #include <limits.h>
14161 #include <sys/resource.h>
14162 #include <unistd.h>
14163 #ifndef RLIM_SAVED_CUR
14164 # define RLIM_SAVED_CUR RLIM_INFINITY
14165 #endif
14166 #ifndef RLIM_SAVED_MAX
14167 # define RLIM_SAVED_MAX RLIM_INFINITY
14168 #endif
8690e634
JK
14169
14170int
14171main ()
14172{
6ec2e0f5
SDJ
14173int result = 0;
14174 int bad_fd = INT_MAX;
14175 struct rlimit rlim;
14176 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
14177 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
14178 && rlim.rlim_cur != RLIM_INFINITY
14179 && rlim.rlim_cur != RLIM_SAVED_MAX
14180 && rlim.rlim_cur != RLIM_SAVED_CUR)
14181 bad_fd = rlim.rlim_cur;
14182 #ifdef FD_CLOEXEC
14183 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
14184 result |= 1;
14185 #endif
14186 if (dup2 (1, 1) != 1)
14187 result |= 2;
14188 #ifdef FD_CLOEXEC
14189 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
14190 result |= 4;
14191 #endif
14192 close (0);
14193 if (dup2 (0, 0) != -1)
14194 result |= 8;
14195 /* Many gnulib modules require POSIX conformance of EBADF. */
14196 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
14197 result |= 16;
14198 /* Flush out some cygwin core dumps. */
14199 if (dup2 (2, -1) != -1 || errno != EBADF)
14200 result |= 32;
14201 dup2 (2, 255);
14202 dup2 (2, 256);
14203 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
14204 {
14205 int fd = open (".", O_RDONLY);
14206 if (fd == -1)
14207 result |= 64;
14208 else if (dup2 (fd, fd + 1) == -1)
14209 result |= 128;
14210
14211 close (fd);
14212 }
14213 return result;
8690e634
JK
14214 ;
14215 return 0;
14216}
6ec2e0f5 14217
8690e634
JK
14218_ACEOF
14219if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 14220 gl_cv_func_dup2_works=yes
8690e634 14221else
6ec2e0f5 14222 gl_cv_func_dup2_works=no
8690e634
JK
14223fi
14224rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14225 conftest.$ac_objext conftest.beam conftest.$ac_ext
14226fi
14227
6ec2e0f5
SDJ
14228
14229fi
14230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
14231$as_echo "$gl_cv_func_dup2_works" >&6; }
14232 case "$gl_cv_func_dup2_works" in
14233 *yes) ;;
14234 *)
14235 REPLACE_DUP2=1
14236 for ac_func in setdtablesize
14237do :
14238 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
14239if test "x$ac_cv_func_setdtablesize" = x""yes; then :
14240 cat >>confdefs.h <<_ACEOF
14241#define HAVE_SETDTABLESIZE 1
14242_ACEOF
14243
14244fi
14245done
14246
14247 ;;
14248 esac
14249 fi
14250
14251
14252
14253
14254 if test $ac_cv_func_fchdir = no; then
14255 HAVE_FCHDIR=0
8690e634
JK
14256 fi
14257
6ec2e0f5
SDJ
14258 if test $HAVE_FCHDIR = 0; then
14259 if test $HAVE_DUP2 = 1; then
14260 REPLACE_DUP2=1
14261 fi
14262 fi
8690e634 14263
8690e634 14264
6ec2e0f5 14265 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
8690e634
JK
14266
14267
14268
14269
8690e634 14270
8690e634 14271
6ec2e0f5
SDJ
14272
14273
14274 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
14275
14276
8690e634
JK
14277 fi
14278
8690e634 14279
8690e634 14280
8690e634
JK
14281
14282
6ec2e0f5
SDJ
14283 GNULIB_DUP2=1
14284
14285
14286
14287
14288
14289$as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
14290
14291
14292
14293
14294
14295
14296
14297
14298
14299 GNULIB_ENVIRON=1
14300
14301
14302
14303
14304
14305$as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
14306
14307
14308
14309
14310
14311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
14312$as_echo_n "checking for error_at_line... " >&6; }
14313if test "${ac_cv_lib_error_at_line+set}" = set; then :
14314 $as_echo_n "(cached) " >&6
8690e634
JK
14315else
14316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14317/* end confdefs.h. */
6ec2e0f5 14318#include <error.h>
8690e634
JK
14319int
14320main ()
14321{
6ec2e0f5 14322error_at_line (0, 0, "", 0, "an error occurred");
8690e634
JK
14323 ;
14324 return 0;
14325}
14326_ACEOF
6ec2e0f5
SDJ
14327if ac_fn_c_try_link "$LINENO"; then :
14328 ac_cv_lib_error_at_line=yes
8690e634 14329else
6ec2e0f5 14330 ac_cv_lib_error_at_line=no
8690e634 14331fi
6ec2e0f5
SDJ
14332rm -f core conftest.err conftest.$ac_objext \
14333 conftest$ac_exeext conftest.$ac_ext
8690e634 14334fi
6ec2e0f5
SDJ
14335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
14336$as_echo "$ac_cv_lib_error_at_line" >&6; }
14337
14338 if test $ac_cv_lib_error_at_line = no; then
14339
14340
14341
14342
14343
14344
14345
14346
14347 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
14348
8690e634
JK
14349
14350
8690e634
JK
14351 :
14352
6ec2e0f5 14353 fi
6a29c58e 14354
6a29c58e
YQ
14355
14356
14357
3d99e817 14358
6ec2e0f5
SDJ
14359
14360
14361 if test $ac_cv_have_decl_fchdir = no; then
14362 HAVE_DECL_FCHDIR=0
14363 fi
14364
14365
14366 if test $HAVE_FCHDIR = 0; then
14367
14368
3d99e817
AK
14369
14370
14371
14372
14373
14374
6ec2e0f5 14375 gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
3d99e817 14376
6ec2e0f5 14377 :
3d99e817 14378
6ec2e0f5 14379$as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
3d99e817 14380
6ec2e0f5
SDJ
14381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
14382$as_echo_n "checking whether open can visit directories... " >&6; }
14383if test "${gl_cv_func_open_directory_works+set}" = set; then :
14384 $as_echo_n "(cached) " >&6
14385else
14386 if test "$cross_compiling" = yes; then :
14387 case "$host_os" in
14388 # Guess yes on glibc systems.
14389 *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
14390 # If we don't know, assume the worst.
14391 *) gl_cv_func_open_directory_works="guessing no" ;;
14392 esac
3d99e817 14393
6ec2e0f5
SDJ
14394else
14395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14396/* end confdefs.h. */
14397#include <fcntl.h>
3d99e817 14398
6ec2e0f5
SDJ
14399int
14400main ()
14401{
14402return open(".", O_RDONLY) < 0;
14403 ;
14404 return 0;
14405}
3d99e817 14406_ACEOF
6ec2e0f5
SDJ
14407if ac_fn_c_try_run "$LINENO"; then :
14408 gl_cv_func_open_directory_works=yes
14409else
14410 gl_cv_func_open_directory_works=no
14411fi
14412rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14413 conftest.$ac_objext conftest.beam conftest.$ac_ext
14414fi
3d99e817
AK
14415
14416fi
6ec2e0f5
SDJ
14417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
14418$as_echo "$gl_cv_func_open_directory_works" >&6; }
14419 case "$gl_cv_func_open_directory_works" in
14420 *yes) ;;
14421 *)
3d99e817 14422
6ec2e0f5 14423$as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
3d99e817 14424
6ec2e0f5
SDJ
14425 ;;
14426 esac
14427 fi
3d99e817 14428
3d99e817
AK
14429
14430
14431
0750520d 14432
0750520d 14433
6ec2e0f5 14434 GNULIB_FCHDIR=1
0750520d 14435
0750520d
PA
14436
14437
0750520d 14438
0750520d 14439
6ec2e0f5 14440$as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
0750520d 14441
0750520d 14442
0750520d 14443
0750520d 14444
0750520d 14445
0750520d 14446
0750520d 14447
6ec2e0f5
SDJ
14448
14449 if test $ac_cv_func_fcntl = no; then
14450
14451
14452
14453 if test $ac_cv_func_fcntl = no; then
14454 HAVE_FCNTL=0
14455 else
14456 REPLACE_FCNTL=1
14457 fi
14458
14459 else
14460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
14461$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
14462if test "${gl_cv_func_fcntl_f_dupfd_works+set}" = set; then :
0750520d 14463 $as_echo_n "(cached) " >&6
6ec2e0f5
SDJ
14464else
14465 if test "$cross_compiling" = yes; then :
14466 case $host_os in
14467 aix* | cygwin* | haiku*)
14468 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
14469 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
14470 esac
0750520d
PA
14471else
14472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14473/* end confdefs.h. */
6ec2e0f5
SDJ
14474#include <errno.h>
14475 #include <fcntl.h>
14476 #include <limits.h>
14477 #include <sys/resource.h>
14478 #include <unistd.h>
14479 #ifndef RLIM_SAVED_CUR
14480 # define RLIM_SAVED_CUR RLIM_INFINITY
14481 #endif
14482 #ifndef RLIM_SAVED_MAX
14483 # define RLIM_SAVED_MAX RLIM_INFINITY
14484 #endif
0750520d 14485
6ec2e0f5
SDJ
14486int
14487main ()
14488{
14489int result = 0;
14490 int bad_fd = INT_MAX;
14491 struct rlimit rlim;
14492 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
14493 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
14494 && rlim.rlim_cur != RLIM_INFINITY
14495 && rlim.rlim_cur != RLIM_SAVED_MAX
14496 && rlim.rlim_cur != RLIM_SAVED_CUR)
14497 bad_fd = rlim.rlim_cur;
14498 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
14499 if (errno != EINVAL) result |= 2;
14500 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
14501 if (errno != EINVAL) result |= 8;
14502 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
14503 {
14504 int fd;
14505 fd = open (".", O_RDONLY);
14506 if (fd == -1)
14507 result |= 16;
14508 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
14509 result |= 32;
14510
14511 close (fd);
14512 }
14513 return result;
14514 ;
14515 return 0;
14516}
0750520d 14517_ACEOF
6ec2e0f5
SDJ
14518if ac_fn_c_try_run "$LINENO"; then :
14519 gl_cv_func_fcntl_f_dupfd_works=yes
0750520d 14520else
6ec2e0f5
SDJ
14521 gl_cv_func_fcntl_f_dupfd_works=no
14522fi
14523rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14524 conftest.$ac_objext conftest.beam conftest.$ac_ext
0750520d 14525fi
0750520d
PA
14526
14527fi
6ec2e0f5
SDJ
14528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
14529$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
14530 case $gl_cv_func_fcntl_f_dupfd_works in
14531 *yes) ;;
14532 *)
0750520d 14533
0750520d 14534
6ec2e0f5
SDJ
14535 if test $ac_cv_func_fcntl = no; then
14536 HAVE_FCNTL=0
14537 else
14538 REPLACE_FCNTL=1
14539 fi
0750520d 14540
0750520d 14541
6ec2e0f5
SDJ
14542$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
14543 ;;
14544 esac
0750520d 14545
6ec2e0f5
SDJ
14546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
14547$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
14548if test "${gl_cv_func_fcntl_f_dupfd_cloexec+set}" = set; then :
8690e634
JK
14549 $as_echo_n "(cached) " >&6
14550else
14551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14552/* end confdefs.h. */
14553
6ec2e0f5
SDJ
14554#include <fcntl.h>
14555#ifndef F_DUPFD_CLOEXEC
14556choke me
14557#endif
49e4877c 14558
6ec2e0f5
SDJ
14559int
14560main ()
14561{
8690e634 14562
6ec2e0f5
SDJ
14563 ;
14564 return 0;
14565}
14566_ACEOF
14567if ac_fn_c_try_compile "$LINENO"; then :
14568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14569/* end confdefs.h. */
8690e634 14570
6ec2e0f5
SDJ
14571#ifdef __linux__
14572/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
14573 it to support the semantics on older kernels that failed with EINVAL. */
14574choke me
14575#endif
8690e634
JK
14576
14577int
14578main ()
14579{
14580
8690e634
JK
14581 ;
14582 return 0;
14583}
14584_ACEOF
14585if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 14586 gl_cv_func_fcntl_f_dupfd_cloexec=yes
8690e634 14587else
6ec2e0f5 14588 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
8690e634
JK
14589fi
14590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
14591else
14592 gl_cv_func_fcntl_f_dupfd_cloexec=no
8690e634 14593fi
6ec2e0f5
SDJ
14594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14595fi
14596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
14597$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
14598 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
14599
14600
14601
14602 if test $ac_cv_func_fcntl = no; then
14603 HAVE_FCNTL=0
14604 else
14605 REPLACE_FCNTL=1
14606 fi
14607
14608 fi
14609 fi
14610
14611
14612
14613
14614 if test $ac_cv_func_fchdir = no; then
14615 HAVE_FCHDIR=0
14616 fi
14617
14618 if test $HAVE_FCHDIR = 0; then
14619
14620
14621
14622 if test $ac_cv_func_fcntl = no; then
14623 HAVE_FCNTL=0
14624 else
14625 REPLACE_FCNTL=1
14626 fi
14627
14628 fi
14629
14630
14631 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
14632
14633
14634
14635
14636
14637
14638
14639
14640 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
14641
14642 fi
8690e634 14643
8690e634
JK
14644
14645
8690e634
JK
14646
14647
6ec2e0f5 14648 GNULIB_FCNTL=1
8690e634 14649
8690e634
JK
14650
14651
8690e634 14652
8690e634 14653
6ec2e0f5
SDJ
14654$as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
14655
8690e634 14656
8690e634 14657
63ce7108
TT
14658
14659
14660
14661
8690e634
JK
14662
14663
14664
14665
14666
14667
14668
14669 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 14670 gl_cv_next_fcntl_h='<'fcntl.h'>'
8690e634 14671 else
6ec2e0f5
SDJ
14672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
14673$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
14674if test "${gl_cv_next_fcntl_h+set}" = set; then :
8690e634
JK
14675 $as_echo_n "(cached) " >&6
14676else
14677
4a626d0a
PA
14678
14679
14680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 14681/* end confdefs.h. */
6ec2e0f5 14682#include <fcntl.h>
8690e634 14683_ACEOF
4a626d0a
PA
14684 case "$host_os" in
14685 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14686 *) gl_absname_cpp="$ac_cpp" ;;
14687 esac
14688
14689 case "$host_os" in
14690 mingw*)
14691 gl_dirsep_regex='[/\\]'
14692 ;;
14693 *)
14694 gl_dirsep_regex='\/'
14695 ;;
14696 esac
14697 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 14698 gl_header_literal_regex=`echo 'fcntl.h' \
4a626d0a
PA
14699 | sed -e "$gl_make_literal_regex_sed"`
14700 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14701 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14702 s|^/[^/]|//&|
14703 p
14704 q
14705 }'
8690e634 14706
6ec2e0f5 14707 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a 14708 sed -n "$gl_absolute_header_sed"`
c971b7fa 14709
6ec2e0f5
SDJ
14710 gl_header=$gl_cv_absolute_fcntl_h
14711 gl_cv_next_fcntl_h='"'$gl_header'"'
8690e634
JK
14712
14713
14714fi
6ec2e0f5
SDJ
14715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
14716$as_echo "$gl_cv_next_fcntl_h" >&6; }
8690e634 14717 fi
6ec2e0f5 14718 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
8690e634
JK
14719
14720 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14721 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 14722 gl_next_as_first_directive='<'fcntl.h'>'
8690e634
JK
14723 else
14724 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 14725 gl_next_as_first_directive=$gl_cv_next_fcntl_h
8690e634 14726 fi
6ec2e0f5 14727 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
8690e634
JK
14728
14729
14730
14731
14732
14733
6ec2e0f5
SDJ
14734
14735
14736
14737
14738 for gl_func in fcntl openat; do
8690e634
JK
14739 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
14740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
14741$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
14742if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
14743 $as_echo_n "(cached) " >&6
14744else
14745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14746/* end confdefs.h. */
6ec2e0f5 14747#include <fcntl.h>
8690e634
JK
14748
14749int
14750main ()
14751{
14752#undef $gl_func
14753 (void) $gl_func;
14754 ;
14755 return 0;
14756}
14757_ACEOF
14758if ac_fn_c_try_compile "$LINENO"; then :
14759 eval "$as_gl_Symbol=yes"
14760else
14761 eval "$as_gl_Symbol=no"
14762fi
14763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14764fi
14765eval ac_res=\$$as_gl_Symbol
14766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14767$as_echo "$ac_res" >&6; }
14768 eval as_val=\$$as_gl_Symbol
14769 if test "x$as_val" = x""yes; then :
14770 cat >>confdefs.h <<_ACEOF
14771#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
14772_ACEOF
14773
14774 eval ac_cv_have_decl_$gl_func=yes
14775fi
14776 done
14777
14778
14779
8839a007 14780
63ce7108 14781
63ce7108 14782
63ce7108 14783
6ec2e0f5
SDJ
14784 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
14785#include <dirent.h>
14786
14787"
14788if test "x$ac_cv_have_decl_fdopendir" = x""yes; then :
14789 ac_have_decl=1
14790else
14791 ac_have_decl=0
14792fi
14793
14794cat >>confdefs.h <<_ACEOF
14795#define HAVE_DECL_FDOPENDIR $ac_have_decl
63ce7108 14796_ACEOF
6ec2e0f5
SDJ
14797if test $ac_have_decl = 1; then :
14798
63ce7108 14799else
6ec2e0f5 14800 HAVE_DECL_FDOPENDIR=0
63ce7108 14801fi
63ce7108
TT
14802
14803
6ec2e0f5
SDJ
14804 if test $ac_cv_func_fdopendir = no; then
14805 HAVE_FDOPENDIR=0
14806 else
14807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
14808$as_echo_n "checking whether fdopendir works... " >&6; }
14809if test "${gl_cv_func_fdopendir_works+set}" = set; then :
14810 $as_echo_n "(cached) " >&6
14811else
14812 if test "$cross_compiling" = yes; then :
14813 case "$host_os" in
14814 # Guess yes on glibc systems.
14815 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
14816 # If we don't know, assume the worst.
14817 *) gl_cv_func_fdopendir_works="guessing no" ;;
14818 esac
14819
63ce7108
TT
14820else
14821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14822/* end confdefs.h. */
14823
6ec2e0f5
SDJ
14824#include <dirent.h>
14825#include <fcntl.h>
14826#include <unistd.h>
14827#if !HAVE_DECL_FDOPENDIR
14828extern
14829# ifdef __cplusplus
14830"C"
14831# endif
14832DIR *fdopendir (int);
14833#endif
63ce7108
TT
14834
14835int
14836main ()
14837{
6ec2e0f5
SDJ
14838int result = 0;
14839 int fd = open ("conftest.c", O_RDONLY);
14840 if (fd < 0) result |= 1;
14841 if (fdopendir (fd)) result |= 2;
14842 if (close (fd)) result |= 4;
14843 return result;
63ce7108
TT
14844 ;
14845 return 0;
14846}
14847_ACEOF
14848if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 14849 gl_cv_func_fdopendir_works=yes
63ce7108 14850else
6ec2e0f5 14851 gl_cv_func_fdopendir_works=no
63ce7108
TT
14852fi
14853rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14854 conftest.$ac_objext conftest.beam conftest.$ac_ext
14855fi
14856
63ce7108 14857fi
6ec2e0f5
SDJ
14858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
14859$as_echo "$gl_cv_func_fdopendir_works" >&6; }
14860 case "$gl_cv_func_fdopendir_works" in
63ce7108
TT
14861 *yes) ;;
14862 *)
6ec2e0f5 14863 REPLACE_FDOPENDIR=1
63ce7108
TT
14864 ;;
14865 esac
14866 fi
14867
6ec2e0f5 14868 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
09607c9e
TT
14869
14870
14871
4a626d0a
PA
14872
14873
14874
14875
14876
6ec2e0f5 14877 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
4a626d0a 14878
6ec2e0f5 14879 fi
4a626d0a
PA
14880
14881
14882
4a626d0a 14883
4a626d0a 14884
6ec2e0f5 14885 GNULIB_FDOPENDIR=1
4a626d0a
PA
14886
14887
14888
14889
14890
6ec2e0f5 14891$as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
4a626d0a
PA
14892
14893
14894
14895
14896
6ec2e0f5
SDJ
14897cat >>confdefs.h <<_ACEOF
14898#define GNULIB_FDOPENDIR 1
14899_ACEOF
4a626d0a 14900
09607c9e 14901
09607c9e
TT
14902
14903
14904
6ec2e0f5
SDJ
14905
14906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
14907$as_echo_n "checking for flexible array member... " >&6; }
14908if test "${ac_cv_c_flexmember+set}" = set; then :
09607c9e
TT
14909 $as_echo_n "(cached) " >&6
14910else
14911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14912/* end confdefs.h. */
6ec2e0f5
SDJ
14913#include <stdlib.h>
14914 #include <stdio.h>
14915 #include <stddef.h>
14916 struct s { int n; double d[]; };
09607c9e
TT
14917int
14918main ()
14919{
6ec2e0f5
SDJ
14920int m = getchar ();
14921 size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
14922 nbytes += sizeof (struct s) - 1;
14923 nbytes -= nbytes % sizeof (struct s);
14924 struct s *p = malloc (nbytes);
14925 p->d[0] = 0.0;
14926 return p->d != (double *) NULL;
09607c9e
TT
14927 ;
14928 return 0;
14929}
14930_ACEOF
14931if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 14932 ac_cv_c_flexmember=yes
09607c9e 14933else
6ec2e0f5 14934 ac_cv_c_flexmember=no
09607c9e
TT
14935fi
14936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14937fi
6ec2e0f5
SDJ
14938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
14939$as_echo "$ac_cv_c_flexmember" >&6; }
14940 if test $ac_cv_c_flexmember = yes; then
14941
14942$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
09607c9e 14943
09607c9e 14944 else
6ec2e0f5 14945 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
09607c9e 14946
6ec2e0f5
SDJ
14947 fi
14948
14949
14950
14951
14952 FLOAT_H=
14953 REPLACE_FLOAT_LDBL=0
14954 case "$host_os" in
14955 aix* | beos* | openbsd* | mirbsd* | irix*)
14956 FLOAT_H=float.h
14957 ;;
14958 freebsd*)
14959 case "$host_cpu" in
14960 i[34567]86 )
14961 FLOAT_H=float.h
14962 ;;
14963 x86_64 )
14964 # On x86_64 systems, the C compiler may still be generating
14965 # 32-bit code.
14966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14967/* end confdefs.h. */
14968#if defined __LP64__ || defined __x86_64__ || defined __amd64__
14969 yes
14970 #endif
09607c9e 14971_ACEOF
6ec2e0f5
SDJ
14972if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14973 $EGREP "yes" >/dev/null 2>&1; then :
14974
09607c9e 14975else
6ec2e0f5 14976 FLOAT_H=float.h
09607c9e 14977fi
6ec2e0f5
SDJ
14978rm -f conftest*
14979
14980 ;;
14981 esac
14982 ;;
14983 linux*)
14984 case "$host_cpu" in
14985 powerpc*)
14986 FLOAT_H=float.h
14987 ;;
14988 esac
14989 ;;
14990 esac
14991 case "$host_os" in
14992 aix* | freebsd* | linux*)
14993 if test -n "$FLOAT_H"; then
14994 REPLACE_FLOAT_LDBL=1
14995 fi
14996 ;;
14997 esac
14998
14999 REPLACE_ITOLD=0
15000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
15001$as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
15002if test "${gl_cv_func_itold_works+set}" = set; then :
09607c9e
TT
15003 $as_echo_n "(cached) " >&6
15004else
09607c9e 15005
6ec2e0f5
SDJ
15006 if test "$cross_compiling" = yes; then :
15007 case "$host" in
15008 sparc*-*-linux*)
15009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15010/* end confdefs.h. */
15011#if defined __LP64__ || defined __arch64__
15012 yes
15013 #endif
09607c9e 15014_ACEOF
6ec2e0f5
SDJ
15015if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15016 $EGREP "yes" >/dev/null 2>&1; then :
15017 gl_cv_func_itold_works="guessing no"
09607c9e 15018else
6ec2e0f5 15019 gl_cv_func_itold_works="guessing yes"
09607c9e 15020fi
6ec2e0f5
SDJ
15021rm -f conftest*
15022
15023 ;;
15024 *) gl_cv_func_itold_works="guessing yes" ;;
15025 esac
15026
4a626d0a
PA
15027else
15028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15029/* end confdefs.h. */
4a626d0a 15030
6ec2e0f5
SDJ
15031int i = -1;
15032volatile long double ld;
15033int main ()
4a626d0a 15034{
6ec2e0f5
SDJ
15035 ld += i * 1.0L;
15036 if (ld > 0)
15037 return 1;
4a626d0a
PA
15038 return 0;
15039}
15040_ACEOF
6ec2e0f5
SDJ
15041if ac_fn_c_try_run "$LINENO"; then :
15042 gl_cv_func_itold_works=yes
4a626d0a 15043else
6ec2e0f5
SDJ
15044 gl_cv_func_itold_works=no
15045fi
15046rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15047 conftest.$ac_objext conftest.beam conftest.$ac_ext
15048fi
09607c9e
TT
15049
15050
6ec2e0f5
SDJ
15051fi
15052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
15053$as_echo "$gl_cv_func_itold_works" >&6; }
15054 case "$gl_cv_func_itold_works" in
15055 *no)
15056 REPLACE_ITOLD=1
15057 FLOAT_H=float.h
15058 ;;
15059 esac
09607c9e 15060
6ec2e0f5 15061 if test -n "$FLOAT_H"; then
09607c9e
TT
15062
15063
15064
15065
15066
15067
15068
4a626d0a 15069
09607c9e 15070 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 15071 gl_cv_next_float_h='<'float.h'>'
09607c9e 15072 else
6ec2e0f5
SDJ
15073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
15074$as_echo_n "checking absolute name of <float.h>... " >&6; }
15075if test "${gl_cv_next_float_h+set}" = set; then :
09607c9e
TT
15076 $as_echo_n "(cached) " >&6
15077else
15078
4a626d0a
PA
15079
15080
15081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
09607c9e 15082/* end confdefs.h. */
6ec2e0f5 15083#include <float.h>
09607c9e 15084_ACEOF
4a626d0a
PA
15085 case "$host_os" in
15086 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15087 *) gl_absname_cpp="$ac_cpp" ;;
15088 esac
15089
15090 case "$host_os" in
15091 mingw*)
15092 gl_dirsep_regex='[/\\]'
15093 ;;
15094 *)
15095 gl_dirsep_regex='\/'
15096 ;;
15097 esac
15098 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 15099 gl_header_literal_regex=`echo 'float.h' \
4a626d0a
PA
15100 | sed -e "$gl_make_literal_regex_sed"`
15101 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15102 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15103 s|^/[^/]|//&|
15104 p
15105 q
15106 }'
09607c9e 15107
6ec2e0f5 15108 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a 15109 sed -n "$gl_absolute_header_sed"`
09607c9e 15110
6ec2e0f5
SDJ
15111 gl_header=$gl_cv_absolute_float_h
15112 gl_cv_next_float_h='"'$gl_header'"'
09607c9e
TT
15113
15114
15115fi
6ec2e0f5
SDJ
15116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
15117$as_echo "$gl_cv_next_float_h" >&6; }
09607c9e 15118 fi
6ec2e0f5 15119 NEXT_FLOAT_H=$gl_cv_next_float_h
09607c9e
TT
15120
15121 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15122 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 15123 gl_next_as_first_directive='<'float.h'>'
09607c9e
TT
15124 else
15125 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 15126 gl_next_as_first_directive=$gl_cv_next_float_h
09607c9e 15127 fi
6ec2e0f5 15128 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
09607c9e
TT
15129
15130
15131
15132
6ec2e0f5 15133 fi
09607c9e 15134
6ec2e0f5
SDJ
15135 if test -n "$FLOAT_H"; then
15136 GL_GENERATE_FLOAT_H_TRUE=
15137 GL_GENERATE_FLOAT_H_FALSE='#'
3d99e817 15138else
6ec2e0f5
SDJ
15139 GL_GENERATE_FLOAT_H_TRUE='#'
15140 GL_GENERATE_FLOAT_H_FALSE=
3d99e817
AK
15141fi
15142
3d99e817 15143
09607c9e 15144
6ec2e0f5 15145 if test $REPLACE_FLOAT_LDBL = 1; then
8690e634 15146
8690e634 15147
8690e634 15148
8690e634 15149
8690e634 15150
6ec2e0f5
SDJ
15151
15152
15153
15154 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
15155
8690e634 15156 fi
6ec2e0f5 15157 if test $REPLACE_ITOLD = 1; then
8690e634
JK
15158
15159
15160
15161
15162
6ec2e0f5
SDJ
15163
15164
15165
15166 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
15167
8690e634
JK
15168 fi
15169
15170
15171
6ec2e0f5
SDJ
15172
15173
15174 FNMATCH_H=
15175 gl_fnmatch_required_lowercase=`
15176 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
15177 `
15178 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
15179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
15180$as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
15181if { as_var=$gl_fnmatch_cache_var; eval "test \"\${$as_var+set}\" = set"; }; then :
8690e634 15182 $as_echo_n "(cached) " >&6
6ec2e0f5
SDJ
15183else
15184 if test $gl_fnmatch_required = GNU; then
15185 gl_fnmatch_gnu_start=
15186 gl_fnmatch_gnu_end=
15187 else
15188 gl_fnmatch_gnu_start='#if 0'
15189 gl_fnmatch_gnu_end='#endif'
15190 fi
15191 if test "$cross_compiling" = yes; then :
15192 eval "$gl_fnmatch_cache_var=\"guessing no\""
8690e634
JK
15193else
15194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15195/* end confdefs.h. */
6ec2e0f5
SDJ
15196#include <fnmatch.h>
15197 static int
15198 y (char const *pattern, char const *string, int flags)
15199 {
15200 return fnmatch (pattern, string, flags) == 0;
15201 }
15202 static int
15203 n (char const *pattern, char const *string, int flags)
15204 {
15205 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
15206 }
8690e634 15207
8690e634
JK
15208int
15209main ()
15210{
6ec2e0f5
SDJ
15211char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
15212 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
15213 static char const A_1[] = { 'A' - 1, 0 };
15214 static char const A01[] = { 'A' + 1, 0 };
15215 static char const a_1[] = { 'a' - 1, 0 };
15216 static char const a01[] = { 'a' + 1, 0 };
15217 static char const bs_1[] = { '\\\\' - 1, 0 };
15218 static char const bs01[] = { '\\\\' + 1, 0 };
15219 int result = 0;
15220 if (!n ("a*", "", 0))
15221 return 1;
15222 if (!y ("a*", "abc", 0))
15223 return 1;
15224 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
15225 return 1;
15226 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
15227 return 2;
15228 if (!y ("a\\\\bc", "abc", 0))
15229 return 3;
15230 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
15231 return 3;
15232 if (!y ("*x", ".x", 0))
15233 return 4;
15234 if (!n ("*x", ".x", FNM_PERIOD))
15235 return 4;
15236 if (!y (Apat, "\\\\", 0))
15237 return 5;
15238 if (!y (Apat, "A", 0))
15239 return 5;
15240 if (!y (apat, "\\\\", 0))
15241 return 5;
15242 if (!y (apat, "a", 0))
15243 return 5;
15244 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
15245 return 5;
15246 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
15247 return 5;
15248 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
15249 return 5;
15250 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
15251 return 5;
15252 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
15253 return 5;
15254 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
15255 return 5;
15256 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
15257 return 5;
15258 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
15259 return 5;
15260 $gl_fnmatch_gnu_start
15261 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
15262 result |= 8;
15263 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
15264 result |= 16;
15265 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
15266 result |= 32;
15267 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
15268 result |= 64;
15269 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
15270 result |= 64;
15271 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
15272 result |= 64;
15273 $gl_fnmatch_gnu_end
15274 return result;
8690e634
JK
15275
15276 ;
15277 return 0;
15278}
15279_ACEOF
6ec2e0f5
SDJ
15280if ac_fn_c_try_run "$LINENO"; then :
15281 eval "$gl_fnmatch_cache_var=yes"
8690e634 15282else
6ec2e0f5 15283 eval "$gl_fnmatch_cache_var=no"
8690e634 15284fi
6ec2e0f5
SDJ
15285rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15286 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 15287fi
8690e634 15288
8690e634 15289
6ec2e0f5
SDJ
15290fi
15291eval ac_res=\$$gl_fnmatch_cache_var
15292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15293$as_echo "$ac_res" >&6; }
15294 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
15295 if test "$gl_fnmatch_result" = yes; then
15296 rm -f "$gl_source_base/fnmatch.h"
15297 else
15298 FNMATCH_H=fnmatch.h
8690e634
JK
15299 fi
15300
6ec2e0f5
SDJ
15301 if test -n "$FNMATCH_H"; then
15302 GL_GENERATE_FNMATCH_H_TRUE=
15303 GL_GENERATE_FNMATCH_H_FALSE='#'
15304else
15305 GL_GENERATE_FNMATCH_H_TRUE='#'
15306 GL_GENERATE_FNMATCH_H_FALSE=
15307fi
8690e634 15308
8690e634 15309
6ec2e0f5 15310 if test -n "$FNMATCH_H"; then
8690e634
JK
15311
15312
15313
6ec2e0f5
SDJ
15314
15315
15316
15317
15318
15319 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
15320
15321
15322
15323cat >>confdefs.h <<_ACEOF
15324#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
15325_ACEOF
15326
15327
15328 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
15329"
15330if test "x$ac_cv_have_decl_isblank" = x""yes; then :
15331 ac_have_decl=1
8690e634 15332else
6ec2e0f5 15333 ac_have_decl=0
8690e634
JK
15334fi
15335
6ec2e0f5
SDJ
15336cat >>confdefs.h <<_ACEOF
15337#define HAVE_DECL_ISBLANK $ac_have_decl
15338_ACEOF
8690e634
JK
15339
15340
15341
15342
6ec2e0f5 15343 fi
8690e634
JK
15344
15345
15346
15347
15348
6ec2e0f5 15349 if test -n "$FNMATCH_H"; then
8690e634
JK
15350
15351
8690e634 15352
8690e634 15353
8690e634 15354
8690e634 15355
8690e634
JK
15356
15357
6ec2e0f5 15358 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
8690e634 15359
8690e634 15360
8690e634 15361
6ec2e0f5
SDJ
15362cat >>confdefs.h <<_ACEOF
15363#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
15364_ACEOF
15365
15366
15367 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
15368"
15369if test "x$ac_cv_have_decl_isblank" = x""yes; then :
15370 ac_have_decl=1
8690e634 15371else
6ec2e0f5 15372 ac_have_decl=0
8690e634
JK
15373fi
15374
6ec2e0f5
SDJ
15375cat >>confdefs.h <<_ACEOF
15376#define HAVE_DECL_ISBLANK $ac_have_decl
15377_ACEOF
8690e634
JK
15378
15379
98399780
YQ
15380
15381
98399780
YQ
15382 fi
15383
98399780
YQ
15384
15385
6ec2e0f5
SDJ
15386 FREXP_LIBM=
15387 if test $gl_cv_func_frexp_no_libm = no; then
15388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5
15389$as_echo_n "checking whether frexp() can be used with libm... " >&6; }
15390if test "${gl_cv_func_frexp_in_libm+set}" = set; then :
15391 $as_echo_n "(cached) " >&6
15392else
98399780 15393
6ec2e0f5
SDJ
15394 save_LIBS="$LIBS"
15395 LIBS="$LIBS -lm"
15396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15397/* end confdefs.h. */
15398#include <math.h>
15399 double x;
15400int
15401main ()
15402{
15403int e; return frexp (x, &e) > 0;
15404 ;
15405 return 0;
15406}
15407_ACEOF
15408if ac_fn_c_try_link "$LINENO"; then :
15409 gl_cv_func_frexp_in_libm=yes
15410else
15411 gl_cv_func_frexp_in_libm=no
15412fi
15413rm -f core conftest.err conftest.$ac_objext \
15414 conftest$ac_exeext conftest.$ac_ext
15415 LIBS="$save_LIBS"
98399780 15416
6ec2e0f5
SDJ
15417fi
15418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5
15419$as_echo "$gl_cv_func_frexp_in_libm" >&6; }
15420 if test $gl_cv_func_frexp_in_libm = yes; then
15421 FREXP_LIBM=-lm
15422 fi
15423 fi
15424 if test $gl_cv_func_frexp_no_libm = yes \
15425 || test $gl_cv_func_frexp_in_libm = yes; then
15426 save_LIBS="$LIBS"
15427 LIBS="$LIBS $FREXP_LIBM"
98399780
YQ
15428
15429
15430
6ec2e0f5
SDJ
15431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
15432$as_echo_n "checking whether frexp works... " >&6; }
15433if test "${gl_cv_func_frexp_works+set}" = set; then :
15434 $as_echo_n "(cached) " >&6
15435else
98399780 15436
6ec2e0f5
SDJ
15437 if test "$cross_compiling" = yes; then :
15438 case "$host_os" in
15439 netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
15440 *) gl_cv_func_frexp_works="guessing yes";;
15441 esac
98399780 15442
6ec2e0f5
SDJ
15443else
15444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15445/* end confdefs.h. */
98399780 15446
6ec2e0f5
SDJ
15447#include <float.h>
15448#include <math.h>
15449#include <string.h>
15450#if HAVE_DECL_ALARM
15451# include <signal.h>
15452# include <unistd.h>
15453#endif
15454/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
15455 ICC 10.0 has a bug when optimizing the expression -zero.
15456 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
15457 to PowerPC on Mac OS X 10.5. */
15458#if defined __hpux || defined __sgi || defined __ICC
15459static double
15460compute_minus_zero (void)
15461{
15462 return -DBL_MIN * DBL_MIN;
15463}
15464# define minus_zero compute_minus_zero ()
15465#else
15466double minus_zero = -0.0;
15467#endif
15468int main()
15469{
15470 int result = 0;
15471 int i;
15472 volatile double x;
15473 double zero = 0.0;
15474#if HAVE_DECL_ALARM
15475 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
15476 number. Let the test fail in this case. */
15477 signal (SIGALRM, SIG_DFL);
15478 alarm (5);
15479#endif
15480 /* Test on denormalized numbers. */
15481 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
15482 ;
15483 if (x > 0.0)
15484 {
15485 int exp;
15486 double y = frexp (x, &exp);
15487 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
15488 On NetBSD: y = 0.75. Correct: y = 0.5. */
15489 if (y != 0.5)
15490 result |= 1;
15491 }
15492 /* Test on infinite numbers. */
15493 x = 1.0 / zero;
15494 {
15495 int exp;
15496 double y = frexp (x, &exp);
15497 if (y != x)
15498 result |= 2;
15499 }
15500 /* Test on negative zero. */
15501 x = minus_zero;
15502 {
15503 int exp;
15504 double y = frexp (x, &exp);
15505 if (memcmp (&y, &x, sizeof x))
15506 result |= 4;
15507 }
15508 return result;
15509}
98399780 15510_ACEOF
6ec2e0f5
SDJ
15511if ac_fn_c_try_run "$LINENO"; then :
15512 gl_cv_func_frexp_works=yes
15513else
15514 gl_cv_func_frexp_works=no
15515fi
15516rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15517 conftest.$ac_objext conftest.beam conftest.$ac_ext
15518fi
98399780
YQ
15519
15520
6ec2e0f5
SDJ
15521fi
15522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
15523$as_echo "$gl_cv_func_frexp_works" >&6; }
98399780 15524
6ec2e0f5
SDJ
15525 LIBS="$save_LIBS"
15526 case "$gl_cv_func_frexp_works" in
15527 *yes) gl_func_frexp=yes ;;
15528 *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;;
15529 esac
15530 else
15531 gl_func_frexp=no
15532 fi
15533 if test $gl_func_frexp = yes; then
98399780 15534
6ec2e0f5 15535$as_echo "#define HAVE_FREXP 1" >>confdefs.h
98399780 15536
6ec2e0f5 15537 fi
98399780
YQ
15538
15539
6ec2e0f5 15540 if test $gl_func_frexp != yes; then
6a29c58e
YQ
15541
15542
15543
15544
6a29c58e
YQ
15545
15546
15547
15548
6ec2e0f5 15549 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
8690e634
JK
15550
15551 fi
8690e634 15552
8690e634 15553
8690e634 15554
8690e634 15555
8690e634 15556
6ec2e0f5 15557 GNULIB_FREXP=1
8690e634 15558
8690e634 15559
4a626d0a 15560
8690e634 15561
8690e634 15562
6ec2e0f5 15563$as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
8690e634
JK
15564
15565
15566
15567
15568
63ce7108 15569
e26b6bb0
TT
15570
15571
15572
6ec2e0f5
SDJ
15573 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
15574"
15575if test "x$ac_cv_have_decl_frexpl" = x""yes; then :
e26b6bb0 15576
6ec2e0f5
SDJ
15577else
15578 HAVE_DECL_FREXPL=0
15579fi
e26b6bb0
TT
15580
15581
6ec2e0f5
SDJ
15582 FREXPL_LIBM=
15583 if test $HAVE_DECL_FREXPL = 1; then
e26b6bb0 15584
6ec2e0f5
SDJ
15585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
15586$as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
15587if test "${gl_cv_func_frexpl_no_libm+set}" = set; then :
e26b6bb0
TT
15588 $as_echo_n "(cached) " >&6
15589else
15590
6ec2e0f5 15591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e26b6bb0 15592/* end confdefs.h. */
6ec2e0f5
SDJ
15593#include <math.h>
15594 long double x;
15595int
15596main ()
15597{
15598int e; return frexpl (x, &e) > 0;
15599 ;
15600 return 0;
15601}
e26b6bb0 15602_ACEOF
6ec2e0f5
SDJ
15603if ac_fn_c_try_link "$LINENO"; then :
15604 gl_cv_func_frexpl_no_libm=yes
15605else
15606 gl_cv_func_frexpl_no_libm=no
e26b6bb0 15607fi
6ec2e0f5
SDJ
15608rm -f core conftest.err conftest.$ac_objext \
15609 conftest$ac_exeext conftest.$ac_ext
e26b6bb0 15610
6ec2e0f5
SDJ
15611fi
15612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
15613$as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
e26b6bb0 15614
6ec2e0f5
SDJ
15615 if test $gl_cv_func_frexpl_no_libm = no; then
15616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5
15617$as_echo_n "checking whether frexpl() can be used with libm... " >&6; }
15618if test "${gl_cv_func_frexpl_in_libm+set}" = set; then :
e26b6bb0
TT
15619 $as_echo_n "(cached) " >&6
15620else
e26b6bb0 15621
6ec2e0f5
SDJ
15622 save_LIBS="$LIBS"
15623 LIBS="$LIBS -lm"
15624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15625/* end confdefs.h. */
15626#include <math.h>
15627 long double x;
e26b6bb0
TT
15628int
15629main ()
15630{
6ec2e0f5 15631int e; return frexpl (x, &e) > 0;
e26b6bb0
TT
15632 ;
15633 return 0;
15634}
15635_ACEOF
6ec2e0f5
SDJ
15636if ac_fn_c_try_link "$LINENO"; then :
15637 gl_cv_func_frexpl_in_libm=yes
e26b6bb0 15638else
6ec2e0f5 15639 gl_cv_func_frexpl_in_libm=no
e26b6bb0 15640fi
6ec2e0f5
SDJ
15641rm -f core conftest.err conftest.$ac_objext \
15642 conftest$ac_exeext conftest.$ac_ext
15643 LIBS="$save_LIBS"
e26b6bb0 15644
e26b6bb0 15645fi
6ec2e0f5
SDJ
15646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5
15647$as_echo "$gl_cv_func_frexpl_in_libm" >&6; }
15648 if test $gl_cv_func_frexpl_in_libm = yes; then
15649 FREXPL_LIBM=-lm
15650 fi
15651 fi
15652 if test $gl_cv_func_frexpl_no_libm = yes \
15653 || test $gl_cv_func_frexpl_in_libm = yes; then
15654 save_LIBS="$LIBS"
15655 LIBS="$LIBS $FREXPL_LIBM"
18848e28 15656
18848e28 15657
6ec2e0f5
SDJ
15658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
15659$as_echo_n "checking whether frexpl works... " >&6; }
15660if test "${gl_cv_func_frexpl_works+set}" = set; then :
15661 $as_echo_n "(cached) " >&6
18848e28 15662else
18848e28 15663
6ec2e0f5 15664 if test "$cross_compiling" = yes; then :
18848e28 15665
6ec2e0f5
SDJ
15666 case "$host_os" in
15667 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
15668 gl_cv_func_frexpl_works="guessing no";;
15669 *) gl_cv_func_frexpl_works="guessing yes";;
15670 esac
18848e28 15671
18848e28
GF
15672else
15673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15674/* end confdefs.h. */
15675
6ec2e0f5
SDJ
15676#include <float.h>
15677#include <math.h>
15678/* Override the values of <float.h>, like done in float.in.h. */
15679#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
15680# undef LDBL_MIN_EXP
15681# define LDBL_MIN_EXP (-16381)
15682#endif
15683#if defined __i386__ && defined __FreeBSD__
15684# undef LDBL_MIN_EXP
15685# define LDBL_MIN_EXP (-16381)
15686#endif
15687#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
15688# undef LDBL_MIN_EXP
15689# define LDBL_MIN_EXP DBL_MIN_EXP
18848e28 15690#endif
6ec2e0f5
SDJ
15691#if defined __sgi && (LDBL_MANT_DIG >= 106)
15692# if defined __GNUC__
15693# undef LDBL_MIN_EXP
15694# define LDBL_MIN_EXP DBL_MIN_EXP
15695# endif
15696#endif
15697extern
15698#ifdef __cplusplus
15699"C"
15700#endif
15701long double frexpl (long double, int *);
15702int main()
15703{
15704 int result = 0;
15705 volatile long double x;
15706 /* Test on finite numbers that fails on AIX 5.1. */
15707 x = 16.0L;
15708 {
15709 int exp = -9999;
15710 frexpl (x, &exp);
15711 if (exp != 5)
15712 result |= 1;
15713 }
15714 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
15715 function returns an invalid (incorrectly normalized) value: it returns
15716 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
15717 but the correct result is
15718 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
15719 x = 1.01L;
15720 {
15721 int exp = -9999;
15722 long double y = frexpl (x, &exp);
15723 if (!(exp == 1 && y == 0.505L))
15724 result |= 2;
15725 }
15726 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
15727 LDBL_MAX_EXP = 16384.
15728 In the loop end test, we test x against Infinity, rather than comparing
15729 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
15730 {
15731 int i;
15732 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
15733 {
15734 int exp = -9999;
15735 frexpl (x, &exp);
15736 if (exp != i)
15737 {
15738 result |= 4;
15739 break;
15740 }
15741 }
15742 }
15743 /* Test on denormalized numbers. */
15744 {
15745 int i;
15746 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
15747 ;
15748 if (x > 0.0L)
15749 {
15750 int exp;
15751 long double y = frexpl (x, &exp);
15752 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
15753 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
15754 if (exp != LDBL_MIN_EXP - 1)
15755 result |= 8;
15756 }
15757 }
15758 /* Test on infinite numbers. */
15759 x = 1.0L / 0.0L;
15760 {
15761 int exp;
15762 long double y = frexpl (x, &exp);
15763 if (y != x)
15764 result |= 16;
15765 }
15766 return result;
15767}
18848e28 15768_ACEOF
6ec2e0f5
SDJ
15769if ac_fn_c_try_run "$LINENO"; then :
15770 gl_cv_func_frexpl_works=yes
18848e28 15771else
6ec2e0f5 15772 gl_cv_func_frexpl_works=no
18848e28 15773fi
6ec2e0f5
SDJ
15774rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15775 conftest.$ac_objext conftest.beam conftest.$ac_ext
18848e28 15776fi
18848e28
GF
15777
15778
6ec2e0f5
SDJ
15779fi
15780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
15781$as_echo "$gl_cv_func_frexpl_works" >&6; }
18848e28 15782
6ec2e0f5
SDJ
15783 LIBS="$save_LIBS"
15784 case "$gl_cv_func_frexpl_works" in
15785 *yes) gl_func_frexpl=yes ;;
15786 *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;;
15787 esac
15788 else
15789 gl_func_frexpl=no
15790 fi
15791 if test $gl_func_frexpl = yes; then
18848e28 15792
6ec2e0f5 15793$as_echo "#define HAVE_FREXPL 1" >>confdefs.h
18848e28 15794
6ec2e0f5
SDJ
15795 fi
15796 fi
15797 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
15798 if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
18848e28 15799
6ec2e0f5
SDJ
15800 FREXPL_LIBM="$FREXP_LIBM"
15801 else
15802 FREXPL_LIBM=
15803 fi
15804 fi
18848e28 15805
18848e28 15806
6ec2e0f5 15807 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
18848e28 15808
18848e28 15809
18848e28 15810
18848e28
GF
15811
15812
18848e28 15813
18848e28 15814
18848e28 15815
6ec2e0f5 15816 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
18848e28
GF
15817
15818 fi
15819
15820
15821
15822
15823
6ec2e0f5 15824 GNULIB_FREXPL=1
18848e28
GF
15825
15826
15827
15828
15829
6ec2e0f5 15830$as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
18848e28
GF
15831
15832
15833
15834
15835
15836
15837
6ec2e0f5
SDJ
15838 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
15839 REPLACE_FSTAT=1
15840 fi
15841
15842
15843 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
15844 REPLACE_FSTAT=1
15845 fi
18848e28 15846
6a29c58e 15847
6a29c58e 15848
6a29c58e 15849
6ec2e0f5
SDJ
15850
15851 if test $ac_cv_func_fchdir = no; then
15852 HAVE_FCHDIR=0
6a29c58e
YQ
15853 fi
15854
6ec2e0f5
SDJ
15855 if test $HAVE_FCHDIR = 0; then
15856 case "$gl_cv_func_open_directory_works" in
15857 *yes) ;;
15858 *)
15859 REPLACE_FSTAT=1
15860 ;;
15861 esac
15862 fi
6a29c58e
YQ
15863
15864
6ec2e0f5 15865 if test $REPLACE_FSTAT = 1; then
6a29c58e 15866
3d99e817
AK
15867
15868
15869
3d99e817
AK
15870
15871
15872
15873
6ec2e0f5 15874 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
3d99e817 15875
6ec2e0f5
SDJ
15876 :
15877 fi
3d99e817
AK
15878
15879
15880
15881
15882
6ec2e0f5 15883 GNULIB_FSTAT=1
3d99e817 15884
49e4877c 15885
49e4877c 15886
49e4877c 15887
49e4877c 15888
6ec2e0f5 15889$as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
49e4877c 15890
6a29c58e
YQ
15891
15892
88b48903 15893
8690e634 15894
a512b375 15895
88b48903 15896
88b48903 15897
6ec2e0f5
SDJ
15898
15899 if test $ac_cv_func_fstatat = no; then
15900 HAVE_FSTATAT=0
15901 else
15902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
15903$as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
15904if test "${gl_cv_func_fstatat_zero_flag+set}" = set; then :
15905 $as_echo_n "(cached) " >&6
15906else
15907 if test "$cross_compiling" = yes; then :
15908 case "$host_os" in
15909 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
15910 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
15911 esac
88b48903 15912
8690e634
JK
15913else
15914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15915/* end confdefs.h. */
8690e634 15916
6ec2e0f5
SDJ
15917 #include <fcntl.h>
15918 #include <sys/stat.h>
15919 int
15920 main (void)
15921 {
15922 struct stat a;
15923 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
15924 }
15925
88b48903
WN
15926_ACEOF
15927if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 15928 gl_cv_func_fstatat_zero_flag=yes
88b48903 15929else
6ec2e0f5 15930 gl_cv_func_fstatat_zero_flag=no
88b48903
WN
15931fi
15932rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15933 conftest.$ac_objext conftest.beam conftest.$ac_ext
15934fi
15935
15936
15937fi
6ec2e0f5
SDJ
15938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
15939$as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
88b48903 15940
6ec2e0f5
SDJ
15941 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
15942 *yes+*yes) ;;
15943 *) REPLACE_FSTATAT=1
15944 case $gl_cv_func_fstatat_zero_flag in
15945 *yes)
88b48903 15946
6ec2e0f5 15947$as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
88b48903 15948
6ec2e0f5
SDJ
15949 ;;
15950 esac
15951 ;;
15952 esac
15953 fi
88b48903 15954
6ec2e0f5 15955 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
88b48903
WN
15956
15957
15958
15959
15960
88b48903 15961
4a626d0a
PA
15962
15963
6ec2e0f5
SDJ
15964 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
15965
15966 fi
15967
15968
15969
4a626d0a 15970
6ec2e0f5
SDJ
15971
15972 GNULIB_FSTATAT=1
15973
15974
15975
15976
15977
15978$as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
15979
15980
15981
15982
15983
15984
15985
15986
15987 gl_abort_bug=no
4a626d0a
PA
15988 case "$host_os" in
15989 mingw*)
6ec2e0f5 15990 gl_cv_func_getcwd_path_max=yes
4a626d0a
PA
15991 ;;
15992 *)
88b48903 15993
88b48903 15994
88b48903
WN
15995
15996
88b48903 15997
6ec2e0f5
SDJ
15998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
15999$as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
16000if test "${gl_cv_func_getcwd_path_max+set}" = set; then :
16001 $as_echo_n "(cached) " >&6
16002else
16003 # Arrange for deletion of the temporary directory this test creates.
16004 ac_clean_files="$ac_clean_files confdir3"
16005 if test "$cross_compiling" = yes; then :
16006 case "$host_os" in
16007 aix*) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
16008 *) gl_cv_func_getcwd_path_max=no;;
16009 esac
16010else
16011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16012/* end confdefs.h. */
88b48903 16013
6ec2e0f5
SDJ
16014#include <errno.h>
16015#include <stdlib.h>
16016#if HAVE_UNISTD_H
16017# include <unistd.h>
16018#else
16019# include <direct.h>
16020#endif
16021#include <string.h>
16022#include <limits.h>
16023#include <sys/stat.h>
16024#include <sys/types.h>
16025#include <fcntl.h>
88b48903
WN
16026
16027
6ec2e0f5
SDJ
16028/* Arrange to define PATH_MAX, like "pathmax.h" does. */
16029#if HAVE_UNISTD_H
16030# include <unistd.h>
16031#endif
16032#include <limits.h>
16033#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
16034# include <sys/param.h>
16035#endif
16036#if !defined PATH_MAX && defined MAXPATHLEN
16037# define PATH_MAX MAXPATHLEN
16038#endif
16039#ifdef __hpux
16040# undef PATH_MAX
16041# define PATH_MAX 1024
16042#endif
16043#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
16044# undef PATH_MAX
16045# define PATH_MAX 260
16046#endif
88b48903 16047
88b48903 16048
6ec2e0f5
SDJ
16049#ifndef AT_FDCWD
16050# define AT_FDCWD 0
16051#endif
16052#ifdef ENAMETOOLONG
16053# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
16054#else
16055# define is_ENAMETOOLONG(x) 0
16056#endif
88b48903 16057
6ec2e0f5
SDJ
16058/* Use the getcwd function, not any macro. */
16059#undef getcwd
88b48903 16060
6ec2e0f5
SDJ
16061/* Don't get link errors because mkdir is redefined to rpl_mkdir. */
16062#undef mkdir
88b48903 16063
6ec2e0f5
SDJ
16064#ifndef S_IRWXU
16065# define S_IRWXU 0700
16066#endif
88b48903 16067
6ec2e0f5
SDJ
16068/* The length of this name must be 8. */
16069#define DIR_NAME "confdir3"
16070#define DIR_NAME_LEN 8
16071#define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
88b48903 16072
6ec2e0f5
SDJ
16073/* The length of "../". */
16074#define DOTDOTSLASH_LEN 3
88b48903 16075
6ec2e0f5
SDJ
16076/* Leftover bytes in the buffer, to work around library or OS bugs. */
16077#define BUF_SLOP 20
88b48903 16078
6ec2e0f5
SDJ
16079int
16080main ()
16081{
16082#ifndef PATH_MAX
16083 /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
16084 at least not on a local file system. And if we were to start worrying
16085 about remote file systems, we'd have to enable the wrapper function
16086 all of the time, just to be safe. That's not worth the cost. */
16087 exit (0);
16088#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
16089 - DIR_NAME_SIZE - BUF_SLOP) \
16090 <= PATH_MAX)
16091 /* FIXME: Assuming there's a system for which this is true,
16092 this should be done in a compile test. */
16093 exit (0);
16094#else
16095 char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
16096 + DIR_NAME_SIZE + BUF_SLOP];
16097 char *cwd = getcwd (buf, PATH_MAX);
16098 size_t initial_cwd_len;
16099 size_t cwd_len;
16100 int fail = 0;
16101 size_t n_chdirs = 0;
88b48903 16102
6ec2e0f5
SDJ
16103 if (cwd == NULL)
16104 exit (10);
88b48903 16105
6ec2e0f5 16106 cwd_len = initial_cwd_len = strlen (cwd);
88b48903 16107
6ec2e0f5
SDJ
16108 while (1)
16109 {
16110 size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
16111 char *c = NULL;
16112
16113 cwd_len += DIR_NAME_SIZE;
16114 /* If mkdir or chdir fails, it could be that this system cannot create
16115 any file with an absolute name longer than PATH_MAX, such as cygwin.
16116 If so, leave fail as 0, because the current working directory can't
16117 be too long for getcwd if it can't even be created. For other
16118 errors, be pessimistic and consider that as a failure, too. */
16119 if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
16120 {
16121 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
16122 fail = 20;
16123 break;
16124 }
88b48903 16125
6ec2e0f5
SDJ
16126 if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
16127 {
16128 struct stat sb;
88b48903 16129
6ec2e0f5
SDJ
16130 c = getcwd (buf, PATH_MAX);
16131 if (!c && errno == ENOENT)
16132 {
16133 fail = 11;
16134 break;
16135 }
16136 if (c)
16137 {
16138 fail = 31;
16139 break;
16140 }
16141 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
16142 {
16143 fail = 21;
16144 break;
16145 }
88b48903 16146
6ec2e0f5
SDJ
16147 /* Our replacement needs to be able to stat() long ../../paths,
16148 so generate a path larger than PATH_MAX to check,
16149 avoiding the replacement if we can't stat(). */
16150 c = getcwd (buf, cwd_len + 1);
16151 if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno))
16152 {
16153 fail = 32;
16154 break;
16155 }
16156 }
88b48903 16157
6ec2e0f5
SDJ
16158 if (dotdot_max <= cwd_len - initial_cwd_len)
16159 {
16160 if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
16161 break;
16162 c = getcwd (buf, cwd_len + 1);
16163 if (!c)
16164 {
16165 if (! (errno == ERANGE || errno == ENOENT
16166 || is_ENAMETOOLONG (errno)))
16167 {
16168 fail = 22;
16169 break;
16170 }
16171 if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
16172 {
16173 fail = 12;
16174 break;
16175 }
16176 }
16177 }
88b48903 16178
6ec2e0f5
SDJ
16179 if (c && strlen (c) != cwd_len)
16180 {
16181 fail = 23;
16182 break;
16183 }
16184 ++n_chdirs;
16185 }
88b48903 16186
6ec2e0f5
SDJ
16187 /* Leaving behind such a deep directory is not polite.
16188 So clean up here, right away, even though the driving
16189 shell script would also clean up. */
16190 {
16191 size_t i;
88b48903 16192
6ec2e0f5
SDJ
16193 /* Try rmdir first, in case the chdir failed. */
16194 rmdir (DIR_NAME);
16195 for (i = 0; i <= n_chdirs; i++)
16196 {
16197 if (chdir ("..") < 0)
16198 break;
16199 if (rmdir (DIR_NAME) != 0)
16200 break;
16201 }
16202 }
88b48903 16203
6ec2e0f5
SDJ
16204 exit (fail);
16205#endif
16206}
88b48903 16207
6ec2e0f5
SDJ
16208_ACEOF
16209if ac_fn_c_try_run "$LINENO"; then :
16210 gl_cv_func_getcwd_path_max=yes
16211else
16212 case $? in
16213 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
16214 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
16215 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
16216 *) gl_cv_func_getcwd_path_max=no;;
16217 esac
16218fi
16219rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16220 conftest.$ac_objext conftest.beam conftest.$ac_ext
16221fi
88b48903 16222
88b48903 16223
6ec2e0f5
SDJ
16224fi
16225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
16226$as_echo "$gl_cv_func_getcwd_path_max" >&6; }
88b48903 16227
6ec2e0f5
SDJ
16228 case "$gl_cv_func_getcwd_null" in
16229 *yes)
88b48903
WN
16230
16231
16232
16233
6ec2e0f5
SDJ
16234 for ac_func in getpagesize
16235do :
16236 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
16237if test "x$ac_cv_func_getpagesize" = x""yes; then :
16238 cat >>confdefs.h <<_ACEOF
16239#define HAVE_GETPAGESIZE 1
16240_ACEOF
16241
16242fi
16243done
16244
16245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5
16246$as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; }
16247if test "${gl_cv_func_getcwd_abort_bug+set}" = set; then :
88b48903
WN
16248 $as_echo_n "(cached) " >&6
16249else
6ec2e0f5
SDJ
16250 # Remove any remnants of a previous test.
16251 rm -rf confdir-14B---
16252 # Arrange for deletion of the temporary directory this test creates.
16253 ac_clean_files="$ac_clean_files confdir-14B---"
16254 if test "$cross_compiling" = yes; then :
16255 gl_cv_func_getcwd_abort_bug=yes
88b48903
WN
16256else
16257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16258/* end confdefs.h. */
6ec2e0f5
SDJ
16259
16260#include <errno.h>
16261#include <stdlib.h>
16262#if HAVE_UNISTD_H
16263# include <unistd.h>
16264#else /* on Windows with MSVC */
16265# include <direct.h>
16266#endif
16267#include <string.h>
16268#include <sys/stat.h>
16269
16270
16271/* Arrange to define PATH_MAX, like "pathmax.h" does. */
16272#if HAVE_UNISTD_H
16273# include <unistd.h>
16274#endif
16275#include <limits.h>
16276#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
16277# include <sys/param.h>
16278#endif
16279#if !defined PATH_MAX && defined MAXPATHLEN
16280# define PATH_MAX MAXPATHLEN
16281#endif
16282#ifdef __hpux
16283# undef PATH_MAX
16284# define PATH_MAX 1024
16285#endif
16286#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
16287# undef PATH_MAX
16288# define PATH_MAX 260
16289#endif
16290
16291
16292/* Don't get link errors because mkdir is redefined to rpl_mkdir. */
16293#undef mkdir
16294
16295#ifndef S_IRWXU
16296# define S_IRWXU 0700
16297#endif
16298
16299/* FIXME: skip the run-test altogether on systems without getpagesize. */
16300#if ! HAVE_GETPAGESIZE
16301# define getpagesize() 0
16302#endif
16303
16304/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
16305 the 16kB pagesize on ia64 linux. Those conditions make the code below
16306 trigger a bug in glibc's getcwd implementation before 2.4.90-10. */
16307#define TARGET_LEN (5 * 1024)
88b48903
WN
16308
16309int
16310main ()
16311{
6ec2e0f5
SDJ
16312 char *cwd;
16313 size_t initial_cwd_len;
16314 int fail = 0;
16315
16316 /* The bug is triggered when PATH_MAX < getpagesize (), so skip
16317 this relatively expensive and invasive test if that's not true. */
16318#ifdef PATH_MAX
16319 int bug_possible = PATH_MAX < getpagesize ();
16320#else
16321 int bug_possible = 0;
16322#endif
16323 if (! bug_possible)
16324 return 0;
8690e634 16325
6ec2e0f5
SDJ
16326 cwd = getcwd (NULL, 0);
16327 if (cwd == NULL)
16328 return 2;
16329
16330 initial_cwd_len = strlen (cwd);
16331 free (cwd);
16332
16333 if (1)
16334 {
16335 static char const dir_name[] = "confdir-14B---";
16336 size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
16337 / sizeof dir_name);
16338 size_t d;
16339 for (d = 0; d < desired_depth; d++)
16340 {
16341 if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
16342 {
16343 if (! (errno == ERANGE || errno == ENAMETOOLONG
16344 || errno == ENOENT))
16345 fail = 3; /* Unable to construct deep hierarchy. */
16346 break;
16347 }
16348 }
16349
16350 /* If libc has the bug in question, this invocation of getcwd
16351 results in a failed assertion. */
16352 cwd = getcwd (NULL, 0);
16353 if (cwd == NULL)
16354 fail = 4; /* getcwd didn't assert, but it failed for a long name
16355 where the answer could have been learned. */
16356 free (cwd);
16357
16358 /* Call rmdir first, in case the above chdir failed. */
16359 rmdir (dir_name);
16360 while (0 < d--)
16361 {
16362 if (chdir ("..") < 0)
16363 {
16364 fail = 5;
16365 break;
16366 }
16367 rmdir (dir_name);
16368 }
16369 }
16370
16371 return fail;
8690e634 16372}
6ec2e0f5 16373
8690e634
JK
16374_ACEOF
16375if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 16376 gl_cv_func_getcwd_abort_bug=no
8690e634 16377else
6ec2e0f5
SDJ
16378 ret=$?
16379 if test $ret -ge 128 || test $ret = 4; then
16380 gl_cv_func_getcwd_abort_bug=yes
16381 else
16382 gl_cv_func_getcwd_abort_bug=no
16383 fi
8690e634
JK
16384fi
16385rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16386 conftest.$ac_objext conftest.beam conftest.$ac_ext
16387fi
16388
16389
16390fi
6ec2e0f5
SDJ
16391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5
16392$as_echo "$gl_cv_func_getcwd_abort_bug" >&6; }
16393 if test $gl_cv_func_getcwd_abort_bug = yes; then :
16394 gl_abort_bug=yes
16395fi
16396
16397 ;;
16398 esac
16399 ;;
16400 esac
16401 case "$gl_cv_func_getcwd_path_max" in
16402 "no"|"no, it has the AIX bug") ;;
16403 *)
16404
16405$as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
16406
16407 ;;
16408 esac
16409 case "$gl_cv_func_getcwd_path_max" in
16410 "no, but it is partly working")
16411
16412$as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
16413
16414 ;;
16415 "yes, but with shorter paths")
16416
16417$as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
16418
16419 ;;
16420 esac
16421
16422 if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
16423 || test $gl_cv_func_getcwd_posix_signature != yes \
16424 || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \
16425 || test $gl_abort_bug = yes; then
16426 REPLACE_GETCWD=1
8690e634
JK
16427 fi
16428
6ec2e0f5 16429 if test $REPLACE_GETCWD = 1; then
8690e634
JK
16430
16431
8690e634
JK
16432
16433
16434
16435
16436
16437
6ec2e0f5 16438 gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
8690e634
JK
16439
16440
8690e634
JK
16441
16442
6ec2e0f5
SDJ
16443 :
16444
16445 fi
16446
8690e634
JK
16447
16448cat >>confdefs.h <<_ACEOF
6ec2e0f5 16449#define GNULIB_GETCWD 1
8690e634
JK
16450_ACEOF
16451
16452
8690e634 16453
8690e634
JK
16454
16455
c971b7fa 16456
c971b7fa 16457
6ec2e0f5
SDJ
16458 GNULIB_GETCWD=1
16459
16460
16461
16462
16463
16464$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
16465
c971b7fa 16466
c971b7fa 16467
c971b7fa 16468
c971b7fa 16469
c971b7fa 16470
c971b7fa 16471
c971b7fa 16472
6ec2e0f5
SDJ
16473 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
16474 *yes,yes) ;;
16475 *)
16476 REPLACE_GETCWD=1
16477 ;;
16478 esac
c971b7fa 16479
6ec2e0f5 16480 if test $REPLACE_GETCWD = 1; then
c971b7fa 16481
c971b7fa
PA
16482
16483
c971b7fa
PA
16484
16485
c971b7fa 16486
c971b7fa 16487
c971b7fa 16488
6ec2e0f5 16489 gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
c971b7fa 16490
6ec2e0f5 16491 fi
c971b7fa 16492
c971b7fa 16493
c971b7fa 16494
c971b7fa 16495
8690e634 16496
6ec2e0f5 16497 GNULIB_GETCWD=1
c971b7fa 16498
88b48903
WN
16499
16500
16501
88b48903 16502
6ec2e0f5 16503$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
88b48903 16504
88b48903
WN
16505
16506
16507
6ec2e0f5
SDJ
16508
16509
16510
16511
16512 if test $ac_cv_func_getdtablesize = yes &&
16513 test $ac_cv_have_decl_getdtablesize = yes; then
16514 # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit
16515 # up to an unchangeable hard limit; all other platforms correctly
16516 # require setrlimit before getdtablesize() can report a larger value.
16517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
16518$as_echo_n "checking whether getdtablesize works... " >&6; }
16519if test "${gl_cv_func_getdtablesize_works+set}" = set; then :
88b48903
WN
16520 $as_echo_n "(cached) " >&6
16521else
6ec2e0f5 16522 if test "$cross_compiling" = yes; then :
88b48903 16523 case "$host_os" in
6ec2e0f5
SDJ
16524 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
16525 gl_cv_func_getdtablesize_works="guessing no" ;;
16526 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
88b48903 16527 esac
88b48903
WN
16528else
16529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16530/* end confdefs.h. */
16531
6ec2e0f5
SDJ
16532 #include <unistd.h>
16533int
16534main ()
88b48903 16535{
6ec2e0f5
SDJ
16536int size = getdtablesize();
16537 if (dup2 (0, getdtablesize()) != -1)
16538 return 1;
16539 if (size != getdtablesize())
16540 return 2;
16541
16542 ;
16543 return 0;
88b48903
WN
16544}
16545_ACEOF
16546if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 16547 gl_cv_func_getdtablesize_works=yes
88b48903 16548else
6ec2e0f5 16549 gl_cv_func_getdtablesize_works=no
88b48903
WN
16550fi
16551rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16552 conftest.$ac_objext conftest.beam conftest.$ac_ext
16553fi
16554
16555
16556fi
6ec2e0f5
SDJ
16557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
16558$as_echo "$gl_cv_func_getdtablesize_works" >&6; }
16559 case "$gl_cv_func_getdtablesize_works" in
16560 *yes) ;;
16561 *) REPLACE_GETDTABLESIZE=1 ;;
88b48903
WN
16562 esac
16563 else
6ec2e0f5 16564 HAVE_GETDTABLESIZE=0
88b48903
WN
16565 fi
16566
6ec2e0f5 16567 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
88b48903
WN
16568
16569
16570
16571
16572
16573
16574
16575
6ec2e0f5 16576 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
88b48903 16577
6ec2e0f5 16578 :
88b48903
WN
16579 fi
16580
16581
16582
16583
16584
6ec2e0f5 16585 GNULIB_GETDTABLESIZE=1
88b48903
WN
16586
16587
16588
88b48903 16589
88b48903 16590
6ec2e0f5 16591$as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
88b48903 16592
88b48903 16593
88b48903 16594
88b48903 16595
88b48903 16596
88b48903 16597
88b48903 16598
88b48903
WN
16599
16600
6ec2e0f5
SDJ
16601 if test $ac_cv_have_decl_getlogin_r = no; then
16602 HAVE_DECL_GETLOGIN_R=0
16603 fi
88b48903 16604
88b48903 16605
6ec2e0f5
SDJ
16606 if test $ac_cv_func_getlogin_r = no; then
16607 HAVE_GETLOGIN_R=0
16608 else
16609 HAVE_GETLOGIN_R=1
16610
16611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getlogin_r works with small buffers" >&5
16612$as_echo_n "checking whether getlogin_r works with small buffers... " >&6; }
16613if test "${gl_cv_func_getlogin_r_works+set}" = set; then :
16614 $as_echo_n "(cached) " >&6
16615else
88b48903 16616
6ec2e0f5
SDJ
16617 case "$host_os" in
16618 # Guess no on OSF/1.
16619 osf*) gl_cv_func_getlogin_r_works="guessing no" ;;
16620 # Guess yes otherwise.
16621 *) gl_cv_func_getlogin_r_works="guessing yes" ;;
16622 esac
16623 if test "$cross_compiling" = yes; then :
16624 :
88b48903
WN
16625else
16626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16627/* end confdefs.h. */
16628
6ec2e0f5
SDJ
16629#include <stddef.h>
16630#include <unistd.h>
16631#if !HAVE_DECL_GETLOGIN_R
88b48903 16632extern
6ec2e0f5 16633# ifdef __cplusplus
88b48903 16634"C"
6ec2e0f5
SDJ
16635# endif
16636int getlogin_r (char *, size_t);
88b48903 16637#endif
6ec2e0f5
SDJ
16638int
16639main (void)
88b48903
WN
16640{
16641 int result = 0;
6ec2e0f5
SDJ
16642 char buf[100];
16643
16644 if (getlogin_r (buf, 0) == 0)
16645 result |= 16;
16646 if (getlogin_r (buf, 1) == 0)
16647 result |= 17;
88b48903
WN
16648 return result;
16649}
16650_ACEOF
16651if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 16652 gl_cv_func_getlogin_r_works=yes
88b48903 16653else
6ec2e0f5
SDJ
16654 case $? in
16655 16 | 17) gl_cv_func_getlogin_r_works=no ;;
16656 esac
16657
88b48903
WN
16658fi
16659rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16660 conftest.$ac_objext conftest.beam conftest.$ac_ext
16661fi
16662
16663
4a626d0a 16664fi
6ec2e0f5
SDJ
16665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getlogin_r_works" >&5
16666$as_echo "$gl_cv_func_getlogin_r_works" >&6; }
16667 case "$gl_cv_func_getlogin_r_works" in
16668 *yes) ;;
16669 *) REPLACE_GETLOGIN_R=1 ;;
16670 esac
16671 fi
16672
16673 if test $HAVE_GETLOGIN_R = 0 || test $REPLACE_GETLOGIN_R = 1; then
16674
16675
16676
16677
16678
16679
16680
16681
16682 gl_LIBOBJS="$gl_LIBOBJS getlogin_r.$ac_objext"
4a626d0a 16683
4a626d0a 16684
4a626d0a 16685
4a626d0a 16686
4a626d0a
PA
16687 fi
16688
16689
4a626d0a
PA
16690
16691
16692
6ec2e0f5 16693 GNULIB_GETLOGIN_R=1
4a626d0a
PA
16694
16695
16696
16697
16698
6ec2e0f5 16699$as_echo "#define GNULIB_TEST_GETLOGIN_R 1" >>confdefs.h
4a626d0a 16700
4a626d0a
PA
16701
16702
16703
16704
16705
6ec2e0f5
SDJ
16706 ac_found=0
16707 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
16708"
16709if test "x$ac_cv_have_decl_program_invocation_name" = x""yes; then :
16710 ac_have_decl=1
16711else
16712 ac_have_decl=0
16713fi
16714
16715cat >>confdefs.h <<_ACEOF
16716#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
16717_ACEOF
16718if test $ac_have_decl = 1; then :
16719 ac_found=1
16720fi
16721
16722 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
16723"
16724if test "x$ac_cv_have_decl_program_invocation_short_name" = x""yes; then :
16725 ac_have_decl=1
16726else
16727 ac_have_decl=0
16728fi
16729
16730cat >>confdefs.h <<_ACEOF
16731#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
16732_ACEOF
16733if test $ac_have_decl = 1; then :
16734 ac_found=1
16735fi
4a626d0a 16736
6ec2e0f5
SDJ
16737 ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
16738"
16739if test "x$ac_cv_have_decl___argv" = x""yes; then :
16740 ac_have_decl=1
16741else
16742 ac_have_decl=0
16743fi
4a626d0a 16744
6ec2e0f5
SDJ
16745cat >>confdefs.h <<_ACEOF
16746#define HAVE_DECL___ARGV $ac_have_decl
16747_ACEOF
16748if test $ac_have_decl = 1; then :
16749 ac_found=1
16750fi
4a626d0a
PA
16751
16752
6ec2e0f5
SDJ
16753 # Incur the cost of this test only if none of the above worked.
16754 if test $ac_found = 0; then
16755 # On OpenBSD 5.1, using the global __progname variable appears to be
16756 # the only way to implement getprogname.
16757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
16758$as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
16759if test "${gl_cv_var___progname+set}" = set; then :
16760 $as_echo_n "(cached) " >&6
16761else
4a626d0a 16762
6ec2e0f5
SDJ
16763 gl_cv_var___progname=
16764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16765/* end confdefs.h. */
16766extern char *__progname;
16767int
16768main ()
16769{
16770return *__progname;
16771
16772 ;
16773 return 0;
16774}
16775_ACEOF
16776if ac_fn_c_try_link "$LINENO"; then :
16777 gl_cv_var___progname=yes
16778
16779fi
16780rm -f core conftest.err conftest.$ac_objext \
16781 conftest$ac_exeext conftest.$ac_ext
16782
16783
16784fi
16785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
16786$as_echo "$gl_cv_var___progname" >&6; }
16787 if test "$gl_cv_var___progname" = yes; then
16788
16789$as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
16790
16791 fi
16792 fi
4a626d0a
PA
16793
16794
16795
16796
16797
16798
16799
16800
16801
16802 gl_gettimeofday_timezone=void
16803 if test $ac_cv_func_gettimeofday != yes; then
16804 HAVE_GETTIMEOFDAY=0
16805 else
16806
16807
16808
16809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
16810$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
16811if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
16812 $as_echo_n "(cached) " >&6
16813else
16814 if test "$cross_compiling" = yes; then :
16815 # When cross-compiling:
16816 case "$host_os" in
16817 # Guess all is fine on glibc systems.
16818 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
16819 # If we don't know, assume the worst.
16820 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
16821 esac
16822
16823else
16824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16825/* end confdefs.h. */
16826#include <string.h>
16827 #include <sys/time.h>
16828 #include <time.h>
16829 #include <stdlib.h>
16830
16831int
16832main ()
16833{
16834
16835 time_t t = 0;
16836 struct tm *lt;
16837 struct tm saved_lt;
16838 struct timeval tv;
16839 lt = localtime (&t);
16840 saved_lt = *lt;
16841 gettimeofday (&tv, NULL);
16842 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
16843
16844 ;
16845 return 0;
16846}
16847_ACEOF
16848if ac_fn_c_try_run "$LINENO"; then :
16849 gl_cv_func_gettimeofday_clobber=no
16850else
16851 gl_cv_func_gettimeofday_clobber=yes
16852fi
16853rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16854 conftest.$ac_objext conftest.beam conftest.$ac_ext
16855fi
16856
16857fi
16858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
16859$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
16860
16861 case "$gl_cv_func_gettimeofday_clobber" in
16862 *yes)
16863 REPLACE_GETTIMEOFDAY=1
16864
16865 REPLACE_GMTIME=1
16866 REPLACE_LOCALTIME=1
16867
16868
16869$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
16870
16871 ;;
16872 esac
16873
16874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
16875$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
16876if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
16877 $as_echo_n "(cached) " >&6
16878else
16879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16880/* end confdefs.h. */
16881#include <sys/time.h>
16882 struct timeval c;
16883 int gettimeofday (struct timeval *restrict, void *restrict);
16884
16885int
16886main ()
16887{
16888/* glibc uses struct timezone * rather than the POSIX void *
16889 if _GNU_SOURCE is defined. However, since the only portable
16890 use of gettimeofday uses NULL as the second parameter, and
16891 since the glibc definition is actually more typesafe, it is
16892 not worth wrapping this to get a compliant signature. */
16893 int (*f) (struct timeval *restrict, void *restrict)
16894 = gettimeofday;
16895 int x = f (&c, 0);
16896 return !(x | c.tv_sec | c.tv_usec);
16897
16898 ;
16899 return 0;
16900}
16901_ACEOF
16902if ac_fn_c_try_compile "$LINENO"; then :
16903 gl_cv_func_gettimeofday_posix_signature=yes
16904else
16905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16906/* end confdefs.h. */
16907#include <sys/time.h>
16908int gettimeofday (struct timeval *restrict, struct timezone *restrict);
16909
16910int
16911main ()
16912{
16913
16914 ;
16915 return 0;
16916}
16917_ACEOF
16918if ac_fn_c_try_compile "$LINENO"; then :
16919 gl_cv_func_gettimeofday_posix_signature=almost
16920else
16921 gl_cv_func_gettimeofday_posix_signature=no
16922fi
16923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16924fi
16925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16926fi
16927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
16928$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
16929 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
16930 gl_gettimeofday_timezone='struct timezone'
16931 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
16932 REPLACE_GETTIMEOFDAY=1
16933 fi
16934 if test $REPLACE_STRUCT_TIMEVAL = 1; then
16935 REPLACE_GETTIMEOFDAY=1
16936 fi
16937
16938 fi
16939
16940cat >>confdefs.h <<_ACEOF
16941#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
16942_ACEOF
16943
88b48903 16944
4a626d0a 16945 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
88b48903 16946
88b48903 16947
88b48903 16948
88b48903
WN
16949
16950
88b48903
WN
16951
16952
16953
6ec2e0f5
SDJ
16954 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
16955
16956
16957 for ac_header in sys/timeb.h
16958do :
16959 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
16960if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
16961 cat >>confdefs.h <<_ACEOF
16962#define HAVE_SYS_TIMEB_H 1
16963_ACEOF
16964
16965fi
16966
16967done
16968
16969 for ac_func in _ftime
16970do :
16971 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
16972if test "x$ac_cv_func__ftime" = x""yes; then :
16973 cat >>confdefs.h <<_ACEOF
16974#define HAVE__FTIME 1
16975_ACEOF
16976
16977fi
16978done
16979
16980
16981 fi
16982
16983
16984
16985
16986
16987 GNULIB_GETTIMEOFDAY=1
16988
16989
16990
16991
16992
16993$as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
16994
16995
16996
16997 GLOB_H=
16998 for ac_header in glob.h
16999do :
17000 ac_fn_c_check_header_mongrel "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default"
17001if test "x$ac_cv_header_glob_h" = x""yes; then :
17002 cat >>confdefs.h <<_ACEOF
17003#define HAVE_GLOB_H 1
17004_ACEOF
17005
17006else
17007 GLOB_H=glob.h
17008fi
17009
17010done
17011
17012
17013 if test -z "$GLOB_H"; then
17014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU glob interface version 1" >&5
17015$as_echo_n "checking for GNU glob interface version 1... " >&6; }
17016if test "${gl_cv_gnu_glob_interface_version_1+set}" = set; then :
17017 $as_echo_n "(cached) " >&6
17018else
17019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17020/* end confdefs.h. */
17021#include <gnu-versions.h>
17022char a[_GNU_GLOB_INTERFACE_VERSION == 1 ? 1 : -1];
17023_ACEOF
17024if ac_fn_c_try_compile "$LINENO"; then :
17025 gl_cv_gnu_glob_interface_version_1=yes
17026else
17027 gl_cv_gnu_glob_interface_version_1=no
17028fi
17029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17030fi
17031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_gnu_glob_interface_version_1" >&5
17032$as_echo "$gl_cv_gnu_glob_interface_version_1" >&6; }
17033
17034 if test "$gl_cv_gnu_glob_interface_version_1" = "no"; then
17035 GLOB_H=glob.h
17036 fi
17037 fi
17038
17039 if test -z "$GLOB_H"; then
17040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether glob lists broken symlinks" >&5
17041$as_echo_n "checking whether glob lists broken symlinks... " >&6; }
17042if test "${gl_cv_glob_lists_symlinks+set}" = set; then :
17043 $as_echo_n "(cached) " >&6
17044else
17045 if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then
17046 gl_cv_glob_lists_symlinks=maybe
17047 else
17048 # If we can't make a symlink, then we cannot test this issue. Be
17049 # pessimistic about this.
17050 gl_cv_glob_lists_symlinks=no
17051 fi
88b48903 17052
6ec2e0f5
SDJ
17053 if test $gl_cv_glob_lists_symlinks = maybe; then
17054 if test "$cross_compiling" = yes; then :
17055 gl_cv_glob_lists_symlinks=no
17056else
17057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17058/* end confdefs.h. */
88b48903 17059
6ec2e0f5
SDJ
17060#include <stddef.h>
17061#include <glob.h>
17062int
17063main ()
17064{
17065glob_t found;
17066if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH) return 1;
17067 ;
17068 return 0;
17069}
4a626d0a 17070_ACEOF
6ec2e0f5
SDJ
17071if ac_fn_c_try_run "$LINENO"; then :
17072 gl_cv_glob_lists_symlinks=yes
17073else
17074 gl_cv_glob_lists_symlinks=no
17075fi
17076rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17077 conftest.$ac_objext conftest.beam conftest.$ac_ext
17078fi
88b48903 17079
6ec2e0f5 17080 fi
4a626d0a 17081fi
6ec2e0f5
SDJ
17082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_glob_lists_symlinks" >&5
17083$as_echo "$gl_cv_glob_lists_symlinks" >&6; }
88b48903 17084
6ec2e0f5
SDJ
17085 if test $gl_cv_glob_lists_symlinks = no; then
17086 GLOB_H=glob.h
17087 fi
17088 fi
4a626d0a 17089
6ec2e0f5 17090 rm -f conf$$-globtest
4a626d0a 17091
88b48903 17092
6ec2e0f5
SDJ
17093 if test -n "$GLOB_H"; then
17094 GL_GENERATE_GLOB_H_TRUE=
17095 GL_GENERATE_GLOB_H_FALSE='#'
17096else
17097 GL_GENERATE_GLOB_H_TRUE='#'
17098 GL_GENERATE_GLOB_H_FALSE=
17099fi
88b48903 17100
88b48903 17101
6ec2e0f5 17102 if test -n "$GLOB_H"; then
88b48903
WN
17103
17104
17105
17106
88b48903
WN
17107
17108
17109
17110
6ec2e0f5 17111 gl_LIBOBJS="$gl_LIBOBJS glob.$ac_objext"
88b48903 17112
88b48903 17113
6ec2e0f5
SDJ
17114 if test $ac_cv_header_sys_cdefs_h = yes; then
17115 HAVE_SYS_CDEFS_H=1
17116 else
17117 HAVE_SYS_CDEFS_H=0
17118 fi
88b48903
WN
17119
17120
6ec2e0f5 17121 fi
88b48903 17122
49e4877c
PA
17123 :
17124
17125
88b48903
WN
17126
17127
17128
17129
17130 PRIPTR_PREFIX=
17131 if test -n "$STDINT_H"; then
17132 PRIPTR_PREFIX='"l"'
17133 else
17134 for glpfx in '' l ll I64; do
17135 case $glpfx in
17136 '') gltype1='int';;
17137 l) gltype1='long int';;
17138 ll) gltype1='long long int';;
17139 I64) gltype1='__int64';;
17140 esac
17141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17142/* end confdefs.h. */
17143#include <stdint.h>
17144 extern intptr_t foo;
17145 extern $gltype1 foo;
17146int
17147main ()
17148{
17149
17150 ;
17151 return 0;
17152}
17153_ACEOF
17154if ac_fn_c_try_compile "$LINENO"; then :
17155 PRIPTR_PREFIX='"'$glpfx'"'
17156fi
17157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17158 test -n "$PRIPTR_PREFIX" && break
17159 done
17160 fi
17161
17162
17163
17164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
17165$as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
17166if test "${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+set}" = set; then :
17167 $as_echo_n "(cached) " >&6
17168else
17169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17170/* end confdefs.h. */
17171/* Work also in C++ mode. */
17172 #define __STDC_LIMIT_MACROS 1
17173
17174 /* Work if build is not clean. */
17175 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
17176
17177 #include <limits.h>
17178 #if HAVE_STDINT_H
17179 #include <stdint.h>
17180 #endif
17181
17182 #if defined INT32_MAX && defined INTMAX_MAX
17183 #define CONDITION (INT32_MAX < INTMAX_MAX)
17184 #elif HAVE_LONG_LONG_INT
17185 #define CONDITION (sizeof (int) < sizeof (long long int))
17186 #else
17187 #define CONDITION 0
17188 #endif
17189 int test[CONDITION ? 1 : -1];
17190int
17191main ()
17192{
17193
17194 ;
17195 return 0;
17196}
17197_ACEOF
17198if ac_fn_c_try_compile "$LINENO"; then :
17199 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
17200else
17201 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
17202fi
17203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17204fi
17205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
17206$as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
17207 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
17208 INT32_MAX_LT_INTMAX_MAX=1;
17209 else
17210 INT32_MAX_LT_INTMAX_MAX=0;
17211 fi
17212
17213
17214 if test $APPLE_UNIVERSAL_BUILD = 0; then
17215
17216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
17217$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
17218if test "${gl_cv_test_INT64_MAX_EQ_LONG_MAX+set}" = set; then :
17219 $as_echo_n "(cached) " >&6
17220else
17221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17222/* end confdefs.h. */
17223/* Work also in C++ mode. */
17224 #define __STDC_LIMIT_MACROS 1
17225
17226 /* Work if build is not clean. */
17227 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
17228
17229 #include <limits.h>
17230 #if HAVE_STDINT_H
17231 #include <stdint.h>
17232 #endif
17233
17234 #if defined INT64_MAX
17235 #define CONDITION (INT64_MAX == LONG_MAX)
17236 #elif HAVE_LONG_LONG_INT
17237 #define CONDITION (sizeof (long long int) == sizeof (long int))
17238 #else
17239 #define CONDITION 0
17240 #endif
17241 int test[CONDITION ? 1 : -1];
17242int
17243main ()
17244{
17245
17246 ;
17247 return 0;
17248}
17249_ACEOF
17250if ac_fn_c_try_compile "$LINENO"; then :
17251 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
17252else
17253 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
17254fi
17255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17256fi
17257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
17258$as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
17259 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
17260 INT64_MAX_EQ_LONG_MAX=1;
17261 else
17262 INT64_MAX_EQ_LONG_MAX=0;
17263 fi
17264
17265
17266 else
17267 INT64_MAX_EQ_LONG_MAX=-1
17268 fi
17269
17270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
17271$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
17272if test "${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+set}" = set; then :
17273 $as_echo_n "(cached) " >&6
17274else
17275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17276/* end confdefs.h. */
17277/* Work also in C++ mode. */
17278 #define __STDC_LIMIT_MACROS 1
17279
17280 /* Work if build is not clean. */
17281 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
17282
17283 #include <limits.h>
17284 #if HAVE_STDINT_H
17285 #include <stdint.h>
17286 #endif
17287
17288 #if defined UINT32_MAX && defined UINTMAX_MAX
17289 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
17290 #elif HAVE_LONG_LONG_INT
17291 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
17292 #else
17293 #define CONDITION 0
17294 #endif
17295 int test[CONDITION ? 1 : -1];
17296int
17297main ()
17298{
17299
17300 ;
17301 return 0;
17302}
17303_ACEOF
17304if ac_fn_c_try_compile "$LINENO"; then :
17305 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
17306else
17307 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
17308fi
17309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17310fi
17311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
17312$as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
17313 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
17314 UINT32_MAX_LT_UINTMAX_MAX=1;
17315 else
17316 UINT32_MAX_LT_UINTMAX_MAX=0;
17317 fi
17318
17319
17320 if test $APPLE_UNIVERSAL_BUILD = 0; then
17321
17322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
17323$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
17324if test "${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+set}" = set; then :
17325 $as_echo_n "(cached) " >&6
17326else
17327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17328/* end confdefs.h. */
17329/* Work also in C++ mode. */
17330 #define __STDC_LIMIT_MACROS 1
17331
17332 /* Work if build is not clean. */
17333 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
17334
17335 #include <limits.h>
17336 #if HAVE_STDINT_H
17337 #include <stdint.h>
17338 #endif
17339
17340 #if defined UINT64_MAX
17341 #define CONDITION (UINT64_MAX == ULONG_MAX)
17342 #elif HAVE_LONG_LONG_INT
17343 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
17344 #else
17345 #define CONDITION 0
17346 #endif
17347 int test[CONDITION ? 1 : -1];
17348int
17349main ()
17350{
17351
17352 ;
17353 return 0;
17354}
17355_ACEOF
17356if ac_fn_c_try_compile "$LINENO"; then :
17357 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
17358else
17359 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
17360fi
17361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17362fi
17363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
17364$as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
17365 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
17366 UINT64_MAX_EQ_ULONG_MAX=1;
17367 else
17368 UINT64_MAX_EQ_ULONG_MAX=0;
17369 fi
17370
17371
17372 else
17373 UINT64_MAX_EQ_ULONG_MAX=-1
17374 fi
17375
17376
17377
17378
17379
17380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
17381$as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
17382if test "${gl_cv_func_isnand_no_libm+set}" = set; then :
17383 $as_echo_n "(cached) " >&6
17384else
17385
17386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17387/* end confdefs.h. */
17388#include <math.h>
17389 #if __GNUC__ >= 4
17390 # undef isnand
17391 # define isnand(x) __builtin_isnan ((double)(x))
17392 #else
17393 # undef isnand
17394 # define isnand(x) isnan ((double)(x))
17395 #endif
17396 double x;
17397int
17398main ()
17399{
17400return isnand (x);
17401 ;
17402 return 0;
17403}
17404_ACEOF
17405if ac_fn_c_try_link "$LINENO"; then :
17406 gl_cv_func_isnand_no_libm=yes
17407else
17408 gl_cv_func_isnand_no_libm=no
17409fi
17410rm -f core conftest.err conftest.$ac_objext \
17411 conftest$ac_exeext conftest.$ac_ext
17412
17413fi
17414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
17415$as_echo "$gl_cv_func_isnand_no_libm" >&6; }
17416
17417 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
17418 if test $gl_cv_func_isnand_no_libm = yes; then
17419
17420$as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
17421
17422 fi
17423
17424 if test $gl_func_isnand_no_libm != yes; then
17425
17426
17427
17428
17429
17430
17431
17432
17433 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
17434
17435
17436
17437
17438 fi
17439
17440
17441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
17442$as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
17443if test "${gl_cv_func_isnanl_no_libm+set}" = set; then :
17444 $as_echo_n "(cached) " >&6
17445else
17446
17447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17448/* end confdefs.h. */
17449#include <math.h>
17450 #if __GNUC__ >= 4
17451 # undef isnanl
17452 # define isnanl(x) __builtin_isnanl ((long double)(x))
17453 #elif defined isnan
17454 # undef isnanl
17455 # define isnanl(x) isnan ((long double)(x))
17456 #endif
17457 long double x;
17458int
17459main ()
17460{
17461return isnanl (x);
17462 ;
17463 return 0;
17464}
17465_ACEOF
17466if ac_fn_c_try_link "$LINENO"; then :
17467 gl_cv_func_isnanl_no_libm=yes
17468else
17469 gl_cv_func_isnanl_no_libm=no
17470fi
17471rm -f core conftest.err conftest.$ac_objext \
17472 conftest$ac_exeext conftest.$ac_ext
17473
17474fi
17475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
17476$as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
17477
17478 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
17479 if test $gl_func_isnanl_no_libm = yes; then
17480
17481
17482
17483
17484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
17485$as_echo_n "checking whether isnanl works... " >&6; }
17486if test "${gl_cv_func_isnanl_works+set}" = set; then :
17487 $as_echo_n "(cached) " >&6
17488else
17489
17490 if test "$cross_compiling" = yes; then :
4a626d0a 17491 gl_cv_func_isnanl_works="guessing yes"
88b48903
WN
17492else
17493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17494/* end confdefs.h. */
17495
17496#include <float.h>
17497#include <limits.h>
17498#include <math.h>
17499#if __GNUC__ >= 4
17500# undef isnanl
17501# define isnanl(x) __builtin_isnanl ((long double)(x))
17502#elif defined isnan
17503# undef isnanl
17504# define isnanl(x) isnan ((long double)(x))
17505#endif
17506#define NWORDS \
17507 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
17508typedef union { unsigned int word[NWORDS]; long double value; }
17509 memory_long_double;
17510/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
17511 runtime type conversion. */
17512#ifdef __sgi
17513static long double NaNl ()
17514{
17515 double zero = 0.0;
17516 return zero / zero;
17517}
17518#else
17519# define NaNl() (0.0L / 0.0L)
17520#endif
17521int main ()
17522{
17523 int result = 0;
17524
17525 if (!isnanl (NaNl ()))
17526 result |= 1;
17527
17528 {
17529 memory_long_double m;
17530 unsigned int i;
17531
17532 /* The isnanl function should be immune against changes in the sign bit and
17533 in the mantissa bits. The xor operation twiddles a bit that can only be
17534 a sign bit or a mantissa bit (since the exponent never extends to
17535 bit 31). */
17536 m.value = NaNl ();
17537 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
17538 for (i = 0; i < NWORDS; i++)
17539 m.word[i] |= 1;
17540 if (!isnanl (m.value))
17541 result |= 1;
17542 }
17543
17544#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
17545/* Representation of an 80-bit 'long double' as an initializer for a sequence
17546 of 'unsigned int' words. */
17547# ifdef WORDS_BIGENDIAN
17548# define LDBL80_WORDS(exponent,manthi,mantlo) \
17549 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
4a626d0a 17550 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
88b48903
WN
17551 (unsigned int) (mantlo) << 16 \
17552 }
17553# else
17554# define LDBL80_WORDS(exponent,manthi,mantlo) \
17555 { mantlo, manthi, exponent }
17556# endif
17557 { /* Quiet NaN. */
17558 static memory_long_double x =
17559 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
17560 if (!isnanl (x.value))
17561 result |= 2;
17562 }
17563 {
17564 /* Signalling NaN. */
17565 static memory_long_double x =
17566 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
17567 if (!isnanl (x.value))
17568 result |= 2;
17569 }
4a626d0a 17570 /* isnanl should return something even for noncanonical values. */
88b48903
WN
17571 { /* Pseudo-NaN. */
17572 static memory_long_double x =
17573 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
4a626d0a 17574 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
17575 result |= 4;
17576 }
17577 { /* Pseudo-Infinity. */
17578 static memory_long_double x =
17579 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
4a626d0a 17580 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
17581 result |= 8;
17582 }
17583 { /* Pseudo-Zero. */
17584 static memory_long_double x =
17585 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
4a626d0a 17586 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
17587 result |= 16;
17588 }
17589 { /* Unnormalized number. */
17590 static memory_long_double x =
17591 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
4a626d0a 17592 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
17593 result |= 32;
17594 }
17595 { /* Pseudo-Denormal. */
17596 static memory_long_double x =
17597 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
4a626d0a 17598 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
17599 result |= 64;
17600 }
17601#endif
17602
17603 return result;
17604}
17605_ACEOF
17606if ac_fn_c_try_run "$LINENO"; then :
17607 gl_cv_func_isnanl_works=yes
17608else
17609 gl_cv_func_isnanl_works=no
17610fi
17611rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17612 conftest.$ac_objext conftest.beam conftest.$ac_ext
17613fi
17614
17615
17616fi
17617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
17618$as_echo "$gl_cv_func_isnanl_works" >&6; }
17619
17620 case "$gl_cv_func_isnanl_works" in
17621 *yes) ;;
17622 *) gl_func_isnanl_no_libm=no ;;
17623 esac
17624 fi
17625 if test $gl_func_isnanl_no_libm = yes; then
17626
17627$as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
17628
17629 fi
17630
17631 if test $gl_func_isnanl_no_libm != yes; then
17632
17633
17634
17635
17636
17637
17638
17639
17640 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
17641
17642
17643
17644
17645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
17646$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
17647if test "${gl_cv_cc_long_double_expbit0+set}" = set; then :
17648 $as_echo_n "(cached) " >&6
17649else
17650
17651 if test "$cross_compiling" = yes; then :
17652
17653 gl_cv_cc_long_double_expbit0="unknown"
17654
17655else
17656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17657/* end confdefs.h. */
17658
17659#include <float.h>
17660#include <stddef.h>
17661#include <stdio.h>
17662#include <string.h>
17663#define NWORDS \
17664 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
17665typedef union { long double value; unsigned int word[NWORDS]; }
17666 memory_long_double;
17667static unsigned int ored_words[NWORDS];
17668static unsigned int anded_words[NWORDS];
17669static void add_to_ored_words (long double x)
17670{
17671 memory_long_double m;
17672 size_t i;
17673 /* Clear it first, in case
17674 sizeof (long double) < sizeof (memory_long_double). */
17675 memset (&m, 0, sizeof (memory_long_double));
17676 m.value = x;
17677 for (i = 0; i < NWORDS; i++)
17678 {
17679 ored_words[i] |= m.word[i];
17680 anded_words[i] &= m.word[i];
17681 }
17682}
17683int main ()
17684{
17685 size_t j;
17686 FILE *fp = fopen ("conftest.out", "w");
17687 if (fp == NULL)
17688 return 1;
17689 for (j = 0; j < NWORDS; j++)
17690 anded_words[j] = ~ (unsigned int) 0;
17691 add_to_ored_words (0.25L);
17692 add_to_ored_words (0.5L);
17693 add_to_ored_words (1.0L);
17694 add_to_ored_words (2.0L);
17695 add_to_ored_words (4.0L);
17696 /* Remove bits that are common (e.g. if representation of the first mantissa
17697 bit is explicit). */
17698 for (j = 0; j < NWORDS; j++)
17699 ored_words[j] &= ~anded_words[j];
17700 /* Now find the nonzero word. */
17701 for (j = 0; j < NWORDS; j++)
17702 if (ored_words[j] != 0)
17703 break;
17704 if (j < NWORDS)
17705 {
17706 size_t i;
17707 for (i = j + 1; i < NWORDS; i++)
17708 if (ored_words[i] != 0)
17709 {
17710 fprintf (fp, "unknown");
17711 return (fclose (fp) != 0);
17712 }
17713 for (i = 0; ; i++)
17714 if ((ored_words[j] >> i) & 1)
17715 {
17716 fprintf (fp, "word %d bit %d", (int) j, (int) i);
17717 return (fclose (fp) != 0);
17718 }
17719 }
17720 fprintf (fp, "unknown");
17721 return (fclose (fp) != 0);
17722}
17723
17724_ACEOF
17725if ac_fn_c_try_run "$LINENO"; then :
17726 gl_cv_cc_long_double_expbit0=`cat conftest.out`
17727else
17728 gl_cv_cc_long_double_expbit0="unknown"
17729fi
17730rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17731 conftest.$ac_objext conftest.beam conftest.$ac_ext
17732fi
17733
17734 rm -f conftest.out
17735
17736fi
17737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
17738$as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
17739 case "$gl_cv_cc_long_double_expbit0" in
17740 word*bit*)
17741 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
17742 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
17743
17744cat >>confdefs.h <<_ACEOF
17745#define LDBL_EXPBIT0_WORD $word
17746_ACEOF
17747
17748
17749cat >>confdefs.h <<_ACEOF
17750#define LDBL_EXPBIT0_BIT $bit
17751_ACEOF
17752
17753 ;;
17754 esac
17755
17756
17757
17758 fi
17759
17760
17761
17762
88b48903
WN
17763
17764
17765
17766
2196f55f 17767
49e4877c 17768
88b48903
WN
17769 LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
17770
17771
17772
17773
f45c62c4
YQ
17774 if test $ac_cv_func_lstat = yes; then
17775
17776 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
17777 *no)
17778 REPLACE_LSTAT=1
17779 ;;
17780 esac
17781 else
17782 HAVE_LSTAT=0
17783 fi
17784
17785 if test $REPLACE_LSTAT = 1; then
17786
17787
17788
17789
17790
17791
17792
17793
17794 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
17795
17796 :
17797 fi
17798
17799
17800
17801
17802
17803 GNULIB_LSTAT=1
17804
17805
17806
17807
17808
17809$as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
17810
17811
17812
17813
17814
17815
6a29c58e
YQ
17816 if test $gl_cv_func_malloc_posix = yes; then
17817
17818$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
17819
17820 else
17821 REPLACE_MALLOC=1
17822 fi
17823
17824 if test $REPLACE_MALLOC = 1; then
17825
17826
17827
17828
17829
17830
17831
17832
17833 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
17834
17835 fi
17836
17837
17838
17839
17840
17841 GNULIB_MALLOC_POSIX=1
17842
17843
17844
17845
17846
17847$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
17848
17849
17850
17851
17852
17853
88b48903
WN
17854
17855
17856
17857
17858
88b48903 17859
c971b7fa 17860
c971b7fa 17861
98399780
YQ
17862
17863
17864
17865
88b48903
WN
17866 if test $gl_cv_have_include_next = yes; then
17867 gl_cv_next_math_h='<'math.h'>'
17868 else
17869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
17870$as_echo_n "checking absolute name of <math.h>... " >&6; }
17871if test "${gl_cv_next_math_h+set}" = set; then :
17872 $as_echo_n "(cached) " >&6
17873else
c971b7fa 17874
88b48903 17875 if test $ac_cv_header_math_h = yes; then
c971b7fa
PA
17876
17877
4a626d0a
PA
17878
17879
17880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 17881/* end confdefs.h. */
88b48903 17882#include <math.h>
8690e634 17883_ACEOF
4a626d0a
PA
17884 case "$host_os" in
17885 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17886 *) gl_absname_cpp="$ac_cpp" ;;
17887 esac
17888
17889 case "$host_os" in
17890 mingw*)
17891 gl_dirsep_regex='[/\\]'
17892 ;;
17893 *)
17894 gl_dirsep_regex='\/'
17895 ;;
17896 esac
17897 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17898 gl_header_literal_regex=`echo 'math.h' \
17899 | sed -e "$gl_make_literal_regex_sed"`
17900 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17901 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17902 s|^/[^/]|//&|
17903 p
17904 q
17905 }'
17906
17907 gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17908 sed -n "$gl_absolute_header_sed"`
17909
17910 gl_header=$gl_cv_absolute_math_h
17911 gl_cv_next_math_h='"'$gl_header'"'
88b48903
WN
17912 else
17913 gl_cv_next_math_h='<'math.h'>'
17914 fi
8690e634 17915
c971b7fa 17916
88b48903
WN
17917fi
17918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
17919$as_echo "$gl_cv_next_math_h" >&6; }
17920 fi
17921 NEXT_MATH_H=$gl_cv_next_math_h
c971b7fa 17922
88b48903
WN
17923 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17924 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17925 gl_next_as_first_directive='<'math.h'>'
17926 else
17927 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17928 gl_next_as_first_directive=$gl_cv_next_math_h
17929 fi
17930 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
8690e634 17931
c971b7fa 17932
c971b7fa
PA
17933
17934
c971b7fa 17935
88b48903
WN
17936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
17937$as_echo_n "checking whether NAN macro works... " >&6; }
17938if test "${gl_cv_header_math_nan_works+set}" = set; then :
c971b7fa
PA
17939 $as_echo_n "(cached) " >&6
17940else
8690e634
JK
17941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17942/* end confdefs.h. */
88b48903 17943#include <math.h>
c971b7fa
PA
17944int
17945main ()
17946{
88b48903
WN
17947/* Solaris 10 has a broken definition of NAN. Other platforms
17948 fail to provide NAN, or provide it only in C99 mode; this
17949 test only needs to fail when NAN is provided but wrong. */
17950 float f = 1.0f;
17951#ifdef NAN
17952 f = NAN;
17953#endif
17954 return f == 0;
c971b7fa
PA
17955 ;
17956 return 0;
17957}
17958_ACEOF
17959if ac_fn_c_try_compile "$LINENO"; then :
88b48903 17960 gl_cv_header_math_nan_works=yes
8690e634 17961else
88b48903 17962 gl_cv_header_math_nan_works=no
c971b7fa
PA
17963fi
17964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 17965fi
88b48903
WN
17966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
17967$as_echo "$gl_cv_header_math_nan_works" >&6; }
17968 if test $gl_cv_header_math_nan_works = no; then
17969 REPLACE_NAN=1
c971b7fa 17970 fi
88b48903
WN
17971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
17972$as_echo_n "checking whether HUGE_VAL works... " >&6; }
17973if test "${gl_cv_header_math_huge_val_works+set}" = set; then :
c971b7fa
PA
17974 $as_echo_n "(cached) " >&6
17975else
8690e634 17976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 17977/* end confdefs.h. */
88b48903 17978#include <math.h>
c971b7fa
PA
17979int
17980main ()
17981{
88b48903
WN
17982/* Solaris 10 has a broken definition of HUGE_VAL. */
17983 double d = HUGE_VAL;
17984 return d == 0;
c971b7fa
PA
17985 ;
17986 return 0;
17987}
17988_ACEOF
17989if ac_fn_c_try_compile "$LINENO"; then :
88b48903 17990 gl_cv_header_math_huge_val_works=yes
8690e634 17991else
88b48903 17992 gl_cv_header_math_huge_val_works=no
c971b7fa
PA
17993fi
17994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 17995fi
88b48903
WN
17996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
17997$as_echo "$gl_cv_header_math_huge_val_works" >&6; }
17998 if test $gl_cv_header_math_huge_val_works = no; then
17999 REPLACE_HUGE_VAL=1
8690e634 18000 fi
c971b7fa 18001
c971b7fa 18002
88b48903
WN
18003 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
18004 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
18005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
18006$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18007if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
8690e634
JK
18008 $as_echo_n "(cached) " >&6
18009else
18010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18011/* end confdefs.h. */
88b48903 18012#include <math.h>
8690e634
JK
18013int
18014main ()
18015{
88b48903
WN
18016#undef $gl_func
18017 (void) $gl_func;
8690e634
JK
18018 ;
18019 return 0;
18020}
18021_ACEOF
18022if ac_fn_c_try_compile "$LINENO"; then :
88b48903 18023 eval "$as_gl_Symbol=yes"
c971b7fa 18024else
88b48903 18025 eval "$as_gl_Symbol=no"
c971b7fa 18026fi
8690e634
JK
18027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18028fi
88b48903
WN
18029eval ac_res=\$$as_gl_Symbol
18030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18031$as_echo "$ac_res" >&6; }
18032 eval as_val=\$$as_gl_Symbol
18033 if test "x$as_val" = x""yes; then :
18034 cat >>confdefs.h <<_ACEOF
18035#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18036_ACEOF
c971b7fa 18037
88b48903
WN
18038 eval ac_cv_have_decl_$gl_func=yes
18039fi
18040 done
c971b7fa
PA
18041
18042
18043
18044
18045
c971b7fa 18046
c971b7fa 18047
c971b7fa 18048
c971b7fa
PA
18049
18050
c971b7fa 18051
8690e634
JK
18052
18053 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
18054
18055
18056
18057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
18058$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
18059if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
c971b7fa
PA
18060 $as_echo_n "(cached) " >&6
18061else
8690e634
JK
18062
18063 case "$host_os" in
18064 # Guess no on AIX and OSF/1.
18065 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
18066 # Guess yes otherwise.
18067 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
18068 esac
18069 if test $LOCALE_JA != none; then
18070 if test "$cross_compiling" = yes; then :
18071 :
18072else
c971b7fa
PA
18073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18074/* end confdefs.h. */
c971b7fa 18075
8690e634
JK
18076#include <locale.h>
18077#include <string.h>
18078/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18079 <wchar.h>.
18080 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18081 included before <wchar.h>. */
18082#include <stddef.h>
18083#include <stdio.h>
18084#include <time.h>
18085#include <wchar.h>
18086int main ()
c971b7fa 18087{
8690e634
JK
18088 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
18089 {
18090 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
18091 mbstate_t state;
18092 wchar_t wc;
18093
18094 memset (&state, '\0', sizeof (mbstate_t));
18095 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
18096 if (mbsinit (&state))
18097 return 1;
18098 }
c971b7fa
PA
18099 return 0;
18100}
18101_ACEOF
8690e634
JK
18102if ac_fn_c_try_run "$LINENO"; then :
18103 gl_cv_func_mbrtowc_incomplete_state=yes
c971b7fa 18104else
8690e634 18105 gl_cv_func_mbrtowc_incomplete_state=no
c971b7fa 18106fi
8690e634
JK
18107rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18108 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 18109fi
c971b7fa 18110
8690e634 18111 fi
c971b7fa 18112
8690e634
JK
18113fi
18114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
18115$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
c971b7fa 18116
c971b7fa 18117
c971b7fa 18118
c971b7fa 18119
8690e634
JK
18120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
18121$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
18122if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
c971b7fa
PA
18123 $as_echo_n "(cached) " >&6
18124else
18125
8690e634
JK
18126 case "$host_os" in
18127 # Guess no on Solaris 8.
18128 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
18129 # Guess yes otherwise.
18130 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
18131 esac
18132 if test $LOCALE_ZH_CN != none; then
18133 if test "$cross_compiling" = yes; then :
18134 :
18135else
18136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
18137/* end confdefs.h. */
18138
8690e634
JK
18139#include <locale.h>
18140#include <stdlib.h>
18141#include <string.h>
18142/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18143 <wchar.h>.
18144 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18145 included before <wchar.h>. */
18146#include <stddef.h>
18147#include <stdio.h>
18148#include <time.h>
18149#include <wchar.h>
18150int main ()
c971b7fa 18151{
8690e634
JK
18152 /* This fails on Solaris 8:
18153 mbrtowc returns 2, and sets wc to 0x00F0.
18154 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
18155 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
18156 {
18157 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
18158 mbstate_t state;
18159 wchar_t wc;
18160
18161 memset (&state, '\0', sizeof (mbstate_t));
18162 if (mbrtowc (&wc, input + 3, 6, &state) != 4
18163 && mbtowc (&wc, input + 3, 6) == 4)
18164 return 1;
18165 }
c971b7fa
PA
18166 return 0;
18167}
18168_ACEOF
8690e634
JK
18169if ac_fn_c_try_run "$LINENO"; then :
18170 gl_cv_func_mbrtowc_sanitycheck=yes
c971b7fa 18171else
8690e634 18172 gl_cv_func_mbrtowc_sanitycheck=no
c971b7fa 18173fi
8690e634
JK
18174rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18175 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 18176fi
c971b7fa 18177
8690e634 18178 fi
c971b7fa 18179
8690e634
JK
18180fi
18181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
18182$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
18183
18184 REPLACE_MBSTATE_T=0
18185 case "$gl_cv_func_mbrtowc_incomplete_state" in
18186 *yes) ;;
18187 *) REPLACE_MBSTATE_T=1 ;;
18188 esac
18189 case "$gl_cv_func_mbrtowc_sanitycheck" in
18190 *yes) ;;
18191 *) REPLACE_MBSTATE_T=1 ;;
18192 esac
c971b7fa 18193 else
8690e634 18194 REPLACE_MBSTATE_T=1
c971b7fa
PA
18195 fi
18196
18197
18198
8690e634
JK
18199 if test $ac_cv_func_mbrtowc = no; then
18200 HAVE_MBRTOWC=0
18201 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
18202/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18203 <wchar.h>.
18204 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18205 included before <wchar.h>. */
18206#include <stddef.h>
18207#include <stdio.h>
18208#include <time.h>
18209#include <wchar.h>
c971b7fa 18210
8690e634
JK
18211"
18212if test "x$ac_cv_have_decl_mbrtowc" = x""yes; then :
18213 ac_have_decl=1
18214else
18215 ac_have_decl=0
c971b7fa 18216fi
c971b7fa 18217
8690e634
JK
18218cat >>confdefs.h <<_ACEOF
18219#define HAVE_DECL_MBRTOWC $ac_have_decl
18220_ACEOF
c971b7fa 18221
8690e634
JK
18222 if test $ac_cv_have_decl_mbrtowc = yes; then
18223 REPLACE_MBRTOWC=1
18224 fi
18225 else
18226 if test $REPLACE_MBSTATE_T = 1; then
18227 REPLACE_MBRTOWC=1
18228 else
c971b7fa
PA
18229
18230
18231
8690e634
JK
18232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
18233$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
18234if test "${gl_cv_func_mbrtowc_null_arg1+set}" = set; then :
18235 $as_echo_n "(cached) " >&6
c971b7fa 18236else
c971b7fa 18237
8690e634
JK
18238 case "$host_os" in
18239 # Guess no on Solaris.
18240 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
18241 # Guess yes otherwise.
18242 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
18243 esac
18244 if test $LOCALE_FR_UTF8 != none; then
18245 if test "$cross_compiling" = yes; then :
18246 :
18247else
18248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
18249/* end confdefs.h. */
18250
8690e634
JK
18251#include <locale.h>
18252#include <stdlib.h>
18253#include <string.h>
18254/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18255 <wchar.h>.
18256 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18257 included before <wchar.h>. */
18258#include <stddef.h>
18259#include <stdio.h>
18260#include <time.h>
18261#include <wchar.h>
18262int main ()
18263{
18264 int result = 0;
18265
18266 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
18267 {
18268 char input[] = "\303\237er";
18269 mbstate_t state;
18270 wchar_t wc;
18271 size_t ret;
18272
18273 memset (&state, '\0', sizeof (mbstate_t));
18274 wc = (wchar_t) 0xBADFACE;
18275 ret = mbrtowc (&wc, input, 5, &state);
18276 if (ret != 2)
18277 result |= 1;
18278 if (!mbsinit (&state))
18279 result |= 2;
c971b7fa 18280
8690e634
JK
18281 memset (&state, '\0', sizeof (mbstate_t));
18282 ret = mbrtowc (NULL, input, 5, &state);
18283 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
18284 result |= 4;
18285 if (!mbsinit (&state))
18286 result |= 8;
18287 }
18288 return result;
18289}
c971b7fa 18290_ACEOF
8690e634
JK
18291if ac_fn_c_try_run "$LINENO"; then :
18292 gl_cv_func_mbrtowc_null_arg1=yes
18293else
18294 gl_cv_func_mbrtowc_null_arg1=no
18295fi
18296rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18297 conftest.$ac_objext conftest.beam conftest.$ac_ext
18298fi
c971b7fa 18299
8690e634 18300 fi
c971b7fa 18301
c971b7fa 18302fi
8690e634
JK
18303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
18304$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
c971b7fa 18305
c971b7fa 18306
c971b7fa 18307
c971b7fa 18308
8690e634
JK
18309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
18310$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
18311if test "${gl_cv_func_mbrtowc_null_arg2+set}" = set; then :
18312 $as_echo_n "(cached) " >&6
18313else
c971b7fa 18314
8690e634
JK
18315 case "$host_os" in
18316 # Guess no on OSF/1.
18317 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
18318 # Guess yes otherwise.
18319 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
18320 esac
18321 if test $LOCALE_FR_UTF8 != none; then
18322 if test "$cross_compiling" = yes; then :
c971b7fa 18323 :
8690e634
JK
18324else
18325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18326/* end confdefs.h. */
18327
18328#include <locale.h>
18329#include <string.h>
18330/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18331 <wchar.h>.
18332 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18333 included before <wchar.h>. */
18334#include <stddef.h>
18335#include <stdio.h>
18336#include <time.h>
18337#include <wchar.h>
18338int main ()
18339{
18340 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
18341 {
18342 mbstate_t state;
18343 wchar_t wc;
18344 int ret;
18345
18346 memset (&state, '\0', sizeof (mbstate_t));
18347 wc = (wchar_t) 0xBADFACE;
18348 mbrtowc (&wc, NULL, 5, &state);
18349 /* Check that wc was not modified. */
18350 if (wc != (wchar_t) 0xBADFACE)
18351 return 1;
18352 }
18353 return 0;
18354}
18355_ACEOF
18356if ac_fn_c_try_run "$LINENO"; then :
18357 gl_cv_func_mbrtowc_null_arg2=yes
18358else
18359 gl_cv_func_mbrtowc_null_arg2=no
18360fi
18361rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18362 conftest.$ac_objext conftest.beam conftest.$ac_ext
18363fi
18364
18365 fi
18366
18367fi
18368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
18369$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
c971b7fa
PA
18370
18371
18372
18373
18374
18375
8690e634
JK
18376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
18377$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
18378if test "${gl_cv_func_mbrtowc_retval+set}" = set; then :
18379 $as_echo_n "(cached) " >&6
18380else
18381
18382 case "$host_os" in
18383 # Guess no on HP-UX, Solaris, native Windows.
18384 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
18385 # Guess yes otherwise.
18386 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
18387 esac
18388 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
18389 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
18390 if test "$cross_compiling" = yes; then :
c971b7fa 18391 :
8690e634
JK
18392else
18393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18394/* end confdefs.h. */
c971b7fa 18395
8690e634
JK
18396#include <locale.h>
18397#include <string.h>
18398/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18399 <wchar.h>.
18400 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18401 included before <wchar.h>. */
18402#include <stddef.h>
18403#include <stdio.h>
18404#include <time.h>
18405#include <wchar.h>
18406int main ()
18407{
18408 int result = 0;
18409 int found_some_locale = 0;
18410 /* This fails on Solaris. */
18411 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
18412 {
18413 char input[] = "B\303\274\303\237er"; /* "Büßer" */
18414 mbstate_t state;
18415 wchar_t wc;
18416
18417 memset (&state, '\0', sizeof (mbstate_t));
18418 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
18419 {
18420 input[1] = '\0';
18421 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
18422 result |= 1;
18423 }
18424 found_some_locale = 1;
18425 }
18426 /* This fails on HP-UX 11.11. */
18427 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
18428 {
18429 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
18430 mbstate_t state;
18431 wchar_t wc;
18432
18433 memset (&state, '\0', sizeof (mbstate_t));
18434 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
18435 {
18436 input[1] = '\0';
18437 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
18438 result |= 2;
18439 }
18440 found_some_locale = 1;
18441 }
18442 /* This fails on native Windows. */
18443 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
18444 {
18445 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
18446 mbstate_t state;
18447 wchar_t wc;
18448
18449 memset (&state, '\0', sizeof (mbstate_t));
18450 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
18451 {
18452 input[3] = '\0';
18453 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
18454 result |= 4;
18455 }
18456 found_some_locale = 1;
18457 }
18458 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
18459 {
18460 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
18461 mbstate_t state;
18462 wchar_t wc;
18463
18464 memset (&state, '\0', sizeof (mbstate_t));
18465 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
18466 {
18467 input[3] = '\0';
18468 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
18469 result |= 8;
18470 }
18471 found_some_locale = 1;
18472 }
18473 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
18474 {
18475 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
18476 mbstate_t state;
18477 wchar_t wc;
18478
18479 memset (&state, '\0', sizeof (mbstate_t));
18480 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
18481 {
18482 input[3] = '\0';
18483 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
18484 result |= 16;
18485 }
18486 found_some_locale = 1;
18487 }
18488 return (found_some_locale ? result : 77);
18489}
18490_ACEOF
18491if ac_fn_c_try_run "$LINENO"; then :
18492 gl_cv_func_mbrtowc_retval=yes
18493else
18494 if test $? != 77; then
18495 gl_cv_func_mbrtowc_retval=no
18496 fi
c971b7fa 18497
8690e634
JK
18498fi
18499rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18500 conftest.$ac_objext conftest.beam conftest.$ac_ext
18501fi
c971b7fa 18502
8690e634 18503 fi
c971b7fa 18504
8690e634
JK
18505fi
18506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
18507$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
c971b7fa
PA
18508
18509
18510
18511
8690e634
JK
18512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
18513$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
18514if test "${gl_cv_func_mbrtowc_nul_retval+set}" = set; then :
c971b7fa
PA
18515 $as_echo_n "(cached) " >&6
18516else
8690e634
JK
18517
18518 case "$host_os" in
18519 # Guess no on Solaris 8 and 9.
18520 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
18521 # Guess yes otherwise.
18522 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
18523 esac
18524 if test $LOCALE_ZH_CN != none; then
18525 if test "$cross_compiling" = yes; then :
18526 :
c971b7fa
PA
18527else
18528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18529/* end confdefs.h. */
18530
8690e634 18531#include <locale.h>
c971b7fa 18532#include <string.h>
8690e634
JK
18533/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18534 <wchar.h>.
18535 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18536 included before <wchar.h>. */
18537#include <stddef.h>
18538#include <stdio.h>
18539#include <time.h>
18540#include <wchar.h>
18541int main ()
c971b7fa 18542{
8690e634
JK
18543 /* This fails on Solaris 8 and 9. */
18544 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
c971b7fa 18545 {
8690e634
JK
18546 mbstate_t state;
18547 wchar_t wc;
c971b7fa 18548
8690e634
JK
18549 memset (&state, '\0', sizeof (mbstate_t));
18550 if (mbrtowc (&wc, "", 1, &state) != 0)
18551 return 1;
18552 }
c971b7fa
PA
18553 return 0;
18554}
18555_ACEOF
18556if ac_fn_c_try_run "$LINENO"; then :
8690e634 18557 gl_cv_func_mbrtowc_nul_retval=yes
c971b7fa 18558else
8690e634 18559 gl_cv_func_mbrtowc_nul_retval=no
c971b7fa
PA
18560fi
18561rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18562 conftest.$ac_objext conftest.beam conftest.$ac_ext
18563fi
18564
8690e634
JK
18565 fi
18566
c971b7fa 18567fi
8690e634
JK
18568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
18569$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
18570
4a626d0a
PA
18571
18572
18573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
18574$as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
18575if test "${gl_cv_func_mbrtowc_empty_input+set}" = set; then :
18576 $as_echo_n "(cached) " >&6
18577else
18578
18579 case "$host_os" in
18580 # Guess no on AIX and glibc systems.
18581 aix* | *-gnu*)
18582 gl_cv_func_mbrtowc_empty_input="guessing no" ;;
18583 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
18584 esac
18585 if test "$cross_compiling" = yes; then :
18586 :
18587else
18588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18589/* end confdefs.h. */
18590
18591 #include <wchar.h>
18592 static wchar_t wc;
18593 static mbstate_t mbs;
18594 int
18595 main (void)
18596 {
49e4877c 18597 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
4a626d0a
PA
18598 }
18599_ACEOF
18600if ac_fn_c_try_run "$LINENO"; then :
4a626d0a 18601 gl_cv_func_mbrtowc_empty_input=yes
49e4877c
PA
18602else
18603 gl_cv_func_mbrtowc_empty_input=no
4a626d0a
PA
18604fi
18605rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18606 conftest.$ac_objext conftest.beam conftest.$ac_ext
18607fi
18608
18609
18610fi
18611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
18612$as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
18613
49e4877c
PA
18614
18615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
18616$as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
18617if test "${gl_cv_C_locale_sans_EILSEQ+set}" = set; then :
18618 $as_echo_n "(cached) " >&6
18619else
18620
18621 gl_cv_C_locale_sans_EILSEQ="guessing no"
18622
18623 if test "$cross_compiling" = yes; then :
18624 :
18625else
18626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18627/* end confdefs.h. */
18628#include <limits.h>
18629 #include <locale.h>
18630 #include <wchar.h>
18631
18632int
18633main ()
18634{
18635
18636 int i;
18637 char *locale = setlocale (LC_ALL, "C");
18638 if (! locale)
18639 return 1;
18640 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
18641 {
18642 char c = i;
18643 wchar_t wc;
18644 mbstate_t mbs = { 0, };
18645 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
18646 if (1 < ss)
18647 return 1;
18648 }
18649 return 0;
18650
6ec2e0f5
SDJ
18651 ;
18652 return 0;
18653}
18654_ACEOF
18655if ac_fn_c_try_run "$LINENO"; then :
18656 gl_cv_C_locale_sans_EILSEQ=yes
18657else
18658 gl_cv_C_locale_sans_EILSEQ=no
18659fi
18660rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18661 conftest.$ac_objext conftest.beam conftest.$ac_ext
18662fi
18663
18664fi
18665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5
18666$as_echo "$gl_cv_C_locale_sans_EILSEQ" >&6; }
18667
18668 case "$gl_cv_func_mbrtowc_null_arg1" in
18669 *yes) ;;
18670 *)
18671$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
18672
18673 REPLACE_MBRTOWC=1
18674 ;;
18675 esac
18676 case "$gl_cv_func_mbrtowc_null_arg2" in
18677 *yes) ;;
18678 *)
18679$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
18680
18681 REPLACE_MBRTOWC=1
18682 ;;
18683 esac
18684 case "$gl_cv_func_mbrtowc_retval" in
18685 *yes) ;;
18686 *)
18687$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
18688
18689 REPLACE_MBRTOWC=1
18690 ;;
18691 esac
18692 case "$gl_cv_func_mbrtowc_nul_retval" in
18693 *yes) ;;
18694 *)
18695$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
18696
18697 REPLACE_MBRTOWC=1
18698 ;;
18699 esac
18700 case "$gl_cv_func_mbrtowc_empty_input" in
18701 *yes) ;;
18702 *)
18703$as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
18704
18705 REPLACE_MBRTOWC=1
18706 ;;
18707 esac
18708 case $gl_cv_C_locale_sans_EILSEQ in
18709 *yes) ;;
18710 *)
18711$as_echo "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
18712
18713 REPLACE_MBRTOWC=1
18714 ;;
18715 esac
18716 fi
18717 fi
18718
18719 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
18720
18721
18722
18723
18724
18725
18726
18727
18728 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
18729
18730
18731 :
18732
18733 fi
18734
18735
18736
18737
18738
18739 GNULIB_MBRTOWC=1
18740
18741
18742
18743
18744
18745$as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
18746
18747
18748
18749
18750
18751
18752
18753
18754
18755
18756
18757
18758
18759
18760 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
18761
18762
18763
18764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
18765$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
18766if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
18767 $as_echo_n "(cached) " >&6
18768else
18769
18770 case "$host_os" in
18771 # Guess no on AIX and OSF/1.
18772 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
18773 # Guess yes otherwise.
18774 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
18775 esac
18776 if test $LOCALE_JA != none; then
18777 if test "$cross_compiling" = yes; then :
18778 :
18779else
18780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18781/* end confdefs.h. */
18782
18783#include <locale.h>
18784#include <string.h>
18785/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18786 <wchar.h>.
18787 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18788 included before <wchar.h>. */
18789#include <stddef.h>
18790#include <stdio.h>
18791#include <time.h>
18792#include <wchar.h>
18793int main ()
18794{
18795 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
18796 {
18797 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
18798 mbstate_t state;
18799 wchar_t wc;
18800
18801 memset (&state, '\0', sizeof (mbstate_t));
18802 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
18803 if (mbsinit (&state))
18804 return 1;
18805 }
18806 return 0;
18807}
18808_ACEOF
18809if ac_fn_c_try_run "$LINENO"; then :
18810 gl_cv_func_mbrtowc_incomplete_state=yes
18811else
18812 gl_cv_func_mbrtowc_incomplete_state=no
18813fi
18814rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18815 conftest.$ac_objext conftest.beam conftest.$ac_ext
18816fi
18817
18818 fi
18819
18820fi
18821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
18822$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
18823
18824
18825
18826
18827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
18828$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
18829if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
18830 $as_echo_n "(cached) " >&6
18831else
18832
18833 case "$host_os" in
18834 # Guess no on Solaris 8.
18835 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
18836 # Guess yes otherwise.
18837 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
18838 esac
18839 if test $LOCALE_ZH_CN != none; then
18840 if test "$cross_compiling" = yes; then :
18841 :
18842else
18843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18844/* end confdefs.h. */
18845
18846#include <locale.h>
18847#include <stdlib.h>
18848#include <string.h>
18849/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18850 <wchar.h>.
18851 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18852 included before <wchar.h>. */
18853#include <stddef.h>
18854#include <stdio.h>
18855#include <time.h>
18856#include <wchar.h>
18857int main ()
18858{
18859 /* This fails on Solaris 8:
18860 mbrtowc returns 2, and sets wc to 0x00F0.
18861 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
18862 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
18863 {
18864 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
18865 mbstate_t state;
18866 wchar_t wc;
18867
18868 memset (&state, '\0', sizeof (mbstate_t));
18869 if (mbrtowc (&wc, input + 3, 6, &state) != 4
18870 && mbtowc (&wc, input + 3, 6) == 4)
18871 return 1;
18872 }
49e4877c
PA
18873 return 0;
18874}
18875_ACEOF
18876if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 18877 gl_cv_func_mbrtowc_sanitycheck=yes
49e4877c 18878else
6ec2e0f5 18879 gl_cv_func_mbrtowc_sanitycheck=no
49e4877c
PA
18880fi
18881rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18882 conftest.$ac_objext conftest.beam conftest.$ac_ext
18883fi
18884
6ec2e0f5
SDJ
18885 fi
18886
49e4877c 18887fi
6ec2e0f5
SDJ
18888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
18889$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
49e4877c 18890
6ec2e0f5
SDJ
18891 REPLACE_MBSTATE_T=0
18892 case "$gl_cv_func_mbrtowc_incomplete_state" in
18893 *yes) ;;
18894 *) REPLACE_MBSTATE_T=1 ;;
18895 esac
18896 case "$gl_cv_func_mbrtowc_sanitycheck" in
18897 *yes) ;;
18898 *) REPLACE_MBSTATE_T=1 ;;
18899 esac
18900 else
18901 REPLACE_MBSTATE_T=1
18902 fi
8690e634 18903
8690e634 18904
8690e634 18905
6ec2e0f5
SDJ
18906 if test $ac_cv_func_mbsinit = no; then
18907 HAVE_MBSINIT=0
18908 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
18909/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18910 <wchar.h>.
18911 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18912 included before <wchar.h>. */
18913#include <stddef.h>
18914#include <stdio.h>
18915#include <time.h>
18916#include <wchar.h>
8690e634 18917
6ec2e0f5
SDJ
18918"
18919if test "x$ac_cv_have_decl_mbsinit" = x""yes; then :
18920 ac_have_decl=1
18921else
18922 ac_have_decl=0
18923fi
4a626d0a 18924
6ec2e0f5
SDJ
18925cat >>confdefs.h <<_ACEOF
18926#define HAVE_DECL_MBSINIT $ac_have_decl
18927_ACEOF
49e4877c 18928
6ec2e0f5
SDJ
18929 if test $ac_cv_have_decl_mbsinit = yes; then
18930 REPLACE_MBSINIT=1
18931 fi
18932 else
18933 if test $REPLACE_MBSTATE_T = 1; then
18934 REPLACE_MBSINIT=1
18935 else
18936 case "$host_os" in
18937 mingw*) REPLACE_MBSINIT=1 ;;
8690e634 18938 esac
c971b7fa
PA
18939 fi
18940 fi
18941
6ec2e0f5 18942 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
c971b7fa 18943
c971b7fa 18944
c971b7fa
PA
18945
18946
18947
18948
18949
18950
6ec2e0f5 18951 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
8690e634
JK
18952
18953
18954 :
c971b7fa 18955
a512b375 18956 fi
c971b7fa 18957
8690e634
JK
18958
18959
18960
18961
6ec2e0f5 18962 GNULIB_MBSINIT=1
8690e634
JK
18963
18964
18965
18966
8690e634 18967
6ec2e0f5 18968$as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
8690e634
JK
18969
18970
18971
18972
18973
18974
18975
18976
18977
18978
18979
c971b7fa 18980
c971b7fa 18981
8690e634 18982 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
c971b7fa 18983
8690e634
JK
18984
18985
18986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
18987$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
18988if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
18989 $as_echo_n "(cached) " >&6
18990else
18991
18992 case "$host_os" in
18993 # Guess no on AIX and OSF/1.
18994 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
18995 # Guess yes otherwise.
18996 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
18997 esac
18998 if test $LOCALE_JA != none; then
18999 if test "$cross_compiling" = yes; then :
19000 :
c971b7fa
PA
19001else
19002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19003/* end confdefs.h. */
19004
8690e634
JK
19005#include <locale.h>
19006#include <string.h>
19007/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19008 <wchar.h>.
19009 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19010 included before <wchar.h>. */
19011#include <stddef.h>
19012#include <stdio.h>
19013#include <time.h>
19014#include <wchar.h>
19015int main ()
c971b7fa 19016{
8690e634 19017 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
c971b7fa 19018 {
8690e634
JK
19019 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
19020 mbstate_t state;
19021 wchar_t wc;
19022
19023 memset (&state, '\0', sizeof (mbstate_t));
19024 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
19025 if (mbsinit (&state))
19026 return 1;
c971b7fa 19027 }
c971b7fa
PA
19028 return 0;
19029}
19030_ACEOF
19031if ac_fn_c_try_run "$LINENO"; then :
8690e634 19032 gl_cv_func_mbrtowc_incomplete_state=yes
c971b7fa 19033else
8690e634 19034 gl_cv_func_mbrtowc_incomplete_state=no
c971b7fa
PA
19035fi
19036rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19037 conftest.$ac_objext conftest.beam conftest.$ac_ext
19038fi
19039
8690e634 19040 fi
c971b7fa
PA
19041
19042fi
8690e634
JK
19043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
19044$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
c971b7fa
PA
19045
19046
c971b7fa
PA
19047
19048
8690e634
JK
19049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
19050$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
19051if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
c971b7fa
PA
19052 $as_echo_n "(cached) " >&6
19053else
8690e634
JK
19054
19055 case "$host_os" in
19056 # Guess no on Solaris 8.
19057 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
19058 # Guess yes otherwise.
19059 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
19060 esac
19061 if test $LOCALE_ZH_CN != none; then
19062 if test "$cross_compiling" = yes; then :
19063 :
19064else
c971b7fa
PA
19065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19066/* end confdefs.h. */
8690e634
JK
19067
19068#include <locale.h>
19069#include <stdlib.h>
19070#include <string.h>
19071/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19072 <wchar.h>.
19073 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19074 included before <wchar.h>. */
c971b7fa 19075#include <stddef.h>
8690e634
JK
19076#include <stdio.h>
19077#include <time.h>
19078#include <wchar.h>
19079int main ()
c971b7fa 19080{
8690e634
JK
19081 /* This fails on Solaris 8:
19082 mbrtowc returns 2, and sets wc to 0x00F0.
19083 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
19084 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
19085 {
19086 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
19087 mbstate_t state;
19088 wchar_t wc;
19089
19090 memset (&state, '\0', sizeof (mbstate_t));
19091 if (mbrtowc (&wc, input + 3, 6, &state) != 4
19092 && mbtowc (&wc, input + 3, 6) == 4)
19093 return 1;
19094 }
c971b7fa
PA
19095 return 0;
19096}
19097_ACEOF
8690e634
JK
19098if ac_fn_c_try_run "$LINENO"; then :
19099 gl_cv_func_mbrtowc_sanitycheck=yes
c971b7fa 19100else
8690e634 19101 gl_cv_func_mbrtowc_sanitycheck=no
c971b7fa 19102fi
8690e634
JK
19103rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19104 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 19105fi
c971b7fa 19106
8690e634
JK
19107 fi
19108
19109fi
19110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
19111$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
c971b7fa 19112
8690e634
JK
19113 REPLACE_MBSTATE_T=0
19114 case "$gl_cv_func_mbrtowc_incomplete_state" in
19115 *yes) ;;
19116 *) REPLACE_MBSTATE_T=1 ;;
19117 esac
19118 case "$gl_cv_func_mbrtowc_sanitycheck" in
19119 *yes) ;;
19120 *) REPLACE_MBSTATE_T=1 ;;
19121 esac
19122 else
19123 REPLACE_MBSTATE_T=1
c971b7fa
PA
19124 fi
19125
c971b7fa 19126
8690e634 19127
6ec2e0f5
SDJ
19128 if test $ac_cv_func_mbsrtowcs = no; then
19129 HAVE_MBSRTOWCS=0
19130 ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
8690e634
JK
19131/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19132 <wchar.h>.
19133 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19134 included before <wchar.h>. */
19135#include <stddef.h>
19136#include <stdio.h>
19137#include <time.h>
19138#include <wchar.h>
19139
19140"
6ec2e0f5 19141if test "x$ac_cv_have_decl_mbsrtowcs" = x""yes; then :
8690e634
JK
19142 ac_have_decl=1
19143else
19144 ac_have_decl=0
c971b7fa 19145fi
c971b7fa 19146
8690e634 19147cat >>confdefs.h <<_ACEOF
6ec2e0f5 19148#define HAVE_DECL_MBSRTOWCS $ac_have_decl
c971b7fa 19149_ACEOF
c971b7fa 19150
6ec2e0f5
SDJ
19151 if test $ac_cv_have_decl_mbsrtowcs = yes; then
19152 REPLACE_MBSRTOWCS=1
8690e634
JK
19153 fi
19154 else
19155 if test $REPLACE_MBSTATE_T = 1; then
6ec2e0f5 19156 REPLACE_MBSRTOWCS=1
8690e634 19157 else
6ec2e0f5
SDJ
19158
19159
19160
19161
19162
19163
19164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
19165$as_echo_n "checking whether mbsrtowcs works... " >&6; }
19166if test "${gl_cv_func_mbsrtowcs_works+set}" = set; then :
19167 $as_echo_n "(cached) " >&6
19168else
19169
19170 case "$host_os" in
19171 # Guess no on HP-UX, Solaris, mingw.
19172 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
19173 # Guess yes otherwise.
19174 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
19175 esac
19176 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
19177 if test "$cross_compiling" = yes; then :
19178 :
19179else
19180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19181/* end confdefs.h. */
19182
19183#include <locale.h>
19184#include <string.h>
19185/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19186 <wchar.h>.
19187 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19188 included before <wchar.h>. */
19189#include <stddef.h>
19190#include <stdio.h>
19191#include <time.h>
19192#include <wchar.h>
19193int main ()
19194{
19195 int result = 0;
19196 /* Test whether the function supports a NULL destination argument.
19197 This fails on native Windows. */
19198 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
19199 {
19200 const char input[] = "\337er";
19201 const char *src = input;
19202 mbstate_t state;
19203
19204 memset (&state, '\0', sizeof (mbstate_t));
19205 if (mbsrtowcs (NULL, &src, 1, &state) != 3
19206 || src != input)
19207 result |= 1;
19208 }
19209 /* Test whether the function works when started with a conversion state
19210 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
19211 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
19212 {
19213 const char input[] = "B\303\274\303\237er";
19214 mbstate_t state;
19215
19216 memset (&state, '\0', sizeof (mbstate_t));
19217 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
19218 if (!mbsinit (&state))
19219 {
19220 const char *src = input + 2;
19221 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
19222 result |= 2;
19223 }
19224 }
19225 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
19226 {
19227 const char input[] = "<\306\374\313\334\270\354>";
19228 mbstate_t state;
19229
19230 memset (&state, '\0', sizeof (mbstate_t));
19231 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
19232 if (!mbsinit (&state))
19233 {
19234 const char *src = input + 4;
19235 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
19236 result |= 4;
19237 }
19238 }
19239 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
19240 {
19241 const char input[] = "B\250\271\201\060\211\070er";
19242 mbstate_t state;
19243
19244 memset (&state, '\0', sizeof (mbstate_t));
19245 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
19246 if (!mbsinit (&state))
19247 {
19248 const char *src = input + 2;
19249 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
19250 result |= 8;
19251 }
19252 }
19253 return result;
19254}
19255_ACEOF
19256if ac_fn_c_try_run "$LINENO"; then :
19257 gl_cv_func_mbsrtowcs_works=yes
19258else
19259 gl_cv_func_mbsrtowcs_works=no
19260fi
19261rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19262 conftest.$ac_objext conftest.beam conftest.$ac_ext
19263fi
19264
19265 fi
19266
19267fi
19268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
19269$as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
19270
19271 case "$gl_cv_func_mbsrtowcs_works" in
19272 *yes) ;;
19273 *) REPLACE_MBSRTOWCS=1 ;;
8690e634
JK
19274 esac
19275 fi
19276 fi
c971b7fa 19277
6ec2e0f5 19278 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
c971b7fa
PA
19279
19280
19281
19282
19283
19284
19285
19286
6ec2e0f5
SDJ
19287 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
19288
19289
19290
19291
19292
19293
19294
19295
19296
19297 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
c971b7fa
PA
19298
19299
8690e634 19300 :
c971b7fa 19301
a512b375 19302 fi
c971b7fa 19303
c971b7fa 19304
c971b7fa 19305
c971b7fa
PA
19306
19307
6ec2e0f5 19308 GNULIB_MBSRTOWCS=1
c971b7fa 19309
c971b7fa
PA
19310
19311
19312
19313
6ec2e0f5 19314$as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
c971b7fa
PA
19315
19316
c971b7fa 19317
c971b7fa 19318
6ec2e0f5 19319 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
c971b7fa
PA
19320
19321
19322
c971b7fa 19323
c971b7fa
PA
19324
19325
19326
19327
6ec2e0f5 19328 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
8690e634 19329
c971b7fa 19330
6ec2e0f5
SDJ
19331 for ac_header in bp-sym.h
19332do :
19333 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
19334if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
19335 cat >>confdefs.h <<_ACEOF
19336#define HAVE_BP_SYM_H 1
19337_ACEOF
c971b7fa 19338
6ec2e0f5 19339fi
c971b7fa 19340
6ec2e0f5
SDJ
19341done
19342
19343
19344 fi
19345
19346
19347
19348
19349
19350 GNULIB_MEMCHR=1
19351
19352
19353
19354
19355
19356$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
19357
19358
19359
19360
19361
19362 if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
19363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
19364$as_echo_n "checking whether memmem works in linear time... " >&6; }
19365if test "${gl_cv_func_memmem_works_fast+set}" = set; then :
8690e634
JK
19366 $as_echo_n "(cached) " >&6
19367else
6ec2e0f5
SDJ
19368 if test "$cross_compiling" = yes; then :
19369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19370/* end confdefs.h. */
19371
19372#include <features.h>
19373#ifdef __GNU_LIBRARY__
19374 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)) \
19375 && !defined __UCLIBC__
19376 Lucky user
19377 #endif
19378#endif
19379#ifdef __CYGWIN__
19380 #include <cygwin/version.h>
19381 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 0)
19382 Lucky user
19383 #endif
19384#endif
19385
19386_ACEOF
19387if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19388 $EGREP "Lucky user" >/dev/null 2>&1; then :
19389 gl_cv_func_memmem_works_fast="guessing yes"
19390else
19391 gl_cv_func_memmem_works_fast="guessing no"
19392fi
19393rm -f conftest*
19394
c971b7fa 19395
8690e634
JK
19396else
19397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 19398/* end confdefs.h. */
c971b7fa 19399
6ec2e0f5
SDJ
19400#include <signal.h> /* for signal */
19401#include <string.h> /* for memmem */
19402#include <stdlib.h> /* for malloc */
19403#include <unistd.h> /* for alarm */
19404static void quit (int sig) { _exit (sig + 128); }
19405
19406int
19407main ()
8690e634 19408{
8690e634 19409
6ec2e0f5
SDJ
19410 int result = 0;
19411 size_t m = 1000000;
19412 char *haystack = (char *) malloc (2 * m + 1);
19413 char *needle = (char *) malloc (m + 1);
19414 /* Failure to compile this test due to missing alarm is okay,
19415 since all such platforms (mingw) also lack memmem. */
19416 signal (SIGALRM, quit);
19417 alarm (5);
19418 /* Check for quadratic performance. */
19419 if (haystack && needle)
19420 {
19421 memset (haystack, 'A', 2 * m);
19422 haystack[2 * m] = 'B';
19423 memset (needle, 'A', m);
19424 needle[m] = 'B';
19425 if (!memmem (haystack, 2 * m + 1, needle, m + 1))
19426 result |= 1;
19427 }
19428 return result;
19429
19430 ;
c971b7fa
PA
19431 return 0;
19432}
19433_ACEOF
8690e634 19434if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 19435 gl_cv_func_memmem_works_fast=yes
8690e634 19436else
6ec2e0f5 19437 gl_cv_func_memmem_works_fast=no
8690e634
JK
19438fi
19439rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19440 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 19441fi
c971b7fa
PA
19442
19443
8690e634 19444fi
6ec2e0f5
SDJ
19445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_fast" >&5
19446$as_echo "$gl_cv_func_memmem_works_fast" >&6; }
19447 case "$gl_cv_func_memmem_works_fast" in
19448 *yes) ;;
19449 *)
19450 REPLACE_MEMMEM=1
19451 ;;
19452 esac
19453 fi
c971b7fa 19454
6ec2e0f5 19455 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
8690e634
JK
19456
19457
19458
6ec2e0f5
SDJ
19459
19460
19461
19462
19463
19464 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
19465
19466 fi
19467
19468
19469
19470
19471 for ac_func in memmem
19472do :
19473 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
19474if test "x$ac_cv_func_memmem" = x""yes; then :
19475 cat >>confdefs.h <<_ACEOF
19476#define HAVE_MEMMEM 1
19477_ACEOF
19478
19479fi
19480done
19481
19482 if test $ac_cv_func_memmem = yes; then
19483 HAVE_MEMMEM=1
19484 else
19485 HAVE_MEMMEM=0
19486 fi
19487
19488 if test $ac_cv_have_decl_memmem = no; then
19489 HAVE_DECL_MEMMEM=0
19490 else
19491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
19492$as_echo_n "checking whether memmem works... " >&6; }
19493if test "${gl_cv_func_memmem_works_always+set}" = set; then :
c971b7fa
PA
19494 $as_echo_n "(cached) " >&6
19495else
6ec2e0f5
SDJ
19496 if test "$cross_compiling" = yes; then :
19497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19498/* end confdefs.h. */
19499
19500#ifdef __GNU_LIBRARY__
19501 #include <features.h>
19502 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
19503 || __GLIBC_MINOR__ > 12)) \
19504 || (__GLIBC__ > 2)) \
19505 || defined __UCLIBC__
19506 Lucky user
19507 #endif
19508#elif defined __CYGWIN__
19509 #include <cygwin/version.h>
19510 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
19511 Lucky user
19512 #endif
19513#else
19514 Lucky user
19515#endif
19516
19517_ACEOF
19518if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19519 $EGREP "Lucky user" >/dev/null 2>&1; then :
19520 gl_cv_func_memmem_works_always="guessing yes"
19521else
19522 gl_cv_func_memmem_works_always="guessing no"
19523fi
19524rm -f conftest*
19525
8690e634 19526
8690e634 19527else
c971b7fa
PA
19528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19529/* end confdefs.h. */
c971b7fa 19530
6ec2e0f5
SDJ
19531#include <string.h> /* for memmem */
19532#define P "_EF_BF_BD"
19533#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
19534#define NEEDLE P P P P P
19535
19536int
19537main ()
c971b7fa 19538{
8690e634 19539
6ec2e0f5
SDJ
19540 int result = 0;
19541 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
19542 result |= 1;
19543 /* Check for empty needle behavior. */
19544 {
19545 const char *haystack = "AAA";
19546 if (memmem (haystack, 3, NULL, 0) != haystack)
19547 result |= 2;
8690e634 19548 }
6ec2e0f5
SDJ
19549 return result;
19550
19551 ;
c971b7fa
PA
19552 return 0;
19553}
19554_ACEOF
8690e634 19555if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 19556 gl_cv_func_memmem_works_always=yes
c971b7fa 19557else
6ec2e0f5 19558 gl_cv_func_memmem_works_always=no
c971b7fa 19559fi
8690e634
JK
19560rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19561 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 19562fi
8690e634 19563
8690e634
JK
19564
19565fi
6ec2e0f5
SDJ
19566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
19567$as_echo "$gl_cv_func_memmem_works_always" >&6; }
19568 case "$gl_cv_func_memmem_works_always" in
8690e634 19569 *yes) ;;
6ec2e0f5
SDJ
19570 *)
19571 REPLACE_MEMMEM=1
19572 ;;
8690e634 19573 esac
c971b7fa 19574 fi
6ec2e0f5 19575 :
c971b7fa 19576
6ec2e0f5 19577 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
c971b7fa 19578
c971b7fa 19579
8690e634 19580
c971b7fa 19581
6ec2e0f5
SDJ
19582
19583
19584
19585
19586 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
19587
19588 fi
19589
19590
19591
19592
19593
19594 GNULIB_MEMMEM=1
19595
19596
19597
19598
19599
19600$as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
19601
19602
19603
19604
19605
19606
19607
19608
19609
19610 for ac_func in mempcpy
19611do :
19612 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
19613if test "x$ac_cv_func_mempcpy" = x""yes; then :
19614 cat >>confdefs.h <<_ACEOF
19615#define HAVE_MEMPCPY 1
8690e634 19616_ACEOF
c971b7fa 19617
6ec2e0f5
SDJ
19618fi
19619done
c971b7fa 19620
6ec2e0f5
SDJ
19621 if test $ac_cv_func_mempcpy = no; then
19622 HAVE_MEMPCPY=0
19623 fi
8690e634 19624
6ec2e0f5 19625 if test $HAVE_MEMPCPY = 0; then
8690e634
JK
19626
19627
19628
19629
8690e634 19630
6ec2e0f5
SDJ
19631
19632
19633
19634 gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
19635
19636
8690e634 19637 :
c971b7fa 19638
6ec2e0f5 19639 fi
c971b7fa 19640
8690e634 19641
8690e634 19642
8690e634 19643
6ec2e0f5
SDJ
19644
19645 GNULIB_MEMPCPY=1
19646
19647
19648
19649
19650
19651$as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
19652
19653
19654
19655
19656
19657
19658
19659
19660 if test $ac_cv_have_decl_memrchr = no; then
19661 HAVE_DECL_MEMRCHR=0
19662 fi
19663
19664 for ac_func in memrchr
19665do :
19666 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
19667if test "x$ac_cv_func_memrchr" = x""yes; then :
19668 cat >>confdefs.h <<_ACEOF
19669#define HAVE_MEMRCHR 1
c971b7fa 19670_ACEOF
6ec2e0f5 19671
c971b7fa 19672fi
6ec2e0f5 19673done
8690e634 19674
8690e634 19675
6ec2e0f5 19676 if test $ac_cv_func_memrchr = no; then
8690e634 19677
6ec2e0f5
SDJ
19678
19679
19680
19681
19682
19683
19684
19685 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
19686
19687 :
c971b7fa
PA
19688 fi
19689
19690
c971b7fa 19691
c971b7fa 19692
c971b7fa 19693
6ec2e0f5
SDJ
19694 GNULIB_MEMRCHR=1
19695
19696
19697
19698
19699
19700$as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
19701
19702
19703
19704
2d8adcbd
MM
19705
19706
19707
19708 if test $ac_cv_func_mkstemp = yes; then
19709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mkstemp" >&5
19710$as_echo_n "checking for working mkstemp... " >&6; }
19711if test "${gl_cv_func_working_mkstemp+set}" = set; then :
19712 $as_echo_n "(cached) " >&6
19713else
19714
19715 mkdir conftest.mkstemp
19716 if test "$cross_compiling" = yes; then :
19717 case "$host_os" in
19718 # Guess yes on glibc systems.
19719 *-gnu*) gl_cv_func_working_mkstemp="guessing yes" ;;
19720 # If we don't know, assume the worst.
19721 *) gl_cv_func_working_mkstemp="guessing no" ;;
19722 esac
19723
19724else
19725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19726/* end confdefs.h. */
19727$ac_includes_default
19728int
19729main ()
19730{
19731int result = 0;
19732 int i;
19733 off_t large = (off_t) 4294967295u;
19734 if (large < 0)
19735 large = 2147483647;
19736 umask (0);
19737 for (i = 0; i < 70; i++)
19738 {
19739 char templ[] = "conftest.mkstemp/coXXXXXX";
19740 int (*mkstemp_function) (char *) = mkstemp;
19741 int fd = mkstemp_function (templ);
19742 if (fd < 0)
19743 result |= 1;
19744 else
19745 {
19746 struct stat st;
19747 if (lseek (fd, large, SEEK_SET) != large)
19748 result |= 2;
19749 if (fstat (fd, &st) < 0)
19750 result |= 4;
19751 else if (st.st_mode & 0077)
19752 result |= 8;
19753 if (close (fd))
19754 result |= 16;
19755 }
19756 }
19757 return result;
19758 ;
19759 return 0;
19760}
19761_ACEOF
19762if ac_fn_c_try_run "$LINENO"; then :
19763 gl_cv_func_working_mkstemp=yes
19764else
19765 gl_cv_func_working_mkstemp=no
19766fi
19767rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19768 conftest.$ac_objext conftest.beam conftest.$ac_ext
19769fi
19770
19771 rm -rf conftest.mkstemp
19772
19773fi
19774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mkstemp" >&5
19775$as_echo "$gl_cv_func_working_mkstemp" >&6; }
19776 case "$gl_cv_func_working_mkstemp" in
19777 *yes) ;;
19778 *)
19779 REPLACE_MKSTEMP=1
19780 ;;
19781 esac
19782 else
19783 HAVE_MKSTEMP=0
19784 fi
19785
19786 if test $HAVE_MKSTEMP = 0 || test $REPLACE_MKSTEMP = 1; then
19787
19788
19789
19790
19791
19792
19793
19794
19795 gl_LIBOBJS="$gl_LIBOBJS mkstemp.$ac_objext"
19796
19797
19798
19799 fi
19800
19801
19802
19803
19804
19805 GNULIB_MKSTEMP=1
19806
19807
19808
19809
19810
19811$as_echo "#define GNULIB_TEST_MKSTEMP 1" >>confdefs.h
19812
19813
19814
19815
6ec2e0f5
SDJ
19816 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
19817
19818
19819
c971b7fa 19820
c971b7fa 19821
c971b7fa
PA
19822
19823
8690e634 19824
6ec2e0f5 19825 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
8690e634 19826
6ec2e0f5 19827 fi
8690e634 19828
6ec2e0f5 19829 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
8690e634
JK
19830
19831
19832
19833
19834
19835
8690e634
JK
19836
19837
6ec2e0f5 19838 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
8690e634 19839
a512b375 19840 fi
8690e634
JK
19841
19842
19843
6ec2e0f5
SDJ
19844 case "$host_os" in
19845 mingw* | pw*)
19846 REPLACE_OPEN=1
19847 ;;
19848 *)
19849
19850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
19851$as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
19852if test "${gl_cv_func_open_slash+set}" = set; then :
19853 $as_echo_n "(cached) " >&6
19854else
19855 # Assume that if we have lstat, we can also check symlinks.
19856 if test $ac_cv_func_lstat = yes; then
19857 touch conftest.tmp
19858 ln -s conftest.tmp conftest.lnk
19859 fi
19860 if test "$cross_compiling" = yes; then :
8690e634 19861
6ec2e0f5
SDJ
19862 case "$host_os" in
19863 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
19864 gl_cv_func_open_slash="guessing no" ;;
19865 *)
19866 gl_cv_func_open_slash="guessing yes" ;;
19867 esac
8690e634 19868
6ec2e0f5
SDJ
19869else
19870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19871/* end confdefs.h. */
19872
19873#include <fcntl.h>
19874#if HAVE_UNISTD_H
19875# include <unistd.h>
19876#endif
19877int main ()
19878{
19879 int result = 0;
19880#if HAVE_LSTAT
19881 if (open ("conftest.lnk/", O_RDONLY) != -1)
19882 result |= 1;
19883#endif
19884 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
19885 result |= 2;
19886 return result;
19887}
19888_ACEOF
19889if ac_fn_c_try_run "$LINENO"; then :
19890 gl_cv_func_open_slash=yes
19891else
19892 gl_cv_func_open_slash=no
19893fi
19894rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19895 conftest.$ac_objext conftest.beam conftest.$ac_ext
19896fi
8690e634 19897
6ec2e0f5 19898 rm -f conftest.sl conftest.tmp conftest.lnk
8690e634 19899
6ec2e0f5
SDJ
19900fi
19901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
19902$as_echo "$gl_cv_func_open_slash" >&6; }
19903 case "$gl_cv_func_open_slash" in
19904 *no)
8690e634 19905
6ec2e0f5 19906$as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
8690e634 19907
6ec2e0f5
SDJ
19908 REPLACE_OPEN=1
19909 ;;
19910 esac
19911 ;;
19912 esac
8690e634 19913
6ec2e0f5 19914 if test $REPLACE_OPEN = 0; then
c971b7fa
PA
19915
19916
19917
6ec2e0f5
SDJ
19918 if test $ac_cv_func_fchdir = no; then
19919 HAVE_FCHDIR=0
19920 fi
c971b7fa 19921
6ec2e0f5
SDJ
19922 if test $HAVE_FCHDIR = 0; then
19923 REPLACE_OPEN=1
19924 fi
19925 fi
c971b7fa
PA
19926
19927
19928
6ec2e0f5 19929 if test $REPLACE_OPEN = 1; then
c971b7fa
PA
19930
19931
19932
19933
19934
c971b7fa
PA
19935
19936
c971b7fa 19937
6ec2e0f5 19938 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
c971b7fa 19939
c971b7fa
PA
19940
19941
6ec2e0f5
SDJ
19942 :
19943
a512b375 19944 fi
c971b7fa
PA
19945
19946
19947
19948
19949
6ec2e0f5 19950 GNULIB_OPEN=1
c971b7fa
PA
19951
19952
19953
19954
19955
6ec2e0f5 19956$as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
c971b7fa
PA
19957
19958
19959
19960
19961
c971b7fa 19962
c971b7fa 19963
63ce7108 19964
6ec2e0f5
SDJ
19965 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
19966 yes+*yes)
19967 ;;
19968 yes+*)
19969 # Solaris 9 has *at functions, but uniformly mishandles trailing
19970 # slash in all of them.
19971 REPLACE_OPENAT=1
19972 ;;
19973 *)
19974 HAVE_OPENAT=0
19975 ;;
19976 esac
63ce7108 19977
6ec2e0f5 19978 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
63ce7108 19979
63ce7108 19980
63ce7108 19981
63ce7108 19982
63ce7108
TT
19983
19984
63ce7108 19985
63ce7108 19986
6ec2e0f5 19987 gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
63ce7108
TT
19988
19989
19990
6ec2e0f5 19991 :
63ce7108 19992
6ec2e0f5 19993 fi
63ce7108
TT
19994
19995
6ec2e0f5
SDJ
19996cat >>confdefs.h <<_ACEOF
19997#define GNULIB_OPENAT 1
19998_ACEOF
63ce7108 19999
63ce7108 20000
63ce7108
TT
20001
20002
20003
20004
6ec2e0f5 20005 GNULIB_OPENAT=1
63ce7108 20006
63ce7108 20007
63ce7108 20008
63ce7108 20009
63ce7108 20010
6ec2e0f5 20011$as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
63ce7108
TT
20012
20013
63ce7108 20014
63ce7108 20015
63ce7108 20016
63ce7108 20017
6ec2e0f5
SDJ
20018 for ac_func in opendir
20019do :
20020 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
20021if test "x$ac_cv_func_opendir" = x""yes; then :
20022 cat >>confdefs.h <<_ACEOF
20023#define HAVE_OPENDIR 1
63ce7108 20024_ACEOF
6ec2e0f5 20025
63ce7108 20026fi
6ec2e0f5 20027done
63ce7108 20028
6ec2e0f5
SDJ
20029 if test $ac_cv_func_opendir = no; then
20030 HAVE_OPENDIR=0
20031 fi
63ce7108 20032
6ec2e0f5
SDJ
20033
20034
20035
20036 if test $ac_cv_func_fchdir = no; then
20037 HAVE_FCHDIR=0
63ce7108 20038 fi
63ce7108 20039
6ec2e0f5
SDJ
20040 if test $HAVE_FCHDIR = 0; then
20041 if test $HAVE_OPENDIR = 1; then
20042 REPLACE_OPENDIR=1
20043 fi
20044 fi
20045
20046 case $host_os,$HAVE_OPENDIR in
20047 os2*,1)
20048 REPLACE_OPENDIR=1;;
20049 esac
20050
20051 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
63ce7108
TT
20052
20053
20054
20055
20056
20057
20058
20059
6ec2e0f5 20060 gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
63ce7108
TT
20061
20062 fi
20063
20064
20065
20066
20067
6ec2e0f5 20068 GNULIB_OPENDIR=1
63ce7108
TT
20069
20070
20071
20072
63ce7108 20073
6ec2e0f5 20074$as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
63ce7108
TT
20075
20076
20077
20078
20079
20080
20081
2196f55f
YQ
20082
20083
8424cc97
SM
20084
20085 for ac_func in rawmemchr
20086do :
20087 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
20088if test "x$ac_cv_func_rawmemchr" = x""yes; then :
20089 cat >>confdefs.h <<_ACEOF
20090#define HAVE_RAWMEMCHR 1
20091_ACEOF
20092
20093fi
20094done
20095
20096 if test $ac_cv_func_rawmemchr = no; then
20097 HAVE_RAWMEMCHR=0
20098 fi
20099
20100 if test $HAVE_RAWMEMCHR = 0; then
20101
20102
20103
20104
20105
20106
20107
20108
20109 gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
20110
20111 :
20112 fi
20113
20114
20115
20116
20117
20118 GNULIB_RAWMEMCHR=1
20119
20120
20121
20122
20123
20124$as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
20125
20126
20127
20128
20129
20130
6ec2e0f5
SDJ
20131 for ac_func in readdir
20132do :
20133 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
20134if test "x$ac_cv_func_readdir" = x""yes; then :
20135 cat >>confdefs.h <<_ACEOF
20136#define HAVE_READDIR 1
20137_ACEOF
20138
20139fi
20140done
20141
20142 if test $ac_cv_func_readdir = no; then
20143 HAVE_READDIR=0
20144 fi
20145
20146 if test $HAVE_READDIR = 0; then
20147
20148
20149
20150
20151
20152
20153
20154
20155 gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
20156
20157 fi
20158
20159
20160
20161
20162
20163 GNULIB_READDIR=1
20164
20165
20166
20167
20168
20169$as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
20170
20171
20172
20173
20174
20175
2196f55f
YQ
20176 if test $ac_cv_func_readlink = no; then
20177 HAVE_READLINK=0
20178 else
20179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
20180$as_echo_n "checking whether readlink signature is correct... " >&6; }
20181if test "${gl_cv_decl_readlink_works+set}" = set; then :
20182 $as_echo_n "(cached) " >&6
20183else
20184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20185/* end confdefs.h. */
20186#include <unistd.h>
20187 /* Cause compilation failure if original declaration has wrong type. */
20188 ssize_t readlink (const char *, char *, size_t);
20189int
20190main ()
20191{
20192
20193 ;
20194 return 0;
20195}
20196_ACEOF
20197if ac_fn_c_try_compile "$LINENO"; then :
20198 gl_cv_decl_readlink_works=yes
20199else
20200 gl_cv_decl_readlink_works=no
20201fi
20202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20203fi
20204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
20205$as_echo "$gl_cv_decl_readlink_works" >&6; }
20206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
20207$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
20208if test "${gl_cv_func_readlink_works+set}" = set; then :
20209 $as_echo_n "(cached) " >&6
20210else
20211 # We have readlink, so assume ln -s works.
20212 ln -s conftest.no-such conftest.link
20213 ln -s conftest.link conftest.lnk2
20214 if test "$cross_compiling" = yes; then :
20215 case "$host_os" in
20216 # Guess yes on glibc systems.
20217 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
20218 # If we don't know, assume the worst.
20219 *) gl_cv_func_readlink_works="guessing no" ;;
20220 esac
20221
20222else
20223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20224/* end confdefs.h. */
20225#include <unistd.h>
20226
20227int
20228main ()
20229{
20230char buf[20];
20231 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
20232 ;
20233 return 0;
20234}
20235_ACEOF
20236if ac_fn_c_try_run "$LINENO"; then :
20237 gl_cv_func_readlink_works=yes
20238else
20239 gl_cv_func_readlink_works=no
20240fi
20241rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20242 conftest.$ac_objext conftest.beam conftest.$ac_ext
20243fi
20244
20245 rm -f conftest.link conftest.lnk2
20246fi
20247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
20248$as_echo "$gl_cv_func_readlink_works" >&6; }
20249 case "$gl_cv_func_readlink_works" in
20250 *yes)
20251 if test "$gl_cv_decl_readlink_works" != yes; then
20252 REPLACE_READLINK=1
20253 fi
20254 ;;
20255 *)
20256
20257$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
20258
20259 REPLACE_READLINK=1
20260 ;;
20261 esac
20262 fi
20263
20264 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
20265
20266
20267
20268
20269
20270
20271
20272
20273 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
20274
20275
20276 :
20277
20278 fi
20279
20280
20281
20282
20283
20284 GNULIB_READLINK=1
20285
20286
20287
20288
20289
20290$as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
20291
20292
20293
20294
6a29c58e
YQ
20295
20296
6ec2e0f5
SDJ
20297 if test $gl_cv_func_malloc_posix = yes; then
20298
20299$as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
20300
20301 else
20302 REPLACE_REALLOC=1
20303 fi
20304
20305 if test $REPLACE_REALLOC = 1; then
20306
20307
20308
20309
20310
20311
20312
20313
20314 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
20315
20316 fi
20317
20318
20319
20320
20321
20322 GNULIB_REALLOC_POSIX=1
20323
20324
20325
20326
20327
20328$as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
20329
20330
20331
20332
20333
20334
6a29c58e
YQ
20335
20336
20337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
20338$as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
20339if test "${gl_cv_func_rename_slash_dst_works+set}" = set; then :
20340 $as_echo_n "(cached) " >&6
20341else
20342 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
20343 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
20344 as_fn_error "cannot create temporary files" "$LINENO" 5
20345 # Assume that if we have lstat, we can also check symlinks.
20346 if test $ac_cv_func_lstat = yes; then
20347 ln -s conftest.f conftest.lnk
20348 fi
20349 if test "$cross_compiling" = yes; then :
20350 case "$host_os" in
20351 # Guess yes on glibc systems.
20352 *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
20353 # If we don't know, assume the worst.
20354 *) gl_cv_func_rename_slash_dst_works="guessing no" ;;
20355 esac
20356
20357else
20358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20359/* end confdefs.h. */
20360
20361# include <stdio.h>
20362# include <stdlib.h>
20363
20364int
20365main ()
20366{
20367int result = 0;
20368 if (rename ("conftest.f1", "conftest.f2/") == 0)
20369 result |= 1;
20370 if (rename ("conftest.d1", "conftest.d2/") != 0)
20371 result |= 2;
20372#if HAVE_LSTAT
20373 if (rename ("conftest.f", "conftest.lnk/") == 0)
20374 result |= 4;
20375#endif
20376 return result;
20377
20378 ;
20379 return 0;
20380}
20381_ACEOF
20382if ac_fn_c_try_run "$LINENO"; then :
20383 gl_cv_func_rename_slash_dst_works=yes
20384else
20385 gl_cv_func_rename_slash_dst_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 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
20392
20393fi
20394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
20395$as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
20396 case "$gl_cv_func_rename_slash_dst_works" in
20397 *yes) ;;
20398 *)
20399 REPLACE_RENAME=1
20400
20401$as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
20402
20403 ;;
20404 esac
20405
20406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
20407$as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
20408if test "${gl_cv_func_rename_slash_src_works+set}" = set; then :
20409 $as_echo_n "(cached) " >&6
20410else
20411 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
20412 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
20413 as_fn_error "cannot create temporary files" "$LINENO" 5
20414 # Assume that if we have lstat, we can also check symlinks.
20415 if test $ac_cv_func_lstat = yes; then
20416 ln -s conftest.f conftest.lnk
20417 fi
20418 if test "$cross_compiling" = yes; then :
20419 case "$host_os" in
20420 # Guess yes on glibc systems.
20421 *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
20422 # If we don't know, assume the worst.
20423 *) gl_cv_func_rename_slash_src_works="guessing no" ;;
20424 esac
20425
20426else
20427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20428/* end confdefs.h. */
20429
20430# include <stdio.h>
20431# include <stdlib.h>
20432
20433int
20434main ()
20435{
20436int result = 0;
20437 if (rename ("conftest.f1/", "conftest.d3") == 0)
20438 result |= 1;
20439 if (rename ("conftest.d1/", "conftest.d2") != 0)
20440 result |= 2;
20441#if HAVE_LSTAT
20442 if (rename ("conftest.lnk/", "conftest.f") == 0)
20443 result |= 4;
20444#endif
20445 return result;
20446
20447 ;
20448 return 0;
20449}
20450_ACEOF
20451if ac_fn_c_try_run "$LINENO"; then :
20452 gl_cv_func_rename_slash_src_works=yes
20453else
20454 gl_cv_func_rename_slash_src_works=no
20455fi
20456rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20457 conftest.$ac_objext conftest.beam conftest.$ac_ext
20458fi
20459
20460 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
20461
20462fi
20463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
20464$as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
20465 case "$gl_cv_func_rename_slash_src_works" in
20466 *yes) ;;
20467 *)
20468 REPLACE_RENAME=1
20469
20470$as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
20471
20472 ;;
20473 esac
20474
20475
20476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
20477$as_echo_n "checking whether rename manages hard links correctly... " >&6; }
20478if test "${gl_cv_func_rename_link_works+set}" = set; then :
20479 $as_echo_n "(cached) " >&6
20480else
20481 if test $ac_cv_func_link = yes; then
20482 rm -rf conftest.f conftest.f1
20483 if touch conftest.f && ln conftest.f conftest.f1 &&
20484 set x `ls -i conftest.f conftest.f1` && test "" = ""; then
20485 if test "$cross_compiling" = yes; then :
20486 case "$host_os" in
20487 # Guess yes on glibc systems.
20488 *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
20489 # If we don't know, assume the worst.
20490 *) gl_cv_func_rename_link_works="guessing no" ;;
20491 esac
20492
20493else
20494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20495/* end confdefs.h. */
20496
20497# include <stdio.h>
20498# include <stdlib.h>
20499# include <unistd.h>
20500
20501int
20502main ()
20503{
20504int result = 0;
20505 if (rename ("conftest.f", "conftest.f1"))
20506 result |= 1;
20507 if (unlink ("conftest.f1"))
20508 result |= 2;
20509 if (rename ("conftest.f", "conftest.f"))
20510 result |= 4;
20511 if (rename ("conftest.f1", "conftest.f1") == 0)
20512 result |= 8;
20513 return result;
20514
20515 ;
20516 return 0;
20517}
20518_ACEOF
20519if ac_fn_c_try_run "$LINENO"; then :
20520 gl_cv_func_rename_link_works=yes
20521else
20522 gl_cv_func_rename_link_works=no
20523fi
20524rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20525 conftest.$ac_objext conftest.beam conftest.$ac_ext
20526fi
20527
20528 else
20529 gl_cv_func_rename_link_works="guessing no"
20530 fi
20531 rm -rf conftest.f conftest.f1
20532 else
20533 gl_cv_func_rename_link_works=yes
20534 fi
20535
20536fi
20537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
20538$as_echo "$gl_cv_func_rename_link_works" >&6; }
20539 case "$gl_cv_func_rename_link_works" in
20540 *yes) ;;
20541 *)
20542 REPLACE_RENAME=1
20543
20544$as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
20545
20546 ;;
20547 esac
20548
20549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
20550$as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
20551if test "${gl_cv_func_rename_dest_works+set}" = set; then :
20552 $as_echo_n "(cached) " >&6
20553else
20554 rm -rf conftest.f conftest.d1 conftest.d2
20555 touch conftest.f && mkdir conftest.d1 conftest.d2 ||
20556 as_fn_error "cannot create temporary files" "$LINENO" 5
20557 if test "$cross_compiling" = yes; then :
20558 case "$host_os" in
20559 # Guess yes on glibc systems.
20560 *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
20561 # If we don't know, assume the worst.
20562 *) gl_cv_func_rename_dest_works="guessing no" ;;
20563 esac
20564
20565else
20566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20567/* end confdefs.h. */
20568
20569# include <stdio.h>
20570# include <stdlib.h>
20571
20572int
20573main ()
20574{
20575int result = 0;
20576 if (rename ("conftest.d1", "conftest.d2") != 0)
20577 result |= 1;
20578 if (rename ("conftest.d2", "conftest.f") == 0)
20579 result |= 2;
20580 return result;
20581
20582 ;
20583 return 0;
20584}
20585_ACEOF
20586if ac_fn_c_try_run "$LINENO"; then :
20587 gl_cv_func_rename_dest_works=yes
20588else
20589 gl_cv_func_rename_dest_works=no
20590fi
20591rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20592 conftest.$ac_objext conftest.beam conftest.$ac_ext
20593fi
20594
20595 rm -rf conftest.f conftest.d1 conftest.d2
20596
20597fi
20598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
20599$as_echo "$gl_cv_func_rename_dest_works" >&6; }
20600 case "$gl_cv_func_rename_dest_works" in
20601 *yes) ;;
20602 *)
20603 REPLACE_RENAME=1
20604
20605$as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
20606
20607 ;;
20608 esac
20609
20610 if test $REPLACE_RENAME = 1; then
20611
20612
20613
20614
20615
20616
20617
20618
20619 gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
20620
20621 fi
20622
20623
20624
20625
20626
20627 GNULIB_RENAME=1
20628
20629
20630
20631
20632
20633$as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
20634
20635
20636
20637
20638
20639
6ec2e0f5
SDJ
20640 for ac_func in rewinddir
20641do :
20642 ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
20643if test "x$ac_cv_func_rewinddir" = x""yes; then :
20644 cat >>confdefs.h <<_ACEOF
20645#define HAVE_REWINDDIR 1
20646_ACEOF
20647
20648fi
20649done
20650
20651 if test $ac_cv_func_rewinddir = no; then
20652 HAVE_REWINDDIR=0
20653 fi
20654
20655 if test $HAVE_REWINDDIR = 0; then
20656
20657
20658
20659
20660
20661
20662
20663
20664 gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
20665
20666 fi
20667
20668
20669
20670
20671
20672 GNULIB_REWINDDIR=1
20673
20674
20675
20676
20677
20678$as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
20679
20680
20681
20682
20683
20684
6a29c58e
YQ
20685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
20686$as_echo_n "checking whether rmdir works... " >&6; }
20687if test "${gl_cv_func_rmdir_works+set}" = set; then :
20688 $as_echo_n "(cached) " >&6
20689else
20690 mkdir conftest.dir
20691 touch conftest.file
20692 if test "$cross_compiling" = yes; then :
20693 case "$host_os" in
20694 # Guess yes on glibc systems.
20695 *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
20696 # If we don't know, assume the worst.
20697 *) gl_cv_func_rmdir_works="guessing no" ;;
20698 esac
20699
20700else
20701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20702/* end confdefs.h. */
20703#include <stdio.h>
20704 #include <errno.h>
20705 #if HAVE_UNISTD_H
20706 # include <unistd.h>
20707 #else /* on Windows with MSVC */
20708 # include <direct.h>
20709 #endif
20710
20711int
20712main ()
20713{
20714int result = 0;
20715 if (!rmdir ("conftest.file/"))
20716 result |= 1;
20717 else if (errno != ENOTDIR)
20718 result |= 2;
20719 if (!rmdir ("conftest.dir/./"))
20720 result |= 4;
20721 return result;
20722
20723 ;
20724 return 0;
20725}
20726_ACEOF
20727if ac_fn_c_try_run "$LINENO"; then :
20728 gl_cv_func_rmdir_works=yes
20729else
20730 gl_cv_func_rmdir_works=no
20731fi
20732rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20733 conftest.$ac_objext conftest.beam conftest.$ac_ext
20734fi
20735
20736 rm -rf conftest.dir conftest.file
20737fi
20738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
20739$as_echo "$gl_cv_func_rmdir_works" >&6; }
20740 case "$gl_cv_func_rmdir_works" in
20741 *yes) ;;
20742 *)
20743 REPLACE_RMDIR=1
20744 ;;
20745 esac
20746
20747 if test $REPLACE_RMDIR = 1; then
20748
20749
20750
20751
20752
20753
20754
20755
20756 gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
20757
20758 fi
20759
20760
20761
20762
20763
20764 GNULIB_RMDIR=1
20765
20766
20767
20768
20769
20770$as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
20771
20772
20773
20774
0750520d 20775
6ec2e0f5
SDJ
20776
20777
20778
2d8adcbd
MM
20779
20780
20781
20782 if test $ac_cv_func_secure_getenv = no; then
20783 HAVE_SECURE_GETENV=0
20784 fi
20785
20786 if test $HAVE_SECURE_GETENV = 0; then
20787
20788
20789
20790
20791
20792
20793
20794
20795 gl_LIBOBJS="$gl_LIBOBJS secure_getenv.$ac_objext"
20796
20797
20798 for ac_func in __secure_getenv
20799do :
20800 ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
20801if test "x$ac_cv_func___secure_getenv" = x""yes; then :
20802 cat >>confdefs.h <<_ACEOF
20803#define HAVE___SECURE_GETENV 1
20804_ACEOF
20805
20806fi
20807done
20808
20809 if test $ac_cv_func___secure_getenv = no; then
20810 for ac_func in issetugid
20811do :
20812 ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
20813if test "x$ac_cv_func_issetugid" = x""yes; then :
20814 cat >>confdefs.h <<_ACEOF
20815#define HAVE_ISSETUGID 1
20816_ACEOF
20817
20818fi
20819done
20820
20821 fi
20822
20823
20824 fi
20825
20826
20827
20828
20829
20830 GNULIB_SECURE_GETENV=1
20831
20832
20833
20834
20835
20836$as_echo "#define GNULIB_TEST_SECURE_GETENV 1" >>confdefs.h
20837
20838
20839
20840
20841
3d99e817
AK
20842 if test $ac_cv_func_setenv = no; then
20843 HAVE_SETENV=0
20844 else
20845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
20846$as_echo_n "checking whether setenv validates arguments... " >&6; }
20847if test "${gl_cv_func_setenv_works+set}" = set; then :
20848 $as_echo_n "(cached) " >&6
20849else
20850 if test "$cross_compiling" = yes; then :
20851 case "$host_os" in
20852 # Guess yes on glibc systems.
20853 *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
20854 # If we don't know, assume the worst.
20855 *) gl_cv_func_setenv_works="guessing no" ;;
20856 esac
20857
20858else
20859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20860/* end confdefs.h. */
20861
20862 #include <stdlib.h>
20863 #include <errno.h>
20864 #include <string.h>
20865
20866int
20867main ()
20868{
20869
20870 int result = 0;
20871 {
20872 if (setenv ("", "", 0) != -1)
20873 result |= 1;
20874 else if (errno != EINVAL)
20875 result |= 2;
20876 }
20877 {
20878 if (setenv ("a", "=", 1) != 0)
20879 result |= 4;
20880 else if (strcmp (getenv ("a"), "=") != 0)
20881 result |= 8;
20882 }
20883 return result;
20884
20885 ;
20886 return 0;
20887}
20888_ACEOF
20889if ac_fn_c_try_run "$LINENO"; then :
20890 gl_cv_func_setenv_works=yes
20891else
20892 gl_cv_func_setenv_works=no
20893fi
20894rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20895 conftest.$ac_objext conftest.beam conftest.$ac_ext
20896fi
20897
20898fi
20899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
20900$as_echo "$gl_cv_func_setenv_works" >&6; }
20901 case "$gl_cv_func_setenv_works" in
20902 *yes) ;;
20903 *)
20904 REPLACE_SETENV=1
20905 ;;
20906 esac
20907 fi
20908
20909 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
20910
20911
20912
20913
20914
20915
20916
20917
20918 gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
20919
20920 fi
20921
20922
20923
20924
20925
20926 GNULIB_SETENV=1
20927
20928
20929
20930
20931
20932$as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
20933
20934
20935
20936
20937
0750520d
PA
20938
20939
20940
20941
20942
20943
20944
20945
20946
20947 if test $gl_cv_have_include_next = yes; then
20948 gl_cv_next_signal_h='<'signal.h'>'
20949 else
20950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
20951$as_echo_n "checking absolute name of <signal.h>... " >&6; }
20952if test "${gl_cv_next_signal_h+set}" = set; then :
20953 $as_echo_n "(cached) " >&6
20954else
20955
20956
20957
20958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20959/* end confdefs.h. */
20960#include <signal.h>
20961_ACEOF
20962 case "$host_os" in
20963 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20964 *) gl_absname_cpp="$ac_cpp" ;;
20965 esac
20966
20967 case "$host_os" in
20968 mingw*)
20969 gl_dirsep_regex='[/\\]'
20970 ;;
20971 *)
20972 gl_dirsep_regex='\/'
20973 ;;
20974 esac
20975 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20976 gl_header_literal_regex=`echo 'signal.h' \
20977 | sed -e "$gl_make_literal_regex_sed"`
20978 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20979 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20980 s|^/[^/]|//&|
20981 p
20982 q
20983 }'
20984
20985 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20986 sed -n "$gl_absolute_header_sed"`
20987
20988 gl_header=$gl_cv_absolute_signal_h
20989 gl_cv_next_signal_h='"'$gl_header'"'
20990
20991
20992fi
20993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
20994$as_echo "$gl_cv_next_signal_h" >&6; }
20995 fi
20996 NEXT_SIGNAL_H=$gl_cv_next_signal_h
20997
20998 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20999 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21000 gl_next_as_first_directive='<'signal.h'>'
21001 else
21002 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21003 gl_next_as_first_directive=$gl_cv_next_signal_h
21004 fi
21005 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
21006
21007
21008
21009
21010
21011# AIX declares sig_atomic_t to already include volatile, and C89 compilers
21012# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
21013 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
21014#include <signal.h>
21015
21016"
21017if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
21018
21019else
21020 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
21021fi
21022
21023
21024
21025
21026
21027
21028
21029 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
21030#include <signal.h>
21031
21032"
21033if test "x$ac_cv_type_sighandler_t" = x""yes; then :
21034
21035else
21036 HAVE_SIGHANDLER_T=0
21037fi
21038
21039
21040
21041 for gl_func in pthread_sigmask sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask; do
21042 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
21043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
21044$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
21045if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
21046 $as_echo_n "(cached) " >&6
21047else
21048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21049/* end confdefs.h. */
21050#include <signal.h>
21051
21052int
21053main ()
21054{
21055#undef $gl_func
21056 (void) $gl_func;
21057 ;
21058 return 0;
21059}
21060_ACEOF
21061if ac_fn_c_try_compile "$LINENO"; then :
21062 eval "$as_gl_Symbol=yes"
21063else
21064 eval "$as_gl_Symbol=no"
21065fi
21066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21067fi
21068eval ac_res=\$$as_gl_Symbol
21069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21070$as_echo "$ac_res" >&6; }
21071 eval as_val=\$$as_gl_Symbol
21072 if test "x$as_val" = x""yes; then :
21073 cat >>confdefs.h <<_ACEOF
21074#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
21075_ACEOF
21076
21077 eval ac_cv_have_decl_$gl_func=yes
21078fi
21079 done
21080
21081
21082
63ce7108
TT
21083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
21084$as_echo_n "checking for ssize_t... " >&6; }
21085if test "${gt_cv_ssize_t+set}" = set; then :
21086 $as_echo_n "(cached) " >&6
21087else
21088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21089/* end confdefs.h. */
21090#include <sys/types.h>
21091int
21092main ()
21093{
21094int x = sizeof (ssize_t *) + sizeof (ssize_t);
21095 return !x;
21096 ;
21097 return 0;
21098}
21099_ACEOF
21100if ac_fn_c_try_compile "$LINENO"; then :
21101 gt_cv_ssize_t=yes
21102else
21103 gt_cv_ssize_t=no
21104fi
21105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21106fi
21107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
21108$as_echo "$gt_cv_ssize_t" >&6; }
21109 if test $gt_cv_ssize_t = no; then
21110
21111$as_echo "#define ssize_t int" >>confdefs.h
21112
21113 fi
21114
21115
21116
21117
2196f55f
YQ
21118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
21119$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
21120if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
21121 $as_echo_n "(cached) " >&6
21122else
21123 if test "$cross_compiling" = yes; then :
21124 case $host_os in
21125 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
21126 *) gl_cv_func_stat_dir_slash="guessing yes";;
21127 esac
21128else
21129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21130/* end confdefs.h. */
21131#include <sys/stat.h>
21132
21133int
21134main ()
21135{
21136struct stat st; return stat (".", &st) != stat ("./", &st);
21137 ;
21138 return 0;
21139}
21140_ACEOF
21141if ac_fn_c_try_run "$LINENO"; then :
21142 gl_cv_func_stat_dir_slash=yes
21143else
21144 gl_cv_func_stat_dir_slash=no
21145fi
21146rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21147 conftest.$ac_objext conftest.beam conftest.$ac_ext
21148fi
21149
21150fi
21151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
21152$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
21153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
21154$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
21155if test "${gl_cv_func_stat_file_slash+set}" = set; then :
21156 $as_echo_n "(cached) " >&6
21157else
21158 touch conftest.tmp
21159 # Assume that if we have lstat, we can also check symlinks.
21160 if test $ac_cv_func_lstat = yes; then
21161 ln -s conftest.tmp conftest.lnk
21162 fi
21163 if test "$cross_compiling" = yes; then :
21164 case "$host_os" in
21165 # Guess yes on glibc systems.
21166 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
21167 # If we don't know, assume the worst.
21168 *) gl_cv_func_stat_file_slash="guessing no" ;;
21169 esac
21170
21171else
21172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21173/* end confdefs.h. */
21174#include <sys/stat.h>
21175
21176int
21177main ()
21178{
21179int result = 0;
21180 struct stat st;
21181 if (!stat ("conftest.tmp/", &st))
21182 result |= 1;
21183#if HAVE_LSTAT
21184 if (!stat ("conftest.lnk/", &st))
21185 result |= 2;
21186#endif
21187 return result;
21188
21189 ;
21190 return 0;
21191}
21192_ACEOF
21193if ac_fn_c_try_run "$LINENO"; then :
21194 gl_cv_func_stat_file_slash=yes
21195else
21196 gl_cv_func_stat_file_slash=no
21197fi
21198rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21199 conftest.$ac_objext conftest.beam conftest.$ac_ext
21200fi
21201
21202 rm -f conftest.tmp conftest.lnk
21203fi
21204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
21205$as_echo "$gl_cv_func_stat_file_slash" >&6; }
21206 case $gl_cv_func_stat_dir_slash in
21207 *no) REPLACE_STAT=1
21208
21209$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
21210;;
21211 esac
21212 case $gl_cv_func_stat_file_slash in
21213 *no) REPLACE_STAT=1
21214
21215$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
21216;;
21217 esac
21218
21219 if test $REPLACE_STAT = 1; then
21220
21221
21222
21223
21224
21225
21226
21227
21228 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
21229
21230 :
21231 fi
21232
21233
21234
21235
21236
21237 GNULIB_STAT=1
21238
21239
21240
21241
21242
21243$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
21244
21245
21246
21247
21248
21249
63ce7108
TT
21250 # Define two additional variables used in the Makefile substitution.
21251
21252 if test "$ac_cv_header_stdbool_h" = yes; then
21253 STDBOOL_H=''
21254 else
21255 STDBOOL_H='stdbool.h'
21256 fi
21257
21258 if test -n "$STDBOOL_H"; then
21259 GL_GENERATE_STDBOOL_H_TRUE=
21260 GL_GENERATE_STDBOOL_H_FALSE='#'
21261else
21262 GL_GENERATE_STDBOOL_H_TRUE='#'
21263 GL_GENERATE_STDBOOL_H_FALSE=
21264fi
21265
21266
21267 if test "$ac_cv_type__Bool" = yes; then
21268 HAVE__BOOL=1
21269 else
21270 HAVE__BOOL=0
21271 fi
21272
21273
21274
21275
21276
21277 STDDEF_H=
4a626d0a
PA
21278 ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
21279
21280"
21281if test "x$ac_cv_type_max_align_t" = x""yes; then :
21282
21283else
21284 HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
21285fi
21286
63ce7108
TT
21287 if test $gt_cv_c_wchar_t = no; then
21288 HAVE_WCHAR_T=0
21289 STDDEF_H=stddef.h
21290 fi
21291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
21292$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
21293if test "${gl_cv_decl_null_works+set}" = set; then :
21294 $as_echo_n "(cached) " >&6
21295else
21296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21297/* end confdefs.h. */
21298#include <stddef.h>
21299 int test[2 * (sizeof NULL == sizeof (void *)) -1];
21300
21301int
21302main ()
21303{
21304
21305 ;
21306 return 0;
21307}
21308_ACEOF
21309if ac_fn_c_try_compile "$LINENO"; then :
21310 gl_cv_decl_null_works=yes
21311else
21312 gl_cv_decl_null_works=no
21313fi
21314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21315fi
21316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
21317$as_echo "$gl_cv_decl_null_works" >&6; }
21318 if test $gl_cv_decl_null_works = no; then
21319 REPLACE_NULL=1
21320 STDDEF_H=stddef.h
21321 fi
21322
21323 if test -n "$STDDEF_H"; then
21324 GL_GENERATE_STDDEF_H_TRUE=
21325 GL_GENERATE_STDDEF_H_FALSE='#'
21326else
21327 GL_GENERATE_STDDEF_H_TRUE='#'
21328 GL_GENERATE_STDDEF_H_FALSE=
21329fi
21330
21331 if test -n "$STDDEF_H"; then
21332
21333
21334
21335
21336
21337
21338
21339
21340 if test $gl_cv_have_include_next = yes; then
21341 gl_cv_next_stddef_h='<'stddef.h'>'
21342 else
21343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
21344$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
21345if test "${gl_cv_next_stddef_h+set}" = set; then :
21346 $as_echo_n "(cached) " >&6
21347else
21348
4a626d0a
PA
21349
21350
21351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63ce7108
TT
21352/* end confdefs.h. */
21353#include <stddef.h>
63ce7108 21354_ACEOF
4a626d0a
PA
21355 case "$host_os" in
21356 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21357 *) gl_absname_cpp="$ac_cpp" ;;
21358 esac
63ce7108 21359
4a626d0a
PA
21360 case "$host_os" in
21361 mingw*)
21362 gl_dirsep_regex='[/\\]'
21363 ;;
21364 *)
21365 gl_dirsep_regex='\/'
21366 ;;
21367 esac
21368 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21369 gl_header_literal_regex=`echo 'stddef.h' \
21370 | sed -e "$gl_make_literal_regex_sed"`
21371 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21372 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21373 s|^/[^/]|//&|
21374 p
21375 q
21376 }'
63ce7108 21377
4a626d0a
PA
21378 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21379 sed -n "$gl_absolute_header_sed"`
21380
21381 gl_header=$gl_cv_absolute_stddef_h
21382 gl_cv_next_stddef_h='"'$gl_header'"'
63ce7108
TT
21383
21384
21385fi
21386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
21387$as_echo "$gl_cv_next_stddef_h" >&6; }
21388 fi
21389 NEXT_STDDEF_H=$gl_cv_next_stddef_h
21390
21391 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21392 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21393 gl_next_as_first_directive='<'stddef.h'>'
21394 else
21395 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21396 gl_next_as_first_directive=$gl_cv_next_stddef_h
21397 fi
21398 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
21399
21400
21401
21402
21403 fi
21404
21405
21406
21407
49e4877c 21408 $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
63ce7108
TT
21409
21410
21411
98399780
YQ
21412
21413
21414
21415
21416
4a626d0a
PA
21417
21418
6a29c58e
YQ
21419 if test $gl_cv_have_include_next = yes; then
21420 gl_cv_next_stdio_h='<'stdio.h'>'
21421 else
21422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
21423$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
21424if test "${gl_cv_next_stdio_h+set}" = set; then :
21425 $as_echo_n "(cached) " >&6
21426else
21427
4a626d0a
PA
21428
21429
21430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6a29c58e
YQ
21431/* end confdefs.h. */
21432#include <stdio.h>
6a29c58e 21433_ACEOF
4a626d0a
PA
21434 case "$host_os" in
21435 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21436 *) gl_absname_cpp="$ac_cpp" ;;
21437 esac
21438
21439 case "$host_os" in
21440 mingw*)
21441 gl_dirsep_regex='[/\\]'
21442 ;;
21443 *)
21444 gl_dirsep_regex='\/'
21445 ;;
21446 esac
21447 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21448 gl_header_literal_regex=`echo 'stdio.h' \
21449 | sed -e "$gl_make_literal_regex_sed"`
21450 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21451 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21452 s|^/[^/]|//&|
21453 p
21454 q
21455 }'
6a29c58e 21456
4a626d0a
PA
21457 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21458 sed -n "$gl_absolute_header_sed"`
6a29c58e 21459
4a626d0a
PA
21460 gl_header=$gl_cv_absolute_stdio_h
21461 gl_cv_next_stdio_h='"'$gl_header'"'
6a29c58e
YQ
21462
21463
21464fi
21465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
21466$as_echo "$gl_cv_next_stdio_h" >&6; }
21467 fi
21468 NEXT_STDIO_H=$gl_cv_next_stdio_h
21469
21470 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21471 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21472 gl_next_as_first_directive='<'stdio.h'>'
21473 else
21474 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21475 gl_next_as_first_directive=$gl_cv_next_stdio_h
21476 fi
21477 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
21478
21479
21480
21481
21482
4a626d0a
PA
21483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
21484$as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
21485if test "${gl_cv_func_printf_attribute_flavor+set}" = set; then :
21486 $as_echo_n "(cached) " >&6
21487else
21488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21489/* end confdefs.h. */
21490
21491 #define __STDC_FORMAT_MACROS 1
21492 #include <stdio.h>
21493 #include <inttypes.h>
21494 /* For non-mingw systems, compilation will trivially succeed.
21495 For mingw, compilation will succeed for older mingw (system
21496 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
21497 #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
21498 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
21499 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
21500 #endif
21501
21502int
21503main ()
21504{
21505
21506 ;
21507 return 0;
21508}
21509_ACEOF
21510if ac_fn_c_try_compile "$LINENO"; then :
21511 gl_cv_func_printf_attribute_flavor=system
21512else
21513 gl_cv_func_printf_attribute_flavor=gnu
21514fi
21515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21516fi
21517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
21518$as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
21519 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
21520
21521$as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
21522
21523 fi
21524
6a29c58e
YQ
21525 GNULIB_FSCANF=1
21526
21527
21528cat >>confdefs.h <<_ACEOF
21529#define GNULIB_FSCANF 1
21530_ACEOF
21531
21532
21533 GNULIB_SCANF=1
21534
21535
21536cat >>confdefs.h <<_ACEOF
21537#define GNULIB_SCANF 1
21538_ACEOF
21539
21540
21541 GNULIB_FGETC=1
21542 GNULIB_GETC=1
21543 GNULIB_GETCHAR=1
21544 GNULIB_FGETS=1
21545 GNULIB_FREAD=1
21546
21547
21548 GNULIB_FPRINTF=1
21549 GNULIB_PRINTF=1
21550 GNULIB_VFPRINTF=1
21551 GNULIB_VPRINTF=1
21552 GNULIB_FPUTC=1
21553 GNULIB_PUTC=1
21554 GNULIB_PUTCHAR=1
21555 GNULIB_FPUTS=1
21556 GNULIB_PUTS=1
21557 GNULIB_FWRITE=1
21558
21559
21560
21561
21562 for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen renameat snprintf tmpfile vdprintf vsnprintf; do
21563 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
21564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
21565$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
21566if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
21567 $as_echo_n "(cached) " >&6
21568else
21569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21570/* end confdefs.h. */
21571#include <stdio.h>
21572
21573int
21574main ()
21575{
21576#undef $gl_func
21577 (void) $gl_func;
21578 ;
21579 return 0;
21580}
21581_ACEOF
21582if ac_fn_c_try_compile "$LINENO"; then :
21583 eval "$as_gl_Symbol=yes"
21584else
21585 eval "$as_gl_Symbol=no"
21586fi
21587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21588fi
21589eval ac_res=\$$as_gl_Symbol
21590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21591$as_echo "$ac_res" >&6; }
21592 eval as_val=\$$as_gl_Symbol
21593 if test "x$as_val" = x""yes; then :
21594 cat >>confdefs.h <<_ACEOF
21595#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
21596_ACEOF
21597
21598 eval ac_cv_have_decl_$gl_func=yes
21599fi
21600 done
21601
21602
21603
21604
21605
21606
21607
21608
21609
21610
21611
21612
98399780
YQ
21613 if test $gl_cv_have_include_next = yes; then
21614 gl_cv_next_stdlib_h='<'stdlib.h'>'
21615 else
21616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
21617$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
21618if test "${gl_cv_next_stdlib_h+set}" = set; then :
21619 $as_echo_n "(cached) " >&6
21620else
21621
4a626d0a
PA
21622
21623
21624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
98399780
YQ
21625/* end confdefs.h. */
21626#include <stdlib.h>
98399780 21627_ACEOF
4a626d0a
PA
21628 case "$host_os" in
21629 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21630 *) gl_absname_cpp="$ac_cpp" ;;
21631 esac
21632
21633 case "$host_os" in
21634 mingw*)
21635 gl_dirsep_regex='[/\\]'
21636 ;;
21637 *)
21638 gl_dirsep_regex='\/'
21639 ;;
21640 esac
21641 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21642 gl_header_literal_regex=`echo 'stdlib.h' \
21643 | sed -e "$gl_make_literal_regex_sed"`
21644 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21645 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21646 s|^/[^/]|//&|
21647 p
21648 q
21649 }'
98399780 21650
4a626d0a
PA
21651 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21652 sed -n "$gl_absolute_header_sed"`
98399780 21653
4a626d0a
PA
21654 gl_header=$gl_cv_absolute_stdlib_h
21655 gl_cv_next_stdlib_h='"'$gl_header'"'
98399780
YQ
21656
21657
21658fi
21659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
21660$as_echo "$gl_cv_next_stdlib_h" >&6; }
21661 fi
21662 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
21663
21664 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21665 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21666 gl_next_as_first_directive='<'stdlib.h'>'
21667 else
21668 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21669 gl_next_as_first_directive=$gl_cv_next_stdlib_h
21670 fi
21671 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
21672
21673
21674
21675
21676
21677
4c62b19f 21678 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
21679 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
21680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
21681$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
21682if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
21683 $as_echo_n "(cached) " >&6
21684else
21685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21686/* end confdefs.h. */
21687#include <stdlib.h>
21688#if HAVE_SYS_LOADAVG_H
21689# include <sys/loadavg.h>
21690#endif
21691#if HAVE_RANDOM_H
21692# include <random.h>
21693#endif
21694
21695int
21696main ()
21697{
21698#undef $gl_func
21699 (void) $gl_func;
21700 ;
21701 return 0;
21702}
21703_ACEOF
21704if ac_fn_c_try_compile "$LINENO"; then :
21705 eval "$as_gl_Symbol=yes"
21706else
21707 eval "$as_gl_Symbol=no"
21708fi
21709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21710fi
21711eval ac_res=\$$as_gl_Symbol
21712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21713$as_echo "$ac_res" >&6; }
21714 eval as_val=\$$as_gl_Symbol
21715 if test "x$as_val" = x""yes; then :
21716 cat >>confdefs.h <<_ACEOF
21717#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
21718_ACEOF
21719
21720 eval ac_cv_have_decl_$gl_func=yes
21721fi
21722 done
21723
21724
21725
21726
21727
21728
8424cc97
SM
21729 for ac_func in strchrnul
21730do :
21731 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
21732if test "x$ac_cv_func_strchrnul" = x""yes; then :
21733 cat >>confdefs.h <<_ACEOF
21734#define HAVE_STRCHRNUL 1
21735_ACEOF
21736
21737fi
21738done
21739
21740 if test $ac_cv_func_strchrnul = no; then
21741 HAVE_STRCHRNUL=0
21742 else
21743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
21744$as_echo_n "checking whether strchrnul works... " >&6; }
21745if test "${gl_cv_func_strchrnul_works+set}" = set; then :
21746 $as_echo_n "(cached) " >&6
21747else
21748 if test "$cross_compiling" = yes; then :
21749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21750/* end confdefs.h. */
21751
21752#if defined __CYGWIN__
21753 #include <cygwin/version.h>
21754 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
21755 Lucky user
21756 #endif
21757#else
21758 Lucky user
21759#endif
21760
21761_ACEOF
21762if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21763 $EGREP "Lucky user" >/dev/null 2>&1; then :
21764 gl_cv_func_strchrnul_works="guessing yes"
21765else
21766 gl_cv_func_strchrnul_works="guessing no"
21767fi
21768rm -f conftest*
21769
21770
21771else
21772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21773/* end confdefs.h. */
21774
21775#include <string.h> /* for strchrnul */
21776
21777int
21778main ()
21779{
21780const char *buf = "a";
21781 return strchrnul (buf, 'b') != buf + 1;
21782
21783 ;
21784 return 0;
21785}
21786_ACEOF
21787if ac_fn_c_try_run "$LINENO"; then :
21788 gl_cv_func_strchrnul_works=yes
21789else
21790 gl_cv_func_strchrnul_works=no
21791fi
21792rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21793 conftest.$ac_objext conftest.beam conftest.$ac_ext
21794fi
21795
21796
21797fi
21798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
21799$as_echo "$gl_cv_func_strchrnul_works" >&6; }
21800 case "$gl_cv_func_strchrnul_works" in
21801 *yes) ;;
21802 *) REPLACE_STRCHRNUL=1 ;;
21803 esac
21804 fi
21805
21806 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
21807
21808
21809
21810
21811
21812
21813
21814
21815 gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
21816
21817 :
21818 fi
21819
21820
21821
21822
21823
21824 GNULIB_STRCHRNUL=1
21825
21826
21827
21828
21829
21830$as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
21831
21832
21833
21834
21835
21836
21837
6ec2e0f5
SDJ
21838 if test $ac_cv_func_strdup = yes; then
21839 if test $gl_cv_func_malloc_posix != yes; then
21840 REPLACE_STRDUP=1
21841 fi
21842 fi
21843
21844 if test $ac_cv_have_decl_strdup = no; then
21845 HAVE_DECL_STRDUP=0
21846 fi
21847
21848 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
21849
21850
21851
21852
21853
21854
21855
21856
21857 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
21858
21859 :
21860 fi
21861
21862
21863
21864
21865
21866 GNULIB_STRDUP=1
21867
21868
21869
21870
21871
21872$as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
21873
21874
21875
21876
21877
21878
21879
21880
21881 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
21882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
21883$as_echo_n "checking for working strerror function... " >&6; }
21884if test "${gl_cv_func_working_strerror+set}" = set; then :
21885 $as_echo_n "(cached) " >&6
21886else
21887 if test "$cross_compiling" = yes; then :
21888 case "$host_os" in
21889 # Guess yes on glibc systems.
21890 *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
21891 # If we don't know, assume the worst.
21892 *) gl_cv_func_working_strerror="guessing no" ;;
21893 esac
21894
21895else
21896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21897/* end confdefs.h. */
21898#include <string.h>
21899
21900int
21901main ()
21902{
21903if (!*strerror (-2)) return 1;
21904 ;
21905 return 0;
21906}
21907_ACEOF
21908if ac_fn_c_try_run "$LINENO"; then :
21909 gl_cv_func_working_strerror=yes
21910else
21911 gl_cv_func_working_strerror=no
21912fi
21913rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21914 conftest.$ac_objext conftest.beam conftest.$ac_ext
21915fi
21916
21917
21918fi
21919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
21920$as_echo "$gl_cv_func_working_strerror" >&6; }
21921 case "$gl_cv_func_working_strerror" in
21922 *yes) ;;
21923 *)
21924 REPLACE_STRERROR=1
21925 ;;
21926 esac
21927
21928 else
21929 REPLACE_STRERROR=1
21930 fi
21931
21932 if test $REPLACE_STRERROR = 1; then
21933
21934
21935
21936
21937
21938
21939
21940
21941 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
21942
21943 fi
21944
21945
21946cat >>confdefs.h <<_ACEOF
21947#define GNULIB_STRERROR 1
21948_ACEOF
21949
21950
21951
21952
21953
21954
21955
21956 GNULIB_STRERROR=1
21957
21958
21959
21960
21961
21962$as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
21963
21964
21965
21966
21967
21968 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
21969
21970
21971
21972
21973
21974
21975
21976
21977 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
21978
21979
21980
21981
21982
21983 if test $ac_cv_header_sys_socket_h != yes; then
21984 for ac_header in winsock2.h
21985do :
21986 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
21987if test "x$ac_cv_header_winsock2_h" = x""yes; then :
21988 cat >>confdefs.h <<_ACEOF
21989#define HAVE_WINSOCK2_H 1
21990_ACEOF
21991
21992fi
21993
21994done
21995
21996 fi
21997 if test "$ac_cv_header_winsock2_h" = yes; then
21998 HAVE_WINSOCK2_H=1
21999 UNISTD_H_HAVE_WINSOCK2_H=1
22000 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
22001 else
22002 HAVE_WINSOCK2_H=0
22003 fi
22004
22005
22006 fi
22007
22008
22009
22010
98399780 22011
63ce7108
TT
22012 if test $REPLACE_STRSTR = 0; then
22013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
22014$as_echo_n "checking whether strstr works in linear time... " >&6; }
22015if test "${gl_cv_func_strstr_linear+set}" = set; then :
22016 $as_echo_n "(cached) " >&6
22017else
22018 if test "$cross_compiling" = yes; then :
22019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22020/* end confdefs.h. */
22021
22022#include <features.h>
22023#ifdef __GNU_LIBRARY__
22024 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
22025 && !(defined __i386__ || defined __x86_64__) \
22026 && !defined __UCLIBC__
22027 Lucky user
22028 #endif
22029#endif
22030#ifdef __CYGWIN__
22031 #include <cygwin/version.h>
22032 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
22033 Lucky user
22034 #endif
22035#endif
22036
22037_ACEOF
22038if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22039 $EGREP "Lucky user" >/dev/null 2>&1; then :
22040 gl_cv_func_strstr_linear="guessing yes"
c971b7fa 22041else
63ce7108 22042 gl_cv_func_strstr_linear="guessing no"
c971b7fa
PA
22043fi
22044rm -f conftest*
22045
22046
22047else
22048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22049/* end confdefs.h. */
22050
49e4877c
PA
22051#ifdef __MVS__
22052/* z/OS does not deliver signals while strstr() is running (thanks to
22053 restrictions on its LE runtime), which prevents us from limiting the
22054 running time of this test. */
22055# error "This test does not work properly on z/OS"
22056#endif
c971b7fa 22057#include <signal.h> /* for signal */
63ce7108 22058#include <string.h> /* for strstr */
c971b7fa
PA
22059#include <stdlib.h> /* for malloc */
22060#include <unistd.h> /* for alarm */
49e4877c 22061static void quit (int sig) { _exit (sig + 128); }
c971b7fa
PA
22062
22063int
22064main ()
22065{
22066
22067 int result = 0;
22068 size_t m = 1000000;
63ce7108
TT
22069 char *haystack = (char *) malloc (2 * m + 2);
22070 char *needle = (char *) malloc (m + 2);
c971b7fa 22071 /* Failure to compile this test due to missing alarm is okay,
63ce7108 22072 since all such platforms (mingw) also have quadratic strstr. */
c971b7fa
PA
22073 signal (SIGALRM, quit);
22074 alarm (5);
22075 /* Check for quadratic performance. */
22076 if (haystack && needle)
22077 {
22078 memset (haystack, 'A', 2 * m);
22079 haystack[2 * m] = 'B';
63ce7108 22080 haystack[2 * m + 1] = 0;
c971b7fa
PA
22081 memset (needle, 'A', m);
22082 needle[m] = 'B';
63ce7108
TT
22083 needle[m + 1] = 0;
22084 if (!strstr (haystack, needle))
c971b7fa
PA
22085 result |= 1;
22086 }
22087 return result;
22088
22089 ;
22090 return 0;
22091}
22092_ACEOF
22093if ac_fn_c_try_run "$LINENO"; then :
63ce7108 22094 gl_cv_func_strstr_linear=yes
c971b7fa 22095else
63ce7108 22096 gl_cv_func_strstr_linear=no
c971b7fa
PA
22097fi
22098rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22099 conftest.$ac_objext conftest.beam conftest.$ac_ext
22100fi
22101
22102
22103fi
63ce7108
TT
22104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
22105$as_echo "$gl_cv_func_strstr_linear" >&6; }
22106 case "$gl_cv_func_strstr_linear" in
40a73391
JK
22107 *yes) ;;
22108 *)
63ce7108 22109 REPLACE_STRSTR=1
40a73391
JK
22110 ;;
22111 esac
c971b7fa
PA
22112 fi
22113
63ce7108 22114 if test $REPLACE_STRSTR = 1; then
c971b7fa
PA
22115
22116
22117
22118
22119
22120
22121
22122
63ce7108 22123 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
c971b7fa 22124
a512b375 22125 fi
c971b7fa
PA
22126
22127
22128
63ce7108
TT
22129 if test "$gl_cv_func_memchr_works" != yes; then
22130 REPLACE_STRSTR=1
c971b7fa 22131 else
63ce7108
TT
22132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
22133$as_echo_n "checking whether strstr works... " >&6; }
22134if test "${gl_cv_func_strstr_works_always+set}" = set; then :
c971b7fa
PA
22135 $as_echo_n "(cached) " >&6
22136else
22137 if test "$cross_compiling" = yes; then :
63ce7108 22138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
22139/* end confdefs.h. */
22140
22141#ifdef __GNU_LIBRARY__
22142 #include <features.h>
63ce7108 22143 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
c971b7fa
PA
22144 || defined __UCLIBC__
22145 Lucky user
22146 #endif
22147#elif defined __CYGWIN__
22148 #include <cygwin/version.h>
22149 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
22150 Lucky user
22151 #endif
22152#else
22153 Lucky user
22154#endif
22155
22156_ACEOF
22157if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22158 $EGREP "Lucky user" >/dev/null 2>&1; then :
63ce7108 22159 gl_cv_func_strstr_works_always="guessing yes"
c971b7fa 22160else
63ce7108 22161 gl_cv_func_strstr_works_always="guessing no"
c971b7fa
PA
22162fi
22163rm -f conftest*
22164
22165
22166else
22167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22168/* end confdefs.h. */
22169
63ce7108 22170#include <string.h> /* for strstr */
c971b7fa
PA
22171#define P "_EF_BF_BD"
22172#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
22173#define NEEDLE P P P P P
22174
22175int
22176main ()
22177{
63ce7108 22178return !!strstr (HAYSTACK, NEEDLE);
c971b7fa
PA
22179
22180 ;
22181 return 0;
22182}
22183_ACEOF
22184if ac_fn_c_try_run "$LINENO"; then :
63ce7108 22185 gl_cv_func_strstr_works_always=yes
c971b7fa 22186else
63ce7108 22187 gl_cv_func_strstr_works_always=no
c971b7fa
PA
22188fi
22189rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22190 conftest.$ac_objext conftest.beam conftest.$ac_ext
22191fi
22192
22193
22194fi
63ce7108
TT
22195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
22196$as_echo "$gl_cv_func_strstr_works_always" >&6; }
22197 case "$gl_cv_func_strstr_works_always" in
40a73391
JK
22198 *yes) ;;
22199 *)
63ce7108 22200 REPLACE_STRSTR=1
40a73391
JK
22201 ;;
22202 esac
c971b7fa 22203 fi
8839a007 22204
63ce7108 22205 if test $REPLACE_STRSTR = 1; then
8839a007 22206
8690e634
JK
22207
22208
8690e634
JK
22209
22210
22211
22212
22213
63ce7108 22214 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
8690e634 22215
8690e634
JK
22216 fi
22217
8690e634
JK
22218
22219
8690e634 22220
8690e634 22221
63ce7108 22222 GNULIB_STRSTR=1
8690e634
JK
22223
22224
22225
8690e634
JK
22226
22227
63ce7108 22228$as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
8690e634
JK
22229
22230
22231
22232
22233
22234
22235
421693b0
PA
22236 for ac_func in strtok_r
22237do :
22238 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
22239if test "x$ac_cv_func_strtok_r" = x""yes; then :
22240 cat >>confdefs.h <<_ACEOF
22241#define HAVE_STRTOK_R 1
22242_ACEOF
22243
22244fi
22245done
22246
22247 if test $ac_cv_func_strtok_r = yes; then
22248 HAVE_STRTOK_R=1
22249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5
22250$as_echo_n "checking whether strtok_r works... " >&6; }
22251if test "${gl_cv_func_strtok_r_works+set}" = set; then :
22252 $as_echo_n "(cached) " >&6
22253else
22254 if test "$cross_compiling" = yes; then :
22255
22256 case "$host_os" in
22257 # Guess no on glibc systems.
22258 *-gnu*) gl_cv_func_strtok_r_works="guessing no";;
22259 *) gl_cv_func_strtok_r_works="guessing yes";;
22260 esac
22261
22262else
22263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22264/* end confdefs.h. */
22265
22266 #ifndef __OPTIMIZE__
22267 # define __OPTIMIZE__ 1
22268 #endif
22269 #undef __OPTIMIZE_SIZE__
22270 #undef __NO_INLINE__
22271 #include <stdlib.h>
22272 #include <string.h>
22273
22274int
22275main ()
22276{
22277static const char dummy[] = "\177\01a";
22278 char delimiters[] = "xxxxxxxx";
22279 char *save_ptr = (char *) dummy;
22280 strtok_r (delimiters, "x", &save_ptr);
22281 strtok_r (NULL, "x", &save_ptr);
22282 return 0;
22283
22284 ;
22285 return 0;
22286}
22287
22288_ACEOF
22289if ac_fn_c_try_run "$LINENO"; then :
22290 gl_cv_func_strtok_r_works=yes
22291else
22292 gl_cv_func_strtok_r_works=no
22293fi
22294rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22295 conftest.$ac_objext conftest.beam conftest.$ac_ext
22296fi
22297
22298
22299fi
22300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5
22301$as_echo "$gl_cv_func_strtok_r_works" >&6; }
22302 case "$gl_cv_func_strtok_r_works" in
22303 *no)
22304 UNDEFINE_STRTOK_R=1
22305 ;;
22306 esac
22307 else
22308 HAVE_STRTOK_R=0
22309 fi
22310
22311 if test $ac_cv_have_decl_strtok_r = no; then
22312 HAVE_DECL_STRTOK_R=0
22313 fi
22314
22315 if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
22316
22317
22318
22319
22320
22321
22322
22323
22324 gl_LIBOBJS="$gl_LIBOBJS strtok_r.$ac_objext"
22325
22326
22327 :
22328
22329 fi
22330
22331
22332
22333
22334
22335 GNULIB_STRTOK_R=1
22336
22337
22338
22339
22340
22341$as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h
22342
22343
22344
22345
22346
22347
22348
8690e634
JK
22349
22350
22351
22352
22353
8690e634 22354
09607c9e
TT
22355
22356
22357
22358
22359 if test $gl_cv_have_include_next = yes; then
22360 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
22361 else
22362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
22363$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
22364if test "${gl_cv_next_sys_stat_h+set}" = set; then :
22365 $as_echo_n "(cached) " >&6
22366else
22367
22368 if test $ac_cv_header_sys_stat_h = yes; then
22369
22370
4a626d0a
PA
22371
22372
22373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
09607c9e
TT
22374/* end confdefs.h. */
22375#include <sys/stat.h>
09607c9e 22376_ACEOF
4a626d0a
PA
22377 case "$host_os" in
22378 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22379 *) gl_absname_cpp="$ac_cpp" ;;
22380 esac
22381
22382 case "$host_os" in
22383 mingw*)
22384 gl_dirsep_regex='[/\\]'
22385 ;;
22386 *)
22387 gl_dirsep_regex='\/'
22388 ;;
22389 esac
22390 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22391 gl_header_literal_regex=`echo 'sys/stat.h' \
22392 | sed -e "$gl_make_literal_regex_sed"`
22393 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22394 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22395 s|^/[^/]|//&|
22396 p
22397 q
22398 }'
22399
22400 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22401 sed -n "$gl_absolute_header_sed"`
22402
22403 gl_header=$gl_cv_absolute_sys_stat_h
22404 gl_cv_next_sys_stat_h='"'$gl_header'"'
09607c9e
TT
22405 else
22406 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
22407 fi
22408
22409
22410fi
22411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
22412$as_echo "$gl_cv_next_sys_stat_h" >&6; }
22413 fi
22414 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
22415
22416 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22417 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22418 gl_next_as_first_directive='<'sys/stat.h'>'
22419 else
22420 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22421 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
22422 fi
22423 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
22424
22425
22426
22427
22428
22429
22430
22431
2196f55f 22432
09607c9e
TT
22433
22434
22435 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
22436
22437$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
22438
22439 fi
22440
22441 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
22442 #include <sys/stat.h>
22443"
22444if test "x$ac_cv_type_nlink_t" = x""yes; then :
22445
22446else
22447
22448$as_echo "#define nlink_t int" >>confdefs.h
22449
22450fi
22451
22452
22453
22454 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
22455 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22457$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
22458if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
22459 $as_echo_n "(cached) " >&6
22460else
22461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22462/* end confdefs.h. */
22463#include <sys/stat.h>
22464
22465int
22466main ()
22467{
22468#undef $gl_func
22469 (void) $gl_func;
22470 ;
22471 return 0;
22472}
22473_ACEOF
22474if ac_fn_c_try_compile "$LINENO"; then :
22475 eval "$as_gl_Symbol=yes"
22476else
22477 eval "$as_gl_Symbol=no"
22478fi
22479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22480fi
22481eval ac_res=\$$as_gl_Symbol
22482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22483$as_echo "$ac_res" >&6; }
22484 eval as_val=\$$as_gl_Symbol
22485 if test "x$as_val" = x""yes; then :
22486 cat >>confdefs.h <<_ACEOF
22487#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22488_ACEOF
22489
22490 eval ac_cv_have_decl_$gl_func=yes
22491fi
22492 done
22493
22494
22495
22496
22497
22498
22499
22500
22501
22502
22503
2d8adcbd
MM
22504 :
22505
22506
22507
22508
09607c9e
TT
22509
22510
22511
8839a007
PA
22512
22513
22514
22515
09607c9e
TT
22516
22517
8839a007
PA
22518
22519
22520
22521
22522 if test $gl_cv_have_include_next = yes; then
22523 gl_cv_next_unistd_h='<'unistd.h'>'
22524 else
22525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
22526$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
22527if test "${gl_cv_next_unistd_h+set}" = set; then :
22528 $as_echo_n "(cached) " >&6
22529else
22530
22531 if test $ac_cv_header_unistd_h = yes; then
22532
22533
4a626d0a
PA
22534
22535
22536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8839a007
PA
22537/* end confdefs.h. */
22538#include <unistd.h>
8839a007 22539_ACEOF
4a626d0a
PA
22540 case "$host_os" in
22541 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22542 *) gl_absname_cpp="$ac_cpp" ;;
22543 esac
22544
22545 case "$host_os" in
22546 mingw*)
22547 gl_dirsep_regex='[/\\]'
22548 ;;
22549 *)
22550 gl_dirsep_regex='\/'
22551 ;;
22552 esac
22553 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22554 gl_header_literal_regex=`echo 'unistd.h' \
22555 | sed -e "$gl_make_literal_regex_sed"`
22556 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22557 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22558 s|^/[^/]|//&|
22559 p
22560 q
22561 }'
22562
22563 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22564 sed -n "$gl_absolute_header_sed"`
22565
22566 gl_header=$gl_cv_absolute_unistd_h
22567 gl_cv_next_unistd_h='"'$gl_header'"'
8839a007
PA
22568 else
22569 gl_cv_next_unistd_h='<'unistd.h'>'
22570 fi
22571
22572
22573fi
22574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
22575$as_echo "$gl_cv_next_unistd_h" >&6; }
22576 fi
22577 NEXT_UNISTD_H=$gl_cv_next_unistd_h
22578
22579 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22580 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22581 gl_next_as_first_directive='<'unistd.h'>'
22582 else
22583 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22584 gl_next_as_first_directive=$gl_cv_next_unistd_h
22585 fi
22586 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
22587
22588
22589
22590
22591 if test $ac_cv_header_unistd_h = yes; then
22592 HAVE_UNISTD_H=1
22593 else
22594 HAVE_UNISTD_H=0
22595 fi
22596
22597
22598
22599
22600
22601
22602
22603 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
22604 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22606$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
22607if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
22608 $as_echo_n "(cached) " >&6
22609else
22610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22611/* end confdefs.h. */
22612
22613#if HAVE_UNISTD_H
22614# include <unistd.h>
22615#endif
22616/* Some systems declare various items in the wrong headers. */
22617#if !(defined __GLIBC__ && !defined __UCLIBC__)
22618# include <fcntl.h>
22619# include <stdio.h>
22620# include <stdlib.h>
22621# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
22622# include <io.h>
22623# endif
22624#endif
22625
22626int
22627main ()
22628{
22629#undef $gl_func
22630 (void) $gl_func;
22631 ;
22632 return 0;
22633}
22634_ACEOF
22635if ac_fn_c_try_compile "$LINENO"; then :
22636 eval "$as_gl_Symbol=yes"
22637else
22638 eval "$as_gl_Symbol=no"
22639fi
22640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22641fi
22642eval ac_res=\$$as_gl_Symbol
22643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22644$as_echo "$ac_res" >&6; }
22645 eval as_val=\$$as_gl_Symbol
22646 if test "x$as_val" = x""yes; then :
22647 cat >>confdefs.h <<_ACEOF
22648#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22649_ACEOF
22650
22651 eval ac_cv_have_decl_$gl_func=yes
22652fi
22653 done
22654
22655
22656
22657
22658
6ec2e0f5
SDJ
22659
22660
22661
3d99e817
AK
22662 if test $ac_cv_have_decl_unsetenv = no; then
22663 HAVE_DECL_UNSETENV=0
22664 fi
22665 for ac_func in unsetenv
22666do :
22667 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
22668if test "x$ac_cv_func_unsetenv" = x""yes; then :
22669 cat >>confdefs.h <<_ACEOF
22670#define HAVE_UNSETENV 1
22671_ACEOF
22672
22673fi
22674done
22675
22676 if test $ac_cv_func_unsetenv = no; then
22677 HAVE_UNSETENV=0
22678 else
22679 HAVE_UNSETENV=1
22680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
22681$as_echo_n "checking for unsetenv() return type... " >&6; }
22682if test "${gt_cv_func_unsetenv_ret+set}" = set; then :
22683 $as_echo_n "(cached) " >&6
22684else
22685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22686/* end confdefs.h. */
22687
22688#undef _BSD
22689#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
22690#include <stdlib.h>
22691extern
22692#ifdef __cplusplus
22693"C"
22694#endif
22695int unsetenv (const char *name);
22696
22697int
22698main ()
22699{
22700
22701 ;
22702 return 0;
22703}
22704_ACEOF
22705if ac_fn_c_try_compile "$LINENO"; then :
22706 gt_cv_func_unsetenv_ret='int'
22707else
22708 gt_cv_func_unsetenv_ret='void'
22709fi
22710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22711fi
22712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
22713$as_echo "$gt_cv_func_unsetenv_ret" >&6; }
22714 if test $gt_cv_func_unsetenv_ret = 'void'; then
22715
22716$as_echo "#define VOID_UNSETENV 1" >>confdefs.h
22717
22718 REPLACE_UNSETENV=1
22719 fi
22720
22721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
22722$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
22723if test "${gl_cv_func_unsetenv_works+set}" = set; then :
22724 $as_echo_n "(cached) " >&6
22725else
22726 if test "$cross_compiling" = yes; then :
22727 case "$host_os" in
22728 # Guess yes on glibc systems.
22729 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
22730 # If we don't know, assume the worst.
22731 *) gl_cv_func_unsetenv_works="guessing no" ;;
22732 esac
22733
22734else
22735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22736/* end confdefs.h. */
22737
22738 #include <stdlib.h>
22739 #include <errno.h>
22740 extern char **environ;
22741
22742int
22743main ()
22744{
22745
22746 char entry1[] = "a=1";
22747 char entry2[] = "b=2";
22748 char *env[] = { entry1, entry2, NULL };
22749 if (putenv ((char *) "a=1")) return 1;
22750 if (putenv (entry2)) return 2;
22751 entry2[0] = 'a';
22752 unsetenv ("a");
22753 if (getenv ("a")) return 3;
22754 if (!unsetenv ("") || errno != EINVAL) return 4;
22755 entry2[0] = 'b';
22756 environ = env;
22757 if (!getenv ("a")) return 5;
22758 entry2[0] = 'a';
22759 unsetenv ("a");
22760 if (getenv ("a")) return 6;
22761
22762 ;
22763 return 0;
22764}
22765_ACEOF
22766if ac_fn_c_try_run "$LINENO"; then :
22767 gl_cv_func_unsetenv_works=yes
22768else
22769 gl_cv_func_unsetenv_works=no
22770fi
22771rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22772 conftest.$ac_objext conftest.beam conftest.$ac_ext
22773fi
22774
22775fi
22776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
22777$as_echo "$gl_cv_func_unsetenv_works" >&6; }
22778 case "$gl_cv_func_unsetenv_works" in
22779 *yes) ;;
22780 *)
22781 REPLACE_UNSETENV=1
22782 ;;
22783 esac
22784 fi
22785
22786 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
22787
22788
22789
22790
22791
22792
22793
22794
22795 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
22796
22797
22798
22799
22800
22801 fi
22802
22803
22804
22805
22806
22807 GNULIB_UNSETENV=1
22808
22809
22810
22811
22812
22813$as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
22814
22815
22816
22817
22818
22819
8839a007
PA
22820
22821
22822
22823
22824
22825
22826
8690e634
JK
22827
22828
22829 if test $gl_cv_have_include_next = yes; then
22830 gl_cv_next_wchar_h='<'wchar.h'>'
22831 else
22832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
22833$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
22834if test "${gl_cv_next_wchar_h+set}" = set; then :
22835 $as_echo_n "(cached) " >&6
22836else
22837
22838 if test $ac_cv_header_wchar_h = yes; then
22839
22840
4a626d0a
PA
22841
22842
22843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
22844/* end confdefs.h. */
22845#include <wchar.h>
8690e634 22846_ACEOF
4a626d0a
PA
22847 case "$host_os" in
22848 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22849 *) gl_absname_cpp="$ac_cpp" ;;
22850 esac
22851
22852 case "$host_os" in
22853 mingw*)
22854 gl_dirsep_regex='[/\\]'
22855 ;;
22856 *)
22857 gl_dirsep_regex='\/'
22858 ;;
22859 esac
22860 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22861 gl_header_literal_regex=`echo 'wchar.h' \
22862 | sed -e "$gl_make_literal_regex_sed"`
22863 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22864 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22865 s|^/[^/]|//&|
22866 p
22867 q
22868 }'
22869
22870 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22871 sed -n "$gl_absolute_header_sed"`
22872
22873 gl_header=$gl_cv_absolute_wchar_h
22874 gl_cv_next_wchar_h='"'$gl_header'"'
8690e634
JK
22875 else
22876 gl_cv_next_wchar_h='<'wchar.h'>'
22877 fi
22878
22879
22880fi
22881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
22882$as_echo "$gl_cv_next_wchar_h" >&6; }
22883 fi
22884 NEXT_WCHAR_H=$gl_cv_next_wchar_h
22885
22886 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22887 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22888 gl_next_as_first_directive='<'wchar.h'>'
22889 else
22890 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22891 gl_next_as_first_directive=$gl_cv_next_wchar_h
22892 fi
22893 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
22894
22895
22896
22897
22898 if test $ac_cv_header_wchar_h = yes; then
22899 HAVE_WCHAR_H=1
22900 else
22901 HAVE_WCHAR_H=0
22902 fi
22903
c971b7fa
PA
22904
22905
22906
22907
8690e634
JK
22908 if test $gt_cv_c_wint_t = yes; then
22909 HAVE_WINT_T=1
22910 else
22911 HAVE_WINT_T=0
22912 fi
c971b7fa
PA
22913
22914
22915
8690e634
JK
22916 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
22917 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22919$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
22920if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
c971b7fa
PA
22921 $as_echo_n "(cached) " >&6
22922else
22923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22924/* end confdefs.h. */
8690e634
JK
22925
22926/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22927 <wchar.h>.
22928 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22929 included before <wchar.h>. */
22930#if !(defined __GLIBC__ && !defined __UCLIBC__)
22931# include <stddef.h>
22932# include <stdio.h>
22933# include <time.h>
22934#endif
22935#include <wchar.h>
c971b7fa
PA
22936
22937int
22938main ()
22939{
8690e634
JK
22940#undef $gl_func
22941 (void) $gl_func;
c971b7fa
PA
22942 ;
22943 return 0;
22944}
22945_ACEOF
22946if ac_fn_c_try_compile "$LINENO"; then :
8690e634 22947 eval "$as_gl_Symbol=yes"
c971b7fa 22948else
8690e634 22949 eval "$as_gl_Symbol=no"
c971b7fa
PA
22950fi
22951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22952fi
8690e634
JK
22953eval ac_res=\$$as_gl_Symbol
22954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22955$as_echo "$ac_res" >&6; }
22956 eval as_val=\$$as_gl_Symbol
22957 if test "x$as_val" = x""yes; then :
22958 cat >>confdefs.h <<_ACEOF
22959#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22960_ACEOF
c971b7fa 22961
8690e634 22962 eval ac_cv_have_decl_$gl_func=yes
c971b7fa 22963fi
8690e634
JK
22964 done
22965
22966
22967
22968
22969
22970
22971
8690e634
JK
22972 if test $ac_cv_func_iswcntrl = yes; then
22973 HAVE_ISWCNTRL=1
22974 else
22975 HAVE_ISWCNTRL=0
22976 fi
22977
22978
22979
8690e634
JK
22980 if test $gt_cv_c_wint_t = yes; then
22981 HAVE_WINT_T=1
22982 else
22983 HAVE_WINT_T=0
22984 fi
22985
22986
22987
22988
22989
22990
c971b7fa 22991
8690e634 22992
c971b7fa
PA
22993
22994
22995
22996 if test $gl_cv_have_include_next = yes; then
8690e634 22997 gl_cv_next_wctype_h='<'wctype.h'>'
c971b7fa 22998 else
8690e634
JK
22999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
23000$as_echo_n "checking absolute name of <wctype.h>... " >&6; }
23001if test "${gl_cv_next_wctype_h+set}" = set; then :
c971b7fa
PA
23002 $as_echo_n "(cached) " >&6
23003else
23004
8690e634
JK
23005 if test $ac_cv_header_wctype_h = yes; then
23006
23007
4a626d0a
PA
23008
23009
23010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 23011/* end confdefs.h. */
8690e634 23012#include <wctype.h>
c971b7fa 23013_ACEOF
4a626d0a
PA
23014 case "$host_os" in
23015 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23016 *) gl_absname_cpp="$ac_cpp" ;;
23017 esac
23018
23019 case "$host_os" in
23020 mingw*)
23021 gl_dirsep_regex='[/\\]'
23022 ;;
23023 *)
23024 gl_dirsep_regex='\/'
23025 ;;
23026 esac
23027 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23028 gl_header_literal_regex=`echo 'wctype.h' \
23029 | sed -e "$gl_make_literal_regex_sed"`
23030 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23031 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23032 s|^/[^/]|//&|
23033 p
23034 q
23035 }'
23036
23037 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23038 sed -n "$gl_absolute_header_sed"`
23039
23040 gl_header=$gl_cv_absolute_wctype_h
23041 gl_cv_next_wctype_h='"'$gl_header'"'
8690e634
JK
23042 else
23043 gl_cv_next_wctype_h='<'wctype.h'>'
23044 fi
c971b7fa
PA
23045
23046
23047fi
8690e634
JK
23048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
23049$as_echo "$gl_cv_next_wctype_h" >&6; }
c971b7fa 23050 fi
8690e634 23051 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
c971b7fa
PA
23052
23053 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23054 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8690e634 23055 gl_next_as_first_directive='<'wctype.h'>'
c971b7fa
PA
23056 else
23057 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8690e634 23058 gl_next_as_first_directive=$gl_cv_next_wctype_h
c971b7fa 23059 fi
8690e634
JK
23060 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
23061
23062
23063
23064
23065 if test $ac_cv_header_wctype_h = yes; then
23066 if test $ac_cv_func_iswcntrl = yes; then
23067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
23068$as_echo_n "checking whether iswcntrl works... " >&6; }
23069if test "${gl_cv_func_iswcntrl_works+set}" = set; then :
23070 $as_echo_n "(cached) " >&6
23071else
23072
23073 if test "$cross_compiling" = yes; then :
23074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23075/* end confdefs.h. */
23076#include <stdlib.h>
23077 #if __GNU_LIBRARY__ == 1
23078 Linux libc5 i18n is broken.
23079 #endif
23080int
23081main ()
23082{
23083
23084 ;
23085 return 0;
23086}
23087_ACEOF
23088if ac_fn_c_try_compile "$LINENO"; then :
23089 gl_cv_func_iswcntrl_works="guessing yes"
23090else
23091 gl_cv_func_iswcntrl_works="guessing no"
23092fi
23093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23094
23095else
23096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23097/* end confdefs.h. */
23098
23099 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
23100 included before <wchar.h>.
23101 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
23102 must be included before <wchar.h>. */
23103 #include <stddef.h>
23104 #include <stdio.h>
23105 #include <time.h>
23106 #include <wchar.h>
23107 #include <wctype.h>
23108 int main () { return iswprint ('x') == 0; }
23109
23110_ACEOF
23111if ac_fn_c_try_run "$LINENO"; then :
23112 gl_cv_func_iswcntrl_works=yes
23113else
23114 gl_cv_func_iswcntrl_works=no
23115fi
23116rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23117 conftest.$ac_objext conftest.beam conftest.$ac_ext
23118fi
23119
23120
23121fi
23122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
23123$as_echo "$gl_cv_func_iswcntrl_works" >&6; }
23124 fi
23125 HAVE_WCTYPE_H=1
23126 else
23127 HAVE_WCTYPE_H=0
23128 fi
23129
23130
23131 case "$gl_cv_func_iswcntrl_works" in
23132 *yes) REPLACE_ISWCNTRL=0 ;;
23133 *) REPLACE_ISWCNTRL=1 ;;
23134 esac
23135
23136
23137 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
23138 :
23139 fi
23140
23141 if test $REPLACE_ISWCNTRL = 1; then
23142 REPLACE_TOWLOWER=1
23143 else
23144 for ac_func in towlower
23145do :
23146 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
23147if test "x$ac_cv_func_towlower" = x""yes; then :
23148 cat >>confdefs.h <<_ACEOF
23149#define HAVE_TOWLOWER 1
23150_ACEOF
23151
23152fi
23153done
23154
23155 if test $ac_cv_func_towlower = yes; then
23156 REPLACE_TOWLOWER=0
23157 else
23158 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
23159 included before <wchar.h>.
23160 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
23161 must be included before <wchar.h>. */
23162 #include <stddef.h>
23163 #include <stdio.h>
23164 #include <time.h>
23165 #include <wchar.h>
23166 #if HAVE_WCTYPE_H
23167 # include <wctype.h>
23168 #endif
23169
23170"
23171if test "x$ac_cv_have_decl_towlower" = x""yes; then :
23172 ac_have_decl=1
23173else
23174 ac_have_decl=0
23175fi
23176
23177cat >>confdefs.h <<_ACEOF
23178#define HAVE_DECL_TOWLOWER $ac_have_decl
23179_ACEOF
23180
23181 if test $ac_cv_have_decl_towlower = yes; then
23182 REPLACE_TOWLOWER=1
23183 else
23184 REPLACE_TOWLOWER=0
23185 fi
23186 fi
23187 fi
23188
23189
23190 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
23191 :
23192 fi
23193
23194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
23195$as_echo_n "checking for wctype_t... " >&6; }
23196if test "${gl_cv_type_wctype_t+set}" = set; then :
23197 $as_echo_n "(cached) " >&6
23198else
23199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23200/* end confdefs.h. */
23201/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
23202 included before <wchar.h>.
23203 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
23204 must be included before <wchar.h>. */
23205 #include <stddef.h>
23206 #include <stdio.h>
23207 #include <time.h>
23208 #include <wchar.h>
23209 #if HAVE_WCTYPE_H
23210 # include <wctype.h>
23211 #endif
23212 wctype_t a;
23213
23214int
23215main ()
23216{
23217
23218 ;
23219 return 0;
23220}
23221_ACEOF
23222if ac_fn_c_try_compile "$LINENO"; then :
23223 gl_cv_type_wctype_t=yes
23224else
23225 gl_cv_type_wctype_t=no
23226fi
23227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 23228
8690e634
JK
23229fi
23230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
23231$as_echo "$gl_cv_type_wctype_t" >&6; }
23232 if test $gl_cv_type_wctype_t = no; then
23233 HAVE_WCTYPE_T=0
23234 fi
23235
23236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
23237$as_echo_n "checking for wctrans_t... " >&6; }
23238if test "${gl_cv_type_wctrans_t+set}" = set; then :
23239 $as_echo_n "(cached) " >&6
23240else
23241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23242/* end confdefs.h. */
23243/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
23244 included before <wchar.h>.
23245 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
23246 must be included before <wchar.h>. */
23247 #include <stddef.h>
23248 #include <stdio.h>
23249 #include <time.h>
23250 #include <wchar.h>
23251 #include <wctype.h>
23252 wctrans_t a;
c971b7fa 23253
8690e634
JK
23254int
23255main ()
23256{
c971b7fa 23257
8690e634
JK
23258 ;
23259 return 0;
23260}
23261_ACEOF
23262if ac_fn_c_try_compile "$LINENO"; then :
23263 gl_cv_type_wctrans_t=yes
23264else
23265 gl_cv_type_wctrans_t=no
23266fi
23267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 23268
8690e634
JK
23269fi
23270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
23271$as_echo "$gl_cv_type_wctrans_t" >&6; }
23272 if test $gl_cv_type_wctrans_t = no; then
23273 HAVE_WCTRANS_T=0
c971b7fa
PA
23274 fi
23275
23276
8690e634
JK
23277 for gl_func in wctype iswctype wctrans towctrans ; do
23278 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
23279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
23280$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
23281if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
23282 $as_echo_n "(cached) " >&6
23283else
23284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23285/* end confdefs.h. */
23286
23287/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23288 <wchar.h>.
23289 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23290 included before <wchar.h>. */
23291#if !(defined __GLIBC__ && !defined __UCLIBC__)
23292# include <stddef.h>
23293# include <stdio.h>
23294# include <time.h>
23295# include <wchar.h>
23296#endif
23297#include <wctype.h>
23298
23299int
23300main ()
23301{
23302#undef $gl_func
23303 (void) $gl_func;
23304 ;
23305 return 0;
23306}
23307_ACEOF
23308if ac_fn_c_try_compile "$LINENO"; then :
23309 eval "$as_gl_Symbol=yes"
23310else
23311 eval "$as_gl_Symbol=no"
23312fi
23313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23314fi
23315eval ac_res=\$$as_gl_Symbol
23316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23317$as_echo "$ac_res" >&6; }
23318 eval as_val=\$$as_gl_Symbol
23319 if test "x$as_val" = x""yes; then :
23320 cat >>confdefs.h <<_ACEOF
23321#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
23322_ACEOF
c971b7fa 23323
8690e634
JK
23324 eval ac_cv_have_decl_$gl_func=yes
23325fi
23326 done
c971b7fa
PA
23327
23328
23329 # End of code from modules
23330
23331
23332
23333
23334
23335
23336
23337
23338
23339 gltests_libdeps=
23340 gltests_ltlibdeps=
23341
23342
23343
23344
23345
23346
23347
23348
23349
23350 gl_source_base='tests'
23351 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
23352
23353 gl_module_indicator_condition=$gltests_WITNESS
23354
23355
23356
23357
23358
23359
23360
23361
23362
23363 LIBGNU_LIBDEPS="$gl_libdeps"
23364
23365 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
23366
23367
23368
23369# We don't use automake, but gnulib does. This line lets us generate
23370# its Makefile.in.
23371am__api_version='1.11'
23372
23373# Find a good install program. We prefer a C program (faster),
23374# so one script is as good as another. But avoid the broken or
23375# incompatible versions:
23376# SysV /etc/install, /usr/sbin/install
23377# SunOS /usr/etc/install
23378# IRIX /sbin/install
23379# AIX /bin/install
23380# AmigaOS /C/install, which installs bootblocks on floppy discs
23381# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
23382# AFS /usr/afsws/bin/install, which mishandles nonexistent args
23383# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
23384# OS/2's system install, which has a completely different semantic
23385# ./install, which can be erroneously created by make from ./install.sh.
23386# Reject install programs that cannot install multiple files.
23387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
23388$as_echo_n "checking for a BSD-compatible install... " >&6; }
23389if test -z "$INSTALL"; then
23390if test "${ac_cv_path_install+set}" = set; then :
23391 $as_echo_n "(cached) " >&6
23392else
23393 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23394for as_dir in $PATH
23395do
23396 IFS=$as_save_IFS
23397 test -z "$as_dir" && as_dir=.
23398 # Account for people who put trailing slashes in PATH elements.
23399case $as_dir/ in #((
23400 ./ | .// | /[cC]/* | \
23401 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
23402 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
23403 /usr/ucb/* ) ;;
23404 *)
23405 # OSF1 and SCO ODT 3.0 have their own names for install.
23406 # Don't use installbsd from OSF since it installs stuff as root
23407 # by default.
23408 for ac_prog in ginstall scoinst install; do
23409 for ac_exec_ext in '' $ac_executable_extensions; do
23410 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
23411 if test $ac_prog = install &&
23412 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
23413 # AIX install. It has an incompatible calling convention.
23414 :
23415 elif test $ac_prog = install &&
23416 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
23417 # program-specific install script used by HP pwplus--don't use.
23418 :
23419 else
23420 rm -rf conftest.one conftest.two conftest.dir
23421 echo one > conftest.one
23422 echo two > conftest.two
23423 mkdir conftest.dir
23424 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
23425 test -s conftest.one && test -s conftest.two &&
23426 test -s conftest.dir/conftest.one &&
23427 test -s conftest.dir/conftest.two
23428 then
23429 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
23430 break 3
23431 fi
23432 fi
23433 fi
23434 done
23435 done
23436 ;;
23437esac
23438
23439 done
23440IFS=$as_save_IFS
23441
23442rm -rf conftest.one conftest.two conftest.dir
23443
23444fi
23445 if test "${ac_cv_path_install+set}" = set; then
23446 INSTALL=$ac_cv_path_install
23447 else
23448 # As a last resort, use the slow shell script. Don't cache a
23449 # value for INSTALL within a source directory, because that will
23450 # break other packages using the cache if that directory is
23451 # removed, or if the value is a relative name.
23452 INSTALL=$ac_install_sh
23453 fi
23454fi
23455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
23456$as_echo "$INSTALL" >&6; }
23457
23458# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
23459# It thinks the first close brace ends the variable substitution.
23460test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
23461
23462test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
23463
23464test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
23465
23466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
23467$as_echo_n "checking whether build environment is sane... " >&6; }
23468# Just in case
23469sleep 1
23470echo timestamp > conftest.file
23471# Reject unsafe characters in $srcdir or the absolute working directory
23472# name. Accept space and tab only in the latter.
23473am_lf='
23474'
23475case `pwd` in
23476 *[\\\"\#\$\&\'\`$am_lf]*)
23477 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
23478esac
23479case $srcdir in
23480 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
23481 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
23482esac
23483
23484# Do `set' in a subshell so we don't clobber the current shell's
23485# arguments. Must try -L first in case configure is actually a
23486# symlink; some systems play weird games with the mod time of symlinks
23487# (eg FreeBSD returns the mod time of the symlink's containing
23488# directory).
23489if (
23490 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
23491 if test "$*" = "X"; then
23492 # -L didn't work.
23493 set X `ls -t "$srcdir/configure" conftest.file`
23494 fi
23495 rm -f conftest.file
23496 if test "$*" != "X $srcdir/configure conftest.file" \
23497 && test "$*" != "X conftest.file $srcdir/configure"; then
23498
23499 # If neither matched, then we have a broken ls. This can happen
23500 # if, for instance, CONFIG_SHELL is bash and it inherits a
23501 # broken ls alias from the environment. This has actually
23502 # happened. Such a system could not be considered "sane".
23503 as_fn_error "ls -t appears to fail. Make sure there is not a broken
23504alias in your environment" "$LINENO" 5
23505 fi
23506
23507 test "$2" = conftest.file
23508 )
23509then
23510 # Ok.
23511 :
23512else
23513 as_fn_error "newly created file is older than distributed files!
23514Check your system clock" "$LINENO" 5
23515fi
23516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23517$as_echo "yes" >&6; }
23518test "$program_prefix" != NONE &&
23519 program_transform_name="s&^&$program_prefix&;$program_transform_name"
23520# Use a double $ so make ignores it.
23521test "$program_suffix" != NONE &&
23522 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
23523# Double any \ or $.
23524# By default was `s,x,x', remove it if useless.
23525ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
23526program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
23527
23528# expand $ac_aux_dir to an absolute path
23529am_aux_dir=`cd $ac_aux_dir && pwd`
23530
23531if test x"${MISSING+set}" != xset; then
23532 case $am_aux_dir in
23533 *\ * | *\ *)
23534 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
23535 *)
23536 MISSING="\${SHELL} $am_aux_dir/missing" ;;
23537 esac
23538fi
23539# Use eval to expand $SHELL
23540if eval "$MISSING --run true"; then
23541 am_missing_run="$MISSING --run "
23542else
23543 am_missing_run=
23544 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
23545$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
23546fi
23547
23548if test x"${install_sh}" != xset; then
23549 case $am_aux_dir in
23550 *\ * | *\ *)
23551 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
23552 *)
23553 install_sh="\${SHELL} $am_aux_dir/install-sh"
23554 esac
23555fi
23556
23557# Installed binaries are usually stripped using `strip' when the user
23558# run `make install-strip'. However `strip' might not be the right
23559# tool to use in cross-compilation environments, therefore Automake
23560# will honor the `STRIP' environment variable to overrule this program.
23561if test "$cross_compiling" != no; then
23562 if test -n "$ac_tool_prefix"; then
23563 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
23564set dummy ${ac_tool_prefix}strip; ac_word=$2
23565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23566$as_echo_n "checking for $ac_word... " >&6; }
23567if test "${ac_cv_prog_STRIP+set}" = set; then :
23568 $as_echo_n "(cached) " >&6
23569else
23570 if test -n "$STRIP"; then
23571 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
23572else
23573as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23574for as_dir in $PATH
23575do
23576 IFS=$as_save_IFS
23577 test -z "$as_dir" && as_dir=.
23578 for ac_exec_ext in '' $ac_executable_extensions; do
23579 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23580 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
23581 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23582 break 2
23583 fi
23584done
23585 done
23586IFS=$as_save_IFS
23587
23588fi
23589fi
23590STRIP=$ac_cv_prog_STRIP
23591if test -n "$STRIP"; then
23592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
23593$as_echo "$STRIP" >&6; }
23594else
23595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23596$as_echo "no" >&6; }
23597fi
23598
23599
23600fi
23601if test -z "$ac_cv_prog_STRIP"; then
23602 ac_ct_STRIP=$STRIP
23603 # Extract the first word of "strip", so it can be a program name with args.
23604set dummy strip; ac_word=$2
23605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23606$as_echo_n "checking for $ac_word... " >&6; }
23607if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
23608 $as_echo_n "(cached) " >&6
23609else
23610 if test -n "$ac_ct_STRIP"; then
23611 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
23612else
23613as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23614for as_dir in $PATH
23615do
23616 IFS=$as_save_IFS
23617 test -z "$as_dir" && as_dir=.
23618 for ac_exec_ext in '' $ac_executable_extensions; do
23619 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23620 ac_cv_prog_ac_ct_STRIP="strip"
23621 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23622 break 2
23623 fi
23624done
23625 done
23626IFS=$as_save_IFS
23627
23628fi
23629fi
23630ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
23631if test -n "$ac_ct_STRIP"; then
23632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
23633$as_echo "$ac_ct_STRIP" >&6; }
23634else
23635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23636$as_echo "no" >&6; }
23637fi
23638
23639 if test "x$ac_ct_STRIP" = x; then
23640 STRIP=":"
23641 else
23642 case $cross_compiling:$ac_tool_warned in
23643yes:)
23644{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23645$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23646ac_tool_warned=yes ;;
23647esac
23648 STRIP=$ac_ct_STRIP
23649 fi
23650else
23651 STRIP="$ac_cv_prog_STRIP"
23652fi
23653
23654fi
23655INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
23656
c971b7fa
PA
23657mkdir_p="$MKDIR_P"
23658case $mkdir_p in
23659 [\\/$]* | ?:[\\/]*) ;;
23660 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
23661esac
23662
23663for ac_prog in gawk mawk nawk awk
23664do
23665 # Extract the first word of "$ac_prog", so it can be a program name with args.
23666set dummy $ac_prog; ac_word=$2
23667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23668$as_echo_n "checking for $ac_word... " >&6; }
23669if test "${ac_cv_prog_AWK+set}" = set; then :
23670 $as_echo_n "(cached) " >&6
23671else
23672 if test -n "$AWK"; then
23673 ac_cv_prog_AWK="$AWK" # Let the user override the test.
23674else
23675as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23676for as_dir in $PATH
23677do
23678 IFS=$as_save_IFS
23679 test -z "$as_dir" && as_dir=.
23680 for ac_exec_ext in '' $ac_executable_extensions; do
23681 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23682 ac_cv_prog_AWK="$ac_prog"
23683 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23684 break 2
23685 fi
23686done
23687 done
23688IFS=$as_save_IFS
23689
23690fi
23691fi
23692AWK=$ac_cv_prog_AWK
23693if test -n "$AWK"; then
23694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
23695$as_echo "$AWK" >&6; }
23696else
23697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23698$as_echo "no" >&6; }
23699fi
23700
23701
23702 test -n "$AWK" && break
23703done
23704
23705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
23706$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
23707set x ${MAKE-make}
23708ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
23709if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
23710 $as_echo_n "(cached) " >&6
23711else
23712 cat >conftest.make <<\_ACEOF
23713SHELL = /bin/sh
23714all:
23715 @echo '@@@%%%=$(MAKE)=@@@%%%'
23716_ACEOF
23717# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
23718case `${MAKE-make} -f conftest.make 2>/dev/null` in
23719 *@@@%%%=?*=@@@%%%*)
23720 eval ac_cv_prog_make_${ac_make}_set=yes;;
23721 *)
23722 eval ac_cv_prog_make_${ac_make}_set=no;;
23723esac
23724rm -f conftest.make
23725fi
23726if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
23727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23728$as_echo "yes" >&6; }
23729 SET_MAKE=
23730else
23731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23732$as_echo "no" >&6; }
23733 SET_MAKE="MAKE=${MAKE-make}"
23734fi
23735
23736rm -rf .tst 2>/dev/null
23737mkdir .tst 2>/dev/null
23738if test -d .tst; then
23739 am__leading_dot=.
23740else
23741 am__leading_dot=_
23742fi
23743rmdir .tst 2>/dev/null
23744
23745DEPDIR="${am__leading_dot}deps"
23746
23747ac_config_commands="$ac_config_commands depfiles"
23748
23749
23750am_make=${MAKE-make}
23751cat > confinc << 'END'
23752am__doit:
23753 @echo this is the am__doit target
23754.PHONY: am__doit
23755END
23756# If we don't find an include directive, just comment out the code.
23757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
23758$as_echo_n "checking for style of include used by $am_make... " >&6; }
23759am__include="#"
23760am__quote=
23761_am_result=none
23762# First try GNU make style include.
23763echo "include confinc" > confmf
23764# Ignore all kinds of additional output from `make'.
23765case `$am_make -s -f confmf 2> /dev/null` in #(
23766*the\ am__doit\ target*)
23767 am__include=include
23768 am__quote=
23769 _am_result=GNU
23770 ;;
23771esac
23772# Now try BSD make style include.
23773if test "$am__include" = "#"; then
23774 echo '.include "confinc"' > confmf
23775 case `$am_make -s -f confmf 2> /dev/null` in #(
23776 *the\ am__doit\ target*)
23777 am__include=.include
23778 am__quote="\""
23779 _am_result=BSD
23780 ;;
23781 esac
23782fi
23783
23784
23785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
23786$as_echo "$_am_result" >&6; }
23787rm -f confinc confmf
23788
23789# Check whether --enable-dependency-tracking was given.
23790if test "${enable_dependency_tracking+set}" = set; then :
23791 enableval=$enable_dependency_tracking;
23792fi
23793
23794if test "x$enable_dependency_tracking" != xno; then
23795 am_depcomp="$ac_aux_dir/depcomp"
23796 AMDEPBACKSLASH='\'
23797fi
23798 if test "x$enable_dependency_tracking" != xno; then
23799 AMDEP_TRUE=
23800 AMDEP_FALSE='#'
23801else
23802 AMDEP_TRUE='#'
23803 AMDEP_FALSE=
23804fi
23805
23806
23807if test "`cd $srcdir && pwd`" != "`pwd`"; then
23808 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
23809 # is not polluted with repeated "-I."
23810 am__isrc=' -I$(srcdir)'
23811 # test to see if srcdir already configured
23812 if test -f $srcdir/config.status; then
23813 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
23814 fi
23815fi
23816
23817# test whether we have cygpath
23818if test -z "$CYGPATH_W"; then
23819 if (cygpath --version) >/dev/null 2>/dev/null; then
23820 CYGPATH_W='cygpath -w'
23821 else
23822 CYGPATH_W=echo
23823 fi
23824fi
23825
23826
23827# Define the identity of the package.
23828 PACKAGE=libgnu
23829 VERSION=UNUSED-VERSION
23830
23831
23832# Some tools Automake needs.
23833
23834ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
23835
23836
23837AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
23838
23839
23840AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
23841
23842
23843AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
23844
23845
23846MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
23847
23848# We need awk for the "check" target. The system "awk" is bad on
23849# some platforms.
23850# Always define AMTAR for backward compatibility.
23851
23852AMTAR=${AMTAR-"${am_missing_run}tar"}
23853
23854am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
23855
23856
23857
23858
23859depcc="$CC" am_compiler_list=
23860
23861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
23862$as_echo_n "checking dependency style of $depcc... " >&6; }
23863if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
23864 $as_echo_n "(cached) " >&6
23865else
23866 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
23867 # We make a subdir and do the tests there. Otherwise we can end up
23868 # making bogus files that we don't know about and never remove. For
23869 # instance it was reported that on HP-UX the gcc test will end up
23870 # making a dummy file named `D' -- because `-MD' means `put the output
23871 # in D'.
23872 mkdir conftest.dir
23873 # Copy depcomp to subdir because otherwise we won't find it if we're
23874 # using a relative directory.
23875 cp "$am_depcomp" conftest.dir
23876 cd conftest.dir
23877 # We will build objects and dependencies in a subdirectory because
23878 # it helps to detect inapplicable dependency modes. For instance
23879 # both Tru64's cc and ICC support -MD to output dependencies as a
23880 # side effect of compilation, but ICC will put the dependencies in
23881 # the current directory while Tru64 will put them in the object
23882 # directory.
23883 mkdir sub
23884
23885 am_cv_CC_dependencies_compiler_type=none
23886 if test "$am_compiler_list" = ""; then
23887 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
23888 fi
23889 am__universal=false
23890 case " $depcc " in #(
23891 *\ -arch\ *\ -arch\ *) am__universal=true ;;
23892 esac
23893
23894 for depmode in $am_compiler_list; do
23895 # Setup a source with many dependencies, because some compilers
23896 # like to wrap large dependency lists on column 80 (with \), and
23897 # we should not choose a depcomp mode which is confused by this.
23898 #
23899 # We need to recreate these files for each test, as the compiler may
23900 # overwrite some of them when testing with obscure command lines.
23901 # This happens at least with the AIX C compiler.
23902 : > sub/conftest.c
23903 for i in 1 2 3 4 5 6; do
23904 echo '#include "conftst'$i'.h"' >> sub/conftest.c
23905 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
23906 # Solaris 8's {/usr,}/bin/sh.
23907 touch sub/conftst$i.h
23908 done
23909 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
23910
23911 # We check with `-c' and `-o' for the sake of the "dashmstdout"
23912 # mode. It turns out that the SunPro C++ compiler does not properly
23913 # handle `-M -o', and we need to detect this. Also, some Intel
23914 # versions had trouble with output in subdirs
23915 am__obj=sub/conftest.${OBJEXT-o}
23916 am__minus_obj="-o $am__obj"
23917 case $depmode in
23918 gcc)
23919 # This depmode causes a compiler race in universal mode.
23920 test "$am__universal" = false || continue
23921 ;;
23922 nosideeffect)
23923 # after this tag, mechanisms are not by side-effect, so they'll
23924 # only be used when explicitly requested
23925 if test "x$enable_dependency_tracking" = xyes; then
23926 continue
23927 else
23928 break
23929 fi
23930 ;;
23931 msvisualcpp | msvcmsys)
23932 # This compiler won't grok `-c -o', but also, the minuso test has
23933 # not run yet. These depmodes are late enough in the game, and
23934 # so weak that their functioning should not be impacted.
23935 am__obj=conftest.${OBJEXT-o}
23936 am__minus_obj=
23937 ;;
23938 none) break ;;
23939 esac
23940 if depmode=$depmode \
23941 source=sub/conftest.c object=$am__obj \
23942 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
23943 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
23944 >/dev/null 2>conftest.err &&
23945 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
23946 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
23947 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
23948 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
23949 # icc doesn't choke on unknown options, it will just issue warnings
23950 # or remarks (even with -Werror). So we grep stderr for any message
23951 # that says an option was ignored or not supported.
23952 # When given -MP, icc 7.0 and 7.1 complain thusly:
23953 # icc: Command line warning: ignoring option '-M'; no argument required
23954 # The diagnosis changed in icc 8.0:
23955 # icc: Command line remark: option '-MP' not supported
23956 if (grep 'ignoring option' conftest.err ||
23957 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
23958 am_cv_CC_dependencies_compiler_type=$depmode
23959 break
23960 fi
23961 fi
23962 done
23963
23964 cd ..
23965 rm -rf conftest.dir
23966else
23967 am_cv_CC_dependencies_compiler_type=none
23968fi
23969
23970fi
23971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
23972$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
23973CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
23974
23975 if
23976 test "x$enable_dependency_tracking" != xno \
23977 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
23978 am__fastdepCC_TRUE=
23979 am__fastdepCC_FALSE='#'
23980else
23981 am__fastdepCC_TRUE='#'
23982 am__fastdepCC_FALSE=
23983fi
23984
23985
23986
23987
39be3c7e
SM
23988# Check whether --enable-silent-rules was given.
23989if test "${enable_silent_rules+set}" = set; then :
23990 enableval=$enable_silent_rules;
23991fi
23992
23993case $enable_silent_rules in
23994yes) AM_DEFAULT_VERBOSITY=0;;
23995no) AM_DEFAULT_VERBOSITY=1;;
23996*) AM_DEFAULT_VERBOSITY=0;;
23997esac
23998AM_BACKSLASH='\'
23999
24000
c971b7fa
PA
24001# --------------------- #
24002# Checks for programs. #
24003# --------------------- #
24004
24005
24006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
24007$as_echo_n "checking whether ln -s works... " >&6; }
24008LN_S=$as_ln_s
24009if test "$LN_S" = "ln -s"; then
24010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24011$as_echo "yes" >&6; }
24012else
24013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
24014$as_echo "no, using $LN_S" >&6; }
24015fi
24016
24017if test -n "$ac_tool_prefix"; then
24018 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
24019set dummy ${ac_tool_prefix}ranlib; ac_word=$2
24020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24021$as_echo_n "checking for $ac_word... " >&6; }
24022if test "${ac_cv_prog_RANLIB+set}" = set; then :
24023 $as_echo_n "(cached) " >&6
24024else
24025 if test -n "$RANLIB"; then
24026 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
24027else
24028as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24029for as_dir in $PATH
24030do
24031 IFS=$as_save_IFS
24032 test -z "$as_dir" && as_dir=.
24033 for ac_exec_ext in '' $ac_executable_extensions; do
24034 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24035 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
24036 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24037 break 2
24038 fi
24039done
24040 done
24041IFS=$as_save_IFS
24042
24043fi
24044fi
24045RANLIB=$ac_cv_prog_RANLIB
24046if test -n "$RANLIB"; then
24047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
24048$as_echo "$RANLIB" >&6; }
24049else
24050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24051$as_echo "no" >&6; }
24052fi
24053
24054
24055fi
24056if test -z "$ac_cv_prog_RANLIB"; then
24057 ac_ct_RANLIB=$RANLIB
24058 # Extract the first word of "ranlib", so it can be a program name with args.
24059set dummy ranlib; ac_word=$2
24060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24061$as_echo_n "checking for $ac_word... " >&6; }
24062if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
24063 $as_echo_n "(cached) " >&6
24064else
24065 if test -n "$ac_ct_RANLIB"; then
24066 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
24067else
24068as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24069for as_dir in $PATH
24070do
24071 IFS=$as_save_IFS
24072 test -z "$as_dir" && as_dir=.
24073 for ac_exec_ext in '' $ac_executable_extensions; do
24074 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24075 ac_cv_prog_ac_ct_RANLIB="ranlib"
24076 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24077 break 2
24078 fi
24079done
24080 done
24081IFS=$as_save_IFS
24082
24083fi
24084fi
24085ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
24086if test -n "$ac_ct_RANLIB"; then
24087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
24088$as_echo "$ac_ct_RANLIB" >&6; }
24089else
24090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24091$as_echo "no" >&6; }
24092fi
24093
24094 if test "x$ac_ct_RANLIB" = x; then
24095 RANLIB=":"
24096 else
24097 case $cross_compiling:$ac_tool_warned in
24098yes:)
24099{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24100$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24101ac_tool_warned=yes ;;
24102esac
24103 RANLIB=$ac_ct_RANLIB
24104 fi
24105else
24106 RANLIB="$ac_cv_prog_RANLIB"
24107fi
24108
24109
24110if test -n "$ac_tool_prefix"; then
24111 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
24112set dummy ${ac_tool_prefix}ar; ac_word=$2
24113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24114$as_echo_n "checking for $ac_word... " >&6; }
24115if test "${ac_cv_prog_AR+set}" = set; then :
24116 $as_echo_n "(cached) " >&6
24117else
24118 if test -n "$AR"; then
24119 ac_cv_prog_AR="$AR" # Let the user override the test.
24120else
24121as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24122for as_dir in $PATH
24123do
24124 IFS=$as_save_IFS
24125 test -z "$as_dir" && as_dir=.
24126 for ac_exec_ext in '' $ac_executable_extensions; do
24127 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24128 ac_cv_prog_AR="${ac_tool_prefix}ar"
24129 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24130 break 2
24131 fi
24132done
24133 done
24134IFS=$as_save_IFS
24135
24136fi
24137fi
24138AR=$ac_cv_prog_AR
24139if test -n "$AR"; then
24140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
24141$as_echo "$AR" >&6; }
24142else
24143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24144$as_echo "no" >&6; }
24145fi
24146
24147
24148fi
24149if test -z "$ac_cv_prog_AR"; then
24150 ac_ct_AR=$AR
24151 # Extract the first word of "ar", so it can be a program name with args.
24152set dummy ar; ac_word=$2
24153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24154$as_echo_n "checking for $ac_word... " >&6; }
24155if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
24156 $as_echo_n "(cached) " >&6
24157else
24158 if test -n "$ac_ct_AR"; then
24159 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
24160else
24161as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24162for as_dir in $PATH
24163do
24164 IFS=$as_save_IFS
24165 test -z "$as_dir" && as_dir=.
24166 for ac_exec_ext in '' $ac_executable_extensions; do
24167 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24168 ac_cv_prog_ac_ct_AR="ar"
24169 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24170 break 2
24171 fi
24172done
24173 done
24174IFS=$as_save_IFS
24175
24176fi
24177fi
24178ac_ct_AR=$ac_cv_prog_ac_ct_AR
24179if test -n "$ac_ct_AR"; then
24180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
24181$as_echo "$ac_ct_AR" >&6; }
24182else
24183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24184$as_echo "no" >&6; }
24185fi
24186
24187 if test "x$ac_ct_AR" = x; then
24188 AR=""
24189 else
24190 case $cross_compiling:$ac_tool_warned in
24191yes:)
24192{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24193$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24194ac_tool_warned=yes ;;
24195esac
24196 AR=$ac_ct_AR
24197 fi
24198else
24199 AR="$ac_cv_prog_AR"
24200fi
24201
24202
24203# ---------------------- #
24204# Checks for libraries. #
24205# ---------------------- #
24206
24207ac_config_files="$ac_config_files Makefile import/Makefile"
24208
24209ac_config_commands="$ac_config_commands default"
24210
24211cat >confcache <<\_ACEOF
24212# This file is a shell script that caches the results of configure
24213# tests run on this system so they can be shared between configure
24214# scripts and configure runs, see configure's option --config-cache.
24215# It is not useful on other systems. If it contains results you don't
24216# want to keep, you may remove or edit it.
24217#
24218# config.status only pays attention to the cache file if you give it
24219# the --recheck option to rerun configure.
24220#
24221# `ac_cv_env_foo' variables (set or unset) will be overridden when
24222# loading this file, other *unset* `ac_cv_foo' will be assigned the
24223# following values.
24224
24225_ACEOF
24226
24227# The following way of writing the cache mishandles newlines in values,
24228# but we know of no workaround that is simple, portable, and efficient.
24229# So, we kill variables containing newlines.
24230# Ultrix sh set writes to stderr and can't be redirected directly,
24231# and sets the high bit in the cache file unless we assign to the vars.
24232(
24233 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24234 eval ac_val=\$$ac_var
24235 case $ac_val in #(
24236 *${as_nl}*)
24237 case $ac_var in #(
24238 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
24239$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
24240 esac
24241 case $ac_var in #(
24242 _ | IFS | as_nl) ;; #(
24243 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
24244 *) { eval $ac_var=; unset $ac_var;} ;;
24245 esac ;;
24246 esac
24247 done
24248
24249 (set) 2>&1 |
24250 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24251 *${as_nl}ac_space=\ *)
24252 # `set' does not quote correctly, so add quotes: double-quote
24253 # substitution turns \\\\ into \\, and sed turns \\ into \.
24254 sed -n \
24255 "s/'/'\\\\''/g;
24256 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
24257 ;; #(
24258 *)
24259 # `set' quotes correctly as required by POSIX, so do not add quotes.
24260 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
24261 ;;
24262 esac |
24263 sort
24264) |
24265 sed '
24266 /^ac_cv_env_/b end
24267 t clear
24268 :clear
24269 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24270 t end
24271 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24272 :end' >>confcache
24273if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24274 if test -w "$cache_file"; then
24275 test "x$cache_file" != "x/dev/null" &&
24276 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
24277$as_echo "$as_me: updating cache $cache_file" >&6;}
24278 cat confcache >$cache_file
24279 else
24280 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
24281$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
24282 fi
24283fi
24284rm -f confcache
24285
24286test "x$prefix" = xNONE && prefix=$ac_default_prefix
24287# Let make expand exec_prefix.
24288test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24289
24290DEFS=-DHAVE_CONFIG_H
24291
24292ac_libobjs=
24293ac_ltlibobjs=
24294for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24295 # 1. Remove the extension, and $U if already installed.
24296 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24297 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
24298 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24299 # will be set to the directory where LIBOBJS objects are built.
24300 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24301 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
24302done
24303LIBOBJS=$ac_libobjs
24304
24305LTLIBOBJS=$ac_ltlibobjs
24306
24307
24308if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
24309 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
24310Usually this means the macro was only invoked conditionally." "$LINENO" 5
24311fi
24312if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
24313 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
24314Usually this means the macro was only invoked conditionally." "$LINENO" 5
24315fi
8690e634
JK
24316if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
24317 as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
24318Usually this means the macro was only invoked conditionally." "$LINENO" 5
24319fi
18848e28
GF
24320if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
24321 as_fn_error "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
24322Usually this means the macro was only invoked conditionally." "$LINENO" 5
24323fi
88b48903
WN
24324if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
24325 as_fn_error "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
24326Usually this means the macro was only invoked conditionally." "$LINENO" 5
24327fi
8690e634
JK
24328if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
24329 as_fn_error "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
24330Usually this means the macro was only invoked conditionally." "$LINENO" 5
24331fi
6ec2e0f5
SDJ
24332if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
24333 as_fn_error "conditional \"GL_GENERATE_GLOB_H\" was never defined.
24334Usually this means the macro was only invoked conditionally." "$LINENO" 5
24335fi
49e4877c
PA
24336if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
24337 as_fn_error "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
24338Usually this means the macro was only invoked conditionally." "$LINENO" 5
24339fi
24340if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
24341 as_fn_error "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
24342Usually this means the macro was only invoked conditionally." "$LINENO" 5
24343fi
c971b7fa
PA
24344if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
24345 as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined.
24346Usually this means the macro was only invoked conditionally." "$LINENO" 5
24347fi
88b48903
WN
24348
24349
8690e634
JK
24350if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
24351 as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
24352Usually this means the macro was only invoked conditionally." "$LINENO" 5
24353fi
c971b7fa
PA
24354if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
24355 as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
24356Usually this means the macro was only invoked conditionally." "$LINENO" 5
24357fi
24358
24359 gl_libobjs=
24360 gl_ltlibobjs=
24361 if test -n "$gl_LIBOBJS"; then
24362 # Remove the extension.
24363 sed_drop_objext='s/\.o$//;s/\.obj$//'
24364 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
24365 gl_libobjs="$gl_libobjs $i.$ac_objext"
24366 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
24367 done
24368 fi
24369 gl_LIBOBJS=$gl_libobjs
24370
24371 gl_LTLIBOBJS=$gl_ltlibobjs
24372
24373
24374
24375 gltests_libobjs=
24376 gltests_ltlibobjs=
24377 if test -n "$gltests_LIBOBJS"; then
24378 # Remove the extension.
24379 sed_drop_objext='s/\.o$//;s/\.obj$//'
24380 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
24381 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
24382 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
24383 done
24384 fi
24385 gltests_LIBOBJS=$gltests_libobjs
24386
24387 gltests_LTLIBOBJS=$gltests_ltlibobjs
24388
24389
24390if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
24391 as_fn_error "conditional \"AMDEP\" was never defined.
24392Usually this means the macro was only invoked conditionally." "$LINENO" 5
24393fi
24394if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
24395 as_fn_error "conditional \"am__fastdepCC\" was never defined.
24396Usually this means the macro was only invoked conditionally." "$LINENO" 5
24397fi
24398 if test -n "$EXEEXT"; then
24399 am__EXEEXT_TRUE=
24400 am__EXEEXT_FALSE='#'
24401else
24402 am__EXEEXT_TRUE='#'
24403 am__EXEEXT_FALSE=
24404fi
24405
24406
24407: ${CONFIG_STATUS=./config.status}
24408ac_write_fail=0
24409ac_clean_files_save=$ac_clean_files
24410ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24411{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
24412$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
24413as_write_fail=0
24414cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
24415#! $SHELL
24416# Generated by $as_me.
24417# Run this file to recreate the current configuration.
24418# Compiler output produced by configure, useful for debugging
24419# configure, is in config.log if it exists.
24420
24421debug=false
24422ac_cs_recheck=false
24423ac_cs_silent=false
24424
24425SHELL=\${CONFIG_SHELL-$SHELL}
24426export SHELL
24427_ASEOF
24428cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
24429## -------------------- ##
24430## M4sh Initialization. ##
24431## -------------------- ##
24432
24433# Be more Bourne compatible
24434DUALCASE=1; export DUALCASE # for MKS sh
24435if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
24436 emulate sh
24437 NULLCMD=:
24438 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
24439 # is contrary to our usage. Disable this feature.
24440 alias -g '${1+"$@"}'='"$@"'
24441 setopt NO_GLOB_SUBST
24442else
24443 case `(set -o) 2>/dev/null` in #(
24444 *posix*) :
24445 set -o posix ;; #(
24446 *) :
24447 ;;
24448esac
24449fi
24450
24451
24452as_nl='
24453'
24454export as_nl
24455# Printing a long string crashes Solaris 7 /usr/bin/printf.
24456as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
24457as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
24458as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
24459# Prefer a ksh shell builtin over an external printf program on Solaris,
24460# but without wasting forks for bash or zsh.
24461if test -z "$BASH_VERSION$ZSH_VERSION" \
24462 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
24463 as_echo='print -r --'
24464 as_echo_n='print -rn --'
24465elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
24466 as_echo='printf %s\n'
24467 as_echo_n='printf %s'
24468else
24469 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
24470 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
24471 as_echo_n='/usr/ucb/echo -n'
24472 else
24473 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
24474 as_echo_n_body='eval
24475 arg=$1;
24476 case $arg in #(
24477 *"$as_nl"*)
24478 expr "X$arg" : "X\\(.*\\)$as_nl";
24479 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
24480 esac;
24481 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
24482 '
24483 export as_echo_n_body
24484 as_echo_n='sh -c $as_echo_n_body as_echo'
24485 fi
24486 export as_echo_body
24487 as_echo='sh -c $as_echo_body as_echo'
24488fi
24489
24490# The user is always right.
24491if test "${PATH_SEPARATOR+set}" != set; then
24492 PATH_SEPARATOR=:
24493 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
24494 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
24495 PATH_SEPARATOR=';'
24496 }
24497fi
24498
24499
24500# IFS
24501# We need space, tab and new line, in precisely that order. Quoting is
24502# there to prevent editors from complaining about space-tab.
24503# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24504# splitting by setting IFS to empty value.)
24505IFS=" "" $as_nl"
24506
24507# Find who we are. Look in the path if we contain no directory separator.
24508case $0 in #((
24509 *[\\/]* ) as_myself=$0 ;;
24510 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24511for as_dir in $PATH
24512do
24513 IFS=$as_save_IFS
24514 test -z "$as_dir" && as_dir=.
24515 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24516 done
24517IFS=$as_save_IFS
24518
24519 ;;
24520esac
24521# We did not find ourselves, most probably we were run as `sh COMMAND'
24522# in which case we are not to be found in the path.
24523if test "x$as_myself" = x; then
24524 as_myself=$0
24525fi
24526if test ! -f "$as_myself"; then
24527 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24528 exit 1
24529fi
24530
24531# Unset variables that we do not need and which cause bugs (e.g. in
24532# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
24533# suppresses any "Segmentation fault" message there. '((' could
24534# trigger a bug in pdksh 5.2.14.
24535for as_var in BASH_ENV ENV MAIL MAILPATH
24536do eval test x\${$as_var+set} = xset \
24537 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
24538done
24539PS1='$ '
24540PS2='> '
24541PS4='+ '
24542
24543# NLS nuisances.
24544LC_ALL=C
24545export LC_ALL
24546LANGUAGE=C
24547export LANGUAGE
24548
24549# CDPATH.
24550(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
24551
24552
24553# as_fn_error ERROR [LINENO LOG_FD]
24554# ---------------------------------
24555# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
24556# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
24557# script with status $?, using 1 if that was 0.
24558as_fn_error ()
24559{
24560 as_status=$?; test $as_status -eq 0 && as_status=1
24561 if test "$3"; then
24562 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
24563 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
24564 fi
24565 $as_echo "$as_me: error: $1" >&2
24566 as_fn_exit $as_status
24567} # as_fn_error
24568
24569
24570# as_fn_set_status STATUS
24571# -----------------------
24572# Set $? to STATUS, without forking.
24573as_fn_set_status ()
24574{
24575 return $1
24576} # as_fn_set_status
24577
24578# as_fn_exit STATUS
24579# -----------------
24580# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
24581as_fn_exit ()
24582{
24583 set +e
24584 as_fn_set_status $1
24585 exit $1
24586} # as_fn_exit
24587
24588# as_fn_unset VAR
24589# ---------------
24590# Portably unset VAR.
24591as_fn_unset ()
24592{
24593 { eval $1=; unset $1;}
24594}
24595as_unset=as_fn_unset
24596# as_fn_append VAR VALUE
24597# ----------------------
24598# Append the text in VALUE to the end of the definition contained in VAR. Take
24599# advantage of any shell optimizations that allow amortized linear growth over
24600# repeated appends, instead of the typical quadratic growth present in naive
24601# implementations.
24602if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
24603 eval 'as_fn_append ()
24604 {
24605 eval $1+=\$2
24606 }'
24607else
24608 as_fn_append ()
24609 {
24610 eval $1=\$$1\$2
24611 }
24612fi # as_fn_append
24613
24614# as_fn_arith ARG...
24615# ------------------
24616# Perform arithmetic evaluation on the ARGs, and store the result in the
24617# global $as_val. Take advantage of shells that can avoid forks. The arguments
24618# must be portable across $(()) and expr.
24619if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
24620 eval 'as_fn_arith ()
24621 {
24622 as_val=$(( $* ))
24623 }'
24624else
24625 as_fn_arith ()
24626 {
24627 as_val=`expr "$@" || test $? -eq 1`
24628 }
24629fi # as_fn_arith
24630
24631
24632if expr a : '\(a\)' >/dev/null 2>&1 &&
24633 test "X`expr 00001 : '.*\(...\)'`" = X001; then
24634 as_expr=expr
24635else
24636 as_expr=false
24637fi
24638
24639if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
24640 as_basename=basename
24641else
24642 as_basename=false
24643fi
24644
24645if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24646 as_dirname=dirname
24647else
24648 as_dirname=false
24649fi
24650
24651as_me=`$as_basename -- "$0" ||
24652$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24653 X"$0" : 'X\(//\)$' \| \
24654 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
24655$as_echo X/"$0" |
24656 sed '/^.*\/\([^/][^/]*\)\/*$/{
24657 s//\1/
24658 q
24659 }
24660 /^X\/\(\/\/\)$/{
24661 s//\1/
24662 q
24663 }
24664 /^X\/\(\/\).*/{
24665 s//\1/
24666 q
24667 }
24668 s/.*/./; q'`
24669
24670# Avoid depending upon Character Ranges.
24671as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24672as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24673as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24674as_cr_digits='0123456789'
24675as_cr_alnum=$as_cr_Letters$as_cr_digits
24676
24677ECHO_C= ECHO_N= ECHO_T=
24678case `echo -n x` in #(((((
24679-n*)
24680 case `echo 'xy\c'` in
24681 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24682 xy) ECHO_C='\c';;
24683 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
24684 ECHO_T=' ';;
24685 esac;;
24686*)
24687 ECHO_N='-n';;
24688esac
24689
24690rm -f conf$$ conf$$.exe conf$$.file
24691if test -d conf$$.dir; then
24692 rm -f conf$$.dir/conf$$.file
24693else
24694 rm -f conf$$.dir
24695 mkdir conf$$.dir 2>/dev/null
24696fi
24697if (echo >conf$$.file) 2>/dev/null; then
24698 if ln -s conf$$.file conf$$ 2>/dev/null; then
24699 as_ln_s='ln -s'
24700 # ... but there are two gotchas:
24701 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24702 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24703 # In both cases, we have to default to `cp -p'.
24704 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
24705 as_ln_s='cp -p'
24706 elif ln conf$$.file conf$$ 2>/dev/null; then
24707 as_ln_s=ln
24708 else
24709 as_ln_s='cp -p'
24710 fi
24711else
24712 as_ln_s='cp -p'
24713fi
24714rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24715rmdir conf$$.dir 2>/dev/null
24716
24717
24718# as_fn_mkdir_p
24719# -------------
24720# Create "$as_dir" as a directory, including parents if necessary.
24721as_fn_mkdir_p ()
24722{
24723
24724 case $as_dir in #(
24725 -*) as_dir=./$as_dir;;
24726 esac
24727 test -d "$as_dir" || eval $as_mkdir_p || {
24728 as_dirs=
24729 while :; do
24730 case $as_dir in #(
24731 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
24732 *) as_qdir=$as_dir;;
24733 esac
24734 as_dirs="'$as_qdir' $as_dirs"
24735 as_dir=`$as_dirname -- "$as_dir" ||
24736$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24737 X"$as_dir" : 'X\(//\)[^/]' \| \
24738 X"$as_dir" : 'X\(//\)$' \| \
24739 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
24740$as_echo X"$as_dir" |
24741 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24742 s//\1/
24743 q
24744 }
24745 /^X\(\/\/\)[^/].*/{
24746 s//\1/
24747 q
24748 }
24749 /^X\(\/\/\)$/{
24750 s//\1/
24751 q
24752 }
24753 /^X\(\/\).*/{
24754 s//\1/
24755 q
24756 }
24757 s/.*/./; q'`
24758 test -d "$as_dir" && break
24759 done
24760 test -z "$as_dirs" || eval "mkdir $as_dirs"
24761 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
24762
24763
24764} # as_fn_mkdir_p
24765if mkdir -p . 2>/dev/null; then
24766 as_mkdir_p='mkdir -p "$as_dir"'
24767else
24768 test -d ./-p && rmdir ./-p
24769 as_mkdir_p=false
24770fi
24771
24772if test -x / >/dev/null 2>&1; then
24773 as_test_x='test -x'
24774else
24775 if ls -dL / >/dev/null 2>&1; then
24776 as_ls_L_option=L
24777 else
24778 as_ls_L_option=
24779 fi
24780 as_test_x='
24781 eval sh -c '\''
24782 if test -d "$1"; then
24783 test -d "$1/.";
24784 else
24785 case $1 in #(
24786 -*)set "./$1";;
24787 esac;
24788 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
24789 ???[sx]*):;;*)false;;esac;fi
24790 '\'' sh
24791 '
24792fi
24793as_executable_p=$as_test_x
24794
24795# Sed expression to map a string onto a valid CPP name.
24796as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
24797
24798# Sed expression to map a string onto a valid variable name.
24799as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
24800
24801
24802exec 6>&1
24803## ----------------------------------- ##
24804## Main body of $CONFIG_STATUS script. ##
24805## ----------------------------------- ##
24806_ASEOF
24807test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
24808
24809cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24810# Save the log message, to keep $0 and so on meaningful, and to
24811# report actual input values of CONFIG_FILES etc. instead of their
24812# values after options handling.
24813ac_log="
24814This file was extended by $as_me, which was
24815generated by GNU Autoconf 2.64. Invocation command line was
24816
24817 CONFIG_FILES = $CONFIG_FILES
24818 CONFIG_HEADERS = $CONFIG_HEADERS
24819 CONFIG_LINKS = $CONFIG_LINKS
24820 CONFIG_COMMANDS = $CONFIG_COMMANDS
24821 $ $0 $@
24822
24823on `(hostname || uname -n) 2>/dev/null | sed 1q`
24824"
24825
24826_ACEOF
24827
24828case $ac_config_files in *"
24829"*) set x $ac_config_files; shift; ac_config_files=$*;;
24830esac
24831
24832case $ac_config_headers in *"
24833"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
24834esac
24835
24836
24837cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24838# Files that config.status was made for.
24839config_files="$ac_config_files"
24840config_headers="$ac_config_headers"
24841config_commands="$ac_config_commands"
24842
24843_ACEOF
24844
24845cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24846ac_cs_usage="\
24847\`$as_me' instantiates files and other configuration actions
24848from templates according to the current configuration. Unless the files
24849and actions are specified as TAGs, all are instantiated by default.
24850
24851Usage: $0 [OPTION]... [TAG]...
24852
24853 -h, --help print this help, then exit
24854 -V, --version print version number and configuration settings, then exit
24855 -q, --quiet, --silent
24856 do not print progress messages
24857 -d, --debug don't remove temporary files
24858 --recheck update $as_me by reconfiguring in the same conditions
24859 --file=FILE[:TEMPLATE]
24860 instantiate the configuration file FILE
24861 --header=FILE[:TEMPLATE]
24862 instantiate the configuration header FILE
24863
24864Configuration files:
24865$config_files
24866
24867Configuration headers:
24868$config_headers
24869
24870Configuration commands:
24871$config_commands
24872
24873Report bugs to the package provider."
24874
24875_ACEOF
24876cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24877ac_cs_version="\\
24878config.status
24879configured by $0, generated by GNU Autoconf 2.64,
24880 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
24881
24882Copyright (C) 2009 Free Software Foundation, Inc.
24883This config.status script is free software; the Free Software Foundation
24884gives unlimited permission to copy, distribute and modify it."
24885
24886ac_pwd='$ac_pwd'
24887srcdir='$srcdir'
24888INSTALL='$INSTALL'
24889MKDIR_P='$MKDIR_P'
24890AWK='$AWK'
24891test -n "\$AWK" || AWK=awk
24892_ACEOF
24893
24894cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24895# The default lists apply if the user does not specify any file.
24896ac_need_defaults=:
24897while test $# != 0
24898do
24899 case $1 in
24900 --*=*)
24901 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24902 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
24903 ac_shift=:
24904 ;;
24905 *)
24906 ac_option=$1
24907 ac_optarg=$2
24908 ac_shift=shift
24909 ;;
24910 esac
24911
24912 case $ac_option in
24913 # Handling of the options.
24914 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24915 ac_cs_recheck=: ;;
24916 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24917 $as_echo "$ac_cs_version"; exit ;;
24918 --debug | --debu | --deb | --de | --d | -d )
24919 debug=: ;;
24920 --file | --fil | --fi | --f )
24921 $ac_shift
24922 case $ac_optarg in
24923 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
24924 esac
24925 as_fn_append CONFIG_FILES " '$ac_optarg'"
24926 ac_need_defaults=false;;
24927 --header | --heade | --head | --hea )
24928 $ac_shift
24929 case $ac_optarg in
24930 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
24931 esac
24932 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
24933 ac_need_defaults=false;;
24934 --he | --h)
24935 # Conflict between --help and --header
24936 as_fn_error "ambiguous option: \`$1'
24937Try \`$0 --help' for more information.";;
24938 --help | --hel | -h )
24939 $as_echo "$ac_cs_usage"; exit ;;
24940 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24941 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24942 ac_cs_silent=: ;;
24943
24944 # This is an error.
24945 -*) as_fn_error "unrecognized option: \`$1'
24946Try \`$0 --help' for more information." ;;
24947
24948 *) as_fn_append ac_config_targets " $1"
24949 ac_need_defaults=false ;;
24950
24951 esac
24952 shift
24953done
24954
24955ac_configure_extra_args=
24956
24957if $ac_cs_silent; then
24958 exec 6>/dev/null
24959 ac_configure_extra_args="$ac_configure_extra_args --silent"
24960fi
24961
24962_ACEOF
24963cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24964if \$ac_cs_recheck; then
24965 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
24966 shift
24967 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
24968 CONFIG_SHELL='$SHELL'
24969 export CONFIG_SHELL
24970 exec "\$@"
24971fi
24972
24973_ACEOF
24974cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24975exec 5>>config.log
24976{
24977 echo
24978 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24979## Running $as_me. ##
24980_ASBOX
24981 $as_echo "$ac_log"
24982} >&5
24983
24984_ACEOF
24985cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24986#
24987# INIT-COMMANDS
24988#
24989AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
24990
24991_ACEOF
24992
24993cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24994
24995# Handling of arguments.
24996for ac_config_target in $ac_config_targets
24997do
24998 case $ac_config_target in
24999 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
25000 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
25001 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
25002 "import/Makefile") CONFIG_FILES="$CONFIG_FILES import/Makefile" ;;
25003 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
25004
25005 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
25006 esac
25007done
25008
25009
25010# If the user did not use the arguments to specify the items to instantiate,
25011# then the envvar interface is used. Set only those that are not.
25012# We use the long form for the default assignment because of an extremely
25013# bizarre bug on SunOS 4.1.3.
25014if $ac_need_defaults; then
25015 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25016 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25017 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
25018fi
25019
25020# Have a temporary directory for convenience. Make it in the build tree
25021# simply because there is no reason against having it here, and in addition,
25022# creating and moving files from /tmp can sometimes cause problems.
25023# Hook for its removal unless debugging.
25024# Note that there is a small window in which the directory will not be cleaned:
25025# after its creation but before its name has been assigned to `$tmp'.
25026$debug ||
25027{
25028 tmp=
25029 trap 'exit_status=$?
25030 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25031' 0
25032 trap 'as_fn_exit 1' 1 2 13 15
25033}
25034# Create a (secure) tmp directory for tmp files.
25035
25036{
25037 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
25038 test -n "$tmp" && test -d "$tmp"
25039} ||
25040{
25041 tmp=./conf$$-$RANDOM
25042 (umask 077 && mkdir "$tmp")
25043} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
25044
25045# Set up the scripts for CONFIG_FILES section.
25046# No need to generate them if there are no CONFIG_FILES.
25047# This happens for instance with `./config.status config.h'.
25048if test -n "$CONFIG_FILES"; then
25049
25050
25051ac_cr=`echo X | tr X '\015'`
25052# On cygwin, bash can eat \r inside `` if the user requested igncr.
25053# But we know of no other shell where ac_cr would be empty at this
25054# point, so we can use a bashism as a fallback.
25055if test "x$ac_cr" = x; then
25056 eval ac_cr=\$\'\\r\'
25057fi
25058ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
25059if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
25060 ac_cs_awk_cr='\r'
25061else
25062 ac_cs_awk_cr=$ac_cr
25063fi
25064
25065echo 'BEGIN {' >"$tmp/subs1.awk" &&
25066_ACEOF
25067
25068
25069{
25070 echo "cat >conf$$subs.awk <<_ACEOF" &&
25071 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
25072 echo "_ACEOF"
25073} >conf$$subs.sh ||
25074 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25075ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
25076ac_delim='%!_!# '
25077for ac_last_try in false false false false false :; do
25078 . ./conf$$subs.sh ||
25079 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25080
25081 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
25082 if test $ac_delim_n = $ac_delim_num; then
25083 break
25084 elif $ac_last_try; then
25085 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25086 else
25087 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25088 fi
25089done
25090rm -f conf$$subs.sh
25091
25092cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25093cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
25094_ACEOF
25095sed -n '
25096h
25097s/^/S["/; s/!.*/"]=/
25098p
25099g
25100s/^[^!]*!//
25101:repl
25102t repl
25103s/'"$ac_delim"'$//
25104t delim
25105:nl
25106h
25107s/\(.\{148\}\).*/\1/
25108t more1
25109s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
25110p
25111n
25112b repl
25113:more1
25114s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25115p
25116g
25117s/.\{148\}//
25118t nl
25119:delim
25120h
25121s/\(.\{148\}\).*/\1/
25122t more2
25123s/["\\]/\\&/g; s/^/"/; s/$/"/
25124p
25125b
25126:more2
25127s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25128p
25129g
25130s/.\{148\}//
25131t delim
25132' <conf$$subs.awk | sed '
25133/^[^""]/{
25134 N
25135 s/\n//
25136}
25137' >>$CONFIG_STATUS || ac_write_fail=1
25138rm -f conf$$subs.awk
25139cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25140_ACAWK
25141cat >>"\$tmp/subs1.awk" <<_ACAWK &&
25142 for (key in S) S_is_set[key] = 1
25143 FS = "\a"
25144
25145}
25146{
25147 line = $ 0
25148 nfields = split(line, field, "@")
25149 substed = 0
25150 len = length(field[1])
25151 for (i = 2; i < nfields; i++) {
25152 key = field[i]
25153 keylen = length(key)
25154 if (S_is_set[key]) {
25155 value = S[key]
25156 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
25157 len += length(value) + length(field[++i])
25158 substed = 1
25159 } else
25160 len += 1 + keylen
25161 }
25162
25163 print line
25164}
25165
25166_ACAWK
25167_ACEOF
25168cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25169if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
25170 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
25171else
25172 cat
25173fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
25174 || as_fn_error "could not setup config files machinery" "$LINENO" 5
25175_ACEOF
25176
25177# VPATH may cause trouble with some makes, so we remove $(srcdir),
25178# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25179# trailing colons and then remove the whole line if VPATH becomes empty
25180# (actually we leave an empty line to preserve line numbers).
25181if test "x$srcdir" = x.; then
25182 ac_vpsub='/^[ ]*VPATH[ ]*=/{
25183s/:*\$(srcdir):*/:/
25184s/:*\${srcdir}:*/:/
25185s/:*@srcdir@:*/:/
25186s/^\([^=]*=[ ]*\):*/\1/
25187s/:*$//
25188s/^[^=]*=[ ]*$//
25189}'
25190fi
25191
25192cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25193fi # test -n "$CONFIG_FILES"
25194
25195# Set up the scripts for CONFIG_HEADERS section.
25196# No need to generate them if there are no CONFIG_HEADERS.
25197# This happens for instance with `./config.status Makefile'.
25198if test -n "$CONFIG_HEADERS"; then
25199cat >"$tmp/defines.awk" <<\_ACAWK ||
25200BEGIN {
25201_ACEOF
25202
25203# Transform confdefs.h into an awk script `defines.awk', embedded as
25204# here-document in config.status, that substitutes the proper values into
25205# config.h.in to produce config.h.
25206
25207# Create a delimiter string that does not exist in confdefs.h, to ease
25208# handling of long lines.
25209ac_delim='%!_!# '
25210for ac_last_try in false false :; do
25211 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
25212 if test -z "$ac_t"; then
25213 break
25214 elif $ac_last_try; then
25215 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
25216 else
25217 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25218 fi
25219done
25220
25221# For the awk script, D is an array of macro values keyed by name,
25222# likewise P contains macro parameters if any. Preserve backslash
25223# newline sequences.
25224
25225ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25226sed -n '
25227s/.\{148\}/&'"$ac_delim"'/g
25228t rset
25229:rset
25230s/^[ ]*#[ ]*define[ ][ ]*/ /
25231t def
25232d
25233:def
25234s/\\$//
25235t bsnl
25236s/["\\]/\\&/g
25237s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
25238D["\1"]=" \3"/p
25239s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
25240d
25241:bsnl
25242s/["\\]/\\&/g
25243s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
25244D["\1"]=" \3\\\\\\n"\\/p
25245t cont
25246s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
25247t cont
25248d
25249:cont
25250n
25251s/.\{148\}/&'"$ac_delim"'/g
25252t clear
25253:clear
25254s/\\$//
25255t bsnlc
25256s/["\\]/\\&/g; s/^/"/; s/$/"/p
25257d
25258:bsnlc
25259s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
25260b cont
25261' <confdefs.h | sed '
25262s/'"$ac_delim"'/"\\\
25263"/g' >>$CONFIG_STATUS || ac_write_fail=1
25264
25265cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25266 for (key in D) D_is_set[key] = 1
25267 FS = "\a"
25268}
25269/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
25270 line = \$ 0
25271 split(line, arg, " ")
25272 if (arg[1] == "#") {
25273 defundef = arg[2]
25274 mac1 = arg[3]
25275 } else {
25276 defundef = substr(arg[1], 2)
25277 mac1 = arg[2]
25278 }
25279 split(mac1, mac2, "(") #)
25280 macro = mac2[1]
25281 prefix = substr(line, 1, index(line, defundef) - 1)
25282 if (D_is_set[macro]) {
25283 # Preserve the white space surrounding the "#".
25284 print prefix "define", macro P[macro] D[macro]
25285 next
25286 } else {
25287 # Replace #undef with comments. This is necessary, for example,
25288 # in the case of _POSIX_SOURCE, which is predefined and required
25289 # on some systems where configure will not decide to define it.
25290 if (defundef == "undef") {
25291 print "/*", prefix defundef, macro, "*/"
25292 next
25293 }
25294 }
25295}
25296{ print }
25297_ACAWK
25298_ACEOF
25299cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25300 as_fn_error "could not setup config headers machinery" "$LINENO" 5
25301fi # test -n "$CONFIG_HEADERS"
25302
25303
25304eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
25305shift
25306for ac_tag
25307do
25308 case $ac_tag in
25309 :[FHLC]) ac_mode=$ac_tag; continue;;
25310 esac
25311 case $ac_mode$ac_tag in
25312 :[FHL]*:*);;
25313 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
25314 :[FH]-) ac_tag=-:-;;
25315 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25316 esac
25317 ac_save_IFS=$IFS
25318 IFS=:
25319 set x $ac_tag
25320 IFS=$ac_save_IFS
25321 shift
25322 ac_file=$1
25323 shift
25324
25325 case $ac_mode in
25326 :L) ac_source=$1;;
25327 :[FH])
25328 ac_file_inputs=
25329 for ac_f
25330 do
25331 case $ac_f in
25332 -) ac_f="$tmp/stdin";;
25333 *) # Look for the file first in the build tree, then in the source tree
25334 # (if the path is not absolute). The absolute path cannot be DOS-style,
25335 # because $ac_f cannot contain `:'.
25336 test -f "$ac_f" ||
25337 case $ac_f in
25338 [\\/$]*) false;;
25339 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25340 esac ||
25341 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
25342 esac
25343 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
25344 as_fn_append ac_file_inputs " '$ac_f'"
25345 done
25346
25347 # Let's still pretend it is `configure' which instantiates (i.e., don't
25348 # use $as_me), people would be surprised to read:
25349 # /* config.h. Generated by config.status. */
25350 configure_input='Generated from '`
25351 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
25352 `' by configure.'
25353 if test x"$ac_file" != x-; then
25354 configure_input="$ac_file. $configure_input"
25355 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
25356$as_echo "$as_me: creating $ac_file" >&6;}
25357 fi
25358 # Neutralize special characters interpreted by sed in replacement strings.
25359 case $configure_input in #(
25360 *\&* | *\|* | *\\* )
25361 ac_sed_conf_input=`$as_echo "$configure_input" |
25362 sed 's/[\\\\&|]/\\\\&/g'`;; #(
25363 *) ac_sed_conf_input=$configure_input;;
25364 esac
25365
25366 case $ac_tag in
25367 *:-:* | *:-) cat >"$tmp/stdin" \
25368 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
25369 esac
25370 ;;
25371 esac
25372
25373 ac_dir=`$as_dirname -- "$ac_file" ||
25374$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25375 X"$ac_file" : 'X\(//\)[^/]' \| \
25376 X"$ac_file" : 'X\(//\)$' \| \
25377 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
25378$as_echo X"$ac_file" |
25379 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25380 s//\1/
25381 q
25382 }
25383 /^X\(\/\/\)[^/].*/{
25384 s//\1/
25385 q
25386 }
25387 /^X\(\/\/\)$/{
25388 s//\1/
25389 q
25390 }
25391 /^X\(\/\).*/{
25392 s//\1/
25393 q
25394 }
25395 s/.*/./; q'`
25396 as_dir="$ac_dir"; as_fn_mkdir_p
25397 ac_builddir=.
25398
25399case "$ac_dir" in
25400.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25401*)
25402 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
25403 # A ".." for each directory in $ac_dir_suffix.
25404 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
25405 case $ac_top_builddir_sub in
25406 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25407 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25408 esac ;;
25409esac
25410ac_abs_top_builddir=$ac_pwd
25411ac_abs_builddir=$ac_pwd$ac_dir_suffix
25412# for backward compatibility:
25413ac_top_builddir=$ac_top_build_prefix
25414
25415case $srcdir in
25416 .) # We are building in place.
25417 ac_srcdir=.
25418 ac_top_srcdir=$ac_top_builddir_sub
25419 ac_abs_top_srcdir=$ac_pwd ;;
25420 [\\/]* | ?:[\\/]* ) # Absolute name.
25421 ac_srcdir=$srcdir$ac_dir_suffix;
25422 ac_top_srcdir=$srcdir
25423 ac_abs_top_srcdir=$srcdir ;;
25424 *) # Relative name.
25425 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25426 ac_top_srcdir=$ac_top_build_prefix$srcdir
25427 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
25428esac
25429ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
25430
25431
25432 case $ac_mode in
25433 :F)
25434 #
25435 # CONFIG_FILE
25436 #
25437
25438 case $INSTALL in
25439 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
25440 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
25441 esac
25442 ac_MKDIR_P=$MKDIR_P
25443 case $MKDIR_P in
25444 [\\/$]* | ?:[\\/]* ) ;;
25445 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
25446 esac
25447_ACEOF
25448
25449cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25450# If the template does not know about datarootdir, expand it.
25451# FIXME: This hack should be removed a few years after 2.60.
25452ac_datarootdir_hack=; ac_datarootdir_seen=
25453ac_sed_dataroot='
25454/datarootdir/ {
25455 p
25456 q
25457}
25458/@datadir@/p
25459/@docdir@/p
25460/@infodir@/p
25461/@localedir@/p
25462/@mandir@/p'
25463case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
25464*datarootdir*) ac_datarootdir_seen=yes;;
25465*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25466 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25467$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25468_ACEOF
25469cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25470 ac_datarootdir_hack='
25471 s&@datadir@&$datadir&g
25472 s&@docdir@&$docdir&g
25473 s&@infodir@&$infodir&g
25474 s&@localedir@&$localedir&g
25475 s&@mandir@&$mandir&g
25476 s&\\\${datarootdir}&$datarootdir&g' ;;
25477esac
25478_ACEOF
25479
25480# Neutralize VPATH when `$srcdir' = `.'.
25481# Shell code in configure.ac might set extrasub.
25482# FIXME: do we really want to maintain this feature?
25483cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25484ac_sed_extra="$ac_vpsub
25485$extrasub
25486_ACEOF
25487cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25488:t
25489/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25490s|@configure_input@|$ac_sed_conf_input|;t t
25491s&@top_builddir@&$ac_top_builddir_sub&;t t
25492s&@top_build_prefix@&$ac_top_build_prefix&;t t
25493s&@srcdir@&$ac_srcdir&;t t
25494s&@abs_srcdir@&$ac_abs_srcdir&;t t
25495s&@top_srcdir@&$ac_top_srcdir&;t t
25496s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25497s&@builddir@&$ac_builddir&;t t
25498s&@abs_builddir@&$ac_abs_builddir&;t t
25499s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25500s&@INSTALL@&$ac_INSTALL&;t t
25501s&@MKDIR_P@&$ac_MKDIR_P&;t t
25502$ac_datarootdir_hack
25503"
25504eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
25505 || as_fn_error "could not create $ac_file" "$LINENO" 5
25506
25507test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25508 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25509 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25510 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25511which seems to be undefined. Please make sure it is defined." >&5
25512$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25513which seems to be undefined. Please make sure it is defined." >&2;}
25514
25515 rm -f "$tmp/stdin"
25516 case $ac_file in
25517 -) cat "$tmp/out" && rm -f "$tmp/out";;
25518 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
25519 esac \
25520 || as_fn_error "could not create $ac_file" "$LINENO" 5
25521 ;;
25522 :H)
25523 #
25524 # CONFIG_HEADER
25525 #
25526 if test x"$ac_file" != x-; then
25527 {
25528 $as_echo "/* $configure_input */" \
25529 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
25530 } >"$tmp/config.h" \
25531 || as_fn_error "could not create $ac_file" "$LINENO" 5
25532 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
25533 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
25534$as_echo "$as_me: $ac_file is unchanged" >&6;}
25535 else
25536 rm -f "$ac_file"
25537 mv "$tmp/config.h" "$ac_file" \
25538 || as_fn_error "could not create $ac_file" "$LINENO" 5
25539 fi
25540 else
25541 $as_echo "/* $configure_input */" \
25542 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
25543 || as_fn_error "could not create -" "$LINENO" 5
25544 fi
25545# Compute "$ac_file"'s index in $config_headers.
25546_am_arg="$ac_file"
25547_am_stamp_count=1
25548for _am_header in $config_headers :; do
25549 case $_am_header in
25550 $_am_arg | $_am_arg:* )
25551 break ;;
25552 * )
25553 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
25554 esac
25555done
25556echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
25557$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25558 X"$_am_arg" : 'X\(//\)[^/]' \| \
25559 X"$_am_arg" : 'X\(//\)$' \| \
25560 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
25561$as_echo X"$_am_arg" |
25562 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25563 s//\1/
25564 q
25565 }
25566 /^X\(\/\/\)[^/].*/{
25567 s//\1/
25568 q
25569 }
25570 /^X\(\/\/\)$/{
25571 s//\1/
25572 q
25573 }
25574 /^X\(\/\).*/{
25575 s//\1/
25576 q
25577 }
25578 s/.*/./; q'`/stamp-h$_am_stamp_count
25579 ;;
25580
25581 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
25582$as_echo "$as_me: executing $ac_file commands" >&6;}
25583 ;;
25584 esac
25585
25586
25587 case $ac_file$ac_mode in
25588 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
25589 # Autoconf 2.62 quotes --file arguments for eval, but not when files
25590 # are listed without --file. Let's play safe and only enable the eval
25591 # if we detect the quoting.
25592 case $CONFIG_FILES in
25593 *\'*) eval set x "$CONFIG_FILES" ;;
25594 *) set x $CONFIG_FILES ;;
25595 esac
25596 shift
25597 for mf
25598 do
25599 # Strip MF so we end up with the name of the file.
25600 mf=`echo "$mf" | sed -e 's/:.*$//'`
25601 # Check whether this is an Automake generated Makefile or not.
25602 # We used to match only the files named `Makefile.in', but
25603 # some people rename them; so instead we look at the file content.
25604 # Grep'ing the first line is not enough: some people post-process
25605 # each Makefile.in and add a new line on top of each file to say so.
25606 # Grep'ing the whole file is not good either: AIX grep has a line
25607 # limit of 2048, but all sed's we know have understand at least 4000.
25608 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
25609 dirpart=`$as_dirname -- "$mf" ||
25610$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25611 X"$mf" : 'X\(//\)[^/]' \| \
25612 X"$mf" : 'X\(//\)$' \| \
25613 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
25614$as_echo X"$mf" |
25615 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25616 s//\1/
25617 q
25618 }
25619 /^X\(\/\/\)[^/].*/{
25620 s//\1/
25621 q
25622 }
25623 /^X\(\/\/\)$/{
25624 s//\1/
25625 q
25626 }
25627 /^X\(\/\).*/{
25628 s//\1/
25629 q
25630 }
25631 s/.*/./; q'`
25632 else
25633 continue
25634 fi
25635 # Extract the definition of DEPDIR, am__include, and am__quote
25636 # from the Makefile without running `make'.
25637 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
25638 test -z "$DEPDIR" && continue
25639 am__include=`sed -n 's/^am__include = //p' < "$mf"`
25640 test -z "am__include" && continue
25641 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
25642 # When using ansi2knr, U may be empty or an underscore; expand it
25643 U=`sed -n 's/^U = //p' < "$mf"`
25644 # Find all dependency output files, they are included files with
25645 # $(DEPDIR) in their names. We invoke sed twice because it is the
25646 # simplest approach to changing $(DEPDIR) to its actual value in the
25647 # expansion.
25648 for file in `sed -n "
25649 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
25650 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
25651 # Make sure the directory exists.
25652 test -f "$dirpart/$file" && continue
25653 fdir=`$as_dirname -- "$file" ||
25654$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25655 X"$file" : 'X\(//\)[^/]' \| \
25656 X"$file" : 'X\(//\)$' \| \
25657 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
25658$as_echo X"$file" |
25659 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25660 s//\1/
25661 q
25662 }
25663 /^X\(\/\/\)[^/].*/{
25664 s//\1/
25665 q
25666 }
25667 /^X\(\/\/\)$/{
25668 s//\1/
25669 q
25670 }
25671 /^X\(\/\).*/{
25672 s//\1/
25673 q
25674 }
25675 s/.*/./; q'`
25676 as_dir=$dirpart/$fdir; as_fn_mkdir_p
25677 # echo "creating $dirpart/$file"
25678 echo '# dummy' > "$dirpart/$file"
25679 done
25680 done
25681}
25682 ;;
25683 "default":C)
25684case x$CONFIG_HEADERS in
25685xconfig.h:config.in)
25686echo > stamp-h ;;
25687esac
25688 ;;
25689
25690 esac
25691done # for ac_tag
25692
25693
25694as_fn_exit 0
25695_ACEOF
25696ac_clean_files=$ac_clean_files_save
25697
25698test $ac_write_fail = 0 ||
25699 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
25700
25701
25702# configure is writing to config.log, and then calls config.status.
25703# config.status does its own redirection, appending to config.log.
25704# Unfortunately, on DOS this fails, as config.log is still kept open
25705# by configure, so config.status won't be able to write to it; its
25706# output is simply discarded. So we exec the FD to /dev/null,
25707# effectively closing config.log, so it can be properly (re)opened and
25708# appended to by config.status. When coming back to configure, we
25709# need to make the FD available again.
25710if test "$no_create" != yes; then
25711 ac_cs_success=:
25712 ac_config_status_args=
25713 test "$silent" = yes &&
25714 ac_config_status_args="$ac_config_status_args --quiet"
25715 exec 5>/dev/null
25716 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
25717 exec 5>>config.log
25718 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25719 # would make configure fail if this is the last instruction.
25720 $ac_cs_success || as_fn_exit $?
25721fi
25722if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
25723 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
25724$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
25725fi
25726
25727
25728exit 0
This page took 1.624101 seconds and 4 git commands to generate.