gnulib: import mkstemp
[deliverable/binutils-gdb.git] / gdb / gnulib / configure
CommitLineData
c971b7fa
PA
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.64.
4#
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
7# Foundation, Inc.
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
14
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18 emulate sh
19 NULLCMD=:
20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
31fi
32
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
79fi
80
81
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
90case $0 in #((
91 *[\\/]* ) as_myself=$0 ;;
92 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
93for as_dir in $PATH
94do
95 IFS=$as_save_IFS
96 test -z "$as_dir" && as_dir=.
97 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
98 done
99IFS=$as_save_IFS
100
101 ;;
102esac
103# We did not find ourselves, most probably we were run as `sh COMMAND'
104# in which case we are not to be found in the path.
105if test "x$as_myself" = x; then
106 as_myself=$0
107fi
108if test ! -f "$as_myself"; then
109 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
110 exit 1
111fi
112
113# Unset variables that we do not need and which cause bugs (e.g. in
114# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
115# suppresses any "Segmentation fault" message there. '((' could
116# trigger a bug in pdksh 5.2.14.
117for as_var in BASH_ENV ENV MAIL MAILPATH
118do eval test x\${$as_var+set} = xset \
119 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
120done
121PS1='$ '
122PS2='> '
123PS4='+ '
124
125# NLS nuisances.
126LC_ALL=C
127export LC_ALL
128LANGUAGE=C
129export LANGUAGE
130
131# CDPATH.
132(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
133
134if test "x$CONFIG_SHELL" = x; then
135 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
136 emulate sh
137 NULLCMD=:
138 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
139 # is contrary to our usage. Disable this feature.
140 alias -g '\${1+\"\$@\"}'='\"\$@\"'
141 setopt NO_GLOB_SUBST
142else
143 case \`(set -o) 2>/dev/null\` in #(
144 *posix*) :
145 set -o posix ;; #(
146 *) :
147 ;;
148esac
149fi
150"
151 as_required="as_fn_return () { (exit \$1); }
152as_fn_success () { as_fn_return 0; }
153as_fn_failure () { as_fn_return 1; }
154as_fn_ret_success () { return 0; }
155as_fn_ret_failure () { return 1; }
156
157exitcode=0
158as_fn_success || { exitcode=1; echo as_fn_success failed.; }
159as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
160as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
161as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
162if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
163
164else
165 exitcode=1; echo positional parameters were not saved.
166fi
167test x\$exitcode = x0 || exit 1"
168 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
169 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
170 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
171 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
172test \$(( 1 + 1 )) = 2 || exit 1"
173 if (eval "$as_required") 2>/dev/null; then :
174 as_have_required=yes
175else
176 as_have_required=no
177fi
178 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
179
180else
181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
182as_found=false
183for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
184do
185 IFS=$as_save_IFS
186 test -z "$as_dir" && as_dir=.
187 as_found=:
188 case $as_dir in #(
189 /*)
190 for as_base in sh bash ksh sh5; do
191 # Try only shells that exist, to save several forks.
192 as_shell=$as_dir/$as_base
193 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
194 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
195 CONFIG_SHELL=$as_shell as_have_required=yes
196 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 break 2
198fi
199fi
200 done;;
201 esac
202 as_found=false
203done
204$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
205 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
206 CONFIG_SHELL=$SHELL as_have_required=yes
207fi; }
208IFS=$as_save_IFS
209
210
211 if test "x$CONFIG_SHELL" != x; then :
212 # We cannot yet assume a decent shell, so we have to provide a
213 # neutralization value for shells without unset; and this also
214 # works around shells that cannot unset nonexistent variables.
215 BASH_ENV=/dev/null
216 ENV=/dev/null
217 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
218 export CONFIG_SHELL
219 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
220fi
221
222 if test x$as_have_required = xno; then :
223 $as_echo "$0: This script requires a shell more modern than all"
224 $as_echo "$0: the shells that I found on your system."
225 if test x${ZSH_VERSION+set} = xset ; then
226 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
227 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
228 else
229 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
230$0: including any error possibly output before this
231$0: message. Then install a modern shell, or manually run
232$0: the script under such a shell if you do have one."
233 fi
234 exit 1
235fi
236fi
237fi
238SHELL=${CONFIG_SHELL-/bin/sh}
239export SHELL
240# Unset more variables known to interfere with behavior of common tools.
241CLICOLOR_FORCE= GREP_OPTIONS=
242unset CLICOLOR_FORCE GREP_OPTIONS
243
244## --------------------- ##
245## M4sh Shell Functions. ##
246## --------------------- ##
247# as_fn_unset VAR
248# ---------------
249# Portably unset VAR.
250as_fn_unset ()
251{
252 { eval $1=; unset $1;}
253}
254as_unset=as_fn_unset
255
256# as_fn_set_status STATUS
257# -----------------------
258# Set $? to STATUS, without forking.
259as_fn_set_status ()
260{
261 return $1
262} # as_fn_set_status
263
264# as_fn_exit STATUS
265# -----------------
266# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
267as_fn_exit ()
268{
269 set +e
270 as_fn_set_status $1
271 exit $1
272} # as_fn_exit
273
274# as_fn_mkdir_p
275# -------------
276# Create "$as_dir" as a directory, including parents if necessary.
277as_fn_mkdir_p ()
278{
279
280 case $as_dir in #(
281 -*) as_dir=./$as_dir;;
282 esac
283 test -d "$as_dir" || eval $as_mkdir_p || {
284 as_dirs=
285 while :; do
286 case $as_dir in #(
287 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
288 *) as_qdir=$as_dir;;
289 esac
290 as_dirs="'$as_qdir' $as_dirs"
291 as_dir=`$as_dirname -- "$as_dir" ||
292$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
293 X"$as_dir" : 'X\(//\)[^/]' \| \
294 X"$as_dir" : 'X\(//\)$' \| \
295 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
296$as_echo X"$as_dir" |
297 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
298 s//\1/
299 q
300 }
301 /^X\(\/\/\)[^/].*/{
302 s//\1/
303 q
304 }
305 /^X\(\/\/\)$/{
306 s//\1/
307 q
308 }
309 /^X\(\/\).*/{
310 s//\1/
311 q
312 }
313 s/.*/./; q'`
314 test -d "$as_dir" && break
315 done
316 test -z "$as_dirs" || eval "mkdir $as_dirs"
317 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
318
319
320} # as_fn_mkdir_p
321# as_fn_append VAR VALUE
322# ----------------------
323# Append the text in VALUE to the end of the definition contained in VAR. Take
324# advantage of any shell optimizations that allow amortized linear growth over
325# repeated appends, instead of the typical quadratic growth present in naive
326# implementations.
327if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
328 eval 'as_fn_append ()
329 {
330 eval $1+=\$2
331 }'
332else
333 as_fn_append ()
334 {
335 eval $1=\$$1\$2
336 }
337fi # as_fn_append
338
339# as_fn_arith ARG...
340# ------------------
341# Perform arithmetic evaluation on the ARGs, and store the result in the
342# global $as_val. Take advantage of shells that can avoid forks. The arguments
343# must be portable across $(()) and expr.
344if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
345 eval 'as_fn_arith ()
346 {
347 as_val=$(( $* ))
348 }'
349else
350 as_fn_arith ()
351 {
352 as_val=`expr "$@" || test $? -eq 1`
353 }
354fi # as_fn_arith
355
356
357# as_fn_error ERROR [LINENO LOG_FD]
358# ---------------------------------
359# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
360# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
361# script with status $?, using 1 if that was 0.
362as_fn_error ()
363{
364 as_status=$?; test $as_status -eq 0 && as_status=1
365 if test "$3"; then
366 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
367 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
368 fi
369 $as_echo "$as_me: error: $1" >&2
370 as_fn_exit $as_status
371} # as_fn_error
372
373if expr a : '\(a\)' >/dev/null 2>&1 &&
374 test "X`expr 00001 : '.*\(...\)'`" = X001; then
375 as_expr=expr
376else
377 as_expr=false
378fi
379
380if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
381 as_basename=basename
382else
383 as_basename=false
384fi
385
386if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
387 as_dirname=dirname
388else
389 as_dirname=false
390fi
391
392as_me=`$as_basename -- "$0" ||
393$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
394 X"$0" : 'X\(//\)$' \| \
395 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
396$as_echo X/"$0" |
397 sed '/^.*\/\([^/][^/]*\)\/*$/{
398 s//\1/
399 q
400 }
401 /^X\/\(\/\/\)$/{
402 s//\1/
403 q
404 }
405 /^X\/\(\/\).*/{
406 s//\1/
407 q
408 }
409 s/.*/./; q'`
410
411# Avoid depending upon Character Ranges.
412as_cr_letters='abcdefghijklmnopqrstuvwxyz'
413as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
414as_cr_Letters=$as_cr_letters$as_cr_LETTERS
415as_cr_digits='0123456789'
416as_cr_alnum=$as_cr_Letters$as_cr_digits
417
418
419 as_lineno_1=$LINENO as_lineno_1a=$LINENO
420 as_lineno_2=$LINENO as_lineno_2a=$LINENO
421 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
422 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
423 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
424 sed -n '
425 p
426 /[$]LINENO/=
427 ' <$as_myself |
428 sed '
429 s/[$]LINENO.*/&-/
430 t lineno
431 b
432 :lineno
433 N
434 :loop
435 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
436 t loop
437 s/-\n.*//
438 ' >$as_me.lineno &&
439 chmod +x "$as_me.lineno" ||
440 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
441
442 # Don't try to exec as it changes $[0], causing all sort of problems
443 # (the dirname of $[0] is not the place where we might find the
444 # original and so on. Autoconf is especially sensitive to this).
445 . "./$as_me.lineno"
446 # Exit status is that of the last command.
447 exit
448}
449
450ECHO_C= ECHO_N= ECHO_T=
451case `echo -n x` in #(((((
452-n*)
453 case `echo 'xy\c'` in
454 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
455 xy) ECHO_C='\c';;
456 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
457 ECHO_T=' ';;
458 esac;;
459*)
460 ECHO_N='-n';;
461esac
462
463rm -f conf$$ conf$$.exe conf$$.file
464if test -d conf$$.dir; then
465 rm -f conf$$.dir/conf$$.file
466else
467 rm -f conf$$.dir
468 mkdir conf$$.dir 2>/dev/null
469fi
470if (echo >conf$$.file) 2>/dev/null; then
471 if ln -s conf$$.file conf$$ 2>/dev/null; then
472 as_ln_s='ln -s'
473 # ... but there are two gotchas:
474 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
475 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
476 # In both cases, we have to default to `cp -p'.
477 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
478 as_ln_s='cp -p'
479 elif ln conf$$.file conf$$ 2>/dev/null; then
480 as_ln_s=ln
481 else
482 as_ln_s='cp -p'
483 fi
484else
485 as_ln_s='cp -p'
486fi
487rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
488rmdir conf$$.dir 2>/dev/null
489
490if mkdir -p . 2>/dev/null; then
491 as_mkdir_p='mkdir -p "$as_dir"'
492else
493 test -d ./-p && rmdir ./-p
494 as_mkdir_p=false
495fi
496
497if test -x / >/dev/null 2>&1; then
498 as_test_x='test -x'
499else
500 if ls -dL / >/dev/null 2>&1; then
501 as_ls_L_option=L
502 else
503 as_ls_L_option=
504 fi
505 as_test_x='
506 eval sh -c '\''
507 if test -d "$1"; then
508 test -d "$1/.";
509 else
510 case $1 in #(
511 -*)set "./$1";;
512 esac;
513 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
514 ???[sx]*):;;*)false;;esac;fi
515 '\'' sh
516 '
517fi
518as_executable_p=$as_test_x
519
520# Sed expression to map a string onto a valid CPP name.
521as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
522
523# Sed expression to map a string onto a valid variable name.
524as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
525
526
527exec 7<&0 </dev/null 6>&1
528
529# Name of the host.
530# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
531# so uname gets run too.
532ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
533
534#
535# Initializations.
536#
537ac_default_prefix=/usr/local
538ac_clean_files=
539ac_config_libobj_dir=.
540LIBOBJS=
541cross_compiling=no
542subdirs=
543MFLAGS=
544MAKEFLAGS=
545
546# Identity of this package.
547PACKAGE_NAME=
548PACKAGE_TARNAME=
549PACKAGE_VERSION=
550PACKAGE_STRING=
551PACKAGE_BUGREPORT=
552PACKAGE_URL=
553
8690e634 554ac_unique_file="import/memmem.c"
c971b7fa
PA
555# Factoring default headers for most tests.
556ac_includes_default="\
557#include <stdio.h>
558#ifdef HAVE_SYS_TYPES_H
559# include <sys/types.h>
560#endif
561#ifdef HAVE_SYS_STAT_H
562# include <sys/stat.h>
563#endif
564#ifdef STDC_HEADERS
565# include <stdlib.h>
566# include <stddef.h>
567#else
568# ifdef HAVE_STDLIB_H
569# include <stdlib.h>
570# endif
571#endif
572#ifdef HAVE_STRING_H
573# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
574# include <memory.h>
575# endif
576# include <string.h>
577#endif
578#ifdef HAVE_STRINGS_H
579# include <strings.h>
580#endif
581#ifdef HAVE_INTTYPES_H
582# include <inttypes.h>
583#endif
584#ifdef HAVE_STDINT_H
585# include <stdint.h>
586#endif
587#ifdef HAVE_UNISTD_H
588# include <unistd.h>
589#endif"
590
98399780 591ac_func_list=
e26b6bb0 592ac_header_list=
8690e634 593gl_fnmatch_required=POSIX
c971b7fa
PA
594ac_subst_vars='am__EXEEXT_FALSE
595am__EXEEXT_TRUE
596gltests_LTLIBOBJS
597gltests_LIBOBJS
598gl_LTLIBOBJS
599gl_LIBOBJS
600LTLIBOBJS
601LIBOBJS
602LN_S
603am__fastdepCC_FALSE
604am__fastdepCC_TRUE
605CCDEPMODE
606AMDEPBACKSLASH
607AMDEP_FALSE
608AMDEP_TRUE
609am__quote
610am__include
611DEPDIR
612am__untar
613am__tar
614AMTAR
615am__leading_dot
616SET_MAKE
617AWK
618mkdir_p
c971b7fa
PA
619INSTALL_STRIP_PROGRAM
620STRIP
621install_sh
622MAKEINFO
623AUTOHEADER
624AUTOMAKE
625AUTOCONF
626ACLOCAL
627VERSION
628PACKAGE
629CYGPATH_W
630am__isrc
631INSTALL_DATA
632INSTALL_SCRIPT
633INSTALL_PROGRAM
634LIBGNU_LTLIBDEPS
635LIBGNU_LIBDEPS
636gltests_WITNESS
8690e634
JK
637REPLACE_TOWLOWER
638REPLACE_ISWCNTRL
639HAVE_WCTYPE_H
640NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
641NEXT_WCTYPE_H
642HAVE_ISWCNTRL
643REPLACE_ISWBLANK
644HAVE_WCTRANS_T
645HAVE_WCTYPE_T
646HAVE_ISWBLANK
647GNULIB_TOWCTRANS
648GNULIB_WCTRANS
649GNULIB_ISWCTYPE
650GNULIB_WCTYPE
651GNULIB_ISWBLANK
652HAVE_WINT_T
653HAVE_FEATURES_H
654NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
655NEXT_WCHAR_H
8839a007
PA
656HAVE_UNISTD_H
657NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
658NEXT_UNISTD_H
4a626d0a 659UNISTD_H_DEFINES_STRUCT_TIMESPEC
09607c9e
TT
660PTHREAD_H_DEFINES_STRUCT_TIMESPEC
661SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
662TIME_H_DEFINES_STRUCT_TIMESPEC
663NEXT_AS_FIRST_DIRECTIVE_TIME_H
664NEXT_TIME_H
4a626d0a
PA
665REPLACE_LOCALTIME
666REPLACE_GMTIME
09607c9e
TT
667REPLACE_TIMEGM
668REPLACE_NANOSLEEP
669REPLACE_MKTIME
670REPLACE_LOCALTIME_R
671HAVE_TIMEGM
672HAVE_STRPTIME
673HAVE_NANOSLEEP
674HAVE_DECL_LOCALTIME_R
4a626d0a 675GNULIB_TIME_RZ
09607c9e
TT
676GNULIB_TIME_R
677GNULIB_TIMEGM
678GNULIB_STRPTIME
679GNULIB_NANOSLEEP
680GNULIB_MKTIME
63ce7108
TT
681WINDOWS_64_BIT_OFF_T
682NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
683NEXT_SYS_TYPES_H
09607c9e 684MKDIR_P
2196f55f
YQ
685NEXT_AS_FIRST_DIRECTIVE_STRING_H
686NEXT_STRING_H
98399780
YQ
687NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
688NEXT_STDLIB_H
6a29c58e
YQ
689NEXT_AS_FIRST_DIRECTIVE_STDIO_H
690NEXT_STDIO_H
2196f55f
YQ
691NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
692NEXT_STDDEF_H
693GL_GENERATE_STDDEF_H_FALSE
694GL_GENERATE_STDDEF_H_TRUE
695STDDEF_H
696HAVE_WCHAR_T
4a626d0a 697HAVE_MAX_ALIGN_T
2196f55f
YQ
698REPLACE_NULL
699HAVE__BOOL
700GL_GENERATE_STDBOOL_H_FALSE
701GL_GENERATE_STDBOOL_H_TRUE
702STDBOOL_H
0750520d
PA
703NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
704NEXT_SIGNAL_H
705REPLACE_RAISE
706REPLACE_PTHREAD_SIGMASK
707HAVE_SIGHANDLER_T
708HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
709HAVE_STRUCT_SIGACTION_SA_SIGACTION
710HAVE_SIGACTION
711HAVE_SIGINFO_T
712HAVE_SIGSET_T
713HAVE_RAISE
714HAVE_PTHREAD_SIGMASK
715HAVE_POSIX_SIGNALBLOCKING
716GNULIB_SIGACTION
717GNULIB_SIGPROCMASK
718GNULIB_SIGNAL_H_SIGPIPE
719GNULIB_RAISE
720GNULIB_PTHREAD_SIGMASK
6a29c58e
YQ
721REPLACE_VSPRINTF
722REPLACE_VSNPRINTF
723REPLACE_VPRINTF
724REPLACE_VFPRINTF
725REPLACE_VDPRINTF
726REPLACE_VASPRINTF
727REPLACE_TMPFILE
728REPLACE_STDIO_WRITE_FUNCS
729REPLACE_STDIO_READ_FUNCS
730REPLACE_SPRINTF
731REPLACE_SNPRINTF
732REPLACE_RENAMEAT
733REPLACE_RENAME
734REPLACE_REMOVE
735REPLACE_PRINTF
736REPLACE_POPEN
737REPLACE_PERROR
738REPLACE_OBSTACK_PRINTF
739REPLACE_GETLINE
740REPLACE_GETDELIM
741REPLACE_FTELLO
742REPLACE_FTELL
743REPLACE_FSEEKO
744REPLACE_FSEEK
745REPLACE_FREOPEN
746REPLACE_FPURGE
747REPLACE_FPRINTF
748REPLACE_FOPEN
749REPLACE_FFLUSH
750REPLACE_FDOPEN
751REPLACE_FCLOSE
752REPLACE_DPRINTF
753HAVE_VDPRINTF
754HAVE_VASPRINTF
755HAVE_RENAMEAT
756HAVE_POPEN
757HAVE_PCLOSE
758HAVE_FTELLO
759HAVE_FSEEKO
760HAVE_DPRINTF
761HAVE_DECL_VSNPRINTF
762HAVE_DECL_SNPRINTF
763HAVE_DECL_OBSTACK_PRINTF
764HAVE_DECL_GETLINE
765HAVE_DECL_GETDELIM
766HAVE_DECL_FTELLO
767HAVE_DECL_FSEEKO
768HAVE_DECL_FPURGE
769GNULIB_VSPRINTF_POSIX
770GNULIB_VSNPRINTF
771GNULIB_VPRINTF_POSIX
772GNULIB_VPRINTF
773GNULIB_VFPRINTF_POSIX
774GNULIB_VFPRINTF
775GNULIB_VDPRINTF
776GNULIB_VSCANF
777GNULIB_VFSCANF
778GNULIB_VASPRINTF
779GNULIB_TMPFILE
780GNULIB_STDIO_H_SIGPIPE
781GNULIB_STDIO_H_NONBLOCKING
782GNULIB_SPRINTF_POSIX
783GNULIB_SNPRINTF
784GNULIB_SCANF
785GNULIB_RENAMEAT
786GNULIB_RENAME
787GNULIB_REMOVE
788GNULIB_PUTS
789GNULIB_PUTCHAR
790GNULIB_PUTC
791GNULIB_PRINTF_POSIX
792GNULIB_PRINTF
793GNULIB_POPEN
794GNULIB_PERROR
795GNULIB_PCLOSE
796GNULIB_OBSTACK_PRINTF_POSIX
797GNULIB_OBSTACK_PRINTF
798GNULIB_GETLINE
799GNULIB_GETDELIM
800GNULIB_GETCHAR
801GNULIB_GETC
802GNULIB_FWRITE
803GNULIB_FTELLO
804GNULIB_FTELL
805GNULIB_FSEEKO
806GNULIB_FSEEK
807GNULIB_FSCANF
808GNULIB_FREOPEN
809GNULIB_FREAD
810GNULIB_FPUTS
811GNULIB_FPUTC
812GNULIB_FPURGE
813GNULIB_FPRINTF_POSIX
814GNULIB_FPRINTF
815GNULIB_FOPEN
816GNULIB_FGETS
817GNULIB_FGETC
818GNULIB_FFLUSH
819GNULIB_FDOPEN
820GNULIB_FCLOSE
821GNULIB_DPRINTF
c971b7fa
PA
822UNDEFINE_STRTOK_R
823REPLACE_STRTOK_R
824REPLACE_STRSIGNAL
825REPLACE_STRNLEN
826REPLACE_STRNDUP
827REPLACE_STRNCAT
828REPLACE_STRERROR_R
829REPLACE_STRERROR
830REPLACE_STRCHRNUL
831REPLACE_STRCASESTR
832REPLACE_STRSTR
833REPLACE_STRDUP
834REPLACE_STPNCPY
835REPLACE_MEMMEM
836REPLACE_MEMCHR
837HAVE_STRVERSCMP
838HAVE_DECL_STRSIGNAL
839HAVE_DECL_STRERROR_R
840HAVE_DECL_STRTOK_R
841HAVE_STRCASESTR
842HAVE_STRSEP
843HAVE_STRPBRK
844HAVE_DECL_STRNLEN
845HAVE_DECL_STRNDUP
846HAVE_DECL_STRDUP
847HAVE_STRCHRNUL
848HAVE_STPNCPY
849HAVE_STPCPY
850HAVE_RAWMEMCHR
851HAVE_DECL_MEMRCHR
852HAVE_MEMPCPY
853HAVE_DECL_MEMMEM
854HAVE_MEMCHR
855HAVE_FFSLL
856HAVE_FFSL
857HAVE_MBSLEN
858GNULIB_STRVERSCMP
859GNULIB_STRSIGNAL
860GNULIB_STRERROR_R
861GNULIB_STRERROR
862GNULIB_MBSTOK_R
863GNULIB_MBSSEP
864GNULIB_MBSSPN
865GNULIB_MBSPBRK
866GNULIB_MBSCSPN
867GNULIB_MBSCASESTR
868GNULIB_MBSPCASECMP
869GNULIB_MBSNCASECMP
870GNULIB_MBSCASECMP
871GNULIB_MBSSTR
872GNULIB_MBSRCHR
873GNULIB_MBSCHR
874GNULIB_MBSNLEN
875GNULIB_MBSLEN
876GNULIB_STRTOK_R
877GNULIB_STRCASESTR
878GNULIB_STRSTR
879GNULIB_STRSEP
880GNULIB_STRPBRK
881GNULIB_STRNLEN
882GNULIB_STRNDUP
883GNULIB_STRNCAT
884GNULIB_STRDUP
885GNULIB_STRCHRNUL
886GNULIB_STPNCPY
887GNULIB_STPCPY
888GNULIB_RAWMEMCHR
889GNULIB_MEMRCHR
890GNULIB_MEMPCPY
891GNULIB_MEMMEM
892GNULIB_MEMCHR
893GNULIB_FFSLL
894GNULIB_FFSL
8690e634
JK
895LOCALE_FR
896LOCALE_FR_UTF8
897LOCALE_ZH_CN
898LOCALE_JA
899REPLACE_WCSWIDTH
900REPLACE_WCWIDTH
901REPLACE_WCSNRTOMBS
902REPLACE_WCSRTOMBS
903REPLACE_WCRTOMB
904REPLACE_MBSNRTOWCS
905REPLACE_MBSRTOWCS
906REPLACE_MBRLEN
907REPLACE_MBRTOWC
908REPLACE_MBSINIT
909REPLACE_WCTOB
910REPLACE_BTOWC
911REPLACE_MBSTATE_T
912HAVE_DECL_WCWIDTH
913HAVE_DECL_WCTOB
914HAVE_WCSWIDTH
915HAVE_WCSTOK
916HAVE_WCSSTR
917HAVE_WCSPBRK
918HAVE_WCSSPN
919HAVE_WCSCSPN
920HAVE_WCSRCHR
921HAVE_WCSCHR
922HAVE_WCSDUP
923HAVE_WCSXFRM
924HAVE_WCSCOLL
925HAVE_WCSNCASECMP
926HAVE_WCSCASECMP
927HAVE_WCSNCMP
928HAVE_WCSCMP
929HAVE_WCSNCAT
930HAVE_WCSCAT
931HAVE_WCPNCPY
932HAVE_WCSNCPY
933HAVE_WCPCPY
934HAVE_WCSCPY
935HAVE_WCSNLEN
936HAVE_WCSLEN
937HAVE_WMEMSET
938HAVE_WMEMMOVE
939HAVE_WMEMCPY
940HAVE_WMEMCMP
941HAVE_WMEMCHR
942HAVE_WCSNRTOMBS
943HAVE_WCSRTOMBS
944HAVE_WCRTOMB
945HAVE_MBSNRTOWCS
946HAVE_MBSRTOWCS
947HAVE_MBRLEN
948HAVE_MBRTOWC
949HAVE_MBSINIT
950HAVE_BTOWC
951GNULIB_WCSWIDTH
952GNULIB_WCSTOK
953GNULIB_WCSSTR
954GNULIB_WCSPBRK
955GNULIB_WCSSPN
956GNULIB_WCSCSPN
957GNULIB_WCSRCHR
958GNULIB_WCSCHR
959GNULIB_WCSDUP
960GNULIB_WCSXFRM
961GNULIB_WCSCOLL
962GNULIB_WCSNCASECMP
963GNULIB_WCSCASECMP
964GNULIB_WCSNCMP
965GNULIB_WCSCMP
966GNULIB_WCSNCAT
967GNULIB_WCSCAT
968GNULIB_WCPNCPY
969GNULIB_WCSNCPY
970GNULIB_WCPCPY
971GNULIB_WCSCPY
972GNULIB_WCSNLEN
973GNULIB_WCSLEN
974GNULIB_WMEMSET
975GNULIB_WMEMMOVE
976GNULIB_WMEMCPY
977GNULIB_WMEMCMP
978GNULIB_WMEMCHR
979GNULIB_WCWIDTH
980GNULIB_WCSNRTOMBS
981GNULIB_WCSRTOMBS
982GNULIB_WCRTOMB
983GNULIB_MBSNRTOWCS
984GNULIB_MBSRTOWCS
985GNULIB_MBRLEN
986GNULIB_MBRTOWC
987GNULIB_MBSINIT
988GNULIB_WCTOB
989GNULIB_BTOWC
88b48903
WN
990NEXT_AS_FIRST_DIRECTIVE_MATH_H
991NEXT_MATH_H
8690e634
JK
992LOCALCHARSET_TESTS_ENVIRONMENT
993GLIBC21
c971b7fa
PA
994NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
995NEXT_INTTYPES_H
996UINT64_MAX_EQ_ULONG_MAX
997UINT32_MAX_LT_UINTMAX_MAX
998PRIPTR_PREFIX
999PRI_MACROS_BROKEN
1000INT64_MAX_EQ_LONG_MAX
1001INT32_MAX_LT_INTMAX_MAX
4a626d0a 1002REPLACE_STRTOUMAX
c971b7fa
PA
1003REPLACE_STRTOIMAX
1004HAVE_DECL_STRTOUMAX
1005HAVE_DECL_STRTOIMAX
1006HAVE_DECL_IMAXDIV
1007HAVE_DECL_IMAXABS
1008GNULIB_STRTOUMAX
1009GNULIB_STRTOIMAX
1010GNULIB_IMAXDIV
1011GNULIB_IMAXABS
1012GL_GENERATE_STDINT_H_FALSE
1013GL_GENERATE_STDINT_H_TRUE
1014STDINT_H
49e4877c
PA
1015HAVE_SYS_INTTYPES_H
1016HAVE_SYS_BITYPES_H
1017HAVE_C99_STDINT_H
c971b7fa
PA
1018WINT_T_SUFFIX
1019WCHAR_T_SUFFIX
1020SIG_ATOMIC_T_SUFFIX
1021SIZE_T_SUFFIX
1022PTRDIFF_T_SUFFIX
1023HAVE_SIGNED_WINT_T
1024HAVE_SIGNED_WCHAR_T
1025HAVE_SIGNED_SIG_ATOMIC_T
1026BITSIZEOF_WINT_T
1027BITSIZEOF_WCHAR_T
1028BITSIZEOF_SIG_ATOMIC_T
1029BITSIZEOF_SIZE_T
1030BITSIZEOF_PTRDIFF_T
1031APPLE_UNIVERSAL_BUILD
c971b7fa
PA
1032HAVE_STDINT_H
1033NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1034NEXT_STDINT_H
c971b7fa
PA
1035HAVE_SYS_TYPES_H
1036HAVE_INTTYPES_H
1037HAVE_WCHAR_H
1038HAVE_UNSIGNED_LONG_LONG_INT
1039HAVE_LONG_LONG_INT
49e4877c
PA
1040GL_GENERATE_LIMITS_H_FALSE
1041GL_GENERATE_LIMITS_H_TRUE
1042LIMITS_H
1043NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
1044NEXT_LIMITS_H
6ec2e0f5
SDJ
1045HAVE_SYS_CDEFS_H
1046GL_GENERATE_GLOB_H_FALSE
1047GL_GENERATE_GLOB_H_TRUE
1048GLOB_H
4a626d0a
PA
1049NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1050NEXT_SYS_TIME_H
1051REPLACE_STRUCT_TIMEVAL
1052REPLACE_GETTIMEOFDAY
1053HAVE_TIMEZONE_T
1054HAVE_SYS_TIME_H
1055HAVE_STRUCT_TIMEVAL
1056HAVE_GETTIMEOFDAY
1057GNULIB_GETTIMEOFDAY
6ec2e0f5
SDJ
1058LTLIBINTL
1059LIBINTL
1060WINDOWS_64_BIT_ST_SIZE
1061NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1062NEXT_SYS_STAT_H
1063REPLACE_UTIMENSAT
1064REPLACE_STAT
1065REPLACE_MKNOD
1066REPLACE_MKFIFO
1067REPLACE_MKDIR
1068REPLACE_LSTAT
1069REPLACE_FUTIMENS
1070REPLACE_FSTATAT
1071REPLACE_FSTAT
1072HAVE_UTIMENSAT
1073HAVE_MKNODAT
1074HAVE_MKNOD
1075HAVE_MKFIFOAT
1076HAVE_MKFIFO
1077HAVE_MKDIRAT
1078HAVE_LSTAT
1079HAVE_LCHMOD
1080HAVE_FUTIMENS
1081HAVE_FSTATAT
1082HAVE_FCHMODAT
1083GNULIB_UTIMENSAT
1084GNULIB_STAT
1085GNULIB_MKNODAT
1086GNULIB_MKNOD
1087GNULIB_MKFIFOAT
1088GNULIB_MKFIFO
1089GNULIB_MKDIRAT
1090GNULIB_LSTAT
1091GNULIB_LCHMOD
1092GNULIB_FUTIMENS
1093GNULIB_FSTATAT
1094GNULIB_FSTAT
1095GNULIB_FCHMODAT
88b48903
WN
1096FREXPL_LIBM
1097HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1098FREXP_LIBM
1099REPLACE_TRUNCL
1100REPLACE_TRUNCF
1101REPLACE_TRUNC
1102REPLACE_SQRTL
1103REPLACE_SIGNBIT_USING_GCC
1104REPLACE_SIGNBIT
1105REPLACE_ROUNDL
1106REPLACE_ROUNDF
1107REPLACE_ROUND
1108REPLACE_REMAINDERL
1109REPLACE_REMAINDERF
1110REPLACE_REMAINDER
1111REPLACE_NAN
1112REPLACE_MODFL
1113REPLACE_MODFF
1114REPLACE_MODF
1115REPLACE_LOGBL
1116REPLACE_LOGBF
1117REPLACE_LOGB
1118REPLACE_LOG2L
1119REPLACE_LOG2F
1120REPLACE_LOG2
1121REPLACE_LOG1PL
1122REPLACE_LOG1PF
1123REPLACE_LOG1P
1124REPLACE_LOG10L
1125REPLACE_LOG10F
1126REPLACE_LOG10
1127REPLACE_LOGL
1128REPLACE_LOGF
1129REPLACE_LOG
1130REPLACE_LDEXPL
1131REPLACE_ISNAN
1132REPLACE_ISINF
1133REPLACE_ISFINITE
1134REPLACE_ILOGBF
1135REPLACE_ILOGB
1136REPLACE_HYPOTL
1137REPLACE_HYPOTF
1138REPLACE_HYPOT
1139REPLACE_HUGE_VAL
1140REPLACE_FREXPL
1141REPLACE_FREXP
1142REPLACE_FREXPF
1143REPLACE_FMODL
1144REPLACE_FMODF
1145REPLACE_FMOD
1146REPLACE_FMAL
1147REPLACE_FMAF
1148REPLACE_FMA
1149REPLACE_FLOORL
1150REPLACE_FLOORF
1151REPLACE_FLOOR
1152REPLACE_FABSL
1153REPLACE_EXP2L
1154REPLACE_EXP2
1155REPLACE_EXPM1F
1156REPLACE_EXPM1
1157REPLACE_CEILL
1158REPLACE_CEILF
1159REPLACE_CEIL
1160REPLACE_CBRTL
1161REPLACE_CBRTF
1162HAVE_DECL_TRUNCL
1163HAVE_DECL_TRUNCF
1164HAVE_DECL_TRUNC
1165HAVE_DECL_TANL
1166HAVE_DECL_SQRTL
1167HAVE_DECL_SINL
1168HAVE_DECL_ROUNDL
1169HAVE_DECL_ROUNDF
1170HAVE_DECL_ROUND
1171HAVE_DECL_RINTF
1172HAVE_DECL_REMAINDERL
1173HAVE_DECL_REMAINDER
1174HAVE_DECL_LOGB
1175HAVE_DECL_LOG2L
1176HAVE_DECL_LOG2F
1177HAVE_DECL_LOG2
1178HAVE_DECL_LOG10L
1179HAVE_DECL_LOGL
1180HAVE_DECL_LDEXPL
1181HAVE_DECL_FREXPL
1182HAVE_DECL_FLOORL
1183HAVE_DECL_FLOORF
1184HAVE_DECL_EXPM1L
1185HAVE_DECL_EXP2L
1186HAVE_DECL_EXP2F
1187HAVE_DECL_EXP2
1188HAVE_DECL_EXPL
1189HAVE_DECL_COSL
1190HAVE_DECL_COPYSIGNF
1191HAVE_DECL_CEILL
1192HAVE_DECL_CEILF
1193HAVE_DECL_CBRTL
1194HAVE_DECL_CBRTF
1195HAVE_DECL_ATANL
1196HAVE_DECL_ASINL
1197HAVE_DECL_ACOSL
1198HAVE_TANHF
1199HAVE_TANL
1200HAVE_TANF
1201HAVE_SQRTL
1202HAVE_SQRTF
1203HAVE_SINHF
1204HAVE_SINL
1205HAVE_SINF
1206HAVE_RINTL
1207HAVE_RINT
1208HAVE_REMAINDERF
1209HAVE_REMAINDER
1210HAVE_POWF
1211HAVE_MODFL
1212HAVE_MODFF
1213HAVE_LOGBL
1214HAVE_LOGBF
1215HAVE_LOG1PL
1216HAVE_LOG1PF
1217HAVE_LOG1P
1218HAVE_LOG10L
1219HAVE_LOG10F
1220HAVE_LOGL
1221HAVE_LOGF
1222HAVE_LDEXPF
1223HAVE_ISNANL
1224HAVE_ISNAND
1225HAVE_ISNANF
1226HAVE_ILOGBL
1227HAVE_ILOGBF
1228HAVE_ILOGB
1229HAVE_HYPOTL
1230HAVE_HYPOTF
1231HAVE_FREXPF
1232HAVE_FMODL
1233HAVE_FMODF
1234HAVE_FMAL
1235HAVE_FMAF
1236HAVE_FMA
1237HAVE_FABSL
1238HAVE_FABSF
1239HAVE_EXPM1F
1240HAVE_EXPM1
1241HAVE_EXPL
1242HAVE_EXPF
1243HAVE_COSHF
1244HAVE_COSL
1245HAVE_COSF
1246HAVE_COPYSIGNL
1247HAVE_COPYSIGN
1248HAVE_CBRTL
1249HAVE_CBRTF
1250HAVE_CBRT
1251HAVE_ATAN2F
1252HAVE_ATANL
1253HAVE_ATANF
1254HAVE_ASINL
1255HAVE_ASINF
1256HAVE_ACOSL
1257HAVE_ACOSF
1258GNULIB_TRUNCL
1259GNULIB_TRUNCF
1260GNULIB_TRUNC
1261GNULIB_TANHF
1262GNULIB_TANL
1263GNULIB_TANF
1264GNULIB_SQRTL
1265GNULIB_SQRTF
1266GNULIB_SINHF
1267GNULIB_SINL
1268GNULIB_SINF
1269GNULIB_SIGNBIT
1270GNULIB_ROUNDL
1271GNULIB_ROUNDF
1272GNULIB_ROUND
1273GNULIB_RINTL
1274GNULIB_RINTF
1275GNULIB_RINT
1276GNULIB_REMAINDERL
1277GNULIB_REMAINDERF
1278GNULIB_REMAINDER
1279GNULIB_POWF
1280GNULIB_MODFL
1281GNULIB_MODFF
1282GNULIB_MODF
1283GNULIB_LOGBL
1284GNULIB_LOGBF
1285GNULIB_LOGB
1286GNULIB_LOG2L
1287GNULIB_LOG2F
1288GNULIB_LOG2
1289GNULIB_LOG1PL
1290GNULIB_LOG1PF
1291GNULIB_LOG1P
1292GNULIB_LOG10L
1293GNULIB_LOG10F
1294GNULIB_LOG10
1295GNULIB_LOGL
1296GNULIB_LOGF
1297GNULIB_LOG
1298GNULIB_LDEXPL
1299GNULIB_LDEXPF
1300GNULIB_ISNANL
1301GNULIB_ISNAND
1302GNULIB_ISNANF
1303GNULIB_ISNAN
1304GNULIB_ISINF
1305GNULIB_ISFINITE
1306GNULIB_ILOGBL
1307GNULIB_ILOGBF
1308GNULIB_ILOGB
1309GNULIB_HYPOTL
1310GNULIB_HYPOTF
1311GNULIB_HYPOT
1312GNULIB_FREXPL
1313GNULIB_FREXP
1314GNULIB_FREXPF
1315GNULIB_FMODL
1316GNULIB_FMODF
1317GNULIB_FMOD
1318GNULIB_FMAL
1319GNULIB_FMAF
1320GNULIB_FMA
1321GNULIB_FLOORL
1322GNULIB_FLOORF
1323GNULIB_FLOOR
1324GNULIB_FABSL
1325GNULIB_FABSF
1326GNULIB_EXPM1L
1327GNULIB_EXPM1F
1328GNULIB_EXPM1
1329GNULIB_EXP2L
1330GNULIB_EXP2F
1331GNULIB_EXP2
1332GNULIB_EXPL
1333GNULIB_EXPF
1334GNULIB_COSHF
1335GNULIB_COSL
1336GNULIB_COSF
1337GNULIB_COPYSIGNL
1338GNULIB_COPYSIGNF
1339GNULIB_COPYSIGN
1340GNULIB_CEILL
1341GNULIB_CEILF
1342GNULIB_CEIL
1343GNULIB_CBRTL
1344GNULIB_CBRTF
1345GNULIB_CBRT
1346GNULIB_ATAN2F
1347GNULIB_ATANL
1348GNULIB_ATANF
1349GNULIB_ASINL
1350GNULIB_ASINF
1351GNULIB_ACOSL
1352GNULIB_ACOSF
8690e634
JK
1353GL_GENERATE_FNMATCH_H_FALSE
1354GL_GENERATE_FNMATCH_H_TRUE
1355FNMATCH_H
88b48903
WN
1356REPLACE_ITOLD
1357GL_GENERATE_FLOAT_H_FALSE
1358GL_GENERATE_FLOAT_H_TRUE
1359FLOAT_H
1360NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1361NEXT_FLOAT_H
6ec2e0f5
SDJ
1362NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1363NEXT_FCNTL_H
1364REPLACE_OPENAT
1365REPLACE_OPEN
1366REPLACE_FCNTL
1367HAVE_OPENAT
1368HAVE_FCNTL
1369GNULIB_OPENAT
1370GNULIB_OPEN
1371GNULIB_NONBLOCKING
1372GNULIB_FCNTL
18848e28
GF
1373EOVERFLOW_VALUE
1374EOVERFLOW_HIDDEN
1375ENOLINK_VALUE
1376ENOLINK_HIDDEN
1377EMULTIHOP_VALUE
1378EMULTIHOP_HIDDEN
1379GL_GENERATE_ERRNO_H_FALSE
1380GL_GENERATE_ERRNO_H_TRUE
1381ERRNO_H
1382NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1383NEXT_ERRNO_H
e26b6bb0
TT
1384HAVE_DIRENT_H
1385NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1386NEXT_DIRENT_H
88b48903
WN
1387PRAGMA_COLUMNS
1388PRAGMA_SYSTEM_HEADER
1389INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1390INCLUDE_NEXT
6ec2e0f5
SDJ
1391pkglibexecdir
1392runstatedir
1393lispdir
e26b6bb0
TT
1394REPLACE_FDOPENDIR
1395REPLACE_DIRFD
1396REPLACE_CLOSEDIR
1397REPLACE_OPENDIR
1398HAVE_ALPHASORT
1399HAVE_SCANDIR
1400HAVE_FDOPENDIR
1401HAVE_DECL_FDOPENDIR
1402HAVE_DECL_DIRFD
1403HAVE_CLOSEDIR
1404HAVE_REWINDDIR
1405HAVE_READDIR
1406HAVE_OPENDIR
1407GNULIB_ALPHASORT
1408GNULIB_SCANDIR
1409GNULIB_FDOPENDIR
1410GNULIB_DIRFD
1411GNULIB_CLOSEDIR
1412GNULIB_REWINDDIR
1413GNULIB_READDIR
1414GNULIB_OPENDIR
6ec2e0f5
SDJ
1415HAVE_WINSOCK2_H
1416HAVE_MSVC_INVALID_PARAMETER_HANDLER
e26b6bb0
TT
1417UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1418UNISTD_H_HAVE_WINSOCK2_H
1419REPLACE_WRITE
1420REPLACE_USLEEP
1421REPLACE_UNLINKAT
1422REPLACE_UNLINK
1423REPLACE_TTYNAME_R
4a626d0a 1424REPLACE_SYMLINKAT
e26b6bb0
TT
1425REPLACE_SYMLINK
1426REPLACE_SLEEP
1427REPLACE_RMDIR
4a626d0a 1428REPLACE_READLINKAT
e26b6bb0
TT
1429REPLACE_READLINK
1430REPLACE_READ
1431REPLACE_PWRITE
1432REPLACE_PREAD
1433REPLACE_LSEEK
1434REPLACE_LINKAT
1435REPLACE_LINK
1436REPLACE_LCHOWN
1437REPLACE_ISATTY
1438REPLACE_GETPAGESIZE
1439REPLACE_GETGROUPS
1440REPLACE_GETLOGIN_R
4a626d0a 1441REPLACE_GETDTABLESIZE
e26b6bb0
TT
1442REPLACE_GETDOMAINNAME
1443REPLACE_GETCWD
1444REPLACE_FTRUNCATE
1445REPLACE_FCHOWNAT
1446REPLACE_DUP2
1447REPLACE_DUP
1448REPLACE_CLOSE
1449REPLACE_CHOWN
1450HAVE_SYS_PARAM_H
1451HAVE_OS_H
1452HAVE_DECL_TTYNAME_R
1453HAVE_DECL_SETHOSTNAME
1454HAVE_DECL_GETUSERSHELL
1455HAVE_DECL_GETPAGESIZE
1456HAVE_DECL_GETLOGIN_R
1457HAVE_DECL_GETDOMAINNAME
1458HAVE_DECL_FDATASYNC
1459HAVE_DECL_FCHDIR
1460HAVE_DECL_ENVIRON
1461HAVE_USLEEP
1462HAVE_UNLINKAT
1463HAVE_SYMLINKAT
1464HAVE_SYMLINK
1465HAVE_SLEEP
1466HAVE_SETHOSTNAME
1467HAVE_READLINKAT
1468HAVE_READLINK
1469HAVE_PWRITE
1470HAVE_PREAD
1471HAVE_PIPE2
1472HAVE_PIPE
1473HAVE_LINKAT
1474HAVE_LINK
1475HAVE_LCHOWN
1476HAVE_GROUP_MEMBER
1477HAVE_GETPAGESIZE
1478HAVE_GETLOGIN
1479HAVE_GETHOSTNAME
1480HAVE_GETGROUPS
1481HAVE_GETDTABLESIZE
1482HAVE_FTRUNCATE
1483HAVE_FSYNC
1484HAVE_FDATASYNC
1485HAVE_FCHOWNAT
1486HAVE_FCHDIR
1487HAVE_FACCESSAT
1488HAVE_EUIDACCESS
1489HAVE_DUP3
1490HAVE_DUP2
1491HAVE_CHOWN
1492GNULIB_WRITE
1493GNULIB_USLEEP
1494GNULIB_UNLINKAT
1495GNULIB_UNLINK
1496GNULIB_UNISTD_H_SIGPIPE
1497GNULIB_UNISTD_H_NONBLOCKING
1498GNULIB_TTYNAME_R
1499GNULIB_SYMLINKAT
1500GNULIB_SYMLINK
1501GNULIB_SLEEP
1502GNULIB_SETHOSTNAME
1503GNULIB_RMDIR
1504GNULIB_READLINKAT
1505GNULIB_READLINK
1506GNULIB_READ
1507GNULIB_PWRITE
1508GNULIB_PREAD
1509GNULIB_PIPE2
1510GNULIB_PIPE
1511GNULIB_LSEEK
1512GNULIB_LINKAT
1513GNULIB_LINK
1514GNULIB_LCHOWN
1515GNULIB_ISATTY
1516GNULIB_GROUP_MEMBER
1517GNULIB_GETUSERSHELL
1518GNULIB_GETPAGESIZE
1519GNULIB_GETLOGIN_R
1520GNULIB_GETLOGIN
1521GNULIB_GETHOSTNAME
1522GNULIB_GETGROUPS
1523GNULIB_GETDTABLESIZE
1524GNULIB_GETDOMAINNAME
1525GNULIB_GETCWD
1526GNULIB_FTRUNCATE
1527GNULIB_FSYNC
1528GNULIB_FDATASYNC
1529GNULIB_FCHOWNAT
1530GNULIB_FCHDIR
1531GNULIB_FACCESSAT
1532GNULIB_EUIDACCESS
1533GNULIB_ENVIRON
1534GNULIB_DUP3
1535GNULIB_DUP2
1536GNULIB_DUP
1537GNULIB_CLOSE
1538GNULIB_CHOWN
1539GNULIB_CHDIR
98399780
YQ
1540REPLACE_WCTOMB
1541REPLACE_UNSETENV
1542REPLACE_STRTOD
1543REPLACE_SETENV
1544REPLACE_REALPATH
1545REPLACE_REALLOC
1546REPLACE_RANDOM_R
4a626d0a 1547REPLACE_QSORT_R
98399780
YQ
1548REPLACE_PUTENV
1549REPLACE_PTSNAME_R
1550REPLACE_PTSNAME
1551REPLACE_MKSTEMP
1552REPLACE_MBTOWC
1553REPLACE_MALLOC
1554REPLACE_CANONICALIZE_FILE_NAME
1555REPLACE_CALLOC
1556HAVE_DECL_UNSETENV
1557HAVE_UNLOCKPT
1558HAVE_SYS_LOADAVG_H
1559HAVE_STRUCT_RANDOM_DATA
1560HAVE_STRTOULL
1561HAVE_STRTOLL
1562HAVE_STRTOD
1563HAVE_DECL_SETENV
1564HAVE_SETENV
4a626d0a 1565HAVE_SECURE_GETENV
98399780
YQ
1566HAVE_RPMATCH
1567HAVE_REALPATH
1568HAVE_RANDOM_R
1569HAVE_RANDOM_H
1570HAVE_RANDOM
4c62b19f 1571HAVE_QSORT_R
98399780
YQ
1572HAVE_PTSNAME_R
1573HAVE_PTSNAME
1574HAVE_POSIX_OPENPT
1575HAVE_MKSTEMPS
1576HAVE_MKSTEMP
1577HAVE_MKOSTEMPS
1578HAVE_MKOSTEMP
1579HAVE_MKDTEMP
1580HAVE_GRANTPT
1581HAVE_GETSUBOPT
1582HAVE_DECL_GETLOADAVG
1583HAVE_CANONICALIZE_FILE_NAME
1584HAVE_ATOLL
1585HAVE__EXIT
1586GNULIB_WCTOMB
1587GNULIB_UNSETENV
1588GNULIB_UNLOCKPT
1589GNULIB_SYSTEM_POSIX
1590GNULIB_STRTOULL
1591GNULIB_STRTOLL
1592GNULIB_STRTOD
1593GNULIB_SETENV
4a626d0a 1594GNULIB_SECURE_GETENV
98399780
YQ
1595GNULIB_RPMATCH
1596GNULIB_REALPATH
1597GNULIB_REALLOC_POSIX
1598GNULIB_RANDOM_R
1599GNULIB_RANDOM
4a626d0a 1600GNULIB_QSORT_R
98399780
YQ
1601GNULIB_PUTENV
1602GNULIB_PTSNAME_R
1603GNULIB_PTSNAME
1604GNULIB_POSIX_OPENPT
1605GNULIB_MKSTEMPS
1606GNULIB_MKSTEMP
1607GNULIB_MKOSTEMPS
1608GNULIB_MKOSTEMP
1609GNULIB_MKDTEMP
1610GNULIB_MBTOWC
1611GNULIB_MALLOC_POSIX
1612GNULIB_GRANTPT
1613GNULIB_GETSUBOPT
1614GNULIB_GETLOADAVG
1615GNULIB_CANONICALIZE_FILE_NAME
1616GNULIB_CALLOC_POSIX
1617GNULIB_ATOLL
1618GNULIB__EXIT
8690e634
JK
1619GL_GENERATE_ALLOCA_H_FALSE
1620GL_GENERATE_ALLOCA_H_TRUE
1621ALLOCA_H
1622ALLOCA
c971b7fa
PA
1623GL_COND_LIBTOOL_FALSE
1624GL_COND_LIBTOOL_TRUE
1625target_os
1626target_vendor
1627target_cpu
1628target
c971b7fa
PA
1629host_os
1630host_vendor
1631host_cpu
1632host
1633build_os
1634build_vendor
1635build_cpu
1636build
4a626d0a
PA
1637RANLIB
1638ARFLAGS
1639AR
1640EGREP
1641GREP
1642CPP
c971b7fa
PA
1643OBJEXT
1644EXEEXT
1645ac_ct_CC
1646CPPFLAGS
1647LDFLAGS
1648CFLAGS
1649CC
1650MAINT
1651MAINTAINER_MODE_FALSE
1652MAINTAINER_MODE_TRUE
1653target_alias
1654host_alias
1655build_alias
1656LIBS
1657ECHO_T
1658ECHO_N
1659ECHO_C
1660DEFS
1661mandir
1662localedir
1663libdir
1664psdir
1665pdfdir
1666dvidir
1667htmldir
1668infodir
1669docdir
1670oldincludedir
1671includedir
1672localstatedir
1673sharedstatedir
1674sysconfdir
1675datadir
1676datarootdir
1677libexecdir
1678sbindir
1679bindir
1680program_transform_name
1681prefix
1682exec_prefix
1683PACKAGE_URL
1684PACKAGE_BUGREPORT
1685PACKAGE_STRING
1686PACKAGE_VERSION
1687PACKAGE_TARNAME
1688PACKAGE_NAME
1689PATH_SEPARATOR
1690SHELL'
1691ac_subst_files=''
1692ac_user_opts='
1693enable_option_checking
1694enable_maintainer_mode
2196f55f 1695enable_largefile
c971b7fa
PA
1696enable_dependency_tracking
1697'
1698 ac_precious_vars='build_alias
1699host_alias
1700target_alias
1701CC
1702CFLAGS
1703LDFLAGS
1704LIBS
1705CPPFLAGS
1706CPP'
1707
1708
1709# Initialize some variables set by options.
1710ac_init_help=
1711ac_init_version=false
1712ac_unrecognized_opts=
1713ac_unrecognized_sep=
1714# The variables have the same names as the options, with
1715# dashes changed to underlines.
1716cache_file=/dev/null
1717exec_prefix=NONE
1718no_create=
1719no_recursion=
1720prefix=NONE
1721program_prefix=NONE
1722program_suffix=NONE
1723program_transform_name=s,x,x,
1724silent=
1725site=
1726srcdir=
1727verbose=
1728x_includes=NONE
1729x_libraries=NONE
1730
1731# Installation directory options.
1732# These are left unexpanded so users can "make install exec_prefix=/foo"
1733# and all the variables that are supposed to be based on exec_prefix
1734# by default will actually change.
1735# Use braces instead of parens because sh, perl, etc. also accept them.
1736# (The list follows the same order as the GNU Coding Standards.)
1737bindir='${exec_prefix}/bin'
1738sbindir='${exec_prefix}/sbin'
1739libexecdir='${exec_prefix}/libexec'
1740datarootdir='${prefix}/share'
1741datadir='${datarootdir}'
1742sysconfdir='${prefix}/etc'
1743sharedstatedir='${prefix}/com'
1744localstatedir='${prefix}/var'
1745includedir='${prefix}/include'
1746oldincludedir='/usr/include'
1747docdir='${datarootdir}/doc/${PACKAGE}'
1748infodir='${datarootdir}/info'
1749htmldir='${docdir}'
1750dvidir='${docdir}'
1751pdfdir='${docdir}'
1752psdir='${docdir}'
1753libdir='${exec_prefix}/lib'
1754localedir='${datarootdir}/locale'
1755mandir='${datarootdir}/man'
1756
1757ac_prev=
1758ac_dashdash=
1759for ac_option
1760do
1761 # If the previous option needs an argument, assign it.
1762 if test -n "$ac_prev"; then
1763 eval $ac_prev=\$ac_option
1764 ac_prev=
1765 continue
1766 fi
1767
1768 case $ac_option in
1769 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1770 *) ac_optarg=yes ;;
1771 esac
1772
1773 # Accept the important Cygnus configure options, so we can diagnose typos.
1774
1775 case $ac_dashdash$ac_option in
1776 --)
1777 ac_dashdash=yes ;;
1778
1779 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1780 ac_prev=bindir ;;
1781 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1782 bindir=$ac_optarg ;;
1783
1784 -build | --build | --buil | --bui | --bu)
1785 ac_prev=build_alias ;;
1786 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1787 build_alias=$ac_optarg ;;
1788
1789 -cache-file | --cache-file | --cache-fil | --cache-fi \
1790 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1791 ac_prev=cache_file ;;
1792 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1793 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1794 cache_file=$ac_optarg ;;
1795
1796 --config-cache | -C)
1797 cache_file=config.cache ;;
1798
1799 -datadir | --datadir | --datadi | --datad)
1800 ac_prev=datadir ;;
1801 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1802 datadir=$ac_optarg ;;
1803
1804 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1805 | --dataroo | --dataro | --datar)
1806 ac_prev=datarootdir ;;
1807 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1808 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1809 datarootdir=$ac_optarg ;;
1810
1811 -disable-* | --disable-*)
1812 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1813 # Reject names that are not valid shell variable names.
1814 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1815 as_fn_error "invalid feature name: $ac_useropt"
1816 ac_useropt_orig=$ac_useropt
1817 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1818 case $ac_user_opts in
1819 *"
1820"enable_$ac_useropt"
1821"*) ;;
1822 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1823 ac_unrecognized_sep=', ';;
1824 esac
1825 eval enable_$ac_useropt=no ;;
1826
1827 -docdir | --docdir | --docdi | --doc | --do)
1828 ac_prev=docdir ;;
1829 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1830 docdir=$ac_optarg ;;
1831
1832 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1833 ac_prev=dvidir ;;
1834 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1835 dvidir=$ac_optarg ;;
1836
1837 -enable-* | --enable-*)
1838 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1839 # Reject names that are not valid shell variable names.
1840 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1841 as_fn_error "invalid feature name: $ac_useropt"
1842 ac_useropt_orig=$ac_useropt
1843 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1844 case $ac_user_opts in
1845 *"
1846"enable_$ac_useropt"
1847"*) ;;
1848 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1849 ac_unrecognized_sep=', ';;
1850 esac
1851 eval enable_$ac_useropt=\$ac_optarg ;;
1852
1853 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1854 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1855 | --exec | --exe | --ex)
1856 ac_prev=exec_prefix ;;
1857 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1858 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1859 | --exec=* | --exe=* | --ex=*)
1860 exec_prefix=$ac_optarg ;;
1861
1862 -gas | --gas | --ga | --g)
1863 # Obsolete; use --with-gas.
1864 with_gas=yes ;;
1865
1866 -help | --help | --hel | --he | -h)
1867 ac_init_help=long ;;
1868 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1869 ac_init_help=recursive ;;
1870 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1871 ac_init_help=short ;;
1872
1873 -host | --host | --hos | --ho)
1874 ac_prev=host_alias ;;
1875 -host=* | --host=* | --hos=* | --ho=*)
1876 host_alias=$ac_optarg ;;
1877
1878 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1879 ac_prev=htmldir ;;
1880 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1881 | --ht=*)
1882 htmldir=$ac_optarg ;;
1883
1884 -includedir | --includedir | --includedi | --included | --include \
1885 | --includ | --inclu | --incl | --inc)
1886 ac_prev=includedir ;;
1887 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1888 | --includ=* | --inclu=* | --incl=* | --inc=*)
1889 includedir=$ac_optarg ;;
1890
1891 -infodir | --infodir | --infodi | --infod | --info | --inf)
1892 ac_prev=infodir ;;
1893 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1894 infodir=$ac_optarg ;;
1895
1896 -libdir | --libdir | --libdi | --libd)
1897 ac_prev=libdir ;;
1898 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1899 libdir=$ac_optarg ;;
1900
1901 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1902 | --libexe | --libex | --libe)
1903 ac_prev=libexecdir ;;
1904 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1905 | --libexe=* | --libex=* | --libe=*)
1906 libexecdir=$ac_optarg ;;
1907
1908 -localedir | --localedir | --localedi | --localed | --locale)
1909 ac_prev=localedir ;;
1910 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1911 localedir=$ac_optarg ;;
1912
1913 -localstatedir | --localstatedir | --localstatedi | --localstated \
1914 | --localstate | --localstat | --localsta | --localst | --locals)
1915 ac_prev=localstatedir ;;
1916 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1917 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1918 localstatedir=$ac_optarg ;;
1919
1920 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1921 ac_prev=mandir ;;
1922 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1923 mandir=$ac_optarg ;;
1924
1925 -nfp | --nfp | --nf)
1926 # Obsolete; use --without-fp.
1927 with_fp=no ;;
1928
1929 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1930 | --no-cr | --no-c | -n)
1931 no_create=yes ;;
1932
1933 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1934 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1935 no_recursion=yes ;;
1936
1937 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1938 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1939 | --oldin | --oldi | --old | --ol | --o)
1940 ac_prev=oldincludedir ;;
1941 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1942 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1943 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1944 oldincludedir=$ac_optarg ;;
1945
1946 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1947 ac_prev=prefix ;;
1948 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1949 prefix=$ac_optarg ;;
1950
1951 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1952 | --program-pre | --program-pr | --program-p)
1953 ac_prev=program_prefix ;;
1954 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1955 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1956 program_prefix=$ac_optarg ;;
1957
1958 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1959 | --program-suf | --program-su | --program-s)
1960 ac_prev=program_suffix ;;
1961 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1962 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1963 program_suffix=$ac_optarg ;;
1964
1965 -program-transform-name | --program-transform-name \
1966 | --program-transform-nam | --program-transform-na \
1967 | --program-transform-n | --program-transform- \
1968 | --program-transform | --program-transfor \
1969 | --program-transfo | --program-transf \
1970 | --program-trans | --program-tran \
1971 | --progr-tra | --program-tr | --program-t)
1972 ac_prev=program_transform_name ;;
1973 -program-transform-name=* | --program-transform-name=* \
1974 | --program-transform-nam=* | --program-transform-na=* \
1975 | --program-transform-n=* | --program-transform-=* \
1976 | --program-transform=* | --program-transfor=* \
1977 | --program-transfo=* | --program-transf=* \
1978 | --program-trans=* | --program-tran=* \
1979 | --progr-tra=* | --program-tr=* | --program-t=*)
1980 program_transform_name=$ac_optarg ;;
1981
1982 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1983 ac_prev=pdfdir ;;
1984 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1985 pdfdir=$ac_optarg ;;
1986
1987 -psdir | --psdir | --psdi | --psd | --ps)
1988 ac_prev=psdir ;;
1989 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1990 psdir=$ac_optarg ;;
1991
1992 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1993 | -silent | --silent | --silen | --sile | --sil)
1994 silent=yes ;;
1995
1996 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1997 ac_prev=sbindir ;;
1998 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1999 | --sbi=* | --sb=*)
2000 sbindir=$ac_optarg ;;
2001
2002 -sharedstatedir | --sharedstatedir | --sharedstatedi \
2003 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2004 | --sharedst | --shareds | --shared | --share | --shar \
2005 | --sha | --sh)
2006 ac_prev=sharedstatedir ;;
2007 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2008 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2009 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2010 | --sha=* | --sh=*)
2011 sharedstatedir=$ac_optarg ;;
2012
2013 -site | --site | --sit)
2014 ac_prev=site ;;
2015 -site=* | --site=* | --sit=*)
2016 site=$ac_optarg ;;
2017
2018 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2019 ac_prev=srcdir ;;
2020 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2021 srcdir=$ac_optarg ;;
2022
2023 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2024 | --syscon | --sysco | --sysc | --sys | --sy)
2025 ac_prev=sysconfdir ;;
2026 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2027 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2028 sysconfdir=$ac_optarg ;;
2029
2030 -target | --target | --targe | --targ | --tar | --ta | --t)
2031 ac_prev=target_alias ;;
2032 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2033 target_alias=$ac_optarg ;;
2034
2035 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2036 verbose=yes ;;
2037
2038 -version | --version | --versio | --versi | --vers | -V)
2039 ac_init_version=: ;;
2040
2041 -with-* | --with-*)
2042 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2043 # Reject names that are not valid shell variable names.
2044 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2045 as_fn_error "invalid package name: $ac_useropt"
2046 ac_useropt_orig=$ac_useropt
2047 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2048 case $ac_user_opts in
2049 *"
2050"with_$ac_useropt"
2051"*) ;;
2052 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2053 ac_unrecognized_sep=', ';;
2054 esac
2055 eval with_$ac_useropt=\$ac_optarg ;;
2056
2057 -without-* | --without-*)
2058 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2059 # Reject names that are not valid shell variable names.
2060 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2061 as_fn_error "invalid package name: $ac_useropt"
2062 ac_useropt_orig=$ac_useropt
2063 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2064 case $ac_user_opts in
2065 *"
2066"with_$ac_useropt"
2067"*) ;;
2068 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2069 ac_unrecognized_sep=', ';;
2070 esac
2071 eval with_$ac_useropt=no ;;
2072
2073 --x)
2074 # Obsolete; use --with-x.
2075 with_x=yes ;;
2076
2077 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2078 | --x-incl | --x-inc | --x-in | --x-i)
2079 ac_prev=x_includes ;;
2080 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2081 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2082 x_includes=$ac_optarg ;;
2083
2084 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2085 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2086 ac_prev=x_libraries ;;
2087 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2088 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2089 x_libraries=$ac_optarg ;;
2090
2091 -*) as_fn_error "unrecognized option: \`$ac_option'
2092Try \`$0 --help' for more information."
2093 ;;
2094
2095 *=*)
2096 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2097 # Reject names that are not valid shell variable names.
2098 case $ac_envvar in #(
2099 '' | [0-9]* | *[!_$as_cr_alnum]* )
2100 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
2101 esac
2102 eval $ac_envvar=\$ac_optarg
2103 export $ac_envvar ;;
2104
2105 *)
2106 # FIXME: should be removed in autoconf 3.0.
2107 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2108 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2109 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
2110 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
2111 ;;
2112
2113 esac
2114done
2115
2116if test -n "$ac_prev"; then
2117 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2118 as_fn_error "missing argument to $ac_option"
2119fi
2120
2121if test -n "$ac_unrecognized_opts"; then
2122 case $enable_option_checking in
2123 no) ;;
2124 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
2125 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2126 esac
2127fi
2128
2129# Check all directory arguments for consistency.
2130for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2131 datadir sysconfdir sharedstatedir localstatedir includedir \
2132 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2133 libdir localedir mandir
2134do
2135 eval ac_val=\$$ac_var
2136 # Remove trailing slashes.
2137 case $ac_val in
2138 */ )
2139 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2140 eval $ac_var=\$ac_val;;
2141 esac
2142 # Be sure to have absolute directory names.
2143 case $ac_val in
2144 [\\/$]* | ?:[\\/]* ) continue;;
2145 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2146 esac
2147 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
2148done
2149
2150# There might be people who depend on the old broken behavior: `$host'
2151# used to hold the argument of --host etc.
2152# FIXME: To remove some day.
2153build=$build_alias
2154host=$host_alias
2155target=$target_alias
2156
2157# FIXME: To remove some day.
2158if test "x$host_alias" != x; then
2159 if test "x$build_alias" = x; then
2160 cross_compiling=maybe
2161 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
2162 If a cross compiler is detected then cross compile mode will be used." >&2
2163 elif test "x$build_alias" != "x$host_alias"; then
2164 cross_compiling=yes
2165 fi
2166fi
2167
2168ac_tool_prefix=
2169test -n "$host_alias" && ac_tool_prefix=$host_alias-
2170
2171test "$silent" = yes && exec 6>/dev/null
2172
2173
2174ac_pwd=`pwd` && test -n "$ac_pwd" &&
2175ac_ls_di=`ls -di .` &&
2176ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2177 as_fn_error "working directory cannot be determined"
2178test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2179 as_fn_error "pwd does not report name of working directory"
2180
2181
2182# Find the source files, if location was not specified.
2183if test -z "$srcdir"; then
2184 ac_srcdir_defaulted=yes
2185 # Try the directory containing this script, then the parent directory.
2186 ac_confdir=`$as_dirname -- "$as_myself" ||
2187$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2188 X"$as_myself" : 'X\(//\)[^/]' \| \
2189 X"$as_myself" : 'X\(//\)$' \| \
2190 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2191$as_echo X"$as_myself" |
2192 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2193 s//\1/
2194 q
2195 }
2196 /^X\(\/\/\)[^/].*/{
2197 s//\1/
2198 q
2199 }
2200 /^X\(\/\/\)$/{
2201 s//\1/
2202 q
2203 }
2204 /^X\(\/\).*/{
2205 s//\1/
2206 q
2207 }
2208 s/.*/./; q'`
2209 srcdir=$ac_confdir
2210 if test ! -r "$srcdir/$ac_unique_file"; then
2211 srcdir=..
2212 fi
2213else
2214 ac_srcdir_defaulted=no
2215fi
2216if test ! -r "$srcdir/$ac_unique_file"; then
2217 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2218 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
2219fi
2220ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2221ac_abs_confdir=`(
2222 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
2223 pwd)`
2224# When building in place, set srcdir=.
2225if test "$ac_abs_confdir" = "$ac_pwd"; then
2226 srcdir=.
2227fi
2228# Remove unnecessary trailing slashes from srcdir.
2229# Double slashes in file names in object file debugging info
2230# mess up M-x gdb in Emacs.
2231case $srcdir in
2232*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2233esac
2234for ac_var in $ac_precious_vars; do
2235 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2236 eval ac_env_${ac_var}_value=\$${ac_var}
2237 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2238 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2239done
2240
2241#
2242# Report the --help message.
2243#
2244if test "$ac_init_help" = "long"; then
2245 # Omit some internal or obsolete options to make the list less imposing.
2246 # This message is too long to be a string in the A/UX 3.1 sh.
2247 cat <<_ACEOF
2248\`configure' configures this package to adapt to many kinds of systems.
2249
2250Usage: $0 [OPTION]... [VAR=VALUE]...
2251
2252To assign environment variables (e.g., CC, CFLAGS...), specify them as
2253VAR=VALUE. See below for descriptions of some of the useful variables.
2254
2255Defaults for the options are specified in brackets.
2256
2257Configuration:
2258 -h, --help display this help and exit
2259 --help=short display options specific to this package
2260 --help=recursive display the short help of all the included packages
2261 -V, --version display version information and exit
2262 -q, --quiet, --silent do not print \`checking...' messages
2263 --cache-file=FILE cache test results in FILE [disabled]
2264 -C, --config-cache alias for \`--cache-file=config.cache'
2265 -n, --no-create do not create output files
2266 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2267
2268Installation directories:
2269 --prefix=PREFIX install architecture-independent files in PREFIX
2270 [$ac_default_prefix]
2271 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2272 [PREFIX]
2273
2274By default, \`make install' will install all the files in
2275\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2276an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2277for instance \`--prefix=\$HOME'.
2278
2279For better control, use the options below.
2280
2281Fine tuning of the installation directories:
2282 --bindir=DIR user executables [EPREFIX/bin]
2283 --sbindir=DIR system admin executables [EPREFIX/sbin]
2284 --libexecdir=DIR program executables [EPREFIX/libexec]
2285 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2286 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2287 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2288 --libdir=DIR object code libraries [EPREFIX/lib]
2289 --includedir=DIR C header files [PREFIX/include]
2290 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2291 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2292 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2293 --infodir=DIR info documentation [DATAROOTDIR/info]
2294 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2295 --mandir=DIR man documentation [DATAROOTDIR/man]
2296 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
2297 --htmldir=DIR html documentation [DOCDIR]
2298 --dvidir=DIR dvi documentation [DOCDIR]
2299 --pdfdir=DIR pdf documentation [DOCDIR]
2300 --psdir=DIR ps documentation [DOCDIR]
2301_ACEOF
2302
2303 cat <<\_ACEOF
2304
2305Program names:
2306 --program-prefix=PREFIX prepend PREFIX to installed program names
2307 --program-suffix=SUFFIX append SUFFIX to installed program names
2308 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2309
2310System types:
2311 --build=BUILD configure for building on BUILD [guessed]
2312 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2313 --target=TARGET configure for building compilers for TARGET [HOST]
2314_ACEOF
2315fi
2316
2317if test -n "$ac_init_help"; then
2318
2319 cat <<\_ACEOF
2320
2321Optional Features:
2322 --disable-option-checking ignore unrecognized --enable/--with options
2323 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2324 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2325 --enable-maintainer-mode enable make rules and dependencies not useful
2326 (and sometimes confusing) to the casual installer
2196f55f 2327 --disable-largefile omit support for large files
c971b7fa
PA
2328 --disable-dependency-tracking speeds up one-time build
2329 --enable-dependency-tracking do not reject slow dependency extractors
2330
2331Some influential environment variables:
2332 CC C compiler command
2333 CFLAGS C compiler flags
2334 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2335 nonstandard directory <lib dir>
2336 LIBS libraries to pass to the linker, e.g. -l<library>
2337 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
2338 you have headers in a nonstandard directory <include dir>
2339 CPP C preprocessor
2340
2341Use these variables to override the choices made by `configure' or to help
2342it to find libraries and programs with nonstandard names/locations.
2343
2344Report bugs to the package provider.
2345_ACEOF
2346ac_status=$?
2347fi
2348
2349if test "$ac_init_help" = "recursive"; then
2350 # If there are subdirs, report their specific --help.
2351 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2352 test -d "$ac_dir" ||
2353 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2354 continue
2355 ac_builddir=.
2356
2357case "$ac_dir" in
2358.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2359*)
2360 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2361 # A ".." for each directory in $ac_dir_suffix.
2362 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2363 case $ac_top_builddir_sub in
2364 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2365 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2366 esac ;;
2367esac
2368ac_abs_top_builddir=$ac_pwd
2369ac_abs_builddir=$ac_pwd$ac_dir_suffix
2370# for backward compatibility:
2371ac_top_builddir=$ac_top_build_prefix
2372
2373case $srcdir in
2374 .) # We are building in place.
2375 ac_srcdir=.
2376 ac_top_srcdir=$ac_top_builddir_sub
2377 ac_abs_top_srcdir=$ac_pwd ;;
2378 [\\/]* | ?:[\\/]* ) # Absolute name.
2379 ac_srcdir=$srcdir$ac_dir_suffix;
2380 ac_top_srcdir=$srcdir
2381 ac_abs_top_srcdir=$srcdir ;;
2382 *) # Relative name.
2383 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2384 ac_top_srcdir=$ac_top_build_prefix$srcdir
2385 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2386esac
2387ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2388
2389 cd "$ac_dir" || { ac_status=$?; continue; }
2390 # Check for guested configure.
2391 if test -f "$ac_srcdir/configure.gnu"; then
2392 echo &&
2393 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2394 elif test -f "$ac_srcdir/configure"; then
2395 echo &&
2396 $SHELL "$ac_srcdir/configure" --help=recursive
2397 else
2398 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2399 fi || ac_status=$?
2400 cd "$ac_pwd" || { ac_status=$?; break; }
2401 done
2402fi
2403
2404test -n "$ac_init_help" && exit $ac_status
2405if $ac_init_version; then
2406 cat <<\_ACEOF
2407configure
2408generated by GNU Autoconf 2.64
2409
2410Copyright (C) 2009 Free Software Foundation, Inc.
2411This configure script is free software; the Free Software Foundation
2412gives unlimited permission to copy, distribute and modify it.
2413_ACEOF
2414 exit
2415fi
2416
2417## ------------------------ ##
2418## Autoconf initialization. ##
2419## ------------------------ ##
2420
2421# ac_fn_c_try_compile LINENO
2422# --------------------------
2423# Try to compile conftest.$ac_ext, and return whether this succeeded.
2424ac_fn_c_try_compile ()
2425{
2426 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2427 rm -f conftest.$ac_objext
2428 if { { ac_try="$ac_compile"
2429case "(($ac_try" in
2430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2431 *) ac_try_echo=$ac_try;;
2432esac
2433eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2434$as_echo "$ac_try_echo"; } >&5
2435 (eval "$ac_compile") 2>conftest.err
2436 ac_status=$?
2437 if test -s conftest.err; then
2438 grep -v '^ *+' conftest.err >conftest.er1
2439 cat conftest.er1 >&5
2440 mv -f conftest.er1 conftest.err
2441 fi
2442 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2443 test $ac_status = 0; } && {
2444 test -z "$ac_c_werror_flag" ||
2445 test ! -s conftest.err
2446 } && test -s conftest.$ac_objext; then :
2447 ac_retval=0
2448else
2449 $as_echo "$as_me: failed program was:" >&5
2450sed 's/^/| /' conftest.$ac_ext >&5
2451
2452 ac_retval=1
2453fi
2454 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2455 return $ac_retval
2456
2457} # ac_fn_c_try_compile
2458
2459# ac_fn_c_try_cpp LINENO
2460# ----------------------
2461# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2462ac_fn_c_try_cpp ()
2463{
2464 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2465 if { { ac_try="$ac_cpp conftest.$ac_ext"
2466case "(($ac_try" in
2467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2468 *) ac_try_echo=$ac_try;;
2469esac
2470eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2471$as_echo "$ac_try_echo"; } >&5
2472 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2473 ac_status=$?
2474 if test -s conftest.err; then
2475 grep -v '^ *+' conftest.err >conftest.er1
2476 cat conftest.er1 >&5
2477 mv -f conftest.er1 conftest.err
2478 fi
2479 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2480 test $ac_status = 0; } >/dev/null && {
2481 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2482 test ! -s conftest.err
2483 }; then :
2484 ac_retval=0
2485else
2486 $as_echo "$as_me: failed program was:" >&5
2487sed 's/^/| /' conftest.$ac_ext >&5
2488
2489 ac_retval=1
2490fi
2491 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2492 return $ac_retval
2493
2494} # ac_fn_c_try_cpp
2495
2496# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2497# -------------------------------------------------------
2498# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2499# the include files in INCLUDES and setting the cache variable VAR
2500# accordingly.
2501ac_fn_c_check_header_mongrel ()
2502{
2503 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2504 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2506$as_echo_n "checking for $2... " >&6; }
2507if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2508 $as_echo_n "(cached) " >&6
2509fi
2510eval ac_res=\$$3
2511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2512$as_echo "$ac_res" >&6; }
2513else
2514 # Is the header compilable?
2515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2516$as_echo_n "checking $2 usability... " >&6; }
2517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2518/* end confdefs.h. */
2519$4
2520#include <$2>
2521_ACEOF
2522if ac_fn_c_try_compile "$LINENO"; then :
2523 ac_header_compiler=yes
2524else
2525 ac_header_compiler=no
2526fi
2527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2529$as_echo "$ac_header_compiler" >&6; }
2530
2531# Is the header present?
2532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2533$as_echo_n "checking $2 presence... " >&6; }
2534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2535/* end confdefs.h. */
2536#include <$2>
2537_ACEOF
2538if ac_fn_c_try_cpp "$LINENO"; then :
2539 ac_header_preproc=yes
2540else
2541 ac_header_preproc=no
2542fi
2543rm -f conftest.err conftest.$ac_ext
2544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2545$as_echo "$ac_header_preproc" >&6; }
2546
2547# So? What about this header?
2548case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2549 yes:no: )
2550 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2551$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2552 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2553$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2554 ;;
2555 no:yes:* )
2556 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2557$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2558 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2559$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2560 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2561$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2562 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2563$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2564 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2565$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2566 ;;
2567esac
2568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2569$as_echo_n "checking for $2... " >&6; }
2570if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2571 $as_echo_n "(cached) " >&6
2572else
2573 eval "$3=\$ac_header_compiler"
2574fi
2575eval ac_res=\$$3
2576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2577$as_echo "$ac_res" >&6; }
2578fi
2579 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2580
2581} # ac_fn_c_check_header_mongrel
2582
2583# ac_fn_c_try_run LINENO
2584# ----------------------
2585# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2586# that executables *can* be run.
2587ac_fn_c_try_run ()
2588{
2589 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2590 if { { ac_try="$ac_link"
2591case "(($ac_try" in
2592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2593 *) ac_try_echo=$ac_try;;
2594esac
2595eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2596$as_echo "$ac_try_echo"; } >&5
2597 (eval "$ac_link") 2>&5
2598 ac_status=$?
2599 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2600 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2601 { { case "(($ac_try" in
2602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2603 *) ac_try_echo=$ac_try;;
2604esac
2605eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2606$as_echo "$ac_try_echo"; } >&5
2607 (eval "$ac_try") 2>&5
2608 ac_status=$?
2609 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2610 test $ac_status = 0; }; }; then :
2611 ac_retval=0
2612else
2613 $as_echo "$as_me: program exited with status $ac_status" >&5
2614 $as_echo "$as_me: failed program was:" >&5
2615sed 's/^/| /' conftest.$ac_ext >&5
2616
2617 ac_retval=$ac_status
2618fi
2619 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2620 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2621 return $ac_retval
2622
2623} # ac_fn_c_try_run
2624
2625# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2626# -------------------------------------------------------
2627# Tests whether HEADER exists and can be compiled using the include files in
2628# INCLUDES, setting the cache variable VAR accordingly.
2629ac_fn_c_check_header_compile ()
2630{
2631 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2633$as_echo_n "checking for $2... " >&6; }
2634if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2635 $as_echo_n "(cached) " >&6
2636else
2637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2638/* end confdefs.h. */
2639$4
2640#include <$2>
2641_ACEOF
2642if ac_fn_c_try_compile "$LINENO"; then :
2643 eval "$3=yes"
2644else
2645 eval "$3=no"
2646fi
2647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2648fi
2649eval ac_res=\$$3
2650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2651$as_echo "$ac_res" >&6; }
2652 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2653
2654} # ac_fn_c_check_header_compile
2655
2656# ac_fn_c_try_link LINENO
2657# -----------------------
2658# Try to link conftest.$ac_ext, and return whether this succeeded.
2659ac_fn_c_try_link ()
2660{
2661 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2662 rm -f conftest.$ac_objext conftest$ac_exeext
2663 if { { ac_try="$ac_link"
2664case "(($ac_try" in
2665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2666 *) ac_try_echo=$ac_try;;
2667esac
2668eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2669$as_echo "$ac_try_echo"; } >&5
2670 (eval "$ac_link") 2>conftest.err
2671 ac_status=$?
2672 if test -s conftest.err; then
2673 grep -v '^ *+' conftest.err >conftest.er1
2674 cat conftest.er1 >&5
2675 mv -f conftest.er1 conftest.err
2676 fi
2677 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2678 test $ac_status = 0; } && {
2679 test -z "$ac_c_werror_flag" ||
2680 test ! -s conftest.err
2681 } && test -s conftest$ac_exeext && {
2682 test "$cross_compiling" = yes ||
2683 $as_test_x conftest$ac_exeext
2684 }; then :
2685 ac_retval=0
2686else
2687 $as_echo "$as_me: failed program was:" >&5
2688sed 's/^/| /' conftest.$ac_ext >&5
2689
2690 ac_retval=1
2691fi
2692 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2693 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2694 # interfere with the next link command; also delete a directory that is
2695 # left behind by Apple's compiler. We do this before executing the actions.
2696 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2697 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2698 return $ac_retval
2699
2700} # ac_fn_c_try_link
2701
8690e634
JK
2702# ac_fn_c_check_func LINENO FUNC VAR
2703# ----------------------------------
2704# Tests whether FUNC exists, setting the cache variable VAR accordingly
2705ac_fn_c_check_func ()
2706{
2707 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2709$as_echo_n "checking for $2... " >&6; }
2710if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2711 $as_echo_n "(cached) " >&6
2712else
2713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2714/* end confdefs.h. */
2715/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2716 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2717#define $2 innocuous_$2
2718
2719/* System header to define __stub macros and hopefully few prototypes,
2720 which can conflict with char $2 (); below.
2721 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2722 <limits.h> exists even on freestanding compilers. */
2723
2724#ifdef __STDC__
2725# include <limits.h>
2726#else
2727# include <assert.h>
2728#endif
2729
2730#undef $2
2731
2732/* Override any GCC internal prototype to avoid an error.
2733 Use char because int might match the return type of a GCC
2734 builtin and then its argument prototype would still apply. */
2735#ifdef __cplusplus
2736extern "C"
2737#endif
2738char $2 ();
2739/* The GNU C library defines this for functions which it implements
2740 to always fail with ENOSYS. Some functions are actually named
2741 something starting with __ and the normal name is an alias. */
2742#if defined __stub_$2 || defined __stub___$2
2743choke me
2744#endif
2745
2746int
2747main ()
2748{
2749return $2 ();
2750 ;
2751 return 0;
2752}
2753_ACEOF
2754if ac_fn_c_try_link "$LINENO"; then :
2755 eval "$3=yes"
2756else
2757 eval "$3=no"
2758fi
2759rm -f core conftest.err conftest.$ac_objext \
2760 conftest$ac_exeext conftest.$ac_ext
2761fi
2762eval ac_res=\$$3
2763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2764$as_echo "$ac_res" >&6; }
2765 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2766
2767} # ac_fn_c_check_func
2768
8986e351
TT
2769# ac_fn_c_check_decl LINENO SYMBOL VAR
2770# ------------------------------------
2771# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2772ac_fn_c_check_decl ()
2773{
2774 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2776$as_echo_n "checking whether $2 is declared... " >&6; }
2777if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2778 $as_echo_n "(cached) " >&6
2779else
2780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2781/* end confdefs.h. */
2782$4
2783int
2784main ()
2785{
2786#ifndef $2
2787 (void) $2;
2788#endif
2789
2790 ;
2791 return 0;
2792}
2793_ACEOF
2794if ac_fn_c_try_compile "$LINENO"; then :
2795 eval "$3=yes"
2796else
2797 eval "$3=no"
2798fi
2799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2800fi
2801eval ac_res=\$$3
2802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2803$as_echo "$ac_res" >&6; }
2804 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2805
2806} # ac_fn_c_check_decl
2807
c971b7fa
PA
2808# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2809# --------------------------------------------
2810# Tries to find the compile-time value of EXPR in a program that includes
2811# INCLUDES, setting VAR accordingly. Returns whether the value could be
2812# computed
2813ac_fn_c_compute_int ()
2814{
2815 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2816 if test "$cross_compiling" = yes; then
2817 # Depending upon the size, compute the lo and hi bounds.
2818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2819/* end confdefs.h. */
2820$4
2821int
2822main ()
2823{
2824static int test_array [1 - 2 * !(($2) >= 0)];
2825test_array [0] = 0
2826
2827 ;
2828 return 0;
2829}
2830_ACEOF
2831if ac_fn_c_try_compile "$LINENO"; then :
2832 ac_lo=0 ac_mid=0
2833 while :; do
2834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2835/* end confdefs.h. */
2836$4
2837int
2838main ()
2839{
2840static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2841test_array [0] = 0
2842
2843 ;
2844 return 0;
2845}
2846_ACEOF
2847if ac_fn_c_try_compile "$LINENO"; then :
2848 ac_hi=$ac_mid; break
2849else
2850 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2851 if test $ac_lo -le $ac_mid; then
2852 ac_lo= ac_hi=
2853 break
2854 fi
2855 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2856fi
2857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2858 done
2859else
2860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2861/* end confdefs.h. */
2862$4
2863int
2864main ()
2865{
2866static int test_array [1 - 2 * !(($2) < 0)];
2867test_array [0] = 0
2868
2869 ;
2870 return 0;
2871}
2872_ACEOF
2873if ac_fn_c_try_compile "$LINENO"; then :
2874 ac_hi=-1 ac_mid=-1
2875 while :; do
2876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2877/* end confdefs.h. */
2878$4
2879int
2880main ()
2881{
2882static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2883test_array [0] = 0
2884
2885 ;
2886 return 0;
2887}
2888_ACEOF
2889if ac_fn_c_try_compile "$LINENO"; then :
2890 ac_lo=$ac_mid; break
2891else
2892 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2893 if test $ac_mid -le $ac_hi; then
2894 ac_lo= ac_hi=
2895 break
2896 fi
2897 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2898fi
2899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2900 done
2901else
2902 ac_lo= ac_hi=
2903fi
2904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2905fi
2906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2907# Binary search between lo and hi bounds.
2908while test "x$ac_lo" != "x$ac_hi"; do
2909 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2911/* end confdefs.h. */
2912$4
2913int
2914main ()
2915{
2916static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2917test_array [0] = 0
2918
2919 ;
2920 return 0;
2921}
2922_ACEOF
2923if ac_fn_c_try_compile "$LINENO"; then :
2924 ac_hi=$ac_mid
2925else
2926 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2927fi
2928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2929done
2930case $ac_lo in #((
2931?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2932'') ac_retval=1 ;;
2933esac
2934 else
2935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2936/* end confdefs.h. */
2937$4
2938static long int longval () { return $2; }
2939static unsigned long int ulongval () { return $2; }
2940#include <stdio.h>
2941#include <stdlib.h>
2942int
2943main ()
2944{
2945
2946 FILE *f = fopen ("conftest.val", "w");
2947 if (! f)
2948 return 1;
2949 if (($2) < 0)
2950 {
2951 long int i = longval ();
2952 if (i != ($2))
2953 return 1;
2954 fprintf (f, "%ld", i);
2955 }
2956 else
2957 {
2958 unsigned long int i = ulongval ();
2959 if (i != ($2))
2960 return 1;
2961 fprintf (f, "%lu", i);
2962 }
2963 /* Do not output a trailing newline, as this causes \r\n confusion
2964 on some platforms. */
2965 return ferror (f) || fclose (f) != 0;
2966
2967 ;
2968 return 0;
2969}
2970_ACEOF
2971if ac_fn_c_try_run "$LINENO"; then :
2972 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2973else
2974 ac_retval=1
2975fi
2976rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2977 conftest.$ac_objext conftest.beam conftest.$ac_ext
2978rm -f conftest.val
2979
2980 fi
2981 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2982 return $ac_retval
2983
2984} # ac_fn_c_compute_int
2985
8690e634
JK
2986# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2987# -------------------------------------------
2988# Tests whether TYPE exists after having included INCLUDES, setting cache
2989# variable VAR accordingly.
2990ac_fn_c_check_type ()
c971b7fa
PA
2991{
2992 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2994$as_echo_n "checking for $2... " >&6; }
2995if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2996 $as_echo_n "(cached) " >&6
2997else
8690e634 2998 eval "$3=no"
c971b7fa
PA
2999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3000/* end confdefs.h. */
8690e634 3001$4
c971b7fa
PA
3002int
3003main ()
3004{
8690e634
JK
3005if (sizeof ($2))
3006 return 0;
c971b7fa
PA
3007 ;
3008 return 0;
3009}
3010_ACEOF
8690e634 3011if ac_fn_c_try_compile "$LINENO"; then :
c971b7fa
PA
3012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3013/* end confdefs.h. */
3014$4
3015int
3016main ()
3017{
8690e634
JK
3018if (sizeof (($2)))
3019 return 0;
c971b7fa
PA
3020 ;
3021 return 0;
3022}
3023_ACEOF
3024if ac_fn_c_try_compile "$LINENO"; then :
8690e634 3025
c971b7fa 3026else
8690e634
JK
3027 eval "$3=yes"
3028fi
3029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa
PA
3030fi
3031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3032fi
3033eval ac_res=\$$3
3034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3035$as_echo "$ac_res" >&6; }
3036 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
3037
8690e634 3038} # ac_fn_c_check_type
c971b7fa
PA
3039cat >config.log <<_ACEOF
3040This file contains any messages produced by compilers while
3041running configure, to aid debugging if configure makes a mistake.
3042
3043It was created by $as_me, which was
3044generated by GNU Autoconf 2.64. Invocation command line was
3045
3046 $ $0 $@
3047
3048_ACEOF
3049exec 5>>config.log
3050{
3051cat <<_ASUNAME
3052## --------- ##
3053## Platform. ##
3054## --------- ##
3055
3056hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3057uname -m = `(uname -m) 2>/dev/null || echo unknown`
3058uname -r = `(uname -r) 2>/dev/null || echo unknown`
3059uname -s = `(uname -s) 2>/dev/null || echo unknown`
3060uname -v = `(uname -v) 2>/dev/null || echo unknown`
3061
3062/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3063/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3064
3065/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3066/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3067/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3068/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3069/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3070/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3071/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3072
3073_ASUNAME
3074
3075as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3076for as_dir in $PATH
3077do
3078 IFS=$as_save_IFS
3079 test -z "$as_dir" && as_dir=.
3080 $as_echo "PATH: $as_dir"
3081 done
3082IFS=$as_save_IFS
3083
3084} >&5
3085
3086cat >&5 <<_ACEOF
3087
3088
3089## ----------- ##
3090## Core tests. ##
3091## ----------- ##
3092
3093_ACEOF
3094
3095
3096# Keep a trace of the command line.
3097# Strip out --no-create and --no-recursion so they do not pile up.
3098# Strip out --silent because we don't want to record it for future runs.
3099# Also quote any args containing shell meta-characters.
3100# Make two passes to allow for proper duplicate-argument suppression.
3101ac_configure_args=
3102ac_configure_args0=
3103ac_configure_args1=
3104ac_must_keep_next=false
3105for ac_pass in 1 2
3106do
3107 for ac_arg
3108 do
3109 case $ac_arg in
3110 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3111 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3112 | -silent | --silent | --silen | --sile | --sil)
3113 continue ;;
3114 *\'*)
3115 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3116 esac
3117 case $ac_pass in
3118 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3119 2)
3120 as_fn_append ac_configure_args1 " '$ac_arg'"
3121 if test $ac_must_keep_next = true; then
3122 ac_must_keep_next=false # Got value, back to normal.
3123 else
3124 case $ac_arg in
3125 *=* | --config-cache | -C | -disable-* | --disable-* \
3126 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3127 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3128 | -with-* | --with-* | -without-* | --without-* | --x)
3129 case "$ac_configure_args0 " in
3130 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3131 esac
3132 ;;
3133 -* ) ac_must_keep_next=true ;;
3134 esac
3135 fi
3136 as_fn_append ac_configure_args " '$ac_arg'"
3137 ;;
3138 esac
3139 done
3140done
3141{ ac_configure_args0=; unset ac_configure_args0;}
3142{ ac_configure_args1=; unset ac_configure_args1;}
3143
3144# When interrupted or exit'd, cleanup temporary files, and complete
3145# config.log. We remove comments because anyway the quotes in there
3146# would cause problems or look ugly.
3147# WARNING: Use '\'' to represent an apostrophe within the trap.
3148# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3149trap 'exit_status=$?
3150 # Save into config.log some information that might help in debugging.
3151 {
3152 echo
3153
3154 cat <<\_ASBOX
3155## ---------------- ##
3156## Cache variables. ##
3157## ---------------- ##
3158_ASBOX
3159 echo
3160 # The following way of writing the cache mishandles newlines in values,
3161(
3162 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3163 eval ac_val=\$$ac_var
3164 case $ac_val in #(
3165 *${as_nl}*)
3166 case $ac_var in #(
3167 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3168$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3169 esac
3170 case $ac_var in #(
3171 _ | IFS | as_nl) ;; #(
3172 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3173 *) { eval $ac_var=; unset $ac_var;} ;;
3174 esac ;;
3175 esac
3176 done
3177 (set) 2>&1 |
3178 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3179 *${as_nl}ac_space=\ *)
3180 sed -n \
3181 "s/'\''/'\''\\\\'\'''\''/g;
3182 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3183 ;; #(
3184 *)
3185 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3186 ;;
3187 esac |
3188 sort
3189)
3190 echo
3191
3192 cat <<\_ASBOX
3193## ----------------- ##
3194## Output variables. ##
3195## ----------------- ##
3196_ASBOX
3197 echo
3198 for ac_var in $ac_subst_vars
3199 do
3200 eval ac_val=\$$ac_var
3201 case $ac_val in
3202 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3203 esac
3204 $as_echo "$ac_var='\''$ac_val'\''"
3205 done | sort
3206 echo
3207
3208 if test -n "$ac_subst_files"; then
3209 cat <<\_ASBOX
3210## ------------------- ##
3211## File substitutions. ##
3212## ------------------- ##
3213_ASBOX
3214 echo
3215 for ac_var in $ac_subst_files
3216 do
3217 eval ac_val=\$$ac_var
3218 case $ac_val in
3219 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3220 esac
3221 $as_echo "$ac_var='\''$ac_val'\''"
3222 done | sort
3223 echo
3224 fi
3225
3226 if test -s confdefs.h; then
3227 cat <<\_ASBOX
3228## ----------- ##
3229## confdefs.h. ##
3230## ----------- ##
3231_ASBOX
3232 echo
3233 cat confdefs.h
3234 echo
3235 fi
3236 test "$ac_signal" != 0 &&
3237 $as_echo "$as_me: caught signal $ac_signal"
3238 $as_echo "$as_me: exit $exit_status"
3239 } >&5
3240 rm -f core *.core core.conftest.* &&
3241 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3242 exit $exit_status
3243' 0
3244for ac_signal in 1 2 13 15; do
3245 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3246done
3247ac_signal=0
3248
3249# confdefs.h avoids OS command line length limits that DEFS can exceed.
3250rm -f -r conftest* confdefs.h
3251
3252$as_echo "/* confdefs.h */" > confdefs.h
3253
3254# Predefined preprocessor variables.
3255
3256cat >>confdefs.h <<_ACEOF
3257#define PACKAGE_NAME "$PACKAGE_NAME"
3258_ACEOF
3259
3260cat >>confdefs.h <<_ACEOF
3261#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3262_ACEOF
3263
3264cat >>confdefs.h <<_ACEOF
3265#define PACKAGE_VERSION "$PACKAGE_VERSION"
3266_ACEOF
3267
3268cat >>confdefs.h <<_ACEOF
3269#define PACKAGE_STRING "$PACKAGE_STRING"
3270_ACEOF
3271
3272cat >>confdefs.h <<_ACEOF
3273#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3274_ACEOF
3275
3276cat >>confdefs.h <<_ACEOF
3277#define PACKAGE_URL "$PACKAGE_URL"
3278_ACEOF
3279
3280
3281# Let the site file select an alternate cache file if it wants to.
3282# Prefer an explicitly selected file to automatically selected ones.
3283ac_site_file1=NONE
3284ac_site_file2=NONE
3285if test -n "$CONFIG_SITE"; then
3286 ac_site_file1=$CONFIG_SITE
3287elif test "x$prefix" != xNONE; then
3288 ac_site_file1=$prefix/share/config.site
3289 ac_site_file2=$prefix/etc/config.site
3290else
3291 ac_site_file1=$ac_default_prefix/share/config.site
3292 ac_site_file2=$ac_default_prefix/etc/config.site
3293fi
3294for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3295do
3296 test "x$ac_site_file" = xNONE && continue
3297 if test -r "$ac_site_file"; then
3298 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3299$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3300 sed 's/^/| /' "$ac_site_file" >&5
3301 . "$ac_site_file"
3302 fi
3303done
3304
3305if test -r "$cache_file"; then
3306 # Some versions of bash will fail to source /dev/null (special
3307 # files actually), so we avoid doing that.
3308 if test -f "$cache_file"; then
3309 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3310$as_echo "$as_me: loading cache $cache_file" >&6;}
3311 case $cache_file in
3312 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3313 *) . "./$cache_file";;
3314 esac
3315 fi
3316else
3317 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3318$as_echo "$as_me: creating cache $cache_file" >&6;}
3319 >$cache_file
3320fi
3321
98399780
YQ
3322as_fn_append ac_func_list " canonicalize_file_name"
3323as_fn_append ac_func_list " getcwd"
3324as_fn_append ac_func_list " readlink"
3325as_fn_append ac_func_list " realpath"
3326as_fn_append ac_header_list " sys/param.h"
3d99e817 3327as_fn_append ac_header_list " unistd.h"
6ec2e0f5
SDJ
3328as_fn_append ac_func_list " _set_invalid_parameter_handler"
3329as_fn_append ac_header_list " sys/socket.h"
3330as_fn_append ac_func_list " fchdir"
3331as_fn_append ac_header_list " dirent.h"
3332as_fn_append ac_func_list " fcntl"
3333as_fn_append ac_func_list " symlink"
3334as_fn_append ac_func_list " fdopendir"
3335as_fn_append ac_func_list " mempcpy"
3574124b
PA
3336as_fn_append ac_func_list " btowc"
3337as_fn_append ac_func_list " isblank"
3338as_fn_append ac_func_list " iswctype"
3339as_fn_append ac_func_list " mbsrtowcs"
3574124b
PA
3340as_fn_append ac_func_list " wmemchr"
3341as_fn_append ac_func_list " wmemcpy"
3342as_fn_append ac_func_list " wmempcpy"
3343as_fn_append ac_header_list " wctype.h"
8690e634 3344gl_fnmatch_required=GNU
6ec2e0f5
SDJ
3345as_fn_append ac_header_list " sys/stat.h"
3346as_fn_append ac_func_list " fstatat"
3347as_fn_append ac_func_list " getdtablesize"
3348as_fn_append ac_func_list " getlogin_r"
3349as_fn_append ac_func_list " getprogname"
3350as_fn_append ac_func_list " getexecname"
4a626d0a 3351as_fn_append ac_header_list " sys/time.h"
4a626d0a 3352as_fn_append ac_func_list " gettimeofday"
6ec2e0f5
SDJ
3353as_fn_append ac_header_list " sys/cdefs.h"
3354as_fn_append ac_func_list " getpwnam_r"
49e4877c 3355as_fn_append ac_header_list " limits.h"
3574124b
PA
3356as_fn_append ac_header_list " wchar.h"
3357as_fn_append ac_header_list " stdint.h"
3358as_fn_append ac_header_list " inttypes.h"
f45c62c4 3359as_fn_append ac_func_list " lstat"
3574124b
PA
3360as_fn_append ac_header_list " math.h"
3361as_fn_append ac_func_list " mbsinit"
3362as_fn_append ac_func_list " mbrtowc"
3363as_fn_append ac_header_list " sys/mman.h"
3364as_fn_append ac_func_list " mprotect"
2d8adcbd 3365as_fn_append ac_func_list " mkstemp"
6ec2e0f5 3366as_fn_append ac_func_list " openat"
6a29c58e 3367as_fn_append ac_func_list " link"
2d8adcbd
MM
3368as_fn_append ac_func_list " secure_getenv"
3369as_fn_append ac_func_list " getuid"
3370as_fn_append ac_func_list " geteuid"
3371as_fn_append ac_func_list " getgid"
3372as_fn_append ac_func_list " getegid"
3d99e817 3373as_fn_append ac_func_list " setenv"
6ec2e0f5
SDJ
3374as_fn_append ac_func_list " strdup"
3375as_fn_append ac_func_list " pipe"
3574124b
PA
3376as_fn_append ac_header_list " features.h"
3377as_fn_append ac_func_list " iswcntrl"
c971b7fa
PA
3378# Check that the precious variables saved in the cache have kept the same
3379# value.
3380ac_cache_corrupted=false
3381for ac_var in $ac_precious_vars; do
3382 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3383 eval ac_new_set=\$ac_env_${ac_var}_set
3384 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3385 eval ac_new_val=\$ac_env_${ac_var}_value
3386 case $ac_old_set,$ac_new_set in
3387 set,)
3388 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3389$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3390 ac_cache_corrupted=: ;;
3391 ,set)
3392 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3393$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3394 ac_cache_corrupted=: ;;
3395 ,);;
3396 *)
3397 if test "x$ac_old_val" != "x$ac_new_val"; then
3398 # differences in whitespace do not lead to failure.
3399 ac_old_val_w=`echo x $ac_old_val`
3400 ac_new_val_w=`echo x $ac_new_val`
3401 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3402 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3403$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3404 ac_cache_corrupted=:
3405 else
3406 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3407$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3408 eval $ac_var=\$ac_old_val
3409 fi
3410 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3411$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3412 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3413$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3414 fi;;
3415 esac
3416 # Pass precious variables to config.status.
3417 if test "$ac_new_set" = set; then
3418 case $ac_new_val in
3419 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3420 *) ac_arg=$ac_var=$ac_new_val ;;
3421 esac
3422 case " $ac_configure_args " in
3423 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3424 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3425 esac
3426 fi
3427done
3428if $ac_cache_corrupted; then
3429 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3430$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3431 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3432$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3433 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3434fi
3435## -------------------- ##
3436## Main body of script. ##
3437## -------------------- ##
3438
3439ac_ext=c
3440ac_cpp='$CPP $CPPFLAGS'
3441ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3442ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3443ac_compiler_gnu=$ac_cv_c_compiler_gnu
3444
3445
3446ac_config_headers="$ac_config_headers config.h:config.in"
3447
3448
3449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
3450$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
3451 # Check whether --enable-maintainer-mode was given.
3452if test "${enable_maintainer_mode+set}" = set; then :
3453 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
3454else
3455 USE_MAINTAINER_MODE=no
3456fi
3457
3458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3459$as_echo "$USE_MAINTAINER_MODE" >&6; }
3460 if test $USE_MAINTAINER_MODE = yes; then
3461 MAINTAINER_MODE_TRUE=
3462 MAINTAINER_MODE_FALSE='#'
3463else
3464 MAINTAINER_MODE_TRUE='#'
3465 MAINTAINER_MODE_FALSE=
3466fi
3467
3468 MAINT=$MAINTAINER_MODE_TRUE
3469
3470
3471
3472ac_ext=c
3473ac_cpp='$CPP $CPPFLAGS'
3474ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3475ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3476ac_compiler_gnu=$ac_cv_c_compiler_gnu
3477if test -n "$ac_tool_prefix"; then
3478 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3479set dummy ${ac_tool_prefix}gcc; ac_word=$2
3480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3481$as_echo_n "checking for $ac_word... " >&6; }
3482if test "${ac_cv_prog_CC+set}" = set; then :
3483 $as_echo_n "(cached) " >&6
3484else
3485 if test -n "$CC"; then
3486 ac_cv_prog_CC="$CC" # Let the user override the test.
3487else
3488as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3489for as_dir in $PATH
3490do
3491 IFS=$as_save_IFS
3492 test -z "$as_dir" && as_dir=.
3493 for ac_exec_ext in '' $ac_executable_extensions; do
3494 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3495 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3496 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3497 break 2
3498 fi
3499done
3500 done
3501IFS=$as_save_IFS
3502
3503fi
3504fi
3505CC=$ac_cv_prog_CC
3506if test -n "$CC"; then
3507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3508$as_echo "$CC" >&6; }
3509else
3510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3511$as_echo "no" >&6; }
3512fi
3513
3514
3515fi
3516if test -z "$ac_cv_prog_CC"; then
3517 ac_ct_CC=$CC
3518 # Extract the first word of "gcc", so it can be a program name with args.
3519set dummy gcc; ac_word=$2
3520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3521$as_echo_n "checking for $ac_word... " >&6; }
3522if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3523 $as_echo_n "(cached) " >&6
3524else
3525 if test -n "$ac_ct_CC"; then
3526 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3527else
3528as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3529for as_dir in $PATH
3530do
3531 IFS=$as_save_IFS
3532 test -z "$as_dir" && as_dir=.
3533 for ac_exec_ext in '' $ac_executable_extensions; do
3534 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3535 ac_cv_prog_ac_ct_CC="gcc"
3536 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3537 break 2
3538 fi
3539done
3540 done
3541IFS=$as_save_IFS
3542
3543fi
3544fi
3545ac_ct_CC=$ac_cv_prog_ac_ct_CC
3546if test -n "$ac_ct_CC"; then
3547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3548$as_echo "$ac_ct_CC" >&6; }
3549else
3550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3551$as_echo "no" >&6; }
3552fi
3553
3554 if test "x$ac_ct_CC" = x; then
3555 CC=""
3556 else
3557 case $cross_compiling:$ac_tool_warned in
3558yes:)
3559{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3560$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3561ac_tool_warned=yes ;;
3562esac
3563 CC=$ac_ct_CC
3564 fi
3565else
3566 CC="$ac_cv_prog_CC"
3567fi
3568
3569if test -z "$CC"; then
3570 if test -n "$ac_tool_prefix"; then
3571 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3572set dummy ${ac_tool_prefix}cc; ac_word=$2
3573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3574$as_echo_n "checking for $ac_word... " >&6; }
3575if test "${ac_cv_prog_CC+set}" = set; then :
3576 $as_echo_n "(cached) " >&6
3577else
3578 if test -n "$CC"; then
3579 ac_cv_prog_CC="$CC" # Let the user override the test.
3580else
3581as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3582for as_dir in $PATH
3583do
3584 IFS=$as_save_IFS
3585 test -z "$as_dir" && as_dir=.
3586 for ac_exec_ext in '' $ac_executable_extensions; do
3587 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3588 ac_cv_prog_CC="${ac_tool_prefix}cc"
3589 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3590 break 2
3591 fi
3592done
3593 done
3594IFS=$as_save_IFS
3595
3596fi
3597fi
3598CC=$ac_cv_prog_CC
3599if test -n "$CC"; then
3600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3601$as_echo "$CC" >&6; }
3602else
3603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3604$as_echo "no" >&6; }
3605fi
3606
3607
3608 fi
3609fi
3610if test -z "$CC"; then
3611 # Extract the first word of "cc", so it can be a program name with args.
3612set dummy cc; ac_word=$2
3613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3614$as_echo_n "checking for $ac_word... " >&6; }
3615if test "${ac_cv_prog_CC+set}" = set; then :
3616 $as_echo_n "(cached) " >&6
3617else
3618 if test -n "$CC"; then
3619 ac_cv_prog_CC="$CC" # Let the user override the test.
3620else
3621 ac_prog_rejected=no
3622as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3623for as_dir in $PATH
3624do
3625 IFS=$as_save_IFS
3626 test -z "$as_dir" && as_dir=.
3627 for ac_exec_ext in '' $ac_executable_extensions; do
3628 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3629 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3630 ac_prog_rejected=yes
3631 continue
3632 fi
3633 ac_cv_prog_CC="cc"
3634 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3635 break 2
3636 fi
3637done
3638 done
3639IFS=$as_save_IFS
3640
3641if test $ac_prog_rejected = yes; then
3642 # We found a bogon in the path, so make sure we never use it.
3643 set dummy $ac_cv_prog_CC
3644 shift
3645 if test $# != 0; then
3646 # We chose a different compiler from the bogus one.
3647 # However, it has the same basename, so the bogon will be chosen
3648 # first if we set CC to just the basename; use the full file name.
3649 shift
3650 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3651 fi
3652fi
3653fi
3654fi
3655CC=$ac_cv_prog_CC
3656if test -n "$CC"; then
3657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3658$as_echo "$CC" >&6; }
3659else
3660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3661$as_echo "no" >&6; }
3662fi
3663
3664
3665fi
3666if test -z "$CC"; then
3667 if test -n "$ac_tool_prefix"; then
3668 for ac_prog in cl.exe
3669 do
3670 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3671set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3673$as_echo_n "checking for $ac_word... " >&6; }
3674if test "${ac_cv_prog_CC+set}" = set; then :
3675 $as_echo_n "(cached) " >&6
3676else
3677 if test -n "$CC"; then
3678 ac_cv_prog_CC="$CC" # Let the user override the test.
3679else
3680as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3681for as_dir in $PATH
3682do
3683 IFS=$as_save_IFS
3684 test -z "$as_dir" && as_dir=.
3685 for ac_exec_ext in '' $ac_executable_extensions; do
3686 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3687 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3688 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3689 break 2
3690 fi
3691done
3692 done
3693IFS=$as_save_IFS
3694
3695fi
3696fi
3697CC=$ac_cv_prog_CC
3698if test -n "$CC"; then
3699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3700$as_echo "$CC" >&6; }
3701else
3702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3703$as_echo "no" >&6; }
3704fi
3705
3706
3707 test -n "$CC" && break
3708 done
3709fi
3710if test -z "$CC"; then
3711 ac_ct_CC=$CC
3712 for ac_prog in cl.exe
3713do
3714 # Extract the first word of "$ac_prog", so it can be a program name with args.
3715set dummy $ac_prog; ac_word=$2
3716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3717$as_echo_n "checking for $ac_word... " >&6; }
3718if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3719 $as_echo_n "(cached) " >&6
3720else
3721 if test -n "$ac_ct_CC"; then
3722 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3723else
3724as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3725for as_dir in $PATH
3726do
3727 IFS=$as_save_IFS
3728 test -z "$as_dir" && as_dir=.
3729 for ac_exec_ext in '' $ac_executable_extensions; do
3730 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3731 ac_cv_prog_ac_ct_CC="$ac_prog"
3732 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3733 break 2
3734 fi
3735done
3736 done
3737IFS=$as_save_IFS
3738
3739fi
3740fi
3741ac_ct_CC=$ac_cv_prog_ac_ct_CC
3742if test -n "$ac_ct_CC"; then
3743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3744$as_echo "$ac_ct_CC" >&6; }
3745else
3746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3747$as_echo "no" >&6; }
3748fi
3749
3750
3751 test -n "$ac_ct_CC" && break
3752done
3753
3754 if test "x$ac_ct_CC" = x; then
3755 CC=""
3756 else
3757 case $cross_compiling:$ac_tool_warned in
3758yes:)
3759{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3760$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3761ac_tool_warned=yes ;;
3762esac
3763 CC=$ac_ct_CC
3764 fi
3765fi
3766
3767fi
3768
3769
3770test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3771$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3772as_fn_error "no acceptable C compiler found in \$PATH
3773See \`config.log' for more details." "$LINENO" 5; }
3774
3775# Provide some information about the compiler.
3776$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3777set X $ac_compile
3778ac_compiler=$2
3779for ac_option in --version -v -V -qversion; do
3780 { { ac_try="$ac_compiler $ac_option >&5"
3781case "(($ac_try" in
3782 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3783 *) ac_try_echo=$ac_try;;
3784esac
3785eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3786$as_echo "$ac_try_echo"; } >&5
3787 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3788 ac_status=$?
3789 if test -s conftest.err; then
3790 sed '10a\
3791... rest of stderr output deleted ...
3792 10q' conftest.err >conftest.er1
3793 cat conftest.er1 >&5
3794 rm -f conftest.er1 conftest.err
3795 fi
3796 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3797 test $ac_status = 0; }
3798done
3799
3800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3801/* end confdefs.h. */
3802#include <stdio.h>
3803int
3804main ()
3805{
3806FILE *f = fopen ("conftest.out", "w");
3807 return ferror (f) || fclose (f) != 0;
3808
3809 ;
3810 return 0;
3811}
3812_ACEOF
3813ac_clean_files_save=$ac_clean_files
3814ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
3815# Try to create an executable without -o first, disregard a.out.
3816# It will help us diagnose broken compilers, and finding out an intuition
3817# of exeext.
3818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3819$as_echo_n "checking for C compiler default output file name... " >&6; }
3820ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3821
3822# The possible output files:
3823ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3824
3825ac_rmfiles=
3826for ac_file in $ac_files
3827do
3828 case $ac_file in
3829 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3830 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3831 esac
3832done
3833rm -f $ac_rmfiles
3834
3835if { { ac_try="$ac_link_default"
3836case "(($ac_try" in
3837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3838 *) ac_try_echo=$ac_try;;
3839esac
3840eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3841$as_echo "$ac_try_echo"; } >&5
3842 (eval "$ac_link_default") 2>&5
3843 ac_status=$?
3844 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3845 test $ac_status = 0; }; then :
3846 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3847# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3848# in a Makefile. We should not override ac_cv_exeext if it was cached,
3849# so that the user can short-circuit this test for compilers unknown to
3850# Autoconf.
3851for ac_file in $ac_files ''
3852do
3853 test -f "$ac_file" || continue
3854 case $ac_file in
3855 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3856 ;;
3857 [ab].out )
3858 # We found the default executable, but exeext='' is most
3859 # certainly right.
3860 break;;
3861 *.* )
3862 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3863 then :; else
3864 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3865 fi
3866 # We set ac_cv_exeext here because the later test for it is not
3867 # safe: cross compilers may not add the suffix if given an `-o'
3868 # argument, so we may need to know it at that point already.
3869 # Even if this section looks crufty: it has the advantage of
3870 # actually working.
3871 break;;
3872 * )
3873 break;;
3874 esac
3875done
3876test "$ac_cv_exeext" = no && ac_cv_exeext=
3877
3878else
3879 ac_file=''
3880fi
3881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3882$as_echo "$ac_file" >&6; }
3883if test -z "$ac_file"; then :
3884 $as_echo "$as_me: failed program was:" >&5
3885sed 's/^/| /' conftest.$ac_ext >&5
3886
3887{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3888$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3889{ as_fn_set_status 77
3890as_fn_error "C compiler cannot create executables
3891See \`config.log' for more details." "$LINENO" 5; }; }
3892fi
3893ac_exeext=$ac_cv_exeext
3894
3895# Check that the compiler produces executables we can run. If not, either
3896# the compiler is broken, or we cross compile.
3897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3898$as_echo_n "checking whether the C compiler works... " >&6; }
3899# If not cross compiling, check that we can run a simple program.
3900if test "$cross_compiling" != yes; then
3901 if { ac_try='./$ac_file'
3902 { { case "(($ac_try" in
3903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3904 *) ac_try_echo=$ac_try;;
3905esac
3906eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3907$as_echo "$ac_try_echo"; } >&5
3908 (eval "$ac_try") 2>&5
3909 ac_status=$?
3910 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3911 test $ac_status = 0; }; }; then
3912 cross_compiling=no
3913 else
3914 if test "$cross_compiling" = maybe; then
3915 cross_compiling=yes
3916 else
3917 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3918$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3919as_fn_error "cannot run C compiled programs.
3920If you meant to cross compile, use \`--host'.
3921See \`config.log' for more details." "$LINENO" 5; }
3922 fi
3923 fi
3924fi
3925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3926$as_echo "yes" >&6; }
3927
3928rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
3929ac_clean_files=$ac_clean_files_save
3930# Check that the compiler produces executables we can run. If not, either
3931# the compiler is broken, or we cross compile.
3932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3933$as_echo_n "checking whether we are cross compiling... " >&6; }
3934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3935$as_echo "$cross_compiling" >&6; }
3936
3937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3938$as_echo_n "checking for suffix of executables... " >&6; }
3939if { { ac_try="$ac_link"
3940case "(($ac_try" in
3941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3942 *) ac_try_echo=$ac_try;;
3943esac
3944eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3945$as_echo "$ac_try_echo"; } >&5
3946 (eval "$ac_link") 2>&5
3947 ac_status=$?
3948 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3949 test $ac_status = 0; }; then :
3950 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3951# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3952# work properly (i.e., refer to `conftest.exe'), while it won't with
3953# `rm'.
3954for ac_file in conftest.exe conftest conftest.*; do
3955 test -f "$ac_file" || continue
3956 case $ac_file in
3957 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3958 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3959 break;;
3960 * ) break;;
3961 esac
3962done
3963else
3964 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3965$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3966as_fn_error "cannot compute suffix of executables: cannot compile and link
3967See \`config.log' for more details." "$LINENO" 5; }
3968fi
3969rm -f conftest$ac_cv_exeext
3970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3971$as_echo "$ac_cv_exeext" >&6; }
3972
3973rm -f conftest.$ac_ext
3974EXEEXT=$ac_cv_exeext
3975ac_exeext=$EXEEXT
3976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3977$as_echo_n "checking for suffix of object files... " >&6; }
3978if test "${ac_cv_objext+set}" = set; then :
3979 $as_echo_n "(cached) " >&6
3980else
3981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3982/* end confdefs.h. */
3983
3984int
3985main ()
3986{
3987
3988 ;
3989 return 0;
3990}
3991_ACEOF
3992rm -f conftest.o conftest.obj
3993if { { ac_try="$ac_compile"
3994case "(($ac_try" in
3995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3996 *) ac_try_echo=$ac_try;;
3997esac
3998eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3999$as_echo "$ac_try_echo"; } >&5
4000 (eval "$ac_compile") 2>&5
4001 ac_status=$?
4002 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4003 test $ac_status = 0; }; then :
4004 for ac_file in conftest.o conftest.obj conftest.*; do
4005 test -f "$ac_file" || continue;
4006 case $ac_file in
4007 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4008 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4009 break;;
4010 esac
4011done
4012else
4013 $as_echo "$as_me: failed program was:" >&5
4014sed 's/^/| /' conftest.$ac_ext >&5
4015
4016{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4017$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4018as_fn_error "cannot compute suffix of object files: cannot compile
4019See \`config.log' for more details." "$LINENO" 5; }
4020fi
4021rm -f conftest.$ac_cv_objext conftest.$ac_ext
4022fi
4023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4024$as_echo "$ac_cv_objext" >&6; }
4025OBJEXT=$ac_cv_objext
4026ac_objext=$OBJEXT
4027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4028$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4029if test "${ac_cv_c_compiler_gnu+set}" = set; then :
4030 $as_echo_n "(cached) " >&6
4031else
4032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4033/* end confdefs.h. */
4034
4035int
4036main ()
4037{
4038#ifndef __GNUC__
4039 choke me
4040#endif
4041
4042 ;
4043 return 0;
4044}
4045_ACEOF
4046if ac_fn_c_try_compile "$LINENO"; then :
4047 ac_compiler_gnu=yes
4048else
4049 ac_compiler_gnu=no
4050fi
4051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4052ac_cv_c_compiler_gnu=$ac_compiler_gnu
4053
4054fi
4055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4056$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4057if test $ac_compiler_gnu = yes; then
4058 GCC=yes
4059else
4060 GCC=
4061fi
4062ac_test_CFLAGS=${CFLAGS+set}
4063ac_save_CFLAGS=$CFLAGS
4064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4065$as_echo_n "checking whether $CC accepts -g... " >&6; }
4066if test "${ac_cv_prog_cc_g+set}" = set; then :
4067 $as_echo_n "(cached) " >&6
4068else
4069 ac_save_c_werror_flag=$ac_c_werror_flag
4070 ac_c_werror_flag=yes
4071 ac_cv_prog_cc_g=no
4072 CFLAGS="-g"
4073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4074/* end confdefs.h. */
4075
4076int
4077main ()
4078{
4079
4080 ;
4081 return 0;
4082}
4083_ACEOF
4084if ac_fn_c_try_compile "$LINENO"; then :
4085 ac_cv_prog_cc_g=yes
4086else
4087 CFLAGS=""
4088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4089/* end confdefs.h. */
4090
4091int
4092main ()
4093{
4094
4095 ;
4096 return 0;
4097}
4098_ACEOF
4099if ac_fn_c_try_compile "$LINENO"; then :
4100
4101else
4102 ac_c_werror_flag=$ac_save_c_werror_flag
4103 CFLAGS="-g"
4104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4105/* end confdefs.h. */
4106
4107int
4108main ()
4109{
4110
4111 ;
4112 return 0;
4113}
4114_ACEOF
4115if ac_fn_c_try_compile "$LINENO"; then :
4116 ac_cv_prog_cc_g=yes
4117fi
4118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4119fi
4120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4121fi
4122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4123 ac_c_werror_flag=$ac_save_c_werror_flag
4124fi
4125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4126$as_echo "$ac_cv_prog_cc_g" >&6; }
4127if test "$ac_test_CFLAGS" = set; then
4128 CFLAGS=$ac_save_CFLAGS
4129elif test $ac_cv_prog_cc_g = yes; then
4130 if test "$GCC" = yes; then
4131 CFLAGS="-g -O2"
4132 else
4133 CFLAGS="-g"
4134 fi
4135else
4136 if test "$GCC" = yes; then
4137 CFLAGS="-O2"
4138 else
4139 CFLAGS=
4140 fi
4141fi
4142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4143$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4144if test "${ac_cv_prog_cc_c89+set}" = set; then :
4145 $as_echo_n "(cached) " >&6
4146else
4147 ac_cv_prog_cc_c89=no
4148ac_save_CC=$CC
4149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4150/* end confdefs.h. */
4151#include <stdarg.h>
4152#include <stdio.h>
4153#include <sys/types.h>
4154#include <sys/stat.h>
4155/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4156struct buf { int x; };
4157FILE * (*rcsopen) (struct buf *, struct stat *, int);
4158static char *e (p, i)
4159 char **p;
4160 int i;
4161{
4162 return p[i];
4163}
4164static char *f (char * (*g) (char **, int), char **p, ...)
4165{
4166 char *s;
4167 va_list v;
4168 va_start (v,p);
4169 s = g (p, va_arg (v,int));
4170 va_end (v);
4171 return s;
4172}
4173
4174/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4175 function prototypes and stuff, but not '\xHH' hex character constants.
4176 These don't provoke an error unfortunately, instead are silently treated
4177 as 'x'. The following induces an error, until -std is added to get
4178 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4179 array size at least. It's necessary to write '\x00'==0 to get something
4180 that's true only with -std. */
4181int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4182
4183/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4184 inside strings and character constants. */
4185#define FOO(x) 'x'
4186int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4187
4188int test (int i, double x);
4189struct s1 {int (*f) (int a);};
4190struct s2 {int (*f) (double a);};
4191int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4192int argc;
4193char **argv;
4194int
4195main ()
4196{
4197return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4198 ;
4199 return 0;
4200}
4201_ACEOF
4202for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4203 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4204do
4205 CC="$ac_save_CC $ac_arg"
4206 if ac_fn_c_try_compile "$LINENO"; then :
4207 ac_cv_prog_cc_c89=$ac_arg
4208fi
4209rm -f core conftest.err conftest.$ac_objext
4210 test "x$ac_cv_prog_cc_c89" != "xno" && break
4211done
4212rm -f conftest.$ac_ext
4213CC=$ac_save_CC
4214
4215fi
4216# AC_CACHE_VAL
4217case "x$ac_cv_prog_cc_c89" in
4218 x)
4219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4220$as_echo "none needed" >&6; } ;;
4221 xno)
4222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4223$as_echo "unsupported" >&6; } ;;
4224 *)
4225 CC="$CC $ac_cv_prog_cc_c89"
4226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4227$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4228esac
4229if test "x$ac_cv_prog_cc_c89" != xno; then :
4230
4231fi
4232
4233ac_ext=c
4234ac_cpp='$CPP $CPPFLAGS'
4235ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4236ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4237ac_compiler_gnu=$ac_cv_c_compiler_gnu
4238
c971b7fa
PA
4239
4240ac_ext=c
4241ac_cpp='$CPP $CPPFLAGS'
4242ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4243ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4244ac_compiler_gnu=$ac_cv_c_compiler_gnu
4245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4246$as_echo_n "checking how to run the C preprocessor... " >&6; }
4247# On Suns, sometimes $CPP names a directory.
4248if test -n "$CPP" && test -d "$CPP"; then
4249 CPP=
4250fi
4251if test -z "$CPP"; then
4252 if test "${ac_cv_prog_CPP+set}" = set; then :
4253 $as_echo_n "(cached) " >&6
4254else
4255 # Double quotes because CPP needs to be expanded
4256 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4257 do
4258 ac_preproc_ok=false
4259for ac_c_preproc_warn_flag in '' yes
4260do
4261 # Use a header file that comes with gcc, so configuring glibc
4262 # with a fresh cross-compiler works.
4263 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4264 # <limits.h> exists even on freestanding compilers.
4265 # On the NeXT, cc -E runs the code through the compiler's parser,
4266 # not just through cpp. "Syntax error" is here to catch this case.
4267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4268/* end confdefs.h. */
4269#ifdef __STDC__
4270# include <limits.h>
4271#else
4272# include <assert.h>
4273#endif
4274 Syntax error
4275_ACEOF
4276if ac_fn_c_try_cpp "$LINENO"; then :
4277
4278else
4279 # Broken: fails on valid input.
4280continue
4281fi
4282rm -f conftest.err conftest.$ac_ext
4283
4284 # OK, works on sane cases. Now check whether nonexistent headers
4285 # can be detected and how.
4286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4287/* end confdefs.h. */
4288#include <ac_nonexistent.h>
4289_ACEOF
4290if ac_fn_c_try_cpp "$LINENO"; then :
4291 # Broken: success on invalid input.
4292continue
4293else
4294 # Passes both tests.
4295ac_preproc_ok=:
4296break
4297fi
4298rm -f conftest.err conftest.$ac_ext
4299
4300done
4301# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4302rm -f conftest.err conftest.$ac_ext
4303if $ac_preproc_ok; then :
4304 break
4305fi
4306
4307 done
4308 ac_cv_prog_CPP=$CPP
4309
4310fi
4311 CPP=$ac_cv_prog_CPP
4312else
4313 ac_cv_prog_CPP=$CPP
4314fi
4315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4316$as_echo "$CPP" >&6; }
4317ac_preproc_ok=false
4318for ac_c_preproc_warn_flag in '' yes
4319do
4320 # Use a header file that comes with gcc, so configuring glibc
4321 # with a fresh cross-compiler works.
4322 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4323 # <limits.h> exists even on freestanding compilers.
4324 # On the NeXT, cc -E runs the code through the compiler's parser,
4325 # not just through cpp. "Syntax error" is here to catch this case.
4326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4327/* end confdefs.h. */
4328#ifdef __STDC__
4329# include <limits.h>
4330#else
4331# include <assert.h>
4332#endif
4333 Syntax error
4334_ACEOF
4335if ac_fn_c_try_cpp "$LINENO"; then :
4336
4337else
4338 # Broken: fails on valid input.
4339continue
4340fi
4341rm -f conftest.err conftest.$ac_ext
4342
4343 # OK, works on sane cases. Now check whether nonexistent headers
4344 # can be detected and how.
4345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4346/* end confdefs.h. */
4347#include <ac_nonexistent.h>
4348_ACEOF
4349if ac_fn_c_try_cpp "$LINENO"; then :
4350 # Broken: success on invalid input.
4351continue
4352else
4353 # Passes both tests.
4354ac_preproc_ok=:
4355break
4356fi
4357rm -f conftest.err conftest.$ac_ext
4358
4359done
4360# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4361rm -f conftest.err conftest.$ac_ext
4362if $ac_preproc_ok; then :
4363
4364else
4365 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4366$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4367as_fn_error "C preprocessor \"$CPP\" fails sanity check
4368See \`config.log' for more details." "$LINENO" 5; }
4369fi
4370
4371ac_ext=c
4372ac_cpp='$CPP $CPPFLAGS'
4373ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4374ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4375ac_compiler_gnu=$ac_cv_c_compiler_gnu
4376
4377
4378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4379$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4380if test "${ac_cv_path_GREP+set}" = set; then :
4381 $as_echo_n "(cached) " >&6
4382else
4383 if test -z "$GREP"; then
4384 ac_path_GREP_found=false
4385 # Loop through the user's path and test for each of PROGNAME-LIST
4386 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4387for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4388do
4389 IFS=$as_save_IFS
4390 test -z "$as_dir" && as_dir=.
4391 for ac_prog in grep ggrep; do
4392 for ac_exec_ext in '' $ac_executable_extensions; do
4393 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4394 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4395# Check for GNU ac_path_GREP and select it if it is found.
4396 # Check for GNU $ac_path_GREP
4397case `"$ac_path_GREP" --version 2>&1` in
4398*GNU*)
4399 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4400*)
4401 ac_count=0
4402 $as_echo_n 0123456789 >"conftest.in"
4403 while :
4404 do
4405 cat "conftest.in" "conftest.in" >"conftest.tmp"
4406 mv "conftest.tmp" "conftest.in"
4407 cp "conftest.in" "conftest.nl"
4408 $as_echo 'GREP' >> "conftest.nl"
4409 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4410 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4411 as_fn_arith $ac_count + 1 && ac_count=$as_val
4412 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4413 # Best one so far, save it but keep looking for a better one
4414 ac_cv_path_GREP="$ac_path_GREP"
4415 ac_path_GREP_max=$ac_count
4416 fi
4417 # 10*(2^10) chars as input seems more than enough
4418 test $ac_count -gt 10 && break
4419 done
4420 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4421esac
4422
4423 $ac_path_GREP_found && break 3
4424 done
4425 done
4426 done
4427IFS=$as_save_IFS
4428 if test -z "$ac_cv_path_GREP"; then
4429 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4430 fi
4431else
4432 ac_cv_path_GREP=$GREP
4433fi
4434
4435fi
4436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4437$as_echo "$ac_cv_path_GREP" >&6; }
4438 GREP="$ac_cv_path_GREP"
4439
4440
4441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4442$as_echo_n "checking for egrep... " >&6; }
4443if test "${ac_cv_path_EGREP+set}" = set; then :
4444 $as_echo_n "(cached) " >&6
4445else
4446 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4447 then ac_cv_path_EGREP="$GREP -E"
4448 else
4449 if test -z "$EGREP"; then
4450 ac_path_EGREP_found=false
4451 # Loop through the user's path and test for each of PROGNAME-LIST
4452 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4453for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4454do
4455 IFS=$as_save_IFS
4456 test -z "$as_dir" && as_dir=.
4457 for ac_prog in egrep; do
4458 for ac_exec_ext in '' $ac_executable_extensions; do
4459 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4460 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4461# Check for GNU ac_path_EGREP and select it if it is found.
4462 # Check for GNU $ac_path_EGREP
4463case `"$ac_path_EGREP" --version 2>&1` in
4464*GNU*)
4465 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4466*)
4467 ac_count=0
4468 $as_echo_n 0123456789 >"conftest.in"
4469 while :
4470 do
4471 cat "conftest.in" "conftest.in" >"conftest.tmp"
4472 mv "conftest.tmp" "conftest.in"
4473 cp "conftest.in" "conftest.nl"
4474 $as_echo 'EGREP' >> "conftest.nl"
4475 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4476 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4477 as_fn_arith $ac_count + 1 && ac_count=$as_val
4478 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4479 # Best one so far, save it but keep looking for a better one
4480 ac_cv_path_EGREP="$ac_path_EGREP"
4481 ac_path_EGREP_max=$ac_count
4482 fi
4483 # 10*(2^10) chars as input seems more than enough
4484 test $ac_count -gt 10 && break
4485 done
4486 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4487esac
4488
4489 $ac_path_EGREP_found && break 3
4490 done
4491 done
4492 done
4493IFS=$as_save_IFS
4494 if test -z "$ac_cv_path_EGREP"; then
4495 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4496 fi
4497else
4498 ac_cv_path_EGREP=$EGREP
4499fi
4500
4501 fi
4502fi
4503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4504$as_echo "$ac_cv_path_EGREP" >&6; }
4505 EGREP="$ac_cv_path_EGREP"
4506
4507
4508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4509$as_echo_n "checking for ANSI C header files... " >&6; }
4510if test "${ac_cv_header_stdc+set}" = set; then :
4511 $as_echo_n "(cached) " >&6
4512else
4513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4514/* end confdefs.h. */
4515#include <stdlib.h>
4516#include <stdarg.h>
4517#include <string.h>
4518#include <float.h>
4519
4520int
4521main ()
4522{
4523
4524 ;
4525 return 0;
4526}
4527_ACEOF
4528if ac_fn_c_try_compile "$LINENO"; then :
4529 ac_cv_header_stdc=yes
4530else
4531 ac_cv_header_stdc=no
4532fi
4533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4534
4535if test $ac_cv_header_stdc = yes; then
4536 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4538/* end confdefs.h. */
4539#include <string.h>
4540
4541_ACEOF
4542if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4543 $EGREP "memchr" >/dev/null 2>&1; then :
4544
4545else
4546 ac_cv_header_stdc=no
4547fi
4548rm -f conftest*
4549
4550fi
4551
4552if test $ac_cv_header_stdc = yes; then
4553 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4555/* end confdefs.h. */
4556#include <stdlib.h>
4557
4558_ACEOF
4559if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4560 $EGREP "free" >/dev/null 2>&1; then :
4561
4562else
4563 ac_cv_header_stdc=no
4564fi
4565rm -f conftest*
4566
4567fi
4568
4569if test $ac_cv_header_stdc = yes; then
4570 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4571 if test "$cross_compiling" = yes; then :
4572 :
4573else
4574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4575/* end confdefs.h. */
4576#include <ctype.h>
4577#include <stdlib.h>
4578#if ((' ' & 0x0FF) == 0x020)
4579# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4580# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4581#else
4582# define ISLOWER(c) \
4583 (('a' <= (c) && (c) <= 'i') \
4584 || ('j' <= (c) && (c) <= 'r') \
4585 || ('s' <= (c) && (c) <= 'z'))
4586# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4587#endif
4588
4589#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4590int
4591main ()
4592{
4593 int i;
4594 for (i = 0; i < 256; i++)
4595 if (XOR (islower (i), ISLOWER (i))
4596 || toupper (i) != TOUPPER (i))
4597 return 2;
4598 return 0;
4599}
4600_ACEOF
4601if ac_fn_c_try_run "$LINENO"; then :
4602
4603else
4604 ac_cv_header_stdc=no
4605fi
4606rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4607 conftest.$ac_objext conftest.beam conftest.$ac_ext
4608fi
4609
4610fi
4611fi
4612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4613$as_echo "$ac_cv_header_stdc" >&6; }
4614if test $ac_cv_header_stdc = yes; then
4615
4616$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4617
4618fi
4619
4620# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4621for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4622 inttypes.h stdint.h unistd.h
4623do :
4624 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4625ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4626"
4627eval as_val=\$$as_ac_Header
4628 if test "x$as_val" = x""yes; then :
4629 cat >>confdefs.h <<_ACEOF
4630#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4631_ACEOF
4632
4633fi
4634
4635done
4636
4637
4638
c971b7fa
PA
4639 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4640if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4641 MINIX=yes
4642else
4643 MINIX=
4644fi
4645
4646
4647 if test "$MINIX" = yes; then
4648
4649$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4650
4651
4652$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4653
4654
4655$as_echo "#define _MINIX 1" >>confdefs.h
4656
c971b7fa 4657
4a626d0a 4658$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
c971b7fa 4659
4a626d0a 4660 fi
c971b7fa
PA
4661
4662
4663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4664$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4665if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4666 $as_echo_n "(cached) " >&6
4667else
4668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4669/* end confdefs.h. */
4670
4671# define __EXTENSIONS__ 1
4672 $ac_includes_default
4673int
4674main ()
4675{
4676
4677 ;
4678 return 0;
4679}
4680_ACEOF
4681if ac_fn_c_try_compile "$LINENO"; then :
4682 ac_cv_safe_to_define___extensions__=yes
4683else
4684 ac_cv_safe_to_define___extensions__=no
4685fi
4686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4687fi
4688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4689$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4690 test $ac_cv_safe_to_define___extensions__ = yes &&
4691 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4692
4693 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4694
4695 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
4696
4697 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4698
4699 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4700
49e4877c
PA
4701 $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
4702
4703 $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
4704
4705 $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
4706
4707 $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
4708
4709 $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
4710
4711 $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
4712
4713 $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
4714
c971b7fa
PA
4715 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4716
4a626d0a
PA
4717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
4718$as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
4719if test "${ac_cv_should_define__xopen_source+set}" = set; then :
4720 $as_echo_n "(cached) " >&6
4721else
4722 ac_cv_should_define__xopen_source=no
4723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4724/* end confdefs.h. */
4725
4726 #include <wchar.h>
4727 mbstate_t x;
4728int
4729main ()
4730{
4731
4732 ;
4733 return 0;
4734}
4735_ACEOF
4736if ac_fn_c_try_compile "$LINENO"; then :
4737
4738else
4739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4740/* end confdefs.h. */
4741
4742 #define _XOPEN_SOURCE 500
4743 #include <wchar.h>
4744 mbstate_t x;
4745int
4746main ()
4747{
4748
4749 ;
4750 return 0;
4751}
4752_ACEOF
4753if ac_fn_c_try_compile "$LINENO"; then :
4754 ac_cv_should_define__xopen_source=yes
4755fi
4756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4757fi
4758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4759fi
4760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
4761$as_echo "$ac_cv_should_define__xopen_source" >&6; }
4762 test $ac_cv_should_define__xopen_source = yes &&
4763 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
4764
c971b7fa
PA
4765
4766
4767
49e4877c
PA
4768
4769
4770
4771
4772
4773
4774
c971b7fa
PA
4775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
4776$as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
4777if test "${gl_cv_c_amsterdam_compiler+set}" = set; then :
4778 $as_echo_n "(cached) " >&6
4779else
4780
4781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4782/* end confdefs.h. */
4783
4784#ifdef __ACK__
4785Amsterdam
4786#endif
4787
4788_ACEOF
4789if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4790 $EGREP "Amsterdam" >/dev/null 2>&1; then :
4791 gl_cv_c_amsterdam_compiler=yes
4792else
4793 gl_cv_c_amsterdam_compiler=no
4794fi
4795rm -f conftest*
4796
4797
4798fi
4799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
4800$as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
49e4877c
PA
4801
4802 if test $gl_cv_c_amsterdam_compiler = yes; then
4803 if test -z "$AR"; then
c971b7fa 4804 AR='cc -c.a'
49e4877c
PA
4805 fi
4806 if test -z "$ARFLAGS"; then
4807 ARFLAGS='-o'
4808 fi
4809 else
4810 :
4811 fi
4812
4813 if test -n "$ac_tool_prefix"; then
c971b7fa
PA
4814 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4815set dummy ${ac_tool_prefix}ar; ac_word=$2
4816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4817$as_echo_n "checking for $ac_word... " >&6; }
4818if test "${ac_cv_prog_AR+set}" = set; then :
4819 $as_echo_n "(cached) " >&6
4820else
4821 if test -n "$AR"; then
4822 ac_cv_prog_AR="$AR" # Let the user override the test.
4823else
4824as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4825for as_dir in $PATH
4826do
4827 IFS=$as_save_IFS
4828 test -z "$as_dir" && as_dir=.
4829 for ac_exec_ext in '' $ac_executable_extensions; do
4830 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4831 ac_cv_prog_AR="${ac_tool_prefix}ar"
4832 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4833 break 2
4834 fi
4835done
4836 done
4837IFS=$as_save_IFS
4838
4839fi
4840fi
4841AR=$ac_cv_prog_AR
4842if test -n "$AR"; then
4843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
4844$as_echo "$AR" >&6; }
4845else
4846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4847$as_echo "no" >&6; }
4848fi
4849
4850
4851fi
4852if test -z "$ac_cv_prog_AR"; then
4853 ac_ct_AR=$AR
4854 # Extract the first word of "ar", so it can be a program name with args.
4855set dummy ar; ac_word=$2
4856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4857$as_echo_n "checking for $ac_word... " >&6; }
4858if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
4859 $as_echo_n "(cached) " >&6
4860else
4861 if test -n "$ac_ct_AR"; then
4862 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4863else
4864as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4865for as_dir in $PATH
4866do
4867 IFS=$as_save_IFS
4868 test -z "$as_dir" && as_dir=.
4869 for ac_exec_ext in '' $ac_executable_extensions; do
4870 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4871 ac_cv_prog_ac_ct_AR="ar"
4872 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4873 break 2
4874 fi
4875done
4876 done
4877IFS=$as_save_IFS
4878
4879fi
4880fi
4881ac_ct_AR=$ac_cv_prog_ac_ct_AR
4882if test -n "$ac_ct_AR"; then
4883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
4884$as_echo "$ac_ct_AR" >&6; }
4885else
4886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4887$as_echo "no" >&6; }
4888fi
4889
4890 if test "x$ac_ct_AR" = x; then
4891 AR="ar"
4892 else
4893 case $cross_compiling:$ac_tool_warned in
4894yes:)
4895{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4896$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4897ac_tool_warned=yes ;;
4898esac
4899 AR=$ac_ct_AR
4900 fi
4901else
4902 AR="$ac_cv_prog_AR"
4903fi
4904
49e4877c
PA
4905 if test -z "$ARFLAGS"; then
4906 ARFLAGS='cr'
c971b7fa
PA
4907 fi
4908
4909
49e4877c 4910
c971b7fa
PA
4911 if test -z "$RANLIB"; then
4912 if test $gl_cv_c_amsterdam_compiler = yes; then
4913 RANLIB=':'
4914 else
4915 if test -n "$ac_tool_prefix"; then
4916 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4917set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4919$as_echo_n "checking for $ac_word... " >&6; }
4920if test "${ac_cv_prog_RANLIB+set}" = set; then :
4921 $as_echo_n "(cached) " >&6
4922else
4923 if test -n "$RANLIB"; then
4924 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4925else
4926as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4927for as_dir in $PATH
4928do
4929 IFS=$as_save_IFS
4930 test -z "$as_dir" && as_dir=.
4931 for ac_exec_ext in '' $ac_executable_extensions; do
4932 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4933 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4934 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4935 break 2
4936 fi
4937done
4938 done
4939IFS=$as_save_IFS
4940
4941fi
4942fi
4943RANLIB=$ac_cv_prog_RANLIB
4944if test -n "$RANLIB"; then
4945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4946$as_echo "$RANLIB" >&6; }
4947else
4948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4949$as_echo "no" >&6; }
4950fi
4951
4952
4953fi
4954if test -z "$ac_cv_prog_RANLIB"; then
4955 ac_ct_RANLIB=$RANLIB
4956 # Extract the first word of "ranlib", so it can be a program name with args.
4957set dummy ranlib; ac_word=$2
4958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4959$as_echo_n "checking for $ac_word... " >&6; }
4960if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4961 $as_echo_n "(cached) " >&6
4962else
4963 if test -n "$ac_ct_RANLIB"; then
4964 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4965else
4966as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4967for as_dir in $PATH
4968do
4969 IFS=$as_save_IFS
4970 test -z "$as_dir" && as_dir=.
4971 for ac_exec_ext in '' $ac_executable_extensions; do
4972 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4973 ac_cv_prog_ac_ct_RANLIB="ranlib"
4974 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4975 break 2
4976 fi
4977done
4978 done
4979IFS=$as_save_IFS
4980
4981fi
4982fi
4983ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4984if test -n "$ac_ct_RANLIB"; then
4985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4986$as_echo "$ac_ct_RANLIB" >&6; }
4987else
4988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4989$as_echo "no" >&6; }
4990fi
4991
4992 if test "x$ac_ct_RANLIB" = x; then
4993 RANLIB=":"
4994 else
4995 case $cross_compiling:$ac_tool_warned in
4996yes:)
4997{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4998$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4999ac_tool_warned=yes ;;
5000esac
5001 RANLIB=$ac_ct_RANLIB
5002 fi
5003else
5004 RANLIB="$ac_cv_prog_RANLIB"
5005fi
5006
5007 fi
5008 fi
5009
5010
4a626d0a
PA
5011ac_aux_dir=
5012for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
5013 for ac_t in install-sh install.sh shtool; do
5014 if test -f "$ac_dir/$ac_t"; then
5015 ac_aux_dir=$ac_dir
5016 ac_install_sh="$ac_aux_dir/$ac_t -c"
5017 break 2
5018 fi
5019 done
5020done
5021if test -z "$ac_aux_dir"; then
5022 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
5023fi
5024
5025# These three variables are undocumented and unsupported,
5026# and are intended to be withdrawn in a future Autoconf release.
5027# They can cause serious problems if a builder's source tree is in a directory
5028# whose full name contains unusual characters.
5029ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5030ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5031ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5032
5033
5034# Make sure we can run config.sub.
5035$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
5036 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
5037
5038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5039$as_echo_n "checking build system type... " >&6; }
5040if test "${ac_cv_build+set}" = set; then :
5041 $as_echo_n "(cached) " >&6
5042else
5043 ac_build_alias=$build_alias
5044test "x$ac_build_alias" = x &&
5045 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5046test "x$ac_build_alias" = x &&
5047 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
5048ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
5049 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
5050
5051fi
5052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5053$as_echo "$ac_cv_build" >&6; }
5054case $ac_cv_build in
5055*-*-*) ;;
5056*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
5057esac
5058build=$ac_cv_build
5059ac_save_IFS=$IFS; IFS='-'
5060set x $ac_cv_build
5061shift
5062build_cpu=$1
5063build_vendor=$2
5064shift; shift
5065# Remember, the first character of IFS is used to create $*,
5066# except with old shells:
5067build_os=$*
5068IFS=$ac_save_IFS
5069case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5070
5071
5072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5073$as_echo_n "checking host system type... " >&6; }
5074if test "${ac_cv_host+set}" = set; then :
5075 $as_echo_n "(cached) " >&6
5076else
5077 if test "x$host_alias" = x; then
5078 ac_cv_host=$ac_cv_build
5079else
5080 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
5081 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
5082fi
5083
5084fi
5085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5086$as_echo "$ac_cv_host" >&6; }
5087case $ac_cv_host in
5088*-*-*) ;;
5089*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
5090esac
5091host=$ac_cv_host
5092ac_save_IFS=$IFS; IFS='-'
5093set x $ac_cv_host
5094shift
5095host_cpu=$1
5096host_vendor=$2
5097shift; shift
5098# Remember, the first character of IFS is used to create $*,
5099# except with old shells:
5100host_os=$*
5101IFS=$ac_save_IFS
5102case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5103
5104
c971b7fa
PA
5105
5106
88b48903
WN
5107
5108 # IEEE behaviour is the default on all CPUs except Alpha and SH
5109 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
5110 # and the GCC 4.1.2 manual).
5111 case "$host_cpu" in
5112 alpha*)
5113 # On Alpha systems, a compiler option provides the behaviour.
5114 # See the ieee(3) manual page, also available at
5115 # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
5116 if test -n "$GCC"; then
5117 # GCC has the option -mieee.
5118 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
5119 CPPFLAGS="$CPPFLAGS -mieee"
5120 else
5121 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
5122 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
5123 CPPFLAGS="$CPPFLAGS -ieee"
5124 fi
5125 ;;
5126 sh*)
5127 if test -n "$GCC"; then
5128 # GCC has the option -mieee.
5129 CPPFLAGS="$CPPFLAGS -mieee"
5130 fi
5131 ;;
5132 esac
5133
2196f55f
YQ
5134# Check whether --enable-largefile was given.
5135if test "${enable_largefile+set}" = set; then :
5136 enableval=$enable_largefile;
5137fi
5138
5139if test "$enable_largefile" != no; then
5140
5141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5142$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5143if test "${ac_cv_sys_largefile_CC+set}" = set; then :
5144 $as_echo_n "(cached) " >&6
5145else
5146 ac_cv_sys_largefile_CC=no
5147 if test "$GCC" != yes; then
5148 ac_save_CC=$CC
5149 while :; do
5150 # IRIX 6.2 and later do not support large files by default,
5151 # so use the C compiler's -n32 option if that helps.
5152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5153/* end confdefs.h. */
5154#include <sys/types.h>
5155 /* Check that off_t can represent 2**63 - 1 correctly.
5156 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5157 since some C++ compilers masquerading as C compilers
5158 incorrectly reject 9223372036854775807. */
5159#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5160 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5161 && LARGE_OFF_T % 2147483647 == 1)
5162 ? 1 : -1];
5163int
5164main ()
5165{
5166
5167 ;
5168 return 0;
5169}
5170_ACEOF
5171 if ac_fn_c_try_compile "$LINENO"; then :
5172 break
5173fi
5174rm -f core conftest.err conftest.$ac_objext
5175 CC="$CC -n32"
5176 if ac_fn_c_try_compile "$LINENO"; then :
5177 ac_cv_sys_largefile_CC=' -n32'; break
5178fi
5179rm -f core conftest.err conftest.$ac_objext
5180 break
5181 done
5182 CC=$ac_save_CC
5183 rm -f conftest.$ac_ext
5184 fi
5185fi
5186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5187$as_echo "$ac_cv_sys_largefile_CC" >&6; }
5188 if test "$ac_cv_sys_largefile_CC" != no; then
5189 CC=$CC$ac_cv_sys_largefile_CC
5190 fi
5191
5192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5193$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5194if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
5195 $as_echo_n "(cached) " >&6
5196else
5197 while :; do
5198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5199/* end confdefs.h. */
5200#include <sys/types.h>
5201 /* Check that off_t can represent 2**63 - 1 correctly.
5202 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5203 since some C++ compilers masquerading as C compilers
5204 incorrectly reject 9223372036854775807. */
5205#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5206 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5207 && LARGE_OFF_T % 2147483647 == 1)
5208 ? 1 : -1];
5209int
5210main ()
5211{
5212
5213 ;
5214 return 0;
5215}
5216_ACEOF
5217if ac_fn_c_try_compile "$LINENO"; then :
5218 ac_cv_sys_file_offset_bits=no; break
5219fi
5220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5222/* end confdefs.h. */
5223#define _FILE_OFFSET_BITS 64
5224#include <sys/types.h>
5225 /* Check that off_t can represent 2**63 - 1 correctly.
5226 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5227 since some C++ compilers masquerading as C compilers
5228 incorrectly reject 9223372036854775807. */
5229#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5230 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5231 && LARGE_OFF_T % 2147483647 == 1)
5232 ? 1 : -1];
5233int
5234main ()
5235{
5236
5237 ;
5238 return 0;
5239}
5240_ACEOF
5241if ac_fn_c_try_compile "$LINENO"; then :
5242 ac_cv_sys_file_offset_bits=64; break
5243fi
5244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5245 ac_cv_sys_file_offset_bits=unknown
5246 break
5247done
5248fi
5249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5250$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5251case $ac_cv_sys_file_offset_bits in #(
5252 no | unknown) ;;
5253 *)
5254cat >>confdefs.h <<_ACEOF
5255#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5256_ACEOF
5257;;
5258esac
5259rm -rf conftest*
5260 if test $ac_cv_sys_file_offset_bits = unknown; then
5261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5262$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5263if test "${ac_cv_sys_large_files+set}" = set; then :
5264 $as_echo_n "(cached) " >&6
5265else
5266 while :; do
5267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5268/* end confdefs.h. */
5269#include <sys/types.h>
5270 /* Check that off_t can represent 2**63 - 1 correctly.
5271 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5272 since some C++ compilers masquerading as C compilers
5273 incorrectly reject 9223372036854775807. */
5274#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5275 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5276 && LARGE_OFF_T % 2147483647 == 1)
5277 ? 1 : -1];
5278int
5279main ()
5280{
5281
5282 ;
5283 return 0;
5284}
5285_ACEOF
5286if ac_fn_c_try_compile "$LINENO"; then :
5287 ac_cv_sys_large_files=no; break
5288fi
5289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5291/* end confdefs.h. */
5292#define _LARGE_FILES 1
5293#include <sys/types.h>
5294 /* Check that off_t can represent 2**63 - 1 correctly.
5295 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5296 since some C++ compilers masquerading as C compilers
5297 incorrectly reject 9223372036854775807. */
5298#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5299 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5300 && LARGE_OFF_T % 2147483647 == 1)
5301 ? 1 : -1];
5302int
5303main ()
5304{
5305
5306 ;
5307 return 0;
5308}
5309_ACEOF
5310if ac_fn_c_try_compile "$LINENO"; then :
5311 ac_cv_sys_large_files=1; break
5312fi
5313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5314 ac_cv_sys_large_files=unknown
5315 break
5316done
5317fi
5318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5319$as_echo "$ac_cv_sys_large_files" >&6; }
5320case $ac_cv_sys_large_files in #(
5321 no | unknown) ;;
5322 *)
5323cat >>confdefs.h <<_ACEOF
5324#define _LARGE_FILES $ac_cv_sys_large_files
5325_ACEOF
5326;;
5327esac
5328rm -rf conftest*
5329 fi
5330
5331
4a626d0a
PA
5332$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
5333
2196f55f
YQ
5334fi
5335
88b48903
WN
5336
5337
49e4877c
PA
5338 # Pre-early section.
5339
5340
5341
4a626d0a 5342 # Code from module absolute-header:
8690e634
JK
5343 # Code from module alloca:
5344 # Code from module alloca-opt:
6ec2e0f5
SDJ
5345 # Code from module assure:
5346 # Code from module at-internal:
98399780 5347 # Code from module canonicalize-lgpl:
6a29c58e 5348 # Code from module chdir:
6ec2e0f5
SDJ
5349 # Code from module chdir-long:
5350 # Code from module cloexec:
5351 # Code from module close:
5352 # Code from module closedir:
8690e634 5353 # Code from module configmake:
6ec2e0f5
SDJ
5354 # Code from module d-ino:
5355 # Code from module d-type:
e26b6bb0 5356 # Code from module dirent:
18848e28 5357 # Code from module dirfd:
6a29c58e 5358 # Code from module dirname-lgpl:
2196f55f 5359 # Code from module dosname:
6a29c58e 5360 # Code from module double-slash-root:
6ec2e0f5
SDJ
5361 # Code from module dup:
5362 # Code from module dup2:
3d99e817 5363 # Code from module environ:
18848e28 5364 # Code from module errno:
6ec2e0f5
SDJ
5365 # Code from module error:
5366 # Code from module exitfail:
c971b7fa 5367 # Code from module extensions:
a512b375 5368 # Code from module extern-inline:
6ec2e0f5
SDJ
5369 # Code from module fchdir:
5370 # Code from module fcntl:
5371 # Code from module fcntl-h:
5372 # Code from module fd-hook:
5373 # Code from module fdopendir:
5374 # Code from module filename:
5375 # Code from module filenamecat-lgpl:
49e4877c 5376 # Code from module flexmember:
88b48903 5377 # Code from module float:
8690e634
JK
5378 # Code from module fnmatch:
5379 # Code from module fnmatch-gnu:
88b48903
WN
5380 # Code from module fpieee:
5381
5382 # Code from module fpucw:
5383 # Code from module frexp:
5384 # Code from module frexpl:
6ec2e0f5
SDJ
5385 # Code from module fstat:
5386 # Code from module fstatat:
5387 # Code from module getcwd:
5388 # Code from module getcwd-lgpl:
5389 # Code from module getdtablesize:
5390 # Code from module getlogin_r:
5391 # Code from module getprogname:
5392 # Code from module gettext-h:
4a626d0a 5393 # Code from module gettimeofday:
6ec2e0f5 5394 # Code from module glob:
49e4877c 5395 # Code from module hard-locale:
c971b7fa 5396 # Code from module include_next:
6ec2e0f5 5397 # Code from module intprops:
c971b7fa
PA
5398 # Code from module inttypes:
5399 # Code from module inttypes-incomplete:
88b48903
WN
5400 # Code from module isnand-nolibm:
5401 # Code from module isnanl-nolibm:
2196f55f
YQ
5402 # Code from module largefile:
5403
49e4877c 5404 # Code from module limits-h:
8690e634 5405 # Code from module localcharset:
f45c62c4 5406 # Code from module lstat:
6a29c58e 5407 # Code from module malloc-posix:
98399780 5408 # Code from module malloca:
88b48903 5409 # Code from module math:
8690e634
JK
5410 # Code from module mbrtowc:
5411 # Code from module mbsinit:
5412 # Code from module mbsrtowcs:
c971b7fa
PA
5413 # Code from module memchr:
5414 # Code from module memmem:
5415 # Code from module memmem-simple:
6ec2e0f5
SDJ
5416 # Code from module mempcpy:
5417 # Code from module memrchr:
2d8adcbd 5418 # Code from module mkstemp:
6ec2e0f5
SDJ
5419 # Code from module msvc-inval:
5420 # Code from module msvc-nothrow:
c971b7fa 5421 # Code from module multiarch:
98399780 5422 # Code from module nocrash:
6ec2e0f5
SDJ
5423 # Code from module open:
5424 # Code from module openat:
5425 # Code from module openat-die:
5426 # Code from module openat-h:
5427 # Code from module opendir:
38ec2207 5428 # Code from module pathmax:
8424cc97 5429 # Code from module rawmemchr:
6ec2e0f5 5430 # Code from module readdir:
2196f55f 5431 # Code from module readlink:
6ec2e0f5 5432 # Code from module realloc-posix:
6a29c58e 5433 # Code from module rename:
6ec2e0f5 5434 # Code from module rewinddir:
6a29c58e
YQ
5435 # Code from module rmdir:
5436 # Code from module same-inode:
6ec2e0f5 5437 # Code from module save-cwd:
2d8adcbd 5438 # Code from module secure_getenv:
3d99e817 5439 # Code from module setenv:
0750520d 5440 # Code from module signal-h:
98399780 5441 # Code from module snippet/_Noreturn:
c971b7fa
PA
5442 # Code from module snippet/arg-nonnull:
5443 # Code from module snippet/c++defs:
5444 # Code from module snippet/warn-on-use:
8839a007 5445 # Code from module ssize_t:
2196f55f 5446 # Code from module stat:
8690e634 5447 # Code from module stdbool:
c971b7fa
PA
5448 # Code from module stddef:
5449 # Code from module stdint:
6a29c58e 5450 # Code from module stdio:
98399780 5451 # Code from module stdlib:
8424cc97 5452 # Code from module strchrnul:
6ec2e0f5 5453 # Code from module strdup-posix:
8690e634 5454 # Code from module streq:
6ec2e0f5
SDJ
5455 # Code from module strerror:
5456 # Code from module strerror-override:
c971b7fa 5457 # Code from module string:
8690e634 5458 # Code from module strnlen1:
63ce7108
TT
5459 # Code from module strstr:
5460 # Code from module strstr-simple:
421693b0 5461 # Code from module strtok_r:
09607c9e 5462 # Code from module sys_stat:
4a626d0a 5463 # Code from module sys_time:
8839a007 5464 # Code from module sys_types:
2d8adcbd 5465 # Code from module tempname:
09607c9e 5466 # Code from module time:
8839a007 5467 # Code from module unistd:
6ec2e0f5 5468 # Code from module unistd-safer:
3d99e817 5469 # Code from module unsetenv:
c971b7fa 5470 # Code from module update-copyright:
8690e634
JK
5471 # Code from module verify:
5472 # Code from module wchar:
5473 # Code from module wctype-h:
c971b7fa
PA
5474
5475ac_ext=c
5476ac_cpp='$CPP $CPPFLAGS'
5477ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5478ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5479ac_compiler_gnu=$ac_cv_c_compiler_gnu
5480if test -n "$ac_tool_prefix"; then
5481 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5482set dummy ${ac_tool_prefix}gcc; ac_word=$2
5483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5484$as_echo_n "checking for $ac_word... " >&6; }
5485if test "${ac_cv_prog_CC+set}" = set; then :
5486 $as_echo_n "(cached) " >&6
5487else
5488 if test -n "$CC"; then
5489 ac_cv_prog_CC="$CC" # Let the user override the test.
5490else
5491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5492for as_dir in $PATH
5493do
5494 IFS=$as_save_IFS
5495 test -z "$as_dir" && as_dir=.
5496 for ac_exec_ext in '' $ac_executable_extensions; do
5497 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5498 ac_cv_prog_CC="${ac_tool_prefix}gcc"
5499 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5500 break 2
5501 fi
5502done
5503 done
5504IFS=$as_save_IFS
5505
5506fi
5507fi
5508CC=$ac_cv_prog_CC
5509if test -n "$CC"; then
5510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5511$as_echo "$CC" >&6; }
5512else
5513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5514$as_echo "no" >&6; }
5515fi
5516
5517
5518fi
5519if test -z "$ac_cv_prog_CC"; then
5520 ac_ct_CC=$CC
5521 # Extract the first word of "gcc", so it can be a program name with args.
5522set dummy gcc; ac_word=$2
5523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5524$as_echo_n "checking for $ac_word... " >&6; }
5525if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5526 $as_echo_n "(cached) " >&6
5527else
5528 if test -n "$ac_ct_CC"; then
5529 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5530else
5531as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5532for as_dir in $PATH
5533do
5534 IFS=$as_save_IFS
5535 test -z "$as_dir" && as_dir=.
5536 for ac_exec_ext in '' $ac_executable_extensions; do
5537 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5538 ac_cv_prog_ac_ct_CC="gcc"
5539 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5540 break 2
5541 fi
5542done
5543 done
5544IFS=$as_save_IFS
5545
5546fi
5547fi
5548ac_ct_CC=$ac_cv_prog_ac_ct_CC
5549if test -n "$ac_ct_CC"; then
5550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5551$as_echo "$ac_ct_CC" >&6; }
5552else
5553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5554$as_echo "no" >&6; }
5555fi
5556
5557 if test "x$ac_ct_CC" = x; then
5558 CC=""
5559 else
5560 case $cross_compiling:$ac_tool_warned in
5561yes:)
5562{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5563$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5564ac_tool_warned=yes ;;
5565esac
5566 CC=$ac_ct_CC
5567 fi
5568else
5569 CC="$ac_cv_prog_CC"
5570fi
5571
5572if test -z "$CC"; then
5573 if test -n "$ac_tool_prefix"; then
5574 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5575set dummy ${ac_tool_prefix}cc; ac_word=$2
5576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5577$as_echo_n "checking for $ac_word... " >&6; }
5578if test "${ac_cv_prog_CC+set}" = set; then :
5579 $as_echo_n "(cached) " >&6
5580else
5581 if test -n "$CC"; then
5582 ac_cv_prog_CC="$CC" # Let the user override the test.
5583else
5584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5585for as_dir in $PATH
5586do
5587 IFS=$as_save_IFS
5588 test -z "$as_dir" && as_dir=.
5589 for ac_exec_ext in '' $ac_executable_extensions; do
5590 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5591 ac_cv_prog_CC="${ac_tool_prefix}cc"
5592 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5593 break 2
5594 fi
5595done
5596 done
5597IFS=$as_save_IFS
5598
5599fi
5600fi
5601CC=$ac_cv_prog_CC
5602if test -n "$CC"; then
5603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5604$as_echo "$CC" >&6; }
5605else
5606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5607$as_echo "no" >&6; }
5608fi
5609
5610
5611 fi
5612fi
5613if test -z "$CC"; then
5614 # Extract the first word of "cc", so it can be a program name with args.
5615set dummy cc; ac_word=$2
5616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5617$as_echo_n "checking for $ac_word... " >&6; }
5618if test "${ac_cv_prog_CC+set}" = set; then :
5619 $as_echo_n "(cached) " >&6
5620else
5621 if test -n "$CC"; then
5622 ac_cv_prog_CC="$CC" # Let the user override the test.
5623else
5624 ac_prog_rejected=no
5625as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5626for as_dir in $PATH
5627do
5628 IFS=$as_save_IFS
5629 test -z "$as_dir" && as_dir=.
5630 for ac_exec_ext in '' $ac_executable_extensions; do
5631 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5632 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5633 ac_prog_rejected=yes
5634 continue
5635 fi
5636 ac_cv_prog_CC="cc"
5637 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5638 break 2
5639 fi
5640done
5641 done
5642IFS=$as_save_IFS
5643
5644if test $ac_prog_rejected = yes; then
5645 # We found a bogon in the path, so make sure we never use it.
5646 set dummy $ac_cv_prog_CC
5647 shift
5648 if test $# != 0; then
5649 # We chose a different compiler from the bogus one.
5650 # However, it has the same basename, so the bogon will be chosen
5651 # first if we set CC to just the basename; use the full file name.
5652 shift
5653 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
5654 fi
5655fi
5656fi
5657fi
5658CC=$ac_cv_prog_CC
5659if test -n "$CC"; then
5660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5661$as_echo "$CC" >&6; }
5662else
5663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5664$as_echo "no" >&6; }
5665fi
5666
5667
5668fi
5669if test -z "$CC"; then
5670 if test -n "$ac_tool_prefix"; then
5671 for ac_prog in cl.exe
5672 do
5673 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5674set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5676$as_echo_n "checking for $ac_word... " >&6; }
5677if test "${ac_cv_prog_CC+set}" = set; then :
5678 $as_echo_n "(cached) " >&6
5679else
5680 if test -n "$CC"; then
5681 ac_cv_prog_CC="$CC" # Let the user override the test.
5682else
5683as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5684for as_dir in $PATH
5685do
5686 IFS=$as_save_IFS
5687 test -z "$as_dir" && as_dir=.
5688 for ac_exec_ext in '' $ac_executable_extensions; do
5689 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5690 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5691 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5692 break 2
5693 fi
5694done
5695 done
5696IFS=$as_save_IFS
5697
5698fi
5699fi
5700CC=$ac_cv_prog_CC
5701if test -n "$CC"; then
5702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5703$as_echo "$CC" >&6; }
5704else
5705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5706$as_echo "no" >&6; }
5707fi
5708
5709
5710 test -n "$CC" && break
5711 done
5712fi
5713if test -z "$CC"; then
5714 ac_ct_CC=$CC
5715 for ac_prog in cl.exe
5716do
5717 # Extract the first word of "$ac_prog", so it can be a program name with args.
5718set dummy $ac_prog; ac_word=$2
5719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5720$as_echo_n "checking for $ac_word... " >&6; }
5721if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5722 $as_echo_n "(cached) " >&6
5723else
5724 if test -n "$ac_ct_CC"; then
5725 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5726else
5727as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5728for as_dir in $PATH
5729do
5730 IFS=$as_save_IFS
5731 test -z "$as_dir" && as_dir=.
5732 for ac_exec_ext in '' $ac_executable_extensions; do
5733 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5734 ac_cv_prog_ac_ct_CC="$ac_prog"
5735 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5736 break 2
5737 fi
5738done
5739 done
5740IFS=$as_save_IFS
5741
5742fi
5743fi
5744ac_ct_CC=$ac_cv_prog_ac_ct_CC
5745if test -n "$ac_ct_CC"; then
5746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5747$as_echo "$ac_ct_CC" >&6; }
5748else
5749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5750$as_echo "no" >&6; }
5751fi
5752
5753
5754 test -n "$ac_ct_CC" && break
5755done
5756
5757 if test "x$ac_ct_CC" = x; then
5758 CC=""
5759 else
5760 case $cross_compiling:$ac_tool_warned in
5761yes:)
5762{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5763$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5764ac_tool_warned=yes ;;
5765esac
5766 CC=$ac_ct_CC
5767 fi
5768fi
5769
5770fi
5771
5772
5773test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5774$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5775as_fn_error "no acceptable C compiler found in \$PATH
5776See \`config.log' for more details." "$LINENO" 5; }
5777
5778# Provide some information about the compiler.
5779$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5780set X $ac_compile
5781ac_compiler=$2
5782for ac_option in --version -v -V -qversion; do
5783 { { ac_try="$ac_compiler $ac_option >&5"
5784case "(($ac_try" in
5785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5786 *) ac_try_echo=$ac_try;;
5787esac
5788eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5789$as_echo "$ac_try_echo"; } >&5
5790 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5791 ac_status=$?
5792 if test -s conftest.err; then
5793 sed '10a\
5794... rest of stderr output deleted ...
5795 10q' conftest.err >conftest.er1
5796 cat conftest.er1 >&5
5797 rm -f conftest.er1 conftest.err
5798 fi
5799 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5800 test $ac_status = 0; }
5801done
5802
5803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5804$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
5805if test "${ac_cv_c_compiler_gnu+set}" = set; then :
5806 $as_echo_n "(cached) " >&6
5807else
5808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5809/* end confdefs.h. */
5810
5811int
5812main ()
5813{
5814#ifndef __GNUC__
5815 choke me
5816#endif
5817
5818 ;
5819 return 0;
5820}
5821_ACEOF
5822if ac_fn_c_try_compile "$LINENO"; then :
5823 ac_compiler_gnu=yes
5824else
5825 ac_compiler_gnu=no
5826fi
5827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5828ac_cv_c_compiler_gnu=$ac_compiler_gnu
5829
5830fi
5831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5832$as_echo "$ac_cv_c_compiler_gnu" >&6; }
5833if test $ac_compiler_gnu = yes; then
5834 GCC=yes
5835else
5836 GCC=
5837fi
5838ac_test_CFLAGS=${CFLAGS+set}
5839ac_save_CFLAGS=$CFLAGS
5840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5841$as_echo_n "checking whether $CC accepts -g... " >&6; }
5842if test "${ac_cv_prog_cc_g+set}" = set; then :
5843 $as_echo_n "(cached) " >&6
5844else
5845 ac_save_c_werror_flag=$ac_c_werror_flag
5846 ac_c_werror_flag=yes
5847 ac_cv_prog_cc_g=no
5848 CFLAGS="-g"
5849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5850/* end confdefs.h. */
5851
5852int
5853main ()
5854{
5855
5856 ;
5857 return 0;
5858}
5859_ACEOF
5860if ac_fn_c_try_compile "$LINENO"; then :
5861 ac_cv_prog_cc_g=yes
5862else
5863 CFLAGS=""
5864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5865/* end confdefs.h. */
5866
5867int
5868main ()
5869{
5870
5871 ;
5872 return 0;
5873}
5874_ACEOF
5875if ac_fn_c_try_compile "$LINENO"; then :
5876
5877else
5878 ac_c_werror_flag=$ac_save_c_werror_flag
5879 CFLAGS="-g"
5880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5881/* end confdefs.h. */
5882
5883int
5884main ()
5885{
5886
5887 ;
5888 return 0;
5889}
5890_ACEOF
5891if ac_fn_c_try_compile "$LINENO"; then :
5892 ac_cv_prog_cc_g=yes
5893fi
5894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5895fi
5896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5897fi
5898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5899 ac_c_werror_flag=$ac_save_c_werror_flag
5900fi
5901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5902$as_echo "$ac_cv_prog_cc_g" >&6; }
5903if test "$ac_test_CFLAGS" = set; then
5904 CFLAGS=$ac_save_CFLAGS
5905elif test $ac_cv_prog_cc_g = yes; then
5906 if test "$GCC" = yes; then
5907 CFLAGS="-g -O2"
5908 else
5909 CFLAGS="-g"
5910 fi
5911else
5912 if test "$GCC" = yes; then
5913 CFLAGS="-O2"
5914 else
5915 CFLAGS=
5916 fi
5917fi
5918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5919$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5920if test "${ac_cv_prog_cc_c89+set}" = set; then :
5921 $as_echo_n "(cached) " >&6
5922else
5923 ac_cv_prog_cc_c89=no
5924ac_save_CC=$CC
5925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5926/* end confdefs.h. */
5927#include <stdarg.h>
5928#include <stdio.h>
5929#include <sys/types.h>
5930#include <sys/stat.h>
5931/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5932struct buf { int x; };
5933FILE * (*rcsopen) (struct buf *, struct stat *, int);
5934static char *e (p, i)
5935 char **p;
5936 int i;
5937{
5938 return p[i];
5939}
5940static char *f (char * (*g) (char **, int), char **p, ...)
5941{
5942 char *s;
5943 va_list v;
5944 va_start (v,p);
5945 s = g (p, va_arg (v,int));
5946 va_end (v);
5947 return s;
5948}
5949
5950/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5951 function prototypes and stuff, but not '\xHH' hex character constants.
5952 These don't provoke an error unfortunately, instead are silently treated
5953 as 'x'. The following induces an error, until -std is added to get
5954 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5955 array size at least. It's necessary to write '\x00'==0 to get something
5956 that's true only with -std. */
5957int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5958
5959/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5960 inside strings and character constants. */
5961#define FOO(x) 'x'
5962int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5963
5964int test (int i, double x);
5965struct s1 {int (*f) (int a);};
5966struct s2 {int (*f) (double a);};
5967int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5968int argc;
5969char **argv;
5970int
5971main ()
5972{
5973return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5974 ;
5975 return 0;
5976}
5977_ACEOF
5978for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5979 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5980do
5981 CC="$ac_save_CC $ac_arg"
5982 if ac_fn_c_try_compile "$LINENO"; then :
5983 ac_cv_prog_cc_c89=$ac_arg
5984fi
5985rm -f core conftest.err conftest.$ac_objext
5986 test "x$ac_cv_prog_cc_c89" != "xno" && break
5987done
5988rm -f conftest.$ac_ext
5989CC=$ac_save_CC
5990
5991fi
5992# AC_CACHE_VAL
5993case "x$ac_cv_prog_cc_c89" in
5994 x)
5995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5996$as_echo "none needed" >&6; } ;;
5997 xno)
5998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5999$as_echo "unsupported" >&6; } ;;
6000 *)
6001 CC="$CC $ac_cv_prog_cc_c89"
6002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6003$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6004esac
6005if test "x$ac_cv_prog_cc_c89" != xno; then :
6006
6007fi
6008
6009ac_ext=c
6010ac_cpp='$CPP $CPPFLAGS'
6011ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6012ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6013ac_compiler_gnu=$ac_cv_c_compiler_gnu
6014
6015
6016am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
6017
6018
6019ac_aux_dir=
6020for ac_dir in ../.. "$srcdir"/../..; do
6021 for ac_t in install-sh install.sh shtool; do
6022 if test -f "$ac_dir/$ac_t"; then
6023 ac_aux_dir=$ac_dir
6024 ac_install_sh="$ac_aux_dir/$ac_t -c"
6025 break 2
6026 fi
6027 done
6028done
6029if test -z "$ac_aux_dir"; then
6030 as_fn_error "cannot find install-sh, install.sh, or shtool in ../.. \"$srcdir\"/../.." "$LINENO" 5
6031fi
6032
6033# These three variables are undocumented and unsupported,
6034# and are intended to be withdrawn in a future Autoconf release.
6035# They can cause serious problems if a builder's source tree is in a directory
6036# whose full name contains unusual characters.
6037ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
6038ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
6039ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
6040
6041
6042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6043$as_echo_n "checking target system type... " >&6; }
6044if test "${ac_cv_target+set}" = set; then :
6045 $as_echo_n "(cached) " >&6
6046else
6047 if test "x$target_alias" = x; then
6048 ac_cv_target=$ac_cv_host
6049else
6050 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6051 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6052fi
6053
6054fi
6055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6056$as_echo "$ac_cv_target" >&6; }
6057case $ac_cv_target in
6058*-*-*) ;;
6059*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
6060esac
6061target=$ac_cv_target
6062ac_save_IFS=$IFS; IFS='-'
6063set x $ac_cv_target
6064shift
6065target_cpu=$1
6066target_vendor=$2
6067shift; shift
6068# Remember, the first character of IFS is used to create $*,
6069# except with old shells:
6070target_os=$*
6071IFS=$ac_save_IFS
6072case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6073
6074
6075# The aliases save the names the user supplied, while $host etc.
6076# will get canonicalized.
6077test -n "$target_alias" &&
6078 test "$program_prefix$program_suffix$program_transform_name" = \
6079 NONENONEs,x,x, &&
6080 program_prefix=${target_alias}-
6081
6082
6083
6084
6085
6086
6087
6088 LIBC_FATAL_STDERR_=1
6089 export LIBC_FATAL_STDERR_
6090
8690e634
JK
6091# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6092# for constant arguments. Useless!
6093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
6094$as_echo_n "checking for working alloca.h... " >&6; }
6095if test "${ac_cv_working_alloca_h+set}" = set; then :
c971b7fa
PA
6096 $as_echo_n "(cached) " >&6
6097else
8690e634 6098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 6099/* end confdefs.h. */
8690e634 6100#include <alloca.h>
c971b7fa
PA
6101int
6102main ()
6103{
8690e634
JK
6104char *p = (char *) alloca (2 * sizeof (int));
6105 if (p) return 0;
c971b7fa
PA
6106 ;
6107 return 0;
6108}
c971b7fa
PA
6109_ACEOF
6110if ac_fn_c_try_link "$LINENO"; then :
8690e634 6111 ac_cv_working_alloca_h=yes
c971b7fa 6112else
8690e634 6113 ac_cv_working_alloca_h=no
c971b7fa
PA
6114fi
6115rm -f core conftest.err conftest.$ac_objext \
6116 conftest$ac_exeext conftest.$ac_ext
c971b7fa 6117fi
8690e634
JK
6118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
6119$as_echo "$ac_cv_working_alloca_h" >&6; }
6120if test $ac_cv_working_alloca_h = yes; then
c971b7fa 6121
8690e634 6122$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c971b7fa 6123
8690e634 6124fi
c971b7fa 6125
8690e634
JK
6126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
6127$as_echo_n "checking for alloca... " >&6; }
6128if test "${ac_cv_func_alloca_works+set}" = set; then :
c971b7fa 6129 $as_echo_n "(cached) " >&6
c971b7fa
PA
6130else
6131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6132/* end confdefs.h. */
8690e634
JK
6133#ifdef __GNUC__
6134# define alloca __builtin_alloca
6135#else
6136# ifdef _MSC_VER
6137# include <malloc.h>
6138# define alloca _alloca
6139# else
6140# ifdef HAVE_ALLOCA_H
6141# include <alloca.h>
6142# else
6143# ifdef _AIX
6144 #pragma alloca
6145# else
6146# ifndef alloca /* predefined by HP cc +Olibcalls */
6147char *alloca ();
6148# endif
6149# endif
6150# endif
6151# endif
6152#endif
6153
c971b7fa
PA
6154int
6155main ()
6156{
8690e634
JK
6157char *p = (char *) alloca (1);
6158 if (p) return 0;
c971b7fa
PA
6159 ;
6160 return 0;
6161}
6162_ACEOF
8690e634
JK
6163if ac_fn_c_try_link "$LINENO"; then :
6164 ac_cv_func_alloca_works=yes
c971b7fa 6165else
8690e634 6166 ac_cv_func_alloca_works=no
c971b7fa 6167fi
8690e634
JK
6168rm -f core conftest.err conftest.$ac_objext \
6169 conftest$ac_exeext conftest.$ac_ext
c971b7fa 6170fi
a143c6de
JB
6171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
6172$as_echo "$ac_cv_func_alloca_works" >&6; }
c971b7fa 6173
a143c6de 6174if test $ac_cv_func_alloca_works = yes; then
c971b7fa 6175
a143c6de 6176$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c971b7fa 6177
a143c6de
JB
6178else
6179 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6180# that cause trouble. Some versions do not even contain alloca or
6181# contain a buggy version. If you still want to use their alloca,
6182# use ar to extract alloca.o from them instead of compiling alloca.c.
c971b7fa
PA
6183
6184
6185
6186
6187
a143c6de 6188ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
c971b7fa 6189
a143c6de 6190$as_echo "#define C_ALLOCA 1" >>confdefs.h
c971b7fa 6191
c971b7fa 6192
a143c6de
JB
6193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'alloca.c' needs Cray hooks" >&5
6194$as_echo_n "checking whether 'alloca.c' needs Cray hooks... " >&6; }
6195if test "${ac_cv_os_cray+set}" = set; then :
8690e634
JK
6196 $as_echo_n "(cached) " >&6
6197else
a143c6de 6198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 6199/* end confdefs.h. */
a143c6de
JB
6200#if defined CRAY && ! defined CRAY2
6201webecray
6202#else
6203wenotbecray
8690e634 6204#endif
c971b7fa 6205
8690e634
JK
6206_ACEOF
6207if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
a143c6de
JB
6208 $EGREP "webecray" >/dev/null 2>&1; then :
6209 ac_cv_os_cray=yes
8690e634 6210else
a143c6de 6211 ac_cv_os_cray=no
8690e634
JK
6212fi
6213rm -f conftest*
c971b7fa 6214
c0fc7f8b 6215fi
a143c6de
JB
6216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
6217$as_echo "$ac_cv_os_cray" >&6; }
6218if test $ac_cv_os_cray = yes; then
6219 for ac_func in _getb67 GETB67 getb67; do
6220 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6221ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6222eval as_val=\$$as_ac_var
6223 if test "x$as_val" = x""yes; then :
c0fc7f8b 6224
a143c6de
JB
6225cat >>confdefs.h <<_ACEOF
6226#define CRAY_STACKSEG_END $ac_func
6227_ACEOF
c971b7fa 6228
a143c6de 6229 break
8690e634 6230fi
c971b7fa 6231
a143c6de 6232 done
8690e634 6233fi
c0fc7f8b 6234
a143c6de
JB
6235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
6236$as_echo_n "checking stack direction for C alloca... " >&6; }
6237if test "${ac_cv_c_stack_direction+set}" = set; then :
c971b7fa
PA
6238 $as_echo_n "(cached) " >&6
6239else
a143c6de
JB
6240 if test "$cross_compiling" = yes; then :
6241 ac_cv_c_stack_direction=0
6242else
6243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 6244/* end confdefs.h. */
a143c6de
JB
6245$ac_includes_default
6246int
6247find_stack_direction (int *addr, int depth)
6248{
6249 int dir, dummy = 0;
6250 if (! addr)
6251 addr = &dummy;
6252 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
6253 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
6254 return dir + dummy;
6255}
8690e634 6256
a143c6de
JB
6257int
6258main (int argc, char **argv)
6259{
6260 return find_stack_direction (0, argc + !argv + 20) < 0;
6261}
c971b7fa 6262_ACEOF
a143c6de
JB
6263if ac_fn_c_try_run "$LINENO"; then :
6264 ac_cv_c_stack_direction=1
c971b7fa 6265else
a143c6de 6266 ac_cv_c_stack_direction=-1
8690e634 6267fi
a143c6de
JB
6268rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6269 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 6270fi
c971b7fa
PA
6271
6272fi
a143c6de
JB
6273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
6274$as_echo "$ac_cv_c_stack_direction" >&6; }
6275cat >>confdefs.h <<_ACEOF
6276#define STACK_DIRECTION $ac_cv_c_stack_direction
6277_ACEOF
8690e634 6278
c971b7fa
PA
6279
6280fi
c971b7fa
PA
6281
6282
98399780
YQ
6283 GNULIB__EXIT=0;
6284 GNULIB_ATOLL=0;
6285 GNULIB_CALLOC_POSIX=0;
6286 GNULIB_CANONICALIZE_FILE_NAME=0;
6287 GNULIB_GETLOADAVG=0;
6288 GNULIB_GETSUBOPT=0;
6289 GNULIB_GRANTPT=0;
6290 GNULIB_MALLOC_POSIX=0;
6291 GNULIB_MBTOWC=0;
6292 GNULIB_MKDTEMP=0;
6293 GNULIB_MKOSTEMP=0;
6294 GNULIB_MKOSTEMPS=0;
6295 GNULIB_MKSTEMP=0;
6296 GNULIB_MKSTEMPS=0;
6297 GNULIB_POSIX_OPENPT=0;
6298 GNULIB_PTSNAME=0;
6299 GNULIB_PTSNAME_R=0;
6300 GNULIB_PUTENV=0;
4a626d0a 6301 GNULIB_QSORT_R=0;
98399780
YQ
6302 GNULIB_RANDOM=0;
6303 GNULIB_RANDOM_R=0;
6304 GNULIB_REALLOC_POSIX=0;
6305 GNULIB_REALPATH=0;
6306 GNULIB_RPMATCH=0;
4a626d0a 6307 GNULIB_SECURE_GETENV=0;
98399780
YQ
6308 GNULIB_SETENV=0;
6309 GNULIB_STRTOD=0;
6310 GNULIB_STRTOLL=0;
6311 GNULIB_STRTOULL=0;
6312 GNULIB_SYSTEM_POSIX=0;
6313 GNULIB_UNLOCKPT=0;
6314 GNULIB_UNSETENV=0;
6315 GNULIB_WCTOMB=0;
6316 HAVE__EXIT=1;
6317 HAVE_ATOLL=1;
6318 HAVE_CANONICALIZE_FILE_NAME=1;
6319 HAVE_DECL_GETLOADAVG=1;
6320 HAVE_GETSUBOPT=1;
6321 HAVE_GRANTPT=1;
6322 HAVE_MKDTEMP=1;
6323 HAVE_MKOSTEMP=1;
6324 HAVE_MKOSTEMPS=1;
6325 HAVE_MKSTEMP=1;
6326 HAVE_MKSTEMPS=1;
6327 HAVE_POSIX_OPENPT=1;
6328 HAVE_PTSNAME=1;
6329 HAVE_PTSNAME_R=1;
4c62b19f 6330 HAVE_QSORT_R=1;
98399780
YQ
6331 HAVE_RANDOM=1;
6332 HAVE_RANDOM_H=1;
6333 HAVE_RANDOM_R=1;
6334 HAVE_REALPATH=1;
6335 HAVE_RPMATCH=1;
4a626d0a 6336 HAVE_SECURE_GETENV=1;
98399780
YQ
6337 HAVE_SETENV=1;
6338 HAVE_DECL_SETENV=1;
6339 HAVE_STRTOD=1;
6340 HAVE_STRTOLL=1;
6341 HAVE_STRTOULL=1;
6342 HAVE_STRUCT_RANDOM_DATA=1;
6343 HAVE_SYS_LOADAVG_H=0;
6344 HAVE_UNLOCKPT=1;
6345 HAVE_DECL_UNSETENV=1;
6346 REPLACE_CALLOC=0;
6347 REPLACE_CANONICALIZE_FILE_NAME=0;
6348 REPLACE_MALLOC=0;
6349 REPLACE_MBTOWC=0;
6350 REPLACE_MKSTEMP=0;
6351 REPLACE_PTSNAME=0;
6352 REPLACE_PTSNAME_R=0;
6353 REPLACE_PUTENV=0;
4a626d0a 6354 REPLACE_QSORT_R=0;
98399780
YQ
6355 REPLACE_RANDOM_R=0;
6356 REPLACE_REALLOC=0;
6357 REPLACE_REALPATH=0;
6358 REPLACE_SETENV=0;
6359 REPLACE_STRTOD=0;
6360 REPLACE_UNSETENV=0;
6361 REPLACE_WCTOMB=0;
6362
6363
6364
6365
6366 for ac_func in $ac_func_list
6367do :
6368 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6369ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6370eval as_val=\$$as_ac_var
6371 if test "x$as_val" = x""yes; then :
6372 cat >>confdefs.h <<_ACEOF
6373#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6374_ACEOF
6375
6376fi
6377done
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
6388$as_echo_n "checking whether // is distinct from /... " >&6; }
6389if test "${gl_cv_double_slash_root+set}" = set; then :
6390 $as_echo_n "(cached) " >&6
6391else
6392 if test x"$cross_compiling" = xyes ; then
6393 # When cross-compiling, there is no way to tell whether // is special
6394 # short of a list of hosts. However, the only known hosts to date
6395 # that have a distinct // are Apollo DomainOS (too old to port to),
6396 # Cygwin, and z/OS. If anyone knows of another system for which // has
6397 # special semantics and is distinct from /, please report it to
6398 # <bug-gnulib@gnu.org>.
6399 case $host in
6400 *-cygwin | i370-ibm-openedition)
6401 gl_cv_double_slash_root=yes ;;
6402 *)
6403 # Be optimistic and assume that / and // are the same when we
6404 # don't know.
6405 gl_cv_double_slash_root='unknown, assuming no' ;;
6406 esac
6407 else
6408 set x `ls -di / // 2>/dev/null`
6409 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
6410 gl_cv_double_slash_root=no
6411 else
6412 gl_cv_double_slash_root=yes
6413 fi
6414 fi
6415fi
6416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
6417$as_echo "$gl_cv_double_slash_root" >&6; }
6418 if test "$gl_cv_double_slash_root" = yes; then
6419
6420$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
6421
6422 fi
6423
6424
6425
6426
6427
6428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
6429$as_echo_n "checking whether realpath works... " >&6; }
6430if test "${gl_cv_func_realpath_works+set}" = set; then :
6431 $as_echo_n "(cached) " >&6
6432else
6433
6434 touch conftest.a
6435 mkdir conftest.d
6436 if test "$cross_compiling" = yes; then :
6437 case "$host_os" in
6438 # Guess yes on glibc systems.
6439 *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
6440 # If we don't know, assume the worst.
6441 *) gl_cv_func_realpath_works="guessing no" ;;
6442 esac
6443
6444else
6445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6446/* end confdefs.h. */
6447
6448
6449
6450#include <stdlib.h>
6451#if defined __MACH__ && defined __APPLE__
6452/* Avoid a crash on Mac OS X. */
6453#include <mach/mach.h>
6454#include <mach/mach_error.h>
6455#include <mach/thread_status.h>
6456#include <mach/exception.h>
6457#include <mach/task.h>
6458#include <pthread.h>
6459/* The exception port on which our thread listens. */
6460static mach_port_t our_exception_port;
6461/* The main function of the thread listening for exceptions of type
6462 EXC_BAD_ACCESS. */
6463static void *
6464mach_exception_thread (void *arg)
6465{
6466 /* Buffer for a message to be received. */
6467 struct {
6468 mach_msg_header_t head;
6469 mach_msg_body_t msgh_body;
6470 char data[1024];
6471 } msg;
6472 mach_msg_return_t retval;
6473 /* Wait for a message on the exception port. */
6474 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
6475 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
6476 if (retval != MACH_MSG_SUCCESS)
6477 abort ();
6478 exit (1);
6479}
6480static void
6481nocrash_init (void)
6482{
6483 mach_port_t self = mach_task_self ();
6484 /* Allocate a port on which the thread shall listen for exceptions. */
6485 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
6486 == KERN_SUCCESS) {
6487 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
6488 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
6489 MACH_MSG_TYPE_MAKE_SEND)
6490 == KERN_SUCCESS) {
6491 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
6492 for us. */
6493 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
6494 /* Create the thread listening on the exception port. */
6495 pthread_attr_t attr;
6496 pthread_t thread;
6497 if (pthread_attr_init (&attr) == 0
6498 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
6499 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
6500 pthread_attr_destroy (&attr);
6501 /* Replace the exception port info for these exceptions with our own.
6502 Note that we replace the exception port for the entire task, not only
6503 for a particular thread. This has the effect that when our exception
6504 port gets the message, the thread specific exception port has already
6505 been asked, and we don't need to bother about it.
6506 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
6507 task_set_exception_ports (self, mask, our_exception_port,
6508 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
6509 }
6510 }
6511 }
6512}
6513#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6514/* Avoid a crash on native Windows. */
6515#define WIN32_LEAN_AND_MEAN
6516#include <windows.h>
6517#include <winerror.h>
6518static LONG WINAPI
6519exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
6520{
6521 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
6522 {
6523 case EXCEPTION_ACCESS_VIOLATION:
6524 case EXCEPTION_IN_PAGE_ERROR:
6525 case EXCEPTION_STACK_OVERFLOW:
6526 case EXCEPTION_GUARD_PAGE:
6527 case EXCEPTION_PRIV_INSTRUCTION:
6528 case EXCEPTION_ILLEGAL_INSTRUCTION:
6529 case EXCEPTION_DATATYPE_MISALIGNMENT:
6530 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
6531 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
6532 exit (1);
6533 }
6534 return EXCEPTION_CONTINUE_SEARCH;
6535}
6536static void
6537nocrash_init (void)
6538{
6539 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
6540}
6541#else
6542/* Avoid a crash on POSIX systems. */
6543#include <signal.h>
49e4877c 6544#include <unistd.h>
98399780
YQ
6545/* A POSIX signal handler. */
6546static void
6547exception_handler (int sig)
6548{
49e4877c 6549 _exit (1);
98399780
YQ
6550}
6551static void
6552nocrash_init (void)
6553{
6554#ifdef SIGSEGV
6555 signal (SIGSEGV, exception_handler);
6556#endif
6557#ifdef SIGBUS
6558 signal (SIGBUS, exception_handler);
6559#endif
6560}
6561#endif
6562
6563 #include <stdlib.h>
6564 #include <string.h>
6565
6566int
6567main ()
6568{
6569
6570 int result = 0;
6571 {
6572 char *name = realpath ("conftest.a", NULL);
6573 if (!(name && *name == '/'))
6574 result |= 1;
49e4877c 6575 free (name);
98399780
YQ
6576 }
6577 {
6578 char *name = realpath ("conftest.b/../conftest.a", NULL);
6579 if (name != NULL)
6580 result |= 2;
49e4877c 6581 free (name);
98399780
YQ
6582 }
6583 {
6584 char *name = realpath ("conftest.a/", NULL);
6585 if (name != NULL)
6586 result |= 4;
49e4877c 6587 free (name);
98399780
YQ
6588 }
6589 {
6590 char *name1 = realpath (".", NULL);
6591 char *name2 = realpath ("conftest.d//./..", NULL);
49e4877c 6592 if (! name1 || ! name2 || strcmp (name1, name2))
98399780 6593 result |= 8;
49e4877c
PA
6594 free (name1);
6595 free (name2);
98399780
YQ
6596 }
6597 return result;
6598
6599 ;
6600 return 0;
6601}
6602
6603_ACEOF
6604if ac_fn_c_try_run "$LINENO"; then :
6605 gl_cv_func_realpath_works=yes
6606else
6607 gl_cv_func_realpath_works=no
6608fi
6609rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6610 conftest.$ac_objext conftest.beam conftest.$ac_ext
6611fi
6612
6613 rm -rf conftest.a conftest.d
6614
6615fi
6616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
6617$as_echo "$gl_cv_func_realpath_works" >&6; }
6618 case "$gl_cv_func_realpath_works" in
6619 *yes)
6620
6621$as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
6622
6623 ;;
6624 esac
6625
6626
6627
6628
6629 for ac_header in $ac_header_list
6630do :
6631 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6632ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6633"
6634eval as_val=\$$as_ac_Header
6635 if test "x$as_val" = x""yes; then :
6636 cat >>confdefs.h <<_ACEOF
6637#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6638_ACEOF
6639
6640fi
6641
6642done
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
e26b6bb0
TT
6654 GNULIB_CHDIR=0;
6655 GNULIB_CHOWN=0;
6656 GNULIB_CLOSE=0;
6657 GNULIB_DUP=0;
6658 GNULIB_DUP2=0;
6659 GNULIB_DUP3=0;
6660 GNULIB_ENVIRON=0;
6661 GNULIB_EUIDACCESS=0;
6662 GNULIB_FACCESSAT=0;
6663 GNULIB_FCHDIR=0;
6664 GNULIB_FCHOWNAT=0;
6665 GNULIB_FDATASYNC=0;
6666 GNULIB_FSYNC=0;
6667 GNULIB_FTRUNCATE=0;
6668 GNULIB_GETCWD=0;
6669 GNULIB_GETDOMAINNAME=0;
6670 GNULIB_GETDTABLESIZE=0;
6671 GNULIB_GETGROUPS=0;
6672 GNULIB_GETHOSTNAME=0;
6673 GNULIB_GETLOGIN=0;
6674 GNULIB_GETLOGIN_R=0;
6675 GNULIB_GETPAGESIZE=0;
6676 GNULIB_GETUSERSHELL=0;
6677 GNULIB_GROUP_MEMBER=0;
6678 GNULIB_ISATTY=0;
6679 GNULIB_LCHOWN=0;
6680 GNULIB_LINK=0;
6681 GNULIB_LINKAT=0;
6682 GNULIB_LSEEK=0;
6683 GNULIB_PIPE=0;
6684 GNULIB_PIPE2=0;
6685 GNULIB_PREAD=0;
6686 GNULIB_PWRITE=0;
6687 GNULIB_READ=0;
6688 GNULIB_READLINK=0;
6689 GNULIB_READLINKAT=0;
6690 GNULIB_RMDIR=0;
6691 GNULIB_SETHOSTNAME=0;
6692 GNULIB_SLEEP=0;
6693 GNULIB_SYMLINK=0;
6694 GNULIB_SYMLINKAT=0;
6695 GNULIB_TTYNAME_R=0;
6696 GNULIB_UNISTD_H_NONBLOCKING=0;
6697 GNULIB_UNISTD_H_SIGPIPE=0;
6698 GNULIB_UNLINK=0;
6699 GNULIB_UNLINKAT=0;
6700 GNULIB_USLEEP=0;
6701 GNULIB_WRITE=0;
6702 HAVE_CHOWN=1;
6703 HAVE_DUP2=1;
6704 HAVE_DUP3=1;
6705 HAVE_EUIDACCESS=1;
6706 HAVE_FACCESSAT=1;
6707 HAVE_FCHDIR=1;
6708 HAVE_FCHOWNAT=1;
6709 HAVE_FDATASYNC=1;
6710 HAVE_FSYNC=1;
6711 HAVE_FTRUNCATE=1;
6712 HAVE_GETDTABLESIZE=1;
6713 HAVE_GETGROUPS=1;
6714 HAVE_GETHOSTNAME=1;
6715 HAVE_GETLOGIN=1;
6716 HAVE_GETPAGESIZE=1;
6717 HAVE_GROUP_MEMBER=1;
6718 HAVE_LCHOWN=1;
6719 HAVE_LINK=1;
6720 HAVE_LINKAT=1;
6721 HAVE_PIPE=1;
6722 HAVE_PIPE2=1;
6723 HAVE_PREAD=1;
6724 HAVE_PWRITE=1;
6725 HAVE_READLINK=1;
6726 HAVE_READLINKAT=1;
6727 HAVE_SETHOSTNAME=1;
6728 HAVE_SLEEP=1;
6729 HAVE_SYMLINK=1;
6730 HAVE_SYMLINKAT=1;
6731 HAVE_UNLINKAT=1;
6732 HAVE_USLEEP=1;
6733 HAVE_DECL_ENVIRON=1;
6734 HAVE_DECL_FCHDIR=1;
6735 HAVE_DECL_FDATASYNC=1;
6736 HAVE_DECL_GETDOMAINNAME=1;
6737 HAVE_DECL_GETLOGIN_R=1;
6738 HAVE_DECL_GETPAGESIZE=1;
6739 HAVE_DECL_GETUSERSHELL=1;
6740 HAVE_DECL_SETHOSTNAME=1;
6741 HAVE_DECL_TTYNAME_R=1;
6742 HAVE_OS_H=0;
6743 HAVE_SYS_PARAM_H=0;
6744 REPLACE_CHOWN=0;
6745 REPLACE_CLOSE=0;
6746 REPLACE_DUP=0;
6747 REPLACE_DUP2=0;
6748 REPLACE_FCHOWNAT=0;
6749 REPLACE_FTRUNCATE=0;
6750 REPLACE_GETCWD=0;
6751 REPLACE_GETDOMAINNAME=0;
4a626d0a 6752 REPLACE_GETDTABLESIZE=0;
e26b6bb0
TT
6753 REPLACE_GETLOGIN_R=0;
6754 REPLACE_GETGROUPS=0;
6755 REPLACE_GETPAGESIZE=0;
6756 REPLACE_ISATTY=0;
6757 REPLACE_LCHOWN=0;
6758 REPLACE_LINK=0;
6759 REPLACE_LINKAT=0;
6760 REPLACE_LSEEK=0;
6761 REPLACE_PREAD=0;
6762 REPLACE_PWRITE=0;
6763 REPLACE_READ=0;
6764 REPLACE_READLINK=0;
4a626d0a 6765 REPLACE_READLINKAT=0;
e26b6bb0
TT
6766 REPLACE_RMDIR=0;
6767 REPLACE_SLEEP=0;
6768 REPLACE_SYMLINK=0;
4a626d0a 6769 REPLACE_SYMLINKAT=0;
e26b6bb0
TT
6770 REPLACE_TTYNAME_R=0;
6771 REPLACE_UNLINK=0;
6772 REPLACE_UNLINKAT=0;
6773 REPLACE_USLEEP=0;
6774 REPLACE_WRITE=0;
6775 UNISTD_H_HAVE_WINSOCK2_H=0;
6776 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
6777
6778
6779
6ec2e0f5
SDJ
6780
6781
6782
6783
6784
6785
6786
6787
6788 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
6789 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
6790
6791$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
6792
6793 else
6794 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
6795 fi
6796
6797
6798
6799
6800
6801
6802
e26b6bb0
TT
6803 GNULIB_OPENDIR=0;
6804 GNULIB_READDIR=0;
6805 GNULIB_REWINDDIR=0;
6806 GNULIB_CLOSEDIR=0;
6807 GNULIB_DIRFD=0;
6808 GNULIB_FDOPENDIR=0;
6809 GNULIB_SCANDIR=0;
6810 GNULIB_ALPHASORT=0;
6811 HAVE_OPENDIR=1;
6812 HAVE_READDIR=1;
6813 HAVE_REWINDDIR=1;
6814 HAVE_CLOSEDIR=1;
6815 HAVE_DECL_DIRFD=1;
6816 HAVE_DECL_FDOPENDIR=1;
6817 HAVE_FDOPENDIR=1;
6818 HAVE_SCANDIR=1;
6819 HAVE_ALPHASORT=1;
6820 REPLACE_OPENDIR=0;
6821 REPLACE_CLOSEDIR=0;
6822 REPLACE_DIRFD=0;
6823 REPLACE_FDOPENDIR=0;
6824
6825
6826
6827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
6828$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
6829if test "${gl_cv_have_include_next+set}" = set; then :
6830 $as_echo_n "(cached) " >&6
6831else
6832 rm -rf conftestd1a conftestd1b conftestd2
6833 mkdir conftestd1a conftestd1b conftestd2
6834 cat <<EOF > conftestd1a/conftest.h
6835#define DEFINED_IN_CONFTESTD1
6836#include_next <conftest.h>
6837#ifdef DEFINED_IN_CONFTESTD2
6838int foo;
6839#else
88b48903
WN
6840#error "include_next doesn't work"
6841#endif
6842EOF
6843 cat <<EOF > conftestd1b/conftest.h
6844#define DEFINED_IN_CONFTESTD1
6845#include <stdio.h>
6846#include_next <conftest.h>
6847#ifdef DEFINED_IN_CONFTESTD2
6848int foo;
6849#else
6850#error "include_next doesn't work"
6851#endif
6852EOF
6853 cat <<EOF > conftestd2/conftest.h
6854#ifndef DEFINED_IN_CONFTESTD1
6855#error "include_next test doesn't work"
6856#endif
6857#define DEFINED_IN_CONFTESTD2
6858EOF
6859 gl_save_CPPFLAGS="$CPPFLAGS"
6860 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
6861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6862/* end confdefs.h. */
6863#include <conftest.h>
6864_ACEOF
6865if ac_fn_c_try_compile "$LINENO"; then :
6866 gl_cv_have_include_next=yes
6867else
6868 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
6869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6870/* end confdefs.h. */
6871#include <conftest.h>
6872_ACEOF
6873if ac_fn_c_try_compile "$LINENO"; then :
6874 gl_cv_have_include_next=buggy
6875else
6876 gl_cv_have_include_next=no
6877fi
6878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6879
6880fi
6881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6882 CPPFLAGS="$gl_save_CPPFLAGS"
6883 rm -rf conftestd1a conftestd1b conftestd2
6884
6885fi
6886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
6887$as_echo "$gl_cv_have_include_next" >&6; }
6888 PRAGMA_SYSTEM_HEADER=
6889 if test $gl_cv_have_include_next = yes; then
6890 INCLUDE_NEXT=include_next
6891 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
6892 if test -n "$GCC"; then
6893 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
6894 fi
6895 else
6896 if test $gl_cv_have_include_next = buggy; then
6897 INCLUDE_NEXT=include
6898 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
6899 else
6900 INCLUDE_NEXT=include
6901 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
6902 fi
6903 fi
6904
6905
6906
6907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
6908$as_echo_n "checking whether system header files limit the line length... " >&6; }
6909if test "${gl_cv_pragma_columns+set}" = set; then :
6910 $as_echo_n "(cached) " >&6
6911else
6912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6913/* end confdefs.h. */
6914
6915#ifdef __TANDEM
6916choke me
6917#endif
6918
6919_ACEOF
6920if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6921 $EGREP "choke me" >/dev/null 2>&1; then :
6922 gl_cv_pragma_columns=yes
6923else
6924 gl_cv_pragma_columns=no
6925fi
6926rm -f conftest*
6927
6928
6929fi
6930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
6931$as_echo "$gl_cv_pragma_columns" >&6; }
6932 if test $gl_cv_pragma_columns = yes; then
6933 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
6934 else
6935 PRAGMA_COLUMNS=
6936 fi
6937
6938
6939
6940
e26b6bb0 6941
e26b6bb0 6942
3d99e817
AK
6943
6944
6945
6946
6947
3d99e817
AK
6948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
6949$as_echo_n "checking if environ is properly declared... " >&6; }
6950 if test "${gt_cv_var_environ_declaration+set}" = set; then :
6951 $as_echo_n "(cached) " >&6
6952else
6953
6954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6955/* end confdefs.h. */
6956#if HAVE_UNISTD_H
6957 #include <unistd.h>
6958 #endif
6959 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
6960 #include <stdlib.h>
6961
6962 extern struct { int foo; } environ;
6963int
6964main ()
6965{
6966environ.foo = 1;
6967 ;
6968 return 0;
6969}
6970_ACEOF
6971if ac_fn_c_try_compile "$LINENO"; then :
6972 gt_cv_var_environ_declaration=no
6973else
6974 gt_cv_var_environ_declaration=yes
6975fi
6976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6977fi
6978
6979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
6980$as_echo "$gt_cv_var_environ_declaration" >&6; }
6981 if test $gt_cv_var_environ_declaration = yes; then
6982
6983$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
6984
6985 fi
6986
6987
6988 if test $gt_cv_var_environ_declaration != yes; then
6989 HAVE_DECL_ENVIRON=0
6990 fi
6991
6992
6993
18848e28
GF
6994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
6995$as_echo_n "checking for complete errno.h... " >&6; }
6996if test "${gl_cv_header_errno_h_complete+set}" = set; then :
6997 $as_echo_n "(cached) " >&6
6998else
6999
7000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7001/* end confdefs.h. */
7002
7003#include <errno.h>
7004#if !defined ETXTBSY
7005booboo
7006#endif
7007#if !defined ENOMSG
7008booboo
7009#endif
7010#if !defined EIDRM
7011booboo
7012#endif
7013#if !defined ENOLINK
7014booboo
7015#endif
7016#if !defined EPROTO
7017booboo
7018#endif
7019#if !defined EMULTIHOP
7020booboo
7021#endif
7022#if !defined EBADMSG
7023booboo
7024#endif
7025#if !defined EOVERFLOW
7026booboo
7027#endif
7028#if !defined ENOTSUP
7029booboo
7030#endif
7031#if !defined ENETRESET
7032booboo
7033#endif
7034#if !defined ECONNABORTED
7035booboo
7036#endif
7037#if !defined ESTALE
7038booboo
7039#endif
7040#if !defined EDQUOT
7041booboo
7042#endif
7043#if !defined ECANCELED
7044booboo
7045#endif
7046#if !defined EOWNERDEAD
7047booboo
7048#endif
7049#if !defined ENOTRECOVERABLE
7050booboo
7051#endif
7052#if !defined EILSEQ
7053booboo
7054#endif
7055
7056_ACEOF
7057if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7058 $EGREP "booboo" >/dev/null 2>&1; then :
7059 gl_cv_header_errno_h_complete=no
7060else
7061 gl_cv_header_errno_h_complete=yes
7062fi
7063rm -f conftest*
7064
7065
7066fi
7067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
7068$as_echo "$gl_cv_header_errno_h_complete" >&6; }
7069 if test $gl_cv_header_errno_h_complete = yes; then
7070 ERRNO_H=''
7071 else
7072
7073
7074
7075
7076
7077
7078
7079
7080 if test $gl_cv_have_include_next = yes; then
7081 gl_cv_next_errno_h='<'errno.h'>'
7082 else
7083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
7084$as_echo_n "checking absolute name of <errno.h>... " >&6; }
7085if test "${gl_cv_next_errno_h+set}" = set; then :
7086 $as_echo_n "(cached) " >&6
7087else
7088
4a626d0a
PA
7089
7090
7091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18848e28
GF
7092/* end confdefs.h. */
7093#include <errno.h>
18848e28 7094_ACEOF
4a626d0a
PA
7095 case "$host_os" in
7096 aix*) gl_absname_cpp="$ac_cpp -C" ;;
7097 *) gl_absname_cpp="$ac_cpp" ;;
7098 esac
18848e28 7099
4a626d0a
PA
7100 case "$host_os" in
7101 mingw*)
7102 gl_dirsep_regex='[/\\]'
7103 ;;
7104 *)
7105 gl_dirsep_regex='\/'
7106 ;;
7107 esac
7108 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
7109 gl_header_literal_regex=`echo 'errno.h' \
7110 | sed -e "$gl_make_literal_regex_sed"`
7111 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
7112 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
7113 s|^/[^/]|//&|
7114 p
7115 q
7116 }'
7117
7118 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7119 sed -n "$gl_absolute_header_sed"`
7120
7121 gl_header=$gl_cv_absolute_errno_h
7122 gl_cv_next_errno_h='"'$gl_header'"'
7123
7124
7125fi
7126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
18848e28
GF
7127$as_echo "$gl_cv_next_errno_h" >&6; }
7128 fi
7129 NEXT_ERRNO_H=$gl_cv_next_errno_h
7130
7131 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7132 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
7133 gl_next_as_first_directive='<'errno.h'>'
7134 else
7135 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
7136 gl_next_as_first_directive=$gl_cv_next_errno_h
7137 fi
7138 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
7139
7140
7141
7142
7143 ERRNO_H='errno.h'
7144 fi
7145
7146 if test -n "$ERRNO_H"; then
7147 GL_GENERATE_ERRNO_H_TRUE=
7148 GL_GENERATE_ERRNO_H_FALSE='#'
7149else
7150 GL_GENERATE_ERRNO_H_TRUE='#'
7151 GL_GENERATE_ERRNO_H_FALSE=
7152fi
7153
7154
7155 if test -n "$ERRNO_H"; then
7156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
7157$as_echo_n "checking for EMULTIHOP value... " >&6; }
7158if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then :
7159 $as_echo_n "(cached) " >&6
7160else
7161
7162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7163/* end confdefs.h. */
7164
7165#include <errno.h>
7166#ifdef EMULTIHOP
7167yes
7168#endif
7169
7170_ACEOF
7171if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7172 $EGREP "yes" >/dev/null 2>&1; then :
7173 gl_cv_header_errno_h_EMULTIHOP=yes
7174else
7175 gl_cv_header_errno_h_EMULTIHOP=no
7176fi
7177rm -f conftest*
7178
7179 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
7180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7181/* end confdefs.h. */
7182
7183#define _XOPEN_SOURCE_EXTENDED 1
7184#include <errno.h>
7185#ifdef EMULTIHOP
7186yes
7187#endif
7188
7189_ACEOF
7190if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7191 $EGREP "yes" >/dev/null 2>&1; then :
7192 gl_cv_header_errno_h_EMULTIHOP=hidden
7193fi
7194rm -f conftest*
7195
7196 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
7197 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
7198#define _XOPEN_SOURCE_EXTENDED 1
7199#include <errno.h>
7200/* The following two lines are a workaround against an autoconf-2.52 bug. */
7201#include <stdio.h>
7202#include <stdlib.h>
7203"; then :
7204
7205fi
7206
7207 fi
7208 fi
7209
7210fi
7211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
7212$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
7213 case $gl_cv_header_errno_h_EMULTIHOP in
7214 yes | no)
7215 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
7216 ;;
7217 *)
7218 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
7219 ;;
7220 esac
7221
7222
7223 fi
7224
7225
7226 if test -n "$ERRNO_H"; then
7227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
7228$as_echo_n "checking for ENOLINK value... " >&6; }
7229if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then :
7230 $as_echo_n "(cached) " >&6
7231else
7232
7233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7234/* end confdefs.h. */
7235
7236#include <errno.h>
7237#ifdef ENOLINK
7238yes
7239#endif
7240
7241_ACEOF
7242if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7243 $EGREP "yes" >/dev/null 2>&1; then :
7244 gl_cv_header_errno_h_ENOLINK=yes
7245else
7246 gl_cv_header_errno_h_ENOLINK=no
7247fi
7248rm -f conftest*
7249
7250 if test $gl_cv_header_errno_h_ENOLINK = no; then
7251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7252/* end confdefs.h. */
7253
7254#define _XOPEN_SOURCE_EXTENDED 1
7255#include <errno.h>
7256#ifdef ENOLINK
7257yes
7258#endif
7259
7260_ACEOF
7261if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7262 $EGREP "yes" >/dev/null 2>&1; then :
7263 gl_cv_header_errno_h_ENOLINK=hidden
7264fi
7265rm -f conftest*
7266
7267 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
7268 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
7269#define _XOPEN_SOURCE_EXTENDED 1
7270#include <errno.h>
7271/* The following two lines are a workaround against an autoconf-2.52 bug. */
7272#include <stdio.h>
7273#include <stdlib.h>
7274"; then :
7275
7276fi
7277
7278 fi
7279 fi
7280
7281fi
7282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
7283$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
7284 case $gl_cv_header_errno_h_ENOLINK in
7285 yes | no)
7286 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
7287 ;;
7288 *)
7289 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
7290 ;;
7291 esac
7292
7293
7294 fi
7295
7296
7297 if test -n "$ERRNO_H"; then
7298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
7299$as_echo_n "checking for EOVERFLOW value... " >&6; }
7300if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then :
7301 $as_echo_n "(cached) " >&6
7302else
7303
7304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7305/* end confdefs.h. */
7306
7307#include <errno.h>
7308#ifdef EOVERFLOW
7309yes
7310#endif
7311
7312_ACEOF
7313if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7314 $EGREP "yes" >/dev/null 2>&1; then :
7315 gl_cv_header_errno_h_EOVERFLOW=yes
7316else
7317 gl_cv_header_errno_h_EOVERFLOW=no
7318fi
7319rm -f conftest*
7320
7321 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
7322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7323/* end confdefs.h. */
7324
7325#define _XOPEN_SOURCE_EXTENDED 1
7326#include <errno.h>
7327#ifdef EOVERFLOW
7328yes
7329#endif
7330
7331_ACEOF
7332if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7333 $EGREP "yes" >/dev/null 2>&1; then :
7334 gl_cv_header_errno_h_EOVERFLOW=hidden
7335fi
7336rm -f conftest*
7337
7338 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
7339 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
7340#define _XOPEN_SOURCE_EXTENDED 1
7341#include <errno.h>
7342/* The following two lines are a workaround against an autoconf-2.52 bug. */
7343#include <stdio.h>
7344#include <stdlib.h>
7345"; then :
7346
7347fi
7348
7349 fi
7350 fi
7351
7352fi
7353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
7354$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
7355 case $gl_cv_header_errno_h_EOVERFLOW in
7356 yes | no)
7357 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
7358 ;;
7359 *)
7360 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
7361 ;;
7362 esac
7363
7364
7365 fi
7366
7367
6ec2e0f5
SDJ
7368ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
7369if test "x$ac_cv_have_decl_strerror_r" = x""yes; then :
7370 ac_have_decl=1
7371else
7372 ac_have_decl=0
7373fi
18848e28 7374
6ec2e0f5
SDJ
7375cat >>confdefs.h <<_ACEOF
7376#define HAVE_DECL_STRERROR_R $ac_have_decl
7377_ACEOF
18848e28 7378
6ec2e0f5
SDJ
7379for ac_func in strerror_r
7380do :
7381 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
7382if test "x$ac_cv_func_strerror_r" = x""yes; then :
7383 cat >>confdefs.h <<_ACEOF
7384#define HAVE_STRERROR_R 1
7385_ACEOF
63ce7108 7386
6ec2e0f5
SDJ
7387fi
7388done
63ce7108 7389
6ec2e0f5
SDJ
7390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
7391$as_echo_n "checking whether strerror_r returns char *... " >&6; }
7392if test "${ac_cv_func_strerror_r_char_p+set}" = set; then :
63ce7108
TT
7393 $as_echo_n "(cached) " >&6
7394else
6ec2e0f5
SDJ
7395
7396 ac_cv_func_strerror_r_char_p=no
7397 if test $ac_cv_have_decl_strerror_r = yes; then
7398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63ce7108
TT
7399/* end confdefs.h. */
7400$ac_includes_default
63ce7108
TT
7401int
7402main ()
7403{
6ec2e0f5
SDJ
7404
7405 char buf[100];
7406 char x = *strerror_r (0, buf, sizeof buf);
7407 char *p = strerror_r (0, buf, sizeof buf);
7408 return !p || x;
7409
63ce7108
TT
7410 ;
7411 return 0;
7412}
7413_ACEOF
7414if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 7415 ac_cv_func_strerror_r_char_p=yes
63ce7108
TT
7416fi
7417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
7418 else
7419 # strerror_r is not declared. Choose between
7420 # systems that have relatively inaccessible declarations for the
7421 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
7422 # former has a strerror_r that returns char*, while the latter
7423 # has a strerror_r that returns `int'.
7424 # This test should segfault on the DEC system.
7425 if test "$cross_compiling" = yes; then :
7426 :
7427else
7428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7429/* end confdefs.h. */
7430$ac_includes_default
7431 extern char *strerror_r ();
7432int
7433main ()
7434{
7435char buf[100];
7436 char x = *strerror_r (0, buf, sizeof buf);
7437 return ! isalpha (x);
7438 ;
7439 return 0;
7440}
7441_ACEOF
7442if ac_fn_c_try_run "$LINENO"; then :
7443 ac_cv_func_strerror_r_char_p=yes
7444fi
7445rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7446 conftest.$ac_objext conftest.beam conftest.$ac_ext
63ce7108 7447fi
63ce7108 7448
6ec2e0f5 7449 fi
63ce7108 7450
6ec2e0f5
SDJ
7451fi
7452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
7453$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
7454if test $ac_cv_func_strerror_r_char_p = yes; then
63ce7108 7455
6ec2e0f5 7456$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
63ce7108 7457
6ec2e0f5 7458fi
63ce7108
TT
7459
7460
7461
63ce7108 7462
6ec2e0f5
SDJ
7463ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
7464if test "x$ac_cv_have_decl_fchdir" = x""yes; then :
7465 ac_have_decl=1
7466else
7467 ac_have_decl=0
7468fi
63ce7108 7469
6ec2e0f5
SDJ
7470cat >>confdefs.h <<_ACEOF
7471#define HAVE_DECL_FCHDIR $ac_have_decl
7472_ACEOF
63ce7108
TT
7473
7474
6ec2e0f5
SDJ
7475 GNULIB_FCNTL=0;
7476 GNULIB_NONBLOCKING=0;
7477 GNULIB_OPEN=0;
7478 GNULIB_OPENAT=0;
7479 HAVE_FCNTL=1;
7480 HAVE_OPENAT=1;
7481 REPLACE_FCNTL=0;
7482 REPLACE_OPEN=0;
7483 REPLACE_OPENAT=0;
63ce7108
TT
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
6ec2e0f5
SDJ
7494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
7495$as_echo_n "checking for working fcntl.h... " >&6; }
7496if test "${gl_cv_header_working_fcntl_h+set}" = set; then :
7497 $as_echo_n "(cached) " >&6
7498else
7499 if test "$cross_compiling" = yes; then :
7500 gl_cv_header_working_fcntl_h=cross-compiling
7501else
7502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7503/* end confdefs.h. */
7504#include <sys/types.h>
7505 #include <sys/stat.h>
7506 #if HAVE_UNISTD_H
7507 # include <unistd.h>
7508 #else /* on Windows with MSVC */
7509 # include <io.h>
7510 # include <stdlib.h>
7511 # defined sleep(n) _sleep ((n) * 1000)
7512 #endif
7513 #include <fcntl.h>
7514 #ifndef O_NOATIME
7515 #define O_NOATIME 0
7516 #endif
7517 #ifndef O_NOFOLLOW
7518 #define O_NOFOLLOW 0
7519 #endif
7520 static int const constants[] =
7521 {
7522 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
7523 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
7524 };
63ce7108 7525
6ec2e0f5
SDJ
7526int
7527main ()
7528{
63ce7108 7529
6ec2e0f5
SDJ
7530 int result = !constants;
7531 #if HAVE_SYMLINK
7532 {
7533 static char const sym[] = "conftest.sym";
7534 if (symlink ("/dev/null", sym) != 0)
7535 result |= 2;
7536 else
7537 {
7538 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
7539 if (fd >= 0)
7540 {
7541 close (fd);
7542 result |= 4;
7543 }
7544 }
7545 if (unlink (sym) != 0 || symlink (".", sym) != 0)
7546 result |= 2;
7547 else
7548 {
7549 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
7550 if (fd >= 0)
7551 {
7552 close (fd);
7553 result |= 4;
7554 }
7555 }
7556 unlink (sym);
7557 }
7558 #endif
7559 {
7560 static char const file[] = "confdefs.h";
7561 int fd = open (file, O_RDONLY | O_NOATIME);
7562 if (fd < 0)
7563 result |= 8;
7564 else
7565 {
7566 struct stat st0;
7567 if (fstat (fd, &st0) != 0)
7568 result |= 16;
7569 else
7570 {
7571 char c;
7572 sleep (1);
7573 if (read (fd, &c, 1) != 1)
7574 result |= 24;
7575 else
7576 {
7577 if (close (fd) != 0)
7578 result |= 32;
7579 else
7580 {
7581 struct stat st1;
7582 if (stat (file, &st1) != 0)
7583 result |= 40;
7584 else
7585 if (st0.st_atime != st1.st_atime)
7586 result |= 64;
7587 }
7588 }
7589 }
7590 }
7591 }
7592 return result;
7593 ;
7594 return 0;
7595}
7596_ACEOF
7597if ac_fn_c_try_run "$LINENO"; then :
7598 gl_cv_header_working_fcntl_h=yes
7599else
7600 case $? in #(
7601 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
7602 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
7603 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
7604 *) gl_cv_header_working_fcntl_h='no';;
7605 esac
7606fi
7607rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7608 conftest.$ac_objext conftest.beam conftest.$ac_ext
7609fi
7610
7611fi
7612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
7613$as_echo "$gl_cv_header_working_fcntl_h" >&6; }
7614
7615 case $gl_cv_header_working_fcntl_h in #(
7616 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
7617 *) ac_val=1;;
7618 esac
7619
7620cat >>confdefs.h <<_ACEOF
7621#define HAVE_WORKING_O_NOATIME $ac_val
7622_ACEOF
7623
7624
7625 case $gl_cv_header_working_fcntl_h in #(
7626 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
7627 *) ac_val=1;;
7628 esac
7629
7630cat >>confdefs.h <<_ACEOF
7631#define HAVE_WORKING_O_NOFOLLOW $ac_val
7632_ACEOF
7633
7634
7635ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
7636if test "x$ac_cv_type_pid_t" = x""yes; then :
7637
7638else
7639
7640cat >>confdefs.h <<_ACEOF
7641#define pid_t int
7642_ACEOF
7643
7644fi
7645
7646ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
7647if test "x$ac_cv_type_mode_t" = x""yes; then :
7648
7649else
7650
7651cat >>confdefs.h <<_ACEOF
7652#define mode_t int
7653_ACEOF
7654
7655fi
7656
7657
7658
7659
7660
7661
7662
7663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
7664$as_echo_n "checking for mbstate_t... " >&6; }
7665if test "${ac_cv_type_mbstate_t+set}" = set; then :
7666 $as_echo_n "(cached) " >&6
7667else
7668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7669/* end confdefs.h. */
7670$ac_includes_default
7671/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
7672 <wchar.h>.
7673 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
7674 included before <wchar.h>. */
7675#include <stddef.h>
7676#include <stdio.h>
7677#include <time.h>
7678#include <wchar.h>
7679int
7680main ()
7681{
7682mbstate_t x; return sizeof x;
7683 ;
7684 return 0;
7685}
7686_ACEOF
7687if ac_fn_c_try_compile "$LINENO"; then :
7688 ac_cv_type_mbstate_t=yes
7689else
7690 ac_cv_type_mbstate_t=no
7691fi
7692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7693fi
7694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
7695$as_echo "$ac_cv_type_mbstate_t" >&6; }
7696 if test $ac_cv_type_mbstate_t = yes; then
7697
7698$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
7699
7700 else
7701
7702$as_echo "#define mbstate_t int" >>confdefs.h
7703
7704 fi
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723 GNULIB_ACOSF=0;
7724 GNULIB_ACOSL=0;
7725 GNULIB_ASINF=0;
7726 GNULIB_ASINL=0;
7727 GNULIB_ATANF=0;
7728 GNULIB_ATANL=0;
7729 GNULIB_ATAN2F=0;
7730 GNULIB_CBRT=0;
7731 GNULIB_CBRTF=0;
7732 GNULIB_CBRTL=0;
7733 GNULIB_CEIL=0;
7734 GNULIB_CEILF=0;
7735 GNULIB_CEILL=0;
7736 GNULIB_COPYSIGN=0;
7737 GNULIB_COPYSIGNF=0;
7738 GNULIB_COPYSIGNL=0;
7739 GNULIB_COSF=0;
7740 GNULIB_COSL=0;
7741 GNULIB_COSHF=0;
7742 GNULIB_EXPF=0;
7743 GNULIB_EXPL=0;
7744 GNULIB_EXP2=0;
7745 GNULIB_EXP2F=0;
7746 GNULIB_EXP2L=0;
7747 GNULIB_EXPM1=0;
7748 GNULIB_EXPM1F=0;
7749 GNULIB_EXPM1L=0;
7750 GNULIB_FABSF=0;
7751 GNULIB_FABSL=0;
7752 GNULIB_FLOOR=0;
7753 GNULIB_FLOORF=0;
7754 GNULIB_FLOORL=0;
7755 GNULIB_FMA=0;
7756 GNULIB_FMAF=0;
7757 GNULIB_FMAL=0;
7758 GNULIB_FMOD=0;
7759 GNULIB_FMODF=0;
7760 GNULIB_FMODL=0;
7761 GNULIB_FREXPF=0;
7762 GNULIB_FREXP=0;
7763 GNULIB_FREXPL=0;
7764 GNULIB_HYPOT=0;
7765 GNULIB_HYPOTF=0;
7766 GNULIB_HYPOTL=0;
88b48903
WN
7767 GNULIB_ILOGB=0;
7768 GNULIB_ILOGBF=0;
7769 GNULIB_ILOGBL=0;
7770 GNULIB_ISFINITE=0;
7771 GNULIB_ISINF=0;
7772 GNULIB_ISNAN=0;
7773 GNULIB_ISNANF=0;
7774 GNULIB_ISNAND=0;
7775 GNULIB_ISNANL=0;
7776 GNULIB_LDEXPF=0;
7777 GNULIB_LDEXPL=0;
7778 GNULIB_LOG=0;
7779 GNULIB_LOGF=0;
7780 GNULIB_LOGL=0;
7781 GNULIB_LOG10=0;
7782 GNULIB_LOG10F=0;
7783 GNULIB_LOG10L=0;
7784 GNULIB_LOG1P=0;
7785 GNULIB_LOG1PF=0;
7786 GNULIB_LOG1PL=0;
7787 GNULIB_LOG2=0;
7788 GNULIB_LOG2F=0;
7789 GNULIB_LOG2L=0;
7790 GNULIB_LOGB=0;
7791 GNULIB_LOGBF=0;
7792 GNULIB_LOGBL=0;
7793 GNULIB_MODF=0;
7794 GNULIB_MODFF=0;
7795 GNULIB_MODFL=0;
7796 GNULIB_POWF=0;
7797 GNULIB_REMAINDER=0;
7798 GNULIB_REMAINDERF=0;
7799 GNULIB_REMAINDERL=0;
7800 GNULIB_RINT=0;
7801 GNULIB_RINTF=0;
7802 GNULIB_RINTL=0;
7803 GNULIB_ROUND=0;
7804 GNULIB_ROUNDF=0;
7805 GNULIB_ROUNDL=0;
7806 GNULIB_SIGNBIT=0;
7807 GNULIB_SINF=0;
7808 GNULIB_SINL=0;
7809 GNULIB_SINHF=0;
7810 GNULIB_SQRTF=0;
7811 GNULIB_SQRTL=0;
7812 GNULIB_TANF=0;
7813 GNULIB_TANL=0;
7814 GNULIB_TANHF=0;
7815 GNULIB_TRUNC=0;
7816 GNULIB_TRUNCF=0;
7817 GNULIB_TRUNCL=0;
7818 HAVE_ACOSF=1;
7819 HAVE_ACOSL=1;
7820 HAVE_ASINF=1;
7821 HAVE_ASINL=1;
7822 HAVE_ATANF=1;
7823 HAVE_ATANL=1;
7824 HAVE_ATAN2F=1;
7825 HAVE_CBRT=1;
7826 HAVE_CBRTF=1;
7827 HAVE_CBRTL=1;
7828 HAVE_COPYSIGN=1;
7829 HAVE_COPYSIGNL=1;
7830 HAVE_COSF=1;
7831 HAVE_COSL=1;
7832 HAVE_COSHF=1;
7833 HAVE_EXPF=1;
7834 HAVE_EXPL=1;
7835 HAVE_EXPM1=1;
7836 HAVE_EXPM1F=1;
7837 HAVE_FABSF=1;
7838 HAVE_FABSL=1;
7839 HAVE_FMA=1;
7840 HAVE_FMAF=1;
7841 HAVE_FMAL=1;
7842 HAVE_FMODF=1;
7843 HAVE_FMODL=1;
7844 HAVE_FREXPF=1;
7845 HAVE_HYPOTF=1;
7846 HAVE_HYPOTL=1;
7847 HAVE_ILOGB=1;
7848 HAVE_ILOGBF=1;
7849 HAVE_ILOGBL=1;
7850 HAVE_ISNANF=1;
7851 HAVE_ISNAND=1;
7852 HAVE_ISNANL=1;
7853 HAVE_LDEXPF=1;
7854 HAVE_LOGF=1;
7855 HAVE_LOGL=1;
7856 HAVE_LOG10F=1;
7857 HAVE_LOG10L=1;
7858 HAVE_LOG1P=1;
7859 HAVE_LOG1PF=1;
7860 HAVE_LOG1PL=1;
7861 HAVE_LOGBF=1;
7862 HAVE_LOGBL=1;
7863 HAVE_MODFF=1;
7864 HAVE_MODFL=1;
7865 HAVE_POWF=1;
7866 HAVE_REMAINDER=1;
7867 HAVE_REMAINDERF=1;
7868 HAVE_RINT=1;
7869 HAVE_RINTL=1;
7870 HAVE_SINF=1;
7871 HAVE_SINL=1;
7872 HAVE_SINHF=1;
7873 HAVE_SQRTF=1;
7874 HAVE_SQRTL=1;
7875 HAVE_TANF=1;
7876 HAVE_TANL=1;
7877 HAVE_TANHF=1;
7878 HAVE_DECL_ACOSL=1;
7879 HAVE_DECL_ASINL=1;
7880 HAVE_DECL_ATANL=1;
7881 HAVE_DECL_CBRTF=1;
7882 HAVE_DECL_CBRTL=1;
7883 HAVE_DECL_CEILF=1;
7884 HAVE_DECL_CEILL=1;
7885 HAVE_DECL_COPYSIGNF=1;
7886 HAVE_DECL_COSL=1;
7887 HAVE_DECL_EXPL=1;
7888 HAVE_DECL_EXP2=1;
7889 HAVE_DECL_EXP2F=1;
7890 HAVE_DECL_EXP2L=1;
7891 HAVE_DECL_EXPM1L=1;
7892 HAVE_DECL_FLOORF=1;
7893 HAVE_DECL_FLOORL=1;
7894 HAVE_DECL_FREXPL=1;
7895 HAVE_DECL_LDEXPL=1;
7896 HAVE_DECL_LOGL=1;
7897 HAVE_DECL_LOG10L=1;
7898 HAVE_DECL_LOG2=1;
7899 HAVE_DECL_LOG2F=1;
7900 HAVE_DECL_LOG2L=1;
7901 HAVE_DECL_LOGB=1;
7902 HAVE_DECL_REMAINDER=1;
7903 HAVE_DECL_REMAINDERL=1;
7904 HAVE_DECL_RINTF=1;
7905 HAVE_DECL_ROUND=1;
7906 HAVE_DECL_ROUNDF=1;
7907 HAVE_DECL_ROUNDL=1;
7908 HAVE_DECL_SINL=1;
7909 HAVE_DECL_SQRTL=1;
7910 HAVE_DECL_TANL=1;
7911 HAVE_DECL_TRUNC=1;
7912 HAVE_DECL_TRUNCF=1;
7913 HAVE_DECL_TRUNCL=1;
7914 REPLACE_CBRTF=0;
7915 REPLACE_CBRTL=0;
7916 REPLACE_CEIL=0;
7917 REPLACE_CEILF=0;
7918 REPLACE_CEILL=0;
7919 REPLACE_EXPM1=0;
7920 REPLACE_EXPM1F=0;
7921 REPLACE_EXP2=0;
7922 REPLACE_EXP2L=0;
7923 REPLACE_FABSL=0;
7924 REPLACE_FLOOR=0;
7925 REPLACE_FLOORF=0;
7926 REPLACE_FLOORL=0;
7927 REPLACE_FMA=0;
7928 REPLACE_FMAF=0;
7929 REPLACE_FMAL=0;
7930 REPLACE_FMOD=0;
7931 REPLACE_FMODF=0;
7932 REPLACE_FMODL=0;
7933 REPLACE_FREXPF=0;
7934 REPLACE_FREXP=0;
7935 REPLACE_FREXPL=0;
7936 REPLACE_HUGE_VAL=0;
7937 REPLACE_HYPOT=0;
7938 REPLACE_HYPOTF=0;
7939 REPLACE_HYPOTL=0;
7940 REPLACE_ILOGB=0;
7941 REPLACE_ILOGBF=0;
7942 REPLACE_ISFINITE=0;
7943 REPLACE_ISINF=0;
7944 REPLACE_ISNAN=0;
7945 REPLACE_LDEXPL=0;
7946 REPLACE_LOG=0;
7947 REPLACE_LOGF=0;
7948 REPLACE_LOGL=0;
7949 REPLACE_LOG10=0;
7950 REPLACE_LOG10F=0;
7951 REPLACE_LOG10L=0;
7952 REPLACE_LOG1P=0;
7953 REPLACE_LOG1PF=0;
7954 REPLACE_LOG1PL=0;
7955 REPLACE_LOG2=0;
7956 REPLACE_LOG2F=0;
7957 REPLACE_LOG2L=0;
7958 REPLACE_LOGB=0;
7959 REPLACE_LOGBF=0;
7960 REPLACE_LOGBL=0;
7961 REPLACE_MODF=0;
7962 REPLACE_MODFF=0;
7963 REPLACE_MODFL=0;
7964 REPLACE_NAN=0;
7965 REPLACE_REMAINDER=0;
7966 REPLACE_REMAINDERF=0;
7967 REPLACE_REMAINDERL=0;
7968 REPLACE_ROUND=0;
7969 REPLACE_ROUNDF=0;
7970 REPLACE_ROUNDL=0;
7971 REPLACE_SIGNBIT=0;
7972 REPLACE_SIGNBIT_USING_GCC=0;
7973 REPLACE_SQRTL=0;
7974 REPLACE_TRUNC=0;
7975 REPLACE_TRUNCF=0;
7976 REPLACE_TRUNCL=0;
7977
7978
7979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
7980$as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
7981if test "${gl_cv_func_frexp_no_libm+set}" = set; then :
7982 $as_echo_n "(cached) " >&6
7983else
7984
7985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7986/* end confdefs.h. */
7987#include <math.h>
7988 double x;
7989int
7990main ()
7991{
7992int e; return frexp (x, &e) > 0;
7993 ;
7994 return 0;
7995}
7996_ACEOF
7997if ac_fn_c_try_link "$LINENO"; then :
7998 gl_cv_func_frexp_no_libm=yes
7999else
8000 gl_cv_func_frexp_no_libm=no
8001fi
8002rm -f core conftest.err conftest.$ac_objext \
8003 conftest$ac_exeext conftest.$ac_ext
8004
8005fi
8006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
8007$as_echo "$gl_cv_func_frexp_no_libm" >&6; }
8008
4a626d0a
PA
8009ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
8010if test "x$ac_cv_have_decl_alarm" = x""yes; then :
8011 ac_have_decl=1
8012else
8013 ac_have_decl=0
8014fi
88b48903 8015
4a626d0a
PA
8016cat >>confdefs.h <<_ACEOF
8017#define HAVE_DECL_ALARM $ac_have_decl
8018_ACEOF
88b48903
WN
8019
8020
88b48903
WN
8021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
8022$as_echo_n "checking whether long double and double are the same... " >&6; }
8023if test "${gl_cv_long_double_equals_double+set}" = set; then :
8024 $as_echo_n "(cached) " >&6
8025else
8026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8027/* end confdefs.h. */
8028#include <float.h>
8029int
8030main ()
8031{
8032typedef int check[sizeof (long double) == sizeof (double)
8033 && LDBL_MANT_DIG == DBL_MANT_DIG
8034 && LDBL_MAX_EXP == DBL_MAX_EXP
8035 && LDBL_MIN_EXP == DBL_MIN_EXP
8036 ? 1 : -1];
8037
8038 ;
8039 return 0;
8040}
8041_ACEOF
8042if ac_fn_c_try_compile "$LINENO"; then :
8043 gl_cv_long_double_equals_double=yes
8044else
8045 gl_cv_long_double_equals_double=no
8046fi
8047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8048
8049fi
8050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
8051$as_echo "$gl_cv_long_double_equals_double" >&6; }
8052 if test $gl_cv_long_double_equals_double = yes; then
8053
8054$as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
8055
8056 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
8057 else
8058 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
8059 fi
8060
8061
4a626d0a 8062
6ec2e0f5
SDJ
8063 GNULIB_FCHMODAT=0;
8064 GNULIB_FSTAT=0;
8065 GNULIB_FSTATAT=0;
8066 GNULIB_FUTIMENS=0;
8067 GNULIB_LCHMOD=0;
8068 GNULIB_LSTAT=0;
8069 GNULIB_MKDIRAT=0;
8070 GNULIB_MKFIFO=0;
8071 GNULIB_MKFIFOAT=0;
8072 GNULIB_MKNOD=0;
8073 GNULIB_MKNODAT=0;
8074 GNULIB_STAT=0;
8075 GNULIB_UTIMENSAT=0;
8076 HAVE_FCHMODAT=1;
8077 HAVE_FSTATAT=1;
8078 HAVE_FUTIMENS=1;
8079 HAVE_LCHMOD=1;
8080 HAVE_LSTAT=1;
8081 HAVE_MKDIRAT=1;
8082 HAVE_MKFIFO=1;
8083 HAVE_MKFIFOAT=1;
8084 HAVE_MKNOD=1;
8085 HAVE_MKNODAT=1;
8086 HAVE_UTIMENSAT=1;
8087 REPLACE_FSTAT=0;
8088 REPLACE_FSTATAT=0;
8089 REPLACE_FUTIMENS=0;
8090 REPLACE_LSTAT=0;
8091 REPLACE_MKDIR=0;
8092 REPLACE_MKFIFO=0;
8093 REPLACE_MKNOD=0;
8094 REPLACE_STAT=0;
8095 REPLACE_UTIMENSAT=0;
8096
8097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
8098$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
8099if test "${ac_cv_header_stat_broken+set}" = set; then :
8100 $as_echo_n "(cached) " >&6
8101else
8102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8103/* end confdefs.h. */
8104#include <sys/types.h>
8105#include <sys/stat.h>
8106
8107#if defined S_ISBLK && defined S_IFDIR
8108extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
8109#endif
8110
8111#if defined S_ISBLK && defined S_IFCHR
8112extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
8113#endif
8114
8115#if defined S_ISLNK && defined S_IFREG
8116extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
8117#endif
8118
8119#if defined S_ISSOCK && defined S_IFREG
8120extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
8121#endif
4a626d0a 8122
4a626d0a
PA
8123_ACEOF
8124if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5
SDJ
8125 ac_cv_header_stat_broken=no
8126else
8127 ac_cv_header_stat_broken=yes
4a626d0a
PA
8128fi
8129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
8130fi
8131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
8132$as_echo "$ac_cv_header_stat_broken" >&6; }
8133if test $ac_cv_header_stat_broken = yes; then
8134
8135$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
4a626d0a
PA
8136
8137fi
4a626d0a 8138
4a626d0a
PA
8139
8140
4a626d0a
PA
8141
8142
6ec2e0f5
SDJ
8143 case "$host_os" in
8144 mingw*)
8145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
8146$as_echo_n "checking for 64-bit off_t... " >&6; }
8147if test "${gl_cv_type_off_t_64+set}" = set; then :
8148 $as_echo_n "(cached) " >&6
8149else
8150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8151/* end confdefs.h. */
8152#include <sys/types.h>
8153 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
8154
8155int
8156main ()
8157{
8158
8159 ;
8160 return 0;
8161}
8162_ACEOF
8163if ac_fn_c_try_compile "$LINENO"; then :
8164 gl_cv_type_off_t_64=yes
8165else
8166 gl_cv_type_off_t_64=no
8167fi
8168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4a626d0a 8169
6ec2e0f5
SDJ
8170fi
8171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
8172$as_echo "$gl_cv_type_off_t_64" >&6; }
8173 if test $gl_cv_type_off_t_64 = no; then
8174 WINDOWS_64_BIT_OFF_T=1
8175 else
8176 WINDOWS_64_BIT_OFF_T=0
8177 fi
8178 WINDOWS_64_BIT_ST_SIZE=1
8179 ;;
8180 *)
8181 WINDOWS_64_BIT_OFF_T=0
8182 WINDOWS_64_BIT_ST_SIZE=0
8183 ;;
8184 esac
4a626d0a
PA
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 8201 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
4a626d0a 8202 else
6ec2e0f5
SDJ
8203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
8204$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
8205if test "${gl_cv_next_sys_stat_h+set}" = set; then :
4a626d0a
PA
8206 $as_echo_n "(cached) " >&6
8207else
8208
6ec2e0f5 8209 if test $ac_cv_header_sys_stat_h = yes; then
4a626d0a
PA
8210
8211
8212
8213
8214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8215/* end confdefs.h. */
6ec2e0f5 8216#include <sys/stat.h>
4a626d0a
PA
8217_ACEOF
8218 case "$host_os" in
8219 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8220 *) gl_absname_cpp="$ac_cpp" ;;
8221 esac
8222
8223 case "$host_os" in
8224 mingw*)
8225 gl_dirsep_regex='[/\\]'
8226 ;;
8227 *)
8228 gl_dirsep_regex='\/'
8229 ;;
8230 esac
8231 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 8232 gl_header_literal_regex=`echo 'sys/stat.h' \
4a626d0a
PA
8233 | sed -e "$gl_make_literal_regex_sed"`
8234 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8235 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8236 s|^/[^/]|//&|
8237 p
8238 q
8239 }'
8240
6ec2e0f5 8241 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a
PA
8242 sed -n "$gl_absolute_header_sed"`
8243
6ec2e0f5
SDJ
8244 gl_header=$gl_cv_absolute_sys_stat_h
8245 gl_cv_next_sys_stat_h='"'$gl_header'"'
4a626d0a 8246 else
6ec2e0f5 8247 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
4a626d0a
PA
8248 fi
8249
8250
8251fi
6ec2e0f5
SDJ
8252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
8253$as_echo "$gl_cv_next_sys_stat_h" >&6; }
4a626d0a 8254 fi
6ec2e0f5 8255 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
4a626d0a
PA
8256
8257 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8258 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 8259 gl_next_as_first_directive='<'sys/stat.h'>'
4a626d0a
PA
8260 else
8261 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 8262 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
4a626d0a 8263 fi
6ec2e0f5 8264 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
4a626d0a
PA
8265
8266
8267
8268
8269
4a626d0a
PA
8270
8271
8272
8273
8274
4a626d0a 8275
6ec2e0f5 8276 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
4a626d0a 8277
6ec2e0f5 8278$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
4a626d0a
PA
8279
8280 fi
4a626d0a 8281
6ec2e0f5
SDJ
8282 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
8283 #include <sys/stat.h>
8284"
8285if test "x$ac_cv_type_nlink_t" = x""yes; then :
8286
8287else
4a626d0a 8288
6ec2e0f5
SDJ
8289$as_echo "#define nlink_t int" >>confdefs.h
8290
8291fi
8292
8293
8294
8295 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
8296 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
8297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
8298$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
8299if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
4a626d0a
PA
8300 $as_echo_n "(cached) " >&6
8301else
8302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8303/* end confdefs.h. */
6ec2e0f5 8304#include <sys/stat.h>
4a626d0a
PA
8305
8306int
8307main ()
8308{
6ec2e0f5
SDJ
8309#undef $gl_func
8310 (void) $gl_func;
4a626d0a
PA
8311 ;
8312 return 0;
8313}
8314_ACEOF
8315if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 8316 eval "$as_gl_Symbol=yes"
4a626d0a 8317else
6ec2e0f5 8318 eval "$as_gl_Symbol=no"
4a626d0a
PA
8319fi
8320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
8321fi
8322eval ac_res=\$$as_gl_Symbol
8323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8324$as_echo "$ac_res" >&6; }
8325 eval as_val=\$$as_gl_Symbol
8326 if test "x$as_val" = x""yes; then :
8327 cat >>confdefs.h <<_ACEOF
8328#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
8329_ACEOF
4a626d0a 8330
6ec2e0f5 8331 eval ac_cv_have_decl_$gl_func=yes
4a626d0a 8332fi
6ec2e0f5
SDJ
8333 done
8334
8335
8336
8337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
8338$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
8339if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
4a626d0a
PA
8340 $as_echo_n "(cached) " >&6
8341else
6ec2e0f5
SDJ
8342 rm -f conftest.sym conftest.file
8343 echo >conftest.file
8344 if test "$cross_compiling" = yes; then :
8345 case "$host_os" in
8346 *-gnu*)
8347 # Guess yes on glibc systems.
8348 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
8349 *)
8350 # If we don't know, assume the worst.
8351 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
8352 esac
4a626d0a 8353
6ec2e0f5
SDJ
8354else
8355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8356/* end confdefs.h. */
8357$ac_includes_default
4a626d0a
PA
8358int
8359main ()
8360{
6ec2e0f5
SDJ
8361struct stat sbuf;
8362 if (symlink ("conftest.file", "conftest.sym") != 0)
8363 return 1;
8364 /* Linux will dereference the symlink and fail, as required by
8365 POSIX. That is better in the sense that it means we will not
8366 have to compile and use the lstat wrapper. */
8367 return lstat ("conftest.sym/", &sbuf) == 0;
4a626d0a
PA
8368
8369 ;
8370 return 0;
8371}
8372_ACEOF
6ec2e0f5
SDJ
8373if ac_fn_c_try_run "$LINENO"; then :
8374 gl_cv_func_lstat_dereferences_slashed_symlink=yes
4a626d0a 8375else
6ec2e0f5
SDJ
8376 gl_cv_func_lstat_dereferences_slashed_symlink=no
8377fi
8378rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8379 conftest.$ac_objext conftest.beam conftest.$ac_ext
4a626d0a 8380fi
6ec2e0f5
SDJ
8381
8382 rm -f conftest.sym conftest.file
4a626d0a
PA
8383
8384fi
6ec2e0f5
SDJ
8385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
8386$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
8387 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
8388 *yes)
4a626d0a 8389
6ec2e0f5
SDJ
8390cat >>confdefs.h <<_ACEOF
8391#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
8392_ACEOF
4a626d0a 8393
6ec2e0f5
SDJ
8394 ;;
8395 esac
8396
8397
8398
8399
8400
8401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
8402$as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
8403if test "${gl_cv_func_getcwd_null+set}" = set; then :
4a626d0a 8404 $as_echo_n "(cached) " >&6
6ec2e0f5
SDJ
8405else
8406 if test "$cross_compiling" = yes; then :
8407 case "$host_os" in
8408 # Guess yes on glibc systems.
8409 *-gnu*) gl_cv_func_getcwd_null="guessing yes";;
8410 # Guess yes on Cygwin.
8411 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
8412 # If we don't know, assume the worst.
8413 *) gl_cv_func_getcwd_null="guessing no";;
8414 esac
8415
4a626d0a
PA
8416else
8417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8418/* end confdefs.h. */
8419
6ec2e0f5
SDJ
8420# include <stdlib.h>
8421# if HAVE_UNISTD_H
8422# include <unistd.h>
8423# else /* on Windows with MSVC */
8424# include <direct.h>
8425# endif
8426# ifndef getcwd
8427 char *getcwd ();
8428# endif
8429
8430int
8431main ()
8432{
8433
8434#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
8435/* mingw cwd does not start with '/', but getcwd does allocate.
8436 However, mingw fails to honor non-zero size. */
8437#else
8438 if (chdir ("/") != 0)
8439 return 1;
8440 else
8441 {
8442 char *f = getcwd (NULL, 0);
8443 if (! f)
8444 return 2;
8445 if (f[0] != '/')
8446 return 3;
8447 if (f[1] != '\0')
8448 return 4;
8449 free (f);
8450 return 0;
8451 }
4a626d0a 8452#endif
4a626d0a 8453
6ec2e0f5
SDJ
8454 ;
8455 return 0;
8456}
8457_ACEOF
8458if ac_fn_c_try_run "$LINENO"; then :
8459 gl_cv_func_getcwd_null=yes
8460else
8461 gl_cv_func_getcwd_null=no
8462fi
8463rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8464 conftest.$ac_objext conftest.beam conftest.$ac_ext
8465fi
8466
8467fi
8468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
8469$as_echo "$gl_cv_func_getcwd_null" >&6; }
8470
8471
8472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
8473$as_echo_n "checking for getcwd with POSIX signature... " >&6; }
8474if test "${gl_cv_func_getcwd_posix_signature+set}" = set; then :
8475 $as_echo_n "(cached) " >&6
8476else
8477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8478/* end confdefs.h. */
8479#include <unistd.h>
4a626d0a
PA
8480int
8481main ()
8482{
6ec2e0f5
SDJ
8483extern
8484 #ifdef __cplusplus
8485 "C"
8486 #endif
8487 char *getcwd (char *, size_t);
8488
4a626d0a
PA
8489 ;
8490 return 0;
8491}
6ec2e0f5 8492
4a626d0a
PA
8493_ACEOF
8494if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 8495 gl_cv_func_getcwd_posix_signature=yes
4a626d0a 8496else
6ec2e0f5 8497 gl_cv_func_getcwd_posix_signature=no
4a626d0a
PA
8498fi
8499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5 8500
4a626d0a 8501fi
6ec2e0f5
SDJ
8502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
8503$as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
8504
8505ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
8506if test "x$ac_cv_have_decl_getcwd" = x""yes; then :
8507 ac_have_decl=1
8508else
8509 ac_have_decl=0
8510fi
8511
8512cat >>confdefs.h <<_ACEOF
8513#define HAVE_DECL_GETCWD $ac_have_decl
4a626d0a
PA
8514_ACEOF
8515
6ec2e0f5
SDJ
8516
8517
8518ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
8519if test "x$ac_cv_have_decl_getdtablesize" = x""yes; then :
8520 ac_have_decl=1
8521else
8522 ac_have_decl=0
4a626d0a 8523fi
4a626d0a 8524
6ec2e0f5
SDJ
8525cat >>confdefs.h <<_ACEOF
8526#define HAVE_DECL_GETDTABLESIZE $ac_have_decl
8527_ACEOF
8528
8529ac_fn_c_check_decl "$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default"
8530if test "x$ac_cv_have_decl_getlogin_r" = x""yes; then :
8531 ac_have_decl=1
8532else
8533 ac_have_decl=0
8534fi
8535
8536cat >>confdefs.h <<_ACEOF
8537#define HAVE_DECL_GETLOGIN_R $ac_have_decl
8538_ACEOF
8539
8540
8541
8542ac_fn_c_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default"
8543if test "x$ac_cv_have_decl_getlogin" = x""yes; then :
8544 ac_have_decl=1
8545else
8546 ac_have_decl=0
8547fi
8548
8549cat >>confdefs.h <<_ACEOF
8550#define HAVE_DECL_GETLOGIN $ac_have_decl
8551_ACEOF
8552
8553
8554
8555
8556
8557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
8558$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
8559if test "${ac_cv_c_restrict+set}" = set; then :
8560 $as_echo_n "(cached) " >&6
8561else
8562 ac_cv_c_restrict=no
8563 # The order here caters to the fact that C++ does not require restrict.
8564 for ac_kw in __restrict __restrict__ _Restrict restrict; do
8565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8566/* end confdefs.h. */
8567typedef int *int_ptr;
8568 int foo (int_ptr $ac_kw ip) { return ip[0]; }
8569 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
8570 int bar (int ip[$ac_kw]) { return ip[0]; }
8571
8572int
8573main ()
8574{
8575int s[1];
8576 int *$ac_kw t = s;
8577 t[0] = 0;
8578 return foo (t) + bar (t);
8579
8580 ;
8581 return 0;
8582}
8583_ACEOF
8584if ac_fn_c_try_compile "$LINENO"; then :
8585 ac_cv_c_restrict=$ac_kw
8586fi
8587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8588 test "$ac_cv_c_restrict" != no && break
8589 done
8590
8591fi
8592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
8593$as_echo "$ac_cv_c_restrict" >&6; }
8594
8595 case $ac_cv_c_restrict in
8596 restrict) ;;
8597 no) $as_echo "#define restrict /**/" >>confdefs.h
8598 ;;
8599 *) cat >>confdefs.h <<_ACEOF
8600#define restrict $ac_cv_c_restrict
8601_ACEOF
8602 ;;
8603 esac
4a626d0a
PA
8604
8605
6ec2e0f5
SDJ
8606 GNULIB_GETTIMEOFDAY=0;
8607 HAVE_GETTIMEOFDAY=1;
8608 HAVE_STRUCT_TIMEVAL=1;
8609 HAVE_SYS_TIME_H=1;
8610 HAVE_TIMEZONE_T=0;
8611 REPLACE_GETTIMEOFDAY=0;
8612 REPLACE_STRUCT_TIMEVAL=0;
4a626d0a
PA
8613
8614
8615
8616
88b48903 8617
49e4877c
PA
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 8630 gl_cv_next_sys_time_h='<'sys/time.h'>'
49e4877c 8631 else
6ec2e0f5
SDJ
8632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
8633$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
8634if test "${gl_cv_next_sys_time_h+set}" = set; then :
49e4877c
PA
8635 $as_echo_n "(cached) " >&6
8636else
8637
6ec2e0f5 8638 if test $ac_cv_header_sys_time_h = yes; then
49e4877c
PA
8639
8640
8641
8642
8643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8644/* end confdefs.h. */
6ec2e0f5 8645#include <sys/time.h>
49e4877c
PA
8646_ACEOF
8647 case "$host_os" in
8648 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8649 *) gl_absname_cpp="$ac_cpp" ;;
8650 esac
8651
8652 case "$host_os" in
8653 mingw*)
8654 gl_dirsep_regex='[/\\]'
8655 ;;
8656 *)
8657 gl_dirsep_regex='\/'
8658 ;;
8659 esac
8660 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 8661 gl_header_literal_regex=`echo 'sys/time.h' \
49e4877c
PA
8662 | sed -e "$gl_make_literal_regex_sed"`
8663 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8664 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8665 s|^/[^/]|//&|
8666 p
8667 q
8668 }'
8669
6ec2e0f5 8670 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
49e4877c
PA
8671 sed -n "$gl_absolute_header_sed"`
8672
6ec2e0f5
SDJ
8673 gl_header=$gl_cv_absolute_sys_time_h
8674 gl_cv_next_sys_time_h='"'$gl_header'"'
49e4877c 8675 else
6ec2e0f5 8676 gl_cv_next_sys_time_h='<'sys/time.h'>'
49e4877c
PA
8677 fi
8678
8679
8680fi
6ec2e0f5
SDJ
8681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
8682$as_echo "$gl_cv_next_sys_time_h" >&6; }
49e4877c 8683 fi
6ec2e0f5 8684 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
49e4877c
PA
8685
8686 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8687 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 8688 gl_next_as_first_directive='<'sys/time.h'>'
49e4877c
PA
8689 else
8690 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 8691 gl_next_as_first_directive=$gl_cv_next_sys_time_h
49e4877c 8692 fi
6ec2e0f5 8693 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
49e4877c
PA
8694
8695
8696
8697
8698
6ec2e0f5
SDJ
8699 if test $ac_cv_header_sys_time_h != yes; then
8700 HAVE_SYS_TIME_H=0
8701 fi
8702
8703
8704
8705
8706
8707 if test $ac_cv_header_sys_socket_h != yes; then
8708 for ac_header in winsock2.h
8709do :
8710 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
8711if test "x$ac_cv_header_winsock2_h" = x""yes; then :
8712 cat >>confdefs.h <<_ACEOF
8713#define HAVE_WINSOCK2_H 1
8714_ACEOF
8715
8716fi
8717
8718done
8719
8720 fi
8721 if test "$ac_cv_header_winsock2_h" = yes; then
8722 HAVE_WINSOCK2_H=1
8723 UNISTD_H_HAVE_WINSOCK2_H=1
8724 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
8725 else
8726 HAVE_WINSOCK2_H=0
8727 fi
8728
8729
8730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
8731$as_echo_n "checking for struct timeval... " >&6; }
8732if test "${gl_cv_sys_struct_timeval+set}" = set; then :
8733 $as_echo_n "(cached) " >&6
8734else
8735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8736/* end confdefs.h. */
8737#if HAVE_SYS_TIME_H
8738 #include <sys/time.h>
8739 #endif
8740 #include <time.h>
8741 #if HAVE_WINSOCK2_H
8742 # include <winsock2.h>
8743 #endif
8744
49e4877c
PA
8745int
8746main ()
8747{
6ec2e0f5 8748static struct timeval x; x.tv_sec = x.tv_usec;
49e4877c
PA
8749 ;
8750 return 0;
8751}
8752_ACEOF
8753if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 8754 gl_cv_sys_struct_timeval=yes
49e4877c 8755else
6ec2e0f5 8756 gl_cv_sys_struct_timeval=no
49e4877c
PA
8757fi
8758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49e4877c 8759
49e4877c 8760fi
6ec2e0f5
SDJ
8761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
8762$as_echo "$gl_cv_sys_struct_timeval" >&6; }
8763 if test $gl_cv_sys_struct_timeval != yes; then
8764 HAVE_STRUCT_TIMEVAL=0
8765 else
8766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
8767$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
8768if test "${gl_cv_sys_struct_timeval_tv_sec+set}" = set; then :
8690e634
JK
8769 $as_echo_n "(cached) " >&6
8770else
6ec2e0f5 8771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 8772/* end confdefs.h. */
6ec2e0f5
SDJ
8773#if HAVE_SYS_TIME_H
8774 #include <sys/time.h>
8775 #endif
8776 #include <time.h>
8777 #if HAVE_WINSOCK2_H
8778 # include <winsock2.h>
8779 #endif
8690e634 8780
8690e634
JK
8781int
8782main ()
8783{
6ec2e0f5
SDJ
8784static struct timeval x;
8785 typedef int verify_tv_sec_type[
8786 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
8787 ];
8788
8690e634
JK
8789 ;
8790 return 0;
8791}
8690e634 8792_ACEOF
6ec2e0f5
SDJ
8793if ac_fn_c_try_compile "$LINENO"; then :
8794 gl_cv_sys_struct_timeval_tv_sec=yes
8690e634 8795else
6ec2e0f5 8796 gl_cv_sys_struct_timeval_tv_sec=no
8690e634 8797fi
6ec2e0f5 8798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 8799
6ec2e0f5
SDJ
8800fi
8801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
8802$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
8803 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
8804 REPLACE_STRUCT_TIMEVAL=1
8805 fi
8690e634
JK
8806 fi
8807
8808
6ec2e0f5
SDJ
8809 for gl_func in gettimeofday; do
8810 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
8811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
8812$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
8813if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
8690e634 8814 $as_echo_n "(cached) " >&6
8690e634
JK
8815else
8816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8817/* end confdefs.h. */
6ec2e0f5
SDJ
8818
8819#if HAVE_SYS_TIME_H
8820# include <sys/time.h>
8821#endif
8822#include <time.h>
8823
8690e634
JK
8824int
8825main ()
8826{
6ec2e0f5
SDJ
8827#undef $gl_func
8828 (void) $gl_func;
8690e634
JK
8829 ;
8830 return 0;
8831}
8832_ACEOF
6ec2e0f5
SDJ
8833if ac_fn_c_try_compile "$LINENO"; then :
8834 eval "$as_gl_Symbol=yes"
8690e634 8835else
6ec2e0f5 8836 eval "$as_gl_Symbol=no"
8690e634 8837fi
6ec2e0f5 8838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 8839fi
6ec2e0f5
SDJ
8840eval ac_res=\$$as_gl_Symbol
8841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8842$as_echo "$ac_res" >&6; }
8843 eval as_val=\$$as_gl_Symbol
8844 if test "x$as_val" = x""yes; then :
8845 cat >>confdefs.h <<_ACEOF
8846#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
8847_ACEOF
8690e634 8848
6ec2e0f5 8849 eval ac_cv_have_decl_$gl_func=yes
8690e634 8850fi
6ec2e0f5 8851 done
8690e634 8852
8690e634 8853
8690e634
JK
8854
8855
8856
8857
8858
8859
88b48903 8860
8690e634 8861
8690e634 8862
8690e634
JK
8863
8864
8865
8866
8867
49e4877c
PA
8868
8869
8690e634
JK
8870
8871
8690e634
JK
8872
8873
8874
8875 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 8876 gl_cv_next_limits_h='<'limits.h'>'
8690e634 8877 else
6ec2e0f5
SDJ
8878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
8879$as_echo_n "checking absolute name of <limits.h>... " >&6; }
8880if test "${gl_cv_next_limits_h+set}" = set; then :
8690e634
JK
8881 $as_echo_n "(cached) " >&6
8882else
8883
6ec2e0f5 8884 if test $ac_cv_header_limits_h = yes; then
8690e634
JK
8885
8886
4a626d0a
PA
8887
8888
8889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 8890/* end confdefs.h. */
6ec2e0f5 8891#include <limits.h>
8690e634 8892_ACEOF
4a626d0a
PA
8893 case "$host_os" in
8894 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8895 *) gl_absname_cpp="$ac_cpp" ;;
8896 esac
8897
8898 case "$host_os" in
8899 mingw*)
8900 gl_dirsep_regex='[/\\]'
8901 ;;
8902 *)
8903 gl_dirsep_regex='\/'
8904 ;;
8905 esac
8906 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 8907 gl_header_literal_regex=`echo 'limits.h' \
4a626d0a
PA
8908 | sed -e "$gl_make_literal_regex_sed"`
8909 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8910 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8911 s|^/[^/]|//&|
8912 p
8913 q
8914 }'
8915
6ec2e0f5 8916 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a
PA
8917 sed -n "$gl_absolute_header_sed"`
8918
6ec2e0f5
SDJ
8919 gl_header=$gl_cv_absolute_limits_h
8920 gl_cv_next_limits_h='"'$gl_header'"'
8690e634 8921 else
6ec2e0f5 8922 gl_cv_next_limits_h='<'limits.h'>'
8690e634
JK
8923 fi
8924
8925
8926fi
6ec2e0f5
SDJ
8927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
8928$as_echo "$gl_cv_next_limits_h" >&6; }
8690e634 8929 fi
6ec2e0f5 8930 NEXT_LIMITS_H=$gl_cv_next_limits_h
8690e634
JK
8931
8932 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8933 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 8934 gl_next_as_first_directive='<'limits.h'>'
8690e634
JK
8935 else
8936 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 8937 gl_next_as_first_directive=$gl_cv_next_limits_h
8690e634 8938 fi
6ec2e0f5 8939 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
8690e634
JK
8940
8941
8942
8943
6ec2e0f5
SDJ
8944
8945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has ULLONG_WIDTH etc." >&5
8946$as_echo_n "checking whether limits.h has ULLONG_WIDTH etc.... " >&6; }
8947if test "${gl_cv_header_limits_width+set}" = set; then :
8948 $as_echo_n "(cached) " >&6
8949else
8950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8951/* end confdefs.h. */
8952#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
8953 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
8954 #endif
8955 #include <limits.h>
8956 int ullw = ULLONG_WIDTH;
8957int
8958main ()
8959{
8960
8961 ;
8962 return 0;
8963}
8964_ACEOF
8965if ac_fn_c_try_compile "$LINENO"; then :
8966 gl_cv_header_limits_width=yes
8967else
8968 gl_cv_header_limits_width=no
8969fi
8970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8971fi
8972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
8973$as_echo "$gl_cv_header_limits_width" >&6; }
8974 if test "$gl_cv_header_limits_width" = yes; then
8975 LIMITS_H=
8690e634 8976 else
6ec2e0f5 8977 LIMITS_H=limits.h
8690e634
JK
8978 fi
8979
6ec2e0f5
SDJ
8980 if test -n "$LIMITS_H"; then
8981 GL_GENERATE_LIMITS_H_TRUE=
8982 GL_GENERATE_LIMITS_H_FALSE='#'
8983else
8984 GL_GENERATE_LIMITS_H_TRUE='#'
8985 GL_GENERATE_LIMITS_H_FALSE=
8986fi
8987
8690e634 8988
6ec2e0f5
SDJ
8989
8990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
8991$as_echo_n "checking for unsigned long long int... " >&6; }
8992if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
8690e634
JK
8993 $as_echo_n "(cached) " >&6
8994else
6ec2e0f5
SDJ
8995 ac_cv_type_unsigned_long_long_int=yes
8996 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
8690e634
JK
8997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8998/* end confdefs.h. */
8999
6ec2e0f5
SDJ
9000 /* For now, do not test the preprocessor; as of 2007 there are too many
9001 implementations with broken preprocessors. Perhaps this can
9002 be revisited in 2012. In the meantime, code should not expect
9003 #if to work with literals wider than 32 bits. */
9004 /* Test literals. */
9005 long long int ll = 9223372036854775807ll;
9006 long long int nll = -9223372036854775807LL;
9007 unsigned long long int ull = 18446744073709551615ULL;
9008 /* Test constant expressions. */
9009 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
9010 ? 1 : -1)];
9011 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
9012 ? 1 : -1)];
9013 int i = 63;
9014int
9015main ()
9016{
9017/* Test availability of runtime routines for shift and division. */
9018 long long int llmax = 9223372036854775807ll;
9019 unsigned long long int ullmax = 18446744073709551615ull;
9020 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
9021 | (llmax / ll) | (llmax % ll)
9022 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
9023 | (ullmax / ull) | (ullmax % ull));
9024 ;
9025 return 0;
9026}
8690e634 9027
6ec2e0f5
SDJ
9028_ACEOF
9029if ac_fn_c_try_link "$LINENO"; then :
8690e634 9030
6ec2e0f5
SDJ
9031else
9032 ac_cv_type_unsigned_long_long_int=no
9033fi
9034rm -f core conftest.err conftest.$ac_objext \
9035 conftest$ac_exeext conftest.$ac_ext
9036 fi
9037fi
9038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
9039$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
9040 if test $ac_cv_type_unsigned_long_long_int = yes; then
8690e634 9041
6ec2e0f5 9042$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
8690e634 9043
6ec2e0f5 9044 fi
8690e634 9045
8690e634 9046
8690e634 9047
6ec2e0f5
SDJ
9048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
9049$as_echo_n "checking for long long int... " >&6; }
9050if test "${ac_cv_type_long_long_int+set}" = set; then :
9051 $as_echo_n "(cached) " >&6
9052else
9053 ac_cv_type_long_long_int=yes
9054 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
9055 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
9056 if test $ac_cv_type_long_long_int = yes; then
9057 if test "$cross_compiling" = yes; then :
9058 :
8690e634
JK
9059else
9060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9061/* end confdefs.h. */
6ec2e0f5
SDJ
9062#include <limits.h>
9063 #ifndef LLONG_MAX
9064 # define HALF \
9065 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
9066 # define LLONG_MAX (HALF - 1 + HALF)
9067 #endif
8690e634
JK
9068int
9069main ()
9070{
6ec2e0f5
SDJ
9071long long int n = 1;
9072 int i;
9073 for (i = 0; ; i++)
9074 {
9075 long long int m = n << i;
9076 if (m >> i != n)
9077 return 1;
9078 if (LLONG_MAX / 2 < m)
9079 break;
9080 }
9081 return 0;
8690e634
JK
9082 ;
9083 return 0;
9084}
9085_ACEOF
9086if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5
SDJ
9087
9088else
9089 ac_cv_type_long_long_int=no
8690e634
JK
9090fi
9091rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9092 conftest.$ac_objext conftest.beam conftest.$ac_ext
9093fi
9094
6ec2e0f5
SDJ
9095 fi
9096 fi
8690e634 9097fi
6ec2e0f5
SDJ
9098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
9099$as_echo "$ac_cv_type_long_long_int" >&6; }
9100 if test $ac_cv_type_long_long_int = yes; then
49e4877c 9101
6ec2e0f5 9102$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
49e4877c 9103
6ec2e0f5 9104 fi
49e4877c 9105
49e4877c
PA
9106
9107
49e4877c
PA
9108
9109
49e4877c 9110
6ec2e0f5
SDJ
9111 gl_cv_c_multiarch=no
9112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9113/* end confdefs.h. */
9114#ifndef __APPLE_CC__
9115 not a universal capable compiler
9116 #endif
9117 typedef int dummy;
49e4877c 9118
49e4877c
PA
9119_ACEOF
9120if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5
SDJ
9121
9122 arch=
9123 prev=
9124 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
9125 if test -n "$prev"; then
9126 case $word in
9127 i?86 | x86_64 | ppc | ppc64)
9128 if test -z "$arch" || test "$arch" = "$word"; then
9129 arch="$word"
9130 else
9131 gl_cv_c_multiarch=yes
9132 fi
9133 ;;
9134 esac
9135 prev=
9136 else
9137 if test "x$word" = "x-arch"; then
9138 prev=arch
9139 fi
9140 fi
9141 done
9142
49e4877c
PA
9143fi
9144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
9145 if test $gl_cv_c_multiarch = yes; then
9146 APPLE_UNIVERSAL_BUILD=1
9147 else
9148 APPLE_UNIVERSAL_BUILD=0
9149 fi
49e4877c 9150
49e4877c 9151
49e4877c
PA
9152
9153
49e4877c 9154
49e4877c 9155
49e4877c 9156
6ec2e0f5
SDJ
9157 if test $ac_cv_type_long_long_int = yes; then
9158 HAVE_LONG_LONG_INT=1
9159 else
9160 HAVE_LONG_LONG_INT=0
9161 fi
49e4877c 9162
49e4877c 9163
6ec2e0f5
SDJ
9164 if test $ac_cv_type_unsigned_long_long_int = yes; then
9165 HAVE_UNSIGNED_LONG_LONG_INT=1
8690e634 9166 else
6ec2e0f5
SDJ
9167 HAVE_UNSIGNED_LONG_LONG_INT=0
9168 fi
8690e634 9169
8690e634 9170
8690e634 9171
6ec2e0f5
SDJ
9172 if test $ac_cv_header_wchar_h = yes; then
9173 HAVE_WCHAR_H=1
9174 else
9175 HAVE_WCHAR_H=0
9176 fi
8690e634
JK
9177
9178
6ec2e0f5
SDJ
9179 if test $ac_cv_header_inttypes_h = yes; then
9180 HAVE_INTTYPES_H=1
9181 else
9182 HAVE_INTTYPES_H=0
9183 fi
8690e634
JK
9184
9185
6ec2e0f5
SDJ
9186 if test $ac_cv_header_sys_types_h = yes; then
9187 HAVE_SYS_TYPES_H=1
9188 else
9189 HAVE_SYS_TYPES_H=0
9190 fi
8690e634 9191
8690e634 9192
8690e634 9193
8690e634 9194
8690e634 9195
8690e634
JK
9196
9197
8690e634
JK
9198
9199
6ec2e0f5
SDJ
9200
9201
9202 if test $gl_cv_have_include_next = yes; then
9203 gl_cv_next_stdint_h='<'stdint.h'>'
9204 else
9205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
9206$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
9207if test "${gl_cv_next_stdint_h+set}" = set; then :
8690e634
JK
9208 $as_echo_n "(cached) " >&6
9209else
8690e634 9210
6ec2e0f5 9211 if test $ac_cv_header_stdint_h = yes; then
8690e634 9212
8690e634 9213
8690e634 9214
6ec2e0f5
SDJ
9215
9216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9217/* end confdefs.h. */
9218#include <stdint.h>
8690e634 9219_ACEOF
6ec2e0f5
SDJ
9220 case "$host_os" in
9221 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9222 *) gl_absname_cpp="$ac_cpp" ;;
9223 esac
8690e634 9224
6ec2e0f5
SDJ
9225 case "$host_os" in
9226 mingw*)
9227 gl_dirsep_regex='[/\\]'
9228 ;;
9229 *)
9230 gl_dirsep_regex='\/'
9231 ;;
9232 esac
9233 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9234 gl_header_literal_regex=`echo 'stdint.h' \
9235 | sed -e "$gl_make_literal_regex_sed"`
9236 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9237 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9238 s|^/[^/]|//&|
9239 p
9240 q
9241 }'
9242
9243 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9244 sed -n "$gl_absolute_header_sed"`
9245
9246 gl_header=$gl_cv_absolute_stdint_h
9247 gl_cv_next_stdint_h='"'$gl_header'"'
9248 else
9249 gl_cv_next_stdint_h='<'stdint.h'>'
9250 fi
9251
9252
9253fi
9254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
9255$as_echo "$gl_cv_next_stdint_h" >&6; }
9256 fi
9257 NEXT_STDINT_H=$gl_cv_next_stdint_h
9258
9259 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9260 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9261 gl_next_as_first_directive='<'stdint.h'>'
9262 else
9263 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9264 gl_next_as_first_directive=$gl_cv_next_stdint_h
9265 fi
9266 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
8690e634
JK
9267
9268
9269
9270
6ec2e0f5
SDJ
9271 if test $ac_cv_header_stdint_h = yes; then
9272 HAVE_STDINT_H=1
9273 else
9274 HAVE_STDINT_H=0
9275 fi
9276
9277
9278 if test $ac_cv_header_stdint_h = yes; then
9279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
9280$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
9281if test "${gl_cv_header_working_stdint_h+set}" = set; then :
8690e634
JK
9282 $as_echo_n "(cached) " >&6
9283else
6ec2e0f5
SDJ
9284 gl_cv_header_working_stdint_h=no
9285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
9286/* end confdefs.h. */
9287
6ec2e0f5
SDJ
9288
9289#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
9290#define __STDC_CONSTANT_MACROS 1
9291#define __STDC_LIMIT_MACROS 1
9292#include <stdint.h>
9293/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
9294#if !(defined WCHAR_MIN && defined WCHAR_MAX)
9295#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
9296#endif
9297
9298
8690e634
JK
9299 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9300 included before <wchar.h>. */
9301 #include <stddef.h>
9302 #include <signal.h>
9303 #if HAVE_WCHAR_H
9304 # include <stdio.h>
9305 # include <time.h>
9306 # include <wchar.h>
9307 #endif
9308
8690e634 9309
6ec2e0f5
SDJ
9310#ifdef INT8_MAX
9311int8_t a1 = INT8_MAX;
9312int8_t a1min = INT8_MIN;
9313#endif
9314#ifdef INT16_MAX
9315int16_t a2 = INT16_MAX;
9316int16_t a2min = INT16_MIN;
9317#endif
9318#ifdef INT32_MAX
9319int32_t a3 = INT32_MAX;
9320int32_t a3min = INT32_MIN;
9321#endif
9322#ifdef INT64_MAX
9323int64_t a4 = INT64_MAX;
9324int64_t a4min = INT64_MIN;
9325#endif
9326#ifdef UINT8_MAX
9327uint8_t b1 = UINT8_MAX;
9328#else
9329typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
9330#endif
9331#ifdef UINT16_MAX
9332uint16_t b2 = UINT16_MAX;
9333#endif
9334#ifdef UINT32_MAX
9335uint32_t b3 = UINT32_MAX;
9336#endif
9337#ifdef UINT64_MAX
9338uint64_t b4 = UINT64_MAX;
9339#endif
9340int_least8_t c1 = INT8_C (0x7f);
9341int_least8_t c1max = INT_LEAST8_MAX;
9342int_least8_t c1min = INT_LEAST8_MIN;
9343int_least16_t c2 = INT16_C (0x7fff);
9344int_least16_t c2max = INT_LEAST16_MAX;
9345int_least16_t c2min = INT_LEAST16_MIN;
9346int_least32_t c3 = INT32_C (0x7fffffff);
9347int_least32_t c3max = INT_LEAST32_MAX;
9348int_least32_t c3min = INT_LEAST32_MIN;
9349int_least64_t c4 = INT64_C (0x7fffffffffffffff);
9350int_least64_t c4max = INT_LEAST64_MAX;
9351int_least64_t c4min = INT_LEAST64_MIN;
9352uint_least8_t d1 = UINT8_C (0xff);
9353uint_least8_t d1max = UINT_LEAST8_MAX;
9354uint_least16_t d2 = UINT16_C (0xffff);
9355uint_least16_t d2max = UINT_LEAST16_MAX;
9356uint_least32_t d3 = UINT32_C (0xffffffff);
9357uint_least32_t d3max = UINT_LEAST32_MAX;
9358uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
9359uint_least64_t d4max = UINT_LEAST64_MAX;
9360int_fast8_t e1 = INT_FAST8_MAX;
9361int_fast8_t e1min = INT_FAST8_MIN;
9362int_fast16_t e2 = INT_FAST16_MAX;
9363int_fast16_t e2min = INT_FAST16_MIN;
9364int_fast32_t e3 = INT_FAST32_MAX;
9365int_fast32_t e3min = INT_FAST32_MIN;
9366int_fast64_t e4 = INT_FAST64_MAX;
9367int_fast64_t e4min = INT_FAST64_MIN;
9368uint_fast8_t f1 = UINT_FAST8_MAX;
9369uint_fast16_t f2 = UINT_FAST16_MAX;
9370uint_fast32_t f3 = UINT_FAST32_MAX;
9371uint_fast64_t f4 = UINT_FAST64_MAX;
9372#ifdef INTPTR_MAX
9373intptr_t g = INTPTR_MAX;
9374intptr_t gmin = INTPTR_MIN;
9375#endif
9376#ifdef UINTPTR_MAX
9377uintptr_t h = UINTPTR_MAX;
9378#endif
9379intmax_t i = INTMAX_MAX;
9380uintmax_t j = UINTMAX_MAX;
8690e634 9381
6ec2e0f5
SDJ
9382/* Check that SIZE_MAX has the correct type, if possible. */
9383#if 201112 <= __STDC_VERSION__
9384int k = _Generic (SIZE_MAX, size_t: 0);
9385#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
9386 || (0x5110 <= __SUNPRO_C && !__STDC__))
9387extern size_t k;
9388extern __typeof__ (SIZE_MAX) k;
9389#endif
8690e634 9390
6ec2e0f5
SDJ
9391#include <limits.h> /* for CHAR_BIT */
9392#define TYPE_MINIMUM(t) \
9393 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
9394#define TYPE_MAXIMUM(t) \
9395 ((t) ((t) 0 < (t) -1 \
9396 ? (t) -1 \
9397 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
9398struct s {
9399 int check_PTRDIFF:
9400 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
9401 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
9402 ? 1 : -1;
9403 /* Detect bug in FreeBSD 6.0 / ia64. */
9404 int check_SIG_ATOMIC:
9405 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
9406 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
9407 ? 1 : -1;
9408 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
9409 int check_WCHAR:
9410 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
9411 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
9412 ? 1 : -1;
9413 /* Detect bug in mingw. */
9414 int check_WINT:
9415 WINT_MIN == TYPE_MINIMUM (wint_t)
9416 && WINT_MAX == TYPE_MAXIMUM (wint_t)
9417 ? 1 : -1;
8690e634 9418
6ec2e0f5
SDJ
9419 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
9420 int check_UINT8_C:
9421 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
9422 int check_UINT16_C:
9423 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
8690e634 9424
6ec2e0f5
SDJ
9425 /* Detect bugs in OpenBSD 3.9 stdint.h. */
9426#ifdef UINT8_MAX
9427 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
9428#endif
9429#ifdef UINT16_MAX
9430 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
9431#endif
9432#ifdef UINT32_MAX
9433 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
9434#endif
9435#ifdef UINT64_MAX
9436 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
9437#endif
9438 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
9439 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
9440 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
9441 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
9442 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
9443 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
9444 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
9445 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
9446 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
9447 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
9448 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
9449};
8690e634 9450
8690e634
JK
9451int
9452main ()
9453{
9454
9455 ;
9456 return 0;
9457}
9458_ACEOF
9459if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5
SDJ
9460 if test "$cross_compiling" = yes; then :
9461 gl_cv_header_working_stdint_h=yes
8690e634 9462
6ec2e0f5
SDJ
9463else
9464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9465/* end confdefs.h. */
8690e634 9466
8690e634 9467
6ec2e0f5
SDJ
9468#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
9469#define __STDC_CONSTANT_MACROS 1
9470#define __STDC_LIMIT_MACROS 1
9471#include <stdint.h>
8690e634 9472
8690e634
JK
9473
9474 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9475 included before <wchar.h>. */
9476 #include <stddef.h>
9477 #include <signal.h>
9478 #if HAVE_WCHAR_H
9479 # include <stdio.h>
9480 # include <time.h>
9481 # include <wchar.h>
9482 #endif
9483
8690e634 9484
6ec2e0f5
SDJ
9485#include <stdio.h>
9486#include <string.h>
9487#define MVAL(macro) MVAL1(macro)
9488#define MVAL1(expression) #expression
9489static const char *macro_values[] =
9490 {
9491#ifdef INT8_MAX
9492 MVAL (INT8_MAX),
9493#endif
9494#ifdef INT16_MAX
9495 MVAL (INT16_MAX),
9496#endif
9497#ifdef INT32_MAX
9498 MVAL (INT32_MAX),
9499#endif
9500#ifdef INT64_MAX
9501 MVAL (INT64_MAX),
9502#endif
9503#ifdef UINT8_MAX
9504 MVAL (UINT8_MAX),
9505#endif
9506#ifdef UINT16_MAX
9507 MVAL (UINT16_MAX),
9508#endif
9509#ifdef UINT32_MAX
9510 MVAL (UINT32_MAX),
9511#endif
9512#ifdef UINT64_MAX
9513 MVAL (UINT64_MAX),
9514#endif
9515 NULL
9516 };
9517
9518int
9519main ()
9520{
9521
9522 const char **mv;
9523 for (mv = macro_values; *mv != NULL; mv++)
9524 {
9525 const char *value = *mv;
9526 /* Test whether it looks like a cast expression. */
9527 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
9528 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
9529 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
9530 || strncmp (value, "((int)"/*)*/, 6) == 0
9531 || strncmp (value, "((signed short)"/*)*/, 15) == 0
9532 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
9533 return mv - macro_values + 1;
9534 }
9535 return 0;
9536
9537 ;
8690e634
JK
9538 return 0;
9539}
9540_ACEOF
6ec2e0f5
SDJ
9541if ac_fn_c_try_run "$LINENO"; then :
9542 gl_cv_header_working_stdint_h=yes
8690e634 9543fi
6ec2e0f5
SDJ
9544rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9545 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 9546fi
8690e634
JK
9547
9548
6ec2e0f5
SDJ
9549fi
9550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 9551
6ec2e0f5
SDJ
9552fi
9553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
9554$as_echo "$gl_cv_header_working_stdint_h" >&6; }
8690e634
JK
9555 fi
9556
6ec2e0f5
SDJ
9557 HAVE_C99_STDINT_H=0
9558 HAVE_SYS_BITYPES_H=0
9559 HAVE_SYS_INTTYPES_H=0
9560 STDINT_H=stdint.h
9561 if test "$gl_cv_header_working_stdint_h" = yes; then
9562 HAVE_C99_STDINT_H=1
9563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
9564$as_echo_n "checking whether stdint.h predates C++11... " >&6; }
9565if test "${gl_cv_header_stdint_predates_cxx11_h+set}" = set; then :
9566 $as_echo_n "(cached) " >&6
49e4877c 9567else
6ec2e0f5
SDJ
9568 gl_cv_header_stdint_predates_cxx11_h=yes
9569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9570/* end confdefs.h. */
49e4877c
PA
9571
9572
6ec2e0f5
SDJ
9573#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
9574#include <stdint.h>
49e4877c
PA
9575
9576
6ec2e0f5
SDJ
9577 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9578 included before <wchar.h>. */
9579 #include <stddef.h>
9580 #include <signal.h>
9581 #if HAVE_WCHAR_H
9582 # include <stdio.h>
9583 # include <time.h>
9584 # include <wchar.h>
9585 #endif
49e4877c 9586
8690e634 9587
6ec2e0f5
SDJ
9588intmax_t im = INTMAX_MAX;
9589int32_t i32 = INT32_C (0x7fffffff);
8690e634 9590
6ec2e0f5
SDJ
9591int
9592main ()
9593{
8690e634 9594
6ec2e0f5
SDJ
9595 ;
9596 return 0;
9597}
9598_ACEOF
9599if ac_fn_c_try_compile "$LINENO"; then :
9600 gl_cv_header_stdint_predates_cxx11_h=no
9601fi
9602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9603fi
9604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
9605$as_echo "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
8690e634 9606
6ec2e0f5 9607 if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
8690e634 9608
6ec2e0f5 9609$as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
8690e634
JK
9610
9611
6ec2e0f5 9612$as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
8690e634 9613
6ec2e0f5
SDJ
9614 fi
9615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
9616$as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
9617if test "${gl_cv_header_stdint_width+set}" = set; then :
9618 $as_echo_n "(cached) " >&6
9619else
9620 gl_cv_header_stdint_width=no
9621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9622/* end confdefs.h. */
8690e634 9623
6ec2e0f5
SDJ
9624 /* Work if build is not clean. */
9625 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
9626 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
9627 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
9628 #endif
9629 #include <stdint.h>
8690e634 9630
6ec2e0f5
SDJ
9631 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9632 included before <wchar.h>. */
9633 #include <stddef.h>
9634 #include <signal.h>
9635 #if HAVE_WCHAR_H
9636 # include <stdio.h>
9637 # include <time.h>
9638 # include <wchar.h>
9639 #endif
8690e634 9640
6ec2e0f5 9641 int iw = UINTMAX_WIDTH;
8690e634 9642
6ec2e0f5
SDJ
9643int
9644main ()
9645{
8690e634 9646
6ec2e0f5
SDJ
9647 ;
9648 return 0;
9649}
9650_ACEOF
9651if ac_fn_c_try_compile "$LINENO"; then :
9652 gl_cv_header_stdint_width=yes
9653fi
9654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9655fi
9656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
9657$as_echo "$gl_cv_header_stdint_width" >&6; }
9658 if test "$gl_cv_header_stdint_width" = yes; then
9659 STDINT_H=
9660 fi
9661 else
9662 for ac_header in sys/inttypes.h sys/bitypes.h
9663do :
9664 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9665ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9666eval as_val=\$$as_ac_Header
9667 if test "x$as_val" = x""yes; then :
9668 cat >>confdefs.h <<_ACEOF
9669#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9670_ACEOF
8690e634 9671
6ec2e0f5 9672fi
8690e634 9673
6ec2e0f5 9674done
8690e634 9675
6ec2e0f5
SDJ
9676 if test $ac_cv_header_sys_inttypes_h = yes; then
9677 HAVE_SYS_INTTYPES_H=1
9678 fi
9679 if test $ac_cv_header_sys_bitypes_h = yes; then
9680 HAVE_SYS_BITYPES_H=1
9681 fi
8690e634
JK
9682
9683
6ec2e0f5 9684 if test $APPLE_UNIVERSAL_BUILD = 0; then
8690e634
JK
9685
9686
6ec2e0f5
SDJ
9687 for gltype in ptrdiff_t size_t ; do
9688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
9689$as_echo_n "checking for bit size of $gltype... " >&6; }
9690if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
8690e634
JK
9691 $as_echo_n "(cached) " >&6
9692else
6ec2e0f5
SDJ
9693 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
9694 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9695 included before <wchar.h>. */
9696 #include <stddef.h>
9697 #include <signal.h>
9698 #if HAVE_WCHAR_H
9699 # include <stdio.h>
9700 # include <time.h>
9701 # include <wchar.h>
9702 #endif
8690e634 9703
6ec2e0f5 9704#include <limits.h>"; then :
4a626d0a 9705
6ec2e0f5
SDJ
9706else
9707 result=unknown
9708fi
4a626d0a 9709
6ec2e0f5 9710 eval gl_cv_bitsizeof_${gltype}=\$result
4a626d0a 9711
6ec2e0f5
SDJ
9712fi
9713eval ac_res=\$gl_cv_bitsizeof_${gltype}
9714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9715$as_echo "$ac_res" >&6; }
9716 eval result=\$gl_cv_bitsizeof_${gltype}
9717 if test $result = unknown; then
9718 result=0
9719 fi
9720 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
9721 cat >>confdefs.h <<_ACEOF
9722#define BITSIZEOF_${GLTYPE} $result
9723_ACEOF
4a626d0a 9724
6ec2e0f5
SDJ
9725 eval BITSIZEOF_${GLTYPE}=\$result
9726 done
4a626d0a 9727
8690e634 9728
6ec2e0f5 9729 fi
8690e634 9730
8690e634 9731
6ec2e0f5
SDJ
9732 for gltype in sig_atomic_t wchar_t wint_t ; do
9733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
9734$as_echo_n "checking for bit size of $gltype... " >&6; }
9735if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
9736 $as_echo_n "(cached) " >&6
9737else
9738 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
9739 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9740 included before <wchar.h>. */
9741 #include <stddef.h>
9742 #include <signal.h>
9743 #if HAVE_WCHAR_H
9744 # include <stdio.h>
9745 # include <time.h>
9746 # include <wchar.h>
9747 #endif
8690e634 9748
6ec2e0f5
SDJ
9749#include <limits.h>"; then :
9750
9751else
9752 result=unknown
9753fi
8690e634 9754
6ec2e0f5 9755 eval gl_cv_bitsizeof_${gltype}=\$result
8690e634 9756
6ec2e0f5
SDJ
9757fi
9758eval ac_res=\$gl_cv_bitsizeof_${gltype}
9759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9760$as_echo "$ac_res" >&6; }
9761 eval result=\$gl_cv_bitsizeof_${gltype}
9762 if test $result = unknown; then
9763 result=0
9764 fi
9765 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
9766 cat >>confdefs.h <<_ACEOF
9767#define BITSIZEOF_${GLTYPE} $result
9768_ACEOF
8690e634 9769
6ec2e0f5
SDJ
9770 eval BITSIZEOF_${GLTYPE}=\$result
9771 done
8690e634
JK
9772
9773
9774
9775
6ec2e0f5
SDJ
9776 for gltype in sig_atomic_t wchar_t wint_t ; do
9777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
9778$as_echo_n "checking whether $gltype is signed... " >&6; }
9779if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
8690e634
JK
9780 $as_echo_n "(cached) " >&6
9781else
9782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9783/* end confdefs.h. */
8690e634 9784
6ec2e0f5
SDJ
9785 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9786 included before <wchar.h>. */
9787 #include <stddef.h>
9788 #include <signal.h>
9789 #if HAVE_WCHAR_H
9790 # include <stdio.h>
9791 # include <time.h>
9792 # include <wchar.h>
9793 #endif
9794
9795 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
8690e634
JK
9796int
9797main ()
9798{
6ec2e0f5 9799
8690e634
JK
9800 ;
9801 return 0;
9802}
9803_ACEOF
9804if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 9805 result=yes
8690e634 9806else
6ec2e0f5 9807 result=no
8690e634
JK
9808fi
9809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
9810 eval gl_cv_type_${gltype}_signed=\$result
9811
8690e634 9812fi
6ec2e0f5 9813eval ac_res=\$gl_cv_type_${gltype}_signed
8690e634
JK
9814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9815$as_echo "$ac_res" >&6; }
6ec2e0f5
SDJ
9816 eval result=\$gl_cv_type_${gltype}_signed
9817 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
9818 if test "$result" = yes; then
9819 cat >>confdefs.h <<_ACEOF
9820#define HAVE_SIGNED_${GLTYPE} 1
8690e634
JK
9821_ACEOF
9822
6ec2e0f5
SDJ
9823 eval HAVE_SIGNED_${GLTYPE}=1
9824 else
9825 eval HAVE_SIGNED_${GLTYPE}=0
9826 fi
9827 done
8690e634 9828
8690e634 9829
6ec2e0f5
SDJ
9830 gl_cv_type_ptrdiff_t_signed=yes
9831 gl_cv_type_size_t_signed=no
9832 if test $APPLE_UNIVERSAL_BUILD = 0; then
8690e634 9833
8690e634 9834
6ec2e0f5
SDJ
9835 for gltype in ptrdiff_t size_t ; do
9836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
9837$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
9838if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
8690e634
JK
9839 $as_echo_n "(cached) " >&6
9840else
6ec2e0f5
SDJ
9841 eval gl_cv_type_${gltype}_suffix=no
9842 eval result=\$gl_cv_type_${gltype}_signed
9843 if test "$result" = yes; then
9844 glsufu=
9845 else
9846 glsufu=u
9847 fi
9848 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
9849 case $glsuf in
9850 '') gltype1='int';;
9851 l) gltype1='long int';;
9852 ll) gltype1='long long int';;
9853 i64) gltype1='__int64';;
9854 u) gltype1='unsigned int';;
9855 ul) gltype1='unsigned long int';;
9856 ull) gltype1='unsigned long long int';;
9857 ui64)gltype1='unsigned __int64';;
9858 esac
9859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
9860/* end confdefs.h. */
9861
6ec2e0f5
SDJ
9862 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9863 included before <wchar.h>. */
9864 #include <stddef.h>
9865 #include <signal.h>
9866 #if HAVE_WCHAR_H
9867 # include <stdio.h>
9868 # include <time.h>
9869 # include <wchar.h>
9870 #endif
8690e634 9871
6ec2e0f5
SDJ
9872 extern $gltype foo;
9873 extern $gltype1 foo;
8690e634
JK
9874int
9875main ()
9876{
9877
9878 ;
9879 return 0;
9880}
9881_ACEOF
9882if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 9883 eval gl_cv_type_${gltype}_suffix=\$glsuf
8690e634
JK
9884fi
9885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
9886 eval result=\$gl_cv_type_${gltype}_suffix
9887 test "$result" != no && break
9888 done
8690e634 9889fi
6ec2e0f5
SDJ
9890eval ac_res=\$gl_cv_type_${gltype}_suffix
9891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9892$as_echo "$ac_res" >&6; }
9893 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
9894 eval result=\$gl_cv_type_${gltype}_suffix
9895 test "$result" = no && result=
9896 eval ${GLTYPE}_SUFFIX=\$result
9897 cat >>confdefs.h <<_ACEOF
9898#define ${GLTYPE}_SUFFIX $result
8690e634
JK
9899_ACEOF
9900
6ec2e0f5 9901 done
8690e634
JK
9902
9903
6ec2e0f5 9904 fi
8690e634 9905
6ec2e0f5
SDJ
9906
9907 for gltype in sig_atomic_t wchar_t wint_t ; do
9908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
9909$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
9910if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
8690e634
JK
9911 $as_echo_n "(cached) " >&6
9912else
6ec2e0f5
SDJ
9913 eval gl_cv_type_${gltype}_suffix=no
9914 eval result=\$gl_cv_type_${gltype}_signed
9915 if test "$result" = yes; then
9916 glsufu=
9917 else
9918 glsufu=u
9919 fi
9920 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
9921 case $glsuf in
9922 '') gltype1='int';;
9923 l) gltype1='long int';;
9924 ll) gltype1='long long int';;
9925 i64) gltype1='__int64';;
9926 u) gltype1='unsigned int';;
9927 ul) gltype1='unsigned long int';;
9928 ull) gltype1='unsigned long long int';;
9929 ui64)gltype1='unsigned __int64';;
9930 esac
9931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 9932/* end confdefs.h. */
88b48903 9933
6ec2e0f5
SDJ
9934 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9935 included before <wchar.h>. */
9936 #include <stddef.h>
9937 #include <signal.h>
9938 #if HAVE_WCHAR_H
9939 # include <stdio.h>
9940 # include <time.h>
9941 # include <wchar.h>
9942 #endif
88b48903 9943
6ec2e0f5
SDJ
9944 extern $gltype foo;
9945 extern $gltype1 foo;
88b48903
WN
9946int
9947main ()
9948{
88b48903
WN
9949
9950 ;
9951 return 0;
9952}
9953_ACEOF
9954if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 9955 eval gl_cv_type_${gltype}_suffix=\$glsuf
8690e634 9956fi
88b48903 9957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
9958 eval result=\$gl_cv_type_${gltype}_suffix
9959 test "$result" != no && break
9960 done
8690e634 9961fi
6ec2e0f5
SDJ
9962eval ac_res=\$gl_cv_type_${gltype}_suffix
9963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9964$as_echo "$ac_res" >&6; }
9965 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
9966 eval result=\$gl_cv_type_${gltype}_suffix
9967 test "$result" = no && result=
9968 eval ${GLTYPE}_SUFFIX=\$result
9969 cat >>confdefs.h <<_ACEOF
9970#define ${GLTYPE}_SUFFIX $result
88b48903 9971_ACEOF
8690e634 9972
6ec2e0f5 9973 done
8690e634
JK
9974
9975
9976
6ec2e0f5
SDJ
9977 if test $BITSIZEOF_WINT_T -lt 32; then
9978 BITSIZEOF_WINT_T=32
9979 fi
8690e634 9980
6ec2e0f5
SDJ
9981 fi
9982
9983 # The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH.
9984 LIMITS_H=limits.h
9985 if test -n "$LIMITS_H"; then
9986 GL_GENERATE_LIMITS_H_TRUE=
9987 GL_GENERATE_LIMITS_H_FALSE='#'
88b48903 9988else
6ec2e0f5
SDJ
9989 GL_GENERATE_LIMITS_H_TRUE='#'
9990 GL_GENERATE_LIMITS_H_FALSE=
88b48903 9991fi
8690e634
JK
9992
9993
9994
9995
9996
6ec2e0f5
SDJ
9997
9998 if test -n "$STDINT_H"; then
9999 GL_GENERATE_STDINT_H_TRUE=
10000 GL_GENERATE_STDINT_H_FALSE='#'
10001else
10002 GL_GENERATE_STDINT_H_TRUE='#'
10003 GL_GENERATE_STDINT_H_FALSE=
88b48903 10004fi
8690e634 10005
8690e634
JK
10006
10007
10008
6ec2e0f5
SDJ
10009
10010 GNULIB_IMAXABS=0;
10011 GNULIB_IMAXDIV=0;
10012 GNULIB_STRTOIMAX=0;
10013 GNULIB_STRTOUMAX=0;
10014 HAVE_DECL_IMAXABS=1;
10015 HAVE_DECL_IMAXDIV=1;
10016 HAVE_DECL_STRTOIMAX=1;
10017 HAVE_DECL_STRTOUMAX=1;
10018 REPLACE_STRTOIMAX=0;
10019 REPLACE_STRTOUMAX=0;
10020 INT32_MAX_LT_INTMAX_MAX=1;
10021 INT64_MAX_EQ_LONG_MAX='defined _LP64';
10022 PRI_MACROS_BROKEN=0;
10023 PRIPTR_PREFIX=__PRIPTR_PREFIX;
10024 UINT32_MAX_LT_UINTMAX_MAX=1;
10025 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041 if test $gl_cv_have_include_next = yes; then
10042 gl_cv_next_inttypes_h='<'inttypes.h'>'
10043 else
10044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
10045$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
10046if test "${gl_cv_next_inttypes_h+set}" = set; then :
10047 $as_echo_n "(cached) " >&6
88b48903 10048else
8690e634 10049
6ec2e0f5 10050 if test $ac_cv_header_inttypes_h = yes; then
8690e634
JK
10051
10052
8690e634
JK
10053
10054
6ec2e0f5
SDJ
10055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10056/* end confdefs.h. */
10057#include <inttypes.h>
88b48903 10058_ACEOF
6ec2e0f5
SDJ
10059 case "$host_os" in
10060 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10061 *) gl_absname_cpp="$ac_cpp" ;;
10062 esac
8690e634 10063
6ec2e0f5
SDJ
10064 case "$host_os" in
10065 mingw*)
10066 gl_dirsep_regex='[/\\]'
10067 ;;
10068 *)
10069 gl_dirsep_regex='\/'
88b48903
WN
10070 ;;
10071 esac
6ec2e0f5
SDJ
10072 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10073 gl_header_literal_regex=`echo 'inttypes.h' \
10074 | sed -e "$gl_make_literal_regex_sed"`
10075 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10076 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10077 s|^/[^/]|//&|
10078 p
10079 q
10080 }'
8690e634 10081
6ec2e0f5
SDJ
10082 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10083 sed -n "$gl_absolute_header_sed"`
8690e634 10084
6ec2e0f5
SDJ
10085 gl_header=$gl_cv_absolute_inttypes_h
10086 gl_cv_next_inttypes_h='"'$gl_header'"'
10087 else
10088 gl_cv_next_inttypes_h='<'inttypes.h'>'
10089 fi
88b48903 10090
88b48903 10091
88b48903 10092fi
6ec2e0f5
SDJ
10093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
10094$as_echo "$gl_cv_next_inttypes_h" >&6; }
10095 fi
10096 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
88b48903 10097
6ec2e0f5
SDJ
10098 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10099 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10100 gl_next_as_first_directive='<'inttypes.h'>'
10101 else
10102 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10103 gl_next_as_first_directive=$gl_cv_next_inttypes_h
10104 fi
10105 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
88b48903 10106
6ec2e0f5
SDJ
10107
10108
10109
10110
10111
10112
10113
10114 for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
10115 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
10116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
10117$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
10118if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
10119 $as_echo_n "(cached) " >&6
10120else
10121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
88b48903 10122/* end confdefs.h. */
6ec2e0f5 10123#include <inttypes.h>
88b48903
WN
10124
10125int
10126main ()
10127{
6ec2e0f5
SDJ
10128#undef $gl_func
10129 (void) $gl_func;
88b48903
WN
10130 ;
10131 return 0;
10132}
10133_ACEOF
10134if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 10135 eval "$as_gl_Symbol=yes"
88b48903 10136else
6ec2e0f5 10137 eval "$as_gl_Symbol=no"
88b48903
WN
10138fi
10139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10140fi
6ec2e0f5
SDJ
10141eval ac_res=\$$as_gl_Symbol
10142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10143$as_echo "$ac_res" >&6; }
10144 eval as_val=\$$as_gl_Symbol
10145 if test "x$as_val" = x""yes; then :
10146 cat >>confdefs.h <<_ACEOF
10147#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
10148_ACEOF
10149
10150 eval ac_cv_have_decl_$gl_func=yes
10151fi
10152 done
10153
10154
10155
10156 for ac_header in inttypes.h
10157do :
10158 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
10159if test "x$ac_cv_header_inttypes_h" = x""yes; then :
10160 cat >>confdefs.h <<_ACEOF
10161#define HAVE_INTTYPES_H 1
10162_ACEOF
10163
10164fi
10165
10166done
10167
10168 if test $ac_cv_header_inttypes_h = yes; then
10169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
10170$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
10171if test "${gt_cv_inttypes_pri_broken+set}" = set; then :
10172 $as_echo_n "(cached) " >&6
10173else
10174
10175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10176/* end confdefs.h. */
10177
10178#include <inttypes.h>
10179#ifdef PRId32
10180char *p = PRId32;
10181#endif
10182
10183int
10184main ()
10185{
10186
10187 ;
10188 return 0;
10189}
10190_ACEOF
10191if ac_fn_c_try_compile "$LINENO"; then :
10192 gt_cv_inttypes_pri_broken=no
10193else
10194 gt_cv_inttypes_pri_broken=yes
10195fi
10196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10197
10198fi
10199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
10200$as_echo "$gt_cv_inttypes_pri_broken" >&6; }
10201 fi
10202 if test "$gt_cv_inttypes_pri_broken" = yes; then
10203
10204cat >>confdefs.h <<_ACEOF
10205#define PRI_MACROS_BROKEN 1
10206_ACEOF
10207
10208 PRI_MACROS_BROKEN=1
10209 else
10210 PRI_MACROS_BROKEN=0
10211 fi
10212
10213
10214
10215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
10216$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
10217if test "${gl_cv_cc_double_expbit0+set}" = set; then :
10218 $as_echo_n "(cached) " >&6
10219else
10220
10221 if test "$cross_compiling" = yes; then :
10222
10223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10224/* end confdefs.h. */
10225
10226#if defined arm || defined __arm || defined __arm__
10227 mixed_endianness
10228#endif
10229
10230_ACEOF
10231if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10232 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
10233 gl_cv_cc_double_expbit0="unknown"
10234else
10235
10236 :
10237if test "${ac_cv_c_bigendian+set}" = set; then :
10238 $as_echo_n "(cached) " >&6
10239else
10240 ac_cv_c_bigendian=unknown
10241 # See if we're dealing with a universal compiler.
10242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10243/* end confdefs.h. */
10244#ifndef __APPLE_CC__
10245 not a universal capable compiler
10246 #endif
10247 typedef int dummy;
10248
10249_ACEOF
10250if ac_fn_c_try_compile "$LINENO"; then :
10251
10252 # Check for potential -arch flags. It is not universal unless
10253 # there are at least two -arch flags with different values.
10254 ac_arch=
10255 ac_prev=
10256 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
10257 if test -n "$ac_prev"; then
10258 case $ac_word in
10259 i?86 | x86_64 | ppc | ppc64)
10260 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
10261 ac_arch=$ac_word
10262 else
10263 ac_cv_c_bigendian=universal
10264 break
10265 fi
10266 ;;
10267 esac
10268 ac_prev=
10269 elif test "x$ac_word" = "x-arch"; then
10270 ac_prev=arch
10271 fi
10272 done
10273fi
10274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10275 if test $ac_cv_c_bigendian = unknown; then
10276 # See if sys/param.h defines the BYTE_ORDER macro.
10277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10278/* end confdefs.h. */
10279#include <sys/types.h>
10280 #include <sys/param.h>
10281
10282int
10283main ()
10284{
10285#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
10286 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
10287 && LITTLE_ENDIAN)
10288 bogus endian macros
10289 #endif
10290
10291 ;
10292 return 0;
10293}
10294_ACEOF
10295if ac_fn_c_try_compile "$LINENO"; then :
10296 # It does; now see whether it defined to BIG_ENDIAN or not.
10297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10298/* end confdefs.h. */
10299#include <sys/types.h>
10300 #include <sys/param.h>
10301
10302int
10303main ()
10304{
10305#if BYTE_ORDER != BIG_ENDIAN
10306 not big endian
10307 #endif
10308
10309 ;
10310 return 0;
10311}
10312_ACEOF
10313if ac_fn_c_try_compile "$LINENO"; then :
10314 ac_cv_c_bigendian=yes
10315else
10316 ac_cv_c_bigendian=no
10317fi
10318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10319fi
10320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10321 fi
10322 if test $ac_cv_c_bigendian = unknown; then
10323 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
10324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10325/* end confdefs.h. */
10326#include <limits.h>
10327
10328int
88b48903
WN
10329main ()
10330{
10331#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
10332 bogus endian macros
10333 #endif
10334
10335 ;
10336 return 0;
10337}
10338_ACEOF
10339if ac_fn_c_try_compile "$LINENO"; then :
10340 # It does; now see whether it defined to _BIG_ENDIAN or not.
10341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10342/* end confdefs.h. */
10343#include <limits.h>
10344
10345int
10346main ()
10347{
10348#ifndef _BIG_ENDIAN
10349 not big endian
10350 #endif
10351
10352 ;
10353 return 0;
10354}
10355_ACEOF
10356if ac_fn_c_try_compile "$LINENO"; then :
10357 ac_cv_c_bigendian=yes
10358else
10359 ac_cv_c_bigendian=no
10360fi
10361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10362fi
10363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10364 fi
10365 if test $ac_cv_c_bigendian = unknown; then
10366 # Compile a test program.
10367 if test "$cross_compiling" = yes; then :
10368 # Try to guess by grepping values from an object file.
10369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10370/* end confdefs.h. */
10371short int ascii_mm[] =
10372 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
10373 short int ascii_ii[] =
10374 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
10375 int use_ascii (int i) {
10376 return ascii_mm[i] + ascii_ii[i];
10377 }
10378 short int ebcdic_ii[] =
10379 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
10380 short int ebcdic_mm[] =
10381 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
10382 int use_ebcdic (int i) {
10383 return ebcdic_mm[i] + ebcdic_ii[i];
10384 }
10385 extern int foo;
10386
10387int
10388main ()
10389{
10390return use_ascii (foo) == use_ebcdic (foo);
10391 ;
10392 return 0;
10393}
10394_ACEOF
10395if ac_fn_c_try_compile "$LINENO"; then :
10396 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
10397 ac_cv_c_bigendian=yes
10398 fi
10399 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
10400 if test "$ac_cv_c_bigendian" = unknown; then
10401 ac_cv_c_bigendian=no
10402 else
10403 # finding both strings is unlikely to happen, but who knows?
10404 ac_cv_c_bigendian=unknown
10405 fi
10406 fi
10407fi
10408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10409else
10410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10411/* end confdefs.h. */
10412$ac_includes_default
10413int
10414main ()
10415{
10416
10417 /* Are we little or big endian? From Harbison&Steele. */
10418 union
10419 {
10420 long int l;
10421 char c[sizeof (long int)];
10422 } u;
10423 u.l = 1;
10424 return u.c[sizeof (long int) - 1] == 1;
10425
10426 ;
10427 return 0;
10428}
10429_ACEOF
10430if ac_fn_c_try_run "$LINENO"; then :
10431 ac_cv_c_bigendian=no
10432else
10433 ac_cv_c_bigendian=yes
10434fi
10435rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10436 conftest.$ac_objext conftest.beam conftest.$ac_ext
10437fi
10438
10439 fi
10440fi
6ec2e0f5 10441:
88b48903
WN
10442 case $ac_cv_c_bigendian in #(
10443 yes)
6ec2e0f5 10444 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
88b48903 10445 no)
6ec2e0f5 10446 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
88b48903
WN
10447 universal)
10448
10449$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
10450
10451 ;; #(
10452 *)
6ec2e0f5 10453 gl_cv_cc_double_expbit0="unknown" ;;
88b48903
WN
10454 esac
10455
10456
6ec2e0f5
SDJ
10457fi
10458rm -f conftest*
88b48903 10459
2196f55f 10460
2196f55f
YQ
10461else
10462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10463/* end confdefs.h. */
2196f55f 10464
6ec2e0f5
SDJ
10465#include <float.h>
10466#include <stddef.h>
10467#include <stdio.h>
10468#include <string.h>
10469#define NWORDS \
10470 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
10471typedef union { double value; unsigned int word[NWORDS]; } memory_double;
10472static unsigned int ored_words[NWORDS];
10473static unsigned int anded_words[NWORDS];
10474static void add_to_ored_words (double x)
2196f55f 10475{
6ec2e0f5
SDJ
10476 memory_double m;
10477 size_t i;
10478 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
10479 memset (&m, 0, sizeof (memory_double));
10480 m.value = x;
10481 for (i = 0; i < NWORDS; i++)
10482 {
10483 ored_words[i] |= m.word[i];
10484 anded_words[i] &= m.word[i];
10485 }
2196f55f 10486}
6ec2e0f5 10487int main ()
88b48903 10488{
6ec2e0f5
SDJ
10489 size_t j;
10490 FILE *fp = fopen ("conftest.out", "w");
10491 if (fp == NULL)
10492 return 1;
10493 for (j = 0; j < NWORDS; j++)
10494 anded_words[j] = ~ (unsigned int) 0;
10495 add_to_ored_words (0.25);
10496 add_to_ored_words (0.5);
10497 add_to_ored_words (1.0);
10498 add_to_ored_words (2.0);
10499 add_to_ored_words (4.0);
10500 /* Remove bits that are common (e.g. if representation of the first mantissa
10501 bit is explicit). */
10502 for (j = 0; j < NWORDS; j++)
10503 ored_words[j] &= ~anded_words[j];
10504 /* Now find the nonzero word. */
10505 for (j = 0; j < NWORDS; j++)
10506 if (ored_words[j] != 0)
10507 break;
10508 if (j < NWORDS)
10509 {
10510 size_t i;
10511 for (i = j + 1; i < NWORDS; i++)
10512 if (ored_words[i] != 0)
10513 {
10514 fprintf (fp, "unknown");
10515 return (fclose (fp) != 0);
10516 }
10517 for (i = 0; ; i++)
10518 if ((ored_words[j] >> i) & 1)
10519 {
10520 fprintf (fp, "word %d bit %d", (int) j, (int) i);
10521 return (fclose (fp) != 0);
10522 }
10523 }
10524 fprintf (fp, "unknown");
10525 return (fclose (fp) != 0);
88b48903 10526}
6ec2e0f5 10527
88b48903 10528_ACEOF
6ec2e0f5
SDJ
10529if ac_fn_c_try_run "$LINENO"; then :
10530 gl_cv_cc_double_expbit0=`cat conftest.out`
88b48903 10531else
6ec2e0f5 10532 gl_cv_cc_double_expbit0="unknown"
88b48903 10533fi
6ec2e0f5
SDJ
10534rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10535 conftest.$ac_objext conftest.beam conftest.$ac_ext
10536fi
10537
10538 rm -f conftest.out
88b48903
WN
10539
10540fi
6ec2e0f5
SDJ
10541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
10542$as_echo "$gl_cv_cc_double_expbit0" >&6; }
10543 case "$gl_cv_cc_double_expbit0" in
10544 word*bit*)
10545 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
10546 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
88b48903 10547
6ec2e0f5
SDJ
10548cat >>confdefs.h <<_ACEOF
10549#define DBL_EXPBIT0_WORD $word
10550_ACEOF
88b48903 10551
88b48903 10552
6ec2e0f5
SDJ
10553cat >>confdefs.h <<_ACEOF
10554#define DBL_EXPBIT0_BIT $bit
10555_ACEOF
88b48903 10556
6ec2e0f5
SDJ
10557 ;;
10558 esac
88b48903
WN
10559
10560
6ec2e0f5
SDJ
10561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
10562$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
10563if test "${ac_cv_c_bigendian+set}" = set; then :
10564 $as_echo_n "(cached) " >&6
10565else
10566 ac_cv_c_bigendian=unknown
10567 # See if we're dealing with a universal compiler.
10568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10569/* end confdefs.h. */
10570#ifndef __APPLE_CC__
10571 not a universal capable compiler
10572 #endif
10573 typedef int dummy;
88b48903 10574
6ec2e0f5
SDJ
10575_ACEOF
10576if ac_fn_c_try_compile "$LINENO"; then :
88b48903 10577
6ec2e0f5
SDJ
10578 # Check for potential -arch flags. It is not universal unless
10579 # there are at least two -arch flags with different values.
10580 ac_arch=
10581 ac_prev=
10582 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
10583 if test -n "$ac_prev"; then
10584 case $ac_word in
10585 i?86 | x86_64 | ppc | ppc64)
10586 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
10587 ac_arch=$ac_word
10588 else
10589 ac_cv_c_bigendian=universal
10590 break
10591 fi
10592 ;;
10593 esac
10594 ac_prev=
10595 elif test "x$ac_word" = "x-arch"; then
10596 ac_prev=arch
10597 fi
10598 done
10599fi
10600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10601 if test $ac_cv_c_bigendian = unknown; then
10602 # See if sys/param.h defines the BYTE_ORDER macro.
10603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10604/* end confdefs.h. */
10605#include <sys/types.h>
10606 #include <sys/param.h>
88b48903 10607
6ec2e0f5
SDJ
10608int
10609main ()
10610{
10611#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
10612 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
10613 && LITTLE_ENDIAN)
10614 bogus endian macros
10615 #endif
88b48903 10616
6ec2e0f5
SDJ
10617 ;
10618 return 0;
10619}
10620_ACEOF
10621if ac_fn_c_try_compile "$LINENO"; then :
10622 # It does; now see whether it defined to BIG_ENDIAN or not.
10623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
88b48903
WN
10624/* end confdefs.h. */
10625#include <sys/types.h>
6ec2e0f5 10626 #include <sys/param.h>
8690e634
JK
10627
10628int
10629main ()
10630{
6ec2e0f5
SDJ
10631#if BYTE_ORDER != BIG_ENDIAN
10632 not big endian
10633 #endif
8690e634 10634
8690e634
JK
10635 ;
10636 return 0;
10637}
10638_ACEOF
6ec2e0f5
SDJ
10639if ac_fn_c_try_compile "$LINENO"; then :
10640 ac_cv_c_bigendian=yes
8690e634 10641else
6ec2e0f5 10642 ac_cv_c_bigendian=no
8690e634 10643fi
6ec2e0f5 10644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 10645fi
6ec2e0f5
SDJ
10646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10647 fi
10648 if test $ac_cv_c_bigendian = unknown; then
10649 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
10650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10651/* end confdefs.h. */
10652#include <limits.h>
10653
10654int
10655main ()
10656{
10657#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
10658 bogus endian macros
10659 #endif
10660
10661 ;
10662 return 0;
10663}
10664_ACEOF
10665if ac_fn_c_try_compile "$LINENO"; then :
10666 # It does; now see whether it defined to _BIG_ENDIAN or not.
10667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10668/* end confdefs.h. */
10669#include <limits.h>
8690e634 10670
6ec2e0f5
SDJ
10671int
10672main ()
10673{
10674#ifndef _BIG_ENDIAN
10675 not big endian
10676 #endif
10677
10678 ;
10679 return 0;
10680}
10681_ACEOF
10682if ac_fn_c_try_compile "$LINENO"; then :
10683 ac_cv_c_bigendian=yes
10684else
10685 ac_cv_c_bigendian=no
8690e634 10686fi
6ec2e0f5
SDJ
10687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10688fi
10689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10690 fi
10691 if test $ac_cv_c_bigendian = unknown; then
10692 # Compile a test program.
10693 if test "$cross_compiling" = yes; then :
10694 # Try to guess by grepping values from an object file.
10695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10696/* end confdefs.h. */
10697short int ascii_mm[] =
10698 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
10699 short int ascii_ii[] =
10700 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
10701 int use_ascii (int i) {
10702 return ascii_mm[i] + ascii_ii[i];
10703 }
10704 short int ebcdic_ii[] =
10705 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
10706 short int ebcdic_mm[] =
10707 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
10708 int use_ebcdic (int i) {
10709 return ebcdic_mm[i] + ebcdic_ii[i];
10710 }
10711 extern int foo;
8690e634 10712
6ec2e0f5
SDJ
10713int
10714main ()
10715{
10716return use_ascii (foo) == use_ebcdic (foo);
10717 ;
10718 return 0;
10719}
10720_ACEOF
10721if ac_fn_c_try_compile "$LINENO"; then :
10722 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
10723 ac_cv_c_bigendian=yes
10724 fi
10725 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
10726 if test "$ac_cv_c_bigendian" = unknown; then
10727 ac_cv_c_bigendian=no
10728 else
10729 # finding both strings is unlikely to happen, but who knows?
10730 ac_cv_c_bigendian=unknown
10731 fi
10732 fi
10733fi
10734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10735else
10736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10737/* end confdefs.h. */
10738$ac_includes_default
10739int
10740main ()
10741{
8690e634 10742
6ec2e0f5
SDJ
10743 /* Are we little or big endian? From Harbison&Steele. */
10744 union
10745 {
10746 long int l;
10747 char c[sizeof (long int)];
10748 } u;
10749 u.l = 1;
10750 return u.c[sizeof (long int) - 1] == 1;
10751
10752 ;
10753 return 0;
10754}
8690e634 10755_ACEOF
6ec2e0f5
SDJ
10756if ac_fn_c_try_run "$LINENO"; then :
10757 ac_cv_c_bigendian=no
10758else
10759 ac_cv_c_bigendian=yes
10760fi
10761rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10762 conftest.$ac_objext conftest.beam conftest.$ac_ext
10763fi
10764
10765 fi
10766fi
10767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
10768$as_echo "$ac_cv_c_bigendian" >&6; }
10769 case $ac_cv_c_bigendian in #(
10770 yes)
10771 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
10772;; #(
10773 no)
10774 ;; #(
10775 universal)
8690e634 10776
6ec2e0f5 10777$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
8690e634 10778
6ec2e0f5
SDJ
10779 ;; #(
10780 *)
10781 as_fn_error "unknown endianness
10782 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
10783 esac
8690e634 10784
6ec2e0f5
SDJ
10785
10786
10787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10788$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
10789if test "${am_cv_langinfo_codeset+set}" = set; then :
10790 $as_echo_n "(cached) " >&6
10791else
10792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10793/* end confdefs.h. */
10794#include <langinfo.h>
10795int
10796main ()
10797{
10798char* cs = nl_langinfo(CODESET); return !cs;
10799 ;
10800 return 0;
10801}
8690e634 10802_ACEOF
6ec2e0f5
SDJ
10803if ac_fn_c_try_link "$LINENO"; then :
10804 am_cv_langinfo_codeset=yes
10805else
10806 am_cv_langinfo_codeset=no
10807fi
10808rm -f core conftest.err conftest.$ac_objext \
10809 conftest$ac_exeext conftest.$ac_ext
10810
10811fi
10812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10813$as_echo "$am_cv_langinfo_codeset" >&6; }
10814 if test $am_cv_langinfo_codeset = yes; then
10815
10816$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8690e634 10817
6ec2e0f5 10818 fi
8690e634 10819
3574124b 10820ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
8690e634
JK
10821if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then :
10822 ac_have_decl=1
10823else
10824 ac_have_decl=0
10825fi
10826
10827cat >>confdefs.h <<_ACEOF
10828#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
10829_ACEOF
10830
10831
8690e634
JK
10832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
10833$as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
10834if test "${ac_cv_gnu_library_2_1+set}" = set; then :
10835 $as_echo_n "(cached) " >&6
10836else
10837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10838/* end confdefs.h. */
10839
10840#include <features.h>
10841#ifdef __GNU_LIBRARY__
10842 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
10843 Lucky GNU user
10844 #endif
10845#endif
10846#ifdef __UCLIBC__
10847 Lucky user
10848#endif
10849
10850_ACEOF
10851if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10852 $EGREP "Lucky" >/dev/null 2>&1; then :
10853 ac_cv_gnu_library_2_1=yes
10854else
10855 ac_cv_gnu_library_2_1=no
10856fi
10857rm -f conftest*
10858
10859
10860
10861fi
10862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
10863$as_echo "$ac_cv_gnu_library_2_1" >&6; }
10864
10865 GLIBC21="$ac_cv_gnu_library_2_1"
10866
10867
10868
f45c62c4
YQ
10869
10870
6ec2e0f5
SDJ
10871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
10872$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
10873if test "${gl_cv_func_malloc_posix+set}" = set; then :
f45c62c4
YQ
10874 $as_echo_n "(cached) " >&6
10875else
f45c62c4 10876
6ec2e0f5 10877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f45c62c4 10878/* end confdefs.h. */
6ec2e0f5 10879
f45c62c4
YQ
10880int
10881main ()
10882{
6ec2e0f5
SDJ
10883#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
10884 choke me
10885 #endif
f45c62c4
YQ
10886
10887 ;
10888 return 0;
10889}
10890_ACEOF
6ec2e0f5
SDJ
10891if ac_fn_c_try_compile "$LINENO"; then :
10892 gl_cv_func_malloc_posix=yes
f45c62c4 10893else
6ec2e0f5 10894 gl_cv_func_malloc_posix=no
f45c62c4 10895fi
6ec2e0f5 10896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6a29c58e
YQ
10897
10898fi
10899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
10900$as_echo "$gl_cv_func_malloc_posix" >&6; }
10901
10902
10903
10904 for ac_header in stdlib.h
98399780
YQ
10905do :
10906 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
10907if test "x$ac_cv_header_stdlib_h" = x""yes; then :
10908 cat >>confdefs.h <<_ACEOF
10909#define HAVE_STDLIB_H 1
10910_ACEOF
10911
10912fi
10913
10914done
10915
6a29c58e 10916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
98399780
YQ
10917$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
10918if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then :
10919 $as_echo_n "(cached) " >&6
10920else
10921 if test "$cross_compiling" = yes; then :
6a29c58e
YQ
10922 case "$host_os" in
10923 # Guess yes on platforms where we know the result.
10924 *-gnu* | freebsd* | netbsd* | openbsd* \
10925 | hpux* | solaris* | cygwin* | mingw*)
10926 ac_cv_func_malloc_0_nonnull=yes ;;
10927 # If we don't know, assume the worst.
10928 *) ac_cv_func_malloc_0_nonnull=no ;;
10929 esac
10930
98399780
YQ
10931else
10932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10933/* end confdefs.h. */
10934#if defined STDC_HEADERS || defined HAVE_STDLIB_H
6a29c58e
YQ
10935 # include <stdlib.h>
10936 #else
10937 char *malloc ();
10938 #endif
98399780
YQ
10939
10940int
10941main ()
10942{
49e4877c
PA
10943char *p = malloc (0);
10944 int result = !p;
10945 free (p);
10946 return result;
98399780
YQ
10947 ;
10948 return 0;
10949}
6a29c58e 10950
98399780
YQ
10951_ACEOF
10952if ac_fn_c_try_run "$LINENO"; then :
10953 ac_cv_func_malloc_0_nonnull=yes
10954else
10955 ac_cv_func_malloc_0_nonnull=no
10956fi
10957rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10958 conftest.$ac_objext conftest.beam conftest.$ac_ext
10959fi
10960
6a29c58e 10961
98399780
YQ
10962fi
10963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
10964$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
6a29c58e 10965 if test $ac_cv_func_malloc_0_nonnull = yes; then :
98399780
YQ
10966 gl_cv_func_malloc_0_nonnull=1
10967else
10968 gl_cv_func_malloc_0_nonnull=0
10969fi
10970
10971
10972cat >>confdefs.h <<_ACEOF
10973#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
10974_ACEOF
10975
10976
10977
88b48903
WN
10978
10979
8690e634
JK
10980 GNULIB_BTOWC=0;
10981 GNULIB_WCTOB=0;
10982 GNULIB_MBSINIT=0;
10983 GNULIB_MBRTOWC=0;
10984 GNULIB_MBRLEN=0;
10985 GNULIB_MBSRTOWCS=0;
10986 GNULIB_MBSNRTOWCS=0;
10987 GNULIB_WCRTOMB=0;
10988 GNULIB_WCSRTOMBS=0;
10989 GNULIB_WCSNRTOMBS=0;
10990 GNULIB_WCWIDTH=0;
10991 GNULIB_WMEMCHR=0;
10992 GNULIB_WMEMCMP=0;
10993 GNULIB_WMEMCPY=0;
10994 GNULIB_WMEMMOVE=0;
10995 GNULIB_WMEMSET=0;
10996 GNULIB_WCSLEN=0;
10997 GNULIB_WCSNLEN=0;
10998 GNULIB_WCSCPY=0;
10999 GNULIB_WCPCPY=0;
11000 GNULIB_WCSNCPY=0;
11001 GNULIB_WCPNCPY=0;
11002 GNULIB_WCSCAT=0;
11003 GNULIB_WCSNCAT=0;
11004 GNULIB_WCSCMP=0;
11005 GNULIB_WCSNCMP=0;
11006 GNULIB_WCSCASECMP=0;
11007 GNULIB_WCSNCASECMP=0;
11008 GNULIB_WCSCOLL=0;
11009 GNULIB_WCSXFRM=0;
11010 GNULIB_WCSDUP=0;
11011 GNULIB_WCSCHR=0;
11012 GNULIB_WCSRCHR=0;
11013 GNULIB_WCSCSPN=0;
11014 GNULIB_WCSSPN=0;
11015 GNULIB_WCSPBRK=0;
11016 GNULIB_WCSSTR=0;
11017 GNULIB_WCSTOK=0;
11018 GNULIB_WCSWIDTH=0;
11019 HAVE_BTOWC=1;
11020 HAVE_MBSINIT=1;
11021 HAVE_MBRTOWC=1;
11022 HAVE_MBRLEN=1;
11023 HAVE_MBSRTOWCS=1;
11024 HAVE_MBSNRTOWCS=1;
11025 HAVE_WCRTOMB=1;
11026 HAVE_WCSRTOMBS=1;
11027 HAVE_WCSNRTOMBS=1;
11028 HAVE_WMEMCHR=1;
11029 HAVE_WMEMCMP=1;
11030 HAVE_WMEMCPY=1;
11031 HAVE_WMEMMOVE=1;
11032 HAVE_WMEMSET=1;
11033 HAVE_WCSLEN=1;
11034 HAVE_WCSNLEN=1;
11035 HAVE_WCSCPY=1;
11036 HAVE_WCPCPY=1;
11037 HAVE_WCSNCPY=1;
11038 HAVE_WCPNCPY=1;
11039 HAVE_WCSCAT=1;
11040 HAVE_WCSNCAT=1;
11041 HAVE_WCSCMP=1;
11042 HAVE_WCSNCMP=1;
11043 HAVE_WCSCASECMP=1;
11044 HAVE_WCSNCASECMP=1;
11045 HAVE_WCSCOLL=1;
11046 HAVE_WCSXFRM=1;
11047 HAVE_WCSDUP=1;
11048 HAVE_WCSCHR=1;
11049 HAVE_WCSRCHR=1;
11050 HAVE_WCSCSPN=1;
11051 HAVE_WCSSPN=1;
11052 HAVE_WCSPBRK=1;
11053 HAVE_WCSSTR=1;
11054 HAVE_WCSTOK=1;
11055 HAVE_WCSWIDTH=1;
11056 HAVE_DECL_WCTOB=1;
11057 HAVE_DECL_WCWIDTH=1;
11058 REPLACE_MBSTATE_T=0;
11059 REPLACE_BTOWC=0;
11060 REPLACE_WCTOB=0;
11061 REPLACE_MBSINIT=0;
11062 REPLACE_MBRTOWC=0;
11063 REPLACE_MBRLEN=0;
11064 REPLACE_MBSRTOWCS=0;
11065 REPLACE_MBSNRTOWCS=0;
11066 REPLACE_WCRTOMB=0;
11067 REPLACE_WCSRTOMBS=0;
11068 REPLACE_WCSNRTOMBS=0;
11069 REPLACE_WCWIDTH=0;
11070 REPLACE_WCSWIDTH=0;
11071
11072
11073
11074
11075
11076
11077
11078
8690e634
JK
11079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
11080$as_echo_n "checking for a traditional japanese locale... " >&6; }
11081if test "${gt_cv_locale_ja+set}" = set; then :
11082 $as_echo_n "(cached) " >&6
11083else
11084
11085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11086/* end confdefs.h. */
11087
11088#include <locale.h>
11089#include <time.h>
11090#if HAVE_LANGINFO_CODESET
11091# include <langinfo.h>
11092#endif
11093#include <stdlib.h>
11094#include <string.h>
11095struct tm t;
11096char buf[16];
11097int main ()
11098{
11099 const char *p;
11100 /* Check whether the given locale name is recognized by the system. */
11101#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
11102 /* On native Windows, setlocale(category, "") looks at the system settings,
11103 not at the environment variables. Also, when an encoding suffix such
11104 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
11105 category of the locale to "C". */
11106 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
11107 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
11108 return 1;
11109#else
11110 if (setlocale (LC_ALL, "") == NULL) return 1;
11111#endif
11112 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
11113 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
11114 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
11115 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
11116 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
11117 some unit tests fail.
11118 On MirBSD 10, when an unsupported locale is specified, setlocale()
11119 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
11120#if HAVE_LANGINFO_CODESET
11121 {
11122 const char *cs = nl_langinfo (CODESET);
11123 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
11124 || strcmp (cs, "UTF-8") == 0)
11125 return 1;
11126 }
11127#endif
11128#ifdef __CYGWIN__
11129 /* On Cygwin, avoid locale names without encoding suffix, because the
11130 locale_charset() function relies on the encoding suffix. Note that
11131 LC_ALL is set on the command line. */
11132 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
11133#endif
11134 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
11135 on Cygwin 1.5.x. */
11136 if (MB_CUR_MAX == 1)
11137 return 1;
11138 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
11139 This excludes the UTF-8 encoding (except on MirBSD). */
11140 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
11141 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
11142 for (p = buf; *p != '\0'; p++)
11143 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
11144 return 1;
11145 return 0;
11146}
11147
11148_ACEOF
11149 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11150 (eval $ac_link) 2>&5
11151 ac_status=$?
11152 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11153 test $ac_status = 0; } && test -s conftest$ac_exeext; then
11154 case "$host_os" in
11155 # Handle native Windows specially, because there setlocale() interprets
11156 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
11157 # "fr" or "fra" as "French" or "French_France.1252",
11158 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
11159 # "ja" as "Japanese" or "Japanese_Japan.932",
11160 # and similar.
11161 mingw*)
11162 # Note that on native Windows, the Japanese locale is
11163 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
11164 # cannot use it here.
11165 gt_cv_locale_ja=none
11166 ;;
11167 *)
11168 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
11169 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
11170 # configure script would override the LC_ALL setting. Likewise for
11171 # LC_CTYPE, which is also set at the beginning of the configure script.
11172 # Test for the AIX locale name.
11173 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11174 gt_cv_locale_ja=ja_JP
11175 else
11176 # Test for the locale name with explicit encoding suffix.
11177 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11178 gt_cv_locale_ja=ja_JP.EUC-JP
11179 else
11180 # Test for the HP-UX, OSF/1, NetBSD locale name.
11181 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11182 gt_cv_locale_ja=ja_JP.eucJP
11183 else
11184 # Test for the IRIX, FreeBSD locale name.
11185 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11186 gt_cv_locale_ja=ja_JP.EUC
11187 else
11188 # Test for the Solaris 7 locale name.
11189 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11190 gt_cv_locale_ja=ja
11191 else
11192 # Special test for NetBSD 1.6.
11193 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
11194 gt_cv_locale_ja=ja_JP.eucJP
11195 else
11196 # None found.
11197 gt_cv_locale_ja=none
11198 fi
11199 fi
11200 fi
11201 fi
11202 fi
11203 fi
11204 ;;
11205 esac
11206 fi
11207 rm -fr conftest*
11208
11209fi
11210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
11211$as_echo "$gt_cv_locale_ja" >&6; }
11212 LOCALE_JA=$gt_cv_locale_ja
11213
11214
11215
11216
11217
11218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
11219$as_echo_n "checking for a transitional chinese locale... " >&6; }
11220if test "${gt_cv_locale_zh_CN+set}" = set; then :
11221 $as_echo_n "(cached) " >&6
11222else
11223
11224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11225/* end confdefs.h. */
11226
11227#include <locale.h>
11228#include <stdlib.h>
11229#include <time.h>
11230#if HAVE_LANGINFO_CODESET
11231# include <langinfo.h>
11232#endif
11233#include <stdlib.h>
11234#include <string.h>
11235struct tm t;
11236char buf[16];
11237int main ()
11238{
11239 const char *p;
11240 /* Check whether the given locale name is recognized by the system. */
11241#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
11242 /* On native Windows, setlocale(category, "") looks at the system settings,
11243 not at the environment variables. Also, when an encoding suffix such
11244 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
11245 category of the locale to "C". */
11246 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
11247 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
11248 return 1;
11249#else
11250 if (setlocale (LC_ALL, "") == NULL) return 1;
11251#endif
11252 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
11253 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
11254 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
11255 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
11256 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
11257 some unit tests fail.
11258 On MirBSD 10, when an unsupported locale is specified, setlocale()
11259 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
11260#if HAVE_LANGINFO_CODESET
11261 {
11262 const char *cs = nl_langinfo (CODESET);
11263 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
11264 || strcmp (cs, "UTF-8") == 0)
11265 return 1;
11266 }
11267#endif
11268#ifdef __CYGWIN__
11269 /* On Cygwin, avoid locale names without encoding suffix, because the
11270 locale_charset() function relies on the encoding suffix. Note that
11271 LC_ALL is set on the command line. */
11272 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
11273#endif
11274 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
11275 This excludes the UTF-8 encoding (except on MirBSD). */
11276 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
11277 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
11278 for (p = buf; *p != '\0'; p++)
11279 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
11280 return 1;
11281 /* Check whether a typical GB18030 multibyte sequence is recognized as a
11282 single wide character. This excludes the GB2312 and GBK encodings. */
11283 if (mblen ("\203\062\332\066", 5) != 4)
11284 return 1;
11285 return 0;
11286}
11287
11288_ACEOF
11289 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11290 (eval $ac_link) 2>&5
11291 ac_status=$?
11292 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11293 test $ac_status = 0; } && test -s conftest$ac_exeext; then
11294 case "$host_os" in
11295 # Handle native Windows specially, because there setlocale() interprets
11296 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
11297 # "fr" or "fra" as "French" or "French_France.1252",
11298 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
11299 # "ja" as "Japanese" or "Japanese_Japan.932",
11300 # and similar.
11301 mingw*)
11302 # Test for the hypothetical native Windows locale name.
11303 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11304 gt_cv_locale_zh_CN=Chinese_China.54936
11305 else
11306 # None found.
11307 gt_cv_locale_zh_CN=none
11308 fi
11309 ;;
11310 solaris2.8)
11311 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
11312 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
11313 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
11314 gt_cv_locale_zh_CN=none
11315 ;;
11316 *)
11317 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
11318 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
11319 # configure script would override the LC_ALL setting. Likewise for
11320 # LC_CTYPE, which is also set at the beginning of the configure script.
11321 # Test for the locale name without encoding suffix.
11322 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11323 gt_cv_locale_zh_CN=zh_CN
11324 else
11325 # Test for the locale name with explicit encoding suffix.
11326 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11327 gt_cv_locale_zh_CN=zh_CN.GB18030
11328 else
11329 # None found.
11330 gt_cv_locale_zh_CN=none
11331 fi
11332 fi
11333 ;;
11334 esac
11335 else
11336 # If there was a link error, due to mblen(), the system is so old that
11337 # it certainly doesn't have a chinese locale.
11338 gt_cv_locale_zh_CN=none
11339 fi
11340 rm -fr conftest*
11341
11342fi
11343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
11344$as_echo "$gt_cv_locale_zh_CN" >&6; }
11345 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
11346
11347
11348
11349
11350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
11351$as_echo_n "checking for a french Unicode locale... " >&6; }
11352if test "${gt_cv_locale_fr_utf8+set}" = set; then :
11353 $as_echo_n "(cached) " >&6
11354else
11355
11356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11357/* end confdefs.h. */
11358
11359#include <locale.h>
11360#include <time.h>
11361#if HAVE_LANGINFO_CODESET
11362# include <langinfo.h>
11363#endif
11364#include <stdlib.h>
11365#include <string.h>
11366struct tm t;
11367char buf[16];
11368int main () {
11369 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
11370 imitates locale dependent behaviour by looking at the environment
11371 variables, and all locales use the UTF-8 encoding. */
11372#if !(defined __BEOS__ || defined __HAIKU__)
11373 /* Check whether the given locale name is recognized by the system. */
11374# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
11375 /* On native Windows, setlocale(category, "") looks at the system settings,
11376 not at the environment variables. Also, when an encoding suffix such
11377 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
11378 category of the locale to "C". */
11379 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
11380 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
11381 return 1;
11382# else
11383 if (setlocale (LC_ALL, "") == NULL) return 1;
11384# endif
11385 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
11386 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
11387 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
11388 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
11389 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
11390 some unit tests fail. */
11391# if HAVE_LANGINFO_CODESET
11392 {
11393 const char *cs = nl_langinfo (CODESET);
11394 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
11395 return 1;
11396 }
11397# endif
11398# ifdef __CYGWIN__
11399 /* On Cygwin, avoid locale names without encoding suffix, because the
11400 locale_charset() function relies on the encoding suffix. Note that
11401 LC_ALL is set on the command line. */
11402 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
11403# endif
11404 /* Check whether in the abbreviation of the second month, the second
11405 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
11406 two bytes long, with UTF-8 encoding. */
11407 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
11408 if (strftime (buf, sizeof (buf), "%b", &t) < 4
11409 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
11410 return 1;
11411#endif
11412#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
11413 /* Check whether the decimal separator is a comma.
11414 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
11415 are nl_langinfo(RADIXCHAR) are both ".". */
11416 if (localeconv () ->decimal_point[0] != ',') return 1;
11417#endif
11418 return 0;
11419}
11420
11421_ACEOF
11422 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11423 (eval $ac_link) 2>&5
11424 ac_status=$?
11425 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11426 test $ac_status = 0; } && test -s conftest$ac_exeext; then
11427 case "$host_os" in
11428 # Handle native Windows specially, because there setlocale() interprets
11429 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
11430 # "fr" or "fra" as "French" or "French_France.1252",
11431 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
11432 # "ja" as "Japanese" or "Japanese_Japan.932",
11433 # and similar.
11434 mingw*)
11435 # Test for the hypothetical native Windows locale name.
11436 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11437 gt_cv_locale_fr_utf8=French_France.65001
11438 else
11439 # None found.
11440 gt_cv_locale_fr_utf8=none
11441 fi
11442 ;;
11443 *)
11444 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
11445 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
11446 # configure script would override the LC_ALL setting. Likewise for
11447 # LC_CTYPE, which is also set at the beginning of the configure script.
11448 # Test for the usual locale name.
11449 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11450 gt_cv_locale_fr_utf8=fr_FR
11451 else
11452 # Test for the locale name with explicit encoding suffix.
11453 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11454 gt_cv_locale_fr_utf8=fr_FR.UTF-8
11455 else
11456 # Test for the Solaris 7 locale name.
11457 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11458 gt_cv_locale_fr_utf8=fr.UTF-8
11459 else
11460 # None found.
11461 gt_cv_locale_fr_utf8=none
11462 fi
11463 fi
11464 fi
11465 ;;
11466 esac
11467 fi
11468 rm -fr conftest*
11469
11470fi
11471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
11472$as_echo "$gt_cv_locale_fr_utf8" >&6; }
11473 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
11474
11475
11476
11477
11478
11479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
11480$as_echo_n "checking for a traditional french locale... " >&6; }
11481if test "${gt_cv_locale_fr+set}" = set; then :
11482 $as_echo_n "(cached) " >&6
11483else
11484
11485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11486/* end confdefs.h. */
11487
11488#include <locale.h>
11489#include <time.h>
11490#if HAVE_LANGINFO_CODESET
11491# include <langinfo.h>
11492#endif
11493#include <stdlib.h>
11494#include <string.h>
11495struct tm t;
11496char buf[16];
11497int main () {
11498 /* Check whether the given locale name is recognized by the system. */
11499#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
11500 /* On native Windows, setlocale(category, "") looks at the system settings,
11501 not at the environment variables. Also, when an encoding suffix such
11502 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
11503 category of the locale to "C". */
11504 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
11505 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
11506 return 1;
11507#else
11508 if (setlocale (LC_ALL, "") == NULL) return 1;
11509#endif
11510 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
11511 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
11512 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
11513 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
11514 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
11515 some unit tests fail.
11516 On MirBSD 10, when an unsupported locale is specified, setlocale()
11517 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
11518#if HAVE_LANGINFO_CODESET
11519 {
11520 const char *cs = nl_langinfo (CODESET);
11521 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
11522 || strcmp (cs, "UTF-8") == 0)
11523 return 1;
11524 }
11525#endif
11526#ifdef __CYGWIN__
11527 /* On Cygwin, avoid locale names without encoding suffix, because the
11528 locale_charset() function relies on the encoding suffix. Note that
11529 LC_ALL is set on the command line. */
11530 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
11531#endif
11532 /* Check whether in the abbreviation of the second month, the second
11533 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
11534 one byte long. This excludes the UTF-8 encoding. */
11535 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
11536 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
11537#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
11538 /* Check whether the decimal separator is a comma.
11539 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
11540 are nl_langinfo(RADIXCHAR) are both ".". */
11541 if (localeconv () ->decimal_point[0] != ',') return 1;
11542#endif
11543 return 0;
11544}
11545
11546_ACEOF
11547 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11548 (eval $ac_link) 2>&5
11549 ac_status=$?
11550 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11551 test $ac_status = 0; } && test -s conftest$ac_exeext; then
11552 case "$host_os" in
11553 # Handle native Windows specially, because there setlocale() interprets
11554 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
11555 # "fr" or "fra" as "French" or "French_France.1252",
11556 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
11557 # "ja" as "Japanese" or "Japanese_Japan.932",
11558 # and similar.
11559 mingw*)
11560 # Test for the native Windows locale name.
11561 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11562 gt_cv_locale_fr=French_France.1252
11563 else
11564 # None found.
11565 gt_cv_locale_fr=none
11566 fi
11567 ;;
11568 *)
11569 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
11570 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
11571 # configure script would override the LC_ALL setting. Likewise for
11572 # LC_CTYPE, which is also set at the beginning of the configure script.
11573 # Test for the usual locale name.
11574 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11575 gt_cv_locale_fr=fr_FR
11576 else
11577 # Test for the locale name with explicit encoding suffix.
11578 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11579 gt_cv_locale_fr=fr_FR.ISO-8859-1
11580 else
11581 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
11582 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11583 gt_cv_locale_fr=fr_FR.ISO8859-1
11584 else
11585 # Test for the HP-UX locale name.
11586 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11587 gt_cv_locale_fr=fr_FR.iso88591
11588 else
11589 # Test for the Solaris 7 locale name.
11590 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11591 gt_cv_locale_fr=fr
11592 else
11593 # None found.
11594 gt_cv_locale_fr=none
11595 fi
11596 fi
11597 fi
11598 fi
11599 fi
11600 ;;
11601 esac
11602 fi
11603 rm -fr conftest*
11604
11605fi
6ec2e0f5
SDJ
11606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
11607$as_echo "$gt_cv_locale_fr" >&6; }
11608 LOCALE_FR=$gt_cv_locale_fr
11609
11610
11611
11612
11613
11614
11615
11616 GNULIB_FFSL=0;
11617 GNULIB_FFSLL=0;
11618 GNULIB_MEMCHR=0;
11619 GNULIB_MEMMEM=0;
11620 GNULIB_MEMPCPY=0;
11621 GNULIB_MEMRCHR=0;
11622 GNULIB_RAWMEMCHR=0;
11623 GNULIB_STPCPY=0;
11624 GNULIB_STPNCPY=0;
11625 GNULIB_STRCHRNUL=0;
11626 GNULIB_STRDUP=0;
11627 GNULIB_STRNCAT=0;
11628 GNULIB_STRNDUP=0;
11629 GNULIB_STRNLEN=0;
11630 GNULIB_STRPBRK=0;
11631 GNULIB_STRSEP=0;
11632 GNULIB_STRSTR=0;
11633 GNULIB_STRCASESTR=0;
11634 GNULIB_STRTOK_R=0;
11635 GNULIB_MBSLEN=0;
11636 GNULIB_MBSNLEN=0;
11637 GNULIB_MBSCHR=0;
11638 GNULIB_MBSRCHR=0;
11639 GNULIB_MBSSTR=0;
11640 GNULIB_MBSCASECMP=0;
11641 GNULIB_MBSNCASECMP=0;
11642 GNULIB_MBSPCASECMP=0;
11643 GNULIB_MBSCASESTR=0;
11644 GNULIB_MBSCSPN=0;
11645 GNULIB_MBSPBRK=0;
11646 GNULIB_MBSSPN=0;
11647 GNULIB_MBSSEP=0;
11648 GNULIB_MBSTOK_R=0;
11649 GNULIB_STRERROR=0;
11650 GNULIB_STRERROR_R=0;
11651 GNULIB_STRSIGNAL=0;
11652 GNULIB_STRVERSCMP=0;
11653 HAVE_MBSLEN=0;
11654 HAVE_FFSL=1;
11655 HAVE_FFSLL=1;
11656 HAVE_MEMCHR=1;
11657 HAVE_DECL_MEMMEM=1;
11658 HAVE_MEMPCPY=1;
11659 HAVE_DECL_MEMRCHR=1;
11660 HAVE_RAWMEMCHR=1;
11661 HAVE_STPCPY=1;
11662 HAVE_STPNCPY=1;
11663 HAVE_STRCHRNUL=1;
11664 HAVE_DECL_STRDUP=1;
11665 HAVE_DECL_STRNDUP=1;
11666 HAVE_DECL_STRNLEN=1;
11667 HAVE_STRPBRK=1;
11668 HAVE_STRSEP=1;
11669 HAVE_STRCASESTR=1;
11670 HAVE_DECL_STRTOK_R=1;
11671 HAVE_DECL_STRERROR_R=1;
11672 HAVE_DECL_STRSIGNAL=1;
11673 HAVE_STRVERSCMP=1;
11674 REPLACE_MEMCHR=0;
11675 REPLACE_MEMMEM=0;
11676 REPLACE_STPNCPY=0;
11677 REPLACE_STRDUP=0;
11678 REPLACE_STRSTR=0;
11679 REPLACE_STRCASESTR=0;
11680 REPLACE_STRCHRNUL=0;
11681 REPLACE_STRERROR=0;
11682 REPLACE_STRERROR_R=0;
11683 REPLACE_STRNCAT=0;
11684 REPLACE_STRNDUP=0;
11685 REPLACE_STRNLEN=0;
11686 REPLACE_STRSIGNAL=0;
11687 REPLACE_STRTOK_R=0;
11688 UNDEFINE_STRTOK_R=0;
11689
11690
11691
11692
11693
11694 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
11695 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
11696 # irrelevant for anonymous mappings.
11697 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
11698if test "x$ac_cv_func_mmap" = x""yes; then :
11699 gl_have_mmap=yes
11700else
11701 gl_have_mmap=no
11702fi
11703
11704
11705 # Try to allow MAP_ANONYMOUS.
11706 gl_have_mmap_anonymous=no
11707 if test $gl_have_mmap = yes; then
11708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
11709$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
11710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11711/* end confdefs.h. */
11712
11713#include <sys/mman.h>
11714#ifdef MAP_ANONYMOUS
11715 I cannot identify this map
11716#endif
11717
11718_ACEOF
11719if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11720 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
11721 gl_have_mmap_anonymous=yes
11722fi
11723rm -f conftest*
11724
11725 if test $gl_have_mmap_anonymous != yes; then
11726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11727/* end confdefs.h. */
11728
11729#include <sys/mman.h>
11730#ifdef MAP_ANON
11731 I cannot identify this map
11732#endif
11733
11734_ACEOF
11735if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11736 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
11737
11738$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
11739
11740 gl_have_mmap_anonymous=yes
11741fi
11742rm -f conftest*
11743
11744 fi
11745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
11746$as_echo "$gl_have_mmap_anonymous" >&6; }
11747 if test $gl_have_mmap_anonymous = yes; then
11748
11749$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
11750
11751 fi
11752 fi
11753
11754
11755
11756
11757
11758
11759 if test $HAVE_MEMCHR = 1; then
11760 # Detect platform-specific bugs in some versions of glibc:
11761 # memchr should not dereference anything with length 0
11762 # http://bugzilla.redhat.com/499689
11763 # memchr should not dereference overestimated length after a match
11764 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
11765 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
11766 # Assume that memchr works on platforms that lack mprotect.
11767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
11768$as_echo_n "checking whether memchr works... " >&6; }
11769if test "${gl_cv_func_memchr_works+set}" = set; then :
11770 $as_echo_n "(cached) " >&6
11771else
11772 if test "$cross_compiling" = yes; then :
11773 gl_cv_func_memchr_works="guessing no"
11774else
11775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11776/* end confdefs.h. */
11777
11778#include <string.h>
11779#if HAVE_SYS_MMAN_H
11780# include <fcntl.h>
11781# include <unistd.h>
11782# include <sys/types.h>
11783# include <sys/mman.h>
11784# ifndef MAP_FILE
11785# define MAP_FILE 0
11786# endif
11787#endif
11788
11789int
11790main ()
11791{
11792
11793 int result = 0;
11794 char *fence = NULL;
11795#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
11796# if HAVE_MAP_ANONYMOUS
11797 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
11798 const int fd = -1;
11799# else /* !HAVE_MAP_ANONYMOUS */
11800 const int flags = MAP_FILE | MAP_PRIVATE;
11801 int fd = open ("/dev/zero", O_RDONLY, 0666);
11802 if (fd >= 0)
11803# endif
11804 {
11805 int pagesize = getpagesize ();
11806 char *two_pages =
11807 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
11808 flags, fd, 0);
11809 if (two_pages != (char *)(-1)
11810 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
11811 fence = two_pages + pagesize;
11812 }
11813#endif
11814 if (fence)
11815 {
11816 if (memchr (fence, 0, 0))
11817 result |= 1;
11818 strcpy (fence - 9, "12345678");
11819 if (memchr (fence - 9, 0, 79) != fence - 1)
11820 result |= 2;
11821 if (memchr (fence - 1, 0, 3) != fence - 1)
11822 result |= 4;
11823 }
11824 return result;
11825
11826 ;
11827 return 0;
11828}
11829_ACEOF
11830if ac_fn_c_try_run "$LINENO"; then :
11831 gl_cv_func_memchr_works=yes
11832else
11833 gl_cv_func_memchr_works=no
11834fi
11835rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11836 conftest.$ac_objext conftest.beam conftest.$ac_ext
11837fi
11838
11839fi
11840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
11841$as_echo "$gl_cv_func_memchr_works" >&6; }
11842 if test "$gl_cv_func_memchr_works" != yes; then
11843 REPLACE_MEMCHR=1
11844 fi
11845 fi
11846
11847ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
11848if test "x$ac_cv_have_decl_memmem" = x""yes; then :
11849 ac_have_decl=1
11850else
11851 ac_have_decl=0
11852fi
11853
11854cat >>confdefs.h <<_ACEOF
11855#define HAVE_DECL_MEMMEM $ac_have_decl
11856_ACEOF
11857
11858
11859
11860
11861
11862 for ac_func in memmem
11863do :
11864 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
11865if test "x$ac_cv_func_memmem" = x""yes; then :
11866 cat >>confdefs.h <<_ACEOF
11867#define HAVE_MEMMEM 1
11868_ACEOF
11869
11870fi
11871done
11872
11873 if test $ac_cv_func_memmem = yes; then
11874 HAVE_MEMMEM=1
11875 else
11876 HAVE_MEMMEM=0
11877 fi
11878
11879 if test $ac_cv_have_decl_memmem = no; then
11880 HAVE_DECL_MEMMEM=0
11881 else
11882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
11883$as_echo_n "checking whether memmem works... " >&6; }
11884if test "${gl_cv_func_memmem_works_always+set}" = set; then :
11885 $as_echo_n "(cached) " >&6
11886else
11887 if test "$cross_compiling" = yes; then :
11888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11889/* end confdefs.h. */
11890
11891#ifdef __GNU_LIBRARY__
11892 #include <features.h>
11893 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
11894 || __GLIBC_MINOR__ > 12)) \
11895 || (__GLIBC__ > 2)) \
11896 || defined __UCLIBC__
11897 Lucky user
11898 #endif
11899#elif defined __CYGWIN__
11900 #include <cygwin/version.h>
11901 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
11902 Lucky user
11903 #endif
11904#else
11905 Lucky user
11906#endif
11907
11908_ACEOF
11909if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11910 $EGREP "Lucky user" >/dev/null 2>&1; then :
11911 gl_cv_func_memmem_works_always="guessing yes"
11912else
11913 gl_cv_func_memmem_works_always="guessing no"
11914fi
11915rm -f conftest*
11916
11917
11918else
11919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11920/* end confdefs.h. */
11921
11922#include <string.h> /* for memmem */
11923#define P "_EF_BF_BD"
11924#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
11925#define NEEDLE P P P P P
11926
11927int
11928main ()
11929{
11930
11931 int result = 0;
11932 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
11933 result |= 1;
11934 /* Check for empty needle behavior. */
11935 {
11936 const char *haystack = "AAA";
11937 if (memmem (haystack, 3, NULL, 0) != haystack)
11938 result |= 2;
11939 }
11940 return result;
11941
11942 ;
11943 return 0;
11944}
11945_ACEOF
11946if ac_fn_c_try_run "$LINENO"; then :
11947 gl_cv_func_memmem_works_always=yes
11948else
11949 gl_cv_func_memmem_works_always=no
11950fi
11951rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11952 conftest.$ac_objext conftest.beam conftest.$ac_ext
11953fi
11954
11955
11956fi
11957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
11958$as_echo "$gl_cv_func_memmem_works_always" >&6; }
11959 case "$gl_cv_func_memmem_works_always" in
11960 *yes) ;;
11961 *)
11962 REPLACE_MEMMEM=1
11963 ;;
11964 esac
11965 fi
11966 :
11967
11968ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
11969if test "x$ac_cv_have_decl_memrchr" = x""yes; then :
11970 ac_have_decl=1
11971else
11972 ac_have_decl=0
11973fi
11974
11975cat >>confdefs.h <<_ACEOF
11976#define HAVE_DECL_MEMRCHR $ac_have_decl
11977_ACEOF
11978
11979
11980
11981
11982
11983
2d8adcbd
MM
11984
11985
6ec2e0f5
SDJ
11986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
11987$as_echo_n "checking for promoted mode_t type... " >&6; }
11988if test "${gl_cv_promoted_mode_t+set}" = set; then :
11989 $as_echo_n "(cached) " >&6
11990else
11991
11992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11993/* end confdefs.h. */
11994#include <sys/types.h>
11995int
11996main ()
11997{
11998typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
11999 ;
12000 return 0;
12001}
12002_ACEOF
12003if ac_fn_c_try_compile "$LINENO"; then :
12004 gl_cv_promoted_mode_t='int'
12005else
12006 gl_cv_promoted_mode_t='mode_t'
12007fi
12008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12009
12010fi
12011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
12012$as_echo "$gl_cv_promoted_mode_t" >&6; }
12013
12014cat >>confdefs.h <<_ACEOF
12015#define PROMOTED_MODE_T $gl_cv_promoted_mode_t
12016_ACEOF
12017
12018
12019
12020
12021
12022 GNULIB_DPRINTF=0;
12023 GNULIB_FCLOSE=0;
12024 GNULIB_FDOPEN=0;
12025 GNULIB_FFLUSH=0;
12026 GNULIB_FGETC=0;
12027 GNULIB_FGETS=0;
12028 GNULIB_FOPEN=0;
12029 GNULIB_FPRINTF=0;
12030 GNULIB_FPRINTF_POSIX=0;
12031 GNULIB_FPURGE=0;
12032 GNULIB_FPUTC=0;
12033 GNULIB_FPUTS=0;
12034 GNULIB_FREAD=0;
12035 GNULIB_FREOPEN=0;
12036 GNULIB_FSCANF=0;
12037 GNULIB_FSEEK=0;
12038 GNULIB_FSEEKO=0;
12039 GNULIB_FTELL=0;
12040 GNULIB_FTELLO=0;
12041 GNULIB_FWRITE=0;
12042 GNULIB_GETC=0;
12043 GNULIB_GETCHAR=0;
12044 GNULIB_GETDELIM=0;
12045 GNULIB_GETLINE=0;
12046 GNULIB_OBSTACK_PRINTF=0;
12047 GNULIB_OBSTACK_PRINTF_POSIX=0;
12048 GNULIB_PCLOSE=0;
12049 GNULIB_PERROR=0;
12050 GNULIB_POPEN=0;
12051 GNULIB_PRINTF=0;
12052 GNULIB_PRINTF_POSIX=0;
12053 GNULIB_PUTC=0;
12054 GNULIB_PUTCHAR=0;
12055 GNULIB_PUTS=0;
12056 GNULIB_REMOVE=0;
12057 GNULIB_RENAME=0;
12058 GNULIB_RENAMEAT=0;
12059 GNULIB_SCANF=0;
12060 GNULIB_SNPRINTF=0;
12061 GNULIB_SPRINTF_POSIX=0;
12062 GNULIB_STDIO_H_NONBLOCKING=0;
12063 GNULIB_STDIO_H_SIGPIPE=0;
12064 GNULIB_TMPFILE=0;
12065 GNULIB_VASPRINTF=0;
12066 GNULIB_VFSCANF=0;
12067 GNULIB_VSCANF=0;
12068 GNULIB_VDPRINTF=0;
12069 GNULIB_VFPRINTF=0;
12070 GNULIB_VFPRINTF_POSIX=0;
12071 GNULIB_VPRINTF=0;
12072 GNULIB_VPRINTF_POSIX=0;
12073 GNULIB_VSNPRINTF=0;
12074 GNULIB_VSPRINTF_POSIX=0;
12075 HAVE_DECL_FPURGE=1;
12076 HAVE_DECL_FSEEKO=1;
12077 HAVE_DECL_FTELLO=1;
12078 HAVE_DECL_GETDELIM=1;
12079 HAVE_DECL_GETLINE=1;
12080 HAVE_DECL_OBSTACK_PRINTF=1;
12081 HAVE_DECL_SNPRINTF=1;
12082 HAVE_DECL_VSNPRINTF=1;
12083 HAVE_DPRINTF=1;
12084 HAVE_FSEEKO=1;
12085 HAVE_FTELLO=1;
12086 HAVE_PCLOSE=1;
12087 HAVE_POPEN=1;
12088 HAVE_RENAMEAT=1;
12089 HAVE_VASPRINTF=1;
12090 HAVE_VDPRINTF=1;
12091 REPLACE_DPRINTF=0;
12092 REPLACE_FCLOSE=0;
12093 REPLACE_FDOPEN=0;
12094 REPLACE_FFLUSH=0;
12095 REPLACE_FOPEN=0;
12096 REPLACE_FPRINTF=0;
12097 REPLACE_FPURGE=0;
12098 REPLACE_FREOPEN=0;
12099 REPLACE_FSEEK=0;
12100 REPLACE_FSEEKO=0;
12101 REPLACE_FTELL=0;
12102 REPLACE_FTELLO=0;
12103 REPLACE_GETDELIM=0;
12104 REPLACE_GETLINE=0;
12105 REPLACE_OBSTACK_PRINTF=0;
12106 REPLACE_PERROR=0;
12107 REPLACE_POPEN=0;
12108 REPLACE_PRINTF=0;
12109 REPLACE_REMOVE=0;
12110 REPLACE_RENAME=0;
12111 REPLACE_RENAMEAT=0;
12112 REPLACE_SNPRINTF=0;
12113 REPLACE_SPRINTF=0;
12114 REPLACE_STDIO_READ_FUNCS=0;
12115 REPLACE_STDIO_WRITE_FUNCS=0;
12116 REPLACE_TMPFILE=0;
12117 REPLACE_VASPRINTF=0;
12118 REPLACE_VDPRINTF=0;
12119 REPLACE_VFPRINTF=0;
12120 REPLACE_VPRINTF=0;
12121 REPLACE_VSNPRINTF=0;
12122 REPLACE_VSPRINTF=0;
12123
12124
12125
2d8adcbd
MM
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
6ec2e0f5
SDJ
12136ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
12137if test "x$ac_cv_have_decl_setenv" = x""yes; then :
12138 ac_have_decl=1
12139else
12140 ac_have_decl=0
12141fi
12142
12143cat >>confdefs.h <<_ACEOF
12144#define HAVE_DECL_SETENV $ac_have_decl
12145_ACEOF
12146
12147
12148
12149
12150
12151
12152 if test $ac_cv_have_decl_setenv = no; then
12153 HAVE_DECL_SETENV=0
12154 fi
12155
12156
12157
12158
12159
12160 for ac_header in search.h
12161do :
12162 ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
12163if test "x$ac_cv_header_search_h" = x""yes; then :
12164 cat >>confdefs.h <<_ACEOF
12165#define HAVE_SEARCH_H 1
12166_ACEOF
12167
12168fi
12169
12170done
12171
12172 for ac_func in tsearch
12173do :
12174 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
12175if test "x$ac_cv_func_tsearch" = x""yes; then :
12176 cat >>confdefs.h <<_ACEOF
12177#define HAVE_TSEARCH 1
12178_ACEOF
12179
12180fi
12181done
12182
12183
12184
12185
12186 GNULIB_PTHREAD_SIGMASK=0;
12187 GNULIB_RAISE=0;
12188 GNULIB_SIGNAL_H_SIGPIPE=0;
12189 GNULIB_SIGPROCMASK=0;
12190 GNULIB_SIGACTION=0;
12191 HAVE_POSIX_SIGNALBLOCKING=1;
12192 HAVE_PTHREAD_SIGMASK=1;
12193 HAVE_RAISE=1;
12194 HAVE_SIGSET_T=1;
12195 HAVE_SIGINFO_T=1;
12196 HAVE_SIGACTION=1;
12197 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
12198
12199 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
12200
12201 HAVE_SIGHANDLER_T=1;
12202 REPLACE_PTHREAD_SIGMASK=0;
12203 REPLACE_RAISE=0;
12204
12205
12206 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
12207 #include <signal.h>
12208 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
12209 #include <sys/types.h>
12210
12211"
12212if test "x$ac_cv_type_sigset_t" = x""yes; then :
12213
12214cat >>confdefs.h <<_ACEOF
12215#define HAVE_SIGSET_T 1
12216_ACEOF
12217
12218gl_cv_type_sigset_t=yes
12219else
12220 gl_cv_type_sigset_t=no
12221fi
12222
12223 if test $gl_cv_type_sigset_t != yes; then
12224 HAVE_SIGSET_T=0
12225 fi
12226
12227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
12228$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
12229if test "${ac_cv_type_uid_t+set}" = set; then :
12230 $as_echo_n "(cached) " >&6
12231else
12232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12233/* end confdefs.h. */
12234#include <sys/types.h>
12235
12236_ACEOF
12237if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12238 $EGREP "uid_t" >/dev/null 2>&1; then :
12239 ac_cv_type_uid_t=yes
12240else
12241 ac_cv_type_uid_t=no
12242fi
12243rm -f conftest*
12244
12245fi
12246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
12247$as_echo "$ac_cv_type_uid_t" >&6; }
12248if test $ac_cv_type_uid_t = no; then
12249
12250$as_echo "#define uid_t int" >>confdefs.h
12251
12252
12253$as_echo "#define gid_t int" >>confdefs.h
12254
12255fi
12256
12257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
12258$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
12259if test "${ac_cv_header_stdbool_h+set}" = set; then :
12260 $as_echo_n "(cached) " >&6
12261else
12262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12263/* end confdefs.h. */
12264
12265 #include <stdbool.h>
12266
12267 #ifdef __cplusplus
12268 typedef bool Bool;
12269 #else
12270 typedef _Bool Bool;
12271 #ifndef bool
12272 "error: bool is not defined"
12273 #endif
12274 #ifndef false
12275 "error: false is not defined"
12276 #endif
12277 #if false
12278 "error: false is not 0"
12279 #endif
12280 #ifndef true
12281 "error: true is not defined"
12282 #endif
12283 #if true != 1
12284 "error: true is not 1"
12285 #endif
12286 #endif
12287
12288 #ifndef __bool_true_false_are_defined
12289 "error: __bool_true_false_are_defined is not defined"
12290 #endif
12291
12292 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
12293
12294 char a[true == 1 ? 1 : -1];
12295 char b[false == 0 ? 1 : -1];
12296 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
12297 char d[(bool) 0.5 == true ? 1 : -1];
12298 /* See body of main program for 'e'. */
12299 char f[(Bool) 0.0 == false ? 1 : -1];
12300 char g[true];
12301 char h[sizeof (Bool)];
12302 char i[sizeof s.t];
12303 enum { j = false, k = true, l = false * true, m = true * 256 };
12304 /* The following fails for
12305 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
12306 Bool n[m];
12307 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
12308 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
12309 /* Catch a bug in an HP-UX C compiler. See
12310 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
12311 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
12312 */
12313 Bool q = true;
12314 Bool *pq = &q;
12315 bool *qq = &q;
12316
12317int
12318main ()
12319{
12320
12321 bool e = &s;
12322 *pq |= q; *pq |= ! q;
12323 *qq |= q; *qq |= ! q;
12324 /* Refer to every declared value, to avoid compiler optimizations. */
12325 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
12326 + !m + !n + !o + !p + !q + !pq + !qq);
12327
12328 ;
12329 return 0;
12330}
12331_ACEOF
12332if ac_fn_c_try_compile "$LINENO"; then :
12333 ac_cv_header_stdbool_h=yes
12334else
12335 ac_cv_header_stdbool_h=no
12336fi
12337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12338fi
12339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
12340$as_echo "$ac_cv_header_stdbool_h" >&6; }
12341 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
12342if test "x$ac_cv_type__Bool" = x""yes; then :
12343
12344cat >>confdefs.h <<_ACEOF
12345#define HAVE__BOOL 1
12346_ACEOF
12347
12348
12349fi
12350
12351
12352
12353 REPLACE_NULL=0;
12354 HAVE_MAX_ALIGN_T=1;
12355 HAVE_WCHAR_T=1;
12356
12357
12358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
12359$as_echo_n "checking for wchar_t... " >&6; }
12360if test "${gt_cv_c_wchar_t+set}" = set; then :
12361 $as_echo_n "(cached) " >&6
12362else
12363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12364/* end confdefs.h. */
12365#include <stddef.h>
12366 wchar_t foo = (wchar_t)'\0';
12367int
12368main ()
12369{
12370
12371 ;
12372 return 0;
12373}
12374_ACEOF
12375if ac_fn_c_try_compile "$LINENO"; then :
12376 gt_cv_c_wchar_t=yes
12377else
12378 gt_cv_c_wchar_t=no
12379fi
12380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12381fi
12382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
12383$as_echo "$gt_cv_c_wchar_t" >&6; }
12384 if test $gt_cv_c_wchar_t = yes; then
12385
12386$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
12387
12388 fi
12389
12390
12391
12392ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
12393if test "x$ac_cv_have_decl_strdup" = x""yes; then :
12394 ac_have_decl=1
12395else
12396 ac_have_decl=0
12397fi
12398
12399cat >>confdefs.h <<_ACEOF
12400#define HAVE_DECL_STRDUP $ac_have_decl
12401_ACEOF
12402
12403
12404 REPLACE_STRERROR_0=0
12405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
12406$as_echo_n "checking whether strerror(0) succeeds... " >&6; }
12407if test "${gl_cv_func_strerror_0_works+set}" = set; then :
12408 $as_echo_n "(cached) " >&6
12409else
12410 if test "$cross_compiling" = yes; then :
12411 case "$host_os" in
12412 # Guess yes on glibc systems.
12413 *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
12414 # If we don't know, assume the worst.
12415 *) gl_cv_func_strerror_0_works="guessing no" ;;
12416 esac
12417
12418else
12419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12420/* end confdefs.h. */
12421#include <string.h>
12422 #include <errno.h>
12423
12424int
12425main ()
12426{
12427int result = 0;
12428 char *str;
12429 errno = 0;
12430 str = strerror (0);
12431 if (!*str) result |= 1;
12432 if (errno) result |= 2;
12433 if (strstr (str, "nknown") || strstr (str, "ndefined"))
12434 result |= 4;
12435 return result;
12436 ;
12437 return 0;
12438}
12439_ACEOF
12440if ac_fn_c_try_run "$LINENO"; then :
12441 gl_cv_func_strerror_0_works=yes
12442else
12443 gl_cv_func_strerror_0_works=no
12444fi
12445rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12446 conftest.$ac_objext conftest.beam conftest.$ac_ext
12447fi
12448
12449
12450fi
12451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
12452$as_echo "$gl_cv_func_strerror_0_works" >&6; }
12453 case "$gl_cv_func_strerror_0_works" in
12454 *yes) ;;
12455 *)
12456 REPLACE_STRERROR_0=1
12457
12458$as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
12459
12460 ;;
12461 esac
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474 if test $gl_cv_have_include_next = yes; then
12475 gl_cv_next_string_h='<'string.h'>'
12476 else
12477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
12478$as_echo_n "checking absolute name of <string.h>... " >&6; }
12479if test "${gl_cv_next_string_h+set}" = set; then :
12480 $as_echo_n "(cached) " >&6
12481else
12482
12483
12484
12485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12486/* end confdefs.h. */
12487#include <string.h>
12488_ACEOF
12489 case "$host_os" in
12490 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12491 *) gl_absname_cpp="$ac_cpp" ;;
12492 esac
12493
12494 case "$host_os" in
12495 mingw*)
12496 gl_dirsep_regex='[/\\]'
12497 ;;
12498 *)
12499 gl_dirsep_regex='\/'
12500 ;;
12501 esac
12502 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12503 gl_header_literal_regex=`echo 'string.h' \
12504 | sed -e "$gl_make_literal_regex_sed"`
12505 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12506 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12507 s|^/[^/]|//&|
12508 p
12509 q
12510 }'
12511
12512 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12513 sed -n "$gl_absolute_header_sed"`
12514
12515 gl_header=$gl_cv_absolute_string_h
12516 gl_cv_next_string_h='"'$gl_header'"'
12517
12518
12519fi
12520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
12521$as_echo "$gl_cv_next_string_h" >&6; }
12522 fi
12523 NEXT_STRING_H=$gl_cv_next_string_h
12524
12525 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12526 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12527 gl_next_as_first_directive='<'string.h'>'
12528 else
12529 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12530 gl_next_as_first_directive=$gl_cv_next_string_h
12531 fi
12532 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
12533
12534
12535
12536
12537
12538
12539 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
12540 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
12541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
12542$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
12543if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
12544 $as_echo_n "(cached) " >&6
12545else
12546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12547/* end confdefs.h. */
12548#include <string.h>
12549
12550int
12551main ()
12552{
12553#undef $gl_func
12554 (void) $gl_func;
12555 ;
12556 return 0;
12557}
12558_ACEOF
12559if ac_fn_c_try_compile "$LINENO"; then :
12560 eval "$as_gl_Symbol=yes"
12561else
12562 eval "$as_gl_Symbol=no"
12563fi
12564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12565fi
12566eval ac_res=\$$as_gl_Symbol
12567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12568$as_echo "$ac_res" >&6; }
12569 eval as_val=\$$as_gl_Symbol
12570 if test "x$as_val" = x""yes; then :
12571 cat >>confdefs.h <<_ACEOF
12572#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
12573_ACEOF
12574
12575 eval ac_cv_have_decl_$gl_func=yes
12576fi
12577 done
12578
12579
12580
12581
12582
12583 if test "$gl_cv_func_memchr_works" != yes; then
12584 REPLACE_STRSTR=1
12585 else
12586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
12587$as_echo_n "checking whether strstr works... " >&6; }
12588if test "${gl_cv_func_strstr_works_always+set}" = set; then :
12589 $as_echo_n "(cached) " >&6
12590else
12591 if test "$cross_compiling" = yes; then :
12592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12593/* end confdefs.h. */
12594
12595#ifdef __GNU_LIBRARY__
12596 #include <features.h>
12597 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
12598 || defined __UCLIBC__
12599 Lucky user
12600 #endif
12601#elif defined __CYGWIN__
12602 #include <cygwin/version.h>
12603 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
12604 Lucky user
12605 #endif
12606#else
12607 Lucky user
12608#endif
12609
12610_ACEOF
12611if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12612 $EGREP "Lucky user" >/dev/null 2>&1; then :
12613 gl_cv_func_strstr_works_always="guessing yes"
12614else
12615 gl_cv_func_strstr_works_always="guessing no"
12616fi
12617rm -f conftest*
12618
12619
12620else
12621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12622/* end confdefs.h. */
12623
12624#include <string.h> /* for strstr */
12625#define P "_EF_BF_BD"
12626#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
12627#define NEEDLE P P P P P
12628
12629int
12630main ()
12631{
12632return !!strstr (HAYSTACK, NEEDLE);
12633
12634 ;
12635 return 0;
12636}
12637_ACEOF
12638if ac_fn_c_try_run "$LINENO"; then :
12639 gl_cv_func_strstr_works_always=yes
12640else
12641 gl_cv_func_strstr_works_always=no
12642fi
12643rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12644 conftest.$ac_objext conftest.beam conftest.$ac_ext
12645fi
12646
12647
12648fi
12649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
12650$as_echo "$gl_cv_func_strstr_works_always" >&6; }
12651 case "$gl_cv_func_strstr_works_always" in
12652 *yes) ;;
12653 *)
12654 REPLACE_STRSTR=1
12655 ;;
12656 esac
12657 fi
12658
12659ac_fn_c_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default"
12660if test "x$ac_cv_have_decl_strtok_r" = x""yes; then :
12661 ac_have_decl=1
12662else
12663 ac_have_decl=0
12664fi
12665
12666cat >>confdefs.h <<_ACEOF
12667#define HAVE_DECL_STRTOK_R $ac_have_decl
12668_ACEOF
12669
12670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
12671$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
12672if test -z "$MKDIR_P"; then
12673 if test "${ac_cv_path_mkdir+set}" = set; then :
12674 $as_echo_n "(cached) " >&6
12675else
12676 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12677for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
12678do
12679 IFS=$as_save_IFS
12680 test -z "$as_dir" && as_dir=.
12681 for ac_prog in mkdir gmkdir; do
12682 for ac_exec_ext in '' $ac_executable_extensions; do
12683 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
12684 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
12685 'mkdir (GNU coreutils) '* | \
12686 'mkdir (coreutils) '* | \
12687 'mkdir (fileutils) '4.1*)
12688 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
12689 break 3;;
12690 esac
12691 done
12692 done
12693 done
12694IFS=$as_save_IFS
12695
12696fi
12697
12698 if test "${ac_cv_path_mkdir+set}" = set; then
12699 MKDIR_P="$ac_cv_path_mkdir -p"
12700 else
12701 # As a last resort, use the slow shell script. Don't cache a
12702 # value for MKDIR_P within a source directory, because that will
12703 # break other packages using the cache if that directory is
12704 # removed, or if the value is a relative name.
12705 test -d ./--version && rmdir ./--version
12706 MKDIR_P="$ac_install_sh -d"
12707 fi
12708fi
12709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
12710$as_echo "$MKDIR_P" >&6; }
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730 if test $gl_cv_have_include_next = yes; then
12731 gl_cv_next_sys_types_h='<'sys/types.h'>'
12732 else
12733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
12734$as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
12735if test "${gl_cv_next_sys_types_h+set}" = set; then :
12736 $as_echo_n "(cached) " >&6
12737else
12738
12739
12740
12741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12742/* end confdefs.h. */
12743#include <sys/types.h>
12744_ACEOF
12745 case "$host_os" in
12746 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12747 *) gl_absname_cpp="$ac_cpp" ;;
12748 esac
12749
12750 case "$host_os" in
12751 mingw*)
12752 gl_dirsep_regex='[/\\]'
12753 ;;
12754 *)
12755 gl_dirsep_regex='\/'
12756 ;;
12757 esac
12758 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12759 gl_header_literal_regex=`echo 'sys/types.h' \
12760 | sed -e "$gl_make_literal_regex_sed"`
12761 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12762 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12763 s|^/[^/]|//&|
12764 p
12765 q
12766 }'
12767
12768 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12769 sed -n "$gl_absolute_header_sed"`
12770
12771 gl_header=$gl_cv_absolute_sys_types_h
12772 gl_cv_next_sys_types_h='"'$gl_header'"'
12773
12774
12775fi
12776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
12777$as_echo "$gl_cv_next_sys_types_h" >&6; }
12778 fi
12779 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
12780
12781 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12782 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12783 gl_next_as_first_directive='<'sys/types.h'>'
12784 else
12785 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12786 gl_next_as_first_directive=$gl_cv_next_sys_types_h
12787 fi
12788 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801 GNULIB_MKTIME=0;
12802 GNULIB_NANOSLEEP=0;
12803 GNULIB_STRPTIME=0;
12804 GNULIB_TIMEGM=0;
12805 GNULIB_TIME_R=0;
12806 GNULIB_TIME_RZ=0;
12807 HAVE_DECL_LOCALTIME_R=1;
12808 HAVE_NANOSLEEP=1;
12809 HAVE_STRPTIME=1;
12810 HAVE_TIMEGM=1;
12811 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
12812 REPLACE_MKTIME=GNULIB_PORTCHECK;
12813 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
12814 REPLACE_TIMEGM=GNULIB_PORTCHECK;
12815
12816 : ${GNULIB_GETTIMEOFDAY=0};
12817 REPLACE_GMTIME=0;
12818 REPLACE_LOCALTIME=0;
12819
12820
12821
12822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
12823$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
12824if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
12825 $as_echo_n "(cached) " >&6
12826else
12827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12828/* end confdefs.h. */
12829#include <time.h>
12830
12831int
12832main ()
12833{
12834static struct timespec x; x.tv_sec = x.tv_nsec;
12835 ;
12836 return 0;
12837}
12838_ACEOF
12839if ac_fn_c_try_compile "$LINENO"; then :
12840 gl_cv_sys_struct_timespec_in_time_h=yes
12841else
12842 gl_cv_sys_struct_timespec_in_time_h=no
12843fi
12844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12845fi
12846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
12847$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
12848
12849 TIME_H_DEFINES_STRUCT_TIMESPEC=0
12850 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
12851 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
12852 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
12853 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
12854 TIME_H_DEFINES_STRUCT_TIMESPEC=1
12855 else
12856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
12857$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
12858if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
12859 $as_echo_n "(cached) " >&6
12860else
12861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12862/* end confdefs.h. */
12863#include <sys/time.h>
12864
12865int
12866main ()
12867{
12868static struct timespec x; x.tv_sec = x.tv_nsec;
12869 ;
12870 return 0;
12871}
12872_ACEOF
12873if ac_fn_c_try_compile "$LINENO"; then :
12874 gl_cv_sys_struct_timespec_in_sys_time_h=yes
12875else
12876 gl_cv_sys_struct_timespec_in_sys_time_h=no
12877fi
12878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12879fi
12880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
12881$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
12882 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
12883 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
12884 else
12885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
12886$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
12887if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then :
12888 $as_echo_n "(cached) " >&6
12889else
12890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12891/* end confdefs.h. */
12892#include <pthread.h>
12893
12894int
12895main ()
12896{
12897static struct timespec x; x.tv_sec = x.tv_nsec;
12898 ;
12899 return 0;
12900}
12901_ACEOF
12902if ac_fn_c_try_compile "$LINENO"; then :
12903 gl_cv_sys_struct_timespec_in_pthread_h=yes
12904else
12905 gl_cv_sys_struct_timespec_in_pthread_h=no
12906fi
12907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12908fi
12909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
12910$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
12911 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
12912 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
12913 else
12914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
12915$as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
12916if test "${gl_cv_sys_struct_timespec_in_unistd_h+set}" = set; then :
12917 $as_echo_n "(cached) " >&6
12918else
12919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12920/* end confdefs.h. */
12921#include <unistd.h>
12922
12923int
12924main ()
12925{
12926static struct timespec x; x.tv_sec = x.tv_nsec;
12927 ;
12928 return 0;
12929}
12930_ACEOF
12931if ac_fn_c_try_compile "$LINENO"; then :
12932 gl_cv_sys_struct_timespec_in_unistd_h=yes
12933else
12934 gl_cv_sys_struct_timespec_in_unistd_h=no
12935fi
12936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12937fi
12938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
12939$as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
12940 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
12941 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
12942 fi
12943 fi
12944 fi
12945 fi
12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962 if test $gl_cv_have_include_next = yes; then
12963 gl_cv_next_time_h='<'time.h'>'
12964 else
12965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
12966$as_echo_n "checking absolute name of <time.h>... " >&6; }
12967if test "${gl_cv_next_time_h+set}" = set; then :
12968 $as_echo_n "(cached) " >&6
12969else
12970
12971
12972
12973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12974/* end confdefs.h. */
12975#include <time.h>
12976_ACEOF
12977 case "$host_os" in
12978 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12979 *) gl_absname_cpp="$ac_cpp" ;;
12980 esac
12981
12982 case "$host_os" in
12983 mingw*)
12984 gl_dirsep_regex='[/\\]'
12985 ;;
12986 *)
12987 gl_dirsep_regex='\/'
12988 ;;
12989 esac
12990 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12991 gl_header_literal_regex=`echo 'time.h' \
12992 | sed -e "$gl_make_literal_regex_sed"`
12993 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12994 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12995 s|^/[^/]|//&|
12996 p
12997 q
12998 }'
12999
13000 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13001 sed -n "$gl_absolute_header_sed"`
13002
13003 gl_header=$gl_cv_absolute_time_h
13004 gl_cv_next_time_h='"'$gl_header'"'
13005
13006
13007fi
13008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
13009$as_echo "$gl_cv_next_time_h" >&6; }
13010 fi
13011 NEXT_TIME_H=$gl_cv_next_time_h
13012
13013 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13014 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13015 gl_next_as_first_directive='<'time.h'>'
13016 else
13017 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13018 gl_next_as_first_directive=$gl_cv_next_time_h
13019 fi
13020 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
13021
13022
13023
13024
13025
13026
13027
13028
13029ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
13030if test "x$ac_cv_have_decl_unsetenv" = x""yes; then :
13031 ac_have_decl=1
13032else
13033 ac_have_decl=0
13034fi
13035
13036cat >>confdefs.h <<_ACEOF
13037#define HAVE_DECL_UNSETENV $ac_have_decl
13038_ACEOF
13039
13040
13041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
13042$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
13043if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then :
13044 $as_echo_n "(cached) " >&6
13045else
13046 gl_cv_header_wchar_h_correct_inline=yes
13047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13048/* end confdefs.h. */
13049
13050 #define wcstod renamed_wcstod
13051/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13052 <wchar.h>.
13053 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13054 included before <wchar.h>. */
13055#include <stddef.h>
13056#include <stdio.h>
13057#include <time.h>
13058#include <wchar.h>
13059extern int zero (void);
13060int main () { return zero(); }
13061
13062_ACEOF
13063 save_ac_compile="$ac_compile"
13064 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
13065 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
13066 (eval $ac_compile) 2>&5
13067 ac_status=$?
13068 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13069 test $ac_status = 0; }; then
13070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13071/* end confdefs.h. */
13072
13073 #define wcstod renamed_wcstod
13074/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13075 <wchar.h>.
13076 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13077 included before <wchar.h>. */
13078#include <stddef.h>
13079#include <stdio.h>
13080#include <time.h>
13081#include <wchar.h>
13082int zero (void) { return 0; }
13083
13084_ACEOF
13085 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
13086 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
13087 (eval $ac_compile) 2>&5
13088 ac_status=$?
13089 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13090 test $ac_status = 0; }; then
13091 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
13092 :
13093 else
13094 gl_cv_header_wchar_h_correct_inline=no
13095 fi
13096 fi
13097 fi
13098 ac_compile="$save_ac_compile"
13099 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
13100
13101fi
13102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
13103$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
13104 if test $gl_cv_header_wchar_h_correct_inline = no; then
13105 as_fn_error "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
13106This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
13107C99 mode. You have four options:
13108 - Add the flag -fgnu89-inline to CC and reconfigure, or
13109 - Fix your include files, using parts of
13110 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
13111 - Use a gcc version older than 4.3, or
13112 - Don't use the flags -std=c99 or -std=gnu99.
13113Configuration aborted." "$LINENO" 5
13114 fi
13115
13116
13117
13118
13119
13120 if test $ac_cv_header_features_h = yes; then
13121 HAVE_FEATURES_H=1
13122 else
13123 HAVE_FEATURES_H=0
13124 fi
13125
13126
13127
13128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
13129$as_echo_n "checking for wint_t... " >&6; }
13130if test "${gt_cv_c_wint_t+set}" = set; then :
13131 $as_echo_n "(cached) " >&6
13132else
13133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13134/* end confdefs.h. */
13135
13136/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13137 <wchar.h>.
13138 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
13139 before <wchar.h>. */
13140#include <stddef.h>
13141#include <stdio.h>
13142#include <time.h>
13143#include <wchar.h>
13144 wint_t foo = (wchar_t)'\0';
13145int
13146main ()
13147{
13148
13149 ;
13150 return 0;
13151}
13152_ACEOF
13153if ac_fn_c_try_compile "$LINENO"; then :
13154 gt_cv_c_wint_t=yes
13155else
13156 gt_cv_c_wint_t=no
13157fi
13158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13159fi
13160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
13161$as_echo "$gt_cv_c_wint_t" >&6; }
13162 if test $gt_cv_c_wint_t = yes; then
13163
13164$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
13165
13166 fi
13167
13168
13169 GNULIB_ISWBLANK=0;
13170 GNULIB_WCTYPE=0;
13171 GNULIB_ISWCTYPE=0;
13172 GNULIB_WCTRANS=0;
13173 GNULIB_TOWCTRANS=0;
13174 HAVE_ISWBLANK=1;
13175 HAVE_WCTYPE_T=1;
13176 HAVE_WCTRANS_T=1;
13177 REPLACE_ISWBLANK=0;
13178
13179
13180
13181
13182 if false; then
13183 GL_COND_LIBTOOL_TRUE=
13184 GL_COND_LIBTOOL_FALSE='#'
13185else
13186 GL_COND_LIBTOOL_TRUE='#'
13187 GL_COND_LIBTOOL_FALSE=
13188fi
13189
13190 gl_cond_libtool=false
13191 gl_libdeps=
13192 gl_ltlibdeps=
13193 gl_m4_base='import/m4'
13194
13195
13196
13197
13198
13199
13200
13201
13202
13203 gl_source_base='import'
13204
13205
13206 if test $ac_cv_func_alloca_works = no; then
13207 :
13208 fi
13209
13210 # Define an additional variable used in the Makefile substitution.
13211 if test $ac_cv_working_alloca_h = yes; then
13212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
13213$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
13214if test "${gl_cv_rpl_alloca+set}" = set; then :
13215 $as_echo_n "(cached) " >&6
13216else
13217
13218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13219/* end confdefs.h. */
13220
13221#if defined __GNUC__ || defined _AIX || defined _MSC_VER
13222 Need own alloca
13223#endif
13224
13225_ACEOF
13226if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13227 $EGREP "Need own alloca" >/dev/null 2>&1; then :
13228 gl_cv_rpl_alloca=yes
13229else
13230 gl_cv_rpl_alloca=no
13231fi
13232rm -f conftest*
13233
13234
13235fi
13236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
13237$as_echo "$gl_cv_rpl_alloca" >&6; }
13238 if test $gl_cv_rpl_alloca = yes; then
13239
13240$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13241
13242 ALLOCA_H=alloca.h
13243 else
13244 ALLOCA_H=
13245 fi
13246 else
13247 ALLOCA_H=alloca.h
13248 fi
13249
13250 if test -n "$ALLOCA_H"; then
13251 GL_GENERATE_ALLOCA_H_TRUE=
13252 GL_GENERATE_ALLOCA_H_FALSE='#'
13253else
13254 GL_GENERATE_ALLOCA_H_TRUE='#'
13255 GL_GENERATE_ALLOCA_H_FALSE=
13256fi
13257
13258
13259
13260
13261
13262
13263
13264
13265
13266
13267 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
13268
13269
13270
13271
13272 if test $ac_cv_func_canonicalize_file_name = no; then
13273 HAVE_CANONICALIZE_FILE_NAME=0
13274 if test $ac_cv_func_realpath = no; then
13275 HAVE_REALPATH=0
13276 else
13277 case "$gl_cv_func_realpath_works" in
13278 *yes) ;;
13279 *) REPLACE_REALPATH=1 ;;
13280 esac
13281 fi
13282 else
13283 case "$gl_cv_func_realpath_works" in
13284 *yes)
13285 ;;
13286 *)
13287 REPLACE_CANONICALIZE_FILE_NAME=1
13288 REPLACE_REALPATH=1
13289 ;;
13290 esac
13291 fi
13292
13293 if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
13294
13295
13296
13297
13298
13299
13300
13301
13302 gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
13303
13304 fi
13305
13306
13307cat >>confdefs.h <<_ACEOF
13308#define GNULIB_CANONICALIZE_LGPL 1
13309_ACEOF
13310
13311
13312
13313
13314
13315
13316
13317 GNULIB_CANONICALIZE_FILE_NAME=1
13318
13319
13320
13321
13322
13323$as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
13324
13325
13326
13327
13328
13329
13330
13331
13332 GNULIB_REALPATH=1
13333
13334
13335
13336
13337
13338$as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
13339
13340
13341
13342
13343
13344
13345
13346
13347 GNULIB_CHDIR=1
13348
13349
13350
13351
13352
13353$as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
13354
13355
13356
13357
13358
13359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
13360$as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; }
13361if test "${gl_cv_have_arbitrary_file_name_length_limit+set}" = set; then :
13362 $as_echo_n "(cached) " >&6
13363else
13364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13365/* end confdefs.h. */
13366
13367/* Arrange to define PATH_MAX, like "pathmax.h" does. */
13368#if HAVE_UNISTD_H
13369# include <unistd.h>
13370#endif
13371#include <limits.h>
13372#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
13373# include <sys/param.h>
13374#endif
13375#if !defined PATH_MAX && defined MAXPATHLEN
13376# define PATH_MAX MAXPATHLEN
13377#endif
13378#ifdef __hpux
13379# undef PATH_MAX
13380# define PATH_MAX 1024
13381#endif
13382#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
13383# undef PATH_MAX
13384# define PATH_MAX 260
13385#endif
13386
13387#ifdef PATH_MAX
13388have_arbitrary_file_name_length_limit
13389#endif
13390_ACEOF
13391if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13392 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
13393 gl_cv_have_arbitrary_file_name_length_limit=yes
13394else
13395 gl_cv_have_arbitrary_file_name_length_limit=no
13396fi
13397rm -f conftest*
13398
13399fi
13400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
13401$as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
13402
13403 if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
13404
13405
13406
13407
13408
13409
13410
13411
13412 gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
13413
13414 :
13415 fi
13416
13417
13418$as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
13419
13420
13421
13422
13423
13424 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
13425 REPLACE_CLOSE=1
13426 fi
13427
13428
13429
13430
13431
13432 if test $ac_cv_header_sys_socket_h != yes; then
13433 for ac_header in winsock2.h
13434do :
13435 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
13436if test "x$ac_cv_header_winsock2_h" = x""yes; then :
13437 cat >>confdefs.h <<_ACEOF
13438#define HAVE_WINSOCK2_H 1
13439_ACEOF
13440
13441fi
13442
13443done
13444
13445 fi
13446 if test "$ac_cv_header_winsock2_h" = yes; then
13447 HAVE_WINSOCK2_H=1
13448 UNISTD_H_HAVE_WINSOCK2_H=1
13449 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
13450 else
13451 HAVE_WINSOCK2_H=0
13452 fi
13453
13454
13455 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
13456 REPLACE_CLOSE=1
13457 fi
13458
13459
13460 if test $REPLACE_CLOSE = 0; then
13461
13462
13463
13464 if test $ac_cv_func_fchdir = no; then
13465 HAVE_FCHDIR=0
13466 fi
13467
13468 if test $HAVE_FCHDIR = 0; then
13469 REPLACE_CLOSE=1
13470 fi
13471 fi
13472
13473
13474 if test $REPLACE_CLOSE = 1; then
13475
13476
13477
13478
13479
13480
13481
13482
13483 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
13484
13485 fi
13486
13487
13488
13489
13490
13491 GNULIB_CLOSE=1
13492
13493
13494
13495
13496
13497$as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
13498
13499
13500
13501
13502
13503
13504 for ac_func in closedir
13505do :
13506 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
13507if test "x$ac_cv_func_closedir" = x""yes; then :
13508 cat >>confdefs.h <<_ACEOF
13509#define HAVE_CLOSEDIR 1
13510_ACEOF
13511
13512fi
13513done
13514
13515 if test $ac_cv_func_closedir = no; then
13516 HAVE_CLOSEDIR=0
13517 fi
13518
13519
13520
13521
13522 if test $ac_cv_func_fchdir = no; then
13523 HAVE_FCHDIR=0
13524 fi
13525
13526 if test $HAVE_FCHDIR = 0; then
13527 if test $HAVE_CLOSEDIR = 1; then
13528 REPLACE_CLOSEDIR=1
13529 fi
13530 fi
13531
13532 case $host_os,$HAVE_CLOSEDIR in
13533 os2*,1)
13534 REPLACE_CLOSEDIR=1;;
13535 esac
13536
13537 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
13538
13539
13540
13541
13542
13543
13544
13545
13546 gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
13547
13548 fi
13549
13550
13551
13552
13553
13554 GNULIB_CLOSEDIR=1
13555
13556
13557
13558
13559
13560$as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
13561
13562
13563
13564
13565 if test "x$datarootdir" = x; then
13566 datarootdir='${datadir}'
13567
13568 fi
13569 if test "x$docdir" = x; then
13570 docdir='${datarootdir}/doc/${PACKAGE}'
13571
13572 fi
13573 if test "x$htmldir" = x; then
13574 htmldir='${docdir}'
13575
13576 fi
13577 if test "x$dvidir" = x; then
13578 dvidir='${docdir}'
13579
13580 fi
13581 if test "x$pdfdir" = x; then
13582 pdfdir='${docdir}'
13583
13584 fi
13585 if test "x$psdir" = x; then
13586 psdir='${docdir}'
13587
13588 fi
13589 if test "x$lispdir" = x; then
13590 lispdir='${datarootdir}/emacs/site-lisp'
13591
13592 fi
13593 if test "x$localedir" = x; then
13594 localedir='${datarootdir}/locale'
13595
13596 fi
13597 if test "x$runstatedir" = x; then
13598 runstatedir='${localstatedir}/run'
13599
13600 fi
13601
13602 pkglibexecdir='${libexecdir}/${PACKAGE}'
13603
13604
13605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
13606$as_echo_n "checking for d_ino member in directory struct... " >&6; }
13607if test "${gl_cv_struct_dirent_d_ino+set}" = set; then :
13608 $as_echo_n "(cached) " >&6
13609else
13610 if test "$cross_compiling" = yes; then :
13611 case "$host_os" in
13612 # Guess yes on glibc systems with Linux kernel.
13613 linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
13614 # If we don't know, assume the worst.
13615 *) gl_cv_struct_dirent_d_ino="guessing no" ;;
13616 esac
13617
13618else
13619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13620/* end confdefs.h. */
13621#include <sys/types.h>
13622 #include <sys/stat.h>
13623 #include <dirent.h>
13624
13625int
13626main ()
13627{
13628DIR *dp = opendir (".");
13629 struct dirent *e;
13630 struct stat st;
13631 if (! dp)
13632 return 1;
13633 e = readdir (dp);
13634 if (! e)
13635 return 2;
13636 if (lstat (e->d_name, &st) != 0)
13637 return 3;
13638 if (e->d_ino != st.st_ino)
13639 return 4;
13640 closedir (dp);
13641 return 0;
13642
13643 ;
13644 return 0;
13645}
13646_ACEOF
13647if ac_fn_c_try_run "$LINENO"; then :
13648 gl_cv_struct_dirent_d_ino=yes
13649else
13650 gl_cv_struct_dirent_d_ino=no
13651fi
13652rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13653 conftest.$ac_objext conftest.beam conftest.$ac_ext
13654fi
13655
13656fi
13657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
13658$as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
13659 case "$gl_cv_struct_dirent_d_ino" in
13660 *yes)
13661
13662$as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
13663
13664 ;;
13665 esac
13666
13667
13668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
13669$as_echo_n "checking for d_type member in directory struct... " >&6; }
13670if test "${gl_cv_struct_dirent_d_type+set}" = set; then :
13671 $as_echo_n "(cached) " >&6
13672else
13673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13674/* end confdefs.h. */
13675
13676#include <sys/types.h>
13677#include <dirent.h>
13678
13679int
13680main ()
13681{
13682struct dirent dp; dp.d_type = 0;
13683 ;
13684 return 0;
13685}
13686_ACEOF
13687if ac_fn_c_try_link "$LINENO"; then :
13688 gl_cv_struct_dirent_d_type=yes
13689else
13690 gl_cv_struct_dirent_d_type=no
13691fi
13692rm -f core conftest.err conftest.$ac_objext \
13693 conftest$ac_exeext conftest.$ac_ext
13694
13695
13696fi
13697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5
13698$as_echo "$gl_cv_struct_dirent_d_type" >&6; }
13699 if test $gl_cv_struct_dirent_d_type = yes; then
13700
13701$as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
13702
13703 fi
13704
13705
13706
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718 if test $gl_cv_have_include_next = yes; then
13719 gl_cv_next_dirent_h='<'dirent.h'>'
13720 else
13721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
13722$as_echo_n "checking absolute name of <dirent.h>... " >&6; }
13723if test "${gl_cv_next_dirent_h+set}" = set; then :
13724 $as_echo_n "(cached) " >&6
13725else
13726
13727 if test $ac_cv_header_dirent_h = yes; then
13728
13729
13730
13731
13732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13733/* end confdefs.h. */
13734#include <dirent.h>
13735_ACEOF
13736 case "$host_os" in
13737 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13738 *) gl_absname_cpp="$ac_cpp" ;;
13739 esac
13740
13741 case "$host_os" in
13742 mingw*)
13743 gl_dirsep_regex='[/\\]'
13744 ;;
13745 *)
13746 gl_dirsep_regex='\/'
13747 ;;
13748 esac
13749 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13750 gl_header_literal_regex=`echo 'dirent.h' \
13751 | sed -e "$gl_make_literal_regex_sed"`
13752 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13753 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13754 s|^/[^/]|//&|
13755 p
13756 q
13757 }'
13758
13759 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13760 sed -n "$gl_absolute_header_sed"`
13761
13762 gl_header=$gl_cv_absolute_dirent_h
13763 gl_cv_next_dirent_h='"'$gl_header'"'
13764 else
13765 gl_cv_next_dirent_h='<'dirent.h'>'
13766 fi
13767
13768
13769fi
13770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
13771$as_echo "$gl_cv_next_dirent_h" >&6; }
13772 fi
13773 NEXT_DIRENT_H=$gl_cv_next_dirent_h
13774
13775 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13776 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13777 gl_next_as_first_directive='<'dirent.h'>'
13778 else
13779 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13780 gl_next_as_first_directive=$gl_cv_next_dirent_h
13781 fi
13782 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
13783
13784
13785
13786
13787 if test $ac_cv_header_dirent_h = yes; then
13788 HAVE_DIRENT_H=1
13789 else
13790 HAVE_DIRENT_H=0
13791 fi
13792
13793
13794
13795 for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do
13796 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
13797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
13798$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
13799if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
13800 $as_echo_n "(cached) " >&6
13801else
13802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13803/* end confdefs.h. */
13804#include <dirent.h>
13805
13806int
13807main ()
13808{
13809#undef $gl_func
13810 (void) $gl_func;
13811 ;
13812 return 0;
13813}
13814_ACEOF
13815if ac_fn_c_try_compile "$LINENO"; then :
13816 eval "$as_gl_Symbol=yes"
13817else
13818 eval "$as_gl_Symbol=no"
13819fi
13820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13821fi
13822eval ac_res=\$$as_gl_Symbol
13823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13824$as_echo "$ac_res" >&6; }
13825 eval as_val=\$$as_gl_Symbol
13826 if test "x$as_val" = x""yes; then :
13827 cat >>confdefs.h <<_ACEOF
13828#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
13829_ACEOF
13830
13831 eval ac_cv_have_decl_$gl_func=yes
13832fi
13833 done
13834
13835
13836
13837
13838
13839
13840
13841 for ac_func in dirfd
13842do :
13843 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
13844if test "x$ac_cv_func_dirfd" = x""yes; then :
13845 cat >>confdefs.h <<_ACEOF
13846#define HAVE_DIRFD 1
13847_ACEOF
13848
13849fi
13850done
13851
13852 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
13853 #include <dirent.h>
13854"
13855if test "x$ac_cv_have_decl_dirfd" = x""yes; then :
13856 ac_have_decl=1
13857else
13858 ac_have_decl=0
13859fi
13860
13861cat >>confdefs.h <<_ACEOF
13862#define HAVE_DECL_DIRFD $ac_have_decl
13863_ACEOF
13864
13865 if test $ac_cv_have_decl_dirfd = no; then
13866 HAVE_DECL_DIRFD=0
13867 fi
13868
13869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
13870$as_echo_n "checking whether dirfd is a macro... " >&6; }
13871if test "${gl_cv_func_dirfd_macro+set}" = set; then :
13872 $as_echo_n "(cached) " >&6
13873else
13874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13875/* end confdefs.h. */
13876
13877#include <sys/types.h>
13878#include <dirent.h>
13879#ifdef dirfd
13880 dirent_header_defines_dirfd
13881#endif
13882_ACEOF
13883if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13884 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
13885 gl_cv_func_dirfd_macro=yes
13886else
13887 gl_cv_func_dirfd_macro=no
13888fi
13889rm -f conftest*
13890
13891fi
13892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
13893$as_echo "$gl_cv_func_dirfd_macro" >&6; }
13894
13895 # Use the replacement if we have no function or macro with that name,
13896 # or if OS/2 kLIBC whose dirfd() does not work.
13897 # Replace only if the system declares dirfd already.
13898 case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
13899 no,no,*,yes | *,*,os2*,yes)
13900 REPLACE_DIRFD=1
13901
13902$as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
13903;;
13904 esac
13905
13906 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
13907 || test $REPLACE_DIRFD = 1; then
13908
13909
13910
13911
13912
13913
13914
13915
13916 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
13917
13918
13919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
13920$as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
13921if test "${gl_cv_sys_dir_fd_member_name+set}" = set; then :
13922 $as_echo_n "(cached) " >&6
13923else
13924
13925 dirfd_save_CFLAGS=$CFLAGS
13926 for ac_expr in d_fd dd_fd; do
13927
13928 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
13929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13930/* end confdefs.h. */
13931
13932 #include <sys/types.h>
13933 #include <dirent.h>
13934int
13935main ()
13936{
13937DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
13938 ;
13939 return 0;
13940}
13941_ACEOF
13942if ac_fn_c_try_compile "$LINENO"; then :
13943 dir_fd_found=yes
13944
13945fi
13946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13947 CFLAGS=$dirfd_save_CFLAGS
13948 test "$dir_fd_found" = yes && break
13949 done
13950 test "$dir_fd_found" = yes || ac_expr=no_such_member
13951
13952 gl_cv_sys_dir_fd_member_name=$ac_expr
13953
13954
13955fi
13956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
13957$as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
13958 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
13959
13960cat >>confdefs.h <<_ACEOF
13961#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
13962_ACEOF
13963
13964 fi
13965
13966
13967 fi
13968
13969
13970
13971
13972
13973 GNULIB_DIRFD=1
13974
13975
13976
13977
13978
13979$as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
13990$as_echo_n "checking whether // is distinct from /... " >&6; }
13991if test "${gl_cv_double_slash_root+set}" = set; then :
13992 $as_echo_n "(cached) " >&6
13993else
13994 if test x"$cross_compiling" = xyes ; then
13995 # When cross-compiling, there is no way to tell whether // is special
13996 # short of a list of hosts. However, the only known hosts to date
13997 # that have a distinct // are Apollo DomainOS (too old to port to),
13998 # Cygwin, and z/OS. If anyone knows of another system for which // has
13999 # special semantics and is distinct from /, please report it to
14000 # <bug-gnulib@gnu.org>.
14001 case $host in
14002 *-cygwin | i370-ibm-openedition)
14003 gl_cv_double_slash_root=yes ;;
14004 *)
14005 # Be optimistic and assume that / and // are the same when we
14006 # don't know.
14007 gl_cv_double_slash_root='unknown, assuming no' ;;
14008 esac
14009 else
14010 set x `ls -di / // 2>/dev/null`
14011 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
14012 gl_cv_double_slash_root=no
14013 else
14014 gl_cv_double_slash_root=yes
14015 fi
14016 fi
14017fi
14018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
14019$as_echo "$gl_cv_double_slash_root" >&6; }
14020 if test "$gl_cv_double_slash_root" = yes; then
8690e634 14021
6ec2e0f5 14022$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
8690e634 14023
6ec2e0f5 14024 fi
8690e634
JK
14025
14026
14027
14028
6ec2e0f5
SDJ
14029 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
14030 REPLACE_DUP=1
14031 fi
8690e634 14032
8690e634
JK
14033
14034
14035
6ec2e0f5
SDJ
14036 if test $ac_cv_func_fchdir = no; then
14037 HAVE_FCHDIR=0
14038 fi
8690e634 14039
6ec2e0f5
SDJ
14040 if test $HAVE_FCHDIR = 0; then
14041 REPLACE_DUP=1
14042 fi
8690e634 14043
6ec2e0f5
SDJ
14044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
14045$as_echo_n "checking whether dup works... " >&6; }
14046if test "${gl_cv_func_dup_works+set}" = set; then :
14047 $as_echo_n "(cached) " >&6
8690e634 14048else
6ec2e0f5
SDJ
14049 if test "$cross_compiling" = yes; then :
14050 gl_cv_func_dup_works='guessing yes'
14051else
14052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 14053/* end confdefs.h. */
6ec2e0f5
SDJ
14054#include <unistd.h>
14055 #include <fcntl.h>
14056 #include <errno.h>
14057int
14058main ()
14059{
14060/* On OS/2 kLIBC, dup does not work on a directory fd. */
14061 int fd = open (".", O_RDONLY);
14062 return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
8690e634 14063
6ec2e0f5
SDJ
14064 ;
14065 return 0;
14066}
8690e634
JK
14067
14068_ACEOF
6ec2e0f5
SDJ
14069if ac_fn_c_try_run "$LINENO"; then :
14070 gl_cv_func_dup_works=yes
14071else
14072 gl_cv_func_dup_works=no
14073fi
14074rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14075 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 14076fi
8690e634 14077
8690e634 14078
6ec2e0f5
SDJ
14079fi
14080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
14081$as_echo "$gl_cv_func_dup_works" >&6; }
14082 case "$gl_cv_func_dup_works" in
14083 *yes) ;;
14084 *)
14085 REPLACE_DUP=1
14086 ;;
14087 esac
8690e634 14088
6ec2e0f5 14089 if test $REPLACE_DUP = 1; then
8690e634 14090
8690e634 14091
8690e634 14092
8690e634 14093
8690e634 14094
6ec2e0f5
SDJ
14095
14096
14097
14098 gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
14099
14100 :
8690e634
JK
14101 fi
14102
14103
8690e634
JK
14104
14105
14106
6ec2e0f5 14107 GNULIB_DUP=1
8690e634 14108
6ec2e0f5
SDJ
14109
14110
14111
14112
14113$as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
14114
14115
14116
14117
14118
14119
14120
14121
14122$as_echo "#define HAVE_DUP2 1" >>confdefs.h
14123
14124
14125 if test $HAVE_DUP2 = 1; then
14126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
14127$as_echo_n "checking whether dup2 works... " >&6; }
14128if test "${gl_cv_func_dup2_works+set}" = set; then :
8690e634
JK
14129 $as_echo_n "(cached) " >&6
14130else
14131 if test "$cross_compiling" = yes; then :
6ec2e0f5
SDJ
14132 case "$host_os" in
14133 mingw*) # on this platform, dup2 always returns 0 for success
14134 gl_cv_func_dup2_works="guessing no" ;;
14135 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
14136 gl_cv_func_dup2_works="guessing no" ;;
14137 aix* | freebsd*)
14138 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
14139 # not EBADF.
14140 gl_cv_func_dup2_works="guessing no" ;;
14141 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
14142 gl_cv_func_dup2_works="guessing no" ;;
14143 *-android*) # implemented using dup3(), which fails if oldfd == newfd
14144 gl_cv_func_dup2_works="guessing no" ;;
14145 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
14146 gl_cv_func_dup2_works="guessing no" ;;
14147 *) gl_cv_func_dup2_works="guessing yes" ;;
14148 esac
8690e634
JK
14149else
14150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14151/* end confdefs.h. */
14152
6ec2e0f5
SDJ
14153 #include <errno.h>
14154 #include <fcntl.h>
14155 #include <limits.h>
14156 #include <sys/resource.h>
14157 #include <unistd.h>
14158 #ifndef RLIM_SAVED_CUR
14159 # define RLIM_SAVED_CUR RLIM_INFINITY
14160 #endif
14161 #ifndef RLIM_SAVED_MAX
14162 # define RLIM_SAVED_MAX RLIM_INFINITY
14163 #endif
8690e634
JK
14164
14165int
14166main ()
14167{
6ec2e0f5
SDJ
14168int result = 0;
14169 int bad_fd = INT_MAX;
14170 struct rlimit rlim;
14171 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
14172 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
14173 && rlim.rlim_cur != RLIM_INFINITY
14174 && rlim.rlim_cur != RLIM_SAVED_MAX
14175 && rlim.rlim_cur != RLIM_SAVED_CUR)
14176 bad_fd = rlim.rlim_cur;
14177 #ifdef FD_CLOEXEC
14178 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
14179 result |= 1;
14180 #endif
14181 if (dup2 (1, 1) != 1)
14182 result |= 2;
14183 #ifdef FD_CLOEXEC
14184 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
14185 result |= 4;
14186 #endif
14187 close (0);
14188 if (dup2 (0, 0) != -1)
14189 result |= 8;
14190 /* Many gnulib modules require POSIX conformance of EBADF. */
14191 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
14192 result |= 16;
14193 /* Flush out some cygwin core dumps. */
14194 if (dup2 (2, -1) != -1 || errno != EBADF)
14195 result |= 32;
14196 dup2 (2, 255);
14197 dup2 (2, 256);
14198 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
14199 {
14200 int fd = open (".", O_RDONLY);
14201 if (fd == -1)
14202 result |= 64;
14203 else if (dup2 (fd, fd + 1) == -1)
14204 result |= 128;
14205
14206 close (fd);
14207 }
14208 return result;
8690e634
JK
14209 ;
14210 return 0;
14211}
6ec2e0f5 14212
8690e634
JK
14213_ACEOF
14214if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 14215 gl_cv_func_dup2_works=yes
8690e634 14216else
6ec2e0f5 14217 gl_cv_func_dup2_works=no
8690e634
JK
14218fi
14219rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14220 conftest.$ac_objext conftest.beam conftest.$ac_ext
14221fi
14222
6ec2e0f5
SDJ
14223
14224fi
14225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
14226$as_echo "$gl_cv_func_dup2_works" >&6; }
14227 case "$gl_cv_func_dup2_works" in
14228 *yes) ;;
14229 *)
14230 REPLACE_DUP2=1
14231 for ac_func in setdtablesize
14232do :
14233 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
14234if test "x$ac_cv_func_setdtablesize" = x""yes; then :
14235 cat >>confdefs.h <<_ACEOF
14236#define HAVE_SETDTABLESIZE 1
14237_ACEOF
14238
14239fi
14240done
14241
14242 ;;
14243 esac
14244 fi
14245
14246
14247
14248
14249 if test $ac_cv_func_fchdir = no; then
14250 HAVE_FCHDIR=0
8690e634
JK
14251 fi
14252
6ec2e0f5
SDJ
14253 if test $HAVE_FCHDIR = 0; then
14254 if test $HAVE_DUP2 = 1; then
14255 REPLACE_DUP2=1
14256 fi
14257 fi
8690e634 14258
8690e634 14259
6ec2e0f5 14260 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
8690e634
JK
14261
14262
14263
14264
8690e634 14265
8690e634 14266
6ec2e0f5
SDJ
14267
14268
14269 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
14270
14271
8690e634
JK
14272 fi
14273
8690e634 14274
8690e634 14275
8690e634
JK
14276
14277
6ec2e0f5
SDJ
14278 GNULIB_DUP2=1
14279
14280
14281
14282
14283
14284$as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
14285
14286
14287
14288
14289
14290
14291
14292
14293
14294 GNULIB_ENVIRON=1
14295
14296
14297
14298
14299
14300$as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
14301
14302
14303
14304
14305
14306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
14307$as_echo_n "checking for error_at_line... " >&6; }
14308if test "${ac_cv_lib_error_at_line+set}" = set; then :
14309 $as_echo_n "(cached) " >&6
8690e634
JK
14310else
14311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14312/* end confdefs.h. */
6ec2e0f5 14313#include <error.h>
8690e634
JK
14314int
14315main ()
14316{
6ec2e0f5 14317error_at_line (0, 0, "", 0, "an error occurred");
8690e634
JK
14318 ;
14319 return 0;
14320}
14321_ACEOF
6ec2e0f5
SDJ
14322if ac_fn_c_try_link "$LINENO"; then :
14323 ac_cv_lib_error_at_line=yes
8690e634 14324else
6ec2e0f5 14325 ac_cv_lib_error_at_line=no
8690e634 14326fi
6ec2e0f5
SDJ
14327rm -f core conftest.err conftest.$ac_objext \
14328 conftest$ac_exeext conftest.$ac_ext
8690e634 14329fi
6ec2e0f5
SDJ
14330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
14331$as_echo "$ac_cv_lib_error_at_line" >&6; }
14332
14333 if test $ac_cv_lib_error_at_line = no; then
14334
14335
14336
14337
14338
14339
14340
14341
14342 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
14343
8690e634
JK
14344
14345
8690e634
JK
14346 :
14347
6ec2e0f5 14348 fi
6a29c58e 14349
6a29c58e
YQ
14350
14351
14352
3d99e817 14353
6ec2e0f5
SDJ
14354
14355
14356 if test $ac_cv_have_decl_fchdir = no; then
14357 HAVE_DECL_FCHDIR=0
14358 fi
14359
14360
14361 if test $HAVE_FCHDIR = 0; then
14362
14363
3d99e817
AK
14364
14365
14366
14367
14368
14369
6ec2e0f5 14370 gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
3d99e817 14371
6ec2e0f5 14372 :
3d99e817 14373
6ec2e0f5 14374$as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
3d99e817 14375
6ec2e0f5
SDJ
14376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
14377$as_echo_n "checking whether open can visit directories... " >&6; }
14378if test "${gl_cv_func_open_directory_works+set}" = set; then :
14379 $as_echo_n "(cached) " >&6
14380else
14381 if test "$cross_compiling" = yes; then :
14382 case "$host_os" in
14383 # Guess yes on glibc systems.
14384 *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
14385 # If we don't know, assume the worst.
14386 *) gl_cv_func_open_directory_works="guessing no" ;;
14387 esac
3d99e817 14388
6ec2e0f5
SDJ
14389else
14390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14391/* end confdefs.h. */
14392#include <fcntl.h>
3d99e817 14393
6ec2e0f5
SDJ
14394int
14395main ()
14396{
14397return open(".", O_RDONLY) < 0;
14398 ;
14399 return 0;
14400}
3d99e817 14401_ACEOF
6ec2e0f5
SDJ
14402if ac_fn_c_try_run "$LINENO"; then :
14403 gl_cv_func_open_directory_works=yes
14404else
14405 gl_cv_func_open_directory_works=no
14406fi
14407rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14408 conftest.$ac_objext conftest.beam conftest.$ac_ext
14409fi
3d99e817
AK
14410
14411fi
6ec2e0f5
SDJ
14412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
14413$as_echo "$gl_cv_func_open_directory_works" >&6; }
14414 case "$gl_cv_func_open_directory_works" in
14415 *yes) ;;
14416 *)
3d99e817 14417
6ec2e0f5 14418$as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
3d99e817 14419
6ec2e0f5
SDJ
14420 ;;
14421 esac
14422 fi
3d99e817 14423
3d99e817
AK
14424
14425
14426
0750520d 14427
0750520d 14428
6ec2e0f5 14429 GNULIB_FCHDIR=1
0750520d 14430
0750520d
PA
14431
14432
0750520d 14433
0750520d 14434
6ec2e0f5 14435$as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
0750520d 14436
0750520d 14437
0750520d 14438
0750520d 14439
0750520d 14440
0750520d 14441
0750520d 14442
6ec2e0f5
SDJ
14443
14444 if test $ac_cv_func_fcntl = no; then
14445
14446
14447
14448 if test $ac_cv_func_fcntl = no; then
14449 HAVE_FCNTL=0
14450 else
14451 REPLACE_FCNTL=1
14452 fi
14453
14454 else
14455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
14456$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
14457if test "${gl_cv_func_fcntl_f_dupfd_works+set}" = set; then :
0750520d 14458 $as_echo_n "(cached) " >&6
6ec2e0f5
SDJ
14459else
14460 if test "$cross_compiling" = yes; then :
14461 case $host_os in
14462 aix* | cygwin* | haiku*)
14463 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
14464 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
14465 esac
0750520d
PA
14466else
14467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14468/* end confdefs.h. */
6ec2e0f5
SDJ
14469#include <errno.h>
14470 #include <fcntl.h>
14471 #include <limits.h>
14472 #include <sys/resource.h>
14473 #include <unistd.h>
14474 #ifndef RLIM_SAVED_CUR
14475 # define RLIM_SAVED_CUR RLIM_INFINITY
14476 #endif
14477 #ifndef RLIM_SAVED_MAX
14478 # define RLIM_SAVED_MAX RLIM_INFINITY
14479 #endif
0750520d 14480
6ec2e0f5
SDJ
14481int
14482main ()
14483{
14484int result = 0;
14485 int bad_fd = INT_MAX;
14486 struct rlimit rlim;
14487 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
14488 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
14489 && rlim.rlim_cur != RLIM_INFINITY
14490 && rlim.rlim_cur != RLIM_SAVED_MAX
14491 && rlim.rlim_cur != RLIM_SAVED_CUR)
14492 bad_fd = rlim.rlim_cur;
14493 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
14494 if (errno != EINVAL) result |= 2;
14495 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
14496 if (errno != EINVAL) result |= 8;
14497 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
14498 {
14499 int fd;
14500 fd = open (".", O_RDONLY);
14501 if (fd == -1)
14502 result |= 16;
14503 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
14504 result |= 32;
14505
14506 close (fd);
14507 }
14508 return result;
14509 ;
14510 return 0;
14511}
0750520d 14512_ACEOF
6ec2e0f5
SDJ
14513if ac_fn_c_try_run "$LINENO"; then :
14514 gl_cv_func_fcntl_f_dupfd_works=yes
0750520d 14515else
6ec2e0f5
SDJ
14516 gl_cv_func_fcntl_f_dupfd_works=no
14517fi
14518rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14519 conftest.$ac_objext conftest.beam conftest.$ac_ext
0750520d 14520fi
0750520d
PA
14521
14522fi
6ec2e0f5
SDJ
14523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
14524$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
14525 case $gl_cv_func_fcntl_f_dupfd_works in
14526 *yes) ;;
14527 *)
0750520d 14528
0750520d 14529
6ec2e0f5
SDJ
14530 if test $ac_cv_func_fcntl = no; then
14531 HAVE_FCNTL=0
14532 else
14533 REPLACE_FCNTL=1
14534 fi
0750520d 14535
0750520d 14536
6ec2e0f5
SDJ
14537$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
14538 ;;
14539 esac
0750520d 14540
6ec2e0f5
SDJ
14541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
14542$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
14543if test "${gl_cv_func_fcntl_f_dupfd_cloexec+set}" = set; then :
8690e634
JK
14544 $as_echo_n "(cached) " >&6
14545else
14546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14547/* end confdefs.h. */
14548
6ec2e0f5
SDJ
14549#include <fcntl.h>
14550#ifndef F_DUPFD_CLOEXEC
14551choke me
14552#endif
49e4877c 14553
6ec2e0f5
SDJ
14554int
14555main ()
14556{
8690e634 14557
6ec2e0f5
SDJ
14558 ;
14559 return 0;
14560}
14561_ACEOF
14562if ac_fn_c_try_compile "$LINENO"; then :
14563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14564/* end confdefs.h. */
8690e634 14565
6ec2e0f5
SDJ
14566#ifdef __linux__
14567/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
14568 it to support the semantics on older kernels that failed with EINVAL. */
14569choke me
14570#endif
8690e634
JK
14571
14572int
14573main ()
14574{
14575
8690e634
JK
14576 ;
14577 return 0;
14578}
14579_ACEOF
14580if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 14581 gl_cv_func_fcntl_f_dupfd_cloexec=yes
8690e634 14582else
6ec2e0f5 14583 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
8690e634
JK
14584fi
14585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
14586else
14587 gl_cv_func_fcntl_f_dupfd_cloexec=no
8690e634 14588fi
6ec2e0f5
SDJ
14589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14590fi
14591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
14592$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
14593 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
14594
14595
14596
14597 if test $ac_cv_func_fcntl = no; then
14598 HAVE_FCNTL=0
14599 else
14600 REPLACE_FCNTL=1
14601 fi
14602
14603 fi
14604 fi
14605
14606
14607
14608
14609 if test $ac_cv_func_fchdir = no; then
14610 HAVE_FCHDIR=0
14611 fi
14612
14613 if test $HAVE_FCHDIR = 0; then
14614
14615
14616
14617 if test $ac_cv_func_fcntl = no; then
14618 HAVE_FCNTL=0
14619 else
14620 REPLACE_FCNTL=1
14621 fi
14622
14623 fi
14624
14625
14626 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
14627
14628
14629
14630
14631
14632
14633
14634
14635 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
14636
14637 fi
8690e634 14638
8690e634
JK
14639
14640
8690e634
JK
14641
14642
6ec2e0f5 14643 GNULIB_FCNTL=1
8690e634 14644
8690e634
JK
14645
14646
8690e634 14647
8690e634 14648
6ec2e0f5
SDJ
14649$as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
14650
8690e634 14651
8690e634 14652
63ce7108
TT
14653
14654
14655
14656
8690e634
JK
14657
14658
14659
14660
14661
14662
14663
14664 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 14665 gl_cv_next_fcntl_h='<'fcntl.h'>'
8690e634 14666 else
6ec2e0f5
SDJ
14667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
14668$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
14669if test "${gl_cv_next_fcntl_h+set}" = set; then :
8690e634
JK
14670 $as_echo_n "(cached) " >&6
14671else
14672
4a626d0a
PA
14673
14674
14675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 14676/* end confdefs.h. */
6ec2e0f5 14677#include <fcntl.h>
8690e634 14678_ACEOF
4a626d0a
PA
14679 case "$host_os" in
14680 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14681 *) gl_absname_cpp="$ac_cpp" ;;
14682 esac
14683
14684 case "$host_os" in
14685 mingw*)
14686 gl_dirsep_regex='[/\\]'
14687 ;;
14688 *)
14689 gl_dirsep_regex='\/'
14690 ;;
14691 esac
14692 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 14693 gl_header_literal_regex=`echo 'fcntl.h' \
4a626d0a
PA
14694 | sed -e "$gl_make_literal_regex_sed"`
14695 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14696 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14697 s|^/[^/]|//&|
14698 p
14699 q
14700 }'
8690e634 14701
6ec2e0f5 14702 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a 14703 sed -n "$gl_absolute_header_sed"`
c971b7fa 14704
6ec2e0f5
SDJ
14705 gl_header=$gl_cv_absolute_fcntl_h
14706 gl_cv_next_fcntl_h='"'$gl_header'"'
8690e634
JK
14707
14708
14709fi
6ec2e0f5
SDJ
14710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
14711$as_echo "$gl_cv_next_fcntl_h" >&6; }
8690e634 14712 fi
6ec2e0f5 14713 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
8690e634
JK
14714
14715 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14716 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 14717 gl_next_as_first_directive='<'fcntl.h'>'
8690e634
JK
14718 else
14719 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 14720 gl_next_as_first_directive=$gl_cv_next_fcntl_h
8690e634 14721 fi
6ec2e0f5 14722 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
8690e634
JK
14723
14724
14725
14726
14727
14728
6ec2e0f5
SDJ
14729
14730
14731
14732
14733 for gl_func in fcntl openat; do
8690e634
JK
14734 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
14735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
14736$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
14737if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
14738 $as_echo_n "(cached) " >&6
14739else
14740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14741/* end confdefs.h. */
6ec2e0f5 14742#include <fcntl.h>
8690e634
JK
14743
14744int
14745main ()
14746{
14747#undef $gl_func
14748 (void) $gl_func;
14749 ;
14750 return 0;
14751}
14752_ACEOF
14753if ac_fn_c_try_compile "$LINENO"; then :
14754 eval "$as_gl_Symbol=yes"
14755else
14756 eval "$as_gl_Symbol=no"
14757fi
14758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14759fi
14760eval ac_res=\$$as_gl_Symbol
14761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14762$as_echo "$ac_res" >&6; }
14763 eval as_val=\$$as_gl_Symbol
14764 if test "x$as_val" = x""yes; then :
14765 cat >>confdefs.h <<_ACEOF
14766#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
14767_ACEOF
14768
14769 eval ac_cv_have_decl_$gl_func=yes
14770fi
14771 done
14772
14773
14774
8839a007 14775
63ce7108 14776
63ce7108 14777
63ce7108 14778
6ec2e0f5
SDJ
14779 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
14780#include <dirent.h>
14781
14782"
14783if test "x$ac_cv_have_decl_fdopendir" = x""yes; then :
14784 ac_have_decl=1
14785else
14786 ac_have_decl=0
14787fi
14788
14789cat >>confdefs.h <<_ACEOF
14790#define HAVE_DECL_FDOPENDIR $ac_have_decl
63ce7108 14791_ACEOF
6ec2e0f5
SDJ
14792if test $ac_have_decl = 1; then :
14793
63ce7108 14794else
6ec2e0f5 14795 HAVE_DECL_FDOPENDIR=0
63ce7108 14796fi
63ce7108
TT
14797
14798
6ec2e0f5
SDJ
14799 if test $ac_cv_func_fdopendir = no; then
14800 HAVE_FDOPENDIR=0
14801 else
14802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
14803$as_echo_n "checking whether fdopendir works... " >&6; }
14804if test "${gl_cv_func_fdopendir_works+set}" = set; then :
14805 $as_echo_n "(cached) " >&6
14806else
14807 if test "$cross_compiling" = yes; then :
14808 case "$host_os" in
14809 # Guess yes on glibc systems.
14810 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
14811 # If we don't know, assume the worst.
14812 *) gl_cv_func_fdopendir_works="guessing no" ;;
14813 esac
14814
63ce7108
TT
14815else
14816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14817/* end confdefs.h. */
14818
6ec2e0f5
SDJ
14819#include <dirent.h>
14820#include <fcntl.h>
14821#include <unistd.h>
14822#if !HAVE_DECL_FDOPENDIR
14823extern
14824# ifdef __cplusplus
14825"C"
14826# endif
14827DIR *fdopendir (int);
14828#endif
63ce7108
TT
14829
14830int
14831main ()
14832{
6ec2e0f5
SDJ
14833int result = 0;
14834 int fd = open ("conftest.c", O_RDONLY);
14835 if (fd < 0) result |= 1;
14836 if (fdopendir (fd)) result |= 2;
14837 if (close (fd)) result |= 4;
14838 return result;
63ce7108
TT
14839 ;
14840 return 0;
14841}
14842_ACEOF
14843if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 14844 gl_cv_func_fdopendir_works=yes
63ce7108 14845else
6ec2e0f5 14846 gl_cv_func_fdopendir_works=no
63ce7108
TT
14847fi
14848rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14849 conftest.$ac_objext conftest.beam conftest.$ac_ext
14850fi
14851
63ce7108 14852fi
6ec2e0f5
SDJ
14853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
14854$as_echo "$gl_cv_func_fdopendir_works" >&6; }
14855 case "$gl_cv_func_fdopendir_works" in
63ce7108
TT
14856 *yes) ;;
14857 *)
6ec2e0f5 14858 REPLACE_FDOPENDIR=1
63ce7108
TT
14859 ;;
14860 esac
14861 fi
14862
6ec2e0f5 14863 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
09607c9e
TT
14864
14865
14866
4a626d0a
PA
14867
14868
14869
14870
14871
6ec2e0f5 14872 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
4a626d0a 14873
6ec2e0f5 14874 fi
4a626d0a
PA
14875
14876
14877
4a626d0a 14878
4a626d0a 14879
6ec2e0f5 14880 GNULIB_FDOPENDIR=1
4a626d0a
PA
14881
14882
14883
14884
14885
6ec2e0f5 14886$as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
4a626d0a
PA
14887
14888
14889
14890
14891
6ec2e0f5
SDJ
14892cat >>confdefs.h <<_ACEOF
14893#define GNULIB_FDOPENDIR 1
14894_ACEOF
4a626d0a 14895
09607c9e 14896
09607c9e
TT
14897
14898
14899
6ec2e0f5
SDJ
14900
14901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
14902$as_echo_n "checking for flexible array member... " >&6; }
14903if test "${ac_cv_c_flexmember+set}" = set; then :
09607c9e
TT
14904 $as_echo_n "(cached) " >&6
14905else
14906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14907/* end confdefs.h. */
6ec2e0f5
SDJ
14908#include <stdlib.h>
14909 #include <stdio.h>
14910 #include <stddef.h>
14911 struct s { int n; double d[]; };
09607c9e
TT
14912int
14913main ()
14914{
6ec2e0f5
SDJ
14915int m = getchar ();
14916 size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
14917 nbytes += sizeof (struct s) - 1;
14918 nbytes -= nbytes % sizeof (struct s);
14919 struct s *p = malloc (nbytes);
14920 p->d[0] = 0.0;
14921 return p->d != (double *) NULL;
09607c9e
TT
14922 ;
14923 return 0;
14924}
14925_ACEOF
14926if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 14927 ac_cv_c_flexmember=yes
09607c9e 14928else
6ec2e0f5 14929 ac_cv_c_flexmember=no
09607c9e
TT
14930fi
14931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14932fi
6ec2e0f5
SDJ
14933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
14934$as_echo "$ac_cv_c_flexmember" >&6; }
14935 if test $ac_cv_c_flexmember = yes; then
14936
14937$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
09607c9e 14938
09607c9e 14939 else
6ec2e0f5 14940 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
09607c9e 14941
6ec2e0f5
SDJ
14942 fi
14943
14944
14945
14946
14947 FLOAT_H=
14948 REPLACE_FLOAT_LDBL=0
14949 case "$host_os" in
14950 aix* | beos* | openbsd* | mirbsd* | irix*)
14951 FLOAT_H=float.h
14952 ;;
14953 freebsd*)
14954 case "$host_cpu" in
14955 i[34567]86 )
14956 FLOAT_H=float.h
14957 ;;
14958 x86_64 )
14959 # On x86_64 systems, the C compiler may still be generating
14960 # 32-bit code.
14961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14962/* end confdefs.h. */
14963#if defined __LP64__ || defined __x86_64__ || defined __amd64__
14964 yes
14965 #endif
09607c9e 14966_ACEOF
6ec2e0f5
SDJ
14967if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14968 $EGREP "yes" >/dev/null 2>&1; then :
14969
09607c9e 14970else
6ec2e0f5 14971 FLOAT_H=float.h
09607c9e 14972fi
6ec2e0f5
SDJ
14973rm -f conftest*
14974
14975 ;;
14976 esac
14977 ;;
14978 linux*)
14979 case "$host_cpu" in
14980 powerpc*)
14981 FLOAT_H=float.h
14982 ;;
14983 esac
14984 ;;
14985 esac
14986 case "$host_os" in
14987 aix* | freebsd* | linux*)
14988 if test -n "$FLOAT_H"; then
14989 REPLACE_FLOAT_LDBL=1
14990 fi
14991 ;;
14992 esac
14993
14994 REPLACE_ITOLD=0
14995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
14996$as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
14997if test "${gl_cv_func_itold_works+set}" = set; then :
09607c9e
TT
14998 $as_echo_n "(cached) " >&6
14999else
09607c9e 15000
6ec2e0f5
SDJ
15001 if test "$cross_compiling" = yes; then :
15002 case "$host" in
15003 sparc*-*-linux*)
15004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15005/* end confdefs.h. */
15006#if defined __LP64__ || defined __arch64__
15007 yes
15008 #endif
09607c9e 15009_ACEOF
6ec2e0f5
SDJ
15010if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15011 $EGREP "yes" >/dev/null 2>&1; then :
15012 gl_cv_func_itold_works="guessing no"
09607c9e 15013else
6ec2e0f5 15014 gl_cv_func_itold_works="guessing yes"
09607c9e 15015fi
6ec2e0f5
SDJ
15016rm -f conftest*
15017
15018 ;;
15019 *) gl_cv_func_itold_works="guessing yes" ;;
15020 esac
15021
4a626d0a
PA
15022else
15023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15024/* end confdefs.h. */
4a626d0a 15025
6ec2e0f5
SDJ
15026int i = -1;
15027volatile long double ld;
15028int main ()
4a626d0a 15029{
6ec2e0f5
SDJ
15030 ld += i * 1.0L;
15031 if (ld > 0)
15032 return 1;
4a626d0a
PA
15033 return 0;
15034}
15035_ACEOF
6ec2e0f5
SDJ
15036if ac_fn_c_try_run "$LINENO"; then :
15037 gl_cv_func_itold_works=yes
4a626d0a 15038else
6ec2e0f5
SDJ
15039 gl_cv_func_itold_works=no
15040fi
15041rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15042 conftest.$ac_objext conftest.beam conftest.$ac_ext
15043fi
09607c9e
TT
15044
15045
6ec2e0f5
SDJ
15046fi
15047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
15048$as_echo "$gl_cv_func_itold_works" >&6; }
15049 case "$gl_cv_func_itold_works" in
15050 *no)
15051 REPLACE_ITOLD=1
15052 FLOAT_H=float.h
15053 ;;
15054 esac
09607c9e 15055
6ec2e0f5 15056 if test -n "$FLOAT_H"; then
09607c9e
TT
15057
15058
15059
15060
15061
15062
15063
4a626d0a 15064
09607c9e 15065 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 15066 gl_cv_next_float_h='<'float.h'>'
09607c9e 15067 else
6ec2e0f5
SDJ
15068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
15069$as_echo_n "checking absolute name of <float.h>... " >&6; }
15070if test "${gl_cv_next_float_h+set}" = set; then :
09607c9e
TT
15071 $as_echo_n "(cached) " >&6
15072else
15073
4a626d0a
PA
15074
15075
15076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
09607c9e 15077/* end confdefs.h. */
6ec2e0f5 15078#include <float.h>
09607c9e 15079_ACEOF
4a626d0a
PA
15080 case "$host_os" in
15081 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15082 *) gl_absname_cpp="$ac_cpp" ;;
15083 esac
15084
15085 case "$host_os" in
15086 mingw*)
15087 gl_dirsep_regex='[/\\]'
15088 ;;
15089 *)
15090 gl_dirsep_regex='\/'
15091 ;;
15092 esac
15093 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 15094 gl_header_literal_regex=`echo 'float.h' \
4a626d0a
PA
15095 | sed -e "$gl_make_literal_regex_sed"`
15096 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15097 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15098 s|^/[^/]|//&|
15099 p
15100 q
15101 }'
09607c9e 15102
6ec2e0f5 15103 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a 15104 sed -n "$gl_absolute_header_sed"`
09607c9e 15105
6ec2e0f5
SDJ
15106 gl_header=$gl_cv_absolute_float_h
15107 gl_cv_next_float_h='"'$gl_header'"'
09607c9e
TT
15108
15109
15110fi
6ec2e0f5
SDJ
15111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
15112$as_echo "$gl_cv_next_float_h" >&6; }
09607c9e 15113 fi
6ec2e0f5 15114 NEXT_FLOAT_H=$gl_cv_next_float_h
09607c9e
TT
15115
15116 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15117 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 15118 gl_next_as_first_directive='<'float.h'>'
09607c9e
TT
15119 else
15120 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 15121 gl_next_as_first_directive=$gl_cv_next_float_h
09607c9e 15122 fi
6ec2e0f5 15123 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
09607c9e
TT
15124
15125
15126
15127
6ec2e0f5 15128 fi
09607c9e 15129
6ec2e0f5
SDJ
15130 if test -n "$FLOAT_H"; then
15131 GL_GENERATE_FLOAT_H_TRUE=
15132 GL_GENERATE_FLOAT_H_FALSE='#'
3d99e817 15133else
6ec2e0f5
SDJ
15134 GL_GENERATE_FLOAT_H_TRUE='#'
15135 GL_GENERATE_FLOAT_H_FALSE=
3d99e817
AK
15136fi
15137
3d99e817 15138
09607c9e 15139
6ec2e0f5 15140 if test $REPLACE_FLOAT_LDBL = 1; then
8690e634 15141
8690e634 15142
8690e634 15143
8690e634 15144
8690e634 15145
6ec2e0f5
SDJ
15146
15147
15148
15149 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
15150
8690e634 15151 fi
6ec2e0f5 15152 if test $REPLACE_ITOLD = 1; then
8690e634
JK
15153
15154
15155
15156
15157
6ec2e0f5
SDJ
15158
15159
15160
15161 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
15162
8690e634
JK
15163 fi
15164
15165
15166
6ec2e0f5
SDJ
15167
15168
15169 FNMATCH_H=
15170 gl_fnmatch_required_lowercase=`
15171 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
15172 `
15173 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
15174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
15175$as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
15176if { as_var=$gl_fnmatch_cache_var; eval "test \"\${$as_var+set}\" = set"; }; then :
8690e634 15177 $as_echo_n "(cached) " >&6
6ec2e0f5
SDJ
15178else
15179 if test $gl_fnmatch_required = GNU; then
15180 gl_fnmatch_gnu_start=
15181 gl_fnmatch_gnu_end=
15182 else
15183 gl_fnmatch_gnu_start='#if 0'
15184 gl_fnmatch_gnu_end='#endif'
15185 fi
15186 if test "$cross_compiling" = yes; then :
15187 eval "$gl_fnmatch_cache_var=\"guessing no\""
8690e634
JK
15188else
15189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15190/* end confdefs.h. */
6ec2e0f5
SDJ
15191#include <fnmatch.h>
15192 static int
15193 y (char const *pattern, char const *string, int flags)
15194 {
15195 return fnmatch (pattern, string, flags) == 0;
15196 }
15197 static int
15198 n (char const *pattern, char const *string, int flags)
15199 {
15200 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
15201 }
8690e634 15202
8690e634
JK
15203int
15204main ()
15205{
6ec2e0f5
SDJ
15206char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
15207 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
15208 static char const A_1[] = { 'A' - 1, 0 };
15209 static char const A01[] = { 'A' + 1, 0 };
15210 static char const a_1[] = { 'a' - 1, 0 };
15211 static char const a01[] = { 'a' + 1, 0 };
15212 static char const bs_1[] = { '\\\\' - 1, 0 };
15213 static char const bs01[] = { '\\\\' + 1, 0 };
15214 int result = 0;
15215 if (!n ("a*", "", 0))
15216 return 1;
15217 if (!y ("a*", "abc", 0))
15218 return 1;
15219 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
15220 return 1;
15221 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
15222 return 2;
15223 if (!y ("a\\\\bc", "abc", 0))
15224 return 3;
15225 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
15226 return 3;
15227 if (!y ("*x", ".x", 0))
15228 return 4;
15229 if (!n ("*x", ".x", FNM_PERIOD))
15230 return 4;
15231 if (!y (Apat, "\\\\", 0))
15232 return 5;
15233 if (!y (Apat, "A", 0))
15234 return 5;
15235 if (!y (apat, "\\\\", 0))
15236 return 5;
15237 if (!y (apat, "a", 0))
15238 return 5;
15239 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
15240 return 5;
15241 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
15242 return 5;
15243 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
15244 return 5;
15245 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
15246 return 5;
15247 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
15248 return 5;
15249 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
15250 return 5;
15251 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
15252 return 5;
15253 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
15254 return 5;
15255 $gl_fnmatch_gnu_start
15256 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
15257 result |= 8;
15258 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
15259 result |= 16;
15260 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
15261 result |= 32;
15262 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
15263 result |= 64;
15264 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
15265 result |= 64;
15266 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
15267 result |= 64;
15268 $gl_fnmatch_gnu_end
15269 return result;
8690e634
JK
15270
15271 ;
15272 return 0;
15273}
15274_ACEOF
6ec2e0f5
SDJ
15275if ac_fn_c_try_run "$LINENO"; then :
15276 eval "$gl_fnmatch_cache_var=yes"
8690e634 15277else
6ec2e0f5 15278 eval "$gl_fnmatch_cache_var=no"
8690e634 15279fi
6ec2e0f5
SDJ
15280rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15281 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 15282fi
8690e634 15283
8690e634 15284
6ec2e0f5
SDJ
15285fi
15286eval ac_res=\$$gl_fnmatch_cache_var
15287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15288$as_echo "$ac_res" >&6; }
15289 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
15290 if test "$gl_fnmatch_result" = yes; then
15291 rm -f "$gl_source_base/fnmatch.h"
15292 else
15293 FNMATCH_H=fnmatch.h
8690e634
JK
15294 fi
15295
6ec2e0f5
SDJ
15296 if test -n "$FNMATCH_H"; then
15297 GL_GENERATE_FNMATCH_H_TRUE=
15298 GL_GENERATE_FNMATCH_H_FALSE='#'
15299else
15300 GL_GENERATE_FNMATCH_H_TRUE='#'
15301 GL_GENERATE_FNMATCH_H_FALSE=
15302fi
8690e634 15303
8690e634 15304
6ec2e0f5 15305 if test -n "$FNMATCH_H"; then
8690e634
JK
15306
15307
15308
6ec2e0f5
SDJ
15309
15310
15311
15312
15313
15314 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
15315
15316
15317
15318cat >>confdefs.h <<_ACEOF
15319#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
15320_ACEOF
15321
15322
15323 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
15324"
15325if test "x$ac_cv_have_decl_isblank" = x""yes; then :
15326 ac_have_decl=1
8690e634 15327else
6ec2e0f5 15328 ac_have_decl=0
8690e634
JK
15329fi
15330
6ec2e0f5
SDJ
15331cat >>confdefs.h <<_ACEOF
15332#define HAVE_DECL_ISBLANK $ac_have_decl
15333_ACEOF
8690e634
JK
15334
15335
15336
15337
6ec2e0f5 15338 fi
8690e634
JK
15339
15340
15341
15342
15343
6ec2e0f5 15344 if test -n "$FNMATCH_H"; then
8690e634
JK
15345
15346
8690e634 15347
8690e634 15348
8690e634 15349
8690e634 15350
8690e634
JK
15351
15352
6ec2e0f5 15353 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
8690e634 15354
8690e634 15355
8690e634 15356
6ec2e0f5
SDJ
15357cat >>confdefs.h <<_ACEOF
15358#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
15359_ACEOF
15360
15361
15362 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
15363"
15364if test "x$ac_cv_have_decl_isblank" = x""yes; then :
15365 ac_have_decl=1
8690e634 15366else
6ec2e0f5 15367 ac_have_decl=0
8690e634
JK
15368fi
15369
6ec2e0f5
SDJ
15370cat >>confdefs.h <<_ACEOF
15371#define HAVE_DECL_ISBLANK $ac_have_decl
15372_ACEOF
8690e634
JK
15373
15374
98399780
YQ
15375
15376
98399780
YQ
15377 fi
15378
98399780
YQ
15379
15380
6ec2e0f5
SDJ
15381 FREXP_LIBM=
15382 if test $gl_cv_func_frexp_no_libm = no; then
15383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5
15384$as_echo_n "checking whether frexp() can be used with libm... " >&6; }
15385if test "${gl_cv_func_frexp_in_libm+set}" = set; then :
15386 $as_echo_n "(cached) " >&6
15387else
98399780 15388
6ec2e0f5
SDJ
15389 save_LIBS="$LIBS"
15390 LIBS="$LIBS -lm"
15391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15392/* end confdefs.h. */
15393#include <math.h>
15394 double x;
15395int
15396main ()
15397{
15398int e; return frexp (x, &e) > 0;
15399 ;
15400 return 0;
15401}
15402_ACEOF
15403if ac_fn_c_try_link "$LINENO"; then :
15404 gl_cv_func_frexp_in_libm=yes
15405else
15406 gl_cv_func_frexp_in_libm=no
15407fi
15408rm -f core conftest.err conftest.$ac_objext \
15409 conftest$ac_exeext conftest.$ac_ext
15410 LIBS="$save_LIBS"
98399780 15411
6ec2e0f5
SDJ
15412fi
15413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5
15414$as_echo "$gl_cv_func_frexp_in_libm" >&6; }
15415 if test $gl_cv_func_frexp_in_libm = yes; then
15416 FREXP_LIBM=-lm
15417 fi
15418 fi
15419 if test $gl_cv_func_frexp_no_libm = yes \
15420 || test $gl_cv_func_frexp_in_libm = yes; then
15421 save_LIBS="$LIBS"
15422 LIBS="$LIBS $FREXP_LIBM"
98399780
YQ
15423
15424
15425
6ec2e0f5
SDJ
15426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
15427$as_echo_n "checking whether frexp works... " >&6; }
15428if test "${gl_cv_func_frexp_works+set}" = set; then :
15429 $as_echo_n "(cached) " >&6
15430else
98399780 15431
6ec2e0f5
SDJ
15432 if test "$cross_compiling" = yes; then :
15433 case "$host_os" in
15434 netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
15435 *) gl_cv_func_frexp_works="guessing yes";;
15436 esac
98399780 15437
6ec2e0f5
SDJ
15438else
15439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15440/* end confdefs.h. */
98399780 15441
6ec2e0f5
SDJ
15442#include <float.h>
15443#include <math.h>
15444#include <string.h>
15445#if HAVE_DECL_ALARM
15446# include <signal.h>
15447# include <unistd.h>
15448#endif
15449/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
15450 ICC 10.0 has a bug when optimizing the expression -zero.
15451 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
15452 to PowerPC on Mac OS X 10.5. */
15453#if defined __hpux || defined __sgi || defined __ICC
15454static double
15455compute_minus_zero (void)
15456{
15457 return -DBL_MIN * DBL_MIN;
15458}
15459# define minus_zero compute_minus_zero ()
15460#else
15461double minus_zero = -0.0;
15462#endif
15463int main()
15464{
15465 int result = 0;
15466 int i;
15467 volatile double x;
15468 double zero = 0.0;
15469#if HAVE_DECL_ALARM
15470 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
15471 number. Let the test fail in this case. */
15472 signal (SIGALRM, SIG_DFL);
15473 alarm (5);
15474#endif
15475 /* Test on denormalized numbers. */
15476 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
15477 ;
15478 if (x > 0.0)
15479 {
15480 int exp;
15481 double y = frexp (x, &exp);
15482 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
15483 On NetBSD: y = 0.75. Correct: y = 0.5. */
15484 if (y != 0.5)
15485 result |= 1;
15486 }
15487 /* Test on infinite numbers. */
15488 x = 1.0 / zero;
15489 {
15490 int exp;
15491 double y = frexp (x, &exp);
15492 if (y != x)
15493 result |= 2;
15494 }
15495 /* Test on negative zero. */
15496 x = minus_zero;
15497 {
15498 int exp;
15499 double y = frexp (x, &exp);
15500 if (memcmp (&y, &x, sizeof x))
15501 result |= 4;
15502 }
15503 return result;
15504}
98399780 15505_ACEOF
6ec2e0f5
SDJ
15506if ac_fn_c_try_run "$LINENO"; then :
15507 gl_cv_func_frexp_works=yes
15508else
15509 gl_cv_func_frexp_works=no
15510fi
15511rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15512 conftest.$ac_objext conftest.beam conftest.$ac_ext
15513fi
98399780
YQ
15514
15515
6ec2e0f5
SDJ
15516fi
15517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
15518$as_echo "$gl_cv_func_frexp_works" >&6; }
98399780 15519
6ec2e0f5
SDJ
15520 LIBS="$save_LIBS"
15521 case "$gl_cv_func_frexp_works" in
15522 *yes) gl_func_frexp=yes ;;
15523 *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;;
15524 esac
15525 else
15526 gl_func_frexp=no
15527 fi
15528 if test $gl_func_frexp = yes; then
98399780 15529
6ec2e0f5 15530$as_echo "#define HAVE_FREXP 1" >>confdefs.h
98399780 15531
6ec2e0f5 15532 fi
98399780
YQ
15533
15534
6ec2e0f5 15535 if test $gl_func_frexp != yes; then
6a29c58e
YQ
15536
15537
15538
15539
6a29c58e
YQ
15540
15541
15542
15543
6ec2e0f5 15544 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
8690e634
JK
15545
15546 fi
8690e634 15547
8690e634 15548
8690e634 15549
8690e634 15550
8690e634 15551
6ec2e0f5 15552 GNULIB_FREXP=1
8690e634 15553
8690e634 15554
4a626d0a 15555
8690e634 15556
8690e634 15557
6ec2e0f5 15558$as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
8690e634
JK
15559
15560
15561
15562
15563
63ce7108 15564
e26b6bb0
TT
15565
15566
15567
6ec2e0f5
SDJ
15568 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
15569"
15570if test "x$ac_cv_have_decl_frexpl" = x""yes; then :
e26b6bb0 15571
6ec2e0f5
SDJ
15572else
15573 HAVE_DECL_FREXPL=0
15574fi
e26b6bb0
TT
15575
15576
6ec2e0f5
SDJ
15577 FREXPL_LIBM=
15578 if test $HAVE_DECL_FREXPL = 1; then
e26b6bb0 15579
6ec2e0f5
SDJ
15580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
15581$as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
15582if test "${gl_cv_func_frexpl_no_libm+set}" = set; then :
e26b6bb0
TT
15583 $as_echo_n "(cached) " >&6
15584else
15585
6ec2e0f5 15586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e26b6bb0 15587/* end confdefs.h. */
6ec2e0f5
SDJ
15588#include <math.h>
15589 long double x;
15590int
15591main ()
15592{
15593int e; return frexpl (x, &e) > 0;
15594 ;
15595 return 0;
15596}
e26b6bb0 15597_ACEOF
6ec2e0f5
SDJ
15598if ac_fn_c_try_link "$LINENO"; then :
15599 gl_cv_func_frexpl_no_libm=yes
15600else
15601 gl_cv_func_frexpl_no_libm=no
e26b6bb0 15602fi
6ec2e0f5
SDJ
15603rm -f core conftest.err conftest.$ac_objext \
15604 conftest$ac_exeext conftest.$ac_ext
e26b6bb0 15605
6ec2e0f5
SDJ
15606fi
15607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
15608$as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
e26b6bb0 15609
6ec2e0f5
SDJ
15610 if test $gl_cv_func_frexpl_no_libm = no; then
15611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5
15612$as_echo_n "checking whether frexpl() can be used with libm... " >&6; }
15613if test "${gl_cv_func_frexpl_in_libm+set}" = set; then :
e26b6bb0
TT
15614 $as_echo_n "(cached) " >&6
15615else
e26b6bb0 15616
6ec2e0f5
SDJ
15617 save_LIBS="$LIBS"
15618 LIBS="$LIBS -lm"
15619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15620/* end confdefs.h. */
15621#include <math.h>
15622 long double x;
e26b6bb0
TT
15623int
15624main ()
15625{
6ec2e0f5 15626int e; return frexpl (x, &e) > 0;
e26b6bb0
TT
15627 ;
15628 return 0;
15629}
15630_ACEOF
6ec2e0f5
SDJ
15631if ac_fn_c_try_link "$LINENO"; then :
15632 gl_cv_func_frexpl_in_libm=yes
e26b6bb0 15633else
6ec2e0f5 15634 gl_cv_func_frexpl_in_libm=no
e26b6bb0 15635fi
6ec2e0f5
SDJ
15636rm -f core conftest.err conftest.$ac_objext \
15637 conftest$ac_exeext conftest.$ac_ext
15638 LIBS="$save_LIBS"
e26b6bb0 15639
e26b6bb0 15640fi
6ec2e0f5
SDJ
15641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5
15642$as_echo "$gl_cv_func_frexpl_in_libm" >&6; }
15643 if test $gl_cv_func_frexpl_in_libm = yes; then
15644 FREXPL_LIBM=-lm
15645 fi
15646 fi
15647 if test $gl_cv_func_frexpl_no_libm = yes \
15648 || test $gl_cv_func_frexpl_in_libm = yes; then
15649 save_LIBS="$LIBS"
15650 LIBS="$LIBS $FREXPL_LIBM"
18848e28 15651
18848e28 15652
6ec2e0f5
SDJ
15653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
15654$as_echo_n "checking whether frexpl works... " >&6; }
15655if test "${gl_cv_func_frexpl_works+set}" = set; then :
15656 $as_echo_n "(cached) " >&6
18848e28 15657else
18848e28 15658
6ec2e0f5 15659 if test "$cross_compiling" = yes; then :
18848e28 15660
6ec2e0f5
SDJ
15661 case "$host_os" in
15662 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
15663 gl_cv_func_frexpl_works="guessing no";;
15664 *) gl_cv_func_frexpl_works="guessing yes";;
15665 esac
18848e28 15666
18848e28
GF
15667else
15668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15669/* end confdefs.h. */
15670
6ec2e0f5
SDJ
15671#include <float.h>
15672#include <math.h>
15673/* Override the values of <float.h>, like done in float.in.h. */
15674#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
15675# undef LDBL_MIN_EXP
15676# define LDBL_MIN_EXP (-16381)
15677#endif
15678#if defined __i386__ && defined __FreeBSD__
15679# undef LDBL_MIN_EXP
15680# define LDBL_MIN_EXP (-16381)
15681#endif
15682#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
15683# undef LDBL_MIN_EXP
15684# define LDBL_MIN_EXP DBL_MIN_EXP
18848e28 15685#endif
6ec2e0f5
SDJ
15686#if defined __sgi && (LDBL_MANT_DIG >= 106)
15687# if defined __GNUC__
15688# undef LDBL_MIN_EXP
15689# define LDBL_MIN_EXP DBL_MIN_EXP
15690# endif
15691#endif
15692extern
15693#ifdef __cplusplus
15694"C"
15695#endif
15696long double frexpl (long double, int *);
15697int main()
15698{
15699 int result = 0;
15700 volatile long double x;
15701 /* Test on finite numbers that fails on AIX 5.1. */
15702 x = 16.0L;
15703 {
15704 int exp = -9999;
15705 frexpl (x, &exp);
15706 if (exp != 5)
15707 result |= 1;
15708 }
15709 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
15710 function returns an invalid (incorrectly normalized) value: it returns
15711 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
15712 but the correct result is
15713 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
15714 x = 1.01L;
15715 {
15716 int exp = -9999;
15717 long double y = frexpl (x, &exp);
15718 if (!(exp == 1 && y == 0.505L))
15719 result |= 2;
15720 }
15721 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
15722 LDBL_MAX_EXP = 16384.
15723 In the loop end test, we test x against Infinity, rather than comparing
15724 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
15725 {
15726 int i;
15727 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
15728 {
15729 int exp = -9999;
15730 frexpl (x, &exp);
15731 if (exp != i)
15732 {
15733 result |= 4;
15734 break;
15735 }
15736 }
15737 }
15738 /* Test on denormalized numbers. */
15739 {
15740 int i;
15741 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
15742 ;
15743 if (x > 0.0L)
15744 {
15745 int exp;
15746 long double y = frexpl (x, &exp);
15747 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
15748 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
15749 if (exp != LDBL_MIN_EXP - 1)
15750 result |= 8;
15751 }
15752 }
15753 /* Test on infinite numbers. */
15754 x = 1.0L / 0.0L;
15755 {
15756 int exp;
15757 long double y = frexpl (x, &exp);
15758 if (y != x)
15759 result |= 16;
15760 }
15761 return result;
15762}
18848e28 15763_ACEOF
6ec2e0f5
SDJ
15764if ac_fn_c_try_run "$LINENO"; then :
15765 gl_cv_func_frexpl_works=yes
18848e28 15766else
6ec2e0f5 15767 gl_cv_func_frexpl_works=no
18848e28 15768fi
6ec2e0f5
SDJ
15769rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15770 conftest.$ac_objext conftest.beam conftest.$ac_ext
18848e28 15771fi
18848e28
GF
15772
15773
6ec2e0f5
SDJ
15774fi
15775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
15776$as_echo "$gl_cv_func_frexpl_works" >&6; }
18848e28 15777
6ec2e0f5
SDJ
15778 LIBS="$save_LIBS"
15779 case "$gl_cv_func_frexpl_works" in
15780 *yes) gl_func_frexpl=yes ;;
15781 *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;;
15782 esac
15783 else
15784 gl_func_frexpl=no
15785 fi
15786 if test $gl_func_frexpl = yes; then
18848e28 15787
6ec2e0f5 15788$as_echo "#define HAVE_FREXPL 1" >>confdefs.h
18848e28 15789
6ec2e0f5
SDJ
15790 fi
15791 fi
15792 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
15793 if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
18848e28 15794
6ec2e0f5
SDJ
15795 FREXPL_LIBM="$FREXP_LIBM"
15796 else
15797 FREXPL_LIBM=
15798 fi
15799 fi
18848e28 15800
18848e28 15801
6ec2e0f5 15802 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
18848e28 15803
18848e28 15804
18848e28 15805
18848e28
GF
15806
15807
18848e28 15808
18848e28 15809
18848e28 15810
6ec2e0f5 15811 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
18848e28
GF
15812
15813 fi
15814
15815
15816
15817
15818
6ec2e0f5 15819 GNULIB_FREXPL=1
18848e28
GF
15820
15821
15822
15823
15824
6ec2e0f5 15825$as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
18848e28
GF
15826
15827
15828
15829
15830
15831
15832
6ec2e0f5
SDJ
15833 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
15834 REPLACE_FSTAT=1
15835 fi
15836
15837
15838 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
15839 REPLACE_FSTAT=1
15840 fi
18848e28 15841
6a29c58e 15842
6a29c58e 15843
6a29c58e 15844
6ec2e0f5
SDJ
15845
15846 if test $ac_cv_func_fchdir = no; then
15847 HAVE_FCHDIR=0
6a29c58e
YQ
15848 fi
15849
6ec2e0f5
SDJ
15850 if test $HAVE_FCHDIR = 0; then
15851 case "$gl_cv_func_open_directory_works" in
15852 *yes) ;;
15853 *)
15854 REPLACE_FSTAT=1
15855 ;;
15856 esac
15857 fi
6a29c58e
YQ
15858
15859
6ec2e0f5 15860 if test $REPLACE_FSTAT = 1; then
6a29c58e 15861
3d99e817
AK
15862
15863
15864
3d99e817
AK
15865
15866
15867
15868
6ec2e0f5 15869 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
3d99e817 15870
6ec2e0f5
SDJ
15871 :
15872 fi
3d99e817
AK
15873
15874
15875
15876
15877
6ec2e0f5 15878 GNULIB_FSTAT=1
3d99e817 15879
49e4877c 15880
49e4877c 15881
49e4877c 15882
49e4877c 15883
6ec2e0f5 15884$as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
49e4877c 15885
6a29c58e
YQ
15886
15887
88b48903 15888
8690e634 15889
a512b375 15890
88b48903 15891
88b48903 15892
6ec2e0f5
SDJ
15893
15894 if test $ac_cv_func_fstatat = no; then
15895 HAVE_FSTATAT=0
15896 else
15897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
15898$as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
15899if test "${gl_cv_func_fstatat_zero_flag+set}" = set; then :
15900 $as_echo_n "(cached) " >&6
15901else
15902 if test "$cross_compiling" = yes; then :
15903 case "$host_os" in
15904 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
15905 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
15906 esac
88b48903 15907
8690e634
JK
15908else
15909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15910/* end confdefs.h. */
8690e634 15911
6ec2e0f5
SDJ
15912 #include <fcntl.h>
15913 #include <sys/stat.h>
15914 int
15915 main (void)
15916 {
15917 struct stat a;
15918 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
15919 }
15920
88b48903
WN
15921_ACEOF
15922if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 15923 gl_cv_func_fstatat_zero_flag=yes
88b48903 15924else
6ec2e0f5 15925 gl_cv_func_fstatat_zero_flag=no
88b48903
WN
15926fi
15927rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15928 conftest.$ac_objext conftest.beam conftest.$ac_ext
15929fi
15930
15931
15932fi
6ec2e0f5
SDJ
15933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
15934$as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
88b48903 15935
6ec2e0f5
SDJ
15936 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
15937 *yes+*yes) ;;
15938 *) REPLACE_FSTATAT=1
15939 case $gl_cv_func_fstatat_zero_flag in
15940 *yes)
88b48903 15941
6ec2e0f5 15942$as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
88b48903 15943
6ec2e0f5
SDJ
15944 ;;
15945 esac
15946 ;;
15947 esac
15948 fi
88b48903 15949
6ec2e0f5 15950 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
88b48903
WN
15951
15952
15953
15954
15955
88b48903 15956
4a626d0a
PA
15957
15958
6ec2e0f5
SDJ
15959 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
15960
15961 fi
15962
15963
15964
4a626d0a 15965
6ec2e0f5
SDJ
15966
15967 GNULIB_FSTATAT=1
15968
15969
15970
15971
15972
15973$as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
15974
15975
15976
15977
15978
15979
15980
15981
15982 gl_abort_bug=no
4a626d0a
PA
15983 case "$host_os" in
15984 mingw*)
6ec2e0f5 15985 gl_cv_func_getcwd_path_max=yes
4a626d0a
PA
15986 ;;
15987 *)
88b48903 15988
88b48903 15989
88b48903
WN
15990
15991
88b48903 15992
6ec2e0f5
SDJ
15993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
15994$as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
15995if test "${gl_cv_func_getcwd_path_max+set}" = set; then :
15996 $as_echo_n "(cached) " >&6
15997else
15998 # Arrange for deletion of the temporary directory this test creates.
15999 ac_clean_files="$ac_clean_files confdir3"
16000 if test "$cross_compiling" = yes; then :
16001 case "$host_os" in
16002 aix*) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
16003 *) gl_cv_func_getcwd_path_max=no;;
16004 esac
16005else
16006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16007/* end confdefs.h. */
88b48903 16008
6ec2e0f5
SDJ
16009#include <errno.h>
16010#include <stdlib.h>
16011#if HAVE_UNISTD_H
16012# include <unistd.h>
16013#else
16014# include <direct.h>
16015#endif
16016#include <string.h>
16017#include <limits.h>
16018#include <sys/stat.h>
16019#include <sys/types.h>
16020#include <fcntl.h>
88b48903
WN
16021
16022
6ec2e0f5
SDJ
16023/* Arrange to define PATH_MAX, like "pathmax.h" does. */
16024#if HAVE_UNISTD_H
16025# include <unistd.h>
16026#endif
16027#include <limits.h>
16028#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
16029# include <sys/param.h>
16030#endif
16031#if !defined PATH_MAX && defined MAXPATHLEN
16032# define PATH_MAX MAXPATHLEN
16033#endif
16034#ifdef __hpux
16035# undef PATH_MAX
16036# define PATH_MAX 1024
16037#endif
16038#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
16039# undef PATH_MAX
16040# define PATH_MAX 260
16041#endif
88b48903 16042
88b48903 16043
6ec2e0f5
SDJ
16044#ifndef AT_FDCWD
16045# define AT_FDCWD 0
16046#endif
16047#ifdef ENAMETOOLONG
16048# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
16049#else
16050# define is_ENAMETOOLONG(x) 0
16051#endif
88b48903 16052
6ec2e0f5
SDJ
16053/* Use the getcwd function, not any macro. */
16054#undef getcwd
88b48903 16055
6ec2e0f5
SDJ
16056/* Don't get link errors because mkdir is redefined to rpl_mkdir. */
16057#undef mkdir
88b48903 16058
6ec2e0f5
SDJ
16059#ifndef S_IRWXU
16060# define S_IRWXU 0700
16061#endif
88b48903 16062
6ec2e0f5
SDJ
16063/* The length of this name must be 8. */
16064#define DIR_NAME "confdir3"
16065#define DIR_NAME_LEN 8
16066#define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
88b48903 16067
6ec2e0f5
SDJ
16068/* The length of "../". */
16069#define DOTDOTSLASH_LEN 3
88b48903 16070
6ec2e0f5
SDJ
16071/* Leftover bytes in the buffer, to work around library or OS bugs. */
16072#define BUF_SLOP 20
88b48903 16073
6ec2e0f5
SDJ
16074int
16075main ()
16076{
16077#ifndef PATH_MAX
16078 /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
16079 at least not on a local file system. And if we were to start worrying
16080 about remote file systems, we'd have to enable the wrapper function
16081 all of the time, just to be safe. That's not worth the cost. */
16082 exit (0);
16083#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
16084 - DIR_NAME_SIZE - BUF_SLOP) \
16085 <= PATH_MAX)
16086 /* FIXME: Assuming there's a system for which this is true,
16087 this should be done in a compile test. */
16088 exit (0);
16089#else
16090 char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
16091 + DIR_NAME_SIZE + BUF_SLOP];
16092 char *cwd = getcwd (buf, PATH_MAX);
16093 size_t initial_cwd_len;
16094 size_t cwd_len;
16095 int fail = 0;
16096 size_t n_chdirs = 0;
88b48903 16097
6ec2e0f5
SDJ
16098 if (cwd == NULL)
16099 exit (10);
88b48903 16100
6ec2e0f5 16101 cwd_len = initial_cwd_len = strlen (cwd);
88b48903 16102
6ec2e0f5
SDJ
16103 while (1)
16104 {
16105 size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
16106 char *c = NULL;
16107
16108 cwd_len += DIR_NAME_SIZE;
16109 /* If mkdir or chdir fails, it could be that this system cannot create
16110 any file with an absolute name longer than PATH_MAX, such as cygwin.
16111 If so, leave fail as 0, because the current working directory can't
16112 be too long for getcwd if it can't even be created. For other
16113 errors, be pessimistic and consider that as a failure, too. */
16114 if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
16115 {
16116 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
16117 fail = 20;
16118 break;
16119 }
88b48903 16120
6ec2e0f5
SDJ
16121 if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
16122 {
16123 struct stat sb;
88b48903 16124
6ec2e0f5
SDJ
16125 c = getcwd (buf, PATH_MAX);
16126 if (!c && errno == ENOENT)
16127 {
16128 fail = 11;
16129 break;
16130 }
16131 if (c)
16132 {
16133 fail = 31;
16134 break;
16135 }
16136 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
16137 {
16138 fail = 21;
16139 break;
16140 }
88b48903 16141
6ec2e0f5
SDJ
16142 /* Our replacement needs to be able to stat() long ../../paths,
16143 so generate a path larger than PATH_MAX to check,
16144 avoiding the replacement if we can't stat(). */
16145 c = getcwd (buf, cwd_len + 1);
16146 if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno))
16147 {
16148 fail = 32;
16149 break;
16150 }
16151 }
88b48903 16152
6ec2e0f5
SDJ
16153 if (dotdot_max <= cwd_len - initial_cwd_len)
16154 {
16155 if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
16156 break;
16157 c = getcwd (buf, cwd_len + 1);
16158 if (!c)
16159 {
16160 if (! (errno == ERANGE || errno == ENOENT
16161 || is_ENAMETOOLONG (errno)))
16162 {
16163 fail = 22;
16164 break;
16165 }
16166 if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
16167 {
16168 fail = 12;
16169 break;
16170 }
16171 }
16172 }
88b48903 16173
6ec2e0f5
SDJ
16174 if (c && strlen (c) != cwd_len)
16175 {
16176 fail = 23;
16177 break;
16178 }
16179 ++n_chdirs;
16180 }
88b48903 16181
6ec2e0f5
SDJ
16182 /* Leaving behind such a deep directory is not polite.
16183 So clean up here, right away, even though the driving
16184 shell script would also clean up. */
16185 {
16186 size_t i;
88b48903 16187
6ec2e0f5
SDJ
16188 /* Try rmdir first, in case the chdir failed. */
16189 rmdir (DIR_NAME);
16190 for (i = 0; i <= n_chdirs; i++)
16191 {
16192 if (chdir ("..") < 0)
16193 break;
16194 if (rmdir (DIR_NAME) != 0)
16195 break;
16196 }
16197 }
88b48903 16198
6ec2e0f5
SDJ
16199 exit (fail);
16200#endif
16201}
88b48903 16202
6ec2e0f5
SDJ
16203_ACEOF
16204if ac_fn_c_try_run "$LINENO"; then :
16205 gl_cv_func_getcwd_path_max=yes
16206else
16207 case $? in
16208 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
16209 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
16210 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
16211 *) gl_cv_func_getcwd_path_max=no;;
16212 esac
16213fi
16214rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16215 conftest.$ac_objext conftest.beam conftest.$ac_ext
16216fi
88b48903 16217
88b48903 16218
6ec2e0f5
SDJ
16219fi
16220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
16221$as_echo "$gl_cv_func_getcwd_path_max" >&6; }
88b48903 16222
6ec2e0f5
SDJ
16223 case "$gl_cv_func_getcwd_null" in
16224 *yes)
88b48903
WN
16225
16226
16227
16228
6ec2e0f5
SDJ
16229 for ac_func in getpagesize
16230do :
16231 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
16232if test "x$ac_cv_func_getpagesize" = x""yes; then :
16233 cat >>confdefs.h <<_ACEOF
16234#define HAVE_GETPAGESIZE 1
16235_ACEOF
16236
16237fi
16238done
16239
16240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5
16241$as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; }
16242if test "${gl_cv_func_getcwd_abort_bug+set}" = set; then :
88b48903
WN
16243 $as_echo_n "(cached) " >&6
16244else
6ec2e0f5
SDJ
16245 # Remove any remnants of a previous test.
16246 rm -rf confdir-14B---
16247 # Arrange for deletion of the temporary directory this test creates.
16248 ac_clean_files="$ac_clean_files confdir-14B---"
16249 if test "$cross_compiling" = yes; then :
16250 gl_cv_func_getcwd_abort_bug=yes
88b48903
WN
16251else
16252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16253/* end confdefs.h. */
6ec2e0f5
SDJ
16254
16255#include <errno.h>
16256#include <stdlib.h>
16257#if HAVE_UNISTD_H
16258# include <unistd.h>
16259#else /* on Windows with MSVC */
16260# include <direct.h>
16261#endif
16262#include <string.h>
16263#include <sys/stat.h>
16264
16265
16266/* Arrange to define PATH_MAX, like "pathmax.h" does. */
16267#if HAVE_UNISTD_H
16268# include <unistd.h>
16269#endif
16270#include <limits.h>
16271#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
16272# include <sys/param.h>
16273#endif
16274#if !defined PATH_MAX && defined MAXPATHLEN
16275# define PATH_MAX MAXPATHLEN
16276#endif
16277#ifdef __hpux
16278# undef PATH_MAX
16279# define PATH_MAX 1024
16280#endif
16281#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
16282# undef PATH_MAX
16283# define PATH_MAX 260
16284#endif
16285
16286
16287/* Don't get link errors because mkdir is redefined to rpl_mkdir. */
16288#undef mkdir
16289
16290#ifndef S_IRWXU
16291# define S_IRWXU 0700
16292#endif
16293
16294/* FIXME: skip the run-test altogether on systems without getpagesize. */
16295#if ! HAVE_GETPAGESIZE
16296# define getpagesize() 0
16297#endif
16298
16299/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
16300 the 16kB pagesize on ia64 linux. Those conditions make the code below
16301 trigger a bug in glibc's getcwd implementation before 2.4.90-10. */
16302#define TARGET_LEN (5 * 1024)
88b48903
WN
16303
16304int
16305main ()
16306{
6ec2e0f5
SDJ
16307 char *cwd;
16308 size_t initial_cwd_len;
16309 int fail = 0;
16310
16311 /* The bug is triggered when PATH_MAX < getpagesize (), so skip
16312 this relatively expensive and invasive test if that's not true. */
16313#ifdef PATH_MAX
16314 int bug_possible = PATH_MAX < getpagesize ();
16315#else
16316 int bug_possible = 0;
16317#endif
16318 if (! bug_possible)
16319 return 0;
8690e634 16320
6ec2e0f5
SDJ
16321 cwd = getcwd (NULL, 0);
16322 if (cwd == NULL)
16323 return 2;
16324
16325 initial_cwd_len = strlen (cwd);
16326 free (cwd);
16327
16328 if (1)
16329 {
16330 static char const dir_name[] = "confdir-14B---";
16331 size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
16332 / sizeof dir_name);
16333 size_t d;
16334 for (d = 0; d < desired_depth; d++)
16335 {
16336 if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
16337 {
16338 if (! (errno == ERANGE || errno == ENAMETOOLONG
16339 || errno == ENOENT))
16340 fail = 3; /* Unable to construct deep hierarchy. */
16341 break;
16342 }
16343 }
16344
16345 /* If libc has the bug in question, this invocation of getcwd
16346 results in a failed assertion. */
16347 cwd = getcwd (NULL, 0);
16348 if (cwd == NULL)
16349 fail = 4; /* getcwd didn't assert, but it failed for a long name
16350 where the answer could have been learned. */
16351 free (cwd);
16352
16353 /* Call rmdir first, in case the above chdir failed. */
16354 rmdir (dir_name);
16355 while (0 < d--)
16356 {
16357 if (chdir ("..") < 0)
16358 {
16359 fail = 5;
16360 break;
16361 }
16362 rmdir (dir_name);
16363 }
16364 }
16365
16366 return fail;
8690e634 16367}
6ec2e0f5 16368
8690e634
JK
16369_ACEOF
16370if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 16371 gl_cv_func_getcwd_abort_bug=no
8690e634 16372else
6ec2e0f5
SDJ
16373 ret=$?
16374 if test $ret -ge 128 || test $ret = 4; then
16375 gl_cv_func_getcwd_abort_bug=yes
16376 else
16377 gl_cv_func_getcwd_abort_bug=no
16378 fi
8690e634
JK
16379fi
16380rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16381 conftest.$ac_objext conftest.beam conftest.$ac_ext
16382fi
16383
16384
16385fi
6ec2e0f5
SDJ
16386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5
16387$as_echo "$gl_cv_func_getcwd_abort_bug" >&6; }
16388 if test $gl_cv_func_getcwd_abort_bug = yes; then :
16389 gl_abort_bug=yes
16390fi
16391
16392 ;;
16393 esac
16394 ;;
16395 esac
16396 case "$gl_cv_func_getcwd_path_max" in
16397 "no"|"no, it has the AIX bug") ;;
16398 *)
16399
16400$as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
16401
16402 ;;
16403 esac
16404 case "$gl_cv_func_getcwd_path_max" in
16405 "no, but it is partly working")
16406
16407$as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
16408
16409 ;;
16410 "yes, but with shorter paths")
16411
16412$as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
16413
16414 ;;
16415 esac
16416
16417 if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
16418 || test $gl_cv_func_getcwd_posix_signature != yes \
16419 || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \
16420 || test $gl_abort_bug = yes; then
16421 REPLACE_GETCWD=1
8690e634
JK
16422 fi
16423
6ec2e0f5 16424 if test $REPLACE_GETCWD = 1; then
8690e634
JK
16425
16426
8690e634
JK
16427
16428
16429
16430
16431
16432
6ec2e0f5 16433 gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
8690e634
JK
16434
16435
8690e634
JK
16436
16437
6ec2e0f5
SDJ
16438 :
16439
16440 fi
16441
8690e634
JK
16442
16443cat >>confdefs.h <<_ACEOF
6ec2e0f5 16444#define GNULIB_GETCWD 1
8690e634
JK
16445_ACEOF
16446
16447
8690e634 16448
8690e634
JK
16449
16450
c971b7fa 16451
c971b7fa 16452
6ec2e0f5
SDJ
16453 GNULIB_GETCWD=1
16454
16455
16456
16457
16458
16459$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
16460
c971b7fa 16461
c971b7fa 16462
c971b7fa 16463
c971b7fa 16464
c971b7fa 16465
c971b7fa 16466
c971b7fa 16467
6ec2e0f5
SDJ
16468 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
16469 *yes,yes) ;;
16470 *)
16471 REPLACE_GETCWD=1
16472 ;;
16473 esac
c971b7fa 16474
6ec2e0f5 16475 if test $REPLACE_GETCWD = 1; then
c971b7fa 16476
c971b7fa
PA
16477
16478
c971b7fa
PA
16479
16480
c971b7fa 16481
c971b7fa 16482
c971b7fa 16483
6ec2e0f5 16484 gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
c971b7fa 16485
6ec2e0f5 16486 fi
c971b7fa 16487
c971b7fa 16488
c971b7fa 16489
c971b7fa 16490
8690e634 16491
6ec2e0f5 16492 GNULIB_GETCWD=1
c971b7fa 16493
88b48903
WN
16494
16495
16496
88b48903 16497
6ec2e0f5 16498$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
88b48903 16499
88b48903
WN
16500
16501
16502
6ec2e0f5
SDJ
16503
16504
16505
16506
16507 if test $ac_cv_func_getdtablesize = yes &&
16508 test $ac_cv_have_decl_getdtablesize = yes; then
16509 # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit
16510 # up to an unchangeable hard limit; all other platforms correctly
16511 # require setrlimit before getdtablesize() can report a larger value.
16512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
16513$as_echo_n "checking whether getdtablesize works... " >&6; }
16514if test "${gl_cv_func_getdtablesize_works+set}" = set; then :
88b48903
WN
16515 $as_echo_n "(cached) " >&6
16516else
6ec2e0f5 16517 if test "$cross_compiling" = yes; then :
88b48903 16518 case "$host_os" in
6ec2e0f5
SDJ
16519 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
16520 gl_cv_func_getdtablesize_works="guessing no" ;;
16521 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
88b48903 16522 esac
88b48903
WN
16523else
16524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16525/* end confdefs.h. */
16526
6ec2e0f5
SDJ
16527 #include <unistd.h>
16528int
16529main ()
88b48903 16530{
6ec2e0f5
SDJ
16531int size = getdtablesize();
16532 if (dup2 (0, getdtablesize()) != -1)
16533 return 1;
16534 if (size != getdtablesize())
16535 return 2;
16536
16537 ;
16538 return 0;
88b48903
WN
16539}
16540_ACEOF
16541if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 16542 gl_cv_func_getdtablesize_works=yes
88b48903 16543else
6ec2e0f5 16544 gl_cv_func_getdtablesize_works=no
88b48903
WN
16545fi
16546rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16547 conftest.$ac_objext conftest.beam conftest.$ac_ext
16548fi
16549
16550
16551fi
6ec2e0f5
SDJ
16552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
16553$as_echo "$gl_cv_func_getdtablesize_works" >&6; }
16554 case "$gl_cv_func_getdtablesize_works" in
16555 *yes) ;;
16556 *) REPLACE_GETDTABLESIZE=1 ;;
88b48903
WN
16557 esac
16558 else
6ec2e0f5 16559 HAVE_GETDTABLESIZE=0
88b48903
WN
16560 fi
16561
6ec2e0f5 16562 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
88b48903
WN
16563
16564
16565
16566
16567
16568
16569
16570
6ec2e0f5 16571 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
88b48903 16572
6ec2e0f5 16573 :
88b48903
WN
16574 fi
16575
16576
16577
16578
16579
6ec2e0f5 16580 GNULIB_GETDTABLESIZE=1
88b48903
WN
16581
16582
16583
88b48903 16584
88b48903 16585
6ec2e0f5 16586$as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
88b48903 16587
88b48903 16588
88b48903 16589
88b48903 16590
88b48903 16591
88b48903 16592
88b48903 16593
88b48903
WN
16594
16595
6ec2e0f5
SDJ
16596 if test $ac_cv_have_decl_getlogin_r = no; then
16597 HAVE_DECL_GETLOGIN_R=0
16598 fi
88b48903 16599
88b48903 16600
6ec2e0f5
SDJ
16601 if test $ac_cv_func_getlogin_r = no; then
16602 HAVE_GETLOGIN_R=0
16603 else
16604 HAVE_GETLOGIN_R=1
16605
16606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getlogin_r works with small buffers" >&5
16607$as_echo_n "checking whether getlogin_r works with small buffers... " >&6; }
16608if test "${gl_cv_func_getlogin_r_works+set}" = set; then :
16609 $as_echo_n "(cached) " >&6
16610else
88b48903 16611
6ec2e0f5
SDJ
16612 case "$host_os" in
16613 # Guess no on OSF/1.
16614 osf*) gl_cv_func_getlogin_r_works="guessing no" ;;
16615 # Guess yes otherwise.
16616 *) gl_cv_func_getlogin_r_works="guessing yes" ;;
16617 esac
16618 if test "$cross_compiling" = yes; then :
16619 :
88b48903
WN
16620else
16621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16622/* end confdefs.h. */
16623
6ec2e0f5
SDJ
16624#include <stddef.h>
16625#include <unistd.h>
16626#if !HAVE_DECL_GETLOGIN_R
88b48903 16627extern
6ec2e0f5 16628# ifdef __cplusplus
88b48903 16629"C"
6ec2e0f5
SDJ
16630# endif
16631int getlogin_r (char *, size_t);
88b48903 16632#endif
6ec2e0f5
SDJ
16633int
16634main (void)
88b48903
WN
16635{
16636 int result = 0;
6ec2e0f5
SDJ
16637 char buf[100];
16638
16639 if (getlogin_r (buf, 0) == 0)
16640 result |= 16;
16641 if (getlogin_r (buf, 1) == 0)
16642 result |= 17;
88b48903
WN
16643 return result;
16644}
16645_ACEOF
16646if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 16647 gl_cv_func_getlogin_r_works=yes
88b48903 16648else
6ec2e0f5
SDJ
16649 case $? in
16650 16 | 17) gl_cv_func_getlogin_r_works=no ;;
16651 esac
16652
88b48903
WN
16653fi
16654rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16655 conftest.$ac_objext conftest.beam conftest.$ac_ext
16656fi
16657
16658
4a626d0a 16659fi
6ec2e0f5
SDJ
16660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getlogin_r_works" >&5
16661$as_echo "$gl_cv_func_getlogin_r_works" >&6; }
16662 case "$gl_cv_func_getlogin_r_works" in
16663 *yes) ;;
16664 *) REPLACE_GETLOGIN_R=1 ;;
16665 esac
16666 fi
16667
16668 if test $HAVE_GETLOGIN_R = 0 || test $REPLACE_GETLOGIN_R = 1; then
16669
16670
16671
16672
16673
16674
16675
16676
16677 gl_LIBOBJS="$gl_LIBOBJS getlogin_r.$ac_objext"
4a626d0a 16678
4a626d0a 16679
4a626d0a 16680
4a626d0a 16681
4a626d0a
PA
16682 fi
16683
16684
4a626d0a
PA
16685
16686
16687
6ec2e0f5 16688 GNULIB_GETLOGIN_R=1
4a626d0a
PA
16689
16690
16691
16692
16693
6ec2e0f5 16694$as_echo "#define GNULIB_TEST_GETLOGIN_R 1" >>confdefs.h
4a626d0a 16695
4a626d0a
PA
16696
16697
16698
16699
16700
6ec2e0f5
SDJ
16701 ac_found=0
16702 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
16703"
16704if test "x$ac_cv_have_decl_program_invocation_name" = x""yes; then :
16705 ac_have_decl=1
16706else
16707 ac_have_decl=0
16708fi
16709
16710cat >>confdefs.h <<_ACEOF
16711#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
16712_ACEOF
16713if test $ac_have_decl = 1; then :
16714 ac_found=1
16715fi
16716
16717 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
16718"
16719if test "x$ac_cv_have_decl_program_invocation_short_name" = x""yes; then :
16720 ac_have_decl=1
16721else
16722 ac_have_decl=0
16723fi
16724
16725cat >>confdefs.h <<_ACEOF
16726#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
16727_ACEOF
16728if test $ac_have_decl = 1; then :
16729 ac_found=1
16730fi
4a626d0a 16731
6ec2e0f5
SDJ
16732 ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
16733"
16734if test "x$ac_cv_have_decl___argv" = x""yes; then :
16735 ac_have_decl=1
16736else
16737 ac_have_decl=0
16738fi
4a626d0a 16739
6ec2e0f5
SDJ
16740cat >>confdefs.h <<_ACEOF
16741#define HAVE_DECL___ARGV $ac_have_decl
16742_ACEOF
16743if test $ac_have_decl = 1; then :
16744 ac_found=1
16745fi
4a626d0a
PA
16746
16747
6ec2e0f5
SDJ
16748 # Incur the cost of this test only if none of the above worked.
16749 if test $ac_found = 0; then
16750 # On OpenBSD 5.1, using the global __progname variable appears to be
16751 # the only way to implement getprogname.
16752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
16753$as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
16754if test "${gl_cv_var___progname+set}" = set; then :
16755 $as_echo_n "(cached) " >&6
16756else
4a626d0a 16757
6ec2e0f5
SDJ
16758 gl_cv_var___progname=
16759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16760/* end confdefs.h. */
16761extern char *__progname;
16762int
16763main ()
16764{
16765return *__progname;
16766
16767 ;
16768 return 0;
16769}
16770_ACEOF
16771if ac_fn_c_try_link "$LINENO"; then :
16772 gl_cv_var___progname=yes
16773
16774fi
16775rm -f core conftest.err conftest.$ac_objext \
16776 conftest$ac_exeext conftest.$ac_ext
16777
16778
16779fi
16780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
16781$as_echo "$gl_cv_var___progname" >&6; }
16782 if test "$gl_cv_var___progname" = yes; then
16783
16784$as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
16785
16786 fi
16787 fi
4a626d0a
PA
16788
16789
16790
16791
16792
16793
16794
16795
16796
16797 gl_gettimeofday_timezone=void
16798 if test $ac_cv_func_gettimeofday != yes; then
16799 HAVE_GETTIMEOFDAY=0
16800 else
16801
16802
16803
16804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
16805$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
16806if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
16807 $as_echo_n "(cached) " >&6
16808else
16809 if test "$cross_compiling" = yes; then :
16810 # When cross-compiling:
16811 case "$host_os" in
16812 # Guess all is fine on glibc systems.
16813 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
16814 # If we don't know, assume the worst.
16815 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
16816 esac
16817
16818else
16819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16820/* end confdefs.h. */
16821#include <string.h>
16822 #include <sys/time.h>
16823 #include <time.h>
16824 #include <stdlib.h>
16825
16826int
16827main ()
16828{
16829
16830 time_t t = 0;
16831 struct tm *lt;
16832 struct tm saved_lt;
16833 struct timeval tv;
16834 lt = localtime (&t);
16835 saved_lt = *lt;
16836 gettimeofday (&tv, NULL);
16837 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
16838
16839 ;
16840 return 0;
16841}
16842_ACEOF
16843if ac_fn_c_try_run "$LINENO"; then :
16844 gl_cv_func_gettimeofday_clobber=no
16845else
16846 gl_cv_func_gettimeofday_clobber=yes
16847fi
16848rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16849 conftest.$ac_objext conftest.beam conftest.$ac_ext
16850fi
16851
16852fi
16853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
16854$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
16855
16856 case "$gl_cv_func_gettimeofday_clobber" in
16857 *yes)
16858 REPLACE_GETTIMEOFDAY=1
16859
16860 REPLACE_GMTIME=1
16861 REPLACE_LOCALTIME=1
16862
16863
16864$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
16865
16866 ;;
16867 esac
16868
16869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
16870$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
16871if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
16872 $as_echo_n "(cached) " >&6
16873else
16874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16875/* end confdefs.h. */
16876#include <sys/time.h>
16877 struct timeval c;
16878 int gettimeofday (struct timeval *restrict, void *restrict);
16879
16880int
16881main ()
16882{
16883/* glibc uses struct timezone * rather than the POSIX void *
16884 if _GNU_SOURCE is defined. However, since the only portable
16885 use of gettimeofday uses NULL as the second parameter, and
16886 since the glibc definition is actually more typesafe, it is
16887 not worth wrapping this to get a compliant signature. */
16888 int (*f) (struct timeval *restrict, void *restrict)
16889 = gettimeofday;
16890 int x = f (&c, 0);
16891 return !(x | c.tv_sec | c.tv_usec);
16892
16893 ;
16894 return 0;
16895}
16896_ACEOF
16897if ac_fn_c_try_compile "$LINENO"; then :
16898 gl_cv_func_gettimeofday_posix_signature=yes
16899else
16900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16901/* end confdefs.h. */
16902#include <sys/time.h>
16903int gettimeofday (struct timeval *restrict, struct timezone *restrict);
16904
16905int
16906main ()
16907{
16908
16909 ;
16910 return 0;
16911}
16912_ACEOF
16913if ac_fn_c_try_compile "$LINENO"; then :
16914 gl_cv_func_gettimeofday_posix_signature=almost
16915else
16916 gl_cv_func_gettimeofday_posix_signature=no
16917fi
16918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16919fi
16920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16921fi
16922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
16923$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
16924 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
16925 gl_gettimeofday_timezone='struct timezone'
16926 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
16927 REPLACE_GETTIMEOFDAY=1
16928 fi
16929 if test $REPLACE_STRUCT_TIMEVAL = 1; then
16930 REPLACE_GETTIMEOFDAY=1
16931 fi
16932
16933 fi
16934
16935cat >>confdefs.h <<_ACEOF
16936#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
16937_ACEOF
16938
88b48903 16939
4a626d0a 16940 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
88b48903 16941
88b48903 16942
88b48903 16943
88b48903
WN
16944
16945
88b48903
WN
16946
16947
16948
6ec2e0f5
SDJ
16949 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
16950
16951
16952 for ac_header in sys/timeb.h
16953do :
16954 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
16955if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
16956 cat >>confdefs.h <<_ACEOF
16957#define HAVE_SYS_TIMEB_H 1
16958_ACEOF
16959
16960fi
16961
16962done
16963
16964 for ac_func in _ftime
16965do :
16966 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
16967if test "x$ac_cv_func__ftime" = x""yes; then :
16968 cat >>confdefs.h <<_ACEOF
16969#define HAVE__FTIME 1
16970_ACEOF
16971
16972fi
16973done
16974
16975
16976 fi
16977
16978
16979
16980
16981
16982 GNULIB_GETTIMEOFDAY=1
16983
16984
16985
16986
16987
16988$as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
16989
16990
16991
16992 GLOB_H=
16993 for ac_header in glob.h
16994do :
16995 ac_fn_c_check_header_mongrel "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default"
16996if test "x$ac_cv_header_glob_h" = x""yes; then :
16997 cat >>confdefs.h <<_ACEOF
16998#define HAVE_GLOB_H 1
16999_ACEOF
17000
17001else
17002 GLOB_H=glob.h
17003fi
17004
17005done
17006
17007
17008 if test -z "$GLOB_H"; then
17009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU glob interface version 1" >&5
17010$as_echo_n "checking for GNU glob interface version 1... " >&6; }
17011if test "${gl_cv_gnu_glob_interface_version_1+set}" = set; then :
17012 $as_echo_n "(cached) " >&6
17013else
17014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17015/* end confdefs.h. */
17016#include <gnu-versions.h>
17017char a[_GNU_GLOB_INTERFACE_VERSION == 1 ? 1 : -1];
17018_ACEOF
17019if ac_fn_c_try_compile "$LINENO"; then :
17020 gl_cv_gnu_glob_interface_version_1=yes
17021else
17022 gl_cv_gnu_glob_interface_version_1=no
17023fi
17024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17025fi
17026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_gnu_glob_interface_version_1" >&5
17027$as_echo "$gl_cv_gnu_glob_interface_version_1" >&6; }
17028
17029 if test "$gl_cv_gnu_glob_interface_version_1" = "no"; then
17030 GLOB_H=glob.h
17031 fi
17032 fi
17033
17034 if test -z "$GLOB_H"; then
17035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether glob lists broken symlinks" >&5
17036$as_echo_n "checking whether glob lists broken symlinks... " >&6; }
17037if test "${gl_cv_glob_lists_symlinks+set}" = set; then :
17038 $as_echo_n "(cached) " >&6
17039else
17040 if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then
17041 gl_cv_glob_lists_symlinks=maybe
17042 else
17043 # If we can't make a symlink, then we cannot test this issue. Be
17044 # pessimistic about this.
17045 gl_cv_glob_lists_symlinks=no
17046 fi
88b48903 17047
6ec2e0f5
SDJ
17048 if test $gl_cv_glob_lists_symlinks = maybe; then
17049 if test "$cross_compiling" = yes; then :
17050 gl_cv_glob_lists_symlinks=no
17051else
17052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17053/* end confdefs.h. */
88b48903 17054
6ec2e0f5
SDJ
17055#include <stddef.h>
17056#include <glob.h>
17057int
17058main ()
17059{
17060glob_t found;
17061if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH) return 1;
17062 ;
17063 return 0;
17064}
4a626d0a 17065_ACEOF
6ec2e0f5
SDJ
17066if ac_fn_c_try_run "$LINENO"; then :
17067 gl_cv_glob_lists_symlinks=yes
17068else
17069 gl_cv_glob_lists_symlinks=no
17070fi
17071rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17072 conftest.$ac_objext conftest.beam conftest.$ac_ext
17073fi
88b48903 17074
6ec2e0f5 17075 fi
4a626d0a 17076fi
6ec2e0f5
SDJ
17077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_glob_lists_symlinks" >&5
17078$as_echo "$gl_cv_glob_lists_symlinks" >&6; }
88b48903 17079
6ec2e0f5
SDJ
17080 if test $gl_cv_glob_lists_symlinks = no; then
17081 GLOB_H=glob.h
17082 fi
17083 fi
4a626d0a 17084
6ec2e0f5 17085 rm -f conf$$-globtest
4a626d0a 17086
88b48903 17087
6ec2e0f5
SDJ
17088 if test -n "$GLOB_H"; then
17089 GL_GENERATE_GLOB_H_TRUE=
17090 GL_GENERATE_GLOB_H_FALSE='#'
17091else
17092 GL_GENERATE_GLOB_H_TRUE='#'
17093 GL_GENERATE_GLOB_H_FALSE=
17094fi
88b48903 17095
88b48903 17096
6ec2e0f5 17097 if test -n "$GLOB_H"; then
88b48903
WN
17098
17099
17100
17101
88b48903
WN
17102
17103
17104
17105
6ec2e0f5 17106 gl_LIBOBJS="$gl_LIBOBJS glob.$ac_objext"
88b48903 17107
88b48903 17108
6ec2e0f5
SDJ
17109 if test $ac_cv_header_sys_cdefs_h = yes; then
17110 HAVE_SYS_CDEFS_H=1
17111 else
17112 HAVE_SYS_CDEFS_H=0
17113 fi
88b48903
WN
17114
17115
6ec2e0f5 17116 fi
88b48903 17117
49e4877c
PA
17118 :
17119
17120
88b48903
WN
17121
17122
17123
17124
17125 PRIPTR_PREFIX=
17126 if test -n "$STDINT_H"; then
17127 PRIPTR_PREFIX='"l"'
17128 else
17129 for glpfx in '' l ll I64; do
17130 case $glpfx in
17131 '') gltype1='int';;
17132 l) gltype1='long int';;
17133 ll) gltype1='long long int';;
17134 I64) gltype1='__int64';;
17135 esac
17136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17137/* end confdefs.h. */
17138#include <stdint.h>
17139 extern intptr_t foo;
17140 extern $gltype1 foo;
17141int
17142main ()
17143{
17144
17145 ;
17146 return 0;
17147}
17148_ACEOF
17149if ac_fn_c_try_compile "$LINENO"; then :
17150 PRIPTR_PREFIX='"'$glpfx'"'
17151fi
17152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17153 test -n "$PRIPTR_PREFIX" && break
17154 done
17155 fi
17156
17157
17158
17159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
17160$as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
17161if test "${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+set}" = set; then :
17162 $as_echo_n "(cached) " >&6
17163else
17164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17165/* end confdefs.h. */
17166/* Work also in C++ mode. */
17167 #define __STDC_LIMIT_MACROS 1
17168
17169 /* Work if build is not clean. */
17170 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
17171
17172 #include <limits.h>
17173 #if HAVE_STDINT_H
17174 #include <stdint.h>
17175 #endif
17176
17177 #if defined INT32_MAX && defined INTMAX_MAX
17178 #define CONDITION (INT32_MAX < INTMAX_MAX)
17179 #elif HAVE_LONG_LONG_INT
17180 #define CONDITION (sizeof (int) < sizeof (long long int))
17181 #else
17182 #define CONDITION 0
17183 #endif
17184 int test[CONDITION ? 1 : -1];
17185int
17186main ()
17187{
17188
17189 ;
17190 return 0;
17191}
17192_ACEOF
17193if ac_fn_c_try_compile "$LINENO"; then :
17194 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
17195else
17196 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
17197fi
17198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17199fi
17200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
17201$as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
17202 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
17203 INT32_MAX_LT_INTMAX_MAX=1;
17204 else
17205 INT32_MAX_LT_INTMAX_MAX=0;
17206 fi
17207
17208
17209 if test $APPLE_UNIVERSAL_BUILD = 0; then
17210
17211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
17212$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
17213if test "${gl_cv_test_INT64_MAX_EQ_LONG_MAX+set}" = set; then :
17214 $as_echo_n "(cached) " >&6
17215else
17216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17217/* end confdefs.h. */
17218/* Work also in C++ mode. */
17219 #define __STDC_LIMIT_MACROS 1
17220
17221 /* Work if build is not clean. */
17222 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
17223
17224 #include <limits.h>
17225 #if HAVE_STDINT_H
17226 #include <stdint.h>
17227 #endif
17228
17229 #if defined INT64_MAX
17230 #define CONDITION (INT64_MAX == LONG_MAX)
17231 #elif HAVE_LONG_LONG_INT
17232 #define CONDITION (sizeof (long long int) == sizeof (long int))
17233 #else
17234 #define CONDITION 0
17235 #endif
17236 int test[CONDITION ? 1 : -1];
17237int
17238main ()
17239{
17240
17241 ;
17242 return 0;
17243}
17244_ACEOF
17245if ac_fn_c_try_compile "$LINENO"; then :
17246 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
17247else
17248 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
17249fi
17250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17251fi
17252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
17253$as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
17254 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
17255 INT64_MAX_EQ_LONG_MAX=1;
17256 else
17257 INT64_MAX_EQ_LONG_MAX=0;
17258 fi
17259
17260
17261 else
17262 INT64_MAX_EQ_LONG_MAX=-1
17263 fi
17264
17265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
17266$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
17267if test "${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+set}" = set; then :
17268 $as_echo_n "(cached) " >&6
17269else
17270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17271/* end confdefs.h. */
17272/* Work also in C++ mode. */
17273 #define __STDC_LIMIT_MACROS 1
17274
17275 /* Work if build is not clean. */
17276 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
17277
17278 #include <limits.h>
17279 #if HAVE_STDINT_H
17280 #include <stdint.h>
17281 #endif
17282
17283 #if defined UINT32_MAX && defined UINTMAX_MAX
17284 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
17285 #elif HAVE_LONG_LONG_INT
17286 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
17287 #else
17288 #define CONDITION 0
17289 #endif
17290 int test[CONDITION ? 1 : -1];
17291int
17292main ()
17293{
17294
17295 ;
17296 return 0;
17297}
17298_ACEOF
17299if ac_fn_c_try_compile "$LINENO"; then :
17300 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
17301else
17302 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
17303fi
17304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17305fi
17306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
17307$as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
17308 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
17309 UINT32_MAX_LT_UINTMAX_MAX=1;
17310 else
17311 UINT32_MAX_LT_UINTMAX_MAX=0;
17312 fi
17313
17314
17315 if test $APPLE_UNIVERSAL_BUILD = 0; then
17316
17317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
17318$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
17319if test "${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+set}" = set; then :
17320 $as_echo_n "(cached) " >&6
17321else
17322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17323/* end confdefs.h. */
17324/* Work also in C++ mode. */
17325 #define __STDC_LIMIT_MACROS 1
17326
17327 /* Work if build is not clean. */
17328 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
17329
17330 #include <limits.h>
17331 #if HAVE_STDINT_H
17332 #include <stdint.h>
17333 #endif
17334
17335 #if defined UINT64_MAX
17336 #define CONDITION (UINT64_MAX == ULONG_MAX)
17337 #elif HAVE_LONG_LONG_INT
17338 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
17339 #else
17340 #define CONDITION 0
17341 #endif
17342 int test[CONDITION ? 1 : -1];
17343int
17344main ()
17345{
17346
17347 ;
17348 return 0;
17349}
17350_ACEOF
17351if ac_fn_c_try_compile "$LINENO"; then :
17352 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
17353else
17354 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
17355fi
17356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17357fi
17358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
17359$as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
17360 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
17361 UINT64_MAX_EQ_ULONG_MAX=1;
17362 else
17363 UINT64_MAX_EQ_ULONG_MAX=0;
17364 fi
17365
17366
17367 else
17368 UINT64_MAX_EQ_ULONG_MAX=-1
17369 fi
17370
17371
17372
17373
17374
17375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
17376$as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
17377if test "${gl_cv_func_isnand_no_libm+set}" = set; then :
17378 $as_echo_n "(cached) " >&6
17379else
17380
17381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17382/* end confdefs.h. */
17383#include <math.h>
17384 #if __GNUC__ >= 4
17385 # undef isnand
17386 # define isnand(x) __builtin_isnan ((double)(x))
17387 #else
17388 # undef isnand
17389 # define isnand(x) isnan ((double)(x))
17390 #endif
17391 double x;
17392int
17393main ()
17394{
17395return isnand (x);
17396 ;
17397 return 0;
17398}
17399_ACEOF
17400if ac_fn_c_try_link "$LINENO"; then :
17401 gl_cv_func_isnand_no_libm=yes
17402else
17403 gl_cv_func_isnand_no_libm=no
17404fi
17405rm -f core conftest.err conftest.$ac_objext \
17406 conftest$ac_exeext conftest.$ac_ext
17407
17408fi
17409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
17410$as_echo "$gl_cv_func_isnand_no_libm" >&6; }
17411
17412 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
17413 if test $gl_cv_func_isnand_no_libm = yes; then
17414
17415$as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
17416
17417 fi
17418
17419 if test $gl_func_isnand_no_libm != yes; then
17420
17421
17422
17423
17424
17425
17426
17427
17428 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
17429
17430
17431
17432
17433 fi
17434
17435
17436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
17437$as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
17438if test "${gl_cv_func_isnanl_no_libm+set}" = set; then :
17439 $as_echo_n "(cached) " >&6
17440else
17441
17442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17443/* end confdefs.h. */
17444#include <math.h>
17445 #if __GNUC__ >= 4
17446 # undef isnanl
17447 # define isnanl(x) __builtin_isnanl ((long double)(x))
17448 #elif defined isnan
17449 # undef isnanl
17450 # define isnanl(x) isnan ((long double)(x))
17451 #endif
17452 long double x;
17453int
17454main ()
17455{
17456return isnanl (x);
17457 ;
17458 return 0;
17459}
17460_ACEOF
17461if ac_fn_c_try_link "$LINENO"; then :
17462 gl_cv_func_isnanl_no_libm=yes
17463else
17464 gl_cv_func_isnanl_no_libm=no
17465fi
17466rm -f core conftest.err conftest.$ac_objext \
17467 conftest$ac_exeext conftest.$ac_ext
17468
17469fi
17470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
17471$as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
17472
17473 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
17474 if test $gl_func_isnanl_no_libm = yes; then
17475
17476
17477
17478
17479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
17480$as_echo_n "checking whether isnanl works... " >&6; }
17481if test "${gl_cv_func_isnanl_works+set}" = set; then :
17482 $as_echo_n "(cached) " >&6
17483else
17484
17485 if test "$cross_compiling" = yes; then :
4a626d0a 17486 gl_cv_func_isnanl_works="guessing yes"
88b48903
WN
17487else
17488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17489/* end confdefs.h. */
17490
17491#include <float.h>
17492#include <limits.h>
17493#include <math.h>
17494#if __GNUC__ >= 4
17495# undef isnanl
17496# define isnanl(x) __builtin_isnanl ((long double)(x))
17497#elif defined isnan
17498# undef isnanl
17499# define isnanl(x) isnan ((long double)(x))
17500#endif
17501#define NWORDS \
17502 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
17503typedef union { unsigned int word[NWORDS]; long double value; }
17504 memory_long_double;
17505/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
17506 runtime type conversion. */
17507#ifdef __sgi
17508static long double NaNl ()
17509{
17510 double zero = 0.0;
17511 return zero / zero;
17512}
17513#else
17514# define NaNl() (0.0L / 0.0L)
17515#endif
17516int main ()
17517{
17518 int result = 0;
17519
17520 if (!isnanl (NaNl ()))
17521 result |= 1;
17522
17523 {
17524 memory_long_double m;
17525 unsigned int i;
17526
17527 /* The isnanl function should be immune against changes in the sign bit and
17528 in the mantissa bits. The xor operation twiddles a bit that can only be
17529 a sign bit or a mantissa bit (since the exponent never extends to
17530 bit 31). */
17531 m.value = NaNl ();
17532 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
17533 for (i = 0; i < NWORDS; i++)
17534 m.word[i] |= 1;
17535 if (!isnanl (m.value))
17536 result |= 1;
17537 }
17538
17539#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
17540/* Representation of an 80-bit 'long double' as an initializer for a sequence
17541 of 'unsigned int' words. */
17542# ifdef WORDS_BIGENDIAN
17543# define LDBL80_WORDS(exponent,manthi,mantlo) \
17544 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
4a626d0a 17545 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
88b48903
WN
17546 (unsigned int) (mantlo) << 16 \
17547 }
17548# else
17549# define LDBL80_WORDS(exponent,manthi,mantlo) \
17550 { mantlo, manthi, exponent }
17551# endif
17552 { /* Quiet NaN. */
17553 static memory_long_double x =
17554 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
17555 if (!isnanl (x.value))
17556 result |= 2;
17557 }
17558 {
17559 /* Signalling NaN. */
17560 static memory_long_double x =
17561 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
17562 if (!isnanl (x.value))
17563 result |= 2;
17564 }
4a626d0a 17565 /* isnanl should return something even for noncanonical values. */
88b48903
WN
17566 { /* Pseudo-NaN. */
17567 static memory_long_double x =
17568 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
4a626d0a 17569 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
17570 result |= 4;
17571 }
17572 { /* Pseudo-Infinity. */
17573 static memory_long_double x =
17574 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
4a626d0a 17575 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
17576 result |= 8;
17577 }
17578 { /* Pseudo-Zero. */
17579 static memory_long_double x =
17580 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
4a626d0a 17581 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
17582 result |= 16;
17583 }
17584 { /* Unnormalized number. */
17585 static memory_long_double x =
17586 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
4a626d0a 17587 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
17588 result |= 32;
17589 }
17590 { /* Pseudo-Denormal. */
17591 static memory_long_double x =
17592 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
4a626d0a 17593 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
17594 result |= 64;
17595 }
17596#endif
17597
17598 return result;
17599}
17600_ACEOF
17601if ac_fn_c_try_run "$LINENO"; then :
17602 gl_cv_func_isnanl_works=yes
17603else
17604 gl_cv_func_isnanl_works=no
17605fi
17606rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17607 conftest.$ac_objext conftest.beam conftest.$ac_ext
17608fi
17609
17610
17611fi
17612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
17613$as_echo "$gl_cv_func_isnanl_works" >&6; }
17614
17615 case "$gl_cv_func_isnanl_works" in
17616 *yes) ;;
17617 *) gl_func_isnanl_no_libm=no ;;
17618 esac
17619 fi
17620 if test $gl_func_isnanl_no_libm = yes; then
17621
17622$as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
17623
17624 fi
17625
17626 if test $gl_func_isnanl_no_libm != yes; then
17627
17628
17629
17630
17631
17632
17633
17634
17635 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
17636
17637
17638
17639
17640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
17641$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
17642if test "${gl_cv_cc_long_double_expbit0+set}" = set; then :
17643 $as_echo_n "(cached) " >&6
17644else
17645
17646 if test "$cross_compiling" = yes; then :
17647
17648 gl_cv_cc_long_double_expbit0="unknown"
17649
17650else
17651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17652/* end confdefs.h. */
17653
17654#include <float.h>
17655#include <stddef.h>
17656#include <stdio.h>
17657#include <string.h>
17658#define NWORDS \
17659 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
17660typedef union { long double value; unsigned int word[NWORDS]; }
17661 memory_long_double;
17662static unsigned int ored_words[NWORDS];
17663static unsigned int anded_words[NWORDS];
17664static void add_to_ored_words (long double x)
17665{
17666 memory_long_double m;
17667 size_t i;
17668 /* Clear it first, in case
17669 sizeof (long double) < sizeof (memory_long_double). */
17670 memset (&m, 0, sizeof (memory_long_double));
17671 m.value = x;
17672 for (i = 0; i < NWORDS; i++)
17673 {
17674 ored_words[i] |= m.word[i];
17675 anded_words[i] &= m.word[i];
17676 }
17677}
17678int main ()
17679{
17680 size_t j;
17681 FILE *fp = fopen ("conftest.out", "w");
17682 if (fp == NULL)
17683 return 1;
17684 for (j = 0; j < NWORDS; j++)
17685 anded_words[j] = ~ (unsigned int) 0;
17686 add_to_ored_words (0.25L);
17687 add_to_ored_words (0.5L);
17688 add_to_ored_words (1.0L);
17689 add_to_ored_words (2.0L);
17690 add_to_ored_words (4.0L);
17691 /* Remove bits that are common (e.g. if representation of the first mantissa
17692 bit is explicit). */
17693 for (j = 0; j < NWORDS; j++)
17694 ored_words[j] &= ~anded_words[j];
17695 /* Now find the nonzero word. */
17696 for (j = 0; j < NWORDS; j++)
17697 if (ored_words[j] != 0)
17698 break;
17699 if (j < NWORDS)
17700 {
17701 size_t i;
17702 for (i = j + 1; i < NWORDS; i++)
17703 if (ored_words[i] != 0)
17704 {
17705 fprintf (fp, "unknown");
17706 return (fclose (fp) != 0);
17707 }
17708 for (i = 0; ; i++)
17709 if ((ored_words[j] >> i) & 1)
17710 {
17711 fprintf (fp, "word %d bit %d", (int) j, (int) i);
17712 return (fclose (fp) != 0);
17713 }
17714 }
17715 fprintf (fp, "unknown");
17716 return (fclose (fp) != 0);
17717}
17718
17719_ACEOF
17720if ac_fn_c_try_run "$LINENO"; then :
17721 gl_cv_cc_long_double_expbit0=`cat conftest.out`
17722else
17723 gl_cv_cc_long_double_expbit0="unknown"
17724fi
17725rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17726 conftest.$ac_objext conftest.beam conftest.$ac_ext
17727fi
17728
17729 rm -f conftest.out
17730
17731fi
17732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
17733$as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
17734 case "$gl_cv_cc_long_double_expbit0" in
17735 word*bit*)
17736 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
17737 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
17738
17739cat >>confdefs.h <<_ACEOF
17740#define LDBL_EXPBIT0_WORD $word
17741_ACEOF
17742
17743
17744cat >>confdefs.h <<_ACEOF
17745#define LDBL_EXPBIT0_BIT $bit
17746_ACEOF
17747
17748 ;;
17749 esac
17750
17751
17752
17753 fi
17754
17755
17756
17757
88b48903
WN
17758
17759
17760
17761
2196f55f 17762
49e4877c 17763
88b48903
WN
17764 LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
17765
17766
17767
17768
f45c62c4
YQ
17769 if test $ac_cv_func_lstat = yes; then
17770
17771 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
17772 *no)
17773 REPLACE_LSTAT=1
17774 ;;
17775 esac
17776 else
17777 HAVE_LSTAT=0
17778 fi
17779
17780 if test $REPLACE_LSTAT = 1; then
17781
17782
17783
17784
17785
17786
17787
17788
17789 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
17790
17791 :
17792 fi
17793
17794
17795
17796
17797
17798 GNULIB_LSTAT=1
17799
17800
17801
17802
17803
17804$as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
17805
17806
17807
17808
17809
17810
6a29c58e
YQ
17811 if test $gl_cv_func_malloc_posix = yes; then
17812
17813$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
17814
17815 else
17816 REPLACE_MALLOC=1
17817 fi
17818
17819 if test $REPLACE_MALLOC = 1; then
17820
17821
17822
17823
17824
17825
17826
17827
17828 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
17829
17830 fi
17831
17832
17833
17834
17835
17836 GNULIB_MALLOC_POSIX=1
17837
17838
17839
17840
17841
17842$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
17843
17844
17845
17846
17847
17848
88b48903
WN
17849
17850
17851
17852
17853
88b48903 17854
c971b7fa 17855
c971b7fa 17856
98399780
YQ
17857
17858
17859
17860
88b48903
WN
17861 if test $gl_cv_have_include_next = yes; then
17862 gl_cv_next_math_h='<'math.h'>'
17863 else
17864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
17865$as_echo_n "checking absolute name of <math.h>... " >&6; }
17866if test "${gl_cv_next_math_h+set}" = set; then :
17867 $as_echo_n "(cached) " >&6
17868else
c971b7fa 17869
88b48903 17870 if test $ac_cv_header_math_h = yes; then
c971b7fa
PA
17871
17872
4a626d0a
PA
17873
17874
17875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 17876/* end confdefs.h. */
88b48903 17877#include <math.h>
8690e634 17878_ACEOF
4a626d0a
PA
17879 case "$host_os" in
17880 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17881 *) gl_absname_cpp="$ac_cpp" ;;
17882 esac
17883
17884 case "$host_os" in
17885 mingw*)
17886 gl_dirsep_regex='[/\\]'
17887 ;;
17888 *)
17889 gl_dirsep_regex='\/'
17890 ;;
17891 esac
17892 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17893 gl_header_literal_regex=`echo 'math.h' \
17894 | sed -e "$gl_make_literal_regex_sed"`
17895 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17896 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17897 s|^/[^/]|//&|
17898 p
17899 q
17900 }'
17901
17902 gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17903 sed -n "$gl_absolute_header_sed"`
17904
17905 gl_header=$gl_cv_absolute_math_h
17906 gl_cv_next_math_h='"'$gl_header'"'
88b48903
WN
17907 else
17908 gl_cv_next_math_h='<'math.h'>'
17909 fi
8690e634 17910
c971b7fa 17911
88b48903
WN
17912fi
17913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
17914$as_echo "$gl_cv_next_math_h" >&6; }
17915 fi
17916 NEXT_MATH_H=$gl_cv_next_math_h
c971b7fa 17917
88b48903
WN
17918 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17919 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17920 gl_next_as_first_directive='<'math.h'>'
17921 else
17922 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17923 gl_next_as_first_directive=$gl_cv_next_math_h
17924 fi
17925 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
8690e634 17926
c971b7fa 17927
c971b7fa
PA
17928
17929
c971b7fa 17930
88b48903
WN
17931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
17932$as_echo_n "checking whether NAN macro works... " >&6; }
17933if test "${gl_cv_header_math_nan_works+set}" = set; then :
c971b7fa
PA
17934 $as_echo_n "(cached) " >&6
17935else
8690e634
JK
17936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17937/* end confdefs.h. */
88b48903 17938#include <math.h>
c971b7fa
PA
17939int
17940main ()
17941{
88b48903
WN
17942/* Solaris 10 has a broken definition of NAN. Other platforms
17943 fail to provide NAN, or provide it only in C99 mode; this
17944 test only needs to fail when NAN is provided but wrong. */
17945 float f = 1.0f;
17946#ifdef NAN
17947 f = NAN;
17948#endif
17949 return f == 0;
c971b7fa
PA
17950 ;
17951 return 0;
17952}
17953_ACEOF
17954if ac_fn_c_try_compile "$LINENO"; then :
88b48903 17955 gl_cv_header_math_nan_works=yes
8690e634 17956else
88b48903 17957 gl_cv_header_math_nan_works=no
c971b7fa
PA
17958fi
17959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 17960fi
88b48903
WN
17961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
17962$as_echo "$gl_cv_header_math_nan_works" >&6; }
17963 if test $gl_cv_header_math_nan_works = no; then
17964 REPLACE_NAN=1
c971b7fa 17965 fi
88b48903
WN
17966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
17967$as_echo_n "checking whether HUGE_VAL works... " >&6; }
17968if test "${gl_cv_header_math_huge_val_works+set}" = set; then :
c971b7fa
PA
17969 $as_echo_n "(cached) " >&6
17970else
8690e634 17971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 17972/* end confdefs.h. */
88b48903 17973#include <math.h>
c971b7fa
PA
17974int
17975main ()
17976{
88b48903
WN
17977/* Solaris 10 has a broken definition of HUGE_VAL. */
17978 double d = HUGE_VAL;
17979 return d == 0;
c971b7fa
PA
17980 ;
17981 return 0;
17982}
17983_ACEOF
17984if ac_fn_c_try_compile "$LINENO"; then :
88b48903 17985 gl_cv_header_math_huge_val_works=yes
8690e634 17986else
88b48903 17987 gl_cv_header_math_huge_val_works=no
c971b7fa
PA
17988fi
17989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 17990fi
88b48903
WN
17991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
17992$as_echo "$gl_cv_header_math_huge_val_works" >&6; }
17993 if test $gl_cv_header_math_huge_val_works = no; then
17994 REPLACE_HUGE_VAL=1
8690e634 17995 fi
c971b7fa 17996
c971b7fa 17997
88b48903
WN
17998 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
17999 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
18000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
18001$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18002if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
8690e634
JK
18003 $as_echo_n "(cached) " >&6
18004else
18005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18006/* end confdefs.h. */
88b48903 18007#include <math.h>
8690e634
JK
18008int
18009main ()
18010{
88b48903
WN
18011#undef $gl_func
18012 (void) $gl_func;
8690e634
JK
18013 ;
18014 return 0;
18015}
18016_ACEOF
18017if ac_fn_c_try_compile "$LINENO"; then :
88b48903 18018 eval "$as_gl_Symbol=yes"
c971b7fa 18019else
88b48903 18020 eval "$as_gl_Symbol=no"
c971b7fa 18021fi
8690e634
JK
18022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18023fi
88b48903
WN
18024eval ac_res=\$$as_gl_Symbol
18025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18026$as_echo "$ac_res" >&6; }
18027 eval as_val=\$$as_gl_Symbol
18028 if test "x$as_val" = x""yes; then :
18029 cat >>confdefs.h <<_ACEOF
18030#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18031_ACEOF
c971b7fa 18032
88b48903
WN
18033 eval ac_cv_have_decl_$gl_func=yes
18034fi
18035 done
c971b7fa
PA
18036
18037
18038
18039
18040
c971b7fa 18041
c971b7fa 18042
c971b7fa 18043
c971b7fa
PA
18044
18045
c971b7fa 18046
8690e634
JK
18047
18048 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
18049
18050
18051
18052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
18053$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
18054if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
c971b7fa
PA
18055 $as_echo_n "(cached) " >&6
18056else
8690e634
JK
18057
18058 case "$host_os" in
18059 # Guess no on AIX and OSF/1.
18060 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
18061 # Guess yes otherwise.
18062 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
18063 esac
18064 if test $LOCALE_JA != none; then
18065 if test "$cross_compiling" = yes; then :
18066 :
18067else
c971b7fa
PA
18068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18069/* end confdefs.h. */
c971b7fa 18070
8690e634
JK
18071#include <locale.h>
18072#include <string.h>
18073/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18074 <wchar.h>.
18075 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18076 included before <wchar.h>. */
18077#include <stddef.h>
18078#include <stdio.h>
18079#include <time.h>
18080#include <wchar.h>
18081int main ()
c971b7fa 18082{
8690e634
JK
18083 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
18084 {
18085 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
18086 mbstate_t state;
18087 wchar_t wc;
18088
18089 memset (&state, '\0', sizeof (mbstate_t));
18090 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
18091 if (mbsinit (&state))
18092 return 1;
18093 }
c971b7fa
PA
18094 return 0;
18095}
18096_ACEOF
8690e634
JK
18097if ac_fn_c_try_run "$LINENO"; then :
18098 gl_cv_func_mbrtowc_incomplete_state=yes
c971b7fa 18099else
8690e634 18100 gl_cv_func_mbrtowc_incomplete_state=no
c971b7fa 18101fi
8690e634
JK
18102rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18103 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 18104fi
c971b7fa 18105
8690e634 18106 fi
c971b7fa 18107
8690e634
JK
18108fi
18109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
18110$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
c971b7fa 18111
c971b7fa 18112
c971b7fa 18113
c971b7fa 18114
8690e634
JK
18115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
18116$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
18117if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
c971b7fa
PA
18118 $as_echo_n "(cached) " >&6
18119else
18120
8690e634
JK
18121 case "$host_os" in
18122 # Guess no on Solaris 8.
18123 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
18124 # Guess yes otherwise.
18125 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
18126 esac
18127 if test $LOCALE_ZH_CN != none; then
18128 if test "$cross_compiling" = yes; then :
18129 :
18130else
18131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
18132/* end confdefs.h. */
18133
8690e634
JK
18134#include <locale.h>
18135#include <stdlib.h>
18136#include <string.h>
18137/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18138 <wchar.h>.
18139 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18140 included before <wchar.h>. */
18141#include <stddef.h>
18142#include <stdio.h>
18143#include <time.h>
18144#include <wchar.h>
18145int main ()
c971b7fa 18146{
8690e634
JK
18147 /* This fails on Solaris 8:
18148 mbrtowc returns 2, and sets wc to 0x00F0.
18149 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
18150 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
18151 {
18152 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
18153 mbstate_t state;
18154 wchar_t wc;
18155
18156 memset (&state, '\0', sizeof (mbstate_t));
18157 if (mbrtowc (&wc, input + 3, 6, &state) != 4
18158 && mbtowc (&wc, input + 3, 6) == 4)
18159 return 1;
18160 }
c971b7fa
PA
18161 return 0;
18162}
18163_ACEOF
8690e634
JK
18164if ac_fn_c_try_run "$LINENO"; then :
18165 gl_cv_func_mbrtowc_sanitycheck=yes
c971b7fa 18166else
8690e634 18167 gl_cv_func_mbrtowc_sanitycheck=no
c971b7fa 18168fi
8690e634
JK
18169rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18170 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 18171fi
c971b7fa 18172
8690e634 18173 fi
c971b7fa 18174
8690e634
JK
18175fi
18176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
18177$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
18178
18179 REPLACE_MBSTATE_T=0
18180 case "$gl_cv_func_mbrtowc_incomplete_state" in
18181 *yes) ;;
18182 *) REPLACE_MBSTATE_T=1 ;;
18183 esac
18184 case "$gl_cv_func_mbrtowc_sanitycheck" in
18185 *yes) ;;
18186 *) REPLACE_MBSTATE_T=1 ;;
18187 esac
c971b7fa 18188 else
8690e634 18189 REPLACE_MBSTATE_T=1
c971b7fa
PA
18190 fi
18191
18192
18193
8690e634
JK
18194 if test $ac_cv_func_mbrtowc = no; then
18195 HAVE_MBRTOWC=0
18196 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
18197/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18198 <wchar.h>.
18199 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18200 included before <wchar.h>. */
18201#include <stddef.h>
18202#include <stdio.h>
18203#include <time.h>
18204#include <wchar.h>
c971b7fa 18205
8690e634
JK
18206"
18207if test "x$ac_cv_have_decl_mbrtowc" = x""yes; then :
18208 ac_have_decl=1
18209else
18210 ac_have_decl=0
c971b7fa 18211fi
c971b7fa 18212
8690e634
JK
18213cat >>confdefs.h <<_ACEOF
18214#define HAVE_DECL_MBRTOWC $ac_have_decl
18215_ACEOF
c971b7fa 18216
8690e634
JK
18217 if test $ac_cv_have_decl_mbrtowc = yes; then
18218 REPLACE_MBRTOWC=1
18219 fi
18220 else
18221 if test $REPLACE_MBSTATE_T = 1; then
18222 REPLACE_MBRTOWC=1
18223 else
c971b7fa
PA
18224
18225
18226
8690e634
JK
18227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
18228$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
18229if test "${gl_cv_func_mbrtowc_null_arg1+set}" = set; then :
18230 $as_echo_n "(cached) " >&6
c971b7fa 18231else
c971b7fa 18232
8690e634
JK
18233 case "$host_os" in
18234 # Guess no on Solaris.
18235 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
18236 # Guess yes otherwise.
18237 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
18238 esac
18239 if test $LOCALE_FR_UTF8 != none; then
18240 if test "$cross_compiling" = yes; then :
18241 :
18242else
18243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
18244/* end confdefs.h. */
18245
8690e634
JK
18246#include <locale.h>
18247#include <stdlib.h>
18248#include <string.h>
18249/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18250 <wchar.h>.
18251 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18252 included before <wchar.h>. */
18253#include <stddef.h>
18254#include <stdio.h>
18255#include <time.h>
18256#include <wchar.h>
18257int main ()
18258{
18259 int result = 0;
18260
18261 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
18262 {
18263 char input[] = "\303\237er";
18264 mbstate_t state;
18265 wchar_t wc;
18266 size_t ret;
18267
18268 memset (&state, '\0', sizeof (mbstate_t));
18269 wc = (wchar_t) 0xBADFACE;
18270 ret = mbrtowc (&wc, input, 5, &state);
18271 if (ret != 2)
18272 result |= 1;
18273 if (!mbsinit (&state))
18274 result |= 2;
c971b7fa 18275
8690e634
JK
18276 memset (&state, '\0', sizeof (mbstate_t));
18277 ret = mbrtowc (NULL, input, 5, &state);
18278 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
18279 result |= 4;
18280 if (!mbsinit (&state))
18281 result |= 8;
18282 }
18283 return result;
18284}
c971b7fa 18285_ACEOF
8690e634
JK
18286if ac_fn_c_try_run "$LINENO"; then :
18287 gl_cv_func_mbrtowc_null_arg1=yes
18288else
18289 gl_cv_func_mbrtowc_null_arg1=no
18290fi
18291rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18292 conftest.$ac_objext conftest.beam conftest.$ac_ext
18293fi
c971b7fa 18294
8690e634 18295 fi
c971b7fa 18296
c971b7fa 18297fi
8690e634
JK
18298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
18299$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
c971b7fa 18300
c971b7fa 18301
c971b7fa 18302
c971b7fa 18303
8690e634
JK
18304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
18305$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
18306if test "${gl_cv_func_mbrtowc_null_arg2+set}" = set; then :
18307 $as_echo_n "(cached) " >&6
18308else
c971b7fa 18309
8690e634
JK
18310 case "$host_os" in
18311 # Guess no on OSF/1.
18312 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
18313 # Guess yes otherwise.
18314 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
18315 esac
18316 if test $LOCALE_FR_UTF8 != none; then
18317 if test "$cross_compiling" = yes; then :
c971b7fa 18318 :
8690e634
JK
18319else
18320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18321/* end confdefs.h. */
18322
18323#include <locale.h>
18324#include <string.h>
18325/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18326 <wchar.h>.
18327 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18328 included before <wchar.h>. */
18329#include <stddef.h>
18330#include <stdio.h>
18331#include <time.h>
18332#include <wchar.h>
18333int main ()
18334{
18335 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
18336 {
18337 mbstate_t state;
18338 wchar_t wc;
18339 int ret;
18340
18341 memset (&state, '\0', sizeof (mbstate_t));
18342 wc = (wchar_t) 0xBADFACE;
18343 mbrtowc (&wc, NULL, 5, &state);
18344 /* Check that wc was not modified. */
18345 if (wc != (wchar_t) 0xBADFACE)
18346 return 1;
18347 }
18348 return 0;
18349}
18350_ACEOF
18351if ac_fn_c_try_run "$LINENO"; then :
18352 gl_cv_func_mbrtowc_null_arg2=yes
18353else
18354 gl_cv_func_mbrtowc_null_arg2=no
18355fi
18356rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18357 conftest.$ac_objext conftest.beam conftest.$ac_ext
18358fi
18359
18360 fi
18361
18362fi
18363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
18364$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
c971b7fa
PA
18365
18366
18367
18368
18369
18370
8690e634
JK
18371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
18372$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
18373if test "${gl_cv_func_mbrtowc_retval+set}" = set; then :
18374 $as_echo_n "(cached) " >&6
18375else
18376
18377 case "$host_os" in
18378 # Guess no on HP-UX, Solaris, native Windows.
18379 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
18380 # Guess yes otherwise.
18381 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
18382 esac
18383 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
18384 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
18385 if test "$cross_compiling" = yes; then :
c971b7fa 18386 :
8690e634
JK
18387else
18388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18389/* end confdefs.h. */
c971b7fa 18390
8690e634
JK
18391#include <locale.h>
18392#include <string.h>
18393/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18394 <wchar.h>.
18395 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18396 included before <wchar.h>. */
18397#include <stddef.h>
18398#include <stdio.h>
18399#include <time.h>
18400#include <wchar.h>
18401int main ()
18402{
18403 int result = 0;
18404 int found_some_locale = 0;
18405 /* This fails on Solaris. */
18406 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
18407 {
18408 char input[] = "B\303\274\303\237er"; /* "Büßer" */
18409 mbstate_t state;
18410 wchar_t wc;
18411
18412 memset (&state, '\0', sizeof (mbstate_t));
18413 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
18414 {
18415 input[1] = '\0';
18416 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
18417 result |= 1;
18418 }
18419 found_some_locale = 1;
18420 }
18421 /* This fails on HP-UX 11.11. */
18422 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
18423 {
18424 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
18425 mbstate_t state;
18426 wchar_t wc;
18427
18428 memset (&state, '\0', sizeof (mbstate_t));
18429 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
18430 {
18431 input[1] = '\0';
18432 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
18433 result |= 2;
18434 }
18435 found_some_locale = 1;
18436 }
18437 /* This fails on native Windows. */
18438 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
18439 {
18440 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
18441 mbstate_t state;
18442 wchar_t wc;
18443
18444 memset (&state, '\0', sizeof (mbstate_t));
18445 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
18446 {
18447 input[3] = '\0';
18448 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
18449 result |= 4;
18450 }
18451 found_some_locale = 1;
18452 }
18453 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
18454 {
18455 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
18456 mbstate_t state;
18457 wchar_t wc;
18458
18459 memset (&state, '\0', sizeof (mbstate_t));
18460 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
18461 {
18462 input[3] = '\0';
18463 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
18464 result |= 8;
18465 }
18466 found_some_locale = 1;
18467 }
18468 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
18469 {
18470 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
18471 mbstate_t state;
18472 wchar_t wc;
18473
18474 memset (&state, '\0', sizeof (mbstate_t));
18475 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
18476 {
18477 input[3] = '\0';
18478 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
18479 result |= 16;
18480 }
18481 found_some_locale = 1;
18482 }
18483 return (found_some_locale ? result : 77);
18484}
18485_ACEOF
18486if ac_fn_c_try_run "$LINENO"; then :
18487 gl_cv_func_mbrtowc_retval=yes
18488else
18489 if test $? != 77; then
18490 gl_cv_func_mbrtowc_retval=no
18491 fi
c971b7fa 18492
8690e634
JK
18493fi
18494rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18495 conftest.$ac_objext conftest.beam conftest.$ac_ext
18496fi
c971b7fa 18497
8690e634 18498 fi
c971b7fa 18499
8690e634
JK
18500fi
18501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
18502$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
c971b7fa
PA
18503
18504
18505
18506
8690e634
JK
18507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
18508$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
18509if test "${gl_cv_func_mbrtowc_nul_retval+set}" = set; then :
c971b7fa
PA
18510 $as_echo_n "(cached) " >&6
18511else
8690e634
JK
18512
18513 case "$host_os" in
18514 # Guess no on Solaris 8 and 9.
18515 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
18516 # Guess yes otherwise.
18517 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
18518 esac
18519 if test $LOCALE_ZH_CN != none; then
18520 if test "$cross_compiling" = yes; then :
18521 :
c971b7fa
PA
18522else
18523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18524/* end confdefs.h. */
18525
8690e634 18526#include <locale.h>
c971b7fa 18527#include <string.h>
8690e634
JK
18528/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18529 <wchar.h>.
18530 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18531 included before <wchar.h>. */
18532#include <stddef.h>
18533#include <stdio.h>
18534#include <time.h>
18535#include <wchar.h>
18536int main ()
c971b7fa 18537{
8690e634
JK
18538 /* This fails on Solaris 8 and 9. */
18539 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
c971b7fa 18540 {
8690e634
JK
18541 mbstate_t state;
18542 wchar_t wc;
c971b7fa 18543
8690e634
JK
18544 memset (&state, '\0', sizeof (mbstate_t));
18545 if (mbrtowc (&wc, "", 1, &state) != 0)
18546 return 1;
18547 }
c971b7fa
PA
18548 return 0;
18549}
18550_ACEOF
18551if ac_fn_c_try_run "$LINENO"; then :
8690e634 18552 gl_cv_func_mbrtowc_nul_retval=yes
c971b7fa 18553else
8690e634 18554 gl_cv_func_mbrtowc_nul_retval=no
c971b7fa
PA
18555fi
18556rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18557 conftest.$ac_objext conftest.beam conftest.$ac_ext
18558fi
18559
8690e634
JK
18560 fi
18561
c971b7fa 18562fi
8690e634
JK
18563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
18564$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
18565
4a626d0a
PA
18566
18567
18568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
18569$as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
18570if test "${gl_cv_func_mbrtowc_empty_input+set}" = set; then :
18571 $as_echo_n "(cached) " >&6
18572else
18573
18574 case "$host_os" in
18575 # Guess no on AIX and glibc systems.
18576 aix* | *-gnu*)
18577 gl_cv_func_mbrtowc_empty_input="guessing no" ;;
18578 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
18579 esac
18580 if test "$cross_compiling" = yes; then :
18581 :
18582else
18583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18584/* end confdefs.h. */
18585
18586 #include <wchar.h>
18587 static wchar_t wc;
18588 static mbstate_t mbs;
18589 int
18590 main (void)
18591 {
49e4877c 18592 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
4a626d0a
PA
18593 }
18594_ACEOF
18595if ac_fn_c_try_run "$LINENO"; then :
4a626d0a 18596 gl_cv_func_mbrtowc_empty_input=yes
49e4877c
PA
18597else
18598 gl_cv_func_mbrtowc_empty_input=no
4a626d0a
PA
18599fi
18600rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18601 conftest.$ac_objext conftest.beam conftest.$ac_ext
18602fi
18603
18604
18605fi
18606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
18607$as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
18608
49e4877c
PA
18609
18610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
18611$as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
18612if test "${gl_cv_C_locale_sans_EILSEQ+set}" = set; then :
18613 $as_echo_n "(cached) " >&6
18614else
18615
18616 gl_cv_C_locale_sans_EILSEQ="guessing no"
18617
18618 if test "$cross_compiling" = yes; then :
18619 :
18620else
18621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18622/* end confdefs.h. */
18623#include <limits.h>
18624 #include <locale.h>
18625 #include <wchar.h>
18626
18627int
18628main ()
18629{
18630
18631 int i;
18632 char *locale = setlocale (LC_ALL, "C");
18633 if (! locale)
18634 return 1;
18635 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
18636 {
18637 char c = i;
18638 wchar_t wc;
18639 mbstate_t mbs = { 0, };
18640 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
18641 if (1 < ss)
18642 return 1;
18643 }
18644 return 0;
18645
6ec2e0f5
SDJ
18646 ;
18647 return 0;
18648}
18649_ACEOF
18650if ac_fn_c_try_run "$LINENO"; then :
18651 gl_cv_C_locale_sans_EILSEQ=yes
18652else
18653 gl_cv_C_locale_sans_EILSEQ=no
18654fi
18655rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18656 conftest.$ac_objext conftest.beam conftest.$ac_ext
18657fi
18658
18659fi
18660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5
18661$as_echo "$gl_cv_C_locale_sans_EILSEQ" >&6; }
18662
18663 case "$gl_cv_func_mbrtowc_null_arg1" in
18664 *yes) ;;
18665 *)
18666$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
18667
18668 REPLACE_MBRTOWC=1
18669 ;;
18670 esac
18671 case "$gl_cv_func_mbrtowc_null_arg2" in
18672 *yes) ;;
18673 *)
18674$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
18675
18676 REPLACE_MBRTOWC=1
18677 ;;
18678 esac
18679 case "$gl_cv_func_mbrtowc_retval" in
18680 *yes) ;;
18681 *)
18682$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
18683
18684 REPLACE_MBRTOWC=1
18685 ;;
18686 esac
18687 case "$gl_cv_func_mbrtowc_nul_retval" in
18688 *yes) ;;
18689 *)
18690$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
18691
18692 REPLACE_MBRTOWC=1
18693 ;;
18694 esac
18695 case "$gl_cv_func_mbrtowc_empty_input" in
18696 *yes) ;;
18697 *)
18698$as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
18699
18700 REPLACE_MBRTOWC=1
18701 ;;
18702 esac
18703 case $gl_cv_C_locale_sans_EILSEQ in
18704 *yes) ;;
18705 *)
18706$as_echo "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
18707
18708 REPLACE_MBRTOWC=1
18709 ;;
18710 esac
18711 fi
18712 fi
18713
18714 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
18715
18716
18717
18718
18719
18720
18721
18722
18723 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
18724
18725
18726 :
18727
18728 fi
18729
18730
18731
18732
18733
18734 GNULIB_MBRTOWC=1
18735
18736
18737
18738
18739
18740$as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
18741
18742
18743
18744
18745
18746
18747
18748
18749
18750
18751
18752
18753
18754
18755 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
18756
18757
18758
18759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
18760$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
18761if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
18762 $as_echo_n "(cached) " >&6
18763else
18764
18765 case "$host_os" in
18766 # Guess no on AIX and OSF/1.
18767 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
18768 # Guess yes otherwise.
18769 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
18770 esac
18771 if test $LOCALE_JA != none; then
18772 if test "$cross_compiling" = yes; then :
18773 :
18774else
18775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18776/* end confdefs.h. */
18777
18778#include <locale.h>
18779#include <string.h>
18780/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18781 <wchar.h>.
18782 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18783 included before <wchar.h>. */
18784#include <stddef.h>
18785#include <stdio.h>
18786#include <time.h>
18787#include <wchar.h>
18788int main ()
18789{
18790 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
18791 {
18792 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
18793 mbstate_t state;
18794 wchar_t wc;
18795
18796 memset (&state, '\0', sizeof (mbstate_t));
18797 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
18798 if (mbsinit (&state))
18799 return 1;
18800 }
18801 return 0;
18802}
18803_ACEOF
18804if ac_fn_c_try_run "$LINENO"; then :
18805 gl_cv_func_mbrtowc_incomplete_state=yes
18806else
18807 gl_cv_func_mbrtowc_incomplete_state=no
18808fi
18809rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18810 conftest.$ac_objext conftest.beam conftest.$ac_ext
18811fi
18812
18813 fi
18814
18815fi
18816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
18817$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
18818
18819
18820
18821
18822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
18823$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
18824if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
18825 $as_echo_n "(cached) " >&6
18826else
18827
18828 case "$host_os" in
18829 # Guess no on Solaris 8.
18830 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
18831 # Guess yes otherwise.
18832 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
18833 esac
18834 if test $LOCALE_ZH_CN != none; then
18835 if test "$cross_compiling" = yes; then :
18836 :
18837else
18838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18839/* end confdefs.h. */
18840
18841#include <locale.h>
18842#include <stdlib.h>
18843#include <string.h>
18844/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18845 <wchar.h>.
18846 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18847 included before <wchar.h>. */
18848#include <stddef.h>
18849#include <stdio.h>
18850#include <time.h>
18851#include <wchar.h>
18852int main ()
18853{
18854 /* This fails on Solaris 8:
18855 mbrtowc returns 2, and sets wc to 0x00F0.
18856 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
18857 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
18858 {
18859 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
18860 mbstate_t state;
18861 wchar_t wc;
18862
18863 memset (&state, '\0', sizeof (mbstate_t));
18864 if (mbrtowc (&wc, input + 3, 6, &state) != 4
18865 && mbtowc (&wc, input + 3, 6) == 4)
18866 return 1;
18867 }
49e4877c
PA
18868 return 0;
18869}
18870_ACEOF
18871if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 18872 gl_cv_func_mbrtowc_sanitycheck=yes
49e4877c 18873else
6ec2e0f5 18874 gl_cv_func_mbrtowc_sanitycheck=no
49e4877c
PA
18875fi
18876rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18877 conftest.$ac_objext conftest.beam conftest.$ac_ext
18878fi
18879
6ec2e0f5
SDJ
18880 fi
18881
49e4877c 18882fi
6ec2e0f5
SDJ
18883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
18884$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
49e4877c 18885
6ec2e0f5
SDJ
18886 REPLACE_MBSTATE_T=0
18887 case "$gl_cv_func_mbrtowc_incomplete_state" in
18888 *yes) ;;
18889 *) REPLACE_MBSTATE_T=1 ;;
18890 esac
18891 case "$gl_cv_func_mbrtowc_sanitycheck" in
18892 *yes) ;;
18893 *) REPLACE_MBSTATE_T=1 ;;
18894 esac
18895 else
18896 REPLACE_MBSTATE_T=1
18897 fi
8690e634 18898
8690e634 18899
8690e634 18900
6ec2e0f5
SDJ
18901 if test $ac_cv_func_mbsinit = no; then
18902 HAVE_MBSINIT=0
18903 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
18904/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18905 <wchar.h>.
18906 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18907 included before <wchar.h>. */
18908#include <stddef.h>
18909#include <stdio.h>
18910#include <time.h>
18911#include <wchar.h>
8690e634 18912
6ec2e0f5
SDJ
18913"
18914if test "x$ac_cv_have_decl_mbsinit" = x""yes; then :
18915 ac_have_decl=1
18916else
18917 ac_have_decl=0
18918fi
4a626d0a 18919
6ec2e0f5
SDJ
18920cat >>confdefs.h <<_ACEOF
18921#define HAVE_DECL_MBSINIT $ac_have_decl
18922_ACEOF
49e4877c 18923
6ec2e0f5
SDJ
18924 if test $ac_cv_have_decl_mbsinit = yes; then
18925 REPLACE_MBSINIT=1
18926 fi
18927 else
18928 if test $REPLACE_MBSTATE_T = 1; then
18929 REPLACE_MBSINIT=1
18930 else
18931 case "$host_os" in
18932 mingw*) REPLACE_MBSINIT=1 ;;
8690e634 18933 esac
c971b7fa
PA
18934 fi
18935 fi
18936
6ec2e0f5 18937 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
c971b7fa 18938
c971b7fa 18939
c971b7fa
PA
18940
18941
18942
18943
18944
18945
6ec2e0f5 18946 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
8690e634
JK
18947
18948
18949 :
c971b7fa 18950
a512b375 18951 fi
c971b7fa 18952
8690e634
JK
18953
18954
18955
18956
6ec2e0f5 18957 GNULIB_MBSINIT=1
8690e634
JK
18958
18959
18960
18961
8690e634 18962
6ec2e0f5 18963$as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
8690e634
JK
18964
18965
18966
18967
18968
18969
18970
18971
18972
18973
18974
c971b7fa 18975
c971b7fa 18976
8690e634 18977 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
c971b7fa 18978
8690e634
JK
18979
18980
18981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
18982$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
18983if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
18984 $as_echo_n "(cached) " >&6
18985else
18986
18987 case "$host_os" in
18988 # Guess no on AIX and OSF/1.
18989 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
18990 # Guess yes otherwise.
18991 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
18992 esac
18993 if test $LOCALE_JA != none; then
18994 if test "$cross_compiling" = yes; then :
18995 :
c971b7fa
PA
18996else
18997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18998/* end confdefs.h. */
18999
8690e634
JK
19000#include <locale.h>
19001#include <string.h>
19002/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19003 <wchar.h>.
19004 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19005 included before <wchar.h>. */
19006#include <stddef.h>
19007#include <stdio.h>
19008#include <time.h>
19009#include <wchar.h>
19010int main ()
c971b7fa 19011{
8690e634 19012 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
c971b7fa 19013 {
8690e634
JK
19014 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
19015 mbstate_t state;
19016 wchar_t wc;
19017
19018 memset (&state, '\0', sizeof (mbstate_t));
19019 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
19020 if (mbsinit (&state))
19021 return 1;
c971b7fa 19022 }
c971b7fa
PA
19023 return 0;
19024}
19025_ACEOF
19026if ac_fn_c_try_run "$LINENO"; then :
8690e634 19027 gl_cv_func_mbrtowc_incomplete_state=yes
c971b7fa 19028else
8690e634 19029 gl_cv_func_mbrtowc_incomplete_state=no
c971b7fa
PA
19030fi
19031rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19032 conftest.$ac_objext conftest.beam conftest.$ac_ext
19033fi
19034
8690e634 19035 fi
c971b7fa
PA
19036
19037fi
8690e634
JK
19038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
19039$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
c971b7fa
PA
19040
19041
c971b7fa
PA
19042
19043
8690e634
JK
19044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
19045$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
19046if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
c971b7fa
PA
19047 $as_echo_n "(cached) " >&6
19048else
8690e634
JK
19049
19050 case "$host_os" in
19051 # Guess no on Solaris 8.
19052 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
19053 # Guess yes otherwise.
19054 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
19055 esac
19056 if test $LOCALE_ZH_CN != none; then
19057 if test "$cross_compiling" = yes; then :
19058 :
19059else
c971b7fa
PA
19060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19061/* end confdefs.h. */
8690e634
JK
19062
19063#include <locale.h>
19064#include <stdlib.h>
19065#include <string.h>
19066/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19067 <wchar.h>.
19068 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19069 included before <wchar.h>. */
c971b7fa 19070#include <stddef.h>
8690e634
JK
19071#include <stdio.h>
19072#include <time.h>
19073#include <wchar.h>
19074int main ()
c971b7fa 19075{
8690e634
JK
19076 /* This fails on Solaris 8:
19077 mbrtowc returns 2, and sets wc to 0x00F0.
19078 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
19079 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
19080 {
19081 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
19082 mbstate_t state;
19083 wchar_t wc;
19084
19085 memset (&state, '\0', sizeof (mbstate_t));
19086 if (mbrtowc (&wc, input + 3, 6, &state) != 4
19087 && mbtowc (&wc, input + 3, 6) == 4)
19088 return 1;
19089 }
c971b7fa
PA
19090 return 0;
19091}
19092_ACEOF
8690e634
JK
19093if ac_fn_c_try_run "$LINENO"; then :
19094 gl_cv_func_mbrtowc_sanitycheck=yes
c971b7fa 19095else
8690e634 19096 gl_cv_func_mbrtowc_sanitycheck=no
c971b7fa 19097fi
8690e634
JK
19098rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19099 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 19100fi
c971b7fa 19101
8690e634
JK
19102 fi
19103
19104fi
19105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
19106$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
c971b7fa 19107
8690e634
JK
19108 REPLACE_MBSTATE_T=0
19109 case "$gl_cv_func_mbrtowc_incomplete_state" in
19110 *yes) ;;
19111 *) REPLACE_MBSTATE_T=1 ;;
19112 esac
19113 case "$gl_cv_func_mbrtowc_sanitycheck" in
19114 *yes) ;;
19115 *) REPLACE_MBSTATE_T=1 ;;
19116 esac
19117 else
19118 REPLACE_MBSTATE_T=1
c971b7fa
PA
19119 fi
19120
c971b7fa 19121
8690e634 19122
6ec2e0f5
SDJ
19123 if test $ac_cv_func_mbsrtowcs = no; then
19124 HAVE_MBSRTOWCS=0
19125 ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
8690e634
JK
19126/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19127 <wchar.h>.
19128 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19129 included before <wchar.h>. */
19130#include <stddef.h>
19131#include <stdio.h>
19132#include <time.h>
19133#include <wchar.h>
19134
19135"
6ec2e0f5 19136if test "x$ac_cv_have_decl_mbsrtowcs" = x""yes; then :
8690e634
JK
19137 ac_have_decl=1
19138else
19139 ac_have_decl=0
c971b7fa 19140fi
c971b7fa 19141
8690e634 19142cat >>confdefs.h <<_ACEOF
6ec2e0f5 19143#define HAVE_DECL_MBSRTOWCS $ac_have_decl
c971b7fa 19144_ACEOF
c971b7fa 19145
6ec2e0f5
SDJ
19146 if test $ac_cv_have_decl_mbsrtowcs = yes; then
19147 REPLACE_MBSRTOWCS=1
8690e634
JK
19148 fi
19149 else
19150 if test $REPLACE_MBSTATE_T = 1; then
6ec2e0f5 19151 REPLACE_MBSRTOWCS=1
8690e634 19152 else
6ec2e0f5
SDJ
19153
19154
19155
19156
19157
19158
19159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
19160$as_echo_n "checking whether mbsrtowcs works... " >&6; }
19161if test "${gl_cv_func_mbsrtowcs_works+set}" = set; then :
19162 $as_echo_n "(cached) " >&6
19163else
19164
19165 case "$host_os" in
19166 # Guess no on HP-UX, Solaris, mingw.
19167 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
19168 # Guess yes otherwise.
19169 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
19170 esac
19171 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
19172 if test "$cross_compiling" = yes; then :
19173 :
19174else
19175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19176/* end confdefs.h. */
19177
19178#include <locale.h>
19179#include <string.h>
19180/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19181 <wchar.h>.
19182 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19183 included before <wchar.h>. */
19184#include <stddef.h>
19185#include <stdio.h>
19186#include <time.h>
19187#include <wchar.h>
19188int main ()
19189{
19190 int result = 0;
19191 /* Test whether the function supports a NULL destination argument.
19192 This fails on native Windows. */
19193 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
19194 {
19195 const char input[] = "\337er";
19196 const char *src = input;
19197 mbstate_t state;
19198
19199 memset (&state, '\0', sizeof (mbstate_t));
19200 if (mbsrtowcs (NULL, &src, 1, &state) != 3
19201 || src != input)
19202 result |= 1;
19203 }
19204 /* Test whether the function works when started with a conversion state
19205 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
19206 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
19207 {
19208 const char input[] = "B\303\274\303\237er";
19209 mbstate_t state;
19210
19211 memset (&state, '\0', sizeof (mbstate_t));
19212 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
19213 if (!mbsinit (&state))
19214 {
19215 const char *src = input + 2;
19216 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
19217 result |= 2;
19218 }
19219 }
19220 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
19221 {
19222 const char input[] = "<\306\374\313\334\270\354>";
19223 mbstate_t state;
19224
19225 memset (&state, '\0', sizeof (mbstate_t));
19226 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
19227 if (!mbsinit (&state))
19228 {
19229 const char *src = input + 4;
19230 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
19231 result |= 4;
19232 }
19233 }
19234 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
19235 {
19236 const char input[] = "B\250\271\201\060\211\070er";
19237 mbstate_t state;
19238
19239 memset (&state, '\0', sizeof (mbstate_t));
19240 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
19241 if (!mbsinit (&state))
19242 {
19243 const char *src = input + 2;
19244 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
19245 result |= 8;
19246 }
19247 }
19248 return result;
19249}
19250_ACEOF
19251if ac_fn_c_try_run "$LINENO"; then :
19252 gl_cv_func_mbsrtowcs_works=yes
19253else
19254 gl_cv_func_mbsrtowcs_works=no
19255fi
19256rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19257 conftest.$ac_objext conftest.beam conftest.$ac_ext
19258fi
19259
19260 fi
19261
19262fi
19263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
19264$as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
19265
19266 case "$gl_cv_func_mbsrtowcs_works" in
19267 *yes) ;;
19268 *) REPLACE_MBSRTOWCS=1 ;;
8690e634
JK
19269 esac
19270 fi
19271 fi
c971b7fa 19272
6ec2e0f5 19273 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
c971b7fa
PA
19274
19275
19276
19277
19278
19279
19280
19281
6ec2e0f5
SDJ
19282 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
19283
19284
19285
19286
19287
19288
19289
19290
19291
19292 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
c971b7fa
PA
19293
19294
8690e634 19295 :
c971b7fa 19296
a512b375 19297 fi
c971b7fa 19298
c971b7fa 19299
c971b7fa 19300
c971b7fa
PA
19301
19302
6ec2e0f5 19303 GNULIB_MBSRTOWCS=1
c971b7fa 19304
c971b7fa
PA
19305
19306
19307
19308
6ec2e0f5 19309$as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
c971b7fa
PA
19310
19311
c971b7fa 19312
c971b7fa 19313
6ec2e0f5 19314 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
c971b7fa
PA
19315
19316
19317
c971b7fa 19318
c971b7fa
PA
19319
19320
19321
19322
6ec2e0f5 19323 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
8690e634 19324
c971b7fa 19325
6ec2e0f5
SDJ
19326 for ac_header in bp-sym.h
19327do :
19328 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
19329if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
19330 cat >>confdefs.h <<_ACEOF
19331#define HAVE_BP_SYM_H 1
19332_ACEOF
c971b7fa 19333
6ec2e0f5 19334fi
c971b7fa 19335
6ec2e0f5
SDJ
19336done
19337
19338
19339 fi
19340
19341
19342
19343
19344
19345 GNULIB_MEMCHR=1
19346
19347
19348
19349
19350
19351$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
19352
19353
19354
19355
19356
19357 if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
19358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
19359$as_echo_n "checking whether memmem works in linear time... " >&6; }
19360if test "${gl_cv_func_memmem_works_fast+set}" = set; then :
8690e634
JK
19361 $as_echo_n "(cached) " >&6
19362else
6ec2e0f5
SDJ
19363 if test "$cross_compiling" = yes; then :
19364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19365/* end confdefs.h. */
19366
19367#include <features.h>
19368#ifdef __GNU_LIBRARY__
19369 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)) \
19370 && !defined __UCLIBC__
19371 Lucky user
19372 #endif
19373#endif
19374#ifdef __CYGWIN__
19375 #include <cygwin/version.h>
19376 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 0)
19377 Lucky user
19378 #endif
19379#endif
19380
19381_ACEOF
19382if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19383 $EGREP "Lucky user" >/dev/null 2>&1; then :
19384 gl_cv_func_memmem_works_fast="guessing yes"
19385else
19386 gl_cv_func_memmem_works_fast="guessing no"
19387fi
19388rm -f conftest*
19389
c971b7fa 19390
8690e634
JK
19391else
19392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 19393/* end confdefs.h. */
c971b7fa 19394
6ec2e0f5
SDJ
19395#include <signal.h> /* for signal */
19396#include <string.h> /* for memmem */
19397#include <stdlib.h> /* for malloc */
19398#include <unistd.h> /* for alarm */
19399static void quit (int sig) { _exit (sig + 128); }
19400
19401int
19402main ()
8690e634 19403{
8690e634 19404
6ec2e0f5
SDJ
19405 int result = 0;
19406 size_t m = 1000000;
19407 char *haystack = (char *) malloc (2 * m + 1);
19408 char *needle = (char *) malloc (m + 1);
19409 /* Failure to compile this test due to missing alarm is okay,
19410 since all such platforms (mingw) also lack memmem. */
19411 signal (SIGALRM, quit);
19412 alarm (5);
19413 /* Check for quadratic performance. */
19414 if (haystack && needle)
19415 {
19416 memset (haystack, 'A', 2 * m);
19417 haystack[2 * m] = 'B';
19418 memset (needle, 'A', m);
19419 needle[m] = 'B';
19420 if (!memmem (haystack, 2 * m + 1, needle, m + 1))
19421 result |= 1;
19422 }
19423 return result;
19424
19425 ;
c971b7fa
PA
19426 return 0;
19427}
19428_ACEOF
8690e634 19429if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 19430 gl_cv_func_memmem_works_fast=yes
8690e634 19431else
6ec2e0f5 19432 gl_cv_func_memmem_works_fast=no
8690e634
JK
19433fi
19434rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19435 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 19436fi
c971b7fa
PA
19437
19438
8690e634 19439fi
6ec2e0f5
SDJ
19440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_fast" >&5
19441$as_echo "$gl_cv_func_memmem_works_fast" >&6; }
19442 case "$gl_cv_func_memmem_works_fast" in
19443 *yes) ;;
19444 *)
19445 REPLACE_MEMMEM=1
19446 ;;
19447 esac
19448 fi
c971b7fa 19449
6ec2e0f5 19450 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
8690e634
JK
19451
19452
19453
6ec2e0f5
SDJ
19454
19455
19456
19457
19458
19459 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
19460
19461 fi
19462
19463
19464
19465
19466 for ac_func in memmem
19467do :
19468 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
19469if test "x$ac_cv_func_memmem" = x""yes; then :
19470 cat >>confdefs.h <<_ACEOF
19471#define HAVE_MEMMEM 1
19472_ACEOF
19473
19474fi
19475done
19476
19477 if test $ac_cv_func_memmem = yes; then
19478 HAVE_MEMMEM=1
19479 else
19480 HAVE_MEMMEM=0
19481 fi
19482
19483 if test $ac_cv_have_decl_memmem = no; then
19484 HAVE_DECL_MEMMEM=0
19485 else
19486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
19487$as_echo_n "checking whether memmem works... " >&6; }
19488if test "${gl_cv_func_memmem_works_always+set}" = set; then :
c971b7fa
PA
19489 $as_echo_n "(cached) " >&6
19490else
6ec2e0f5
SDJ
19491 if test "$cross_compiling" = yes; then :
19492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19493/* end confdefs.h. */
19494
19495#ifdef __GNU_LIBRARY__
19496 #include <features.h>
19497 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
19498 || __GLIBC_MINOR__ > 12)) \
19499 || (__GLIBC__ > 2)) \
19500 || defined __UCLIBC__
19501 Lucky user
19502 #endif
19503#elif defined __CYGWIN__
19504 #include <cygwin/version.h>
19505 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
19506 Lucky user
19507 #endif
19508#else
19509 Lucky user
19510#endif
19511
19512_ACEOF
19513if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19514 $EGREP "Lucky user" >/dev/null 2>&1; then :
19515 gl_cv_func_memmem_works_always="guessing yes"
19516else
19517 gl_cv_func_memmem_works_always="guessing no"
19518fi
19519rm -f conftest*
19520
8690e634 19521
8690e634 19522else
c971b7fa
PA
19523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19524/* end confdefs.h. */
c971b7fa 19525
6ec2e0f5
SDJ
19526#include <string.h> /* for memmem */
19527#define P "_EF_BF_BD"
19528#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
19529#define NEEDLE P P P P P
19530
19531int
19532main ()
c971b7fa 19533{
8690e634 19534
6ec2e0f5
SDJ
19535 int result = 0;
19536 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
19537 result |= 1;
19538 /* Check for empty needle behavior. */
19539 {
19540 const char *haystack = "AAA";
19541 if (memmem (haystack, 3, NULL, 0) != haystack)
19542 result |= 2;
8690e634 19543 }
6ec2e0f5
SDJ
19544 return result;
19545
19546 ;
c971b7fa
PA
19547 return 0;
19548}
19549_ACEOF
8690e634 19550if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 19551 gl_cv_func_memmem_works_always=yes
c971b7fa 19552else
6ec2e0f5 19553 gl_cv_func_memmem_works_always=no
c971b7fa 19554fi
8690e634
JK
19555rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19556 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 19557fi
8690e634 19558
8690e634
JK
19559
19560fi
6ec2e0f5
SDJ
19561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
19562$as_echo "$gl_cv_func_memmem_works_always" >&6; }
19563 case "$gl_cv_func_memmem_works_always" in
8690e634 19564 *yes) ;;
6ec2e0f5
SDJ
19565 *)
19566 REPLACE_MEMMEM=1
19567 ;;
8690e634 19568 esac
c971b7fa 19569 fi
6ec2e0f5 19570 :
c971b7fa 19571
6ec2e0f5 19572 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
c971b7fa 19573
c971b7fa 19574
8690e634 19575
c971b7fa 19576
6ec2e0f5
SDJ
19577
19578
19579
19580
19581 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
19582
19583 fi
19584
19585
19586
19587
19588
19589 GNULIB_MEMMEM=1
19590
19591
19592
19593
19594
19595$as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
19596
19597
19598
19599
19600
19601
19602
19603
19604
19605 for ac_func in mempcpy
19606do :
19607 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
19608if test "x$ac_cv_func_mempcpy" = x""yes; then :
19609 cat >>confdefs.h <<_ACEOF
19610#define HAVE_MEMPCPY 1
8690e634 19611_ACEOF
c971b7fa 19612
6ec2e0f5
SDJ
19613fi
19614done
c971b7fa 19615
6ec2e0f5
SDJ
19616 if test $ac_cv_func_mempcpy = no; then
19617 HAVE_MEMPCPY=0
19618 fi
8690e634 19619
6ec2e0f5 19620 if test $HAVE_MEMPCPY = 0; then
8690e634
JK
19621
19622
19623
19624
8690e634 19625
6ec2e0f5
SDJ
19626
19627
19628
19629 gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
19630
19631
8690e634 19632 :
c971b7fa 19633
6ec2e0f5 19634 fi
c971b7fa 19635
8690e634 19636
8690e634 19637
8690e634 19638
6ec2e0f5
SDJ
19639
19640 GNULIB_MEMPCPY=1
19641
19642
19643
19644
19645
19646$as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
19647
19648
19649
19650
19651
19652
19653
19654
19655 if test $ac_cv_have_decl_memrchr = no; then
19656 HAVE_DECL_MEMRCHR=0
19657 fi
19658
19659 for ac_func in memrchr
19660do :
19661 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
19662if test "x$ac_cv_func_memrchr" = x""yes; then :
19663 cat >>confdefs.h <<_ACEOF
19664#define HAVE_MEMRCHR 1
c971b7fa 19665_ACEOF
6ec2e0f5 19666
c971b7fa 19667fi
6ec2e0f5 19668done
8690e634 19669
8690e634 19670
6ec2e0f5 19671 if test $ac_cv_func_memrchr = no; then
8690e634 19672
6ec2e0f5
SDJ
19673
19674
19675
19676
19677
19678
19679
19680 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
19681
19682 :
c971b7fa
PA
19683 fi
19684
19685
c971b7fa 19686
c971b7fa 19687
c971b7fa 19688
6ec2e0f5
SDJ
19689 GNULIB_MEMRCHR=1
19690
19691
19692
19693
19694
19695$as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
19696
19697
19698
19699
2d8adcbd
MM
19700
19701
19702
19703 if test $ac_cv_func_mkstemp = yes; then
19704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mkstemp" >&5
19705$as_echo_n "checking for working mkstemp... " >&6; }
19706if test "${gl_cv_func_working_mkstemp+set}" = set; then :
19707 $as_echo_n "(cached) " >&6
19708else
19709
19710 mkdir conftest.mkstemp
19711 if test "$cross_compiling" = yes; then :
19712 case "$host_os" in
19713 # Guess yes on glibc systems.
19714 *-gnu*) gl_cv_func_working_mkstemp="guessing yes" ;;
19715 # If we don't know, assume the worst.
19716 *) gl_cv_func_working_mkstemp="guessing no" ;;
19717 esac
19718
19719else
19720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19721/* end confdefs.h. */
19722$ac_includes_default
19723int
19724main ()
19725{
19726int result = 0;
19727 int i;
19728 off_t large = (off_t) 4294967295u;
19729 if (large < 0)
19730 large = 2147483647;
19731 umask (0);
19732 for (i = 0; i < 70; i++)
19733 {
19734 char templ[] = "conftest.mkstemp/coXXXXXX";
19735 int (*mkstemp_function) (char *) = mkstemp;
19736 int fd = mkstemp_function (templ);
19737 if (fd < 0)
19738 result |= 1;
19739 else
19740 {
19741 struct stat st;
19742 if (lseek (fd, large, SEEK_SET) != large)
19743 result |= 2;
19744 if (fstat (fd, &st) < 0)
19745 result |= 4;
19746 else if (st.st_mode & 0077)
19747 result |= 8;
19748 if (close (fd))
19749 result |= 16;
19750 }
19751 }
19752 return result;
19753 ;
19754 return 0;
19755}
19756_ACEOF
19757if ac_fn_c_try_run "$LINENO"; then :
19758 gl_cv_func_working_mkstemp=yes
19759else
19760 gl_cv_func_working_mkstemp=no
19761fi
19762rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19763 conftest.$ac_objext conftest.beam conftest.$ac_ext
19764fi
19765
19766 rm -rf conftest.mkstemp
19767
19768fi
19769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mkstemp" >&5
19770$as_echo "$gl_cv_func_working_mkstemp" >&6; }
19771 case "$gl_cv_func_working_mkstemp" in
19772 *yes) ;;
19773 *)
19774 REPLACE_MKSTEMP=1
19775 ;;
19776 esac
19777 else
19778 HAVE_MKSTEMP=0
19779 fi
19780
19781 if test $HAVE_MKSTEMP = 0 || test $REPLACE_MKSTEMP = 1; then
19782
19783
19784
19785
19786
19787
19788
19789
19790 gl_LIBOBJS="$gl_LIBOBJS mkstemp.$ac_objext"
19791
19792
19793
19794 fi
19795
19796
19797
19798
19799
19800 GNULIB_MKSTEMP=1
19801
19802
19803
19804
19805
19806$as_echo "#define GNULIB_TEST_MKSTEMP 1" >>confdefs.h
19807
19808
19809
19810
6ec2e0f5
SDJ
19811 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
19812
19813
19814
c971b7fa 19815
c971b7fa 19816
c971b7fa
PA
19817
19818
8690e634 19819
6ec2e0f5 19820 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
8690e634 19821
6ec2e0f5 19822 fi
8690e634 19823
6ec2e0f5 19824 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
8690e634
JK
19825
19826
19827
19828
19829
19830
8690e634
JK
19831
19832
6ec2e0f5 19833 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
8690e634 19834
a512b375 19835 fi
8690e634
JK
19836
19837
19838
6ec2e0f5
SDJ
19839 case "$host_os" in
19840 mingw* | pw*)
19841 REPLACE_OPEN=1
19842 ;;
19843 *)
19844
19845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
19846$as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
19847if test "${gl_cv_func_open_slash+set}" = set; then :
19848 $as_echo_n "(cached) " >&6
19849else
19850 # Assume that if we have lstat, we can also check symlinks.
19851 if test $ac_cv_func_lstat = yes; then
19852 touch conftest.tmp
19853 ln -s conftest.tmp conftest.lnk
19854 fi
19855 if test "$cross_compiling" = yes; then :
8690e634 19856
6ec2e0f5
SDJ
19857 case "$host_os" in
19858 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
19859 gl_cv_func_open_slash="guessing no" ;;
19860 *)
19861 gl_cv_func_open_slash="guessing yes" ;;
19862 esac
8690e634 19863
6ec2e0f5
SDJ
19864else
19865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19866/* end confdefs.h. */
19867
19868#include <fcntl.h>
19869#if HAVE_UNISTD_H
19870# include <unistd.h>
19871#endif
19872int main ()
19873{
19874 int result = 0;
19875#if HAVE_LSTAT
19876 if (open ("conftest.lnk/", O_RDONLY) != -1)
19877 result |= 1;
19878#endif
19879 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
19880 result |= 2;
19881 return result;
19882}
19883_ACEOF
19884if ac_fn_c_try_run "$LINENO"; then :
19885 gl_cv_func_open_slash=yes
19886else
19887 gl_cv_func_open_slash=no
19888fi
19889rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19890 conftest.$ac_objext conftest.beam conftest.$ac_ext
19891fi
8690e634 19892
6ec2e0f5 19893 rm -f conftest.sl conftest.tmp conftest.lnk
8690e634 19894
6ec2e0f5
SDJ
19895fi
19896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
19897$as_echo "$gl_cv_func_open_slash" >&6; }
19898 case "$gl_cv_func_open_slash" in
19899 *no)
8690e634 19900
6ec2e0f5 19901$as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
8690e634 19902
6ec2e0f5
SDJ
19903 REPLACE_OPEN=1
19904 ;;
19905 esac
19906 ;;
19907 esac
8690e634 19908
6ec2e0f5 19909 if test $REPLACE_OPEN = 0; then
c971b7fa
PA
19910
19911
19912
6ec2e0f5
SDJ
19913 if test $ac_cv_func_fchdir = no; then
19914 HAVE_FCHDIR=0
19915 fi
c971b7fa 19916
6ec2e0f5
SDJ
19917 if test $HAVE_FCHDIR = 0; then
19918 REPLACE_OPEN=1
19919 fi
19920 fi
c971b7fa
PA
19921
19922
19923
6ec2e0f5 19924 if test $REPLACE_OPEN = 1; then
c971b7fa
PA
19925
19926
19927
19928
19929
c971b7fa
PA
19930
19931
c971b7fa 19932
6ec2e0f5 19933 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
c971b7fa 19934
c971b7fa
PA
19935
19936
6ec2e0f5
SDJ
19937 :
19938
a512b375 19939 fi
c971b7fa
PA
19940
19941
19942
19943
19944
6ec2e0f5 19945 GNULIB_OPEN=1
c971b7fa
PA
19946
19947
19948
19949
19950
6ec2e0f5 19951$as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
c971b7fa
PA
19952
19953
19954
19955
19956
c971b7fa 19957
c971b7fa 19958
63ce7108 19959
6ec2e0f5
SDJ
19960 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
19961 yes+*yes)
19962 ;;
19963 yes+*)
19964 # Solaris 9 has *at functions, but uniformly mishandles trailing
19965 # slash in all of them.
19966 REPLACE_OPENAT=1
19967 ;;
19968 *)
19969 HAVE_OPENAT=0
19970 ;;
19971 esac
63ce7108 19972
6ec2e0f5 19973 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
63ce7108 19974
63ce7108 19975
63ce7108 19976
63ce7108 19977
63ce7108
TT
19978
19979
63ce7108 19980
63ce7108 19981
6ec2e0f5 19982 gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
63ce7108
TT
19983
19984
19985
6ec2e0f5 19986 :
63ce7108 19987
6ec2e0f5 19988 fi
63ce7108
TT
19989
19990
6ec2e0f5
SDJ
19991cat >>confdefs.h <<_ACEOF
19992#define GNULIB_OPENAT 1
19993_ACEOF
63ce7108 19994
63ce7108 19995
63ce7108
TT
19996
19997
19998
19999
6ec2e0f5 20000 GNULIB_OPENAT=1
63ce7108 20001
63ce7108 20002
63ce7108 20003
63ce7108 20004
63ce7108 20005
6ec2e0f5 20006$as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
63ce7108
TT
20007
20008
63ce7108 20009
63ce7108 20010
63ce7108 20011
63ce7108 20012
6ec2e0f5
SDJ
20013 for ac_func in opendir
20014do :
20015 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
20016if test "x$ac_cv_func_opendir" = x""yes; then :
20017 cat >>confdefs.h <<_ACEOF
20018#define HAVE_OPENDIR 1
63ce7108 20019_ACEOF
6ec2e0f5 20020
63ce7108 20021fi
6ec2e0f5 20022done
63ce7108 20023
6ec2e0f5
SDJ
20024 if test $ac_cv_func_opendir = no; then
20025 HAVE_OPENDIR=0
20026 fi
63ce7108 20027
6ec2e0f5
SDJ
20028
20029
20030
20031 if test $ac_cv_func_fchdir = no; then
20032 HAVE_FCHDIR=0
63ce7108 20033 fi
63ce7108 20034
6ec2e0f5
SDJ
20035 if test $HAVE_FCHDIR = 0; then
20036 if test $HAVE_OPENDIR = 1; then
20037 REPLACE_OPENDIR=1
20038 fi
20039 fi
20040
20041 case $host_os,$HAVE_OPENDIR in
20042 os2*,1)
20043 REPLACE_OPENDIR=1;;
20044 esac
20045
20046 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
63ce7108
TT
20047
20048
20049
20050
20051
20052
20053
20054
6ec2e0f5 20055 gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
63ce7108
TT
20056
20057 fi
20058
20059
20060
20061
20062
6ec2e0f5 20063 GNULIB_OPENDIR=1
63ce7108
TT
20064
20065
20066
20067
63ce7108 20068
6ec2e0f5 20069$as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
63ce7108
TT
20070
20071
20072
20073
20074
20075
20076
2196f55f
YQ
20077
20078
8424cc97
SM
20079
20080 for ac_func in rawmemchr
20081do :
20082 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
20083if test "x$ac_cv_func_rawmemchr" = x""yes; then :
20084 cat >>confdefs.h <<_ACEOF
20085#define HAVE_RAWMEMCHR 1
20086_ACEOF
20087
20088fi
20089done
20090
20091 if test $ac_cv_func_rawmemchr = no; then
20092 HAVE_RAWMEMCHR=0
20093 fi
20094
20095 if test $HAVE_RAWMEMCHR = 0; then
20096
20097
20098
20099
20100
20101
20102
20103
20104 gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
20105
20106 :
20107 fi
20108
20109
20110
20111
20112
20113 GNULIB_RAWMEMCHR=1
20114
20115
20116
20117
20118
20119$as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
20120
20121
20122
20123
20124
20125
6ec2e0f5
SDJ
20126 for ac_func in readdir
20127do :
20128 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
20129if test "x$ac_cv_func_readdir" = x""yes; then :
20130 cat >>confdefs.h <<_ACEOF
20131#define HAVE_READDIR 1
20132_ACEOF
20133
20134fi
20135done
20136
20137 if test $ac_cv_func_readdir = no; then
20138 HAVE_READDIR=0
20139 fi
20140
20141 if test $HAVE_READDIR = 0; then
20142
20143
20144
20145
20146
20147
20148
20149
20150 gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
20151
20152 fi
20153
20154
20155
20156
20157
20158 GNULIB_READDIR=1
20159
20160
20161
20162
20163
20164$as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
20165
20166
20167
20168
20169
20170
2196f55f
YQ
20171 if test $ac_cv_func_readlink = no; then
20172 HAVE_READLINK=0
20173 else
20174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
20175$as_echo_n "checking whether readlink signature is correct... " >&6; }
20176if test "${gl_cv_decl_readlink_works+set}" = set; then :
20177 $as_echo_n "(cached) " >&6
20178else
20179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20180/* end confdefs.h. */
20181#include <unistd.h>
20182 /* Cause compilation failure if original declaration has wrong type. */
20183 ssize_t readlink (const char *, char *, size_t);
20184int
20185main ()
20186{
20187
20188 ;
20189 return 0;
20190}
20191_ACEOF
20192if ac_fn_c_try_compile "$LINENO"; then :
20193 gl_cv_decl_readlink_works=yes
20194else
20195 gl_cv_decl_readlink_works=no
20196fi
20197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20198fi
20199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
20200$as_echo "$gl_cv_decl_readlink_works" >&6; }
20201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
20202$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
20203if test "${gl_cv_func_readlink_works+set}" = set; then :
20204 $as_echo_n "(cached) " >&6
20205else
20206 # We have readlink, so assume ln -s works.
20207 ln -s conftest.no-such conftest.link
20208 ln -s conftest.link conftest.lnk2
20209 if test "$cross_compiling" = yes; then :
20210 case "$host_os" in
20211 # Guess yes on glibc systems.
20212 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
20213 # If we don't know, assume the worst.
20214 *) gl_cv_func_readlink_works="guessing no" ;;
20215 esac
20216
20217else
20218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20219/* end confdefs.h. */
20220#include <unistd.h>
20221
20222int
20223main ()
20224{
20225char buf[20];
20226 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
20227 ;
20228 return 0;
20229}
20230_ACEOF
20231if ac_fn_c_try_run "$LINENO"; then :
20232 gl_cv_func_readlink_works=yes
20233else
20234 gl_cv_func_readlink_works=no
20235fi
20236rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20237 conftest.$ac_objext conftest.beam conftest.$ac_ext
20238fi
20239
20240 rm -f conftest.link conftest.lnk2
20241fi
20242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
20243$as_echo "$gl_cv_func_readlink_works" >&6; }
20244 case "$gl_cv_func_readlink_works" in
20245 *yes)
20246 if test "$gl_cv_decl_readlink_works" != yes; then
20247 REPLACE_READLINK=1
20248 fi
20249 ;;
20250 *)
20251
20252$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
20253
20254 REPLACE_READLINK=1
20255 ;;
20256 esac
20257 fi
20258
20259 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
20260
20261
20262
20263
20264
20265
20266
20267
20268 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
20269
20270
20271 :
20272
20273 fi
20274
20275
20276
20277
20278
20279 GNULIB_READLINK=1
20280
20281
20282
20283
20284
20285$as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
20286
20287
20288
20289
6a29c58e
YQ
20290
20291
6ec2e0f5
SDJ
20292 if test $gl_cv_func_malloc_posix = yes; then
20293
20294$as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
20295
20296 else
20297 REPLACE_REALLOC=1
20298 fi
20299
20300 if test $REPLACE_REALLOC = 1; then
20301
20302
20303
20304
20305
20306
20307
20308
20309 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
20310
20311 fi
20312
20313
20314
20315
20316
20317 GNULIB_REALLOC_POSIX=1
20318
20319
20320
20321
20322
20323$as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
20324
20325
20326
20327
20328
20329
6a29c58e
YQ
20330
20331
20332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
20333$as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
20334if test "${gl_cv_func_rename_slash_dst_works+set}" = set; then :
20335 $as_echo_n "(cached) " >&6
20336else
20337 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
20338 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
20339 as_fn_error "cannot create temporary files" "$LINENO" 5
20340 # Assume that if we have lstat, we can also check symlinks.
20341 if test $ac_cv_func_lstat = yes; then
20342 ln -s conftest.f conftest.lnk
20343 fi
20344 if test "$cross_compiling" = yes; then :
20345 case "$host_os" in
20346 # Guess yes on glibc systems.
20347 *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
20348 # If we don't know, assume the worst.
20349 *) gl_cv_func_rename_slash_dst_works="guessing no" ;;
20350 esac
20351
20352else
20353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20354/* end confdefs.h. */
20355
20356# include <stdio.h>
20357# include <stdlib.h>
20358
20359int
20360main ()
20361{
20362int result = 0;
20363 if (rename ("conftest.f1", "conftest.f2/") == 0)
20364 result |= 1;
20365 if (rename ("conftest.d1", "conftest.d2/") != 0)
20366 result |= 2;
20367#if HAVE_LSTAT
20368 if (rename ("conftest.f", "conftest.lnk/") == 0)
20369 result |= 4;
20370#endif
20371 return result;
20372
20373 ;
20374 return 0;
20375}
20376_ACEOF
20377if ac_fn_c_try_run "$LINENO"; then :
20378 gl_cv_func_rename_slash_dst_works=yes
20379else
20380 gl_cv_func_rename_slash_dst_works=no
20381fi
20382rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20383 conftest.$ac_objext conftest.beam conftest.$ac_ext
20384fi
20385
20386 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
20387
20388fi
20389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
20390$as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
20391 case "$gl_cv_func_rename_slash_dst_works" in
20392 *yes) ;;
20393 *)
20394 REPLACE_RENAME=1
20395
20396$as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
20397
20398 ;;
20399 esac
20400
20401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
20402$as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
20403if test "${gl_cv_func_rename_slash_src_works+set}" = set; then :
20404 $as_echo_n "(cached) " >&6
20405else
20406 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
20407 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
20408 as_fn_error "cannot create temporary files" "$LINENO" 5
20409 # Assume that if we have lstat, we can also check symlinks.
20410 if test $ac_cv_func_lstat = yes; then
20411 ln -s conftest.f conftest.lnk
20412 fi
20413 if test "$cross_compiling" = yes; then :
20414 case "$host_os" in
20415 # Guess yes on glibc systems.
20416 *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
20417 # If we don't know, assume the worst.
20418 *) gl_cv_func_rename_slash_src_works="guessing no" ;;
20419 esac
20420
20421else
20422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20423/* end confdefs.h. */
20424
20425# include <stdio.h>
20426# include <stdlib.h>
20427
20428int
20429main ()
20430{
20431int result = 0;
20432 if (rename ("conftest.f1/", "conftest.d3") == 0)
20433 result |= 1;
20434 if (rename ("conftest.d1/", "conftest.d2") != 0)
20435 result |= 2;
20436#if HAVE_LSTAT
20437 if (rename ("conftest.lnk/", "conftest.f") == 0)
20438 result |= 4;
20439#endif
20440 return result;
20441
20442 ;
20443 return 0;
20444}
20445_ACEOF
20446if ac_fn_c_try_run "$LINENO"; then :
20447 gl_cv_func_rename_slash_src_works=yes
20448else
20449 gl_cv_func_rename_slash_src_works=no
20450fi
20451rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20452 conftest.$ac_objext conftest.beam conftest.$ac_ext
20453fi
20454
20455 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
20456
20457fi
20458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
20459$as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
20460 case "$gl_cv_func_rename_slash_src_works" in
20461 *yes) ;;
20462 *)
20463 REPLACE_RENAME=1
20464
20465$as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
20466
20467 ;;
20468 esac
20469
20470
20471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
20472$as_echo_n "checking whether rename manages hard links correctly... " >&6; }
20473if test "${gl_cv_func_rename_link_works+set}" = set; then :
20474 $as_echo_n "(cached) " >&6
20475else
20476 if test $ac_cv_func_link = yes; then
20477 rm -rf conftest.f conftest.f1
20478 if touch conftest.f && ln conftest.f conftest.f1 &&
20479 set x `ls -i conftest.f conftest.f1` && test "" = ""; then
20480 if test "$cross_compiling" = yes; then :
20481 case "$host_os" in
20482 # Guess yes on glibc systems.
20483 *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
20484 # If we don't know, assume the worst.
20485 *) gl_cv_func_rename_link_works="guessing no" ;;
20486 esac
20487
20488else
20489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20490/* end confdefs.h. */
20491
20492# include <stdio.h>
20493# include <stdlib.h>
20494# include <unistd.h>
20495
20496int
20497main ()
20498{
20499int result = 0;
20500 if (rename ("conftest.f", "conftest.f1"))
20501 result |= 1;
20502 if (unlink ("conftest.f1"))
20503 result |= 2;
20504 if (rename ("conftest.f", "conftest.f"))
20505 result |= 4;
20506 if (rename ("conftest.f1", "conftest.f1") == 0)
20507 result |= 8;
20508 return result;
20509
20510 ;
20511 return 0;
20512}
20513_ACEOF
20514if ac_fn_c_try_run "$LINENO"; then :
20515 gl_cv_func_rename_link_works=yes
20516else
20517 gl_cv_func_rename_link_works=no
20518fi
20519rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20520 conftest.$ac_objext conftest.beam conftest.$ac_ext
20521fi
20522
20523 else
20524 gl_cv_func_rename_link_works="guessing no"
20525 fi
20526 rm -rf conftest.f conftest.f1
20527 else
20528 gl_cv_func_rename_link_works=yes
20529 fi
20530
20531fi
20532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
20533$as_echo "$gl_cv_func_rename_link_works" >&6; }
20534 case "$gl_cv_func_rename_link_works" in
20535 *yes) ;;
20536 *)
20537 REPLACE_RENAME=1
20538
20539$as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
20540
20541 ;;
20542 esac
20543
20544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
20545$as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
20546if test "${gl_cv_func_rename_dest_works+set}" = set; then :
20547 $as_echo_n "(cached) " >&6
20548else
20549 rm -rf conftest.f conftest.d1 conftest.d2
20550 touch conftest.f && mkdir conftest.d1 conftest.d2 ||
20551 as_fn_error "cannot create temporary files" "$LINENO" 5
20552 if test "$cross_compiling" = yes; then :
20553 case "$host_os" in
20554 # Guess yes on glibc systems.
20555 *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
20556 # If we don't know, assume the worst.
20557 *) gl_cv_func_rename_dest_works="guessing no" ;;
20558 esac
20559
20560else
20561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20562/* end confdefs.h. */
20563
20564# include <stdio.h>
20565# include <stdlib.h>
20566
20567int
20568main ()
20569{
20570int result = 0;
20571 if (rename ("conftest.d1", "conftest.d2") != 0)
20572 result |= 1;
20573 if (rename ("conftest.d2", "conftest.f") == 0)
20574 result |= 2;
20575 return result;
20576
20577 ;
20578 return 0;
20579}
20580_ACEOF
20581if ac_fn_c_try_run "$LINENO"; then :
20582 gl_cv_func_rename_dest_works=yes
20583else
20584 gl_cv_func_rename_dest_works=no
20585fi
20586rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20587 conftest.$ac_objext conftest.beam conftest.$ac_ext
20588fi
20589
20590 rm -rf conftest.f conftest.d1 conftest.d2
20591
20592fi
20593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
20594$as_echo "$gl_cv_func_rename_dest_works" >&6; }
20595 case "$gl_cv_func_rename_dest_works" in
20596 *yes) ;;
20597 *)
20598 REPLACE_RENAME=1
20599
20600$as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
20601
20602 ;;
20603 esac
20604
20605 if test $REPLACE_RENAME = 1; then
20606
20607
20608
20609
20610
20611
20612
20613
20614 gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
20615
20616 fi
20617
20618
20619
20620
20621
20622 GNULIB_RENAME=1
20623
20624
20625
20626
20627
20628$as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
20629
20630
20631
20632
20633
20634
6ec2e0f5
SDJ
20635 for ac_func in rewinddir
20636do :
20637 ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
20638if test "x$ac_cv_func_rewinddir" = x""yes; then :
20639 cat >>confdefs.h <<_ACEOF
20640#define HAVE_REWINDDIR 1
20641_ACEOF
20642
20643fi
20644done
20645
20646 if test $ac_cv_func_rewinddir = no; then
20647 HAVE_REWINDDIR=0
20648 fi
20649
20650 if test $HAVE_REWINDDIR = 0; then
20651
20652
20653
20654
20655
20656
20657
20658
20659 gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
20660
20661 fi
20662
20663
20664
20665
20666
20667 GNULIB_REWINDDIR=1
20668
20669
20670
20671
20672
20673$as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
20674
20675
20676
20677
20678
20679
6a29c58e
YQ
20680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
20681$as_echo_n "checking whether rmdir works... " >&6; }
20682if test "${gl_cv_func_rmdir_works+set}" = set; then :
20683 $as_echo_n "(cached) " >&6
20684else
20685 mkdir conftest.dir
20686 touch conftest.file
20687 if test "$cross_compiling" = yes; then :
20688 case "$host_os" in
20689 # Guess yes on glibc systems.
20690 *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
20691 # If we don't know, assume the worst.
20692 *) gl_cv_func_rmdir_works="guessing no" ;;
20693 esac
20694
20695else
20696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20697/* end confdefs.h. */
20698#include <stdio.h>
20699 #include <errno.h>
20700 #if HAVE_UNISTD_H
20701 # include <unistd.h>
20702 #else /* on Windows with MSVC */
20703 # include <direct.h>
20704 #endif
20705
20706int
20707main ()
20708{
20709int result = 0;
20710 if (!rmdir ("conftest.file/"))
20711 result |= 1;
20712 else if (errno != ENOTDIR)
20713 result |= 2;
20714 if (!rmdir ("conftest.dir/./"))
20715 result |= 4;
20716 return result;
20717
20718 ;
20719 return 0;
20720}
20721_ACEOF
20722if ac_fn_c_try_run "$LINENO"; then :
20723 gl_cv_func_rmdir_works=yes
20724else
20725 gl_cv_func_rmdir_works=no
20726fi
20727rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20728 conftest.$ac_objext conftest.beam conftest.$ac_ext
20729fi
20730
20731 rm -rf conftest.dir conftest.file
20732fi
20733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
20734$as_echo "$gl_cv_func_rmdir_works" >&6; }
20735 case "$gl_cv_func_rmdir_works" in
20736 *yes) ;;
20737 *)
20738 REPLACE_RMDIR=1
20739 ;;
20740 esac
20741
20742 if test $REPLACE_RMDIR = 1; then
20743
20744
20745
20746
20747
20748
20749
20750
20751 gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
20752
20753 fi
20754
20755
20756
20757
20758
20759 GNULIB_RMDIR=1
20760
20761
20762
20763
20764
20765$as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
20766
20767
20768
20769
0750520d 20770
6ec2e0f5
SDJ
20771
20772
20773
2d8adcbd
MM
20774
20775
20776
20777 if test $ac_cv_func_secure_getenv = no; then
20778 HAVE_SECURE_GETENV=0
20779 fi
20780
20781 if test $HAVE_SECURE_GETENV = 0; then
20782
20783
20784
20785
20786
20787
20788
20789
20790 gl_LIBOBJS="$gl_LIBOBJS secure_getenv.$ac_objext"
20791
20792
20793 for ac_func in __secure_getenv
20794do :
20795 ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
20796if test "x$ac_cv_func___secure_getenv" = x""yes; then :
20797 cat >>confdefs.h <<_ACEOF
20798#define HAVE___SECURE_GETENV 1
20799_ACEOF
20800
20801fi
20802done
20803
20804 if test $ac_cv_func___secure_getenv = no; then
20805 for ac_func in issetugid
20806do :
20807 ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
20808if test "x$ac_cv_func_issetugid" = x""yes; then :
20809 cat >>confdefs.h <<_ACEOF
20810#define HAVE_ISSETUGID 1
20811_ACEOF
20812
20813fi
20814done
20815
20816 fi
20817
20818
20819 fi
20820
20821
20822
20823
20824
20825 GNULIB_SECURE_GETENV=1
20826
20827
20828
20829
20830
20831$as_echo "#define GNULIB_TEST_SECURE_GETENV 1" >>confdefs.h
20832
20833
20834
20835
20836
3d99e817
AK
20837 if test $ac_cv_func_setenv = no; then
20838 HAVE_SETENV=0
20839 else
20840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
20841$as_echo_n "checking whether setenv validates arguments... " >&6; }
20842if test "${gl_cv_func_setenv_works+set}" = set; then :
20843 $as_echo_n "(cached) " >&6
20844else
20845 if test "$cross_compiling" = yes; then :
20846 case "$host_os" in
20847 # Guess yes on glibc systems.
20848 *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
20849 # If we don't know, assume the worst.
20850 *) gl_cv_func_setenv_works="guessing no" ;;
20851 esac
20852
20853else
20854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20855/* end confdefs.h. */
20856
20857 #include <stdlib.h>
20858 #include <errno.h>
20859 #include <string.h>
20860
20861int
20862main ()
20863{
20864
20865 int result = 0;
20866 {
20867 if (setenv ("", "", 0) != -1)
20868 result |= 1;
20869 else if (errno != EINVAL)
20870 result |= 2;
20871 }
20872 {
20873 if (setenv ("a", "=", 1) != 0)
20874 result |= 4;
20875 else if (strcmp (getenv ("a"), "=") != 0)
20876 result |= 8;
20877 }
20878 return result;
20879
20880 ;
20881 return 0;
20882}
20883_ACEOF
20884if ac_fn_c_try_run "$LINENO"; then :
20885 gl_cv_func_setenv_works=yes
20886else
20887 gl_cv_func_setenv_works=no
20888fi
20889rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20890 conftest.$ac_objext conftest.beam conftest.$ac_ext
20891fi
20892
20893fi
20894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
20895$as_echo "$gl_cv_func_setenv_works" >&6; }
20896 case "$gl_cv_func_setenv_works" in
20897 *yes) ;;
20898 *)
20899 REPLACE_SETENV=1
20900 ;;
20901 esac
20902 fi
20903
20904 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
20905
20906
20907
20908
20909
20910
20911
20912
20913 gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
20914
20915 fi
20916
20917
20918
20919
20920
20921 GNULIB_SETENV=1
20922
20923
20924
20925
20926
20927$as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
20928
20929
20930
20931
20932
0750520d
PA
20933
20934
20935
20936
20937
20938
20939
20940
20941
20942 if test $gl_cv_have_include_next = yes; then
20943 gl_cv_next_signal_h='<'signal.h'>'
20944 else
20945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
20946$as_echo_n "checking absolute name of <signal.h>... " >&6; }
20947if test "${gl_cv_next_signal_h+set}" = set; then :
20948 $as_echo_n "(cached) " >&6
20949else
20950
20951
20952
20953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20954/* end confdefs.h. */
20955#include <signal.h>
20956_ACEOF
20957 case "$host_os" in
20958 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20959 *) gl_absname_cpp="$ac_cpp" ;;
20960 esac
20961
20962 case "$host_os" in
20963 mingw*)
20964 gl_dirsep_regex='[/\\]'
20965 ;;
20966 *)
20967 gl_dirsep_regex='\/'
20968 ;;
20969 esac
20970 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20971 gl_header_literal_regex=`echo 'signal.h' \
20972 | sed -e "$gl_make_literal_regex_sed"`
20973 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20974 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20975 s|^/[^/]|//&|
20976 p
20977 q
20978 }'
20979
20980 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20981 sed -n "$gl_absolute_header_sed"`
20982
20983 gl_header=$gl_cv_absolute_signal_h
20984 gl_cv_next_signal_h='"'$gl_header'"'
20985
20986
20987fi
20988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
20989$as_echo "$gl_cv_next_signal_h" >&6; }
20990 fi
20991 NEXT_SIGNAL_H=$gl_cv_next_signal_h
20992
20993 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20994 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20995 gl_next_as_first_directive='<'signal.h'>'
20996 else
20997 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20998 gl_next_as_first_directive=$gl_cv_next_signal_h
20999 fi
21000 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
21001
21002
21003
21004
21005
21006# AIX declares sig_atomic_t to already include volatile, and C89 compilers
21007# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
21008 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
21009#include <signal.h>
21010
21011"
21012if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
21013
21014else
21015 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
21016fi
21017
21018
21019
21020
21021
21022
21023
21024 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
21025#include <signal.h>
21026
21027"
21028if test "x$ac_cv_type_sighandler_t" = x""yes; then :
21029
21030else
21031 HAVE_SIGHANDLER_T=0
21032fi
21033
21034
21035
21036 for gl_func in pthread_sigmask sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask; do
21037 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
21038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
21039$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
21040if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
21041 $as_echo_n "(cached) " >&6
21042else
21043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21044/* end confdefs.h. */
21045#include <signal.h>
21046
21047int
21048main ()
21049{
21050#undef $gl_func
21051 (void) $gl_func;
21052 ;
21053 return 0;
21054}
21055_ACEOF
21056if ac_fn_c_try_compile "$LINENO"; then :
21057 eval "$as_gl_Symbol=yes"
21058else
21059 eval "$as_gl_Symbol=no"
21060fi
21061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21062fi
21063eval ac_res=\$$as_gl_Symbol
21064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21065$as_echo "$ac_res" >&6; }
21066 eval as_val=\$$as_gl_Symbol
21067 if test "x$as_val" = x""yes; then :
21068 cat >>confdefs.h <<_ACEOF
21069#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
21070_ACEOF
21071
21072 eval ac_cv_have_decl_$gl_func=yes
21073fi
21074 done
21075
21076
21077
63ce7108
TT
21078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
21079$as_echo_n "checking for ssize_t... " >&6; }
21080if test "${gt_cv_ssize_t+set}" = set; then :
21081 $as_echo_n "(cached) " >&6
21082else
21083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21084/* end confdefs.h. */
21085#include <sys/types.h>
21086int
21087main ()
21088{
21089int x = sizeof (ssize_t *) + sizeof (ssize_t);
21090 return !x;
21091 ;
21092 return 0;
21093}
21094_ACEOF
21095if ac_fn_c_try_compile "$LINENO"; then :
21096 gt_cv_ssize_t=yes
21097else
21098 gt_cv_ssize_t=no
21099fi
21100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21101fi
21102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
21103$as_echo "$gt_cv_ssize_t" >&6; }
21104 if test $gt_cv_ssize_t = no; then
21105
21106$as_echo "#define ssize_t int" >>confdefs.h
21107
21108 fi
21109
21110
21111
21112
2196f55f
YQ
21113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
21114$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
21115if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
21116 $as_echo_n "(cached) " >&6
21117else
21118 if test "$cross_compiling" = yes; then :
21119 case $host_os in
21120 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
21121 *) gl_cv_func_stat_dir_slash="guessing yes";;
21122 esac
21123else
21124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21125/* end confdefs.h. */
21126#include <sys/stat.h>
21127
21128int
21129main ()
21130{
21131struct stat st; return stat (".", &st) != stat ("./", &st);
21132 ;
21133 return 0;
21134}
21135_ACEOF
21136if ac_fn_c_try_run "$LINENO"; then :
21137 gl_cv_func_stat_dir_slash=yes
21138else
21139 gl_cv_func_stat_dir_slash=no
21140fi
21141rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21142 conftest.$ac_objext conftest.beam conftest.$ac_ext
21143fi
21144
21145fi
21146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
21147$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
21148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
21149$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
21150if test "${gl_cv_func_stat_file_slash+set}" = set; then :
21151 $as_echo_n "(cached) " >&6
21152else
21153 touch conftest.tmp
21154 # Assume that if we have lstat, we can also check symlinks.
21155 if test $ac_cv_func_lstat = yes; then
21156 ln -s conftest.tmp conftest.lnk
21157 fi
21158 if test "$cross_compiling" = yes; then :
21159 case "$host_os" in
21160 # Guess yes on glibc systems.
21161 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
21162 # If we don't know, assume the worst.
21163 *) gl_cv_func_stat_file_slash="guessing no" ;;
21164 esac
21165
21166else
21167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21168/* end confdefs.h. */
21169#include <sys/stat.h>
21170
21171int
21172main ()
21173{
21174int result = 0;
21175 struct stat st;
21176 if (!stat ("conftest.tmp/", &st))
21177 result |= 1;
21178#if HAVE_LSTAT
21179 if (!stat ("conftest.lnk/", &st))
21180 result |= 2;
21181#endif
21182 return result;
21183
21184 ;
21185 return 0;
21186}
21187_ACEOF
21188if ac_fn_c_try_run "$LINENO"; then :
21189 gl_cv_func_stat_file_slash=yes
21190else
21191 gl_cv_func_stat_file_slash=no
21192fi
21193rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21194 conftest.$ac_objext conftest.beam conftest.$ac_ext
21195fi
21196
21197 rm -f conftest.tmp conftest.lnk
21198fi
21199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
21200$as_echo "$gl_cv_func_stat_file_slash" >&6; }
21201 case $gl_cv_func_stat_dir_slash in
21202 *no) REPLACE_STAT=1
21203
21204$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
21205;;
21206 esac
21207 case $gl_cv_func_stat_file_slash in
21208 *no) REPLACE_STAT=1
21209
21210$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
21211;;
21212 esac
21213
21214 if test $REPLACE_STAT = 1; then
21215
21216
21217
21218
21219
21220
21221
21222
21223 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
21224
21225 :
21226 fi
21227
21228
21229
21230
21231
21232 GNULIB_STAT=1
21233
21234
21235
21236
21237
21238$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
21239
21240
21241
21242
21243
21244
63ce7108
TT
21245 # Define two additional variables used in the Makefile substitution.
21246
21247 if test "$ac_cv_header_stdbool_h" = yes; then
21248 STDBOOL_H=''
21249 else
21250 STDBOOL_H='stdbool.h'
21251 fi
21252
21253 if test -n "$STDBOOL_H"; then
21254 GL_GENERATE_STDBOOL_H_TRUE=
21255 GL_GENERATE_STDBOOL_H_FALSE='#'
21256else
21257 GL_GENERATE_STDBOOL_H_TRUE='#'
21258 GL_GENERATE_STDBOOL_H_FALSE=
21259fi
21260
21261
21262 if test "$ac_cv_type__Bool" = yes; then
21263 HAVE__BOOL=1
21264 else
21265 HAVE__BOOL=0
21266 fi
21267
21268
21269
21270
21271
21272 STDDEF_H=
4a626d0a
PA
21273 ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
21274
21275"
21276if test "x$ac_cv_type_max_align_t" = x""yes; then :
21277
21278else
21279 HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
21280fi
21281
63ce7108
TT
21282 if test $gt_cv_c_wchar_t = no; then
21283 HAVE_WCHAR_T=0
21284 STDDEF_H=stddef.h
21285 fi
21286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
21287$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
21288if test "${gl_cv_decl_null_works+set}" = set; then :
21289 $as_echo_n "(cached) " >&6
21290else
21291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21292/* end confdefs.h. */
21293#include <stddef.h>
21294 int test[2 * (sizeof NULL == sizeof (void *)) -1];
21295
21296int
21297main ()
21298{
21299
21300 ;
21301 return 0;
21302}
21303_ACEOF
21304if ac_fn_c_try_compile "$LINENO"; then :
21305 gl_cv_decl_null_works=yes
21306else
21307 gl_cv_decl_null_works=no
21308fi
21309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21310fi
21311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
21312$as_echo "$gl_cv_decl_null_works" >&6; }
21313 if test $gl_cv_decl_null_works = no; then
21314 REPLACE_NULL=1
21315 STDDEF_H=stddef.h
21316 fi
21317
21318 if test -n "$STDDEF_H"; then
21319 GL_GENERATE_STDDEF_H_TRUE=
21320 GL_GENERATE_STDDEF_H_FALSE='#'
21321else
21322 GL_GENERATE_STDDEF_H_TRUE='#'
21323 GL_GENERATE_STDDEF_H_FALSE=
21324fi
21325
21326 if test -n "$STDDEF_H"; then
21327
21328
21329
21330
21331
21332
21333
21334
21335 if test $gl_cv_have_include_next = yes; then
21336 gl_cv_next_stddef_h='<'stddef.h'>'
21337 else
21338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
21339$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
21340if test "${gl_cv_next_stddef_h+set}" = set; then :
21341 $as_echo_n "(cached) " >&6
21342else
21343
4a626d0a
PA
21344
21345
21346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63ce7108
TT
21347/* end confdefs.h. */
21348#include <stddef.h>
63ce7108 21349_ACEOF
4a626d0a
PA
21350 case "$host_os" in
21351 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21352 *) gl_absname_cpp="$ac_cpp" ;;
21353 esac
63ce7108 21354
4a626d0a
PA
21355 case "$host_os" in
21356 mingw*)
21357 gl_dirsep_regex='[/\\]'
21358 ;;
21359 *)
21360 gl_dirsep_regex='\/'
21361 ;;
21362 esac
21363 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21364 gl_header_literal_regex=`echo 'stddef.h' \
21365 | sed -e "$gl_make_literal_regex_sed"`
21366 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21367 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21368 s|^/[^/]|//&|
21369 p
21370 q
21371 }'
63ce7108 21372
4a626d0a
PA
21373 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21374 sed -n "$gl_absolute_header_sed"`
21375
21376 gl_header=$gl_cv_absolute_stddef_h
21377 gl_cv_next_stddef_h='"'$gl_header'"'
63ce7108
TT
21378
21379
21380fi
21381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
21382$as_echo "$gl_cv_next_stddef_h" >&6; }
21383 fi
21384 NEXT_STDDEF_H=$gl_cv_next_stddef_h
21385
21386 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21387 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21388 gl_next_as_first_directive='<'stddef.h'>'
21389 else
21390 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21391 gl_next_as_first_directive=$gl_cv_next_stddef_h
21392 fi
21393 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
21394
21395
21396
21397
21398 fi
21399
21400
21401
21402
49e4877c 21403 $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
63ce7108
TT
21404
21405
21406
98399780
YQ
21407
21408
21409
21410
21411
4a626d0a
PA
21412
21413
6a29c58e
YQ
21414 if test $gl_cv_have_include_next = yes; then
21415 gl_cv_next_stdio_h='<'stdio.h'>'
21416 else
21417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
21418$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
21419if test "${gl_cv_next_stdio_h+set}" = set; then :
21420 $as_echo_n "(cached) " >&6
21421else
21422
4a626d0a
PA
21423
21424
21425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6a29c58e
YQ
21426/* end confdefs.h. */
21427#include <stdio.h>
6a29c58e 21428_ACEOF
4a626d0a
PA
21429 case "$host_os" in
21430 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21431 *) gl_absname_cpp="$ac_cpp" ;;
21432 esac
21433
21434 case "$host_os" in
21435 mingw*)
21436 gl_dirsep_regex='[/\\]'
21437 ;;
21438 *)
21439 gl_dirsep_regex='\/'
21440 ;;
21441 esac
21442 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21443 gl_header_literal_regex=`echo 'stdio.h' \
21444 | sed -e "$gl_make_literal_regex_sed"`
21445 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21446 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21447 s|^/[^/]|//&|
21448 p
21449 q
21450 }'
6a29c58e 21451
4a626d0a
PA
21452 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21453 sed -n "$gl_absolute_header_sed"`
6a29c58e 21454
4a626d0a
PA
21455 gl_header=$gl_cv_absolute_stdio_h
21456 gl_cv_next_stdio_h='"'$gl_header'"'
6a29c58e
YQ
21457
21458
21459fi
21460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
21461$as_echo "$gl_cv_next_stdio_h" >&6; }
21462 fi
21463 NEXT_STDIO_H=$gl_cv_next_stdio_h
21464
21465 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21466 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21467 gl_next_as_first_directive='<'stdio.h'>'
21468 else
21469 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21470 gl_next_as_first_directive=$gl_cv_next_stdio_h
21471 fi
21472 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
21473
21474
21475
21476
21477
4a626d0a
PA
21478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
21479$as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
21480if test "${gl_cv_func_printf_attribute_flavor+set}" = set; then :
21481 $as_echo_n "(cached) " >&6
21482else
21483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21484/* end confdefs.h. */
21485
21486 #define __STDC_FORMAT_MACROS 1
21487 #include <stdio.h>
21488 #include <inttypes.h>
21489 /* For non-mingw systems, compilation will trivially succeed.
21490 For mingw, compilation will succeed for older mingw (system
21491 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
21492 #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
21493 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
21494 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
21495 #endif
21496
21497int
21498main ()
21499{
21500
21501 ;
21502 return 0;
21503}
21504_ACEOF
21505if ac_fn_c_try_compile "$LINENO"; then :
21506 gl_cv_func_printf_attribute_flavor=system
21507else
21508 gl_cv_func_printf_attribute_flavor=gnu
21509fi
21510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21511fi
21512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
21513$as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
21514 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
21515
21516$as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
21517
21518 fi
21519
6a29c58e
YQ
21520 GNULIB_FSCANF=1
21521
21522
21523cat >>confdefs.h <<_ACEOF
21524#define GNULIB_FSCANF 1
21525_ACEOF
21526
21527
21528 GNULIB_SCANF=1
21529
21530
21531cat >>confdefs.h <<_ACEOF
21532#define GNULIB_SCANF 1
21533_ACEOF
21534
21535
21536 GNULIB_FGETC=1
21537 GNULIB_GETC=1
21538 GNULIB_GETCHAR=1
21539 GNULIB_FGETS=1
21540 GNULIB_FREAD=1
21541
21542
21543 GNULIB_FPRINTF=1
21544 GNULIB_PRINTF=1
21545 GNULIB_VFPRINTF=1
21546 GNULIB_VPRINTF=1
21547 GNULIB_FPUTC=1
21548 GNULIB_PUTC=1
21549 GNULIB_PUTCHAR=1
21550 GNULIB_FPUTS=1
21551 GNULIB_PUTS=1
21552 GNULIB_FWRITE=1
21553
21554
21555
21556
21557 for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen renameat snprintf tmpfile vdprintf vsnprintf; do
21558 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
21559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
21560$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
21561if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
21562 $as_echo_n "(cached) " >&6
21563else
21564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21565/* end confdefs.h. */
21566#include <stdio.h>
21567
21568int
21569main ()
21570{
21571#undef $gl_func
21572 (void) $gl_func;
21573 ;
21574 return 0;
21575}
21576_ACEOF
21577if ac_fn_c_try_compile "$LINENO"; then :
21578 eval "$as_gl_Symbol=yes"
21579else
21580 eval "$as_gl_Symbol=no"
21581fi
21582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21583fi
21584eval ac_res=\$$as_gl_Symbol
21585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21586$as_echo "$ac_res" >&6; }
21587 eval as_val=\$$as_gl_Symbol
21588 if test "x$as_val" = x""yes; then :
21589 cat >>confdefs.h <<_ACEOF
21590#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
21591_ACEOF
21592
21593 eval ac_cv_have_decl_$gl_func=yes
21594fi
21595 done
21596
21597
21598
21599
21600
21601
21602
21603
21604
21605
21606
21607
98399780
YQ
21608 if test $gl_cv_have_include_next = yes; then
21609 gl_cv_next_stdlib_h='<'stdlib.h'>'
21610 else
21611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
21612$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
21613if test "${gl_cv_next_stdlib_h+set}" = set; then :
21614 $as_echo_n "(cached) " >&6
21615else
21616
4a626d0a
PA
21617
21618
21619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
98399780
YQ
21620/* end confdefs.h. */
21621#include <stdlib.h>
98399780 21622_ACEOF
4a626d0a
PA
21623 case "$host_os" in
21624 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21625 *) gl_absname_cpp="$ac_cpp" ;;
21626 esac
21627
21628 case "$host_os" in
21629 mingw*)
21630 gl_dirsep_regex='[/\\]'
21631 ;;
21632 *)
21633 gl_dirsep_regex='\/'
21634 ;;
21635 esac
21636 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21637 gl_header_literal_regex=`echo 'stdlib.h' \
21638 | sed -e "$gl_make_literal_regex_sed"`
21639 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21640 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21641 s|^/[^/]|//&|
21642 p
21643 q
21644 }'
98399780 21645
4a626d0a
PA
21646 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21647 sed -n "$gl_absolute_header_sed"`
98399780 21648
4a626d0a
PA
21649 gl_header=$gl_cv_absolute_stdlib_h
21650 gl_cv_next_stdlib_h='"'$gl_header'"'
98399780
YQ
21651
21652
21653fi
21654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
21655$as_echo "$gl_cv_next_stdlib_h" >&6; }
21656 fi
21657 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
21658
21659 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21660 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21661 gl_next_as_first_directive='<'stdlib.h'>'
21662 else
21663 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21664 gl_next_as_first_directive=$gl_cv_next_stdlib_h
21665 fi
21666 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
21667
21668
21669
21670
21671
21672
4c62b19f 21673 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
21674 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
21675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
21676$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
21677if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
21678 $as_echo_n "(cached) " >&6
21679else
21680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21681/* end confdefs.h. */
21682#include <stdlib.h>
21683#if HAVE_SYS_LOADAVG_H
21684# include <sys/loadavg.h>
21685#endif
21686#if HAVE_RANDOM_H
21687# include <random.h>
21688#endif
21689
21690int
21691main ()
21692{
21693#undef $gl_func
21694 (void) $gl_func;
21695 ;
21696 return 0;
21697}
21698_ACEOF
21699if ac_fn_c_try_compile "$LINENO"; then :
21700 eval "$as_gl_Symbol=yes"
21701else
21702 eval "$as_gl_Symbol=no"
21703fi
21704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21705fi
21706eval ac_res=\$$as_gl_Symbol
21707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21708$as_echo "$ac_res" >&6; }
21709 eval as_val=\$$as_gl_Symbol
21710 if test "x$as_val" = x""yes; then :
21711 cat >>confdefs.h <<_ACEOF
21712#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
21713_ACEOF
21714
21715 eval ac_cv_have_decl_$gl_func=yes
21716fi
21717 done
21718
21719
21720
21721
21722
21723
8424cc97
SM
21724 for ac_func in strchrnul
21725do :
21726 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
21727if test "x$ac_cv_func_strchrnul" = x""yes; then :
21728 cat >>confdefs.h <<_ACEOF
21729#define HAVE_STRCHRNUL 1
21730_ACEOF
21731
21732fi
21733done
21734
21735 if test $ac_cv_func_strchrnul = no; then
21736 HAVE_STRCHRNUL=0
21737 else
21738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
21739$as_echo_n "checking whether strchrnul works... " >&6; }
21740if test "${gl_cv_func_strchrnul_works+set}" = set; then :
21741 $as_echo_n "(cached) " >&6
21742else
21743 if test "$cross_compiling" = yes; then :
21744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21745/* end confdefs.h. */
21746
21747#if defined __CYGWIN__
21748 #include <cygwin/version.h>
21749 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
21750 Lucky user
21751 #endif
21752#else
21753 Lucky user
21754#endif
21755
21756_ACEOF
21757if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21758 $EGREP "Lucky user" >/dev/null 2>&1; then :
21759 gl_cv_func_strchrnul_works="guessing yes"
21760else
21761 gl_cv_func_strchrnul_works="guessing no"
21762fi
21763rm -f conftest*
21764
21765
21766else
21767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21768/* end confdefs.h. */
21769
21770#include <string.h> /* for strchrnul */
21771
21772int
21773main ()
21774{
21775const char *buf = "a";
21776 return strchrnul (buf, 'b') != buf + 1;
21777
21778 ;
21779 return 0;
21780}
21781_ACEOF
21782if ac_fn_c_try_run "$LINENO"; then :
21783 gl_cv_func_strchrnul_works=yes
21784else
21785 gl_cv_func_strchrnul_works=no
21786fi
21787rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21788 conftest.$ac_objext conftest.beam conftest.$ac_ext
21789fi
21790
21791
21792fi
21793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
21794$as_echo "$gl_cv_func_strchrnul_works" >&6; }
21795 case "$gl_cv_func_strchrnul_works" in
21796 *yes) ;;
21797 *) REPLACE_STRCHRNUL=1 ;;
21798 esac
21799 fi
21800
21801 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
21802
21803
21804
21805
21806
21807
21808
21809
21810 gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
21811
21812 :
21813 fi
21814
21815
21816
21817
21818
21819 GNULIB_STRCHRNUL=1
21820
21821
21822
21823
21824
21825$as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
21826
21827
21828
21829
21830
21831
21832
6ec2e0f5
SDJ
21833 if test $ac_cv_func_strdup = yes; then
21834 if test $gl_cv_func_malloc_posix != yes; then
21835 REPLACE_STRDUP=1
21836 fi
21837 fi
21838
21839 if test $ac_cv_have_decl_strdup = no; then
21840 HAVE_DECL_STRDUP=0
21841 fi
21842
21843 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
21844
21845
21846
21847
21848
21849
21850
21851
21852 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
21853
21854 :
21855 fi
21856
21857
21858
21859
21860
21861 GNULIB_STRDUP=1
21862
21863
21864
21865
21866
21867$as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
21868
21869
21870
21871
21872
21873
21874
21875
21876 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
21877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
21878$as_echo_n "checking for working strerror function... " >&6; }
21879if test "${gl_cv_func_working_strerror+set}" = set; then :
21880 $as_echo_n "(cached) " >&6
21881else
21882 if test "$cross_compiling" = yes; then :
21883 case "$host_os" in
21884 # Guess yes on glibc systems.
21885 *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
21886 # If we don't know, assume the worst.
21887 *) gl_cv_func_working_strerror="guessing no" ;;
21888 esac
21889
21890else
21891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21892/* end confdefs.h. */
21893#include <string.h>
21894
21895int
21896main ()
21897{
21898if (!*strerror (-2)) return 1;
21899 ;
21900 return 0;
21901}
21902_ACEOF
21903if ac_fn_c_try_run "$LINENO"; then :
21904 gl_cv_func_working_strerror=yes
21905else
21906 gl_cv_func_working_strerror=no
21907fi
21908rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21909 conftest.$ac_objext conftest.beam conftest.$ac_ext
21910fi
21911
21912
21913fi
21914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
21915$as_echo "$gl_cv_func_working_strerror" >&6; }
21916 case "$gl_cv_func_working_strerror" in
21917 *yes) ;;
21918 *)
21919 REPLACE_STRERROR=1
21920 ;;
21921 esac
21922
21923 else
21924 REPLACE_STRERROR=1
21925 fi
21926
21927 if test $REPLACE_STRERROR = 1; then
21928
21929
21930
21931
21932
21933
21934
21935
21936 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
21937
21938 fi
21939
21940
21941cat >>confdefs.h <<_ACEOF
21942#define GNULIB_STRERROR 1
21943_ACEOF
21944
21945
21946
21947
21948
21949
21950
21951 GNULIB_STRERROR=1
21952
21953
21954
21955
21956
21957$as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
21958
21959
21960
21961
21962
21963 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
21964
21965
21966
21967
21968
21969
21970
21971
21972 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
21973
21974
21975
21976
21977
21978 if test $ac_cv_header_sys_socket_h != yes; then
21979 for ac_header in winsock2.h
21980do :
21981 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
21982if test "x$ac_cv_header_winsock2_h" = x""yes; then :
21983 cat >>confdefs.h <<_ACEOF
21984#define HAVE_WINSOCK2_H 1
21985_ACEOF
21986
21987fi
21988
21989done
21990
21991 fi
21992 if test "$ac_cv_header_winsock2_h" = yes; then
21993 HAVE_WINSOCK2_H=1
21994 UNISTD_H_HAVE_WINSOCK2_H=1
21995 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
21996 else
21997 HAVE_WINSOCK2_H=0
21998 fi
21999
22000
22001 fi
22002
22003
22004
22005
98399780 22006
63ce7108
TT
22007 if test $REPLACE_STRSTR = 0; then
22008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
22009$as_echo_n "checking whether strstr works in linear time... " >&6; }
22010if test "${gl_cv_func_strstr_linear+set}" = set; then :
22011 $as_echo_n "(cached) " >&6
22012else
22013 if test "$cross_compiling" = yes; then :
22014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22015/* end confdefs.h. */
22016
22017#include <features.h>
22018#ifdef __GNU_LIBRARY__
22019 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
22020 && !(defined __i386__ || defined __x86_64__) \
22021 && !defined __UCLIBC__
22022 Lucky user
22023 #endif
22024#endif
22025#ifdef __CYGWIN__
22026 #include <cygwin/version.h>
22027 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
22028 Lucky user
22029 #endif
22030#endif
22031
22032_ACEOF
22033if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22034 $EGREP "Lucky user" >/dev/null 2>&1; then :
22035 gl_cv_func_strstr_linear="guessing yes"
c971b7fa 22036else
63ce7108 22037 gl_cv_func_strstr_linear="guessing no"
c971b7fa
PA
22038fi
22039rm -f conftest*
22040
22041
22042else
22043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22044/* end confdefs.h. */
22045
49e4877c
PA
22046#ifdef __MVS__
22047/* z/OS does not deliver signals while strstr() is running (thanks to
22048 restrictions on its LE runtime), which prevents us from limiting the
22049 running time of this test. */
22050# error "This test does not work properly on z/OS"
22051#endif
c971b7fa 22052#include <signal.h> /* for signal */
63ce7108 22053#include <string.h> /* for strstr */
c971b7fa
PA
22054#include <stdlib.h> /* for malloc */
22055#include <unistd.h> /* for alarm */
49e4877c 22056static void quit (int sig) { _exit (sig + 128); }
c971b7fa
PA
22057
22058int
22059main ()
22060{
22061
22062 int result = 0;
22063 size_t m = 1000000;
63ce7108
TT
22064 char *haystack = (char *) malloc (2 * m + 2);
22065 char *needle = (char *) malloc (m + 2);
c971b7fa 22066 /* Failure to compile this test due to missing alarm is okay,
63ce7108 22067 since all such platforms (mingw) also have quadratic strstr. */
c971b7fa
PA
22068 signal (SIGALRM, quit);
22069 alarm (5);
22070 /* Check for quadratic performance. */
22071 if (haystack && needle)
22072 {
22073 memset (haystack, 'A', 2 * m);
22074 haystack[2 * m] = 'B';
63ce7108 22075 haystack[2 * m + 1] = 0;
c971b7fa
PA
22076 memset (needle, 'A', m);
22077 needle[m] = 'B';
63ce7108
TT
22078 needle[m + 1] = 0;
22079 if (!strstr (haystack, needle))
c971b7fa
PA
22080 result |= 1;
22081 }
22082 return result;
22083
22084 ;
22085 return 0;
22086}
22087_ACEOF
22088if ac_fn_c_try_run "$LINENO"; then :
63ce7108 22089 gl_cv_func_strstr_linear=yes
c971b7fa 22090else
63ce7108 22091 gl_cv_func_strstr_linear=no
c971b7fa
PA
22092fi
22093rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22094 conftest.$ac_objext conftest.beam conftest.$ac_ext
22095fi
22096
22097
22098fi
63ce7108
TT
22099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
22100$as_echo "$gl_cv_func_strstr_linear" >&6; }
22101 case "$gl_cv_func_strstr_linear" in
40a73391
JK
22102 *yes) ;;
22103 *)
63ce7108 22104 REPLACE_STRSTR=1
40a73391
JK
22105 ;;
22106 esac
c971b7fa
PA
22107 fi
22108
63ce7108 22109 if test $REPLACE_STRSTR = 1; then
c971b7fa
PA
22110
22111
22112
22113
22114
22115
22116
22117
63ce7108 22118 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
c971b7fa 22119
a512b375 22120 fi
c971b7fa
PA
22121
22122
22123
63ce7108
TT
22124 if test "$gl_cv_func_memchr_works" != yes; then
22125 REPLACE_STRSTR=1
c971b7fa 22126 else
63ce7108
TT
22127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
22128$as_echo_n "checking whether strstr works... " >&6; }
22129if test "${gl_cv_func_strstr_works_always+set}" = set; then :
c971b7fa
PA
22130 $as_echo_n "(cached) " >&6
22131else
22132 if test "$cross_compiling" = yes; then :
63ce7108 22133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
22134/* end confdefs.h. */
22135
22136#ifdef __GNU_LIBRARY__
22137 #include <features.h>
63ce7108 22138 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
c971b7fa
PA
22139 || defined __UCLIBC__
22140 Lucky user
22141 #endif
22142#elif defined __CYGWIN__
22143 #include <cygwin/version.h>
22144 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
22145 Lucky user
22146 #endif
22147#else
22148 Lucky user
22149#endif
22150
22151_ACEOF
22152if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22153 $EGREP "Lucky user" >/dev/null 2>&1; then :
63ce7108 22154 gl_cv_func_strstr_works_always="guessing yes"
c971b7fa 22155else
63ce7108 22156 gl_cv_func_strstr_works_always="guessing no"
c971b7fa
PA
22157fi
22158rm -f conftest*
22159
22160
22161else
22162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22163/* end confdefs.h. */
22164
63ce7108 22165#include <string.h> /* for strstr */
c971b7fa
PA
22166#define P "_EF_BF_BD"
22167#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
22168#define NEEDLE P P P P P
22169
22170int
22171main ()
22172{
63ce7108 22173return !!strstr (HAYSTACK, NEEDLE);
c971b7fa
PA
22174
22175 ;
22176 return 0;
22177}
22178_ACEOF
22179if ac_fn_c_try_run "$LINENO"; then :
63ce7108 22180 gl_cv_func_strstr_works_always=yes
c971b7fa 22181else
63ce7108 22182 gl_cv_func_strstr_works_always=no
c971b7fa
PA
22183fi
22184rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22185 conftest.$ac_objext conftest.beam conftest.$ac_ext
22186fi
22187
22188
22189fi
63ce7108
TT
22190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
22191$as_echo "$gl_cv_func_strstr_works_always" >&6; }
22192 case "$gl_cv_func_strstr_works_always" in
40a73391
JK
22193 *yes) ;;
22194 *)
63ce7108 22195 REPLACE_STRSTR=1
40a73391
JK
22196 ;;
22197 esac
c971b7fa 22198 fi
8839a007 22199
63ce7108 22200 if test $REPLACE_STRSTR = 1; then
8839a007 22201
8690e634
JK
22202
22203
8690e634
JK
22204
22205
22206
22207
22208
63ce7108 22209 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
8690e634 22210
8690e634
JK
22211 fi
22212
8690e634
JK
22213
22214
8690e634 22215
8690e634 22216
63ce7108 22217 GNULIB_STRSTR=1
8690e634
JK
22218
22219
22220
8690e634
JK
22221
22222
63ce7108 22223$as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
8690e634
JK
22224
22225
22226
22227
22228
22229
22230
421693b0
PA
22231 for ac_func in strtok_r
22232do :
22233 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
22234if test "x$ac_cv_func_strtok_r" = x""yes; then :
22235 cat >>confdefs.h <<_ACEOF
22236#define HAVE_STRTOK_R 1
22237_ACEOF
22238
22239fi
22240done
22241
22242 if test $ac_cv_func_strtok_r = yes; then
22243 HAVE_STRTOK_R=1
22244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5
22245$as_echo_n "checking whether strtok_r works... " >&6; }
22246if test "${gl_cv_func_strtok_r_works+set}" = set; then :
22247 $as_echo_n "(cached) " >&6
22248else
22249 if test "$cross_compiling" = yes; then :
22250
22251 case "$host_os" in
22252 # Guess no on glibc systems.
22253 *-gnu*) gl_cv_func_strtok_r_works="guessing no";;
22254 *) gl_cv_func_strtok_r_works="guessing yes";;
22255 esac
22256
22257else
22258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22259/* end confdefs.h. */
22260
22261 #ifndef __OPTIMIZE__
22262 # define __OPTIMIZE__ 1
22263 #endif
22264 #undef __OPTIMIZE_SIZE__
22265 #undef __NO_INLINE__
22266 #include <stdlib.h>
22267 #include <string.h>
22268
22269int
22270main ()
22271{
22272static const char dummy[] = "\177\01a";
22273 char delimiters[] = "xxxxxxxx";
22274 char *save_ptr = (char *) dummy;
22275 strtok_r (delimiters, "x", &save_ptr);
22276 strtok_r (NULL, "x", &save_ptr);
22277 return 0;
22278
22279 ;
22280 return 0;
22281}
22282
22283_ACEOF
22284if ac_fn_c_try_run "$LINENO"; then :
22285 gl_cv_func_strtok_r_works=yes
22286else
22287 gl_cv_func_strtok_r_works=no
22288fi
22289rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22290 conftest.$ac_objext conftest.beam conftest.$ac_ext
22291fi
22292
22293
22294fi
22295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5
22296$as_echo "$gl_cv_func_strtok_r_works" >&6; }
22297 case "$gl_cv_func_strtok_r_works" in
22298 *no)
22299 UNDEFINE_STRTOK_R=1
22300 ;;
22301 esac
22302 else
22303 HAVE_STRTOK_R=0
22304 fi
22305
22306 if test $ac_cv_have_decl_strtok_r = no; then
22307 HAVE_DECL_STRTOK_R=0
22308 fi
22309
22310 if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
22311
22312
22313
22314
22315
22316
22317
22318
22319 gl_LIBOBJS="$gl_LIBOBJS strtok_r.$ac_objext"
22320
22321
22322 :
22323
22324 fi
22325
22326
22327
22328
22329
22330 GNULIB_STRTOK_R=1
22331
22332
22333
22334
22335
22336$as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h
22337
22338
22339
22340
22341
22342
22343
8690e634
JK
22344
22345
22346
22347
22348
8690e634 22349
09607c9e
TT
22350
22351
22352
22353
22354 if test $gl_cv_have_include_next = yes; then
22355 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
22356 else
22357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
22358$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
22359if test "${gl_cv_next_sys_stat_h+set}" = set; then :
22360 $as_echo_n "(cached) " >&6
22361else
22362
22363 if test $ac_cv_header_sys_stat_h = yes; then
22364
22365
4a626d0a
PA
22366
22367
22368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
09607c9e
TT
22369/* end confdefs.h. */
22370#include <sys/stat.h>
09607c9e 22371_ACEOF
4a626d0a
PA
22372 case "$host_os" in
22373 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22374 *) gl_absname_cpp="$ac_cpp" ;;
22375 esac
22376
22377 case "$host_os" in
22378 mingw*)
22379 gl_dirsep_regex='[/\\]'
22380 ;;
22381 *)
22382 gl_dirsep_regex='\/'
22383 ;;
22384 esac
22385 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22386 gl_header_literal_regex=`echo 'sys/stat.h' \
22387 | sed -e "$gl_make_literal_regex_sed"`
22388 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22389 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22390 s|^/[^/]|//&|
22391 p
22392 q
22393 }'
22394
22395 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22396 sed -n "$gl_absolute_header_sed"`
22397
22398 gl_header=$gl_cv_absolute_sys_stat_h
22399 gl_cv_next_sys_stat_h='"'$gl_header'"'
09607c9e
TT
22400 else
22401 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
22402 fi
22403
22404
22405fi
22406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
22407$as_echo "$gl_cv_next_sys_stat_h" >&6; }
22408 fi
22409 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
22410
22411 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22412 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22413 gl_next_as_first_directive='<'sys/stat.h'>'
22414 else
22415 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22416 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
22417 fi
22418 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
22419
22420
22421
22422
22423
22424
22425
22426
2196f55f 22427
09607c9e
TT
22428
22429
22430 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
22431
22432$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
22433
22434 fi
22435
22436 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
22437 #include <sys/stat.h>
22438"
22439if test "x$ac_cv_type_nlink_t" = x""yes; then :
22440
22441else
22442
22443$as_echo "#define nlink_t int" >>confdefs.h
22444
22445fi
22446
22447
22448
22449 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
22450 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22452$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
22453if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
22454 $as_echo_n "(cached) " >&6
22455else
22456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22457/* end confdefs.h. */
22458#include <sys/stat.h>
22459
22460int
22461main ()
22462{
22463#undef $gl_func
22464 (void) $gl_func;
22465 ;
22466 return 0;
22467}
22468_ACEOF
22469if ac_fn_c_try_compile "$LINENO"; then :
22470 eval "$as_gl_Symbol=yes"
22471else
22472 eval "$as_gl_Symbol=no"
22473fi
22474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22475fi
22476eval ac_res=\$$as_gl_Symbol
22477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22478$as_echo "$ac_res" >&6; }
22479 eval as_val=\$$as_gl_Symbol
22480 if test "x$as_val" = x""yes; then :
22481 cat >>confdefs.h <<_ACEOF
22482#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22483_ACEOF
22484
22485 eval ac_cv_have_decl_$gl_func=yes
22486fi
22487 done
22488
22489
22490
22491
22492
22493
22494
22495
22496
22497
22498
2d8adcbd
MM
22499 :
22500
22501
22502
22503
09607c9e
TT
22504
22505
22506
8839a007
PA
22507
22508
22509
22510
09607c9e
TT
22511
22512
8839a007
PA
22513
22514
22515
22516
22517 if test $gl_cv_have_include_next = yes; then
22518 gl_cv_next_unistd_h='<'unistd.h'>'
22519 else
22520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
22521$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
22522if test "${gl_cv_next_unistd_h+set}" = set; then :
22523 $as_echo_n "(cached) " >&6
22524else
22525
22526 if test $ac_cv_header_unistd_h = yes; then
22527
22528
4a626d0a
PA
22529
22530
22531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8839a007
PA
22532/* end confdefs.h. */
22533#include <unistd.h>
8839a007 22534_ACEOF
4a626d0a
PA
22535 case "$host_os" in
22536 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22537 *) gl_absname_cpp="$ac_cpp" ;;
22538 esac
22539
22540 case "$host_os" in
22541 mingw*)
22542 gl_dirsep_regex='[/\\]'
22543 ;;
22544 *)
22545 gl_dirsep_regex='\/'
22546 ;;
22547 esac
22548 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22549 gl_header_literal_regex=`echo 'unistd.h' \
22550 | sed -e "$gl_make_literal_regex_sed"`
22551 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22552 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22553 s|^/[^/]|//&|
22554 p
22555 q
22556 }'
22557
22558 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22559 sed -n "$gl_absolute_header_sed"`
22560
22561 gl_header=$gl_cv_absolute_unistd_h
22562 gl_cv_next_unistd_h='"'$gl_header'"'
8839a007
PA
22563 else
22564 gl_cv_next_unistd_h='<'unistd.h'>'
22565 fi
22566
22567
22568fi
22569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
22570$as_echo "$gl_cv_next_unistd_h" >&6; }
22571 fi
22572 NEXT_UNISTD_H=$gl_cv_next_unistd_h
22573
22574 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22575 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22576 gl_next_as_first_directive='<'unistd.h'>'
22577 else
22578 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22579 gl_next_as_first_directive=$gl_cv_next_unistd_h
22580 fi
22581 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
22582
22583
22584
22585
22586 if test $ac_cv_header_unistd_h = yes; then
22587 HAVE_UNISTD_H=1
22588 else
22589 HAVE_UNISTD_H=0
22590 fi
22591
22592
22593
22594
22595
22596
22597
22598 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
22599 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22601$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
22602if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
22603 $as_echo_n "(cached) " >&6
22604else
22605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22606/* end confdefs.h. */
22607
22608#if HAVE_UNISTD_H
22609# include <unistd.h>
22610#endif
22611/* Some systems declare various items in the wrong headers. */
22612#if !(defined __GLIBC__ && !defined __UCLIBC__)
22613# include <fcntl.h>
22614# include <stdio.h>
22615# include <stdlib.h>
22616# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
22617# include <io.h>
22618# endif
22619#endif
22620
22621int
22622main ()
22623{
22624#undef $gl_func
22625 (void) $gl_func;
22626 ;
22627 return 0;
22628}
22629_ACEOF
22630if ac_fn_c_try_compile "$LINENO"; then :
22631 eval "$as_gl_Symbol=yes"
22632else
22633 eval "$as_gl_Symbol=no"
22634fi
22635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22636fi
22637eval ac_res=\$$as_gl_Symbol
22638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22639$as_echo "$ac_res" >&6; }
22640 eval as_val=\$$as_gl_Symbol
22641 if test "x$as_val" = x""yes; then :
22642 cat >>confdefs.h <<_ACEOF
22643#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22644_ACEOF
22645
22646 eval ac_cv_have_decl_$gl_func=yes
22647fi
22648 done
22649
22650
22651
22652
22653
6ec2e0f5
SDJ
22654
22655
22656
3d99e817
AK
22657 if test $ac_cv_have_decl_unsetenv = no; then
22658 HAVE_DECL_UNSETENV=0
22659 fi
22660 for ac_func in unsetenv
22661do :
22662 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
22663if test "x$ac_cv_func_unsetenv" = x""yes; then :
22664 cat >>confdefs.h <<_ACEOF
22665#define HAVE_UNSETENV 1
22666_ACEOF
22667
22668fi
22669done
22670
22671 if test $ac_cv_func_unsetenv = no; then
22672 HAVE_UNSETENV=0
22673 else
22674 HAVE_UNSETENV=1
22675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
22676$as_echo_n "checking for unsetenv() return type... " >&6; }
22677if test "${gt_cv_func_unsetenv_ret+set}" = set; then :
22678 $as_echo_n "(cached) " >&6
22679else
22680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22681/* end confdefs.h. */
22682
22683#undef _BSD
22684#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
22685#include <stdlib.h>
22686extern
22687#ifdef __cplusplus
22688"C"
22689#endif
22690int unsetenv (const char *name);
22691
22692int
22693main ()
22694{
22695
22696 ;
22697 return 0;
22698}
22699_ACEOF
22700if ac_fn_c_try_compile "$LINENO"; then :
22701 gt_cv_func_unsetenv_ret='int'
22702else
22703 gt_cv_func_unsetenv_ret='void'
22704fi
22705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22706fi
22707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
22708$as_echo "$gt_cv_func_unsetenv_ret" >&6; }
22709 if test $gt_cv_func_unsetenv_ret = 'void'; then
22710
22711$as_echo "#define VOID_UNSETENV 1" >>confdefs.h
22712
22713 REPLACE_UNSETENV=1
22714 fi
22715
22716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
22717$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
22718if test "${gl_cv_func_unsetenv_works+set}" = set; then :
22719 $as_echo_n "(cached) " >&6
22720else
22721 if test "$cross_compiling" = yes; then :
22722 case "$host_os" in
22723 # Guess yes on glibc systems.
22724 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
22725 # If we don't know, assume the worst.
22726 *) gl_cv_func_unsetenv_works="guessing no" ;;
22727 esac
22728
22729else
22730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22731/* end confdefs.h. */
22732
22733 #include <stdlib.h>
22734 #include <errno.h>
22735 extern char **environ;
22736
22737int
22738main ()
22739{
22740
22741 char entry1[] = "a=1";
22742 char entry2[] = "b=2";
22743 char *env[] = { entry1, entry2, NULL };
22744 if (putenv ((char *) "a=1")) return 1;
22745 if (putenv (entry2)) return 2;
22746 entry2[0] = 'a';
22747 unsetenv ("a");
22748 if (getenv ("a")) return 3;
22749 if (!unsetenv ("") || errno != EINVAL) return 4;
22750 entry2[0] = 'b';
22751 environ = env;
22752 if (!getenv ("a")) return 5;
22753 entry2[0] = 'a';
22754 unsetenv ("a");
22755 if (getenv ("a")) return 6;
22756
22757 ;
22758 return 0;
22759}
22760_ACEOF
22761if ac_fn_c_try_run "$LINENO"; then :
22762 gl_cv_func_unsetenv_works=yes
22763else
22764 gl_cv_func_unsetenv_works=no
22765fi
22766rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22767 conftest.$ac_objext conftest.beam conftest.$ac_ext
22768fi
22769
22770fi
22771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
22772$as_echo "$gl_cv_func_unsetenv_works" >&6; }
22773 case "$gl_cv_func_unsetenv_works" in
22774 *yes) ;;
22775 *)
22776 REPLACE_UNSETENV=1
22777 ;;
22778 esac
22779 fi
22780
22781 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
22782
22783
22784
22785
22786
22787
22788
22789
22790 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
22791
22792
22793
22794
22795
22796 fi
22797
22798
22799
22800
22801
22802 GNULIB_UNSETENV=1
22803
22804
22805
22806
22807
22808$as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
22809
22810
22811
22812
22813
22814
8839a007
PA
22815
22816
22817
22818
22819
22820
22821
8690e634
JK
22822
22823
22824 if test $gl_cv_have_include_next = yes; then
22825 gl_cv_next_wchar_h='<'wchar.h'>'
22826 else
22827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
22828$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
22829if test "${gl_cv_next_wchar_h+set}" = set; then :
22830 $as_echo_n "(cached) " >&6
22831else
22832
22833 if test $ac_cv_header_wchar_h = yes; then
22834
22835
4a626d0a
PA
22836
22837
22838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
22839/* end confdefs.h. */
22840#include <wchar.h>
8690e634 22841_ACEOF
4a626d0a
PA
22842 case "$host_os" in
22843 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22844 *) gl_absname_cpp="$ac_cpp" ;;
22845 esac
22846
22847 case "$host_os" in
22848 mingw*)
22849 gl_dirsep_regex='[/\\]'
22850 ;;
22851 *)
22852 gl_dirsep_regex='\/'
22853 ;;
22854 esac
22855 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22856 gl_header_literal_regex=`echo 'wchar.h' \
22857 | sed -e "$gl_make_literal_regex_sed"`
22858 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22859 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22860 s|^/[^/]|//&|
22861 p
22862 q
22863 }'
22864
22865 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22866 sed -n "$gl_absolute_header_sed"`
22867
22868 gl_header=$gl_cv_absolute_wchar_h
22869 gl_cv_next_wchar_h='"'$gl_header'"'
8690e634
JK
22870 else
22871 gl_cv_next_wchar_h='<'wchar.h'>'
22872 fi
22873
22874
22875fi
22876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
22877$as_echo "$gl_cv_next_wchar_h" >&6; }
22878 fi
22879 NEXT_WCHAR_H=$gl_cv_next_wchar_h
22880
22881 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22882 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22883 gl_next_as_first_directive='<'wchar.h'>'
22884 else
22885 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22886 gl_next_as_first_directive=$gl_cv_next_wchar_h
22887 fi
22888 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
22889
22890
22891
22892
22893 if test $ac_cv_header_wchar_h = yes; then
22894 HAVE_WCHAR_H=1
22895 else
22896 HAVE_WCHAR_H=0
22897 fi
22898
c971b7fa
PA
22899
22900
22901
22902
8690e634
JK
22903 if test $gt_cv_c_wint_t = yes; then
22904 HAVE_WINT_T=1
22905 else
22906 HAVE_WINT_T=0
22907 fi
c971b7fa
PA
22908
22909
22910
8690e634
JK
22911 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
22912 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22914$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
22915if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
c971b7fa
PA
22916 $as_echo_n "(cached) " >&6
22917else
22918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22919/* end confdefs.h. */
8690e634
JK
22920
22921/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22922 <wchar.h>.
22923 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22924 included before <wchar.h>. */
22925#if !(defined __GLIBC__ && !defined __UCLIBC__)
22926# include <stddef.h>
22927# include <stdio.h>
22928# include <time.h>
22929#endif
22930#include <wchar.h>
c971b7fa
PA
22931
22932int
22933main ()
22934{
8690e634
JK
22935#undef $gl_func
22936 (void) $gl_func;
c971b7fa
PA
22937 ;
22938 return 0;
22939}
22940_ACEOF
22941if ac_fn_c_try_compile "$LINENO"; then :
8690e634 22942 eval "$as_gl_Symbol=yes"
c971b7fa 22943else
8690e634 22944 eval "$as_gl_Symbol=no"
c971b7fa
PA
22945fi
22946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22947fi
8690e634
JK
22948eval ac_res=\$$as_gl_Symbol
22949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22950$as_echo "$ac_res" >&6; }
22951 eval as_val=\$$as_gl_Symbol
22952 if test "x$as_val" = x""yes; then :
22953 cat >>confdefs.h <<_ACEOF
22954#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22955_ACEOF
c971b7fa 22956
8690e634 22957 eval ac_cv_have_decl_$gl_func=yes
c971b7fa 22958fi
8690e634
JK
22959 done
22960
22961
22962
22963
22964
22965
22966
8690e634
JK
22967 if test $ac_cv_func_iswcntrl = yes; then
22968 HAVE_ISWCNTRL=1
22969 else
22970 HAVE_ISWCNTRL=0
22971 fi
22972
22973
22974
8690e634
JK
22975 if test $gt_cv_c_wint_t = yes; then
22976 HAVE_WINT_T=1
22977 else
22978 HAVE_WINT_T=0
22979 fi
22980
22981
22982
22983
22984
22985
c971b7fa 22986
8690e634 22987
c971b7fa
PA
22988
22989
22990
22991 if test $gl_cv_have_include_next = yes; then
8690e634 22992 gl_cv_next_wctype_h='<'wctype.h'>'
c971b7fa 22993 else
8690e634
JK
22994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
22995$as_echo_n "checking absolute name of <wctype.h>... " >&6; }
22996if test "${gl_cv_next_wctype_h+set}" = set; then :
c971b7fa
PA
22997 $as_echo_n "(cached) " >&6
22998else
22999
8690e634
JK
23000 if test $ac_cv_header_wctype_h = yes; then
23001
23002
4a626d0a
PA
23003
23004
23005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 23006/* end confdefs.h. */
8690e634 23007#include <wctype.h>
c971b7fa 23008_ACEOF
4a626d0a
PA
23009 case "$host_os" in
23010 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23011 *) gl_absname_cpp="$ac_cpp" ;;
23012 esac
23013
23014 case "$host_os" in
23015 mingw*)
23016 gl_dirsep_regex='[/\\]'
23017 ;;
23018 *)
23019 gl_dirsep_regex='\/'
23020 ;;
23021 esac
23022 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23023 gl_header_literal_regex=`echo 'wctype.h' \
23024 | sed -e "$gl_make_literal_regex_sed"`
23025 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23026 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23027 s|^/[^/]|//&|
23028 p
23029 q
23030 }'
23031
23032 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23033 sed -n "$gl_absolute_header_sed"`
23034
23035 gl_header=$gl_cv_absolute_wctype_h
23036 gl_cv_next_wctype_h='"'$gl_header'"'
8690e634
JK
23037 else
23038 gl_cv_next_wctype_h='<'wctype.h'>'
23039 fi
c971b7fa
PA
23040
23041
23042fi
8690e634
JK
23043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
23044$as_echo "$gl_cv_next_wctype_h" >&6; }
c971b7fa 23045 fi
8690e634 23046 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
c971b7fa
PA
23047
23048 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23049 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8690e634 23050 gl_next_as_first_directive='<'wctype.h'>'
c971b7fa
PA
23051 else
23052 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8690e634 23053 gl_next_as_first_directive=$gl_cv_next_wctype_h
c971b7fa 23054 fi
8690e634
JK
23055 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
23056
23057
23058
23059
23060 if test $ac_cv_header_wctype_h = yes; then
23061 if test $ac_cv_func_iswcntrl = yes; then
23062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
23063$as_echo_n "checking whether iswcntrl works... " >&6; }
23064if test "${gl_cv_func_iswcntrl_works+set}" = set; then :
23065 $as_echo_n "(cached) " >&6
23066else
23067
23068 if test "$cross_compiling" = yes; then :
23069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23070/* end confdefs.h. */
23071#include <stdlib.h>
23072 #if __GNU_LIBRARY__ == 1
23073 Linux libc5 i18n is broken.
23074 #endif
23075int
23076main ()
23077{
23078
23079 ;
23080 return 0;
23081}
23082_ACEOF
23083if ac_fn_c_try_compile "$LINENO"; then :
23084 gl_cv_func_iswcntrl_works="guessing yes"
23085else
23086 gl_cv_func_iswcntrl_works="guessing no"
23087fi
23088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23089
23090else
23091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23092/* end confdefs.h. */
23093
23094 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
23095 included before <wchar.h>.
23096 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
23097 must be included before <wchar.h>. */
23098 #include <stddef.h>
23099 #include <stdio.h>
23100 #include <time.h>
23101 #include <wchar.h>
23102 #include <wctype.h>
23103 int main () { return iswprint ('x') == 0; }
23104
23105_ACEOF
23106if ac_fn_c_try_run "$LINENO"; then :
23107 gl_cv_func_iswcntrl_works=yes
23108else
23109 gl_cv_func_iswcntrl_works=no
23110fi
23111rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23112 conftest.$ac_objext conftest.beam conftest.$ac_ext
23113fi
23114
23115
23116fi
23117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
23118$as_echo "$gl_cv_func_iswcntrl_works" >&6; }
23119 fi
23120 HAVE_WCTYPE_H=1
23121 else
23122 HAVE_WCTYPE_H=0
23123 fi
23124
23125
23126 case "$gl_cv_func_iswcntrl_works" in
23127 *yes) REPLACE_ISWCNTRL=0 ;;
23128 *) REPLACE_ISWCNTRL=1 ;;
23129 esac
23130
23131
23132 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
23133 :
23134 fi
23135
23136 if test $REPLACE_ISWCNTRL = 1; then
23137 REPLACE_TOWLOWER=1
23138 else
23139 for ac_func in towlower
23140do :
23141 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
23142if test "x$ac_cv_func_towlower" = x""yes; then :
23143 cat >>confdefs.h <<_ACEOF
23144#define HAVE_TOWLOWER 1
23145_ACEOF
23146
23147fi
23148done
23149
23150 if test $ac_cv_func_towlower = yes; then
23151 REPLACE_TOWLOWER=0
23152 else
23153 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
23154 included before <wchar.h>.
23155 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
23156 must be included before <wchar.h>. */
23157 #include <stddef.h>
23158 #include <stdio.h>
23159 #include <time.h>
23160 #include <wchar.h>
23161 #if HAVE_WCTYPE_H
23162 # include <wctype.h>
23163 #endif
23164
23165"
23166if test "x$ac_cv_have_decl_towlower" = x""yes; then :
23167 ac_have_decl=1
23168else
23169 ac_have_decl=0
23170fi
23171
23172cat >>confdefs.h <<_ACEOF
23173#define HAVE_DECL_TOWLOWER $ac_have_decl
23174_ACEOF
23175
23176 if test $ac_cv_have_decl_towlower = yes; then
23177 REPLACE_TOWLOWER=1
23178 else
23179 REPLACE_TOWLOWER=0
23180 fi
23181 fi
23182 fi
23183
23184
23185 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
23186 :
23187 fi
23188
23189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
23190$as_echo_n "checking for wctype_t... " >&6; }
23191if test "${gl_cv_type_wctype_t+set}" = set; then :
23192 $as_echo_n "(cached) " >&6
23193else
23194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23195/* end confdefs.h. */
23196/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
23197 included before <wchar.h>.
23198 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
23199 must be included before <wchar.h>. */
23200 #include <stddef.h>
23201 #include <stdio.h>
23202 #include <time.h>
23203 #include <wchar.h>
23204 #if HAVE_WCTYPE_H
23205 # include <wctype.h>
23206 #endif
23207 wctype_t a;
23208
23209int
23210main ()
23211{
23212
23213 ;
23214 return 0;
23215}
23216_ACEOF
23217if ac_fn_c_try_compile "$LINENO"; then :
23218 gl_cv_type_wctype_t=yes
23219else
23220 gl_cv_type_wctype_t=no
23221fi
23222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 23223
8690e634
JK
23224fi
23225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
23226$as_echo "$gl_cv_type_wctype_t" >&6; }
23227 if test $gl_cv_type_wctype_t = no; then
23228 HAVE_WCTYPE_T=0
23229 fi
23230
23231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
23232$as_echo_n "checking for wctrans_t... " >&6; }
23233if test "${gl_cv_type_wctrans_t+set}" = set; then :
23234 $as_echo_n "(cached) " >&6
23235else
23236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23237/* end confdefs.h. */
23238/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
23239 included before <wchar.h>.
23240 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
23241 must be included before <wchar.h>. */
23242 #include <stddef.h>
23243 #include <stdio.h>
23244 #include <time.h>
23245 #include <wchar.h>
23246 #include <wctype.h>
23247 wctrans_t a;
c971b7fa 23248
8690e634
JK
23249int
23250main ()
23251{
c971b7fa 23252
8690e634
JK
23253 ;
23254 return 0;
23255}
23256_ACEOF
23257if ac_fn_c_try_compile "$LINENO"; then :
23258 gl_cv_type_wctrans_t=yes
23259else
23260 gl_cv_type_wctrans_t=no
23261fi
23262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 23263
8690e634
JK
23264fi
23265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
23266$as_echo "$gl_cv_type_wctrans_t" >&6; }
23267 if test $gl_cv_type_wctrans_t = no; then
23268 HAVE_WCTRANS_T=0
c971b7fa
PA
23269 fi
23270
23271
8690e634
JK
23272 for gl_func in wctype iswctype wctrans towctrans ; do
23273 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
23274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
23275$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
23276if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
23277 $as_echo_n "(cached) " >&6
23278else
23279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23280/* end confdefs.h. */
23281
23282/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23283 <wchar.h>.
23284 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23285 included before <wchar.h>. */
23286#if !(defined __GLIBC__ && !defined __UCLIBC__)
23287# include <stddef.h>
23288# include <stdio.h>
23289# include <time.h>
23290# include <wchar.h>
23291#endif
23292#include <wctype.h>
23293
23294int
23295main ()
23296{
23297#undef $gl_func
23298 (void) $gl_func;
23299 ;
23300 return 0;
23301}
23302_ACEOF
23303if ac_fn_c_try_compile "$LINENO"; then :
23304 eval "$as_gl_Symbol=yes"
23305else
23306 eval "$as_gl_Symbol=no"
23307fi
23308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23309fi
23310eval ac_res=\$$as_gl_Symbol
23311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23312$as_echo "$ac_res" >&6; }
23313 eval as_val=\$$as_gl_Symbol
23314 if test "x$as_val" = x""yes; then :
23315 cat >>confdefs.h <<_ACEOF
23316#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
23317_ACEOF
c971b7fa 23318
8690e634
JK
23319 eval ac_cv_have_decl_$gl_func=yes
23320fi
23321 done
c971b7fa
PA
23322
23323
23324 # End of code from modules
23325
23326
23327
23328
23329
23330
23331
23332
23333
23334 gltests_libdeps=
23335 gltests_ltlibdeps=
23336
23337
23338
23339
23340
23341
23342
23343
23344
23345 gl_source_base='tests'
23346 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
23347
23348 gl_module_indicator_condition=$gltests_WITNESS
23349
23350
23351
23352
23353
23354
23355
23356
23357
23358 LIBGNU_LIBDEPS="$gl_libdeps"
23359
23360 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
23361
23362
23363
23364# We don't use automake, but gnulib does. This line lets us generate
23365# its Makefile.in.
23366am__api_version='1.11'
23367
23368# Find a good install program. We prefer a C program (faster),
23369# so one script is as good as another. But avoid the broken or
23370# incompatible versions:
23371# SysV /etc/install, /usr/sbin/install
23372# SunOS /usr/etc/install
23373# IRIX /sbin/install
23374# AIX /bin/install
23375# AmigaOS /C/install, which installs bootblocks on floppy discs
23376# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
23377# AFS /usr/afsws/bin/install, which mishandles nonexistent args
23378# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
23379# OS/2's system install, which has a completely different semantic
23380# ./install, which can be erroneously created by make from ./install.sh.
23381# Reject install programs that cannot install multiple files.
23382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
23383$as_echo_n "checking for a BSD-compatible install... " >&6; }
23384if test -z "$INSTALL"; then
23385if test "${ac_cv_path_install+set}" = set; then :
23386 $as_echo_n "(cached) " >&6
23387else
23388 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23389for as_dir in $PATH
23390do
23391 IFS=$as_save_IFS
23392 test -z "$as_dir" && as_dir=.
23393 # Account for people who put trailing slashes in PATH elements.
23394case $as_dir/ in #((
23395 ./ | .// | /[cC]/* | \
23396 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
23397 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
23398 /usr/ucb/* ) ;;
23399 *)
23400 # OSF1 and SCO ODT 3.0 have their own names for install.
23401 # Don't use installbsd from OSF since it installs stuff as root
23402 # by default.
23403 for ac_prog in ginstall scoinst install; do
23404 for ac_exec_ext in '' $ac_executable_extensions; do
23405 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
23406 if test $ac_prog = install &&
23407 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
23408 # AIX install. It has an incompatible calling convention.
23409 :
23410 elif test $ac_prog = install &&
23411 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
23412 # program-specific install script used by HP pwplus--don't use.
23413 :
23414 else
23415 rm -rf conftest.one conftest.two conftest.dir
23416 echo one > conftest.one
23417 echo two > conftest.two
23418 mkdir conftest.dir
23419 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
23420 test -s conftest.one && test -s conftest.two &&
23421 test -s conftest.dir/conftest.one &&
23422 test -s conftest.dir/conftest.two
23423 then
23424 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
23425 break 3
23426 fi
23427 fi
23428 fi
23429 done
23430 done
23431 ;;
23432esac
23433
23434 done
23435IFS=$as_save_IFS
23436
23437rm -rf conftest.one conftest.two conftest.dir
23438
23439fi
23440 if test "${ac_cv_path_install+set}" = set; then
23441 INSTALL=$ac_cv_path_install
23442 else
23443 # As a last resort, use the slow shell script. Don't cache a
23444 # value for INSTALL within a source directory, because that will
23445 # break other packages using the cache if that directory is
23446 # removed, or if the value is a relative name.
23447 INSTALL=$ac_install_sh
23448 fi
23449fi
23450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
23451$as_echo "$INSTALL" >&6; }
23452
23453# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
23454# It thinks the first close brace ends the variable substitution.
23455test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
23456
23457test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
23458
23459test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
23460
23461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
23462$as_echo_n "checking whether build environment is sane... " >&6; }
23463# Just in case
23464sleep 1
23465echo timestamp > conftest.file
23466# Reject unsafe characters in $srcdir or the absolute working directory
23467# name. Accept space and tab only in the latter.
23468am_lf='
23469'
23470case `pwd` in
23471 *[\\\"\#\$\&\'\`$am_lf]*)
23472 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
23473esac
23474case $srcdir in
23475 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
23476 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
23477esac
23478
23479# Do `set' in a subshell so we don't clobber the current shell's
23480# arguments. Must try -L first in case configure is actually a
23481# symlink; some systems play weird games with the mod time of symlinks
23482# (eg FreeBSD returns the mod time of the symlink's containing
23483# directory).
23484if (
23485 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
23486 if test "$*" = "X"; then
23487 # -L didn't work.
23488 set X `ls -t "$srcdir/configure" conftest.file`
23489 fi
23490 rm -f conftest.file
23491 if test "$*" != "X $srcdir/configure conftest.file" \
23492 && test "$*" != "X conftest.file $srcdir/configure"; then
23493
23494 # If neither matched, then we have a broken ls. This can happen
23495 # if, for instance, CONFIG_SHELL is bash and it inherits a
23496 # broken ls alias from the environment. This has actually
23497 # happened. Such a system could not be considered "sane".
23498 as_fn_error "ls -t appears to fail. Make sure there is not a broken
23499alias in your environment" "$LINENO" 5
23500 fi
23501
23502 test "$2" = conftest.file
23503 )
23504then
23505 # Ok.
23506 :
23507else
23508 as_fn_error "newly created file is older than distributed files!
23509Check your system clock" "$LINENO" 5
23510fi
23511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23512$as_echo "yes" >&6; }
23513test "$program_prefix" != NONE &&
23514 program_transform_name="s&^&$program_prefix&;$program_transform_name"
23515# Use a double $ so make ignores it.
23516test "$program_suffix" != NONE &&
23517 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
23518# Double any \ or $.
23519# By default was `s,x,x', remove it if useless.
23520ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
23521program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
23522
23523# expand $ac_aux_dir to an absolute path
23524am_aux_dir=`cd $ac_aux_dir && pwd`
23525
23526if test x"${MISSING+set}" != xset; then
23527 case $am_aux_dir in
23528 *\ * | *\ *)
23529 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
23530 *)
23531 MISSING="\${SHELL} $am_aux_dir/missing" ;;
23532 esac
23533fi
23534# Use eval to expand $SHELL
23535if eval "$MISSING --run true"; then
23536 am_missing_run="$MISSING --run "
23537else
23538 am_missing_run=
23539 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
23540$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
23541fi
23542
23543if test x"${install_sh}" != xset; then
23544 case $am_aux_dir in
23545 *\ * | *\ *)
23546 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
23547 *)
23548 install_sh="\${SHELL} $am_aux_dir/install-sh"
23549 esac
23550fi
23551
23552# Installed binaries are usually stripped using `strip' when the user
23553# run `make install-strip'. However `strip' might not be the right
23554# tool to use in cross-compilation environments, therefore Automake
23555# will honor the `STRIP' environment variable to overrule this program.
23556if test "$cross_compiling" != no; then
23557 if test -n "$ac_tool_prefix"; then
23558 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
23559set dummy ${ac_tool_prefix}strip; ac_word=$2
23560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23561$as_echo_n "checking for $ac_word... " >&6; }
23562if test "${ac_cv_prog_STRIP+set}" = set; then :
23563 $as_echo_n "(cached) " >&6
23564else
23565 if test -n "$STRIP"; then
23566 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
23567else
23568as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23569for as_dir in $PATH
23570do
23571 IFS=$as_save_IFS
23572 test -z "$as_dir" && as_dir=.
23573 for ac_exec_ext in '' $ac_executable_extensions; do
23574 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23575 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
23576 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23577 break 2
23578 fi
23579done
23580 done
23581IFS=$as_save_IFS
23582
23583fi
23584fi
23585STRIP=$ac_cv_prog_STRIP
23586if test -n "$STRIP"; then
23587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
23588$as_echo "$STRIP" >&6; }
23589else
23590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23591$as_echo "no" >&6; }
23592fi
23593
23594
23595fi
23596if test -z "$ac_cv_prog_STRIP"; then
23597 ac_ct_STRIP=$STRIP
23598 # Extract the first word of "strip", so it can be a program name with args.
23599set dummy strip; ac_word=$2
23600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23601$as_echo_n "checking for $ac_word... " >&6; }
23602if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
23603 $as_echo_n "(cached) " >&6
23604else
23605 if test -n "$ac_ct_STRIP"; then
23606 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
23607else
23608as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23609for as_dir in $PATH
23610do
23611 IFS=$as_save_IFS
23612 test -z "$as_dir" && as_dir=.
23613 for ac_exec_ext in '' $ac_executable_extensions; do
23614 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23615 ac_cv_prog_ac_ct_STRIP="strip"
23616 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23617 break 2
23618 fi
23619done
23620 done
23621IFS=$as_save_IFS
23622
23623fi
23624fi
23625ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
23626if test -n "$ac_ct_STRIP"; then
23627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
23628$as_echo "$ac_ct_STRIP" >&6; }
23629else
23630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23631$as_echo "no" >&6; }
23632fi
23633
23634 if test "x$ac_ct_STRIP" = x; then
23635 STRIP=":"
23636 else
23637 case $cross_compiling:$ac_tool_warned in
23638yes:)
23639{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23640$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23641ac_tool_warned=yes ;;
23642esac
23643 STRIP=$ac_ct_STRIP
23644 fi
23645else
23646 STRIP="$ac_cv_prog_STRIP"
23647fi
23648
23649fi
23650INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
23651
c971b7fa
PA
23652mkdir_p="$MKDIR_P"
23653case $mkdir_p in
23654 [\\/$]* | ?:[\\/]*) ;;
23655 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
23656esac
23657
23658for ac_prog in gawk mawk nawk awk
23659do
23660 # Extract the first word of "$ac_prog", so it can be a program name with args.
23661set dummy $ac_prog; ac_word=$2
23662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23663$as_echo_n "checking for $ac_word... " >&6; }
23664if test "${ac_cv_prog_AWK+set}" = set; then :
23665 $as_echo_n "(cached) " >&6
23666else
23667 if test -n "$AWK"; then
23668 ac_cv_prog_AWK="$AWK" # Let the user override the test.
23669else
23670as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23671for as_dir in $PATH
23672do
23673 IFS=$as_save_IFS
23674 test -z "$as_dir" && as_dir=.
23675 for ac_exec_ext in '' $ac_executable_extensions; do
23676 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23677 ac_cv_prog_AWK="$ac_prog"
23678 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23679 break 2
23680 fi
23681done
23682 done
23683IFS=$as_save_IFS
23684
23685fi
23686fi
23687AWK=$ac_cv_prog_AWK
23688if test -n "$AWK"; then
23689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
23690$as_echo "$AWK" >&6; }
23691else
23692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23693$as_echo "no" >&6; }
23694fi
23695
23696
23697 test -n "$AWK" && break
23698done
23699
23700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
23701$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
23702set x ${MAKE-make}
23703ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
23704if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
23705 $as_echo_n "(cached) " >&6
23706else
23707 cat >conftest.make <<\_ACEOF
23708SHELL = /bin/sh
23709all:
23710 @echo '@@@%%%=$(MAKE)=@@@%%%'
23711_ACEOF
23712# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
23713case `${MAKE-make} -f conftest.make 2>/dev/null` in
23714 *@@@%%%=?*=@@@%%%*)
23715 eval ac_cv_prog_make_${ac_make}_set=yes;;
23716 *)
23717 eval ac_cv_prog_make_${ac_make}_set=no;;
23718esac
23719rm -f conftest.make
23720fi
23721if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
23722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23723$as_echo "yes" >&6; }
23724 SET_MAKE=
23725else
23726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23727$as_echo "no" >&6; }
23728 SET_MAKE="MAKE=${MAKE-make}"
23729fi
23730
23731rm -rf .tst 2>/dev/null
23732mkdir .tst 2>/dev/null
23733if test -d .tst; then
23734 am__leading_dot=.
23735else
23736 am__leading_dot=_
23737fi
23738rmdir .tst 2>/dev/null
23739
23740DEPDIR="${am__leading_dot}deps"
23741
23742ac_config_commands="$ac_config_commands depfiles"
23743
23744
23745am_make=${MAKE-make}
23746cat > confinc << 'END'
23747am__doit:
23748 @echo this is the am__doit target
23749.PHONY: am__doit
23750END
23751# If we don't find an include directive, just comment out the code.
23752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
23753$as_echo_n "checking for style of include used by $am_make... " >&6; }
23754am__include="#"
23755am__quote=
23756_am_result=none
23757# First try GNU make style include.
23758echo "include confinc" > confmf
23759# Ignore all kinds of additional output from `make'.
23760case `$am_make -s -f confmf 2> /dev/null` in #(
23761*the\ am__doit\ target*)
23762 am__include=include
23763 am__quote=
23764 _am_result=GNU
23765 ;;
23766esac
23767# Now try BSD make style include.
23768if test "$am__include" = "#"; then
23769 echo '.include "confinc"' > confmf
23770 case `$am_make -s -f confmf 2> /dev/null` in #(
23771 *the\ am__doit\ target*)
23772 am__include=.include
23773 am__quote="\""
23774 _am_result=BSD
23775 ;;
23776 esac
23777fi
23778
23779
23780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
23781$as_echo "$_am_result" >&6; }
23782rm -f confinc confmf
23783
23784# Check whether --enable-dependency-tracking was given.
23785if test "${enable_dependency_tracking+set}" = set; then :
23786 enableval=$enable_dependency_tracking;
23787fi
23788
23789if test "x$enable_dependency_tracking" != xno; then
23790 am_depcomp="$ac_aux_dir/depcomp"
23791 AMDEPBACKSLASH='\'
23792fi
23793 if test "x$enable_dependency_tracking" != xno; then
23794 AMDEP_TRUE=
23795 AMDEP_FALSE='#'
23796else
23797 AMDEP_TRUE='#'
23798 AMDEP_FALSE=
23799fi
23800
23801
23802if test "`cd $srcdir && pwd`" != "`pwd`"; then
23803 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
23804 # is not polluted with repeated "-I."
23805 am__isrc=' -I$(srcdir)'
23806 # test to see if srcdir already configured
23807 if test -f $srcdir/config.status; then
23808 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
23809 fi
23810fi
23811
23812# test whether we have cygpath
23813if test -z "$CYGPATH_W"; then
23814 if (cygpath --version) >/dev/null 2>/dev/null; then
23815 CYGPATH_W='cygpath -w'
23816 else
23817 CYGPATH_W=echo
23818 fi
23819fi
23820
23821
23822# Define the identity of the package.
23823 PACKAGE=libgnu
23824 VERSION=UNUSED-VERSION
23825
23826
23827# Some tools Automake needs.
23828
23829ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
23830
23831
23832AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
23833
23834
23835AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
23836
23837
23838AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
23839
23840
23841MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
23842
23843# We need awk for the "check" target. The system "awk" is bad on
23844# some platforms.
23845# Always define AMTAR for backward compatibility.
23846
23847AMTAR=${AMTAR-"${am_missing_run}tar"}
23848
23849am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
23850
23851
23852
23853
23854depcc="$CC" am_compiler_list=
23855
23856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
23857$as_echo_n "checking dependency style of $depcc... " >&6; }
23858if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
23859 $as_echo_n "(cached) " >&6
23860else
23861 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
23862 # We make a subdir and do the tests there. Otherwise we can end up
23863 # making bogus files that we don't know about and never remove. For
23864 # instance it was reported that on HP-UX the gcc test will end up
23865 # making a dummy file named `D' -- because `-MD' means `put the output
23866 # in D'.
23867 mkdir conftest.dir
23868 # Copy depcomp to subdir because otherwise we won't find it if we're
23869 # using a relative directory.
23870 cp "$am_depcomp" conftest.dir
23871 cd conftest.dir
23872 # We will build objects and dependencies in a subdirectory because
23873 # it helps to detect inapplicable dependency modes. For instance
23874 # both Tru64's cc and ICC support -MD to output dependencies as a
23875 # side effect of compilation, but ICC will put the dependencies in
23876 # the current directory while Tru64 will put them in the object
23877 # directory.
23878 mkdir sub
23879
23880 am_cv_CC_dependencies_compiler_type=none
23881 if test "$am_compiler_list" = ""; then
23882 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
23883 fi
23884 am__universal=false
23885 case " $depcc " in #(
23886 *\ -arch\ *\ -arch\ *) am__universal=true ;;
23887 esac
23888
23889 for depmode in $am_compiler_list; do
23890 # Setup a source with many dependencies, because some compilers
23891 # like to wrap large dependency lists on column 80 (with \), and
23892 # we should not choose a depcomp mode which is confused by this.
23893 #
23894 # We need to recreate these files for each test, as the compiler may
23895 # overwrite some of them when testing with obscure command lines.
23896 # This happens at least with the AIX C compiler.
23897 : > sub/conftest.c
23898 for i in 1 2 3 4 5 6; do
23899 echo '#include "conftst'$i'.h"' >> sub/conftest.c
23900 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
23901 # Solaris 8's {/usr,}/bin/sh.
23902 touch sub/conftst$i.h
23903 done
23904 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
23905
23906 # We check with `-c' and `-o' for the sake of the "dashmstdout"
23907 # mode. It turns out that the SunPro C++ compiler does not properly
23908 # handle `-M -o', and we need to detect this. Also, some Intel
23909 # versions had trouble with output in subdirs
23910 am__obj=sub/conftest.${OBJEXT-o}
23911 am__minus_obj="-o $am__obj"
23912 case $depmode in
23913 gcc)
23914 # This depmode causes a compiler race in universal mode.
23915 test "$am__universal" = false || continue
23916 ;;
23917 nosideeffect)
23918 # after this tag, mechanisms are not by side-effect, so they'll
23919 # only be used when explicitly requested
23920 if test "x$enable_dependency_tracking" = xyes; then
23921 continue
23922 else
23923 break
23924 fi
23925 ;;
23926 msvisualcpp | msvcmsys)
23927 # This compiler won't grok `-c -o', but also, the minuso test has
23928 # not run yet. These depmodes are late enough in the game, and
23929 # so weak that their functioning should not be impacted.
23930 am__obj=conftest.${OBJEXT-o}
23931 am__minus_obj=
23932 ;;
23933 none) break ;;
23934 esac
23935 if depmode=$depmode \
23936 source=sub/conftest.c object=$am__obj \
23937 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
23938 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
23939 >/dev/null 2>conftest.err &&
23940 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
23941 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
23942 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
23943 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
23944 # icc doesn't choke on unknown options, it will just issue warnings
23945 # or remarks (even with -Werror). So we grep stderr for any message
23946 # that says an option was ignored or not supported.
23947 # When given -MP, icc 7.0 and 7.1 complain thusly:
23948 # icc: Command line warning: ignoring option '-M'; no argument required
23949 # The diagnosis changed in icc 8.0:
23950 # icc: Command line remark: option '-MP' not supported
23951 if (grep 'ignoring option' conftest.err ||
23952 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
23953 am_cv_CC_dependencies_compiler_type=$depmode
23954 break
23955 fi
23956 fi
23957 done
23958
23959 cd ..
23960 rm -rf conftest.dir
23961else
23962 am_cv_CC_dependencies_compiler_type=none
23963fi
23964
23965fi
23966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
23967$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
23968CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
23969
23970 if
23971 test "x$enable_dependency_tracking" != xno \
23972 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
23973 am__fastdepCC_TRUE=
23974 am__fastdepCC_FALSE='#'
23975else
23976 am__fastdepCC_TRUE='#'
23977 am__fastdepCC_FALSE=
23978fi
23979
23980
23981
23982
23983# --------------------- #
23984# Checks for programs. #
23985# --------------------- #
23986
23987
23988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
23989$as_echo_n "checking whether ln -s works... " >&6; }
23990LN_S=$as_ln_s
23991if test "$LN_S" = "ln -s"; then
23992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23993$as_echo "yes" >&6; }
23994else
23995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
23996$as_echo "no, using $LN_S" >&6; }
23997fi
23998
23999if test -n "$ac_tool_prefix"; then
24000 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
24001set dummy ${ac_tool_prefix}ranlib; ac_word=$2
24002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24003$as_echo_n "checking for $ac_word... " >&6; }
24004if test "${ac_cv_prog_RANLIB+set}" = set; then :
24005 $as_echo_n "(cached) " >&6
24006else
24007 if test -n "$RANLIB"; then
24008 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
24009else
24010as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24011for as_dir in $PATH
24012do
24013 IFS=$as_save_IFS
24014 test -z "$as_dir" && as_dir=.
24015 for ac_exec_ext in '' $ac_executable_extensions; do
24016 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24017 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
24018 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24019 break 2
24020 fi
24021done
24022 done
24023IFS=$as_save_IFS
24024
24025fi
24026fi
24027RANLIB=$ac_cv_prog_RANLIB
24028if test -n "$RANLIB"; then
24029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
24030$as_echo "$RANLIB" >&6; }
24031else
24032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24033$as_echo "no" >&6; }
24034fi
24035
24036
24037fi
24038if test -z "$ac_cv_prog_RANLIB"; then
24039 ac_ct_RANLIB=$RANLIB
24040 # Extract the first word of "ranlib", so it can be a program name with args.
24041set dummy ranlib; ac_word=$2
24042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24043$as_echo_n "checking for $ac_word... " >&6; }
24044if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
24045 $as_echo_n "(cached) " >&6
24046else
24047 if test -n "$ac_ct_RANLIB"; then
24048 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
24049else
24050as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24051for as_dir in $PATH
24052do
24053 IFS=$as_save_IFS
24054 test -z "$as_dir" && as_dir=.
24055 for ac_exec_ext in '' $ac_executable_extensions; do
24056 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24057 ac_cv_prog_ac_ct_RANLIB="ranlib"
24058 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24059 break 2
24060 fi
24061done
24062 done
24063IFS=$as_save_IFS
24064
24065fi
24066fi
24067ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
24068if test -n "$ac_ct_RANLIB"; then
24069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
24070$as_echo "$ac_ct_RANLIB" >&6; }
24071else
24072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24073$as_echo "no" >&6; }
24074fi
24075
24076 if test "x$ac_ct_RANLIB" = x; then
24077 RANLIB=":"
24078 else
24079 case $cross_compiling:$ac_tool_warned in
24080yes:)
24081{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24082$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24083ac_tool_warned=yes ;;
24084esac
24085 RANLIB=$ac_ct_RANLIB
24086 fi
24087else
24088 RANLIB="$ac_cv_prog_RANLIB"
24089fi
24090
24091
24092if test -n "$ac_tool_prefix"; then
24093 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
24094set dummy ${ac_tool_prefix}ar; ac_word=$2
24095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24096$as_echo_n "checking for $ac_word... " >&6; }
24097if test "${ac_cv_prog_AR+set}" = set; then :
24098 $as_echo_n "(cached) " >&6
24099else
24100 if test -n "$AR"; then
24101 ac_cv_prog_AR="$AR" # Let the user override the test.
24102else
24103as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24104for as_dir in $PATH
24105do
24106 IFS=$as_save_IFS
24107 test -z "$as_dir" && as_dir=.
24108 for ac_exec_ext in '' $ac_executable_extensions; do
24109 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24110 ac_cv_prog_AR="${ac_tool_prefix}ar"
24111 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24112 break 2
24113 fi
24114done
24115 done
24116IFS=$as_save_IFS
24117
24118fi
24119fi
24120AR=$ac_cv_prog_AR
24121if test -n "$AR"; then
24122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
24123$as_echo "$AR" >&6; }
24124else
24125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24126$as_echo "no" >&6; }
24127fi
24128
24129
24130fi
24131if test -z "$ac_cv_prog_AR"; then
24132 ac_ct_AR=$AR
24133 # Extract the first word of "ar", so it can be a program name with args.
24134set dummy ar; ac_word=$2
24135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24136$as_echo_n "checking for $ac_word... " >&6; }
24137if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
24138 $as_echo_n "(cached) " >&6
24139else
24140 if test -n "$ac_ct_AR"; then
24141 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
24142else
24143as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24144for as_dir in $PATH
24145do
24146 IFS=$as_save_IFS
24147 test -z "$as_dir" && as_dir=.
24148 for ac_exec_ext in '' $ac_executable_extensions; do
24149 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24150 ac_cv_prog_ac_ct_AR="ar"
24151 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24152 break 2
24153 fi
24154done
24155 done
24156IFS=$as_save_IFS
24157
24158fi
24159fi
24160ac_ct_AR=$ac_cv_prog_ac_ct_AR
24161if test -n "$ac_ct_AR"; then
24162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
24163$as_echo "$ac_ct_AR" >&6; }
24164else
24165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24166$as_echo "no" >&6; }
24167fi
24168
24169 if test "x$ac_ct_AR" = x; then
24170 AR=""
24171 else
24172 case $cross_compiling:$ac_tool_warned in
24173yes:)
24174{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24175$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24176ac_tool_warned=yes ;;
24177esac
24178 AR=$ac_ct_AR
24179 fi
24180else
24181 AR="$ac_cv_prog_AR"
24182fi
24183
24184
24185# ---------------------- #
24186# Checks for libraries. #
24187# ---------------------- #
24188
24189ac_config_files="$ac_config_files Makefile import/Makefile"
24190
24191ac_config_commands="$ac_config_commands default"
24192
24193cat >confcache <<\_ACEOF
24194# This file is a shell script that caches the results of configure
24195# tests run on this system so they can be shared between configure
24196# scripts and configure runs, see configure's option --config-cache.
24197# It is not useful on other systems. If it contains results you don't
24198# want to keep, you may remove or edit it.
24199#
24200# config.status only pays attention to the cache file if you give it
24201# the --recheck option to rerun configure.
24202#
24203# `ac_cv_env_foo' variables (set or unset) will be overridden when
24204# loading this file, other *unset* `ac_cv_foo' will be assigned the
24205# following values.
24206
24207_ACEOF
24208
24209# The following way of writing the cache mishandles newlines in values,
24210# but we know of no workaround that is simple, portable, and efficient.
24211# So, we kill variables containing newlines.
24212# Ultrix sh set writes to stderr and can't be redirected directly,
24213# and sets the high bit in the cache file unless we assign to the vars.
24214(
24215 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24216 eval ac_val=\$$ac_var
24217 case $ac_val in #(
24218 *${as_nl}*)
24219 case $ac_var in #(
24220 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
24221$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
24222 esac
24223 case $ac_var in #(
24224 _ | IFS | as_nl) ;; #(
24225 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
24226 *) { eval $ac_var=; unset $ac_var;} ;;
24227 esac ;;
24228 esac
24229 done
24230
24231 (set) 2>&1 |
24232 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24233 *${as_nl}ac_space=\ *)
24234 # `set' does not quote correctly, so add quotes: double-quote
24235 # substitution turns \\\\ into \\, and sed turns \\ into \.
24236 sed -n \
24237 "s/'/'\\\\''/g;
24238 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
24239 ;; #(
24240 *)
24241 # `set' quotes correctly as required by POSIX, so do not add quotes.
24242 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
24243 ;;
24244 esac |
24245 sort
24246) |
24247 sed '
24248 /^ac_cv_env_/b end
24249 t clear
24250 :clear
24251 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24252 t end
24253 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24254 :end' >>confcache
24255if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24256 if test -w "$cache_file"; then
24257 test "x$cache_file" != "x/dev/null" &&
24258 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
24259$as_echo "$as_me: updating cache $cache_file" >&6;}
24260 cat confcache >$cache_file
24261 else
24262 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
24263$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
24264 fi
24265fi
24266rm -f confcache
24267
24268test "x$prefix" = xNONE && prefix=$ac_default_prefix
24269# Let make expand exec_prefix.
24270test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24271
24272DEFS=-DHAVE_CONFIG_H
24273
24274ac_libobjs=
24275ac_ltlibobjs=
24276for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24277 # 1. Remove the extension, and $U if already installed.
24278 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24279 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
24280 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24281 # will be set to the directory where LIBOBJS objects are built.
24282 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24283 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
24284done
24285LIBOBJS=$ac_libobjs
24286
24287LTLIBOBJS=$ac_ltlibobjs
24288
24289
24290if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
24291 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
24292Usually this means the macro was only invoked conditionally." "$LINENO" 5
24293fi
24294if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
24295 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
24296Usually this means the macro was only invoked conditionally." "$LINENO" 5
24297fi
8690e634
JK
24298if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
24299 as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
24300Usually this means the macro was only invoked conditionally." "$LINENO" 5
24301fi
18848e28
GF
24302if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
24303 as_fn_error "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
24304Usually this means the macro was only invoked conditionally." "$LINENO" 5
24305fi
88b48903
WN
24306if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
24307 as_fn_error "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
24308Usually this means the macro was only invoked conditionally." "$LINENO" 5
24309fi
8690e634
JK
24310if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
24311 as_fn_error "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
24312Usually this means the macro was only invoked conditionally." "$LINENO" 5
24313fi
6ec2e0f5
SDJ
24314if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
24315 as_fn_error "conditional \"GL_GENERATE_GLOB_H\" was never defined.
24316Usually this means the macro was only invoked conditionally." "$LINENO" 5
24317fi
49e4877c
PA
24318if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
24319 as_fn_error "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
24320Usually this means the macro was only invoked conditionally." "$LINENO" 5
24321fi
24322if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
24323 as_fn_error "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
24324Usually this means the macro was only invoked conditionally." "$LINENO" 5
24325fi
c971b7fa
PA
24326if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
24327 as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined.
24328Usually this means the macro was only invoked conditionally." "$LINENO" 5
24329fi
88b48903
WN
24330
24331
8690e634
JK
24332if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
24333 as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
24334Usually this means the macro was only invoked conditionally." "$LINENO" 5
24335fi
c971b7fa
PA
24336if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
24337 as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
24338Usually this means the macro was only invoked conditionally." "$LINENO" 5
24339fi
24340
24341 gl_libobjs=
24342 gl_ltlibobjs=
24343 if test -n "$gl_LIBOBJS"; then
24344 # Remove the extension.
24345 sed_drop_objext='s/\.o$//;s/\.obj$//'
24346 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
24347 gl_libobjs="$gl_libobjs $i.$ac_objext"
24348 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
24349 done
24350 fi
24351 gl_LIBOBJS=$gl_libobjs
24352
24353 gl_LTLIBOBJS=$gl_ltlibobjs
24354
24355
24356
24357 gltests_libobjs=
24358 gltests_ltlibobjs=
24359 if test -n "$gltests_LIBOBJS"; then
24360 # Remove the extension.
24361 sed_drop_objext='s/\.o$//;s/\.obj$//'
24362 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
24363 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
24364 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
24365 done
24366 fi
24367 gltests_LIBOBJS=$gltests_libobjs
24368
24369 gltests_LTLIBOBJS=$gltests_ltlibobjs
24370
24371
24372if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
24373 as_fn_error "conditional \"AMDEP\" was never defined.
24374Usually this means the macro was only invoked conditionally." "$LINENO" 5
24375fi
24376if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
24377 as_fn_error "conditional \"am__fastdepCC\" was never defined.
24378Usually this means the macro was only invoked conditionally." "$LINENO" 5
24379fi
24380 if test -n "$EXEEXT"; then
24381 am__EXEEXT_TRUE=
24382 am__EXEEXT_FALSE='#'
24383else
24384 am__EXEEXT_TRUE='#'
24385 am__EXEEXT_FALSE=
24386fi
24387
24388
24389: ${CONFIG_STATUS=./config.status}
24390ac_write_fail=0
24391ac_clean_files_save=$ac_clean_files
24392ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24393{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
24394$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
24395as_write_fail=0
24396cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
24397#! $SHELL
24398# Generated by $as_me.
24399# Run this file to recreate the current configuration.
24400# Compiler output produced by configure, useful for debugging
24401# configure, is in config.log if it exists.
24402
24403debug=false
24404ac_cs_recheck=false
24405ac_cs_silent=false
24406
24407SHELL=\${CONFIG_SHELL-$SHELL}
24408export SHELL
24409_ASEOF
24410cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
24411## -------------------- ##
24412## M4sh Initialization. ##
24413## -------------------- ##
24414
24415# Be more Bourne compatible
24416DUALCASE=1; export DUALCASE # for MKS sh
24417if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
24418 emulate sh
24419 NULLCMD=:
24420 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
24421 # is contrary to our usage. Disable this feature.
24422 alias -g '${1+"$@"}'='"$@"'
24423 setopt NO_GLOB_SUBST
24424else
24425 case `(set -o) 2>/dev/null` in #(
24426 *posix*) :
24427 set -o posix ;; #(
24428 *) :
24429 ;;
24430esac
24431fi
24432
24433
24434as_nl='
24435'
24436export as_nl
24437# Printing a long string crashes Solaris 7 /usr/bin/printf.
24438as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
24439as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
24440as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
24441# Prefer a ksh shell builtin over an external printf program on Solaris,
24442# but without wasting forks for bash or zsh.
24443if test -z "$BASH_VERSION$ZSH_VERSION" \
24444 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
24445 as_echo='print -r --'
24446 as_echo_n='print -rn --'
24447elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
24448 as_echo='printf %s\n'
24449 as_echo_n='printf %s'
24450else
24451 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
24452 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
24453 as_echo_n='/usr/ucb/echo -n'
24454 else
24455 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
24456 as_echo_n_body='eval
24457 arg=$1;
24458 case $arg in #(
24459 *"$as_nl"*)
24460 expr "X$arg" : "X\\(.*\\)$as_nl";
24461 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
24462 esac;
24463 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
24464 '
24465 export as_echo_n_body
24466 as_echo_n='sh -c $as_echo_n_body as_echo'
24467 fi
24468 export as_echo_body
24469 as_echo='sh -c $as_echo_body as_echo'
24470fi
24471
24472# The user is always right.
24473if test "${PATH_SEPARATOR+set}" != set; then
24474 PATH_SEPARATOR=:
24475 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
24476 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
24477 PATH_SEPARATOR=';'
24478 }
24479fi
24480
24481
24482# IFS
24483# We need space, tab and new line, in precisely that order. Quoting is
24484# there to prevent editors from complaining about space-tab.
24485# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24486# splitting by setting IFS to empty value.)
24487IFS=" "" $as_nl"
24488
24489# Find who we are. Look in the path if we contain no directory separator.
24490case $0 in #((
24491 *[\\/]* ) as_myself=$0 ;;
24492 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24493for as_dir in $PATH
24494do
24495 IFS=$as_save_IFS
24496 test -z "$as_dir" && as_dir=.
24497 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24498 done
24499IFS=$as_save_IFS
24500
24501 ;;
24502esac
24503# We did not find ourselves, most probably we were run as `sh COMMAND'
24504# in which case we are not to be found in the path.
24505if test "x$as_myself" = x; then
24506 as_myself=$0
24507fi
24508if test ! -f "$as_myself"; then
24509 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24510 exit 1
24511fi
24512
24513# Unset variables that we do not need and which cause bugs (e.g. in
24514# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
24515# suppresses any "Segmentation fault" message there. '((' could
24516# trigger a bug in pdksh 5.2.14.
24517for as_var in BASH_ENV ENV MAIL MAILPATH
24518do eval test x\${$as_var+set} = xset \
24519 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
24520done
24521PS1='$ '
24522PS2='> '
24523PS4='+ '
24524
24525# NLS nuisances.
24526LC_ALL=C
24527export LC_ALL
24528LANGUAGE=C
24529export LANGUAGE
24530
24531# CDPATH.
24532(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
24533
24534
24535# as_fn_error ERROR [LINENO LOG_FD]
24536# ---------------------------------
24537# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
24538# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
24539# script with status $?, using 1 if that was 0.
24540as_fn_error ()
24541{
24542 as_status=$?; test $as_status -eq 0 && as_status=1
24543 if test "$3"; then
24544 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
24545 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
24546 fi
24547 $as_echo "$as_me: error: $1" >&2
24548 as_fn_exit $as_status
24549} # as_fn_error
24550
24551
24552# as_fn_set_status STATUS
24553# -----------------------
24554# Set $? to STATUS, without forking.
24555as_fn_set_status ()
24556{
24557 return $1
24558} # as_fn_set_status
24559
24560# as_fn_exit STATUS
24561# -----------------
24562# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
24563as_fn_exit ()
24564{
24565 set +e
24566 as_fn_set_status $1
24567 exit $1
24568} # as_fn_exit
24569
24570# as_fn_unset VAR
24571# ---------------
24572# Portably unset VAR.
24573as_fn_unset ()
24574{
24575 { eval $1=; unset $1;}
24576}
24577as_unset=as_fn_unset
24578# as_fn_append VAR VALUE
24579# ----------------------
24580# Append the text in VALUE to the end of the definition contained in VAR. Take
24581# advantage of any shell optimizations that allow amortized linear growth over
24582# repeated appends, instead of the typical quadratic growth present in naive
24583# implementations.
24584if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
24585 eval 'as_fn_append ()
24586 {
24587 eval $1+=\$2
24588 }'
24589else
24590 as_fn_append ()
24591 {
24592 eval $1=\$$1\$2
24593 }
24594fi # as_fn_append
24595
24596# as_fn_arith ARG...
24597# ------------------
24598# Perform arithmetic evaluation on the ARGs, and store the result in the
24599# global $as_val. Take advantage of shells that can avoid forks. The arguments
24600# must be portable across $(()) and expr.
24601if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
24602 eval 'as_fn_arith ()
24603 {
24604 as_val=$(( $* ))
24605 }'
24606else
24607 as_fn_arith ()
24608 {
24609 as_val=`expr "$@" || test $? -eq 1`
24610 }
24611fi # as_fn_arith
24612
24613
24614if expr a : '\(a\)' >/dev/null 2>&1 &&
24615 test "X`expr 00001 : '.*\(...\)'`" = X001; then
24616 as_expr=expr
24617else
24618 as_expr=false
24619fi
24620
24621if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
24622 as_basename=basename
24623else
24624 as_basename=false
24625fi
24626
24627if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24628 as_dirname=dirname
24629else
24630 as_dirname=false
24631fi
24632
24633as_me=`$as_basename -- "$0" ||
24634$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24635 X"$0" : 'X\(//\)$' \| \
24636 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
24637$as_echo X/"$0" |
24638 sed '/^.*\/\([^/][^/]*\)\/*$/{
24639 s//\1/
24640 q
24641 }
24642 /^X\/\(\/\/\)$/{
24643 s//\1/
24644 q
24645 }
24646 /^X\/\(\/\).*/{
24647 s//\1/
24648 q
24649 }
24650 s/.*/./; q'`
24651
24652# Avoid depending upon Character Ranges.
24653as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24654as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24655as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24656as_cr_digits='0123456789'
24657as_cr_alnum=$as_cr_Letters$as_cr_digits
24658
24659ECHO_C= ECHO_N= ECHO_T=
24660case `echo -n x` in #(((((
24661-n*)
24662 case `echo 'xy\c'` in
24663 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24664 xy) ECHO_C='\c';;
24665 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
24666 ECHO_T=' ';;
24667 esac;;
24668*)
24669 ECHO_N='-n';;
24670esac
24671
24672rm -f conf$$ conf$$.exe conf$$.file
24673if test -d conf$$.dir; then
24674 rm -f conf$$.dir/conf$$.file
24675else
24676 rm -f conf$$.dir
24677 mkdir conf$$.dir 2>/dev/null
24678fi
24679if (echo >conf$$.file) 2>/dev/null; then
24680 if ln -s conf$$.file conf$$ 2>/dev/null; then
24681 as_ln_s='ln -s'
24682 # ... but there are two gotchas:
24683 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24684 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24685 # In both cases, we have to default to `cp -p'.
24686 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
24687 as_ln_s='cp -p'
24688 elif ln conf$$.file conf$$ 2>/dev/null; then
24689 as_ln_s=ln
24690 else
24691 as_ln_s='cp -p'
24692 fi
24693else
24694 as_ln_s='cp -p'
24695fi
24696rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24697rmdir conf$$.dir 2>/dev/null
24698
24699
24700# as_fn_mkdir_p
24701# -------------
24702# Create "$as_dir" as a directory, including parents if necessary.
24703as_fn_mkdir_p ()
24704{
24705
24706 case $as_dir in #(
24707 -*) as_dir=./$as_dir;;
24708 esac
24709 test -d "$as_dir" || eval $as_mkdir_p || {
24710 as_dirs=
24711 while :; do
24712 case $as_dir in #(
24713 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
24714 *) as_qdir=$as_dir;;
24715 esac
24716 as_dirs="'$as_qdir' $as_dirs"
24717 as_dir=`$as_dirname -- "$as_dir" ||
24718$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24719 X"$as_dir" : 'X\(//\)[^/]' \| \
24720 X"$as_dir" : 'X\(//\)$' \| \
24721 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
24722$as_echo X"$as_dir" |
24723 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24724 s//\1/
24725 q
24726 }
24727 /^X\(\/\/\)[^/].*/{
24728 s//\1/
24729 q
24730 }
24731 /^X\(\/\/\)$/{
24732 s//\1/
24733 q
24734 }
24735 /^X\(\/\).*/{
24736 s//\1/
24737 q
24738 }
24739 s/.*/./; q'`
24740 test -d "$as_dir" && break
24741 done
24742 test -z "$as_dirs" || eval "mkdir $as_dirs"
24743 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
24744
24745
24746} # as_fn_mkdir_p
24747if mkdir -p . 2>/dev/null; then
24748 as_mkdir_p='mkdir -p "$as_dir"'
24749else
24750 test -d ./-p && rmdir ./-p
24751 as_mkdir_p=false
24752fi
24753
24754if test -x / >/dev/null 2>&1; then
24755 as_test_x='test -x'
24756else
24757 if ls -dL / >/dev/null 2>&1; then
24758 as_ls_L_option=L
24759 else
24760 as_ls_L_option=
24761 fi
24762 as_test_x='
24763 eval sh -c '\''
24764 if test -d "$1"; then
24765 test -d "$1/.";
24766 else
24767 case $1 in #(
24768 -*)set "./$1";;
24769 esac;
24770 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
24771 ???[sx]*):;;*)false;;esac;fi
24772 '\'' sh
24773 '
24774fi
24775as_executable_p=$as_test_x
24776
24777# Sed expression to map a string onto a valid CPP name.
24778as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
24779
24780# Sed expression to map a string onto a valid variable name.
24781as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
24782
24783
24784exec 6>&1
24785## ----------------------------------- ##
24786## Main body of $CONFIG_STATUS script. ##
24787## ----------------------------------- ##
24788_ASEOF
24789test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
24790
24791cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24792# Save the log message, to keep $0 and so on meaningful, and to
24793# report actual input values of CONFIG_FILES etc. instead of their
24794# values after options handling.
24795ac_log="
24796This file was extended by $as_me, which was
24797generated by GNU Autoconf 2.64. Invocation command line was
24798
24799 CONFIG_FILES = $CONFIG_FILES
24800 CONFIG_HEADERS = $CONFIG_HEADERS
24801 CONFIG_LINKS = $CONFIG_LINKS
24802 CONFIG_COMMANDS = $CONFIG_COMMANDS
24803 $ $0 $@
24804
24805on `(hostname || uname -n) 2>/dev/null | sed 1q`
24806"
24807
24808_ACEOF
24809
24810case $ac_config_files in *"
24811"*) set x $ac_config_files; shift; ac_config_files=$*;;
24812esac
24813
24814case $ac_config_headers in *"
24815"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
24816esac
24817
24818
24819cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24820# Files that config.status was made for.
24821config_files="$ac_config_files"
24822config_headers="$ac_config_headers"
24823config_commands="$ac_config_commands"
24824
24825_ACEOF
24826
24827cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24828ac_cs_usage="\
24829\`$as_me' instantiates files and other configuration actions
24830from templates according to the current configuration. Unless the files
24831and actions are specified as TAGs, all are instantiated by default.
24832
24833Usage: $0 [OPTION]... [TAG]...
24834
24835 -h, --help print this help, then exit
24836 -V, --version print version number and configuration settings, then exit
24837 -q, --quiet, --silent
24838 do not print progress messages
24839 -d, --debug don't remove temporary files
24840 --recheck update $as_me by reconfiguring in the same conditions
24841 --file=FILE[:TEMPLATE]
24842 instantiate the configuration file FILE
24843 --header=FILE[:TEMPLATE]
24844 instantiate the configuration header FILE
24845
24846Configuration files:
24847$config_files
24848
24849Configuration headers:
24850$config_headers
24851
24852Configuration commands:
24853$config_commands
24854
24855Report bugs to the package provider."
24856
24857_ACEOF
24858cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24859ac_cs_version="\\
24860config.status
24861configured by $0, generated by GNU Autoconf 2.64,
24862 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
24863
24864Copyright (C) 2009 Free Software Foundation, Inc.
24865This config.status script is free software; the Free Software Foundation
24866gives unlimited permission to copy, distribute and modify it."
24867
24868ac_pwd='$ac_pwd'
24869srcdir='$srcdir'
24870INSTALL='$INSTALL'
24871MKDIR_P='$MKDIR_P'
24872AWK='$AWK'
24873test -n "\$AWK" || AWK=awk
24874_ACEOF
24875
24876cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24877# The default lists apply if the user does not specify any file.
24878ac_need_defaults=:
24879while test $# != 0
24880do
24881 case $1 in
24882 --*=*)
24883 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24884 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
24885 ac_shift=:
24886 ;;
24887 *)
24888 ac_option=$1
24889 ac_optarg=$2
24890 ac_shift=shift
24891 ;;
24892 esac
24893
24894 case $ac_option in
24895 # Handling of the options.
24896 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24897 ac_cs_recheck=: ;;
24898 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24899 $as_echo "$ac_cs_version"; exit ;;
24900 --debug | --debu | --deb | --de | --d | -d )
24901 debug=: ;;
24902 --file | --fil | --fi | --f )
24903 $ac_shift
24904 case $ac_optarg in
24905 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
24906 esac
24907 as_fn_append CONFIG_FILES " '$ac_optarg'"
24908 ac_need_defaults=false;;
24909 --header | --heade | --head | --hea )
24910 $ac_shift
24911 case $ac_optarg in
24912 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
24913 esac
24914 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
24915 ac_need_defaults=false;;
24916 --he | --h)
24917 # Conflict between --help and --header
24918 as_fn_error "ambiguous option: \`$1'
24919Try \`$0 --help' for more information.";;
24920 --help | --hel | -h )
24921 $as_echo "$ac_cs_usage"; exit ;;
24922 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24923 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24924 ac_cs_silent=: ;;
24925
24926 # This is an error.
24927 -*) as_fn_error "unrecognized option: \`$1'
24928Try \`$0 --help' for more information." ;;
24929
24930 *) as_fn_append ac_config_targets " $1"
24931 ac_need_defaults=false ;;
24932
24933 esac
24934 shift
24935done
24936
24937ac_configure_extra_args=
24938
24939if $ac_cs_silent; then
24940 exec 6>/dev/null
24941 ac_configure_extra_args="$ac_configure_extra_args --silent"
24942fi
24943
24944_ACEOF
24945cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24946if \$ac_cs_recheck; then
24947 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
24948 shift
24949 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
24950 CONFIG_SHELL='$SHELL'
24951 export CONFIG_SHELL
24952 exec "\$@"
24953fi
24954
24955_ACEOF
24956cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24957exec 5>>config.log
24958{
24959 echo
24960 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24961## Running $as_me. ##
24962_ASBOX
24963 $as_echo "$ac_log"
24964} >&5
24965
24966_ACEOF
24967cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24968#
24969# INIT-COMMANDS
24970#
24971AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
24972
24973_ACEOF
24974
24975cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24976
24977# Handling of arguments.
24978for ac_config_target in $ac_config_targets
24979do
24980 case $ac_config_target in
24981 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
24982 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
24983 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
24984 "import/Makefile") CONFIG_FILES="$CONFIG_FILES import/Makefile" ;;
24985 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
24986
24987 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
24988 esac
24989done
24990
24991
24992# If the user did not use the arguments to specify the items to instantiate,
24993# then the envvar interface is used. Set only those that are not.
24994# We use the long form for the default assignment because of an extremely
24995# bizarre bug on SunOS 4.1.3.
24996if $ac_need_defaults; then
24997 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24998 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24999 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
25000fi
25001
25002# Have a temporary directory for convenience. Make it in the build tree
25003# simply because there is no reason against having it here, and in addition,
25004# creating and moving files from /tmp can sometimes cause problems.
25005# Hook for its removal unless debugging.
25006# Note that there is a small window in which the directory will not be cleaned:
25007# after its creation but before its name has been assigned to `$tmp'.
25008$debug ||
25009{
25010 tmp=
25011 trap 'exit_status=$?
25012 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25013' 0
25014 trap 'as_fn_exit 1' 1 2 13 15
25015}
25016# Create a (secure) tmp directory for tmp files.
25017
25018{
25019 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
25020 test -n "$tmp" && test -d "$tmp"
25021} ||
25022{
25023 tmp=./conf$$-$RANDOM
25024 (umask 077 && mkdir "$tmp")
25025} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
25026
25027# Set up the scripts for CONFIG_FILES section.
25028# No need to generate them if there are no CONFIG_FILES.
25029# This happens for instance with `./config.status config.h'.
25030if test -n "$CONFIG_FILES"; then
25031
25032
25033ac_cr=`echo X | tr X '\015'`
25034# On cygwin, bash can eat \r inside `` if the user requested igncr.
25035# But we know of no other shell where ac_cr would be empty at this
25036# point, so we can use a bashism as a fallback.
25037if test "x$ac_cr" = x; then
25038 eval ac_cr=\$\'\\r\'
25039fi
25040ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
25041if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
25042 ac_cs_awk_cr='\r'
25043else
25044 ac_cs_awk_cr=$ac_cr
25045fi
25046
25047echo 'BEGIN {' >"$tmp/subs1.awk" &&
25048_ACEOF
25049
25050
25051{
25052 echo "cat >conf$$subs.awk <<_ACEOF" &&
25053 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
25054 echo "_ACEOF"
25055} >conf$$subs.sh ||
25056 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25057ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
25058ac_delim='%!_!# '
25059for ac_last_try in false false false false false :; do
25060 . ./conf$$subs.sh ||
25061 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25062
25063 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
25064 if test $ac_delim_n = $ac_delim_num; then
25065 break
25066 elif $ac_last_try; then
25067 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25068 else
25069 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25070 fi
25071done
25072rm -f conf$$subs.sh
25073
25074cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25075cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
25076_ACEOF
25077sed -n '
25078h
25079s/^/S["/; s/!.*/"]=/
25080p
25081g
25082s/^[^!]*!//
25083:repl
25084t repl
25085s/'"$ac_delim"'$//
25086t delim
25087:nl
25088h
25089s/\(.\{148\}\).*/\1/
25090t more1
25091s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
25092p
25093n
25094b repl
25095:more1
25096s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25097p
25098g
25099s/.\{148\}//
25100t nl
25101:delim
25102h
25103s/\(.\{148\}\).*/\1/
25104t more2
25105s/["\\]/\\&/g; s/^/"/; s/$/"/
25106p
25107b
25108:more2
25109s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25110p
25111g
25112s/.\{148\}//
25113t delim
25114' <conf$$subs.awk | sed '
25115/^[^""]/{
25116 N
25117 s/\n//
25118}
25119' >>$CONFIG_STATUS || ac_write_fail=1
25120rm -f conf$$subs.awk
25121cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25122_ACAWK
25123cat >>"\$tmp/subs1.awk" <<_ACAWK &&
25124 for (key in S) S_is_set[key] = 1
25125 FS = "\a"
25126
25127}
25128{
25129 line = $ 0
25130 nfields = split(line, field, "@")
25131 substed = 0
25132 len = length(field[1])
25133 for (i = 2; i < nfields; i++) {
25134 key = field[i]
25135 keylen = length(key)
25136 if (S_is_set[key]) {
25137 value = S[key]
25138 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
25139 len += length(value) + length(field[++i])
25140 substed = 1
25141 } else
25142 len += 1 + keylen
25143 }
25144
25145 print line
25146}
25147
25148_ACAWK
25149_ACEOF
25150cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25151if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
25152 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
25153else
25154 cat
25155fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
25156 || as_fn_error "could not setup config files machinery" "$LINENO" 5
25157_ACEOF
25158
25159# VPATH may cause trouble with some makes, so we remove $(srcdir),
25160# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25161# trailing colons and then remove the whole line if VPATH becomes empty
25162# (actually we leave an empty line to preserve line numbers).
25163if test "x$srcdir" = x.; then
25164 ac_vpsub='/^[ ]*VPATH[ ]*=/{
25165s/:*\$(srcdir):*/:/
25166s/:*\${srcdir}:*/:/
25167s/:*@srcdir@:*/:/
25168s/^\([^=]*=[ ]*\):*/\1/
25169s/:*$//
25170s/^[^=]*=[ ]*$//
25171}'
25172fi
25173
25174cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25175fi # test -n "$CONFIG_FILES"
25176
25177# Set up the scripts for CONFIG_HEADERS section.
25178# No need to generate them if there are no CONFIG_HEADERS.
25179# This happens for instance with `./config.status Makefile'.
25180if test -n "$CONFIG_HEADERS"; then
25181cat >"$tmp/defines.awk" <<\_ACAWK ||
25182BEGIN {
25183_ACEOF
25184
25185# Transform confdefs.h into an awk script `defines.awk', embedded as
25186# here-document in config.status, that substitutes the proper values into
25187# config.h.in to produce config.h.
25188
25189# Create a delimiter string that does not exist in confdefs.h, to ease
25190# handling of long lines.
25191ac_delim='%!_!# '
25192for ac_last_try in false false :; do
25193 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
25194 if test -z "$ac_t"; then
25195 break
25196 elif $ac_last_try; then
25197 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
25198 else
25199 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25200 fi
25201done
25202
25203# For the awk script, D is an array of macro values keyed by name,
25204# likewise P contains macro parameters if any. Preserve backslash
25205# newline sequences.
25206
25207ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25208sed -n '
25209s/.\{148\}/&'"$ac_delim"'/g
25210t rset
25211:rset
25212s/^[ ]*#[ ]*define[ ][ ]*/ /
25213t def
25214d
25215:def
25216s/\\$//
25217t bsnl
25218s/["\\]/\\&/g
25219s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
25220D["\1"]=" \3"/p
25221s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
25222d
25223:bsnl
25224s/["\\]/\\&/g
25225s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
25226D["\1"]=" \3\\\\\\n"\\/p
25227t cont
25228s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
25229t cont
25230d
25231:cont
25232n
25233s/.\{148\}/&'"$ac_delim"'/g
25234t clear
25235:clear
25236s/\\$//
25237t bsnlc
25238s/["\\]/\\&/g; s/^/"/; s/$/"/p
25239d
25240:bsnlc
25241s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
25242b cont
25243' <confdefs.h | sed '
25244s/'"$ac_delim"'/"\\\
25245"/g' >>$CONFIG_STATUS || ac_write_fail=1
25246
25247cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25248 for (key in D) D_is_set[key] = 1
25249 FS = "\a"
25250}
25251/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
25252 line = \$ 0
25253 split(line, arg, " ")
25254 if (arg[1] == "#") {
25255 defundef = arg[2]
25256 mac1 = arg[3]
25257 } else {
25258 defundef = substr(arg[1], 2)
25259 mac1 = arg[2]
25260 }
25261 split(mac1, mac2, "(") #)
25262 macro = mac2[1]
25263 prefix = substr(line, 1, index(line, defundef) - 1)
25264 if (D_is_set[macro]) {
25265 # Preserve the white space surrounding the "#".
25266 print prefix "define", macro P[macro] D[macro]
25267 next
25268 } else {
25269 # Replace #undef with comments. This is necessary, for example,
25270 # in the case of _POSIX_SOURCE, which is predefined and required
25271 # on some systems where configure will not decide to define it.
25272 if (defundef == "undef") {
25273 print "/*", prefix defundef, macro, "*/"
25274 next
25275 }
25276 }
25277}
25278{ print }
25279_ACAWK
25280_ACEOF
25281cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25282 as_fn_error "could not setup config headers machinery" "$LINENO" 5
25283fi # test -n "$CONFIG_HEADERS"
25284
25285
25286eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
25287shift
25288for ac_tag
25289do
25290 case $ac_tag in
25291 :[FHLC]) ac_mode=$ac_tag; continue;;
25292 esac
25293 case $ac_mode$ac_tag in
25294 :[FHL]*:*);;
25295 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
25296 :[FH]-) ac_tag=-:-;;
25297 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25298 esac
25299 ac_save_IFS=$IFS
25300 IFS=:
25301 set x $ac_tag
25302 IFS=$ac_save_IFS
25303 shift
25304 ac_file=$1
25305 shift
25306
25307 case $ac_mode in
25308 :L) ac_source=$1;;
25309 :[FH])
25310 ac_file_inputs=
25311 for ac_f
25312 do
25313 case $ac_f in
25314 -) ac_f="$tmp/stdin";;
25315 *) # Look for the file first in the build tree, then in the source tree
25316 # (if the path is not absolute). The absolute path cannot be DOS-style,
25317 # because $ac_f cannot contain `:'.
25318 test -f "$ac_f" ||
25319 case $ac_f in
25320 [\\/$]*) false;;
25321 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25322 esac ||
25323 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
25324 esac
25325 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
25326 as_fn_append ac_file_inputs " '$ac_f'"
25327 done
25328
25329 # Let's still pretend it is `configure' which instantiates (i.e., don't
25330 # use $as_me), people would be surprised to read:
25331 # /* config.h. Generated by config.status. */
25332 configure_input='Generated from '`
25333 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
25334 `' by configure.'
25335 if test x"$ac_file" != x-; then
25336 configure_input="$ac_file. $configure_input"
25337 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
25338$as_echo "$as_me: creating $ac_file" >&6;}
25339 fi
25340 # Neutralize special characters interpreted by sed in replacement strings.
25341 case $configure_input in #(
25342 *\&* | *\|* | *\\* )
25343 ac_sed_conf_input=`$as_echo "$configure_input" |
25344 sed 's/[\\\\&|]/\\\\&/g'`;; #(
25345 *) ac_sed_conf_input=$configure_input;;
25346 esac
25347
25348 case $ac_tag in
25349 *:-:* | *:-) cat >"$tmp/stdin" \
25350 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
25351 esac
25352 ;;
25353 esac
25354
25355 ac_dir=`$as_dirname -- "$ac_file" ||
25356$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25357 X"$ac_file" : 'X\(//\)[^/]' \| \
25358 X"$ac_file" : 'X\(//\)$' \| \
25359 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
25360$as_echo X"$ac_file" |
25361 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25362 s//\1/
25363 q
25364 }
25365 /^X\(\/\/\)[^/].*/{
25366 s//\1/
25367 q
25368 }
25369 /^X\(\/\/\)$/{
25370 s//\1/
25371 q
25372 }
25373 /^X\(\/\).*/{
25374 s//\1/
25375 q
25376 }
25377 s/.*/./; q'`
25378 as_dir="$ac_dir"; as_fn_mkdir_p
25379 ac_builddir=.
25380
25381case "$ac_dir" in
25382.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25383*)
25384 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
25385 # A ".." for each directory in $ac_dir_suffix.
25386 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
25387 case $ac_top_builddir_sub in
25388 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25389 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25390 esac ;;
25391esac
25392ac_abs_top_builddir=$ac_pwd
25393ac_abs_builddir=$ac_pwd$ac_dir_suffix
25394# for backward compatibility:
25395ac_top_builddir=$ac_top_build_prefix
25396
25397case $srcdir in
25398 .) # We are building in place.
25399 ac_srcdir=.
25400 ac_top_srcdir=$ac_top_builddir_sub
25401 ac_abs_top_srcdir=$ac_pwd ;;
25402 [\\/]* | ?:[\\/]* ) # Absolute name.
25403 ac_srcdir=$srcdir$ac_dir_suffix;
25404 ac_top_srcdir=$srcdir
25405 ac_abs_top_srcdir=$srcdir ;;
25406 *) # Relative name.
25407 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25408 ac_top_srcdir=$ac_top_build_prefix$srcdir
25409 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
25410esac
25411ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
25412
25413
25414 case $ac_mode in
25415 :F)
25416 #
25417 # CONFIG_FILE
25418 #
25419
25420 case $INSTALL in
25421 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
25422 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
25423 esac
25424 ac_MKDIR_P=$MKDIR_P
25425 case $MKDIR_P in
25426 [\\/$]* | ?:[\\/]* ) ;;
25427 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
25428 esac
25429_ACEOF
25430
25431cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25432# If the template does not know about datarootdir, expand it.
25433# FIXME: This hack should be removed a few years after 2.60.
25434ac_datarootdir_hack=; ac_datarootdir_seen=
25435ac_sed_dataroot='
25436/datarootdir/ {
25437 p
25438 q
25439}
25440/@datadir@/p
25441/@docdir@/p
25442/@infodir@/p
25443/@localedir@/p
25444/@mandir@/p'
25445case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
25446*datarootdir*) ac_datarootdir_seen=yes;;
25447*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25448 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25449$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25450_ACEOF
25451cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25452 ac_datarootdir_hack='
25453 s&@datadir@&$datadir&g
25454 s&@docdir@&$docdir&g
25455 s&@infodir@&$infodir&g
25456 s&@localedir@&$localedir&g
25457 s&@mandir@&$mandir&g
25458 s&\\\${datarootdir}&$datarootdir&g' ;;
25459esac
25460_ACEOF
25461
25462# Neutralize VPATH when `$srcdir' = `.'.
25463# Shell code in configure.ac might set extrasub.
25464# FIXME: do we really want to maintain this feature?
25465cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25466ac_sed_extra="$ac_vpsub
25467$extrasub
25468_ACEOF
25469cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25470:t
25471/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25472s|@configure_input@|$ac_sed_conf_input|;t t
25473s&@top_builddir@&$ac_top_builddir_sub&;t t
25474s&@top_build_prefix@&$ac_top_build_prefix&;t t
25475s&@srcdir@&$ac_srcdir&;t t
25476s&@abs_srcdir@&$ac_abs_srcdir&;t t
25477s&@top_srcdir@&$ac_top_srcdir&;t t
25478s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25479s&@builddir@&$ac_builddir&;t t
25480s&@abs_builddir@&$ac_abs_builddir&;t t
25481s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25482s&@INSTALL@&$ac_INSTALL&;t t
25483s&@MKDIR_P@&$ac_MKDIR_P&;t t
25484$ac_datarootdir_hack
25485"
25486eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
25487 || as_fn_error "could not create $ac_file" "$LINENO" 5
25488
25489test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25490 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25491 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25492 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25493which seems to be undefined. Please make sure it is defined." >&5
25494$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25495which seems to be undefined. Please make sure it is defined." >&2;}
25496
25497 rm -f "$tmp/stdin"
25498 case $ac_file in
25499 -) cat "$tmp/out" && rm -f "$tmp/out";;
25500 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
25501 esac \
25502 || as_fn_error "could not create $ac_file" "$LINENO" 5
25503 ;;
25504 :H)
25505 #
25506 # CONFIG_HEADER
25507 #
25508 if test x"$ac_file" != x-; then
25509 {
25510 $as_echo "/* $configure_input */" \
25511 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
25512 } >"$tmp/config.h" \
25513 || as_fn_error "could not create $ac_file" "$LINENO" 5
25514 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
25515 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
25516$as_echo "$as_me: $ac_file is unchanged" >&6;}
25517 else
25518 rm -f "$ac_file"
25519 mv "$tmp/config.h" "$ac_file" \
25520 || as_fn_error "could not create $ac_file" "$LINENO" 5
25521 fi
25522 else
25523 $as_echo "/* $configure_input */" \
25524 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
25525 || as_fn_error "could not create -" "$LINENO" 5
25526 fi
25527# Compute "$ac_file"'s index in $config_headers.
25528_am_arg="$ac_file"
25529_am_stamp_count=1
25530for _am_header in $config_headers :; do
25531 case $_am_header in
25532 $_am_arg | $_am_arg:* )
25533 break ;;
25534 * )
25535 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
25536 esac
25537done
25538echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
25539$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25540 X"$_am_arg" : 'X\(//\)[^/]' \| \
25541 X"$_am_arg" : 'X\(//\)$' \| \
25542 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
25543$as_echo X"$_am_arg" |
25544 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25545 s//\1/
25546 q
25547 }
25548 /^X\(\/\/\)[^/].*/{
25549 s//\1/
25550 q
25551 }
25552 /^X\(\/\/\)$/{
25553 s//\1/
25554 q
25555 }
25556 /^X\(\/\).*/{
25557 s//\1/
25558 q
25559 }
25560 s/.*/./; q'`/stamp-h$_am_stamp_count
25561 ;;
25562
25563 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
25564$as_echo "$as_me: executing $ac_file commands" >&6;}
25565 ;;
25566 esac
25567
25568
25569 case $ac_file$ac_mode in
25570 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
25571 # Autoconf 2.62 quotes --file arguments for eval, but not when files
25572 # are listed without --file. Let's play safe and only enable the eval
25573 # if we detect the quoting.
25574 case $CONFIG_FILES in
25575 *\'*) eval set x "$CONFIG_FILES" ;;
25576 *) set x $CONFIG_FILES ;;
25577 esac
25578 shift
25579 for mf
25580 do
25581 # Strip MF so we end up with the name of the file.
25582 mf=`echo "$mf" | sed -e 's/:.*$//'`
25583 # Check whether this is an Automake generated Makefile or not.
25584 # We used to match only the files named `Makefile.in', but
25585 # some people rename them; so instead we look at the file content.
25586 # Grep'ing the first line is not enough: some people post-process
25587 # each Makefile.in and add a new line on top of each file to say so.
25588 # Grep'ing the whole file is not good either: AIX grep has a line
25589 # limit of 2048, but all sed's we know have understand at least 4000.
25590 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
25591 dirpart=`$as_dirname -- "$mf" ||
25592$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25593 X"$mf" : 'X\(//\)[^/]' \| \
25594 X"$mf" : 'X\(//\)$' \| \
25595 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
25596$as_echo X"$mf" |
25597 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25598 s//\1/
25599 q
25600 }
25601 /^X\(\/\/\)[^/].*/{
25602 s//\1/
25603 q
25604 }
25605 /^X\(\/\/\)$/{
25606 s//\1/
25607 q
25608 }
25609 /^X\(\/\).*/{
25610 s//\1/
25611 q
25612 }
25613 s/.*/./; q'`
25614 else
25615 continue
25616 fi
25617 # Extract the definition of DEPDIR, am__include, and am__quote
25618 # from the Makefile without running `make'.
25619 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
25620 test -z "$DEPDIR" && continue
25621 am__include=`sed -n 's/^am__include = //p' < "$mf"`
25622 test -z "am__include" && continue
25623 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
25624 # When using ansi2knr, U may be empty or an underscore; expand it
25625 U=`sed -n 's/^U = //p' < "$mf"`
25626 # Find all dependency output files, they are included files with
25627 # $(DEPDIR) in their names. We invoke sed twice because it is the
25628 # simplest approach to changing $(DEPDIR) to its actual value in the
25629 # expansion.
25630 for file in `sed -n "
25631 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
25632 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
25633 # Make sure the directory exists.
25634 test -f "$dirpart/$file" && continue
25635 fdir=`$as_dirname -- "$file" ||
25636$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25637 X"$file" : 'X\(//\)[^/]' \| \
25638 X"$file" : 'X\(//\)$' \| \
25639 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
25640$as_echo X"$file" |
25641 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25642 s//\1/
25643 q
25644 }
25645 /^X\(\/\/\)[^/].*/{
25646 s//\1/
25647 q
25648 }
25649 /^X\(\/\/\)$/{
25650 s//\1/
25651 q
25652 }
25653 /^X\(\/\).*/{
25654 s//\1/
25655 q
25656 }
25657 s/.*/./; q'`
25658 as_dir=$dirpart/$fdir; as_fn_mkdir_p
25659 # echo "creating $dirpart/$file"
25660 echo '# dummy' > "$dirpart/$file"
25661 done
25662 done
25663}
25664 ;;
25665 "default":C)
25666case x$CONFIG_HEADERS in
25667xconfig.h:config.in)
25668echo > stamp-h ;;
25669esac
25670 ;;
25671
25672 esac
25673done # for ac_tag
25674
25675
25676as_fn_exit 0
25677_ACEOF
25678ac_clean_files=$ac_clean_files_save
25679
25680test $ac_write_fail = 0 ||
25681 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
25682
25683
25684# configure is writing to config.log, and then calls config.status.
25685# config.status does its own redirection, appending to config.log.
25686# Unfortunately, on DOS this fails, as config.log is still kept open
25687# by configure, so config.status won't be able to write to it; its
25688# output is simply discarded. So we exec the FD to /dev/null,
25689# effectively closing config.log, so it can be properly (re)opened and
25690# appended to by config.status. When coming back to configure, we
25691# need to make the FD available again.
25692if test "$no_create" != yes; then
25693 ac_cs_success=:
25694 ac_config_status_args=
25695 test "$silent" = yes &&
25696 ac_config_status_args="$ac_config_status_args --quiet"
25697 exec 5>/dev/null
25698 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
25699 exec 5>>config.log
25700 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25701 # would make configure fail if this is the last instruction.
25702 $ac_cs_success || as_fn_exit $?
25703fi
25704if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
25705 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
25706$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
25707fi
25708
25709
25710exit 0
This page took 2.300982 seconds and 4 git commands to generate.