]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gnulib/configure
Generate aclocal-m4-deps.mk more deterministically and portably.
[thirdparty/binutils-gdb.git] / gdb / gnulib / configure
CommitLineData
c971b7fa
PA
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
d0ac1c44
SM
3# Generated by GNU Autoconf 2.69 for libgnu UNUSED-VERSION.
4#
5#
6# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
c971b7fa 7#
c971b7fa
PA
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.
d0ac1c44 90as_myself=
c971b7fa
PA
91case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94for as_dir in $PATH
95do
96 IFS=$as_save_IFS
97 test -z "$as_dir" && as_dir=.
98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
100IFS=$as_save_IFS
101
102 ;;
103esac
104# We did not find ourselves, most probably we were run as `sh COMMAND'
105# in which case we are not to be found in the path.
106if test "x$as_myself" = x; then
107 as_myself=$0
108fi
109if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112fi
113
114# Unset variables that we do not need and which cause bugs (e.g. in
115# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116# suppresses any "Segmentation fault" message there. '((' could
117# trigger a bug in pdksh 5.2.14.
118for as_var in BASH_ENV ENV MAIL MAILPATH
119do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121done
122PS1='$ '
123PS2='> '
124PS4='+ '
125
126# NLS nuisances.
127LC_ALL=C
128export LC_ALL
129LANGUAGE=C
130export LANGUAGE
131
132# CDPATH.
133(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
d0ac1c44
SM
135# Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140# neutralization value for shells without unset; and this also
141# works around shells that cannot unset nonexistent variables.
142# Preserve -v and -x to the replacement shell.
143BASH_ENV=/dev/null
144ENV=/dev/null
145(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151esac
152exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153# Admittedly, this is quite paranoid, since all the known shells bail
154# out after a failed `exec'.
155$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
c971b7fa
PA
160if test "x$CONFIG_SHELL" = x; then
161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162 emulate sh
163 NULLCMD=:
164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 # is contrary to our usage. Disable this feature.
166 alias -g '\${1+\"\$@\"}'='\"\$@\"'
167 setopt NO_GLOB_SUBST
168else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174esac
175fi
176"
177 as_required="as_fn_return () { (exit \$1); }
178as_fn_success () { as_fn_return 0; }
179as_fn_failure () { as_fn_return 1; }
180as_fn_ret_success () { return 0; }
181as_fn_ret_failure () { return 1; }
182
183exitcode=0
184as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190else
191 exitcode=1; echo positional parameters were not saved.
192fi
d0ac1c44
SM
193test x\$exitcode = x0 || exit 1
194test -x / || exit 1"
c971b7fa
PA
195 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199test \$(( 1 + 1 )) = 2 || exit 1"
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202else
203 as_have_required=no
204fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209as_found=false
210for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211do
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
216 /*)
217 for as_base in sh bash ksh sh5; do
218 # Try only shells that exist, to save several forks.
219 as_shell=$as_dir/$as_base
220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 CONFIG_SHELL=$as_shell as_have_required=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 break 2
225fi
226fi
227 done;;
228 esac
229 as_found=false
230done
231$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233 CONFIG_SHELL=$SHELL as_have_required=yes
234fi; }
235IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
d0ac1c44
SM
239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241# neutralization value for shells without unset; and this also
242# works around shells that cannot unset nonexistent variables.
243# Preserve -v and -x to the replacement shell.
244BASH_ENV=/dev/null
245ENV=/dev/null
246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252esac
253exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254# Admittedly, this is quite paranoid, since all the known shells bail
255# out after a failed `exec'.
256$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257exit 255
c971b7fa
PA
258fi
259
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266 else
267 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268$0: including any error possibly output before this
269$0: message. Then install a modern shell, or manually run
270$0: the script under such a shell if you do have one."
271 fi
272 exit 1
273fi
274fi
275fi
276SHELL=${CONFIG_SHELL-/bin/sh}
277export SHELL
278# Unset more variables known to interfere with behavior of common tools.
279CLICOLOR_FORCE= GREP_OPTIONS=
280unset CLICOLOR_FORCE GREP_OPTIONS
281
282## --------------------- ##
283## M4sh Shell Functions. ##
284## --------------------- ##
285# as_fn_unset VAR
286# ---------------
287# Portably unset VAR.
288as_fn_unset ()
289{
290 { eval $1=; unset $1;}
291}
292as_unset=as_fn_unset
293
294# as_fn_set_status STATUS
295# -----------------------
296# Set $? to STATUS, without forking.
297as_fn_set_status ()
298{
299 return $1
300} # as_fn_set_status
301
302# as_fn_exit STATUS
303# -----------------
304# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305as_fn_exit ()
306{
307 set +e
308 as_fn_set_status $1
309 exit $1
310} # as_fn_exit
311
312# as_fn_mkdir_p
313# -------------
314# Create "$as_dir" as a directory, including parents if necessary.
315as_fn_mkdir_p ()
316{
317
318 case $as_dir in #(
319 -*) as_dir=./$as_dir;;
320 esac
321 test -d "$as_dir" || eval $as_mkdir_p || {
322 as_dirs=
323 while :; do
324 case $as_dir in #(
325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 *) as_qdir=$as_dir;;
327 esac
328 as_dirs="'$as_qdir' $as_dirs"
329 as_dir=`$as_dirname -- "$as_dir" ||
330$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334$as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 s//\1/
337 q
338 }
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\).*/{
348 s//\1/
349 q
350 }
351 s/.*/./; q'`
352 test -d "$as_dir" && break
353 done
354 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
c971b7fa
PA
356
357
358} # as_fn_mkdir_p
d0ac1c44
SM
359
360# as_fn_executable_p FILE
361# -----------------------
362# Test if FILE is an executable regular file.
363as_fn_executable_p ()
364{
365 test -f "$1" && test -x "$1"
366} # as_fn_executable_p
c971b7fa
PA
367# as_fn_append VAR VALUE
368# ----------------------
369# Append the text in VALUE to the end of the definition contained in VAR. Take
370# advantage of any shell optimizations that allow amortized linear growth over
371# repeated appends, instead of the typical quadratic growth present in naive
372# implementations.
373if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 eval 'as_fn_append ()
375 {
376 eval $1+=\$2
377 }'
378else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383fi # as_fn_append
384
385# as_fn_arith ARG...
386# ------------------
387# Perform arithmetic evaluation on the ARGs, and store the result in the
388# global $as_val. Take advantage of shells that can avoid forks. The arguments
389# must be portable across $(()) and expr.
390if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400fi # as_fn_arith
401
402
d0ac1c44
SM
403# as_fn_error STATUS ERROR [LINENO LOG_FD]
404# ----------------------------------------
c971b7fa
PA
405# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 407# script with STATUS, using 1 if that was 0.
c971b7fa
PA
408as_fn_error ()
409{
d0ac1c44
SM
410 as_status=$1; test $as_status -eq 0 && as_status=1
411 if test "$4"; then
412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
c971b7fa 414 fi
d0ac1c44 415 $as_echo "$as_me: error: $2" >&2
c971b7fa
PA
416 as_fn_exit $as_status
417} # as_fn_error
418
419if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
421 as_expr=expr
422else
423 as_expr=false
424fi
425
426if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427 as_basename=basename
428else
429 as_basename=false
430fi
431
432if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434else
435 as_dirname=false
436fi
437
438as_me=`$as_basename -- "$0" ||
439$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442$as_echo X/"$0" |
443 sed '/^.*\/\([^/][^/]*\)\/*$/{
444 s//\1/
445 q
446 }
447 /^X\/\(\/\/\)$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\).*/{
452 s//\1/
453 q
454 }
455 s/.*/./; q'`
456
457# Avoid depending upon Character Ranges.
458as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461as_cr_digits='0123456789'
462as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465 as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
470 sed -n '
471 p
472 /[$]LINENO/=
473 ' <$as_myself |
474 sed '
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
479 N
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482 t loop
483 s/-\n.*//
484 ' >$as_me.lineno &&
485 chmod +x "$as_me.lineno" ||
486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
d0ac1c44
SM
488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec=no; export _as_can_reexec
c971b7fa
PA
492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
496 # Exit status is that of the last command.
497 exit
498}
499
500ECHO_C= ECHO_N= ECHO_T=
501case `echo -n x` in #(((((
502-n*)
503 case `echo 'xy\c'` in
504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
508 esac;;
509*)
510 ECHO_N='-n';;
511esac
512
513rm -f conf$$ conf$$.exe conf$$.file
514if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
516else
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
519fi
520if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
522 as_ln_s='ln -s'
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 526 # In both cases, we have to default to `cp -pR'.
c971b7fa 527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 528 as_ln_s='cp -pR'
c971b7fa
PA
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
d0ac1c44 532 as_ln_s='cp -pR'
c971b7fa
PA
533 fi
534else
d0ac1c44 535 as_ln_s='cp -pR'
c971b7fa
PA
536fi
537rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538rmdir conf$$.dir 2>/dev/null
539
540if mkdir -p . 2>/dev/null; then
541 as_mkdir_p='mkdir -p "$as_dir"'
542else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545fi
546
d0ac1c44
SM
547as_test_x='test -x'
548as_executable_p=as_fn_executable_p
c971b7fa
PA
549
550# Sed expression to map a string onto a valid CPP name.
551as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553# Sed expression to map a string onto a valid variable name.
554as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
d0ac1c44
SM
557test -n "$DJDIR" || exec 7<&0 </dev/null
558exec 6>&1
c971b7fa
PA
559
560# Name of the host.
d0ac1c44 561# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
c971b7fa
PA
562# so uname gets run too.
563ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565#
566# Initializations.
567#
568ac_default_prefix=/usr/local
569ac_clean_files=
570ac_config_libobj_dir=.
571LIBOBJS=
572cross_compiling=no
573subdirs=
574MFLAGS=
575MAKEFLAGS=
576
577# Identity of this package.
d0ac1c44
SM
578PACKAGE_NAME='libgnu'
579PACKAGE_TARNAME='libgnu'
580PACKAGE_VERSION='UNUSED-VERSION'
581PACKAGE_STRING='libgnu UNUSED-VERSION'
582PACKAGE_BUGREPORT=''
583PACKAGE_URL=''
c971b7fa 584
8690e634 585ac_unique_file="import/memmem.c"
c971b7fa
PA
586# Factoring default headers for most tests.
587ac_includes_default="\
588#include <stdio.h>
589#ifdef HAVE_SYS_TYPES_H
590# include <sys/types.h>
591#endif
592#ifdef HAVE_SYS_STAT_H
593# include <sys/stat.h>
594#endif
595#ifdef STDC_HEADERS
596# include <stdlib.h>
597# include <stddef.h>
598#else
599# ifdef HAVE_STDLIB_H
600# include <stdlib.h>
601# endif
602#endif
603#ifdef HAVE_STRING_H
604# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
605# include <memory.h>
606# endif
607# include <string.h>
608#endif
609#ifdef HAVE_STRINGS_H
610# include <strings.h>
611#endif
612#ifdef HAVE_INTTYPES_H
613# include <inttypes.h>
614#endif
615#ifdef HAVE_STDINT_H
616# include <stdint.h>
617#endif
618#ifdef HAVE_UNISTD_H
619# include <unistd.h>
620#endif"
621
472fa5ee
SM
622gl_func_list=
623gl_header_list=
8690e634 624gl_fnmatch_required=POSIX
c971b7fa
PA
625ac_subst_vars='am__EXEEXT_FALSE
626am__EXEEXT_TRUE
627gltests_LTLIBOBJS
628gltests_LIBOBJS
629gl_LTLIBOBJS
630gl_LIBOBJS
631LTLIBOBJS
632LIBOBJS
633LN_S
39be3c7e
SM
634AM_BACKSLASH
635AM_DEFAULT_VERBOSITY
d0ac1c44
SM
636AM_DEFAULT_V
637AM_V
c971b7fa
PA
638am__fastdepCC_FALSE
639am__fastdepCC_TRUE
640CCDEPMODE
d0ac1c44 641am__nodep
c971b7fa
PA
642AMDEPBACKSLASH
643AMDEP_FALSE
644AMDEP_TRUE
645am__quote
646am__include
647DEPDIR
648am__untar
649am__tar
650AMTAR
651am__leading_dot
652SET_MAKE
653AWK
654mkdir_p
c971b7fa
PA
655INSTALL_STRIP_PROGRAM
656STRIP
657install_sh
658MAKEINFO
659AUTOHEADER
660AUTOMAKE
661AUTOCONF
662ACLOCAL
663VERSION
664PACKAGE
665CYGPATH_W
666am__isrc
667INSTALL_DATA
668INSTALL_SCRIPT
669INSTALL_PROGRAM
670LIBGNU_LTLIBDEPS
671LIBGNU_LIBDEPS
672gltests_WITNESS
8690e634
JK
673REPLACE_TOWLOWER
674REPLACE_ISWCNTRL
675HAVE_WCTYPE_H
676NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
677NEXT_WCTYPE_H
678HAVE_ISWCNTRL
679REPLACE_ISWBLANK
680HAVE_WCTRANS_T
681HAVE_WCTYPE_T
682HAVE_ISWBLANK
683GNULIB_TOWCTRANS
684GNULIB_WCTRANS
685GNULIB_ISWCTYPE
686GNULIB_WCTYPE
687GNULIB_ISWBLANK
688HAVE_WINT_T
689HAVE_FEATURES_H
690NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
691NEXT_WCHAR_H
8839a007
PA
692HAVE_UNISTD_H
693NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
694NEXT_UNISTD_H
4a626d0a 695UNISTD_H_DEFINES_STRUCT_TIMESPEC
09607c9e
TT
696PTHREAD_H_DEFINES_STRUCT_TIMESPEC
697SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
698TIME_H_DEFINES_STRUCT_TIMESPEC
699NEXT_AS_FIRST_DIRECTIVE_TIME_H
700NEXT_TIME_H
5e8754f9
SDJ
701REPLACE_LOCALTIME
702REPLACE_GMTIME
703REPLACE_TIMEGM
704REPLACE_NANOSLEEP
705REPLACE_MKTIME
706REPLACE_LOCALTIME_R
707HAVE_TIMEGM
708HAVE_STRPTIME
709HAVE_NANOSLEEP
710HAVE_DECL_LOCALTIME_R
711GNULIB_TIME_RZ
712GNULIB_TIME_R
713GNULIB_TIMEGM
714GNULIB_STRPTIME
715GNULIB_NANOSLEEP
716GNULIB_MKTIME
63ce7108
TT
717WINDOWS_64_BIT_OFF_T
718NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
719NEXT_SYS_TYPES_H
09607c9e 720MKDIR_P
2196f55f
YQ
721NEXT_AS_FIRST_DIRECTIVE_STRING_H
722NEXT_STRING_H
98399780
YQ
723NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
724NEXT_STDLIB_H
6a29c58e
YQ
725NEXT_AS_FIRST_DIRECTIVE_STDIO_H
726NEXT_STDIO_H
2196f55f
YQ
727NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
728NEXT_STDDEF_H
729GL_GENERATE_STDDEF_H_FALSE
730GL_GENERATE_STDDEF_H_TRUE
731STDDEF_H
732HAVE_WCHAR_T
4a626d0a 733HAVE_MAX_ALIGN_T
2196f55f
YQ
734REPLACE_NULL
735HAVE__BOOL
736GL_GENERATE_STDBOOL_H_FALSE
737GL_GENERATE_STDBOOL_H_TRUE
738STDBOOL_H
0750520d
PA
739NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
740NEXT_SIGNAL_H
741REPLACE_RAISE
742REPLACE_PTHREAD_SIGMASK
743HAVE_SIGHANDLER_T
744HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
745HAVE_STRUCT_SIGACTION_SA_SIGACTION
746HAVE_SIGACTION
747HAVE_SIGINFO_T
748HAVE_SIGSET_T
749HAVE_RAISE
750HAVE_PTHREAD_SIGMASK
751HAVE_POSIX_SIGNALBLOCKING
752GNULIB_SIGACTION
753GNULIB_SIGPROCMASK
754GNULIB_SIGNAL_H_SIGPIPE
755GNULIB_RAISE
756GNULIB_PTHREAD_SIGMASK
6a29c58e
YQ
757REPLACE_VSPRINTF
758REPLACE_VSNPRINTF
759REPLACE_VPRINTF
760REPLACE_VFPRINTF
761REPLACE_VDPRINTF
762REPLACE_VASPRINTF
763REPLACE_TMPFILE
764REPLACE_STDIO_WRITE_FUNCS
765REPLACE_STDIO_READ_FUNCS
766REPLACE_SPRINTF
767REPLACE_SNPRINTF
768REPLACE_RENAMEAT
769REPLACE_RENAME
770REPLACE_REMOVE
771REPLACE_PRINTF
772REPLACE_POPEN
773REPLACE_PERROR
774REPLACE_OBSTACK_PRINTF
775REPLACE_GETLINE
776REPLACE_GETDELIM
777REPLACE_FTELLO
778REPLACE_FTELL
779REPLACE_FSEEKO
780REPLACE_FSEEK
781REPLACE_FREOPEN
782REPLACE_FPURGE
783REPLACE_FPRINTF
784REPLACE_FOPEN
785REPLACE_FFLUSH
786REPLACE_FDOPEN
787REPLACE_FCLOSE
788REPLACE_DPRINTF
789HAVE_VDPRINTF
790HAVE_VASPRINTF
791HAVE_RENAMEAT
792HAVE_POPEN
793HAVE_PCLOSE
794HAVE_FTELLO
795HAVE_FSEEKO
796HAVE_DPRINTF
797HAVE_DECL_VSNPRINTF
798HAVE_DECL_SNPRINTF
799HAVE_DECL_OBSTACK_PRINTF
800HAVE_DECL_GETLINE
801HAVE_DECL_GETDELIM
802HAVE_DECL_FTELLO
803HAVE_DECL_FSEEKO
804HAVE_DECL_FPURGE
805GNULIB_VSPRINTF_POSIX
806GNULIB_VSNPRINTF
807GNULIB_VPRINTF_POSIX
808GNULIB_VPRINTF
809GNULIB_VFPRINTF_POSIX
810GNULIB_VFPRINTF
811GNULIB_VDPRINTF
812GNULIB_VSCANF
813GNULIB_VFSCANF
814GNULIB_VASPRINTF
815GNULIB_TMPFILE
816GNULIB_STDIO_H_SIGPIPE
817GNULIB_STDIO_H_NONBLOCKING
818GNULIB_SPRINTF_POSIX
819GNULIB_SNPRINTF
820GNULIB_SCANF
821GNULIB_RENAMEAT
822GNULIB_RENAME
823GNULIB_REMOVE
824GNULIB_PUTS
825GNULIB_PUTCHAR
826GNULIB_PUTC
827GNULIB_PRINTF_POSIX
828GNULIB_PRINTF
829GNULIB_POPEN
830GNULIB_PERROR
831GNULIB_PCLOSE
832GNULIB_OBSTACK_PRINTF_POSIX
833GNULIB_OBSTACK_PRINTF
834GNULIB_GETLINE
835GNULIB_GETDELIM
836GNULIB_GETCHAR
837GNULIB_GETC
838GNULIB_FWRITE
839GNULIB_FTELLO
840GNULIB_FTELL
841GNULIB_FSEEKO
842GNULIB_FSEEK
843GNULIB_FSCANF
844GNULIB_FREOPEN
845GNULIB_FREAD
846GNULIB_FPUTS
847GNULIB_FPUTC
848GNULIB_FPURGE
849GNULIB_FPRINTF_POSIX
850GNULIB_FPRINTF
851GNULIB_FOPEN
852GNULIB_FGETS
853GNULIB_FGETC
854GNULIB_FFLUSH
855GNULIB_FDOPEN
856GNULIB_FCLOSE
857GNULIB_DPRINTF
c971b7fa 858UNDEFINE_STRTOK_R
5e8754f9 859REPLACE_STRTOK_R
c971b7fa 860REPLACE_STRSIGNAL
5e8754f9
SDJ
861REPLACE_STRNLEN
862REPLACE_STRNDUP
863REPLACE_STRNCAT
c971b7fa
PA
864REPLACE_STRERROR_R
865REPLACE_STRERROR
5e8754f9 866REPLACE_STRCHRNUL
c971b7fa
PA
867REPLACE_STRCASESTR
868REPLACE_STRSTR
869REPLACE_STRDUP
870REPLACE_STPNCPY
871REPLACE_MEMMEM
872REPLACE_MEMCHR
873HAVE_STRVERSCMP
874HAVE_DECL_STRSIGNAL
875HAVE_DECL_STRERROR_R
876HAVE_DECL_STRTOK_R
877HAVE_STRCASESTR
878HAVE_STRSEP
879HAVE_STRPBRK
880HAVE_DECL_STRNLEN
881HAVE_DECL_STRNDUP
882HAVE_DECL_STRDUP
883HAVE_STRCHRNUL
884HAVE_STPNCPY
885HAVE_STPCPY
886HAVE_RAWMEMCHR
887HAVE_DECL_MEMRCHR
888HAVE_MEMPCPY
889HAVE_DECL_MEMMEM
890HAVE_MEMCHR
891HAVE_FFSLL
892HAVE_FFSL
893HAVE_MBSLEN
894GNULIB_STRVERSCMP
895GNULIB_STRSIGNAL
896GNULIB_STRERROR_R
897GNULIB_STRERROR
898GNULIB_MBSTOK_R
899GNULIB_MBSSEP
900GNULIB_MBSSPN
901GNULIB_MBSPBRK
902GNULIB_MBSCSPN
903GNULIB_MBSCASESTR
904GNULIB_MBSPCASECMP
905GNULIB_MBSNCASECMP
906GNULIB_MBSCASECMP
907GNULIB_MBSSTR
908GNULIB_MBSRCHR
909GNULIB_MBSCHR
910GNULIB_MBSNLEN
911GNULIB_MBSLEN
912GNULIB_STRTOK_R
913GNULIB_STRCASESTR
914GNULIB_STRSTR
915GNULIB_STRSEP
916GNULIB_STRPBRK
917GNULIB_STRNLEN
918GNULIB_STRNDUP
919GNULIB_STRNCAT
920GNULIB_STRDUP
921GNULIB_STRCHRNUL
922GNULIB_STPNCPY
923GNULIB_STPCPY
924GNULIB_RAWMEMCHR
925GNULIB_MEMRCHR
926GNULIB_MEMPCPY
927GNULIB_MEMMEM
928GNULIB_MEMCHR
929GNULIB_FFSLL
930GNULIB_FFSL
8690e634
JK
931LOCALE_FR
932LOCALE_FR_UTF8
933LOCALE_ZH_CN
934LOCALE_JA
935REPLACE_WCSWIDTH
936REPLACE_WCWIDTH
937REPLACE_WCSNRTOMBS
938REPLACE_WCSRTOMBS
939REPLACE_WCRTOMB
940REPLACE_MBSNRTOWCS
941REPLACE_MBSRTOWCS
942REPLACE_MBRLEN
943REPLACE_MBRTOWC
944REPLACE_MBSINIT
945REPLACE_WCTOB
946REPLACE_BTOWC
947REPLACE_MBSTATE_T
948HAVE_DECL_WCWIDTH
949HAVE_DECL_WCTOB
950HAVE_WCSWIDTH
951HAVE_WCSTOK
952HAVE_WCSSTR
953HAVE_WCSPBRK
954HAVE_WCSSPN
955HAVE_WCSCSPN
956HAVE_WCSRCHR
957HAVE_WCSCHR
958HAVE_WCSDUP
959HAVE_WCSXFRM
960HAVE_WCSCOLL
961HAVE_WCSNCASECMP
962HAVE_WCSCASECMP
963HAVE_WCSNCMP
964HAVE_WCSCMP
965HAVE_WCSNCAT
966HAVE_WCSCAT
967HAVE_WCPNCPY
968HAVE_WCSNCPY
969HAVE_WCPCPY
970HAVE_WCSCPY
971HAVE_WCSNLEN
972HAVE_WCSLEN
973HAVE_WMEMSET
974HAVE_WMEMMOVE
975HAVE_WMEMCPY
976HAVE_WMEMCMP
977HAVE_WMEMCHR
978HAVE_WCSNRTOMBS
979HAVE_WCSRTOMBS
980HAVE_WCRTOMB
981HAVE_MBSNRTOWCS
982HAVE_MBSRTOWCS
983HAVE_MBRLEN
984HAVE_MBRTOWC
985HAVE_MBSINIT
986HAVE_BTOWC
987GNULIB_WCSWIDTH
988GNULIB_WCSTOK
989GNULIB_WCSSTR
990GNULIB_WCSPBRK
991GNULIB_WCSSPN
992GNULIB_WCSCSPN
993GNULIB_WCSRCHR
994GNULIB_WCSCHR
995GNULIB_WCSDUP
996GNULIB_WCSXFRM
997GNULIB_WCSCOLL
998GNULIB_WCSNCASECMP
999GNULIB_WCSCASECMP
1000GNULIB_WCSNCMP
1001GNULIB_WCSCMP
1002GNULIB_WCSNCAT
1003GNULIB_WCSCAT
1004GNULIB_WCPNCPY
1005GNULIB_WCSNCPY
1006GNULIB_WCPCPY
1007GNULIB_WCSCPY
1008GNULIB_WCSNLEN
1009GNULIB_WCSLEN
1010GNULIB_WMEMSET
1011GNULIB_WMEMMOVE
1012GNULIB_WMEMCPY
1013GNULIB_WMEMCMP
1014GNULIB_WMEMCHR
1015GNULIB_WCWIDTH
1016GNULIB_WCSNRTOMBS
1017GNULIB_WCSRTOMBS
1018GNULIB_WCRTOMB
1019GNULIB_MBSNRTOWCS
1020GNULIB_MBSRTOWCS
1021GNULIB_MBRLEN
1022GNULIB_MBRTOWC
1023GNULIB_MBSINIT
1024GNULIB_WCTOB
1025GNULIB_BTOWC
88b48903
WN
1026NEXT_AS_FIRST_DIRECTIVE_MATH_H
1027NEXT_MATH_H
8690e634 1028LOCALCHARSET_TESTS_ENVIRONMENT
5e8754f9 1029GLIBC21
c971b7fa
PA
1030NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
1031NEXT_INTTYPES_H
1032UINT64_MAX_EQ_ULONG_MAX
1033UINT32_MAX_LT_UINTMAX_MAX
1034PRIPTR_PREFIX
1035PRI_MACROS_BROKEN
1036INT64_MAX_EQ_LONG_MAX
1037INT32_MAX_LT_INTMAX_MAX
4a626d0a 1038REPLACE_STRTOUMAX
c971b7fa
PA
1039REPLACE_STRTOIMAX
1040HAVE_DECL_STRTOUMAX
1041HAVE_DECL_STRTOIMAX
1042HAVE_DECL_IMAXDIV
1043HAVE_DECL_IMAXABS
1044GNULIB_STRTOUMAX
1045GNULIB_STRTOIMAX
1046GNULIB_IMAXDIV
1047GNULIB_IMAXABS
1048GL_GENERATE_STDINT_H_FALSE
1049GL_GENERATE_STDINT_H_TRUE
1050STDINT_H
49e4877c
PA
1051HAVE_SYS_INTTYPES_H
1052HAVE_SYS_BITYPES_H
1053HAVE_C99_STDINT_H
c971b7fa
PA
1054WINT_T_SUFFIX
1055WCHAR_T_SUFFIX
1056SIG_ATOMIC_T_SUFFIX
1057SIZE_T_SUFFIX
1058PTRDIFF_T_SUFFIX
1059HAVE_SIGNED_WINT_T
1060HAVE_SIGNED_WCHAR_T
1061HAVE_SIGNED_SIG_ATOMIC_T
1062BITSIZEOF_WINT_T
1063BITSIZEOF_WCHAR_T
1064BITSIZEOF_SIG_ATOMIC_T
1065BITSIZEOF_SIZE_T
1066BITSIZEOF_PTRDIFF_T
1067APPLE_UNIVERSAL_BUILD
c971b7fa
PA
1068HAVE_STDINT_H
1069NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1070NEXT_STDINT_H
c971b7fa
PA
1071HAVE_SYS_TYPES_H
1072HAVE_INTTYPES_H
1073HAVE_WCHAR_H
1074HAVE_UNSIGNED_LONG_LONG_INT
1075HAVE_LONG_LONG_INT
49e4877c
PA
1076GL_GENERATE_LIMITS_H_FALSE
1077GL_GENERATE_LIMITS_H_TRUE
1078LIMITS_H
1079NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
1080NEXT_LIMITS_H
5e8754f9 1081HAVE_SYS_CDEFS_H
6ec2e0f5
SDJ
1082GL_GENERATE_GLOB_H_FALSE
1083GL_GENERATE_GLOB_H_TRUE
1084GLOB_H
4a626d0a
PA
1085NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1086NEXT_SYS_TIME_H
1087REPLACE_STRUCT_TIMEVAL
1088REPLACE_GETTIMEOFDAY
5e8754f9 1089HAVE_TIMEZONE_T
4a626d0a
PA
1090HAVE_SYS_TIME_H
1091HAVE_STRUCT_TIMEVAL
1092HAVE_GETTIMEOFDAY
1093GNULIB_GETTIMEOFDAY
6ec2e0f5
SDJ
1094LTLIBINTL
1095LIBINTL
1096WINDOWS_64_BIT_ST_SIZE
1097NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1098NEXT_SYS_STAT_H
1099REPLACE_UTIMENSAT
1100REPLACE_STAT
1101REPLACE_MKNOD
1102REPLACE_MKFIFO
1103REPLACE_MKDIR
1104REPLACE_LSTAT
1105REPLACE_FUTIMENS
1106REPLACE_FSTATAT
1107REPLACE_FSTAT
1108HAVE_UTIMENSAT
1109HAVE_MKNODAT
1110HAVE_MKNOD
1111HAVE_MKFIFOAT
1112HAVE_MKFIFO
1113HAVE_MKDIRAT
1114HAVE_LSTAT
1115HAVE_LCHMOD
1116HAVE_FUTIMENS
1117HAVE_FSTATAT
1118HAVE_FCHMODAT
1119GNULIB_UTIMENSAT
1120GNULIB_STAT
1121GNULIB_MKNODAT
1122GNULIB_MKNOD
1123GNULIB_MKFIFOAT
1124GNULIB_MKFIFO
1125GNULIB_MKDIRAT
1126GNULIB_LSTAT
1127GNULIB_LCHMOD
1128GNULIB_FUTIMENS
1129GNULIB_FSTATAT
1130GNULIB_FSTAT
1131GNULIB_FCHMODAT
88b48903
WN
1132FREXPL_LIBM
1133HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1134FREXP_LIBM
1135REPLACE_TRUNCL
1136REPLACE_TRUNCF
1137REPLACE_TRUNC
1138REPLACE_SQRTL
1139REPLACE_SIGNBIT_USING_GCC
1140REPLACE_SIGNBIT
1141REPLACE_ROUNDL
1142REPLACE_ROUNDF
1143REPLACE_ROUND
1144REPLACE_REMAINDERL
1145REPLACE_REMAINDERF
1146REPLACE_REMAINDER
1147REPLACE_NAN
1148REPLACE_MODFL
1149REPLACE_MODFF
1150REPLACE_MODF
1151REPLACE_LOGBL
1152REPLACE_LOGBF
1153REPLACE_LOGB
1154REPLACE_LOG2L
1155REPLACE_LOG2F
1156REPLACE_LOG2
1157REPLACE_LOG1PL
1158REPLACE_LOG1PF
1159REPLACE_LOG1P
1160REPLACE_LOG10L
1161REPLACE_LOG10F
1162REPLACE_LOG10
1163REPLACE_LOGL
1164REPLACE_LOGF
1165REPLACE_LOG
1166REPLACE_LDEXPL
1167REPLACE_ISNAN
1168REPLACE_ISINF
1169REPLACE_ISFINITE
1170REPLACE_ILOGBF
1171REPLACE_ILOGB
1172REPLACE_HYPOTL
1173REPLACE_HYPOTF
1174REPLACE_HYPOT
1175REPLACE_HUGE_VAL
1176REPLACE_FREXPL
1177REPLACE_FREXP
1178REPLACE_FREXPF
1179REPLACE_FMODL
1180REPLACE_FMODF
1181REPLACE_FMOD
1182REPLACE_FMAL
1183REPLACE_FMAF
1184REPLACE_FMA
1185REPLACE_FLOORL
1186REPLACE_FLOORF
1187REPLACE_FLOOR
1188REPLACE_FABSL
1189REPLACE_EXP2L
1190REPLACE_EXP2
1191REPLACE_EXPM1F
1192REPLACE_EXPM1
1193REPLACE_CEILL
1194REPLACE_CEILF
1195REPLACE_CEIL
1196REPLACE_CBRTL
1197REPLACE_CBRTF
1198HAVE_DECL_TRUNCL
1199HAVE_DECL_TRUNCF
1200HAVE_DECL_TRUNC
1201HAVE_DECL_TANL
1202HAVE_DECL_SQRTL
1203HAVE_DECL_SINL
1204HAVE_DECL_ROUNDL
1205HAVE_DECL_ROUNDF
1206HAVE_DECL_ROUND
1207HAVE_DECL_RINTF
1208HAVE_DECL_REMAINDERL
1209HAVE_DECL_REMAINDER
1210HAVE_DECL_LOGB
1211HAVE_DECL_LOG2L
1212HAVE_DECL_LOG2F
1213HAVE_DECL_LOG2
1214HAVE_DECL_LOG10L
1215HAVE_DECL_LOGL
1216HAVE_DECL_LDEXPL
1217HAVE_DECL_FREXPL
1218HAVE_DECL_FLOORL
1219HAVE_DECL_FLOORF
1220HAVE_DECL_EXPM1L
1221HAVE_DECL_EXP2L
1222HAVE_DECL_EXP2F
1223HAVE_DECL_EXP2
1224HAVE_DECL_EXPL
1225HAVE_DECL_COSL
1226HAVE_DECL_COPYSIGNF
1227HAVE_DECL_CEILL
1228HAVE_DECL_CEILF
1229HAVE_DECL_CBRTL
1230HAVE_DECL_CBRTF
1231HAVE_DECL_ATANL
1232HAVE_DECL_ASINL
1233HAVE_DECL_ACOSL
1234HAVE_TANHF
1235HAVE_TANL
1236HAVE_TANF
1237HAVE_SQRTL
1238HAVE_SQRTF
1239HAVE_SINHF
1240HAVE_SINL
1241HAVE_SINF
1242HAVE_RINTL
1243HAVE_RINT
1244HAVE_REMAINDERF
1245HAVE_REMAINDER
1246HAVE_POWF
1247HAVE_MODFL
1248HAVE_MODFF
1249HAVE_LOGBL
1250HAVE_LOGBF
1251HAVE_LOG1PL
1252HAVE_LOG1PF
1253HAVE_LOG1P
1254HAVE_LOG10L
1255HAVE_LOG10F
1256HAVE_LOGL
1257HAVE_LOGF
1258HAVE_LDEXPF
1259HAVE_ISNANL
1260HAVE_ISNAND
1261HAVE_ISNANF
1262HAVE_ILOGBL
1263HAVE_ILOGBF
1264HAVE_ILOGB
1265HAVE_HYPOTL
1266HAVE_HYPOTF
1267HAVE_FREXPF
1268HAVE_FMODL
1269HAVE_FMODF
1270HAVE_FMAL
1271HAVE_FMAF
1272HAVE_FMA
1273HAVE_FABSL
1274HAVE_FABSF
1275HAVE_EXPM1F
1276HAVE_EXPM1
1277HAVE_EXPL
1278HAVE_EXPF
1279HAVE_COSHF
1280HAVE_COSL
1281HAVE_COSF
1282HAVE_COPYSIGNL
1283HAVE_COPYSIGN
1284HAVE_CBRTL
1285HAVE_CBRTF
1286HAVE_CBRT
1287HAVE_ATAN2F
1288HAVE_ATANL
1289HAVE_ATANF
1290HAVE_ASINL
1291HAVE_ASINF
1292HAVE_ACOSL
1293HAVE_ACOSF
1294GNULIB_TRUNCL
1295GNULIB_TRUNCF
1296GNULIB_TRUNC
1297GNULIB_TANHF
1298GNULIB_TANL
1299GNULIB_TANF
1300GNULIB_SQRTL
1301GNULIB_SQRTF
1302GNULIB_SINHF
1303GNULIB_SINL
1304GNULIB_SINF
1305GNULIB_SIGNBIT
1306GNULIB_ROUNDL
1307GNULIB_ROUNDF
1308GNULIB_ROUND
1309GNULIB_RINTL
1310GNULIB_RINTF
1311GNULIB_RINT
1312GNULIB_REMAINDERL
1313GNULIB_REMAINDERF
1314GNULIB_REMAINDER
1315GNULIB_POWF
1316GNULIB_MODFL
1317GNULIB_MODFF
1318GNULIB_MODF
1319GNULIB_LOGBL
1320GNULIB_LOGBF
1321GNULIB_LOGB
1322GNULIB_LOG2L
1323GNULIB_LOG2F
1324GNULIB_LOG2
1325GNULIB_LOG1PL
1326GNULIB_LOG1PF
1327GNULIB_LOG1P
1328GNULIB_LOG10L
1329GNULIB_LOG10F
1330GNULIB_LOG10
1331GNULIB_LOGL
1332GNULIB_LOGF
1333GNULIB_LOG
1334GNULIB_LDEXPL
1335GNULIB_LDEXPF
1336GNULIB_ISNANL
1337GNULIB_ISNAND
1338GNULIB_ISNANF
1339GNULIB_ISNAN
1340GNULIB_ISINF
1341GNULIB_ISFINITE
1342GNULIB_ILOGBL
1343GNULIB_ILOGBF
1344GNULIB_ILOGB
1345GNULIB_HYPOTL
1346GNULIB_HYPOTF
1347GNULIB_HYPOT
1348GNULIB_FREXPL
1349GNULIB_FREXP
1350GNULIB_FREXPF
1351GNULIB_FMODL
1352GNULIB_FMODF
1353GNULIB_FMOD
1354GNULIB_FMAL
1355GNULIB_FMAF
1356GNULIB_FMA
1357GNULIB_FLOORL
1358GNULIB_FLOORF
1359GNULIB_FLOOR
1360GNULIB_FABSL
1361GNULIB_FABSF
1362GNULIB_EXPM1L
1363GNULIB_EXPM1F
1364GNULIB_EXPM1
1365GNULIB_EXP2L
1366GNULIB_EXP2F
1367GNULIB_EXP2
1368GNULIB_EXPL
1369GNULIB_EXPF
1370GNULIB_COSHF
1371GNULIB_COSL
1372GNULIB_COSF
1373GNULIB_COPYSIGNL
1374GNULIB_COPYSIGNF
1375GNULIB_COPYSIGN
1376GNULIB_CEILL
1377GNULIB_CEILF
1378GNULIB_CEIL
1379GNULIB_CBRTL
1380GNULIB_CBRTF
1381GNULIB_CBRT
1382GNULIB_ATAN2F
1383GNULIB_ATANL
1384GNULIB_ATANF
1385GNULIB_ASINL
1386GNULIB_ASINF
1387GNULIB_ACOSL
1388GNULIB_ACOSF
8690e634
JK
1389GL_GENERATE_FNMATCH_H_FALSE
1390GL_GENERATE_FNMATCH_H_TRUE
1391FNMATCH_H
88b48903
WN
1392REPLACE_ITOLD
1393GL_GENERATE_FLOAT_H_FALSE
1394GL_GENERATE_FLOAT_H_TRUE
1395FLOAT_H
1396NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1397NEXT_FLOAT_H
6ec2e0f5
SDJ
1398NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1399NEXT_FCNTL_H
1400REPLACE_OPENAT
1401REPLACE_OPEN
1402REPLACE_FCNTL
1403HAVE_OPENAT
1404HAVE_FCNTL
1405GNULIB_OPENAT
1406GNULIB_OPEN
1407GNULIB_NONBLOCKING
1408GNULIB_FCNTL
18848e28
GF
1409EOVERFLOW_VALUE
1410EOVERFLOW_HIDDEN
1411ENOLINK_VALUE
1412ENOLINK_HIDDEN
1413EMULTIHOP_VALUE
1414EMULTIHOP_HIDDEN
1415GL_GENERATE_ERRNO_H_FALSE
1416GL_GENERATE_ERRNO_H_TRUE
1417ERRNO_H
1418NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1419NEXT_ERRNO_H
e26b6bb0
TT
1420HAVE_DIRENT_H
1421NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1422NEXT_DIRENT_H
88b48903
WN
1423PRAGMA_COLUMNS
1424PRAGMA_SYSTEM_HEADER
1425INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1426INCLUDE_NEXT
5e8754f9
SDJ
1427pkglibexecdir
1428runstatedir
1429lispdir
e26b6bb0
TT
1430REPLACE_FDOPENDIR
1431REPLACE_DIRFD
1432REPLACE_CLOSEDIR
1433REPLACE_OPENDIR
1434HAVE_ALPHASORT
1435HAVE_SCANDIR
1436HAVE_FDOPENDIR
1437HAVE_DECL_FDOPENDIR
1438HAVE_DECL_DIRFD
1439HAVE_CLOSEDIR
1440HAVE_REWINDDIR
1441HAVE_READDIR
1442HAVE_OPENDIR
1443GNULIB_ALPHASORT
1444GNULIB_SCANDIR
1445GNULIB_FDOPENDIR
1446GNULIB_DIRFD
1447GNULIB_CLOSEDIR
1448GNULIB_REWINDDIR
1449GNULIB_READDIR
1450GNULIB_OPENDIR
6ec2e0f5
SDJ
1451HAVE_WINSOCK2_H
1452HAVE_MSVC_INVALID_PARAMETER_HANDLER
e26b6bb0
TT
1453UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1454UNISTD_H_HAVE_WINSOCK2_H
1455REPLACE_WRITE
1456REPLACE_USLEEP
1457REPLACE_UNLINKAT
1458REPLACE_UNLINK
1459REPLACE_TTYNAME_R
4a626d0a 1460REPLACE_SYMLINKAT
e26b6bb0
TT
1461REPLACE_SYMLINK
1462REPLACE_SLEEP
1463REPLACE_RMDIR
4a626d0a 1464REPLACE_READLINKAT
e26b6bb0
TT
1465REPLACE_READLINK
1466REPLACE_READ
1467REPLACE_PWRITE
1468REPLACE_PREAD
1469REPLACE_LSEEK
1470REPLACE_LINKAT
1471REPLACE_LINK
1472REPLACE_LCHOWN
1473REPLACE_ISATTY
1474REPLACE_GETPAGESIZE
1475REPLACE_GETGROUPS
1476REPLACE_GETLOGIN_R
4a626d0a 1477REPLACE_GETDTABLESIZE
e26b6bb0
TT
1478REPLACE_GETDOMAINNAME
1479REPLACE_GETCWD
1480REPLACE_FTRUNCATE
1481REPLACE_FCHOWNAT
1482REPLACE_DUP2
1483REPLACE_DUP
1484REPLACE_CLOSE
1485REPLACE_CHOWN
1486HAVE_SYS_PARAM_H
1487HAVE_OS_H
1488HAVE_DECL_TTYNAME_R
1489HAVE_DECL_SETHOSTNAME
1490HAVE_DECL_GETUSERSHELL
1491HAVE_DECL_GETPAGESIZE
1492HAVE_DECL_GETLOGIN_R
1493HAVE_DECL_GETDOMAINNAME
1494HAVE_DECL_FDATASYNC
1495HAVE_DECL_FCHDIR
1496HAVE_DECL_ENVIRON
1497HAVE_USLEEP
1498HAVE_UNLINKAT
1499HAVE_SYMLINKAT
1500HAVE_SYMLINK
1501HAVE_SLEEP
1502HAVE_SETHOSTNAME
1503HAVE_READLINKAT
1504HAVE_READLINK
1505HAVE_PWRITE
1506HAVE_PREAD
1507HAVE_PIPE2
1508HAVE_PIPE
1509HAVE_LINKAT
1510HAVE_LINK
1511HAVE_LCHOWN
1512HAVE_GROUP_MEMBER
1513HAVE_GETPAGESIZE
1514HAVE_GETLOGIN
1515HAVE_GETHOSTNAME
1516HAVE_GETGROUPS
1517HAVE_GETDTABLESIZE
1518HAVE_FTRUNCATE
1519HAVE_FSYNC
1520HAVE_FDATASYNC
1521HAVE_FCHOWNAT
1522HAVE_FCHDIR
1523HAVE_FACCESSAT
1524HAVE_EUIDACCESS
1525HAVE_DUP3
1526HAVE_DUP2
1527HAVE_CHOWN
1528GNULIB_WRITE
1529GNULIB_USLEEP
1530GNULIB_UNLINKAT
1531GNULIB_UNLINK
1532GNULIB_UNISTD_H_SIGPIPE
1533GNULIB_UNISTD_H_NONBLOCKING
1534GNULIB_TTYNAME_R
1535GNULIB_SYMLINKAT
1536GNULIB_SYMLINK
1537GNULIB_SLEEP
1538GNULIB_SETHOSTNAME
1539GNULIB_RMDIR
1540GNULIB_READLINKAT
1541GNULIB_READLINK
1542GNULIB_READ
1543GNULIB_PWRITE
1544GNULIB_PREAD
1545GNULIB_PIPE2
1546GNULIB_PIPE
1547GNULIB_LSEEK
1548GNULIB_LINKAT
1549GNULIB_LINK
1550GNULIB_LCHOWN
1551GNULIB_ISATTY
1552GNULIB_GROUP_MEMBER
1553GNULIB_GETUSERSHELL
1554GNULIB_GETPAGESIZE
1555GNULIB_GETLOGIN_R
1556GNULIB_GETLOGIN
1557GNULIB_GETHOSTNAME
1558GNULIB_GETGROUPS
1559GNULIB_GETDTABLESIZE
1560GNULIB_GETDOMAINNAME
1561GNULIB_GETCWD
1562GNULIB_FTRUNCATE
1563GNULIB_FSYNC
1564GNULIB_FDATASYNC
1565GNULIB_FCHOWNAT
1566GNULIB_FCHDIR
1567GNULIB_FACCESSAT
1568GNULIB_EUIDACCESS
1569GNULIB_ENVIRON
1570GNULIB_DUP3
1571GNULIB_DUP2
1572GNULIB_DUP
1573GNULIB_CLOSE
1574GNULIB_CHOWN
1575GNULIB_CHDIR
98399780
YQ
1576REPLACE_WCTOMB
1577REPLACE_UNSETENV
1578REPLACE_STRTOD
1579REPLACE_SETENV
1580REPLACE_REALPATH
1581REPLACE_REALLOC
1582REPLACE_RANDOM_R
4a626d0a 1583REPLACE_QSORT_R
98399780
YQ
1584REPLACE_PUTENV
1585REPLACE_PTSNAME_R
1586REPLACE_PTSNAME
1587REPLACE_MKSTEMP
1588REPLACE_MBTOWC
1589REPLACE_MALLOC
1590REPLACE_CANONICALIZE_FILE_NAME
1591REPLACE_CALLOC
1592HAVE_DECL_UNSETENV
1593HAVE_UNLOCKPT
1594HAVE_SYS_LOADAVG_H
1595HAVE_STRUCT_RANDOM_DATA
1596HAVE_STRTOULL
1597HAVE_STRTOLL
1598HAVE_STRTOD
1599HAVE_DECL_SETENV
1600HAVE_SETENV
4a626d0a 1601HAVE_SECURE_GETENV
98399780
YQ
1602HAVE_RPMATCH
1603HAVE_REALPATH
1604HAVE_RANDOM_R
1605HAVE_RANDOM_H
1606HAVE_RANDOM
4c62b19f 1607HAVE_QSORT_R
98399780
YQ
1608HAVE_PTSNAME_R
1609HAVE_PTSNAME
1610HAVE_POSIX_OPENPT
1611HAVE_MKSTEMPS
1612HAVE_MKSTEMP
1613HAVE_MKOSTEMPS
1614HAVE_MKOSTEMP
1615HAVE_MKDTEMP
1616HAVE_GRANTPT
1617HAVE_GETSUBOPT
1618HAVE_DECL_GETLOADAVG
1619HAVE_CANONICALIZE_FILE_NAME
1620HAVE_ATOLL
1621HAVE__EXIT
1622GNULIB_WCTOMB
1623GNULIB_UNSETENV
1624GNULIB_UNLOCKPT
1625GNULIB_SYSTEM_POSIX
1626GNULIB_STRTOULL
1627GNULIB_STRTOLL
1628GNULIB_STRTOD
1629GNULIB_SETENV
4a626d0a 1630GNULIB_SECURE_GETENV
98399780
YQ
1631GNULIB_RPMATCH
1632GNULIB_REALPATH
1633GNULIB_REALLOC_POSIX
1634GNULIB_RANDOM_R
1635GNULIB_RANDOM
4a626d0a 1636GNULIB_QSORT_R
98399780
YQ
1637GNULIB_PUTENV
1638GNULIB_PTSNAME_R
1639GNULIB_PTSNAME
1640GNULIB_POSIX_OPENPT
1641GNULIB_MKSTEMPS
1642GNULIB_MKSTEMP
1643GNULIB_MKOSTEMPS
1644GNULIB_MKOSTEMP
1645GNULIB_MKDTEMP
1646GNULIB_MBTOWC
1647GNULIB_MALLOC_POSIX
1648GNULIB_GRANTPT
1649GNULIB_GETSUBOPT
1650GNULIB_GETLOADAVG
1651GNULIB_CANONICALIZE_FILE_NAME
1652GNULIB_CALLOC_POSIX
1653GNULIB_ATOLL
1654GNULIB__EXIT
8690e634
JK
1655GL_GENERATE_ALLOCA_H_FALSE
1656GL_GENERATE_ALLOCA_H_TRUE
1657ALLOCA_H
1658ALLOCA
c971b7fa
PA
1659GL_COND_LIBTOOL_FALSE
1660GL_COND_LIBTOOL_TRUE
1661target_os
1662target_vendor
1663target_cpu
1664target
c971b7fa
PA
1665host_os
1666host_vendor
1667host_cpu
1668host
1669build_os
1670build_vendor
1671build_cpu
1672build
4a626d0a
PA
1673RANLIB
1674ARFLAGS
5e8754f9 1675ac_ct_AR
4a626d0a
PA
1676AR
1677EGREP
1678GREP
1679CPP
c971b7fa
PA
1680OBJEXT
1681EXEEXT
1682ac_ct_CC
1683CPPFLAGS
1684LDFLAGS
1685CFLAGS
1686CC
1687MAINT
1688MAINTAINER_MODE_FALSE
1689MAINTAINER_MODE_TRUE
1690target_alias
1691host_alias
1692build_alias
1693LIBS
1694ECHO_T
1695ECHO_N
1696ECHO_C
1697DEFS
1698mandir
1699localedir
1700libdir
1701psdir
1702pdfdir
1703dvidir
1704htmldir
1705infodir
1706docdir
1707oldincludedir
1708includedir
1709localstatedir
1710sharedstatedir
1711sysconfdir
1712datadir
1713datarootdir
1714libexecdir
1715sbindir
1716bindir
1717program_transform_name
1718prefix
1719exec_prefix
1720PACKAGE_URL
1721PACKAGE_BUGREPORT
1722PACKAGE_STRING
1723PACKAGE_VERSION
1724PACKAGE_TARNAME
1725PACKAGE_NAME
1726PATH_SEPARATOR
1727SHELL'
1728ac_subst_files=''
1729ac_user_opts='
1730enable_option_checking
1731enable_maintainer_mode
2196f55f 1732enable_largefile
c971b7fa 1733enable_dependency_tracking
39be3c7e 1734enable_silent_rules
c971b7fa
PA
1735'
1736 ac_precious_vars='build_alias
1737host_alias
1738target_alias
1739CC
1740CFLAGS
1741LDFLAGS
1742LIBS
1743CPPFLAGS
1744CPP'
1745
1746
1747# Initialize some variables set by options.
1748ac_init_help=
1749ac_init_version=false
1750ac_unrecognized_opts=
1751ac_unrecognized_sep=
1752# The variables have the same names as the options, with
1753# dashes changed to underlines.
1754cache_file=/dev/null
1755exec_prefix=NONE
1756no_create=
1757no_recursion=
1758prefix=NONE
1759program_prefix=NONE
1760program_suffix=NONE
1761program_transform_name=s,x,x,
1762silent=
1763site=
1764srcdir=
1765verbose=
1766x_includes=NONE
1767x_libraries=NONE
1768
1769# Installation directory options.
1770# These are left unexpanded so users can "make install exec_prefix=/foo"
1771# and all the variables that are supposed to be based on exec_prefix
1772# by default will actually change.
1773# Use braces instead of parens because sh, perl, etc. also accept them.
1774# (The list follows the same order as the GNU Coding Standards.)
1775bindir='${exec_prefix}/bin'
1776sbindir='${exec_prefix}/sbin'
1777libexecdir='${exec_prefix}/libexec'
1778datarootdir='${prefix}/share'
1779datadir='${datarootdir}'
1780sysconfdir='${prefix}/etc'
1781sharedstatedir='${prefix}/com'
1782localstatedir='${prefix}/var'
1783includedir='${prefix}/include'
1784oldincludedir='/usr/include'
d0ac1c44 1785docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
c971b7fa
PA
1786infodir='${datarootdir}/info'
1787htmldir='${docdir}'
1788dvidir='${docdir}'
1789pdfdir='${docdir}'
1790psdir='${docdir}'
1791libdir='${exec_prefix}/lib'
1792localedir='${datarootdir}/locale'
1793mandir='${datarootdir}/man'
1794
1795ac_prev=
1796ac_dashdash=
1797for ac_option
1798do
1799 # If the previous option needs an argument, assign it.
1800 if test -n "$ac_prev"; then
1801 eval $ac_prev=\$ac_option
1802 ac_prev=
1803 continue
1804 fi
1805
1806 case $ac_option in
d0ac1c44
SM
1807 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1808 *=) ac_optarg= ;;
1809 *) ac_optarg=yes ;;
c971b7fa
PA
1810 esac
1811
1812 # Accept the important Cygnus configure options, so we can diagnose typos.
1813
1814 case $ac_dashdash$ac_option in
1815 --)
1816 ac_dashdash=yes ;;
1817
1818 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1819 ac_prev=bindir ;;
1820 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1821 bindir=$ac_optarg ;;
1822
1823 -build | --build | --buil | --bui | --bu)
1824 ac_prev=build_alias ;;
1825 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1826 build_alias=$ac_optarg ;;
1827
1828 -cache-file | --cache-file | --cache-fil | --cache-fi \
1829 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1830 ac_prev=cache_file ;;
1831 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1832 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1833 cache_file=$ac_optarg ;;
1834
1835 --config-cache | -C)
1836 cache_file=config.cache ;;
1837
1838 -datadir | --datadir | --datadi | --datad)
1839 ac_prev=datadir ;;
1840 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1841 datadir=$ac_optarg ;;
1842
1843 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1844 | --dataroo | --dataro | --datar)
1845 ac_prev=datarootdir ;;
1846 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1847 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1848 datarootdir=$ac_optarg ;;
1849
1850 -disable-* | --disable-*)
1851 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1852 # Reject names that are not valid shell variable names.
1853 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1854 as_fn_error $? "invalid feature name: $ac_useropt"
c971b7fa
PA
1855 ac_useropt_orig=$ac_useropt
1856 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1857 case $ac_user_opts in
1858 *"
1859"enable_$ac_useropt"
1860"*) ;;
1861 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1862 ac_unrecognized_sep=', ';;
1863 esac
1864 eval enable_$ac_useropt=no ;;
1865
1866 -docdir | --docdir | --docdi | --doc | --do)
1867 ac_prev=docdir ;;
1868 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1869 docdir=$ac_optarg ;;
1870
1871 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1872 ac_prev=dvidir ;;
1873 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1874 dvidir=$ac_optarg ;;
1875
1876 -enable-* | --enable-*)
1877 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1878 # Reject names that are not valid shell variable names.
1879 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1880 as_fn_error $? "invalid feature name: $ac_useropt"
c971b7fa
PA
1881 ac_useropt_orig=$ac_useropt
1882 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1883 case $ac_user_opts in
1884 *"
1885"enable_$ac_useropt"
1886"*) ;;
1887 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1888 ac_unrecognized_sep=', ';;
1889 esac
1890 eval enable_$ac_useropt=\$ac_optarg ;;
1891
1892 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1893 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1894 | --exec | --exe | --ex)
1895 ac_prev=exec_prefix ;;
1896 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1897 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1898 | --exec=* | --exe=* | --ex=*)
1899 exec_prefix=$ac_optarg ;;
1900
1901 -gas | --gas | --ga | --g)
1902 # Obsolete; use --with-gas.
1903 with_gas=yes ;;
1904
1905 -help | --help | --hel | --he | -h)
1906 ac_init_help=long ;;
1907 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1908 ac_init_help=recursive ;;
1909 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1910 ac_init_help=short ;;
1911
1912 -host | --host | --hos | --ho)
1913 ac_prev=host_alias ;;
1914 -host=* | --host=* | --hos=* | --ho=*)
1915 host_alias=$ac_optarg ;;
1916
1917 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1918 ac_prev=htmldir ;;
1919 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1920 | --ht=*)
1921 htmldir=$ac_optarg ;;
1922
1923 -includedir | --includedir | --includedi | --included | --include \
1924 | --includ | --inclu | --incl | --inc)
1925 ac_prev=includedir ;;
1926 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1927 | --includ=* | --inclu=* | --incl=* | --inc=*)
1928 includedir=$ac_optarg ;;
1929
1930 -infodir | --infodir | --infodi | --infod | --info | --inf)
1931 ac_prev=infodir ;;
1932 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1933 infodir=$ac_optarg ;;
1934
1935 -libdir | --libdir | --libdi | --libd)
1936 ac_prev=libdir ;;
1937 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1938 libdir=$ac_optarg ;;
1939
1940 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1941 | --libexe | --libex | --libe)
1942 ac_prev=libexecdir ;;
1943 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1944 | --libexe=* | --libex=* | --libe=*)
1945 libexecdir=$ac_optarg ;;
1946
1947 -localedir | --localedir | --localedi | --localed | --locale)
1948 ac_prev=localedir ;;
1949 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1950 localedir=$ac_optarg ;;
1951
1952 -localstatedir | --localstatedir | --localstatedi | --localstated \
1953 | --localstate | --localstat | --localsta | --localst | --locals)
1954 ac_prev=localstatedir ;;
1955 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1956 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1957 localstatedir=$ac_optarg ;;
1958
1959 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1960 ac_prev=mandir ;;
1961 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1962 mandir=$ac_optarg ;;
1963
1964 -nfp | --nfp | --nf)
1965 # Obsolete; use --without-fp.
1966 with_fp=no ;;
1967
1968 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1969 | --no-cr | --no-c | -n)
1970 no_create=yes ;;
1971
1972 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1973 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1974 no_recursion=yes ;;
1975
1976 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1977 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1978 | --oldin | --oldi | --old | --ol | --o)
1979 ac_prev=oldincludedir ;;
1980 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1981 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1982 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1983 oldincludedir=$ac_optarg ;;
1984
1985 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1986 ac_prev=prefix ;;
1987 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1988 prefix=$ac_optarg ;;
1989
1990 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1991 | --program-pre | --program-pr | --program-p)
1992 ac_prev=program_prefix ;;
1993 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1994 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1995 program_prefix=$ac_optarg ;;
1996
1997 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1998 | --program-suf | --program-su | --program-s)
1999 ac_prev=program_suffix ;;
2000 -program-suffix=* | --program-suffix=* | --program-suffi=* \
2001 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2002 program_suffix=$ac_optarg ;;
2003
2004 -program-transform-name | --program-transform-name \
2005 | --program-transform-nam | --program-transform-na \
2006 | --program-transform-n | --program-transform- \
2007 | --program-transform | --program-transfor \
2008 | --program-transfo | --program-transf \
2009 | --program-trans | --program-tran \
2010 | --progr-tra | --program-tr | --program-t)
2011 ac_prev=program_transform_name ;;
2012 -program-transform-name=* | --program-transform-name=* \
2013 | --program-transform-nam=* | --program-transform-na=* \
2014 | --program-transform-n=* | --program-transform-=* \
2015 | --program-transform=* | --program-transfor=* \
2016 | --program-transfo=* | --program-transf=* \
2017 | --program-trans=* | --program-tran=* \
2018 | --progr-tra=* | --program-tr=* | --program-t=*)
2019 program_transform_name=$ac_optarg ;;
2020
2021 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2022 ac_prev=pdfdir ;;
2023 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2024 pdfdir=$ac_optarg ;;
2025
2026 -psdir | --psdir | --psdi | --psd | --ps)
2027 ac_prev=psdir ;;
2028 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2029 psdir=$ac_optarg ;;
2030
2031 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2032 | -silent | --silent | --silen | --sile | --sil)
2033 silent=yes ;;
2034
2035 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2036 ac_prev=sbindir ;;
2037 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2038 | --sbi=* | --sb=*)
2039 sbindir=$ac_optarg ;;
2040
2041 -sharedstatedir | --sharedstatedir | --sharedstatedi \
2042 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2043 | --sharedst | --shareds | --shared | --share | --shar \
2044 | --sha | --sh)
2045 ac_prev=sharedstatedir ;;
2046 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2047 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2048 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2049 | --sha=* | --sh=*)
2050 sharedstatedir=$ac_optarg ;;
2051
2052 -site | --site | --sit)
2053 ac_prev=site ;;
2054 -site=* | --site=* | --sit=*)
2055 site=$ac_optarg ;;
2056
2057 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2058 ac_prev=srcdir ;;
2059 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2060 srcdir=$ac_optarg ;;
2061
2062 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2063 | --syscon | --sysco | --sysc | --sys | --sy)
2064 ac_prev=sysconfdir ;;
2065 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2066 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2067 sysconfdir=$ac_optarg ;;
2068
2069 -target | --target | --targe | --targ | --tar | --ta | --t)
2070 ac_prev=target_alias ;;
2071 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2072 target_alias=$ac_optarg ;;
2073
2074 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2075 verbose=yes ;;
2076
2077 -version | --version | --versio | --versi | --vers | -V)
2078 ac_init_version=: ;;
2079
2080 -with-* | --with-*)
2081 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2082 # Reject names that are not valid shell variable names.
2083 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 2084 as_fn_error $? "invalid package name: $ac_useropt"
c971b7fa
PA
2085 ac_useropt_orig=$ac_useropt
2086 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2087 case $ac_user_opts in
2088 *"
2089"with_$ac_useropt"
2090"*) ;;
2091 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2092 ac_unrecognized_sep=', ';;
2093 esac
2094 eval with_$ac_useropt=\$ac_optarg ;;
2095
2096 -without-* | --without-*)
2097 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2098 # Reject names that are not valid shell variable names.
2099 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 2100 as_fn_error $? "invalid package name: $ac_useropt"
c971b7fa
PA
2101 ac_useropt_orig=$ac_useropt
2102 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2103 case $ac_user_opts in
2104 *"
2105"with_$ac_useropt"
2106"*) ;;
2107 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2108 ac_unrecognized_sep=', ';;
2109 esac
2110 eval with_$ac_useropt=no ;;
2111
2112 --x)
2113 # Obsolete; use --with-x.
2114 with_x=yes ;;
2115
2116 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2117 | --x-incl | --x-inc | --x-in | --x-i)
2118 ac_prev=x_includes ;;
2119 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2120 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2121 x_includes=$ac_optarg ;;
2122
2123 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2124 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2125 ac_prev=x_libraries ;;
2126 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2127 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2128 x_libraries=$ac_optarg ;;
2129
d0ac1c44
SM
2130 -*) as_fn_error $? "unrecognized option: \`$ac_option'
2131Try \`$0 --help' for more information"
c971b7fa
PA
2132 ;;
2133
2134 *=*)
2135 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2136 # Reject names that are not valid shell variable names.
2137 case $ac_envvar in #(
2138 '' | [0-9]* | *[!_$as_cr_alnum]* )
d0ac1c44 2139 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
c971b7fa
PA
2140 esac
2141 eval $ac_envvar=\$ac_optarg
2142 export $ac_envvar ;;
2143
2144 *)
2145 # FIXME: should be removed in autoconf 3.0.
2146 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2147 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2148 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
d0ac1c44 2149 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
c971b7fa
PA
2150 ;;
2151
2152 esac
2153done
2154
2155if test -n "$ac_prev"; then
2156 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
d0ac1c44 2157 as_fn_error $? "missing argument to $ac_option"
c971b7fa
PA
2158fi
2159
2160if test -n "$ac_unrecognized_opts"; then
2161 case $enable_option_checking in
2162 no) ;;
d0ac1c44 2163 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
c971b7fa
PA
2164 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2165 esac
2166fi
2167
2168# Check all directory arguments for consistency.
2169for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2170 datadir sysconfdir sharedstatedir localstatedir includedir \
2171 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2172 libdir localedir mandir
2173do
2174 eval ac_val=\$$ac_var
2175 # Remove trailing slashes.
2176 case $ac_val in
2177 */ )
2178 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2179 eval $ac_var=\$ac_val;;
2180 esac
2181 # Be sure to have absolute directory names.
2182 case $ac_val in
2183 [\\/$]* | ?:[\\/]* ) continue;;
2184 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2185 esac
d0ac1c44 2186 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
c971b7fa
PA
2187done
2188
2189# There might be people who depend on the old broken behavior: `$host'
2190# used to hold the argument of --host etc.
2191# FIXME: To remove some day.
2192build=$build_alias
2193host=$host_alias
2194target=$target_alias
2195
2196# FIXME: To remove some day.
2197if test "x$host_alias" != x; then
2198 if test "x$build_alias" = x; then
2199 cross_compiling=maybe
c971b7fa
PA
2200 elif test "x$build_alias" != "x$host_alias"; then
2201 cross_compiling=yes
2202 fi
2203fi
2204
2205ac_tool_prefix=
2206test -n "$host_alias" && ac_tool_prefix=$host_alias-
2207
2208test "$silent" = yes && exec 6>/dev/null
2209
2210
2211ac_pwd=`pwd` && test -n "$ac_pwd" &&
2212ac_ls_di=`ls -di .` &&
2213ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
d0ac1c44 2214 as_fn_error $? "working directory cannot be determined"
c971b7fa 2215test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
d0ac1c44 2216 as_fn_error $? "pwd does not report name of working directory"
c971b7fa
PA
2217
2218
2219# Find the source files, if location was not specified.
2220if test -z "$srcdir"; then
2221 ac_srcdir_defaulted=yes
2222 # Try the directory containing this script, then the parent directory.
2223 ac_confdir=`$as_dirname -- "$as_myself" ||
2224$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2225 X"$as_myself" : 'X\(//\)[^/]' \| \
2226 X"$as_myself" : 'X\(//\)$' \| \
2227 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2228$as_echo X"$as_myself" |
2229 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2230 s//\1/
2231 q
2232 }
2233 /^X\(\/\/\)[^/].*/{
2234 s//\1/
2235 q
2236 }
2237 /^X\(\/\/\)$/{
2238 s//\1/
2239 q
2240 }
2241 /^X\(\/\).*/{
2242 s//\1/
2243 q
2244 }
2245 s/.*/./; q'`
2246 srcdir=$ac_confdir
2247 if test ! -r "$srcdir/$ac_unique_file"; then
2248 srcdir=..
2249 fi
2250else
2251 ac_srcdir_defaulted=no
2252fi
2253if test ! -r "$srcdir/$ac_unique_file"; then
2254 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
d0ac1c44 2255 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
c971b7fa
PA
2256fi
2257ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2258ac_abs_confdir=`(
d0ac1c44 2259 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
c971b7fa
PA
2260 pwd)`
2261# When building in place, set srcdir=.
2262if test "$ac_abs_confdir" = "$ac_pwd"; then
2263 srcdir=.
2264fi
2265# Remove unnecessary trailing slashes from srcdir.
2266# Double slashes in file names in object file debugging info
2267# mess up M-x gdb in Emacs.
2268case $srcdir in
2269*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2270esac
2271for ac_var in $ac_precious_vars; do
2272 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2273 eval ac_env_${ac_var}_value=\$${ac_var}
2274 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2275 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2276done
2277
2278#
2279# Report the --help message.
2280#
2281if test "$ac_init_help" = "long"; then
2282 # Omit some internal or obsolete options to make the list less imposing.
2283 # This message is too long to be a string in the A/UX 3.1 sh.
2284 cat <<_ACEOF
d0ac1c44 2285\`configure' configures libgnu UNUSED-VERSION to adapt to many kinds of systems.
c971b7fa
PA
2286
2287Usage: $0 [OPTION]... [VAR=VALUE]...
2288
2289To assign environment variables (e.g., CC, CFLAGS...), specify them as
2290VAR=VALUE. See below for descriptions of some of the useful variables.
2291
2292Defaults for the options are specified in brackets.
2293
2294Configuration:
2295 -h, --help display this help and exit
2296 --help=short display options specific to this package
2297 --help=recursive display the short help of all the included packages
2298 -V, --version display version information and exit
d0ac1c44 2299 -q, --quiet, --silent do not print \`checking ...' messages
c971b7fa
PA
2300 --cache-file=FILE cache test results in FILE [disabled]
2301 -C, --config-cache alias for \`--cache-file=config.cache'
2302 -n, --no-create do not create output files
2303 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2304
2305Installation directories:
2306 --prefix=PREFIX install architecture-independent files in PREFIX
2307 [$ac_default_prefix]
2308 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2309 [PREFIX]
2310
2311By default, \`make install' will install all the files in
2312\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2313an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2314for instance \`--prefix=\$HOME'.
2315
2316For better control, use the options below.
2317
2318Fine tuning of the installation directories:
2319 --bindir=DIR user executables [EPREFIX/bin]
2320 --sbindir=DIR system admin executables [EPREFIX/sbin]
2321 --libexecdir=DIR program executables [EPREFIX/libexec]
2322 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2323 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2324 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2325 --libdir=DIR object code libraries [EPREFIX/lib]
2326 --includedir=DIR C header files [PREFIX/include]
2327 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2328 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2329 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2330 --infodir=DIR info documentation [DATAROOTDIR/info]
2331 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2332 --mandir=DIR man documentation [DATAROOTDIR/man]
d0ac1c44 2333 --docdir=DIR documentation root [DATAROOTDIR/doc/libgnu]
c971b7fa
PA
2334 --htmldir=DIR html documentation [DOCDIR]
2335 --dvidir=DIR dvi documentation [DOCDIR]
2336 --pdfdir=DIR pdf documentation [DOCDIR]
2337 --psdir=DIR ps documentation [DOCDIR]
2338_ACEOF
2339
2340 cat <<\_ACEOF
2341
2342Program names:
2343 --program-prefix=PREFIX prepend PREFIX to installed program names
2344 --program-suffix=SUFFIX append SUFFIX to installed program names
2345 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2346
2347System types:
2348 --build=BUILD configure for building on BUILD [guessed]
2349 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2350 --target=TARGET configure for building compilers for TARGET [HOST]
2351_ACEOF
2352fi
2353
2354if test -n "$ac_init_help"; then
d0ac1c44
SM
2355 case $ac_init_help in
2356 short | recursive ) echo "Configuration of libgnu UNUSED-VERSION:";;
2357 esac
c971b7fa
PA
2358 cat <<\_ACEOF
2359
2360Optional Features:
2361 --disable-option-checking ignore unrecognized --enable/--with options
2362 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2363 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
d0ac1c44
SM
2364 --enable-maintainer-mode
2365 enable make rules and dependencies not useful (and
2366 sometimes confusing) to the casual installer
2196f55f 2367 --disable-largefile omit support for large files
d0ac1c44
SM
2368 --enable-dependency-tracking
2369 do not reject slow dependency extractors
2370 --disable-dependency-tracking
2371 speeds up one-time build
2372 --enable-silent-rules less verbose build output (undo: "make V=1")
2373 --disable-silent-rules verbose build output (undo: "make V=0")
c971b7fa
PA
2374
2375Some influential environment variables:
2376 CC C compiler command
2377 CFLAGS C compiler flags
2378 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2379 nonstandard directory <lib dir>
2380 LIBS libraries to pass to the linker, e.g. -l<library>
d0ac1c44 2381 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
c971b7fa
PA
2382 you have headers in a nonstandard directory <include dir>
2383 CPP C preprocessor
2384
2385Use these variables to override the choices made by `configure' or to help
2386it to find libraries and programs with nonstandard names/locations.
2387
2388Report bugs to the package provider.
2389_ACEOF
2390ac_status=$?
2391fi
2392
2393if test "$ac_init_help" = "recursive"; then
2394 # If there are subdirs, report their specific --help.
2395 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2396 test -d "$ac_dir" ||
2397 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2398 continue
2399 ac_builddir=.
2400
2401case "$ac_dir" in
2402.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2403*)
2404 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2405 # A ".." for each directory in $ac_dir_suffix.
2406 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2407 case $ac_top_builddir_sub in
2408 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2409 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2410 esac ;;
2411esac
2412ac_abs_top_builddir=$ac_pwd
2413ac_abs_builddir=$ac_pwd$ac_dir_suffix
2414# for backward compatibility:
2415ac_top_builddir=$ac_top_build_prefix
2416
2417case $srcdir in
2418 .) # We are building in place.
2419 ac_srcdir=.
2420 ac_top_srcdir=$ac_top_builddir_sub
2421 ac_abs_top_srcdir=$ac_pwd ;;
2422 [\\/]* | ?:[\\/]* ) # Absolute name.
2423 ac_srcdir=$srcdir$ac_dir_suffix;
2424 ac_top_srcdir=$srcdir
2425 ac_abs_top_srcdir=$srcdir ;;
2426 *) # Relative name.
2427 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2428 ac_top_srcdir=$ac_top_build_prefix$srcdir
2429 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2430esac
2431ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2432
2433 cd "$ac_dir" || { ac_status=$?; continue; }
2434 # Check for guested configure.
2435 if test -f "$ac_srcdir/configure.gnu"; then
2436 echo &&
2437 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2438 elif test -f "$ac_srcdir/configure"; then
2439 echo &&
2440 $SHELL "$ac_srcdir/configure" --help=recursive
2441 else
2442 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2443 fi || ac_status=$?
2444 cd "$ac_pwd" || { ac_status=$?; break; }
2445 done
2446fi
2447
2448test -n "$ac_init_help" && exit $ac_status
2449if $ac_init_version; then
2450 cat <<\_ACEOF
d0ac1c44
SM
2451libgnu configure UNUSED-VERSION
2452generated by GNU Autoconf 2.69
c971b7fa 2453
d0ac1c44 2454Copyright (C) 2012 Free Software Foundation, Inc.
c971b7fa
PA
2455This configure script is free software; the Free Software Foundation
2456gives unlimited permission to copy, distribute and modify it.
2457_ACEOF
2458 exit
2459fi
2460
2461## ------------------------ ##
2462## Autoconf initialization. ##
2463## ------------------------ ##
2464
2465# ac_fn_c_try_compile LINENO
2466# --------------------------
2467# Try to compile conftest.$ac_ext, and return whether this succeeded.
2468ac_fn_c_try_compile ()
2469{
2470 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2471 rm -f conftest.$ac_objext
2472 if { { ac_try="$ac_compile"
2473case "(($ac_try" in
2474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2475 *) ac_try_echo=$ac_try;;
2476esac
2477eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2478$as_echo "$ac_try_echo"; } >&5
2479 (eval "$ac_compile") 2>conftest.err
2480 ac_status=$?
2481 if test -s conftest.err; then
2482 grep -v '^ *+' conftest.err >conftest.er1
2483 cat conftest.er1 >&5
2484 mv -f conftest.er1 conftest.err
2485 fi
2486 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2487 test $ac_status = 0; } && {
2488 test -z "$ac_c_werror_flag" ||
2489 test ! -s conftest.err
2490 } && test -s conftest.$ac_objext; then :
2491 ac_retval=0
2492else
2493 $as_echo "$as_me: failed program was:" >&5
2494sed 's/^/| /' conftest.$ac_ext >&5
2495
2496 ac_retval=1
2497fi
d0ac1c44
SM
2498 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2499 as_fn_set_status $ac_retval
c971b7fa
PA
2500
2501} # ac_fn_c_try_compile
2502
2503# ac_fn_c_try_cpp LINENO
2504# ----------------------
2505# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2506ac_fn_c_try_cpp ()
2507{
2508 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2509 if { { ac_try="$ac_cpp conftest.$ac_ext"
2510case "(($ac_try" in
2511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2512 *) ac_try_echo=$ac_try;;
2513esac
2514eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2515$as_echo "$ac_try_echo"; } >&5
2516 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2517 ac_status=$?
2518 if test -s conftest.err; then
2519 grep -v '^ *+' conftest.err >conftest.er1
2520 cat conftest.er1 >&5
2521 mv -f conftest.er1 conftest.err
2522 fi
2523 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
d0ac1c44 2524 test $ac_status = 0; } > conftest.i && {
c971b7fa
PA
2525 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2526 test ! -s conftest.err
2527 }; then :
2528 ac_retval=0
2529else
2530 $as_echo "$as_me: failed program was:" >&5
2531sed 's/^/| /' conftest.$ac_ext >&5
2532
2533 ac_retval=1
2534fi
d0ac1c44
SM
2535 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2536 as_fn_set_status $ac_retval
c971b7fa
PA
2537
2538} # ac_fn_c_try_cpp
2539
2540# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2541# -------------------------------------------------------
2542# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2543# the include files in INCLUDES and setting the cache variable VAR
2544# accordingly.
2545ac_fn_c_check_header_mongrel ()
2546{
2547 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44 2548 if eval \${$3+:} false; then :
c971b7fa
PA
2549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2550$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2551if eval \${$3+:} false; then :
c971b7fa
PA
2552 $as_echo_n "(cached) " >&6
2553fi
2554eval ac_res=\$$3
2555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2556$as_echo "$ac_res" >&6; }
2557else
2558 # Is the header compilable?
2559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2560$as_echo_n "checking $2 usability... " >&6; }
2561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2562/* end confdefs.h. */
2563$4
2564#include <$2>
2565_ACEOF
2566if ac_fn_c_try_compile "$LINENO"; then :
2567 ac_header_compiler=yes
2568else
2569 ac_header_compiler=no
2570fi
2571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2573$as_echo "$ac_header_compiler" >&6; }
2574
2575# Is the header present?
2576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2577$as_echo_n "checking $2 presence... " >&6; }
2578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2579/* end confdefs.h. */
2580#include <$2>
2581_ACEOF
2582if ac_fn_c_try_cpp "$LINENO"; then :
2583 ac_header_preproc=yes
2584else
2585 ac_header_preproc=no
2586fi
d0ac1c44 2587rm -f conftest.err conftest.i conftest.$ac_ext
c971b7fa
PA
2588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2589$as_echo "$ac_header_preproc" >&6; }
2590
2591# So? What about this header?
2592case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2593 yes:no: )
2594 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2595$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2596 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2597$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2598 ;;
2599 no:yes:* )
2600 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2601$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2602 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2603$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2604 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2605$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2606 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2607$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2608 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2609$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2610 ;;
2611esac
2612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2613$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2614if eval \${$3+:} false; then :
c971b7fa
PA
2615 $as_echo_n "(cached) " >&6
2616else
2617 eval "$3=\$ac_header_compiler"
2618fi
2619eval ac_res=\$$3
2620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2621$as_echo "$ac_res" >&6; }
2622fi
d0ac1c44 2623 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
c971b7fa
PA
2624
2625} # ac_fn_c_check_header_mongrel
2626
2627# ac_fn_c_try_run LINENO
2628# ----------------------
2629# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2630# that executables *can* be run.
2631ac_fn_c_try_run ()
2632{
2633 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2634 if { { ac_try="$ac_link"
2635case "(($ac_try" in
2636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2637 *) ac_try_echo=$ac_try;;
2638esac
2639eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2640$as_echo "$ac_try_echo"; } >&5
2641 (eval "$ac_link") 2>&5
2642 ac_status=$?
2643 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2644 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2645 { { case "(($ac_try" in
2646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2647 *) ac_try_echo=$ac_try;;
2648esac
2649eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2650$as_echo "$ac_try_echo"; } >&5
2651 (eval "$ac_try") 2>&5
2652 ac_status=$?
2653 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2654 test $ac_status = 0; }; }; then :
2655 ac_retval=0
2656else
2657 $as_echo "$as_me: program exited with status $ac_status" >&5
2658 $as_echo "$as_me: failed program was:" >&5
2659sed 's/^/| /' conftest.$ac_ext >&5
2660
2661 ac_retval=$ac_status
2662fi
2663 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2664 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2665 as_fn_set_status $ac_retval
c971b7fa
PA
2666
2667} # ac_fn_c_try_run
2668
2669# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2670# -------------------------------------------------------
2671# Tests whether HEADER exists and can be compiled using the include files in
2672# INCLUDES, setting the cache variable VAR accordingly.
2673ac_fn_c_check_header_compile ()
2674{
2675 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2677$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2678if eval \${$3+:} false; then :
c971b7fa
PA
2679 $as_echo_n "(cached) " >&6
2680else
2681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2682/* end confdefs.h. */
2683$4
2684#include <$2>
2685_ACEOF
2686if ac_fn_c_try_compile "$LINENO"; then :
2687 eval "$3=yes"
2688else
2689 eval "$3=no"
2690fi
2691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2692fi
2693eval ac_res=\$$3
2694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2695$as_echo "$ac_res" >&6; }
d0ac1c44 2696 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
c971b7fa
PA
2697
2698} # ac_fn_c_check_header_compile
2699
d0ac1c44
SM
2700# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2701# -------------------------------------------
2702# Tests whether TYPE exists after having included INCLUDES, setting cache
2703# variable VAR accordingly.
2704ac_fn_c_check_type ()
2705{
2706 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2708$as_echo_n "checking for $2... " >&6; }
2709if eval \${$3+:} false; then :
2710 $as_echo_n "(cached) " >&6
2711else
2712 eval "$3=no"
2713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2714/* end confdefs.h. */
2715$4
2716int
2717main ()
2718{
2719if (sizeof ($2))
2720 return 0;
2721 ;
2722 return 0;
2723}
2724_ACEOF
2725if ac_fn_c_try_compile "$LINENO"; then :
2726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2727/* end confdefs.h. */
2728$4
2729int
2730main ()
2731{
2732if (sizeof (($2)))
2733 return 0;
2734 ;
2735 return 0;
2736}
2737_ACEOF
2738if ac_fn_c_try_compile "$LINENO"; then :
2739
2740else
2741 eval "$3=yes"
2742fi
2743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2744fi
2745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2746fi
2747eval ac_res=\$$3
2748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2749$as_echo "$ac_res" >&6; }
2750 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2751
2752} # ac_fn_c_check_type
2753
c971b7fa
PA
2754# ac_fn_c_try_link LINENO
2755# -----------------------
2756# Try to link conftest.$ac_ext, and return whether this succeeded.
2757ac_fn_c_try_link ()
2758{
2759 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2760 rm -f conftest.$ac_objext conftest$ac_exeext
2761 if { { ac_try="$ac_link"
2762case "(($ac_try" in
2763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2764 *) ac_try_echo=$ac_try;;
2765esac
2766eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2767$as_echo "$ac_try_echo"; } >&5
2768 (eval "$ac_link") 2>conftest.err
2769 ac_status=$?
2770 if test -s conftest.err; then
2771 grep -v '^ *+' conftest.err >conftest.er1
2772 cat conftest.er1 >&5
2773 mv -f conftest.er1 conftest.err
2774 fi
2775 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2776 test $ac_status = 0; } && {
2777 test -z "$ac_c_werror_flag" ||
2778 test ! -s conftest.err
2779 } && test -s conftest$ac_exeext && {
2780 test "$cross_compiling" = yes ||
d0ac1c44 2781 test -x conftest$ac_exeext
c971b7fa
PA
2782 }; then :
2783 ac_retval=0
2784else
2785 $as_echo "$as_me: failed program was:" >&5
2786sed 's/^/| /' conftest.$ac_ext >&5
2787
2788 ac_retval=1
2789fi
2790 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2791 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2792 # interfere with the next link command; also delete a directory that is
2793 # left behind by Apple's compiler. We do this before executing the actions.
2794 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2795 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2796 as_fn_set_status $ac_retval
c971b7fa
PA
2797
2798} # ac_fn_c_try_link
2799
8690e634
JK
2800# ac_fn_c_check_func LINENO FUNC VAR
2801# ----------------------------------
2802# Tests whether FUNC exists, setting the cache variable VAR accordingly
2803ac_fn_c_check_func ()
2804{
2805 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2807$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2808if eval \${$3+:} false; then :
8690e634
JK
2809 $as_echo_n "(cached) " >&6
2810else
2811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2812/* end confdefs.h. */
2813/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2814 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2815#define $2 innocuous_$2
2816
2817/* System header to define __stub macros and hopefully few prototypes,
2818 which can conflict with char $2 (); below.
2819 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2820 <limits.h> exists even on freestanding compilers. */
2821
2822#ifdef __STDC__
2823# include <limits.h>
2824#else
2825# include <assert.h>
2826#endif
2827
2828#undef $2
2829
2830/* Override any GCC internal prototype to avoid an error.
2831 Use char because int might match the return type of a GCC
2832 builtin and then its argument prototype would still apply. */
2833#ifdef __cplusplus
2834extern "C"
2835#endif
2836char $2 ();
2837/* The GNU C library defines this for functions which it implements
2838 to always fail with ENOSYS. Some functions are actually named
2839 something starting with __ and the normal name is an alias. */
2840#if defined __stub_$2 || defined __stub___$2
2841choke me
2842#endif
2843
2844int
2845main ()
2846{
2847return $2 ();
2848 ;
2849 return 0;
2850}
2851_ACEOF
2852if ac_fn_c_try_link "$LINENO"; then :
2853 eval "$3=yes"
2854else
2855 eval "$3=no"
2856fi
2857rm -f core conftest.err conftest.$ac_objext \
2858 conftest$ac_exeext conftest.$ac_ext
2859fi
2860eval ac_res=\$$3
2861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2862$as_echo "$ac_res" >&6; }
d0ac1c44 2863 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
8690e634
JK
2864
2865} # ac_fn_c_check_func
2866
d0ac1c44
SM
2867# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2868# ---------------------------------------------
2869# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2870# accordingly.
8986e351
TT
2871ac_fn_c_check_decl ()
2872{
2873 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44
SM
2874 as_decl_name=`echo $2|sed 's/ *(.*//'`
2875 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2877$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2878if eval \${$3+:} false; then :
8986e351
TT
2879 $as_echo_n "(cached) " >&6
2880else
2881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2882/* end confdefs.h. */
2883$4
2884int
2885main ()
2886{
d0ac1c44
SM
2887#ifndef $as_decl_name
2888#ifdef __cplusplus
2889 (void) $as_decl_use;
2890#else
2891 (void) $as_decl_name;
2892#endif
8986e351
TT
2893#endif
2894
2895 ;
2896 return 0;
2897}
2898_ACEOF
2899if ac_fn_c_try_compile "$LINENO"; then :
2900 eval "$3=yes"
2901else
2902 eval "$3=no"
2903fi
2904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2905fi
2906eval ac_res=\$$3
2907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2908$as_echo "$ac_res" >&6; }
d0ac1c44 2909 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
8986e351
TT
2910
2911} # ac_fn_c_check_decl
2912
c971b7fa
PA
2913# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2914# --------------------------------------------
2915# Tries to find the compile-time value of EXPR in a program that includes
2916# INCLUDES, setting VAR accordingly. Returns whether the value could be
2917# computed
2918ac_fn_c_compute_int ()
2919{
2920 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2921 if test "$cross_compiling" = yes; then
2922 # Depending upon the size, compute the lo and hi bounds.
2923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2924/* end confdefs.h. */
2925$4
2926int
2927main ()
2928{
2929static int test_array [1 - 2 * !(($2) >= 0)];
d0ac1c44
SM
2930test_array [0] = 0;
2931return test_array [0];
c971b7fa
PA
2932
2933 ;
2934 return 0;
2935}
2936_ACEOF
2937if ac_fn_c_try_compile "$LINENO"; then :
2938 ac_lo=0 ac_mid=0
2939 while :; do
2940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2941/* end confdefs.h. */
2942$4
2943int
2944main ()
2945{
2946static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2947test_array [0] = 0;
2948return test_array [0];
c971b7fa
PA
2949
2950 ;
2951 return 0;
2952}
2953_ACEOF
2954if ac_fn_c_try_compile "$LINENO"; then :
2955 ac_hi=$ac_mid; break
2956else
2957 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2958 if test $ac_lo -le $ac_mid; then
2959 ac_lo= ac_hi=
2960 break
2961 fi
2962 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2963fi
2964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2965 done
2966else
2967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2968/* end confdefs.h. */
2969$4
2970int
2971main ()
2972{
2973static int test_array [1 - 2 * !(($2) < 0)];
d0ac1c44
SM
2974test_array [0] = 0;
2975return test_array [0];
c971b7fa
PA
2976
2977 ;
2978 return 0;
2979}
2980_ACEOF
2981if ac_fn_c_try_compile "$LINENO"; then :
2982 ac_hi=-1 ac_mid=-1
2983 while :; do
2984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2985/* end confdefs.h. */
2986$4
2987int
2988main ()
2989{
2990static int test_array [1 - 2 * !(($2) >= $ac_mid)];
d0ac1c44
SM
2991test_array [0] = 0;
2992return test_array [0];
c971b7fa
PA
2993
2994 ;
2995 return 0;
2996}
2997_ACEOF
2998if ac_fn_c_try_compile "$LINENO"; then :
2999 ac_lo=$ac_mid; break
3000else
3001 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3002 if test $ac_mid -le $ac_hi; then
3003 ac_lo= ac_hi=
3004 break
3005 fi
3006 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3007fi
3008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3009 done
3010else
3011 ac_lo= ac_hi=
3012fi
3013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3014fi
3015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3016# Binary search between lo and hi bounds.
3017while test "x$ac_lo" != "x$ac_hi"; do
3018 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3020/* end confdefs.h. */
3021$4
3022int
3023main ()
3024{
3025static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
3026test_array [0] = 0;
3027return test_array [0];
c971b7fa
PA
3028
3029 ;
3030 return 0;
3031}
3032_ACEOF
3033if ac_fn_c_try_compile "$LINENO"; then :
3034 ac_hi=$ac_mid
3035else
3036 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3037fi
3038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3039done
3040case $ac_lo in #((
3041?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3042'') ac_retval=1 ;;
3043esac
3044 else
3045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3046/* end confdefs.h. */
3047$4
3048static long int longval () { return $2; }
3049static unsigned long int ulongval () { return $2; }
3050#include <stdio.h>
3051#include <stdlib.h>
3052int
3053main ()
3054{
3055
3056 FILE *f = fopen ("conftest.val", "w");
3057 if (! f)
3058 return 1;
3059 if (($2) < 0)
3060 {
3061 long int i = longval ();
3062 if (i != ($2))
3063 return 1;
3064 fprintf (f, "%ld", i);
3065 }
3066 else
3067 {
3068 unsigned long int i = ulongval ();
3069 if (i != ($2))
3070 return 1;
3071 fprintf (f, "%lu", i);
3072 }
3073 /* Do not output a trailing newline, as this causes \r\n confusion
3074 on some platforms. */
3075 return ferror (f) || fclose (f) != 0;
3076
3077 ;
3078 return 0;
3079}
3080_ACEOF
3081if ac_fn_c_try_run "$LINENO"; then :
3082 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3083else
3084 ac_retval=1
3085fi
3086rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3087 conftest.$ac_objext conftest.beam conftest.$ac_ext
3088rm -f conftest.val
3089
3090 fi
d0ac1c44
SM
3091 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3092 as_fn_set_status $ac_retval
c971b7fa
PA
3093
3094} # ac_fn_c_compute_int
c971b7fa
PA
3095cat >config.log <<_ACEOF
3096This file contains any messages produced by compilers while
3097running configure, to aid debugging if configure makes a mistake.
3098
d0ac1c44
SM
3099It was created by libgnu $as_me UNUSED-VERSION, which was
3100generated by GNU Autoconf 2.69. Invocation command line was
c971b7fa
PA
3101
3102 $ $0 $@
3103
3104_ACEOF
3105exec 5>>config.log
3106{
3107cat <<_ASUNAME
3108## --------- ##
3109## Platform. ##
3110## --------- ##
3111
3112hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3113uname -m = `(uname -m) 2>/dev/null || echo unknown`
3114uname -r = `(uname -r) 2>/dev/null || echo unknown`
3115uname -s = `(uname -s) 2>/dev/null || echo unknown`
3116uname -v = `(uname -v) 2>/dev/null || echo unknown`
3117
3118/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3119/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3120
3121/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3122/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3123/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3124/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3125/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3126/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3127/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3128
3129_ASUNAME
3130
3131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3132for as_dir in $PATH
3133do
3134 IFS=$as_save_IFS
3135 test -z "$as_dir" && as_dir=.
3136 $as_echo "PATH: $as_dir"
3137 done
3138IFS=$as_save_IFS
3139
3140} >&5
3141
3142cat >&5 <<_ACEOF
3143
3144
3145## ----------- ##
3146## Core tests. ##
3147## ----------- ##
3148
3149_ACEOF
3150
3151
3152# Keep a trace of the command line.
3153# Strip out --no-create and --no-recursion so they do not pile up.
3154# Strip out --silent because we don't want to record it for future runs.
3155# Also quote any args containing shell meta-characters.
3156# Make two passes to allow for proper duplicate-argument suppression.
3157ac_configure_args=
3158ac_configure_args0=
3159ac_configure_args1=
3160ac_must_keep_next=false
3161for ac_pass in 1 2
3162do
3163 for ac_arg
3164 do
3165 case $ac_arg in
3166 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3167 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3168 | -silent | --silent | --silen | --sile | --sil)
3169 continue ;;
3170 *\'*)
3171 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3172 esac
3173 case $ac_pass in
3174 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3175 2)
3176 as_fn_append ac_configure_args1 " '$ac_arg'"
3177 if test $ac_must_keep_next = true; then
3178 ac_must_keep_next=false # Got value, back to normal.
3179 else
3180 case $ac_arg in
3181 *=* | --config-cache | -C | -disable-* | --disable-* \
3182 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3183 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3184 | -with-* | --with-* | -without-* | --without-* | --x)
3185 case "$ac_configure_args0 " in
3186 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3187 esac
3188 ;;
3189 -* ) ac_must_keep_next=true ;;
3190 esac
3191 fi
3192 as_fn_append ac_configure_args " '$ac_arg'"
3193 ;;
3194 esac
3195 done
3196done
3197{ ac_configure_args0=; unset ac_configure_args0;}
3198{ ac_configure_args1=; unset ac_configure_args1;}
3199
3200# When interrupted or exit'd, cleanup temporary files, and complete
3201# config.log. We remove comments because anyway the quotes in there
3202# would cause problems or look ugly.
3203# WARNING: Use '\'' to represent an apostrophe within the trap.
3204# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3205trap 'exit_status=$?
3206 # Save into config.log some information that might help in debugging.
3207 {
3208 echo
3209
d0ac1c44 3210 $as_echo "## ---------------- ##
c971b7fa 3211## Cache variables. ##
d0ac1c44 3212## ---------------- ##"
c971b7fa
PA
3213 echo
3214 # The following way of writing the cache mishandles newlines in values,
3215(
3216 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3217 eval ac_val=\$$ac_var
3218 case $ac_val in #(
3219 *${as_nl}*)
3220 case $ac_var in #(
3221 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3222$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3223 esac
3224 case $ac_var in #(
3225 _ | IFS | as_nl) ;; #(
3226 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3227 *) { eval $ac_var=; unset $ac_var;} ;;
3228 esac ;;
3229 esac
3230 done
3231 (set) 2>&1 |
3232 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3233 *${as_nl}ac_space=\ *)
3234 sed -n \
3235 "s/'\''/'\''\\\\'\'''\''/g;
3236 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3237 ;; #(
3238 *)
3239 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3240 ;;
3241 esac |
3242 sort
3243)
3244 echo
3245
d0ac1c44 3246 $as_echo "## ----------------- ##
c971b7fa 3247## Output variables. ##
d0ac1c44 3248## ----------------- ##"
c971b7fa
PA
3249 echo
3250 for ac_var in $ac_subst_vars
3251 do
3252 eval ac_val=\$$ac_var
3253 case $ac_val in
3254 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3255 esac
3256 $as_echo "$ac_var='\''$ac_val'\''"
3257 done | sort
3258 echo
3259
3260 if test -n "$ac_subst_files"; then
d0ac1c44 3261 $as_echo "## ------------------- ##
c971b7fa 3262## File substitutions. ##
d0ac1c44 3263## ------------------- ##"
c971b7fa
PA
3264 echo
3265 for ac_var in $ac_subst_files
3266 do
3267 eval ac_val=\$$ac_var
3268 case $ac_val in
3269 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3270 esac
3271 $as_echo "$ac_var='\''$ac_val'\''"
3272 done | sort
3273 echo
3274 fi
3275
3276 if test -s confdefs.h; then
d0ac1c44 3277 $as_echo "## ----------- ##
c971b7fa 3278## confdefs.h. ##
d0ac1c44 3279## ----------- ##"
c971b7fa
PA
3280 echo
3281 cat confdefs.h
3282 echo
3283 fi
3284 test "$ac_signal" != 0 &&
3285 $as_echo "$as_me: caught signal $ac_signal"
3286 $as_echo "$as_me: exit $exit_status"
3287 } >&5
3288 rm -f core *.core core.conftest.* &&
3289 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3290 exit $exit_status
3291' 0
3292for ac_signal in 1 2 13 15; do
3293 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3294done
3295ac_signal=0
3296
3297# confdefs.h avoids OS command line length limits that DEFS can exceed.
3298rm -f -r conftest* confdefs.h
3299
3300$as_echo "/* confdefs.h */" > confdefs.h
3301
3302# Predefined preprocessor variables.
3303
3304cat >>confdefs.h <<_ACEOF
3305#define PACKAGE_NAME "$PACKAGE_NAME"
3306_ACEOF
3307
3308cat >>confdefs.h <<_ACEOF
3309#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3310_ACEOF
3311
3312cat >>confdefs.h <<_ACEOF
3313#define PACKAGE_VERSION "$PACKAGE_VERSION"
3314_ACEOF
3315
3316cat >>confdefs.h <<_ACEOF
3317#define PACKAGE_STRING "$PACKAGE_STRING"
3318_ACEOF
3319
3320cat >>confdefs.h <<_ACEOF
3321#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3322_ACEOF
3323
3324cat >>confdefs.h <<_ACEOF
3325#define PACKAGE_URL "$PACKAGE_URL"
3326_ACEOF
3327
3328
3329# Let the site file select an alternate cache file if it wants to.
3330# Prefer an explicitly selected file to automatically selected ones.
3331ac_site_file1=NONE
3332ac_site_file2=NONE
3333if test -n "$CONFIG_SITE"; then
d0ac1c44
SM
3334 # We do not want a PATH search for config.site.
3335 case $CONFIG_SITE in #((
3336 -*) ac_site_file1=./$CONFIG_SITE;;
3337 */*) ac_site_file1=$CONFIG_SITE;;
3338 *) ac_site_file1=./$CONFIG_SITE;;
3339 esac
c971b7fa
PA
3340elif test "x$prefix" != xNONE; then
3341 ac_site_file1=$prefix/share/config.site
3342 ac_site_file2=$prefix/etc/config.site
3343else
3344 ac_site_file1=$ac_default_prefix/share/config.site
3345 ac_site_file2=$ac_default_prefix/etc/config.site
3346fi
3347for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3348do
3349 test "x$ac_site_file" = xNONE && continue
d0ac1c44 3350 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
c971b7fa
PA
3351 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3352$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3353 sed 's/^/| /' "$ac_site_file" >&5
d0ac1c44
SM
3354 . "$ac_site_file" \
3355 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3356$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3357as_fn_error $? "failed to load site script $ac_site_file
3358See \`config.log' for more details" "$LINENO" 5; }
c971b7fa
PA
3359 fi
3360done
3361
3362if test -r "$cache_file"; then
d0ac1c44
SM
3363 # Some versions of bash will fail to source /dev/null (special files
3364 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3365 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
c971b7fa
PA
3366 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3367$as_echo "$as_me: loading cache $cache_file" >&6;}
3368 case $cache_file in
3369 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3370 *) . "./$cache_file";;
3371 esac
3372 fi
3373else
3374 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3375$as_echo "$as_me: creating cache $cache_file" >&6;}
3376 >$cache_file
3377fi
3378
472fa5ee
SM
3379gl_func_list="$gl_func_list canonicalize_file_name"
3380gl_func_list="$gl_func_list getcwd"
3381gl_func_list="$gl_func_list readlink"
3382gl_func_list="$gl_func_list realpath"
3383gl_header_list="$gl_header_list sys/param.h"
3384gl_header_list="$gl_header_list unistd.h"
3385gl_func_list="$gl_func_list _set_invalid_parameter_handler"
3386gl_header_list="$gl_header_list sys/socket.h"
3387gl_func_list="$gl_func_list fchdir"
3388gl_header_list="$gl_header_list dirent.h"
3389gl_func_list="$gl_func_list fcntl"
3390gl_func_list="$gl_func_list symlink"
3391gl_func_list="$gl_func_list fdopendir"
3392gl_func_list="$gl_func_list mempcpy"
3393gl_func_list="$gl_func_list btowc"
3394gl_func_list="$gl_func_list isblank"
3395gl_func_list="$gl_func_list iswctype"
3396gl_func_list="$gl_func_list mbsrtowcs"
3397gl_func_list="$gl_func_list wmemchr"
3398gl_func_list="$gl_func_list wmemcpy"
3399gl_func_list="$gl_func_list wmempcpy"
3400gl_header_list="$gl_header_list wctype.h"
8690e634 3401gl_fnmatch_required=GNU
472fa5ee
SM
3402gl_header_list="$gl_header_list sys/stat.h"
3403gl_func_list="$gl_func_list fstatat"
3404gl_func_list="$gl_func_list getdtablesize"
3405gl_func_list="$gl_func_list getlogin_r"
3406gl_func_list="$gl_func_list getprogname"
3407gl_func_list="$gl_func_list getexecname"
3408gl_header_list="$gl_header_list sys/time.h"
3409gl_func_list="$gl_func_list gettimeofday"
5e8754f9 3410gl_header_list="$gl_header_list sys/cdefs.h"
472fa5ee
SM
3411gl_func_list="$gl_func_list getpwnam_r"
3412gl_header_list="$gl_header_list limits.h"
3413gl_header_list="$gl_header_list wchar.h"
3414gl_header_list="$gl_header_list stdint.h"
3415gl_header_list="$gl_header_list inttypes.h"
3416gl_func_list="$gl_func_list lstat"
3417gl_header_list="$gl_header_list math.h"
3418gl_func_list="$gl_func_list mbsinit"
3419gl_func_list="$gl_func_list mbrtowc"
3420gl_header_list="$gl_header_list sys/mman.h"
3421gl_func_list="$gl_func_list mprotect"
3422gl_func_list="$gl_func_list mkstemp"
3423gl_func_list="$gl_func_list openat"
3424gl_func_list="$gl_func_list link"
5e8754f9
SDJ
3425gl_func_list="$gl_func_list secure_getenv"
3426gl_func_list="$gl_func_list getuid"
3427gl_func_list="$gl_func_list geteuid"
3428gl_func_list="$gl_func_list getgid"
3429gl_func_list="$gl_func_list getegid"
472fa5ee
SM
3430gl_func_list="$gl_func_list setenv"
3431gl_func_list="$gl_func_list strdup"
3432gl_func_list="$gl_func_list pipe"
3433gl_header_list="$gl_header_list features.h"
3434gl_func_list="$gl_func_list iswcntrl"
c971b7fa
PA
3435# Check that the precious variables saved in the cache have kept the same
3436# value.
3437ac_cache_corrupted=false
3438for ac_var in $ac_precious_vars; do
3439 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3440 eval ac_new_set=\$ac_env_${ac_var}_set
3441 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3442 eval ac_new_val=\$ac_env_${ac_var}_value
3443 case $ac_old_set,$ac_new_set in
3444 set,)
3445 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3446$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3447 ac_cache_corrupted=: ;;
3448 ,set)
3449 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3450$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3451 ac_cache_corrupted=: ;;
3452 ,);;
3453 *)
3454 if test "x$ac_old_val" != "x$ac_new_val"; then
3455 # differences in whitespace do not lead to failure.
3456 ac_old_val_w=`echo x $ac_old_val`
3457 ac_new_val_w=`echo x $ac_new_val`
3458 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3459 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3460$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3461 ac_cache_corrupted=:
3462 else
3463 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3464$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3465 eval $ac_var=\$ac_old_val
3466 fi
3467 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3468$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3469 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3470$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3471 fi;;
3472 esac
3473 # Pass precious variables to config.status.
3474 if test "$ac_new_set" = set; then
3475 case $ac_new_val in
3476 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3477 *) ac_arg=$ac_var=$ac_new_val ;;
3478 esac
3479 case " $ac_configure_args " in
3480 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3481 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3482 esac
3483 fi
3484done
3485if $ac_cache_corrupted; then
3486 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3487$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3488 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3489$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d0ac1c44 3490 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
c971b7fa
PA
3491fi
3492## -------------------- ##
3493## Main body of script. ##
3494## -------------------- ##
3495
3496ac_ext=c
3497ac_cpp='$CPP $CPPFLAGS'
3498ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3499ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3500ac_compiler_gnu=$ac_cv_c_compiler_gnu
3501
3502
d0ac1c44 3503
c971b7fa
PA
3504ac_config_headers="$ac_config_headers config.h:config.in"
3505
3506
3507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
3508$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
3509 # Check whether --enable-maintainer-mode was given.
3510if test "${enable_maintainer_mode+set}" = set; then :
3511 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
3512else
3513 USE_MAINTAINER_MODE=no
3514fi
3515
3516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3517$as_echo "$USE_MAINTAINER_MODE" >&6; }
3518 if test $USE_MAINTAINER_MODE = yes; then
3519 MAINTAINER_MODE_TRUE=
3520 MAINTAINER_MODE_FALSE='#'
3521else
3522 MAINTAINER_MODE_TRUE='#'
3523 MAINTAINER_MODE_FALSE=
3524fi
3525
3526 MAINT=$MAINTAINER_MODE_TRUE
3527
3528
3529
3530ac_ext=c
3531ac_cpp='$CPP $CPPFLAGS'
3532ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3533ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3534ac_compiler_gnu=$ac_cv_c_compiler_gnu
3535if test -n "$ac_tool_prefix"; then
3536 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3537set dummy ${ac_tool_prefix}gcc; ac_word=$2
3538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3539$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3540if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
3541 $as_echo_n "(cached) " >&6
3542else
3543 if test -n "$CC"; then
3544 ac_cv_prog_CC="$CC" # Let the user override the test.
3545else
3546as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3547for as_dir in $PATH
3548do
3549 IFS=$as_save_IFS
3550 test -z "$as_dir" && as_dir=.
3551 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3552 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3553 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3554 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3555 break 2
3556 fi
3557done
3558 done
3559IFS=$as_save_IFS
3560
3561fi
3562fi
3563CC=$ac_cv_prog_CC
3564if test -n "$CC"; then
3565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3566$as_echo "$CC" >&6; }
3567else
3568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3569$as_echo "no" >&6; }
3570fi
3571
3572
3573fi
3574if test -z "$ac_cv_prog_CC"; then
3575 ac_ct_CC=$CC
3576 # Extract the first word of "gcc", so it can be a program name with args.
3577set dummy gcc; ac_word=$2
3578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3579$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3580if ${ac_cv_prog_ac_ct_CC+:} false; then :
c971b7fa
PA
3581 $as_echo_n "(cached) " >&6
3582else
3583 if test -n "$ac_ct_CC"; then
3584 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3585else
3586as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3587for as_dir in $PATH
3588do
3589 IFS=$as_save_IFS
3590 test -z "$as_dir" && as_dir=.
3591 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3592 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3593 ac_cv_prog_ac_ct_CC="gcc"
3594 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3595 break 2
3596 fi
3597done
3598 done
3599IFS=$as_save_IFS
3600
3601fi
3602fi
3603ac_ct_CC=$ac_cv_prog_ac_ct_CC
3604if test -n "$ac_ct_CC"; then
3605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3606$as_echo "$ac_ct_CC" >&6; }
3607else
3608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3609$as_echo "no" >&6; }
3610fi
3611
3612 if test "x$ac_ct_CC" = x; then
3613 CC=""
3614 else
3615 case $cross_compiling:$ac_tool_warned in
3616yes:)
3617{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3618$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3619ac_tool_warned=yes ;;
3620esac
3621 CC=$ac_ct_CC
3622 fi
3623else
3624 CC="$ac_cv_prog_CC"
3625fi
3626
3627if test -z "$CC"; then
3628 if test -n "$ac_tool_prefix"; then
3629 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3630set dummy ${ac_tool_prefix}cc; ac_word=$2
3631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3632$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3633if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
3634 $as_echo_n "(cached) " >&6
3635else
3636 if test -n "$CC"; then
3637 ac_cv_prog_CC="$CC" # Let the user override the test.
3638else
3639as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3640for as_dir in $PATH
3641do
3642 IFS=$as_save_IFS
3643 test -z "$as_dir" && as_dir=.
3644 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3645 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3646 ac_cv_prog_CC="${ac_tool_prefix}cc"
3647 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3648 break 2
3649 fi
3650done
3651 done
3652IFS=$as_save_IFS
3653
3654fi
3655fi
3656CC=$ac_cv_prog_CC
3657if test -n "$CC"; then
3658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3659$as_echo "$CC" >&6; }
3660else
3661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3662$as_echo "no" >&6; }
3663fi
3664
3665
3666 fi
3667fi
3668if test -z "$CC"; then
3669 # Extract the first word of "cc", so it can be a program name with args.
3670set dummy cc; ac_word=$2
3671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3672$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3673if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
3674 $as_echo_n "(cached) " >&6
3675else
3676 if test -n "$CC"; then
3677 ac_cv_prog_CC="$CC" # Let the user override the test.
3678else
3679 ac_prog_rejected=no
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
d0ac1c44 3686 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3687 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3688 ac_prog_rejected=yes
3689 continue
3690 fi
3691 ac_cv_prog_CC="cc"
3692 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3693 break 2
3694 fi
3695done
3696 done
3697IFS=$as_save_IFS
3698
3699if test $ac_prog_rejected = yes; then
3700 # We found a bogon in the path, so make sure we never use it.
3701 set dummy $ac_cv_prog_CC
3702 shift
3703 if test $# != 0; then
3704 # We chose a different compiler from the bogus one.
3705 # However, it has the same basename, so the bogon will be chosen
3706 # first if we set CC to just the basename; use the full file name.
3707 shift
3708 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3709 fi
3710fi
3711fi
3712fi
3713CC=$ac_cv_prog_CC
3714if test -n "$CC"; then
3715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3716$as_echo "$CC" >&6; }
3717else
3718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3719$as_echo "no" >&6; }
3720fi
3721
3722
3723fi
3724if test -z "$CC"; then
3725 if test -n "$ac_tool_prefix"; then
3726 for ac_prog in cl.exe
3727 do
3728 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3729set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3731$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3732if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
3733 $as_echo_n "(cached) " >&6
3734else
3735 if test -n "$CC"; then
3736 ac_cv_prog_CC="$CC" # Let the user override the test.
3737else
3738as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3739for as_dir in $PATH
3740do
3741 IFS=$as_save_IFS
3742 test -z "$as_dir" && as_dir=.
3743 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3744 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3745 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3746 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3747 break 2
3748 fi
3749done
3750 done
3751IFS=$as_save_IFS
3752
3753fi
3754fi
3755CC=$ac_cv_prog_CC
3756if test -n "$CC"; then
3757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3758$as_echo "$CC" >&6; }
3759else
3760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3761$as_echo "no" >&6; }
3762fi
3763
3764
3765 test -n "$CC" && break
3766 done
3767fi
3768if test -z "$CC"; then
3769 ac_ct_CC=$CC
3770 for ac_prog in cl.exe
3771do
3772 # Extract the first word of "$ac_prog", so it can be a program name with args.
3773set dummy $ac_prog; ac_word=$2
3774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3775$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3776if ${ac_cv_prog_ac_ct_CC+:} false; then :
c971b7fa
PA
3777 $as_echo_n "(cached) " >&6
3778else
3779 if test -n "$ac_ct_CC"; then
3780 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3781else
3782as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3783for as_dir in $PATH
3784do
3785 IFS=$as_save_IFS
3786 test -z "$as_dir" && as_dir=.
3787 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3788 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3789 ac_cv_prog_ac_ct_CC="$ac_prog"
3790 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3791 break 2
3792 fi
3793done
3794 done
3795IFS=$as_save_IFS
3796
3797fi
3798fi
3799ac_ct_CC=$ac_cv_prog_ac_ct_CC
3800if test -n "$ac_ct_CC"; then
3801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3802$as_echo "$ac_ct_CC" >&6; }
3803else
3804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3805$as_echo "no" >&6; }
3806fi
3807
3808
3809 test -n "$ac_ct_CC" && break
3810done
3811
3812 if test "x$ac_ct_CC" = x; then
3813 CC=""
3814 else
3815 case $cross_compiling:$ac_tool_warned in
3816yes:)
3817{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3818$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3819ac_tool_warned=yes ;;
3820esac
3821 CC=$ac_ct_CC
3822 fi
3823fi
3824
3825fi
3826
3827
3828test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3829$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3830as_fn_error $? "no acceptable C compiler found in \$PATH
3831See \`config.log' for more details" "$LINENO" 5; }
c971b7fa
PA
3832
3833# Provide some information about the compiler.
3834$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3835set X $ac_compile
3836ac_compiler=$2
5e8754f9 3837for ac_option in --version -v -V -qversion; do
c971b7fa
PA
3838 { { ac_try="$ac_compiler $ac_option >&5"
3839case "(($ac_try" in
3840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3841 *) ac_try_echo=$ac_try;;
3842esac
3843eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3844$as_echo "$ac_try_echo"; } >&5
3845 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3846 ac_status=$?
3847 if test -s conftest.err; then
3848 sed '10a\
3849... rest of stderr output deleted ...
3850 10q' conftest.err >conftest.er1
3851 cat conftest.er1 >&5
c971b7fa 3852 fi
d0ac1c44 3853 rm -f conftest.er1 conftest.err
c971b7fa
PA
3854 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3855 test $ac_status = 0; }
3856done
3857
3858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3859/* end confdefs.h. */
d0ac1c44 3860
c971b7fa
PA
3861int
3862main ()
3863{
c971b7fa
PA
3864
3865 ;
3866 return 0;
3867}
3868_ACEOF
3869ac_clean_files_save=$ac_clean_files
d0ac1c44 3870ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
c971b7fa
PA
3871# Try to create an executable without -o first, disregard a.out.
3872# It will help us diagnose broken compilers, and finding out an intuition
3873# of exeext.
d0ac1c44
SM
3874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3875$as_echo_n "checking whether the C compiler works... " >&6; }
c971b7fa
PA
3876ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3877
3878# The possible output files:
3879ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3880
3881ac_rmfiles=
3882for ac_file in $ac_files
3883do
3884 case $ac_file in
3885 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3886 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3887 esac
3888done
3889rm -f $ac_rmfiles
3890
3891if { { ac_try="$ac_link_default"
3892case "(($ac_try" in
3893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3894 *) ac_try_echo=$ac_try;;
3895esac
3896eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3897$as_echo "$ac_try_echo"; } >&5
3898 (eval "$ac_link_default") 2>&5
3899 ac_status=$?
3900 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3901 test $ac_status = 0; }; then :
3902 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3903# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3904# in a Makefile. We should not override ac_cv_exeext if it was cached,
3905# so that the user can short-circuit this test for compilers unknown to
3906# Autoconf.
3907for ac_file in $ac_files ''
3908do
3909 test -f "$ac_file" || continue
3910 case $ac_file in
3911 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3912 ;;
3913 [ab].out )
3914 # We found the default executable, but exeext='' is most
3915 # certainly right.
3916 break;;
3917 *.* )
3918 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3919 then :; else
3920 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3921 fi
3922 # We set ac_cv_exeext here because the later test for it is not
3923 # safe: cross compilers may not add the suffix if given an `-o'
3924 # argument, so we may need to know it at that point already.
3925 # Even if this section looks crufty: it has the advantage of
3926 # actually working.
3927 break;;
3928 * )
3929 break;;
3930 esac
3931done
3932test "$ac_cv_exeext" = no && ac_cv_exeext=
3933
3934else
3935 ac_file=''
3936fi
c971b7fa 3937if test -z "$ac_file"; then :
d0ac1c44
SM
3938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3939$as_echo "no" >&6; }
3940$as_echo "$as_me: failed program was:" >&5
c971b7fa
PA
3941sed 's/^/| /' conftest.$ac_ext >&5
3942
3943{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3944$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3945as_fn_error 77 "C compiler cannot create executables
3946See \`config.log' for more details" "$LINENO" 5; }
3947else
3948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3949$as_echo "yes" >&6; }
c971b7fa 3950fi
d0ac1c44
SM
3951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3952$as_echo_n "checking for C compiler default output file name... " >&6; }
3953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3954$as_echo "$ac_file" >&6; }
c971b7fa
PA
3955ac_exeext=$ac_cv_exeext
3956
d0ac1c44 3957rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
c971b7fa 3958ac_clean_files=$ac_clean_files_save
c971b7fa
PA
3959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3960$as_echo_n "checking for suffix of executables... " >&6; }
3961if { { ac_try="$ac_link"
3962case "(($ac_try" in
3963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3964 *) ac_try_echo=$ac_try;;
3965esac
3966eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3967$as_echo "$ac_try_echo"; } >&5
3968 (eval "$ac_link") 2>&5
3969 ac_status=$?
3970 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3971 test $ac_status = 0; }; then :
3972 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3973# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3974# work properly (i.e., refer to `conftest.exe'), while it won't with
3975# `rm'.
3976for ac_file in conftest.exe conftest conftest.*; do
3977 test -f "$ac_file" || continue
3978 case $ac_file in
3979 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3980 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3981 break;;
3982 * ) break;;
3983 esac
3984done
3985else
3986 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3987$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3988as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3989See \`config.log' for more details" "$LINENO" 5; }
c971b7fa 3990fi
d0ac1c44 3991rm -f conftest conftest$ac_cv_exeext
c971b7fa
PA
3992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3993$as_echo "$ac_cv_exeext" >&6; }
3994
3995rm -f conftest.$ac_ext
3996EXEEXT=$ac_cv_exeext
3997ac_exeext=$EXEEXT
d0ac1c44
SM
3998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3999/* end confdefs.h. */
4000#include <stdio.h>
4001int
4002main ()
4003{
4004FILE *f = fopen ("conftest.out", "w");
4005 return ferror (f) || fclose (f) != 0;
4006
4007 ;
4008 return 0;
4009}
4010_ACEOF
4011ac_clean_files="$ac_clean_files conftest.out"
4012# Check that the compiler produces executables we can run. If not, either
4013# the compiler is broken, or we cross compile.
4014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4015$as_echo_n "checking whether we are cross compiling... " >&6; }
4016if test "$cross_compiling" != yes; then
4017 { { ac_try="$ac_link"
4018case "(($ac_try" in
4019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4020 *) ac_try_echo=$ac_try;;
4021esac
4022eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4023$as_echo "$ac_try_echo"; } >&5
4024 (eval "$ac_link") 2>&5
4025 ac_status=$?
4026 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4027 test $ac_status = 0; }
4028 if { ac_try='./conftest$ac_cv_exeext'
4029 { { case "(($ac_try" in
4030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4031 *) ac_try_echo=$ac_try;;
4032esac
4033eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4034$as_echo "$ac_try_echo"; } >&5
4035 (eval "$ac_try") 2>&5
4036 ac_status=$?
4037 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4038 test $ac_status = 0; }; }; then
4039 cross_compiling=no
4040 else
4041 if test "$cross_compiling" = maybe; then
4042 cross_compiling=yes
4043 else
4044 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4045$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4046as_fn_error $? "cannot run C compiled programs.
4047If you meant to cross compile, use \`--host'.
4048See \`config.log' for more details" "$LINENO" 5; }
4049 fi
4050 fi
4051fi
4052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4053$as_echo "$cross_compiling" >&6; }
4054
4055rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4056ac_clean_files=$ac_clean_files_save
c971b7fa
PA
4057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4058$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 4059if ${ac_cv_objext+:} false; then :
c971b7fa
PA
4060 $as_echo_n "(cached) " >&6
4061else
4062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4063/* end confdefs.h. */
4064
4065int
4066main ()
4067{
4068
4069 ;
4070 return 0;
4071}
4072_ACEOF
4073rm -f conftest.o conftest.obj
4074if { { ac_try="$ac_compile"
4075case "(($ac_try" in
4076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4077 *) ac_try_echo=$ac_try;;
4078esac
4079eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4080$as_echo "$ac_try_echo"; } >&5
4081 (eval "$ac_compile") 2>&5
4082 ac_status=$?
4083 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4084 test $ac_status = 0; }; then :
4085 for ac_file in conftest.o conftest.obj conftest.*; do
4086 test -f "$ac_file" || continue;
4087 case $ac_file in
4088 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4089 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4090 break;;
4091 esac
4092done
4093else
4094 $as_echo "$as_me: failed program was:" >&5
4095sed 's/^/| /' conftest.$ac_ext >&5
4096
4097{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4098$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4099as_fn_error $? "cannot compute suffix of object files: cannot compile
4100See \`config.log' for more details" "$LINENO" 5; }
c971b7fa
PA
4101fi
4102rm -f conftest.$ac_cv_objext conftest.$ac_ext
4103fi
4104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4105$as_echo "$ac_cv_objext" >&6; }
4106OBJEXT=$ac_cv_objext
4107ac_objext=$OBJEXT
4108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4109$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 4110if ${ac_cv_c_compiler_gnu+:} false; then :
c971b7fa
PA
4111 $as_echo_n "(cached) " >&6
4112else
4113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4114/* end confdefs.h. */
4115
4116int
4117main ()
4118{
4119#ifndef __GNUC__
4120 choke me
4121#endif
4122
4123 ;
4124 return 0;
4125}
4126_ACEOF
4127if ac_fn_c_try_compile "$LINENO"; then :
4128 ac_compiler_gnu=yes
4129else
4130 ac_compiler_gnu=no
4131fi
4132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4133ac_cv_c_compiler_gnu=$ac_compiler_gnu
4134
4135fi
4136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4137$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4138if test $ac_compiler_gnu = yes; then
4139 GCC=yes
4140else
4141 GCC=
4142fi
4143ac_test_CFLAGS=${CFLAGS+set}
4144ac_save_CFLAGS=$CFLAGS
4145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4146$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 4147if ${ac_cv_prog_cc_g+:} false; then :
c971b7fa
PA
4148 $as_echo_n "(cached) " >&6
4149else
4150 ac_save_c_werror_flag=$ac_c_werror_flag
4151 ac_c_werror_flag=yes
4152 ac_cv_prog_cc_g=no
4153 CFLAGS="-g"
4154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4155/* end confdefs.h. */
4156
4157int
4158main ()
4159{
4160
4161 ;
4162 return 0;
4163}
4164_ACEOF
4165if ac_fn_c_try_compile "$LINENO"; then :
4166 ac_cv_prog_cc_g=yes
4167else
4168 CFLAGS=""
4169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4170/* end confdefs.h. */
4171
4172int
4173main ()
4174{
4175
4176 ;
4177 return 0;
4178}
4179_ACEOF
4180if ac_fn_c_try_compile "$LINENO"; then :
4181
4182else
4183 ac_c_werror_flag=$ac_save_c_werror_flag
4184 CFLAGS="-g"
4185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4186/* end confdefs.h. */
4187
4188int
4189main ()
4190{
4191
4192 ;
4193 return 0;
4194}
4195_ACEOF
4196if ac_fn_c_try_compile "$LINENO"; then :
4197 ac_cv_prog_cc_g=yes
4198fi
4199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4200fi
4201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4202fi
4203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4204 ac_c_werror_flag=$ac_save_c_werror_flag
4205fi
4206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4207$as_echo "$ac_cv_prog_cc_g" >&6; }
4208if test "$ac_test_CFLAGS" = set; then
4209 CFLAGS=$ac_save_CFLAGS
4210elif test $ac_cv_prog_cc_g = yes; then
4211 if test "$GCC" = yes; then
4212 CFLAGS="-g -O2"
4213 else
4214 CFLAGS="-g"
4215 fi
4216else
4217 if test "$GCC" = yes; then
4218 CFLAGS="-O2"
4219 else
4220 CFLAGS=
4221 fi
4222fi
5e8754f9
SDJ
4223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4224$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4225if ${ac_cv_prog_cc_c89+:} false; then :
c971b7fa
PA
4226 $as_echo_n "(cached) " >&6
4227else
5e8754f9 4228 ac_cv_prog_cc_c89=no
c971b7fa
PA
4229ac_save_CC=$CC
4230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4231/* end confdefs.h. */
4232#include <stdarg.h>
4233#include <stdio.h>
5e8754f9
SDJ
4234struct stat;
4235/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4236struct buf { int x; };
4237FILE * (*rcsopen) (struct buf *, struct stat *, int);
4238static char *e (p, i)
4239 char **p;
4240 int i;
7a6dbc2f 4241{
5e8754f9 4242 return p[i];
c971b7fa 4243}
5e8754f9 4244static char *f (char * (*g) (char **, int), char **p, ...)
7a6dbc2f 4245{
5e8754f9
SDJ
4246 char *s;
4247 va_list v;
4248 va_start (v,p);
4249 s = g (p, va_arg (v,int));
4250 va_end (v);
4251 return s;
7a6dbc2f 4252}
7a6dbc2f 4253
5e8754f9
SDJ
4254/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4255 function prototypes and stuff, but not '\xHH' hex character constants.
4256 These don't provoke an error unfortunately, instead are silently treated
4257 as 'x'. The following induces an error, until -std is added to get
4258 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4259 array size at least. It's necessary to write '\x00'==0 to get something
4260 that's true only with -std. */
4261int osf4_cc_array ['\x00' == 0 ? 1 : -1];
7a6dbc2f 4262
5e8754f9
SDJ
4263/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4264 inside strings and character constants. */
4265#define FOO(x) 'x'
4266int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
c971b7fa 4267
5e8754f9
SDJ
4268int test (int i, double x);
4269struct s1 {int (*f) (int a);};
4270struct s2 {int (*f) (double a);};
4271int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4272int argc;
4273char **argv;
c971b7fa
PA
4274int
4275main ()
4276{
5e8754f9 4277return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
c971b7fa
PA
4278 ;
4279 return 0;
4280}
4281_ACEOF
5e8754f9
SDJ
4282for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4283 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
c971b7fa
PA
4284do
4285 CC="$ac_save_CC $ac_arg"
4286 if ac_fn_c_try_compile "$LINENO"; then :
5e8754f9 4287 ac_cv_prog_cc_c89=$ac_arg
c971b7fa
PA
4288fi
4289rm -f core conftest.err conftest.$ac_objext
5e8754f9 4290 test "x$ac_cv_prog_cc_c89" != "xno" && break
c971b7fa
PA
4291done
4292rm -f conftest.$ac_ext
4293CC=$ac_save_CC
4294
4295fi
4296# AC_CACHE_VAL
5e8754f9 4297case "x$ac_cv_prog_cc_c89" in
c971b7fa
PA
4298 x)
4299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4300$as_echo "none needed" >&6; } ;;
4301 xno)
4302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4303$as_echo "unsupported" >&6; } ;;
4304 *)
5e8754f9
SDJ
4305 CC="$CC $ac_cv_prog_cc_c89"
4306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4307$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c971b7fa 4308esac
5e8754f9 4309if test "x$ac_cv_prog_cc_c89" != xno; then :
7a6dbc2f 4310
5e8754f9 4311fi
7a6dbc2f 4312
5e8754f9
SDJ
4313ac_ext=c
4314ac_cpp='$CPP $CPPFLAGS'
4315ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4316ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4317ac_compiler_gnu=$ac_cv_c_compiler_gnu
7a6dbc2f 4318
5e8754f9
SDJ
4319ac_aux_dir=
4320for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4321 if test -f "$ac_dir/install-sh"; then
4322 ac_aux_dir=$ac_dir
4323 ac_install_sh="$ac_aux_dir/install-sh -c"
4324 break
4325 elif test -f "$ac_dir/install.sh"; then
4326 ac_aux_dir=$ac_dir
4327 ac_install_sh="$ac_aux_dir/install.sh -c"
4328 break
4329 elif test -f "$ac_dir/shtool"; then
4330 ac_aux_dir=$ac_dir
4331 ac_install_sh="$ac_aux_dir/shtool install -c"
4332 break
4333 fi
4334done
4335if test -z "$ac_aux_dir"; then
4336 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4337fi
7a6dbc2f 4338
5e8754f9
SDJ
4339# These three variables are undocumented and unsupported,
4340# and are intended to be withdrawn in a future Autoconf release.
4341# They can cause serious problems if a builder's source tree is in a directory
4342# whose full name contains unusual characters.
4343ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4344ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4345ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
7a6dbc2f 4346
7a6dbc2f 4347
5e8754f9
SDJ
4348# Expand $ac_aux_dir to an absolute path.
4349am_aux_dir=`cd "$ac_aux_dir" && pwd`
7a6dbc2f 4350
5e8754f9
SDJ
4351ac_ext=c
4352ac_cpp='$CPP $CPPFLAGS'
4353ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4354ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4355ac_compiler_gnu=$ac_cv_c_compiler_gnu
4356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
4357$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
4358if ${am_cv_prog_cc_c_o+:} false; then :
d0ac1c44
SM
4359 $as_echo_n "(cached) " >&6
4360else
5e8754f9 4361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d0ac1c44
SM
4362/* end confdefs.h. */
4363
4364int
4365main ()
4366{
5e8754f9 4367
d0ac1c44
SM
4368 ;
4369 return 0;
4370}
4371_ACEOF
5e8754f9
SDJ
4372 # Make sure it works both with $CC and with simple cc.
4373 # Following AC_PROG_CC_C_O, we do the test twice because some
4374 # compilers refuse to overwrite an existing .o file with -o,
4375 # though they will create one.
4376 am_cv_prog_cc_c_o=yes
4377 for am_i in 1 2; do
4378 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
4379 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
4380 ac_status=$?
4381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4382 (exit $ac_status); } \
4383 && test -f conftest2.$ac_objext; then
4384 : OK
4385 else
4386 am_cv_prog_cc_c_o=no
4387 break
4388 fi
4389 done
4390 rm -f core conftest*
4391 unset am_i
4392fi
4393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
4394$as_echo "$am_cv_prog_cc_c_o" >&6; }
4395if test "$am_cv_prog_cc_c_o" != yes; then
4396 # Losing compiler, so override with the script.
4397 # FIXME: It is wrong to rewrite CC.
4398 # But if we don't then we get into trouble of one sort or another.
4399 # A longer-term fix would be to have automake use am__CC in this case,
4400 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4401 CC="$am_aux_dir/compile $CC"
7a6dbc2f 4402fi
d0ac1c44
SM
4403ac_ext=c
4404ac_cpp='$CPP $CPPFLAGS'
4405ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4406ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4407ac_compiler_gnu=$ac_cv_c_compiler_gnu
4408
4409
5e8754f9 4410
c971b7fa
PA
4411ac_ext=c
4412ac_cpp='$CPP $CPPFLAGS'
4413ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4414ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4415ac_compiler_gnu=$ac_cv_c_compiler_gnu
4416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4417$as_echo_n "checking how to run the C preprocessor... " >&6; }
4418# On Suns, sometimes $CPP names a directory.
4419if test -n "$CPP" && test -d "$CPP"; then
4420 CPP=
4421fi
4422if test -z "$CPP"; then
d0ac1c44 4423 if ${ac_cv_prog_CPP+:} false; then :
c971b7fa
PA
4424 $as_echo_n "(cached) " >&6
4425else
4426 # Double quotes because CPP needs to be expanded
4427 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4428 do
4429 ac_preproc_ok=false
4430for ac_c_preproc_warn_flag in '' yes
4431do
4432 # Use a header file that comes with gcc, so configuring glibc
4433 # with a fresh cross-compiler works.
4434 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4435 # <limits.h> exists even on freestanding compilers.
4436 # On the NeXT, cc -E runs the code through the compiler's parser,
4437 # not just through cpp. "Syntax error" is here to catch this case.
4438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4439/* end confdefs.h. */
4440#ifdef __STDC__
4441# include <limits.h>
4442#else
4443# include <assert.h>
4444#endif
4445 Syntax error
4446_ACEOF
4447if ac_fn_c_try_cpp "$LINENO"; then :
4448
4449else
4450 # Broken: fails on valid input.
4451continue
4452fi
d0ac1c44 4453rm -f conftest.err conftest.i conftest.$ac_ext
c971b7fa
PA
4454
4455 # OK, works on sane cases. Now check whether nonexistent headers
4456 # can be detected and how.
4457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4458/* end confdefs.h. */
4459#include <ac_nonexistent.h>
4460_ACEOF
4461if ac_fn_c_try_cpp "$LINENO"; then :
4462 # Broken: success on invalid input.
4463continue
4464else
4465 # Passes both tests.
4466ac_preproc_ok=:
4467break
4468fi
d0ac1c44 4469rm -f conftest.err conftest.i conftest.$ac_ext
c971b7fa
PA
4470
4471done
4472# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4473rm -f conftest.i conftest.err conftest.$ac_ext
c971b7fa
PA
4474if $ac_preproc_ok; then :
4475 break
4476fi
4477
4478 done
4479 ac_cv_prog_CPP=$CPP
4480
4481fi
4482 CPP=$ac_cv_prog_CPP
4483else
4484 ac_cv_prog_CPP=$CPP
4485fi
4486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4487$as_echo "$CPP" >&6; }
4488ac_preproc_ok=false
4489for ac_c_preproc_warn_flag in '' yes
4490do
4491 # Use a header file that comes with gcc, so configuring glibc
4492 # with a fresh cross-compiler works.
4493 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4494 # <limits.h> exists even on freestanding compilers.
4495 # On the NeXT, cc -E runs the code through the compiler's parser,
4496 # not just through cpp. "Syntax error" is here to catch this case.
4497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4498/* end confdefs.h. */
4499#ifdef __STDC__
4500# include <limits.h>
4501#else
4502# include <assert.h>
4503#endif
4504 Syntax error
4505_ACEOF
4506if ac_fn_c_try_cpp "$LINENO"; then :
4507
4508else
4509 # Broken: fails on valid input.
4510continue
4511fi
d0ac1c44 4512rm -f conftest.err conftest.i conftest.$ac_ext
c971b7fa
PA
4513
4514 # OK, works on sane cases. Now check whether nonexistent headers
4515 # can be detected and how.
4516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4517/* end confdefs.h. */
4518#include <ac_nonexistent.h>
4519_ACEOF
4520if ac_fn_c_try_cpp "$LINENO"; then :
4521 # Broken: success on invalid input.
4522continue
4523else
4524 # Passes both tests.
4525ac_preproc_ok=:
4526break
4527fi
d0ac1c44 4528rm -f conftest.err conftest.i conftest.$ac_ext
c971b7fa
PA
4529
4530done
4531# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4532rm -f conftest.i conftest.err conftest.$ac_ext
c971b7fa
PA
4533if $ac_preproc_ok; then :
4534
4535else
4536 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4537$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4538as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4539See \`config.log' for more details" "$LINENO" 5; }
c971b7fa
PA
4540fi
4541
4542ac_ext=c
4543ac_cpp='$CPP $CPPFLAGS'
4544ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4545ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4546ac_compiler_gnu=$ac_cv_c_compiler_gnu
4547
4548
4549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4550$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 4551if ${ac_cv_path_GREP+:} false; then :
c971b7fa
PA
4552 $as_echo_n "(cached) " >&6
4553else
4554 if test -z "$GREP"; then
4555 ac_path_GREP_found=false
4556 # Loop through the user's path and test for each of PROGNAME-LIST
4557 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4558for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4559do
4560 IFS=$as_save_IFS
4561 test -z "$as_dir" && as_dir=.
4562 for ac_prog in grep ggrep; do
4563 for ac_exec_ext in '' $ac_executable_extensions; do
4564 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4565 as_fn_executable_p "$ac_path_GREP" || continue
c971b7fa
PA
4566# Check for GNU ac_path_GREP and select it if it is found.
4567 # Check for GNU $ac_path_GREP
4568case `"$ac_path_GREP" --version 2>&1` in
4569*GNU*)
4570 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4571*)
4572 ac_count=0
4573 $as_echo_n 0123456789 >"conftest.in"
4574 while :
4575 do
4576 cat "conftest.in" "conftest.in" >"conftest.tmp"
4577 mv "conftest.tmp" "conftest.in"
4578 cp "conftest.in" "conftest.nl"
4579 $as_echo 'GREP' >> "conftest.nl"
4580 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4581 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4582 as_fn_arith $ac_count + 1 && ac_count=$as_val
4583 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4584 # Best one so far, save it but keep looking for a better one
4585 ac_cv_path_GREP="$ac_path_GREP"
4586 ac_path_GREP_max=$ac_count
4587 fi
4588 # 10*(2^10) chars as input seems more than enough
4589 test $ac_count -gt 10 && break
4590 done
4591 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4592esac
4593
4594 $ac_path_GREP_found && break 3
4595 done
4596 done
4597 done
4598IFS=$as_save_IFS
4599 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 4600 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
c971b7fa
PA
4601 fi
4602else
4603 ac_cv_path_GREP=$GREP
4604fi
4605
4606fi
4607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4608$as_echo "$ac_cv_path_GREP" >&6; }
4609 GREP="$ac_cv_path_GREP"
4610
4611
4612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4613$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 4614if ${ac_cv_path_EGREP+:} false; then :
c971b7fa
PA
4615 $as_echo_n "(cached) " >&6
4616else
4617 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4618 then ac_cv_path_EGREP="$GREP -E"
4619 else
4620 if test -z "$EGREP"; then
4621 ac_path_EGREP_found=false
4622 # Loop through the user's path and test for each of PROGNAME-LIST
4623 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4624for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4625do
4626 IFS=$as_save_IFS
4627 test -z "$as_dir" && as_dir=.
4628 for ac_prog in egrep; do
4629 for ac_exec_ext in '' $ac_executable_extensions; do
4630 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4631 as_fn_executable_p "$ac_path_EGREP" || continue
c971b7fa
PA
4632# Check for GNU ac_path_EGREP and select it if it is found.
4633 # Check for GNU $ac_path_EGREP
4634case `"$ac_path_EGREP" --version 2>&1` in
4635*GNU*)
4636 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4637*)
4638 ac_count=0
4639 $as_echo_n 0123456789 >"conftest.in"
4640 while :
4641 do
4642 cat "conftest.in" "conftest.in" >"conftest.tmp"
4643 mv "conftest.tmp" "conftest.in"
4644 cp "conftest.in" "conftest.nl"
4645 $as_echo 'EGREP' >> "conftest.nl"
4646 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4647 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4648 as_fn_arith $ac_count + 1 && ac_count=$as_val
4649 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4650 # Best one so far, save it but keep looking for a better one
4651 ac_cv_path_EGREP="$ac_path_EGREP"
4652 ac_path_EGREP_max=$ac_count
4653 fi
4654 # 10*(2^10) chars as input seems more than enough
4655 test $ac_count -gt 10 && break
4656 done
4657 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4658esac
4659
4660 $ac_path_EGREP_found && break 3
4661 done
4662 done
4663 done
4664IFS=$as_save_IFS
4665 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 4666 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
c971b7fa
PA
4667 fi
4668else
4669 ac_cv_path_EGREP=$EGREP
4670fi
4671
4672 fi
4673fi
4674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4675$as_echo "$ac_cv_path_EGREP" >&6; }
4676 EGREP="$ac_cv_path_EGREP"
4677
4678
4679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4680$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 4681if ${ac_cv_header_stdc+:} false; then :
c971b7fa
PA
4682 $as_echo_n "(cached) " >&6
4683else
4684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4685/* end confdefs.h. */
4686#include <stdlib.h>
4687#include <stdarg.h>
4688#include <string.h>
4689#include <float.h>
4690
4691int
4692main ()
4693{
4694
4695 ;
4696 return 0;
4697}
4698_ACEOF
4699if ac_fn_c_try_compile "$LINENO"; then :
4700 ac_cv_header_stdc=yes
4701else
4702 ac_cv_header_stdc=no
4703fi
4704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4705
4706if test $ac_cv_header_stdc = yes; then
4707 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4709/* end confdefs.h. */
4710#include <string.h>
4711
4712_ACEOF
4713if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4714 $EGREP "memchr" >/dev/null 2>&1; then :
4715
4716else
4717 ac_cv_header_stdc=no
4718fi
4719rm -f conftest*
4720
4721fi
4722
4723if test $ac_cv_header_stdc = yes; then
4724 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4726/* end confdefs.h. */
4727#include <stdlib.h>
4728
4729_ACEOF
4730if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4731 $EGREP "free" >/dev/null 2>&1; then :
4732
4733else
4734 ac_cv_header_stdc=no
4735fi
4736rm -f conftest*
4737
4738fi
4739
4740if test $ac_cv_header_stdc = yes; then
4741 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4742 if test "$cross_compiling" = yes; then :
4743 :
4744else
4745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4746/* end confdefs.h. */
4747#include <ctype.h>
4748#include <stdlib.h>
4749#if ((' ' & 0x0FF) == 0x020)
4750# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4751# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4752#else
4753# define ISLOWER(c) \
4754 (('a' <= (c) && (c) <= 'i') \
4755 || ('j' <= (c) && (c) <= 'r') \
4756 || ('s' <= (c) && (c) <= 'z'))
4757# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4758#endif
4759
4760#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4761int
4762main ()
4763{
4764 int i;
4765 for (i = 0; i < 256; i++)
4766 if (XOR (islower (i), ISLOWER (i))
4767 || toupper (i) != TOUPPER (i))
4768 return 2;
4769 return 0;
4770}
4771_ACEOF
4772if ac_fn_c_try_run "$LINENO"; then :
4773
4774else
4775 ac_cv_header_stdc=no
4776fi
4777rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4778 conftest.$ac_objext conftest.beam conftest.$ac_ext
4779fi
4780
4781fi
4782fi
4783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4784$as_echo "$ac_cv_header_stdc" >&6; }
4785if test $ac_cv_header_stdc = yes; then
4786
4787$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4788
4789fi
4790
4791# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4792for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4793 inttypes.h stdint.h unistd.h
4794do :
4795 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4796ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4797"
d0ac1c44 4798if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
c971b7fa
PA
4799 cat >>confdefs.h <<_ACEOF
4800#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4801_ACEOF
4802
4803fi
4804
4805done
4806
4807
4808
c971b7fa 4809 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 4810if test "x$ac_cv_header_minix_config_h" = xyes; then :
c971b7fa
PA
4811 MINIX=yes
4812else
4813 MINIX=
4814fi
4815
4816
4817 if test "$MINIX" = yes; then
4818
4819$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4820
4821
4822$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4823
4824
4825$as_echo "#define _MINIX 1" >>confdefs.h
4826
c971b7fa 4827
4a626d0a 4828$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
c971b7fa 4829
4a626d0a 4830 fi
c971b7fa
PA
4831
4832
4833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4834$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 4835if ${ac_cv_safe_to_define___extensions__+:} false; then :
c971b7fa
PA
4836 $as_echo_n "(cached) " >&6
4837else
4838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4839/* end confdefs.h. */
4840
4841# define __EXTENSIONS__ 1
4842 $ac_includes_default
4843int
4844main ()
4845{
4846
4847 ;
4848 return 0;
4849}
4850_ACEOF
4851if ac_fn_c_try_compile "$LINENO"; then :
4852 ac_cv_safe_to_define___extensions__=yes
4853else
4854 ac_cv_safe_to_define___extensions__=no
4855fi
4856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4857fi
4858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4859$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4860 test $ac_cv_safe_to_define___extensions__ = yes &&
4861 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4862
4863 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4864
4865 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
4866
4867 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4868
4869 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4870
49e4877c
PA
4871 $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
4872
4873 $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
4874
4875 $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
4876
4877 $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
4878
4879 $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
4880
4881 $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
4882
4883 $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
4884
c971b7fa
PA
4885 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4886
4a626d0a
PA
4887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
4888$as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
d0ac1c44 4889if ${ac_cv_should_define__xopen_source+:} false; then :
4a626d0a
PA
4890 $as_echo_n "(cached) " >&6
4891else
4892 ac_cv_should_define__xopen_source=no
4893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4894/* end confdefs.h. */
4895
4896 #include <wchar.h>
4897 mbstate_t x;
4898int
4899main ()
4900{
4901
4902 ;
4903 return 0;
4904}
4905_ACEOF
4906if ac_fn_c_try_compile "$LINENO"; then :
4907
4908else
4909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4910/* end confdefs.h. */
4911
4912 #define _XOPEN_SOURCE 500
4913 #include <wchar.h>
4914 mbstate_t x;
4915int
4916main ()
4917{
4918
4919 ;
4920 return 0;
4921}
4922_ACEOF
4923if ac_fn_c_try_compile "$LINENO"; then :
4924 ac_cv_should_define__xopen_source=yes
4925fi
d0ac1c44
SM
4926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4927fi
4928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4929fi
4930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
4931$as_echo "$ac_cv_should_define__xopen_source" >&6; }
4932 test $ac_cv_should_define__xopen_source = yes &&
4933 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
4946$as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
4947if ${gl_cv_c_amsterdam_compiler+:} false; then :
4948 $as_echo_n "(cached) " >&6
4949else
4950
4951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4952/* end confdefs.h. */
4953
4954#ifdef __ACK__
4955Amsterdam
4956#endif
4957
4958_ACEOF
4959if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4960 $EGREP "Amsterdam" >/dev/null 2>&1; then :
4961 gl_cv_c_amsterdam_compiler=yes
4962else
4963 gl_cv_c_amsterdam_compiler=no
4964fi
4965rm -f conftest*
4966
4967
4968fi
4969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
4970$as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
4971
4972 if test $gl_cv_c_amsterdam_compiler = yes; then
4973 if test -z "$AR"; then
4974 AR='cc -c.a'
4975 fi
4976 if test -z "$ARFLAGS"; then
4977 ARFLAGS='-o'
4978 fi
4979 else
5e8754f9
SDJ
4980 if test -n "$ac_tool_prefix"; then
4981 for ac_prog in ar lib "link -lib"
4982 do
4983 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4984set dummy $ac_tool_prefix$ac_prog; ac_word=$2
d0ac1c44
SM
4985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4986$as_echo_n "checking for $ac_word... " >&6; }
4987if ${ac_cv_prog_AR+:} false; then :
4988 $as_echo_n "(cached) " >&6
4989else
4990 if test -n "$AR"; then
4991 ac_cv_prog_AR="$AR" # Let the user override the test.
4992else
4993as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4994for as_dir in $PATH
4995do
4996 IFS=$as_save_IFS
4997 test -z "$as_dir" && as_dir=.
4998 for ac_exec_ext in '' $ac_executable_extensions; do
4999 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5e8754f9 5000 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
d0ac1c44
SM
5001 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5002 break 2
5003 fi
5004done
5005 done
5006IFS=$as_save_IFS
5007
5008fi
4a626d0a 5009fi
d0ac1c44
SM
5010AR=$ac_cv_prog_AR
5011if test -n "$AR"; then
5012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5013$as_echo "$AR" >&6; }
5014else
5015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5016$as_echo "no" >&6; }
4a626d0a 5017fi
c971b7fa 5018
49e4877c 5019
5e8754f9
SDJ
5020 test -n "$AR" && break
5021 done
d0ac1c44 5022fi
5e8754f9 5023if test -z "$AR"; then
d0ac1c44 5024 ac_ct_AR=$AR
5e8754f9
SDJ
5025 for ac_prog in ar lib "link -lib"
5026do
5027 # Extract the first word of "$ac_prog", so it can be a program name with args.
5028set dummy $ac_prog; ac_word=$2
d0ac1c44
SM
5029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5030$as_echo_n "checking for $ac_word... " >&6; }
5031if ${ac_cv_prog_ac_ct_AR+:} false; then :
5032 $as_echo_n "(cached) " >&6
5033else
5034 if test -n "$ac_ct_AR"; then
5035 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5036else
5037as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5038for as_dir in $PATH
5039do
5040 IFS=$as_save_IFS
5041 test -z "$as_dir" && as_dir=.
5042 for ac_exec_ext in '' $ac_executable_extensions; do
5043 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5e8754f9 5044 ac_cv_prog_ac_ct_AR="$ac_prog"
d0ac1c44
SM
5045 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5046 break 2
5047 fi
5048done
5049 done
5050IFS=$as_save_IFS
49e4877c 5051
d0ac1c44
SM
5052fi
5053fi
5054ac_ct_AR=$ac_cv_prog_ac_ct_AR
5055if test -n "$ac_ct_AR"; then
5056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5057$as_echo "$ac_ct_AR" >&6; }
5058else
5059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5060$as_echo "no" >&6; }
5061fi
49e4877c 5062
5e8754f9
SDJ
5063
5064 test -n "$ac_ct_AR" && break
5065done
5066
d0ac1c44 5067 if test "x$ac_ct_AR" = x; then
5e8754f9 5068 AR="false"
d0ac1c44
SM
5069 else
5070 case $cross_compiling:$ac_tool_warned in
5071yes:)
5072{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5073$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5074ac_tool_warned=yes ;;
5075esac
5076 AR=$ac_ct_AR
5077 fi
d0ac1c44 5078fi
c971b7fa 5079
5e8754f9 5080: ${AR=ar}
c971b7fa 5081
5e8754f9
SDJ
5082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
5083$as_echo_n "checking the archiver ($AR) interface... " >&6; }
5084if ${am_cv_ar_interface+:} false; then :
c971b7fa
PA
5085 $as_echo_n "(cached) " >&6
5086else
5e8754f9
SDJ
5087 ac_ext=c
5088ac_cpp='$CPP $CPPFLAGS'
5089ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5090ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5091ac_compiler_gnu=$ac_cv_c_compiler_gnu
5092
5093 am_cv_ar_interface=ar
5094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5095/* end confdefs.h. */
5096int some_variable = 0;
5097_ACEOF
5098if ac_fn_c_try_compile "$LINENO"; then :
5099 am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
5100 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
5101 (eval $am_ar_try) 2>&5
5102 ac_status=$?
5103 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5104 test $ac_status = 0; }
5105 if test "$ac_status" -eq 0; then
5106 am_cv_ar_interface=ar
5107 else
5108 am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
5109 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
5110 (eval $am_ar_try) 2>&5
5111 ac_status=$?
5112 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5113 test $ac_status = 0; }
5114 if test "$ac_status" -eq 0; then
5115 am_cv_ar_interface=lib
5116 else
5117 am_cv_ar_interface=unknown
5118 fi
5119 fi
5120 rm -f conftest.lib libconftest.a
5121
5122fi
5123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5124 ac_ext=c
5125ac_cpp='$CPP $CPPFLAGS'
5126ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5127ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5128ac_compiler_gnu=$ac_cv_c_compiler_gnu
5129
5130fi
5131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
5132$as_echo "$am_cv_ar_interface" >&6; }
5133
5134case $am_cv_ar_interface in
5135ar)
5136 ;;
5137lib)
5138 # Microsoft lib, so override with the ar-lib wrapper script.
5139 # FIXME: It is wrong to rewrite AR.
5140 # But if we don't then we get into trouble of one sort or another.
5141 # A longer-term fix would be to have automake use am__AR in this case,
5142 # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
5143 # similar.
5144 AR="$am_aux_dir/ar-lib $AR"
5145 ;;
5146unknown)
5147 as_fn_error $? "could not determine $AR interface" "$LINENO" 5
5148 ;;
5149esac
5150
5151 fi
5152
5153 if test -n "$ac_tool_prefix"; then
5154 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5155set dummy ${ac_tool_prefix}ar; ac_word=$2
5156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5157$as_echo_n "checking for $ac_word... " >&6; }
5158if ${ac_cv_prog_AR+:} false; then :
5159 $as_echo_n "(cached) " >&6
5160else
5161 if test -n "$AR"; then
5162 ac_cv_prog_AR="$AR" # Let the user override the test.
5163else
5164as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5165for as_dir in $PATH
5166do
5167 IFS=$as_save_IFS
5168 test -z "$as_dir" && as_dir=.
5169 for ac_exec_ext in '' $ac_executable_extensions; do
5170 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5171 ac_cv_prog_AR="${ac_tool_prefix}ar"
5172 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5173 break 2
5174 fi
5175done
5176 done
5177IFS=$as_save_IFS
5178
5179fi
5180fi
5181AR=$ac_cv_prog_AR
5182if test -n "$AR"; then
5183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5184$as_echo "$AR" >&6; }
5185else
5186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5187$as_echo "no" >&6; }
5188fi
5189
5190
5191fi
5192if test -z "$ac_cv_prog_AR"; then
5193 ac_ct_AR=$AR
5194 # Extract the first word of "ar", so it can be a program name with args.
5195set dummy ar; ac_word=$2
5196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5197$as_echo_n "checking for $ac_word... " >&6; }
5198if ${ac_cv_prog_ac_ct_AR+:} false; then :
5199 $as_echo_n "(cached) " >&6
5200else
5201 if test -n "$ac_ct_AR"; then
5202 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5203else
5204as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5205for as_dir in $PATH
5206do
5207 IFS=$as_save_IFS
5208 test -z "$as_dir" && as_dir=.
5209 for ac_exec_ext in '' $ac_executable_extensions; do
5210 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5211 ac_cv_prog_ac_ct_AR="ar"
5212 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5213 break 2
5214 fi
5215done
5216 done
5217IFS=$as_save_IFS
5218
5219fi
5220fi
5221ac_ct_AR=$ac_cv_prog_ac_ct_AR
5222if test -n "$ac_ct_AR"; then
5223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5224$as_echo "$ac_ct_AR" >&6; }
5225else
5226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5227$as_echo "no" >&6; }
5228fi
5229
5230 if test "x$ac_ct_AR" = x; then
5231 AR="ar"
5232 else
5233 case $cross_compiling:$ac_tool_warned in
5234yes:)
5235{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5236$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5237ac_tool_warned=yes ;;
5238esac
5239 AR=$ac_ct_AR
5240 fi
5241else
5242 AR="$ac_cv_prog_AR"
5243fi
5244
5245 if test -z "$ARFLAGS"; then
5246 ARFLAGS='cr'
5247 fi
5248
c971b7fa 5249
5e8754f9
SDJ
5250
5251 if test -z "$RANLIB"; then
5252 if test $gl_cv_c_amsterdam_compiler = yes; then
5253 RANLIB=':'
5254 else
5255 if test -n "$ac_tool_prefix"; then
5256 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5257set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5259$as_echo_n "checking for $ac_word... " >&6; }
5260if ${ac_cv_prog_RANLIB+:} false; then :
5261 $as_echo_n "(cached) " >&6
5262else
5263 if test -n "$RANLIB"; then
5264 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5265else
5266as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5267for as_dir in $PATH
5268do
5269 IFS=$as_save_IFS
5270 test -z "$as_dir" && as_dir=.
5271 for ac_exec_ext in '' $ac_executable_extensions; do
5272 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5273 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5274 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5275 break 2
5276 fi
5277done
5278 done
5279IFS=$as_save_IFS
5280
5281fi
5282fi
5283RANLIB=$ac_cv_prog_RANLIB
5284if test -n "$RANLIB"; then
5285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5286$as_echo "$RANLIB" >&6; }
5287else
5288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5289$as_echo "no" >&6; }
5290fi
c971b7fa
PA
5291
5292
5293fi
5294if test -z "$ac_cv_prog_RANLIB"; then
5295 ac_ct_RANLIB=$RANLIB
5296 # Extract the first word of "ranlib", so it can be a program name with args.
5297set dummy ranlib; ac_word=$2
5298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5299$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5300if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
c971b7fa
PA
5301 $as_echo_n "(cached) " >&6
5302else
5303 if test -n "$ac_ct_RANLIB"; then
5304 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5305else
5306as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5307for as_dir in $PATH
5308do
5309 IFS=$as_save_IFS
5310 test -z "$as_dir" && as_dir=.
5311 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5312 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
5313 ac_cv_prog_ac_ct_RANLIB="ranlib"
5314 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5315 break 2
5316 fi
5317done
5318 done
5319IFS=$as_save_IFS
5320
5321fi
5322fi
5323ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5324if test -n "$ac_ct_RANLIB"; then
5325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5326$as_echo "$ac_ct_RANLIB" >&6; }
5327else
5328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5329$as_echo "no" >&6; }
5330fi
5331
5332 if test "x$ac_ct_RANLIB" = x; then
5333 RANLIB=":"
5334 else
5335 case $cross_compiling:$ac_tool_warned in
5336yes:)
5337{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5338$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5339ac_tool_warned=yes ;;
5340esac
5341 RANLIB=$ac_ct_RANLIB
5342 fi
5343else
5344 RANLIB="$ac_cv_prog_RANLIB"
5345fi
5346
5347 fi
5348 fi
5349
5350
4a626d0a
PA
5351# Make sure we can run config.sub.
5352$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 5353 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4a626d0a
PA
5354
5355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5356$as_echo_n "checking build system type... " >&6; }
d0ac1c44 5357if ${ac_cv_build+:} false; then :
4a626d0a
PA
5358 $as_echo_n "(cached) " >&6
5359else
5360 ac_build_alias=$build_alias
5361test "x$ac_build_alias" = x &&
5362 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5363test "x$ac_build_alias" = x &&
d0ac1c44 5364 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4a626d0a 5365ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 5366 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4a626d0a
PA
5367
5368fi
5369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5370$as_echo "$ac_cv_build" >&6; }
5371case $ac_cv_build in
5372*-*-*) ;;
d0ac1c44 5373*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4a626d0a
PA
5374esac
5375build=$ac_cv_build
5376ac_save_IFS=$IFS; IFS='-'
5377set x $ac_cv_build
5378shift
5379build_cpu=$1
5380build_vendor=$2
5381shift; shift
5382# Remember, the first character of IFS is used to create $*,
5383# except with old shells:
5384build_os=$*
5385IFS=$ac_save_IFS
5386case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5387
5388
5389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5390$as_echo_n "checking host system type... " >&6; }
d0ac1c44 5391if ${ac_cv_host+:} false; then :
4a626d0a
PA
5392 $as_echo_n "(cached) " >&6
5393else
5394 if test "x$host_alias" = x; then
5395 ac_cv_host=$ac_cv_build
5396else
5397 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 5398 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4a626d0a
PA
5399fi
5400
5401fi
5402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5403$as_echo "$ac_cv_host" >&6; }
5404case $ac_cv_host in
5405*-*-*) ;;
d0ac1c44 5406*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4a626d0a
PA
5407esac
5408host=$ac_cv_host
5409ac_save_IFS=$IFS; IFS='-'
5410set x $ac_cv_host
5411shift
5412host_cpu=$1
5413host_vendor=$2
5414shift; shift
5415# Remember, the first character of IFS is used to create $*,
5416# except with old shells:
5417host_os=$*
5418IFS=$ac_save_IFS
5419case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5420
5421
c971b7fa
PA
5422
5423
88b48903
WN
5424
5425 # IEEE behaviour is the default on all CPUs except Alpha and SH
5426 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
5427 # and the GCC 4.1.2 manual).
5428 case "$host_cpu" in
5429 alpha*)
5430 # On Alpha systems, a compiler option provides the behaviour.
5431 # See the ieee(3) manual page, also available at
5e8754f9 5432 # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
88b48903
WN
5433 if test -n "$GCC"; then
5434 # GCC has the option -mieee.
5435 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
5436 CPPFLAGS="$CPPFLAGS -mieee"
5437 else
5438 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
5439 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
5440 CPPFLAGS="$CPPFLAGS -ieee"
5441 fi
5442 ;;
5443 sh*)
5444 if test -n "$GCC"; then
5445 # GCC has the option -mieee.
5446 CPPFLAGS="$CPPFLAGS -mieee"
5447 fi
5448 ;;
5449 esac
5450
2196f55f
YQ
5451# Check whether --enable-largefile was given.
5452if test "${enable_largefile+set}" = set; then :
5453 enableval=$enable_largefile;
5454fi
5455
5456if test "$enable_largefile" != no; then
5457
5458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5459$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 5460if ${ac_cv_sys_largefile_CC+:} false; then :
2196f55f
YQ
5461 $as_echo_n "(cached) " >&6
5462else
5463 ac_cv_sys_largefile_CC=no
5464 if test "$GCC" != yes; then
5465 ac_save_CC=$CC
5466 while :; do
5467 # IRIX 6.2 and later do not support large files by default,
5468 # so use the C compiler's -n32 option if that helps.
5469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5470/* end confdefs.h. */
5471#include <sys/types.h>
5472 /* Check that off_t can represent 2**63 - 1 correctly.
5473 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5474 since some C++ compilers masquerading as C compilers
5475 incorrectly reject 9223372036854775807. */
5476#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5477 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5478 && LARGE_OFF_T % 2147483647 == 1)
5479 ? 1 : -1];
5480int
5481main ()
5482{
5483
5484 ;
5485 return 0;
5486}
5487_ACEOF
5488 if ac_fn_c_try_compile "$LINENO"; then :
5489 break
5490fi
5491rm -f core conftest.err conftest.$ac_objext
5492 CC="$CC -n32"
5493 if ac_fn_c_try_compile "$LINENO"; then :
5494 ac_cv_sys_largefile_CC=' -n32'; break
5495fi
5496rm -f core conftest.err conftest.$ac_objext
5497 break
5498 done
5499 CC=$ac_save_CC
5500 rm -f conftest.$ac_ext
5501 fi
5502fi
5503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5504$as_echo "$ac_cv_sys_largefile_CC" >&6; }
5505 if test "$ac_cv_sys_largefile_CC" != no; then
5506 CC=$CC$ac_cv_sys_largefile_CC
5507 fi
5508
5509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5510$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 5511if ${ac_cv_sys_file_offset_bits+:} false; then :
2196f55f
YQ
5512 $as_echo_n "(cached) " >&6
5513else
5514 while :; do
5515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5516/* end confdefs.h. */
5517#include <sys/types.h>
5518 /* Check that off_t can represent 2**63 - 1 correctly.
5519 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5520 since some C++ compilers masquerading as C compilers
5521 incorrectly reject 9223372036854775807. */
5522#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5523 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5524 && LARGE_OFF_T % 2147483647 == 1)
5525 ? 1 : -1];
5526int
5527main ()
5528{
5529
5530 ;
5531 return 0;
5532}
5533_ACEOF
5534if ac_fn_c_try_compile "$LINENO"; then :
5535 ac_cv_sys_file_offset_bits=no; break
5536fi
5537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5539/* end confdefs.h. */
5540#define _FILE_OFFSET_BITS 64
5541#include <sys/types.h>
5542 /* Check that off_t can represent 2**63 - 1 correctly.
5543 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5544 since some C++ compilers masquerading as C compilers
5545 incorrectly reject 9223372036854775807. */
5546#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5547 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5548 && LARGE_OFF_T % 2147483647 == 1)
5549 ? 1 : -1];
5550int
5551main ()
5552{
5553
5554 ;
5555 return 0;
5556}
5557_ACEOF
5558if ac_fn_c_try_compile "$LINENO"; then :
5559 ac_cv_sys_file_offset_bits=64; break
5560fi
5561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5562 ac_cv_sys_file_offset_bits=unknown
5563 break
5564done
5565fi
5566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5567$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5568case $ac_cv_sys_file_offset_bits in #(
5569 no | unknown) ;;
5570 *)
5571cat >>confdefs.h <<_ACEOF
5572#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5573_ACEOF
5574;;
5575esac
5576rm -rf conftest*
5577 if test $ac_cv_sys_file_offset_bits = unknown; then
5578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5579$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 5580if ${ac_cv_sys_large_files+:} false; then :
2196f55f
YQ
5581 $as_echo_n "(cached) " >&6
5582else
5583 while :; do
5584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5585/* end confdefs.h. */
5586#include <sys/types.h>
5587 /* Check that off_t can represent 2**63 - 1 correctly.
5588 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5589 since some C++ compilers masquerading as C compilers
5590 incorrectly reject 9223372036854775807. */
5591#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5592 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5593 && LARGE_OFF_T % 2147483647 == 1)
5594 ? 1 : -1];
5595int
5596main ()
5597{
5598
5599 ;
5600 return 0;
5601}
5602_ACEOF
5603if ac_fn_c_try_compile "$LINENO"; then :
5604 ac_cv_sys_large_files=no; break
5605fi
5606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5608/* end confdefs.h. */
5609#define _LARGE_FILES 1
5610#include <sys/types.h>
5611 /* Check that off_t can represent 2**63 - 1 correctly.
5612 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5613 since some C++ compilers masquerading as C compilers
5614 incorrectly reject 9223372036854775807. */
5615#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5616 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5617 && LARGE_OFF_T % 2147483647 == 1)
5618 ? 1 : -1];
5619int
5620main ()
5621{
5622
5623 ;
5624 return 0;
5625}
5626_ACEOF
5627if ac_fn_c_try_compile "$LINENO"; then :
5628 ac_cv_sys_large_files=1; break
5629fi
5630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5631 ac_cv_sys_large_files=unknown
5632 break
5633done
5634fi
5635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5636$as_echo "$ac_cv_sys_large_files" >&6; }
5637case $ac_cv_sys_large_files in #(
5638 no | unknown) ;;
5639 *)
5640cat >>confdefs.h <<_ACEOF
5641#define _LARGE_FILES $ac_cv_sys_large_files
5642_ACEOF
5643;;
5644esac
5645rm -rf conftest*
5646 fi
5647
5648
4a626d0a
PA
5649$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
5650
2196f55f
YQ
5651fi
5652
88b48903
WN
5653
5654
49e4877c
PA
5655 # Pre-early section.
5656
5657
5658
4a626d0a 5659 # Code from module absolute-header:
8690e634
JK
5660 # Code from module alloca:
5661 # Code from module alloca-opt:
6ec2e0f5
SDJ
5662 # Code from module assure:
5663 # Code from module at-internal:
98399780 5664 # Code from module canonicalize-lgpl:
6a29c58e 5665 # Code from module chdir:
6ec2e0f5
SDJ
5666 # Code from module chdir-long:
5667 # Code from module cloexec:
5668 # Code from module close:
5669 # Code from module closedir:
5e8754f9 5670 # Code from module configmake:
6ec2e0f5
SDJ
5671 # Code from module d-ino:
5672 # Code from module d-type:
e26b6bb0 5673 # Code from module dirent:
18848e28 5674 # Code from module dirfd:
6a29c58e 5675 # Code from module dirname-lgpl:
2196f55f 5676 # Code from module dosname:
6a29c58e 5677 # Code from module double-slash-root:
6ec2e0f5
SDJ
5678 # Code from module dup:
5679 # Code from module dup2:
3d99e817 5680 # Code from module environ:
18848e28 5681 # Code from module errno:
6ec2e0f5
SDJ
5682 # Code from module error:
5683 # Code from module exitfail:
c971b7fa 5684 # Code from module extensions:
a512b375 5685 # Code from module extern-inline:
6ec2e0f5
SDJ
5686 # Code from module fchdir:
5687 # Code from module fcntl:
5688 # Code from module fcntl-h:
5689 # Code from module fd-hook:
5690 # Code from module fdopendir:
5691 # Code from module filename:
5692 # Code from module filenamecat-lgpl:
49e4877c 5693 # Code from module flexmember:
88b48903 5694 # Code from module float:
8690e634
JK
5695 # Code from module fnmatch:
5696 # Code from module fnmatch-gnu:
88b48903
WN
5697 # Code from module fpieee:
5698
5699 # Code from module fpucw:
5700 # Code from module frexp:
5701 # Code from module frexpl:
6ec2e0f5
SDJ
5702 # Code from module fstat:
5703 # Code from module fstatat:
5704 # Code from module getcwd:
5705 # Code from module getcwd-lgpl:
5706 # Code from module getdtablesize:
5707 # Code from module getlogin_r:
5708 # Code from module getprogname:
5709 # Code from module gettext-h:
4a626d0a 5710 # Code from module gettimeofday:
6ec2e0f5 5711 # Code from module glob:
49e4877c 5712 # Code from module hard-locale:
c971b7fa 5713 # Code from module include_next:
6ec2e0f5 5714 # Code from module intprops:
c971b7fa
PA
5715 # Code from module inttypes:
5716 # Code from module inttypes-incomplete:
88b48903
WN
5717 # Code from module isnand-nolibm:
5718 # Code from module isnanl-nolibm:
2196f55f
YQ
5719 # Code from module largefile:
5720
49e4877c 5721 # Code from module limits-h:
8690e634 5722 # Code from module localcharset:
f45c62c4 5723 # Code from module lstat:
6a29c58e 5724 # Code from module malloc-posix:
98399780 5725 # Code from module malloca:
88b48903 5726 # Code from module math:
8690e634
JK
5727 # Code from module mbrtowc:
5728 # Code from module mbsinit:
5729 # Code from module mbsrtowcs:
c971b7fa
PA
5730 # Code from module memchr:
5731 # Code from module memmem:
5732 # Code from module memmem-simple:
6ec2e0f5
SDJ
5733 # Code from module mempcpy:
5734 # Code from module memrchr:
8a99096f 5735 # Code from module mkdir:
2d8adcbd 5736 # Code from module mkstemp:
6ec2e0f5
SDJ
5737 # Code from module msvc-inval:
5738 # Code from module msvc-nothrow:
c971b7fa 5739 # Code from module multiarch:
98399780 5740 # Code from module nocrash:
6ec2e0f5
SDJ
5741 # Code from module open:
5742 # Code from module openat:
5743 # Code from module openat-die:
5744 # Code from module openat-h:
5745 # Code from module opendir:
38ec2207 5746 # Code from module pathmax:
8424cc97 5747 # Code from module rawmemchr:
6ec2e0f5 5748 # Code from module readdir:
2196f55f 5749 # Code from module readlink:
6ec2e0f5 5750 # Code from module realloc-posix:
6a29c58e 5751 # Code from module rename:
6ec2e0f5 5752 # Code from module rewinddir:
6a29c58e
YQ
5753 # Code from module rmdir:
5754 # Code from module same-inode:
6ec2e0f5 5755 # Code from module save-cwd:
5e8754f9 5756 # Code from module secure_getenv:
3d99e817 5757 # Code from module setenv:
0750520d 5758 # Code from module signal-h:
98399780 5759 # Code from module snippet/_Noreturn:
c971b7fa
PA
5760 # Code from module snippet/arg-nonnull:
5761 # Code from module snippet/c++defs:
5762 # Code from module snippet/warn-on-use:
8839a007 5763 # Code from module ssize_t:
2196f55f 5764 # Code from module stat:
8690e634 5765 # Code from module stdbool:
c971b7fa
PA
5766 # Code from module stddef:
5767 # Code from module stdint:
6a29c58e 5768 # Code from module stdio:
98399780 5769 # Code from module stdlib:
8424cc97 5770 # Code from module strchrnul:
6ec2e0f5 5771 # Code from module strdup-posix:
8690e634 5772 # Code from module streq:
6ec2e0f5
SDJ
5773 # Code from module strerror:
5774 # Code from module strerror-override:
c971b7fa 5775 # Code from module string:
8690e634 5776 # Code from module strnlen1:
63ce7108
TT
5777 # Code from module strstr:
5778 # Code from module strstr-simple:
421693b0 5779 # Code from module strtok_r:
09607c9e 5780 # Code from module sys_stat:
4a626d0a 5781 # Code from module sys_time:
8839a007 5782 # Code from module sys_types:
2d8adcbd 5783 # Code from module tempname:
09607c9e 5784 # Code from module time:
8839a007 5785 # Code from module unistd:
6ec2e0f5 5786 # Code from module unistd-safer:
3d99e817 5787 # Code from module unsetenv:
c971b7fa 5788 # Code from module update-copyright:
8690e634
JK
5789 # Code from module verify:
5790 # Code from module wchar:
5791 # Code from module wctype-h:
c971b7fa 5792
5e8754f9
SDJ
5793ac_ext=c
5794ac_cpp='$CPP $CPPFLAGS'
5795ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5796ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5797ac_compiler_gnu=$ac_cv_c_compiler_gnu
5798if test -n "$ac_tool_prefix"; then
5799 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5800set dummy ${ac_tool_prefix}gcc; ac_word=$2
5801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5802$as_echo_n "checking for $ac_word... " >&6; }
5803if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
5804 $as_echo_n "(cached) " >&6
5805else
5e8754f9
SDJ
5806 if test -n "$CC"; then
5807 ac_cv_prog_CC="$CC" # Let the user override the test.
c971b7fa 5808else
5e8754f9
SDJ
5809as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5810for as_dir in $PATH
5811do
5812 IFS=$as_save_IFS
5813 test -z "$as_dir" && as_dir=.
5814 for ac_exec_ext in '' $ac_executable_extensions; do
5815 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5816 ac_cv_prog_CC="${ac_tool_prefix}gcc"
5817 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5818 break 2
5819 fi
5820done
5821 done
5822IFS=$as_save_IFS
c971b7fa 5823
5e8754f9
SDJ
5824fi
5825fi
5826CC=$ac_cv_prog_CC
5827if test -n "$CC"; then
5828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5829$as_echo "$CC" >&6; }
7a6dbc2f 5830else
5e8754f9
SDJ
5831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5832$as_echo "no" >&6; }
5833fi
c971b7fa 5834
c971b7fa 5835
7a6dbc2f 5836fi
5e8754f9
SDJ
5837if test -z "$ac_cv_prog_CC"; then
5838 ac_ct_CC=$CC
5839 # Extract the first word of "gcc", so it can be a program name with args.
5840set dummy gcc; ac_word=$2
5841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5842$as_echo_n "checking for $ac_word... " >&6; }
5843if ${ac_cv_prog_ac_ct_CC+:} false; then :
c971b7fa
PA
5844 $as_echo_n "(cached) " >&6
5845else
5e8754f9
SDJ
5846 if test -n "$ac_ct_CC"; then
5847 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
c971b7fa 5848else
5e8754f9
SDJ
5849as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5850for as_dir in $PATH
5851do
5852 IFS=$as_save_IFS
5853 test -z "$as_dir" && as_dir=.
5854 for ac_exec_ext in '' $ac_executable_extensions; do
5855 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5856 ac_cv_prog_ac_ct_CC="gcc"
5857 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5858 break 2
5859 fi
5860done
5861 done
5862IFS=$as_save_IFS
5863
c971b7fa 5864fi
c971b7fa 5865fi
5e8754f9
SDJ
5866ac_ct_CC=$ac_cv_prog_ac_ct_CC
5867if test -n "$ac_ct_CC"; then
5868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5869$as_echo "$ac_ct_CC" >&6; }
5870else
5871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5872$as_echo "no" >&6; }
5873fi
7a6dbc2f 5874
5e8754f9
SDJ
5875 if test "x$ac_ct_CC" = x; then
5876 CC=""
5877 else
5878 case $cross_compiling:$ac_tool_warned in
5879yes:)
5880{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5881$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5882ac_tool_warned=yes ;;
5883esac
5884 CC=$ac_ct_CC
5885 fi
5886else
5887 CC="$ac_cv_prog_CC"
c971b7fa 5888fi
7a6dbc2f 5889
5e8754f9
SDJ
5890if test -z "$CC"; then
5891 if test -n "$ac_tool_prefix"; then
5892 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5893set dummy ${ac_tool_prefix}cc; ac_word=$2
5894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5895$as_echo_n "checking for $ac_word... " >&6; }
5896if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
5897 $as_echo_n "(cached) " >&6
5898else
5e8754f9
SDJ
5899 if test -n "$CC"; then
5900 ac_cv_prog_CC="$CC" # Let the user override the test.
c971b7fa 5901else
5e8754f9
SDJ
5902as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5903for as_dir in $PATH
5904do
5905 IFS=$as_save_IFS
5906 test -z "$as_dir" && as_dir=.
5907 for ac_exec_ext in '' $ac_executable_extensions; do
5908 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5909 ac_cv_prog_CC="${ac_tool_prefix}cc"
5910 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5911 break 2
5912 fi
5913done
5914 done
5915IFS=$as_save_IFS
5916
7a6dbc2f 5917fi
7a6dbc2f 5918fi
5e8754f9
SDJ
5919CC=$ac_cv_prog_CC
5920if test -n "$CC"; then
5921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5922$as_echo "$CC" >&6; }
c971b7fa 5923else
5e8754f9
SDJ
5924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5925$as_echo "no" >&6; }
5926fi
7a6dbc2f
SDJ
5927
5928
5e8754f9
SDJ
5929 fi
5930fi
5931if test -z "$CC"; then
5932 # Extract the first word of "cc", so it can be a program name with args.
5933set dummy cc; ac_word=$2
5934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5935$as_echo_n "checking for $ac_word... " >&6; }
5936if ${ac_cv_prog_CC+:} false; then :
7a6dbc2f
SDJ
5937 $as_echo_n "(cached) " >&6
5938else
5e8754f9
SDJ
5939 if test -n "$CC"; then
5940 ac_cv_prog_CC="$CC" # Let the user override the test.
7a6dbc2f 5941else
5e8754f9
SDJ
5942 ac_prog_rejected=no
5943as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5944for as_dir in $PATH
5945do
5946 IFS=$as_save_IFS
5947 test -z "$as_dir" && as_dir=.
5948 for ac_exec_ext in '' $ac_executable_extensions; do
5949 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5950 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5951 ac_prog_rejected=yes
5952 continue
5953 fi
5954 ac_cv_prog_CC="cc"
5955 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5956 break 2
5957 fi
5958done
5959 done
5960IFS=$as_save_IFS
5961
5962if test $ac_prog_rejected = yes; then
5963 # We found a bogon in the path, so make sure we never use it.
5964 set dummy $ac_cv_prog_CC
5965 shift
5966 if test $# != 0; then
5967 # We chose a different compiler from the bogus one.
5968 # However, it has the same basename, so the bogon will be chosen
5969 # first if we set CC to just the basename; use the full file name.
5970 shift
5971 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
5972 fi
5973fi
5974fi
5975fi
5976CC=$ac_cv_prog_CC
5977if test -n "$CC"; then
5978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5979$as_echo "$CC" >&6; }
5980else
5981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5982$as_echo "no" >&6; }
c971b7fa 5983fi
7a6dbc2f 5984
7a6dbc2f 5985
c971b7fa 5986fi
5e8754f9
SDJ
5987if test -z "$CC"; then
5988 if test -n "$ac_tool_prefix"; then
5989 for ac_prog in cl.exe
5990 do
5991 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5992set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5994$as_echo_n "checking for $ac_word... " >&6; }
5995if ${ac_cv_prog_CC+:} false; then :
5996 $as_echo_n "(cached) " >&6
5997else
5998 if test -n "$CC"; then
5999 ac_cv_prog_CC="$CC" # Let the user override the test.
6000else
6001as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6002for as_dir in $PATH
6003do
6004 IFS=$as_save_IFS
6005 test -z "$as_dir" && as_dir=.
6006 for ac_exec_ext in '' $ac_executable_extensions; do
6007 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6008 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
6009 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6010 break 2
6011 fi
6012done
7a6dbc2f 6013 done
5e8754f9
SDJ
6014IFS=$as_save_IFS
6015
6016fi
6017fi
6018CC=$ac_cv_prog_CC
6019if test -n "$CC"; then
6020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6021$as_echo "$CC" >&6; }
6022else
6023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6024$as_echo "no" >&6; }
c971b7fa 6025fi
7a6dbc2f 6026
5e8754f9
SDJ
6027
6028 test -n "$CC" && break
6029 done
6030fi
6031if test -z "$CC"; then
6032 ac_ct_CC=$CC
6033 for ac_prog in cl.exe
6034do
6035 # Extract the first word of "$ac_prog", so it can be a program name with args.
6036set dummy $ac_prog; ac_word=$2
6037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6038$as_echo_n "checking for $ac_word... " >&6; }
6039if ${ac_cv_prog_ac_ct_CC+:} false; then :
c971b7fa
PA
6040 $as_echo_n "(cached) " >&6
6041else
5e8754f9
SDJ
6042 if test -n "$ac_ct_CC"; then
6043 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
6044else
6045as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6046for as_dir in $PATH
6047do
6048 IFS=$as_save_IFS
6049 test -z "$as_dir" && as_dir=.
6050 for ac_exec_ext in '' $ac_executable_extensions; do
6051 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6052 ac_cv_prog_ac_ct_CC="$ac_prog"
6053 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6054 break 2
6055 fi
6056done
6057 done
6058IFS=$as_save_IFS
6059
6060fi
6061fi
6062ac_ct_CC=$ac_cv_prog_ac_ct_CC
6063if test -n "$ac_ct_CC"; then
6064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
6065$as_echo "$ac_ct_CC" >&6; }
6066else
6067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6068$as_echo "no" >&6; }
6069fi
6070
6071
6072 test -n "$ac_ct_CC" && break
6073done
6074
6075 if test "x$ac_ct_CC" = x; then
6076 CC=""
6077 else
6078 case $cross_compiling:$ac_tool_warned in
6079yes:)
6080{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6081$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6082ac_tool_warned=yes ;;
6083esac
6084 CC=$ac_ct_CC
6085 fi
6086fi
6087
6088fi
6089
6090
6091test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6092$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6093as_fn_error $? "no acceptable C compiler found in \$PATH
6094See \`config.log' for more details" "$LINENO" 5; }
6095
6096# Provide some information about the compiler.
6097$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
6098set X $ac_compile
6099ac_compiler=$2
6100for ac_option in --version -v -V -qversion; do
6101 { { ac_try="$ac_compiler $ac_option >&5"
6102case "(($ac_try" in
6103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6104 *) ac_try_echo=$ac_try;;
6105esac
6106eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6107$as_echo "$ac_try_echo"; } >&5
6108 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
6109 ac_status=$?
6110 if test -s conftest.err; then
6111 sed '10a\
6112... rest of stderr output deleted ...
6113 10q' conftest.err >conftest.er1
6114 cat conftest.er1 >&5
6115 fi
6116 rm -f conftest.er1 conftest.err
6117 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6118 test $ac_status = 0; }
6119done
6120
6121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
6122$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
6123if ${ac_cv_c_compiler_gnu+:} false; then :
6124 $as_echo_n "(cached) " >&6
7a6dbc2f
SDJ
6125else
6126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 6127/* end confdefs.h. */
c971b7fa 6128
c971b7fa 6129int
5e8754f9 6130main ()
c971b7fa 6131{
5e8754f9
SDJ
6132#ifndef __GNUC__
6133 choke me
6134#endif
6135
6136 ;
6137 return 0;
c971b7fa
PA
6138}
6139_ACEOF
5e8754f9
SDJ
6140if ac_fn_c_try_compile "$LINENO"; then :
6141 ac_compiler_gnu=yes
7a6dbc2f 6142else
5e8754f9 6143 ac_compiler_gnu=no
c971b7fa 6144fi
5e8754f9
SDJ
6145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6146ac_cv_c_compiler_gnu=$ac_compiler_gnu
c971b7fa
PA
6147
6148fi
5e8754f9
SDJ
6149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
6150$as_echo "$ac_cv_c_compiler_gnu" >&6; }
6151if test $ac_compiler_gnu = yes; then
6152 GCC=yes
6153else
6154 GCC=
d0ac1c44 6155fi
5e8754f9
SDJ
6156ac_test_CFLAGS=${CFLAGS+set}
6157ac_save_CFLAGS=$CFLAGS
6158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
6159$as_echo_n "checking whether $CC accepts -g... " >&6; }
6160if ${ac_cv_prog_cc_g+:} false; then :
6161 $as_echo_n "(cached) " >&6
6162else
6163 ac_save_c_werror_flag=$ac_c_werror_flag
6164 ac_c_werror_flag=yes
6165 ac_cv_prog_cc_g=no
6166 CFLAGS="-g"
6167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6168/* end confdefs.h. */
d0ac1c44 6169
5e8754f9
SDJ
6170int
6171main ()
6172{
c971b7fa 6173
5e8754f9
SDJ
6174 ;
6175 return 0;
6176}
6177_ACEOF
6178if ac_fn_c_try_compile "$LINENO"; then :
6179 ac_cv_prog_cc_g=yes
6180else
6181 CFLAGS=""
6182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6183/* end confdefs.h. */
c971b7fa 6184
5e8754f9
SDJ
6185int
6186main ()
6187{
c971b7fa 6188
5e8754f9
SDJ
6189 ;
6190 return 0;
6191}
6192_ACEOF
6193if ac_fn_c_try_compile "$LINENO"; then :
c971b7fa 6194
5e8754f9
SDJ
6195else
6196 ac_c_werror_flag=$ac_save_c_werror_flag
6197 CFLAGS="-g"
6198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6199/* end confdefs.h. */
c971b7fa 6200
5e8754f9
SDJ
6201int
6202main ()
6203{
c971b7fa 6204
5e8754f9
SDJ
6205 ;
6206 return 0;
6207}
7a6dbc2f 6208_ACEOF
5e8754f9
SDJ
6209if ac_fn_c_try_compile "$LINENO"; then :
6210 ac_cv_prog_cc_g=yes
c971b7fa 6211fi
5e8754f9
SDJ
6212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6213fi
6214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6215fi
6216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6217 ac_c_werror_flag=$ac_save_c_werror_flag
6218fi
6219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
6220$as_echo "$ac_cv_prog_cc_g" >&6; }
6221if test "$ac_test_CFLAGS" = set; then
6222 CFLAGS=$ac_save_CFLAGS
6223elif test $ac_cv_prog_cc_g = yes; then
6224 if test "$GCC" = yes; then
6225 CFLAGS="-g -O2"
6226 else
6227 CFLAGS="-g"
6228 fi
6229else
6230 if test "$GCC" = yes; then
6231 CFLAGS="-O2"
6232 else
6233 CFLAGS=
6234 fi
6235fi
6236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6237$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
6238if ${ac_cv_prog_cc_c89+:} false; then :
6239 $as_echo_n "(cached) " >&6
6240else
6241 ac_cv_prog_cc_c89=no
6242ac_save_CC=$CC
6243cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6244/* end confdefs.h. */
6245#include <stdarg.h>
6246#include <stdio.h>
6247struct stat;
6248/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
6249struct buf { int x; };
6250FILE * (*rcsopen) (struct buf *, struct stat *, int);
6251static char *e (p, i)
6252 char **p;
6253 int i;
6254{
6255 return p[i];
6256}
6257static char *f (char * (*g) (char **, int), char **p, ...)
6258{
6259 char *s;
6260 va_list v;
6261 va_start (v,p);
6262 s = g (p, va_arg (v,int));
6263 va_end (v);
6264 return s;
6265}
c971b7fa 6266
5e8754f9
SDJ
6267/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
6268 function prototypes and stuff, but not '\xHH' hex character constants.
6269 These don't provoke an error unfortunately, instead are silently treated
6270 as 'x'. The following induces an error, until -std is added to get
6271 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
6272 array size at least. It's necessary to write '\x00'==0 to get something
6273 that's true only with -std. */
6274int osf4_cc_array ['\x00' == 0 ? 1 : -1];
c971b7fa 6275
5e8754f9
SDJ
6276/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6277 inside strings and character constants. */
6278#define FOO(x) 'x'
6279int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
c971b7fa 6280
5e8754f9
SDJ
6281int test (int i, double x);
6282struct s1 {int (*f) (int a);};
6283struct s2 {int (*f) (double a);};
6284int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6285int argc;
6286char **argv;
6287int
6288main ()
6289{
6290return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
6291 ;
6292 return 0;
6293}
6294_ACEOF
6295for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6296 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6297do
6298 CC="$ac_save_CC $ac_arg"
6299 if ac_fn_c_try_compile "$LINENO"; then :
6300 ac_cv_prog_cc_c89=$ac_arg
6301fi
6302rm -f core conftest.err conftest.$ac_objext
6303 test "x$ac_cv_prog_cc_c89" != "xno" && break
6304done
6305rm -f conftest.$ac_ext
6306CC=$ac_save_CC
c971b7fa 6307
5e8754f9
SDJ
6308fi
6309# AC_CACHE_VAL
6310case "x$ac_cv_prog_cc_c89" in
6311 x)
6312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6313$as_echo "none needed" >&6; } ;;
6314 xno)
6315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6316$as_echo "unsupported" >&6; } ;;
6317 *)
6318 CC="$CC $ac_cv_prog_cc_c89"
6319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6320$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6321esac
6322if test "x$ac_cv_prog_cc_c89" != xno; then :
c971b7fa 6323
5e8754f9 6324fi
c971b7fa 6325
5e8754f9
SDJ
6326ac_ext=c
6327ac_cpp='$CPP $CPPFLAGS'
6328ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6329ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6330ac_compiler_gnu=$ac_cv_c_compiler_gnu
d0ac1c44 6331
5e8754f9
SDJ
6332ac_ext=c
6333ac_cpp='$CPP $CPPFLAGS'
6334ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6335ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6336ac_compiler_gnu=$ac_cv_c_compiler_gnu
6337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
6338$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
6339if ${am_cv_prog_cc_c_o+:} false; then :
6340 $as_echo_n "(cached) " >&6
6341else
6342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6343/* end confdefs.h. */
d0ac1c44 6344
5e8754f9
SDJ
6345int
6346main ()
6347{
d0ac1c44 6348
5e8754f9
SDJ
6349 ;
6350 return 0;
6351}
6352_ACEOF
6353 # Make sure it works both with $CC and with simple cc.
6354 # Following AC_PROG_CC_C_O, we do the test twice because some
6355 # compilers refuse to overwrite an existing .o file with -o,
6356 # though they will create one.
6357 am_cv_prog_cc_c_o=yes
6358 for am_i in 1 2; do
6359 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
6360 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
6361 ac_status=$?
6362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6363 (exit $ac_status); } \
6364 && test -f conftest2.$ac_objext; then
6365 : OK
6366 else
6367 am_cv_prog_cc_c_o=no
6368 break
6369 fi
6370 done
6371 rm -f core conftest*
6372 unset am_i
6373fi
6374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
6375$as_echo "$am_cv_prog_cc_c_o" >&6; }
6376if test "$am_cv_prog_cc_c_o" != yes; then
6377 # Losing compiler, so override with the script.
6378 # FIXME: It is wrong to rewrite CC.
6379 # But if we don't then we get into trouble of one sort or another.
6380 # A longer-term fix would be to have automake use am__CC in this case,
6381 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
6382 CC="$am_aux_dir/compile $CC"
6383fi
6384ac_ext=c
6385ac_cpp='$CPP $CPPFLAGS'
6386ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6387ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6388ac_compiler_gnu=$ac_cv_c_compiler_gnu
d0ac1c44 6389
7a6dbc2f 6390
5e8754f9 6391am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
7a6dbc2f
SDJ
6392
6393
5e8754f9
SDJ
6394ac_aux_dir=
6395for ac_dir in ../.. "$srcdir"/../..; do
6396 if test -f "$ac_dir/install-sh"; then
6397 ac_aux_dir=$ac_dir
6398 ac_install_sh="$ac_aux_dir/install-sh -c"
6399 break
6400 elif test -f "$ac_dir/install.sh"; then
6401 ac_aux_dir=$ac_dir
6402 ac_install_sh="$ac_aux_dir/install.sh -c"
6403 break
6404 elif test -f "$ac_dir/shtool"; then
6405 ac_aux_dir=$ac_dir
6406 ac_install_sh="$ac_aux_dir/shtool install -c"
6407 break
6408 fi
6409done
6410if test -z "$ac_aux_dir"; then
6411 as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../.. \"$srcdir\"/../.." "$LINENO" 5
6412fi
6413
6414# These three variables are undocumented and unsupported,
6415# and are intended to be withdrawn in a future Autoconf release.
6416# They can cause serious problems if a builder's source tree is in a directory
6417# whose full name contains unusual characters.
6418ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
6419ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
6420ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
6421
6422
6423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6424$as_echo_n "checking target system type... " >&6; }
6425if ${ac_cv_target+:} false; then :
c971b7fa
PA
6426 $as_echo_n "(cached) " >&6
6427else
5e8754f9
SDJ
6428 if test "x$target_alias" = x; then
6429 ac_cv_target=$ac_cv_host
6430else
6431 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6432 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
c971b7fa 6433fi
c971b7fa 6434
5e8754f9
SDJ
6435fi
6436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6437$as_echo "$ac_cv_target" >&6; }
6438case $ac_cv_target in
6439*-*-*) ;;
6440*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6441esac
6442target=$ac_cv_target
6443ac_save_IFS=$IFS; IFS='-'
6444set x $ac_cv_target
6445shift
6446target_cpu=$1
6447target_vendor=$2
6448shift; shift
6449# Remember, the first character of IFS is used to create $*,
6450# except with old shells:
6451target_os=$*
6452IFS=$ac_save_IFS
6453case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
c971b7fa
PA
6454
6455
5e8754f9
SDJ
6456# The aliases save the names the user supplied, while $host etc.
6457# will get canonicalized.
6458test -n "$target_alias" &&
6459 test "$program_prefix$program_suffix$program_transform_name" = \
6460 NONENONEs,x,x, &&
6461 program_prefix=${target_alias}-
7a6dbc2f
SDJ
6462
6463
6464
6465
6466
6467
6468
5e8754f9
SDJ
6469 LIBC_FATAL_STDERR_=1
6470 export LIBC_FATAL_STDERR_
7a6dbc2f 6471
5e8754f9
SDJ
6472ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6473if test "x$ac_cv_type_size_t" = xyes; then :
7a6dbc2f 6474
5e8754f9 6475else
7a6dbc2f 6476
5e8754f9
SDJ
6477cat >>confdefs.h <<_ACEOF
6478#define size_t unsigned int
6479_ACEOF
7a6dbc2f 6480
5e8754f9 6481fi
7a6dbc2f 6482
5e8754f9
SDJ
6483# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6484# for constant arguments. Useless!
6485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
6486$as_echo_n "checking for working alloca.h... " >&6; }
6487if ${ac_cv_working_alloca_h+:} false; then :
c971b7fa 6488 $as_echo_n "(cached) " >&6
7a6dbc2f 6489else
5e8754f9
SDJ
6490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6491/* end confdefs.h. */
6492#include <alloca.h>
6493int
6494main ()
6495{
6496char *p = (char *) alloca (2 * sizeof (int));
6497 if (p) return 0;
6498 ;
6499 return 0;
6500}
6501_ACEOF
6502if ac_fn_c_try_link "$LINENO"; then :
6503 ac_cv_working_alloca_h=yes
6504else
6505 ac_cv_working_alloca_h=no
6506fi
6507rm -f core conftest.err conftest.$ac_objext \
6508 conftest$ac_exeext conftest.$ac_ext
6509fi
6510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
6511$as_echo "$ac_cv_working_alloca_h" >&6; }
6512if test $ac_cv_working_alloca_h = yes; then
7a6dbc2f 6513
5e8754f9
SDJ
6514$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
6515
6516fi
7a6dbc2f 6517
5e8754f9
SDJ
6518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
6519$as_echo_n "checking for alloca... " >&6; }
6520if ${ac_cv_func_alloca_works+:} false; then :
6521 $as_echo_n "(cached) " >&6
c971b7fa
PA
6522else
6523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6524/* end confdefs.h. */
5e8754f9
SDJ
6525#ifdef __GNUC__
6526# define alloca __builtin_alloca
6527#else
6528# ifdef _MSC_VER
6529# include <malloc.h>
6530# define alloca _alloca
6531# else
6532# ifdef HAVE_ALLOCA_H
6533# include <alloca.h>
6534# else
6535# ifdef _AIX
6536 #pragma alloca
6537# else
6538# ifndef alloca /* predefined by HP cc +Olibcalls */
6539void *alloca (size_t);
6540# endif
6541# endif
6542# endif
6543# endif
6544#endif
7a6dbc2f 6545
5e8754f9
SDJ
6546int
6547main ()
7a6dbc2f 6548{
5e8754f9
SDJ
6549char *p = (char *) alloca (1);
6550 if (p) return 0;
6551 ;
6552 return 0;
7a6dbc2f 6553}
c971b7fa 6554_ACEOF
5e8754f9
SDJ
6555if ac_fn_c_try_link "$LINENO"; then :
6556 ac_cv_func_alloca_works=yes
c971b7fa 6557else
5e8754f9 6558 ac_cv_func_alloca_works=no
7a6dbc2f 6559fi
5e8754f9
SDJ
6560rm -f core conftest.err conftest.$ac_objext \
6561 conftest$ac_exeext conftest.$ac_ext
c0fc7f8b 6562fi
5e8754f9
SDJ
6563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
6564$as_echo "$ac_cv_func_alloca_works" >&6; }
98399780 6565
5e8754f9 6566if test $ac_cv_func_alloca_works = yes; then
98399780 6567
5e8754f9 6568$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
472fa5ee 6569
5e8754f9
SDJ
6570else
6571 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6572# that cause trouble. Some versions do not even contain alloca or
6573# contain a buggy version. If you still want to use their alloca,
6574# use ar to extract alloca.o from them instead of compiling alloca.c.
472fa5ee
SM
6575
6576
6577
6578
6579
5e8754f9 6580ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
472fa5ee 6581
5e8754f9 6582$as_echo "#define C_ALLOCA 1" >>confdefs.h
472fa5ee
SM
6583
6584
5e8754f9
SDJ
6585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
6586$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
6587if ${ac_cv_os_cray+:} false; then :
6588 $as_echo_n "(cached) " >&6
6589else
6590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6591/* end confdefs.h. */
6592#if defined CRAY && ! defined CRAY2
6593webecray
6594#else
6595wenotbecray
6596#endif
472fa5ee 6597
5e8754f9
SDJ
6598_ACEOF
6599if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6600 $EGREP "webecray" >/dev/null 2>&1; then :
6601 ac_cv_os_cray=yes
6602else
6603 ac_cv_os_cray=no
6604fi
6605rm -f conftest*
472fa5ee 6606
5e8754f9
SDJ
6607fi
6608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
6609$as_echo "$ac_cv_os_cray" >&6; }
6610if test $ac_cv_os_cray = yes; then
6611 for ac_func in _getb67 GETB67 getb67; do
6612 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6613ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6614if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
472fa5ee 6615
5e8754f9
SDJ
6616cat >>confdefs.h <<_ACEOF
6617#define CRAY_STACKSEG_END $ac_func
6618_ACEOF
472fa5ee 6619
5e8754f9
SDJ
6620 break
6621fi
472fa5ee 6622
5e8754f9
SDJ
6623 done
6624fi
472fa5ee 6625
5e8754f9
SDJ
6626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
6627$as_echo_n "checking stack direction for C alloca... " >&6; }
6628if ${ac_cv_c_stack_direction+:} false; then :
6629 $as_echo_n "(cached) " >&6
6630else
6631 if test "$cross_compiling" = yes; then :
6632 ac_cv_c_stack_direction=0
6633else
6634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6635/* end confdefs.h. */
6636$ac_includes_default
6637int
6638find_stack_direction (int *addr, int depth)
6639{
6640 int dir, dummy = 0;
6641 if (! addr)
6642 addr = &dummy;
6643 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
6644 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
6645 return dir + dummy;
6646}
472fa5ee 6647
5e8754f9
SDJ
6648int
6649main (int argc, char **argv)
6650{
6651 return find_stack_direction (0, argc + !argv + 20) < 0;
6652}
6653_ACEOF
6654if ac_fn_c_try_run "$LINENO"; then :
6655 ac_cv_c_stack_direction=1
6656else
6657 ac_cv_c_stack_direction=-1
6658fi
6659rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6660 conftest.$ac_objext conftest.beam conftest.$ac_ext
6661fi
472fa5ee 6662
5e8754f9
SDJ
6663fi
6664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
6665$as_echo "$ac_cv_c_stack_direction" >&6; }
6666cat >>confdefs.h <<_ACEOF
6667#define STACK_DIRECTION $ac_cv_c_stack_direction
6668_ACEOF
472fa5ee 6669
98399780 6670
5e8754f9 6671fi
98399780
YQ
6672
6673
5e8754f9
SDJ
6674 GNULIB__EXIT=0;
6675 GNULIB_ATOLL=0;
6676 GNULIB_CALLOC_POSIX=0;
6677 GNULIB_CANONICALIZE_FILE_NAME=0;
6678 GNULIB_GETLOADAVG=0;
6679 GNULIB_GETSUBOPT=0;
6680 GNULIB_GRANTPT=0;
6681 GNULIB_MALLOC_POSIX=0;
6682 GNULIB_MBTOWC=0;
6683 GNULIB_MKDTEMP=0;
6684 GNULIB_MKOSTEMP=0;
6685 GNULIB_MKOSTEMPS=0;
6686 GNULIB_MKSTEMP=0;
6687 GNULIB_MKSTEMPS=0;
6688 GNULIB_POSIX_OPENPT=0;
6689 GNULIB_PTSNAME=0;
6690 GNULIB_PTSNAME_R=0;
6691 GNULIB_PUTENV=0;
6692 GNULIB_QSORT_R=0;
6693 GNULIB_RANDOM=0;
6694 GNULIB_RANDOM_R=0;
6695 GNULIB_REALLOC_POSIX=0;
6696 GNULIB_REALPATH=0;
6697 GNULIB_RPMATCH=0;
6698 GNULIB_SECURE_GETENV=0;
6699 GNULIB_SETENV=0;
6700 GNULIB_STRTOD=0;
6701 GNULIB_STRTOLL=0;
6702 GNULIB_STRTOULL=0;
6703 GNULIB_SYSTEM_POSIX=0;
6704 GNULIB_UNLOCKPT=0;
6705 GNULIB_UNSETENV=0;
6706 GNULIB_WCTOMB=0;
6707 HAVE__EXIT=1;
6708 HAVE_ATOLL=1;
6709 HAVE_CANONICALIZE_FILE_NAME=1;
6710 HAVE_DECL_GETLOADAVG=1;
6711 HAVE_GETSUBOPT=1;
6712 HAVE_GRANTPT=1;
6713 HAVE_MKDTEMP=1;
6714 HAVE_MKOSTEMP=1;
6715 HAVE_MKOSTEMPS=1;
6716 HAVE_MKSTEMP=1;
6717 HAVE_MKSTEMPS=1;
6718 HAVE_POSIX_OPENPT=1;
6719 HAVE_PTSNAME=1;
6720 HAVE_PTSNAME_R=1;
6721 HAVE_QSORT_R=1;
6722 HAVE_RANDOM=1;
6723 HAVE_RANDOM_H=1;
6724 HAVE_RANDOM_R=1;
6725 HAVE_REALPATH=1;
6726 HAVE_RPMATCH=1;
6727 HAVE_SECURE_GETENV=1;
6728 HAVE_SETENV=1;
6729 HAVE_DECL_SETENV=1;
6730 HAVE_STRTOD=1;
6731 HAVE_STRTOLL=1;
6732 HAVE_STRTOULL=1;
6733 HAVE_STRUCT_RANDOM_DATA=1;
6734 HAVE_SYS_LOADAVG_H=0;
6735 HAVE_UNLOCKPT=1;
6736 HAVE_DECL_UNSETENV=1;
6737 REPLACE_CALLOC=0;
6738 REPLACE_CANONICALIZE_FILE_NAME=0;
6739 REPLACE_MALLOC=0;
6740 REPLACE_MBTOWC=0;
6741 REPLACE_MKSTEMP=0;
6742 REPLACE_PTSNAME=0;
6743 REPLACE_PTSNAME_R=0;
6744 REPLACE_PUTENV=0;
6745 REPLACE_QSORT_R=0;
6746 REPLACE_RANDOM_R=0;
6747 REPLACE_REALLOC=0;
6748 REPLACE_REALPATH=0;
6749 REPLACE_SETENV=0;
6750 REPLACE_STRTOD=0;
6751 REPLACE_UNSETENV=0;
6752 REPLACE_WCTOMB=0;
6ec2e0f5
SDJ
6753
6754
6755
6756
472fa5ee 6757
5e8754f9
SDJ
6758 for ac_func in $gl_func_list
6759do :
6760 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6761ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6762if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6763 cat >>confdefs.h <<_ACEOF
6764#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6765_ACEOF
472fa5ee 6766
5e8754f9
SDJ
6767fi
6768done
472fa5ee
SM
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
472fa5ee
SM
6783
6784
6785
5e8754f9
SDJ
6786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
6787$as_echo_n "checking whether // is distinct from /... " >&6; }
6788if ${gl_cv_double_slash_root+:} false; then :
6789 $as_echo_n "(cached) " >&6
6790else
6791 if test x"$cross_compiling" = xyes ; then
6792 # When cross-compiling, there is no way to tell whether // is special
6793 # short of a list of hosts. However, the only known hosts to date
6794 # that have a distinct // are Apollo DomainOS (too old to port to),
6795 # Cygwin, and z/OS. If anyone knows of another system for which // has
6796 # special semantics and is distinct from /, please report it to
6797 # <bug-gnulib@gnu.org>.
6798 case $host in
6799 *-cygwin | i370-ibm-openedition)
6800 gl_cv_double_slash_root=yes ;;
6801 *)
6802 # Be optimistic and assume that / and // are the same when we
6803 # don't know.
6804 gl_cv_double_slash_root='unknown, assuming no' ;;
6805 esac
6806 else
6807 set x `ls -di / // 2>/dev/null`
6808 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
6809 gl_cv_double_slash_root=no
6810 else
6811 gl_cv_double_slash_root=yes
6812 fi
6813 fi
6814fi
6815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
6816$as_echo "$gl_cv_double_slash_root" >&6; }
6817 if test "$gl_cv_double_slash_root" = yes; then
6ec2e0f5 6818
5e8754f9 6819$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
6ec2e0f5 6820
5e8754f9 6821 fi
6ec2e0f5 6822
6ec2e0f5 6823
6ec2e0f5
SDJ
6824
6825
6826
6827
6828
6829
5e8754f9 6830 :
6ec2e0f5 6831
472fa5ee
SM
6832
6833
6834
6835
5e8754f9
SDJ
6836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
6837$as_echo_n "checking whether realpath works... " >&6; }
6838if ${gl_cv_func_realpath_works+:} false; then :
6839 $as_echo_n "(cached) " >&6
6840else
472fa5ee 6841
5e8754f9
SDJ
6842 touch conftest.a
6843 mkdir conftest.d
6844 if test "$cross_compiling" = yes; then :
6845 case "$host_os" in
6846 # Guess yes on glibc systems.
6847 *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
6848 # If we don't know, assume the worst.
6849 *) gl_cv_func_realpath_works="guessing no" ;;
6850 esac
472fa5ee 6851
5e8754f9
SDJ
6852else
6853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6854/* end confdefs.h. */
e26b6bb0
TT
6855
6856
6857
5e8754f9
SDJ
6858#include <stdlib.h>
6859#if defined __MACH__ && defined __APPLE__
6860/* Avoid a crash on Mac OS X. */
6861#include <mach/mach.h>
6862#include <mach/mach_error.h>
6863#include <mach/thread_status.h>
6864#include <mach/exception.h>
6865#include <mach/task.h>
6866#include <pthread.h>
6867/* The exception port on which our thread listens. */
6868static mach_port_t our_exception_port;
6869/* The main function of the thread listening for exceptions of type
6870 EXC_BAD_ACCESS. */
6871static void *
6872mach_exception_thread (void *arg)
6873{
6874 /* Buffer for a message to be received. */
6875 struct {
6876 mach_msg_header_t head;
6877 mach_msg_body_t msgh_body;
6878 char data[1024];
6879 } msg;
6880 mach_msg_return_t retval;
6881 /* Wait for a message on the exception port. */
6882 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
6883 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
6884 if (retval != MACH_MSG_SUCCESS)
6885 abort ();
6886 exit (1);
6887}
6888static void
6889nocrash_init (void)
6890{
6891 mach_port_t self = mach_task_self ();
6892 /* Allocate a port on which the thread shall listen for exceptions. */
6893 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
6894 == KERN_SUCCESS) {
6895 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
6896 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
6897 MACH_MSG_TYPE_MAKE_SEND)
6898 == KERN_SUCCESS) {
6899 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
6900 for us. */
6901 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
6902 /* Create the thread listening on the exception port. */
6903 pthread_attr_t attr;
6904 pthread_t thread;
6905 if (pthread_attr_init (&attr) == 0
6906 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
6907 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
6908 pthread_attr_destroy (&attr);
6909 /* Replace the exception port info for these exceptions with our own.
6910 Note that we replace the exception port for the entire task, not only
6911 for a particular thread. This has the effect that when our exception
6912 port gets the message, the thread specific exception port has already
6913 been asked, and we don't need to bother about it.
6914 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
6915 task_set_exception_ports (self, mask, our_exception_port,
6916 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
6917 }
6918 }
6919 }
6920}
6921#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6922/* Avoid a crash on native Windows. */
6923#define WIN32_LEAN_AND_MEAN
6924#include <windows.h>
6925#include <winerror.h>
6926static LONG WINAPI
6927exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
6928{
6929 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
6930 {
6931 case EXCEPTION_ACCESS_VIOLATION:
6932 case EXCEPTION_IN_PAGE_ERROR:
6933 case EXCEPTION_STACK_OVERFLOW:
6934 case EXCEPTION_GUARD_PAGE:
6935 case EXCEPTION_PRIV_INSTRUCTION:
6936 case EXCEPTION_ILLEGAL_INSTRUCTION:
6937 case EXCEPTION_DATATYPE_MISALIGNMENT:
6938 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
6939 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
6940 exit (1);
6941 }
6942 return EXCEPTION_CONTINUE_SEARCH;
6943}
6944static void
6945nocrash_init (void)
6946{
6947 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
6948}
e26b6bb0 6949#else
5e8754f9
SDJ
6950/* Avoid a crash on POSIX systems. */
6951#include <signal.h>
6952#include <unistd.h>
6953/* A POSIX signal handler. */
6954static void
6955exception_handler (int sig)
6956{
6957 _exit (1);
6958}
6959static void
6960nocrash_init (void)
6961{
6962#ifdef SIGSEGV
6963 signal (SIGSEGV, exception_handler);
88b48903 6964#endif
5e8754f9
SDJ
6965#ifdef SIGBUS
6966 signal (SIGBUS, exception_handler);
88b48903 6967#endif
5e8754f9 6968}
88b48903 6969#endif
88b48903 6970
5e8754f9
SDJ
6971 #include <stdlib.h>
6972 #include <string.h>
88b48903 6973
5e8754f9
SDJ
6974int
6975main ()
6976{
88b48903 6977
5e8754f9
SDJ
6978 int result = 0;
6979 {
6980 char *name = realpath ("conftest.a", NULL);
6981 if (!(name && *name == '/'))
6982 result |= 1;
6983 free (name);
6984 }
6985 {
6986 char *name = realpath ("conftest.b/../conftest.a", NULL);
6987 if (name != NULL)
6988 result |= 2;
6989 free (name);
6990 }
6991 {
6992 char *name = realpath ("conftest.a/", NULL);
6993 if (name != NULL)
6994 result |= 4;
6995 free (name);
6996 }
6997 {
6998 char *name1 = realpath (".", NULL);
6999 char *name2 = realpath ("conftest.d//./..", NULL);
7000 if (! name1 || ! name2 || strcmp (name1, name2))
7001 result |= 8;
7002 free (name1);
7003 free (name2);
7004 }
7005 return result;
88b48903 7006
5e8754f9
SDJ
7007 ;
7008 return 0;
7009}
88b48903
WN
7010
7011_ACEOF
5e8754f9
SDJ
7012if ac_fn_c_try_run "$LINENO"; then :
7013 gl_cv_func_realpath_works=yes
88b48903 7014else
5e8754f9
SDJ
7015 gl_cv_func_realpath_works=no
7016fi
7017rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7018 conftest.$ac_objext conftest.beam conftest.$ac_ext
88b48903 7019fi
88b48903 7020
5e8754f9 7021 rm -rf conftest.a conftest.d
88b48903
WN
7022
7023fi
5e8754f9
SDJ
7024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
7025$as_echo "$gl_cv_func_realpath_works" >&6; }
7026 case "$gl_cv_func_realpath_works" in
7027 *yes)
88b48903 7028
5e8754f9 7029$as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
88b48903 7030
5e8754f9
SDJ
7031 ;;
7032 esac
88b48903
WN
7033
7034
e26b6bb0 7035
e26b6bb0 7036
3d99e817 7037
5e8754f9
SDJ
7038 for ac_header in $gl_header_list
7039do :
7040 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7041ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7042if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7043 cat >>confdefs.h <<_ACEOF
7044#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7045_ACEOF
3d99e817 7046
5e8754f9 7047fi
3d99e817 7048
5e8754f9 7049done
3d99e817
AK
7050
7051
472fa5ee 7052
472fa5ee
SM
7053
7054
7055
7056
7057
5e8754f9 7058 :
472fa5ee
SM
7059
7060
3d99e817 7061
3d99e817 7062
3d99e817 7063
3d99e817 7064
3d99e817 7065
3d99e817
AK
7066
7067
3d99e817
AK
7068
7069
7070
18848e28 7071
18848e28 7072
5e8754f9 7073 :
18848e28 7074
18848e28
GF
7075
7076
18848e28
GF
7077
7078
7079
7080
5e8754f9
SDJ
7081 GNULIB_CHDIR=0;
7082 GNULIB_CHOWN=0;
7083 GNULIB_CLOSE=0;
7084 GNULIB_DUP=0;
7085 GNULIB_DUP2=0;
7086 GNULIB_DUP3=0;
7087 GNULIB_ENVIRON=0;
7088 GNULIB_EUIDACCESS=0;
7089 GNULIB_FACCESSAT=0;
7090 GNULIB_FCHDIR=0;
7091 GNULIB_FCHOWNAT=0;
7092 GNULIB_FDATASYNC=0;
7093 GNULIB_FSYNC=0;
7094 GNULIB_FTRUNCATE=0;
7095 GNULIB_GETCWD=0;
7096 GNULIB_GETDOMAINNAME=0;
7097 GNULIB_GETDTABLESIZE=0;
7098 GNULIB_GETGROUPS=0;
7099 GNULIB_GETHOSTNAME=0;
7100 GNULIB_GETLOGIN=0;
7101 GNULIB_GETLOGIN_R=0;
7102 GNULIB_GETPAGESIZE=0;
7103 GNULIB_GETUSERSHELL=0;
7104 GNULIB_GROUP_MEMBER=0;
7105 GNULIB_ISATTY=0;
7106 GNULIB_LCHOWN=0;
7107 GNULIB_LINK=0;
7108 GNULIB_LINKAT=0;
7109 GNULIB_LSEEK=0;
7110 GNULIB_PIPE=0;
7111 GNULIB_PIPE2=0;
7112 GNULIB_PREAD=0;
7113 GNULIB_PWRITE=0;
7114 GNULIB_READ=0;
7115 GNULIB_READLINK=0;
7116 GNULIB_READLINKAT=0;
7117 GNULIB_RMDIR=0;
7118 GNULIB_SETHOSTNAME=0;
7119 GNULIB_SLEEP=0;
7120 GNULIB_SYMLINK=0;
7121 GNULIB_SYMLINKAT=0;
7122 GNULIB_TTYNAME_R=0;
7123 GNULIB_UNISTD_H_NONBLOCKING=0;
7124 GNULIB_UNISTD_H_SIGPIPE=0;
7125 GNULIB_UNLINK=0;
7126 GNULIB_UNLINKAT=0;
7127 GNULIB_USLEEP=0;
7128 GNULIB_WRITE=0;
7129 HAVE_CHOWN=1;
7130 HAVE_DUP2=1;
7131 HAVE_DUP3=1;
7132 HAVE_EUIDACCESS=1;
7133 HAVE_FACCESSAT=1;
7134 HAVE_FCHDIR=1;
7135 HAVE_FCHOWNAT=1;
7136 HAVE_FDATASYNC=1;
7137 HAVE_FSYNC=1;
7138 HAVE_FTRUNCATE=1;
7139 HAVE_GETDTABLESIZE=1;
7140 HAVE_GETGROUPS=1;
7141 HAVE_GETHOSTNAME=1;
7142 HAVE_GETLOGIN=1;
7143 HAVE_GETPAGESIZE=1;
7144 HAVE_GROUP_MEMBER=1;
7145 HAVE_LCHOWN=1;
7146 HAVE_LINK=1;
7147 HAVE_LINKAT=1;
7148 HAVE_PIPE=1;
7149 HAVE_PIPE2=1;
7150 HAVE_PREAD=1;
7151 HAVE_PWRITE=1;
7152 HAVE_READLINK=1;
7153 HAVE_READLINKAT=1;
7154 HAVE_SETHOSTNAME=1;
7155 HAVE_SLEEP=1;
7156 HAVE_SYMLINK=1;
7157 HAVE_SYMLINKAT=1;
7158 HAVE_UNLINKAT=1;
7159 HAVE_USLEEP=1;
7160 HAVE_DECL_ENVIRON=1;
7161 HAVE_DECL_FCHDIR=1;
7162 HAVE_DECL_FDATASYNC=1;
7163 HAVE_DECL_GETDOMAINNAME=1;
7164 HAVE_DECL_GETLOGIN_R=1;
7165 HAVE_DECL_GETPAGESIZE=1;
7166 HAVE_DECL_GETUSERSHELL=1;
7167 HAVE_DECL_SETHOSTNAME=1;
7168 HAVE_DECL_TTYNAME_R=1;
7169 HAVE_OS_H=0;
7170 HAVE_SYS_PARAM_H=0;
7171 REPLACE_CHOWN=0;
7172 REPLACE_CLOSE=0;
7173 REPLACE_DUP=0;
7174 REPLACE_DUP2=0;
7175 REPLACE_FCHOWNAT=0;
7176 REPLACE_FTRUNCATE=0;
7177 REPLACE_GETCWD=0;
7178 REPLACE_GETDOMAINNAME=0;
7179 REPLACE_GETDTABLESIZE=0;
7180 REPLACE_GETLOGIN_R=0;
7181 REPLACE_GETGROUPS=0;
7182 REPLACE_GETPAGESIZE=0;
7183 REPLACE_ISATTY=0;
7184 REPLACE_LCHOWN=0;
7185 REPLACE_LINK=0;
7186 REPLACE_LINKAT=0;
7187 REPLACE_LSEEK=0;
7188 REPLACE_PREAD=0;
7189 REPLACE_PWRITE=0;
7190 REPLACE_READ=0;
7191 REPLACE_READLINK=0;
7192 REPLACE_READLINKAT=0;
7193 REPLACE_RMDIR=0;
7194 REPLACE_SLEEP=0;
7195 REPLACE_SYMLINK=0;
7196 REPLACE_SYMLINKAT=0;
7197 REPLACE_TTYNAME_R=0;
7198 REPLACE_UNLINK=0;
7199 REPLACE_UNLINKAT=0;
7200 REPLACE_USLEEP=0;
7201 REPLACE_WRITE=0;
7202 UNISTD_H_HAVE_WINSOCK2_H=0;
7203 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
18848e28
GF
7204
7205
7206
7207
18848e28 7208
4a626d0a
PA
7209
7210
18848e28 7211
4a626d0a 7212
5e8754f9 7213 :
4a626d0a 7214
4a626d0a
PA
7215
7216
18848e28 7217
18848e28
GF
7218
7219
7220
7221
18848e28 7222
18848e28
GF
7223
7224
18848e28 7225
18848e28 7226
18848e28 7227
18848e28 7228
18848e28 7229
5e8754f9 7230 :
18848e28 7231
18848e28 7232
18848e28 7233
18848e28 7234
18848e28 7235
5e8754f9
SDJ
7236 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
7237 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
18848e28 7238
5e8754f9 7239$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
18848e28 7240
5e8754f9
SDJ
7241 else
7242 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
18848e28
GF
7243 fi
7244
7245
18848e28 7246
18848e28 7247
18848e28 7248
18848e28 7249
18848e28 7250
18848e28 7251
18848e28 7252
18848e28 7253
18848e28 7254
18848e28 7255
18848e28 7256
5e8754f9
SDJ
7257 GNULIB_OPENDIR=0;
7258 GNULIB_READDIR=0;
7259 GNULIB_REWINDDIR=0;
7260 GNULIB_CLOSEDIR=0;
7261 GNULIB_DIRFD=0;
7262 GNULIB_FDOPENDIR=0;
7263 GNULIB_SCANDIR=0;
7264 GNULIB_ALPHASORT=0;
7265 HAVE_OPENDIR=1;
7266 HAVE_READDIR=1;
7267 HAVE_REWINDDIR=1;
7268 HAVE_CLOSEDIR=1;
7269 HAVE_DECL_DIRFD=1;
7270 HAVE_DECL_FDOPENDIR=1;
7271 HAVE_FDOPENDIR=1;
7272 HAVE_SCANDIR=1;
7273 HAVE_ALPHASORT=1;
7274 REPLACE_OPENDIR=0;
7275 REPLACE_CLOSEDIR=0;
7276 REPLACE_DIRFD=0;
7277 REPLACE_FDOPENDIR=0;
18848e28 7278
18848e28
GF
7279
7280
5e8754f9
SDJ
7281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
7282$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
7283if ${gl_cv_have_include_next+:} false; then :
18848e28
GF
7284 $as_echo_n "(cached) " >&6
7285else
5e8754f9
SDJ
7286 rm -rf conftestd1a conftestd1b conftestd2
7287 mkdir conftestd1a conftestd1b conftestd2
7288 cat <<EOF > conftestd1a/conftest.h
7289#define DEFINED_IN_CONFTESTD1
7290#include_next <conftest.h>
7291#ifdef DEFINED_IN_CONFTESTD2
7292int foo;
7293#else
7294#error "include_next doesn't work"
18848e28 7295#endif
5e8754f9
SDJ
7296EOF
7297 cat <<EOF > conftestd1b/conftest.h
7298#define DEFINED_IN_CONFTESTD1
7299#include <stdio.h>
7300#include_next <conftest.h>
7301#ifdef DEFINED_IN_CONFTESTD2
7302int foo;
7303#else
7304#error "include_next doesn't work"
7305#endif
7306EOF
7307 cat <<EOF > conftestd2/conftest.h
7308#ifndef DEFINED_IN_CONFTESTD1
7309#error "include_next test doesn't work"
7310#endif
7311#define DEFINED_IN_CONFTESTD2
7312EOF
7313 gl_save_CPPFLAGS="$CPPFLAGS"
7314 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
7315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7316/* end confdefs.h. */
7317#include <conftest.h>
18848e28 7318_ACEOF
5e8754f9
SDJ
7319if ac_fn_c_try_compile "$LINENO"; then :
7320 gl_cv_have_include_next=yes
18848e28 7321else
5e8754f9 7322 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
18848e28
GF
7323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7324/* end confdefs.h. */
5e8754f9 7325#include <conftest.h>
18848e28 7326_ACEOF
5e8754f9
SDJ
7327if ac_fn_c_try_compile "$LINENO"; then :
7328 gl_cv_have_include_next=buggy
7329else
7330 gl_cv_have_include_next=no
18848e28 7331fi
5e8754f9 7332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18848e28
GF
7333
7334fi
5e8754f9
SDJ
7335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7336 CPPFLAGS="$gl_save_CPPFLAGS"
7337 rm -rf conftestd1a conftestd1b conftestd2
18848e28
GF
7338
7339fi
5e8754f9
SDJ
7340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
7341$as_echo "$gl_cv_have_include_next" >&6; }
7342 PRAGMA_SYSTEM_HEADER=
7343 if test $gl_cv_have_include_next = yes; then
7344 INCLUDE_NEXT=include_next
7345 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7346 if test -n "$GCC"; then
7347 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
7348 fi
7349 else
7350 if test $gl_cv_have_include_next = buggy; then
7351 INCLUDE_NEXT=include
7352 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7353 else
7354 INCLUDE_NEXT=include
7355 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
7356 fi
18848e28
GF
7357 fi
7358
7359
63ce7108 7360
5e8754f9
SDJ
7361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
7362$as_echo_n "checking whether system header files limit the line length... " >&6; }
7363if ${gl_cv_pragma_columns+:} false; then :
63ce7108
TT
7364 $as_echo_n "(cached) " >&6
7365else
5e8754f9 7366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63ce7108 7367/* end confdefs.h. */
6ec2e0f5 7368
5e8754f9
SDJ
7369#ifdef __TANDEM
7370choke me
7371#endif
6ec2e0f5 7372
63ce7108 7373_ACEOF
5e8754f9
SDJ
7374if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7375 $EGREP "choke me" >/dev/null 2>&1; then :
7376 gl_cv_pragma_columns=yes
6ec2e0f5 7377else
5e8754f9 7378 gl_cv_pragma_columns=no
6ec2e0f5 7379fi
5e8754f9 7380rm -f conftest*
63ce7108
TT
7381
7382
6ec2e0f5 7383fi
5e8754f9
SDJ
7384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
7385$as_echo "$gl_cv_pragma_columns" >&6; }
7386 if test $gl_cv_pragma_columns = yes; then
7387 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
7388 else
7389 PRAGMA_COLUMNS=
7390 fi
63ce7108
TT
7391
7392
472fa5ee 7393
63ce7108
TT
7394
7395
7396
7397
7398
7399
7400
7401
7402
5e8754f9 7403 :
63ce7108 7404
472fa5ee
SM
7405
7406
7407
7408
7409
472fa5ee 7410
5e8754f9
SDJ
7411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
7412$as_echo_n "checking if environ is properly declared... " >&6; }
7413 if ${gt_cv_var_environ_declaration+:} false; then :
7414 $as_echo_n "(cached) " >&6
7415else
472fa5ee 7416
5e8754f9
SDJ
7417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7418/* end confdefs.h. */
7419#if HAVE_UNISTD_H
7420 #include <unistd.h>
7421 #endif
7422 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
7423 #include <stdlib.h>
472fa5ee 7424
5e8754f9
SDJ
7425 extern struct { int foo; } environ;
7426int
7427main ()
7428{
7429environ.foo = 1;
7430 ;
7431 return 0;
7432}
7433_ACEOF
7434if ac_fn_c_try_compile "$LINENO"; then :
7435 gt_cv_var_environ_declaration=no
7436else
7437 gt_cv_var_environ_declaration=yes
7438fi
7439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7440fi
472fa5ee 7441
5e8754f9
SDJ
7442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
7443$as_echo "$gt_cv_var_environ_declaration" >&6; }
7444 if test $gt_cv_var_environ_declaration = yes; then
472fa5ee 7445
5e8754f9 7446$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
472fa5ee 7447
5e8754f9 7448 fi
472fa5ee
SM
7449
7450
5e8754f9
SDJ
7451 if test $gt_cv_var_environ_declaration != yes; then
7452 HAVE_DECL_ENVIRON=0
7453 fi
472fa5ee
SM
7454
7455
7456
5e8754f9
SDJ
7457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
7458$as_echo_n "checking for complete errno.h... " >&6; }
7459if ${gl_cv_header_errno_h_complete+:} false; then :
6ec2e0f5
SDJ
7460 $as_echo_n "(cached) " >&6
7461else
7a6dbc2f 7462
5e8754f9 7463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ec2e0f5 7464/* end confdefs.h. */
63ce7108 7465
5e8754f9
SDJ
7466#include <errno.h>
7467#if !defined ETXTBSY
7468booboo
7469#endif
7470#if !defined ENOMSG
7471booboo
7472#endif
7473#if !defined EIDRM
7474booboo
7475#endif
7476#if !defined ENOLINK
7477booboo
7478#endif
7479#if !defined EPROTO
7480booboo
7481#endif
7482#if !defined EMULTIHOP
7483booboo
7484#endif
7485#if !defined EBADMSG
7486booboo
7487#endif
7488#if !defined EOVERFLOW
7489booboo
7490#endif
7491#if !defined ENOTSUP
7492booboo
7493#endif
7494#if !defined ENETRESET
7495booboo
7496#endif
7497#if !defined ECONNABORTED
7498booboo
7499#endif
7500#if !defined ESTALE
7501booboo
7502#endif
7503#if !defined EDQUOT
7504booboo
7505#endif
7506#if !defined ECANCELED
7507booboo
7508#endif
7509#if !defined EOWNERDEAD
7510booboo
7511#endif
7512#if !defined ENOTRECOVERABLE
7513booboo
7514#endif
7515#if !defined EILSEQ
7516booboo
7517#endif
6ec2e0f5 7518
6ec2e0f5 7519_ACEOF
5e8754f9
SDJ
7520if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7521 $EGREP "booboo" >/dev/null 2>&1; then :
7522 gl_cv_header_errno_h_complete=no
6ec2e0f5 7523else
5e8754f9 7524 gl_cv_header_errno_h_complete=yes
6ec2e0f5 7525fi
5e8754f9 7526rm -f conftest*
6ec2e0f5 7527
6ec2e0f5
SDJ
7528
7529fi
5e8754f9
SDJ
7530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
7531$as_echo "$gl_cv_header_errno_h_complete" >&6; }
7532 if test $gl_cv_header_errno_h_complete = yes; then
7533 ERRNO_H=''
7534 else
472fa5ee
SM
7535
7536
7537
7538
7539
7540
7541
7542
7a6dbc2f 7543 if test $gl_cv_have_include_next = yes; then
5e8754f9 7544 gl_cv_next_errno_h='<'errno.h'>'
7a6dbc2f 7545 else
5e8754f9
SDJ
7546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
7547$as_echo_n "checking absolute name of <errno.h>... " >&6; }
7548if ${gl_cv_next_errno_h+:} false; then :
7a6dbc2f
SDJ
7549 $as_echo_n "(cached) " >&6
7550else
472fa5ee 7551
472fa5ee
SM
7552
7553
7a6dbc2f
SDJ
7554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7555/* end confdefs.h. */
5e8754f9 7556#include <errno.h>
7a6dbc2f
SDJ
7557_ACEOF
7558 case "$host_os" in
7559 aix*) gl_absname_cpp="$ac_cpp -C" ;;
7560 *) gl_absname_cpp="$ac_cpp" ;;
7561 esac
472fa5ee 7562
7a6dbc2f
SDJ
7563 case "$host_os" in
7564 mingw*)
7565 gl_dirsep_regex='[/\\]'
7566 ;;
7567 *)
7568 gl_dirsep_regex='\/'
7569 ;;
7570 esac
7571 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
5e8754f9 7572 gl_header_literal_regex=`echo 'errno.h' \
7a6dbc2f
SDJ
7573 | sed -e "$gl_make_literal_regex_sed"`
7574 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
7575 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
7576 s|^/[^/]|//&|
7577 p
7578 q
7579 }'
7580
5e8754f9 7581 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7a6dbc2f
SDJ
7582 sed -n "$gl_absolute_header_sed"`
7583
5e8754f9
SDJ
7584 gl_header=$gl_cv_absolute_errno_h
7585 gl_cv_next_errno_h='"'$gl_header'"'
7a6dbc2f
SDJ
7586
7587
7588fi
5e8754f9
SDJ
7589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
7590$as_echo "$gl_cv_next_errno_h" >&6; }
7a6dbc2f 7591 fi
5e8754f9 7592 NEXT_ERRNO_H=$gl_cv_next_errno_h
7a6dbc2f
SDJ
7593
7594 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7595 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
5e8754f9 7596 gl_next_as_first_directive='<'errno.h'>'
7a6dbc2f
SDJ
7597 else
7598 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
5e8754f9 7599 gl_next_as_first_directive=$gl_cv_next_errno_h
7a6dbc2f 7600 fi
5e8754f9 7601 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
7a6dbc2f
SDJ
7602
7603
7604
7605
5e8754f9 7606 ERRNO_H='errno.h'
7a6dbc2f
SDJ
7607 fi
7608
5e8754f9
SDJ
7609 if test -n "$ERRNO_H"; then
7610 GL_GENERATE_ERRNO_H_TRUE=
7611 GL_GENERATE_ERRNO_H_FALSE='#'
7a6dbc2f 7612else
5e8754f9
SDJ
7613 GL_GENERATE_ERRNO_H_TRUE='#'
7614 GL_GENERATE_ERRNO_H_FALSE=
7a6dbc2f
SDJ
7615fi
7616
7617
5e8754f9
SDJ
7618 if test -n "$ERRNO_H"; then
7619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
7620$as_echo_n "checking for EMULTIHOP value... " >&6; }
7621if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
7622 $as_echo_n "(cached) " >&6
7623else
7a6dbc2f 7624
5e8754f9
SDJ
7625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7626/* end confdefs.h. */
7a6dbc2f 7627
5e8754f9
SDJ
7628#include <errno.h>
7629#ifdef EMULTIHOP
7630yes
7631#endif
7a6dbc2f 7632
7a6dbc2f 7633_ACEOF
5e8754f9
SDJ
7634if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7635 $EGREP "yes" >/dev/null 2>&1; then :
7636 gl_cv_header_errno_h_EMULTIHOP=yes
7a6dbc2f 7637else
5e8754f9 7638 gl_cv_header_errno_h_EMULTIHOP=no
7a6dbc2f 7639fi
5e8754f9 7640rm -f conftest*
7a6dbc2f 7641
5e8754f9
SDJ
7642 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
7643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7644/* end confdefs.h. */
7a6dbc2f 7645
5e8754f9
SDJ
7646#define _XOPEN_SOURCE_EXTENDED 1
7647#include <errno.h>
7648#ifdef EMULTIHOP
7649yes
7650#endif
7a6dbc2f 7651
5e8754f9
SDJ
7652_ACEOF
7653if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7654 $EGREP "yes" >/dev/null 2>&1; then :
7655 gl_cv_header_errno_h_EMULTIHOP=hidden
7656fi
7657rm -f conftest*
7a6dbc2f 7658
5e8754f9
SDJ
7659 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
7660 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
7661#define _XOPEN_SOURCE_EXTENDED 1
7662#include <errno.h>
7663/* The following two lines are a workaround against an autoconf-2.52 bug. */
7664#include <stdio.h>
7665#include <stdlib.h>
7666"; then :
7a6dbc2f 7667
5e8754f9 7668fi
7a6dbc2f 7669
5e8754f9
SDJ
7670 fi
7671 fi
7a6dbc2f 7672
5e8754f9
SDJ
7673fi
7674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
7675$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
7676 case $gl_cv_header_errno_h_EMULTIHOP in
7677 yes | no)
7678 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
7679 ;;
7680 *)
7681 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
7682 ;;
7683 esac
7a6dbc2f
SDJ
7684
7685
5e8754f9 7686 fi
7a6dbc2f
SDJ
7687
7688
5e8754f9
SDJ
7689 if test -n "$ERRNO_H"; then
7690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
7691$as_echo_n "checking for ENOLINK value... " >&6; }
7692if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
7693 $as_echo_n "(cached) " >&6
7694else
7a6dbc2f 7695
5e8754f9
SDJ
7696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7697/* end confdefs.h. */
7a6dbc2f 7698
5e8754f9
SDJ
7699#include <errno.h>
7700#ifdef ENOLINK
7701yes
7702#endif
7a6dbc2f 7703
5e8754f9
SDJ
7704_ACEOF
7705if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7706 $EGREP "yes" >/dev/null 2>&1; then :
7707 gl_cv_header_errno_h_ENOLINK=yes
7708else
7709 gl_cv_header_errno_h_ENOLINK=no
7710fi
7711rm -f conftest*
7a6dbc2f 7712
5e8754f9
SDJ
7713 if test $gl_cv_header_errno_h_ENOLINK = no; then
7714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7715/* end confdefs.h. */
7a6dbc2f 7716
5e8754f9
SDJ
7717#define _XOPEN_SOURCE_EXTENDED 1
7718#include <errno.h>
7719#ifdef ENOLINK
7720yes
7721#endif
7a6dbc2f 7722
5e8754f9
SDJ
7723_ACEOF
7724if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7725 $EGREP "yes" >/dev/null 2>&1; then :
7726 gl_cv_header_errno_h_ENOLINK=hidden
7727fi
7728rm -f conftest*
7a6dbc2f 7729
5e8754f9
SDJ
7730 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
7731 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
7732#define _XOPEN_SOURCE_EXTENDED 1
7733#include <errno.h>
7734/* The following two lines are a workaround against an autoconf-2.52 bug. */
7735#include <stdio.h>
7736#include <stdlib.h>
7737"; then :
7a6dbc2f 7738
5e8754f9 7739fi
7a6dbc2f 7740
5e8754f9
SDJ
7741 fi
7742 fi
7a6dbc2f 7743
5e8754f9
SDJ
7744fi
7745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
7746$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
7747 case $gl_cv_header_errno_h_ENOLINK in
7748 yes | no)
7749 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
7750 ;;
7751 *)
7752 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
7753 ;;
7754 esac
7a6dbc2f
SDJ
7755
7756
5e8754f9 7757 fi
7a6dbc2f
SDJ
7758
7759
5e8754f9
SDJ
7760 if test -n "$ERRNO_H"; then
7761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
7762$as_echo_n "checking for EOVERFLOW value... " >&6; }
7763if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
7764 $as_echo_n "(cached) " >&6
7765else
7a6dbc2f 7766
5e8754f9
SDJ
7767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7768/* end confdefs.h. */
7a6dbc2f 7769
5e8754f9
SDJ
7770#include <errno.h>
7771#ifdef EOVERFLOW
7772yes
7773#endif
7a6dbc2f 7774
5e8754f9
SDJ
7775_ACEOF
7776if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7777 $EGREP "yes" >/dev/null 2>&1; then :
7778 gl_cv_header_errno_h_EOVERFLOW=yes
7779else
7780 gl_cv_header_errno_h_EOVERFLOW=no
7781fi
7782rm -f conftest*
7a6dbc2f 7783
5e8754f9
SDJ
7784 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
7785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7786/* end confdefs.h. */
7a6dbc2f 7787
5e8754f9
SDJ
7788#define _XOPEN_SOURCE_EXTENDED 1
7789#include <errno.h>
7790#ifdef EOVERFLOW
7791yes
7792#endif
7a6dbc2f 7793
5e8754f9
SDJ
7794_ACEOF
7795if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7796 $EGREP "yes" >/dev/null 2>&1; then :
7797 gl_cv_header_errno_h_EOVERFLOW=hidden
7798fi
7799rm -f conftest*
7a6dbc2f 7800
5e8754f9
SDJ
7801 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
7802 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
7803#define _XOPEN_SOURCE_EXTENDED 1
7804#include <errno.h>
7805/* The following two lines are a workaround against an autoconf-2.52 bug. */
7806#include <stdio.h>
7807#include <stdlib.h>
7808"; then :
7a6dbc2f 7809
5e8754f9 7810fi
7a6dbc2f 7811
5e8754f9
SDJ
7812 fi
7813 fi
7a6dbc2f 7814
5e8754f9
SDJ
7815fi
7816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
7817$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
7818 case $gl_cv_header_errno_h_EOVERFLOW in
7819 yes | no)
7820 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
7821 ;;
7822 *)
7823 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
7824 ;;
7825 esac
7a6dbc2f
SDJ
7826
7827
5e8754f9 7828 fi
7a6dbc2f
SDJ
7829
7830
5e8754f9
SDJ
7831ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
7832if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
7833 ac_have_decl=1
7834else
7835 ac_have_decl=0
7836fi
7a6dbc2f 7837
5e8754f9
SDJ
7838cat >>confdefs.h <<_ACEOF
7839#define HAVE_DECL_STRERROR_R $ac_have_decl
7840_ACEOF
7a6dbc2f 7841
5e8754f9
SDJ
7842for ac_func in strerror_r
7843do :
7844 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
7845if test "x$ac_cv_func_strerror_r" = xyes; then :
7846 cat >>confdefs.h <<_ACEOF
7847#define HAVE_STRERROR_R 1
7848_ACEOF
7a6dbc2f 7849
5e8754f9
SDJ
7850fi
7851done
7a6dbc2f 7852
5e8754f9
SDJ
7853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
7854$as_echo_n "checking whether strerror_r returns char *... " >&6; }
7855if ${ac_cv_func_strerror_r_char_p+:} false; then :
7856 $as_echo_n "(cached) " >&6
7857else
7a6dbc2f 7858
5e8754f9
SDJ
7859 ac_cv_func_strerror_r_char_p=no
7860 if test $ac_cv_have_decl_strerror_r = yes; then
7861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7862/* end confdefs.h. */
7863$ac_includes_default
7864int
7865main ()
7866{
7a6dbc2f 7867
5e8754f9
SDJ
7868 char buf[100];
7869 char x = *strerror_r (0, buf, sizeof buf);
7870 char *p = strerror_r (0, buf, sizeof buf);
7871 return !p || x;
7a6dbc2f 7872
7a6dbc2f
SDJ
7873 ;
7874 return 0;
7875}
7876_ACEOF
5e8754f9
SDJ
7877if ac_fn_c_try_compile "$LINENO"; then :
7878 ac_cv_func_strerror_r_char_p=yes
7a6dbc2f 7879fi
5e8754f9
SDJ
7880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7881 else
7882 # strerror_r is not declared. Choose between
7883 # systems that have relatively inaccessible declarations for the
7884 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
7885 # former has a strerror_r that returns char*, while the latter
7886 # has a strerror_r that returns `int'.
7887 # This test should segfault on the DEC system.
7888 if test "$cross_compiling" = yes; then :
7889 :
7a6dbc2f 7890else
5e8754f9 7891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7a6dbc2f 7892/* end confdefs.h. */
5e8754f9
SDJ
7893$ac_includes_default
7894 extern char *strerror_r ();
7a6dbc2f
SDJ
7895int
7896main ()
7897{
5e8754f9
SDJ
7898char buf[100];
7899 char x = *strerror_r (0, buf, sizeof buf);
7900 return ! isalpha (x);
7a6dbc2f
SDJ
7901 ;
7902 return 0;
7903}
7904_ACEOF
5e8754f9
SDJ
7905if ac_fn_c_try_run "$LINENO"; then :
7906 ac_cv_func_strerror_r_char_p=yes
7a6dbc2f 7907fi
5e8754f9
SDJ
7908rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7909 conftest.$ac_objext conftest.beam conftest.$ac_ext
7a6dbc2f 7910fi
5e8754f9 7911
7a6dbc2f 7912 fi
7a6dbc2f 7913
5e8754f9
SDJ
7914fi
7915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
7916$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
7917if test $ac_cv_func_strerror_r_char_p = yes; then
7a6dbc2f 7918
5e8754f9 7919$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
7a6dbc2f 7920
5e8754f9 7921fi
7a6dbc2f
SDJ
7922
7923
7924
7925
7926
5e8754f9
SDJ
7927 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
7928if test "x$ac_cv_have_decl_fchdir" = xyes; then :
7929 ac_have_decl=1
7a6dbc2f 7930else
5e8754f9
SDJ
7931 ac_have_decl=0
7932fi
7a6dbc2f 7933
5e8754f9
SDJ
7934cat >>confdefs.h <<_ACEOF
7935#define HAVE_DECL_FCHDIR $ac_have_decl
7936_ACEOF
7a6dbc2f 7937
7a6dbc2f 7938
7a6dbc2f 7939
5e8754f9
SDJ
7940 GNULIB_FCNTL=0;
7941 GNULIB_NONBLOCKING=0;
7942 GNULIB_OPEN=0;
7943 GNULIB_OPENAT=0;
7944 HAVE_FCNTL=1;
7945 HAVE_OPENAT=1;
7946 REPLACE_FCNTL=0;
7947 REPLACE_OPEN=0;
7948 REPLACE_OPENAT=0;
7a6dbc2f 7949
7a6dbc2f 7950
7a6dbc2f
SDJ
7951
7952
7a6dbc2f 7953
7a6dbc2f 7954
7a6dbc2f 7955
7a6dbc2f
SDJ
7956
7957
7958
7a6dbc2f 7959
7a6dbc2f 7960
7a6dbc2f 7961
7a6dbc2f 7962
7a6dbc2f 7963
5e8754f9 7964 :
7a6dbc2f
SDJ
7965
7966
7967
7968
7969
7970
5e8754f9 7971 :
7a6dbc2f 7972
7a6dbc2f 7973
7a6dbc2f
SDJ
7974
7975
7a6dbc2f 7976
5e8754f9
SDJ
7977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
7978$as_echo_n "checking for working fcntl.h... " >&6; }
7979if ${gl_cv_header_working_fcntl_h+:} false; then :
88b48903
WN
7980 $as_echo_n "(cached) " >&6
7981else
5e8754f9
SDJ
7982 if test "$cross_compiling" = yes; then :
7983 gl_cv_header_working_fcntl_h=cross-compiling
7984else
7985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
88b48903 7986/* end confdefs.h. */
5e8754f9
SDJ
7987#include <sys/types.h>
7988 #include <sys/stat.h>
7989 #if HAVE_UNISTD_H
7990 # include <unistd.h>
7991 #else /* on Windows with MSVC */
7992 # include <io.h>
7993 # include <stdlib.h>
7994 # defined sleep(n) _sleep ((n) * 1000)
7995 #endif
7996 #include <fcntl.h>
7997 #ifndef O_NOATIME
7998 #define O_NOATIME 0
7999 #endif
8000 #ifndef O_NOFOLLOW
8001 #define O_NOFOLLOW 0
8002 #endif
8003 static int const constants[] =
8004 {
8005 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
8006 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
8007 };
8008
8009int
88b48903
WN
8010main ()
8011{
5e8754f9
SDJ
8012
8013 int result = !constants;
8014 #if HAVE_SYMLINK
8015 {
8016 static char const sym[] = "conftest.sym";
8017 if (symlink ("/dev/null", sym) != 0)
8018 result |= 2;
8019 else
8020 {
8021 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
8022 if (fd >= 0)
8023 {
8024 close (fd);
8025 result |= 4;
8026 }
8027 }
8028 if (unlink (sym) != 0 || symlink (".", sym) != 0)
8029 result |= 2;
8030 else
8031 {
8032 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
8033 if (fd >= 0)
8034 {
8035 close (fd);
8036 result |= 4;
8037 }
8038 }
8039 unlink (sym);
8040 }
8041 #endif
8042 {
8043 static char const file[] = "confdefs.h";
8044 int fd = open (file, O_RDONLY | O_NOATIME);
8045 if (fd < 0)
8046 result |= 8;
8047 else
8048 {
8049 struct stat st0;
8050 if (fstat (fd, &st0) != 0)
8051 result |= 16;
8052 else
8053 {
8054 char c;
8055 sleep (1);
8056 if (read (fd, &c, 1) != 1)
8057 result |= 24;
8058 else
8059 {
8060 if (close (fd) != 0)
8061 result |= 32;
8062 else
8063 {
8064 struct stat st1;
8065 if (stat (file, &st1) != 0)
8066 result |= 40;
8067 else
8068 if (st0.st_atime != st1.st_atime)
8069 result |= 64;
8070 }
8071 }
8072 }
8073 }
8074 }
8075 return result;
88b48903
WN
8076 ;
8077 return 0;
8078}
8079_ACEOF
5e8754f9
SDJ
8080if ac_fn_c_try_run "$LINENO"; then :
8081 gl_cv_header_working_fcntl_h=yes
88b48903 8082else
5e8754f9
SDJ
8083 case $? in #(
8084 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
8085 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
8086 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
8087 *) gl_cv_header_working_fcntl_h='no';;
8088 esac
88b48903 8089fi
5e8754f9
SDJ
8090rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8091 conftest.$ac_objext conftest.beam conftest.$ac_ext
8092fi
8093
8094fi
8095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
8096$as_echo "$gl_cv_header_working_fcntl_h" >&6; }
8097
8098 case $gl_cv_header_working_fcntl_h in #(
8099 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
8100 *) ac_val=1;;
8101 esac
8102
8103cat >>confdefs.h <<_ACEOF
8104#define HAVE_WORKING_O_NOATIME $ac_val
8105_ACEOF
8106
8107
8108 case $gl_cv_header_working_fcntl_h in #(
8109 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
8110 *) ac_val=1;;
8111 esac
8112
8113cat >>confdefs.h <<_ACEOF
8114#define HAVE_WORKING_O_NOFOLLOW $ac_val
8115_ACEOF
8116
8117
8118ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
8119if test "x$ac_cv_type_pid_t" = xyes; then :
8120
8121else
8122
8123cat >>confdefs.h <<_ACEOF
8124#define pid_t int
8125_ACEOF
8126
8127fi
8128
8129ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
8130if test "x$ac_cv_type_mode_t" = xyes; then :
8131
8132else
8133
8134cat >>confdefs.h <<_ACEOF
8135#define mode_t int
8136_ACEOF
8137
8138fi
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
8153$as_echo_n "checking for mbstate_t... " >&6; }
8154if ${ac_cv_type_mbstate_t+:} false; then :
8155 $as_echo_n "(cached) " >&6
8156else
8157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8158/* end confdefs.h. */
8159$ac_includes_default
8160/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
8161 <wchar.h>.
8162 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8163 included before <wchar.h>. */
8164#include <stddef.h>
8165#include <stdio.h>
8166#include <time.h>
8167#include <wchar.h>
8168int
8169main ()
8170{
8171mbstate_t x; return sizeof x;
8172 ;
8173 return 0;
8174}
8175_ACEOF
8176if ac_fn_c_try_compile "$LINENO"; then :
8177 ac_cv_type_mbstate_t=yes
8178else
8179 ac_cv_type_mbstate_t=no
8180fi
8181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8182fi
8183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
8184$as_echo "$ac_cv_type_mbstate_t" >&6; }
8185 if test $ac_cv_type_mbstate_t = yes; then
8186
8187$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
8188
8189 else
8190
8191$as_echo "#define mbstate_t int" >>confdefs.h
8192
8193 fi
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236 GNULIB_ACOSF=0;
8237 GNULIB_ACOSL=0;
8238 GNULIB_ASINF=0;
8239 GNULIB_ASINL=0;
8240 GNULIB_ATANF=0;
8241 GNULIB_ATANL=0;
8242 GNULIB_ATAN2F=0;
8243 GNULIB_CBRT=0;
8244 GNULIB_CBRTF=0;
8245 GNULIB_CBRTL=0;
8246 GNULIB_CEIL=0;
8247 GNULIB_CEILF=0;
8248 GNULIB_CEILL=0;
8249 GNULIB_COPYSIGN=0;
8250 GNULIB_COPYSIGNF=0;
8251 GNULIB_COPYSIGNL=0;
8252 GNULIB_COSF=0;
8253 GNULIB_COSL=0;
8254 GNULIB_COSHF=0;
8255 GNULIB_EXPF=0;
8256 GNULIB_EXPL=0;
8257 GNULIB_EXP2=0;
8258 GNULIB_EXP2F=0;
8259 GNULIB_EXP2L=0;
8260 GNULIB_EXPM1=0;
8261 GNULIB_EXPM1F=0;
8262 GNULIB_EXPM1L=0;
8263 GNULIB_FABSF=0;
8264 GNULIB_FABSL=0;
8265 GNULIB_FLOOR=0;
8266 GNULIB_FLOORF=0;
8267 GNULIB_FLOORL=0;
8268 GNULIB_FMA=0;
8269 GNULIB_FMAF=0;
8270 GNULIB_FMAL=0;
8271 GNULIB_FMOD=0;
8272 GNULIB_FMODF=0;
8273 GNULIB_FMODL=0;
8274 GNULIB_FREXPF=0;
8275 GNULIB_FREXP=0;
8276 GNULIB_FREXPL=0;
8277 GNULIB_HYPOT=0;
8278 GNULIB_HYPOTF=0;
8279 GNULIB_HYPOTL=0;
8280 GNULIB_ILOGB=0;
8281 GNULIB_ILOGBF=0;
8282 GNULIB_ILOGBL=0;
8283 GNULIB_ISFINITE=0;
8284 GNULIB_ISINF=0;
8285 GNULIB_ISNAN=0;
8286 GNULIB_ISNANF=0;
8287 GNULIB_ISNAND=0;
8288 GNULIB_ISNANL=0;
8289 GNULIB_LDEXPF=0;
8290 GNULIB_LDEXPL=0;
8291 GNULIB_LOG=0;
8292 GNULIB_LOGF=0;
8293 GNULIB_LOGL=0;
8294 GNULIB_LOG10=0;
8295 GNULIB_LOG10F=0;
8296 GNULIB_LOG10L=0;
8297 GNULIB_LOG1P=0;
8298 GNULIB_LOG1PF=0;
8299 GNULIB_LOG1PL=0;
8300 GNULIB_LOG2=0;
8301 GNULIB_LOG2F=0;
8302 GNULIB_LOG2L=0;
8303 GNULIB_LOGB=0;
8304 GNULIB_LOGBF=0;
8305 GNULIB_LOGBL=0;
8306 GNULIB_MODF=0;
8307 GNULIB_MODFF=0;
8308 GNULIB_MODFL=0;
8309 GNULIB_POWF=0;
8310 GNULIB_REMAINDER=0;
8311 GNULIB_REMAINDERF=0;
8312 GNULIB_REMAINDERL=0;
8313 GNULIB_RINT=0;
8314 GNULIB_RINTF=0;
8315 GNULIB_RINTL=0;
8316 GNULIB_ROUND=0;
8317 GNULIB_ROUNDF=0;
8318 GNULIB_ROUNDL=0;
8319 GNULIB_SIGNBIT=0;
8320 GNULIB_SINF=0;
8321 GNULIB_SINL=0;
8322 GNULIB_SINHF=0;
8323 GNULIB_SQRTF=0;
8324 GNULIB_SQRTL=0;
8325 GNULIB_TANF=0;
8326 GNULIB_TANL=0;
8327 GNULIB_TANHF=0;
8328 GNULIB_TRUNC=0;
8329 GNULIB_TRUNCF=0;
8330 GNULIB_TRUNCL=0;
8331 HAVE_ACOSF=1;
8332 HAVE_ACOSL=1;
8333 HAVE_ASINF=1;
8334 HAVE_ASINL=1;
8335 HAVE_ATANF=1;
8336 HAVE_ATANL=1;
8337 HAVE_ATAN2F=1;
8338 HAVE_CBRT=1;
8339 HAVE_CBRTF=1;
8340 HAVE_CBRTL=1;
8341 HAVE_COPYSIGN=1;
8342 HAVE_COPYSIGNL=1;
8343 HAVE_COSF=1;
8344 HAVE_COSL=1;
8345 HAVE_COSHF=1;
8346 HAVE_EXPF=1;
8347 HAVE_EXPL=1;
8348 HAVE_EXPM1=1;
8349 HAVE_EXPM1F=1;
8350 HAVE_FABSF=1;
8351 HAVE_FABSL=1;
8352 HAVE_FMA=1;
8353 HAVE_FMAF=1;
8354 HAVE_FMAL=1;
8355 HAVE_FMODF=1;
8356 HAVE_FMODL=1;
8357 HAVE_FREXPF=1;
8358 HAVE_HYPOTF=1;
8359 HAVE_HYPOTL=1;
8360 HAVE_ILOGB=1;
8361 HAVE_ILOGBF=1;
8362 HAVE_ILOGBL=1;
8363 HAVE_ISNANF=1;
8364 HAVE_ISNAND=1;
8365 HAVE_ISNANL=1;
8366 HAVE_LDEXPF=1;
8367 HAVE_LOGF=1;
8368 HAVE_LOGL=1;
8369 HAVE_LOG10F=1;
8370 HAVE_LOG10L=1;
8371 HAVE_LOG1P=1;
8372 HAVE_LOG1PF=1;
8373 HAVE_LOG1PL=1;
8374 HAVE_LOGBF=1;
8375 HAVE_LOGBL=1;
8376 HAVE_MODFF=1;
8377 HAVE_MODFL=1;
8378 HAVE_POWF=1;
8379 HAVE_REMAINDER=1;
8380 HAVE_REMAINDERF=1;
8381 HAVE_RINT=1;
8382 HAVE_RINTL=1;
8383 HAVE_SINF=1;
8384 HAVE_SINL=1;
8385 HAVE_SINHF=1;
8386 HAVE_SQRTF=1;
8387 HAVE_SQRTL=1;
8388 HAVE_TANF=1;
8389 HAVE_TANL=1;
8390 HAVE_TANHF=1;
8391 HAVE_DECL_ACOSL=1;
8392 HAVE_DECL_ASINL=1;
8393 HAVE_DECL_ATANL=1;
8394 HAVE_DECL_CBRTF=1;
8395 HAVE_DECL_CBRTL=1;
8396 HAVE_DECL_CEILF=1;
8397 HAVE_DECL_CEILL=1;
8398 HAVE_DECL_COPYSIGNF=1;
8399 HAVE_DECL_COSL=1;
8400 HAVE_DECL_EXPL=1;
8401 HAVE_DECL_EXP2=1;
8402 HAVE_DECL_EXP2F=1;
8403 HAVE_DECL_EXP2L=1;
8404 HAVE_DECL_EXPM1L=1;
8405 HAVE_DECL_FLOORF=1;
8406 HAVE_DECL_FLOORL=1;
8407 HAVE_DECL_FREXPL=1;
8408 HAVE_DECL_LDEXPL=1;
8409 HAVE_DECL_LOGL=1;
8410 HAVE_DECL_LOG10L=1;
8411 HAVE_DECL_LOG2=1;
8412 HAVE_DECL_LOG2F=1;
8413 HAVE_DECL_LOG2L=1;
8414 HAVE_DECL_LOGB=1;
8415 HAVE_DECL_REMAINDER=1;
8416 HAVE_DECL_REMAINDERL=1;
8417 HAVE_DECL_RINTF=1;
8418 HAVE_DECL_ROUND=1;
8419 HAVE_DECL_ROUNDF=1;
8420 HAVE_DECL_ROUNDL=1;
8421 HAVE_DECL_SINL=1;
8422 HAVE_DECL_SQRTL=1;
8423 HAVE_DECL_TANL=1;
8424 HAVE_DECL_TRUNC=1;
8425 HAVE_DECL_TRUNCF=1;
8426 HAVE_DECL_TRUNCL=1;
8427 REPLACE_CBRTF=0;
8428 REPLACE_CBRTL=0;
8429 REPLACE_CEIL=0;
8430 REPLACE_CEILF=0;
8431 REPLACE_CEILL=0;
8432 REPLACE_EXPM1=0;
8433 REPLACE_EXPM1F=0;
8434 REPLACE_EXP2=0;
8435 REPLACE_EXP2L=0;
8436 REPLACE_FABSL=0;
8437 REPLACE_FLOOR=0;
8438 REPLACE_FLOORF=0;
8439 REPLACE_FLOORL=0;
8440 REPLACE_FMA=0;
8441 REPLACE_FMAF=0;
8442 REPLACE_FMAL=0;
8443 REPLACE_FMOD=0;
8444 REPLACE_FMODF=0;
8445 REPLACE_FMODL=0;
8446 REPLACE_FREXPF=0;
8447 REPLACE_FREXP=0;
8448 REPLACE_FREXPL=0;
8449 REPLACE_HUGE_VAL=0;
8450 REPLACE_HYPOT=0;
8451 REPLACE_HYPOTF=0;
8452 REPLACE_HYPOTL=0;
8453 REPLACE_ILOGB=0;
8454 REPLACE_ILOGBF=0;
8455 REPLACE_ISFINITE=0;
8456 REPLACE_ISINF=0;
8457 REPLACE_ISNAN=0;
8458 REPLACE_LDEXPL=0;
8459 REPLACE_LOG=0;
8460 REPLACE_LOGF=0;
8461 REPLACE_LOGL=0;
8462 REPLACE_LOG10=0;
8463 REPLACE_LOG10F=0;
8464 REPLACE_LOG10L=0;
8465 REPLACE_LOG1P=0;
8466 REPLACE_LOG1PF=0;
8467 REPLACE_LOG1PL=0;
8468 REPLACE_LOG2=0;
8469 REPLACE_LOG2F=0;
8470 REPLACE_LOG2L=0;
8471 REPLACE_LOGB=0;
8472 REPLACE_LOGBF=0;
8473 REPLACE_LOGBL=0;
8474 REPLACE_MODF=0;
8475 REPLACE_MODFF=0;
8476 REPLACE_MODFL=0;
8477 REPLACE_NAN=0;
8478 REPLACE_REMAINDER=0;
8479 REPLACE_REMAINDERF=0;
8480 REPLACE_REMAINDERL=0;
8481 REPLACE_ROUND=0;
8482 REPLACE_ROUNDF=0;
8483 REPLACE_ROUNDL=0;
8484 REPLACE_SIGNBIT=0;
8485 REPLACE_SIGNBIT_USING_GCC=0;
8486 REPLACE_SQRTL=0;
8487 REPLACE_TRUNC=0;
8488 REPLACE_TRUNCF=0;
8489 REPLACE_TRUNCL=0;
88b48903 8490
472fa5ee 8491
5e8754f9
SDJ
8492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
8493$as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
8494if ${gl_cv_func_frexp_no_libm+:} false; then :
7a6dbc2f 8495 $as_echo_n "(cached) " >&6
4a626d0a 8496else
88b48903 8497
5e8754f9 8498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7a6dbc2f
SDJ
8499/* end confdefs.h. */
8500#include <math.h>
5e8754f9 8501 double x;
7a6dbc2f
SDJ
8502int
8503main ()
8504{
5e8754f9 8505int e; return frexp (x, &e) > 0;
7a6dbc2f
SDJ
8506 ;
8507 return 0;
8508}
4a626d0a 8509_ACEOF
7a6dbc2f 8510if ac_fn_c_try_link "$LINENO"; then :
5e8754f9 8511 gl_cv_func_frexp_no_libm=yes
7a6dbc2f 8512else
5e8754f9 8513 gl_cv_func_frexp_no_libm=no
7a6dbc2f
SDJ
8514fi
8515rm -f core conftest.err conftest.$ac_objext \
8516 conftest$ac_exeext conftest.$ac_ext
88b48903 8517
7a6dbc2f 8518fi
5e8754f9
SDJ
8519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
8520$as_echo "$gl_cv_func_frexp_no_libm" >&6; }
88b48903 8521
472fa5ee 8522
5e8754f9
SDJ
8523 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
8524if test "x$ac_cv_have_decl_alarm" = xyes; then :
8525 ac_have_decl=1
7a6dbc2f 8526else
5e8754f9
SDJ
8527 ac_have_decl=0
8528fi
7a6dbc2f 8529
5e8754f9
SDJ
8530cat >>confdefs.h <<_ACEOF
8531#define HAVE_DECL_ALARM $ac_have_decl
8532_ACEOF
7a6dbc2f 8533
7a6dbc2f 8534
5e8754f9
SDJ
8535
8536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
8537$as_echo_n "checking whether long double and double are the same... " >&6; }
8538if ${gl_cv_long_double_equals_double+:} false; then :
8539 $as_echo_n "(cached) " >&6
88b48903
WN
8540else
8541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8542/* end confdefs.h. */
8543#include <float.h>
5e8754f9
SDJ
8544int
8545main ()
88b48903 8546{
5e8754f9
SDJ
8547typedef int check[sizeof (long double) == sizeof (double)
8548 && LDBL_MANT_DIG == DBL_MANT_DIG
8549 && LDBL_MAX_EXP == DBL_MAX_EXP
8550 && LDBL_MIN_EXP == DBL_MIN_EXP
8551 ? 1 : -1];
8552
8553 ;
8554 return 0;
88b48903
WN
8555}
8556_ACEOF
5e8754f9
SDJ
8557if ac_fn_c_try_compile "$LINENO"; then :
8558 gl_cv_long_double_equals_double=yes
88b48903 8559else
5e8754f9 8560 gl_cv_long_double_equals_double=no
88b48903 8561fi
5e8754f9 8562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
88b48903
WN
8563
8564fi
5e8754f9
SDJ
8565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
8566$as_echo "$gl_cv_long_double_equals_double" >&6; }
8567 if test $gl_cv_long_double_equals_double = yes; then
7a6dbc2f 8568
5e8754f9 8569$as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
7a6dbc2f 8570
5e8754f9
SDJ
8571 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
8572 else
8573 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
88b48903
WN
8574 fi
8575
8576
4a626d0a 8577
6ec2e0f5
SDJ
8578 GNULIB_FCHMODAT=0;
8579 GNULIB_FSTAT=0;
8580 GNULIB_FSTATAT=0;
8581 GNULIB_FUTIMENS=0;
8582 GNULIB_LCHMOD=0;
8583 GNULIB_LSTAT=0;
8584 GNULIB_MKDIRAT=0;
8585 GNULIB_MKFIFO=0;
8586 GNULIB_MKFIFOAT=0;
8587 GNULIB_MKNOD=0;
8588 GNULIB_MKNODAT=0;
8589 GNULIB_STAT=0;
8590 GNULIB_UTIMENSAT=0;
8591 HAVE_FCHMODAT=1;
8592 HAVE_FSTATAT=1;
8593 HAVE_FUTIMENS=1;
8594 HAVE_LCHMOD=1;
8595 HAVE_LSTAT=1;
8596 HAVE_MKDIRAT=1;
8597 HAVE_MKFIFO=1;
8598 HAVE_MKFIFOAT=1;
8599 HAVE_MKNOD=1;
8600 HAVE_MKNODAT=1;
8601 HAVE_UTIMENSAT=1;
8602 REPLACE_FSTAT=0;
8603 REPLACE_FSTATAT=0;
8604 REPLACE_FUTIMENS=0;
8605 REPLACE_LSTAT=0;
8606 REPLACE_MKDIR=0;
8607 REPLACE_MKFIFO=0;
8608 REPLACE_MKNOD=0;
8609 REPLACE_STAT=0;
8610 REPLACE_UTIMENSAT=0;
8611
8612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
8613$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
d0ac1c44 8614if ${ac_cv_header_stat_broken+:} false; then :
6ec2e0f5
SDJ
8615 $as_echo_n "(cached) " >&6
8616else
8617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8618/* end confdefs.h. */
8619#include <sys/types.h>
8620#include <sys/stat.h>
8621
8622#if defined S_ISBLK && defined S_IFDIR
8623extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
8624#endif
8625
8626#if defined S_ISBLK && defined S_IFCHR
8627extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
8628#endif
8629
8630#if defined S_ISLNK && defined S_IFREG
8631extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
8632#endif
8633
8634#if defined S_ISSOCK && defined S_IFREG
8635extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
8636#endif
4a626d0a 8637
4a626d0a
PA
8638_ACEOF
8639if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5
SDJ
8640 ac_cv_header_stat_broken=no
8641else
8642 ac_cv_header_stat_broken=yes
4a626d0a
PA
8643fi
8644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
8645fi
8646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
8647$as_echo "$ac_cv_header_stat_broken" >&6; }
8648if test $ac_cv_header_stat_broken = yes; then
8649
8650$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
4a626d0a
PA
8651
8652fi
4a626d0a 8653
4a626d0a
PA
8654
8655
4a626d0a
PA
8656
8657
472fa5ee
SM
8658
8659
8660
6ec2e0f5
SDJ
8661 case "$host_os" in
8662 mingw*)
8663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
8664$as_echo_n "checking for 64-bit off_t... " >&6; }
d0ac1c44 8665if ${gl_cv_type_off_t_64+:} false; then :
6ec2e0f5
SDJ
8666 $as_echo_n "(cached) " >&6
8667else
8668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8669/* end confdefs.h. */
8670#include <sys/types.h>
8671 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
8672
8673int
8674main ()
8675{
8676
8677 ;
8678 return 0;
8679}
8680_ACEOF
8681if ac_fn_c_try_compile "$LINENO"; then :
8682 gl_cv_type_off_t_64=yes
8683else
8684 gl_cv_type_off_t_64=no
8685fi
8686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4a626d0a 8687
6ec2e0f5
SDJ
8688fi
8689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
8690$as_echo "$gl_cv_type_off_t_64" >&6; }
8691 if test $gl_cv_type_off_t_64 = no; then
8692 WINDOWS_64_BIT_OFF_T=1
8693 else
7a6dbc2f
SDJ
8694 WINDOWS_64_BIT_OFF_T=0
8695 fi
5e8754f9 8696 WINDOWS_64_BIT_ST_SIZE=1
6ec2e0f5
SDJ
8697 ;;
8698 *)
8699 WINDOWS_64_BIT_OFF_T=0
8700 WINDOWS_64_BIT_ST_SIZE=0
8701 ;;
8702 esac
4a626d0a
PA
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
472fa5ee
SM
8715 :
8716
8717
8718
8719
8720
4a626d0a
PA
8721
8722
8723
8724 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 8725 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
4a626d0a 8726 else
6ec2e0f5
SDJ
8727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
8728$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
d0ac1c44 8729if ${gl_cv_next_sys_stat_h+:} false; then :
4a626d0a
PA
8730 $as_echo_n "(cached) " >&6
8731else
8732
6ec2e0f5 8733 if test $ac_cv_header_sys_stat_h = yes; then
4a626d0a
PA
8734
8735
8736
8737
8738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8739/* end confdefs.h. */
6ec2e0f5 8740#include <sys/stat.h>
4a626d0a
PA
8741_ACEOF
8742 case "$host_os" in
8743 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8744 *) gl_absname_cpp="$ac_cpp" ;;
8745 esac
8746
8747 case "$host_os" in
8748 mingw*)
8749 gl_dirsep_regex='[/\\]'
8750 ;;
8751 *)
8752 gl_dirsep_regex='\/'
8753 ;;
8754 esac
8755 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 8756 gl_header_literal_regex=`echo 'sys/stat.h' \
4a626d0a
PA
8757 | sed -e "$gl_make_literal_regex_sed"`
8758 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8759 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8760 s|^/[^/]|//&|
8761 p
8762 q
8763 }'
8764
6ec2e0f5 8765 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a
PA
8766 sed -n "$gl_absolute_header_sed"`
8767
6ec2e0f5
SDJ
8768 gl_header=$gl_cv_absolute_sys_stat_h
8769 gl_cv_next_sys_stat_h='"'$gl_header'"'
4a626d0a 8770 else
6ec2e0f5 8771 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
4a626d0a
PA
8772 fi
8773
8774
8775fi
6ec2e0f5
SDJ
8776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
8777$as_echo "$gl_cv_next_sys_stat_h" >&6; }
4a626d0a 8778 fi
6ec2e0f5 8779 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
4a626d0a
PA
8780
8781 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8782 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 8783 gl_next_as_first_directive='<'sys/stat.h'>'
4a626d0a
PA
8784 else
8785 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 8786 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
4a626d0a 8787 fi
6ec2e0f5 8788 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
4a626d0a
PA
8789
8790
8791
8792
8793
4a626d0a
PA
8794
8795
8796
8797
8798
4a626d0a 8799
5e8754f9 8800 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
4a626d0a 8801
5e8754f9 8802$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
4a626d0a 8803
5e8754f9 8804 fi
4a626d0a 8805
6ec2e0f5
SDJ
8806 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
8807 #include <sys/stat.h>
8808"
d0ac1c44 8809if test "x$ac_cv_type_nlink_t" = xyes; then :
6ec2e0f5
SDJ
8810
8811else
4a626d0a 8812
6ec2e0f5
SDJ
8813$as_echo "#define nlink_t int" >>confdefs.h
8814
8815fi
8816
8817
8818
5e8754f9
SDJ
8819 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
8820 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
8821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
8822$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
8823if eval \${$as_gl_Symbol+:} false; then :
8824 $as_echo_n "(cached) " >&6
8825else
8826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8827/* end confdefs.h. */
8828#include <sys/stat.h>
8829
8830int
8831main ()
8832{
8833#undef $gl_func
8834 (void) $gl_func;
8835 ;
8836 return 0;
8837}
8838_ACEOF
8839if ac_fn_c_try_compile "$LINENO"; then :
8840 eval "$as_gl_Symbol=yes"
8841else
8842 eval "$as_gl_Symbol=no"
8843fi
8844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8845fi
8846eval ac_res=\$$as_gl_Symbol
8847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8848$as_echo "$ac_res" >&6; }
8849 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
8850 cat >>confdefs.h <<_ACEOF
8851#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
8852_ACEOF
4a626d0a 8853
5e8754f9
SDJ
8854 eval ac_cv_have_decl_$gl_func=yes
8855fi
8856 done
6ec2e0f5
SDJ
8857
8858
8859
5e8754f9 8860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
6ec2e0f5 8861$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
d0ac1c44 8862if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
4a626d0a
PA
8863 $as_echo_n "(cached) " >&6
8864else
6ec2e0f5
SDJ
8865 rm -f conftest.sym conftest.file
8866 echo >conftest.file
8867 if test "$cross_compiling" = yes; then :
8868 case "$host_os" in
5e8754f9 8869 *-gnu*)
6ec2e0f5
SDJ
8870 # Guess yes on glibc systems.
8871 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
8872 *)
8873 # If we don't know, assume the worst.
8874 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
8875 esac
4a626d0a 8876
6ec2e0f5
SDJ
8877else
8878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8879/* end confdefs.h. */
8880$ac_includes_default
4a626d0a
PA
8881int
8882main ()
8883{
6ec2e0f5
SDJ
8884struct stat sbuf;
8885 if (symlink ("conftest.file", "conftest.sym") != 0)
8886 return 1;
8887 /* Linux will dereference the symlink and fail, as required by
8888 POSIX. That is better in the sense that it means we will not
8889 have to compile and use the lstat wrapper. */
8890 return lstat ("conftest.sym/", &sbuf) == 0;
4a626d0a
PA
8891
8892 ;
8893 return 0;
8894}
8895_ACEOF
6ec2e0f5
SDJ
8896if ac_fn_c_try_run "$LINENO"; then :
8897 gl_cv_func_lstat_dereferences_slashed_symlink=yes
4a626d0a 8898else
6ec2e0f5
SDJ
8899 gl_cv_func_lstat_dereferences_slashed_symlink=no
8900fi
8901rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8902 conftest.$ac_objext conftest.beam conftest.$ac_ext
4a626d0a 8903fi
6ec2e0f5
SDJ
8904
8905 rm -f conftest.sym conftest.file
4a626d0a
PA
8906
8907fi
6ec2e0f5
SDJ
8908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
8909$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
8910 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
8911 *yes)
4a626d0a 8912
6ec2e0f5
SDJ
8913cat >>confdefs.h <<_ACEOF
8914#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
8915_ACEOF
4a626d0a 8916
6ec2e0f5
SDJ
8917 ;;
8918 esac
8919
8920
8921
8922
8923
472fa5ee
SM
8924
8925
8926
8927 :
8928
8929
8930
8931
8932
6ec2e0f5
SDJ
8933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
8934$as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
d0ac1c44 8935if ${gl_cv_func_getcwd_null+:} false; then :
4a626d0a 8936 $as_echo_n "(cached) " >&6
6ec2e0f5
SDJ
8937else
8938 if test "$cross_compiling" = yes; then :
8939 case "$host_os" in
5e8754f9
SDJ
8940 # Guess yes on glibc systems.
8941 *-gnu*) gl_cv_func_getcwd_null="guessing yes";;
8942 # Guess yes on Cygwin.
8943 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
8944 # If we don't know, assume the worst.
8945 *) gl_cv_func_getcwd_null="guessing no";;
6ec2e0f5
SDJ
8946 esac
8947
4a626d0a
PA
8948else
8949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8950/* end confdefs.h. */
8951
6ec2e0f5
SDJ
8952# include <stdlib.h>
8953# if HAVE_UNISTD_H
8954# include <unistd.h>
8955# else /* on Windows with MSVC */
8956# include <direct.h>
8957# endif
8958# ifndef getcwd
8959 char *getcwd ();
8960# endif
8961
8962int
8963main ()
8964{
8965
5e8754f9 8966#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6ec2e0f5
SDJ
8967/* mingw cwd does not start with '/', but getcwd does allocate.
8968 However, mingw fails to honor non-zero size. */
8969#else
8970 if (chdir ("/") != 0)
8971 return 1;
8972 else
8973 {
8974 char *f = getcwd (NULL, 0);
8975 if (! f)
8976 return 2;
8977 if (f[0] != '/')
5e8754f9 8978 return 3;
6ec2e0f5 8979 if (f[1] != '\0')
5e8754f9 8980 return 4;
6ec2e0f5
SDJ
8981 free (f);
8982 return 0;
8983 }
4a626d0a 8984#endif
4a626d0a 8985
6ec2e0f5
SDJ
8986 ;
8987 return 0;
8988}
8989_ACEOF
8990if ac_fn_c_try_run "$LINENO"; then :
8991 gl_cv_func_getcwd_null=yes
8992else
8993 gl_cv_func_getcwd_null=no
8994fi
8995rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8996 conftest.$ac_objext conftest.beam conftest.$ac_ext
8997fi
8998
8999fi
9000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
9001$as_echo "$gl_cv_func_getcwd_null" >&6; }
9002
9003
9004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
9005$as_echo_n "checking for getcwd with POSIX signature... " >&6; }
d0ac1c44 9006if ${gl_cv_func_getcwd_posix_signature+:} false; then :
6ec2e0f5
SDJ
9007 $as_echo_n "(cached) " >&6
9008else
9009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9010/* end confdefs.h. */
9011#include <unistd.h>
4a626d0a
PA
9012int
9013main ()
9014{
6ec2e0f5
SDJ
9015extern
9016 #ifdef __cplusplus
9017 "C"
9018 #endif
9019 char *getcwd (char *, size_t);
9020
4a626d0a
PA
9021 ;
9022 return 0;
9023}
6ec2e0f5 9024
4a626d0a
PA
9025_ACEOF
9026if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 9027 gl_cv_func_getcwd_posix_signature=yes
4a626d0a 9028else
6ec2e0f5 9029 gl_cv_func_getcwd_posix_signature=no
4a626d0a
PA
9030fi
9031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5 9032
4a626d0a 9033fi
6ec2e0f5
SDJ
9034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
9035$as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
9036
472fa5ee
SM
9037
9038 ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
d0ac1c44 9039if test "x$ac_cv_have_decl_getcwd" = xyes; then :
6ec2e0f5
SDJ
9040 ac_have_decl=1
9041else
9042 ac_have_decl=0
9043fi
9044
9045cat >>confdefs.h <<_ACEOF
9046#define HAVE_DECL_GETCWD $ac_have_decl
4a626d0a
PA
9047_ACEOF
9048
6ec2e0f5
SDJ
9049
9050
472fa5ee
SM
9051
9052
9053
9054
9055
9056 ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
d0ac1c44 9057if test "x$ac_cv_have_decl_getdtablesize" = xyes; then :
6ec2e0f5
SDJ
9058 ac_have_decl=1
9059else
9060 ac_have_decl=0
4a626d0a 9061fi
4a626d0a 9062
6ec2e0f5
SDJ
9063cat >>confdefs.h <<_ACEOF
9064#define HAVE_DECL_GETDTABLESIZE $ac_have_decl
9065_ACEOF
9066
472fa5ee
SM
9067
9068
9069 ac_fn_c_check_decl "$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default"
d0ac1c44 9070if test "x$ac_cv_have_decl_getlogin_r" = xyes; then :
6ec2e0f5
SDJ
9071 ac_have_decl=1
9072else
9073 ac_have_decl=0
9074fi
9075
9076cat >>confdefs.h <<_ACEOF
9077#define HAVE_DECL_GETLOGIN_R $ac_have_decl
9078_ACEOF
9079
9080
9081
472fa5ee
SM
9082
9083
9084
9085
9086
9087 ac_fn_c_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default"
d0ac1c44 9088if test "x$ac_cv_have_decl_getlogin" = xyes; then :
6ec2e0f5
SDJ
9089 ac_have_decl=1
9090else
9091 ac_have_decl=0
9092fi
9093
9094cat >>confdefs.h <<_ACEOF
9095#define HAVE_DECL_GETLOGIN $ac_have_decl
9096_ACEOF
9097
9098
9099
9100
7a6dbc2f
SDJ
9101
9102
6ec2e0f5 9103
472fa5ee
SM
9104
9105
9106
9107
9108
6ec2e0f5
SDJ
9109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
9110$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
d0ac1c44 9111if ${ac_cv_c_restrict+:} false; then :
6ec2e0f5
SDJ
9112 $as_echo_n "(cached) " >&6
9113else
9114 ac_cv_c_restrict=no
9115 # The order here caters to the fact that C++ does not require restrict.
9116 for ac_kw in __restrict __restrict__ _Restrict restrict; do
9117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9118/* end confdefs.h. */
9119typedef int *int_ptr;
5e8754f9
SDJ
9120 int foo (int_ptr $ac_kw ip) { return ip[0]; }
9121 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
9122 int bar (int ip[$ac_kw]) { return ip[0]; }
6ec2e0f5
SDJ
9123
9124int
9125main ()
9126{
9127int s[1];
5e8754f9
SDJ
9128 int *$ac_kw t = s;
9129 t[0] = 0;
9130 return foo (t) + bar (t);
6ec2e0f5
SDJ
9131
9132 ;
9133 return 0;
9134}
9135_ACEOF
9136if ac_fn_c_try_compile "$LINENO"; then :
9137 ac_cv_c_restrict=$ac_kw
9138fi
9139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9140 test "$ac_cv_c_restrict" != no && break
9141 done
9142
9143fi
9144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
9145$as_echo "$ac_cv_c_restrict" >&6; }
9146
9147 case $ac_cv_c_restrict in
9148 restrict) ;;
9149 no) $as_echo "#define restrict /**/" >>confdefs.h
9150 ;;
9151 *) cat >>confdefs.h <<_ACEOF
9152#define restrict $ac_cv_c_restrict
9153_ACEOF
9154 ;;
9155 esac
4a626d0a
PA
9156
9157
5e8754f9
SDJ
9158 GNULIB_GETTIMEOFDAY=0;
9159 HAVE_GETTIMEOFDAY=1;
9160 HAVE_STRUCT_TIMEVAL=1;
9161 HAVE_SYS_TIME_H=1;
9162 HAVE_TIMEZONE_T=0;
9163 REPLACE_GETTIMEOFDAY=0;
9164 REPLACE_STRUCT_TIMEVAL=0;
9165
9166
4a626d0a
PA
9167
9168
88b48903 9169
49e4877c
PA
9170
9171
9172
9173
9174
472fa5ee
SM
9175 :
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187 :
9188
9189
49e4877c
PA
9190
9191
9192
9193
9194
9195
9196 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 9197 gl_cv_next_sys_time_h='<'sys/time.h'>'
49e4877c 9198 else
6ec2e0f5
SDJ
9199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
9200$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
d0ac1c44 9201if ${gl_cv_next_sys_time_h+:} false; then :
49e4877c
PA
9202 $as_echo_n "(cached) " >&6
9203else
9204
6ec2e0f5 9205 if test $ac_cv_header_sys_time_h = yes; then
49e4877c
PA
9206
9207
9208
9209
9210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9211/* end confdefs.h. */
6ec2e0f5 9212#include <sys/time.h>
49e4877c
PA
9213_ACEOF
9214 case "$host_os" in
9215 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9216 *) gl_absname_cpp="$ac_cpp" ;;
9217 esac
9218
9219 case "$host_os" in
9220 mingw*)
9221 gl_dirsep_regex='[/\\]'
9222 ;;
9223 *)
9224 gl_dirsep_regex='\/'
9225 ;;
9226 esac
9227 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 9228 gl_header_literal_regex=`echo 'sys/time.h' \
49e4877c
PA
9229 | sed -e "$gl_make_literal_regex_sed"`
9230 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9231 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9232 s|^/[^/]|//&|
9233 p
9234 q
9235 }'
9236
6ec2e0f5 9237 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
49e4877c
PA
9238 sed -n "$gl_absolute_header_sed"`
9239
6ec2e0f5
SDJ
9240 gl_header=$gl_cv_absolute_sys_time_h
9241 gl_cv_next_sys_time_h='"'$gl_header'"'
49e4877c 9242 else
6ec2e0f5 9243 gl_cv_next_sys_time_h='<'sys/time.h'>'
49e4877c
PA
9244 fi
9245
9246
9247fi
6ec2e0f5
SDJ
9248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
9249$as_echo "$gl_cv_next_sys_time_h" >&6; }
49e4877c 9250 fi
6ec2e0f5 9251 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
49e4877c
PA
9252
9253 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9254 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 9255 gl_next_as_first_directive='<'sys/time.h'>'
49e4877c
PA
9256 else
9257 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 9258 gl_next_as_first_directive=$gl_cv_next_sys_time_h
49e4877c 9259 fi
6ec2e0f5 9260 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
49e4877c
PA
9261
9262
9263
9264
9265
6ec2e0f5
SDJ
9266 if test $ac_cv_header_sys_time_h != yes; then
9267 HAVE_SYS_TIME_H=0
9268 fi
9269
9270
9271
9272
9273
472fa5ee
SM
9274 :
9275
9276
9277
9278
9279
6ec2e0f5
SDJ
9280 if test $ac_cv_header_sys_socket_h != yes; then
9281 for ac_header in winsock2.h
9282do :
9283 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
d0ac1c44 9284if test "x$ac_cv_header_winsock2_h" = xyes; then :
6ec2e0f5
SDJ
9285 cat >>confdefs.h <<_ACEOF
9286#define HAVE_WINSOCK2_H 1
9287_ACEOF
9288
9289fi
9290
9291done
9292
9293 fi
9294 if test "$ac_cv_header_winsock2_h" = yes; then
9295 HAVE_WINSOCK2_H=1
9296 UNISTD_H_HAVE_WINSOCK2_H=1
9297 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
9298 else
9299 HAVE_WINSOCK2_H=0
9300 fi
9301
9302
9303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
9304$as_echo_n "checking for struct timeval... " >&6; }
d0ac1c44 9305if ${gl_cv_sys_struct_timeval+:} false; then :
6ec2e0f5
SDJ
9306 $as_echo_n "(cached) " >&6
9307else
9308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9309/* end confdefs.h. */
9310#if HAVE_SYS_TIME_H
9311 #include <sys/time.h>
9312 #endif
9313 #include <time.h>
9314 #if HAVE_WINSOCK2_H
9315 # include <winsock2.h>
9316 #endif
9317
49e4877c
PA
9318int
9319main ()
9320{
6ec2e0f5 9321static struct timeval x; x.tv_sec = x.tv_usec;
49e4877c
PA
9322 ;
9323 return 0;
9324}
9325_ACEOF
9326if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 9327 gl_cv_sys_struct_timeval=yes
49e4877c 9328else
6ec2e0f5 9329 gl_cv_sys_struct_timeval=no
49e4877c
PA
9330fi
9331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49e4877c 9332
49e4877c 9333fi
6ec2e0f5
SDJ
9334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
9335$as_echo "$gl_cv_sys_struct_timeval" >&6; }
9336 if test $gl_cv_sys_struct_timeval != yes; then
9337 HAVE_STRUCT_TIMEVAL=0
9338 else
9339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
9340$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
d0ac1c44 9341if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
8690e634
JK
9342 $as_echo_n "(cached) " >&6
9343else
6ec2e0f5 9344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 9345/* end confdefs.h. */
6ec2e0f5
SDJ
9346#if HAVE_SYS_TIME_H
9347 #include <sys/time.h>
9348 #endif
9349 #include <time.h>
9350 #if HAVE_WINSOCK2_H
9351 # include <winsock2.h>
9352 #endif
8690e634 9353
8690e634
JK
9354int
9355main ()
9356{
6ec2e0f5
SDJ
9357static struct timeval x;
9358 typedef int verify_tv_sec_type[
9359 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
9360 ];
9361
8690e634
JK
9362 ;
9363 return 0;
9364}
8690e634 9365_ACEOF
6ec2e0f5
SDJ
9366if ac_fn_c_try_compile "$LINENO"; then :
9367 gl_cv_sys_struct_timeval_tv_sec=yes
8690e634 9368else
6ec2e0f5 9369 gl_cv_sys_struct_timeval_tv_sec=no
8690e634 9370fi
6ec2e0f5 9371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 9372
6ec2e0f5
SDJ
9373fi
9374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
9375$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
9376 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
9377 REPLACE_STRUCT_TIMEVAL=1
9378 fi
8690e634
JK
9379 fi
9380
9381
5e8754f9
SDJ
9382 for gl_func in gettimeofday; do
9383 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
9384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
9385$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
9386if eval \${$as_gl_Symbol+:} false; then :
8690e634 9387 $as_echo_n "(cached) " >&6
8690e634
JK
9388else
9389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9390/* end confdefs.h. */
7a6dbc2f 9391
5e8754f9
SDJ
9392#if HAVE_SYS_TIME_H
9393# include <sys/time.h>
9394#endif
9395#include <time.h>
8690e634 9396
5e8754f9
SDJ
9397int
9398main ()
9399{
9400#undef $gl_func
9401 (void) $gl_func;
9402 ;
9403 return 0;
9404}
9405_ACEOF
9406if ac_fn_c_try_compile "$LINENO"; then :
9407 eval "$as_gl_Symbol=yes"
7a6dbc2f 9408else
5e8754f9
SDJ
9409 eval "$as_gl_Symbol=no"
9410fi
9411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 9412fi
5e8754f9
SDJ
9413eval ac_res=\$$as_gl_Symbol
9414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9415$as_echo "$ac_res" >&6; }
9416 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
9417 cat >>confdefs.h <<_ACEOF
9418#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
9419_ACEOF
7a6dbc2f 9420
5e8754f9
SDJ
9421 eval ac_cv_have_decl_$gl_func=yes
9422fi
9423 done
8690e634 9424
8690e634 9425
8690e634
JK
9426
9427
9428
9429
9430
9431
88b48903 9432
8690e634 9433
8690e634 9434
8690e634
JK
9435
9436
9437
9438
9439
49e4877c
PA
9440
9441
8690e634
JK
9442
9443
472fa5ee
SM
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456 :
9457
9458
9459
9460
9461
8690e634
JK
9462
9463
9464
9465 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 9466 gl_cv_next_limits_h='<'limits.h'>'
8690e634 9467 else
6ec2e0f5
SDJ
9468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
9469$as_echo_n "checking absolute name of <limits.h>... " >&6; }
d0ac1c44 9470if ${gl_cv_next_limits_h+:} false; then :
8690e634
JK
9471 $as_echo_n "(cached) " >&6
9472else
9473
6ec2e0f5 9474 if test $ac_cv_header_limits_h = yes; then
8690e634
JK
9475
9476
4a626d0a
PA
9477
9478
9479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 9480/* end confdefs.h. */
6ec2e0f5 9481#include <limits.h>
8690e634 9482_ACEOF
4a626d0a
PA
9483 case "$host_os" in
9484 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9485 *) gl_absname_cpp="$ac_cpp" ;;
9486 esac
9487
9488 case "$host_os" in
9489 mingw*)
9490 gl_dirsep_regex='[/\\]'
9491 ;;
9492 *)
9493 gl_dirsep_regex='\/'
9494 ;;
9495 esac
9496 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 9497 gl_header_literal_regex=`echo 'limits.h' \
4a626d0a
PA
9498 | sed -e "$gl_make_literal_regex_sed"`
9499 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9500 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9501 s|^/[^/]|//&|
9502 p
9503 q
9504 }'
9505
6ec2e0f5 9506 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a
PA
9507 sed -n "$gl_absolute_header_sed"`
9508
6ec2e0f5
SDJ
9509 gl_header=$gl_cv_absolute_limits_h
9510 gl_cv_next_limits_h='"'$gl_header'"'
8690e634 9511 else
6ec2e0f5 9512 gl_cv_next_limits_h='<'limits.h'>'
8690e634
JK
9513 fi
9514
5e8754f9 9515
7a6dbc2f 9516fi
5e8754f9
SDJ
9517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
9518$as_echo "$gl_cv_next_limits_h" >&6; }
9519 fi
9520 NEXT_LIMITS_H=$gl_cv_next_limits_h
9521
9522 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9523 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9524 gl_next_as_first_directive='<'limits.h'>'
9525 else
9526 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9527 gl_next_as_first_directive=$gl_cv_next_limits_h
9528 fi
9529 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
7a6dbc2f 9530
7a6dbc2f
SDJ
9531
9532
5e8754f9
SDJ
9533
9534
9535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has ULLONG_WIDTH etc." >&5
9536$as_echo_n "checking whether limits.h has ULLONG_WIDTH etc.... " >&6; }
9537if ${gl_cv_header_limits_width+:} false; then :
6ec2e0f5
SDJ
9538 $as_echo_n "(cached) " >&6
9539else
9540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9541/* end confdefs.h. */
5e8754f9
SDJ
9542#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
9543 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
9544 #endif
9545 #include <limits.h>
9546 int ullw = ULLONG_WIDTH;
6ec2e0f5
SDJ
9547int
9548main ()
9549{
9550
9551 ;
9552 return 0;
9553}
9554_ACEOF
9555if ac_fn_c_try_compile "$LINENO"; then :
5e8754f9 9556 gl_cv_header_limits_width=yes
6ec2e0f5 9557else
5e8754f9 9558 gl_cv_header_limits_width=no
6ec2e0f5
SDJ
9559fi
9560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9561fi
5e8754f9
SDJ
9562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
9563$as_echo "$gl_cv_header_limits_width" >&6; }
9564 if test "$gl_cv_header_limits_width" = yes; then
9565 LIMITS_H=
8690e634 9566 else
5e8754f9 9567 LIMITS_H=limits.h
8690e634
JK
9568 fi
9569
5e8754f9
SDJ
9570 if test -n "$LIMITS_H"; then
9571 GL_GENERATE_LIMITS_H_TRUE=
9572 GL_GENERATE_LIMITS_H_FALSE='#'
9573else
9574 GL_GENERATE_LIMITS_H_TRUE='#'
9575 GL_GENERATE_LIMITS_H_FALSE=
9576fi
9577
8690e634 9578
6ec2e0f5
SDJ
9579
9580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
9581$as_echo_n "checking for unsigned long long int... " >&6; }
d0ac1c44 9582if ${ac_cv_type_unsigned_long_long_int+:} false; then :
8690e634
JK
9583 $as_echo_n "(cached) " >&6
9584else
6ec2e0f5
SDJ
9585 ac_cv_type_unsigned_long_long_int=yes
9586 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
8690e634
JK
9587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9588/* end confdefs.h. */
9589
6ec2e0f5
SDJ
9590 /* For now, do not test the preprocessor; as of 2007 there are too many
9591 implementations with broken preprocessors. Perhaps this can
9592 be revisited in 2012. In the meantime, code should not expect
9593 #if to work with literals wider than 32 bits. */
9594 /* Test literals. */
9595 long long int ll = 9223372036854775807ll;
9596 long long int nll = -9223372036854775807LL;
9597 unsigned long long int ull = 18446744073709551615ULL;
9598 /* Test constant expressions. */
9599 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
9600 ? 1 : -1)];
9601 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
9602 ? 1 : -1)];
9603 int i = 63;
9604int
9605main ()
9606{
9607/* Test availability of runtime routines for shift and division. */
9608 long long int llmax = 9223372036854775807ll;
9609 unsigned long long int ullmax = 18446744073709551615ull;
9610 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
9611 | (llmax / ll) | (llmax % ll)
9612 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
9613 | (ullmax / ull) | (ullmax % ull));
9614 ;
9615 return 0;
9616}
8690e634 9617
6ec2e0f5
SDJ
9618_ACEOF
9619if ac_fn_c_try_link "$LINENO"; then :
8690e634 9620
6ec2e0f5
SDJ
9621else
9622 ac_cv_type_unsigned_long_long_int=no
9623fi
9624rm -f core conftest.err conftest.$ac_objext \
9625 conftest$ac_exeext conftest.$ac_ext
9626 fi
9627fi
9628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
9629$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
9630 if test $ac_cv_type_unsigned_long_long_int = yes; then
8690e634 9631
6ec2e0f5 9632$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
8690e634 9633
6ec2e0f5 9634 fi
8690e634 9635
8690e634 9636
8690e634 9637
6ec2e0f5
SDJ
9638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
9639$as_echo_n "checking for long long int... " >&6; }
d0ac1c44 9640if ${ac_cv_type_long_long_int+:} false; then :
6ec2e0f5
SDJ
9641 $as_echo_n "(cached) " >&6
9642else
9643 ac_cv_type_long_long_int=yes
9644 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
9645 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
9646 if test $ac_cv_type_long_long_int = yes; then
9647 if test "$cross_compiling" = yes; then :
9648 :
8690e634
JK
9649else
9650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9651/* end confdefs.h. */
6ec2e0f5
SDJ
9652#include <limits.h>
9653 #ifndef LLONG_MAX
9654 # define HALF \
9655 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
9656 # define LLONG_MAX (HALF - 1 + HALF)
9657 #endif
8690e634
JK
9658int
9659main ()
9660{
6ec2e0f5
SDJ
9661long long int n = 1;
9662 int i;
9663 for (i = 0; ; i++)
9664 {
9665 long long int m = n << i;
9666 if (m >> i != n)
9667 return 1;
9668 if (LLONG_MAX / 2 < m)
9669 break;
9670 }
9671 return 0;
8690e634
JK
9672 ;
9673 return 0;
9674}
9675_ACEOF
9676if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5
SDJ
9677
9678else
9679 ac_cv_type_long_long_int=no
8690e634
JK
9680fi
9681rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9682 conftest.$ac_objext conftest.beam conftest.$ac_ext
9683fi
9684
6ec2e0f5
SDJ
9685 fi
9686 fi
8690e634 9687fi
6ec2e0f5
SDJ
9688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
9689$as_echo "$ac_cv_type_long_long_int" >&6; }
9690 if test $ac_cv_type_long_long_int = yes; then
49e4877c 9691
6ec2e0f5 9692$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
49e4877c 9693
6ec2e0f5 9694 fi
49e4877c 9695
49e4877c
PA
9696
9697
49e4877c
PA
9698
9699
49e4877c 9700
472fa5ee
SM
9701
9702
9703
9704
9705
9706
6ec2e0f5
SDJ
9707 gl_cv_c_multiarch=no
9708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9709/* end confdefs.h. */
9710#ifndef __APPLE_CC__
9711 not a universal capable compiler
9712 #endif
9713 typedef int dummy;
49e4877c 9714
49e4877c
PA
9715_ACEOF
9716if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5
SDJ
9717
9718 arch=
9719 prev=
9720 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
9721 if test -n "$prev"; then
9722 case $word in
9723 i?86 | x86_64 | ppc | ppc64)
9724 if test -z "$arch" || test "$arch" = "$word"; then
9725 arch="$word"
9726 else
9727 gl_cv_c_multiarch=yes
9728 fi
9729 ;;
9730 esac
9731 prev=
9732 else
9733 if test "x$word" = "x-arch"; then
9734 prev=arch
9735 fi
9736 fi
9737 done
9738
49e4877c
PA
9739fi
9740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
9741 if test $gl_cv_c_multiarch = yes; then
9742 APPLE_UNIVERSAL_BUILD=1
9743 else
9744 APPLE_UNIVERSAL_BUILD=0
9745 fi
49e4877c 9746
49e4877c 9747
49e4877c
PA
9748
9749
49e4877c 9750
49e4877c 9751
49e4877c 9752
6ec2e0f5
SDJ
9753 if test $ac_cv_type_long_long_int = yes; then
9754 HAVE_LONG_LONG_INT=1
9755 else
9756 HAVE_LONG_LONG_INT=0
9757 fi
49e4877c 9758
49e4877c 9759
6ec2e0f5
SDJ
9760 if test $ac_cv_type_unsigned_long_long_int = yes; then
9761 HAVE_UNSIGNED_LONG_LONG_INT=1
8690e634 9762 else
6ec2e0f5
SDJ
9763 HAVE_UNSIGNED_LONG_LONG_INT=0
9764 fi
8690e634 9765
8690e634 9766
8690e634 9767
472fa5ee
SM
9768 :
9769
9770
9771
9772
9773
6ec2e0f5
SDJ
9774 if test $ac_cv_header_wchar_h = yes; then
9775 HAVE_WCHAR_H=1
9776 else
9777 HAVE_WCHAR_H=0
9778 fi
8690e634
JK
9779
9780
6ec2e0f5
SDJ
9781 if test $ac_cv_header_inttypes_h = yes; then
9782 HAVE_INTTYPES_H=1
9783 else
9784 HAVE_INTTYPES_H=0
9785 fi
8690e634
JK
9786
9787
6ec2e0f5
SDJ
9788 if test $ac_cv_header_sys_types_h = yes; then
9789 HAVE_SYS_TYPES_H=1
9790 else
9791 HAVE_SYS_TYPES_H=0
9792 fi
8690e634 9793
8690e634 9794
8690e634 9795
8690e634 9796
8690e634 9797
8690e634
JK
9798
9799
8690e634 9800
472fa5ee
SM
9801 :
9802
9803
9804
9805
9806
8690e634 9807
6ec2e0f5
SDJ
9808
9809
9810 if test $gl_cv_have_include_next = yes; then
9811 gl_cv_next_stdint_h='<'stdint.h'>'
9812 else
9813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
9814$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
d0ac1c44 9815if ${gl_cv_next_stdint_h+:} false; then :
8690e634
JK
9816 $as_echo_n "(cached) " >&6
9817else
8690e634 9818
6ec2e0f5 9819 if test $ac_cv_header_stdint_h = yes; then
8690e634 9820
8690e634 9821
8690e634 9822
6ec2e0f5
SDJ
9823
9824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9825/* end confdefs.h. */
9826#include <stdint.h>
8690e634 9827_ACEOF
6ec2e0f5
SDJ
9828 case "$host_os" in
9829 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9830 *) gl_absname_cpp="$ac_cpp" ;;
9831 esac
8690e634 9832
6ec2e0f5
SDJ
9833 case "$host_os" in
9834 mingw*)
9835 gl_dirsep_regex='[/\\]'
9836 ;;
9837 *)
9838 gl_dirsep_regex='\/'
9839 ;;
9840 esac
9841 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9842 gl_header_literal_regex=`echo 'stdint.h' \
9843 | sed -e "$gl_make_literal_regex_sed"`
9844 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9845 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9846 s|^/[^/]|//&|
9847 p
9848 q
9849 }'
9850
9851 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9852 sed -n "$gl_absolute_header_sed"`
9853
9854 gl_header=$gl_cv_absolute_stdint_h
9855 gl_cv_next_stdint_h='"'$gl_header'"'
9856 else
9857 gl_cv_next_stdint_h='<'stdint.h'>'
9858 fi
9859
9860
9861fi
9862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
9863$as_echo "$gl_cv_next_stdint_h" >&6; }
9864 fi
9865 NEXT_STDINT_H=$gl_cv_next_stdint_h
9866
9867 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9868 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9869 gl_next_as_first_directive='<'stdint.h'>'
9870 else
9871 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9872 gl_next_as_first_directive=$gl_cv_next_stdint_h
9873 fi
9874 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
8690e634
JK
9875
9876
9877
9878
6ec2e0f5
SDJ
9879 if test $ac_cv_header_stdint_h = yes; then
9880 HAVE_STDINT_H=1
9881 else
9882 HAVE_STDINT_H=0
9883 fi
9884
9885
9886 if test $ac_cv_header_stdint_h = yes; then
9887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
9888$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
d0ac1c44 9889if ${gl_cv_header_working_stdint_h+:} false; then :
8690e634
JK
9890 $as_echo_n "(cached) " >&6
9891else
6ec2e0f5
SDJ
9892 gl_cv_header_working_stdint_h=no
9893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
9894/* end confdefs.h. */
9895
6ec2e0f5
SDJ
9896
9897#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
9898#define __STDC_CONSTANT_MACROS 1
9899#define __STDC_LIMIT_MACROS 1
9900#include <stdint.h>
9901/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
9902#if !(defined WCHAR_MIN && defined WCHAR_MAX)
9903#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
9904#endif
9905
9906
8690e634
JK
9907 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9908 included before <wchar.h>. */
9909 #include <stddef.h>
9910 #include <signal.h>
9911 #if HAVE_WCHAR_H
9912 # include <stdio.h>
9913 # include <time.h>
9914 # include <wchar.h>
9915 #endif
9916
8690e634 9917
6ec2e0f5
SDJ
9918#ifdef INT8_MAX
9919int8_t a1 = INT8_MAX;
9920int8_t a1min = INT8_MIN;
9921#endif
9922#ifdef INT16_MAX
9923int16_t a2 = INT16_MAX;
9924int16_t a2min = INT16_MIN;
9925#endif
9926#ifdef INT32_MAX
9927int32_t a3 = INT32_MAX;
9928int32_t a3min = INT32_MIN;
9929#endif
9930#ifdef INT64_MAX
9931int64_t a4 = INT64_MAX;
9932int64_t a4min = INT64_MIN;
9933#endif
9934#ifdef UINT8_MAX
9935uint8_t b1 = UINT8_MAX;
9936#else
9937typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
9938#endif
9939#ifdef UINT16_MAX
9940uint16_t b2 = UINT16_MAX;
9941#endif
9942#ifdef UINT32_MAX
9943uint32_t b3 = UINT32_MAX;
9944#endif
9945#ifdef UINT64_MAX
9946uint64_t b4 = UINT64_MAX;
9947#endif
9948int_least8_t c1 = INT8_C (0x7f);
9949int_least8_t c1max = INT_LEAST8_MAX;
9950int_least8_t c1min = INT_LEAST8_MIN;
9951int_least16_t c2 = INT16_C (0x7fff);
9952int_least16_t c2max = INT_LEAST16_MAX;
9953int_least16_t c2min = INT_LEAST16_MIN;
9954int_least32_t c3 = INT32_C (0x7fffffff);
9955int_least32_t c3max = INT_LEAST32_MAX;
9956int_least32_t c3min = INT_LEAST32_MIN;
9957int_least64_t c4 = INT64_C (0x7fffffffffffffff);
9958int_least64_t c4max = INT_LEAST64_MAX;
9959int_least64_t c4min = INT_LEAST64_MIN;
9960uint_least8_t d1 = UINT8_C (0xff);
9961uint_least8_t d1max = UINT_LEAST8_MAX;
9962uint_least16_t d2 = UINT16_C (0xffff);
9963uint_least16_t d2max = UINT_LEAST16_MAX;
9964uint_least32_t d3 = UINT32_C (0xffffffff);
9965uint_least32_t d3max = UINT_LEAST32_MAX;
9966uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
9967uint_least64_t d4max = UINT_LEAST64_MAX;
9968int_fast8_t e1 = INT_FAST8_MAX;
9969int_fast8_t e1min = INT_FAST8_MIN;
9970int_fast16_t e2 = INT_FAST16_MAX;
9971int_fast16_t e2min = INT_FAST16_MIN;
9972int_fast32_t e3 = INT_FAST32_MAX;
9973int_fast32_t e3min = INT_FAST32_MIN;
9974int_fast64_t e4 = INT_FAST64_MAX;
9975int_fast64_t e4min = INT_FAST64_MIN;
9976uint_fast8_t f1 = UINT_FAST8_MAX;
9977uint_fast16_t f2 = UINT_FAST16_MAX;
9978uint_fast32_t f3 = UINT_FAST32_MAX;
9979uint_fast64_t f4 = UINT_FAST64_MAX;
9980#ifdef INTPTR_MAX
9981intptr_t g = INTPTR_MAX;
9982intptr_t gmin = INTPTR_MIN;
9983#endif
9984#ifdef UINTPTR_MAX
9985uintptr_t h = UINTPTR_MAX;
9986#endif
9987intmax_t i = INTMAX_MAX;
9988uintmax_t j = UINTMAX_MAX;
8690e634 9989
6ec2e0f5
SDJ
9990/* Check that SIZE_MAX has the correct type, if possible. */
9991#if 201112 <= __STDC_VERSION__
9992int k = _Generic (SIZE_MAX, size_t: 0);
9993#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
9994 || (0x5110 <= __SUNPRO_C && !__STDC__))
9995extern size_t k;
9996extern __typeof__ (SIZE_MAX) k;
9997#endif
8690e634 9998
6ec2e0f5
SDJ
9999#include <limits.h> /* for CHAR_BIT */
10000#define TYPE_MINIMUM(t) \
10001 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
10002#define TYPE_MAXIMUM(t) \
10003 ((t) ((t) 0 < (t) -1 \
10004 ? (t) -1 \
10005 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
10006struct s {
10007 int check_PTRDIFF:
10008 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
10009 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
10010 ? 1 : -1;
10011 /* Detect bug in FreeBSD 6.0 / ia64. */
10012 int check_SIG_ATOMIC:
10013 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
10014 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
10015 ? 1 : -1;
10016 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
10017 int check_WCHAR:
10018 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
10019 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
10020 ? 1 : -1;
10021 /* Detect bug in mingw. */
10022 int check_WINT:
10023 WINT_MIN == TYPE_MINIMUM (wint_t)
10024 && WINT_MAX == TYPE_MAXIMUM (wint_t)
10025 ? 1 : -1;
8690e634 10026
6ec2e0f5
SDJ
10027 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
10028 int check_UINT8_C:
10029 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
10030 int check_UINT16_C:
10031 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
8690e634 10032
6ec2e0f5
SDJ
10033 /* Detect bugs in OpenBSD 3.9 stdint.h. */
10034#ifdef UINT8_MAX
10035 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
10036#endif
10037#ifdef UINT16_MAX
10038 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
10039#endif
10040#ifdef UINT32_MAX
10041 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
10042#endif
10043#ifdef UINT64_MAX
10044 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
10045#endif
10046 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
10047 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
10048 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
10049 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
10050 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
10051 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
10052 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
10053 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
10054 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
10055 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
10056 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
10057};
8690e634 10058
8690e634
JK
10059int
10060main ()
10061{
10062
10063 ;
10064 return 0;
10065}
10066_ACEOF
10067if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 10068 if test "$cross_compiling" = yes; then :
5e8754f9 10069 gl_cv_header_working_stdint_h=yes
8690e634 10070
6ec2e0f5
SDJ
10071else
10072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10073/* end confdefs.h. */
8690e634 10074
8690e634 10075
6ec2e0f5
SDJ
10076#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
10077#define __STDC_CONSTANT_MACROS 1
10078#define __STDC_LIMIT_MACROS 1
10079#include <stdint.h>
8690e634 10080
8690e634
JK
10081
10082 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10083 included before <wchar.h>. */
10084 #include <stddef.h>
10085 #include <signal.h>
10086 #if HAVE_WCHAR_H
10087 # include <stdio.h>
10088 # include <time.h>
10089 # include <wchar.h>
10090 #endif
10091
8690e634 10092
6ec2e0f5
SDJ
10093#include <stdio.h>
10094#include <string.h>
10095#define MVAL(macro) MVAL1(macro)
10096#define MVAL1(expression) #expression
10097static const char *macro_values[] =
10098 {
10099#ifdef INT8_MAX
10100 MVAL (INT8_MAX),
10101#endif
10102#ifdef INT16_MAX
10103 MVAL (INT16_MAX),
10104#endif
10105#ifdef INT32_MAX
10106 MVAL (INT32_MAX),
10107#endif
10108#ifdef INT64_MAX
10109 MVAL (INT64_MAX),
10110#endif
10111#ifdef UINT8_MAX
10112 MVAL (UINT8_MAX),
10113#endif
10114#ifdef UINT16_MAX
10115 MVAL (UINT16_MAX),
10116#endif
10117#ifdef UINT32_MAX
10118 MVAL (UINT32_MAX),
10119#endif
10120#ifdef UINT64_MAX
10121 MVAL (UINT64_MAX),
10122#endif
10123 NULL
10124 };
10125
10126int
10127main ()
10128{
10129
10130 const char **mv;
10131 for (mv = macro_values; *mv != NULL; mv++)
10132 {
10133 const char *value = *mv;
10134 /* Test whether it looks like a cast expression. */
10135 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
10136 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
10137 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
10138 || strncmp (value, "((int)"/*)*/, 6) == 0
10139 || strncmp (value, "((signed short)"/*)*/, 15) == 0
10140 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
10141 return mv - macro_values + 1;
10142 }
10143 return 0;
10144
10145 ;
8690e634
JK
10146 return 0;
10147}
10148_ACEOF
6ec2e0f5
SDJ
10149if ac_fn_c_try_run "$LINENO"; then :
10150 gl_cv_header_working_stdint_h=yes
8690e634 10151fi
6ec2e0f5
SDJ
10152rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10153 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 10154fi
8690e634
JK
10155
10156
6ec2e0f5
SDJ
10157fi
10158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 10159
6ec2e0f5
SDJ
10160fi
10161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
10162$as_echo "$gl_cv_header_working_stdint_h" >&6; }
8690e634
JK
10163 fi
10164
6ec2e0f5
SDJ
10165 HAVE_C99_STDINT_H=0
10166 HAVE_SYS_BITYPES_H=0
10167 HAVE_SYS_INTTYPES_H=0
10168 STDINT_H=stdint.h
5e8754f9
SDJ
10169 if test "$gl_cv_header_working_stdint_h" = yes; then
10170 HAVE_C99_STDINT_H=1
10171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
6ec2e0f5 10172$as_echo_n "checking whether stdint.h predates C++11... " >&6; }
d0ac1c44 10173if ${gl_cv_header_stdint_predates_cxx11_h+:} false; then :
6ec2e0f5 10174 $as_echo_n "(cached) " >&6
49e4877c 10175else
6ec2e0f5 10176 gl_cv_header_stdint_predates_cxx11_h=yes
5e8754f9 10177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ec2e0f5 10178/* end confdefs.h. */
49e4877c
PA
10179
10180
6ec2e0f5
SDJ
10181#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
10182#include <stdint.h>
49e4877c
PA
10183
10184
6ec2e0f5
SDJ
10185 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10186 included before <wchar.h>. */
10187 #include <stddef.h>
10188 #include <signal.h>
10189 #if HAVE_WCHAR_H
10190 # include <stdio.h>
10191 # include <time.h>
10192 # include <wchar.h>
10193 #endif
49e4877c 10194
8690e634 10195
6ec2e0f5
SDJ
10196intmax_t im = INTMAX_MAX;
10197int32_t i32 = INT32_C (0x7fffffff);
8690e634 10198
6ec2e0f5
SDJ
10199int
10200main ()
10201{
8690e634 10202
6ec2e0f5
SDJ
10203 ;
10204 return 0;
10205}
10206_ACEOF
10207if ac_fn_c_try_compile "$LINENO"; then :
10208 gl_cv_header_stdint_predates_cxx11_h=no
10209fi
10210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10211fi
10212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
10213$as_echo "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
8690e634 10214
5e8754f9 10215 if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
8690e634 10216
6ec2e0f5 10217$as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
8690e634
JK
10218
10219
6ec2e0f5 10220$as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
8690e634 10221
5e8754f9
SDJ
10222 fi
10223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
6ec2e0f5 10224$as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
d0ac1c44 10225if ${gl_cv_header_stdint_width+:} false; then :
6ec2e0f5
SDJ
10226 $as_echo_n "(cached) " >&6
10227else
10228 gl_cv_header_stdint_width=no
5e8754f9 10229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ec2e0f5 10230/* end confdefs.h. */
8690e634 10231
5e8754f9
SDJ
10232 /* Work if build is not clean. */
10233 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
10234 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
10235 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
10236 #endif
10237 #include <stdint.h>
8690e634 10238
6ec2e0f5
SDJ
10239 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10240 included before <wchar.h>. */
10241 #include <stddef.h>
10242 #include <signal.h>
10243 #if HAVE_WCHAR_H
10244 # include <stdio.h>
10245 # include <time.h>
10246 # include <wchar.h>
10247 #endif
8690e634 10248
5e8754f9 10249 int iw = UINTMAX_WIDTH;
8690e634 10250
6ec2e0f5
SDJ
10251int
10252main ()
10253{
8690e634 10254
6ec2e0f5
SDJ
10255 ;
10256 return 0;
10257}
10258_ACEOF
10259if ac_fn_c_try_compile "$LINENO"; then :
10260 gl_cv_header_stdint_width=yes
10261fi
10262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10263fi
10264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
10265$as_echo "$gl_cv_header_stdint_width" >&6; }
5e8754f9
SDJ
10266 if test "$gl_cv_header_stdint_width" = yes; then
10267 STDINT_H=
10268 fi
10269 else
10270 for ac_header in sys/inttypes.h sys/bitypes.h
6ec2e0f5
SDJ
10271do :
10272 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10273ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 10274if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6ec2e0f5
SDJ
10275 cat >>confdefs.h <<_ACEOF
10276#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10277_ACEOF
8690e634 10278
6ec2e0f5 10279fi
8690e634 10280
6ec2e0f5 10281done
8690e634 10282
5e8754f9
SDJ
10283 if test $ac_cv_header_sys_inttypes_h = yes; then
10284 HAVE_SYS_INTTYPES_H=1
10285 fi
10286 if test $ac_cv_header_sys_bitypes_h = yes; then
10287 HAVE_SYS_BITYPES_H=1
10288 fi
8690e634
JK
10289
10290
6ec2e0f5 10291 if test $APPLE_UNIVERSAL_BUILD = 0; then
8690e634
JK
10292
10293
6ec2e0f5
SDJ
10294 for gltype in ptrdiff_t size_t ; do
10295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
10296$as_echo_n "checking for bit size of $gltype... " >&6; }
d0ac1c44 10297if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
8690e634
JK
10298 $as_echo_n "(cached) " >&6
10299else
6ec2e0f5
SDJ
10300 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
10301 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10302 included before <wchar.h>. */
10303 #include <stddef.h>
10304 #include <signal.h>
10305 #if HAVE_WCHAR_H
10306 # include <stdio.h>
10307 # include <time.h>
10308 # include <wchar.h>
10309 #endif
8690e634 10310
6ec2e0f5 10311#include <limits.h>"; then :
4a626d0a 10312
6ec2e0f5
SDJ
10313else
10314 result=unknown
10315fi
4a626d0a 10316
6ec2e0f5 10317 eval gl_cv_bitsizeof_${gltype}=\$result
4a626d0a 10318
6ec2e0f5
SDJ
10319fi
10320eval ac_res=\$gl_cv_bitsizeof_${gltype}
10321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10322$as_echo "$ac_res" >&6; }
10323 eval result=\$gl_cv_bitsizeof_${gltype}
10324 if test $result = unknown; then
10325 result=0
10326 fi
10327 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
10328 cat >>confdefs.h <<_ACEOF
10329#define BITSIZEOF_${GLTYPE} $result
10330_ACEOF
4a626d0a 10331
6ec2e0f5
SDJ
10332 eval BITSIZEOF_${GLTYPE}=\$result
10333 done
4a626d0a 10334
8690e634 10335
6ec2e0f5 10336 fi
8690e634 10337
8690e634 10338
6ec2e0f5
SDJ
10339 for gltype in sig_atomic_t wchar_t wint_t ; do
10340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
10341$as_echo_n "checking for bit size of $gltype... " >&6; }
d0ac1c44 10342if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
6ec2e0f5
SDJ
10343 $as_echo_n "(cached) " >&6
10344else
10345 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
10346 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10347 included before <wchar.h>. */
10348 #include <stddef.h>
10349 #include <signal.h>
10350 #if HAVE_WCHAR_H
10351 # include <stdio.h>
10352 # include <time.h>
10353 # include <wchar.h>
10354 #endif
8690e634 10355
6ec2e0f5
SDJ
10356#include <limits.h>"; then :
10357
10358else
10359 result=unknown
10360fi
8690e634 10361
6ec2e0f5 10362 eval gl_cv_bitsizeof_${gltype}=\$result
8690e634 10363
6ec2e0f5
SDJ
10364fi
10365eval ac_res=\$gl_cv_bitsizeof_${gltype}
10366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10367$as_echo "$ac_res" >&6; }
10368 eval result=\$gl_cv_bitsizeof_${gltype}
10369 if test $result = unknown; then
10370 result=0
10371 fi
10372 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
10373 cat >>confdefs.h <<_ACEOF
10374#define BITSIZEOF_${GLTYPE} $result
10375_ACEOF
8690e634 10376
6ec2e0f5
SDJ
10377 eval BITSIZEOF_${GLTYPE}=\$result
10378 done
8690e634
JK
10379
10380
10381
10382
6ec2e0f5
SDJ
10383 for gltype in sig_atomic_t wchar_t wint_t ; do
10384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
10385$as_echo_n "checking whether $gltype is signed... " >&6; }
d0ac1c44 10386if eval \${gl_cv_type_${gltype}_signed+:} false; then :
8690e634
JK
10387 $as_echo_n "(cached) " >&6
10388else
10389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10390/* end confdefs.h. */
8690e634 10391
6ec2e0f5
SDJ
10392 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10393 included before <wchar.h>. */
10394 #include <stddef.h>
10395 #include <signal.h>
10396 #if HAVE_WCHAR_H
10397 # include <stdio.h>
10398 # include <time.h>
10399 # include <wchar.h>
10400 #endif
10401
10402 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
8690e634
JK
10403int
10404main ()
10405{
6ec2e0f5 10406
8690e634
JK
10407 ;
10408 return 0;
10409}
10410_ACEOF
10411if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 10412 result=yes
8690e634 10413else
6ec2e0f5 10414 result=no
8690e634
JK
10415fi
10416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
10417 eval gl_cv_type_${gltype}_signed=\$result
10418
8690e634 10419fi
6ec2e0f5 10420eval ac_res=\$gl_cv_type_${gltype}_signed
8690e634
JK
10421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10422$as_echo "$ac_res" >&6; }
6ec2e0f5
SDJ
10423 eval result=\$gl_cv_type_${gltype}_signed
10424 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
10425 if test "$result" = yes; then
10426 cat >>confdefs.h <<_ACEOF
10427#define HAVE_SIGNED_${GLTYPE} 1
8690e634
JK
10428_ACEOF
10429
6ec2e0f5
SDJ
10430 eval HAVE_SIGNED_${GLTYPE}=1
10431 else
10432 eval HAVE_SIGNED_${GLTYPE}=0
10433 fi
10434 done
8690e634 10435
8690e634 10436
6ec2e0f5
SDJ
10437 gl_cv_type_ptrdiff_t_signed=yes
10438 gl_cv_type_size_t_signed=no
10439 if test $APPLE_UNIVERSAL_BUILD = 0; then
8690e634 10440
8690e634 10441
6ec2e0f5
SDJ
10442 for gltype in ptrdiff_t size_t ; do
10443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
10444$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
d0ac1c44 10445if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
8690e634
JK
10446 $as_echo_n "(cached) " >&6
10447else
6ec2e0f5
SDJ
10448 eval gl_cv_type_${gltype}_suffix=no
10449 eval result=\$gl_cv_type_${gltype}_signed
10450 if test "$result" = yes; then
10451 glsufu=
10452 else
10453 glsufu=u
10454 fi
10455 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
10456 case $glsuf in
10457 '') gltype1='int';;
10458 l) gltype1='long int';;
10459 ll) gltype1='long long int';;
10460 i64) gltype1='__int64';;
10461 u) gltype1='unsigned int';;
10462 ul) gltype1='unsigned long int';;
10463 ull) gltype1='unsigned long long int';;
10464 ui64)gltype1='unsigned __int64';;
10465 esac
10466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
10467/* end confdefs.h. */
10468
6ec2e0f5
SDJ
10469 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10470 included before <wchar.h>. */
10471 #include <stddef.h>
10472 #include <signal.h>
10473 #if HAVE_WCHAR_H
10474 # include <stdio.h>
10475 # include <time.h>
10476 # include <wchar.h>
10477 #endif
8690e634 10478
6ec2e0f5
SDJ
10479 extern $gltype foo;
10480 extern $gltype1 foo;
8690e634
JK
10481int
10482main ()
10483{
10484
10485 ;
10486 return 0;
10487}
10488_ACEOF
10489if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 10490 eval gl_cv_type_${gltype}_suffix=\$glsuf
8690e634
JK
10491fi
10492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
10493 eval result=\$gl_cv_type_${gltype}_suffix
10494 test "$result" != no && break
10495 done
8690e634 10496fi
6ec2e0f5
SDJ
10497eval ac_res=\$gl_cv_type_${gltype}_suffix
10498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10499$as_echo "$ac_res" >&6; }
10500 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
10501 eval result=\$gl_cv_type_${gltype}_suffix
10502 test "$result" = no && result=
10503 eval ${GLTYPE}_SUFFIX=\$result
10504 cat >>confdefs.h <<_ACEOF
10505#define ${GLTYPE}_SUFFIX $result
8690e634
JK
10506_ACEOF
10507
6ec2e0f5 10508 done
8690e634
JK
10509
10510
6ec2e0f5 10511 fi
8690e634 10512
6ec2e0f5
SDJ
10513
10514 for gltype in sig_atomic_t wchar_t wint_t ; do
10515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
10516$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
d0ac1c44 10517if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
8690e634
JK
10518 $as_echo_n "(cached) " >&6
10519else
6ec2e0f5
SDJ
10520 eval gl_cv_type_${gltype}_suffix=no
10521 eval result=\$gl_cv_type_${gltype}_signed
10522 if test "$result" = yes; then
10523 glsufu=
10524 else
10525 glsufu=u
10526 fi
10527 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
10528 case $glsuf in
10529 '') gltype1='int';;
10530 l) gltype1='long int';;
10531 ll) gltype1='long long int';;
10532 i64) gltype1='__int64';;
10533 u) gltype1='unsigned int';;
10534 ul) gltype1='unsigned long int';;
10535 ull) gltype1='unsigned long long int';;
10536 ui64)gltype1='unsigned __int64';;
10537 esac
10538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 10539/* end confdefs.h. */
88b48903 10540
6ec2e0f5
SDJ
10541 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10542 included before <wchar.h>. */
10543 #include <stddef.h>
10544 #include <signal.h>
10545 #if HAVE_WCHAR_H
10546 # include <stdio.h>
10547 # include <time.h>
10548 # include <wchar.h>
10549 #endif
88b48903 10550
6ec2e0f5
SDJ
10551 extern $gltype foo;
10552 extern $gltype1 foo;
88b48903
WN
10553int
10554main ()
10555{
88b48903
WN
10556
10557 ;
10558 return 0;
10559}
10560_ACEOF
10561if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 10562 eval gl_cv_type_${gltype}_suffix=\$glsuf
8690e634 10563fi
88b48903 10564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
10565 eval result=\$gl_cv_type_${gltype}_suffix
10566 test "$result" != no && break
10567 done
8690e634 10568fi
6ec2e0f5
SDJ
10569eval ac_res=\$gl_cv_type_${gltype}_suffix
10570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10571$as_echo "$ac_res" >&6; }
10572 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
10573 eval result=\$gl_cv_type_${gltype}_suffix
10574 test "$result" = no && result=
10575 eval ${GLTYPE}_SUFFIX=\$result
10576 cat >>confdefs.h <<_ACEOF
10577#define ${GLTYPE}_SUFFIX $result
88b48903 10578_ACEOF
8690e634 10579
6ec2e0f5 10580 done
8690e634
JK
10581
10582
10583
5e8754f9 10584 if test $BITSIZEOF_WINT_T -lt 32; then
6ec2e0f5
SDJ
10585 BITSIZEOF_WINT_T=32
10586 fi
8690e634 10587
5e8754f9 10588 fi
7a6dbc2f 10589
5e8754f9
SDJ
10590 # The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH.
10591 LIMITS_H=limits.h
6ec2e0f5
SDJ
10592 if test -n "$LIMITS_H"; then
10593 GL_GENERATE_LIMITS_H_TRUE=
10594 GL_GENERATE_LIMITS_H_FALSE='#'
88b48903 10595else
6ec2e0f5
SDJ
10596 GL_GENERATE_LIMITS_H_TRUE='#'
10597 GL_GENERATE_LIMITS_H_FALSE=
88b48903 10598fi
8690e634
JK
10599
10600
10601
10602
10603
6ec2e0f5
SDJ
10604
10605 if test -n "$STDINT_H"; then
10606 GL_GENERATE_STDINT_H_TRUE=
10607 GL_GENERATE_STDINT_H_FALSE='#'
10608else
10609 GL_GENERATE_STDINT_H_TRUE='#'
10610 GL_GENERATE_STDINT_H_FALSE=
88b48903 10611fi
8690e634 10612
8690e634
JK
10613
10614
10615
6ec2e0f5 10616
472fa5ee
SM
10617
10618
10619
6ec2e0f5
SDJ
10620 GNULIB_IMAXABS=0;
10621 GNULIB_IMAXDIV=0;
10622 GNULIB_STRTOIMAX=0;
10623 GNULIB_STRTOUMAX=0;
10624 HAVE_DECL_IMAXABS=1;
10625 HAVE_DECL_IMAXDIV=1;
10626 HAVE_DECL_STRTOIMAX=1;
10627 HAVE_DECL_STRTOUMAX=1;
10628 REPLACE_STRTOIMAX=0;
10629 REPLACE_STRTOUMAX=0;
10630 INT32_MAX_LT_INTMAX_MAX=1;
10631 INT64_MAX_EQ_LONG_MAX='defined _LP64';
10632 PRI_MACROS_BROKEN=0;
10633 PRIPTR_PREFIX=__PRIPTR_PREFIX;
10634 UINT32_MAX_LT_UINTMAX_MAX=1;
10635 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
10636
10637
10638
10639
472fa5ee
SM
10640 :
10641
10642
10643
10644
10645
10646
10647
6ec2e0f5
SDJ
10648
10649
10650
10651
10652
10653
472fa5ee
SM
10654 :
10655
10656
10657
6ec2e0f5
SDJ
10658
10659
10660
10661
10662
10663 if test $gl_cv_have_include_next = yes; then
10664 gl_cv_next_inttypes_h='<'inttypes.h'>'
10665 else
10666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
10667$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
d0ac1c44 10668if ${gl_cv_next_inttypes_h+:} false; then :
6ec2e0f5 10669 $as_echo_n "(cached) " >&6
88b48903 10670else
8690e634 10671
6ec2e0f5 10672 if test $ac_cv_header_inttypes_h = yes; then
8690e634
JK
10673
10674
8690e634
JK
10675
10676
6ec2e0f5
SDJ
10677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10678/* end confdefs.h. */
10679#include <inttypes.h>
88b48903 10680_ACEOF
6ec2e0f5
SDJ
10681 case "$host_os" in
10682 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10683 *) gl_absname_cpp="$ac_cpp" ;;
10684 esac
8690e634 10685
6ec2e0f5
SDJ
10686 case "$host_os" in
10687 mingw*)
10688 gl_dirsep_regex='[/\\]'
10689 ;;
10690 *)
10691 gl_dirsep_regex='\/'
88b48903
WN
10692 ;;
10693 esac
6ec2e0f5
SDJ
10694 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10695 gl_header_literal_regex=`echo 'inttypes.h' \
10696 | sed -e "$gl_make_literal_regex_sed"`
10697 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10698 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10699 s|^/[^/]|//&|
10700 p
10701 q
10702 }'
8690e634 10703
6ec2e0f5
SDJ
10704 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10705 sed -n "$gl_absolute_header_sed"`
8690e634 10706
6ec2e0f5
SDJ
10707 gl_header=$gl_cv_absolute_inttypes_h
10708 gl_cv_next_inttypes_h='"'$gl_header'"'
10709 else
10710 gl_cv_next_inttypes_h='<'inttypes.h'>'
10711 fi
88b48903 10712
88b48903 10713
88b48903 10714fi
6ec2e0f5
SDJ
10715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
10716$as_echo "$gl_cv_next_inttypes_h" >&6; }
10717 fi
10718 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
88b48903 10719
6ec2e0f5
SDJ
10720 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10721 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10722 gl_next_as_first_directive='<'inttypes.h'>'
10723 else
10724 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10725 gl_next_as_first_directive=$gl_cv_next_inttypes_h
10726 fi
10727 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
88b48903 10728
6ec2e0f5
SDJ
10729
10730
10731
10732
10733
10734
10735
5e8754f9
SDJ
10736 for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
10737 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
10738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
10739$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
10740if eval \${$as_gl_Symbol+:} false; then :
10741 $as_echo_n "(cached) " >&6
10742else
10743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10744/* end confdefs.h. */
10745#include <inttypes.h>
10746
10747int
10748main ()
10749{
10750#undef $gl_func
10751 (void) $gl_func;
10752 ;
10753 return 0;
10754}
10755_ACEOF
10756if ac_fn_c_try_compile "$LINENO"; then :
10757 eval "$as_gl_Symbol=yes"
10758else
10759 eval "$as_gl_Symbol=no"
10760fi
10761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10762fi
10763eval ac_res=\$$as_gl_Symbol
10764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10765$as_echo "$ac_res" >&6; }
10766 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
10767 cat >>confdefs.h <<_ACEOF
10768#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
10769_ACEOF
6ec2e0f5 10770
5e8754f9
SDJ
10771 eval ac_cv_have_decl_$gl_func=yes
10772fi
10773 done
6ec2e0f5
SDJ
10774
10775
10776
10777 for ac_header in inttypes.h
10778do :
10779 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
d0ac1c44 10780if test "x$ac_cv_header_inttypes_h" = xyes; then :
6ec2e0f5
SDJ
10781 cat >>confdefs.h <<_ACEOF
10782#define HAVE_INTTYPES_H 1
10783_ACEOF
10784
10785fi
10786
10787done
10788
10789 if test $ac_cv_header_inttypes_h = yes; then
10790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
10791$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
d0ac1c44 10792if ${gt_cv_inttypes_pri_broken+:} false; then :
6ec2e0f5
SDJ
10793 $as_echo_n "(cached) " >&6
10794else
10795
10796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10797/* end confdefs.h. */
10798
10799#include <inttypes.h>
10800#ifdef PRId32
10801char *p = PRId32;
10802#endif
10803
10804int
10805main ()
10806{
10807
10808 ;
10809 return 0;
10810}
10811_ACEOF
10812if ac_fn_c_try_compile "$LINENO"; then :
10813 gt_cv_inttypes_pri_broken=no
10814else
10815 gt_cv_inttypes_pri_broken=yes
10816fi
10817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10818
10819fi
10820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
10821$as_echo "$gt_cv_inttypes_pri_broken" >&6; }
10822 fi
10823 if test "$gt_cv_inttypes_pri_broken" = yes; then
10824
10825cat >>confdefs.h <<_ACEOF
10826#define PRI_MACROS_BROKEN 1
10827_ACEOF
10828
10829 PRI_MACROS_BROKEN=1
10830 else
10831 PRI_MACROS_BROKEN=0
10832 fi
10833
10834
10835
10836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
10837$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
d0ac1c44 10838if ${gl_cv_cc_double_expbit0+:} false; then :
6ec2e0f5
SDJ
10839 $as_echo_n "(cached) " >&6
10840else
10841
10842 if test "$cross_compiling" = yes; then :
10843
10844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10845/* end confdefs.h. */
10846
10847#if defined arm || defined __arm || defined __arm__
10848 mixed_endianness
10849#endif
10850
10851_ACEOF
10852if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10853 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
10854 gl_cv_cc_double_expbit0="unknown"
10855else
10856
10857 :
d0ac1c44 10858if ${ac_cv_c_bigendian+:} false; then :
6ec2e0f5
SDJ
10859 $as_echo_n "(cached) " >&6
10860else
10861 ac_cv_c_bigendian=unknown
10862 # See if we're dealing with a universal compiler.
10863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10864/* end confdefs.h. */
10865#ifndef __APPLE_CC__
10866 not a universal capable compiler
10867 #endif
10868 typedef int dummy;
10869
10870_ACEOF
10871if ac_fn_c_try_compile "$LINENO"; then :
10872
10873 # Check for potential -arch flags. It is not universal unless
10874 # there are at least two -arch flags with different values.
10875 ac_arch=
10876 ac_prev=
10877 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
10878 if test -n "$ac_prev"; then
10879 case $ac_word in
10880 i?86 | x86_64 | ppc | ppc64)
10881 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
10882 ac_arch=$ac_word
10883 else
10884 ac_cv_c_bigendian=universal
10885 break
10886 fi
10887 ;;
10888 esac
10889 ac_prev=
10890 elif test "x$ac_word" = "x-arch"; then
10891 ac_prev=arch
10892 fi
10893 done
10894fi
10895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10896 if test $ac_cv_c_bigendian = unknown; then
10897 # See if sys/param.h defines the BYTE_ORDER macro.
10898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10899/* end confdefs.h. */
10900#include <sys/types.h>
10901 #include <sys/param.h>
10902
10903int
10904main ()
10905{
10906#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
10907 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
10908 && LITTLE_ENDIAN)
10909 bogus endian macros
10910 #endif
10911
10912 ;
10913 return 0;
10914}
10915_ACEOF
10916if ac_fn_c_try_compile "$LINENO"; then :
10917 # It does; now see whether it defined to BIG_ENDIAN or not.
10918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10919/* end confdefs.h. */
10920#include <sys/types.h>
10921 #include <sys/param.h>
10922
10923int
10924main ()
10925{
10926#if BYTE_ORDER != BIG_ENDIAN
10927 not big endian
10928 #endif
10929
10930 ;
10931 return 0;
10932}
10933_ACEOF
10934if ac_fn_c_try_compile "$LINENO"; then :
10935 ac_cv_c_bigendian=yes
10936else
10937 ac_cv_c_bigendian=no
10938fi
10939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10940fi
10941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10942 fi
10943 if test $ac_cv_c_bigendian = unknown; then
10944 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
10945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10946/* end confdefs.h. */
10947#include <limits.h>
10948
10949int
88b48903
WN
10950main ()
10951{
10952#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
10953 bogus endian macros
10954 #endif
10955
10956 ;
10957 return 0;
10958}
10959_ACEOF
10960if ac_fn_c_try_compile "$LINENO"; then :
10961 # It does; now see whether it defined to _BIG_ENDIAN or not.
10962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10963/* end confdefs.h. */
10964#include <limits.h>
10965
10966int
10967main ()
10968{
10969#ifndef _BIG_ENDIAN
10970 not big endian
10971 #endif
10972
10973 ;
10974 return 0;
10975}
10976_ACEOF
10977if ac_fn_c_try_compile "$LINENO"; then :
10978 ac_cv_c_bigendian=yes
10979else
10980 ac_cv_c_bigendian=no
10981fi
10982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10983fi
10984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10985 fi
10986 if test $ac_cv_c_bigendian = unknown; then
10987 # Compile a test program.
10988 if test "$cross_compiling" = yes; then :
10989 # Try to guess by grepping values from an object file.
10990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10991/* end confdefs.h. */
10992short int ascii_mm[] =
10993 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
10994 short int ascii_ii[] =
10995 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
10996 int use_ascii (int i) {
10997 return ascii_mm[i] + ascii_ii[i];
10998 }
10999 short int ebcdic_ii[] =
11000 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11001 short int ebcdic_mm[] =
11002 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11003 int use_ebcdic (int i) {
11004 return ebcdic_mm[i] + ebcdic_ii[i];
11005 }
11006 extern int foo;
11007
11008int
11009main ()
11010{
11011return use_ascii (foo) == use_ebcdic (foo);
11012 ;
11013 return 0;
11014}
11015_ACEOF
11016if ac_fn_c_try_compile "$LINENO"; then :
11017 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11018 ac_cv_c_bigendian=yes
11019 fi
11020 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11021 if test "$ac_cv_c_bigendian" = unknown; then
11022 ac_cv_c_bigendian=no
11023 else
11024 # finding both strings is unlikely to happen, but who knows?
11025 ac_cv_c_bigendian=unknown
11026 fi
11027 fi
11028fi
11029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11030else
11031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11032/* end confdefs.h. */
11033$ac_includes_default
11034int
11035main ()
11036{
11037
11038 /* Are we little or big endian? From Harbison&Steele. */
11039 union
11040 {
11041 long int l;
11042 char c[sizeof (long int)];
11043 } u;
11044 u.l = 1;
11045 return u.c[sizeof (long int) - 1] == 1;
11046
11047 ;
11048 return 0;
11049}
11050_ACEOF
11051if ac_fn_c_try_run "$LINENO"; then :
11052 ac_cv_c_bigendian=no
11053else
11054 ac_cv_c_bigendian=yes
11055fi
11056rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11057 conftest.$ac_objext conftest.beam conftest.$ac_ext
11058fi
11059
11060 fi
11061fi
6ec2e0f5 11062:
88b48903
WN
11063 case $ac_cv_c_bigendian in #(
11064 yes)
6ec2e0f5 11065 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
88b48903 11066 no)
6ec2e0f5 11067 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
88b48903
WN
11068 universal)
11069
11070$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11071
11072 ;; #(
11073 *)
6ec2e0f5 11074 gl_cv_cc_double_expbit0="unknown" ;;
88b48903
WN
11075 esac
11076
11077
6ec2e0f5
SDJ
11078fi
11079rm -f conftest*
88b48903 11080
2196f55f 11081
2196f55f
YQ
11082else
11083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11084/* end confdefs.h. */
2196f55f 11085
6ec2e0f5
SDJ
11086#include <float.h>
11087#include <stddef.h>
11088#include <stdio.h>
11089#include <string.h>
11090#define NWORDS \
11091 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
11092typedef union { double value; unsigned int word[NWORDS]; } memory_double;
11093static unsigned int ored_words[NWORDS];
11094static unsigned int anded_words[NWORDS];
11095static void add_to_ored_words (double x)
2196f55f 11096{
6ec2e0f5
SDJ
11097 memory_double m;
11098 size_t i;
11099 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
11100 memset (&m, 0, sizeof (memory_double));
11101 m.value = x;
11102 for (i = 0; i < NWORDS; i++)
11103 {
11104 ored_words[i] |= m.word[i];
11105 anded_words[i] &= m.word[i];
11106 }
2196f55f 11107}
6ec2e0f5 11108int main ()
88b48903 11109{
6ec2e0f5
SDJ
11110 size_t j;
11111 FILE *fp = fopen ("conftest.out", "w");
11112 if (fp == NULL)
11113 return 1;
11114 for (j = 0; j < NWORDS; j++)
11115 anded_words[j] = ~ (unsigned int) 0;
11116 add_to_ored_words (0.25);
11117 add_to_ored_words (0.5);
11118 add_to_ored_words (1.0);
11119 add_to_ored_words (2.0);
11120 add_to_ored_words (4.0);
11121 /* Remove bits that are common (e.g. if representation of the first mantissa
11122 bit is explicit). */
11123 for (j = 0; j < NWORDS; j++)
11124 ored_words[j] &= ~anded_words[j];
11125 /* Now find the nonzero word. */
11126 for (j = 0; j < NWORDS; j++)
11127 if (ored_words[j] != 0)
11128 break;
11129 if (j < NWORDS)
11130 {
11131 size_t i;
11132 for (i = j + 1; i < NWORDS; i++)
11133 if (ored_words[i] != 0)
11134 {
11135 fprintf (fp, "unknown");
11136 return (fclose (fp) != 0);
11137 }
11138 for (i = 0; ; i++)
11139 if ((ored_words[j] >> i) & 1)
11140 {
11141 fprintf (fp, "word %d bit %d", (int) j, (int) i);
11142 return (fclose (fp) != 0);
11143 }
11144 }
11145 fprintf (fp, "unknown");
11146 return (fclose (fp) != 0);
88b48903 11147}
6ec2e0f5 11148
88b48903 11149_ACEOF
6ec2e0f5
SDJ
11150if ac_fn_c_try_run "$LINENO"; then :
11151 gl_cv_cc_double_expbit0=`cat conftest.out`
88b48903 11152else
6ec2e0f5 11153 gl_cv_cc_double_expbit0="unknown"
88b48903 11154fi
6ec2e0f5
SDJ
11155rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11156 conftest.$ac_objext conftest.beam conftest.$ac_ext
11157fi
11158
11159 rm -f conftest.out
88b48903
WN
11160
11161fi
6ec2e0f5
SDJ
11162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
11163$as_echo "$gl_cv_cc_double_expbit0" >&6; }
11164 case "$gl_cv_cc_double_expbit0" in
11165 word*bit*)
11166 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
11167 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
88b48903 11168
6ec2e0f5
SDJ
11169cat >>confdefs.h <<_ACEOF
11170#define DBL_EXPBIT0_WORD $word
11171_ACEOF
88b48903 11172
88b48903 11173
6ec2e0f5
SDJ
11174cat >>confdefs.h <<_ACEOF
11175#define DBL_EXPBIT0_BIT $bit
11176_ACEOF
88b48903 11177
6ec2e0f5
SDJ
11178 ;;
11179 esac
88b48903
WN
11180
11181
6ec2e0f5
SDJ
11182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11183$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
d0ac1c44 11184if ${ac_cv_c_bigendian+:} false; then :
6ec2e0f5
SDJ
11185 $as_echo_n "(cached) " >&6
11186else
11187 ac_cv_c_bigendian=unknown
11188 # See if we're dealing with a universal compiler.
11189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11190/* end confdefs.h. */
11191#ifndef __APPLE_CC__
11192 not a universal capable compiler
11193 #endif
11194 typedef int dummy;
88b48903 11195
6ec2e0f5
SDJ
11196_ACEOF
11197if ac_fn_c_try_compile "$LINENO"; then :
88b48903 11198
6ec2e0f5
SDJ
11199 # Check for potential -arch flags. It is not universal unless
11200 # there are at least two -arch flags with different values.
11201 ac_arch=
11202 ac_prev=
11203 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11204 if test -n "$ac_prev"; then
11205 case $ac_word in
11206 i?86 | x86_64 | ppc | ppc64)
11207 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11208 ac_arch=$ac_word
11209 else
11210 ac_cv_c_bigendian=universal
11211 break
11212 fi
11213 ;;
11214 esac
11215 ac_prev=
11216 elif test "x$ac_word" = "x-arch"; then
11217 ac_prev=arch
11218 fi
11219 done
11220fi
11221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11222 if test $ac_cv_c_bigendian = unknown; then
11223 # See if sys/param.h defines the BYTE_ORDER macro.
11224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11225/* end confdefs.h. */
11226#include <sys/types.h>
11227 #include <sys/param.h>
88b48903 11228
6ec2e0f5
SDJ
11229int
11230main ()
11231{
11232#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11233 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11234 && LITTLE_ENDIAN)
11235 bogus endian macros
11236 #endif
88b48903 11237
6ec2e0f5
SDJ
11238 ;
11239 return 0;
11240}
11241_ACEOF
11242if ac_fn_c_try_compile "$LINENO"; then :
11243 # It does; now see whether it defined to BIG_ENDIAN or not.
11244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
88b48903
WN
11245/* end confdefs.h. */
11246#include <sys/types.h>
6ec2e0f5 11247 #include <sys/param.h>
8690e634
JK
11248
11249int
11250main ()
11251{
6ec2e0f5
SDJ
11252#if BYTE_ORDER != BIG_ENDIAN
11253 not big endian
11254 #endif
8690e634 11255
8690e634
JK
11256 ;
11257 return 0;
11258}
11259_ACEOF
6ec2e0f5
SDJ
11260if ac_fn_c_try_compile "$LINENO"; then :
11261 ac_cv_c_bigendian=yes
8690e634 11262else
6ec2e0f5 11263 ac_cv_c_bigendian=no
8690e634 11264fi
6ec2e0f5 11265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 11266fi
6ec2e0f5
SDJ
11267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11268 fi
11269 if test $ac_cv_c_bigendian = unknown; then
11270 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11272/* end confdefs.h. */
11273#include <limits.h>
11274
11275int
11276main ()
11277{
11278#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11279 bogus endian macros
11280 #endif
11281
11282 ;
11283 return 0;
11284}
11285_ACEOF
11286if ac_fn_c_try_compile "$LINENO"; then :
11287 # It does; now see whether it defined to _BIG_ENDIAN or not.
11288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11289/* end confdefs.h. */
11290#include <limits.h>
8690e634 11291
6ec2e0f5
SDJ
11292int
11293main ()
11294{
11295#ifndef _BIG_ENDIAN
11296 not big endian
11297 #endif
11298
11299 ;
11300 return 0;
11301}
11302_ACEOF
11303if ac_fn_c_try_compile "$LINENO"; then :
11304 ac_cv_c_bigendian=yes
11305else
11306 ac_cv_c_bigendian=no
8690e634 11307fi
6ec2e0f5
SDJ
11308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11309fi
11310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11311 fi
11312 if test $ac_cv_c_bigendian = unknown; then
11313 # Compile a test program.
11314 if test "$cross_compiling" = yes; then :
11315 # Try to guess by grepping values from an object file.
11316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11317/* end confdefs.h. */
11318short int ascii_mm[] =
11319 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11320 short int ascii_ii[] =
11321 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11322 int use_ascii (int i) {
11323 return ascii_mm[i] + ascii_ii[i];
11324 }
11325 short int ebcdic_ii[] =
11326 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11327 short int ebcdic_mm[] =
11328 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11329 int use_ebcdic (int i) {
11330 return ebcdic_mm[i] + ebcdic_ii[i];
11331 }
11332 extern int foo;
8690e634 11333
6ec2e0f5
SDJ
11334int
11335main ()
11336{
11337return use_ascii (foo) == use_ebcdic (foo);
11338 ;
11339 return 0;
11340}
11341_ACEOF
11342if ac_fn_c_try_compile "$LINENO"; then :
11343 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11344 ac_cv_c_bigendian=yes
11345 fi
11346 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11347 if test "$ac_cv_c_bigendian" = unknown; then
11348 ac_cv_c_bigendian=no
11349 else
11350 # finding both strings is unlikely to happen, but who knows?
11351 ac_cv_c_bigendian=unknown
11352 fi
11353 fi
11354fi
11355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11356else
11357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11358/* end confdefs.h. */
11359$ac_includes_default
11360int
11361main ()
11362{
8690e634 11363
6ec2e0f5
SDJ
11364 /* Are we little or big endian? From Harbison&Steele. */
11365 union
11366 {
11367 long int l;
11368 char c[sizeof (long int)];
11369 } u;
11370 u.l = 1;
11371 return u.c[sizeof (long int) - 1] == 1;
11372
11373 ;
11374 return 0;
11375}
8690e634 11376_ACEOF
6ec2e0f5
SDJ
11377if ac_fn_c_try_run "$LINENO"; then :
11378 ac_cv_c_bigendian=no
11379else
11380 ac_cv_c_bigendian=yes
11381fi
11382rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11383 conftest.$ac_objext conftest.beam conftest.$ac_ext
11384fi
11385
11386 fi
11387fi
11388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11389$as_echo "$ac_cv_c_bigendian" >&6; }
11390 case $ac_cv_c_bigendian in #(
11391 yes)
11392 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11393;; #(
11394 no)
11395 ;; #(
11396 universal)
8690e634 11397
6ec2e0f5 11398$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
8690e634 11399
6ec2e0f5
SDJ
11400 ;; #(
11401 *)
d0ac1c44 11402 as_fn_error $? "unknown endianness
6ec2e0f5
SDJ
11403 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11404 esac
8690e634 11405
6ec2e0f5
SDJ
11406
11407
11408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
11409$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 11410if ${am_cv_langinfo_codeset+:} false; then :
6ec2e0f5
SDJ
11411 $as_echo_n "(cached) " >&6
11412else
11413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11414/* end confdefs.h. */
11415#include <langinfo.h>
11416int
11417main ()
11418{
11419char* cs = nl_langinfo(CODESET); return !cs;
11420 ;
11421 return 0;
11422}
8690e634 11423_ACEOF
6ec2e0f5
SDJ
11424if ac_fn_c_try_link "$LINENO"; then :
11425 am_cv_langinfo_codeset=yes
11426else
11427 am_cv_langinfo_codeset=no
11428fi
11429rm -f core conftest.err conftest.$ac_objext \
11430 conftest$ac_exeext conftest.$ac_ext
11431
11432fi
11433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
11434$as_echo "$am_cv_langinfo_codeset" >&6; }
11435 if test $am_cv_langinfo_codeset = yes; then
11436
11437$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8690e634 11438
6ec2e0f5 11439 fi
8690e634 11440
472fa5ee 11441
5e8754f9
SDJ
11442 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
11443if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
11444 ac_have_decl=1
11445else
11446 ac_have_decl=0
11447fi
11448
11449cat >>confdefs.h <<_ACEOF
11450#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
11451_ACEOF
11452
11453
11454
11455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
11456$as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
11457if ${ac_cv_gnu_library_2_1+:} false; then :
11458 $as_echo_n "(cached) " >&6
11459else
11460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11461/* end confdefs.h. */
11462
11463#include <features.h>
11464#ifdef __GNU_LIBRARY__
11465 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
11466 Lucky GNU user
11467 #endif
11468#endif
11469#ifdef __UCLIBC__
11470 Lucky user
11471#endif
11472
11473_ACEOF
11474if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11475 $EGREP "Lucky" >/dev/null 2>&1; then :
11476 ac_cv_gnu_library_2_1=yes
11477else
11478 ac_cv_gnu_library_2_1=no
11479fi
11480rm -f conftest*
11481
11482
11483
11484fi
11485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
11486$as_echo "$ac_cv_gnu_library_2_1" >&6; }
11487
11488 GLIBC21="$ac_cv_gnu_library_2_1"
11489
11490
11491
f45c62c4
YQ
11492
11493
472fa5ee
SM
11494
11495
11496
6ec2e0f5
SDJ
11497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
11498$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
d0ac1c44 11499if ${gl_cv_func_malloc_posix+:} false; then :
f45c62c4
YQ
11500 $as_echo_n "(cached) " >&6
11501else
f45c62c4 11502
6ec2e0f5 11503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f45c62c4 11504/* end confdefs.h. */
6ec2e0f5 11505
f45c62c4
YQ
11506int
11507main ()
11508{
5e8754f9 11509#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6ec2e0f5
SDJ
11510 choke me
11511 #endif
f45c62c4
YQ
11512
11513 ;
11514 return 0;
11515}
11516_ACEOF
6ec2e0f5
SDJ
11517if ac_fn_c_try_compile "$LINENO"; then :
11518 gl_cv_func_malloc_posix=yes
f45c62c4 11519else
6ec2e0f5 11520 gl_cv_func_malloc_posix=no
f45c62c4 11521fi
6ec2e0f5 11522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6a29c58e
YQ
11523
11524fi
11525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
11526$as_echo "$gl_cv_func_malloc_posix" >&6; }
11527
11528
11529
11530 for ac_header in stdlib.h
98399780
YQ
11531do :
11532 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
d0ac1c44 11533if test "x$ac_cv_header_stdlib_h" = xyes; then :
98399780
YQ
11534 cat >>confdefs.h <<_ACEOF
11535#define HAVE_STDLIB_H 1
11536_ACEOF
11537
11538fi
11539
11540done
11541
6a29c58e 11542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
98399780 11543$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
d0ac1c44 11544if ${ac_cv_func_malloc_0_nonnull+:} false; then :
98399780
YQ
11545 $as_echo_n "(cached) " >&6
11546else
11547 if test "$cross_compiling" = yes; then :
6a29c58e
YQ
11548 case "$host_os" in
11549 # Guess yes on platforms where we know the result.
5e8754f9 11550 *-gnu* | freebsd* | netbsd* | openbsd* \
6a29c58e
YQ
11551 | hpux* | solaris* | cygwin* | mingw*)
11552 ac_cv_func_malloc_0_nonnull=yes ;;
11553 # If we don't know, assume the worst.
11554 *) ac_cv_func_malloc_0_nonnull=no ;;
11555 esac
11556
98399780
YQ
11557else
11558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11559/* end confdefs.h. */
11560#if defined STDC_HEADERS || defined HAVE_STDLIB_H
6a29c58e
YQ
11561 # include <stdlib.h>
11562 #else
11563 char *malloc ();
11564 #endif
98399780
YQ
11565
11566int
11567main ()
11568{
49e4877c
PA
11569char *p = malloc (0);
11570 int result = !p;
11571 free (p);
11572 return result;
98399780
YQ
11573 ;
11574 return 0;
11575}
6a29c58e 11576
98399780
YQ
11577_ACEOF
11578if ac_fn_c_try_run "$LINENO"; then :
11579 ac_cv_func_malloc_0_nonnull=yes
11580else
11581 ac_cv_func_malloc_0_nonnull=no
11582fi
11583rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11584 conftest.$ac_objext conftest.beam conftest.$ac_ext
11585fi
11586
6a29c58e 11587
98399780
YQ
11588fi
11589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
11590$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
6a29c58e 11591 if test $ac_cv_func_malloc_0_nonnull = yes; then :
98399780
YQ
11592 gl_cv_func_malloc_0_nonnull=1
11593else
11594 gl_cv_func_malloc_0_nonnull=0
11595fi
11596
11597
11598cat >>confdefs.h <<_ACEOF
11599#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
11600_ACEOF
11601
11602
11603
88b48903
WN
11604
11605
472fa5ee
SM
11606
11607
11608
8690e634
JK
11609 GNULIB_BTOWC=0;
11610 GNULIB_WCTOB=0;
11611 GNULIB_MBSINIT=0;
11612 GNULIB_MBRTOWC=0;
11613 GNULIB_MBRLEN=0;
11614 GNULIB_MBSRTOWCS=0;
11615 GNULIB_MBSNRTOWCS=0;
11616 GNULIB_WCRTOMB=0;
11617 GNULIB_WCSRTOMBS=0;
11618 GNULIB_WCSNRTOMBS=0;
11619 GNULIB_WCWIDTH=0;
11620 GNULIB_WMEMCHR=0;
11621 GNULIB_WMEMCMP=0;
11622 GNULIB_WMEMCPY=0;
11623 GNULIB_WMEMMOVE=0;
11624 GNULIB_WMEMSET=0;
11625 GNULIB_WCSLEN=0;
11626 GNULIB_WCSNLEN=0;
11627 GNULIB_WCSCPY=0;
11628 GNULIB_WCPCPY=0;
11629 GNULIB_WCSNCPY=0;
11630 GNULIB_WCPNCPY=0;
11631 GNULIB_WCSCAT=0;
11632 GNULIB_WCSNCAT=0;
11633 GNULIB_WCSCMP=0;
11634 GNULIB_WCSNCMP=0;
11635 GNULIB_WCSCASECMP=0;
11636 GNULIB_WCSNCASECMP=0;
11637 GNULIB_WCSCOLL=0;
11638 GNULIB_WCSXFRM=0;
11639 GNULIB_WCSDUP=0;
11640 GNULIB_WCSCHR=0;
11641 GNULIB_WCSRCHR=0;
11642 GNULIB_WCSCSPN=0;
11643 GNULIB_WCSSPN=0;
11644 GNULIB_WCSPBRK=0;
11645 GNULIB_WCSSTR=0;
11646 GNULIB_WCSTOK=0;
11647 GNULIB_WCSWIDTH=0;
11648 HAVE_BTOWC=1;
11649 HAVE_MBSINIT=1;
11650 HAVE_MBRTOWC=1;
11651 HAVE_MBRLEN=1;
11652 HAVE_MBSRTOWCS=1;
11653 HAVE_MBSNRTOWCS=1;
11654 HAVE_WCRTOMB=1;
11655 HAVE_WCSRTOMBS=1;
11656 HAVE_WCSNRTOMBS=1;
11657 HAVE_WMEMCHR=1;
11658 HAVE_WMEMCMP=1;
11659 HAVE_WMEMCPY=1;
11660 HAVE_WMEMMOVE=1;
11661 HAVE_WMEMSET=1;
11662 HAVE_WCSLEN=1;
11663 HAVE_WCSNLEN=1;
11664 HAVE_WCSCPY=1;
11665 HAVE_WCPCPY=1;
11666 HAVE_WCSNCPY=1;
11667 HAVE_WCPNCPY=1;
11668 HAVE_WCSCAT=1;
11669 HAVE_WCSNCAT=1;
11670 HAVE_WCSCMP=1;
11671 HAVE_WCSNCMP=1;
11672 HAVE_WCSCASECMP=1;
11673 HAVE_WCSNCASECMP=1;
11674 HAVE_WCSCOLL=1;
11675 HAVE_WCSXFRM=1;
11676 HAVE_WCSDUP=1;
11677 HAVE_WCSCHR=1;
11678 HAVE_WCSRCHR=1;
11679 HAVE_WCSCSPN=1;
11680 HAVE_WCSSPN=1;
11681 HAVE_WCSPBRK=1;
11682 HAVE_WCSSTR=1;
11683 HAVE_WCSTOK=1;
11684 HAVE_WCSWIDTH=1;
11685 HAVE_DECL_WCTOB=1;
11686 HAVE_DECL_WCWIDTH=1;
11687 REPLACE_MBSTATE_T=0;
11688 REPLACE_BTOWC=0;
11689 REPLACE_WCTOB=0;
11690 REPLACE_MBSINIT=0;
11691 REPLACE_MBRTOWC=0;
11692 REPLACE_MBRLEN=0;
11693 REPLACE_MBSRTOWCS=0;
11694 REPLACE_MBSNRTOWCS=0;
11695 REPLACE_WCRTOMB=0;
11696 REPLACE_WCSRTOMBS=0;
11697 REPLACE_WCSNRTOMBS=0;
11698 REPLACE_WCWIDTH=0;
11699 REPLACE_WCSWIDTH=0;
11700
11701
11702
11703
11704
11705
11706
11707
472fa5ee
SM
11708
11709
11710
11711
11712
11713
8690e634
JK
11714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
11715$as_echo_n "checking for a traditional japanese locale... " >&6; }
d0ac1c44 11716if ${gt_cv_locale_ja+:} false; then :
8690e634
JK
11717 $as_echo_n "(cached) " >&6
11718else
11719
11720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11721/* end confdefs.h. */
11722
11723#include <locale.h>
11724#include <time.h>
11725#if HAVE_LANGINFO_CODESET
11726# include <langinfo.h>
11727#endif
11728#include <stdlib.h>
11729#include <string.h>
11730struct tm t;
11731char buf[16];
11732int main ()
11733{
5e8754f9 11734 const char *p;
8690e634 11735 /* Check whether the given locale name is recognized by the system. */
5e8754f9 11736#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8690e634
JK
11737 /* On native Windows, setlocale(category, "") looks at the system settings,
11738 not at the environment variables. Also, when an encoding suffix such
11739 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
11740 category of the locale to "C". */
11741 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
11742 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
11743 return 1;
5e8754f9 11744#else
8690e634 11745 if (setlocale (LC_ALL, "") == NULL) return 1;
5e8754f9 11746#endif
8690e634
JK
11747 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
11748 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
11749 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
11750 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
11751 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
11752 some unit tests fail.
11753 On MirBSD 10, when an unsupported locale is specified, setlocale()
11754 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
5e8754f9 11755#if HAVE_LANGINFO_CODESET
8690e634
JK
11756 {
11757 const char *cs = nl_langinfo (CODESET);
11758 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
11759 || strcmp (cs, "UTF-8") == 0)
11760 return 1;
11761 }
5e8754f9
SDJ
11762#endif
11763#ifdef __CYGWIN__
8690e634
JK
11764 /* On Cygwin, avoid locale names without encoding suffix, because the
11765 locale_charset() function relies on the encoding suffix. Note that
11766 LC_ALL is set on the command line. */
11767 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
5e8754f9 11768#endif
8690e634
JK
11769 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
11770 on Cygwin 1.5.x. */
11771 if (MB_CUR_MAX == 1)
11772 return 1;
11773 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
11774 This excludes the UTF-8 encoding (except on MirBSD). */
5e8754f9
SDJ
11775 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
11776 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
11777 for (p = buf; *p != '\0'; p++)
11778 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
11779 return 1;
8690e634
JK
11780 return 0;
11781}
11782
11783_ACEOF
11784 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11785 (eval $ac_link) 2>&5
11786 ac_status=$?
11787 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11788 test $ac_status = 0; } && test -s conftest$ac_exeext; then
11789 case "$host_os" in
11790 # Handle native Windows specially, because there setlocale() interprets
11791 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
11792 # "fr" or "fra" as "French" or "French_France.1252",
11793 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
11794 # "ja" as "Japanese" or "Japanese_Japan.932",
11795 # and similar.
11796 mingw*)
11797 # Note that on native Windows, the Japanese locale is
11798 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
11799 # cannot use it here.
11800 gt_cv_locale_ja=none
11801 ;;
11802 *)
11803 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
11804 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
11805 # configure script would override the LC_ALL setting. Likewise for
11806 # LC_CTYPE, which is also set at the beginning of the configure script.
11807 # Test for the AIX locale name.
11808 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11809 gt_cv_locale_ja=ja_JP
11810 else
11811 # Test for the locale name with explicit encoding suffix.
11812 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11813 gt_cv_locale_ja=ja_JP.EUC-JP
11814 else
11815 # Test for the HP-UX, OSF/1, NetBSD locale name.
11816 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11817 gt_cv_locale_ja=ja_JP.eucJP
11818 else
11819 # Test for the IRIX, FreeBSD locale name.
11820 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11821 gt_cv_locale_ja=ja_JP.EUC
11822 else
11823 # Test for the Solaris 7 locale name.
11824 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11825 gt_cv_locale_ja=ja
11826 else
11827 # Special test for NetBSD 1.6.
11828 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
11829 gt_cv_locale_ja=ja_JP.eucJP
11830 else
11831 # None found.
11832 gt_cv_locale_ja=none
11833 fi
11834 fi
11835 fi
11836 fi
11837 fi
11838 fi
11839 ;;
11840 esac
11841 fi
11842 rm -fr conftest*
11843
11844fi
11845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
11846$as_echo "$gt_cv_locale_ja" >&6; }
11847 LOCALE_JA=$gt_cv_locale_ja
11848
11849
11850
11851
11852
11853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
11854$as_echo_n "checking for a transitional chinese locale... " >&6; }
d0ac1c44 11855if ${gt_cv_locale_zh_CN+:} false; then :
8690e634
JK
11856 $as_echo_n "(cached) " >&6
11857else
11858
11859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11860/* end confdefs.h. */
11861
11862#include <locale.h>
11863#include <stdlib.h>
11864#include <time.h>
11865#if HAVE_LANGINFO_CODESET
11866# include <langinfo.h>
11867#endif
11868#include <stdlib.h>
11869#include <string.h>
11870struct tm t;
11871char buf[16];
11872int main ()
11873{
5e8754f9 11874 const char *p;
8690e634 11875 /* Check whether the given locale name is recognized by the system. */
5e8754f9 11876#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8690e634
JK
11877 /* On native Windows, setlocale(category, "") looks at the system settings,
11878 not at the environment variables. Also, when an encoding suffix such
11879 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
11880 category of the locale to "C". */
11881 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
11882 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
11883 return 1;
5e8754f9 11884#else
8690e634 11885 if (setlocale (LC_ALL, "") == NULL) return 1;
5e8754f9 11886#endif
8690e634
JK
11887 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
11888 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
11889 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
11890 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
11891 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
11892 some unit tests fail.
11893 On MirBSD 10, when an unsupported locale is specified, setlocale()
11894 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
5e8754f9 11895#if HAVE_LANGINFO_CODESET
8690e634
JK
11896 {
11897 const char *cs = nl_langinfo (CODESET);
11898 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
11899 || strcmp (cs, "UTF-8") == 0)
11900 return 1;
11901 }
5e8754f9
SDJ
11902#endif
11903#ifdef __CYGWIN__
8690e634
JK
11904 /* On Cygwin, avoid locale names without encoding suffix, because the
11905 locale_charset() function relies on the encoding suffix. Note that
11906 LC_ALL is set on the command line. */
11907 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
5e8754f9 11908#endif
8690e634
JK
11909 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
11910 This excludes the UTF-8 encoding (except on MirBSD). */
5e8754f9
SDJ
11911 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
11912 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
11913 for (p = buf; *p != '\0'; p++)
11914 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
11915 return 1;
8690e634
JK
11916 /* Check whether a typical GB18030 multibyte sequence is recognized as a
11917 single wide character. This excludes the GB2312 and GBK encodings. */
11918 if (mblen ("\203\062\332\066", 5) != 4)
11919 return 1;
11920 return 0;
11921}
11922
11923_ACEOF
11924 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11925 (eval $ac_link) 2>&5
11926 ac_status=$?
11927 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11928 test $ac_status = 0; } && test -s conftest$ac_exeext; then
11929 case "$host_os" in
11930 # Handle native Windows specially, because there setlocale() interprets
11931 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
11932 # "fr" or "fra" as "French" or "French_France.1252",
11933 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
11934 # "ja" as "Japanese" or "Japanese_Japan.932",
11935 # and similar.
11936 mingw*)
11937 # Test for the hypothetical native Windows locale name.
11938 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11939 gt_cv_locale_zh_CN=Chinese_China.54936
11940 else
11941 # None found.
11942 gt_cv_locale_zh_CN=none
11943 fi
11944 ;;
11945 solaris2.8)
11946 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
11947 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
11948 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
11949 gt_cv_locale_zh_CN=none
11950 ;;
11951 *)
11952 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
11953 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
11954 # configure script would override the LC_ALL setting. Likewise for
11955 # LC_CTYPE, which is also set at the beginning of the configure script.
11956 # Test for the locale name without encoding suffix.
11957 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11958 gt_cv_locale_zh_CN=zh_CN
11959 else
11960 # Test for the locale name with explicit encoding suffix.
11961 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11962 gt_cv_locale_zh_CN=zh_CN.GB18030
11963 else
11964 # None found.
11965 gt_cv_locale_zh_CN=none
11966 fi
11967 fi
11968 ;;
11969 esac
11970 else
11971 # If there was a link error, due to mblen(), the system is so old that
11972 # it certainly doesn't have a chinese locale.
11973 gt_cv_locale_zh_CN=none
11974 fi
11975 rm -fr conftest*
11976
11977fi
11978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
11979$as_echo "$gt_cv_locale_zh_CN" >&6; }
11980 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
11981
11982
11983
11984
11985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
11986$as_echo_n "checking for a french Unicode locale... " >&6; }
d0ac1c44 11987if ${gt_cv_locale_fr_utf8+:} false; then :
8690e634
JK
11988 $as_echo_n "(cached) " >&6
11989else
11990
11991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11992/* end confdefs.h. */
11993
11994#include <locale.h>
11995#include <time.h>
11996#if HAVE_LANGINFO_CODESET
11997# include <langinfo.h>
11998#endif
11999#include <stdlib.h>
12000#include <string.h>
12001struct tm t;
12002char buf[16];
12003int main () {
12004 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
12005 imitates locale dependent behaviour by looking at the environment
12006 variables, and all locales use the UTF-8 encoding. */
12007#if !(defined __BEOS__ || defined __HAIKU__)
12008 /* Check whether the given locale name is recognized by the system. */
5e8754f9 12009# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8690e634
JK
12010 /* On native Windows, setlocale(category, "") looks at the system settings,
12011 not at the environment variables. Also, when an encoding suffix such
12012 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
12013 category of the locale to "C". */
12014 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
12015 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
12016 return 1;
12017# else
12018 if (setlocale (LC_ALL, "") == NULL) return 1;
12019# endif
12020 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
12021 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
12022 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
12023 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
12024 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
12025 some unit tests fail. */
12026# if HAVE_LANGINFO_CODESET
12027 {
12028 const char *cs = nl_langinfo (CODESET);
12029 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
12030 return 1;
12031 }
12032# endif
12033# ifdef __CYGWIN__
12034 /* On Cygwin, avoid locale names without encoding suffix, because the
12035 locale_charset() function relies on the encoding suffix. Note that
12036 LC_ALL is set on the command line. */
12037 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
12038# endif
12039 /* Check whether in the abbreviation of the second month, the second
12040 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
12041 two bytes long, with UTF-8 encoding. */
12042 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
12043 if (strftime (buf, sizeof (buf), "%b", &t) < 4
12044 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
12045 return 1;
12046#endif
12047#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
12048 /* Check whether the decimal separator is a comma.
12049 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
12050 are nl_langinfo(RADIXCHAR) are both ".". */
12051 if (localeconv () ->decimal_point[0] != ',') return 1;
12052#endif
12053 return 0;
12054}
12055
12056_ACEOF
12057 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12058 (eval $ac_link) 2>&5
12059 ac_status=$?
12060 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12061 test $ac_status = 0; } && test -s conftest$ac_exeext; then
12062 case "$host_os" in
12063 # Handle native Windows specially, because there setlocale() interprets
12064 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
12065 # "fr" or "fra" as "French" or "French_France.1252",
12066 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
12067 # "ja" as "Japanese" or "Japanese_Japan.932",
12068 # and similar.
12069 mingw*)
12070 # Test for the hypothetical native Windows locale name.
12071 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12072 gt_cv_locale_fr_utf8=French_France.65001
12073 else
12074 # None found.
12075 gt_cv_locale_fr_utf8=none
12076 fi
12077 ;;
12078 *)
12079 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
12080 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
12081 # configure script would override the LC_ALL setting. Likewise for
12082 # LC_CTYPE, which is also set at the beginning of the configure script.
12083 # Test for the usual locale name.
12084 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12085 gt_cv_locale_fr_utf8=fr_FR
12086 else
12087 # Test for the locale name with explicit encoding suffix.
12088 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12089 gt_cv_locale_fr_utf8=fr_FR.UTF-8
12090 else
12091 # Test for the Solaris 7 locale name.
12092 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12093 gt_cv_locale_fr_utf8=fr.UTF-8
12094 else
12095 # None found.
12096 gt_cv_locale_fr_utf8=none
12097 fi
12098 fi
12099 fi
12100 ;;
12101 esac
12102 fi
12103 rm -fr conftest*
12104
12105fi
12106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
12107$as_echo "$gt_cv_locale_fr_utf8" >&6; }
12108 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
12109
12110
12111
12112
12113
12114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
12115$as_echo_n "checking for a traditional french locale... " >&6; }
d0ac1c44 12116if ${gt_cv_locale_fr+:} false; then :
8690e634
JK
12117 $as_echo_n "(cached) " >&6
12118else
12119
12120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12121/* end confdefs.h. */
12122
12123#include <locale.h>
12124#include <time.h>
12125#if HAVE_LANGINFO_CODESET
12126# include <langinfo.h>
12127#endif
12128#include <stdlib.h>
12129#include <string.h>
12130struct tm t;
12131char buf[16];
12132int main () {
12133 /* Check whether the given locale name is recognized by the system. */
5e8754f9 12134#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8690e634
JK
12135 /* On native Windows, setlocale(category, "") looks at the system settings,
12136 not at the environment variables. Also, when an encoding suffix such
12137 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
12138 category of the locale to "C". */
12139 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
12140 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
12141 return 1;
5e8754f9 12142#else
8690e634 12143 if (setlocale (LC_ALL, "") == NULL) return 1;
5e8754f9 12144#endif
8690e634
JK
12145 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
12146 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
12147 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
12148 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
12149 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
12150 some unit tests fail.
12151 On MirBSD 10, when an unsupported locale is specified, setlocale()
12152 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
5e8754f9 12153#if HAVE_LANGINFO_CODESET
8690e634
JK
12154 {
12155 const char *cs = nl_langinfo (CODESET);
12156 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
12157 || strcmp (cs, "UTF-8") == 0)
12158 return 1;
12159 }
5e8754f9
SDJ
12160#endif
12161#ifdef __CYGWIN__
8690e634
JK
12162 /* On Cygwin, avoid locale names without encoding suffix, because the
12163 locale_charset() function relies on the encoding suffix. Note that
12164 LC_ALL is set on the command line. */
12165 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
5e8754f9 12166#endif
8690e634
JK
12167 /* Check whether in the abbreviation of the second month, the second
12168 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
12169 one byte long. This excludes the UTF-8 encoding. */
12170 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
12171 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
5e8754f9 12172#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
8690e634
JK
12173 /* Check whether the decimal separator is a comma.
12174 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
12175 are nl_langinfo(RADIXCHAR) are both ".". */
12176 if (localeconv () ->decimal_point[0] != ',') return 1;
7a6dbc2f 12177#endif
5e8754f9 12178 return 0;
8690e634
JK
12179}
12180
12181_ACEOF
12182 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12183 (eval $ac_link) 2>&5
12184 ac_status=$?
12185 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12186 test $ac_status = 0; } && test -s conftest$ac_exeext; then
12187 case "$host_os" in
12188 # Handle native Windows specially, because there setlocale() interprets
12189 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
12190 # "fr" or "fra" as "French" or "French_France.1252",
12191 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
12192 # "ja" as "Japanese" or "Japanese_Japan.932",
12193 # and similar.
12194 mingw*)
12195 # Test for the native Windows locale name.
12196 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12197 gt_cv_locale_fr=French_France.1252
12198 else
12199 # None found.
12200 gt_cv_locale_fr=none
12201 fi
12202 ;;
12203 *)
12204 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
12205 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
12206 # configure script would override the LC_ALL setting. Likewise for
12207 # LC_CTYPE, which is also set at the beginning of the configure script.
12208 # Test for the usual locale name.
12209 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12210 gt_cv_locale_fr=fr_FR
12211 else
12212 # Test for the locale name with explicit encoding suffix.
12213 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12214 gt_cv_locale_fr=fr_FR.ISO-8859-1
12215 else
12216 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
12217 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12218 gt_cv_locale_fr=fr_FR.ISO8859-1
12219 else
12220 # Test for the HP-UX locale name.
12221 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12222 gt_cv_locale_fr=fr_FR.iso88591
12223 else
12224 # Test for the Solaris 7 locale name.
12225 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12226 gt_cv_locale_fr=fr
12227 else
12228 # None found.
12229 gt_cv_locale_fr=none
12230 fi
12231 fi
12232 fi
12233 fi
12234 fi
12235 ;;
12236 esac
12237 fi
12238 rm -fr conftest*
12239
12240fi
6ec2e0f5
SDJ
12241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
12242$as_echo "$gt_cv_locale_fr" >&6; }
12243 LOCALE_FR=$gt_cv_locale_fr
12244
12245
12246
12247
12248
12249
12250
472fa5ee
SM
12251
12252
12253
12254
12255
12256
12257 GNULIB_FFSL=0;
12258 GNULIB_FFSLL=0;
6ec2e0f5
SDJ
12259 GNULIB_MEMCHR=0;
12260 GNULIB_MEMMEM=0;
12261 GNULIB_MEMPCPY=0;
12262 GNULIB_MEMRCHR=0;
12263 GNULIB_RAWMEMCHR=0;
12264 GNULIB_STPCPY=0;
12265 GNULIB_STPNCPY=0;
12266 GNULIB_STRCHRNUL=0;
12267 GNULIB_STRDUP=0;
12268 GNULIB_STRNCAT=0;
12269 GNULIB_STRNDUP=0;
12270 GNULIB_STRNLEN=0;
12271 GNULIB_STRPBRK=0;
12272 GNULIB_STRSEP=0;
12273 GNULIB_STRSTR=0;
12274 GNULIB_STRCASESTR=0;
12275 GNULIB_STRTOK_R=0;
12276 GNULIB_MBSLEN=0;
12277 GNULIB_MBSNLEN=0;
12278 GNULIB_MBSCHR=0;
12279 GNULIB_MBSRCHR=0;
12280 GNULIB_MBSSTR=0;
12281 GNULIB_MBSCASECMP=0;
12282 GNULIB_MBSNCASECMP=0;
12283 GNULIB_MBSPCASECMP=0;
12284 GNULIB_MBSCASESTR=0;
12285 GNULIB_MBSCSPN=0;
12286 GNULIB_MBSPBRK=0;
12287 GNULIB_MBSSPN=0;
12288 GNULIB_MBSSEP=0;
12289 GNULIB_MBSTOK_R=0;
12290 GNULIB_STRERROR=0;
12291 GNULIB_STRERROR_R=0;
12292 GNULIB_STRSIGNAL=0;
12293 GNULIB_STRVERSCMP=0;
12294 HAVE_MBSLEN=0;
5e8754f9 12295 HAVE_FFSL=1;
6ec2e0f5
SDJ
12296 HAVE_FFSLL=1;
12297 HAVE_MEMCHR=1;
12298 HAVE_DECL_MEMMEM=1;
12299 HAVE_MEMPCPY=1;
12300 HAVE_DECL_MEMRCHR=1;
12301 HAVE_RAWMEMCHR=1;
12302 HAVE_STPCPY=1;
12303 HAVE_STPNCPY=1;
12304 HAVE_STRCHRNUL=1;
12305 HAVE_DECL_STRDUP=1;
12306 HAVE_DECL_STRNDUP=1;
12307 HAVE_DECL_STRNLEN=1;
12308 HAVE_STRPBRK=1;
12309 HAVE_STRSEP=1;
12310 HAVE_STRCASESTR=1;
12311 HAVE_DECL_STRTOK_R=1;
12312 HAVE_DECL_STRERROR_R=1;
12313 HAVE_DECL_STRSIGNAL=1;
12314 HAVE_STRVERSCMP=1;
12315 REPLACE_MEMCHR=0;
12316 REPLACE_MEMMEM=0;
12317 REPLACE_STPNCPY=0;
12318 REPLACE_STRDUP=0;
12319 REPLACE_STRSTR=0;
12320 REPLACE_STRCASESTR=0;
5e8754f9 12321 REPLACE_STRCHRNUL=0;
6ec2e0f5
SDJ
12322 REPLACE_STRERROR=0;
12323 REPLACE_STRERROR_R=0;
5e8754f9
SDJ
12324 REPLACE_STRNCAT=0;
12325 REPLACE_STRNDUP=0;
12326 REPLACE_STRNLEN=0;
6ec2e0f5 12327 REPLACE_STRSIGNAL=0;
5e8754f9 12328 REPLACE_STRTOK_R=0;
6ec2e0f5
SDJ
12329 UNDEFINE_STRTOK_R=0;
12330
12331
12332
12333
12334
12335 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
12336 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
12337 # irrelevant for anonymous mappings.
12338 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
d0ac1c44 12339if test "x$ac_cv_func_mmap" = xyes; then :
6ec2e0f5
SDJ
12340 gl_have_mmap=yes
12341else
12342 gl_have_mmap=no
12343fi
12344
12345
12346 # Try to allow MAP_ANONYMOUS.
12347 gl_have_mmap_anonymous=no
12348 if test $gl_have_mmap = yes; then
12349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
12350$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
12351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12352/* end confdefs.h. */
12353
12354#include <sys/mman.h>
12355#ifdef MAP_ANONYMOUS
12356 I cannot identify this map
12357#endif
12358
12359_ACEOF
12360if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12361 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
12362 gl_have_mmap_anonymous=yes
12363fi
12364rm -f conftest*
12365
12366 if test $gl_have_mmap_anonymous != yes; then
12367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12368/* end confdefs.h. */
12369
12370#include <sys/mman.h>
12371#ifdef MAP_ANON
12372 I cannot identify this map
12373#endif
12374
12375_ACEOF
12376if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12377 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
12378
12379$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
12380
12381 gl_have_mmap_anonymous=yes
12382fi
12383rm -f conftest*
12384
12385 fi
12386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
12387$as_echo "$gl_have_mmap_anonymous" >&6; }
12388 if test $gl_have_mmap_anonymous = yes; then
12389
12390$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
12391
12392 fi
12393 fi
12394
12395
472fa5ee
SM
12396 :
12397
12398
12399
12400
12401
12402
12403 :
12404
12405
12406
12407
6ec2e0f5
SDJ
12408
12409
12410
12411
12412 if test $HAVE_MEMCHR = 1; then
12413 # Detect platform-specific bugs in some versions of glibc:
12414 # memchr should not dereference anything with length 0
5e8754f9 12415 # http://bugzilla.redhat.com/499689
6ec2e0f5 12416 # memchr should not dereference overestimated length after a match
5e8754f9
SDJ
12417 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
12418 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
6ec2e0f5
SDJ
12419 # Assume that memchr works on platforms that lack mprotect.
12420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
12421$as_echo_n "checking whether memchr works... " >&6; }
d0ac1c44 12422if ${gl_cv_func_memchr_works+:} false; then :
6ec2e0f5
SDJ
12423 $as_echo_n "(cached) " >&6
12424else
12425 if test "$cross_compiling" = yes; then :
5e8754f9 12426 gl_cv_func_memchr_works="guessing no"
6ec2e0f5
SDJ
12427else
12428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12429/* end confdefs.h. */
12430
12431#include <string.h>
12432#if HAVE_SYS_MMAN_H
12433# include <fcntl.h>
12434# include <unistd.h>
12435# include <sys/types.h>
12436# include <sys/mman.h>
12437# ifndef MAP_FILE
12438# define MAP_FILE 0
12439# endif
12440#endif
12441
12442int
12443main ()
12444{
12445
12446 int result = 0;
12447 char *fence = NULL;
12448#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
12449# if HAVE_MAP_ANONYMOUS
12450 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
12451 const int fd = -1;
12452# else /* !HAVE_MAP_ANONYMOUS */
12453 const int flags = MAP_FILE | MAP_PRIVATE;
12454 int fd = open ("/dev/zero", O_RDONLY, 0666);
12455 if (fd >= 0)
12456# endif
12457 {
12458 int pagesize = getpagesize ();
12459 char *two_pages =
12460 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
12461 flags, fd, 0);
12462 if (two_pages != (char *)(-1)
12463 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
12464 fence = two_pages + pagesize;
12465 }
12466#endif
12467 if (fence)
12468 {
12469 if (memchr (fence, 0, 0))
12470 result |= 1;
12471 strcpy (fence - 9, "12345678");
12472 if (memchr (fence - 9, 0, 79) != fence - 1)
12473 result |= 2;
12474 if (memchr (fence - 1, 0, 3) != fence - 1)
12475 result |= 4;
12476 }
12477 return result;
12478
12479 ;
12480 return 0;
12481}
12482_ACEOF
12483if ac_fn_c_try_run "$LINENO"; then :
12484 gl_cv_func_memchr_works=yes
12485else
12486 gl_cv_func_memchr_works=no
12487fi
12488rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12489 conftest.$ac_objext conftest.beam conftest.$ac_ext
12490fi
12491
12492fi
12493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
12494$as_echo "$gl_cv_func_memchr_works" >&6; }
5e8754f9
SDJ
12495 if test "$gl_cv_func_memchr_works" != yes; then
12496 REPLACE_MEMCHR=1
12497 fi
6ec2e0f5
SDJ
12498 fi
12499
472fa5ee
SM
12500
12501 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
d0ac1c44 12502if test "x$ac_cv_have_decl_memmem" = xyes; then :
6ec2e0f5
SDJ
12503 ac_have_decl=1
12504else
12505 ac_have_decl=0
12506fi
12507
12508cat >>confdefs.h <<_ACEOF
12509#define HAVE_DECL_MEMMEM $ac_have_decl
12510_ACEOF
12511
12512
12513
12514
12515
472fa5ee 12516
6ec2e0f5
SDJ
12517 for ac_func in memmem
12518do :
12519 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
d0ac1c44 12520if test "x$ac_cv_func_memmem" = xyes; then :
6ec2e0f5
SDJ
12521 cat >>confdefs.h <<_ACEOF
12522#define HAVE_MEMMEM 1
12523_ACEOF
12524
12525fi
12526done
12527
12528 if test $ac_cv_func_memmem = yes; then
12529 HAVE_MEMMEM=1
12530 else
12531 HAVE_MEMMEM=0
12532 fi
12533
472fa5ee
SM
12534 :
12535
12536
12537
12538
12539
6ec2e0f5
SDJ
12540 if test $ac_cv_have_decl_memmem = no; then
12541 HAVE_DECL_MEMMEM=0
12542 else
12543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
12544$as_echo_n "checking whether memmem works... " >&6; }
d0ac1c44 12545if ${gl_cv_func_memmem_works_always+:} false; then :
6ec2e0f5
SDJ
12546 $as_echo_n "(cached) " >&6
12547else
12548 if test "$cross_compiling" = yes; then :
12549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12550/* end confdefs.h. */
12551
12552#ifdef __GNU_LIBRARY__
12553 #include <features.h>
12554 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
12555 || __GLIBC_MINOR__ > 12)) \
12556 || (__GLIBC__ > 2)) \
12557 || defined __UCLIBC__
12558 Lucky user
12559 #endif
12560#elif defined __CYGWIN__
12561 #include <cygwin/version.h>
12562 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
12563 Lucky user
12564 #endif
12565#else
12566 Lucky user
12567#endif
12568
12569_ACEOF
12570if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12571 $EGREP "Lucky user" >/dev/null 2>&1; then :
12572 gl_cv_func_memmem_works_always="guessing yes"
12573else
12574 gl_cv_func_memmem_works_always="guessing no"
12575fi
12576rm -f conftest*
12577
12578
12579else
12580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12581/* end confdefs.h. */
12582
12583#include <string.h> /* for memmem */
12584#define P "_EF_BF_BD"
12585#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
12586#define NEEDLE P P P P P
12587
12588int
12589main ()
12590{
12591
12592 int result = 0;
12593 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
12594 result |= 1;
12595 /* Check for empty needle behavior. */
12596 {
12597 const char *haystack = "AAA";
12598 if (memmem (haystack, 3, NULL, 0) != haystack)
12599 result |= 2;
12600 }
12601 return result;
12602
12603 ;
12604 return 0;
12605}
12606_ACEOF
12607if ac_fn_c_try_run "$LINENO"; then :
12608 gl_cv_func_memmem_works_always=yes
12609else
12610 gl_cv_func_memmem_works_always=no
12611fi
12612rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12613 conftest.$ac_objext conftest.beam conftest.$ac_ext
12614fi
12615
12616
12617fi
12618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
12619$as_echo "$gl_cv_func_memmem_works_always" >&6; }
12620 case "$gl_cv_func_memmem_works_always" in
12621 *yes) ;;
12622 *)
12623 REPLACE_MEMMEM=1
12624 ;;
12625 esac
12626 fi
12627 :
12628
472fa5ee
SM
12629
12630 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
d0ac1c44 12631if test "x$ac_cv_have_decl_memrchr" = xyes; then :
6ec2e0f5
SDJ
12632 ac_have_decl=1
12633else
12634 ac_have_decl=0
12635fi
12636
12637cat >>confdefs.h <<_ACEOF
12638#define HAVE_DECL_MEMRCHR $ac_have_decl
12639_ACEOF
12640
12641
12642
12643
12644
12645
2d8adcbd
MM
12646
12647
472fa5ee
SM
12648
12649
12650
12651
6ec2e0f5
SDJ
12652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
12653$as_echo_n "checking for promoted mode_t type... " >&6; }
d0ac1c44 12654if ${gl_cv_promoted_mode_t+:} false; then :
6ec2e0f5
SDJ
12655 $as_echo_n "(cached) " >&6
12656else
12657
12658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12659/* end confdefs.h. */
12660#include <sys/types.h>
12661int
12662main ()
12663{
12664typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
12665 ;
12666 return 0;
12667}
12668_ACEOF
12669if ac_fn_c_try_compile "$LINENO"; then :
12670 gl_cv_promoted_mode_t='int'
12671else
12672 gl_cv_promoted_mode_t='mode_t'
12673fi
12674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12675
12676fi
12677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
12678$as_echo "$gl_cv_promoted_mode_t" >&6; }
12679
12680cat >>confdefs.h <<_ACEOF
12681#define PROMOTED_MODE_T $gl_cv_promoted_mode_t
12682_ACEOF
12683
12684
12685
12686
12687
472fa5ee
SM
12688
12689
12690
6ec2e0f5
SDJ
12691 GNULIB_DPRINTF=0;
12692 GNULIB_FCLOSE=0;
12693 GNULIB_FDOPEN=0;
12694 GNULIB_FFLUSH=0;
12695 GNULIB_FGETC=0;
12696 GNULIB_FGETS=0;
12697 GNULIB_FOPEN=0;
12698 GNULIB_FPRINTF=0;
12699 GNULIB_FPRINTF_POSIX=0;
12700 GNULIB_FPURGE=0;
12701 GNULIB_FPUTC=0;
12702 GNULIB_FPUTS=0;
12703 GNULIB_FREAD=0;
12704 GNULIB_FREOPEN=0;
12705 GNULIB_FSCANF=0;
12706 GNULIB_FSEEK=0;
12707 GNULIB_FSEEKO=0;
12708 GNULIB_FTELL=0;
12709 GNULIB_FTELLO=0;
12710 GNULIB_FWRITE=0;
12711 GNULIB_GETC=0;
12712 GNULIB_GETCHAR=0;
12713 GNULIB_GETDELIM=0;
12714 GNULIB_GETLINE=0;
12715 GNULIB_OBSTACK_PRINTF=0;
12716 GNULIB_OBSTACK_PRINTF_POSIX=0;
12717 GNULIB_PCLOSE=0;
12718 GNULIB_PERROR=0;
12719 GNULIB_POPEN=0;
12720 GNULIB_PRINTF=0;
12721 GNULIB_PRINTF_POSIX=0;
12722 GNULIB_PUTC=0;
12723 GNULIB_PUTCHAR=0;
12724 GNULIB_PUTS=0;
12725 GNULIB_REMOVE=0;
12726 GNULIB_RENAME=0;
12727 GNULIB_RENAMEAT=0;
12728 GNULIB_SCANF=0;
12729 GNULIB_SNPRINTF=0;
12730 GNULIB_SPRINTF_POSIX=0;
12731 GNULIB_STDIO_H_NONBLOCKING=0;
12732 GNULIB_STDIO_H_SIGPIPE=0;
12733 GNULIB_TMPFILE=0;
12734 GNULIB_VASPRINTF=0;
12735 GNULIB_VFSCANF=0;
12736 GNULIB_VSCANF=0;
12737 GNULIB_VDPRINTF=0;
12738 GNULIB_VFPRINTF=0;
12739 GNULIB_VFPRINTF_POSIX=0;
12740 GNULIB_VPRINTF=0;
12741 GNULIB_VPRINTF_POSIX=0;
12742 GNULIB_VSNPRINTF=0;
12743 GNULIB_VSPRINTF_POSIX=0;
12744 HAVE_DECL_FPURGE=1;
12745 HAVE_DECL_FSEEKO=1;
12746 HAVE_DECL_FTELLO=1;
12747 HAVE_DECL_GETDELIM=1;
12748 HAVE_DECL_GETLINE=1;
12749 HAVE_DECL_OBSTACK_PRINTF=1;
12750 HAVE_DECL_SNPRINTF=1;
12751 HAVE_DECL_VSNPRINTF=1;
12752 HAVE_DPRINTF=1;
12753 HAVE_FSEEKO=1;
12754 HAVE_FTELLO=1;
12755 HAVE_PCLOSE=1;
12756 HAVE_POPEN=1;
12757 HAVE_RENAMEAT=1;
12758 HAVE_VASPRINTF=1;
12759 HAVE_VDPRINTF=1;
12760 REPLACE_DPRINTF=0;
12761 REPLACE_FCLOSE=0;
12762 REPLACE_FDOPEN=0;
12763 REPLACE_FFLUSH=0;
12764 REPLACE_FOPEN=0;
12765 REPLACE_FPRINTF=0;
12766 REPLACE_FPURGE=0;
12767 REPLACE_FREOPEN=0;
12768 REPLACE_FSEEK=0;
12769 REPLACE_FSEEKO=0;
12770 REPLACE_FTELL=0;
12771 REPLACE_FTELLO=0;
12772 REPLACE_GETDELIM=0;
12773 REPLACE_GETLINE=0;
12774 REPLACE_OBSTACK_PRINTF=0;
12775 REPLACE_PERROR=0;
12776 REPLACE_POPEN=0;
12777 REPLACE_PRINTF=0;
12778 REPLACE_REMOVE=0;
12779 REPLACE_RENAME=0;
12780 REPLACE_RENAMEAT=0;
12781 REPLACE_SNPRINTF=0;
12782 REPLACE_SPRINTF=0;
12783 REPLACE_STDIO_READ_FUNCS=0;
12784 REPLACE_STDIO_WRITE_FUNCS=0;
12785 REPLACE_TMPFILE=0;
12786 REPLACE_VASPRINTF=0;
12787 REPLACE_VDPRINTF=0;
12788 REPLACE_VFPRINTF=0;
12789 REPLACE_VPRINTF=0;
12790 REPLACE_VSNPRINTF=0;
12791 REPLACE_VSPRINTF=0;
12792
12793
12794
2d8adcbd
MM
12795
12796
12797
12798
5e8754f9
SDJ
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
472fa5ee 12824 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
d0ac1c44 12825if test "x$ac_cv_have_decl_setenv" = xyes; then :
6ec2e0f5
SDJ
12826 ac_have_decl=1
12827else
12828 ac_have_decl=0
12829fi
12830
12831cat >>confdefs.h <<_ACEOF
12832#define HAVE_DECL_SETENV $ac_have_decl
12833_ACEOF
12834
12835
12836
12837
12838
12839
472fa5ee
SM
12840
12841
12842
12843
12844 :
12845
12846
12847
12848
12849
6ec2e0f5
SDJ
12850 if test $ac_cv_have_decl_setenv = no; then
12851 HAVE_DECL_SETENV=0
12852 fi
12853
472fa5ee
SM
12854 :
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864 :
12865
6ec2e0f5
SDJ
12866
12867
12868
12869
12870 for ac_header in search.h
12871do :
12872 ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
d0ac1c44 12873if test "x$ac_cv_header_search_h" = xyes; then :
6ec2e0f5
SDJ
12874 cat >>confdefs.h <<_ACEOF
12875#define HAVE_SEARCH_H 1
12876_ACEOF
12877
12878fi
12879
12880done
12881
12882 for ac_func in tsearch
12883do :
12884 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
d0ac1c44 12885if test "x$ac_cv_func_tsearch" = xyes; then :
6ec2e0f5
SDJ
12886 cat >>confdefs.h <<_ACEOF
12887#define HAVE_TSEARCH 1
12888_ACEOF
12889
12890fi
12891done
12892
12893
12894
12895
12896 GNULIB_PTHREAD_SIGMASK=0;
12897 GNULIB_RAISE=0;
12898 GNULIB_SIGNAL_H_SIGPIPE=0;
12899 GNULIB_SIGPROCMASK=0;
12900 GNULIB_SIGACTION=0;
12901 HAVE_POSIX_SIGNALBLOCKING=1;
12902 HAVE_PTHREAD_SIGMASK=1;
12903 HAVE_RAISE=1;
12904 HAVE_SIGSET_T=1;
12905 HAVE_SIGINFO_T=1;
12906 HAVE_SIGACTION=1;
12907 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
12908
12909 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
12910
12911 HAVE_SIGHANDLER_T=1;
12912 REPLACE_PTHREAD_SIGMASK=0;
12913 REPLACE_RAISE=0;
12914
12915
12916 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
12917 #include <signal.h>
12918 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
12919 #include <sys/types.h>
12920
12921"
d0ac1c44 12922if test "x$ac_cv_type_sigset_t" = xyes; then :
6ec2e0f5
SDJ
12923
12924cat >>confdefs.h <<_ACEOF
12925#define HAVE_SIGSET_T 1
12926_ACEOF
12927
12928gl_cv_type_sigset_t=yes
12929else
12930 gl_cv_type_sigset_t=no
12931fi
12932
12933 if test $gl_cv_type_sigset_t != yes; then
12934 HAVE_SIGSET_T=0
12935 fi
12936
12937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
12938$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
d0ac1c44 12939if ${ac_cv_type_uid_t+:} false; then :
6ec2e0f5
SDJ
12940 $as_echo_n "(cached) " >&6
12941else
12942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12943/* end confdefs.h. */
12944#include <sys/types.h>
12945
12946_ACEOF
12947if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12948 $EGREP "uid_t" >/dev/null 2>&1; then :
12949 ac_cv_type_uid_t=yes
12950else
12951 ac_cv_type_uid_t=no
12952fi
12953rm -f conftest*
12954
12955fi
12956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
12957$as_echo "$ac_cv_type_uid_t" >&6; }
12958if test $ac_cv_type_uid_t = no; then
12959
12960$as_echo "#define uid_t int" >>confdefs.h
12961
12962
12963$as_echo "#define gid_t int" >>confdefs.h
12964
12965fi
12966
12967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
12968$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
d0ac1c44 12969if ${ac_cv_header_stdbool_h+:} false; then :
6ec2e0f5
SDJ
12970 $as_echo_n "(cached) " >&6
12971else
12972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12973/* end confdefs.h. */
12974
12975 #include <stdbool.h>
12976
12977 #ifdef __cplusplus
12978 typedef bool Bool;
12979 #else
12980 typedef _Bool Bool;
12981 #ifndef bool
12982 "error: bool is not defined"
12983 #endif
12984 #ifndef false
12985 "error: false is not defined"
12986 #endif
12987 #if false
12988 "error: false is not 0"
12989 #endif
12990 #ifndef true
12991 "error: true is not defined"
12992 #endif
12993 #if true != 1
12994 "error: true is not 1"
12995 #endif
12996 #endif
12997
12998 #ifndef __bool_true_false_are_defined
12999 "error: __bool_true_false_are_defined is not defined"
13000 #endif
13001
13002 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
13003
13004 char a[true == 1 ? 1 : -1];
13005 char b[false == 0 ? 1 : -1];
13006 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
13007 char d[(bool) 0.5 == true ? 1 : -1];
13008 /* See body of main program for 'e'. */
13009 char f[(Bool) 0.0 == false ? 1 : -1];
13010 char g[true];
13011 char h[sizeof (Bool)];
13012 char i[sizeof s.t];
13013 enum { j = false, k = true, l = false * true, m = true * 256 };
13014 /* The following fails for
13015 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
13016 Bool n[m];
13017 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
13018 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
13019 /* Catch a bug in an HP-UX C compiler. See
5e8754f9
SDJ
13020 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
13021 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
6ec2e0f5
SDJ
13022 */
13023 Bool q = true;
13024 Bool *pq = &q;
13025 bool *qq = &q;
13026
13027int
13028main ()
13029{
13030
13031 bool e = &s;
13032 *pq |= q; *pq |= ! q;
13033 *qq |= q; *qq |= ! q;
13034 /* Refer to every declared value, to avoid compiler optimizations. */
13035 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
13036 + !m + !n + !o + !p + !q + !pq + !qq);
13037
13038 ;
13039 return 0;
13040}
13041_ACEOF
13042if ac_fn_c_try_compile "$LINENO"; then :
13043 ac_cv_header_stdbool_h=yes
13044else
13045 ac_cv_header_stdbool_h=no
13046fi
13047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13048fi
13049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
13050$as_echo "$ac_cv_header_stdbool_h" >&6; }
13051 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
d0ac1c44 13052if test "x$ac_cv_type__Bool" = xyes; then :
6ec2e0f5
SDJ
13053
13054cat >>confdefs.h <<_ACEOF
13055#define HAVE__BOOL 1
13056_ACEOF
13057
13058
13059fi
13060
13061
13062
13063 REPLACE_NULL=0;
13064 HAVE_MAX_ALIGN_T=1;
13065 HAVE_WCHAR_T=1;
13066
13067
13068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
13069$as_echo_n "checking for wchar_t... " >&6; }
d0ac1c44 13070if ${gt_cv_c_wchar_t+:} false; then :
6ec2e0f5
SDJ
13071 $as_echo_n "(cached) " >&6
13072else
13073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13074/* end confdefs.h. */
13075#include <stddef.h>
13076 wchar_t foo = (wchar_t)'\0';
13077int
13078main ()
13079{
13080
13081 ;
13082 return 0;
13083}
13084_ACEOF
13085if ac_fn_c_try_compile "$LINENO"; then :
13086 gt_cv_c_wchar_t=yes
13087else
13088 gt_cv_c_wchar_t=no
13089fi
13090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13091fi
13092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
13093$as_echo "$gt_cv_c_wchar_t" >&6; }
13094 if test $gt_cv_c_wchar_t = yes; then
13095
13096$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
13097
13098 fi
13099
13100
13101
472fa5ee
SM
13102
13103
13104
13105
13106 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
d0ac1c44 13107if test "x$ac_cv_have_decl_strdup" = xyes; then :
6ec2e0f5
SDJ
13108 ac_have_decl=1
13109else
13110 ac_have_decl=0
13111fi
13112
13113cat >>confdefs.h <<_ACEOF
13114#define HAVE_DECL_STRDUP $ac_have_decl
13115_ACEOF
13116
13117
472fa5ee 13118
6ec2e0f5
SDJ
13119 REPLACE_STRERROR_0=0
13120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
13121$as_echo_n "checking whether strerror(0) succeeds... " >&6; }
d0ac1c44 13122if ${gl_cv_func_strerror_0_works+:} false; then :
6ec2e0f5
SDJ
13123 $as_echo_n "(cached) " >&6
13124else
13125 if test "$cross_compiling" = yes; then :
13126 case "$host_os" in
5e8754f9
SDJ
13127 # Guess yes on glibc systems.
13128 *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
13129 # If we don't know, assume the worst.
13130 *) gl_cv_func_strerror_0_works="guessing no" ;;
6ec2e0f5
SDJ
13131 esac
13132
13133else
13134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13135/* end confdefs.h. */
13136#include <string.h>
13137 #include <errno.h>
13138
13139int
13140main ()
13141{
13142int result = 0;
13143 char *str;
13144 errno = 0;
13145 str = strerror (0);
13146 if (!*str) result |= 1;
13147 if (errno) result |= 2;
13148 if (strstr (str, "nknown") || strstr (str, "ndefined"))
13149 result |= 4;
13150 return result;
13151 ;
13152 return 0;
13153}
13154_ACEOF
13155if ac_fn_c_try_run "$LINENO"; then :
13156 gl_cv_func_strerror_0_works=yes
13157else
13158 gl_cv_func_strerror_0_works=no
13159fi
13160rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13161 conftest.$ac_objext conftest.beam conftest.$ac_ext
13162fi
13163
13164
13165fi
13166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
13167$as_echo "$gl_cv_func_strerror_0_works" >&6; }
13168 case "$gl_cv_func_strerror_0_works" in
13169 *yes) ;;
13170 *)
13171 REPLACE_STRERROR_0=1
13172
13173$as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
13174
13175 ;;
13176 esac
13177
13178
13179
13180
13181
13182
13183
13184
13185
13186
13187
13188
13189 if test $gl_cv_have_include_next = yes; then
13190 gl_cv_next_string_h='<'string.h'>'
13191 else
13192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
13193$as_echo_n "checking absolute name of <string.h>... " >&6; }
d0ac1c44 13194if ${gl_cv_next_string_h+:} false; then :
6ec2e0f5
SDJ
13195 $as_echo_n "(cached) " >&6
13196else
13197
13198
13199
13200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13201/* end confdefs.h. */
13202#include <string.h>
13203_ACEOF
13204 case "$host_os" in
13205 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13206 *) gl_absname_cpp="$ac_cpp" ;;
13207 esac
13208
13209 case "$host_os" in
13210 mingw*)
13211 gl_dirsep_regex='[/\\]'
13212 ;;
13213 *)
13214 gl_dirsep_regex='\/'
13215 ;;
13216 esac
13217 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13218 gl_header_literal_regex=`echo 'string.h' \
13219 | sed -e "$gl_make_literal_regex_sed"`
13220 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13221 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13222 s|^/[^/]|//&|
13223 p
13224 q
13225 }'
13226
13227 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13228 sed -n "$gl_absolute_header_sed"`
13229
13230 gl_header=$gl_cv_absolute_string_h
13231 gl_cv_next_string_h='"'$gl_header'"'
13232
13233
13234fi
13235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
13236$as_echo "$gl_cv_next_string_h" >&6; }
13237 fi
13238 NEXT_STRING_H=$gl_cv_next_string_h
13239
13240 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13241 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13242 gl_next_as_first_directive='<'string.h'>'
13243 else
13244 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13245 gl_next_as_first_directive=$gl_cv_next_string_h
13246 fi
13247 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
13248
13249
13250
13251
13252
13253
5e8754f9
SDJ
13254 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
13255 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
13256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
13257$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
13258if eval \${$as_gl_Symbol+:} false; then :
13259 $as_echo_n "(cached) " >&6
13260else
13261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13262/* end confdefs.h. */
13263#include <string.h>
13264
13265int
13266main ()
13267{
13268#undef $gl_func
13269 (void) $gl_func;
13270 ;
13271 return 0;
13272}
13273_ACEOF
13274if ac_fn_c_try_compile "$LINENO"; then :
13275 eval "$as_gl_Symbol=yes"
13276else
13277 eval "$as_gl_Symbol=no"
13278fi
13279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13280fi
13281eval ac_res=\$$as_gl_Symbol
13282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13283$as_echo "$ac_res" >&6; }
13284 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
13285 cat >>confdefs.h <<_ACEOF
13286#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
13287_ACEOF
6ec2e0f5 13288
5e8754f9
SDJ
13289 eval ac_cv_have_decl_$gl_func=yes
13290fi
13291 done
6ec2e0f5
SDJ
13292
13293
13294
13295
13296
5e8754f9 13297 if test "$gl_cv_func_memchr_works" != yes; then
6ec2e0f5
SDJ
13298 REPLACE_STRSTR=1
13299 else
13300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
13301$as_echo_n "checking whether strstr works... " >&6; }
d0ac1c44 13302if ${gl_cv_func_strstr_works_always+:} false; then :
6ec2e0f5
SDJ
13303 $as_echo_n "(cached) " >&6
13304else
13305 if test "$cross_compiling" = yes; then :
13306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13307/* end confdefs.h. */
13308
13309#ifdef __GNU_LIBRARY__
13310 #include <features.h>
13311 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
13312 || defined __UCLIBC__
13313 Lucky user
13314 #endif
13315#elif defined __CYGWIN__
13316 #include <cygwin/version.h>
13317 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
13318 Lucky user
13319 #endif
13320#else
13321 Lucky user
13322#endif
13323
13324_ACEOF
13325if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13326 $EGREP "Lucky user" >/dev/null 2>&1; then :
13327 gl_cv_func_strstr_works_always="guessing yes"
13328else
13329 gl_cv_func_strstr_works_always="guessing no"
13330fi
13331rm -f conftest*
13332
13333
13334else
13335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13336/* end confdefs.h. */
13337
13338#include <string.h> /* for strstr */
13339#define P "_EF_BF_BD"
13340#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
13341#define NEEDLE P P P P P
13342
13343int
13344main ()
13345{
13346return !!strstr (HAYSTACK, NEEDLE);
13347
13348 ;
13349 return 0;
13350}
13351_ACEOF
13352if ac_fn_c_try_run "$LINENO"; then :
13353 gl_cv_func_strstr_works_always=yes
13354else
13355 gl_cv_func_strstr_works_always=no
13356fi
13357rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13358 conftest.$ac_objext conftest.beam conftest.$ac_ext
13359fi
13360
13361
13362fi
13363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
13364$as_echo "$gl_cv_func_strstr_works_always" >&6; }
13365 case "$gl_cv_func_strstr_works_always" in
13366 *yes) ;;
13367 *)
13368 REPLACE_STRSTR=1
13369 ;;
13370 esac
13371 fi
13372
472fa5ee
SM
13373
13374 ac_fn_c_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default"
d0ac1c44 13375if test "x$ac_cv_have_decl_strtok_r" = xyes; then :
6ec2e0f5
SDJ
13376 ac_have_decl=1
13377else
13378 ac_have_decl=0
13379fi
13380
13381cat >>confdefs.h <<_ACEOF
13382#define HAVE_DECL_STRTOK_R $ac_have_decl
13383_ACEOF
13384
472fa5ee 13385
6ec2e0f5
SDJ
13386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
13387$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
13388if test -z "$MKDIR_P"; then
d0ac1c44 13389 if ${ac_cv_path_mkdir+:} false; then :
6ec2e0f5
SDJ
13390 $as_echo_n "(cached) " >&6
13391else
13392 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13393for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
13394do
13395 IFS=$as_save_IFS
13396 test -z "$as_dir" && as_dir=.
13397 for ac_prog in mkdir gmkdir; do
13398 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 13399 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
6ec2e0f5
SDJ
13400 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
13401 'mkdir (GNU coreutils) '* | \
13402 'mkdir (coreutils) '* | \
13403 'mkdir (fileutils) '4.1*)
13404 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
13405 break 3;;
13406 esac
13407 done
13408 done
13409 done
13410IFS=$as_save_IFS
13411
13412fi
13413
d0ac1c44 13414 test -d ./--version && rmdir ./--version
6ec2e0f5
SDJ
13415 if test "${ac_cv_path_mkdir+set}" = set; then
13416 MKDIR_P="$ac_cv_path_mkdir -p"
13417 else
13418 # As a last resort, use the slow shell script. Don't cache a
13419 # value for MKDIR_P within a source directory, because that will
13420 # break other packages using the cache if that directory is
13421 # removed, or if the value is a relative name.
6ec2e0f5
SDJ
13422 MKDIR_P="$ac_install_sh -d"
13423 fi
13424fi
13425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
13426$as_echo "$MKDIR_P" >&6; }
13427
13428
13429
13430
13431
13432
13433
13434
13435
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446 if test $gl_cv_have_include_next = yes; then
13447 gl_cv_next_sys_types_h='<'sys/types.h'>'
13448 else
13449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
13450$as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
d0ac1c44 13451if ${gl_cv_next_sys_types_h+:} false; then :
6ec2e0f5
SDJ
13452 $as_echo_n "(cached) " >&6
13453else
13454
13455
13456
13457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13458/* end confdefs.h. */
13459#include <sys/types.h>
13460_ACEOF
13461 case "$host_os" in
13462 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13463 *) gl_absname_cpp="$ac_cpp" ;;
13464 esac
13465
13466 case "$host_os" in
13467 mingw*)
13468 gl_dirsep_regex='[/\\]'
13469 ;;
13470 *)
13471 gl_dirsep_regex='\/'
13472 ;;
13473 esac
13474 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13475 gl_header_literal_regex=`echo 'sys/types.h' \
13476 | sed -e "$gl_make_literal_regex_sed"`
13477 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13478 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13479 s|^/[^/]|//&|
13480 p
13481 q
13482 }'
13483
13484 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13485 sed -n "$gl_absolute_header_sed"`
13486
13487 gl_header=$gl_cv_absolute_sys_types_h
13488 gl_cv_next_sys_types_h='"'$gl_header'"'
13489
13490
13491fi
13492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
13493$as_echo "$gl_cv_next_sys_types_h" >&6; }
13494 fi
13495 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
13496
13497 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13498 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13499 gl_next_as_first_directive='<'sys/types.h'>'
13500 else
13501 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13502 gl_next_as_first_directive=$gl_cv_next_sys_types_h
13503 fi
13504 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
5e8754f9
SDJ
13517 GNULIB_MKTIME=0;
13518 GNULIB_NANOSLEEP=0;
13519 GNULIB_STRPTIME=0;
13520 GNULIB_TIMEGM=0;
13521 GNULIB_TIME_R=0;
13522 GNULIB_TIME_RZ=0;
13523 HAVE_DECL_LOCALTIME_R=1;
13524 HAVE_NANOSLEEP=1;
13525 HAVE_STRPTIME=1;
13526 HAVE_TIMEGM=1;
13527 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
13528 REPLACE_MKTIME=GNULIB_PORTCHECK;
13529 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
13530 REPLACE_TIMEGM=GNULIB_PORTCHECK;
6ec2e0f5 13531
5e8754f9
SDJ
13532 : ${GNULIB_GETTIMEOFDAY=0};
13533 REPLACE_GMTIME=0;
13534 REPLACE_LOCALTIME=0;
6ec2e0f5
SDJ
13535
13536
13537
472fa5ee
SM
13538 :
13539
13540
13541
13542
13543
6ec2e0f5
SDJ
13544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
13545$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
d0ac1c44 13546if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
6ec2e0f5
SDJ
13547 $as_echo_n "(cached) " >&6
13548else
13549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13550/* end confdefs.h. */
13551#include <time.h>
13552
13553int
13554main ()
13555{
13556static struct timespec x; x.tv_sec = x.tv_nsec;
13557 ;
13558 return 0;
13559}
13560_ACEOF
13561if ac_fn_c_try_compile "$LINENO"; then :
13562 gl_cv_sys_struct_timespec_in_time_h=yes
13563else
13564 gl_cv_sys_struct_timespec_in_time_h=no
13565fi
13566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13567fi
13568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
13569$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
13570
13571 TIME_H_DEFINES_STRUCT_TIMESPEC=0
13572 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
13573 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
13574 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
13575 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
13576 TIME_H_DEFINES_STRUCT_TIMESPEC=1
13577 else
13578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
13579$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
d0ac1c44 13580if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
6ec2e0f5
SDJ
13581 $as_echo_n "(cached) " >&6
13582else
13583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13584/* end confdefs.h. */
13585#include <sys/time.h>
13586
13587int
13588main ()
13589{
13590static struct timespec x; x.tv_sec = x.tv_nsec;
13591 ;
13592 return 0;
13593}
13594_ACEOF
13595if ac_fn_c_try_compile "$LINENO"; then :
13596 gl_cv_sys_struct_timespec_in_sys_time_h=yes
13597else
13598 gl_cv_sys_struct_timespec_in_sys_time_h=no
13599fi
13600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13601fi
13602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
13603$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
13604 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
13605 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
13606 else
13607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
13608$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
d0ac1c44 13609if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
6ec2e0f5
SDJ
13610 $as_echo_n "(cached) " >&6
13611else
13612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13613/* end confdefs.h. */
13614#include <pthread.h>
13615
13616int
13617main ()
13618{
13619static struct timespec x; x.tv_sec = x.tv_nsec;
13620 ;
13621 return 0;
13622}
13623_ACEOF
13624if ac_fn_c_try_compile "$LINENO"; then :
13625 gl_cv_sys_struct_timespec_in_pthread_h=yes
13626else
13627 gl_cv_sys_struct_timespec_in_pthread_h=no
13628fi
13629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13630fi
13631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
13632$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
13633 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
13634 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
13635 else
13636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
13637$as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
d0ac1c44 13638if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then :
6ec2e0f5
SDJ
13639 $as_echo_n "(cached) " >&6
13640else
13641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13642/* end confdefs.h. */
13643#include <unistd.h>
13644
13645int
13646main ()
13647{
13648static struct timespec x; x.tv_sec = x.tv_nsec;
13649 ;
13650 return 0;
13651}
13652_ACEOF
13653if ac_fn_c_try_compile "$LINENO"; then :
13654 gl_cv_sys_struct_timespec_in_unistd_h=yes
13655else
13656 gl_cv_sys_struct_timespec_in_unistd_h=no
13657fi
13658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13659fi
13660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
13661$as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
13662 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
13663 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
13664 fi
13665 fi
13666 fi
13667 fi
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684 if test $gl_cv_have_include_next = yes; then
13685 gl_cv_next_time_h='<'time.h'>'
13686 else
13687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
13688$as_echo_n "checking absolute name of <time.h>... " >&6; }
d0ac1c44 13689if ${gl_cv_next_time_h+:} false; then :
6ec2e0f5
SDJ
13690 $as_echo_n "(cached) " >&6
13691else
13692
13693
13694
13695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13696/* end confdefs.h. */
13697#include <time.h>
13698_ACEOF
13699 case "$host_os" in
13700 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13701 *) gl_absname_cpp="$ac_cpp" ;;
13702 esac
13703
13704 case "$host_os" in
13705 mingw*)
13706 gl_dirsep_regex='[/\\]'
13707 ;;
13708 *)
13709 gl_dirsep_regex='\/'
13710 ;;
13711 esac
13712 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13713 gl_header_literal_regex=`echo 'time.h' \
13714 | sed -e "$gl_make_literal_regex_sed"`
13715 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13716 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13717 s|^/[^/]|//&|
13718 p
13719 q
13720 }'
13721
13722 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13723 sed -n "$gl_absolute_header_sed"`
13724
13725 gl_header=$gl_cv_absolute_time_h
13726 gl_cv_next_time_h='"'$gl_header'"'
13727
13728
13729fi
13730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
13731$as_echo "$gl_cv_next_time_h" >&6; }
13732 fi
13733 NEXT_TIME_H=$gl_cv_next_time_h
13734
13735 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13736 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13737 gl_next_as_first_directive='<'time.h'>'
13738 else
13739 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13740 gl_next_as_first_directive=$gl_cv_next_time_h
13741 fi
13742 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
13743
13744
13745
13746
13747
13748
13749
13750
472fa5ee
SM
13751
13752
13753
13754
13755 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
d0ac1c44 13756if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
6ec2e0f5
SDJ
13757 ac_have_decl=1
13758else
13759 ac_have_decl=0
13760fi
13761
13762cat >>confdefs.h <<_ACEOF
13763#define HAVE_DECL_UNSETENV $ac_have_decl
13764_ACEOF
13765
13766
472fa5ee 13767
6ec2e0f5
SDJ
13768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
13769$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
d0ac1c44 13770if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
6ec2e0f5
SDJ
13771 $as_echo_n "(cached) " >&6
13772else
13773 gl_cv_header_wchar_h_correct_inline=yes
13774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13775/* end confdefs.h. */
13776
13777 #define wcstod renamed_wcstod
13778/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13779 <wchar.h>.
13780 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13781 included before <wchar.h>. */
13782#include <stddef.h>
13783#include <stdio.h>
13784#include <time.h>
13785#include <wchar.h>
13786extern int zero (void);
13787int main () { return zero(); }
13788
13789_ACEOF
13790 save_ac_compile="$ac_compile"
13791 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
5e8754f9 13792 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6ec2e0f5
SDJ
13793 (eval $ac_compile) 2>&5
13794 ac_status=$?
13795 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13796 test $ac_status = 0; }; then
13797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13798/* end confdefs.h. */
13799
13800 #define wcstod renamed_wcstod
13801/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13802 <wchar.h>.
13803 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13804 included before <wchar.h>. */
13805#include <stddef.h>
13806#include <stdio.h>
13807#include <time.h>
13808#include <wchar.h>
13809int zero (void) { return 0; }
13810
13811_ACEOF
13812 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
5e8754f9 13813 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6ec2e0f5
SDJ
13814 (eval $ac_compile) 2>&5
13815 ac_status=$?
13816 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13817 test $ac_status = 0; }; then
13818 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
13819 :
13820 else
13821 gl_cv_header_wchar_h_correct_inline=no
13822 fi
13823 fi
13824 fi
13825 ac_compile="$save_ac_compile"
5e8754f9 13826 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
6ec2e0f5
SDJ
13827
13828fi
13829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
13830$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
13831 if test $gl_cv_header_wchar_h_correct_inline = no; then
d0ac1c44 13832 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
6ec2e0f5
SDJ
13833This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
13834C99 mode. You have four options:
13835 - Add the flag -fgnu89-inline to CC and reconfigure, or
13836 - Fix your include files, using parts of
5e8754f9 13837 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
6ec2e0f5
SDJ
13838 - Use a gcc version older than 4.3, or
13839 - Don't use the flags -std=c99 or -std=gnu99.
13840Configuration aborted." "$LINENO" 5
13841 fi
13842
13843
13844
13845
13846
472fa5ee
SM
13847
13848
13849
13850 :
13851
13852
13853
13854
13855
6ec2e0f5
SDJ
13856 if test $ac_cv_header_features_h = yes; then
13857 HAVE_FEATURES_H=1
13858 else
13859 HAVE_FEATURES_H=0
13860 fi
13861
13862
13863
5e8754f9
SDJ
13864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
13865$as_echo_n "checking for wint_t... " >&6; }
13866if ${gt_cv_c_wint_t+:} false; then :
13867 $as_echo_n "(cached) " >&6
13868else
13869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13870/* end confdefs.h. */
6ec2e0f5 13871
5e8754f9
SDJ
13872/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13873 <wchar.h>.
13874 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
13875 before <wchar.h>. */
13876#include <stddef.h>
13877#include <stdio.h>
13878#include <time.h>
13879#include <wchar.h>
13880 wint_t foo = (wchar_t)'\0';
13881int
13882main ()
13883{
6ec2e0f5 13884
5e8754f9
SDJ
13885 ;
13886 return 0;
13887}
13888_ACEOF
13889if ac_fn_c_try_compile "$LINENO"; then :
13890 gt_cv_c_wint_t=yes
13891else
13892 gt_cv_c_wint_t=no
13893fi
13894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13895fi
13896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
13897$as_echo "$gt_cv_c_wint_t" >&6; }
13898 if test $gt_cv_c_wint_t = yes; then
6ec2e0f5 13899
5e8754f9 13900$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
6ec2e0f5
SDJ
13901
13902 fi
13903
13904
13905 GNULIB_ISWBLANK=0;
13906 GNULIB_WCTYPE=0;
13907 GNULIB_ISWCTYPE=0;
13908 GNULIB_WCTRANS=0;
13909 GNULIB_TOWCTRANS=0;
13910 HAVE_ISWBLANK=1;
13911 HAVE_WCTYPE_T=1;
13912 HAVE_WCTRANS_T=1;
13913 REPLACE_ISWBLANK=0;
13914
13915
13916
13917
472fa5ee
SM
13918
13919
13920
6ec2e0f5
SDJ
13921 if false; then
13922 GL_COND_LIBTOOL_TRUE=
13923 GL_COND_LIBTOOL_FALSE='#'
13924else
13925 GL_COND_LIBTOOL_TRUE='#'
13926 GL_COND_LIBTOOL_FALSE=
13927fi
13928
13929 gl_cond_libtool=false
13930 gl_libdeps=
13931 gl_ltlibdeps=
13932 gl_m4_base='import/m4'
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942 gl_source_base='import'
13943
13944
13945 if test $ac_cv_func_alloca_works = no; then
13946 :
13947 fi
13948
13949 # Define an additional variable used in the Makefile substitution.
13950 if test $ac_cv_working_alloca_h = yes; then
13951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
13952$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
d0ac1c44 13953if ${gl_cv_rpl_alloca+:} false; then :
6ec2e0f5
SDJ
13954 $as_echo_n "(cached) " >&6
13955else
13956
13957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13958/* end confdefs.h. */
13959
13960#if defined __GNUC__ || defined _AIX || defined _MSC_VER
13961 Need own alloca
13962#endif
13963
13964_ACEOF
13965if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13966 $EGREP "Need own alloca" >/dev/null 2>&1; then :
13967 gl_cv_rpl_alloca=yes
13968else
13969 gl_cv_rpl_alloca=no
13970fi
13971rm -f conftest*
13972
13973
13974fi
13975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
13976$as_echo "$gl_cv_rpl_alloca" >&6; }
13977 if test $gl_cv_rpl_alloca = yes; then
13978
13979$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13980
13981 ALLOCA_H=alloca.h
13982 else
13983 ALLOCA_H=
13984 fi
13985 else
13986 ALLOCA_H=alloca.h
13987 fi
13988
13989 if test -n "$ALLOCA_H"; then
13990 GL_GENERATE_ALLOCA_H_TRUE=
13991 GL_GENERATE_ALLOCA_H_FALSE='#'
13992else
13993 GL_GENERATE_ALLOCA_H_TRUE='#'
13994 GL_GENERATE_ALLOCA_H_FALSE=
13995fi
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
14007
14008
14009
14010
14011 if test $ac_cv_func_canonicalize_file_name = no; then
14012 HAVE_CANONICALIZE_FILE_NAME=0
14013 if test $ac_cv_func_realpath = no; then
14014 HAVE_REALPATH=0
14015 else
14016 case "$gl_cv_func_realpath_works" in
5e8754f9
SDJ
14017 *yes) ;;
14018 *) REPLACE_REALPATH=1 ;;
6ec2e0f5
SDJ
14019 esac
14020 fi
14021 else
14022 case "$gl_cv_func_realpath_works" in
14023 *yes)
14024 ;;
14025 *)
14026 REPLACE_CANONICALIZE_FILE_NAME=1
14027 REPLACE_REALPATH=1
14028 ;;
14029 esac
14030 fi
14031
14032 if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
14033
14034
14035
14036
14037
14038
14039
14040
14041 gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
14042
14043 fi
14044
14045
14046cat >>confdefs.h <<_ACEOF
14047#define GNULIB_CANONICALIZE_LGPL 1
14048_ACEOF
14049
14050
14051
14052
14053
14054
14055
14056 GNULIB_CANONICALIZE_FILE_NAME=1
14057
14058
14059
14060
14061
14062$as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
14063
14064
14065
14066
14067
14068
14069
14070
14071 GNULIB_REALPATH=1
14072
14073
14074
14075
14076
14077$as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
14078
14079
14080
14081
14082
14083
14084
14085
14086 GNULIB_CHDIR=1
14087
14088
14089
14090
14091
14092$as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
14093
14094
14095
14096
14097
14098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
14099$as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; }
d0ac1c44 14100if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then :
6ec2e0f5
SDJ
14101 $as_echo_n "(cached) " >&6
14102else
14103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14104/* end confdefs.h. */
14105
14106/* Arrange to define PATH_MAX, like "pathmax.h" does. */
14107#if HAVE_UNISTD_H
14108# include <unistd.h>
14109#endif
14110#include <limits.h>
14111#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
14112# include <sys/param.h>
14113#endif
14114#if !defined PATH_MAX && defined MAXPATHLEN
14115# define PATH_MAX MAXPATHLEN
14116#endif
14117#ifdef __hpux
14118# undef PATH_MAX
14119# define PATH_MAX 1024
14120#endif
5e8754f9 14121#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6ec2e0f5
SDJ
14122# undef PATH_MAX
14123# define PATH_MAX 260
14124#endif
14125
14126#ifdef PATH_MAX
14127have_arbitrary_file_name_length_limit
14128#endif
14129_ACEOF
14130if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14131 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
14132 gl_cv_have_arbitrary_file_name_length_limit=yes
14133else
14134 gl_cv_have_arbitrary_file_name_length_limit=no
14135fi
14136rm -f conftest*
14137
14138fi
14139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
14140$as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
14141
14142 if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
14143
14144
14145
14146
14147
14148
14149
14150
14151 gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
14152
14153 :
14154 fi
14155
14156
14157$as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
14158
14159
14160
14161
14162
5e8754f9
SDJ
14163 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
14164 REPLACE_CLOSE=1
14165 fi
6ec2e0f5
SDJ
14166
14167
14168
14169
14170
472fa5ee
SM
14171 :
14172
14173
14174
14175
14176
6ec2e0f5
SDJ
14177 if test $ac_cv_header_sys_socket_h != yes; then
14178 for ac_header in winsock2.h
14179do :
14180 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
d0ac1c44 14181if test "x$ac_cv_header_winsock2_h" = xyes; then :
6ec2e0f5
SDJ
14182 cat >>confdefs.h <<_ACEOF
14183#define HAVE_WINSOCK2_H 1
14184_ACEOF
14185
14186fi
14187
14188done
14189
14190 fi
14191 if test "$ac_cv_header_winsock2_h" = yes; then
14192 HAVE_WINSOCK2_H=1
14193 UNISTD_H_HAVE_WINSOCK2_H=1
14194 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
14195 else
14196 HAVE_WINSOCK2_H=0
14197 fi
14198
14199
14200 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
14201 REPLACE_CLOSE=1
14202 fi
14203
14204
14205 if test $REPLACE_CLOSE = 0; then
14206
14207
14208
472fa5ee
SM
14209 :
14210
14211
14212
14213
14214
6ec2e0f5
SDJ
14215 if test $ac_cv_func_fchdir = no; then
14216 HAVE_FCHDIR=0
14217 fi
14218
14219 if test $HAVE_FCHDIR = 0; then
14220 REPLACE_CLOSE=1
14221 fi
14222 fi
14223
14224
14225 if test $REPLACE_CLOSE = 1; then
14226
14227
14228
14229
14230
14231
14232
14233
14234 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
14235
14236 fi
14237
14238
14239
14240
14241
14242 GNULIB_CLOSE=1
14243
14244
14245
14246
14247
14248$as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
14249
14250
14251
14252
14253
14254
14255 for ac_func in closedir
14256do :
14257 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
d0ac1c44 14258if test "x$ac_cv_func_closedir" = xyes; then :
6ec2e0f5
SDJ
14259 cat >>confdefs.h <<_ACEOF
14260#define HAVE_CLOSEDIR 1
14261_ACEOF
14262
14263fi
14264done
14265
14266 if test $ac_cv_func_closedir = no; then
14267 HAVE_CLOSEDIR=0
14268 fi
14269
14270
14271
14272
472fa5ee
SM
14273 :
14274
14275
14276
14277
14278
6ec2e0f5
SDJ
14279 if test $ac_cv_func_fchdir = no; then
14280 HAVE_FCHDIR=0
14281 fi
14282
14283 if test $HAVE_FCHDIR = 0; then
14284 if test $HAVE_CLOSEDIR = 1; then
14285 REPLACE_CLOSEDIR=1
14286 fi
14287 fi
14288
14289 case $host_os,$HAVE_CLOSEDIR in
14290 os2*,1)
14291 REPLACE_CLOSEDIR=1;;
14292 esac
14293
14294 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
14295
14296
14297
14298
14299
14300
14301
14302
14303 gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
14304
14305 fi
14306
14307
14308
14309
14310
14311 GNULIB_CLOSEDIR=1
14312
14313
14314
14315
14316
14317$as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
14318
14319
14320
5e8754f9
SDJ
14321
14322 if test "x$datarootdir" = x; then
14323 datarootdir='${datadir}'
14324
14325 fi
14326 if test "x$docdir" = x; then
14327 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
14328
14329 fi
14330 if test "x$htmldir" = x; then
14331 htmldir='${docdir}'
14332
14333 fi
14334 if test "x$dvidir" = x; then
14335 dvidir='${docdir}'
14336
14337 fi
14338 if test "x$pdfdir" = x; then
14339 pdfdir='${docdir}'
14340
14341 fi
14342 if test "x$psdir" = x; then
14343 psdir='${docdir}'
14344
14345 fi
14346 if test "x$lispdir" = x; then
14347 lispdir='${datarootdir}/emacs/site-lisp'
14348
14349 fi
14350 if test "x$localedir" = x; then
14351 localedir='${datarootdir}/locale'
14352
14353 fi
14354 if test "x$runstatedir" = x; then
14355 runstatedir='${localstatedir}/run'
14356
14357 fi
14358
14359 pkglibexecdir='${libexecdir}/${PACKAGE}'
14360
14361
6ec2e0f5
SDJ
14362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
14363$as_echo_n "checking for d_ino member in directory struct... " >&6; }
d0ac1c44 14364if ${gl_cv_struct_dirent_d_ino+:} false; then :
6ec2e0f5
SDJ
14365 $as_echo_n "(cached) " >&6
14366else
14367 if test "$cross_compiling" = yes; then :
14368 case "$host_os" in
14369 # Guess yes on glibc systems with Linux kernel.
14370 linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
14371 # If we don't know, assume the worst.
14372 *) gl_cv_struct_dirent_d_ino="guessing no" ;;
14373 esac
14374
14375else
14376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14377/* end confdefs.h. */
14378#include <sys/types.h>
14379 #include <sys/stat.h>
14380 #include <dirent.h>
14381
14382int
14383main ()
14384{
14385DIR *dp = opendir (".");
14386 struct dirent *e;
14387 struct stat st;
14388 if (! dp)
14389 return 1;
14390 e = readdir (dp);
14391 if (! e)
5e8754f9 14392 return 2;
6ec2e0f5 14393 if (lstat (e->d_name, &st) != 0)
5e8754f9 14394 return 3;
6ec2e0f5 14395 if (e->d_ino != st.st_ino)
5e8754f9 14396 return 4;
6ec2e0f5
SDJ
14397 closedir (dp);
14398 return 0;
14399
14400 ;
14401 return 0;
14402}
14403_ACEOF
14404if ac_fn_c_try_run "$LINENO"; then :
14405 gl_cv_struct_dirent_d_ino=yes
14406else
14407 gl_cv_struct_dirent_d_ino=no
14408fi
14409rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14410 conftest.$ac_objext conftest.beam conftest.$ac_ext
14411fi
14412
14413fi
14414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
14415$as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
14416 case "$gl_cv_struct_dirent_d_ino" in
14417 *yes)
14418
14419$as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
14420
14421 ;;
14422 esac
14423
14424
14425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
14426$as_echo_n "checking for d_type member in directory struct... " >&6; }
d0ac1c44 14427if ${gl_cv_struct_dirent_d_type+:} false; then :
6ec2e0f5
SDJ
14428 $as_echo_n "(cached) " >&6
14429else
14430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14431/* end confdefs.h. */
14432
14433#include <sys/types.h>
14434#include <dirent.h>
14435
14436int
14437main ()
14438{
14439struct dirent dp; dp.d_type = 0;
14440 ;
14441 return 0;
14442}
14443_ACEOF
14444if ac_fn_c_try_link "$LINENO"; then :
14445 gl_cv_struct_dirent_d_type=yes
14446else
14447 gl_cv_struct_dirent_d_type=no
14448fi
14449rm -f core conftest.err conftest.$ac_objext \
14450 conftest$ac_exeext conftest.$ac_ext
14451
14452
14453fi
14454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5
14455$as_echo "$gl_cv_struct_dirent_d_type" >&6; }
14456 if test $gl_cv_struct_dirent_d_type = yes; then
14457
14458$as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
14459
14460 fi
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470
14471
472fa5ee
SM
14472 :
14473
14474
14475
14476
14477
6ec2e0f5
SDJ
14478
14479
14480
14481 if test $gl_cv_have_include_next = yes; then
14482 gl_cv_next_dirent_h='<'dirent.h'>'
14483 else
14484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
14485$as_echo_n "checking absolute name of <dirent.h>... " >&6; }
d0ac1c44 14486if ${gl_cv_next_dirent_h+:} false; then :
6ec2e0f5
SDJ
14487 $as_echo_n "(cached) " >&6
14488else
14489
14490 if test $ac_cv_header_dirent_h = yes; then
14491
14492
14493
14494
14495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14496/* end confdefs.h. */
14497#include <dirent.h>
14498_ACEOF
14499 case "$host_os" in
14500 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14501 *) gl_absname_cpp="$ac_cpp" ;;
14502 esac
14503
14504 case "$host_os" in
14505 mingw*)
14506 gl_dirsep_regex='[/\\]'
14507 ;;
14508 *)
14509 gl_dirsep_regex='\/'
14510 ;;
14511 esac
14512 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14513 gl_header_literal_regex=`echo 'dirent.h' \
14514 | sed -e "$gl_make_literal_regex_sed"`
14515 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14516 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14517 s|^/[^/]|//&|
14518 p
14519 q
14520 }'
14521
14522 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14523 sed -n "$gl_absolute_header_sed"`
14524
14525 gl_header=$gl_cv_absolute_dirent_h
14526 gl_cv_next_dirent_h='"'$gl_header'"'
14527 else
14528 gl_cv_next_dirent_h='<'dirent.h'>'
14529 fi
14530
14531
14532fi
14533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
14534$as_echo "$gl_cv_next_dirent_h" >&6; }
14535 fi
14536 NEXT_DIRENT_H=$gl_cv_next_dirent_h
14537
14538 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14539 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14540 gl_next_as_first_directive='<'dirent.h'>'
14541 else
14542 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14543 gl_next_as_first_directive=$gl_cv_next_dirent_h
14544 fi
14545 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
14546
14547
14548
14549
14550 if test $ac_cv_header_dirent_h = yes; then
14551 HAVE_DIRENT_H=1
14552 else
14553 HAVE_DIRENT_H=0
14554 fi
14555
14556
14557
5e8754f9
SDJ
14558 for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do
14559 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
14560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
14561$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
14562if eval \${$as_gl_Symbol+:} false; then :
14563 $as_echo_n "(cached) " >&6
14564else
14565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14566/* end confdefs.h. */
14567#include <dirent.h>
14568
14569int
14570main ()
14571{
14572#undef $gl_func
14573 (void) $gl_func;
14574 ;
14575 return 0;
14576}
14577_ACEOF
14578if ac_fn_c_try_compile "$LINENO"; then :
14579 eval "$as_gl_Symbol=yes"
14580else
14581 eval "$as_gl_Symbol=no"
14582fi
14583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14584fi
14585eval ac_res=\$$as_gl_Symbol
14586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14587$as_echo "$ac_res" >&6; }
14588 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
14589 cat >>confdefs.h <<_ACEOF
14590#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
14591_ACEOF
6ec2e0f5 14592
5e8754f9
SDJ
14593 eval ac_cv_have_decl_$gl_func=yes
14594fi
14595 done
6ec2e0f5
SDJ
14596
14597
14598
14599
14600
14601
14602
14603 for ac_func in dirfd
14604do :
14605 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
d0ac1c44 14606if test "x$ac_cv_func_dirfd" = xyes; then :
6ec2e0f5
SDJ
14607 cat >>confdefs.h <<_ACEOF
14608#define HAVE_DIRFD 1
14609_ACEOF
14610
14611fi
14612done
14613
14614 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
14615 #include <dirent.h>
14616"
d0ac1c44 14617if test "x$ac_cv_have_decl_dirfd" = xyes; then :
6ec2e0f5
SDJ
14618 ac_have_decl=1
14619else
14620 ac_have_decl=0
14621fi
14622
14623cat >>confdefs.h <<_ACEOF
14624#define HAVE_DECL_DIRFD $ac_have_decl
14625_ACEOF
14626
14627 if test $ac_cv_have_decl_dirfd = no; then
14628 HAVE_DECL_DIRFD=0
14629 fi
14630
14631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
14632$as_echo_n "checking whether dirfd is a macro... " >&6; }
d0ac1c44 14633if ${gl_cv_func_dirfd_macro+:} false; then :
6ec2e0f5
SDJ
14634 $as_echo_n "(cached) " >&6
14635else
14636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14637/* end confdefs.h. */
14638
14639#include <sys/types.h>
14640#include <dirent.h>
14641#ifdef dirfd
14642 dirent_header_defines_dirfd
14643#endif
14644_ACEOF
14645if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14646 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
14647 gl_cv_func_dirfd_macro=yes
14648else
14649 gl_cv_func_dirfd_macro=no
14650fi
14651rm -f conftest*
14652
14653fi
14654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
14655$as_echo "$gl_cv_func_dirfd_macro" >&6; }
14656
14657 # Use the replacement if we have no function or macro with that name,
14658 # or if OS/2 kLIBC whose dirfd() does not work.
14659 # Replace only if the system declares dirfd already.
14660 case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
14661 no,no,*,yes | *,*,os2*,yes)
14662 REPLACE_DIRFD=1
14663
14664$as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
14665;;
14666 esac
14667
14668 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
14669 || test $REPLACE_DIRFD = 1; then
14670
14671
14672
14673
14674
14675
14676
14677
14678 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
14679
14680
14681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
14682$as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
d0ac1c44 14683if ${gl_cv_sys_dir_fd_member_name+:} false; then :
6ec2e0f5
SDJ
14684 $as_echo_n "(cached) " >&6
14685else
14686
14687 dirfd_save_CFLAGS=$CFLAGS
14688 for ac_expr in d_fd dd_fd; do
14689
14690 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
14691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14692/* end confdefs.h. */
14693
14694 #include <sys/types.h>
14695 #include <dirent.h>
14696int
14697main ()
14698{
14699DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
14700 ;
14701 return 0;
14702}
14703_ACEOF
14704if ac_fn_c_try_compile "$LINENO"; then :
14705 dir_fd_found=yes
14706
14707fi
14708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14709 CFLAGS=$dirfd_save_CFLAGS
14710 test "$dir_fd_found" = yes && break
14711 done
14712 test "$dir_fd_found" = yes || ac_expr=no_such_member
14713
14714 gl_cv_sys_dir_fd_member_name=$ac_expr
14715
14716
14717fi
14718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
14719$as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
14720 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
14721
14722cat >>confdefs.h <<_ACEOF
14723#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
14724_ACEOF
14725
14726 fi
14727
14728
14729 fi
14730
14731
14732
14733
14734
14735 GNULIB_DIRFD=1
14736
14737
14738
14739
14740
14741$as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
14742
14743
14744
14745
14746
14747
14748
14749
14750
14751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
14752$as_echo_n "checking whether // is distinct from /... " >&6; }
d0ac1c44 14753if ${gl_cv_double_slash_root+:} false; then :
6ec2e0f5
SDJ
14754 $as_echo_n "(cached) " >&6
14755else
14756 if test x"$cross_compiling" = xyes ; then
14757 # When cross-compiling, there is no way to tell whether // is special
14758 # short of a list of hosts. However, the only known hosts to date
14759 # that have a distinct // are Apollo DomainOS (too old to port to),
14760 # Cygwin, and z/OS. If anyone knows of another system for which // has
14761 # special semantics and is distinct from /, please report it to
14762 # <bug-gnulib@gnu.org>.
14763 case $host in
14764 *-cygwin | i370-ibm-openedition)
14765 gl_cv_double_slash_root=yes ;;
14766 *)
14767 # Be optimistic and assume that / and // are the same when we
14768 # don't know.
14769 gl_cv_double_slash_root='unknown, assuming no' ;;
14770 esac
14771 else
14772 set x `ls -di / // 2>/dev/null`
14773 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
14774 gl_cv_double_slash_root=no
14775 else
14776 gl_cv_double_slash_root=yes
14777 fi
14778 fi
14779fi
14780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
14781$as_echo "$gl_cv_double_slash_root" >&6; }
14782 if test "$gl_cv_double_slash_root" = yes; then
8690e634 14783
6ec2e0f5 14784$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
8690e634 14785
6ec2e0f5 14786 fi
8690e634
JK
14787
14788
14789
14790
5e8754f9
SDJ
14791 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
14792 REPLACE_DUP=1
14793 fi
8690e634 14794
8690e634
JK
14795
14796
14797
472fa5ee
SM
14798 :
14799
14800
14801
14802
14803
6ec2e0f5
SDJ
14804 if test $ac_cv_func_fchdir = no; then
14805 HAVE_FCHDIR=0
14806 fi
8690e634 14807
6ec2e0f5
SDJ
14808 if test $HAVE_FCHDIR = 0; then
14809 REPLACE_DUP=1
14810 fi
8690e634 14811
6ec2e0f5
SDJ
14812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
14813$as_echo_n "checking whether dup works... " >&6; }
d0ac1c44 14814if ${gl_cv_func_dup_works+:} false; then :
6ec2e0f5 14815 $as_echo_n "(cached) " >&6
8690e634 14816else
6ec2e0f5 14817 if test "$cross_compiling" = yes; then :
5e8754f9 14818 gl_cv_func_dup_works='guessing yes'
6ec2e0f5
SDJ
14819else
14820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 14821/* end confdefs.h. */
6ec2e0f5
SDJ
14822#include <unistd.h>
14823 #include <fcntl.h>
14824 #include <errno.h>
14825int
14826main ()
14827{
14828/* On OS/2 kLIBC, dup does not work on a directory fd. */
14829 int fd = open (".", O_RDONLY);
14830 return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
8690e634 14831
6ec2e0f5
SDJ
14832 ;
14833 return 0;
14834}
8690e634
JK
14835
14836_ACEOF
6ec2e0f5
SDJ
14837if ac_fn_c_try_run "$LINENO"; then :
14838 gl_cv_func_dup_works=yes
14839else
14840 gl_cv_func_dup_works=no
14841fi
14842rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14843 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 14844fi
8690e634 14845
8690e634 14846
6ec2e0f5
SDJ
14847fi
14848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
14849$as_echo "$gl_cv_func_dup_works" >&6; }
14850 case "$gl_cv_func_dup_works" in
14851 *yes) ;;
14852 *)
14853 REPLACE_DUP=1
14854 ;;
14855 esac
8690e634 14856
6ec2e0f5 14857 if test $REPLACE_DUP = 1; then
8690e634 14858
8690e634 14859
8690e634 14860
8690e634 14861
8690e634 14862
6ec2e0f5
SDJ
14863
14864
14865
14866 gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
14867
14868 :
8690e634
JK
14869 fi
14870
14871
8690e634
JK
14872
14873
14874
6ec2e0f5 14875 GNULIB_DUP=1
8690e634 14876
6ec2e0f5
SDJ
14877
14878
14879
14880
14881$as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
14882
14883
14884
14885
14886
14887
14888
14889
14890$as_echo "#define HAVE_DUP2 1" >>confdefs.h
14891
14892
14893 if test $HAVE_DUP2 = 1; then
14894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
14895$as_echo_n "checking whether dup2 works... " >&6; }
d0ac1c44 14896if ${gl_cv_func_dup2_works+:} false; then :
8690e634
JK
14897 $as_echo_n "(cached) " >&6
14898else
14899 if test "$cross_compiling" = yes; then :
6ec2e0f5
SDJ
14900 case "$host_os" in
14901 mingw*) # on this platform, dup2 always returns 0 for success
14902 gl_cv_func_dup2_works="guessing no" ;;
14903 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
14904 gl_cv_func_dup2_works="guessing no" ;;
14905 aix* | freebsd*)
14906 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
14907 # not EBADF.
14908 gl_cv_func_dup2_works="guessing no" ;;
14909 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
14910 gl_cv_func_dup2_works="guessing no" ;;
14911 *-android*) # implemented using dup3(), which fails if oldfd == newfd
14912 gl_cv_func_dup2_works="guessing no" ;;
14913 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
14914 gl_cv_func_dup2_works="guessing no" ;;
14915 *) gl_cv_func_dup2_works="guessing yes" ;;
14916 esac
8690e634
JK
14917else
14918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14919/* end confdefs.h. */
14920
6ec2e0f5
SDJ
14921 #include <errno.h>
14922 #include <fcntl.h>
14923 #include <limits.h>
14924 #include <sys/resource.h>
14925 #include <unistd.h>
14926 #ifndef RLIM_SAVED_CUR
14927 # define RLIM_SAVED_CUR RLIM_INFINITY
14928 #endif
14929 #ifndef RLIM_SAVED_MAX
14930 # define RLIM_SAVED_MAX RLIM_INFINITY
14931 #endif
8690e634
JK
14932
14933int
14934main ()
14935{
6ec2e0f5
SDJ
14936int result = 0;
14937 int bad_fd = INT_MAX;
14938 struct rlimit rlim;
14939 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
14940 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
14941 && rlim.rlim_cur != RLIM_INFINITY
14942 && rlim.rlim_cur != RLIM_SAVED_MAX
14943 && rlim.rlim_cur != RLIM_SAVED_CUR)
14944 bad_fd = rlim.rlim_cur;
14945 #ifdef FD_CLOEXEC
14946 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
14947 result |= 1;
14948 #endif
14949 if (dup2 (1, 1) != 1)
14950 result |= 2;
14951 #ifdef FD_CLOEXEC
14952 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
14953 result |= 4;
14954 #endif
14955 close (0);
14956 if (dup2 (0, 0) != -1)
14957 result |= 8;
14958 /* Many gnulib modules require POSIX conformance of EBADF. */
14959 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
14960 result |= 16;
14961 /* Flush out some cygwin core dumps. */
14962 if (dup2 (2, -1) != -1 || errno != EBADF)
14963 result |= 32;
14964 dup2 (2, 255);
14965 dup2 (2, 256);
14966 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
14967 {
14968 int fd = open (".", O_RDONLY);
14969 if (fd == -1)
14970 result |= 64;
14971 else if (dup2 (fd, fd + 1) == -1)
14972 result |= 128;
14973
14974 close (fd);
14975 }
14976 return result;
8690e634
JK
14977 ;
14978 return 0;
14979}
6ec2e0f5 14980
8690e634
JK
14981_ACEOF
14982if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 14983 gl_cv_func_dup2_works=yes
8690e634 14984else
6ec2e0f5 14985 gl_cv_func_dup2_works=no
8690e634
JK
14986fi
14987rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14988 conftest.$ac_objext conftest.beam conftest.$ac_ext
14989fi
14990
6ec2e0f5
SDJ
14991
14992fi
14993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
14994$as_echo "$gl_cv_func_dup2_works" >&6; }
14995 case "$gl_cv_func_dup2_works" in
14996 *yes) ;;
14997 *)
14998 REPLACE_DUP2=1
14999 for ac_func in setdtablesize
15000do :
15001 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
d0ac1c44 15002if test "x$ac_cv_func_setdtablesize" = xyes; then :
6ec2e0f5
SDJ
15003 cat >>confdefs.h <<_ACEOF
15004#define HAVE_SETDTABLESIZE 1
15005_ACEOF
15006
15007fi
15008done
15009
15010 ;;
15011 esac
15012 fi
15013
15014
15015
15016
472fa5ee
SM
15017 :
15018
15019
15020
15021
15022
6ec2e0f5
SDJ
15023 if test $ac_cv_func_fchdir = no; then
15024 HAVE_FCHDIR=0
8690e634
JK
15025 fi
15026
6ec2e0f5
SDJ
15027 if test $HAVE_FCHDIR = 0; then
15028 if test $HAVE_DUP2 = 1; then
15029 REPLACE_DUP2=1
15030 fi
15031 fi
8690e634 15032
8690e634 15033
6ec2e0f5 15034 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
8690e634
JK
15035
15036
15037
15038
8690e634 15039
8690e634 15040
6ec2e0f5
SDJ
15041
15042
15043 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
15044
15045
8690e634
JK
15046 fi
15047
8690e634 15048
8690e634 15049
8690e634
JK
15050
15051
6ec2e0f5
SDJ
15052 GNULIB_DUP2=1
15053
15054
15055
15056
15057
15058$as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
15059
15060
15061
15062
15063
15064
15065
15066
15067
15068 GNULIB_ENVIRON=1
15069
15070
15071
15072
15073
15074$as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
15075
15076
15077
15078
15079
15080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
15081$as_echo_n "checking for error_at_line... " >&6; }
d0ac1c44 15082if ${ac_cv_lib_error_at_line+:} false; then :
6ec2e0f5 15083 $as_echo_n "(cached) " >&6
8690e634
JK
15084else
15085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15086/* end confdefs.h. */
6ec2e0f5 15087#include <error.h>
8690e634
JK
15088int
15089main ()
15090{
6ec2e0f5 15091error_at_line (0, 0, "", 0, "an error occurred");
8690e634
JK
15092 ;
15093 return 0;
15094}
15095_ACEOF
6ec2e0f5
SDJ
15096if ac_fn_c_try_link "$LINENO"; then :
15097 ac_cv_lib_error_at_line=yes
8690e634 15098else
6ec2e0f5 15099 ac_cv_lib_error_at_line=no
8690e634 15100fi
6ec2e0f5
SDJ
15101rm -f core conftest.err conftest.$ac_objext \
15102 conftest$ac_exeext conftest.$ac_ext
8690e634 15103fi
6ec2e0f5
SDJ
15104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
15105$as_echo "$ac_cv_lib_error_at_line" >&6; }
15106
15107 if test $ac_cv_lib_error_at_line = no; then
15108
15109
15110
15111
15112
15113
15114
15115
15116 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
15117
8690e634
JK
15118
15119
8690e634
JK
15120 :
15121
6ec2e0f5 15122 fi
6a29c58e 15123
6a29c58e 15124
d0ac1c44
SM
15125
15126
15127
d0ac1c44
SM
15128
15129
472fa5ee 15130 :
6a29c58e
YQ
15131
15132
3d99e817 15133
6ec2e0f5
SDJ
15134
15135
15136 if test $ac_cv_have_decl_fchdir = no; then
15137 HAVE_DECL_FCHDIR=0
15138 fi
15139
15140
15141 if test $HAVE_FCHDIR = 0; then
15142
15143
3d99e817
AK
15144
15145
15146
15147
15148
15149
6ec2e0f5 15150 gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
3d99e817 15151
6ec2e0f5 15152 :
3d99e817 15153
6ec2e0f5 15154$as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
3d99e817 15155
6ec2e0f5
SDJ
15156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
15157$as_echo_n "checking whether open can visit directories... " >&6; }
d0ac1c44 15158if ${gl_cv_func_open_directory_works+:} false; then :
6ec2e0f5
SDJ
15159 $as_echo_n "(cached) " >&6
15160else
15161 if test "$cross_compiling" = yes; then :
15162 case "$host_os" in
5e8754f9
SDJ
15163 # Guess yes on glibc systems.
15164 *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
15165 # If we don't know, assume the worst.
15166 *) gl_cv_func_open_directory_works="guessing no" ;;
6ec2e0f5 15167 esac
3d99e817 15168
6ec2e0f5
SDJ
15169else
15170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15171/* end confdefs.h. */
15172#include <fcntl.h>
3d99e817 15173
6ec2e0f5
SDJ
15174int
15175main ()
15176{
15177return open(".", O_RDONLY) < 0;
15178 ;
15179 return 0;
15180}
3d99e817 15181_ACEOF
6ec2e0f5
SDJ
15182if ac_fn_c_try_run "$LINENO"; then :
15183 gl_cv_func_open_directory_works=yes
15184else
15185 gl_cv_func_open_directory_works=no
15186fi
15187rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15188 conftest.$ac_objext conftest.beam conftest.$ac_ext
15189fi
3d99e817
AK
15190
15191fi
6ec2e0f5
SDJ
15192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
15193$as_echo "$gl_cv_func_open_directory_works" >&6; }
15194 case "$gl_cv_func_open_directory_works" in
15195 *yes) ;;
15196 *)
3d99e817 15197
6ec2e0f5 15198$as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
3d99e817 15199
6ec2e0f5
SDJ
15200 ;;
15201 esac
15202 fi
3d99e817 15203
3d99e817
AK
15204
15205
15206
0750520d 15207
0750520d 15208
6ec2e0f5 15209 GNULIB_FCHDIR=1
0750520d 15210
0750520d
PA
15211
15212
0750520d 15213
0750520d 15214
6ec2e0f5 15215$as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
0750520d 15216
0750520d 15217
0750520d 15218
0750520d 15219
0750520d 15220
0750520d 15221
0750520d 15222
6ec2e0f5 15223
472fa5ee
SM
15224 :
15225
15226
15227
15228
15229
6ec2e0f5
SDJ
15230 if test $ac_cv_func_fcntl = no; then
15231
15232
15233
472fa5ee
SM
15234 :
15235
15236
15237
15238
15239
6ec2e0f5
SDJ
15240 if test $ac_cv_func_fcntl = no; then
15241 HAVE_FCNTL=0
15242 else
15243 REPLACE_FCNTL=1
15244 fi
15245
15246 else
15247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
15248$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
d0ac1c44 15249if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
0750520d 15250 $as_echo_n "(cached) " >&6
6ec2e0f5
SDJ
15251else
15252 if test "$cross_compiling" = yes; then :
15253 case $host_os in
15254 aix* | cygwin* | haiku*)
15255 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
15256 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
15257 esac
0750520d
PA
15258else
15259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15260/* end confdefs.h. */
6ec2e0f5
SDJ
15261#include <errno.h>
15262 #include <fcntl.h>
15263 #include <limits.h>
15264 #include <sys/resource.h>
15265 #include <unistd.h>
15266 #ifndef RLIM_SAVED_CUR
15267 # define RLIM_SAVED_CUR RLIM_INFINITY
15268 #endif
15269 #ifndef RLIM_SAVED_MAX
15270 # define RLIM_SAVED_MAX RLIM_INFINITY
15271 #endif
0750520d 15272
6ec2e0f5
SDJ
15273int
15274main ()
15275{
15276int result = 0;
15277 int bad_fd = INT_MAX;
15278 struct rlimit rlim;
15279 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
15280 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
15281 && rlim.rlim_cur != RLIM_INFINITY
15282 && rlim.rlim_cur != RLIM_SAVED_MAX
15283 && rlim.rlim_cur != RLIM_SAVED_CUR)
15284 bad_fd = rlim.rlim_cur;
15285 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
15286 if (errno != EINVAL) result |= 2;
15287 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
15288 if (errno != EINVAL) result |= 8;
15289 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
15290 {
15291 int fd;
15292 fd = open (".", O_RDONLY);
15293 if (fd == -1)
15294 result |= 16;
15295 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
15296 result |= 32;
15297
15298 close (fd);
15299 }
15300 return result;
15301 ;
15302 return 0;
15303}
0750520d 15304_ACEOF
6ec2e0f5
SDJ
15305if ac_fn_c_try_run "$LINENO"; then :
15306 gl_cv_func_fcntl_f_dupfd_works=yes
0750520d 15307else
6ec2e0f5
SDJ
15308 gl_cv_func_fcntl_f_dupfd_works=no
15309fi
15310rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15311 conftest.$ac_objext conftest.beam conftest.$ac_ext
0750520d 15312fi
0750520d
PA
15313
15314fi
6ec2e0f5
SDJ
15315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
15316$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
15317 case $gl_cv_func_fcntl_f_dupfd_works in
15318 *yes) ;;
15319 *)
0750520d 15320
0750520d 15321
472fa5ee
SM
15322 :
15323
15324
15325
15326
15327
6ec2e0f5
SDJ
15328 if test $ac_cv_func_fcntl = no; then
15329 HAVE_FCNTL=0
15330 else
15331 REPLACE_FCNTL=1
15332 fi
0750520d 15333
0750520d 15334
6ec2e0f5
SDJ
15335$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
15336 ;;
15337 esac
0750520d 15338
6ec2e0f5
SDJ
15339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
15340$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
d0ac1c44 15341if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
8690e634
JK
15342 $as_echo_n "(cached) " >&6
15343else
15344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15345/* end confdefs.h. */
15346
6ec2e0f5
SDJ
15347#include <fcntl.h>
15348#ifndef F_DUPFD_CLOEXEC
15349choke me
15350#endif
49e4877c 15351
6ec2e0f5
SDJ
15352int
15353main ()
15354{
8690e634 15355
6ec2e0f5
SDJ
15356 ;
15357 return 0;
15358}
15359_ACEOF
15360if ac_fn_c_try_compile "$LINENO"; then :
15361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15362/* end confdefs.h. */
8690e634 15363
6ec2e0f5
SDJ
15364#ifdef __linux__
15365/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
15366 it to support the semantics on older kernels that failed with EINVAL. */
15367choke me
15368#endif
8690e634
JK
15369
15370int
15371main ()
15372{
15373
8690e634
JK
15374 ;
15375 return 0;
15376}
15377_ACEOF
15378if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 15379 gl_cv_func_fcntl_f_dupfd_cloexec=yes
8690e634 15380else
6ec2e0f5 15381 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
8690e634
JK
15382fi
15383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
15384else
15385 gl_cv_func_fcntl_f_dupfd_cloexec=no
8690e634 15386fi
6ec2e0f5
SDJ
15387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15388fi
15389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
15390$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
15391 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
15392
15393
15394
472fa5ee
SM
15395 :
15396
15397
15398
15399
15400
6ec2e0f5
SDJ
15401 if test $ac_cv_func_fcntl = no; then
15402 HAVE_FCNTL=0
15403 else
15404 REPLACE_FCNTL=1
15405 fi
15406
15407 fi
15408 fi
15409
15410
15411
15412
472fa5ee
SM
15413 :
15414
15415
15416
15417
15418
6ec2e0f5
SDJ
15419 if test $ac_cv_func_fchdir = no; then
15420 HAVE_FCHDIR=0
15421 fi
15422
15423 if test $HAVE_FCHDIR = 0; then
15424
15425
15426
472fa5ee
SM
15427 :
15428
15429
15430
15431
15432
6ec2e0f5
SDJ
15433 if test $ac_cv_func_fcntl = no; then
15434 HAVE_FCNTL=0
15435 else
15436 REPLACE_FCNTL=1
15437 fi
15438
15439 fi
15440
15441
15442 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
15443
15444
15445
15446
15447
15448
15449
15450
15451 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
15452
15453 fi
8690e634 15454
8690e634
JK
15455
15456
8690e634
JK
15457
15458
6ec2e0f5 15459 GNULIB_FCNTL=1
8690e634 15460
8690e634
JK
15461
15462
8690e634 15463
8690e634 15464
6ec2e0f5
SDJ
15465$as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
15466
8690e634 15467
8690e634 15468
63ce7108
TT
15469
15470
15471
15472
8690e634
JK
15473
15474
15475
15476
15477
15478
15479
15480 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 15481 gl_cv_next_fcntl_h='<'fcntl.h'>'
8690e634 15482 else
6ec2e0f5
SDJ
15483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
15484$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
d0ac1c44 15485if ${gl_cv_next_fcntl_h+:} false; then :
8690e634
JK
15486 $as_echo_n "(cached) " >&6
15487else
15488
4a626d0a
PA
15489
15490
15491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 15492/* end confdefs.h. */
6ec2e0f5 15493#include <fcntl.h>
8690e634 15494_ACEOF
4a626d0a
PA
15495 case "$host_os" in
15496 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15497 *) gl_absname_cpp="$ac_cpp" ;;
15498 esac
15499
15500 case "$host_os" in
15501 mingw*)
15502 gl_dirsep_regex='[/\\]'
15503 ;;
15504 *)
15505 gl_dirsep_regex='\/'
15506 ;;
15507 esac
15508 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 15509 gl_header_literal_regex=`echo 'fcntl.h' \
4a626d0a
PA
15510 | sed -e "$gl_make_literal_regex_sed"`
15511 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15512 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15513 s|^/[^/]|//&|
15514 p
15515 q
15516 }'
8690e634 15517
6ec2e0f5 15518 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a 15519 sed -n "$gl_absolute_header_sed"`
c971b7fa 15520
6ec2e0f5
SDJ
15521 gl_header=$gl_cv_absolute_fcntl_h
15522 gl_cv_next_fcntl_h='"'$gl_header'"'
8690e634
JK
15523
15524
15525fi
6ec2e0f5
SDJ
15526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
15527$as_echo "$gl_cv_next_fcntl_h" >&6; }
8690e634 15528 fi
6ec2e0f5 15529 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
8690e634
JK
15530
15531 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15532 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 15533 gl_next_as_first_directive='<'fcntl.h'>'
8690e634
JK
15534 else
15535 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 15536 gl_next_as_first_directive=$gl_cv_next_fcntl_h
8690e634 15537 fi
6ec2e0f5 15538 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
8690e634
JK
15539
15540
15541
15542
15543
15544
6ec2e0f5
SDJ
15545
15546
15547
15548
5e8754f9
SDJ
15549 for gl_func in fcntl openat; do
15550 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
15551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
15552$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
15553if eval \${$as_gl_Symbol+:} false; then :
15554 $as_echo_n "(cached) " >&6
15555else
15556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15557/* end confdefs.h. */
15558#include <fcntl.h>
8690e634 15559
5e8754f9
SDJ
15560int
15561main ()
15562{
15563#undef $gl_func
15564 (void) $gl_func;
15565 ;
15566 return 0;
15567}
15568_ACEOF
15569if ac_fn_c_try_compile "$LINENO"; then :
15570 eval "$as_gl_Symbol=yes"
15571else
15572 eval "$as_gl_Symbol=no"
15573fi
15574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15575fi
15576eval ac_res=\$$as_gl_Symbol
15577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15578$as_echo "$ac_res" >&6; }
15579 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
15580 cat >>confdefs.h <<_ACEOF
15581#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
7a6dbc2f 15582_ACEOF
8690e634 15583
5e8754f9
SDJ
15584 eval ac_cv_have_decl_$gl_func=yes
15585fi
15586 done
15587
8690e634
JK
15588
15589
8839a007 15590
63ce7108 15591
63ce7108 15592
63ce7108 15593
6ec2e0f5
SDJ
15594 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
15595#include <dirent.h>
15596
15597"
d0ac1c44 15598if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
6ec2e0f5
SDJ
15599 ac_have_decl=1
15600else
15601 ac_have_decl=0
15602fi
15603
15604cat >>confdefs.h <<_ACEOF
15605#define HAVE_DECL_FDOPENDIR $ac_have_decl
63ce7108 15606_ACEOF
6ec2e0f5
SDJ
15607if test $ac_have_decl = 1; then :
15608
63ce7108 15609else
6ec2e0f5 15610 HAVE_DECL_FDOPENDIR=0
63ce7108 15611fi
63ce7108
TT
15612
15613
472fa5ee
SM
15614 :
15615
15616
15617
15618
15619
6ec2e0f5
SDJ
15620 if test $ac_cv_func_fdopendir = no; then
15621 HAVE_FDOPENDIR=0
15622 else
15623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
15624$as_echo_n "checking whether fdopendir works... " >&6; }
d0ac1c44 15625if ${gl_cv_func_fdopendir_works+:} false; then :
6ec2e0f5
SDJ
15626 $as_echo_n "(cached) " >&6
15627else
15628 if test "$cross_compiling" = yes; then :
15629 case "$host_os" in
15630 # Guess yes on glibc systems.
15631 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
15632 # If we don't know, assume the worst.
15633 *) gl_cv_func_fdopendir_works="guessing no" ;;
15634 esac
15635
63ce7108
TT
15636else
15637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15638/* end confdefs.h. */
15639
6ec2e0f5
SDJ
15640#include <dirent.h>
15641#include <fcntl.h>
15642#include <unistd.h>
15643#if !HAVE_DECL_FDOPENDIR
15644extern
15645# ifdef __cplusplus
15646"C"
15647# endif
15648DIR *fdopendir (int);
15649#endif
63ce7108
TT
15650
15651int
15652main ()
15653{
6ec2e0f5
SDJ
15654int result = 0;
15655 int fd = open ("conftest.c", O_RDONLY);
15656 if (fd < 0) result |= 1;
15657 if (fdopendir (fd)) result |= 2;
15658 if (close (fd)) result |= 4;
15659 return result;
63ce7108
TT
15660 ;
15661 return 0;
15662}
15663_ACEOF
15664if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 15665 gl_cv_func_fdopendir_works=yes
63ce7108 15666else
6ec2e0f5 15667 gl_cv_func_fdopendir_works=no
63ce7108
TT
15668fi
15669rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15670 conftest.$ac_objext conftest.beam conftest.$ac_ext
15671fi
15672
63ce7108 15673fi
6ec2e0f5
SDJ
15674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
15675$as_echo "$gl_cv_func_fdopendir_works" >&6; }
15676 case "$gl_cv_func_fdopendir_works" in
63ce7108
TT
15677 *yes) ;;
15678 *)
6ec2e0f5 15679 REPLACE_FDOPENDIR=1
63ce7108
TT
15680 ;;
15681 esac
15682 fi
15683
6ec2e0f5 15684 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
09607c9e
TT
15685
15686
15687
4a626d0a
PA
15688
15689
15690
15691
15692
6ec2e0f5 15693 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
4a626d0a 15694
6ec2e0f5 15695 fi
4a626d0a
PA
15696
15697
15698
4a626d0a 15699
4a626d0a 15700
6ec2e0f5 15701 GNULIB_FDOPENDIR=1
4a626d0a
PA
15702
15703
15704
15705
15706
6ec2e0f5 15707$as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
4a626d0a
PA
15708
15709
15710
15711
15712
6ec2e0f5
SDJ
15713cat >>confdefs.h <<_ACEOF
15714#define GNULIB_FDOPENDIR 1
15715_ACEOF
4a626d0a 15716
09607c9e 15717
09607c9e
TT
15718
15719
472fa5ee
SM
15720 :
15721
15722
15723
15724
15725
09607c9e 15726
6ec2e0f5
SDJ
15727
15728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
15729$as_echo_n "checking for flexible array member... " >&6; }
d0ac1c44 15730if ${ac_cv_c_flexmember+:} false; then :
09607c9e
TT
15731 $as_echo_n "(cached) " >&6
15732else
15733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15734/* end confdefs.h. */
6ec2e0f5
SDJ
15735#include <stdlib.h>
15736 #include <stdio.h>
15737 #include <stddef.h>
5e8754f9 15738 struct s { int n; double d[]; };
09607c9e
TT
15739int
15740main ()
15741{
6ec2e0f5
SDJ
15742int m = getchar ();
15743 size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
15744 nbytes += sizeof (struct s) - 1;
15745 nbytes -= nbytes % sizeof (struct s);
15746 struct s *p = malloc (nbytes);
15747 p->d[0] = 0.0;
15748 return p->d != (double *) NULL;
09607c9e
TT
15749 ;
15750 return 0;
15751}
15752_ACEOF
15753if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 15754 ac_cv_c_flexmember=yes
09607c9e 15755else
6ec2e0f5 15756 ac_cv_c_flexmember=no
09607c9e
TT
15757fi
15758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15759fi
6ec2e0f5
SDJ
15760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
15761$as_echo "$ac_cv_c_flexmember" >&6; }
15762 if test $ac_cv_c_flexmember = yes; then
15763
15764$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
09607c9e 15765
09607c9e 15766 else
6ec2e0f5 15767 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
09607c9e 15768
6ec2e0f5
SDJ
15769 fi
15770
15771
15772
15773
15774 FLOAT_H=
15775 REPLACE_FLOAT_LDBL=0
15776 case "$host_os" in
15777 aix* | beos* | openbsd* | mirbsd* | irix*)
15778 FLOAT_H=float.h
15779 ;;
5e8754f9 15780 freebsd*)
6ec2e0f5
SDJ
15781 case "$host_cpu" in
15782 i[34567]86 )
15783 FLOAT_H=float.h
15784 ;;
15785 x86_64 )
15786 # On x86_64 systems, the C compiler may still be generating
15787 # 32-bit code.
15788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15789/* end confdefs.h. */
15790#if defined __LP64__ || defined __x86_64__ || defined __amd64__
5e8754f9
SDJ
15791 yes
15792 #endif
09607c9e 15793_ACEOF
5e8754f9
SDJ
15794if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15795 $EGREP "yes" >/dev/null 2>&1; then :
6ec2e0f5 15796
09607c9e 15797else
6ec2e0f5 15798 FLOAT_H=float.h
09607c9e 15799fi
5e8754f9
SDJ
15800rm -f conftest*
15801
6ec2e0f5
SDJ
15802 ;;
15803 esac
15804 ;;
15805 linux*)
15806 case "$host_cpu" in
15807 powerpc*)
15808 FLOAT_H=float.h
15809 ;;
15810 esac
15811 ;;
15812 esac
15813 case "$host_os" in
5e8754f9 15814 aix* | freebsd* | linux*)
6ec2e0f5
SDJ
15815 if test -n "$FLOAT_H"; then
15816 REPLACE_FLOAT_LDBL=1
15817 fi
15818 ;;
15819 esac
15820
15821 REPLACE_ITOLD=0
15822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
15823$as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
d0ac1c44 15824if ${gl_cv_func_itold_works+:} false; then :
09607c9e
TT
15825 $as_echo_n "(cached) " >&6
15826else
09607c9e 15827
6ec2e0f5
SDJ
15828 if test "$cross_compiling" = yes; then :
15829 case "$host" in
15830 sparc*-*-linux*)
15831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15832/* end confdefs.h. */
15833#if defined __LP64__ || defined __arch64__
5e8754f9
SDJ
15834 yes
15835 #endif
09607c9e 15836_ACEOF
5e8754f9
SDJ
15837if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15838 $EGREP "yes" >/dev/null 2>&1; then :
6ec2e0f5 15839 gl_cv_func_itold_works="guessing no"
09607c9e 15840else
6ec2e0f5 15841 gl_cv_func_itold_works="guessing yes"
09607c9e 15842fi
5e8754f9
SDJ
15843rm -f conftest*
15844
6ec2e0f5 15845 ;;
5e8754f9 15846 *) gl_cv_func_itold_works="guessing yes" ;;
6ec2e0f5
SDJ
15847 esac
15848
4a626d0a
PA
15849else
15850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15851/* end confdefs.h. */
4a626d0a 15852
6ec2e0f5
SDJ
15853int i = -1;
15854volatile long double ld;
15855int main ()
4a626d0a 15856{
6ec2e0f5
SDJ
15857 ld += i * 1.0L;
15858 if (ld > 0)
15859 return 1;
4a626d0a
PA
15860 return 0;
15861}
15862_ACEOF
6ec2e0f5
SDJ
15863if ac_fn_c_try_run "$LINENO"; then :
15864 gl_cv_func_itold_works=yes
4a626d0a 15865else
6ec2e0f5
SDJ
15866 gl_cv_func_itold_works=no
15867fi
15868rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15869 conftest.$ac_objext conftest.beam conftest.$ac_ext
15870fi
09607c9e
TT
15871
15872
6ec2e0f5
SDJ
15873fi
15874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
15875$as_echo "$gl_cv_func_itold_works" >&6; }
15876 case "$gl_cv_func_itold_works" in
15877 *no)
15878 REPLACE_ITOLD=1
15879 FLOAT_H=float.h
15880 ;;
15881 esac
09607c9e 15882
6ec2e0f5 15883 if test -n "$FLOAT_H"; then
09607c9e
TT
15884
15885
15886
15887
15888
15889
15890
4a626d0a 15891
09607c9e 15892 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 15893 gl_cv_next_float_h='<'float.h'>'
09607c9e 15894 else
6ec2e0f5
SDJ
15895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
15896$as_echo_n "checking absolute name of <float.h>... " >&6; }
d0ac1c44 15897if ${gl_cv_next_float_h+:} false; then :
09607c9e
TT
15898 $as_echo_n "(cached) " >&6
15899else
15900
4a626d0a
PA
15901
15902
15903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
09607c9e 15904/* end confdefs.h. */
6ec2e0f5 15905#include <float.h>
09607c9e 15906_ACEOF
4a626d0a
PA
15907 case "$host_os" in
15908 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15909 *) gl_absname_cpp="$ac_cpp" ;;
15910 esac
15911
15912 case "$host_os" in
15913 mingw*)
15914 gl_dirsep_regex='[/\\]'
15915 ;;
15916 *)
15917 gl_dirsep_regex='\/'
15918 ;;
15919 esac
15920 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 15921 gl_header_literal_regex=`echo 'float.h' \
4a626d0a
PA
15922 | sed -e "$gl_make_literal_regex_sed"`
15923 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15924 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15925 s|^/[^/]|//&|
15926 p
15927 q
15928 }'
09607c9e 15929
6ec2e0f5 15930 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a 15931 sed -n "$gl_absolute_header_sed"`
09607c9e 15932
6ec2e0f5
SDJ
15933 gl_header=$gl_cv_absolute_float_h
15934 gl_cv_next_float_h='"'$gl_header'"'
09607c9e
TT
15935
15936
15937fi
6ec2e0f5
SDJ
15938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
15939$as_echo "$gl_cv_next_float_h" >&6; }
09607c9e 15940 fi
6ec2e0f5 15941 NEXT_FLOAT_H=$gl_cv_next_float_h
09607c9e
TT
15942
15943 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15944 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 15945 gl_next_as_first_directive='<'float.h'>'
09607c9e
TT
15946 else
15947 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 15948 gl_next_as_first_directive=$gl_cv_next_float_h
09607c9e 15949 fi
6ec2e0f5 15950 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
09607c9e
TT
15951
15952
15953
15954
6ec2e0f5 15955 fi
09607c9e 15956
6ec2e0f5
SDJ
15957 if test -n "$FLOAT_H"; then
15958 GL_GENERATE_FLOAT_H_TRUE=
15959 GL_GENERATE_FLOAT_H_FALSE='#'
3d99e817 15960else
6ec2e0f5
SDJ
15961 GL_GENERATE_FLOAT_H_TRUE='#'
15962 GL_GENERATE_FLOAT_H_FALSE=
3d99e817
AK
15963fi
15964
3d99e817 15965
09607c9e 15966
6ec2e0f5 15967 if test $REPLACE_FLOAT_LDBL = 1; then
8690e634 15968
8690e634 15969
8690e634 15970
8690e634 15971
8690e634 15972
6ec2e0f5
SDJ
15973
15974
15975
15976 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
15977
8690e634 15978 fi
6ec2e0f5 15979 if test $REPLACE_ITOLD = 1; then
8690e634
JK
15980
15981
15982
15983
15984
6ec2e0f5
SDJ
15985
15986
15987
15988 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
15989
8690e634
JK
15990 fi
15991
15992
15993
6ec2e0f5 15994
5e8754f9
SDJ
15995
15996 FNMATCH_H=
6ec2e0f5
SDJ
15997 gl_fnmatch_required_lowercase=`
15998 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
15999 `
5e8754f9
SDJ
16000 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
16001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
6ec2e0f5 16002$as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
d0ac1c44 16003if eval \${$gl_fnmatch_cache_var+:} false; then :
8690e634 16004 $as_echo_n "(cached) " >&6
6ec2e0f5 16005else
5e8754f9
SDJ
16006 if test $gl_fnmatch_required = GNU; then
16007 gl_fnmatch_gnu_start=
16008 gl_fnmatch_gnu_end=
16009 else
16010 gl_fnmatch_gnu_start='#if 0'
16011 gl_fnmatch_gnu_end='#endif'
16012 fi
16013 if test "$cross_compiling" = yes; then :
6ec2e0f5 16014 eval "$gl_fnmatch_cache_var=\"guessing no\""
8690e634
JK
16015else
16016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16017/* end confdefs.h. */
6ec2e0f5 16018#include <fnmatch.h>
5e8754f9
SDJ
16019 static int
16020 y (char const *pattern, char const *string, int flags)
16021 {
16022 return fnmatch (pattern, string, flags) == 0;
16023 }
16024 static int
16025 n (char const *pattern, char const *string, int flags)
16026 {
16027 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
16028 }
8690e634 16029
8690e634
JK
16030int
16031main ()
16032{
6ec2e0f5 16033char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
5e8754f9
SDJ
16034 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
16035 static char const A_1[] = { 'A' - 1, 0 };
16036 static char const A01[] = { 'A' + 1, 0 };
16037 static char const a_1[] = { 'a' - 1, 0 };
16038 static char const a01[] = { 'a' + 1, 0 };
16039 static char const bs_1[] = { '\\\\' - 1, 0 };
16040 static char const bs01[] = { '\\\\' + 1, 0 };
16041 int result = 0;
16042 if (!n ("a*", "", 0))
16043 return 1;
16044 if (!y ("a*", "abc", 0))
16045 return 1;
16046 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
16047 return 1;
16048 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
16049 return 2;
16050 if (!y ("a\\\\bc", "abc", 0))
16051 return 3;
16052 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
16053 return 3;
16054 if (!y ("*x", ".x", 0))
16055 return 4;
16056 if (!n ("*x", ".x", FNM_PERIOD))
16057 return 4;
16058 if (!y (Apat, "\\\\", 0))
16059 return 5;
16060 if (!y (Apat, "A", 0))
16061 return 5;
16062 if (!y (apat, "\\\\", 0))
16063 return 5;
16064 if (!y (apat, "a", 0))
16065 return 5;
16066 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
16067 return 5;
16068 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
16069 return 5;
16070 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
16071 return 5;
16072 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
16073 return 5;
16074 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
16075 return 5;
16076 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
16077 return 5;
16078 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
16079 return 5;
16080 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
16081 return 5;
16082 $gl_fnmatch_gnu_start
16083 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
16084 result |= 8;
16085 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
16086 result |= 16;
16087 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
16088 result |= 32;
16089 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
16090 result |= 64;
16091 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
16092 result |= 64;
16093 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
16094 result |= 64;
16095 $gl_fnmatch_gnu_end
16096 return result;
8690e634
JK
16097
16098 ;
16099 return 0;
16100}
16101_ACEOF
6ec2e0f5
SDJ
16102if ac_fn_c_try_run "$LINENO"; then :
16103 eval "$gl_fnmatch_cache_var=yes"
8690e634 16104else
6ec2e0f5 16105 eval "$gl_fnmatch_cache_var=no"
8690e634 16106fi
6ec2e0f5
SDJ
16107rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16108 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 16109fi
8690e634 16110
8690e634 16111
6ec2e0f5
SDJ
16112fi
16113eval ac_res=\$$gl_fnmatch_cache_var
16114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16115$as_echo "$ac_res" >&6; }
5e8754f9
SDJ
16116 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
16117 if test "$gl_fnmatch_result" = yes; then
16118 rm -f "$gl_source_base/fnmatch.h"
16119 else
16120 FNMATCH_H=fnmatch.h
8690e634
JK
16121 fi
16122
6ec2e0f5
SDJ
16123 if test -n "$FNMATCH_H"; then
16124 GL_GENERATE_FNMATCH_H_TRUE=
16125 GL_GENERATE_FNMATCH_H_FALSE='#'
16126else
16127 GL_GENERATE_FNMATCH_H_TRUE='#'
16128 GL_GENERATE_FNMATCH_H_FALSE=
16129fi
8690e634 16130
8690e634 16131
5e8754f9 16132 if test -n "$FNMATCH_H"; then
8690e634 16133
6ec2e0f5
SDJ
16134
16135
16136
16137
16138
6ec2e0f5
SDJ
16139
16140
7a6dbc2f 16141 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
6ec2e0f5 16142
6ec2e0f5
SDJ
16143
16144
5e8754f9
SDJ
16145cat >>confdefs.h <<_ACEOF
16146#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
16147_ACEOF
16148
16149
6ec2e0f5
SDJ
16150 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
16151"
d0ac1c44 16152if test "x$ac_cv_have_decl_isblank" = xyes; then :
6ec2e0f5 16153 ac_have_decl=1
8690e634 16154else
6ec2e0f5 16155 ac_have_decl=0
8690e634
JK
16156fi
16157
6ec2e0f5
SDJ
16158cat >>confdefs.h <<_ACEOF
16159#define HAVE_DECL_ISBLANK $ac_have_decl
16160_ACEOF
8690e634
JK
16161
16162
472fa5ee
SM
16163 :
16164
16165
16166
16167
16168
16169
16170
16171
16172
16173
16174
16175
16176
16177
16178
16179
16180
16181
16182
16183
16184
16185
16186
16187
16188
16189
16190
16191 :
16192
16193
16194
16195
8690e634
JK
16196
16197
6ec2e0f5 16198 fi
8690e634
JK
16199
16200
16201
16202
16203
5e8754f9
SDJ
16204 if test -n "$FNMATCH_H"; then
16205
16206
16207
16208
472fa5ee
SM
16209
16210
16211
16212
5e8754f9 16213 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
472fa5ee
SM
16214
16215
16216
5e8754f9
SDJ
16217cat >>confdefs.h <<_ACEOF
16218#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
16219_ACEOF
472fa5ee
SM
16220
16221
5e8754f9
SDJ
16222 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
16223"
16224if test "x$ac_cv_have_decl_isblank" = xyes; then :
16225 ac_have_decl=1
16226else
16227 ac_have_decl=0
16228fi
472fa5ee 16229
5e8754f9
SDJ
16230cat >>confdefs.h <<_ACEOF
16231#define HAVE_DECL_ISBLANK $ac_have_decl
16232_ACEOF
472fa5ee
SM
16233
16234
5e8754f9 16235 :
472fa5ee
SM
16236
16237
16238
16239
16240
16241
16242
16243
16244
16245
16246
98399780 16247
5e8754f9
SDJ
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260
16261
16262
16263 :
16264
16265
16266
16267
16268
16269
16270 fi
16271
16272
16273
16274 FREXP_LIBM=
16275 if test $gl_cv_func_frexp_no_libm = no; then
16276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5
16277$as_echo_n "checking whether frexp() can be used with libm... " >&6; }
16278if ${gl_cv_func_frexp_in_libm+:} false; then :
16279 $as_echo_n "(cached) " >&6
6ec2e0f5 16280else
98399780 16281
5e8754f9
SDJ
16282 save_LIBS="$LIBS"
16283 LIBS="$LIBS -lm"
16284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16285/* end confdefs.h. */
16286#include <math.h>
16287 double x;
16288int
16289main ()
16290{
16291int e; return frexp (x, &e) > 0;
16292 ;
16293 return 0;
16294}
7a6dbc2f 16295_ACEOF
5e8754f9
SDJ
16296if ac_fn_c_try_link "$LINENO"; then :
16297 gl_cv_func_frexp_in_libm=yes
16298else
16299 gl_cv_func_frexp_in_libm=no
16300fi
16301rm -f core conftest.err conftest.$ac_objext \
16302 conftest$ac_exeext conftest.$ac_ext
16303 LIBS="$save_LIBS"
16304
16305fi
16306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5
16307$as_echo "$gl_cv_func_frexp_in_libm" >&6; }
16308 if test $gl_cv_func_frexp_in_libm = yes; then
16309 FREXP_LIBM=-lm
16310 fi
16311 fi
16312 if test $gl_cv_func_frexp_no_libm = yes \
16313 || test $gl_cv_func_frexp_in_libm = yes; then
16314 save_LIBS="$LIBS"
16315 LIBS="$LIBS $FREXP_LIBM"
16316
98399780
YQ
16317
16318
472fa5ee
SM
16319 :
16320
16321
16322
16323
16324
5e8754f9
SDJ
16325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
16326$as_echo_n "checking whether frexp works... " >&6; }
16327if ${gl_cv_func_frexp_works+:} false; then :
16328 $as_echo_n "(cached) " >&6
16329else
16330
16331 if test "$cross_compiling" = yes; then :
16332 case "$host_os" in
16333 netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
16334 *) gl_cv_func_frexp_works="guessing yes";;
16335 esac
16336
16337else
16338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16339/* end confdefs.h. */
16340
16341#include <float.h>
16342#include <math.h>
16343#include <string.h>
16344#if HAVE_DECL_ALARM
16345# include <signal.h>
16346# include <unistd.h>
16347#endif
16348/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
16349 ICC 10.0 has a bug when optimizing the expression -zero.
16350 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
16351 to PowerPC on Mac OS X 10.5. */
16352#if defined __hpux || defined __sgi || defined __ICC
16353static double
16354compute_minus_zero (void)
16355{
16356 return -DBL_MIN * DBL_MIN;
16357}
16358# define minus_zero compute_minus_zero ()
16359#else
16360double minus_zero = -0.0;
16361#endif
16362int main()
16363{
16364 int result = 0;
16365 int i;
16366 volatile double x;
16367 double zero = 0.0;
16368#if HAVE_DECL_ALARM
16369 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
16370 number. Let the test fail in this case. */
16371 signal (SIGALRM, SIG_DFL);
16372 alarm (5);
16373#endif
16374 /* Test on denormalized numbers. */
16375 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
16376 ;
16377 if (x > 0.0)
16378 {
16379 int exp;
16380 double y = frexp (x, &exp);
16381 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
16382 On NetBSD: y = 0.75. Correct: y = 0.5. */
16383 if (y != 0.5)
16384 result |= 1;
16385 }
16386 /* Test on infinite numbers. */
16387 x = 1.0 / zero;
16388 {
16389 int exp;
16390 double y = frexp (x, &exp);
16391 if (y != x)
16392 result |= 2;
16393 }
16394 /* Test on negative zero. */
16395 x = minus_zero;
16396 {
16397 int exp;
16398 double y = frexp (x, &exp);
16399 if (memcmp (&y, &x, sizeof x))
16400 result |= 4;
16401 }
16402 return result;
16403}
16404_ACEOF
16405if ac_fn_c_try_run "$LINENO"; then :
16406 gl_cv_func_frexp_works=yes
16407else
16408 gl_cv_func_frexp_works=no
16409fi
16410rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16411 conftest.$ac_objext conftest.beam conftest.$ac_ext
16412fi
16413
98399780 16414
5e8754f9
SDJ
16415fi
16416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
16417$as_echo "$gl_cv_func_frexp_works" >&6; }
98399780 16418
5e8754f9
SDJ
16419 LIBS="$save_LIBS"
16420 case "$gl_cv_func_frexp_works" in
16421 *yes) gl_func_frexp=yes ;;
16422 *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;;
16423 esac
16424 else
16425 gl_func_frexp=no
16426 fi
16427 if test $gl_func_frexp = yes; then
98399780 16428
5e8754f9 16429$as_echo "#define HAVE_FREXP 1" >>confdefs.h
98399780 16430
5e8754f9 16431 fi
98399780
YQ
16432
16433
5e8754f9 16434 if test $gl_func_frexp != yes; then
6a29c58e
YQ
16435
16436
16437
16438
6a29c58e
YQ
16439
16440
16441
16442
5e8754f9 16443 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
8690e634 16444
5e8754f9 16445 fi
8690e634 16446
8690e634 16447
8690e634 16448
8690e634 16449
8690e634 16450
5e8754f9 16451 GNULIB_FREXP=1
8690e634 16452
8690e634 16453
4a626d0a 16454
8690e634 16455
8690e634 16456
5e8754f9 16457$as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
8690e634
JK
16458
16459
16460
16461
16462
63ce7108 16463
e26b6bb0
TT
16464
16465
16466
5e8754f9
SDJ
16467 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
16468"
16469if test "x$ac_cv_have_decl_frexpl" = xyes; then :
e26b6bb0 16470
5e8754f9
SDJ
16471else
16472 HAVE_DECL_FREXPL=0
16473fi
e26b6bb0
TT
16474
16475
5e8754f9
SDJ
16476 FREXPL_LIBM=
16477 if test $HAVE_DECL_FREXPL = 1; then
e26b6bb0 16478
5e8754f9
SDJ
16479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
16480$as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
16481if ${gl_cv_func_frexpl_no_libm+:} false; then :
16482 $as_echo_n "(cached) " >&6
16483else
e26b6bb0 16484
5e8754f9
SDJ
16485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16486/* end confdefs.h. */
16487#include <math.h>
16488 long double x;
16489int
16490main ()
16491{
16492int e; return frexpl (x, &e) > 0;
16493 ;
16494 return 0;
16495}
16496_ACEOF
16497if ac_fn_c_try_link "$LINENO"; then :
16498 gl_cv_func_frexpl_no_libm=yes
16499else
16500 gl_cv_func_frexpl_no_libm=no
16501fi
16502rm -f core conftest.err conftest.$ac_objext \
16503 conftest$ac_exeext conftest.$ac_ext
e26b6bb0 16504
5e8754f9
SDJ
16505fi
16506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
16507$as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
e26b6bb0 16508
5e8754f9
SDJ
16509 if test $gl_cv_func_frexpl_no_libm = no; then
16510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5
16511$as_echo_n "checking whether frexpl() can be used with libm... " >&6; }
16512if ${gl_cv_func_frexpl_in_libm+:} false; then :
16513 $as_echo_n "(cached) " >&6
16514else
e26b6bb0 16515
5e8754f9
SDJ
16516 save_LIBS="$LIBS"
16517 LIBS="$LIBS -lm"
16518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16519/* end confdefs.h. */
16520#include <math.h>
16521 long double x;
16522int
16523main ()
16524{
16525int e; return frexpl (x, &e) > 0;
16526 ;
16527 return 0;
16528}
16529_ACEOF
16530if ac_fn_c_try_link "$LINENO"; then :
16531 gl_cv_func_frexpl_in_libm=yes
16532else
16533 gl_cv_func_frexpl_in_libm=no
16534fi
16535rm -f core conftest.err conftest.$ac_objext \
16536 conftest$ac_exeext conftest.$ac_ext
16537 LIBS="$save_LIBS"
e26b6bb0 16538
5e8754f9
SDJ
16539fi
16540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5
16541$as_echo "$gl_cv_func_frexpl_in_libm" >&6; }
16542 if test $gl_cv_func_frexpl_in_libm = yes; then
16543 FREXPL_LIBM=-lm
16544 fi
16545 fi
16546 if test $gl_cv_func_frexpl_no_libm = yes \
16547 || test $gl_cv_func_frexpl_in_libm = yes; then
16548 save_LIBS="$LIBS"
16549 LIBS="$LIBS $FREXPL_LIBM"
18848e28 16550
18848e28 16551
5e8754f9
SDJ
16552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
16553$as_echo_n "checking whether frexpl works... " >&6; }
16554if ${gl_cv_func_frexpl_works+:} false; then :
16555 $as_echo_n "(cached) " >&6
16556else
18848e28 16557
5e8754f9 16558 if test "$cross_compiling" = yes; then :
18848e28 16559
5e8754f9
SDJ
16560 case "$host_os" in
16561 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
16562 gl_cv_func_frexpl_works="guessing no";;
16563 *) gl_cv_func_frexpl_works="guessing yes";;
16564 esac
18848e28 16565
5e8754f9
SDJ
16566else
16567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16568/* end confdefs.h. */
18848e28 16569
5e8754f9
SDJ
16570#include <float.h>
16571#include <math.h>
16572/* Override the values of <float.h>, like done in float.in.h. */
16573#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
16574# undef LDBL_MIN_EXP
16575# define LDBL_MIN_EXP (-16381)
16576#endif
16577#if defined __i386__ && defined __FreeBSD__
16578# undef LDBL_MIN_EXP
16579# define LDBL_MIN_EXP (-16381)
16580#endif
16581#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
16582# undef LDBL_MIN_EXP
16583# define LDBL_MIN_EXP DBL_MIN_EXP
16584#endif
16585#if defined __sgi && (LDBL_MANT_DIG >= 106)
16586# if defined __GNUC__
16587# undef LDBL_MIN_EXP
16588# define LDBL_MIN_EXP DBL_MIN_EXP
16589# endif
16590#endif
16591extern
16592#ifdef __cplusplus
16593"C"
16594#endif
16595long double frexpl (long double, int *);
16596int main()
16597{
16598 int result = 0;
16599 volatile long double x;
16600 /* Test on finite numbers that fails on AIX 5.1. */
16601 x = 16.0L;
16602 {
16603 int exp = -9999;
16604 frexpl (x, &exp);
16605 if (exp != 5)
16606 result |= 1;
16607 }
16608 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
16609 function returns an invalid (incorrectly normalized) value: it returns
16610 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
16611 but the correct result is
16612 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
16613 x = 1.01L;
16614 {
16615 int exp = -9999;
16616 long double y = frexpl (x, &exp);
16617 if (!(exp == 1 && y == 0.505L))
16618 result |= 2;
16619 }
16620 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
16621 LDBL_MAX_EXP = 16384.
16622 In the loop end test, we test x against Infinity, rather than comparing
16623 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
16624 {
16625 int i;
16626 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
16627 {
16628 int exp = -9999;
16629 frexpl (x, &exp);
16630 if (exp != i)
16631 {
16632 result |= 4;
16633 break;
16634 }
16635 }
16636 }
16637 /* Test on denormalized numbers. */
16638 {
16639 int i;
16640 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
16641 ;
16642 if (x > 0.0L)
16643 {
16644 int exp;
16645 long double y = frexpl (x, &exp);
16646 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
16647 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
16648 if (exp != LDBL_MIN_EXP - 1)
16649 result |= 8;
16650 }
16651 }
16652 /* Test on infinite numbers. */
16653 x = 1.0L / 0.0L;
16654 {
16655 int exp;
16656 long double y = frexpl (x, &exp);
16657 if (y != x)
16658 result |= 16;
16659 }
16660 return result;
16661}
16662_ACEOF
16663if ac_fn_c_try_run "$LINENO"; then :
16664 gl_cv_func_frexpl_works=yes
16665else
16666 gl_cv_func_frexpl_works=no
16667fi
16668rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16669 conftest.$ac_objext conftest.beam conftest.$ac_ext
16670fi
18848e28
GF
16671
16672
5e8754f9
SDJ
16673fi
16674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
16675$as_echo "$gl_cv_func_frexpl_works" >&6; }
18848e28 16676
5e8754f9
SDJ
16677 LIBS="$save_LIBS"
16678 case "$gl_cv_func_frexpl_works" in
16679 *yes) gl_func_frexpl=yes ;;
16680 *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;;
16681 esac
16682 else
16683 gl_func_frexpl=no
16684 fi
16685 if test $gl_func_frexpl = yes; then
18848e28 16686
5e8754f9 16687$as_echo "#define HAVE_FREXPL 1" >>confdefs.h
18848e28 16688
5e8754f9
SDJ
16689 fi
16690 fi
16691 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
16692 if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
18848e28 16693
5e8754f9
SDJ
16694 FREXPL_LIBM="$FREXP_LIBM"
16695 else
16696 FREXPL_LIBM=
16697 fi
16698 fi
18848e28 16699
18848e28 16700
6ec2e0f5 16701 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
18848e28 16702
18848e28 16703
18848e28 16704
18848e28
GF
16705
16706
18848e28 16707
18848e28 16708
18848e28 16709
6ec2e0f5 16710 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
18848e28
GF
16711
16712 fi
16713
16714
16715
16716
16717
6ec2e0f5 16718 GNULIB_FREXPL=1
18848e28
GF
16719
16720
16721
16722
16723
6ec2e0f5 16724$as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
18848e28
GF
16725
16726
16727
16728
16729
16730
16731
5e8754f9
SDJ
16732 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
16733 REPLACE_FSTAT=1
16734 fi
16735
16736
16737 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
16738 REPLACE_FSTAT=1
16739 fi
18848e28 16740
6a29c58e 16741
6a29c58e 16742
6a29c58e 16743
6ec2e0f5 16744
472fa5ee
SM
16745 :
16746
16747
16748
16749
16750
6ec2e0f5
SDJ
16751 if test $ac_cv_func_fchdir = no; then
16752 HAVE_FCHDIR=0
6a29c58e
YQ
16753 fi
16754
6ec2e0f5
SDJ
16755 if test $HAVE_FCHDIR = 0; then
16756 case "$gl_cv_func_open_directory_works" in
16757 *yes) ;;
16758 *)
16759 REPLACE_FSTAT=1
16760 ;;
16761 esac
16762 fi
6a29c58e
YQ
16763
16764
6ec2e0f5 16765 if test $REPLACE_FSTAT = 1; then
6a29c58e 16766
3d99e817
AK
16767
16768
16769
3d99e817
AK
16770
16771
16772
16773
6ec2e0f5 16774 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
3d99e817 16775
5e8754f9 16776 :
6ec2e0f5 16777 fi
3d99e817
AK
16778
16779
16780
16781
16782
6ec2e0f5 16783 GNULIB_FSTAT=1
3d99e817 16784
49e4877c 16785
49e4877c 16786
49e4877c 16787
49e4877c 16788
6ec2e0f5 16789$as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
49e4877c 16790
6a29c58e
YQ
16791
16792
88b48903 16793
8690e634 16794
a512b375 16795
88b48903 16796
88b48903 16797
472fa5ee
SM
16798 :
16799
16800
16801
16802
16803
6ec2e0f5
SDJ
16804
16805 if test $ac_cv_func_fstatat = no; then
16806 HAVE_FSTATAT=0
16807 else
16808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
16809$as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
d0ac1c44 16810if ${gl_cv_func_fstatat_zero_flag+:} false; then :
6ec2e0f5
SDJ
16811 $as_echo_n "(cached) " >&6
16812else
16813 if test "$cross_compiling" = yes; then :
16814 case "$host_os" in
16815 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
16816 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
16817 esac
88b48903 16818
8690e634
JK
16819else
16820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16821/* end confdefs.h. */
8690e634 16822
6ec2e0f5
SDJ
16823 #include <fcntl.h>
16824 #include <sys/stat.h>
16825 int
16826 main (void)
16827 {
16828 struct stat a;
16829 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
16830 }
16831
88b48903
WN
16832_ACEOF
16833if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 16834 gl_cv_func_fstatat_zero_flag=yes
88b48903 16835else
6ec2e0f5 16836 gl_cv_func_fstatat_zero_flag=no
88b48903
WN
16837fi
16838rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16839 conftest.$ac_objext conftest.beam conftest.$ac_ext
16840fi
16841
16842
16843fi
6ec2e0f5
SDJ
16844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
16845$as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
88b48903 16846
6ec2e0f5
SDJ
16847 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
16848 *yes+*yes) ;;
5e8754f9
SDJ
16849 *) REPLACE_FSTATAT=1
16850 case $gl_cv_func_fstatat_zero_flag in
16851 *yes)
88b48903 16852
6ec2e0f5 16853$as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
88b48903 16854
7a6dbc2f 16855 ;;
5e8754f9
SDJ
16856 esac
16857 ;;
6ec2e0f5
SDJ
16858 esac
16859 fi
88b48903 16860
6ec2e0f5 16861 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
88b48903
WN
16862
16863
16864
16865
16866
88b48903 16867
4a626d0a
PA
16868
16869
6ec2e0f5
SDJ
16870 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
16871
16872 fi
16873
16874
16875
4a626d0a 16876
6ec2e0f5
SDJ
16877
16878 GNULIB_FSTATAT=1
16879
16880
16881
16882
16883
16884$as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
16885
16886
16887
16888
16889
16890
16891
16892
16893 gl_abort_bug=no
4a626d0a
PA
16894 case "$host_os" in
16895 mingw*)
6ec2e0f5 16896 gl_cv_func_getcwd_path_max=yes
4a626d0a
PA
16897 ;;
16898 *)
88b48903 16899
88b48903 16900
472fa5ee
SM
16901 :
16902
16903
16904
16905
16906
16907
16908
16909 :
16910
16911
16912
88b48903
WN
16913
16914
88b48903 16915
6ec2e0f5
SDJ
16916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
16917$as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
d0ac1c44 16918if ${gl_cv_func_getcwd_path_max+:} false; then :
6ec2e0f5
SDJ
16919 $as_echo_n "(cached) " >&6
16920else
16921 # Arrange for deletion of the temporary directory this test creates.
16922 ac_clean_files="$ac_clean_files confdir3"
16923 if test "$cross_compiling" = yes; then :
5e8754f9
SDJ
16924 case "$host_os" in
16925 aix*) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
16926 *) gl_cv_func_getcwd_path_max=no;;
16927 esac
6ec2e0f5
SDJ
16928else
16929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16930/* end confdefs.h. */
88b48903 16931
6ec2e0f5
SDJ
16932#include <errno.h>
16933#include <stdlib.h>
16934#if HAVE_UNISTD_H
16935# include <unistd.h>
16936#else
16937# include <direct.h>
16938#endif
16939#include <string.h>
16940#include <limits.h>
16941#include <sys/stat.h>
16942#include <sys/types.h>
16943#include <fcntl.h>
88b48903
WN
16944
16945
6ec2e0f5
SDJ
16946/* Arrange to define PATH_MAX, like "pathmax.h" does. */
16947#if HAVE_UNISTD_H
16948# include <unistd.h>
16949#endif
16950#include <limits.h>
16951#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
16952# include <sys/param.h>
16953#endif
16954#if !defined PATH_MAX && defined MAXPATHLEN
16955# define PATH_MAX MAXPATHLEN
16956#endif
16957#ifdef __hpux
16958# undef PATH_MAX
16959# define PATH_MAX 1024
16960#endif
5e8754f9 16961#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6ec2e0f5
SDJ
16962# undef PATH_MAX
16963# define PATH_MAX 260
16964#endif
88b48903 16965
88b48903 16966
6ec2e0f5
SDJ
16967#ifndef AT_FDCWD
16968# define AT_FDCWD 0
16969#endif
16970#ifdef ENAMETOOLONG
16971# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
16972#else
16973# define is_ENAMETOOLONG(x) 0
16974#endif
88b48903 16975
6ec2e0f5
SDJ
16976/* Use the getcwd function, not any macro. */
16977#undef getcwd
88b48903 16978
6ec2e0f5
SDJ
16979/* Don't get link errors because mkdir is redefined to rpl_mkdir. */
16980#undef mkdir
88b48903 16981
6ec2e0f5
SDJ
16982#ifndef S_IRWXU
16983# define S_IRWXU 0700
16984#endif
88b48903 16985
6ec2e0f5
SDJ
16986/* The length of this name must be 8. */
16987#define DIR_NAME "confdir3"
16988#define DIR_NAME_LEN 8
16989#define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
88b48903 16990
6ec2e0f5
SDJ
16991/* The length of "../". */
16992#define DOTDOTSLASH_LEN 3
88b48903 16993
6ec2e0f5
SDJ
16994/* Leftover bytes in the buffer, to work around library or OS bugs. */
16995#define BUF_SLOP 20
88b48903 16996
6ec2e0f5
SDJ
16997int
16998main ()
16999{
17000#ifndef PATH_MAX
17001 /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
17002 at least not on a local file system. And if we were to start worrying
17003 about remote file systems, we'd have to enable the wrapper function
17004 all of the time, just to be safe. That's not worth the cost. */
17005 exit (0);
17006#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
17007 - DIR_NAME_SIZE - BUF_SLOP) \
17008 <= PATH_MAX)
17009 /* FIXME: Assuming there's a system for which this is true,
17010 this should be done in a compile test. */
17011 exit (0);
17012#else
17013 char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
17014 + DIR_NAME_SIZE + BUF_SLOP];
17015 char *cwd = getcwd (buf, PATH_MAX);
17016 size_t initial_cwd_len;
17017 size_t cwd_len;
17018 int fail = 0;
17019 size_t n_chdirs = 0;
88b48903 17020
6ec2e0f5
SDJ
17021 if (cwd == NULL)
17022 exit (10);
88b48903 17023
6ec2e0f5 17024 cwd_len = initial_cwd_len = strlen (cwd);
88b48903 17025
6ec2e0f5
SDJ
17026 while (1)
17027 {
17028 size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
17029 char *c = NULL;
17030
17031 cwd_len += DIR_NAME_SIZE;
17032 /* If mkdir or chdir fails, it could be that this system cannot create
17033 any file with an absolute name longer than PATH_MAX, such as cygwin.
17034 If so, leave fail as 0, because the current working directory can't
17035 be too long for getcwd if it can't even be created. For other
17036 errors, be pessimistic and consider that as a failure, too. */
17037 if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
17038 {
17039 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
17040 fail = 20;
17041 break;
17042 }
88b48903 17043
6ec2e0f5
SDJ
17044 if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
17045 {
17046 struct stat sb;
88b48903 17047
6ec2e0f5
SDJ
17048 c = getcwd (buf, PATH_MAX);
17049 if (!c && errno == ENOENT)
17050 {
17051 fail = 11;
17052 break;
17053 }
17054 if (c)
17055 {
17056 fail = 31;
17057 break;
17058 }
17059 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
17060 {
17061 fail = 21;
17062 break;
17063 }
88b48903 17064
6ec2e0f5
SDJ
17065 /* Our replacement needs to be able to stat() long ../../paths,
17066 so generate a path larger than PATH_MAX to check,
17067 avoiding the replacement if we can't stat(). */
17068 c = getcwd (buf, cwd_len + 1);
17069 if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno))
17070 {
17071 fail = 32;
17072 break;
17073 }
17074 }
88b48903 17075
6ec2e0f5
SDJ
17076 if (dotdot_max <= cwd_len - initial_cwd_len)
17077 {
17078 if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
17079 break;
17080 c = getcwd (buf, cwd_len + 1);
17081 if (!c)
17082 {
17083 if (! (errno == ERANGE || errno == ENOENT
17084 || is_ENAMETOOLONG (errno)))
17085 {
17086 fail = 22;
17087 break;
17088 }
17089 if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
17090 {
17091 fail = 12;
17092 break;
17093 }
17094 }
17095 }
88b48903 17096
6ec2e0f5
SDJ
17097 if (c && strlen (c) != cwd_len)
17098 {
17099 fail = 23;
17100 break;
17101 }
17102 ++n_chdirs;
17103 }
88b48903 17104
6ec2e0f5
SDJ
17105 /* Leaving behind such a deep directory is not polite.
17106 So clean up here, right away, even though the driving
17107 shell script would also clean up. */
17108 {
17109 size_t i;
88b48903 17110
6ec2e0f5
SDJ
17111 /* Try rmdir first, in case the chdir failed. */
17112 rmdir (DIR_NAME);
17113 for (i = 0; i <= n_chdirs; i++)
17114 {
17115 if (chdir ("..") < 0)
17116 break;
17117 if (rmdir (DIR_NAME) != 0)
17118 break;
17119 }
17120 }
88b48903 17121
6ec2e0f5
SDJ
17122 exit (fail);
17123#endif
17124}
88b48903 17125
6ec2e0f5
SDJ
17126_ACEOF
17127if ac_fn_c_try_run "$LINENO"; then :
17128 gl_cv_func_getcwd_path_max=yes
17129else
17130 case $? in
5e8754f9
SDJ
17131 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
17132 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
17133 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
17134 *) gl_cv_func_getcwd_path_max=no;;
17135 esac
6ec2e0f5
SDJ
17136fi
17137rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17138 conftest.$ac_objext conftest.beam conftest.$ac_ext
17139fi
88b48903 17140
88b48903 17141
6ec2e0f5
SDJ
17142fi
17143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
17144$as_echo "$gl_cv_func_getcwd_path_max" >&6; }
88b48903 17145
6ec2e0f5
SDJ
17146 case "$gl_cv_func_getcwd_null" in
17147 *yes)
88b48903
WN
17148
17149
472fa5ee
SM
17150 :
17151
17152
17153
17154
17155
17156
17157 :
17158
17159
17160
17161
88b48903
WN
17162
17163
5e8754f9
SDJ
17164 for ac_func in getpagesize
17165do :
17166 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
17167if test "x$ac_cv_func_getpagesize" = xyes; then :
17168 cat >>confdefs.h <<_ACEOF
7a6dbc2f
SDJ
17169#define HAVE_GETPAGESIZE 1
17170_ACEOF
17171
5e8754f9
SDJ
17172fi
17173done
6ec2e0f5
SDJ
17174
17175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5
17176$as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; }
d0ac1c44 17177if ${gl_cv_func_getcwd_abort_bug+:} false; then :
88b48903
WN
17178 $as_echo_n "(cached) " >&6
17179else
6ec2e0f5
SDJ
17180 # Remove any remnants of a previous test.
17181 rm -rf confdir-14B---
17182 # Arrange for deletion of the temporary directory this test creates.
17183 ac_clean_files="$ac_clean_files confdir-14B---"
17184 if test "$cross_compiling" = yes; then :
17185 gl_cv_func_getcwd_abort_bug=yes
88b48903
WN
17186else
17187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17188/* end confdefs.h. */
6ec2e0f5
SDJ
17189
17190#include <errno.h>
17191#include <stdlib.h>
17192#if HAVE_UNISTD_H
17193# include <unistd.h>
17194#else /* on Windows with MSVC */
17195# include <direct.h>
17196#endif
17197#include <string.h>
17198#include <sys/stat.h>
17199
17200
17201/* Arrange to define PATH_MAX, like "pathmax.h" does. */
17202#if HAVE_UNISTD_H
17203# include <unistd.h>
17204#endif
17205#include <limits.h>
17206#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
17207# include <sys/param.h>
17208#endif
17209#if !defined PATH_MAX && defined MAXPATHLEN
17210# define PATH_MAX MAXPATHLEN
17211#endif
17212#ifdef __hpux
17213# undef PATH_MAX
17214# define PATH_MAX 1024
17215#endif
5e8754f9 17216#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6ec2e0f5
SDJ
17217# undef PATH_MAX
17218# define PATH_MAX 260
17219#endif
17220
17221
17222/* Don't get link errors because mkdir is redefined to rpl_mkdir. */
17223#undef mkdir
17224
17225#ifndef S_IRWXU
17226# define S_IRWXU 0700
17227#endif
17228
17229/* FIXME: skip the run-test altogether on systems without getpagesize. */
17230#if ! HAVE_GETPAGESIZE
17231# define getpagesize() 0
17232#endif
17233
17234/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
17235 the 16kB pagesize on ia64 linux. Those conditions make the code below
17236 trigger a bug in glibc's getcwd implementation before 2.4.90-10. */
17237#define TARGET_LEN (5 * 1024)
88b48903
WN
17238
17239int
17240main ()
17241{
6ec2e0f5
SDJ
17242 char *cwd;
17243 size_t initial_cwd_len;
17244 int fail = 0;
17245
17246 /* The bug is triggered when PATH_MAX < getpagesize (), so skip
17247 this relatively expensive and invasive test if that's not true. */
17248#ifdef PATH_MAX
17249 int bug_possible = PATH_MAX < getpagesize ();
17250#else
17251 int bug_possible = 0;
17252#endif
17253 if (! bug_possible)
17254 return 0;
8690e634 17255
6ec2e0f5
SDJ
17256 cwd = getcwd (NULL, 0);
17257 if (cwd == NULL)
17258 return 2;
17259
17260 initial_cwd_len = strlen (cwd);
17261 free (cwd);
17262
17263 if (1)
17264 {
17265 static char const dir_name[] = "confdir-14B---";
17266 size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
17267 / sizeof dir_name);
17268 size_t d;
17269 for (d = 0; d < desired_depth; d++)
17270 {
17271 if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
17272 {
17273 if (! (errno == ERANGE || errno == ENAMETOOLONG
17274 || errno == ENOENT))
17275 fail = 3; /* Unable to construct deep hierarchy. */
17276 break;
17277 }
17278 }
17279
17280 /* If libc has the bug in question, this invocation of getcwd
17281 results in a failed assertion. */
17282 cwd = getcwd (NULL, 0);
17283 if (cwd == NULL)
17284 fail = 4; /* getcwd didn't assert, but it failed for a long name
17285 where the answer could have been learned. */
17286 free (cwd);
17287
17288 /* Call rmdir first, in case the above chdir failed. */
17289 rmdir (dir_name);
17290 while (0 < d--)
17291 {
17292 if (chdir ("..") < 0)
17293 {
17294 fail = 5;
17295 break;
17296 }
17297 rmdir (dir_name);
17298 }
17299 }
17300
17301 return fail;
8690e634 17302}
6ec2e0f5 17303
8690e634
JK
17304_ACEOF
17305if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 17306 gl_cv_func_getcwd_abort_bug=no
8690e634 17307else
5e8754f9
SDJ
17308 ret=$?
17309 if test $ret -ge 128 || test $ret = 4; then
17310 gl_cv_func_getcwd_abort_bug=yes
17311 else
17312 gl_cv_func_getcwd_abort_bug=no
17313 fi
8690e634
JK
17314fi
17315rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17316 conftest.$ac_objext conftest.beam conftest.$ac_ext
17317fi
17318
17319
17320fi
6ec2e0f5
SDJ
17321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5
17322$as_echo "$gl_cv_func_getcwd_abort_bug" >&6; }
17323 if test $gl_cv_func_getcwd_abort_bug = yes; then :
17324 gl_abort_bug=yes
17325fi
17326
17327 ;;
17328 esac
17329 ;;
17330 esac
17331 case "$gl_cv_func_getcwd_path_max" in
17332 "no"|"no, it has the AIX bug") ;;
17333 *)
17334
17335$as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
17336
17337 ;;
17338 esac
17339 case "$gl_cv_func_getcwd_path_max" in
17340 "no, but it is partly working")
17341
17342$as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
17343
17344 ;;
17345 "yes, but with shorter paths")
17346
17347$as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
17348
17349 ;;
17350 esac
17351
17352 if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
17353 || test $gl_cv_func_getcwd_posix_signature != yes \
17354 || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \
17355 || test $gl_abort_bug = yes; then
17356 REPLACE_GETCWD=1
8690e634
JK
17357 fi
17358
6ec2e0f5 17359 if test $REPLACE_GETCWD = 1; then
8690e634
JK
17360
17361
8690e634
JK
17362
17363
17364
17365
17366
17367
6ec2e0f5 17368 gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
8690e634
JK
17369
17370
8690e634
JK
17371
17372
6ec2e0f5
SDJ
17373 :
17374
17375 fi
17376
8690e634
JK
17377
17378cat >>confdefs.h <<_ACEOF
6ec2e0f5 17379#define GNULIB_GETCWD 1
8690e634
JK
17380_ACEOF
17381
17382
8690e634 17383
8690e634
JK
17384
17385
c971b7fa 17386
c971b7fa 17387
6ec2e0f5
SDJ
17388 GNULIB_GETCWD=1
17389
17390
17391
17392
17393
17394$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
17395
c971b7fa 17396
c971b7fa 17397
c971b7fa 17398
c971b7fa 17399
c971b7fa 17400
c971b7fa 17401
c971b7fa 17402
6ec2e0f5
SDJ
17403 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
17404 *yes,yes) ;;
17405 *)
17406 REPLACE_GETCWD=1
17407 ;;
17408 esac
c971b7fa 17409
6ec2e0f5 17410 if test $REPLACE_GETCWD = 1; then
c971b7fa 17411
c971b7fa
PA
17412
17413
c971b7fa
PA
17414
17415
c971b7fa 17416
c971b7fa 17417
c971b7fa 17418
6ec2e0f5 17419 gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
c971b7fa 17420
6ec2e0f5 17421 fi
c971b7fa 17422
c971b7fa 17423
c971b7fa 17424
c971b7fa 17425
8690e634 17426
6ec2e0f5 17427 GNULIB_GETCWD=1
c971b7fa 17428
88b48903
WN
17429
17430
17431
88b48903 17432
6ec2e0f5 17433$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
88b48903 17434
88b48903
WN
17435
17436
17437
6ec2e0f5
SDJ
17438
17439
17440
472fa5ee
SM
17441 :
17442
17443
17444
17445
17446
17447
17448 :
17449
17450
17451
17452
6ec2e0f5
SDJ
17453
17454 if test $ac_cv_func_getdtablesize = yes &&
17455 test $ac_cv_have_decl_getdtablesize = yes; then
5e8754f9
SDJ
17456 # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit
17457 # up to an unchangeable hard limit; all other platforms correctly
17458 # require setrlimit before getdtablesize() can report a larger value.
6ec2e0f5
SDJ
17459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
17460$as_echo_n "checking whether getdtablesize works... " >&6; }
d0ac1c44 17461if ${gl_cv_func_getdtablesize_works+:} false; then :
88b48903
WN
17462 $as_echo_n "(cached) " >&6
17463else
5e8754f9 17464 if test "$cross_compiling" = yes; then :
88b48903 17465 case "$host_os" in
5e8754f9
SDJ
17466 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
17467 gl_cv_func_getdtablesize_works="guessing no" ;;
17468 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
17469 esac
88b48903
WN
17470else
17471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17472/* end confdefs.h. */
17473
5e8754f9 17474 #include <unistd.h>
6ec2e0f5
SDJ
17475int
17476main ()
88b48903 17477{
6ec2e0f5 17478int size = getdtablesize();
5e8754f9
SDJ
17479 if (dup2 (0, getdtablesize()) != -1)
17480 return 1;
17481 if (size != getdtablesize())
17482 return 2;
6ec2e0f5
SDJ
17483
17484 ;
17485 return 0;
88b48903
WN
17486}
17487_ACEOF
17488if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 17489 gl_cv_func_getdtablesize_works=yes
88b48903 17490else
6ec2e0f5 17491 gl_cv_func_getdtablesize_works=no
88b48903
WN
17492fi
17493rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17494 conftest.$ac_objext conftest.beam conftest.$ac_ext
17495fi
17496
17497
17498fi
6ec2e0f5
SDJ
17499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
17500$as_echo "$gl_cv_func_getdtablesize_works" >&6; }
17501 case "$gl_cv_func_getdtablesize_works" in
5e8754f9 17502 *yes) ;;
6ec2e0f5 17503 *) REPLACE_GETDTABLESIZE=1 ;;
88b48903
WN
17504 esac
17505 else
6ec2e0f5 17506 HAVE_GETDTABLESIZE=0
88b48903
WN
17507 fi
17508
6ec2e0f5 17509 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
88b48903
WN
17510
17511
17512
17513
17514
17515
17516
17517
6ec2e0f5 17518 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
88b48903 17519
6ec2e0f5 17520 :
88b48903
WN
17521 fi
17522
17523
17524
17525
17526
6ec2e0f5 17527 GNULIB_GETDTABLESIZE=1
88b48903
WN
17528
17529
17530
88b48903 17531
88b48903 17532
6ec2e0f5 17533$as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
88b48903 17534
88b48903 17535
88b48903 17536
88b48903 17537
88b48903 17538
88b48903 17539
88b48903 17540
88b48903
WN
17541
17542
472fa5ee
SM
17543 :
17544
17545
17546
17547
17548
6ec2e0f5
SDJ
17549 if test $ac_cv_have_decl_getlogin_r = no; then
17550 HAVE_DECL_GETLOGIN_R=0
17551 fi
88b48903 17552
88b48903 17553
472fa5ee
SM
17554 :
17555
17556
17557
17558
17559
6ec2e0f5
SDJ
17560 if test $ac_cv_func_getlogin_r = no; then
17561 HAVE_GETLOGIN_R=0
17562 else
17563 HAVE_GETLOGIN_R=1
17564
17565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getlogin_r works with small buffers" >&5
17566$as_echo_n "checking whether getlogin_r works with small buffers... " >&6; }
d0ac1c44 17567if ${gl_cv_func_getlogin_r_works+:} false; then :
6ec2e0f5
SDJ
17568 $as_echo_n "(cached) " >&6
17569else
88b48903 17570
6ec2e0f5 17571 case "$host_os" in
5e8754f9
SDJ
17572 # Guess no on OSF/1.
17573 osf*) gl_cv_func_getlogin_r_works="guessing no" ;;
17574 # Guess yes otherwise.
17575 *) gl_cv_func_getlogin_r_works="guessing yes" ;;
6ec2e0f5
SDJ
17576 esac
17577 if test "$cross_compiling" = yes; then :
17578 :
88b48903
WN
17579else
17580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17581/* end confdefs.h. */
17582
6ec2e0f5
SDJ
17583#include <stddef.h>
17584#include <unistd.h>
17585#if !HAVE_DECL_GETLOGIN_R
88b48903 17586extern
6ec2e0f5 17587# ifdef __cplusplus
88b48903 17588"C"
6ec2e0f5
SDJ
17589# endif
17590int getlogin_r (char *, size_t);
88b48903 17591#endif
6ec2e0f5
SDJ
17592int
17593main (void)
88b48903
WN
17594{
17595 int result = 0;
6ec2e0f5
SDJ
17596 char buf[100];
17597
17598 if (getlogin_r (buf, 0) == 0)
5e8754f9 17599 result |= 16;
6ec2e0f5 17600 if (getlogin_r (buf, 1) == 0)
5e8754f9 17601 result |= 17;
88b48903
WN
17602 return result;
17603}
17604_ACEOF
17605if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 17606 gl_cv_func_getlogin_r_works=yes
88b48903 17607else
5e8754f9
SDJ
17608 case $? in
17609 16 | 17) gl_cv_func_getlogin_r_works=no ;;
17610 esac
17611
88b48903
WN
17612fi
17613rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17614 conftest.$ac_objext conftest.beam conftest.$ac_ext
17615fi
17616
17617
4a626d0a 17618fi
6ec2e0f5
SDJ
17619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getlogin_r_works" >&5
17620$as_echo "$gl_cv_func_getlogin_r_works" >&6; }
17621 case "$gl_cv_func_getlogin_r_works" in
17622 *yes) ;;
17623 *) REPLACE_GETLOGIN_R=1 ;;
17624 esac
17625 fi
17626
17627 if test $HAVE_GETLOGIN_R = 0 || test $REPLACE_GETLOGIN_R = 1; then
17628
17629
17630
17631
17632
17633
17634
17635
17636 gl_LIBOBJS="$gl_LIBOBJS getlogin_r.$ac_objext"
4a626d0a 17637
4a626d0a 17638
4a626d0a 17639
472fa5ee
SM
17640 :
17641
17642
17643
17644
17645
4a626d0a 17646
4a626d0a
PA
17647 fi
17648
17649
4a626d0a
PA
17650
17651
17652
6ec2e0f5 17653 GNULIB_GETLOGIN_R=1
4a626d0a
PA
17654
17655
17656
17657
17658
6ec2e0f5 17659$as_echo "#define GNULIB_TEST_GETLOGIN_R 1" >>confdefs.h
4a626d0a 17660
4a626d0a
PA
17661
17662
17663
17664
472fa5ee
SM
17665 :
17666
17667
17668
17669
17670
17671
17672
17673
4a626d0a 17674
6ec2e0f5
SDJ
17675 ac_found=0
17676 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
17677"
d0ac1c44 17678if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
6ec2e0f5
SDJ
17679 ac_have_decl=1
17680else
17681 ac_have_decl=0
17682fi
17683
17684cat >>confdefs.h <<_ACEOF
17685#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
17686_ACEOF
17687if test $ac_have_decl = 1; then :
17688 ac_found=1
17689fi
17690
17691 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
17692"
d0ac1c44 17693if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
6ec2e0f5
SDJ
17694 ac_have_decl=1
17695else
17696 ac_have_decl=0
17697fi
17698
17699cat >>confdefs.h <<_ACEOF
17700#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
17701_ACEOF
17702if test $ac_have_decl = 1; then :
17703 ac_found=1
17704fi
4a626d0a 17705
6ec2e0f5
SDJ
17706 ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
17707"
d0ac1c44 17708if test "x$ac_cv_have_decl___argv" = xyes; then :
6ec2e0f5
SDJ
17709 ac_have_decl=1
17710else
17711 ac_have_decl=0
17712fi
4a626d0a 17713
6ec2e0f5
SDJ
17714cat >>confdefs.h <<_ACEOF
17715#define HAVE_DECL___ARGV $ac_have_decl
17716_ACEOF
17717if test $ac_have_decl = 1; then :
17718 ac_found=1
17719fi
4a626d0a
PA
17720
17721
6ec2e0f5
SDJ
17722 # Incur the cost of this test only if none of the above worked.
17723 if test $ac_found = 0; then
17724 # On OpenBSD 5.1, using the global __progname variable appears to be
17725 # the only way to implement getprogname.
17726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
17727$as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
d0ac1c44 17728if ${gl_cv_var___progname+:} false; then :
6ec2e0f5
SDJ
17729 $as_echo_n "(cached) " >&6
17730else
4a626d0a 17731
6ec2e0f5
SDJ
17732 gl_cv_var___progname=
17733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17734/* end confdefs.h. */
17735extern char *__progname;
17736int
17737main ()
17738{
17739return *__progname;
17740
17741 ;
17742 return 0;
17743}
17744_ACEOF
17745if ac_fn_c_try_link "$LINENO"; then :
17746 gl_cv_var___progname=yes
17747
17748fi
17749rm -f core conftest.err conftest.$ac_objext \
17750 conftest$ac_exeext conftest.$ac_ext
17751
17752
17753fi
17754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
17755$as_echo "$gl_cv_var___progname" >&6; }
17756 if test "$gl_cv_var___progname" = yes; then
17757
17758$as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
17759
17760 fi
17761 fi
4a626d0a
PA
17762
17763
17764
17765
17766
17767
17768
17769
472fa5ee
SM
17770 :
17771
17772
17773
17774
17775
4a626d0a
PA
17776
17777 gl_gettimeofday_timezone=void
17778 if test $ac_cv_func_gettimeofday != yes; then
17779 HAVE_GETTIMEOFDAY=0
17780 else
17781
17782
17783
17784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
17785$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
d0ac1c44 17786if ${gl_cv_func_gettimeofday_clobber+:} false; then :
4a626d0a
PA
17787 $as_echo_n "(cached) " >&6
17788else
17789 if test "$cross_compiling" = yes; then :
17790 # When cross-compiling:
17791 case "$host_os" in
5e8754f9
SDJ
17792 # Guess all is fine on glibc systems.
17793 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
17794 # If we don't know, assume the worst.
17795 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
4a626d0a
PA
17796 esac
17797
17798else
17799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17800/* end confdefs.h. */
17801#include <string.h>
17802 #include <sys/time.h>
17803 #include <time.h>
17804 #include <stdlib.h>
17805
17806int
17807main ()
17808{
17809
17810 time_t t = 0;
17811 struct tm *lt;
17812 struct tm saved_lt;
17813 struct timeval tv;
17814 lt = localtime (&t);
17815 saved_lt = *lt;
17816 gettimeofday (&tv, NULL);
17817 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
17818
17819 ;
17820 return 0;
17821}
17822_ACEOF
17823if ac_fn_c_try_run "$LINENO"; then :
17824 gl_cv_func_gettimeofday_clobber=no
17825else
17826 gl_cv_func_gettimeofday_clobber=yes
17827fi
17828rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17829 conftest.$ac_objext conftest.beam conftest.$ac_ext
17830fi
17831
17832fi
17833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
17834$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
17835
17836 case "$gl_cv_func_gettimeofday_clobber" in
17837 *yes)
17838 REPLACE_GETTIMEOFDAY=1
17839
7a6dbc2f
SDJ
17840 REPLACE_GMTIME=1
17841 REPLACE_LOCALTIME=1
4a626d0a 17842
5e8754f9
SDJ
17843
17844$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
17845
4a626d0a
PA
17846 ;;
17847 esac
17848
17849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
17850$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
d0ac1c44 17851if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
4a626d0a
PA
17852 $as_echo_n "(cached) " >&6
17853else
17854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17855/* end confdefs.h. */
17856#include <sys/time.h>
17857 struct timeval c;
17858 int gettimeofday (struct timeval *restrict, void *restrict);
17859
17860int
17861main ()
17862{
17863/* glibc uses struct timezone * rather than the POSIX void *
17864 if _GNU_SOURCE is defined. However, since the only portable
17865 use of gettimeofday uses NULL as the second parameter, and
17866 since the glibc definition is actually more typesafe, it is
17867 not worth wrapping this to get a compliant signature. */
17868 int (*f) (struct timeval *restrict, void *restrict)
17869 = gettimeofday;
17870 int x = f (&c, 0);
17871 return !(x | c.tv_sec | c.tv_usec);
17872
17873 ;
17874 return 0;
17875}
17876_ACEOF
17877if ac_fn_c_try_compile "$LINENO"; then :
17878 gl_cv_func_gettimeofday_posix_signature=yes
17879else
17880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17881/* end confdefs.h. */
17882#include <sys/time.h>
17883int gettimeofday (struct timeval *restrict, struct timezone *restrict);
17884
17885int
17886main ()
17887{
17888
17889 ;
17890 return 0;
17891}
17892_ACEOF
17893if ac_fn_c_try_compile "$LINENO"; then :
17894 gl_cv_func_gettimeofday_posix_signature=almost
17895else
17896 gl_cv_func_gettimeofday_posix_signature=no
17897fi
17898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17899fi
17900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17901fi
17902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
17903$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
17904 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
17905 gl_gettimeofday_timezone='struct timezone'
17906 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
17907 REPLACE_GETTIMEOFDAY=1
17908 fi
17909 if test $REPLACE_STRUCT_TIMEVAL = 1; then
17910 REPLACE_GETTIMEOFDAY=1
17911 fi
5e8754f9 17912
4a626d0a
PA
17913 fi
17914
17915cat >>confdefs.h <<_ACEOF
17916#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
17917_ACEOF
17918
88b48903 17919
4a626d0a 17920 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
88b48903 17921
88b48903 17922
88b48903 17923
88b48903
WN
17924
17925
88b48903
WN
17926
17927
17928
6ec2e0f5
SDJ
17929 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
17930
6ec2e0f5 17931
5e8754f9
SDJ
17932 for ac_header in sys/timeb.h
17933do :
17934 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
17935if test "x$ac_cv_header_sys_timeb_h" = xyes; then :
17936 cat >>confdefs.h <<_ACEOF
17937#define HAVE_SYS_TIMEB_H 1
17938_ACEOF
6ec2e0f5 17939
5e8754f9 17940fi
6ec2e0f5 17941
5e8754f9 17942done
6ec2e0f5 17943
5e8754f9
SDJ
17944 for ac_func in _ftime
17945do :
17946 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
17947if test "x$ac_cv_func__ftime" = xyes; then :
17948 cat >>confdefs.h <<_ACEOF
17949#define HAVE__FTIME 1
17950_ACEOF
6ec2e0f5 17951
5e8754f9
SDJ
17952fi
17953done
6ec2e0f5
SDJ
17954
17955
5e8754f9 17956 fi
6ec2e0f5
SDJ
17957
17958
17959
6ec2e0f5
SDJ
17960
17961
5e8754f9 17962 GNULIB_GETTIMEOFDAY=1
6ec2e0f5
SDJ
17963
17964
17965
7a6dbc2f
SDJ
17966
17967
5e8754f9 17968$as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
6ec2e0f5
SDJ
17969
17970
17971
5e8754f9
SDJ
17972 GLOB_H=
17973 for ac_header in glob.h
17974do :
17975 ac_fn_c_check_header_mongrel "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default"
17976if test "x$ac_cv_header_glob_h" = xyes; then :
17977 cat >>confdefs.h <<_ACEOF
17978#define HAVE_GLOB_H 1
17979_ACEOF
6ec2e0f5 17980
5e8754f9
SDJ
17981else
17982 GLOB_H=glob.h
17983fi
6ec2e0f5 17984
5e8754f9 17985done
6ec2e0f5
SDJ
17986
17987
5e8754f9
SDJ
17988 if test -z "$GLOB_H"; then
17989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU glob interface version 1" >&5
17990$as_echo_n "checking for GNU glob interface version 1... " >&6; }
17991if ${gl_cv_gnu_glob_interface_version_1+:} false; then :
6ec2e0f5
SDJ
17992 $as_echo_n "(cached) " >&6
17993else
17994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17995/* end confdefs.h. */
17996#include <gnu-versions.h>
5e8754f9 17997char a[_GNU_GLOB_INTERFACE_VERSION == 1 ? 1 : -1];
6ec2e0f5
SDJ
17998_ACEOF
17999if ac_fn_c_try_compile "$LINENO"; then :
5e8754f9 18000 gl_cv_gnu_glob_interface_version_1=yes
6ec2e0f5 18001else
5e8754f9 18002 gl_cv_gnu_glob_interface_version_1=no
6ec2e0f5
SDJ
18003fi
18004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18005fi
5e8754f9
SDJ
18006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_gnu_glob_interface_version_1" >&5
18007$as_echo "$gl_cv_gnu_glob_interface_version_1" >&6; }
18008
18009 if test "$gl_cv_gnu_glob_interface_version_1" = "no"; then
18010 GLOB_H=glob.h
6ec2e0f5 18011 fi
5e8754f9 18012 fi
6ec2e0f5 18013
5e8754f9
SDJ
18014 if test -z "$GLOB_H"; then
18015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether glob lists broken symlinks" >&5
6ec2e0f5 18016$as_echo_n "checking whether glob lists broken symlinks... " >&6; }
d0ac1c44 18017if ${gl_cv_glob_lists_symlinks+:} false; then :
6ec2e0f5
SDJ
18018 $as_echo_n "(cached) " >&6
18019else
5e8754f9
SDJ
18020 if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then
18021 gl_cv_glob_lists_symlinks=maybe
18022 else
18023 # If we can't make a symlink, then we cannot test this issue. Be
18024 # pessimistic about this.
18025 gl_cv_glob_lists_symlinks=no
18026 fi
18027
18028 if test $gl_cv_glob_lists_symlinks = maybe; then
18029 if test "$cross_compiling" = yes; then :
6ec2e0f5
SDJ
18030 gl_cv_glob_lists_symlinks=no
18031else
18032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18033/* end confdefs.h. */
5e8754f9 18034
6ec2e0f5 18035#include <stddef.h>
5e8754f9 18036#include <glob.h>
6ec2e0f5
SDJ
18037int
18038main ()
18039{
18040glob_t found;
5e8754f9 18041if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH) return 1;
6ec2e0f5
SDJ
18042 ;
18043 return 0;
18044}
4a626d0a 18045_ACEOF
6ec2e0f5
SDJ
18046if ac_fn_c_try_run "$LINENO"; then :
18047 gl_cv_glob_lists_symlinks=yes
18048else
18049 gl_cv_glob_lists_symlinks=no
18050fi
18051rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18052 conftest.$ac_objext conftest.beam conftest.$ac_ext
18053fi
88b48903 18054
5e8754f9 18055 fi
4a626d0a 18056fi
6ec2e0f5
SDJ
18057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_glob_lists_symlinks" >&5
18058$as_echo "$gl_cv_glob_lists_symlinks" >&6; }
88b48903 18059
5e8754f9
SDJ
18060 if test $gl_cv_glob_lists_symlinks = no; then
18061 GLOB_H=glob.h
6ec2e0f5
SDJ
18062 fi
18063 fi
4a626d0a 18064
5e8754f9 18065 rm -f conf$$-globtest
4a626d0a 18066
88b48903 18067
6ec2e0f5
SDJ
18068 if test -n "$GLOB_H"; then
18069 GL_GENERATE_GLOB_H_TRUE=
18070 GL_GENERATE_GLOB_H_FALSE='#'
18071else
18072 GL_GENERATE_GLOB_H_TRUE='#'
18073 GL_GENERATE_GLOB_H_FALSE=
18074fi
88b48903 18075
88b48903 18076
5e8754f9 18077 if test -n "$GLOB_H"; then
472fa5ee
SM
18078
18079
18080
18081
18082
18083
18084
18085
18086 gl_LIBOBJS="$gl_LIBOBJS glob.$ac_objext"
18087
18088
18089
7a6dbc2f
SDJ
18090 :
18091
18092
18093
472fa5ee 18094
472fa5ee 18095
88b48903 18096
88b48903 18097
5e8754f9
SDJ
18098 if test $ac_cv_header_sys_cdefs_h = yes; then
18099 HAVE_SYS_CDEFS_H=1
18100 else
18101 HAVE_SYS_CDEFS_H=0
7a6dbc2f 18102 fi
88b48903
WN
18103
18104
5e8754f9 18105 :
7a6dbc2f
SDJ
18106
18107
18108
18109
7a6dbc2f
SDJ
18110
18111
18112
18113
18114
7a6dbc2f
SDJ
18115
18116
5e8754f9 18117 fi
7a6dbc2f 18118
5e8754f9 18119 :
49e4877c
PA
18120
18121
88b48903
WN
18122
18123
18124
18125
18126 PRIPTR_PREFIX=
18127 if test -n "$STDINT_H"; then
18128 PRIPTR_PREFIX='"l"'
18129 else
18130 for glpfx in '' l ll I64; do
18131 case $glpfx in
18132 '') gltype1='int';;
18133 l) gltype1='long int';;
18134 ll) gltype1='long long int';;
18135 I64) gltype1='__int64';;
18136 esac
18137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18138/* end confdefs.h. */
18139#include <stdint.h>
18140 extern intptr_t foo;
18141 extern $gltype1 foo;
18142int
18143main ()
18144{
18145
18146 ;
18147 return 0;
18148}
18149_ACEOF
18150if ac_fn_c_try_compile "$LINENO"; then :
18151 PRIPTR_PREFIX='"'$glpfx'"'
18152fi
18153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18154 test -n "$PRIPTR_PREFIX" && break
18155 done
18156 fi
18157
18158
18159
18160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
18161$as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
d0ac1c44 18162if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
88b48903
WN
18163 $as_echo_n "(cached) " >&6
18164else
18165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18166/* end confdefs.h. */
18167/* Work also in C++ mode. */
18168 #define __STDC_LIMIT_MACROS 1
18169
18170 /* Work if build is not clean. */
18171 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
18172
18173 #include <limits.h>
18174 #if HAVE_STDINT_H
18175 #include <stdint.h>
18176 #endif
18177
18178 #if defined INT32_MAX && defined INTMAX_MAX
18179 #define CONDITION (INT32_MAX < INTMAX_MAX)
18180 #elif HAVE_LONG_LONG_INT
18181 #define CONDITION (sizeof (int) < sizeof (long long int))
18182 #else
18183 #define CONDITION 0
18184 #endif
18185 int test[CONDITION ? 1 : -1];
18186int
18187main ()
18188{
18189
18190 ;
18191 return 0;
18192}
18193_ACEOF
18194if ac_fn_c_try_compile "$LINENO"; then :
18195 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
18196else
18197 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
18198fi
18199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18200fi
18201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
18202$as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
18203 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
18204 INT32_MAX_LT_INTMAX_MAX=1;
18205 else
18206 INT32_MAX_LT_INTMAX_MAX=0;
18207 fi
18208
18209
18210 if test $APPLE_UNIVERSAL_BUILD = 0; then
18211
18212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
18213$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
d0ac1c44 18214if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
88b48903
WN
18215 $as_echo_n "(cached) " >&6
18216else
18217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18218/* end confdefs.h. */
18219/* Work also in C++ mode. */
18220 #define __STDC_LIMIT_MACROS 1
18221
18222 /* Work if build is not clean. */
18223 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
18224
18225 #include <limits.h>
18226 #if HAVE_STDINT_H
18227 #include <stdint.h>
18228 #endif
18229
18230 #if defined INT64_MAX
18231 #define CONDITION (INT64_MAX == LONG_MAX)
18232 #elif HAVE_LONG_LONG_INT
18233 #define CONDITION (sizeof (long long int) == sizeof (long int))
18234 #else
18235 #define CONDITION 0
18236 #endif
18237 int test[CONDITION ? 1 : -1];
18238int
18239main ()
18240{
18241
18242 ;
18243 return 0;
18244}
18245_ACEOF
18246if ac_fn_c_try_compile "$LINENO"; then :
18247 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
18248else
18249 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
18250fi
18251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18252fi
18253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
18254$as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
18255 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
18256 INT64_MAX_EQ_LONG_MAX=1;
18257 else
18258 INT64_MAX_EQ_LONG_MAX=0;
18259 fi
18260
18261
18262 else
18263 INT64_MAX_EQ_LONG_MAX=-1
18264 fi
18265
18266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
18267$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
d0ac1c44 18268if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
88b48903
WN
18269 $as_echo_n "(cached) " >&6
18270else
18271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18272/* end confdefs.h. */
18273/* Work also in C++ mode. */
18274 #define __STDC_LIMIT_MACROS 1
18275
18276 /* Work if build is not clean. */
18277 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
18278
18279 #include <limits.h>
18280 #if HAVE_STDINT_H
18281 #include <stdint.h>
18282 #endif
18283
18284 #if defined UINT32_MAX && defined UINTMAX_MAX
18285 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
18286 #elif HAVE_LONG_LONG_INT
18287 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
18288 #else
18289 #define CONDITION 0
18290 #endif
18291 int test[CONDITION ? 1 : -1];
18292int
18293main ()
18294{
18295
18296 ;
18297 return 0;
18298}
18299_ACEOF
18300if ac_fn_c_try_compile "$LINENO"; then :
18301 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
18302else
18303 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
18304fi
18305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18306fi
18307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
18308$as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
18309 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
18310 UINT32_MAX_LT_UINTMAX_MAX=1;
18311 else
18312 UINT32_MAX_LT_UINTMAX_MAX=0;
18313 fi
18314
18315
18316 if test $APPLE_UNIVERSAL_BUILD = 0; then
18317
18318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
18319$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
d0ac1c44 18320if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
88b48903
WN
18321 $as_echo_n "(cached) " >&6
18322else
18323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18324/* end confdefs.h. */
18325/* Work also in C++ mode. */
18326 #define __STDC_LIMIT_MACROS 1
18327
18328 /* Work if build is not clean. */
18329 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
18330
18331 #include <limits.h>
18332 #if HAVE_STDINT_H
18333 #include <stdint.h>
18334 #endif
18335
18336 #if defined UINT64_MAX
18337 #define CONDITION (UINT64_MAX == ULONG_MAX)
18338 #elif HAVE_LONG_LONG_INT
18339 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
18340 #else
18341 #define CONDITION 0
18342 #endif
18343 int test[CONDITION ? 1 : -1];
18344int
18345main ()
18346{
18347
18348 ;
18349 return 0;
18350}
18351_ACEOF
18352if ac_fn_c_try_compile "$LINENO"; then :
18353 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
18354else
18355 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
18356fi
18357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18358fi
18359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
18360$as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
18361 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
18362 UINT64_MAX_EQ_ULONG_MAX=1;
18363 else
18364 UINT64_MAX_EQ_ULONG_MAX=0;
18365 fi
18366
18367
18368 else
18369 UINT64_MAX_EQ_ULONG_MAX=-1
18370 fi
18371
18372
18373
18374
18375
18376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
18377$as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
d0ac1c44 18378if ${gl_cv_func_isnand_no_libm+:} false; then :
88b48903
WN
18379 $as_echo_n "(cached) " >&6
18380else
18381
18382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18383/* end confdefs.h. */
18384#include <math.h>
18385 #if __GNUC__ >= 4
18386 # undef isnand
18387 # define isnand(x) __builtin_isnan ((double)(x))
18388 #else
18389 # undef isnand
18390 # define isnand(x) isnan ((double)(x))
18391 #endif
18392 double x;
18393int
18394main ()
18395{
18396return isnand (x);
18397 ;
18398 return 0;
18399}
18400_ACEOF
18401if ac_fn_c_try_link "$LINENO"; then :
18402 gl_cv_func_isnand_no_libm=yes
18403else
18404 gl_cv_func_isnand_no_libm=no
18405fi
18406rm -f core conftest.err conftest.$ac_objext \
18407 conftest$ac_exeext conftest.$ac_ext
18408
18409fi
18410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
18411$as_echo "$gl_cv_func_isnand_no_libm" >&6; }
18412
18413 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
18414 if test $gl_cv_func_isnand_no_libm = yes; then
18415
18416$as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
18417
18418 fi
18419
18420 if test $gl_func_isnand_no_libm != yes; then
18421
18422
18423
18424
18425
18426
18427
18428
18429 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
18430
18431
18432
18433
18434 fi
18435
18436
18437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
18438$as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
d0ac1c44 18439if ${gl_cv_func_isnanl_no_libm+:} false; then :
88b48903
WN
18440 $as_echo_n "(cached) " >&6
18441else
18442
18443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18444/* end confdefs.h. */
18445#include <math.h>
18446 #if __GNUC__ >= 4
18447 # undef isnanl
18448 # define isnanl(x) __builtin_isnanl ((long double)(x))
18449 #elif defined isnan
18450 # undef isnanl
18451 # define isnanl(x) isnan ((long double)(x))
18452 #endif
18453 long double x;
18454int
18455main ()
18456{
18457return isnanl (x);
18458 ;
18459 return 0;
18460}
18461_ACEOF
18462if ac_fn_c_try_link "$LINENO"; then :
18463 gl_cv_func_isnanl_no_libm=yes
18464else
18465 gl_cv_func_isnanl_no_libm=no
18466fi
18467rm -f core conftest.err conftest.$ac_objext \
18468 conftest$ac_exeext conftest.$ac_ext
18469
18470fi
18471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
18472$as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
18473
18474 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
18475 if test $gl_func_isnanl_no_libm = yes; then
18476
18477
18478
18479
18480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
18481$as_echo_n "checking whether isnanl works... " >&6; }
d0ac1c44 18482if ${gl_cv_func_isnanl_works+:} false; then :
88b48903
WN
18483 $as_echo_n "(cached) " >&6
18484else
18485
18486 if test "$cross_compiling" = yes; then :
4a626d0a 18487 gl_cv_func_isnanl_works="guessing yes"
88b48903
WN
18488else
18489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18490/* end confdefs.h. */
18491
18492#include <float.h>
18493#include <limits.h>
18494#include <math.h>
18495#if __GNUC__ >= 4
18496# undef isnanl
18497# define isnanl(x) __builtin_isnanl ((long double)(x))
18498#elif defined isnan
18499# undef isnanl
18500# define isnanl(x) isnan ((long double)(x))
18501#endif
18502#define NWORDS \
18503 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
18504typedef union { unsigned int word[NWORDS]; long double value; }
18505 memory_long_double;
18506/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
18507 runtime type conversion. */
18508#ifdef __sgi
18509static long double NaNl ()
18510{
18511 double zero = 0.0;
18512 return zero / zero;
18513}
18514#else
18515# define NaNl() (0.0L / 0.0L)
18516#endif
18517int main ()
18518{
18519 int result = 0;
18520
18521 if (!isnanl (NaNl ()))
18522 result |= 1;
18523
18524 {
18525 memory_long_double m;
18526 unsigned int i;
18527
18528 /* The isnanl function should be immune against changes in the sign bit and
18529 in the mantissa bits. The xor operation twiddles a bit that can only be
18530 a sign bit or a mantissa bit (since the exponent never extends to
18531 bit 31). */
18532 m.value = NaNl ();
18533 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
18534 for (i = 0; i < NWORDS; i++)
18535 m.word[i] |= 1;
18536 if (!isnanl (m.value))
18537 result |= 1;
18538 }
18539
18540#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
18541/* Representation of an 80-bit 'long double' as an initializer for a sequence
18542 of 'unsigned int' words. */
18543# ifdef WORDS_BIGENDIAN
18544# define LDBL80_WORDS(exponent,manthi,mantlo) \
18545 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
4a626d0a 18546 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
88b48903
WN
18547 (unsigned int) (mantlo) << 16 \
18548 }
18549# else
18550# define LDBL80_WORDS(exponent,manthi,mantlo) \
18551 { mantlo, manthi, exponent }
18552# endif
18553 { /* Quiet NaN. */
18554 static memory_long_double x =
18555 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
18556 if (!isnanl (x.value))
18557 result |= 2;
18558 }
18559 {
18560 /* Signalling NaN. */
18561 static memory_long_double x =
18562 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
18563 if (!isnanl (x.value))
18564 result |= 2;
18565 }
4a626d0a 18566 /* isnanl should return something even for noncanonical values. */
88b48903
WN
18567 { /* Pseudo-NaN. */
18568 static memory_long_double x =
18569 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
4a626d0a 18570 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
18571 result |= 4;
18572 }
18573 { /* Pseudo-Infinity. */
18574 static memory_long_double x =
18575 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
4a626d0a 18576 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
18577 result |= 8;
18578 }
18579 { /* Pseudo-Zero. */
18580 static memory_long_double x =
18581 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
4a626d0a 18582 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
18583 result |= 16;
18584 }
18585 { /* Unnormalized number. */
18586 static memory_long_double x =
18587 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
4a626d0a 18588 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
18589 result |= 32;
18590 }
18591 { /* Pseudo-Denormal. */
18592 static memory_long_double x =
18593 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
4a626d0a 18594 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
18595 result |= 64;
18596 }
18597#endif
18598
18599 return result;
18600}
18601_ACEOF
18602if ac_fn_c_try_run "$LINENO"; then :
18603 gl_cv_func_isnanl_works=yes
18604else
18605 gl_cv_func_isnanl_works=no
18606fi
18607rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18608 conftest.$ac_objext conftest.beam conftest.$ac_ext
18609fi
18610
18611
18612fi
18613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
18614$as_echo "$gl_cv_func_isnanl_works" >&6; }
18615
18616 case "$gl_cv_func_isnanl_works" in
18617 *yes) ;;
18618 *) gl_func_isnanl_no_libm=no ;;
18619 esac
18620 fi
18621 if test $gl_func_isnanl_no_libm = yes; then
18622
18623$as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
18624
18625 fi
18626
18627 if test $gl_func_isnanl_no_libm != yes; then
18628
18629
18630
18631
18632
18633
18634
18635
18636 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
18637
18638
18639
18640
5e8754f9 18641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
88b48903 18642$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
d0ac1c44 18643if ${gl_cv_cc_long_double_expbit0+:} false; then :
88b48903
WN
18644 $as_echo_n "(cached) " >&6
18645else
18646
18647 if test "$cross_compiling" = yes; then :
18648
18649 gl_cv_cc_long_double_expbit0="unknown"
18650
18651else
18652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18653/* end confdefs.h. */
18654
18655#include <float.h>
18656#include <stddef.h>
18657#include <stdio.h>
18658#include <string.h>
18659#define NWORDS \
18660 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
18661typedef union { long double value; unsigned int word[NWORDS]; }
18662 memory_long_double;
18663static unsigned int ored_words[NWORDS];
18664static unsigned int anded_words[NWORDS];
18665static void add_to_ored_words (long double x)
18666{
18667 memory_long_double m;
18668 size_t i;
18669 /* Clear it first, in case
18670 sizeof (long double) < sizeof (memory_long_double). */
18671 memset (&m, 0, sizeof (memory_long_double));
18672 m.value = x;
18673 for (i = 0; i < NWORDS; i++)
18674 {
18675 ored_words[i] |= m.word[i];
18676 anded_words[i] &= m.word[i];
18677 }
18678}
18679int main ()
18680{
18681 size_t j;
18682 FILE *fp = fopen ("conftest.out", "w");
18683 if (fp == NULL)
18684 return 1;
18685 for (j = 0; j < NWORDS; j++)
18686 anded_words[j] = ~ (unsigned int) 0;
18687 add_to_ored_words (0.25L);
18688 add_to_ored_words (0.5L);
18689 add_to_ored_words (1.0L);
18690 add_to_ored_words (2.0L);
18691 add_to_ored_words (4.0L);
18692 /* Remove bits that are common (e.g. if representation of the first mantissa
18693 bit is explicit). */
18694 for (j = 0; j < NWORDS; j++)
18695 ored_words[j] &= ~anded_words[j];
18696 /* Now find the nonzero word. */
18697 for (j = 0; j < NWORDS; j++)
18698 if (ored_words[j] != 0)
18699 break;
18700 if (j < NWORDS)
18701 {
18702 size_t i;
18703 for (i = j + 1; i < NWORDS; i++)
18704 if (ored_words[i] != 0)
18705 {
18706 fprintf (fp, "unknown");
18707 return (fclose (fp) != 0);
18708 }
18709 for (i = 0; ; i++)
18710 if ((ored_words[j] >> i) & 1)
18711 {
18712 fprintf (fp, "word %d bit %d", (int) j, (int) i);
18713 return (fclose (fp) != 0);
18714 }
18715 }
18716 fprintf (fp, "unknown");
18717 return (fclose (fp) != 0);
18718}
18719
18720_ACEOF
18721if ac_fn_c_try_run "$LINENO"; then :
18722 gl_cv_cc_long_double_expbit0=`cat conftest.out`
18723else
18724 gl_cv_cc_long_double_expbit0="unknown"
18725fi
18726rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18727 conftest.$ac_objext conftest.beam conftest.$ac_ext
18728fi
18729
18730 rm -f conftest.out
18731
18732fi
18733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
18734$as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
18735 case "$gl_cv_cc_long_double_expbit0" in
18736 word*bit*)
18737 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
18738 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
18739
18740cat >>confdefs.h <<_ACEOF
18741#define LDBL_EXPBIT0_WORD $word
18742_ACEOF
18743
18744
18745cat >>confdefs.h <<_ACEOF
18746#define LDBL_EXPBIT0_BIT $bit
18747_ACEOF
18748
18749 ;;
18750 esac
18751
18752
18753
18754 fi
18755
18756
18757
18758
88b48903
WN
18759
18760
5e8754f9 18761 :
472fa5ee
SM
18762
18763
18764
18765
18766
88b48903
WN
18767
18768
2196f55f 18769
49e4877c 18770
5e8754f9 18771 LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
88b48903
WN
18772
18773
18774
18775
472fa5ee
SM
18776 :
18777
18778
18779
18780
18781
f45c62c4
YQ
18782 if test $ac_cv_func_lstat = yes; then
18783
5e8754f9
SDJ
18784 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
18785 *no)
f45c62c4
YQ
18786 REPLACE_LSTAT=1
18787 ;;
18788 esac
18789 else
18790 HAVE_LSTAT=0
18791 fi
18792
18793 if test $REPLACE_LSTAT = 1; then
18794
18795
18796
18797
18798
18799
18800
18801
18802 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
18803
18804 :
18805 fi
18806
18807
18808
18809
18810
18811 GNULIB_LSTAT=1
18812
18813
18814
18815
18816
18817$as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
18818
18819
18820
18821
18822
18823
6a29c58e
YQ
18824 if test $gl_cv_func_malloc_posix = yes; then
18825
18826$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
18827
18828 else
18829 REPLACE_MALLOC=1
18830 fi
18831
18832 if test $REPLACE_MALLOC = 1; then
18833
18834
18835
18836
18837
18838
18839
18840
18841 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
18842
18843 fi
18844
18845
18846
18847
18848
18849 GNULIB_MALLOC_POSIX=1
18850
18851
18852
18853
18854
18855$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
18856
18857
18858
18859
18860
18861
88b48903
WN
18862
18863
18864
18865
18866
88b48903 18867
c971b7fa 18868
c971b7fa 18869
98399780 18870
472fa5ee
SM
18871 :
18872
18873
18874
18875
18876
98399780
YQ
18877
18878
18879
88b48903
WN
18880 if test $gl_cv_have_include_next = yes; then
18881 gl_cv_next_math_h='<'math.h'>'
18882 else
18883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
18884$as_echo_n "checking absolute name of <math.h>... " >&6; }
d0ac1c44 18885if ${gl_cv_next_math_h+:} false; then :
88b48903
WN
18886 $as_echo_n "(cached) " >&6
18887else
c971b7fa 18888
88b48903 18889 if test $ac_cv_header_math_h = yes; then
c971b7fa
PA
18890
18891
4a626d0a
PA
18892
18893
18894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 18895/* end confdefs.h. */
88b48903 18896#include <math.h>
8690e634 18897_ACEOF
4a626d0a
PA
18898 case "$host_os" in
18899 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18900 *) gl_absname_cpp="$ac_cpp" ;;
18901 esac
18902
18903 case "$host_os" in
18904 mingw*)
18905 gl_dirsep_regex='[/\\]'
18906 ;;
18907 *)
18908 gl_dirsep_regex='\/'
18909 ;;
18910 esac
18911 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18912 gl_header_literal_regex=`echo 'math.h' \
18913 | sed -e "$gl_make_literal_regex_sed"`
18914 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18915 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18916 s|^/[^/]|//&|
18917 p
18918 q
18919 }'
18920
18921 gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18922 sed -n "$gl_absolute_header_sed"`
18923
18924 gl_header=$gl_cv_absolute_math_h
18925 gl_cv_next_math_h='"'$gl_header'"'
88b48903
WN
18926 else
18927 gl_cv_next_math_h='<'math.h'>'
18928 fi
8690e634 18929
c971b7fa 18930
88b48903
WN
18931fi
18932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
18933$as_echo "$gl_cv_next_math_h" >&6; }
18934 fi
18935 NEXT_MATH_H=$gl_cv_next_math_h
c971b7fa 18936
88b48903
WN
18937 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18938 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18939 gl_next_as_first_directive='<'math.h'>'
18940 else
18941 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18942 gl_next_as_first_directive=$gl_cv_next_math_h
18943 fi
18944 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
8690e634 18945
c971b7fa 18946
c971b7fa
PA
18947
18948
c971b7fa 18949
88b48903
WN
18950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
18951$as_echo_n "checking whether NAN macro works... " >&6; }
d0ac1c44 18952if ${gl_cv_header_math_nan_works+:} false; then :
c971b7fa
PA
18953 $as_echo_n "(cached) " >&6
18954else
8690e634
JK
18955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18956/* end confdefs.h. */
88b48903 18957#include <math.h>
c971b7fa
PA
18958int
18959main ()
18960{
88b48903
WN
18961/* Solaris 10 has a broken definition of NAN. Other platforms
18962 fail to provide NAN, or provide it only in C99 mode; this
18963 test only needs to fail when NAN is provided but wrong. */
18964 float f = 1.0f;
18965#ifdef NAN
18966 f = NAN;
18967#endif
18968 return f == 0;
c971b7fa
PA
18969 ;
18970 return 0;
18971}
18972_ACEOF
18973if ac_fn_c_try_compile "$LINENO"; then :
88b48903 18974 gl_cv_header_math_nan_works=yes
8690e634 18975else
88b48903 18976 gl_cv_header_math_nan_works=no
c971b7fa
PA
18977fi
18978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 18979fi
88b48903
WN
18980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
18981$as_echo "$gl_cv_header_math_nan_works" >&6; }
18982 if test $gl_cv_header_math_nan_works = no; then
18983 REPLACE_NAN=1
c971b7fa 18984 fi
88b48903
WN
18985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
18986$as_echo_n "checking whether HUGE_VAL works... " >&6; }
d0ac1c44 18987if ${gl_cv_header_math_huge_val_works+:} false; then :
c971b7fa
PA
18988 $as_echo_n "(cached) " >&6
18989else
8690e634 18990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 18991/* end confdefs.h. */
88b48903 18992#include <math.h>
c971b7fa
PA
18993int
18994main ()
18995{
88b48903
WN
18996/* Solaris 10 has a broken definition of HUGE_VAL. */
18997 double d = HUGE_VAL;
18998 return d == 0;
c971b7fa
PA
18999 ;
19000 return 0;
19001}
19002_ACEOF
19003if ac_fn_c_try_compile "$LINENO"; then :
88b48903 19004 gl_cv_header_math_huge_val_works=yes
8690e634 19005else
88b48903 19006 gl_cv_header_math_huge_val_works=no
c971b7fa
PA
19007fi
19008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 19009fi
88b48903
WN
19010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
19011$as_echo "$gl_cv_header_math_huge_val_works" >&6; }
19012 if test $gl_cv_header_math_huge_val_works = no; then
19013 REPLACE_HUGE_VAL=1
8690e634 19014 fi
c971b7fa 19015
c971b7fa 19016
5e8754f9
SDJ
19017 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
19018 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
19019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
19020$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
19021if eval \${$as_gl_Symbol+:} false; then :
19022 $as_echo_n "(cached) " >&6
19023else
19024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19025/* end confdefs.h. */
19026#include <math.h>
19027int
19028main ()
19029{
19030#undef $gl_func
19031 (void) $gl_func;
19032 ;
19033 return 0;
19034}
19035_ACEOF
19036if ac_fn_c_try_compile "$LINENO"; then :
19037 eval "$as_gl_Symbol=yes"
19038else
19039 eval "$as_gl_Symbol=no"
19040fi
19041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19042fi
19043eval ac_res=\$$as_gl_Symbol
19044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19045$as_echo "$ac_res" >&6; }
19046 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
19047 cat >>confdefs.h <<_ACEOF
19048#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
19049_ACEOF
c971b7fa 19050
5e8754f9
SDJ
19051 eval ac_cv_have_decl_$gl_func=yes
19052fi
19053 done
c971b7fa
PA
19054
19055
19056
19057
19058
c971b7fa 19059
c971b7fa 19060
c971b7fa 19061
c971b7fa
PA
19062
19063
c971b7fa 19064
472fa5ee
SM
19065 :
19066
19067
19068
19069
19070
19071
19072 :
19073
19074
19075
19076
8690e634
JK
19077
19078 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
19079
19080
19081
19082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
19083$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
d0ac1c44 19084if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
c971b7fa
PA
19085 $as_echo_n "(cached) " >&6
19086else
8690e634
JK
19087
19088 case "$host_os" in
19089 # Guess no on AIX and OSF/1.
19090 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
19091 # Guess yes otherwise.
19092 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
19093 esac
19094 if test $LOCALE_JA != none; then
19095 if test "$cross_compiling" = yes; then :
19096 :
19097else
c971b7fa
PA
19098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19099/* end confdefs.h. */
c971b7fa 19100
8690e634
JK
19101#include <locale.h>
19102#include <string.h>
19103/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19104 <wchar.h>.
19105 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19106 included before <wchar.h>. */
19107#include <stddef.h>
19108#include <stdio.h>
19109#include <time.h>
19110#include <wchar.h>
19111int main ()
c971b7fa 19112{
8690e634
JK
19113 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
19114 {
19115 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
19116 mbstate_t state;
19117 wchar_t wc;
19118
19119 memset (&state, '\0', sizeof (mbstate_t));
19120 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
19121 if (mbsinit (&state))
5e8754f9 19122 return 1;
8690e634 19123 }
c971b7fa
PA
19124 return 0;
19125}
19126_ACEOF
8690e634
JK
19127if ac_fn_c_try_run "$LINENO"; then :
19128 gl_cv_func_mbrtowc_incomplete_state=yes
c971b7fa 19129else
8690e634 19130 gl_cv_func_mbrtowc_incomplete_state=no
c971b7fa 19131fi
8690e634
JK
19132rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19133 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 19134fi
c971b7fa 19135
8690e634 19136 fi
c971b7fa 19137
8690e634
JK
19138fi
19139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
19140$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
c971b7fa 19141
c971b7fa 19142
c971b7fa 19143
c971b7fa 19144
8690e634
JK
19145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
19146$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
d0ac1c44 19147if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
c971b7fa
PA
19148 $as_echo_n "(cached) " >&6
19149else
19150
8690e634
JK
19151 case "$host_os" in
19152 # Guess no on Solaris 8.
19153 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
19154 # Guess yes otherwise.
19155 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
19156 esac
19157 if test $LOCALE_ZH_CN != none; then
19158 if test "$cross_compiling" = yes; then :
19159 :
19160else
19161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
19162/* end confdefs.h. */
19163
8690e634
JK
19164#include <locale.h>
19165#include <stdlib.h>
19166#include <string.h>
19167/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19168 <wchar.h>.
19169 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19170 included before <wchar.h>. */
19171#include <stddef.h>
19172#include <stdio.h>
19173#include <time.h>
19174#include <wchar.h>
19175int main ()
c971b7fa 19176{
8690e634
JK
19177 /* This fails on Solaris 8:
19178 mbrtowc returns 2, and sets wc to 0x00F0.
19179 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
19180 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
19181 {
19182 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
19183 mbstate_t state;
19184 wchar_t wc;
19185
19186 memset (&state, '\0', sizeof (mbstate_t));
19187 if (mbrtowc (&wc, input + 3, 6, &state) != 4
19188 && mbtowc (&wc, input + 3, 6) == 4)
5e8754f9 19189 return 1;
8690e634 19190 }
c971b7fa
PA
19191 return 0;
19192}
19193_ACEOF
8690e634
JK
19194if ac_fn_c_try_run "$LINENO"; then :
19195 gl_cv_func_mbrtowc_sanitycheck=yes
c971b7fa 19196else
8690e634 19197 gl_cv_func_mbrtowc_sanitycheck=no
c971b7fa 19198fi
8690e634
JK
19199rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19200 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 19201fi
c971b7fa 19202
8690e634 19203 fi
c971b7fa 19204
8690e634
JK
19205fi
19206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
19207$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
19208
19209 REPLACE_MBSTATE_T=0
19210 case "$gl_cv_func_mbrtowc_incomplete_state" in
19211 *yes) ;;
19212 *) REPLACE_MBSTATE_T=1 ;;
19213 esac
19214 case "$gl_cv_func_mbrtowc_sanitycheck" in
19215 *yes) ;;
19216 *) REPLACE_MBSTATE_T=1 ;;
19217 esac
c971b7fa 19218 else
8690e634 19219 REPLACE_MBSTATE_T=1
c971b7fa
PA
19220 fi
19221
19222
19223
472fa5ee
SM
19224 :
19225
19226
19227
19228
19229
8690e634
JK
19230 if test $ac_cv_func_mbrtowc = no; then
19231 HAVE_MBRTOWC=0
19232 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
19233/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19234 <wchar.h>.
19235 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19236 included before <wchar.h>. */
19237#include <stddef.h>
19238#include <stdio.h>
19239#include <time.h>
19240#include <wchar.h>
c971b7fa 19241
8690e634 19242"
d0ac1c44 19243if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
8690e634
JK
19244 ac_have_decl=1
19245else
19246 ac_have_decl=0
c971b7fa 19247fi
c971b7fa 19248
8690e634
JK
19249cat >>confdefs.h <<_ACEOF
19250#define HAVE_DECL_MBRTOWC $ac_have_decl
19251_ACEOF
c971b7fa 19252
8690e634
JK
19253 if test $ac_cv_have_decl_mbrtowc = yes; then
19254 REPLACE_MBRTOWC=1
19255 fi
19256 else
19257 if test $REPLACE_MBSTATE_T = 1; then
19258 REPLACE_MBRTOWC=1
19259 else
c971b7fa
PA
19260
19261
19262
8690e634
JK
19263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
19264$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
d0ac1c44 19265if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
8690e634 19266 $as_echo_n "(cached) " >&6
c971b7fa 19267else
c971b7fa 19268
8690e634
JK
19269 case "$host_os" in
19270 # Guess no on Solaris.
19271 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
19272 # Guess yes otherwise.
19273 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
19274 esac
19275 if test $LOCALE_FR_UTF8 != none; then
19276 if test "$cross_compiling" = yes; then :
19277 :
19278else
19279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
19280/* end confdefs.h. */
19281
8690e634
JK
19282#include <locale.h>
19283#include <stdlib.h>
19284#include <string.h>
19285/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19286 <wchar.h>.
19287 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19288 included before <wchar.h>. */
19289#include <stddef.h>
19290#include <stdio.h>
19291#include <time.h>
19292#include <wchar.h>
19293int main ()
19294{
19295 int result = 0;
19296
19297 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
19298 {
19299 char input[] = "\303\237er";
19300 mbstate_t state;
19301 wchar_t wc;
19302 size_t ret;
19303
19304 memset (&state, '\0', sizeof (mbstate_t));
19305 wc = (wchar_t) 0xBADFACE;
19306 ret = mbrtowc (&wc, input, 5, &state);
19307 if (ret != 2)
19308 result |= 1;
19309 if (!mbsinit (&state))
19310 result |= 2;
c971b7fa 19311
8690e634
JK
19312 memset (&state, '\0', sizeof (mbstate_t));
19313 ret = mbrtowc (NULL, input, 5, &state);
19314 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
19315 result |= 4;
19316 if (!mbsinit (&state))
19317 result |= 8;
19318 }
19319 return result;
19320}
c971b7fa 19321_ACEOF
8690e634
JK
19322if ac_fn_c_try_run "$LINENO"; then :
19323 gl_cv_func_mbrtowc_null_arg1=yes
19324else
19325 gl_cv_func_mbrtowc_null_arg1=no
19326fi
19327rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19328 conftest.$ac_objext conftest.beam conftest.$ac_ext
19329fi
c971b7fa 19330
8690e634 19331 fi
c971b7fa 19332
c971b7fa 19333fi
8690e634
JK
19334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
19335$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
c971b7fa 19336
c971b7fa 19337
c971b7fa 19338
c971b7fa 19339
8690e634
JK
19340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
19341$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
d0ac1c44 19342if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
8690e634
JK
19343 $as_echo_n "(cached) " >&6
19344else
c971b7fa 19345
8690e634
JK
19346 case "$host_os" in
19347 # Guess no on OSF/1.
19348 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
19349 # Guess yes otherwise.
19350 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
19351 esac
19352 if test $LOCALE_FR_UTF8 != none; then
19353 if test "$cross_compiling" = yes; then :
c971b7fa 19354 :
8690e634
JK
19355else
19356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19357/* end confdefs.h. */
19358
19359#include <locale.h>
19360#include <string.h>
19361/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19362 <wchar.h>.
19363 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19364 included before <wchar.h>. */
19365#include <stddef.h>
19366#include <stdio.h>
19367#include <time.h>
19368#include <wchar.h>
19369int main ()
19370{
19371 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
19372 {
19373 mbstate_t state;
19374 wchar_t wc;
19375 int ret;
19376
19377 memset (&state, '\0', sizeof (mbstate_t));
19378 wc = (wchar_t) 0xBADFACE;
19379 mbrtowc (&wc, NULL, 5, &state);
19380 /* Check that wc was not modified. */
19381 if (wc != (wchar_t) 0xBADFACE)
5e8754f9 19382 return 1;
8690e634
JK
19383 }
19384 return 0;
19385}
19386_ACEOF
19387if ac_fn_c_try_run "$LINENO"; then :
19388 gl_cv_func_mbrtowc_null_arg2=yes
19389else
19390 gl_cv_func_mbrtowc_null_arg2=no
19391fi
19392rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19393 conftest.$ac_objext conftest.beam conftest.$ac_ext
19394fi
19395
19396 fi
19397
19398fi
19399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
19400$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
c971b7fa
PA
19401
19402
19403
19404
19405
19406
8690e634
JK
19407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
19408$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
d0ac1c44 19409if ${gl_cv_func_mbrtowc_retval+:} false; then :
8690e634
JK
19410 $as_echo_n "(cached) " >&6
19411else
19412
19413 case "$host_os" in
19414 # Guess no on HP-UX, Solaris, native Windows.
19415 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
19416 # Guess yes otherwise.
19417 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
19418 esac
19419 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
19420 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
19421 if test "$cross_compiling" = yes; then :
c971b7fa 19422 :
8690e634
JK
19423else
19424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19425/* end confdefs.h. */
c971b7fa 19426
8690e634
JK
19427#include <locale.h>
19428#include <string.h>
19429/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19430 <wchar.h>.
19431 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19432 included before <wchar.h>. */
19433#include <stddef.h>
19434#include <stdio.h>
19435#include <time.h>
19436#include <wchar.h>
19437int main ()
19438{
19439 int result = 0;
19440 int found_some_locale = 0;
19441 /* This fails on Solaris. */
19442 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
19443 {
19444 char input[] = "B\303\274\303\237er"; /* "Büßer" */
19445 mbstate_t state;
19446 wchar_t wc;
19447
19448 memset (&state, '\0', sizeof (mbstate_t));
19449 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
19450 {
19451 input[1] = '\0';
19452 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
19453 result |= 1;
19454 }
19455 found_some_locale = 1;
19456 }
19457 /* This fails on HP-UX 11.11. */
19458 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
19459 {
19460 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
19461 mbstate_t state;
19462 wchar_t wc;
19463
19464 memset (&state, '\0', sizeof (mbstate_t));
19465 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
19466 {
19467 input[1] = '\0';
19468 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
19469 result |= 2;
19470 }
19471 found_some_locale = 1;
19472 }
19473 /* This fails on native Windows. */
19474 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
19475 {
19476 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
19477 mbstate_t state;
19478 wchar_t wc;
19479
19480 memset (&state, '\0', sizeof (mbstate_t));
19481 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
19482 {
19483 input[3] = '\0';
19484 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
19485 result |= 4;
19486 }
19487 found_some_locale = 1;
19488 }
19489 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
19490 {
19491 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
19492 mbstate_t state;
19493 wchar_t wc;
19494
19495 memset (&state, '\0', sizeof (mbstate_t));
19496 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
19497 {
19498 input[3] = '\0';
19499 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
19500 result |= 8;
19501 }
19502 found_some_locale = 1;
19503 }
19504 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
19505 {
19506 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
19507 mbstate_t state;
19508 wchar_t wc;
19509
19510 memset (&state, '\0', sizeof (mbstate_t));
19511 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
19512 {
19513 input[3] = '\0';
19514 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
19515 result |= 16;
19516 }
19517 found_some_locale = 1;
19518 }
19519 return (found_some_locale ? result : 77);
19520}
19521_ACEOF
19522if ac_fn_c_try_run "$LINENO"; then :
19523 gl_cv_func_mbrtowc_retval=yes
19524else
19525 if test $? != 77; then
19526 gl_cv_func_mbrtowc_retval=no
19527 fi
c971b7fa 19528
8690e634
JK
19529fi
19530rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19531 conftest.$ac_objext conftest.beam conftest.$ac_ext
19532fi
c971b7fa 19533
8690e634 19534 fi
c971b7fa 19535
8690e634
JK
19536fi
19537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
19538$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
c971b7fa
PA
19539
19540
19541
19542
8690e634
JK
19543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
19544$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
d0ac1c44 19545if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
c971b7fa
PA
19546 $as_echo_n "(cached) " >&6
19547else
8690e634
JK
19548
19549 case "$host_os" in
19550 # Guess no on Solaris 8 and 9.
19551 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
19552 # Guess yes otherwise.
19553 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
19554 esac
19555 if test $LOCALE_ZH_CN != none; then
19556 if test "$cross_compiling" = yes; then :
19557 :
c971b7fa
PA
19558else
19559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19560/* end confdefs.h. */
19561
8690e634 19562#include <locale.h>
c971b7fa 19563#include <string.h>
8690e634
JK
19564/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19565 <wchar.h>.
19566 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19567 included before <wchar.h>. */
19568#include <stddef.h>
19569#include <stdio.h>
19570#include <time.h>
19571#include <wchar.h>
19572int main ()
c971b7fa 19573{
8690e634
JK
19574 /* This fails on Solaris 8 and 9. */
19575 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
c971b7fa 19576 {
8690e634
JK
19577 mbstate_t state;
19578 wchar_t wc;
c971b7fa 19579
8690e634
JK
19580 memset (&state, '\0', sizeof (mbstate_t));
19581 if (mbrtowc (&wc, "", 1, &state) != 0)
5e8754f9 19582 return 1;
8690e634 19583 }
c971b7fa
PA
19584 return 0;
19585}
19586_ACEOF
19587if ac_fn_c_try_run "$LINENO"; then :
8690e634 19588 gl_cv_func_mbrtowc_nul_retval=yes
c971b7fa 19589else
8690e634 19590 gl_cv_func_mbrtowc_nul_retval=no
c971b7fa
PA
19591fi
19592rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19593 conftest.$ac_objext conftest.beam conftest.$ac_ext
19594fi
19595
8690e634
JK
19596 fi
19597
c971b7fa 19598fi
8690e634
JK
19599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
19600$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
19601
4a626d0a
PA
19602
19603
19604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
19605$as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
d0ac1c44 19606if ${gl_cv_func_mbrtowc_empty_input+:} false; then :
4a626d0a
PA
19607 $as_echo_n "(cached) " >&6
19608else
19609
19610 case "$host_os" in
5e8754f9
SDJ
19611 # Guess no on AIX and glibc systems.
19612 aix* | *-gnu*)
19613 gl_cv_func_mbrtowc_empty_input="guessing no" ;;
19614 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
4a626d0a
PA
19615 esac
19616 if test "$cross_compiling" = yes; then :
19617 :
19618else
19619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19620/* end confdefs.h. */
19621
19622 #include <wchar.h>
19623 static wchar_t wc;
19624 static mbstate_t mbs;
19625 int
19626 main (void)
19627 {
49e4877c 19628 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
4a626d0a
PA
19629 }
19630_ACEOF
19631if ac_fn_c_try_run "$LINENO"; then :
4a626d0a 19632 gl_cv_func_mbrtowc_empty_input=yes
49e4877c
PA
19633else
19634 gl_cv_func_mbrtowc_empty_input=no
4a626d0a
PA
19635fi
19636rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19637 conftest.$ac_objext conftest.beam conftest.$ac_ext
19638fi
19639
19640
19641fi
19642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
19643$as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
19644
49e4877c 19645
5e8754f9 19646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
49e4877c 19647$as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
d0ac1c44 19648if ${gl_cv_C_locale_sans_EILSEQ+:} false; then :
49e4877c
PA
19649 $as_echo_n "(cached) " >&6
19650else
19651
19652 gl_cv_C_locale_sans_EILSEQ="guessing no"
19653
19654 if test "$cross_compiling" = yes; then :
5e8754f9 19655 :
49e4877c
PA
19656else
19657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19658/* end confdefs.h. */
19659#include <limits.h>
19660 #include <locale.h>
19661 #include <wchar.h>
19662
19663int
19664main ()
19665{
19666
19667 int i;
19668 char *locale = setlocale (LC_ALL, "C");
19669 if (! locale)
5e8754f9 19670 return 1;
49e4877c
PA
19671 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
19672 {
19673 char c = i;
19674 wchar_t wc;
19675 mbstate_t mbs = { 0, };
19676 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
19677 if (1 < ss)
5e8754f9 19678 return 1;
49e4877c
PA
19679 }
19680 return 0;
19681
6ec2e0f5
SDJ
19682 ;
19683 return 0;
19684}
19685_ACEOF
19686if ac_fn_c_try_run "$LINENO"; then :
19687 gl_cv_C_locale_sans_EILSEQ=yes
19688else
19689 gl_cv_C_locale_sans_EILSEQ=no
19690fi
19691rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19692 conftest.$ac_objext conftest.beam conftest.$ac_ext
19693fi
19694
19695fi
19696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5
19697$as_echo "$gl_cv_C_locale_sans_EILSEQ" >&6; }
19698
19699 case "$gl_cv_func_mbrtowc_null_arg1" in
19700 *yes) ;;
19701 *)
19702$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
19703
19704 REPLACE_MBRTOWC=1
19705 ;;
19706 esac
19707 case "$gl_cv_func_mbrtowc_null_arg2" in
19708 *yes) ;;
19709 *)
19710$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
19711
19712 REPLACE_MBRTOWC=1
19713 ;;
19714 esac
19715 case "$gl_cv_func_mbrtowc_retval" in
19716 *yes) ;;
19717 *)
19718$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
19719
19720 REPLACE_MBRTOWC=1
19721 ;;
19722 esac
19723 case "$gl_cv_func_mbrtowc_nul_retval" in
19724 *yes) ;;
19725 *)
19726$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
19727
19728 REPLACE_MBRTOWC=1
19729 ;;
19730 esac
19731 case "$gl_cv_func_mbrtowc_empty_input" in
19732 *yes) ;;
19733 *)
19734$as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
19735
19736 REPLACE_MBRTOWC=1
19737 ;;
19738 esac
19739 case $gl_cv_C_locale_sans_EILSEQ in
19740 *yes) ;;
19741 *)
19742$as_echo "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
19743
19744 REPLACE_MBRTOWC=1
19745 ;;
19746 esac
19747 fi
19748 fi
19749
19750 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
19751
19752
19753
19754
19755
19756
19757
19758
19759 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
19760
19761
19762 :
19763
19764 fi
19765
19766
19767
19768
19769
19770 GNULIB_MBRTOWC=1
19771
19772
19773
19774
19775
19776$as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
19777
19778
19779
19780
19781
19782
19783
19784
19785
19786
19787
19788
19789
472fa5ee
SM
19790 :
19791
19792
19793
19794
19795
19796
19797 :
19798
19799
19800
19801
6ec2e0f5
SDJ
19802
19803 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
19804
19805
19806
19807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
19808$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
d0ac1c44 19809if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
6ec2e0f5
SDJ
19810 $as_echo_n "(cached) " >&6
19811else
19812
19813 case "$host_os" in
19814 # Guess no on AIX and OSF/1.
19815 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
19816 # Guess yes otherwise.
19817 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
19818 esac
19819 if test $LOCALE_JA != none; then
19820 if test "$cross_compiling" = yes; then :
19821 :
19822else
19823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19824/* end confdefs.h. */
19825
19826#include <locale.h>
19827#include <string.h>
19828/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19829 <wchar.h>.
19830 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19831 included before <wchar.h>. */
19832#include <stddef.h>
19833#include <stdio.h>
19834#include <time.h>
19835#include <wchar.h>
19836int main ()
19837{
19838 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
19839 {
19840 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
19841 mbstate_t state;
19842 wchar_t wc;
19843
19844 memset (&state, '\0', sizeof (mbstate_t));
19845 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
19846 if (mbsinit (&state))
5e8754f9 19847 return 1;
6ec2e0f5
SDJ
19848 }
19849 return 0;
19850}
19851_ACEOF
19852if ac_fn_c_try_run "$LINENO"; then :
19853 gl_cv_func_mbrtowc_incomplete_state=yes
19854else
19855 gl_cv_func_mbrtowc_incomplete_state=no
19856fi
19857rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19858 conftest.$ac_objext conftest.beam conftest.$ac_ext
19859fi
19860
19861 fi
19862
19863fi
19864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
19865$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
19866
19867
19868
19869
19870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
19871$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
d0ac1c44 19872if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
6ec2e0f5
SDJ
19873 $as_echo_n "(cached) " >&6
19874else
19875
19876 case "$host_os" in
19877 # Guess no on Solaris 8.
19878 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
19879 # Guess yes otherwise.
19880 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
19881 esac
19882 if test $LOCALE_ZH_CN != none; then
19883 if test "$cross_compiling" = yes; then :
19884 :
19885else
19886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19887/* end confdefs.h. */
19888
19889#include <locale.h>
19890#include <stdlib.h>
19891#include <string.h>
19892/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19893 <wchar.h>.
19894 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19895 included before <wchar.h>. */
19896#include <stddef.h>
19897#include <stdio.h>
19898#include <time.h>
19899#include <wchar.h>
19900int main ()
19901{
19902 /* This fails on Solaris 8:
19903 mbrtowc returns 2, and sets wc to 0x00F0.
19904 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
19905 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
19906 {
19907 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
19908 mbstate_t state;
19909 wchar_t wc;
19910
19911 memset (&state, '\0', sizeof (mbstate_t));
19912 if (mbrtowc (&wc, input + 3, 6, &state) != 4
19913 && mbtowc (&wc, input + 3, 6) == 4)
5e8754f9 19914 return 1;
6ec2e0f5 19915 }
49e4877c
PA
19916 return 0;
19917}
19918_ACEOF
19919if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 19920 gl_cv_func_mbrtowc_sanitycheck=yes
49e4877c 19921else
6ec2e0f5 19922 gl_cv_func_mbrtowc_sanitycheck=no
49e4877c
PA
19923fi
19924rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19925 conftest.$ac_objext conftest.beam conftest.$ac_ext
19926fi
19927
6ec2e0f5
SDJ
19928 fi
19929
49e4877c 19930fi
6ec2e0f5
SDJ
19931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
19932$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
49e4877c 19933
6ec2e0f5
SDJ
19934 REPLACE_MBSTATE_T=0
19935 case "$gl_cv_func_mbrtowc_incomplete_state" in
19936 *yes) ;;
19937 *) REPLACE_MBSTATE_T=1 ;;
19938 esac
19939 case "$gl_cv_func_mbrtowc_sanitycheck" in
19940 *yes) ;;
19941 *) REPLACE_MBSTATE_T=1 ;;
19942 esac
19943 else
19944 REPLACE_MBSTATE_T=1
19945 fi
8690e634 19946
8690e634 19947
8690e634 19948
472fa5ee
SM
19949 :
19950
19951
19952
19953
19954
6ec2e0f5
SDJ
19955 if test $ac_cv_func_mbsinit = no; then
19956 HAVE_MBSINIT=0
19957 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
19958/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19959 <wchar.h>.
19960 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19961 included before <wchar.h>. */
19962#include <stddef.h>
19963#include <stdio.h>
19964#include <time.h>
19965#include <wchar.h>
8690e634 19966
6ec2e0f5 19967"
d0ac1c44 19968if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
6ec2e0f5
SDJ
19969 ac_have_decl=1
19970else
19971 ac_have_decl=0
19972fi
4a626d0a 19973
6ec2e0f5
SDJ
19974cat >>confdefs.h <<_ACEOF
19975#define HAVE_DECL_MBSINIT $ac_have_decl
19976_ACEOF
49e4877c 19977
6ec2e0f5
SDJ
19978 if test $ac_cv_have_decl_mbsinit = yes; then
19979 REPLACE_MBSINIT=1
19980 fi
19981 else
19982 if test $REPLACE_MBSTATE_T = 1; then
19983 REPLACE_MBSINIT=1
19984 else
19985 case "$host_os" in
19986 mingw*) REPLACE_MBSINIT=1 ;;
8690e634 19987 esac
c971b7fa
PA
19988 fi
19989 fi
19990
6ec2e0f5 19991 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
c971b7fa 19992
c971b7fa 19993
c971b7fa
PA
19994
19995
19996
19997
19998
19999
6ec2e0f5 20000 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
8690e634
JK
20001
20002
20003 :
c971b7fa 20004
a512b375 20005 fi
c971b7fa 20006
8690e634
JK
20007
20008
20009
20010
6ec2e0f5 20011 GNULIB_MBSINIT=1
8690e634
JK
20012
20013
20014
20015
8690e634 20016
6ec2e0f5 20017$as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
8690e634
JK
20018
20019
20020
20021
20022
20023
20024
20025
20026
20027
20028
c971b7fa 20029
472fa5ee
SM
20030 :
20031
20032
20033
20034
20035
20036
20037 :
20038
20039
20040
20041
c971b7fa 20042
8690e634 20043 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
c971b7fa 20044
8690e634
JK
20045
20046
20047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
20048$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
d0ac1c44 20049if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
8690e634
JK
20050 $as_echo_n "(cached) " >&6
20051else
20052
20053 case "$host_os" in
20054 # Guess no on AIX and OSF/1.
20055 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
20056 # Guess yes otherwise.
20057 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
20058 esac
20059 if test $LOCALE_JA != none; then
20060 if test "$cross_compiling" = yes; then :
20061 :
c971b7fa
PA
20062else
20063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20064/* end confdefs.h. */
20065
8690e634
JK
20066#include <locale.h>
20067#include <string.h>
20068/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20069 <wchar.h>.
20070 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20071 included before <wchar.h>. */
20072#include <stddef.h>
20073#include <stdio.h>
20074#include <time.h>
20075#include <wchar.h>
20076int main ()
c971b7fa 20077{
8690e634 20078 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
c971b7fa 20079 {
8690e634
JK
20080 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
20081 mbstate_t state;
20082 wchar_t wc;
20083
20084 memset (&state, '\0', sizeof (mbstate_t));
20085 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
20086 if (mbsinit (&state))
5e8754f9 20087 return 1;
c971b7fa 20088 }
c971b7fa
PA
20089 return 0;
20090}
20091_ACEOF
20092if ac_fn_c_try_run "$LINENO"; then :
8690e634 20093 gl_cv_func_mbrtowc_incomplete_state=yes
c971b7fa 20094else
8690e634 20095 gl_cv_func_mbrtowc_incomplete_state=no
c971b7fa
PA
20096fi
20097rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20098 conftest.$ac_objext conftest.beam conftest.$ac_ext
20099fi
20100
8690e634 20101 fi
c971b7fa
PA
20102
20103fi
8690e634
JK
20104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
20105$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
c971b7fa
PA
20106
20107
c971b7fa
PA
20108
20109
8690e634
JK
20110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
20111$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
d0ac1c44 20112if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
c971b7fa
PA
20113 $as_echo_n "(cached) " >&6
20114else
8690e634
JK
20115
20116 case "$host_os" in
20117 # Guess no on Solaris 8.
20118 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
20119 # Guess yes otherwise.
20120 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
20121 esac
20122 if test $LOCALE_ZH_CN != none; then
20123 if test "$cross_compiling" = yes; then :
20124 :
20125else
c971b7fa
PA
20126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20127/* end confdefs.h. */
8690e634
JK
20128
20129#include <locale.h>
20130#include <stdlib.h>
20131#include <string.h>
20132/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20133 <wchar.h>.
20134 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20135 included before <wchar.h>. */
c971b7fa 20136#include <stddef.h>
8690e634
JK
20137#include <stdio.h>
20138#include <time.h>
20139#include <wchar.h>
20140int main ()
c971b7fa 20141{
8690e634
JK
20142 /* This fails on Solaris 8:
20143 mbrtowc returns 2, and sets wc to 0x00F0.
20144 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
20145 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
20146 {
20147 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
20148 mbstate_t state;
20149 wchar_t wc;
20150
20151 memset (&state, '\0', sizeof (mbstate_t));
20152 if (mbrtowc (&wc, input + 3, 6, &state) != 4
20153 && mbtowc (&wc, input + 3, 6) == 4)
5e8754f9 20154 return 1;
8690e634 20155 }
c971b7fa
PA
20156 return 0;
20157}
20158_ACEOF
8690e634
JK
20159if ac_fn_c_try_run "$LINENO"; then :
20160 gl_cv_func_mbrtowc_sanitycheck=yes
c971b7fa 20161else
8690e634 20162 gl_cv_func_mbrtowc_sanitycheck=no
c971b7fa 20163fi
8690e634
JK
20164rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20165 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 20166fi
c971b7fa 20167
8690e634
JK
20168 fi
20169
20170fi
20171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
20172$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
c971b7fa 20173
8690e634
JK
20174 REPLACE_MBSTATE_T=0
20175 case "$gl_cv_func_mbrtowc_incomplete_state" in
20176 *yes) ;;
20177 *) REPLACE_MBSTATE_T=1 ;;
20178 esac
20179 case "$gl_cv_func_mbrtowc_sanitycheck" in
20180 *yes) ;;
20181 *) REPLACE_MBSTATE_T=1 ;;
20182 esac
20183 else
20184 REPLACE_MBSTATE_T=1
c971b7fa
PA
20185 fi
20186
c971b7fa 20187
8690e634 20188
472fa5ee
SM
20189 :
20190
20191
20192
20193
20194
6ec2e0f5
SDJ
20195 if test $ac_cv_func_mbsrtowcs = no; then
20196 HAVE_MBSRTOWCS=0
20197 ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
8690e634
JK
20198/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20199 <wchar.h>.
20200 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20201 included before <wchar.h>. */
20202#include <stddef.h>
20203#include <stdio.h>
20204#include <time.h>
20205#include <wchar.h>
20206
20207"
d0ac1c44 20208if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
8690e634
JK
20209 ac_have_decl=1
20210else
20211 ac_have_decl=0
c971b7fa 20212fi
c971b7fa 20213
8690e634 20214cat >>confdefs.h <<_ACEOF
6ec2e0f5 20215#define HAVE_DECL_MBSRTOWCS $ac_have_decl
c971b7fa 20216_ACEOF
c971b7fa 20217
6ec2e0f5
SDJ
20218 if test $ac_cv_have_decl_mbsrtowcs = yes; then
20219 REPLACE_MBSRTOWCS=1
8690e634
JK
20220 fi
20221 else
20222 if test $REPLACE_MBSTATE_T = 1; then
6ec2e0f5 20223 REPLACE_MBSRTOWCS=1
8690e634 20224 else
6ec2e0f5
SDJ
20225
20226
20227
20228
20229
20230
20231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
20232$as_echo_n "checking whether mbsrtowcs works... " >&6; }
d0ac1c44 20233if ${gl_cv_func_mbsrtowcs_works+:} false; then :
6ec2e0f5
SDJ
20234 $as_echo_n "(cached) " >&6
20235else
20236
20237 case "$host_os" in
20238 # Guess no on HP-UX, Solaris, mingw.
20239 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
20240 # Guess yes otherwise.
20241 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
20242 esac
20243 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
20244 if test "$cross_compiling" = yes; then :
20245 :
20246else
20247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20248/* end confdefs.h. */
20249
20250#include <locale.h>
20251#include <string.h>
20252/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20253 <wchar.h>.
20254 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20255 included before <wchar.h>. */
20256#include <stddef.h>
20257#include <stdio.h>
20258#include <time.h>
20259#include <wchar.h>
20260int main ()
20261{
20262 int result = 0;
20263 /* Test whether the function supports a NULL destination argument.
20264 This fails on native Windows. */
20265 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
20266 {
20267 const char input[] = "\337er";
20268 const char *src = input;
20269 mbstate_t state;
20270
20271 memset (&state, '\0', sizeof (mbstate_t));
20272 if (mbsrtowcs (NULL, &src, 1, &state) != 3
20273 || src != input)
20274 result |= 1;
20275 }
20276 /* Test whether the function works when started with a conversion state
20277 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
20278 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
20279 {
20280 const char input[] = "B\303\274\303\237er";
20281 mbstate_t state;
20282
20283 memset (&state, '\0', sizeof (mbstate_t));
20284 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
20285 if (!mbsinit (&state))
20286 {
20287 const char *src = input + 2;
20288 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
20289 result |= 2;
20290 }
20291 }
20292 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
20293 {
20294 const char input[] = "<\306\374\313\334\270\354>";
20295 mbstate_t state;
20296
20297 memset (&state, '\0', sizeof (mbstate_t));
20298 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
20299 if (!mbsinit (&state))
20300 {
20301 const char *src = input + 4;
20302 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
20303 result |= 4;
20304 }
20305 }
20306 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
20307 {
20308 const char input[] = "B\250\271\201\060\211\070er";
20309 mbstate_t state;
20310
20311 memset (&state, '\0', sizeof (mbstate_t));
20312 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
20313 if (!mbsinit (&state))
20314 {
20315 const char *src = input + 2;
20316 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
20317 result |= 8;
20318 }
20319 }
20320 return result;
20321}
20322_ACEOF
20323if ac_fn_c_try_run "$LINENO"; then :
20324 gl_cv_func_mbsrtowcs_works=yes
20325else
20326 gl_cv_func_mbsrtowcs_works=no
20327fi
20328rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20329 conftest.$ac_objext conftest.beam conftest.$ac_ext
20330fi
20331
20332 fi
20333
20334fi
20335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
20336$as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
20337
20338 case "$gl_cv_func_mbsrtowcs_works" in
20339 *yes) ;;
20340 *) REPLACE_MBSRTOWCS=1 ;;
8690e634
JK
20341 esac
20342 fi
20343 fi
c971b7fa 20344
6ec2e0f5 20345 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
c971b7fa
PA
20346
20347
20348
20349
20350
20351
20352
20353
6ec2e0f5
SDJ
20354 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
20355
20356
20357
20358
20359
20360
20361
20362
20363
20364 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
c971b7fa
PA
20365
20366
8690e634 20367 :
c971b7fa 20368
a512b375 20369 fi
c971b7fa 20370
c971b7fa 20371
c971b7fa 20372
c971b7fa
PA
20373
20374
6ec2e0f5 20375 GNULIB_MBSRTOWCS=1
c971b7fa 20376
c971b7fa
PA
20377
20378
20379
20380
6ec2e0f5 20381$as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
c971b7fa
PA
20382
20383
c971b7fa 20384
c971b7fa 20385
6ec2e0f5 20386 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
c971b7fa
PA
20387
20388
20389
c971b7fa 20390
c971b7fa
PA
20391
20392
20393
20394
6ec2e0f5 20395 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
8690e634 20396
c971b7fa 20397
6ec2e0f5
SDJ
20398 for ac_header in bp-sym.h
20399do :
20400 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
d0ac1c44 20401if test "x$ac_cv_header_bp_sym_h" = xyes; then :
6ec2e0f5
SDJ
20402 cat >>confdefs.h <<_ACEOF
20403#define HAVE_BP_SYM_H 1
20404_ACEOF
c971b7fa 20405
6ec2e0f5 20406fi
c971b7fa 20407
6ec2e0f5
SDJ
20408done
20409
20410
20411 fi
20412
20413
20414
20415
20416
20417 GNULIB_MEMCHR=1
20418
20419
20420
20421
20422
20423$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
20424
20425
20426
20427
20428
20429 if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
20430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
20431$as_echo_n "checking whether memmem works in linear time... " >&6; }
d0ac1c44 20432if ${gl_cv_func_memmem_works_fast+:} false; then :
8690e634
JK
20433 $as_echo_n "(cached) " >&6
20434else
6ec2e0f5
SDJ
20435 if test "$cross_compiling" = yes; then :
20436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20437/* end confdefs.h. */
20438
20439#include <features.h>
20440#ifdef __GNU_LIBRARY__
20441 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)) \
20442 && !defined __UCLIBC__
20443 Lucky user
20444 #endif
20445#endif
20446#ifdef __CYGWIN__
20447 #include <cygwin/version.h>
20448 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 0)
20449 Lucky user
20450 #endif
20451#endif
20452
20453_ACEOF
20454if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20455 $EGREP "Lucky user" >/dev/null 2>&1; then :
20456 gl_cv_func_memmem_works_fast="guessing yes"
20457else
20458 gl_cv_func_memmem_works_fast="guessing no"
20459fi
20460rm -f conftest*
20461
c971b7fa 20462
8690e634
JK
20463else
20464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 20465/* end confdefs.h. */
c971b7fa 20466
6ec2e0f5
SDJ
20467#include <signal.h> /* for signal */
20468#include <string.h> /* for memmem */
20469#include <stdlib.h> /* for malloc */
20470#include <unistd.h> /* for alarm */
20471static void quit (int sig) { _exit (sig + 128); }
20472
20473int
20474main ()
8690e634 20475{
8690e634 20476
6ec2e0f5
SDJ
20477 int result = 0;
20478 size_t m = 1000000;
20479 char *haystack = (char *) malloc (2 * m + 1);
20480 char *needle = (char *) malloc (m + 1);
20481 /* Failure to compile this test due to missing alarm is okay,
20482 since all such platforms (mingw) also lack memmem. */
20483 signal (SIGALRM, quit);
20484 alarm (5);
20485 /* Check for quadratic performance. */
20486 if (haystack && needle)
20487 {
20488 memset (haystack, 'A', 2 * m);
20489 haystack[2 * m] = 'B';
20490 memset (needle, 'A', m);
20491 needle[m] = 'B';
20492 if (!memmem (haystack, 2 * m + 1, needle, m + 1))
20493 result |= 1;
20494 }
20495 return result;
20496
20497 ;
c971b7fa
PA
20498 return 0;
20499}
20500_ACEOF
8690e634 20501if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 20502 gl_cv_func_memmem_works_fast=yes
8690e634 20503else
6ec2e0f5 20504 gl_cv_func_memmem_works_fast=no
8690e634
JK
20505fi
20506rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20507 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 20508fi
c971b7fa
PA
20509
20510
8690e634 20511fi
6ec2e0f5
SDJ
20512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_fast" >&5
20513$as_echo "$gl_cv_func_memmem_works_fast" >&6; }
20514 case "$gl_cv_func_memmem_works_fast" in
20515 *yes) ;;
20516 *)
20517 REPLACE_MEMMEM=1
20518 ;;
20519 esac
20520 fi
c971b7fa 20521
6ec2e0f5 20522 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
8690e634
JK
20523
20524
20525
6ec2e0f5
SDJ
20526
20527
20528
20529
20530
20531 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
20532
20533 fi
20534
20535
20536
20537
20538 for ac_func in memmem
20539do :
20540 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
d0ac1c44 20541if test "x$ac_cv_func_memmem" = xyes; then :
6ec2e0f5
SDJ
20542 cat >>confdefs.h <<_ACEOF
20543#define HAVE_MEMMEM 1
20544_ACEOF
20545
20546fi
20547done
20548
20549 if test $ac_cv_func_memmem = yes; then
20550 HAVE_MEMMEM=1
20551 else
20552 HAVE_MEMMEM=0
20553 fi
20554
472fa5ee
SM
20555 :
20556
20557
20558
20559
20560
6ec2e0f5
SDJ
20561 if test $ac_cv_have_decl_memmem = no; then
20562 HAVE_DECL_MEMMEM=0
20563 else
20564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
20565$as_echo_n "checking whether memmem works... " >&6; }
d0ac1c44 20566if ${gl_cv_func_memmem_works_always+:} false; then :
c971b7fa
PA
20567 $as_echo_n "(cached) " >&6
20568else
6ec2e0f5
SDJ
20569 if test "$cross_compiling" = yes; then :
20570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20571/* end confdefs.h. */
20572
20573#ifdef __GNU_LIBRARY__
20574 #include <features.h>
20575 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
20576 || __GLIBC_MINOR__ > 12)) \
20577 || (__GLIBC__ > 2)) \
20578 || defined __UCLIBC__
20579 Lucky user
20580 #endif
20581#elif defined __CYGWIN__
20582 #include <cygwin/version.h>
20583 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
20584 Lucky user
20585 #endif
20586#else
20587 Lucky user
20588#endif
20589
20590_ACEOF
20591if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20592 $EGREP "Lucky user" >/dev/null 2>&1; then :
20593 gl_cv_func_memmem_works_always="guessing yes"
20594else
20595 gl_cv_func_memmem_works_always="guessing no"
20596fi
20597rm -f conftest*
20598
8690e634 20599
8690e634 20600else
c971b7fa
PA
20601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20602/* end confdefs.h. */
c971b7fa 20603
6ec2e0f5
SDJ
20604#include <string.h> /* for memmem */
20605#define P "_EF_BF_BD"
20606#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
20607#define NEEDLE P P P P P
20608
20609int
20610main ()
c971b7fa 20611{
8690e634 20612
6ec2e0f5
SDJ
20613 int result = 0;
20614 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
20615 result |= 1;
20616 /* Check for empty needle behavior. */
20617 {
20618 const char *haystack = "AAA";
20619 if (memmem (haystack, 3, NULL, 0) != haystack)
20620 result |= 2;
8690e634 20621 }
6ec2e0f5
SDJ
20622 return result;
20623
20624 ;
c971b7fa
PA
20625 return 0;
20626}
20627_ACEOF
8690e634 20628if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 20629 gl_cv_func_memmem_works_always=yes
c971b7fa 20630else
6ec2e0f5 20631 gl_cv_func_memmem_works_always=no
c971b7fa 20632fi
8690e634
JK
20633rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20634 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 20635fi
8690e634 20636
8690e634
JK
20637
20638fi
6ec2e0f5
SDJ
20639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
20640$as_echo "$gl_cv_func_memmem_works_always" >&6; }
20641 case "$gl_cv_func_memmem_works_always" in
8690e634 20642 *yes) ;;
6ec2e0f5
SDJ
20643 *)
20644 REPLACE_MEMMEM=1
20645 ;;
8690e634 20646 esac
c971b7fa 20647 fi
6ec2e0f5 20648 :
c971b7fa 20649
6ec2e0f5 20650 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
c971b7fa 20651
c971b7fa 20652
8690e634 20653
c971b7fa 20654
6ec2e0f5
SDJ
20655
20656
20657
20658
20659 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
20660
20661 fi
20662
20663
20664
20665
20666
20667 GNULIB_MEMMEM=1
20668
20669
20670
20671
20672
20673$as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
20674
20675
20676
20677
20678
20679
20680
20681
20682
20683 for ac_func in mempcpy
20684do :
20685 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
d0ac1c44 20686if test "x$ac_cv_func_mempcpy" = xyes; then :
6ec2e0f5
SDJ
20687 cat >>confdefs.h <<_ACEOF
20688#define HAVE_MEMPCPY 1
8690e634 20689_ACEOF
c971b7fa 20690
6ec2e0f5
SDJ
20691fi
20692done
c971b7fa 20693
6ec2e0f5
SDJ
20694 if test $ac_cv_func_mempcpy = no; then
20695 HAVE_MEMPCPY=0
20696 fi
8690e634 20697
6ec2e0f5 20698 if test $HAVE_MEMPCPY = 0; then
8690e634
JK
20699
20700
20701
20702
8690e634 20703
6ec2e0f5
SDJ
20704
20705
20706
20707 gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
20708
20709
8690e634 20710 :
c971b7fa 20711
6ec2e0f5 20712 fi
c971b7fa 20713
8690e634 20714
8690e634 20715
8690e634 20716
6ec2e0f5
SDJ
20717
20718 GNULIB_MEMPCPY=1
20719
20720
20721
20722
20723
20724$as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
20725
20726
20727
20728
20729
20730
20731
20732
472fa5ee
SM
20733 :
20734
20735
20736
20737
20738
6ec2e0f5
SDJ
20739 if test $ac_cv_have_decl_memrchr = no; then
20740 HAVE_DECL_MEMRCHR=0
20741 fi
20742
20743 for ac_func in memrchr
20744do :
20745 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
d0ac1c44 20746if test "x$ac_cv_func_memrchr" = xyes; then :
6ec2e0f5
SDJ
20747 cat >>confdefs.h <<_ACEOF
20748#define HAVE_MEMRCHR 1
c971b7fa 20749_ACEOF
6ec2e0f5 20750
c971b7fa 20751fi
6ec2e0f5 20752done
8690e634 20753
8690e634 20754
6ec2e0f5 20755 if test $ac_cv_func_memrchr = no; then
8690e634 20756
6ec2e0f5
SDJ
20757
20758
20759
20760
20761
20762
20763
20764 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
20765
20766 :
c971b7fa
PA
20767 fi
20768
20769
c971b7fa 20770
c971b7fa 20771
c971b7fa 20772
6ec2e0f5
SDJ
20773 GNULIB_MEMRCHR=1
20774
20775
20776
20777
20778
20779$as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
20780
20781
20782
20783
2d8adcbd 20784
8a99096f
SM
20785 :
20786
20787
20788
20789
20790
20791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
20792$as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
20793if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then :
20794 $as_echo_n "(cached) " >&6
20795else
20796 rm -rf conftest.dir
20797 if test "$cross_compiling" = yes; then :
20798 case "$host_os" in
5e8754f9
SDJ
20799 # Guess yes on glibc systems.
20800 *-gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
20801 # If we don't know, assume the worst.
20802 *) gl_cv_func_mkdir_trailing_slash_works="guessing no" ;;
8a99096f
SM
20803 esac
20804
20805else
20806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20807/* end confdefs.h. */
20808
20809# include <sys/types.h>
20810# include <sys/stat.h>
20811
20812int
20813main ()
20814{
20815return mkdir ("conftest.dir/", 0700);
20816 ;
20817 return 0;
20818}
20819_ACEOF
20820if ac_fn_c_try_run "$LINENO"; then :
20821 gl_cv_func_mkdir_trailing_slash_works=yes
20822else
20823 gl_cv_func_mkdir_trailing_slash_works=no
20824fi
20825rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20826 conftest.$ac_objext conftest.beam conftest.$ac_ext
20827fi
20828
20829 rm -rf conftest.dir
20830
20831
20832fi
20833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
20834$as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
20835 case "$gl_cv_func_mkdir_trailing_slash_works" in
20836 *yes) ;;
20837 *)
20838 REPLACE_MKDIR=1
20839 ;;
20840 esac
20841
20842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
20843$as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
20844if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then :
20845 $as_echo_n "(cached) " >&6
20846else
20847 rm -rf conftest.dir
20848 if test "$cross_compiling" = yes; then :
20849 case "$host_os" in
5e8754f9
SDJ
20850 # Guess yes on glibc systems.
20851 *-gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
20852 # If we don't know, assume the worst.
20853 *) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
8a99096f
SM
20854 esac
20855
20856else
20857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20858/* end confdefs.h. */
20859
20860# include <sys/types.h>
20861# include <sys/stat.h>
20862
20863int
20864main ()
20865{
20866return !mkdir ("conftest.dir/./", 0700);
20867 ;
20868 return 0;
20869}
20870_ACEOF
20871if ac_fn_c_try_run "$LINENO"; then :
20872 gl_cv_func_mkdir_trailing_dot_works=yes
20873else
20874 gl_cv_func_mkdir_trailing_dot_works=no
20875fi
20876rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20877 conftest.$ac_objext conftest.beam conftest.$ac_ext
20878fi
20879
20880 rm -rf conftest.dir
20881
20882
20883fi
20884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
20885$as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
20886 case "$gl_cv_func_mkdir_trailing_dot_works" in
20887 *yes) ;;
20888 *)
20889 REPLACE_MKDIR=1
20890
20891$as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
20892
20893 ;;
20894 esac
20895
20896 if test $REPLACE_MKDIR = 1; then
20897
20898
20899
20900
20901
20902
20903
20904
20905 gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
20906
20907 fi
20908
20909
2d8adcbd
MM
20910
20911
472fa5ee
SM
20912 :
20913
20914
20915
20916
20917
2d8adcbd
MM
20918 if test $ac_cv_func_mkstemp = yes; then
20919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mkstemp" >&5
20920$as_echo_n "checking for working mkstemp... " >&6; }
d0ac1c44 20921if ${gl_cv_func_working_mkstemp+:} false; then :
2d8adcbd
MM
20922 $as_echo_n "(cached) " >&6
20923else
20924
20925 mkdir conftest.mkstemp
20926 if test "$cross_compiling" = yes; then :
20927 case "$host_os" in
5e8754f9
SDJ
20928 # Guess yes on glibc systems.
20929 *-gnu*) gl_cv_func_working_mkstemp="guessing yes" ;;
20930 # If we don't know, assume the worst.
20931 *) gl_cv_func_working_mkstemp="guessing no" ;;
2d8adcbd
MM
20932 esac
20933
20934else
20935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20936/* end confdefs.h. */
20937$ac_includes_default
20938int
20939main ()
20940{
20941int result = 0;
20942 int i;
20943 off_t large = (off_t) 4294967295u;
20944 if (large < 0)
20945 large = 2147483647;
20946 umask (0);
20947 for (i = 0; i < 70; i++)
20948 {
20949 char templ[] = "conftest.mkstemp/coXXXXXX";
20950 int (*mkstemp_function) (char *) = mkstemp;
20951 int fd = mkstemp_function (templ);
20952 if (fd < 0)
20953 result |= 1;
20954 else
20955 {
20956 struct stat st;
20957 if (lseek (fd, large, SEEK_SET) != large)
20958 result |= 2;
20959 if (fstat (fd, &st) < 0)
20960 result |= 4;
20961 else if (st.st_mode & 0077)
20962 result |= 8;
20963 if (close (fd))
20964 result |= 16;
20965 }
20966 }
20967 return result;
20968 ;
20969 return 0;
20970}
20971_ACEOF
20972if ac_fn_c_try_run "$LINENO"; then :
20973 gl_cv_func_working_mkstemp=yes
20974else
20975 gl_cv_func_working_mkstemp=no
20976fi
20977rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20978 conftest.$ac_objext conftest.beam conftest.$ac_ext
20979fi
20980
20981 rm -rf conftest.mkstemp
20982
20983fi
20984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mkstemp" >&5
20985$as_echo "$gl_cv_func_working_mkstemp" >&6; }
20986 case "$gl_cv_func_working_mkstemp" in
20987 *yes) ;;
20988 *)
20989 REPLACE_MKSTEMP=1
20990 ;;
20991 esac
20992 else
20993 HAVE_MKSTEMP=0
20994 fi
20995
20996 if test $HAVE_MKSTEMP = 0 || test $REPLACE_MKSTEMP = 1; then
20997
20998
20999
21000
21001
21002
21003
21004
21005 gl_LIBOBJS="$gl_LIBOBJS mkstemp.$ac_objext"
21006
21007
21008
21009 fi
21010
21011
21012
21013
21014
21015 GNULIB_MKSTEMP=1
21016
21017
21018
21019
21020
21021$as_echo "#define GNULIB_TEST_MKSTEMP 1" >>confdefs.h
21022
21023
21024
21025
6ec2e0f5
SDJ
21026 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
21027
21028
21029
c971b7fa 21030
c971b7fa 21031
c971b7fa
PA
21032
21033
8690e634 21034
6ec2e0f5 21035 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
8690e634 21036
6ec2e0f5 21037 fi
8690e634 21038
6ec2e0f5 21039 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
8690e634
JK
21040
21041
21042
21043
21044
21045
8690e634
JK
21046
21047
6ec2e0f5 21048 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
8690e634 21049
a512b375 21050 fi
8690e634
JK
21051
21052
21053
6ec2e0f5
SDJ
21054 case "$host_os" in
21055 mingw* | pw*)
21056 REPLACE_OPEN=1
21057 ;;
21058 *)
21059
472fa5ee
SM
21060 :
21061
21062
21063
21064
21065
6ec2e0f5
SDJ
21066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
21067$as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
d0ac1c44 21068if ${gl_cv_func_open_slash+:} false; then :
6ec2e0f5
SDJ
21069 $as_echo_n "(cached) " >&6
21070else
21071 # Assume that if we have lstat, we can also check symlinks.
21072 if test $ac_cv_func_lstat = yes; then
21073 touch conftest.tmp
21074 ln -s conftest.tmp conftest.lnk
21075 fi
21076 if test "$cross_compiling" = yes; then :
8690e634 21077
6ec2e0f5
SDJ
21078 case "$host_os" in
21079 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
21080 gl_cv_func_open_slash="guessing no" ;;
21081 *)
21082 gl_cv_func_open_slash="guessing yes" ;;
21083 esac
8690e634 21084
6ec2e0f5
SDJ
21085else
21086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21087/* end confdefs.h. */
21088
21089#include <fcntl.h>
21090#if HAVE_UNISTD_H
21091# include <unistd.h>
21092#endif
21093int main ()
21094{
21095 int result = 0;
21096#if HAVE_LSTAT
21097 if (open ("conftest.lnk/", O_RDONLY) != -1)
21098 result |= 1;
21099#endif
21100 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
21101 result |= 2;
21102 return result;
21103}
21104_ACEOF
21105if ac_fn_c_try_run "$LINENO"; then :
21106 gl_cv_func_open_slash=yes
21107else
21108 gl_cv_func_open_slash=no
21109fi
21110rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21111 conftest.$ac_objext conftest.beam conftest.$ac_ext
21112fi
8690e634 21113
6ec2e0f5 21114 rm -f conftest.sl conftest.tmp conftest.lnk
8690e634 21115
6ec2e0f5
SDJ
21116fi
21117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
21118$as_echo "$gl_cv_func_open_slash" >&6; }
21119 case "$gl_cv_func_open_slash" in
21120 *no)
8690e634 21121
6ec2e0f5 21122$as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
8690e634 21123
6ec2e0f5
SDJ
21124 REPLACE_OPEN=1
21125 ;;
21126 esac
21127 ;;
21128 esac
8690e634 21129
6ec2e0f5 21130 if test $REPLACE_OPEN = 0; then
c971b7fa
PA
21131
21132
21133
472fa5ee
SM
21134 :
21135
21136
21137
21138
21139
6ec2e0f5
SDJ
21140 if test $ac_cv_func_fchdir = no; then
21141 HAVE_FCHDIR=0
21142 fi
c971b7fa 21143
6ec2e0f5
SDJ
21144 if test $HAVE_FCHDIR = 0; then
21145 REPLACE_OPEN=1
21146 fi
21147 fi
c971b7fa
PA
21148
21149
21150
6ec2e0f5 21151 if test $REPLACE_OPEN = 1; then
c971b7fa
PA
21152
21153
21154
21155
21156
c971b7fa
PA
21157
21158
c971b7fa 21159
6ec2e0f5 21160 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
c971b7fa 21161
c971b7fa
PA
21162
21163
6ec2e0f5
SDJ
21164 :
21165
a512b375 21166 fi
c971b7fa
PA
21167
21168
21169
21170
21171
6ec2e0f5 21172 GNULIB_OPEN=1
c971b7fa
PA
21173
21174
21175
21176
21177
6ec2e0f5 21178$as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
c971b7fa
PA
21179
21180
21181
21182
21183
c971b7fa 21184
c971b7fa 21185
472fa5ee
SM
21186 :
21187
21188
21189
21190
21191
63ce7108 21192
5e8754f9
SDJ
21193 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
21194 yes+*yes)
6ec2e0f5
SDJ
21195 ;;
21196 yes+*)
21197 # Solaris 9 has *at functions, but uniformly mishandles trailing
21198 # slash in all of them.
21199 REPLACE_OPENAT=1
21200 ;;
21201 *)
21202 HAVE_OPENAT=0
21203 ;;
21204 esac
63ce7108 21205
6ec2e0f5 21206 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
63ce7108 21207
63ce7108 21208
63ce7108 21209
63ce7108 21210
63ce7108
TT
21211
21212
63ce7108 21213
63ce7108 21214
6ec2e0f5 21215 gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
63ce7108
TT
21216
21217
21218
6ec2e0f5 21219 :
63ce7108 21220
6ec2e0f5 21221 fi
63ce7108
TT
21222
21223
6ec2e0f5
SDJ
21224cat >>confdefs.h <<_ACEOF
21225#define GNULIB_OPENAT 1
21226_ACEOF
63ce7108 21227
63ce7108 21228
63ce7108
TT
21229
21230
21231
21232
6ec2e0f5 21233 GNULIB_OPENAT=1
63ce7108 21234
63ce7108 21235
63ce7108 21236
63ce7108 21237
63ce7108 21238
6ec2e0f5 21239$as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
63ce7108
TT
21240
21241
63ce7108 21242
63ce7108 21243
63ce7108 21244
63ce7108 21245
6ec2e0f5
SDJ
21246 for ac_func in opendir
21247do :
21248 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
d0ac1c44 21249if test "x$ac_cv_func_opendir" = xyes; then :
6ec2e0f5
SDJ
21250 cat >>confdefs.h <<_ACEOF
21251#define HAVE_OPENDIR 1
63ce7108 21252_ACEOF
6ec2e0f5 21253
63ce7108 21254fi
6ec2e0f5 21255done
63ce7108 21256
6ec2e0f5
SDJ
21257 if test $ac_cv_func_opendir = no; then
21258 HAVE_OPENDIR=0
21259 fi
63ce7108 21260
6ec2e0f5
SDJ
21261
21262
21263
472fa5ee
SM
21264 :
21265
21266
21267
21268
21269
6ec2e0f5
SDJ
21270 if test $ac_cv_func_fchdir = no; then
21271 HAVE_FCHDIR=0
63ce7108 21272 fi
63ce7108 21273
6ec2e0f5
SDJ
21274 if test $HAVE_FCHDIR = 0; then
21275 if test $HAVE_OPENDIR = 1; then
21276 REPLACE_OPENDIR=1
21277 fi
21278 fi
21279
21280 case $host_os,$HAVE_OPENDIR in
21281 os2*,1)
21282 REPLACE_OPENDIR=1;;
21283 esac
21284
21285 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
63ce7108
TT
21286
21287
21288
21289
21290
21291
21292
21293
6ec2e0f5 21294 gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
63ce7108
TT
21295
21296 fi
21297
21298
21299
21300
21301
6ec2e0f5 21302 GNULIB_OPENDIR=1
63ce7108
TT
21303
21304
21305
21306
63ce7108 21307
6ec2e0f5 21308$as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
63ce7108
TT
21309
21310
21311
21312
21313
472fa5ee
SM
21314 :
21315
21316
21317
21318
21319
63ce7108
TT
21320
21321
2196f55f
YQ
21322
21323
8424cc97
SM
21324
21325 for ac_func in rawmemchr
21326do :
21327 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
d0ac1c44 21328if test "x$ac_cv_func_rawmemchr" = xyes; then :
8424cc97
SM
21329 cat >>confdefs.h <<_ACEOF
21330#define HAVE_RAWMEMCHR 1
21331_ACEOF
21332
21333fi
21334done
21335
21336 if test $ac_cv_func_rawmemchr = no; then
21337 HAVE_RAWMEMCHR=0
21338 fi
21339
21340 if test $HAVE_RAWMEMCHR = 0; then
21341
21342
21343
21344
21345
21346
21347
21348
21349 gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
21350
21351 :
21352 fi
21353
21354
21355
21356
21357
21358 GNULIB_RAWMEMCHR=1
21359
21360
21361
21362
21363
21364$as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
21365
21366
21367
21368
21369
21370
6ec2e0f5
SDJ
21371 for ac_func in readdir
21372do :
21373 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
d0ac1c44 21374if test "x$ac_cv_func_readdir" = xyes; then :
6ec2e0f5
SDJ
21375 cat >>confdefs.h <<_ACEOF
21376#define HAVE_READDIR 1
21377_ACEOF
21378
21379fi
21380done
21381
21382 if test $ac_cv_func_readdir = no; then
21383 HAVE_READDIR=0
21384 fi
21385
21386 if test $HAVE_READDIR = 0; then
21387
21388
21389
21390
21391
21392
21393
21394
21395 gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
21396
21397 fi
21398
21399
21400
21401
21402
21403 GNULIB_READDIR=1
21404
21405
21406
21407
21408
21409$as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
21410
21411
21412
21413
21414
21415
472fa5ee
SM
21416 :
21417
21418
21419
21420
21421
2196f55f
YQ
21422 if test $ac_cv_func_readlink = no; then
21423 HAVE_READLINK=0
21424 else
21425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
21426$as_echo_n "checking whether readlink signature is correct... " >&6; }
d0ac1c44 21427if ${gl_cv_decl_readlink_works+:} false; then :
2196f55f
YQ
21428 $as_echo_n "(cached) " >&6
21429else
21430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21431/* end confdefs.h. */
21432#include <unistd.h>
21433 /* Cause compilation failure if original declaration has wrong type. */
21434 ssize_t readlink (const char *, char *, size_t);
21435int
21436main ()
21437{
21438
21439 ;
21440 return 0;
21441}
21442_ACEOF
21443if ac_fn_c_try_compile "$LINENO"; then :
21444 gl_cv_decl_readlink_works=yes
21445else
21446 gl_cv_decl_readlink_works=no
21447fi
21448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21449fi
21450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
21451$as_echo "$gl_cv_decl_readlink_works" >&6; }
21452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
21453$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
d0ac1c44 21454if ${gl_cv_func_readlink_works+:} false; then :
2196f55f
YQ
21455 $as_echo_n "(cached) " >&6
21456else
21457 # We have readlink, so assume ln -s works.
21458 ln -s conftest.no-such conftest.link
21459 ln -s conftest.link conftest.lnk2
21460 if test "$cross_compiling" = yes; then :
21461 case "$host_os" in
5e8754f9
SDJ
21462 # Guess yes on glibc systems.
21463 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
21464 # If we don't know, assume the worst.
21465 *) gl_cv_func_readlink_works="guessing no" ;;
2196f55f
YQ
21466 esac
21467
21468else
21469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21470/* end confdefs.h. */
21471#include <unistd.h>
21472
21473int
21474main ()
21475{
21476char buf[20];
21477 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
21478 ;
21479 return 0;
21480}
21481_ACEOF
21482if ac_fn_c_try_run "$LINENO"; then :
21483 gl_cv_func_readlink_works=yes
21484else
21485 gl_cv_func_readlink_works=no
21486fi
21487rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21488 conftest.$ac_objext conftest.beam conftest.$ac_ext
21489fi
21490
21491 rm -f conftest.link conftest.lnk2
21492fi
21493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
21494$as_echo "$gl_cv_func_readlink_works" >&6; }
21495 case "$gl_cv_func_readlink_works" in
21496 *yes)
21497 if test "$gl_cv_decl_readlink_works" != yes; then
21498 REPLACE_READLINK=1
21499 fi
21500 ;;
21501 *)
21502
21503$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
21504
21505 REPLACE_READLINK=1
21506 ;;
21507 esac
21508 fi
21509
21510 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
21511
21512
21513
21514
21515
21516
21517
21518
21519 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
21520
21521
21522 :
21523
21524 fi
21525
21526
21527
21528
21529
21530 GNULIB_READLINK=1
21531
21532
21533
21534
21535
21536$as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
21537
21538
21539
21540
6a29c58e
YQ
21541
21542
6ec2e0f5
SDJ
21543 if test $gl_cv_func_malloc_posix = yes; then
21544
21545$as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
21546
21547 else
21548 REPLACE_REALLOC=1
21549 fi
21550
21551 if test $REPLACE_REALLOC = 1; then
21552
21553
21554
21555
21556
21557
21558
21559
21560 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
21561
21562 fi
21563
21564
21565
21566
21567
21568 GNULIB_REALLOC_POSIX=1
21569
21570
21571
21572
21573
21574$as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
21575
21576
21577
21578
21579
21580
6a29c58e 21581
472fa5ee
SM
21582 :
21583
21584
21585
21586
21587
6a29c58e
YQ
21588
21589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
21590$as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
d0ac1c44 21591if ${gl_cv_func_rename_slash_dst_works+:} false; then :
6a29c58e
YQ
21592 $as_echo_n "(cached) " >&6
21593else
21594 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
21595 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
d0ac1c44 21596 as_fn_error $? "cannot create temporary files" "$LINENO" 5
6a29c58e
YQ
21597 # Assume that if we have lstat, we can also check symlinks.
21598 if test $ac_cv_func_lstat = yes; then
21599 ln -s conftest.f conftest.lnk
21600 fi
21601 if test "$cross_compiling" = yes; then :
21602 case "$host_os" in
5e8754f9
SDJ
21603 # Guess yes on glibc systems.
21604 *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
21605 # If we don't know, assume the worst.
21606 *) gl_cv_func_rename_slash_dst_works="guessing no" ;;
6a29c58e
YQ
21607 esac
21608
21609else
21610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21611/* end confdefs.h. */
21612
21613# include <stdio.h>
21614# include <stdlib.h>
21615
21616int
21617main ()
21618{
21619int result = 0;
21620 if (rename ("conftest.f1", "conftest.f2/") == 0)
21621 result |= 1;
21622 if (rename ("conftest.d1", "conftest.d2/") != 0)
21623 result |= 2;
21624#if HAVE_LSTAT
21625 if (rename ("conftest.f", "conftest.lnk/") == 0)
21626 result |= 4;
21627#endif
21628 return result;
21629
21630 ;
21631 return 0;
21632}
21633_ACEOF
21634if ac_fn_c_try_run "$LINENO"; then :
21635 gl_cv_func_rename_slash_dst_works=yes
21636else
21637 gl_cv_func_rename_slash_dst_works=no
21638fi
21639rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21640 conftest.$ac_objext conftest.beam conftest.$ac_ext
21641fi
21642
21643 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
21644
21645fi
21646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
21647$as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
21648 case "$gl_cv_func_rename_slash_dst_works" in
21649 *yes) ;;
21650 *)
21651 REPLACE_RENAME=1
21652
21653$as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
21654
21655 ;;
21656 esac
21657
21658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
21659$as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
d0ac1c44 21660if ${gl_cv_func_rename_slash_src_works+:} false; then :
6a29c58e
YQ
21661 $as_echo_n "(cached) " >&6
21662else
21663 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
21664 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
d0ac1c44 21665 as_fn_error $? "cannot create temporary files" "$LINENO" 5
6a29c58e
YQ
21666 # Assume that if we have lstat, we can also check symlinks.
21667 if test $ac_cv_func_lstat = yes; then
21668 ln -s conftest.f conftest.lnk
21669 fi
21670 if test "$cross_compiling" = yes; then :
21671 case "$host_os" in
5e8754f9
SDJ
21672 # Guess yes on glibc systems.
21673 *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
21674 # If we don't know, assume the worst.
21675 *) gl_cv_func_rename_slash_src_works="guessing no" ;;
6a29c58e
YQ
21676 esac
21677
21678else
21679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21680/* end confdefs.h. */
21681
21682# include <stdio.h>
21683# include <stdlib.h>
21684
21685int
21686main ()
21687{
21688int result = 0;
21689 if (rename ("conftest.f1/", "conftest.d3") == 0)
21690 result |= 1;
21691 if (rename ("conftest.d1/", "conftest.d2") != 0)
21692 result |= 2;
21693#if HAVE_LSTAT
21694 if (rename ("conftest.lnk/", "conftest.f") == 0)
21695 result |= 4;
21696#endif
21697 return result;
21698
21699 ;
21700 return 0;
21701}
21702_ACEOF
21703if ac_fn_c_try_run "$LINENO"; then :
21704 gl_cv_func_rename_slash_src_works=yes
21705else
21706 gl_cv_func_rename_slash_src_works=no
21707fi
21708rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21709 conftest.$ac_objext conftest.beam conftest.$ac_ext
21710fi
21711
21712 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
21713
21714fi
21715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
21716$as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
21717 case "$gl_cv_func_rename_slash_src_works" in
21718 *yes) ;;
21719 *)
21720 REPLACE_RENAME=1
21721
21722$as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
21723
21724 ;;
21725 esac
21726
21727
472fa5ee
SM
21728 :
21729
21730
21731
21732
21733
6a29c58e
YQ
21734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
21735$as_echo_n "checking whether rename manages hard links correctly... " >&6; }
d0ac1c44 21736if ${gl_cv_func_rename_link_works+:} false; then :
6a29c58e
YQ
21737 $as_echo_n "(cached) " >&6
21738else
21739 if test $ac_cv_func_link = yes; then
5e8754f9
SDJ
21740 rm -rf conftest.f conftest.f1
21741 if touch conftest.f && ln conftest.f conftest.f1 &&
6a29c58e
YQ
21742 set x `ls -i conftest.f conftest.f1` && test "" = ""; then
21743 if test "$cross_compiling" = yes; then :
21744 case "$host_os" in
5e8754f9
SDJ
21745 # Guess yes on glibc systems.
21746 *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
21747 # If we don't know, assume the worst.
21748 *) gl_cv_func_rename_link_works="guessing no" ;;
6a29c58e
YQ
21749 esac
21750
21751else
21752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21753/* end confdefs.h. */
21754
21755# include <stdio.h>
21756# include <stdlib.h>
21757# include <unistd.h>
21758
21759int
21760main ()
21761{
21762int result = 0;
21763 if (rename ("conftest.f", "conftest.f1"))
21764 result |= 1;
21765 if (unlink ("conftest.f1"))
21766 result |= 2;
5e8754f9 21767 if (rename ("conftest.f", "conftest.f"))
6a29c58e
YQ
21768 result |= 4;
21769 if (rename ("conftest.f1", "conftest.f1") == 0)
21770 result |= 8;
21771 return result;
21772
21773 ;
21774 return 0;
21775}
21776_ACEOF
21777if ac_fn_c_try_run "$LINENO"; then :
21778 gl_cv_func_rename_link_works=yes
21779else
21780 gl_cv_func_rename_link_works=no
21781fi
21782rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21783 conftest.$ac_objext conftest.beam conftest.$ac_ext
21784fi
21785
21786 else
21787 gl_cv_func_rename_link_works="guessing no"
21788 fi
5e8754f9 21789 rm -rf conftest.f conftest.f1
6a29c58e
YQ
21790 else
21791 gl_cv_func_rename_link_works=yes
21792 fi
21793
21794fi
21795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
21796$as_echo "$gl_cv_func_rename_link_works" >&6; }
21797 case "$gl_cv_func_rename_link_works" in
21798 *yes) ;;
21799 *)
21800 REPLACE_RENAME=1
21801
21802$as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
21803
21804 ;;
21805 esac
21806
21807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
21808$as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
d0ac1c44 21809if ${gl_cv_func_rename_dest_works+:} false; then :
6a29c58e
YQ
21810 $as_echo_n "(cached) " >&6
21811else
21812 rm -rf conftest.f conftest.d1 conftest.d2
21813 touch conftest.f && mkdir conftest.d1 conftest.d2 ||
d0ac1c44 21814 as_fn_error $? "cannot create temporary files" "$LINENO" 5
6a29c58e
YQ
21815 if test "$cross_compiling" = yes; then :
21816 case "$host_os" in
5e8754f9
SDJ
21817 # Guess yes on glibc systems.
21818 *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
21819 # If we don't know, assume the worst.
21820 *) gl_cv_func_rename_dest_works="guessing no" ;;
6a29c58e
YQ
21821 esac
21822
21823else
21824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21825/* end confdefs.h. */
21826
21827# include <stdio.h>
21828# include <stdlib.h>
21829
21830int
21831main ()
21832{
21833int result = 0;
21834 if (rename ("conftest.d1", "conftest.d2") != 0)
21835 result |= 1;
21836 if (rename ("conftest.d2", "conftest.f") == 0)
21837 result |= 2;
21838 return result;
21839
21840 ;
21841 return 0;
21842}
21843_ACEOF
21844if ac_fn_c_try_run "$LINENO"; then :
21845 gl_cv_func_rename_dest_works=yes
21846else
21847 gl_cv_func_rename_dest_works=no
21848fi
21849rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21850 conftest.$ac_objext conftest.beam conftest.$ac_ext
21851fi
21852
21853 rm -rf conftest.f conftest.d1 conftest.d2
21854
21855fi
21856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
21857$as_echo "$gl_cv_func_rename_dest_works" >&6; }
21858 case "$gl_cv_func_rename_dest_works" in
21859 *yes) ;;
21860 *)
21861 REPLACE_RENAME=1
21862
21863$as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
21864
21865 ;;
21866 esac
21867
21868 if test $REPLACE_RENAME = 1; then
21869
21870
21871
21872
21873
21874
21875
21876
21877 gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
21878
21879 fi
21880
21881
21882
21883
21884
21885 GNULIB_RENAME=1
21886
21887
21888
21889
21890
21891$as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
21892
21893
21894
21895
21896
21897
6ec2e0f5
SDJ
21898 for ac_func in rewinddir
21899do :
21900 ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
d0ac1c44 21901if test "x$ac_cv_func_rewinddir" = xyes; then :
6ec2e0f5
SDJ
21902 cat >>confdefs.h <<_ACEOF
21903#define HAVE_REWINDDIR 1
21904_ACEOF
21905
21906fi
21907done
21908
21909 if test $ac_cv_func_rewinddir = no; then
21910 HAVE_REWINDDIR=0
21911 fi
21912
21913 if test $HAVE_REWINDDIR = 0; then
21914
21915
21916
21917
21918
21919
21920
21921
21922 gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
21923
21924 fi
21925
21926
21927
21928
21929
21930 GNULIB_REWINDDIR=1
21931
21932
21933
21934
21935
21936$as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
21937
21938
21939
21940
21941
21942
472fa5ee
SM
21943 :
21944
21945
21946
21947
21948
6a29c58e
YQ
21949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
21950$as_echo_n "checking whether rmdir works... " >&6; }
d0ac1c44 21951if ${gl_cv_func_rmdir_works+:} false; then :
6a29c58e
YQ
21952 $as_echo_n "(cached) " >&6
21953else
21954 mkdir conftest.dir
21955 touch conftest.file
21956 if test "$cross_compiling" = yes; then :
21957 case "$host_os" in
5e8754f9
SDJ
21958 # Guess yes on glibc systems.
21959 *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
21960 # If we don't know, assume the worst.
21961 *) gl_cv_func_rmdir_works="guessing no" ;;
6a29c58e
YQ
21962 esac
21963
21964else
21965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21966/* end confdefs.h. */
21967#include <stdio.h>
21968 #include <errno.h>
21969 #if HAVE_UNISTD_H
21970 # include <unistd.h>
21971 #else /* on Windows with MSVC */
21972 # include <direct.h>
21973 #endif
21974
21975int
21976main ()
21977{
21978int result = 0;
21979 if (!rmdir ("conftest.file/"))
21980 result |= 1;
21981 else if (errno != ENOTDIR)
21982 result |= 2;
21983 if (!rmdir ("conftest.dir/./"))
21984 result |= 4;
21985 return result;
21986
21987 ;
21988 return 0;
21989}
21990_ACEOF
21991if ac_fn_c_try_run "$LINENO"; then :
21992 gl_cv_func_rmdir_works=yes
21993else
21994 gl_cv_func_rmdir_works=no
21995fi
21996rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21997 conftest.$ac_objext conftest.beam conftest.$ac_ext
21998fi
21999
22000 rm -rf conftest.dir conftest.file
22001fi
22002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
22003$as_echo "$gl_cv_func_rmdir_works" >&6; }
22004 case "$gl_cv_func_rmdir_works" in
22005 *yes) ;;
22006 *)
22007 REPLACE_RMDIR=1
22008 ;;
22009 esac
22010
22011 if test $REPLACE_RMDIR = 1; then
22012
22013
22014
22015
22016
22017
22018
22019
22020 gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
22021
22022 fi
22023
22024
22025
22026
22027
22028 GNULIB_RMDIR=1
22029
22030
22031
22032
22033
22034$as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
22035
22036
22037
22038
0750520d 22039
472fa5ee
SM
22040 :
22041
22042
22043
22044
22045
22046
22047
22048
5e8754f9
SDJ
22049
22050
22051
22052 :
22053
22054
22055
22056
22057
22058 if test $ac_cv_func_secure_getenv = no; then
22059 HAVE_SECURE_GETENV=0
22060 fi
22061
22062 if test $HAVE_SECURE_GETENV = 0; then
22063
22064
22065
22066
22067
22068
22069
22070
22071 gl_LIBOBJS="$gl_LIBOBJS secure_getenv.$ac_objext"
22072
22073
22074 for ac_func in __secure_getenv
22075do :
22076 ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
22077if test "x$ac_cv_func___secure_getenv" = xyes; then :
22078 cat >>confdefs.h <<_ACEOF
22079#define HAVE___SECURE_GETENV 1
22080_ACEOF
22081
22082fi
22083done
22084
22085 if test $ac_cv_func___secure_getenv = no; then
22086 for ac_func in issetugid
22087do :
22088 ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
22089if test "x$ac_cv_func_issetugid" = xyes; then :
22090 cat >>confdefs.h <<_ACEOF
22091#define HAVE_ISSETUGID 1
22092_ACEOF
22093
22094fi
22095done
22096
22097 fi
22098
22099 :
22100
22101
22102
22103
22104
22105
22106
22107
22108
22109
22110
22111
22112
22113
22114
22115 fi
22116
22117
22118
22119
22120
22121 GNULIB_SECURE_GETENV=1
22122
22123
22124
22125
22126
22127$as_echo "#define GNULIB_TEST_SECURE_GETENV 1" >>confdefs.h
22128
22129
22130
22131
22132
3d99e817
AK
22133 if test $ac_cv_func_setenv = no; then
22134 HAVE_SETENV=0
22135 else
22136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
22137$as_echo_n "checking whether setenv validates arguments... " >&6; }
d0ac1c44 22138if ${gl_cv_func_setenv_works+:} false; then :
3d99e817
AK
22139 $as_echo_n "(cached) " >&6
22140else
22141 if test "$cross_compiling" = yes; then :
22142 case "$host_os" in
5e8754f9
SDJ
22143 # Guess yes on glibc systems.
22144 *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
22145 # If we don't know, assume the worst.
22146 *) gl_cv_func_setenv_works="guessing no" ;;
3d99e817
AK
22147 esac
22148
22149else
22150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22151/* end confdefs.h. */
22152
22153 #include <stdlib.h>
22154 #include <errno.h>
22155 #include <string.h>
22156
22157int
22158main ()
22159{
22160
22161 int result = 0;
22162 {
22163 if (setenv ("", "", 0) != -1)
22164 result |= 1;
22165 else if (errno != EINVAL)
22166 result |= 2;
22167 }
22168 {
22169 if (setenv ("a", "=", 1) != 0)
22170 result |= 4;
22171 else if (strcmp (getenv ("a"), "=") != 0)
22172 result |= 8;
22173 }
22174 return result;
22175
22176 ;
22177 return 0;
22178}
22179_ACEOF
22180if ac_fn_c_try_run "$LINENO"; then :
22181 gl_cv_func_setenv_works=yes
22182else
22183 gl_cv_func_setenv_works=no
22184fi
22185rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22186 conftest.$ac_objext conftest.beam conftest.$ac_ext
22187fi
22188
22189fi
22190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
22191$as_echo "$gl_cv_func_setenv_works" >&6; }
22192 case "$gl_cv_func_setenv_works" in
22193 *yes) ;;
22194 *)
22195 REPLACE_SETENV=1
22196 ;;
22197 esac
22198 fi
22199
22200 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
22201
22202
22203
22204
22205
22206
22207
22208
22209 gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
22210
22211 fi
22212
22213
22214
22215
22216
22217 GNULIB_SETENV=1
22218
22219
22220
22221
22222
22223$as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
22224
22225
22226
22227
22228
0750520d
PA
22229
22230
22231
22232
22233
22234
22235
22236
22237
22238 if test $gl_cv_have_include_next = yes; then
22239 gl_cv_next_signal_h='<'signal.h'>'
22240 else
22241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
22242$as_echo_n "checking absolute name of <signal.h>... " >&6; }
d0ac1c44 22243if ${gl_cv_next_signal_h+:} false; then :
0750520d
PA
22244 $as_echo_n "(cached) " >&6
22245else
22246
22247
22248
22249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22250/* end confdefs.h. */
22251#include <signal.h>
22252_ACEOF
22253 case "$host_os" in
22254 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22255 *) gl_absname_cpp="$ac_cpp" ;;
22256 esac
22257
22258 case "$host_os" in
22259 mingw*)
22260 gl_dirsep_regex='[/\\]'
22261 ;;
22262 *)
22263 gl_dirsep_regex='\/'
22264 ;;
22265 esac
22266 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22267 gl_header_literal_regex=`echo 'signal.h' \
22268 | sed -e "$gl_make_literal_regex_sed"`
22269 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22270 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22271 s|^/[^/]|//&|
22272 p
22273 q
22274 }'
22275
22276 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22277 sed -n "$gl_absolute_header_sed"`
22278
22279 gl_header=$gl_cv_absolute_signal_h
22280 gl_cv_next_signal_h='"'$gl_header'"'
22281
22282
22283fi
22284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
22285$as_echo "$gl_cv_next_signal_h" >&6; }
22286 fi
22287 NEXT_SIGNAL_H=$gl_cv_next_signal_h
22288
22289 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22290 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22291 gl_next_as_first_directive='<'signal.h'>'
22292 else
22293 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22294 gl_next_as_first_directive=$gl_cv_next_signal_h
22295 fi
22296 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
22297
22298
22299
22300
22301
22302# AIX declares sig_atomic_t to already include volatile, and C89 compilers
22303# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
22304 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
22305#include <signal.h>
22306
22307"
d0ac1c44 22308if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
0750520d
PA
22309
22310else
22311 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
22312fi
22313
22314
22315
22316
22317
22318
22319
22320 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
22321#include <signal.h>
22322
22323"
d0ac1c44 22324if test "x$ac_cv_type_sighandler_t" = xyes; then :
0750520d
PA
22325
22326else
22327 HAVE_SIGHANDLER_T=0
22328fi
22329
22330
22331
5e8754f9
SDJ
22332 for gl_func in pthread_sigmask sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask; do
22333 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22335$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
22336if eval \${$as_gl_Symbol+:} false; then :
22337 $as_echo_n "(cached) " >&6
22338else
22339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22340/* end confdefs.h. */
22341#include <signal.h>
22342
22343int
22344main ()
22345{
22346#undef $gl_func
22347 (void) $gl_func;
22348 ;
22349 return 0;
22350}
22351_ACEOF
22352if ac_fn_c_try_compile "$LINENO"; then :
22353 eval "$as_gl_Symbol=yes"
22354else
22355 eval "$as_gl_Symbol=no"
22356fi
22357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22358fi
22359eval ac_res=\$$as_gl_Symbol
22360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22361$as_echo "$ac_res" >&6; }
22362 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
22363 cat >>confdefs.h <<_ACEOF
22364#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22365_ACEOF
0750520d 22366
5e8754f9
SDJ
22367 eval ac_cv_have_decl_$gl_func=yes
22368fi
22369 done
0750520d
PA
22370
22371
22372
63ce7108
TT
22373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
22374$as_echo_n "checking for ssize_t... " >&6; }
d0ac1c44 22375if ${gt_cv_ssize_t+:} false; then :
63ce7108
TT
22376 $as_echo_n "(cached) " >&6
22377else
22378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22379/* end confdefs.h. */
22380#include <sys/types.h>
22381int
22382main ()
22383{
22384int x = sizeof (ssize_t *) + sizeof (ssize_t);
22385 return !x;
22386 ;
22387 return 0;
22388}
22389_ACEOF
22390if ac_fn_c_try_compile "$LINENO"; then :
22391 gt_cv_ssize_t=yes
22392else
22393 gt_cv_ssize_t=no
22394fi
22395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22396fi
22397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
22398$as_echo "$gt_cv_ssize_t" >&6; }
22399 if test $gt_cv_ssize_t = no; then
22400
22401$as_echo "#define ssize_t int" >>confdefs.h
22402
22403 fi
22404
22405
22406
22407
472fa5ee
SM
22408 :
22409
22410
22411
22412
22413
5e8754f9
SDJ
22414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
22415$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
22416if ${gl_cv_func_stat_dir_slash+:} false; then :
2196f55f
YQ
22417 $as_echo_n "(cached) " >&6
22418else
5e8754f9
SDJ
22419 if test "$cross_compiling" = yes; then :
22420 case $host_os in
22421 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
22422 *) gl_cv_func_stat_dir_slash="guessing yes";;
22423 esac
2196f55f
YQ
22424else
22425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22426/* end confdefs.h. */
22427#include <sys/stat.h>
22428
22429int
22430main ()
22431{
5e8754f9 22432struct stat st; return stat (".", &st) != stat ("./", &st);
2196f55f
YQ
22433 ;
22434 return 0;
22435}
22436_ACEOF
22437if ac_fn_c_try_run "$LINENO"; then :
5e8754f9 22438 gl_cv_func_stat_dir_slash=yes
2196f55f 22439else
5e8754f9 22440 gl_cv_func_stat_dir_slash=no
2196f55f
YQ
22441fi
22442rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22443 conftest.$ac_objext conftest.beam conftest.$ac_ext
22444fi
22445
22446fi
5e8754f9
SDJ
22447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
22448$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
22449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
22450$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
22451if ${gl_cv_func_stat_file_slash+:} false; then :
7a6dbc2f 22452 $as_echo_n "(cached) " >&6
2196f55f 22453else
5e8754f9
SDJ
22454 touch conftest.tmp
22455 # Assume that if we have lstat, we can also check symlinks.
22456 if test $ac_cv_func_lstat = yes; then
22457 ln -s conftest.tmp conftest.lnk
22458 fi
22459 if test "$cross_compiling" = yes; then :
22460 case "$host_os" in
22461 # Guess yes on glibc systems.
22462 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
22463 # If we don't know, assume the worst.
22464 *) gl_cv_func_stat_file_slash="guessing no" ;;
22465 esac
7a6dbc2f 22466
2196f55f 22467else
5e8754f9
SDJ
22468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22469/* end confdefs.h. */
22470#include <sys/stat.h>
7a6dbc2f 22471
5e8754f9
SDJ
22472int
22473main ()
22474{
22475int result = 0;
22476 struct stat st;
22477 if (!stat ("conftest.tmp/", &st))
22478 result |= 1;
22479#if HAVE_LSTAT
22480 if (!stat ("conftest.lnk/", &st))
22481 result |= 2;
22482#endif
22483 return result;
7a6dbc2f 22484
5e8754f9
SDJ
22485 ;
22486 return 0;
22487}
22488_ACEOF
22489if ac_fn_c_try_run "$LINENO"; then :
22490 gl_cv_func_stat_file_slash=yes
22491else
22492 gl_cv_func_stat_file_slash=no
2196f55f 22493fi
5e8754f9
SDJ
22494rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22495 conftest.$ac_objext conftest.beam conftest.$ac_ext
2196f55f 22496fi
2196f55f 22497
5e8754f9 22498 rm -f conftest.tmp conftest.lnk
7a6dbc2f 22499fi
5e8754f9
SDJ
22500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
22501$as_echo "$gl_cv_func_stat_file_slash" >&6; }
22502 case $gl_cv_func_stat_dir_slash in
22503 *no) REPLACE_STAT=1
2196f55f 22504
5e8754f9
SDJ
22505$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
22506;;
22507 esac
22508 case $gl_cv_func_stat_file_slash in
22509 *no) REPLACE_STAT=1
2196f55f 22510
5e8754f9
SDJ
22511$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
22512;;
22513 esac
2196f55f 22514
5e8754f9 22515 if test $REPLACE_STAT = 1; then
2196f55f
YQ
22516
22517
22518
22519
22520
22521
22522
2196f55f 22523
5e8754f9 22524 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
2196f55f 22525
5e8754f9
SDJ
22526 :
22527 fi
2196f55f
YQ
22528
22529
22530
22531
2196f55f 22532
5e8754f9 22533 GNULIB_STAT=1
2196f55f
YQ
22534
22535
22536
22537
2196f55f 22538
5e8754f9
SDJ
22539$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
22540
2196f55f
YQ
22541
22542
22543
22544
22545
63ce7108
TT
22546 # Define two additional variables used in the Makefile substitution.
22547
22548 if test "$ac_cv_header_stdbool_h" = yes; then
22549 STDBOOL_H=''
22550 else
22551 STDBOOL_H='stdbool.h'
22552 fi
22553
22554 if test -n "$STDBOOL_H"; then
22555 GL_GENERATE_STDBOOL_H_TRUE=
22556 GL_GENERATE_STDBOOL_H_FALSE='#'
22557else
22558 GL_GENERATE_STDBOOL_H_TRUE='#'
22559 GL_GENERATE_STDBOOL_H_FALSE=
22560fi
22561
22562
22563 if test "$ac_cv_type__Bool" = yes; then
22564 HAVE__BOOL=1
22565 else
22566 HAVE__BOOL=0
22567 fi
22568
22569
22570
22571
22572
22573 STDDEF_H=
4a626d0a
PA
22574 ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
22575
22576"
d0ac1c44 22577if test "x$ac_cv_type_max_align_t" = xyes; then :
4a626d0a
PA
22578
22579else
22580 HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
22581fi
22582
63ce7108
TT
22583 if test $gt_cv_c_wchar_t = no; then
22584 HAVE_WCHAR_T=0
22585 STDDEF_H=stddef.h
22586 fi
22587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
22588$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
d0ac1c44 22589if ${gl_cv_decl_null_works+:} false; then :
63ce7108
TT
22590 $as_echo_n "(cached) " >&6
22591else
22592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22593/* end confdefs.h. */
22594#include <stddef.h>
22595 int test[2 * (sizeof NULL == sizeof (void *)) -1];
22596
22597int
22598main ()
22599{
22600
22601 ;
22602 return 0;
22603}
22604_ACEOF
22605if ac_fn_c_try_compile "$LINENO"; then :
22606 gl_cv_decl_null_works=yes
22607else
22608 gl_cv_decl_null_works=no
22609fi
22610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22611fi
22612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
22613$as_echo "$gl_cv_decl_null_works" >&6; }
22614 if test $gl_cv_decl_null_works = no; then
22615 REPLACE_NULL=1
22616 STDDEF_H=stddef.h
22617 fi
22618
22619 if test -n "$STDDEF_H"; then
22620 GL_GENERATE_STDDEF_H_TRUE=
22621 GL_GENERATE_STDDEF_H_FALSE='#'
22622else
22623 GL_GENERATE_STDDEF_H_TRUE='#'
22624 GL_GENERATE_STDDEF_H_FALSE=
22625fi
22626
22627 if test -n "$STDDEF_H"; then
22628
22629
22630
22631
22632
22633
22634
22635
22636 if test $gl_cv_have_include_next = yes; then
22637 gl_cv_next_stddef_h='<'stddef.h'>'
22638 else
22639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
22640$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
d0ac1c44 22641if ${gl_cv_next_stddef_h+:} false; then :
63ce7108
TT
22642 $as_echo_n "(cached) " >&6
22643else
22644
4a626d0a
PA
22645
22646
22647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63ce7108
TT
22648/* end confdefs.h. */
22649#include <stddef.h>
63ce7108 22650_ACEOF
4a626d0a
PA
22651 case "$host_os" in
22652 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22653 *) gl_absname_cpp="$ac_cpp" ;;
22654 esac
63ce7108 22655
4a626d0a
PA
22656 case "$host_os" in
22657 mingw*)
22658 gl_dirsep_regex='[/\\]'
22659 ;;
22660 *)
22661 gl_dirsep_regex='\/'
22662 ;;
22663 esac
22664 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22665 gl_header_literal_regex=`echo 'stddef.h' \
22666 | sed -e "$gl_make_literal_regex_sed"`
22667 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22668 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22669 s|^/[^/]|//&|
22670 p
22671 q
22672 }'
63ce7108 22673
4a626d0a
PA
22674 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22675 sed -n "$gl_absolute_header_sed"`
22676
22677 gl_header=$gl_cv_absolute_stddef_h
22678 gl_cv_next_stddef_h='"'$gl_header'"'
63ce7108
TT
22679
22680
22681fi
22682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
22683$as_echo "$gl_cv_next_stddef_h" >&6; }
22684 fi
22685 NEXT_STDDEF_H=$gl_cv_next_stddef_h
22686
22687 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22688 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22689 gl_next_as_first_directive='<'stddef.h'>'
22690 else
22691 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22692 gl_next_as_first_directive=$gl_cv_next_stddef_h
22693 fi
22694 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
22695
22696
22697
22698
22699 fi
22700
22701
22702
22703
49e4877c 22704 $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
63ce7108
TT
22705
22706
22707
98399780
YQ
22708
22709
22710
22711
22712
4a626d0a
PA
22713
22714
6a29c58e
YQ
22715 if test $gl_cv_have_include_next = yes; then
22716 gl_cv_next_stdio_h='<'stdio.h'>'
22717 else
22718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
22719$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
d0ac1c44 22720if ${gl_cv_next_stdio_h+:} false; then :
6a29c58e
YQ
22721 $as_echo_n "(cached) " >&6
22722else
22723
4a626d0a
PA
22724
22725
22726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6a29c58e
YQ
22727/* end confdefs.h. */
22728#include <stdio.h>
6a29c58e 22729_ACEOF
4a626d0a
PA
22730 case "$host_os" in
22731 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22732 *) gl_absname_cpp="$ac_cpp" ;;
22733 esac
22734
22735 case "$host_os" in
22736 mingw*)
22737 gl_dirsep_regex='[/\\]'
22738 ;;
22739 *)
22740 gl_dirsep_regex='\/'
22741 ;;
22742 esac
22743 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22744 gl_header_literal_regex=`echo 'stdio.h' \
22745 | sed -e "$gl_make_literal_regex_sed"`
22746 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22747 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22748 s|^/[^/]|//&|
22749 p
22750 q
22751 }'
6a29c58e 22752
4a626d0a
PA
22753 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22754 sed -n "$gl_absolute_header_sed"`
6a29c58e 22755
4a626d0a
PA
22756 gl_header=$gl_cv_absolute_stdio_h
22757 gl_cv_next_stdio_h='"'$gl_header'"'
6a29c58e
YQ
22758
22759
22760fi
22761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
22762$as_echo "$gl_cv_next_stdio_h" >&6; }
22763 fi
22764 NEXT_STDIO_H=$gl_cv_next_stdio_h
22765
22766 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22767 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22768 gl_next_as_first_directive='<'stdio.h'>'
22769 else
22770 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22771 gl_next_as_first_directive=$gl_cv_next_stdio_h
22772 fi
22773 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
22774
22775
22776
22777
22778
4a626d0a
PA
22779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
22780$as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
d0ac1c44 22781if ${gl_cv_func_printf_attribute_flavor+:} false; then :
4a626d0a
PA
22782 $as_echo_n "(cached) " >&6
22783else
22784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22785/* end confdefs.h. */
22786
22787 #define __STDC_FORMAT_MACROS 1
22788 #include <stdio.h>
22789 #include <inttypes.h>
22790 /* For non-mingw systems, compilation will trivially succeed.
22791 For mingw, compilation will succeed for older mingw (system
22792 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
5e8754f9 22793 #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
4a626d0a
PA
22794 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
22795 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
22796 #endif
22797
22798int
22799main ()
22800{
22801
22802 ;
22803 return 0;
22804}
22805_ACEOF
22806if ac_fn_c_try_compile "$LINENO"; then :
22807 gl_cv_func_printf_attribute_flavor=system
22808else
22809 gl_cv_func_printf_attribute_flavor=gnu
22810fi
22811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22812fi
22813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
22814$as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
22815 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
22816
22817$as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
22818
22819 fi
22820
6a29c58e
YQ
22821 GNULIB_FSCANF=1
22822
22823
22824cat >>confdefs.h <<_ACEOF
22825#define GNULIB_FSCANF 1
22826_ACEOF
22827
22828
22829 GNULIB_SCANF=1
22830
22831
22832cat >>confdefs.h <<_ACEOF
22833#define GNULIB_SCANF 1
22834_ACEOF
22835
22836
22837 GNULIB_FGETC=1
22838 GNULIB_GETC=1
22839 GNULIB_GETCHAR=1
22840 GNULIB_FGETS=1
22841 GNULIB_FREAD=1
22842
22843
22844 GNULIB_FPRINTF=1
22845 GNULIB_PRINTF=1
22846 GNULIB_VFPRINTF=1
22847 GNULIB_VPRINTF=1
22848 GNULIB_FPUTC=1
22849 GNULIB_PUTC=1
22850 GNULIB_PUTCHAR=1
22851 GNULIB_FPUTS=1
22852 GNULIB_PUTS=1
22853 GNULIB_FWRITE=1
22854
22855
22856
22857
5e8754f9
SDJ
22858 for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen renameat snprintf tmpfile vdprintf vsnprintf; do
22859 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22861$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
22862if eval \${$as_gl_Symbol+:} false; then :
22863 $as_echo_n "(cached) " >&6
22864else
22865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22866/* end confdefs.h. */
22867#include <stdio.h>
22868
22869int
22870main ()
22871{
22872#undef $gl_func
22873 (void) $gl_func;
22874 ;
22875 return 0;
22876}
22877_ACEOF
22878if ac_fn_c_try_compile "$LINENO"; then :
22879 eval "$as_gl_Symbol=yes"
22880else
22881 eval "$as_gl_Symbol=no"
22882fi
22883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22884fi
22885eval ac_res=\$$as_gl_Symbol
22886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22887$as_echo "$ac_res" >&6; }
22888 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
22889 cat >>confdefs.h <<_ACEOF
22890#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22891_ACEOF
6a29c58e 22892
5e8754f9
SDJ
22893 eval ac_cv_have_decl_$gl_func=yes
22894fi
22895 done
6a29c58e
YQ
22896
22897
22898
22899
22900
22901
22902
22903
22904
22905
22906
22907
98399780
YQ
22908 if test $gl_cv_have_include_next = yes; then
22909 gl_cv_next_stdlib_h='<'stdlib.h'>'
22910 else
22911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
22912$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
d0ac1c44 22913if ${gl_cv_next_stdlib_h+:} false; then :
98399780
YQ
22914 $as_echo_n "(cached) " >&6
22915else
22916
4a626d0a
PA
22917
22918
22919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
98399780
YQ
22920/* end confdefs.h. */
22921#include <stdlib.h>
98399780 22922_ACEOF
4a626d0a
PA
22923 case "$host_os" in
22924 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22925 *) gl_absname_cpp="$ac_cpp" ;;
22926 esac
22927
22928 case "$host_os" in
22929 mingw*)
22930 gl_dirsep_regex='[/\\]'
22931 ;;
22932 *)
22933 gl_dirsep_regex='\/'
22934 ;;
22935 esac
22936 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22937 gl_header_literal_regex=`echo 'stdlib.h' \
22938 | sed -e "$gl_make_literal_regex_sed"`
22939 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22940 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22941 s|^/[^/]|//&|
22942 p
22943 q
22944 }'
98399780 22945
4a626d0a
PA
22946 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22947 sed -n "$gl_absolute_header_sed"`
98399780 22948
4a626d0a
PA
22949 gl_header=$gl_cv_absolute_stdlib_h
22950 gl_cv_next_stdlib_h='"'$gl_header'"'
98399780
YQ
22951
22952
22953fi
22954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
22955$as_echo "$gl_cv_next_stdlib_h" >&6; }
22956 fi
22957 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
22958
22959 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22960 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22961 gl_next_as_first_directive='<'stdlib.h'>'
22962 else
22963 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22964 gl_next_as_first_directive=$gl_cv_next_stdlib_h
22965 fi
22966 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
22967
22968
22969
22970
22971
22972
5e8754f9
SDJ
22973 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
22974 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22976$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
22977if eval \${$as_gl_Symbol+:} false; then :
22978 $as_echo_n "(cached) " >&6
22979else
22980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22981/* end confdefs.h. */
22982#include <stdlib.h>
22983#if HAVE_SYS_LOADAVG_H
22984# include <sys/loadavg.h>
22985#endif
22986#if HAVE_RANDOM_H
22987# include <random.h>
22988#endif
22989
22990int
22991main ()
22992{
22993#undef $gl_func
22994 (void) $gl_func;
22995 ;
22996 return 0;
22997}
22998_ACEOF
22999if ac_fn_c_try_compile "$LINENO"; then :
23000 eval "$as_gl_Symbol=yes"
23001else
23002 eval "$as_gl_Symbol=no"
23003fi
23004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23005fi
23006eval ac_res=\$$as_gl_Symbol
23007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23008$as_echo "$ac_res" >&6; }
23009 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
23010 cat >>confdefs.h <<_ACEOF
23011#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
23012_ACEOF
98399780 23013
5e8754f9
SDJ
23014 eval ac_cv_have_decl_$gl_func=yes
23015fi
23016 done
98399780
YQ
23017
23018
23019
23020
23021
23022
8424cc97
SM
23023 for ac_func in strchrnul
23024do :
23025 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
d0ac1c44 23026if test "x$ac_cv_func_strchrnul" = xyes; then :
8424cc97
SM
23027 cat >>confdefs.h <<_ACEOF
23028#define HAVE_STRCHRNUL 1
23029_ACEOF
23030
23031fi
23032done
23033
23034 if test $ac_cv_func_strchrnul = no; then
23035 HAVE_STRCHRNUL=0
23036 else
23037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
23038$as_echo_n "checking whether strchrnul works... " >&6; }
d0ac1c44 23039if ${gl_cv_func_strchrnul_works+:} false; then :
8424cc97
SM
23040 $as_echo_n "(cached) " >&6
23041else
23042 if test "$cross_compiling" = yes; then :
23043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23044/* end confdefs.h. */
23045
23046#if defined __CYGWIN__
23047 #include <cygwin/version.h>
23048 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
23049 Lucky user
23050 #endif
23051#else
23052 Lucky user
23053#endif
23054
23055_ACEOF
23056if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23057 $EGREP "Lucky user" >/dev/null 2>&1; then :
23058 gl_cv_func_strchrnul_works="guessing yes"
23059else
23060 gl_cv_func_strchrnul_works="guessing no"
23061fi
23062rm -f conftest*
23063
23064
23065else
23066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23067/* end confdefs.h. */
23068
23069#include <string.h> /* for strchrnul */
23070
23071int
23072main ()
23073{
23074const char *buf = "a";
23075 return strchrnul (buf, 'b') != buf + 1;
23076
23077 ;
23078 return 0;
23079}
23080_ACEOF
23081if ac_fn_c_try_run "$LINENO"; then :
23082 gl_cv_func_strchrnul_works=yes
23083else
23084 gl_cv_func_strchrnul_works=no
23085fi
23086rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23087 conftest.$ac_objext conftest.beam conftest.$ac_ext
23088fi
23089
23090
23091fi
23092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
23093$as_echo "$gl_cv_func_strchrnul_works" >&6; }
23094 case "$gl_cv_func_strchrnul_works" in
23095 *yes) ;;
23096 *) REPLACE_STRCHRNUL=1 ;;
23097 esac
23098 fi
23099
23100 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
23101
23102
23103
23104
23105
23106
23107
23108
23109 gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
23110
23111 :
23112 fi
23113
23114
23115
23116
23117
23118 GNULIB_STRCHRNUL=1
23119
23120
23121
23122
23123
23124$as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
23125
23126
23127
23128
23129
23130
23131
472fa5ee
SM
23132 :
23133
23134
23135
23136
23137
6ec2e0f5
SDJ
23138 if test $ac_cv_func_strdup = yes; then
23139 if test $gl_cv_func_malloc_posix != yes; then
23140 REPLACE_STRDUP=1
23141 fi
23142 fi
23143
472fa5ee
SM
23144 :
23145
23146
23147
23148
23149
6ec2e0f5
SDJ
23150 if test $ac_cv_have_decl_strdup = no; then
23151 HAVE_DECL_STRDUP=0
23152 fi
23153
23154 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
23155
23156
23157
23158
23159
23160
23161
23162
23163 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
23164
23165 :
23166 fi
23167
23168
23169
23170
23171
23172 GNULIB_STRDUP=1
23173
23174
23175
23176
23177
23178$as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
23179
23180
23181
23182
23183
23184
23185
23186
23187 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
23188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
23189$as_echo_n "checking for working strerror function... " >&6; }
d0ac1c44 23190if ${gl_cv_func_working_strerror+:} false; then :
6ec2e0f5
SDJ
23191 $as_echo_n "(cached) " >&6
23192else
23193 if test "$cross_compiling" = yes; then :
23194 case "$host_os" in
5e8754f9
SDJ
23195 # Guess yes on glibc systems.
23196 *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
23197 # If we don't know, assume the worst.
23198 *) gl_cv_func_working_strerror="guessing no" ;;
6ec2e0f5
SDJ
23199 esac
23200
23201else
23202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23203/* end confdefs.h. */
23204#include <string.h>
23205
23206int
23207main ()
23208{
23209if (!*strerror (-2)) return 1;
23210 ;
23211 return 0;
23212}
23213_ACEOF
23214if ac_fn_c_try_run "$LINENO"; then :
23215 gl_cv_func_working_strerror=yes
23216else
23217 gl_cv_func_working_strerror=no
23218fi
23219rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23220 conftest.$ac_objext conftest.beam conftest.$ac_ext
23221fi
23222
23223
23224fi
23225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
23226$as_echo "$gl_cv_func_working_strerror" >&6; }
23227 case "$gl_cv_func_working_strerror" in
23228 *yes) ;;
23229 *)
23230 REPLACE_STRERROR=1
23231 ;;
23232 esac
23233
23234 else
23235 REPLACE_STRERROR=1
23236 fi
23237
23238 if test $REPLACE_STRERROR = 1; then
23239
23240
23241
23242
23243
23244
23245
23246
23247 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
23248
23249 fi
23250
23251
23252cat >>confdefs.h <<_ACEOF
23253#define GNULIB_STRERROR 1
23254_ACEOF
23255
23256
23257
23258
23259
23260
23261
23262 GNULIB_STRERROR=1
23263
23264
23265
23266
23267
23268$as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
23269
23270
23271
23272
23273
23274 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
23275
23276
23277
23278
23279
23280
23281
23282
23283 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
23284
23285
23286
23287
23288
472fa5ee
SM
23289 :
23290
23291
23292
23293
23294
6ec2e0f5
SDJ
23295 if test $ac_cv_header_sys_socket_h != yes; then
23296 for ac_header in winsock2.h
23297do :
23298 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
d0ac1c44 23299if test "x$ac_cv_header_winsock2_h" = xyes; then :
6ec2e0f5
SDJ
23300 cat >>confdefs.h <<_ACEOF
23301#define HAVE_WINSOCK2_H 1
23302_ACEOF
23303
23304fi
23305
23306done
23307
23308 fi
23309 if test "$ac_cv_header_winsock2_h" = yes; then
23310 HAVE_WINSOCK2_H=1
23311 UNISTD_H_HAVE_WINSOCK2_H=1
23312 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
23313 else
23314 HAVE_WINSOCK2_H=0
23315 fi
23316
23317
23318 fi
23319
23320
23321
23322
98399780 23323
63ce7108
TT
23324 if test $REPLACE_STRSTR = 0; then
23325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
23326$as_echo_n "checking whether strstr works in linear time... " >&6; }
d0ac1c44 23327if ${gl_cv_func_strstr_linear+:} false; then :
63ce7108
TT
23328 $as_echo_n "(cached) " >&6
23329else
23330 if test "$cross_compiling" = yes; then :
23331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23332/* end confdefs.h. */
23333
23334#include <features.h>
23335#ifdef __GNU_LIBRARY__
23336 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
23337 && !(defined __i386__ || defined __x86_64__) \
23338 && !defined __UCLIBC__
23339 Lucky user
23340 #endif
23341#endif
23342#ifdef __CYGWIN__
23343 #include <cygwin/version.h>
23344 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
23345 Lucky user
23346 #endif
23347#endif
23348
23349_ACEOF
23350if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23351 $EGREP "Lucky user" >/dev/null 2>&1; then :
23352 gl_cv_func_strstr_linear="guessing yes"
c971b7fa 23353else
63ce7108 23354 gl_cv_func_strstr_linear="guessing no"
c971b7fa
PA
23355fi
23356rm -f conftest*
23357
23358
23359else
23360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23361/* end confdefs.h. */
23362
49e4877c
PA
23363#ifdef __MVS__
23364/* z/OS does not deliver signals while strstr() is running (thanks to
23365 restrictions on its LE runtime), which prevents us from limiting the
23366 running time of this test. */
23367# error "This test does not work properly on z/OS"
23368#endif
c971b7fa 23369#include <signal.h> /* for signal */
63ce7108 23370#include <string.h> /* for strstr */
c971b7fa
PA
23371#include <stdlib.h> /* for malloc */
23372#include <unistd.h> /* for alarm */
49e4877c 23373static void quit (int sig) { _exit (sig + 128); }
c971b7fa
PA
23374
23375int
23376main ()
23377{
23378
23379 int result = 0;
23380 size_t m = 1000000;
63ce7108
TT
23381 char *haystack = (char *) malloc (2 * m + 2);
23382 char *needle = (char *) malloc (m + 2);
c971b7fa 23383 /* Failure to compile this test due to missing alarm is okay,
63ce7108 23384 since all such platforms (mingw) also have quadratic strstr. */
c971b7fa
PA
23385 signal (SIGALRM, quit);
23386 alarm (5);
23387 /* Check for quadratic performance. */
23388 if (haystack && needle)
23389 {
23390 memset (haystack, 'A', 2 * m);
23391 haystack[2 * m] = 'B';
63ce7108 23392 haystack[2 * m + 1] = 0;
c971b7fa
PA
23393 memset (needle, 'A', m);
23394 needle[m] = 'B';
63ce7108
TT
23395 needle[m + 1] = 0;
23396 if (!strstr (haystack, needle))
c971b7fa
PA
23397 result |= 1;
23398 }
23399 return result;
23400
23401 ;
23402 return 0;
23403}
23404_ACEOF
23405if ac_fn_c_try_run "$LINENO"; then :
63ce7108 23406 gl_cv_func_strstr_linear=yes
c971b7fa 23407else
63ce7108 23408 gl_cv_func_strstr_linear=no
c971b7fa
PA
23409fi
23410rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23411 conftest.$ac_objext conftest.beam conftest.$ac_ext
23412fi
23413
23414
23415fi
63ce7108
TT
23416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
23417$as_echo "$gl_cv_func_strstr_linear" >&6; }
23418 case "$gl_cv_func_strstr_linear" in
40a73391
JK
23419 *yes) ;;
23420 *)
63ce7108 23421 REPLACE_STRSTR=1
40a73391
JK
23422 ;;
23423 esac
c971b7fa
PA
23424 fi
23425
63ce7108 23426 if test $REPLACE_STRSTR = 1; then
c971b7fa
PA
23427
23428
23429
23430
23431
23432
23433
23434
63ce7108 23435 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
c971b7fa 23436
a512b375 23437 fi
c971b7fa
PA
23438
23439
23440
5e8754f9 23441 if test "$gl_cv_func_memchr_works" != yes; then
63ce7108 23442 REPLACE_STRSTR=1
c971b7fa 23443 else
63ce7108
TT
23444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
23445$as_echo_n "checking whether strstr works... " >&6; }
d0ac1c44 23446if ${gl_cv_func_strstr_works_always+:} false; then :
c971b7fa
PA
23447 $as_echo_n "(cached) " >&6
23448else
23449 if test "$cross_compiling" = yes; then :
63ce7108 23450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
23451/* end confdefs.h. */
23452
23453#ifdef __GNU_LIBRARY__
23454 #include <features.h>
63ce7108 23455 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
c971b7fa
PA
23456 || defined __UCLIBC__
23457 Lucky user
23458 #endif
23459#elif defined __CYGWIN__
23460 #include <cygwin/version.h>
23461 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
23462 Lucky user
23463 #endif
23464#else
23465 Lucky user
23466#endif
23467
23468_ACEOF
23469if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23470 $EGREP "Lucky user" >/dev/null 2>&1; then :
63ce7108 23471 gl_cv_func_strstr_works_always="guessing yes"
c971b7fa 23472else
63ce7108 23473 gl_cv_func_strstr_works_always="guessing no"
c971b7fa
PA
23474fi
23475rm -f conftest*
23476
23477
23478else
23479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23480/* end confdefs.h. */
23481
63ce7108 23482#include <string.h> /* for strstr */
c971b7fa
PA
23483#define P "_EF_BF_BD"
23484#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
23485#define NEEDLE P P P P P
23486
23487int
23488main ()
23489{
63ce7108 23490return !!strstr (HAYSTACK, NEEDLE);
c971b7fa
PA
23491
23492 ;
23493 return 0;
23494}
23495_ACEOF
23496if ac_fn_c_try_run "$LINENO"; then :
63ce7108 23497 gl_cv_func_strstr_works_always=yes
c971b7fa 23498else
63ce7108 23499 gl_cv_func_strstr_works_always=no
c971b7fa
PA
23500fi
23501rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23502 conftest.$ac_objext conftest.beam conftest.$ac_ext
23503fi
23504
23505
23506fi
63ce7108
TT
23507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
23508$as_echo "$gl_cv_func_strstr_works_always" >&6; }
23509 case "$gl_cv_func_strstr_works_always" in
40a73391
JK
23510 *yes) ;;
23511 *)
63ce7108 23512 REPLACE_STRSTR=1
40a73391
JK
23513 ;;
23514 esac
c971b7fa 23515 fi
8839a007 23516
63ce7108 23517 if test $REPLACE_STRSTR = 1; then
8839a007 23518
8690e634
JK
23519
23520
8690e634
JK
23521
23522
23523
23524
23525
63ce7108 23526 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
8690e634 23527
8690e634
JK
23528 fi
23529
8690e634
JK
23530
23531
8690e634 23532
8690e634 23533
63ce7108 23534 GNULIB_STRSTR=1
8690e634
JK
23535
23536
23537
8690e634
JK
23538
23539
63ce7108 23540$as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
8690e634
JK
23541
23542
23543
23544
23545
23546
23547
421693b0
PA
23548 for ac_func in strtok_r
23549do :
23550 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
d0ac1c44 23551if test "x$ac_cv_func_strtok_r" = xyes; then :
421693b0
PA
23552 cat >>confdefs.h <<_ACEOF
23553#define HAVE_STRTOK_R 1
23554_ACEOF
23555
23556fi
23557done
23558
23559 if test $ac_cv_func_strtok_r = yes; then
23560 HAVE_STRTOK_R=1
23561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5
23562$as_echo_n "checking whether strtok_r works... " >&6; }
d0ac1c44 23563if ${gl_cv_func_strtok_r_works+:} false; then :
421693b0
PA
23564 $as_echo_n "(cached) " >&6
23565else
23566 if test "$cross_compiling" = yes; then :
5e8754f9
SDJ
23567
23568 case "$host_os" in
23569 # Guess no on glibc systems.
23570 *-gnu*) gl_cv_func_strtok_r_works="guessing no";;
23571 *) gl_cv_func_strtok_r_works="guessing yes";;
421693b0
PA
23572 esac
23573
23574else
23575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23576/* end confdefs.h. */
23577
23578 #ifndef __OPTIMIZE__
23579 # define __OPTIMIZE__ 1
23580 #endif
23581 #undef __OPTIMIZE_SIZE__
23582 #undef __NO_INLINE__
23583 #include <stdlib.h>
23584 #include <string.h>
23585
23586int
23587main ()
23588{
23589static const char dummy[] = "\177\01a";
23590 char delimiters[] = "xxxxxxxx";
23591 char *save_ptr = (char *) dummy;
23592 strtok_r (delimiters, "x", &save_ptr);
23593 strtok_r (NULL, "x", &save_ptr);
23594 return 0;
23595
23596 ;
23597 return 0;
23598}
23599
23600_ACEOF
23601if ac_fn_c_try_run "$LINENO"; then :
23602 gl_cv_func_strtok_r_works=yes
23603else
23604 gl_cv_func_strtok_r_works=no
23605fi
23606rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23607 conftest.$ac_objext conftest.beam conftest.$ac_ext
23608fi
23609
23610
23611fi
23612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5
23613$as_echo "$gl_cv_func_strtok_r_works" >&6; }
23614 case "$gl_cv_func_strtok_r_works" in
23615 *no)
23616 UNDEFINE_STRTOK_R=1
23617 ;;
23618 esac
23619 else
23620 HAVE_STRTOK_R=0
23621 fi
23622
472fa5ee
SM
23623 :
23624
23625
23626
23627
23628
421693b0
PA
23629 if test $ac_cv_have_decl_strtok_r = no; then
23630 HAVE_DECL_STRTOK_R=0
23631 fi
23632
23633 if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
23634
23635
23636
23637
23638
23639
23640
23641
23642 gl_LIBOBJS="$gl_LIBOBJS strtok_r.$ac_objext"
23643
23644
23645 :
23646
23647 fi
23648
23649
23650
23651
23652
23653 GNULIB_STRTOK_R=1
23654
23655
23656
23657
23658
23659$as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h
23660
23661
23662
23663
23664
23665
23666
8690e634
JK
23667
23668
23669
23670
23671
8690e634 23672
09607c9e 23673
472fa5ee
SM
23674 :
23675
23676
23677
23678
23679
09607c9e
TT
23680
23681
23682
23683 if test $gl_cv_have_include_next = yes; then
23684 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
23685 else
23686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
23687$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
d0ac1c44 23688if ${gl_cv_next_sys_stat_h+:} false; then :
09607c9e
TT
23689 $as_echo_n "(cached) " >&6
23690else
23691
23692 if test $ac_cv_header_sys_stat_h = yes; then
23693
23694
4a626d0a
PA
23695
23696
23697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
09607c9e
TT
23698/* end confdefs.h. */
23699#include <sys/stat.h>
09607c9e 23700_ACEOF
4a626d0a
PA
23701 case "$host_os" in
23702 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23703 *) gl_absname_cpp="$ac_cpp" ;;
23704 esac
23705
23706 case "$host_os" in
23707 mingw*)
23708 gl_dirsep_regex='[/\\]'
23709 ;;
23710 *)
23711 gl_dirsep_regex='\/'
23712 ;;
23713 esac
23714 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23715 gl_header_literal_regex=`echo 'sys/stat.h' \
23716 | sed -e "$gl_make_literal_regex_sed"`
23717 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23718 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23719 s|^/[^/]|//&|
23720 p
23721 q
23722 }'
23723
23724 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23725 sed -n "$gl_absolute_header_sed"`
23726
23727 gl_header=$gl_cv_absolute_sys_stat_h
23728 gl_cv_next_sys_stat_h='"'$gl_header'"'
09607c9e
TT
23729 else
23730 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
23731 fi
23732
23733
23734fi
23735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
23736$as_echo "$gl_cv_next_sys_stat_h" >&6; }
23737 fi
23738 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
23739
23740 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23741 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23742 gl_next_as_first_directive='<'sys/stat.h'>'
23743 else
23744 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23745 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
23746 fi
23747 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
23748
23749
23750
23751
23752
23753
23754
23755
2196f55f 23756
09607c9e
TT
23757
23758
5e8754f9 23759 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
09607c9e 23760
5e8754f9 23761$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
09607c9e 23762
5e8754f9 23763 fi
09607c9e
TT
23764
23765 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
23766 #include <sys/stat.h>
23767"
d0ac1c44 23768if test "x$ac_cv_type_nlink_t" = xyes; then :
09607c9e
TT
23769
23770else
23771
23772$as_echo "#define nlink_t int" >>confdefs.h
23773
23774fi
23775
23776
23777
5e8754f9
SDJ
23778 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
23779 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
23780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
23781$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
23782if eval \${$as_gl_Symbol+:} false; then :
23783 $as_echo_n "(cached) " >&6
23784else
23785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23786/* end confdefs.h. */
23787#include <sys/stat.h>
23788
23789int
23790main ()
23791{
23792#undef $gl_func
23793 (void) $gl_func;
23794 ;
23795 return 0;
23796}
23797_ACEOF
23798if ac_fn_c_try_compile "$LINENO"; then :
23799 eval "$as_gl_Symbol=yes"
23800else
23801 eval "$as_gl_Symbol=no"
23802fi
23803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23804fi
23805eval ac_res=\$$as_gl_Symbol
23806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23807$as_echo "$ac_res" >&6; }
23808 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
23809 cat >>confdefs.h <<_ACEOF
23810#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
23811_ACEOF
09607c9e 23812
5e8754f9
SDJ
23813 eval ac_cv_have_decl_$gl_func=yes
23814fi
23815 done
09607c9e
TT
23816
23817
23818
23819
23820
23821
23822
23823
23824
23825
23826
2d8adcbd
MM
23827 :
23828
23829
23830
23831
09607c9e
TT
23832
23833
23834
8839a007
PA
23835
23836
23837
23838
09607c9e
TT
23839
23840
8839a007 23841
472fa5ee
SM
23842 :
23843
23844
23845
23846
23847
8839a007
PA
23848
23849
23850
23851 if test $gl_cv_have_include_next = yes; then
23852 gl_cv_next_unistd_h='<'unistd.h'>'
23853 else
23854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
23855$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
d0ac1c44 23856if ${gl_cv_next_unistd_h+:} false; then :
8839a007
PA
23857 $as_echo_n "(cached) " >&6
23858else
23859
23860 if test $ac_cv_header_unistd_h = yes; then
23861
23862
4a626d0a
PA
23863
23864
23865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8839a007
PA
23866/* end confdefs.h. */
23867#include <unistd.h>
8839a007 23868_ACEOF
4a626d0a
PA
23869 case "$host_os" in
23870 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23871 *) gl_absname_cpp="$ac_cpp" ;;
23872 esac
23873
23874 case "$host_os" in
23875 mingw*)
23876 gl_dirsep_regex='[/\\]'
23877 ;;
23878 *)
23879 gl_dirsep_regex='\/'
23880 ;;
23881 esac
23882 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23883 gl_header_literal_regex=`echo 'unistd.h' \
23884 | sed -e "$gl_make_literal_regex_sed"`
23885 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23886 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23887 s|^/[^/]|//&|
23888 p
23889 q
23890 }'
23891
23892 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23893 sed -n "$gl_absolute_header_sed"`
23894
23895 gl_header=$gl_cv_absolute_unistd_h
23896 gl_cv_next_unistd_h='"'$gl_header'"'
8839a007
PA
23897 else
23898 gl_cv_next_unistd_h='<'unistd.h'>'
23899 fi
23900
23901
23902fi
23903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
23904$as_echo "$gl_cv_next_unistd_h" >&6; }
23905 fi
23906 NEXT_UNISTD_H=$gl_cv_next_unistd_h
23907
23908 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23909 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23910 gl_next_as_first_directive='<'unistd.h'>'
23911 else
23912 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23913 gl_next_as_first_directive=$gl_cv_next_unistd_h
23914 fi
23915 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
23916
23917
23918
23919
23920 if test $ac_cv_header_unistd_h = yes; then
23921 HAVE_UNISTD_H=1
23922 else
23923 HAVE_UNISTD_H=0
23924 fi
23925
23926
23927
23928
23929
23930
23931
5e8754f9
SDJ
23932 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
23933 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
23934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
23935$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
23936if eval \${$as_gl_Symbol+:} false; then :
23937 $as_echo_n "(cached) " >&6
23938else
23939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23940/* end confdefs.h. */
23941
23942#if HAVE_UNISTD_H
23943# include <unistd.h>
23944#endif
23945/* Some systems declare various items in the wrong headers. */
23946#if !(defined __GLIBC__ && !defined __UCLIBC__)
23947# include <fcntl.h>
23948# include <stdio.h>
23949# include <stdlib.h>
23950# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
23951# include <io.h>
23952# endif
23953#endif
23954
23955int
23956main ()
23957{
23958#undef $gl_func
23959 (void) $gl_func;
23960 ;
23961 return 0;
23962}
23963_ACEOF
23964if ac_fn_c_try_compile "$LINENO"; then :
23965 eval "$as_gl_Symbol=yes"
23966else
23967 eval "$as_gl_Symbol=no"
23968fi
23969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23970fi
23971eval ac_res=\$$as_gl_Symbol
23972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23973$as_echo "$ac_res" >&6; }
23974 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
23975 cat >>confdefs.h <<_ACEOF
23976#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
23977_ACEOF
8839a007 23978
5e8754f9
SDJ
23979 eval ac_cv_have_decl_$gl_func=yes
23980fi
23981 done
8839a007
PA
23982
23983
23984
23985
472fa5ee
SM
23986 :
23987
23988
23989
23990
23991
23992
23993
23994
23995
23996 :
23997
8839a007 23998
6ec2e0f5
SDJ
23999
24000
24001
3d99e817
AK
24002 if test $ac_cv_have_decl_unsetenv = no; then
24003 HAVE_DECL_UNSETENV=0
24004 fi
24005 for ac_func in unsetenv
24006do :
24007 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
d0ac1c44 24008if test "x$ac_cv_func_unsetenv" = xyes; then :
3d99e817
AK
24009 cat >>confdefs.h <<_ACEOF
24010#define HAVE_UNSETENV 1
24011_ACEOF
24012
24013fi
24014done
24015
24016 if test $ac_cv_func_unsetenv = no; then
24017 HAVE_UNSETENV=0
24018 else
24019 HAVE_UNSETENV=1
24020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
24021$as_echo_n "checking for unsetenv() return type... " >&6; }
d0ac1c44 24022if ${gt_cv_func_unsetenv_ret+:} false; then :
3d99e817
AK
24023 $as_echo_n "(cached) " >&6
24024else
24025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24026/* end confdefs.h. */
24027
24028#undef _BSD
24029#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
24030#include <stdlib.h>
24031extern
24032#ifdef __cplusplus
24033"C"
24034#endif
24035int unsetenv (const char *name);
24036
24037int
24038main ()
24039{
24040
24041 ;
24042 return 0;
24043}
24044_ACEOF
24045if ac_fn_c_try_compile "$LINENO"; then :
24046 gt_cv_func_unsetenv_ret='int'
24047else
24048 gt_cv_func_unsetenv_ret='void'
24049fi
24050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24051fi
24052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
24053$as_echo "$gt_cv_func_unsetenv_ret" >&6; }
24054 if test $gt_cv_func_unsetenv_ret = 'void'; then
24055
24056$as_echo "#define VOID_UNSETENV 1" >>confdefs.h
24057
24058 REPLACE_UNSETENV=1
24059 fi
24060
24061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
24062$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
d0ac1c44 24063if ${gl_cv_func_unsetenv_works+:} false; then :
3d99e817
AK
24064 $as_echo_n "(cached) " >&6
24065else
24066 if test "$cross_compiling" = yes; then :
24067 case "$host_os" in
24068 # Guess yes on glibc systems.
24069 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
24070 # If we don't know, assume the worst.
24071 *) gl_cv_func_unsetenv_works="guessing no" ;;
24072 esac
24073
24074else
24075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24076/* end confdefs.h. */
24077
24078 #include <stdlib.h>
24079 #include <errno.h>
24080 extern char **environ;
24081
24082int
24083main ()
24084{
24085
24086 char entry1[] = "a=1";
24087 char entry2[] = "b=2";
24088 char *env[] = { entry1, entry2, NULL };
24089 if (putenv ((char *) "a=1")) return 1;
24090 if (putenv (entry2)) return 2;
24091 entry2[0] = 'a';
24092 unsetenv ("a");
24093 if (getenv ("a")) return 3;
24094 if (!unsetenv ("") || errno != EINVAL) return 4;
24095 entry2[0] = 'b';
24096 environ = env;
24097 if (!getenv ("a")) return 5;
24098 entry2[0] = 'a';
24099 unsetenv ("a");
24100 if (getenv ("a")) return 6;
24101
24102 ;
24103 return 0;
24104}
24105_ACEOF
24106if ac_fn_c_try_run "$LINENO"; then :
24107 gl_cv_func_unsetenv_works=yes
24108else
24109 gl_cv_func_unsetenv_works=no
24110fi
24111rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24112 conftest.$ac_objext conftest.beam conftest.$ac_ext
24113fi
24114
24115fi
24116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
24117$as_echo "$gl_cv_func_unsetenv_works" >&6; }
24118 case "$gl_cv_func_unsetenv_works" in
24119 *yes) ;;
24120 *)
24121 REPLACE_UNSETENV=1
24122 ;;
24123 esac
24124 fi
24125
24126 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
24127
24128
24129
24130
24131
24132
24133
24134
24135 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
24136
24137
24138
24139
472fa5ee
SM
24140 :
24141
24142
24143
24144
24145
3d99e817
AK
24146
24147 fi
24148
24149
24150
24151
24152
24153 GNULIB_UNSETENV=1
24154
24155
24156
24157
24158
24159$as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
24160
24161
24162
24163
24164
24165
8839a007
PA
24166
24167
24168
24169
24170
24171
472fa5ee
SM
24172 :
24173
24174
24175
24176
24177
8839a007 24178
8690e634
JK
24179
24180
24181 if test $gl_cv_have_include_next = yes; then
24182 gl_cv_next_wchar_h='<'wchar.h'>'
24183 else
24184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
24185$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
d0ac1c44 24186if ${gl_cv_next_wchar_h+:} false; then :
8690e634
JK
24187 $as_echo_n "(cached) " >&6
24188else
24189
24190 if test $ac_cv_header_wchar_h = yes; then
24191
24192
4a626d0a
PA
24193
24194
24195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
24196/* end confdefs.h. */
24197#include <wchar.h>
8690e634 24198_ACEOF
4a626d0a
PA
24199 case "$host_os" in
24200 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24201 *) gl_absname_cpp="$ac_cpp" ;;
24202 esac
24203
24204 case "$host_os" in
24205 mingw*)
24206 gl_dirsep_regex='[/\\]'
24207 ;;
24208 *)
24209 gl_dirsep_regex='\/'
24210 ;;
24211 esac
24212 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24213 gl_header_literal_regex=`echo 'wchar.h' \
24214 | sed -e "$gl_make_literal_regex_sed"`
24215 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24216 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24217 s|^/[^/]|//&|
24218 p
24219 q
24220 }'
24221
24222 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24223 sed -n "$gl_absolute_header_sed"`
24224
24225 gl_header=$gl_cv_absolute_wchar_h
24226 gl_cv_next_wchar_h='"'$gl_header'"'
8690e634
JK
24227 else
24228 gl_cv_next_wchar_h='<'wchar.h'>'
24229 fi
24230
24231
24232fi
24233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
24234$as_echo "$gl_cv_next_wchar_h" >&6; }
24235 fi
24236 NEXT_WCHAR_H=$gl_cv_next_wchar_h
24237
24238 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24239 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24240 gl_next_as_first_directive='<'wchar.h'>'
24241 else
24242 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24243 gl_next_as_first_directive=$gl_cv_next_wchar_h
24244 fi
24245 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
24246
24247
24248
24249
24250 if test $ac_cv_header_wchar_h = yes; then
24251 HAVE_WCHAR_H=1
24252 else
24253 HAVE_WCHAR_H=0
24254 fi
24255
c971b7fa
PA
24256
24257
24258
24259
8690e634
JK
24260 if test $gt_cv_c_wint_t = yes; then
24261 HAVE_WINT_T=1
24262 else
24263 HAVE_WINT_T=0
24264 fi
c971b7fa
PA
24265
24266
24267
5e8754f9
SDJ
24268 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
24269 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
24270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
24271$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
24272if eval \${$as_gl_Symbol+:} false; then :
24273 $as_echo_n "(cached) " >&6
24274else
24275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24276/* end confdefs.h. */
8690e634 24277
5e8754f9
SDJ
24278/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24279 <wchar.h>.
24280 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24281 included before <wchar.h>. */
24282#if !(defined __GLIBC__ && !defined __UCLIBC__)
24283# include <stddef.h>
24284# include <stdio.h>
24285# include <time.h>
24286#endif
24287#include <wchar.h>
c971b7fa 24288
5e8754f9
SDJ
24289int
24290main ()
24291{
24292#undef $gl_func
24293 (void) $gl_func;
24294 ;
24295 return 0;
24296}
24297_ACEOF
24298if ac_fn_c_try_compile "$LINENO"; then :
24299 eval "$as_gl_Symbol=yes"
24300else
24301 eval "$as_gl_Symbol=no"
24302fi
24303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24304fi
24305eval ac_res=\$$as_gl_Symbol
24306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
24307$as_echo "$ac_res" >&6; }
24308 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
24309 cat >>confdefs.h <<_ACEOF
24310#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
24311_ACEOF
c971b7fa 24312
5e8754f9
SDJ
24313 eval ac_cv_have_decl_$gl_func=yes
24314fi
24315 done
8690e634
JK
24316
24317
24318
24319
24320
24321
24322
472fa5ee
SM
24323 :
24324
24325
24326
24327
24328
8690e634
JK
24329 if test $ac_cv_func_iswcntrl = yes; then
24330 HAVE_ISWCNTRL=1
24331 else
24332 HAVE_ISWCNTRL=0
24333 fi
24334
24335
24336
8690e634
JK
24337 if test $gt_cv_c_wint_t = yes; then
24338 HAVE_WINT_T=1
24339 else
24340 HAVE_WINT_T=0
24341 fi
24342
24343
24344
24345
24346
24347
c971b7fa 24348
8690e634 24349
472fa5ee
SM
24350 :
24351
24352
24353
24354
24355
c971b7fa
PA
24356
24357
24358
24359 if test $gl_cv_have_include_next = yes; then
8690e634 24360 gl_cv_next_wctype_h='<'wctype.h'>'
c971b7fa 24361 else
8690e634
JK
24362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
24363$as_echo_n "checking absolute name of <wctype.h>... " >&6; }
d0ac1c44 24364if ${gl_cv_next_wctype_h+:} false; then :
c971b7fa
PA
24365 $as_echo_n "(cached) " >&6
24366else
24367
8690e634
JK
24368 if test $ac_cv_header_wctype_h = yes; then
24369
24370
4a626d0a
PA
24371
24372
24373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 24374/* end confdefs.h. */
8690e634 24375#include <wctype.h>
c971b7fa 24376_ACEOF
4a626d0a
PA
24377 case "$host_os" in
24378 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24379 *) gl_absname_cpp="$ac_cpp" ;;
24380 esac
24381
24382 case "$host_os" in
24383 mingw*)
24384 gl_dirsep_regex='[/\\]'
24385 ;;
24386 *)
24387 gl_dirsep_regex='\/'
24388 ;;
24389 esac
24390 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24391 gl_header_literal_regex=`echo 'wctype.h' \
24392 | sed -e "$gl_make_literal_regex_sed"`
24393 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24394 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24395 s|^/[^/]|//&|
24396 p
24397 q
24398 }'
24399
24400 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24401 sed -n "$gl_absolute_header_sed"`
24402
24403 gl_header=$gl_cv_absolute_wctype_h
24404 gl_cv_next_wctype_h='"'$gl_header'"'
8690e634
JK
24405 else
24406 gl_cv_next_wctype_h='<'wctype.h'>'
24407 fi
c971b7fa
PA
24408
24409
24410fi
8690e634
JK
24411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
24412$as_echo "$gl_cv_next_wctype_h" >&6; }
c971b7fa 24413 fi
8690e634 24414 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
c971b7fa
PA
24415
24416 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24417 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8690e634 24418 gl_next_as_first_directive='<'wctype.h'>'
c971b7fa
PA
24419 else
24420 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8690e634 24421 gl_next_as_first_directive=$gl_cv_next_wctype_h
c971b7fa 24422 fi
8690e634
JK
24423 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
24424
24425
24426
24427
24428 if test $ac_cv_header_wctype_h = yes; then
24429 if test $ac_cv_func_iswcntrl = yes; then
24430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
24431$as_echo_n "checking whether iswcntrl works... " >&6; }
d0ac1c44 24432if ${gl_cv_func_iswcntrl_works+:} false; then :
8690e634
JK
24433 $as_echo_n "(cached) " >&6
24434else
24435
24436 if test "$cross_compiling" = yes; then :
5e8754f9 24437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
24438/* end confdefs.h. */
24439#include <stdlib.h>
24440 #if __GNU_LIBRARY__ == 1
24441 Linux libc5 i18n is broken.
24442 #endif
24443int
24444main ()
24445{
24446
24447 ;
24448 return 0;
24449}
24450_ACEOF
24451if ac_fn_c_try_compile "$LINENO"; then :
24452 gl_cv_func_iswcntrl_works="guessing yes"
24453else
24454 gl_cv_func_iswcntrl_works="guessing no"
24455fi
24456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24457
24458else
24459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24460/* end confdefs.h. */
24461
24462 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
24463 included before <wchar.h>.
24464 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
24465 must be included before <wchar.h>. */
24466 #include <stddef.h>
24467 #include <stdio.h>
24468 #include <time.h>
24469 #include <wchar.h>
24470 #include <wctype.h>
24471 int main () { return iswprint ('x') == 0; }
24472
24473_ACEOF
24474if ac_fn_c_try_run "$LINENO"; then :
24475 gl_cv_func_iswcntrl_works=yes
24476else
24477 gl_cv_func_iswcntrl_works=no
24478fi
24479rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24480 conftest.$ac_objext conftest.beam conftest.$ac_ext
24481fi
24482
24483
24484fi
24485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
24486$as_echo "$gl_cv_func_iswcntrl_works" >&6; }
24487 fi
24488 HAVE_WCTYPE_H=1
24489 else
24490 HAVE_WCTYPE_H=0
24491 fi
24492
24493
24494 case "$gl_cv_func_iswcntrl_works" in
24495 *yes) REPLACE_ISWCNTRL=0 ;;
24496 *) REPLACE_ISWCNTRL=1 ;;
24497 esac
24498
24499
24500 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
24501 :
24502 fi
24503
24504 if test $REPLACE_ISWCNTRL = 1; then
24505 REPLACE_TOWLOWER=1
24506 else
24507 for ac_func in towlower
24508do :
24509 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
d0ac1c44 24510if test "x$ac_cv_func_towlower" = xyes; then :
8690e634
JK
24511 cat >>confdefs.h <<_ACEOF
24512#define HAVE_TOWLOWER 1
24513_ACEOF
24514
24515fi
24516done
24517
24518 if test $ac_cv_func_towlower = yes; then
24519 REPLACE_TOWLOWER=0
24520 else
24521 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
24522 included before <wchar.h>.
24523 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
24524 must be included before <wchar.h>. */
24525 #include <stddef.h>
24526 #include <stdio.h>
24527 #include <time.h>
24528 #include <wchar.h>
24529 #if HAVE_WCTYPE_H
24530 # include <wctype.h>
24531 #endif
24532
24533"
d0ac1c44 24534if test "x$ac_cv_have_decl_towlower" = xyes; then :
8690e634
JK
24535 ac_have_decl=1
24536else
24537 ac_have_decl=0
24538fi
24539
24540cat >>confdefs.h <<_ACEOF
24541#define HAVE_DECL_TOWLOWER $ac_have_decl
24542_ACEOF
24543
24544 if test $ac_cv_have_decl_towlower = yes; then
24545 REPLACE_TOWLOWER=1
24546 else
24547 REPLACE_TOWLOWER=0
24548 fi
24549 fi
24550 fi
24551
24552
24553 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
24554 :
24555 fi
24556
24557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
24558$as_echo_n "checking for wctype_t... " >&6; }
d0ac1c44 24559if ${gl_cv_type_wctype_t+:} false; then :
8690e634
JK
24560 $as_echo_n "(cached) " >&6
24561else
24562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24563/* end confdefs.h. */
24564/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
24565 included before <wchar.h>.
24566 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
24567 must be included before <wchar.h>. */
24568 #include <stddef.h>
24569 #include <stdio.h>
24570 #include <time.h>
24571 #include <wchar.h>
24572 #if HAVE_WCTYPE_H
24573 # include <wctype.h>
24574 #endif
24575 wctype_t a;
24576
24577int
24578main ()
24579{
24580
24581 ;
24582 return 0;
24583}
24584_ACEOF
24585if ac_fn_c_try_compile "$LINENO"; then :
24586 gl_cv_type_wctype_t=yes
24587else
24588 gl_cv_type_wctype_t=no
24589fi
24590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 24591
8690e634
JK
24592fi
24593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
24594$as_echo "$gl_cv_type_wctype_t" >&6; }
24595 if test $gl_cv_type_wctype_t = no; then
24596 HAVE_WCTYPE_T=0
24597 fi
24598
24599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
24600$as_echo_n "checking for wctrans_t... " >&6; }
d0ac1c44 24601if ${gl_cv_type_wctrans_t+:} false; then :
8690e634
JK
24602 $as_echo_n "(cached) " >&6
24603else
24604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24605/* end confdefs.h. */
24606/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
24607 included before <wchar.h>.
24608 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
24609 must be included before <wchar.h>. */
24610 #include <stddef.h>
24611 #include <stdio.h>
24612 #include <time.h>
24613 #include <wchar.h>
24614 #include <wctype.h>
24615 wctrans_t a;
c971b7fa 24616
8690e634
JK
24617int
24618main ()
24619{
c971b7fa 24620
8690e634
JK
24621 ;
24622 return 0;
24623}
24624_ACEOF
24625if ac_fn_c_try_compile "$LINENO"; then :
24626 gl_cv_type_wctrans_t=yes
24627else
24628 gl_cv_type_wctrans_t=no
24629fi
24630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 24631
8690e634
JK
24632fi
24633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
24634$as_echo "$gl_cv_type_wctrans_t" >&6; }
24635 if test $gl_cv_type_wctrans_t = no; then
24636 HAVE_WCTRANS_T=0
c971b7fa
PA
24637 fi
24638
24639
5e8754f9
SDJ
24640 for gl_func in wctype iswctype wctrans towctrans ; do
24641 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
24642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
24643$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
24644if eval \${$as_gl_Symbol+:} false; then :
24645 $as_echo_n "(cached) " >&6
24646else
24647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24648/* end confdefs.h. */
24649
24650/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24651 <wchar.h>.
24652 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24653 included before <wchar.h>. */
24654#if !(defined __GLIBC__ && !defined __UCLIBC__)
24655# include <stddef.h>
24656# include <stdio.h>
24657# include <time.h>
24658# include <wchar.h>
24659#endif
24660#include <wctype.h>
24661
24662int
24663main ()
24664{
24665#undef $gl_func
24666 (void) $gl_func;
24667 ;
24668 return 0;
24669}
24670_ACEOF
24671if ac_fn_c_try_compile "$LINENO"; then :
24672 eval "$as_gl_Symbol=yes"
24673else
24674 eval "$as_gl_Symbol=no"
24675fi
24676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24677fi
24678eval ac_res=\$$as_gl_Symbol
24679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
24680$as_echo "$ac_res" >&6; }
24681 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
24682 cat >>confdefs.h <<_ACEOF
24683#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
24684_ACEOF
c971b7fa 24685
5e8754f9
SDJ
24686 eval ac_cv_have_decl_$gl_func=yes
24687fi
24688 done
c971b7fa
PA
24689
24690
24691 # End of code from modules
24692
24693
24694
24695
24696
24697
24698
24699
24700
24701 gltests_libdeps=
24702 gltests_ltlibdeps=
24703
24704
24705
24706
24707
24708
24709
24710
24711
24712 gl_source_base='tests'
24713 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
24714
24715 gl_module_indicator_condition=$gltests_WITNESS
24716
24717
24718
24719
24720
24721
24722
24723
24724
24725 LIBGNU_LIBDEPS="$gl_libdeps"
24726
24727 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
24728
24729
24730
24731# We don't use automake, but gnulib does. This line lets us generate
24732# its Makefile.in.
d0ac1c44 24733am__api_version='1.15'
c971b7fa
PA
24734
24735# Find a good install program. We prefer a C program (faster),
24736# so one script is as good as another. But avoid the broken or
24737# incompatible versions:
24738# SysV /etc/install, /usr/sbin/install
24739# SunOS /usr/etc/install
24740# IRIX /sbin/install
24741# AIX /bin/install
24742# AmigaOS /C/install, which installs bootblocks on floppy discs
24743# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
24744# AFS /usr/afsws/bin/install, which mishandles nonexistent args
24745# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
24746# OS/2's system install, which has a completely different semantic
24747# ./install, which can be erroneously created by make from ./install.sh.
24748# Reject install programs that cannot install multiple files.
24749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
24750$as_echo_n "checking for a BSD-compatible install... " >&6; }
24751if test -z "$INSTALL"; then
d0ac1c44 24752if ${ac_cv_path_install+:} false; then :
c971b7fa
PA
24753 $as_echo_n "(cached) " >&6
24754else
24755 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24756for as_dir in $PATH
24757do
24758 IFS=$as_save_IFS
24759 test -z "$as_dir" && as_dir=.
24760 # Account for people who put trailing slashes in PATH elements.
24761case $as_dir/ in #((
24762 ./ | .// | /[cC]/* | \
24763 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
24764 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
24765 /usr/ucb/* ) ;;
24766 *)
24767 # OSF1 and SCO ODT 3.0 have their own names for install.
24768 # Don't use installbsd from OSF since it installs stuff as root
24769 # by default.
24770 for ac_prog in ginstall scoinst install; do
24771 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 24772 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
c971b7fa
PA
24773 if test $ac_prog = install &&
24774 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
24775 # AIX install. It has an incompatible calling convention.
24776 :
24777 elif test $ac_prog = install &&
24778 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
24779 # program-specific install script used by HP pwplus--don't use.
24780 :
24781 else
24782 rm -rf conftest.one conftest.two conftest.dir
24783 echo one > conftest.one
24784 echo two > conftest.two
24785 mkdir conftest.dir
24786 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
24787 test -s conftest.one && test -s conftest.two &&
24788 test -s conftest.dir/conftest.one &&
24789 test -s conftest.dir/conftest.two
24790 then
24791 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
24792 break 3
24793 fi
24794 fi
24795 fi
24796 done
24797 done
24798 ;;
24799esac
24800
24801 done
24802IFS=$as_save_IFS
24803
24804rm -rf conftest.one conftest.two conftest.dir
24805
24806fi
24807 if test "${ac_cv_path_install+set}" = set; then
24808 INSTALL=$ac_cv_path_install
24809 else
24810 # As a last resort, use the slow shell script. Don't cache a
24811 # value for INSTALL within a source directory, because that will
24812 # break other packages using the cache if that directory is
24813 # removed, or if the value is a relative name.
24814 INSTALL=$ac_install_sh
24815 fi
24816fi
24817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
24818$as_echo "$INSTALL" >&6; }
24819
24820# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
24821# It thinks the first close brace ends the variable substitution.
24822test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
24823
24824test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
24825
24826test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
24827
24828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
24829$as_echo_n "checking whether build environment is sane... " >&6; }
c971b7fa
PA
24830# Reject unsafe characters in $srcdir or the absolute working directory
24831# name. Accept space and tab only in the latter.
24832am_lf='
24833'
24834case `pwd` in
24835 *[\\\"\#\$\&\'\`$am_lf]*)
d0ac1c44 24836 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
c971b7fa
PA
24837esac
24838case $srcdir in
24839 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
d0ac1c44 24840 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
c971b7fa
PA
24841esac
24842
d0ac1c44 24843# Do 'set' in a subshell so we don't clobber the current shell's
c971b7fa
PA
24844# arguments. Must try -L first in case configure is actually a
24845# symlink; some systems play weird games with the mod time of symlinks
24846# (eg FreeBSD returns the mod time of the symlink's containing
24847# directory).
24848if (
d0ac1c44
SM
24849 am_has_slept=no
24850 for am_try in 1 2; do
24851 echo "timestamp, slept: $am_has_slept" > conftest.file
24852 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
24853 if test "$*" = "X"; then
24854 # -L didn't work.
24855 set X `ls -t "$srcdir/configure" conftest.file`
24856 fi
24857 if test "$*" != "X $srcdir/configure conftest.file" \
24858 && test "$*" != "X conftest.file $srcdir/configure"; then
24859
24860 # If neither matched, then we have a broken ls. This can happen
24861 # if, for instance, CONFIG_SHELL is bash and it inherits a
24862 # broken ls alias from the environment. This has actually
24863 # happened. Such a system could not be considered "sane".
24864 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
24865 alias in your environment" "$LINENO" 5
24866 fi
24867 if test "$2" = conftest.file || test $am_try -eq 2; then
24868 break
24869 fi
24870 # Just in case.
24871 sleep 1
24872 am_has_slept=yes
24873 done
c971b7fa
PA
24874 test "$2" = conftest.file
24875 )
24876then
24877 # Ok.
24878 :
24879else
d0ac1c44 24880 as_fn_error $? "newly created file is older than distributed files!
c971b7fa
PA
24881Check your system clock" "$LINENO" 5
24882fi
24883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24884$as_echo "yes" >&6; }
d0ac1c44
SM
24885# If we didn't sleep, we still need to ensure time stamps of config.status and
24886# generated files are strictly newer.
24887am_sleep_pid=
24888if grep 'slept: no' conftest.file >/dev/null 2>&1; then
24889 ( sleep 1 ) &
24890 am_sleep_pid=$!
24891fi
24892
24893rm -f conftest.file
24894
c971b7fa
PA
24895test "$program_prefix" != NONE &&
24896 program_transform_name="s&^&$program_prefix&;$program_transform_name"
24897# Use a double $ so make ignores it.
24898test "$program_suffix" != NONE &&
24899 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
24900# Double any \ or $.
24901# By default was `s,x,x', remove it if useless.
24902ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
24903program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
24904
c971b7fa
PA
24905if test x"${MISSING+set}" != xset; then
24906 case $am_aux_dir in
24907 *\ * | *\ *)
24908 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
24909 *)
24910 MISSING="\${SHELL} $am_aux_dir/missing" ;;
24911 esac
24912fi
24913# Use eval to expand $SHELL
d0ac1c44
SM
24914if eval "$MISSING --is-lightweight"; then
24915 am_missing_run="$MISSING "
c971b7fa
PA
24916else
24917 am_missing_run=
d0ac1c44
SM
24918 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
24919$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
c971b7fa
PA
24920fi
24921
d0ac1c44 24922if test x"${install_sh+set}" != xset; then
c971b7fa
PA
24923 case $am_aux_dir in
24924 *\ * | *\ *)
24925 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
24926 *)
24927 install_sh="\${SHELL} $am_aux_dir/install-sh"
24928 esac
24929fi
24930
d0ac1c44
SM
24931# Installed binaries are usually stripped using 'strip' when the user
24932# run "make install-strip". However 'strip' might not be the right
c971b7fa 24933# tool to use in cross-compilation environments, therefore Automake
d0ac1c44 24934# will honor the 'STRIP' environment variable to overrule this program.
c971b7fa
PA
24935if test "$cross_compiling" != no; then
24936 if test -n "$ac_tool_prefix"; then
24937 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
24938set dummy ${ac_tool_prefix}strip; ac_word=$2
24939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24940$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 24941if ${ac_cv_prog_STRIP+:} false; then :
c971b7fa
PA
24942 $as_echo_n "(cached) " >&6
24943else
24944 if test -n "$STRIP"; then
24945 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
24946else
24947as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24948for as_dir in $PATH
24949do
24950 IFS=$as_save_IFS
24951 test -z "$as_dir" && as_dir=.
24952 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 24953 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
24954 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
24955 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24956 break 2
24957 fi
24958done
24959 done
24960IFS=$as_save_IFS
24961
24962fi
24963fi
24964STRIP=$ac_cv_prog_STRIP
24965if test -n "$STRIP"; then
24966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
24967$as_echo "$STRIP" >&6; }
24968else
24969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24970$as_echo "no" >&6; }
24971fi
24972
24973
24974fi
24975if test -z "$ac_cv_prog_STRIP"; then
24976 ac_ct_STRIP=$STRIP
24977 # Extract the first word of "strip", so it can be a program name with args.
24978set dummy strip; ac_word=$2
24979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24980$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 24981if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
c971b7fa
PA
24982 $as_echo_n "(cached) " >&6
24983else
24984 if test -n "$ac_ct_STRIP"; then
24985 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
24986else
24987as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24988for as_dir in $PATH
24989do
24990 IFS=$as_save_IFS
24991 test -z "$as_dir" && as_dir=.
24992 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 24993 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
24994 ac_cv_prog_ac_ct_STRIP="strip"
24995 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24996 break 2
24997 fi
24998done
24999 done
25000IFS=$as_save_IFS
25001
25002fi
25003fi
25004ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
25005if test -n "$ac_ct_STRIP"; then
25006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
25007$as_echo "$ac_ct_STRIP" >&6; }
25008else
25009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25010$as_echo "no" >&6; }
25011fi
25012
25013 if test "x$ac_ct_STRIP" = x; then
25014 STRIP=":"
25015 else
25016 case $cross_compiling:$ac_tool_warned in
25017yes:)
25018{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25019$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25020ac_tool_warned=yes ;;
25021esac
25022 STRIP=$ac_ct_STRIP
25023 fi
25024else
25025 STRIP="$ac_cv_prog_STRIP"
25026fi
25027
25028fi
25029INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
25030
c971b7fa
PA
25031for ac_prog in gawk mawk nawk awk
25032do
25033 # Extract the first word of "$ac_prog", so it can be a program name with args.
25034set dummy $ac_prog; ac_word=$2
25035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25036$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 25037if ${ac_cv_prog_AWK+:} false; then :
c971b7fa
PA
25038 $as_echo_n "(cached) " >&6
25039else
25040 if test -n "$AWK"; then
25041 ac_cv_prog_AWK="$AWK" # Let the user override the test.
25042else
25043as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25044for as_dir in $PATH
25045do
25046 IFS=$as_save_IFS
25047 test -z "$as_dir" && as_dir=.
25048 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 25049 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
25050 ac_cv_prog_AWK="$ac_prog"
25051 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25052 break 2
25053 fi
25054done
25055 done
25056IFS=$as_save_IFS
25057
25058fi
25059fi
25060AWK=$ac_cv_prog_AWK
25061if test -n "$AWK"; then
25062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
25063$as_echo "$AWK" >&6; }
25064else
25065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25066$as_echo "no" >&6; }
25067fi
25068
25069
25070 test -n "$AWK" && break
25071done
25072
25073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
25074$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
25075set x ${MAKE-make}
25076ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
d0ac1c44 25077if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
c971b7fa
PA
25078 $as_echo_n "(cached) " >&6
25079else
25080 cat >conftest.make <<\_ACEOF
25081SHELL = /bin/sh
25082all:
25083 @echo '@@@%%%=$(MAKE)=@@@%%%'
25084_ACEOF
d0ac1c44 25085# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
c971b7fa
PA
25086case `${MAKE-make} -f conftest.make 2>/dev/null` in
25087 *@@@%%%=?*=@@@%%%*)
25088 eval ac_cv_prog_make_${ac_make}_set=yes;;
25089 *)
25090 eval ac_cv_prog_make_${ac_make}_set=no;;
25091esac
25092rm -f conftest.make
25093fi
25094if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
25095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25096$as_echo "yes" >&6; }
25097 SET_MAKE=
25098else
25099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25100$as_echo "no" >&6; }
25101 SET_MAKE="MAKE=${MAKE-make}"
25102fi
25103
25104rm -rf .tst 2>/dev/null
25105mkdir .tst 2>/dev/null
25106if test -d .tst; then
25107 am__leading_dot=.
25108else
25109 am__leading_dot=_
25110fi
25111rmdir .tst 2>/dev/null
25112
25113DEPDIR="${am__leading_dot}deps"
25114
25115ac_config_commands="$ac_config_commands depfiles"
25116
25117
25118am_make=${MAKE-make}
25119cat > confinc << 'END'
25120am__doit:
25121 @echo this is the am__doit target
25122.PHONY: am__doit
25123END
25124# If we don't find an include directive, just comment out the code.
25125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
25126$as_echo_n "checking for style of include used by $am_make... " >&6; }
25127am__include="#"
25128am__quote=
25129_am_result=none
25130# First try GNU make style include.
25131echo "include confinc" > confmf
d0ac1c44 25132# Ignore all kinds of additional output from 'make'.
c971b7fa
PA
25133case `$am_make -s -f confmf 2> /dev/null` in #(
25134*the\ am__doit\ target*)
25135 am__include=include
25136 am__quote=
25137 _am_result=GNU
25138 ;;
25139esac
25140# Now try BSD make style include.
25141if test "$am__include" = "#"; then
25142 echo '.include "confinc"' > confmf
25143 case `$am_make -s -f confmf 2> /dev/null` in #(
25144 *the\ am__doit\ target*)
25145 am__include=.include
25146 am__quote="\""
25147 _am_result=BSD
25148 ;;
25149 esac
25150fi
25151
25152
25153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
25154$as_echo "$_am_result" >&6; }
25155rm -f confinc confmf
25156
25157# Check whether --enable-dependency-tracking was given.
25158if test "${enable_dependency_tracking+set}" = set; then :
25159 enableval=$enable_dependency_tracking;
25160fi
25161
25162if test "x$enable_dependency_tracking" != xno; then
25163 am_depcomp="$ac_aux_dir/depcomp"
25164 AMDEPBACKSLASH='\'
d0ac1c44 25165 am__nodep='_no'
c971b7fa
PA
25166fi
25167 if test "x$enable_dependency_tracking" != xno; then
25168 AMDEP_TRUE=
25169 AMDEP_FALSE='#'
25170else
25171 AMDEP_TRUE='#'
25172 AMDEP_FALSE=
25173fi
25174
25175
d0ac1c44
SM
25176# Check whether --enable-silent-rules was given.
25177if test "${enable_silent_rules+set}" = set; then :
25178 enableval=$enable_silent_rules;
25179fi
25180
25181case $enable_silent_rules in # (((
25182 yes) AM_DEFAULT_VERBOSITY=0;;
25183 no) AM_DEFAULT_VERBOSITY=1;;
25184 *) AM_DEFAULT_VERBOSITY=1;;
25185esac
25186am_make=${MAKE-make}
25187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
25188$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
25189if ${am_cv_make_support_nested_variables+:} false; then :
25190 $as_echo_n "(cached) " >&6
25191else
25192 if $as_echo 'TRUE=$(BAR$(V))
25193BAR0=false
25194BAR1=true
25195V=1
25196am__doit:
25197 @$(TRUE)
25198.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
25199 am_cv_make_support_nested_variables=yes
25200else
25201 am_cv_make_support_nested_variables=no
25202fi
25203fi
25204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
25205$as_echo "$am_cv_make_support_nested_variables" >&6; }
25206if test $am_cv_make_support_nested_variables = yes; then
25207 AM_V='$(V)'
25208 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
25209else
25210 AM_V=$AM_DEFAULT_VERBOSITY
25211 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
25212fi
25213AM_BACKSLASH='\'
25214
c971b7fa
PA
25215if test "`cd $srcdir && pwd`" != "`pwd`"; then
25216 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
25217 # is not polluted with repeated "-I."
25218 am__isrc=' -I$(srcdir)'
25219 # test to see if srcdir already configured
25220 if test -f $srcdir/config.status; then
d0ac1c44 25221 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
c971b7fa
PA
25222 fi
25223fi
25224
25225# test whether we have cygpath
25226if test -z "$CYGPATH_W"; then
25227 if (cygpath --version) >/dev/null 2>/dev/null; then
25228 CYGPATH_W='cygpath -w'
25229 else
25230 CYGPATH_W=echo
25231 fi
25232fi
25233
25234
25235# Define the identity of the package.
d0ac1c44
SM
25236 PACKAGE='libgnu'
25237 VERSION='UNUSED-VERSION'
c971b7fa
PA
25238
25239
25240# Some tools Automake needs.
25241
25242ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
25243
25244
25245AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
25246
25247
25248AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
25249
25250
25251AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
25252
25253
25254MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
25255
d0ac1c44
SM
25256# For better backward compatibility. To be removed once Automake 1.9.x
25257# dies out for good. For more background, see:
25258# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
25259# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
25260mkdir_p='$(MKDIR_P)'
25261
25262# We need awk for the "check" target (and possibly the TAP driver). The
25263# system "awk" is bad on some platforms.
25264# Always define AMTAR for backward compatibility. Yes, it's still used
25265# in the wild :-( We should find a proper way to deprecate it ...
25266AMTAR='$${TAR-tar}'
25267
25268
25269# We'll loop over all known methods to create a tar archive until one works.
25270_am_tools='gnutar pax cpio none'
c971b7fa 25271
d0ac1c44 25272am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
c971b7fa 25273
c971b7fa
PA
25274
25275
25276
25277
25278depcc="$CC" am_compiler_list=
25279
25280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
25281$as_echo_n "checking dependency style of $depcc... " >&6; }
d0ac1c44 25282if ${am_cv_CC_dependencies_compiler_type+:} false; then :
c971b7fa
PA
25283 $as_echo_n "(cached) " >&6
25284else
25285 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
25286 # We make a subdir and do the tests there. Otherwise we can end up
25287 # making bogus files that we don't know about and never remove. For
25288 # instance it was reported that on HP-UX the gcc test will end up
d0ac1c44
SM
25289 # making a dummy file named 'D' -- because '-MD' means "put the output
25290 # in D".
25291 rm -rf conftest.dir
c971b7fa
PA
25292 mkdir conftest.dir
25293 # Copy depcomp to subdir because otherwise we won't find it if we're
25294 # using a relative directory.
25295 cp "$am_depcomp" conftest.dir
25296 cd conftest.dir
25297 # We will build objects and dependencies in a subdirectory because
25298 # it helps to detect inapplicable dependency modes. For instance
25299 # both Tru64's cc and ICC support -MD to output dependencies as a
25300 # side effect of compilation, but ICC will put the dependencies in
25301 # the current directory while Tru64 will put them in the object
25302 # directory.
25303 mkdir sub
25304
25305 am_cv_CC_dependencies_compiler_type=none
25306 if test "$am_compiler_list" = ""; then
25307 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
25308 fi
25309 am__universal=false
25310 case " $depcc " in #(
25311 *\ -arch\ *\ -arch\ *) am__universal=true ;;
25312 esac
25313
25314 for depmode in $am_compiler_list; do
25315 # Setup a source with many dependencies, because some compilers
25316 # like to wrap large dependency lists on column 80 (with \), and
25317 # we should not choose a depcomp mode which is confused by this.
25318 #
25319 # We need to recreate these files for each test, as the compiler may
25320 # overwrite some of them when testing with obscure command lines.
25321 # This happens at least with the AIX C compiler.
25322 : > sub/conftest.c
25323 for i in 1 2 3 4 5 6; do
25324 echo '#include "conftst'$i'.h"' >> sub/conftest.c
d0ac1c44
SM
25325 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
25326 # Solaris 10 /bin/sh.
25327 echo '/* dummy */' > sub/conftst$i.h
c971b7fa
PA
25328 done
25329 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
25330
d0ac1c44 25331 # We check with '-c' and '-o' for the sake of the "dashmstdout"
c971b7fa 25332 # mode. It turns out that the SunPro C++ compiler does not properly
d0ac1c44
SM
25333 # handle '-M -o', and we need to detect this. Also, some Intel
25334 # versions had trouble with output in subdirs.
c971b7fa
PA
25335 am__obj=sub/conftest.${OBJEXT-o}
25336 am__minus_obj="-o $am__obj"
25337 case $depmode in
25338 gcc)
25339 # This depmode causes a compiler race in universal mode.
25340 test "$am__universal" = false || continue
25341 ;;
25342 nosideeffect)
d0ac1c44
SM
25343 # After this tag, mechanisms are not by side-effect, so they'll
25344 # only be used when explicitly requested.
c971b7fa
PA
25345 if test "x$enable_dependency_tracking" = xyes; then
25346 continue
25347 else
25348 break
25349 fi
25350 ;;
d0ac1c44
SM
25351 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
25352 # This compiler won't grok '-c -o', but also, the minuso test has
c971b7fa
PA
25353 # not run yet. These depmodes are late enough in the game, and
25354 # so weak that their functioning should not be impacted.
25355 am__obj=conftest.${OBJEXT-o}
25356 am__minus_obj=
25357 ;;
25358 none) break ;;
25359 esac
25360 if depmode=$depmode \
25361 source=sub/conftest.c object=$am__obj \
25362 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
25363 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
25364 >/dev/null 2>conftest.err &&
25365 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
25366 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
25367 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
25368 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
25369 # icc doesn't choke on unknown options, it will just issue warnings
25370 # or remarks (even with -Werror). So we grep stderr for any message
25371 # that says an option was ignored or not supported.
25372 # When given -MP, icc 7.0 and 7.1 complain thusly:
25373 # icc: Command line warning: ignoring option '-M'; no argument required
25374 # The diagnosis changed in icc 8.0:
25375 # icc: Command line remark: option '-MP' not supported
25376 if (grep 'ignoring option' conftest.err ||
25377 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
25378 am_cv_CC_dependencies_compiler_type=$depmode
25379 break
25380 fi
25381 fi
25382 done
25383
25384 cd ..
25385 rm -rf conftest.dir
25386else
25387 am_cv_CC_dependencies_compiler_type=none
25388fi
25389
25390fi
25391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
25392$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
25393CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
25394
25395 if
25396 test "x$enable_dependency_tracking" != xno \
25397 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
25398 am__fastdepCC_TRUE=
25399 am__fastdepCC_FALSE='#'
25400else
25401 am__fastdepCC_TRUE='#'
25402 am__fastdepCC_FALSE=
25403fi
25404
25405
25406
d0ac1c44
SM
25407# POSIX will say in a future version that running "rm -f" with no argument
25408# is OK; and we want to be able to make that assumption in our Makefile
25409# recipes. So use an aggressive probe to check that the usage we want is
25410# actually supported "in the wild" to an acceptable degree.
25411# See automake bug#10828.
25412# To make any issue more visible, cause the running configure to be aborted
25413# by default if the 'rm' program in use doesn't match our expectations; the
25414# user can still override this though.
25415if rm -f && rm -fr && rm -rf; then : OK; else
25416 cat >&2 <<'END'
25417Oops!
25418
25419Your 'rm' program seems unable to run without file operands specified
25420on the command line, even when the '-f' option is present. This is contrary
25421to the behaviour of most rm programs out there, and not conforming with
25422the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
25423
25424Please tell bug-automake@gnu.org about your system, including the value
25425of your $PATH and any error possibly output before this message. This
25426can help us improve future automake versions.
25427
25428END
25429 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
25430 echo 'Configuration will proceed anyway, since you have set the' >&2
25431 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
25432 echo >&2
25433 else
25434 cat >&2 <<'END'
25435Aborting the configuration process, to ensure you take notice of the issue.
25436
25437You can download and install GNU coreutils to get an 'rm' implementation
25438that behaves properly: <http://www.gnu.org/software/coreutils/>.
25439
25440If you want to complete the configuration process using your problematic
25441'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
25442to "yes", and re-run configure.
25443
25444END
25445 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
25446 fi
25447fi
25448
c971b7fa 25449
39be3c7e
SM
25450# Check whether --enable-silent-rules was given.
25451if test "${enable_silent_rules+set}" = set; then :
25452 enableval=$enable_silent_rules;
25453fi
25454
d0ac1c44
SM
25455case $enable_silent_rules in # (((
25456 yes) AM_DEFAULT_VERBOSITY=0;;
25457 no) AM_DEFAULT_VERBOSITY=1;;
25458 *) AM_DEFAULT_VERBOSITY=0;;
39be3c7e 25459esac
d0ac1c44
SM
25460am_make=${MAKE-make}
25461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
25462$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
25463if ${am_cv_make_support_nested_variables+:} false; then :
25464 $as_echo_n "(cached) " >&6
25465else
25466 if $as_echo 'TRUE=$(BAR$(V))
25467BAR0=false
25468BAR1=true
25469V=1
25470am__doit:
25471 @$(TRUE)
25472.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
25473 am_cv_make_support_nested_variables=yes
25474else
25475 am_cv_make_support_nested_variables=no
25476fi
25477fi
25478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
25479$as_echo "$am_cv_make_support_nested_variables" >&6; }
25480if test $am_cv_make_support_nested_variables = yes; then
25481 AM_V='$(V)'
25482 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
25483else
25484 AM_V=$AM_DEFAULT_VERBOSITY
25485 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
25486fi
39be3c7e
SM
25487AM_BACKSLASH='\'
25488
25489
c971b7fa
PA
25490# --------------------- #
25491# Checks for programs. #
25492# --------------------- #
25493
25494
25495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
25496$as_echo_n "checking whether ln -s works... " >&6; }
25497LN_S=$as_ln_s
25498if test "$LN_S" = "ln -s"; then
25499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25500$as_echo "yes" >&6; }
25501else
25502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
25503$as_echo "no, using $LN_S" >&6; }
25504fi
25505
25506if test -n "$ac_tool_prefix"; then
25507 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
25508set dummy ${ac_tool_prefix}ranlib; ac_word=$2
25509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25510$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 25511if ${ac_cv_prog_RANLIB+:} false; then :
c971b7fa
PA
25512 $as_echo_n "(cached) " >&6
25513else
25514 if test -n "$RANLIB"; then
25515 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
25516else
25517as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25518for as_dir in $PATH
25519do
25520 IFS=$as_save_IFS
25521 test -z "$as_dir" && as_dir=.
25522 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 25523 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
25524 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
25525 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25526 break 2
25527 fi
25528done
25529 done
25530IFS=$as_save_IFS
25531
25532fi
25533fi
25534RANLIB=$ac_cv_prog_RANLIB
25535if test -n "$RANLIB"; then
25536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
25537$as_echo "$RANLIB" >&6; }
25538else
25539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25540$as_echo "no" >&6; }
25541fi
25542
25543
25544fi
25545if test -z "$ac_cv_prog_RANLIB"; then
25546 ac_ct_RANLIB=$RANLIB
25547 # Extract the first word of "ranlib", so it can be a program name with args.
25548set dummy ranlib; ac_word=$2
25549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25550$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 25551if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
c971b7fa
PA
25552 $as_echo_n "(cached) " >&6
25553else
25554 if test -n "$ac_ct_RANLIB"; then
25555 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
25556else
25557as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25558for as_dir in $PATH
25559do
25560 IFS=$as_save_IFS
25561 test -z "$as_dir" && as_dir=.
25562 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 25563 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
25564 ac_cv_prog_ac_ct_RANLIB="ranlib"
25565 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25566 break 2
25567 fi
25568done
25569 done
25570IFS=$as_save_IFS
25571
25572fi
25573fi
25574ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
25575if test -n "$ac_ct_RANLIB"; then
25576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
25577$as_echo "$ac_ct_RANLIB" >&6; }
25578else
25579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25580$as_echo "no" >&6; }
25581fi
25582
25583 if test "x$ac_ct_RANLIB" = x; then
25584 RANLIB=":"
25585 else
25586 case $cross_compiling:$ac_tool_warned in
25587yes:)
25588{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25589$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25590ac_tool_warned=yes ;;
25591esac
25592 RANLIB=$ac_ct_RANLIB
25593 fi
25594else
25595 RANLIB="$ac_cv_prog_RANLIB"
25596fi
25597
25598
25599if test -n "$ac_tool_prefix"; then
25600 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
25601set dummy ${ac_tool_prefix}ar; ac_word=$2
25602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25603$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 25604if ${ac_cv_prog_AR+:} false; then :
c971b7fa
PA
25605 $as_echo_n "(cached) " >&6
25606else
25607 if test -n "$AR"; then
25608 ac_cv_prog_AR="$AR" # Let the user override the test.
25609else
25610as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25611for as_dir in $PATH
25612do
25613 IFS=$as_save_IFS
25614 test -z "$as_dir" && as_dir=.
25615 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 25616 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
25617 ac_cv_prog_AR="${ac_tool_prefix}ar"
25618 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25619 break 2
25620 fi
25621done
25622 done
25623IFS=$as_save_IFS
25624
25625fi
25626fi
25627AR=$ac_cv_prog_AR
25628if test -n "$AR"; then
25629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
25630$as_echo "$AR" >&6; }
25631else
25632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25633$as_echo "no" >&6; }
25634fi
25635
25636
25637fi
25638if test -z "$ac_cv_prog_AR"; then
25639 ac_ct_AR=$AR
25640 # Extract the first word of "ar", so it can be a program name with args.
25641set dummy ar; ac_word=$2
25642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25643$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 25644if ${ac_cv_prog_ac_ct_AR+:} false; then :
c971b7fa
PA
25645 $as_echo_n "(cached) " >&6
25646else
25647 if test -n "$ac_ct_AR"; then
25648 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
25649else
25650as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25651for as_dir in $PATH
25652do
25653 IFS=$as_save_IFS
25654 test -z "$as_dir" && as_dir=.
25655 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 25656 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
25657 ac_cv_prog_ac_ct_AR="ar"
25658 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25659 break 2
25660 fi
25661done
25662 done
25663IFS=$as_save_IFS
25664
25665fi
25666fi
25667ac_ct_AR=$ac_cv_prog_ac_ct_AR
25668if test -n "$ac_ct_AR"; then
25669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
25670$as_echo "$ac_ct_AR" >&6; }
25671else
25672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25673$as_echo "no" >&6; }
25674fi
25675
25676 if test "x$ac_ct_AR" = x; then
25677 AR=""
25678 else
25679 case $cross_compiling:$ac_tool_warned in
25680yes:)
25681{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25682$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25683ac_tool_warned=yes ;;
25684esac
25685 AR=$ac_ct_AR
25686 fi
25687else
25688 AR="$ac_cv_prog_AR"
25689fi
25690
25691
25692# ---------------------- #
25693# Checks for libraries. #
25694# ---------------------- #
25695
25696ac_config_files="$ac_config_files Makefile import/Makefile"
25697
25698ac_config_commands="$ac_config_commands default"
25699
25700cat >confcache <<\_ACEOF
25701# This file is a shell script that caches the results of configure
25702# tests run on this system so they can be shared between configure
25703# scripts and configure runs, see configure's option --config-cache.
25704# It is not useful on other systems. If it contains results you don't
25705# want to keep, you may remove or edit it.
25706#
25707# config.status only pays attention to the cache file if you give it
25708# the --recheck option to rerun configure.
25709#
25710# `ac_cv_env_foo' variables (set or unset) will be overridden when
25711# loading this file, other *unset* `ac_cv_foo' will be assigned the
25712# following values.
25713
25714_ACEOF
25715
25716# The following way of writing the cache mishandles newlines in values,
25717# but we know of no workaround that is simple, portable, and efficient.
25718# So, we kill variables containing newlines.
25719# Ultrix sh set writes to stderr and can't be redirected directly,
25720# and sets the high bit in the cache file unless we assign to the vars.
25721(
25722 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
25723 eval ac_val=\$$ac_var
25724 case $ac_val in #(
25725 *${as_nl}*)
25726 case $ac_var in #(
25727 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
25728$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
25729 esac
25730 case $ac_var in #(
25731 _ | IFS | as_nl) ;; #(
25732 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
25733 *) { eval $ac_var=; unset $ac_var;} ;;
25734 esac ;;
25735 esac
25736 done
25737
25738 (set) 2>&1 |
25739 case $as_nl`(ac_space=' '; set) 2>&1` in #(
25740 *${as_nl}ac_space=\ *)
25741 # `set' does not quote correctly, so add quotes: double-quote
25742 # substitution turns \\\\ into \\, and sed turns \\ into \.
25743 sed -n \
25744 "s/'/'\\\\''/g;
25745 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
25746 ;; #(
25747 *)
25748 # `set' quotes correctly as required by POSIX, so do not add quotes.
25749 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
25750 ;;
25751 esac |
25752 sort
25753) |
25754 sed '
25755 /^ac_cv_env_/b end
25756 t clear
25757 :clear
25758 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
25759 t end
25760 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25761 :end' >>confcache
25762if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
25763 if test -w "$cache_file"; then
d0ac1c44 25764 if test "x$cache_file" != "x/dev/null"; then
c971b7fa
PA
25765 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
25766$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
25767 if test ! -f "$cache_file" || test -h "$cache_file"; then
25768 cat confcache >"$cache_file"
25769 else
25770 case $cache_file in #(
25771 */* | ?:*)
25772 mv -f confcache "$cache_file"$$ &&
25773 mv -f "$cache_file"$$ "$cache_file" ;; #(
25774 *)
25775 mv -f confcache "$cache_file" ;;
25776 esac
25777 fi
25778 fi
c971b7fa
PA
25779 else
25780 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
25781$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
25782 fi
25783fi
25784rm -f confcache
25785
25786test "x$prefix" = xNONE && prefix=$ac_default_prefix
25787# Let make expand exec_prefix.
25788test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25789
25790DEFS=-DHAVE_CONFIG_H
25791
25792ac_libobjs=
25793ac_ltlibobjs=
25794for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25795 # 1. Remove the extension, and $U if already installed.
25796 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
25797 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
25798 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
25799 # will be set to the directory where LIBOBJS objects are built.
25800 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25801 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
25802done
25803LIBOBJS=$ac_libobjs
25804
25805LTLIBOBJS=$ac_ltlibobjs
25806
25807
25808if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 25809 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
c971b7fa
PA
25810Usually this means the macro was only invoked conditionally." "$LINENO" 5
25811fi
25812if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
d0ac1c44 25813 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
c971b7fa
PA
25814Usually this means the macro was only invoked conditionally." "$LINENO" 5
25815fi
8690e634 25816if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
d0ac1c44 25817 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
8690e634
JK
25818Usually this means the macro was only invoked conditionally." "$LINENO" 5
25819fi
18848e28 25820if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
d0ac1c44 25821 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
18848e28
GF
25822Usually this means the macro was only invoked conditionally." "$LINENO" 5
25823fi
88b48903 25824if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
d0ac1c44 25825 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
88b48903
WN
25826Usually this means the macro was only invoked conditionally." "$LINENO" 5
25827fi
8690e634 25828if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
d0ac1c44 25829 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
8690e634
JK
25830Usually this means the macro was only invoked conditionally." "$LINENO" 5
25831fi
6ec2e0f5 25832if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
d0ac1c44 25833 as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined.
6ec2e0f5
SDJ
25834Usually this means the macro was only invoked conditionally." "$LINENO" 5
25835fi
49e4877c 25836if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
d0ac1c44 25837 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
49e4877c
PA
25838Usually this means the macro was only invoked conditionally." "$LINENO" 5
25839fi
25840if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
d0ac1c44 25841 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
49e4877c
PA
25842Usually this means the macro was only invoked conditionally." "$LINENO" 5
25843fi
c971b7fa 25844if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
d0ac1c44 25845 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
c971b7fa
PA
25846Usually this means the macro was only invoked conditionally." "$LINENO" 5
25847fi
88b48903
WN
25848
25849
8690e634 25850if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
d0ac1c44 25851 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
8690e634
JK
25852Usually this means the macro was only invoked conditionally." "$LINENO" 5
25853fi
c971b7fa 25854if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
d0ac1c44 25855 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
c971b7fa
PA
25856Usually this means the macro was only invoked conditionally." "$LINENO" 5
25857fi
25858
25859 gl_libobjs=
25860 gl_ltlibobjs=
25861 if test -n "$gl_LIBOBJS"; then
25862 # Remove the extension.
25863 sed_drop_objext='s/\.o$//;s/\.obj$//'
25864 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
25865 gl_libobjs="$gl_libobjs $i.$ac_objext"
25866 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
25867 done
25868 fi
25869 gl_LIBOBJS=$gl_libobjs
25870
25871 gl_LTLIBOBJS=$gl_ltlibobjs
25872
25873
25874
25875 gltests_libobjs=
25876 gltests_ltlibobjs=
25877 if test -n "$gltests_LIBOBJS"; then
25878 # Remove the extension.
25879 sed_drop_objext='s/\.o$//;s/\.obj$//'
25880 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
25881 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
25882 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
25883 done
25884 fi
25885 gltests_LIBOBJS=$gltests_libobjs
25886
25887 gltests_LTLIBOBJS=$gltests_ltlibobjs
25888
25889
d0ac1c44
SM
25890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
25891$as_echo_n "checking that generated files are newer than configure... " >&6; }
25892 if test -n "$am_sleep_pid"; then
25893 # Hide warnings about reused PIDs.
25894 wait $am_sleep_pid 2>/dev/null
25895 fi
25896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
25897$as_echo "done" >&6; }
c971b7fa 25898if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
d0ac1c44 25899 as_fn_error $? "conditional \"AMDEP\" was never defined.
c971b7fa
PA
25900Usually this means the macro was only invoked conditionally." "$LINENO" 5
25901fi
25902if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
d0ac1c44 25903 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
c971b7fa
PA
25904Usually this means the macro was only invoked conditionally." "$LINENO" 5
25905fi
25906 if test -n "$EXEEXT"; then
25907 am__EXEEXT_TRUE=
25908 am__EXEEXT_FALSE='#'
25909else
25910 am__EXEEXT_TRUE='#'
25911 am__EXEEXT_FALSE=
25912fi
25913
25914
d0ac1c44 25915: "${CONFIG_STATUS=./config.status}"
c971b7fa
PA
25916ac_write_fail=0
25917ac_clean_files_save=$ac_clean_files
25918ac_clean_files="$ac_clean_files $CONFIG_STATUS"
25919{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
25920$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
25921as_write_fail=0
25922cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
25923#! $SHELL
25924# Generated by $as_me.
25925# Run this file to recreate the current configuration.
25926# Compiler output produced by configure, useful for debugging
25927# configure, is in config.log if it exists.
25928
25929debug=false
25930ac_cs_recheck=false
25931ac_cs_silent=false
25932
25933SHELL=\${CONFIG_SHELL-$SHELL}
25934export SHELL
25935_ASEOF
25936cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
25937## -------------------- ##
25938## M4sh Initialization. ##
25939## -------------------- ##
25940
25941# Be more Bourne compatible
25942DUALCASE=1; export DUALCASE # for MKS sh
25943if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
25944 emulate sh
25945 NULLCMD=:
25946 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25947 # is contrary to our usage. Disable this feature.
25948 alias -g '${1+"$@"}'='"$@"'
25949 setopt NO_GLOB_SUBST
25950else
25951 case `(set -o) 2>/dev/null` in #(
25952 *posix*) :
25953 set -o posix ;; #(
25954 *) :
25955 ;;
25956esac
25957fi
25958
25959
25960as_nl='
25961'
25962export as_nl
25963# Printing a long string crashes Solaris 7 /usr/bin/printf.
25964as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
25965as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
25966as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
25967# Prefer a ksh shell builtin over an external printf program on Solaris,
25968# but without wasting forks for bash or zsh.
25969if test -z "$BASH_VERSION$ZSH_VERSION" \
25970 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
25971 as_echo='print -r --'
25972 as_echo_n='print -rn --'
25973elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
25974 as_echo='printf %s\n'
25975 as_echo_n='printf %s'
25976else
25977 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
25978 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
25979 as_echo_n='/usr/ucb/echo -n'
25980 else
25981 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
25982 as_echo_n_body='eval
25983 arg=$1;
25984 case $arg in #(
25985 *"$as_nl"*)
25986 expr "X$arg" : "X\\(.*\\)$as_nl";
25987 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
25988 esac;
25989 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
25990 '
25991 export as_echo_n_body
25992 as_echo_n='sh -c $as_echo_n_body as_echo'
25993 fi
25994 export as_echo_body
25995 as_echo='sh -c $as_echo_body as_echo'
25996fi
25997
25998# The user is always right.
25999if test "${PATH_SEPARATOR+set}" != set; then
26000 PATH_SEPARATOR=:
26001 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
26002 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
26003 PATH_SEPARATOR=';'
26004 }
26005fi
26006
26007
26008# IFS
26009# We need space, tab and new line, in precisely that order. Quoting is
26010# there to prevent editors from complaining about space-tab.
26011# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26012# splitting by setting IFS to empty value.)
26013IFS=" "" $as_nl"
26014
26015# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 26016as_myself=
c971b7fa
PA
26017case $0 in #((
26018 *[\\/]* ) as_myself=$0 ;;
26019 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26020for as_dir in $PATH
26021do
26022 IFS=$as_save_IFS
26023 test -z "$as_dir" && as_dir=.
26024 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26025 done
26026IFS=$as_save_IFS
26027
26028 ;;
26029esac
26030# We did not find ourselves, most probably we were run as `sh COMMAND'
26031# in which case we are not to be found in the path.
26032if test "x$as_myself" = x; then
26033 as_myself=$0
26034fi
26035if test ! -f "$as_myself"; then
26036 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
26037 exit 1
26038fi
26039
26040# Unset variables that we do not need and which cause bugs (e.g. in
26041# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
26042# suppresses any "Segmentation fault" message there. '((' could
26043# trigger a bug in pdksh 5.2.14.
26044for as_var in BASH_ENV ENV MAIL MAILPATH
26045do eval test x\${$as_var+set} = xset \
26046 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
26047done
26048PS1='$ '
26049PS2='> '
26050PS4='+ '
26051
26052# NLS nuisances.
26053LC_ALL=C
26054export LC_ALL
26055LANGUAGE=C
26056export LANGUAGE
26057
26058# CDPATH.
26059(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
26060
26061
d0ac1c44
SM
26062# as_fn_error STATUS ERROR [LINENO LOG_FD]
26063# ----------------------------------------
c971b7fa
PA
26064# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
26065# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 26066# script with STATUS, using 1 if that was 0.
c971b7fa
PA
26067as_fn_error ()
26068{
d0ac1c44
SM
26069 as_status=$1; test $as_status -eq 0 && as_status=1
26070 if test "$4"; then
26071 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
26072 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
c971b7fa 26073 fi
d0ac1c44 26074 $as_echo "$as_me: error: $2" >&2
c971b7fa
PA
26075 as_fn_exit $as_status
26076} # as_fn_error
26077
26078
26079# as_fn_set_status STATUS
26080# -----------------------
26081# Set $? to STATUS, without forking.
26082as_fn_set_status ()
26083{
26084 return $1
26085} # as_fn_set_status
26086
26087# as_fn_exit STATUS
26088# -----------------
26089# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
26090as_fn_exit ()
26091{
26092 set +e
26093 as_fn_set_status $1
26094 exit $1
26095} # as_fn_exit
26096
26097# as_fn_unset VAR
26098# ---------------
26099# Portably unset VAR.
26100as_fn_unset ()
26101{
26102 { eval $1=; unset $1;}
26103}
26104as_unset=as_fn_unset
26105# as_fn_append VAR VALUE
26106# ----------------------
26107# Append the text in VALUE to the end of the definition contained in VAR. Take
26108# advantage of any shell optimizations that allow amortized linear growth over
26109# repeated appends, instead of the typical quadratic growth present in naive
26110# implementations.
26111if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
26112 eval 'as_fn_append ()
26113 {
26114 eval $1+=\$2
26115 }'
26116else
26117 as_fn_append ()
26118 {
26119 eval $1=\$$1\$2
26120 }
26121fi # as_fn_append
26122
26123# as_fn_arith ARG...
26124# ------------------
26125# Perform arithmetic evaluation on the ARGs, and store the result in the
26126# global $as_val. Take advantage of shells that can avoid forks. The arguments
26127# must be portable across $(()) and expr.
26128if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
26129 eval 'as_fn_arith ()
26130 {
26131 as_val=$(( $* ))
26132 }'
26133else
26134 as_fn_arith ()
26135 {
26136 as_val=`expr "$@" || test $? -eq 1`
26137 }
26138fi # as_fn_arith
26139
26140
26141if expr a : '\(a\)' >/dev/null 2>&1 &&
26142 test "X`expr 00001 : '.*\(...\)'`" = X001; then
26143 as_expr=expr
26144else
26145 as_expr=false
26146fi
26147
26148if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
26149 as_basename=basename
26150else
26151 as_basename=false
26152fi
26153
26154if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
26155 as_dirname=dirname
26156else
26157 as_dirname=false
26158fi
26159
26160as_me=`$as_basename -- "$0" ||
26161$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26162 X"$0" : 'X\(//\)$' \| \
26163 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
26164$as_echo X/"$0" |
26165 sed '/^.*\/\([^/][^/]*\)\/*$/{
26166 s//\1/
26167 q
26168 }
26169 /^X\/\(\/\/\)$/{
26170 s//\1/
26171 q
26172 }
26173 /^X\/\(\/\).*/{
26174 s//\1/
26175 q
26176 }
26177 s/.*/./; q'`
26178
26179# Avoid depending upon Character Ranges.
26180as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26181as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26182as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26183as_cr_digits='0123456789'
26184as_cr_alnum=$as_cr_Letters$as_cr_digits
26185
26186ECHO_C= ECHO_N= ECHO_T=
26187case `echo -n x` in #(((((
26188-n*)
26189 case `echo 'xy\c'` in
26190 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
26191 xy) ECHO_C='\c';;
26192 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
26193 ECHO_T=' ';;
26194 esac;;
26195*)
26196 ECHO_N='-n';;
26197esac
26198
26199rm -f conf$$ conf$$.exe conf$$.file
26200if test -d conf$$.dir; then
26201 rm -f conf$$.dir/conf$$.file
26202else
26203 rm -f conf$$.dir
26204 mkdir conf$$.dir 2>/dev/null
26205fi
26206if (echo >conf$$.file) 2>/dev/null; then
26207 if ln -s conf$$.file conf$$ 2>/dev/null; then
26208 as_ln_s='ln -s'
26209 # ... but there are two gotchas:
26210 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
26211 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 26212 # In both cases, we have to default to `cp -pR'.
c971b7fa 26213 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 26214 as_ln_s='cp -pR'
c971b7fa
PA
26215 elif ln conf$$.file conf$$ 2>/dev/null; then
26216 as_ln_s=ln
26217 else
d0ac1c44 26218 as_ln_s='cp -pR'
c971b7fa
PA
26219 fi
26220else
d0ac1c44 26221 as_ln_s='cp -pR'
c971b7fa
PA
26222fi
26223rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
26224rmdir conf$$.dir 2>/dev/null
26225
26226
26227# as_fn_mkdir_p
26228# -------------
26229# Create "$as_dir" as a directory, including parents if necessary.
26230as_fn_mkdir_p ()
26231{
26232
26233 case $as_dir in #(
26234 -*) as_dir=./$as_dir;;
26235 esac
26236 test -d "$as_dir" || eval $as_mkdir_p || {
26237 as_dirs=
26238 while :; do
26239 case $as_dir in #(
26240 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
26241 *) as_qdir=$as_dir;;
26242 esac
26243 as_dirs="'$as_qdir' $as_dirs"
26244 as_dir=`$as_dirname -- "$as_dir" ||
26245$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26246 X"$as_dir" : 'X\(//\)[^/]' \| \
26247 X"$as_dir" : 'X\(//\)$' \| \
26248 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
26249$as_echo X"$as_dir" |
26250 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26251 s//\1/
26252 q
26253 }
26254 /^X\(\/\/\)[^/].*/{
26255 s//\1/
26256 q
26257 }
26258 /^X\(\/\/\)$/{
26259 s//\1/
26260 q
26261 }
26262 /^X\(\/\).*/{
26263 s//\1/
26264 q
26265 }
26266 s/.*/./; q'`
26267 test -d "$as_dir" && break
26268 done
26269 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 26270 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
c971b7fa
PA
26271
26272
26273} # as_fn_mkdir_p
26274if mkdir -p . 2>/dev/null; then
26275 as_mkdir_p='mkdir -p "$as_dir"'
26276else
26277 test -d ./-p && rmdir ./-p
26278 as_mkdir_p=false
26279fi
26280
d0ac1c44
SM
26281
26282# as_fn_executable_p FILE
26283# -----------------------
26284# Test if FILE is an executable regular file.
26285as_fn_executable_p ()
26286{
26287 test -f "$1" && test -x "$1"
26288} # as_fn_executable_p
26289as_test_x='test -x'
26290as_executable_p=as_fn_executable_p
c971b7fa
PA
26291
26292# Sed expression to map a string onto a valid CPP name.
26293as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
26294
26295# Sed expression to map a string onto a valid variable name.
26296as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
26297
26298
26299exec 6>&1
26300## ----------------------------------- ##
26301## Main body of $CONFIG_STATUS script. ##
26302## ----------------------------------- ##
26303_ASEOF
26304test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
26305
26306cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26307# Save the log message, to keep $0 and so on meaningful, and to
26308# report actual input values of CONFIG_FILES etc. instead of their
26309# values after options handling.
26310ac_log="
d0ac1c44
SM
26311This file was extended by libgnu $as_me UNUSED-VERSION, which was
26312generated by GNU Autoconf 2.69. Invocation command line was
c971b7fa
PA
26313
26314 CONFIG_FILES = $CONFIG_FILES
26315 CONFIG_HEADERS = $CONFIG_HEADERS
26316 CONFIG_LINKS = $CONFIG_LINKS
26317 CONFIG_COMMANDS = $CONFIG_COMMANDS
26318 $ $0 $@
26319
26320on `(hostname || uname -n) 2>/dev/null | sed 1q`
26321"
26322
26323_ACEOF
26324
26325case $ac_config_files in *"
26326"*) set x $ac_config_files; shift; ac_config_files=$*;;
26327esac
26328
26329case $ac_config_headers in *"
26330"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
26331esac
26332
26333
26334cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26335# Files that config.status was made for.
26336config_files="$ac_config_files"
26337config_headers="$ac_config_headers"
26338config_commands="$ac_config_commands"
26339
26340_ACEOF
26341
26342cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26343ac_cs_usage="\
26344\`$as_me' instantiates files and other configuration actions
26345from templates according to the current configuration. Unless the files
26346and actions are specified as TAGs, all are instantiated by default.
26347
26348Usage: $0 [OPTION]... [TAG]...
26349
26350 -h, --help print this help, then exit
26351 -V, --version print version number and configuration settings, then exit
d0ac1c44 26352 --config print configuration, then exit
c971b7fa
PA
26353 -q, --quiet, --silent
26354 do not print progress messages
26355 -d, --debug don't remove temporary files
26356 --recheck update $as_me by reconfiguring in the same conditions
26357 --file=FILE[:TEMPLATE]
26358 instantiate the configuration file FILE
26359 --header=FILE[:TEMPLATE]
26360 instantiate the configuration header FILE
26361
26362Configuration files:
26363$config_files
26364
26365Configuration headers:
26366$config_headers
26367
26368Configuration commands:
26369$config_commands
26370
26371Report bugs to the package provider."
26372
26373_ACEOF
26374cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 26375ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
c971b7fa 26376ac_cs_version="\\
d0ac1c44
SM
26377libgnu config.status UNUSED-VERSION
26378configured by $0, generated by GNU Autoconf 2.69,
26379 with options \\"\$ac_cs_config\\"
c971b7fa 26380
d0ac1c44 26381Copyright (C) 2012 Free Software Foundation, Inc.
c971b7fa
PA
26382This config.status script is free software; the Free Software Foundation
26383gives unlimited permission to copy, distribute and modify it."
26384
26385ac_pwd='$ac_pwd'
26386srcdir='$srcdir'
26387INSTALL='$INSTALL'
26388MKDIR_P='$MKDIR_P'
26389AWK='$AWK'
26390test -n "\$AWK" || AWK=awk
26391_ACEOF
26392
26393cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26394# The default lists apply if the user does not specify any file.
26395ac_need_defaults=:
26396while test $# != 0
26397do
26398 case $1 in
d0ac1c44 26399 --*=?*)
c971b7fa
PA
26400 ac_option=`expr "X$1" : 'X\([^=]*\)='`
26401 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
26402 ac_shift=:
26403 ;;
d0ac1c44
SM
26404 --*=)
26405 ac_option=`expr "X$1" : 'X\([^=]*\)='`
26406 ac_optarg=
26407 ac_shift=:
26408 ;;
c971b7fa
PA
26409 *)
26410 ac_option=$1
26411 ac_optarg=$2
26412 ac_shift=shift
26413 ;;
26414 esac
26415
26416 case $ac_option in
26417 # Handling of the options.
26418 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26419 ac_cs_recheck=: ;;
26420 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
26421 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
26422 --config | --confi | --conf | --con | --co | --c )
26423 $as_echo "$ac_cs_config"; exit ;;
c971b7fa
PA
26424 --debug | --debu | --deb | --de | --d | -d )
26425 debug=: ;;
26426 --file | --fil | --fi | --f )
26427 $ac_shift
26428 case $ac_optarg in
26429 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 26430 '') as_fn_error $? "missing file argument" ;;
c971b7fa
PA
26431 esac
26432 as_fn_append CONFIG_FILES " '$ac_optarg'"
26433 ac_need_defaults=false;;
26434 --header | --heade | --head | --hea )
26435 $ac_shift
26436 case $ac_optarg in
26437 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
26438 esac
26439 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
26440 ac_need_defaults=false;;
26441 --he | --h)
26442 # Conflict between --help and --header
d0ac1c44 26443 as_fn_error $? "ambiguous option: \`$1'
c971b7fa
PA
26444Try \`$0 --help' for more information.";;
26445 --help | --hel | -h )
26446 $as_echo "$ac_cs_usage"; exit ;;
26447 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
26448 | -silent | --silent | --silen | --sile | --sil | --si | --s)
26449 ac_cs_silent=: ;;
26450
26451 # This is an error.
d0ac1c44 26452 -*) as_fn_error $? "unrecognized option: \`$1'
c971b7fa
PA
26453Try \`$0 --help' for more information." ;;
26454
26455 *) as_fn_append ac_config_targets " $1"
26456 ac_need_defaults=false ;;
26457
26458 esac
26459 shift
26460done
26461
26462ac_configure_extra_args=
26463
26464if $ac_cs_silent; then
26465 exec 6>/dev/null
26466 ac_configure_extra_args="$ac_configure_extra_args --silent"
26467fi
26468
26469_ACEOF
26470cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26471if \$ac_cs_recheck; then
d0ac1c44 26472 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
c971b7fa
PA
26473 shift
26474 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
26475 CONFIG_SHELL='$SHELL'
26476 export CONFIG_SHELL
26477 exec "\$@"
26478fi
26479
26480_ACEOF
26481cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26482exec 5>>config.log
26483{
26484 echo
26485 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
26486## Running $as_me. ##
26487_ASBOX
26488 $as_echo "$ac_log"
26489} >&5
26490
26491_ACEOF
26492cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26493#
26494# INIT-COMMANDS
26495#
26496AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
26497
26498_ACEOF
26499
26500cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26501
26502# Handling of arguments.
26503for ac_config_target in $ac_config_targets
26504do
26505 case $ac_config_target in
26506 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
26507 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
26508 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
26509 "import/Makefile") CONFIG_FILES="$CONFIG_FILES import/Makefile" ;;
26510 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
26511
d0ac1c44 26512 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c971b7fa
PA
26513 esac
26514done
26515
26516
26517# If the user did not use the arguments to specify the items to instantiate,
26518# then the envvar interface is used. Set only those that are not.
26519# We use the long form for the default assignment because of an extremely
26520# bizarre bug on SunOS 4.1.3.
26521if $ac_need_defaults; then
26522 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26523 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26524 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
26525fi
26526
26527# Have a temporary directory for convenience. Make it in the build tree
26528# simply because there is no reason against having it here, and in addition,
26529# creating and moving files from /tmp can sometimes cause problems.
26530# Hook for its removal unless debugging.
26531# Note that there is a small window in which the directory will not be cleaned:
26532# after its creation but before its name has been assigned to `$tmp'.
26533$debug ||
26534{
d0ac1c44 26535 tmp= ac_tmp=
c971b7fa 26536 trap 'exit_status=$?
d0ac1c44
SM
26537 : "${ac_tmp:=$tmp}"
26538 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
c971b7fa
PA
26539' 0
26540 trap 'as_fn_exit 1' 1 2 13 15
26541}
26542# Create a (secure) tmp directory for tmp files.
26543
26544{
26545 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 26546 test -d "$tmp"
c971b7fa
PA
26547} ||
26548{
26549 tmp=./conf$$-$RANDOM
26550 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
26551} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
26552ac_tmp=$tmp
c971b7fa
PA
26553
26554# Set up the scripts for CONFIG_FILES section.
26555# No need to generate them if there are no CONFIG_FILES.
26556# This happens for instance with `./config.status config.h'.
26557if test -n "$CONFIG_FILES"; then
26558
26559
26560ac_cr=`echo X | tr X '\015'`
26561# On cygwin, bash can eat \r inside `` if the user requested igncr.
26562# But we know of no other shell where ac_cr would be empty at this
26563# point, so we can use a bashism as a fallback.
26564if test "x$ac_cr" = x; then
26565 eval ac_cr=\$\'\\r\'
26566fi
26567ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
26568if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 26569 ac_cs_awk_cr='\\r'
c971b7fa
PA
26570else
26571 ac_cs_awk_cr=$ac_cr
26572fi
26573
d0ac1c44 26574echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
c971b7fa
PA
26575_ACEOF
26576
26577
26578{
26579 echo "cat >conf$$subs.awk <<_ACEOF" &&
26580 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
26581 echo "_ACEOF"
26582} >conf$$subs.sh ||
d0ac1c44
SM
26583 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
26584ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
c971b7fa
PA
26585ac_delim='%!_!# '
26586for ac_last_try in false false false false false :; do
26587 . ./conf$$subs.sh ||
d0ac1c44 26588 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
c971b7fa
PA
26589
26590 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
26591 if test $ac_delim_n = $ac_delim_num; then
26592 break
26593 elif $ac_last_try; then
d0ac1c44 26594 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
c971b7fa
PA
26595 else
26596 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26597 fi
26598done
26599rm -f conf$$subs.sh
26600
26601cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 26602cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
c971b7fa
PA
26603_ACEOF
26604sed -n '
26605h
26606s/^/S["/; s/!.*/"]=/
26607p
26608g
26609s/^[^!]*!//
26610:repl
26611t repl
26612s/'"$ac_delim"'$//
26613t delim
26614:nl
26615h
d0ac1c44 26616s/\(.\{148\}\)..*/\1/
c971b7fa
PA
26617t more1
26618s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
26619p
26620n
26621b repl
26622:more1
26623s/["\\]/\\&/g; s/^/"/; s/$/"\\/
26624p
26625g
26626s/.\{148\}//
26627t nl
26628:delim
26629h
d0ac1c44 26630s/\(.\{148\}\)..*/\1/
c971b7fa
PA
26631t more2
26632s/["\\]/\\&/g; s/^/"/; s/$/"/
26633p
26634b
26635:more2
26636s/["\\]/\\&/g; s/^/"/; s/$/"\\/
26637p
26638g
26639s/.\{148\}//
26640t delim
26641' <conf$$subs.awk | sed '
26642/^[^""]/{
26643 N
26644 s/\n//
26645}
26646' >>$CONFIG_STATUS || ac_write_fail=1
26647rm -f conf$$subs.awk
26648cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26649_ACAWK
d0ac1c44 26650cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
c971b7fa
PA
26651 for (key in S) S_is_set[key] = 1
26652 FS = "\a"
26653
26654}
26655{
26656 line = $ 0
26657 nfields = split(line, field, "@")
26658 substed = 0
26659 len = length(field[1])
26660 for (i = 2; i < nfields; i++) {
26661 key = field[i]
26662 keylen = length(key)
26663 if (S_is_set[key]) {
26664 value = S[key]
26665 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
26666 len += length(value) + length(field[++i])
26667 substed = 1
26668 } else
26669 len += 1 + keylen
26670 }
26671
26672 print line
26673}
26674
26675_ACAWK
26676_ACEOF
26677cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26678if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
26679 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
26680else
26681 cat
d0ac1c44
SM
26682fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
26683 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
c971b7fa
PA
26684_ACEOF
26685
d0ac1c44
SM
26686# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
26687# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
c971b7fa
PA
26688# trailing colons and then remove the whole line if VPATH becomes empty
26689# (actually we leave an empty line to preserve line numbers).
26690if test "x$srcdir" = x.; then
d0ac1c44
SM
26691 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
26692h
26693s///
26694s/^/:/
26695s/[ ]*$/:/
26696s/:\$(srcdir):/:/g
26697s/:\${srcdir}:/:/g
26698s/:@srcdir@:/:/g
26699s/^:*//
c971b7fa 26700s/:*$//
d0ac1c44
SM
26701x
26702s/\(=[ ]*\).*/\1/
26703G
26704s/\n//
c971b7fa
PA
26705s/^[^=]*=[ ]*$//
26706}'
26707fi
26708
26709cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26710fi # test -n "$CONFIG_FILES"
26711
26712# Set up the scripts for CONFIG_HEADERS section.
26713# No need to generate them if there are no CONFIG_HEADERS.
26714# This happens for instance with `./config.status Makefile'.
26715if test -n "$CONFIG_HEADERS"; then
d0ac1c44 26716cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
c971b7fa
PA
26717BEGIN {
26718_ACEOF
26719
26720# Transform confdefs.h into an awk script `defines.awk', embedded as
26721# here-document in config.status, that substitutes the proper values into
26722# config.h.in to produce config.h.
26723
26724# Create a delimiter string that does not exist in confdefs.h, to ease
26725# handling of long lines.
26726ac_delim='%!_!# '
26727for ac_last_try in false false :; do
d0ac1c44
SM
26728 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
26729 if test -z "$ac_tt"; then
c971b7fa
PA
26730 break
26731 elif $ac_last_try; then
d0ac1c44 26732 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
c971b7fa
PA
26733 else
26734 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26735 fi
26736done
26737
26738# For the awk script, D is an array of macro values keyed by name,
26739# likewise P contains macro parameters if any. Preserve backslash
26740# newline sequences.
26741
26742ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26743sed -n '
26744s/.\{148\}/&'"$ac_delim"'/g
26745t rset
26746:rset
26747s/^[ ]*#[ ]*define[ ][ ]*/ /
26748t def
26749d
26750:def
26751s/\\$//
26752t bsnl
26753s/["\\]/\\&/g
26754s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
26755D["\1"]=" \3"/p
26756s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
26757d
26758:bsnl
26759s/["\\]/\\&/g
26760s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
26761D["\1"]=" \3\\\\\\n"\\/p
26762t cont
26763s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
26764t cont
26765d
26766:cont
26767n
26768s/.\{148\}/&'"$ac_delim"'/g
26769t clear
26770:clear
26771s/\\$//
26772t bsnlc
26773s/["\\]/\\&/g; s/^/"/; s/$/"/p
26774d
26775:bsnlc
26776s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
26777b cont
26778' <confdefs.h | sed '
26779s/'"$ac_delim"'/"\\\
26780"/g' >>$CONFIG_STATUS || ac_write_fail=1
26781
26782cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26783 for (key in D) D_is_set[key] = 1
26784 FS = "\a"
26785}
26786/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
26787 line = \$ 0
26788 split(line, arg, " ")
26789 if (arg[1] == "#") {
26790 defundef = arg[2]
26791 mac1 = arg[3]
26792 } else {
26793 defundef = substr(arg[1], 2)
26794 mac1 = arg[2]
26795 }
26796 split(mac1, mac2, "(") #)
26797 macro = mac2[1]
26798 prefix = substr(line, 1, index(line, defundef) - 1)
26799 if (D_is_set[macro]) {
26800 # Preserve the white space surrounding the "#".
26801 print prefix "define", macro P[macro] D[macro]
26802 next
26803 } else {
26804 # Replace #undef with comments. This is necessary, for example,
26805 # in the case of _POSIX_SOURCE, which is predefined and required
26806 # on some systems where configure will not decide to define it.
26807 if (defundef == "undef") {
26808 print "/*", prefix defundef, macro, "*/"
26809 next
26810 }
26811 }
26812}
26813{ print }
26814_ACAWK
26815_ACEOF
26816cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 26817 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
c971b7fa
PA
26818fi # test -n "$CONFIG_HEADERS"
26819
26820
26821eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
26822shift
26823for ac_tag
26824do
26825 case $ac_tag in
26826 :[FHLC]) ac_mode=$ac_tag; continue;;
26827 esac
26828 case $ac_mode$ac_tag in
26829 :[FHL]*:*);;
d0ac1c44 26830 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
c971b7fa
PA
26831 :[FH]-) ac_tag=-:-;;
26832 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26833 esac
26834 ac_save_IFS=$IFS
26835 IFS=:
26836 set x $ac_tag
26837 IFS=$ac_save_IFS
26838 shift
26839 ac_file=$1
26840 shift
26841
26842 case $ac_mode in
26843 :L) ac_source=$1;;
26844 :[FH])
26845 ac_file_inputs=
26846 for ac_f
26847 do
26848 case $ac_f in
d0ac1c44 26849 -) ac_f="$ac_tmp/stdin";;
c971b7fa
PA
26850 *) # Look for the file first in the build tree, then in the source tree
26851 # (if the path is not absolute). The absolute path cannot be DOS-style,
26852 # because $ac_f cannot contain `:'.
26853 test -f "$ac_f" ||
26854 case $ac_f in
26855 [\\/$]*) false;;
26856 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26857 esac ||
d0ac1c44 26858 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
c971b7fa
PA
26859 esac
26860 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
26861 as_fn_append ac_file_inputs " '$ac_f'"
26862 done
26863
26864 # Let's still pretend it is `configure' which instantiates (i.e., don't
26865 # use $as_me), people would be surprised to read:
26866 # /* config.h. Generated by config.status. */
26867 configure_input='Generated from '`
26868 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
26869 `' by configure.'
26870 if test x"$ac_file" != x-; then
26871 configure_input="$ac_file. $configure_input"
26872 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
26873$as_echo "$as_me: creating $ac_file" >&6;}
26874 fi
26875 # Neutralize special characters interpreted by sed in replacement strings.
26876 case $configure_input in #(
26877 *\&* | *\|* | *\\* )
26878 ac_sed_conf_input=`$as_echo "$configure_input" |
26879 sed 's/[\\\\&|]/\\\\&/g'`;; #(
26880 *) ac_sed_conf_input=$configure_input;;
26881 esac
26882
26883 case $ac_tag in
d0ac1c44
SM
26884 *:-:* | *:-) cat >"$ac_tmp/stdin" \
26885 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
c971b7fa
PA
26886 esac
26887 ;;
26888 esac
26889
26890 ac_dir=`$as_dirname -- "$ac_file" ||
26891$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26892 X"$ac_file" : 'X\(//\)[^/]' \| \
26893 X"$ac_file" : 'X\(//\)$' \| \
26894 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
26895$as_echo X"$ac_file" |
26896 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26897 s//\1/
26898 q
26899 }
26900 /^X\(\/\/\)[^/].*/{
26901 s//\1/
26902 q
26903 }
26904 /^X\(\/\/\)$/{
26905 s//\1/
26906 q
26907 }
26908 /^X\(\/\).*/{
26909 s//\1/
26910 q
26911 }
26912 s/.*/./; q'`
26913 as_dir="$ac_dir"; as_fn_mkdir_p
26914 ac_builddir=.
26915
26916case "$ac_dir" in
26917.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26918*)
26919 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
26920 # A ".." for each directory in $ac_dir_suffix.
26921 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
26922 case $ac_top_builddir_sub in
26923 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26924 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26925 esac ;;
26926esac
26927ac_abs_top_builddir=$ac_pwd
26928ac_abs_builddir=$ac_pwd$ac_dir_suffix
26929# for backward compatibility:
26930ac_top_builddir=$ac_top_build_prefix
26931
26932case $srcdir in
26933 .) # We are building in place.
26934 ac_srcdir=.
26935 ac_top_srcdir=$ac_top_builddir_sub
26936 ac_abs_top_srcdir=$ac_pwd ;;
26937 [\\/]* | ?:[\\/]* ) # Absolute name.
26938 ac_srcdir=$srcdir$ac_dir_suffix;
26939 ac_top_srcdir=$srcdir
26940 ac_abs_top_srcdir=$srcdir ;;
26941 *) # Relative name.
26942 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26943 ac_top_srcdir=$ac_top_build_prefix$srcdir
26944 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
26945esac
26946ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
26947
26948
26949 case $ac_mode in
26950 :F)
26951 #
26952 # CONFIG_FILE
26953 #
26954
26955 case $INSTALL in
26956 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
26957 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
26958 esac
26959 ac_MKDIR_P=$MKDIR_P
26960 case $MKDIR_P in
26961 [\\/$]* | ?:[\\/]* ) ;;
26962 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
26963 esac
26964_ACEOF
26965
26966cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26967# If the template does not know about datarootdir, expand it.
26968# FIXME: This hack should be removed a few years after 2.60.
26969ac_datarootdir_hack=; ac_datarootdir_seen=
26970ac_sed_dataroot='
26971/datarootdir/ {
26972 p
26973 q
26974}
26975/@datadir@/p
26976/@docdir@/p
26977/@infodir@/p
26978/@localedir@/p
26979/@mandir@/p'
26980case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
26981*datarootdir*) ac_datarootdir_seen=yes;;
26982*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
26983 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26984$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
26985_ACEOF
26986cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26987 ac_datarootdir_hack='
26988 s&@datadir@&$datadir&g
26989 s&@docdir@&$docdir&g
26990 s&@infodir@&$infodir&g
26991 s&@localedir@&$localedir&g
26992 s&@mandir@&$mandir&g
26993 s&\\\${datarootdir}&$datarootdir&g' ;;
26994esac
26995_ACEOF
26996
26997# Neutralize VPATH when `$srcdir' = `.'.
26998# Shell code in configure.ac might set extrasub.
26999# FIXME: do we really want to maintain this feature?
27000cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27001ac_sed_extra="$ac_vpsub
27002$extrasub
27003_ACEOF
27004cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27005:t
27006/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
27007s|@configure_input@|$ac_sed_conf_input|;t t
27008s&@top_builddir@&$ac_top_builddir_sub&;t t
27009s&@top_build_prefix@&$ac_top_build_prefix&;t t
27010s&@srcdir@&$ac_srcdir&;t t
27011s&@abs_srcdir@&$ac_abs_srcdir&;t t
27012s&@top_srcdir@&$ac_top_srcdir&;t t
27013s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
27014s&@builddir@&$ac_builddir&;t t
27015s&@abs_builddir@&$ac_abs_builddir&;t t
27016s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
27017s&@INSTALL@&$ac_INSTALL&;t t
27018s&@MKDIR_P@&$ac_MKDIR_P&;t t
27019$ac_datarootdir_hack
27020"
d0ac1c44
SM
27021eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
27022 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
c971b7fa
PA
27023
27024test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
27025 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
27026 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
27027 "$ac_tmp/out"`; test -z "$ac_out"; } &&
c971b7fa 27028 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 27029which seems to be undefined. Please make sure it is defined" >&5
c971b7fa 27030$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 27031which seems to be undefined. Please make sure it is defined" >&2;}
c971b7fa 27032
d0ac1c44 27033 rm -f "$ac_tmp/stdin"
c971b7fa 27034 case $ac_file in
d0ac1c44
SM
27035 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
27036 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
c971b7fa 27037 esac \
d0ac1c44 27038 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
c971b7fa
PA
27039 ;;
27040 :H)
27041 #
27042 # CONFIG_HEADER
27043 #
27044 if test x"$ac_file" != x-; then
27045 {
27046 $as_echo "/* $configure_input */" \
d0ac1c44
SM
27047 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
27048 } >"$ac_tmp/config.h" \
27049 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
27050 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
c971b7fa
PA
27051 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
27052$as_echo "$as_me: $ac_file is unchanged" >&6;}
27053 else
27054 rm -f "$ac_file"
d0ac1c44
SM
27055 mv "$ac_tmp/config.h" "$ac_file" \
27056 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
c971b7fa
PA
27057 fi
27058 else
27059 $as_echo "/* $configure_input */" \
d0ac1c44
SM
27060 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
27061 || as_fn_error $? "could not create -" "$LINENO" 5
c971b7fa
PA
27062 fi
27063# Compute "$ac_file"'s index in $config_headers.
27064_am_arg="$ac_file"
27065_am_stamp_count=1
27066for _am_header in $config_headers :; do
27067 case $_am_header in
27068 $_am_arg | $_am_arg:* )
27069 break ;;
27070 * )
27071 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
27072 esac
27073done
27074echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
27075$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27076 X"$_am_arg" : 'X\(//\)[^/]' \| \
27077 X"$_am_arg" : 'X\(//\)$' \| \
27078 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
27079$as_echo X"$_am_arg" |
27080 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27081 s//\1/
27082 q
27083 }
27084 /^X\(\/\/\)[^/].*/{
27085 s//\1/
27086 q
27087 }
27088 /^X\(\/\/\)$/{
27089 s//\1/
27090 q
27091 }
27092 /^X\(\/\).*/{
27093 s//\1/
27094 q
27095 }
27096 s/.*/./; q'`/stamp-h$_am_stamp_count
27097 ;;
27098
27099 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
27100$as_echo "$as_me: executing $ac_file commands" >&6;}
27101 ;;
27102 esac
27103
27104
27105 case $ac_file$ac_mode in
27106 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
d0ac1c44 27107 # Older Autoconf quotes --file arguments for eval, but not when files
c971b7fa
PA
27108 # are listed without --file. Let's play safe and only enable the eval
27109 # if we detect the quoting.
27110 case $CONFIG_FILES in
27111 *\'*) eval set x "$CONFIG_FILES" ;;
27112 *) set x $CONFIG_FILES ;;
27113 esac
27114 shift
27115 for mf
27116 do
27117 # Strip MF so we end up with the name of the file.
27118 mf=`echo "$mf" | sed -e 's/:.*$//'`
27119 # Check whether this is an Automake generated Makefile or not.
d0ac1c44 27120 # We used to match only the files named 'Makefile.in', but
c971b7fa
PA
27121 # some people rename them; so instead we look at the file content.
27122 # Grep'ing the first line is not enough: some people post-process
27123 # each Makefile.in and add a new line on top of each file to say so.
27124 # Grep'ing the whole file is not good either: AIX grep has a line
27125 # limit of 2048, but all sed's we know have understand at least 4000.
27126 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
27127 dirpart=`$as_dirname -- "$mf" ||
27128$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27129 X"$mf" : 'X\(//\)[^/]' \| \
27130 X"$mf" : 'X\(//\)$' \| \
27131 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
27132$as_echo X"$mf" |
27133 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27134 s//\1/
27135 q
27136 }
27137 /^X\(\/\/\)[^/].*/{
27138 s//\1/
27139 q
27140 }
27141 /^X\(\/\/\)$/{
27142 s//\1/
27143 q
27144 }
27145 /^X\(\/\).*/{
27146 s//\1/
27147 q
27148 }
27149 s/.*/./; q'`
27150 else
27151 continue
27152 fi
27153 # Extract the definition of DEPDIR, am__include, and am__quote
d0ac1c44 27154 # from the Makefile without running 'make'.
c971b7fa
PA
27155 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
27156 test -z "$DEPDIR" && continue
27157 am__include=`sed -n 's/^am__include = //p' < "$mf"`
d0ac1c44 27158 test -z "$am__include" && continue
c971b7fa 27159 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
c971b7fa
PA
27160 # Find all dependency output files, they are included files with
27161 # $(DEPDIR) in their names. We invoke sed twice because it is the
27162 # simplest approach to changing $(DEPDIR) to its actual value in the
27163 # expansion.
27164 for file in `sed -n "
27165 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
d0ac1c44 27166 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
c971b7fa
PA
27167 # Make sure the directory exists.
27168 test -f "$dirpart/$file" && continue
27169 fdir=`$as_dirname -- "$file" ||
27170$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27171 X"$file" : 'X\(//\)[^/]' \| \
27172 X"$file" : 'X\(//\)$' \| \
27173 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
27174$as_echo X"$file" |
27175 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27176 s//\1/
27177 q
27178 }
27179 /^X\(\/\/\)[^/].*/{
27180 s//\1/
27181 q
27182 }
27183 /^X\(\/\/\)$/{
27184 s//\1/
27185 q
27186 }
27187 /^X\(\/\).*/{
27188 s//\1/
27189 q
27190 }
27191 s/.*/./; q'`
27192 as_dir=$dirpart/$fdir; as_fn_mkdir_p
27193 # echo "creating $dirpart/$file"
27194 echo '# dummy' > "$dirpart/$file"
27195 done
27196 done
27197}
27198 ;;
27199 "default":C)
27200case x$CONFIG_HEADERS in
27201xconfig.h:config.in)
27202echo > stamp-h ;;
27203esac
27204 ;;
27205
27206 esac
27207done # for ac_tag
27208
27209
27210as_fn_exit 0
27211_ACEOF
27212ac_clean_files=$ac_clean_files_save
27213
27214test $ac_write_fail = 0 ||
d0ac1c44 27215 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
c971b7fa
PA
27216
27217
27218# configure is writing to config.log, and then calls config.status.
27219# config.status does its own redirection, appending to config.log.
27220# Unfortunately, on DOS this fails, as config.log is still kept open
27221# by configure, so config.status won't be able to write to it; its
27222# output is simply discarded. So we exec the FD to /dev/null,
27223# effectively closing config.log, so it can be properly (re)opened and
27224# appended to by config.status. When coming back to configure, we
27225# need to make the FD available again.
27226if test "$no_create" != yes; then
27227 ac_cs_success=:
27228 ac_config_status_args=
27229 test "$silent" = yes &&
27230 ac_config_status_args="$ac_config_status_args --quiet"
27231 exec 5>/dev/null
27232 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
27233 exec 5>>config.log
27234 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27235 # would make configure fail if this is the last instruction.
d0ac1c44 27236 $ac_cs_success || as_fn_exit 1
c971b7fa
PA
27237fi
27238if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
27239 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
27240$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
27241fi
27242
27243
27244exit 0