]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gnulib/configure
Generated files
[thirdparty/binutils-gdb.git] / gdb / gnulib / configure
CommitLineData
c971b7fa
PA
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
63a9e923
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.
63a9e923 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
63a9e923
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
63a9e923
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 :
63a9e923
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"
63a9e923 355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
c971b7fa
PA
356
357
358} # as_fn_mkdir_p
63a9e923
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
63a9e923
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
63a9e923 407# script with STATUS, using 1 if that was 0.
c971b7fa
PA
408as_fn_error ()
409{
63a9e923
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
63a9e923 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
63a9e923
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.
63a9e923 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 ||
63a9e923 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
63a9e923 532 as_ln_s='cp -pR'
c971b7fa
PA
533 fi
534else
63a9e923 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
63a9e923
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
63a9e923
SM
557test -n "$DJDIR" || exec 7<&0 </dev/null
558exec 6>&1
c971b7fa
PA
559
560# Name of the host.
63a9e923 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.
63a9e923
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
98399780 622ac_func_list=
e26b6bb0 623ac_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
63a9e923
SM
636AM_DEFAULT_V
637AM_V
c971b7fa
PA
638am__fastdepCC_FALSE
639am__fastdepCC_TRUE
640CCDEPMODE
63a9e923 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
4a626d0a
PA
701REPLACE_LOCALTIME
702REPLACE_GMTIME
09607c9e
TT
703REPLACE_TIMEGM
704REPLACE_NANOSLEEP
705REPLACE_MKTIME
706REPLACE_LOCALTIME_R
707HAVE_TIMEGM
708HAVE_STRPTIME
709HAVE_NANOSLEEP
710HAVE_DECL_LOCALTIME_R
4a626d0a 711GNULIB_TIME_RZ
09607c9e
TT
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
PA
858UNDEFINE_STRTOK_R
859REPLACE_STRTOK_R
860REPLACE_STRSIGNAL
861REPLACE_STRNLEN
862REPLACE_STRNDUP
863REPLACE_STRNCAT
864REPLACE_STRERROR_R
865REPLACE_STRERROR
866REPLACE_STRCHRNUL
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
JK
1028LOCALCHARSET_TESTS_ENVIRONMENT
1029GLIBC21
c971b7fa
PA
1030NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
1031NEXT_INTTYPES_H
1032UINT64_MAX_EQ_ULONG_MAX
1033UINT32_MAX_LT_UINTMAX_MAX
1034PRIPTR_PREFIX
1035PRI_MACROS_BROKEN
1036INT64_MAX_EQ_LONG_MAX
1037INT32_MAX_LT_INTMAX_MAX
4a626d0a 1038REPLACE_STRTOUMAX
c971b7fa
PA
1039REPLACE_STRTOIMAX
1040HAVE_DECL_STRTOUMAX
1041HAVE_DECL_STRTOIMAX
1042HAVE_DECL_IMAXDIV
1043HAVE_DECL_IMAXABS
1044GNULIB_STRTOUMAX
1045GNULIB_STRTOIMAX
1046GNULIB_IMAXDIV
1047GNULIB_IMAXABS
1048GL_GENERATE_STDINT_H_FALSE
1049GL_GENERATE_STDINT_H_TRUE
1050STDINT_H
49e4877c
PA
1051HAVE_SYS_INTTYPES_H
1052HAVE_SYS_BITYPES_H
1053HAVE_C99_STDINT_H
c971b7fa
PA
1054WINT_T_SUFFIX
1055WCHAR_T_SUFFIX
1056SIG_ATOMIC_T_SUFFIX
1057SIZE_T_SUFFIX
1058PTRDIFF_T_SUFFIX
1059HAVE_SIGNED_WINT_T
1060HAVE_SIGNED_WCHAR_T
1061HAVE_SIGNED_SIG_ATOMIC_T
1062BITSIZEOF_WINT_T
1063BITSIZEOF_WCHAR_T
1064BITSIZEOF_SIG_ATOMIC_T
1065BITSIZEOF_SIZE_T
1066BITSIZEOF_PTRDIFF_T
1067APPLE_UNIVERSAL_BUILD
c971b7fa
PA
1068HAVE_STDINT_H
1069NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1070NEXT_STDINT_H
c971b7fa
PA
1071HAVE_SYS_TYPES_H
1072HAVE_INTTYPES_H
1073HAVE_WCHAR_H
1074HAVE_UNSIGNED_LONG_LONG_INT
1075HAVE_LONG_LONG_INT
49e4877c
PA
1076GL_GENERATE_LIMITS_H_FALSE
1077GL_GENERATE_LIMITS_H_TRUE
1078LIMITS_H
1079NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
1080NEXT_LIMITS_H
6ec2e0f5
SDJ
1081HAVE_SYS_CDEFS_H
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
1089HAVE_TIMEZONE_T
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
6ec2e0f5
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
63a9e923 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'
63a9e923 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
63a9e923
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 &&
63a9e923 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 &&
63a9e923 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 &&
63a9e923 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 &&
63a9e923 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
63a9e923
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]* )
63a9e923 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
63a9e923 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'`
63a9e923 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) ;;
63a9e923 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
63a9e923 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 .` ||
63a9e923 2214 as_fn_error $? "working directory cannot be determined"
c971b7fa 2215test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
63a9e923 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 .."
63a9e923 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=`(
63a9e923 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
63a9e923 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
63a9e923 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]
63a9e923 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
63a9e923
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]
63a9e923
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
63a9e923
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>
63a9e923 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
63a9e923
SM
2451libgnu configure UNUSED-VERSION
2452generated by GNU Autoconf 2.69
c971b7fa 2453
63a9e923 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
63a9e923
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
63a9e923 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
63a9e923
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
63a9e923 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; }
63a9e923 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
63a9e923 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; }
63a9e923 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
63a9e923 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
63a9e923
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; }
63a9e923 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; }
63a9e923 2696 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
c971b7fa
PA
2697
2698} # ac_fn_c_check_header_compile
2699
63a9e923
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 ||
63a9e923 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
63a9e923
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; }
63a9e923 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; }
63a9e923 2863 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
8690e634
JK
2864
2865} # ac_fn_c_check_func
2866
63a9e923
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
63a9e923
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{
63a9e923
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; }
63a9e923 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)];
63a9e923
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)];
63a9e923
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)];
63a9e923
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)];
63a9e923
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)];
63a9e923
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
63a9e923
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
63a9e923
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
63a9e923 3210 $as_echo "## ---------------- ##
c971b7fa 3211## Cache variables. ##
63a9e923 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
63a9e923 3246 $as_echo "## ----------------- ##
c971b7fa 3247## Output variables. ##
63a9e923 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
63a9e923 3261 $as_echo "## ------------------- ##
c971b7fa 3262## File substitutions. ##
63a9e923 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
63a9e923 3277 $as_echo "## ----------- ##
c971b7fa 3278## confdefs.h. ##
63a9e923 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
63a9e923
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
63a9e923 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
63a9e923
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
63a9e923
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
98399780
YQ
3379as_fn_append ac_func_list " canonicalize_file_name"
3380as_fn_append ac_func_list " getcwd"
3381as_fn_append ac_func_list " readlink"
3382as_fn_append ac_func_list " realpath"
3383as_fn_append ac_header_list " sys/param.h"
3d99e817 3384as_fn_append ac_header_list " unistd.h"
6ec2e0f5
SDJ
3385as_fn_append ac_func_list " _set_invalid_parameter_handler"
3386as_fn_append ac_header_list " sys/socket.h"
3387as_fn_append ac_func_list " fchdir"
3388as_fn_append ac_header_list " dirent.h"
3389as_fn_append ac_func_list " fcntl"
3390as_fn_append ac_func_list " symlink"
3391as_fn_append ac_func_list " fdopendir"
3392as_fn_append ac_func_list " mempcpy"
3574124b
PA
3393as_fn_append ac_func_list " btowc"
3394as_fn_append ac_func_list " isblank"
3395as_fn_append ac_func_list " iswctype"
3396as_fn_append ac_func_list " mbsrtowcs"
3574124b
PA
3397as_fn_append ac_func_list " wmemchr"
3398as_fn_append ac_func_list " wmemcpy"
3399as_fn_append ac_func_list " wmempcpy"
3400as_fn_append ac_header_list " wctype.h"
8690e634 3401gl_fnmatch_required=GNU
6ec2e0f5
SDJ
3402as_fn_append ac_header_list " sys/stat.h"
3403as_fn_append ac_func_list " fstatat"
3404as_fn_append ac_func_list " getdtablesize"
3405as_fn_append ac_func_list " getlogin_r"
3406as_fn_append ac_func_list " getprogname"
3407as_fn_append ac_func_list " getexecname"
4a626d0a 3408as_fn_append ac_header_list " sys/time.h"
4a626d0a 3409as_fn_append ac_func_list " gettimeofday"
6ec2e0f5
SDJ
3410as_fn_append ac_header_list " sys/cdefs.h"
3411as_fn_append ac_func_list " getpwnam_r"
49e4877c 3412as_fn_append ac_header_list " limits.h"
3574124b
PA
3413as_fn_append ac_header_list " wchar.h"
3414as_fn_append ac_header_list " stdint.h"
3415as_fn_append ac_header_list " inttypes.h"
f45c62c4 3416as_fn_append ac_func_list " lstat"
3574124b
PA
3417as_fn_append ac_header_list " math.h"
3418as_fn_append ac_func_list " mbsinit"
3419as_fn_append ac_func_list " mbrtowc"
3420as_fn_append ac_header_list " sys/mman.h"
3421as_fn_append ac_func_list " mprotect"
2d8adcbd 3422as_fn_append ac_func_list " mkstemp"
6ec2e0f5 3423as_fn_append ac_func_list " openat"
6a29c58e 3424as_fn_append ac_func_list " link"
2d8adcbd
MM
3425as_fn_append ac_func_list " secure_getenv"
3426as_fn_append ac_func_list " getuid"
3427as_fn_append ac_func_list " geteuid"
3428as_fn_append ac_func_list " getgid"
3429as_fn_append ac_func_list " getegid"
3d99e817 3430as_fn_append ac_func_list " setenv"
6ec2e0f5
SDJ
3431as_fn_append ac_func_list " strdup"
3432as_fn_append ac_func_list " pipe"
3574124b
PA
3433as_fn_append ac_header_list " features.h"
3434as_fn_append ac_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;}
63a9e923 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
63a9e923 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; }
63a9e923 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
63a9e923 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; }
63a9e923 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
63a9e923 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; }
63a9e923 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
63a9e923 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; }
63a9e923 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
63a9e923 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; }
63a9e923 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
63a9e923 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; }
63a9e923 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
63a9e923 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;}
63a9e923
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
3837for ac_option in --version -v -V -qversion; do
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
63a9e923 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. */
63a9e923 3860
c971b7fa
PA
3861int
3862main ()
3863{
c971b7fa
PA
3864
3865 ;
3866 return 0;
3867}
3868_ACEOF
3869ac_clean_files_save=$ac_clean_files
63a9e923 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.
63a9e923
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 :
63a9e923
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;}
63a9e923
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
63a9e923
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
63a9e923 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;}
63a9e923
SM
3988as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3989See \`config.log' for more details" "$LINENO" 5; }
c971b7fa 3990fi
63a9e923 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
63a9e923
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; }
63a9e923 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;}
63a9e923
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; }
63a9e923 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; }
63a9e923 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
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; }
63a9e923 4225if ${ac_cv_prog_cc_c89+:} false; then :
c971b7fa
PA
4226 $as_echo_n "(cached) " >&6
4227else
4228 ac_cv_prog_cc_c89=no
4229ac_save_CC=$CC
4230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4231/* end confdefs.h. */
4232#include <stdarg.h>
4233#include <stdio.h>
63a9e923 4234struct stat;
c971b7fa
PA
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;
4241{
4242 return p[i];
4243}
4244static char *f (char * (*g) (char **, int), char **p, ...)
4245{
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;
4252}
4253
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];
4262
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];
4267
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;
4274int
4275main ()
4276{
4277return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4278 ;
4279 return 0;
4280}
4281_ACEOF
4282for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4283 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4284do
4285 CC="$ac_save_CC $ac_arg"
4286 if ac_fn_c_try_compile "$LINENO"; then :
4287 ac_cv_prog_cc_c89=$ac_arg
4288fi
4289rm -f core conftest.err conftest.$ac_objext
4290 test "x$ac_cv_prog_cc_c89" != "xno" && break
4291done
4292rm -f conftest.$ac_ext
4293CC=$ac_save_CC
4294
4295fi
4296# AC_CACHE_VAL
4297case "x$ac_cv_prog_cc_c89" in
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 *)
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; } ;;
4308esac
4309if test "x$ac_cv_prog_cc_c89" != xno; then :
4310
4311fi
4312
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
4318
63a9e923
SM
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
4338
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.
4346
4347
4348# Expand $ac_aux_dir to an absolute path.
4349am_aux_dir=`cd "$ac_aux_dir" && pwd`
4350
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 :
4359 $as_echo_n "(cached) " >&6
4360else
4361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4362/* end confdefs.h. */
4363
4364int
4365main ()
4366{
4367
4368 ;
4369 return 0;
4370}
4371_ACEOF
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"
4402fi
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
c971b7fa
PA
4410
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
63a9e923 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
63a9e923 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
63a9e923 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.
63a9e923 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
63a9e923 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
63a9e923 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.
63a9e923 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;}
63a9e923
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; }
63a9e923 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"
63a9e923 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
63a9e923 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; }
63a9e923 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"
63a9e923 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
63a9e923 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; }
63a9e923 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"
63a9e923 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"
63a9e923 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; }
63a9e923 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; }
63a9e923 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
63a9e923
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
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
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
5000 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
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
63a9e923
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
63a9e923
SM
5020 test -n "$AR" && break
5021 done
5022fi
5023if test -z "$AR"; then
5024 ac_ct_AR=$AR
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
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
5044 ac_cv_prog_ac_ct_AR="$ac_prog"
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
63a9e923
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
PA
5062
5063
63a9e923
SM
5064 test -n "$ac_ct_AR" && break
5065done
49e4877c 5066
63a9e923
SM
5067 if test "x$ac_ct_AR" = x; then
5068 AR="false"
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
5078fi
49e4877c 5079
63a9e923 5080: ${AR=ar}
49e4877c 5081
63a9e923
SM
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
63a9e923
SM
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
c971b7fa 5092
63a9e923
SM
5093 am_cv_ar_interface=ar
5094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 5095/* end confdefs.h. */
63a9e923 5096int some_variable = 0;
c971b7fa 5097_ACEOF
63a9e923
SM
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
c971b7fa 5121
63a9e923
SM
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
c971b7fa
PA
5129
5130fi
63a9e923
SM
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
49e4877c 5150
49e4877c
PA
5151 fi
5152
5153 if test -n "$ac_tool_prefix"; then
c971b7fa
PA
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; }
63a9e923 5158if ${ac_cv_prog_AR+:} false; then :
c971b7fa
PA
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
63a9e923 5170 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
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; }
63a9e923 5198if ${ac_cv_prog_ac_ct_AR+:} false; then :
c971b7fa
PA
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
63a9e923 5210 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
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
49e4877c
PA
5245 if test -z "$ARFLAGS"; then
5246 ARFLAGS='cr'
c971b7fa
PA
5247 fi
5248
5249
49e4877c 5250
c971b7fa
PA
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; }
63a9e923 5260if ${ac_cv_prog_RANLIB+:} false; then :
c971b7fa
PA
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
63a9e923 5272 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
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
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; }
63a9e923 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
63a9e923 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 ||
63a9e923 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; }
63a9e923 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 &&
63a9e923 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` ||
63a9e923 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*-*-*) ;;
63a9e923 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; }
63a9e923 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` ||
63a9e923 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*-*-*) ;;
63a9e923 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
5432 # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
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; }
63a9e923 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; }
63a9e923 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; }
63a9e923 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:
8690e634 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:
2d8adcbd 5735 # Code from module mkstemp:
6ec2e0f5
SDJ
5736 # Code from module msvc-inval:
5737 # Code from module msvc-nothrow:
c971b7fa 5738 # Code from module multiarch:
98399780 5739 # Code from module nocrash:
6ec2e0f5
SDJ
5740 # Code from module open:
5741 # Code from module openat:
5742 # Code from module openat-die:
5743 # Code from module openat-h:
5744 # Code from module opendir:
38ec2207 5745 # Code from module pathmax:
8424cc97 5746 # Code from module rawmemchr:
6ec2e0f5 5747 # Code from module readdir:
2196f55f 5748 # Code from module readlink:
6ec2e0f5 5749 # Code from module realloc-posix:
6a29c58e 5750 # Code from module rename:
6ec2e0f5 5751 # Code from module rewinddir:
6a29c58e
YQ
5752 # Code from module rmdir:
5753 # Code from module same-inode:
6ec2e0f5 5754 # Code from module save-cwd:
2d8adcbd 5755 # Code from module secure_getenv:
3d99e817 5756 # Code from module setenv:
0750520d 5757 # Code from module signal-h:
98399780 5758 # Code from module snippet/_Noreturn:
c971b7fa
PA
5759 # Code from module snippet/arg-nonnull:
5760 # Code from module snippet/c++defs:
5761 # Code from module snippet/warn-on-use:
8839a007 5762 # Code from module ssize_t:
2196f55f 5763 # Code from module stat:
8690e634 5764 # Code from module stdbool:
c971b7fa
PA
5765 # Code from module stddef:
5766 # Code from module stdint:
6a29c58e 5767 # Code from module stdio:
98399780 5768 # Code from module stdlib:
8424cc97 5769 # Code from module strchrnul:
6ec2e0f5 5770 # Code from module strdup-posix:
8690e634 5771 # Code from module streq:
6ec2e0f5
SDJ
5772 # Code from module strerror:
5773 # Code from module strerror-override:
c971b7fa 5774 # Code from module string:
8690e634 5775 # Code from module strnlen1:
63ce7108
TT
5776 # Code from module strstr:
5777 # Code from module strstr-simple:
421693b0 5778 # Code from module strtok_r:
09607c9e 5779 # Code from module sys_stat:
4a626d0a 5780 # Code from module sys_time:
8839a007 5781 # Code from module sys_types:
2d8adcbd 5782 # Code from module tempname:
09607c9e 5783 # Code from module time:
8839a007 5784 # Code from module unistd:
6ec2e0f5 5785 # Code from module unistd-safer:
3d99e817 5786 # Code from module unsetenv:
c971b7fa 5787 # Code from module update-copyright:
8690e634
JK
5788 # Code from module verify:
5789 # Code from module wchar:
5790 # Code from module wctype-h:
c971b7fa
PA
5791
5792ac_ext=c
5793ac_cpp='$CPP $CPPFLAGS'
5794ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5795ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5796ac_compiler_gnu=$ac_cv_c_compiler_gnu
5797if test -n "$ac_tool_prefix"; then
5798 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5799set dummy ${ac_tool_prefix}gcc; ac_word=$2
5800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5801$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 5802if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
5803 $as_echo_n "(cached) " >&6
5804else
5805 if test -n "$CC"; then
5806 ac_cv_prog_CC="$CC" # Let the user override the test.
5807else
5808as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5809for as_dir in $PATH
5810do
5811 IFS=$as_save_IFS
5812 test -z "$as_dir" && as_dir=.
5813 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 5814 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
5815 ac_cv_prog_CC="${ac_tool_prefix}gcc"
5816 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5817 break 2
5818 fi
5819done
5820 done
5821IFS=$as_save_IFS
5822
5823fi
5824fi
5825CC=$ac_cv_prog_CC
5826if test -n "$CC"; then
5827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5828$as_echo "$CC" >&6; }
5829else
5830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5831$as_echo "no" >&6; }
5832fi
5833
5834
5835fi
5836if test -z "$ac_cv_prog_CC"; then
5837 ac_ct_CC=$CC
5838 # Extract the first word of "gcc", so it can be a program name with args.
5839set dummy gcc; ac_word=$2
5840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5841$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 5842if ${ac_cv_prog_ac_ct_CC+:} false; then :
c971b7fa
PA
5843 $as_echo_n "(cached) " >&6
5844else
5845 if test -n "$ac_ct_CC"; then
5846 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5847else
5848as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5849for as_dir in $PATH
5850do
5851 IFS=$as_save_IFS
5852 test -z "$as_dir" && as_dir=.
5853 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 5854 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
5855 ac_cv_prog_ac_ct_CC="gcc"
5856 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5857 break 2
5858 fi
5859done
5860 done
5861IFS=$as_save_IFS
5862
5863fi
5864fi
5865ac_ct_CC=$ac_cv_prog_ac_ct_CC
5866if test -n "$ac_ct_CC"; then
5867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5868$as_echo "$ac_ct_CC" >&6; }
5869else
5870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5871$as_echo "no" >&6; }
5872fi
5873
5874 if test "x$ac_ct_CC" = x; then
5875 CC=""
5876 else
5877 case $cross_compiling:$ac_tool_warned in
5878yes:)
5879{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5880$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5881ac_tool_warned=yes ;;
5882esac
5883 CC=$ac_ct_CC
5884 fi
5885else
5886 CC="$ac_cv_prog_CC"
5887fi
5888
5889if test -z "$CC"; then
5890 if test -n "$ac_tool_prefix"; then
5891 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5892set dummy ${ac_tool_prefix}cc; ac_word=$2
5893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5894$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 5895if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
5896 $as_echo_n "(cached) " >&6
5897else
5898 if test -n "$CC"; then
5899 ac_cv_prog_CC="$CC" # Let the user override the test.
5900else
5901as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5902for as_dir in $PATH
5903do
5904 IFS=$as_save_IFS
5905 test -z "$as_dir" && as_dir=.
5906 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 5907 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
5908 ac_cv_prog_CC="${ac_tool_prefix}cc"
5909 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5910 break 2
5911 fi
5912done
5913 done
5914IFS=$as_save_IFS
5915
5916fi
5917fi
5918CC=$ac_cv_prog_CC
5919if test -n "$CC"; then
5920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5921$as_echo "$CC" >&6; }
5922else
5923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5924$as_echo "no" >&6; }
5925fi
5926
5927
5928 fi
5929fi
5930if test -z "$CC"; then
5931 # Extract the first word of "cc", so it can be a program name with args.
5932set dummy cc; ac_word=$2
5933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5934$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 5935if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
5936 $as_echo_n "(cached) " >&6
5937else
5938 if test -n "$CC"; then
5939 ac_cv_prog_CC="$CC" # Let the user override the test.
5940else
5941 ac_prog_rejected=no
5942as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5943for as_dir in $PATH
5944do
5945 IFS=$as_save_IFS
5946 test -z "$as_dir" && as_dir=.
5947 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 5948 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
5949 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5950 ac_prog_rejected=yes
5951 continue
5952 fi
5953 ac_cv_prog_CC="cc"
5954 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5955 break 2
5956 fi
5957done
5958 done
5959IFS=$as_save_IFS
5960
5961if test $ac_prog_rejected = yes; then
5962 # We found a bogon in the path, so make sure we never use it.
5963 set dummy $ac_cv_prog_CC
5964 shift
5965 if test $# != 0; then
5966 # We chose a different compiler from the bogus one.
5967 # However, it has the same basename, so the bogon will be chosen
5968 # first if we set CC to just the basename; use the full file name.
5969 shift
5970 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
5971 fi
5972fi
5973fi
5974fi
5975CC=$ac_cv_prog_CC
5976if test -n "$CC"; then
5977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5978$as_echo "$CC" >&6; }
5979else
5980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5981$as_echo "no" >&6; }
5982fi
5983
5984
5985fi
5986if test -z "$CC"; then
5987 if test -n "$ac_tool_prefix"; then
5988 for ac_prog in cl.exe
5989 do
5990 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5991set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5993$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 5994if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
5995 $as_echo_n "(cached) " >&6
5996else
5997 if test -n "$CC"; then
5998 ac_cv_prog_CC="$CC" # Let the user override the test.
5999else
6000as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6001for as_dir in $PATH
6002do
6003 IFS=$as_save_IFS
6004 test -z "$as_dir" && as_dir=.
6005 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 6006 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
6007 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
6008 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6009 break 2
6010 fi
6011done
6012 done
6013IFS=$as_save_IFS
6014
6015fi
6016fi
6017CC=$ac_cv_prog_CC
6018if test -n "$CC"; then
6019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6020$as_echo "$CC" >&6; }
6021else
6022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6023$as_echo "no" >&6; }
6024fi
6025
6026
6027 test -n "$CC" && break
6028 done
6029fi
6030if test -z "$CC"; then
6031 ac_ct_CC=$CC
6032 for ac_prog in cl.exe
6033do
6034 # Extract the first word of "$ac_prog", so it can be a program name with args.
6035set dummy $ac_prog; ac_word=$2
6036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6037$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 6038if ${ac_cv_prog_ac_ct_CC+:} false; then :
c971b7fa
PA
6039 $as_echo_n "(cached) " >&6
6040else
6041 if test -n "$ac_ct_CC"; then
6042 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
6043else
6044as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6045for as_dir in $PATH
6046do
6047 IFS=$as_save_IFS
6048 test -z "$as_dir" && as_dir=.
6049 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 6050 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
6051 ac_cv_prog_ac_ct_CC="$ac_prog"
6052 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6053 break 2
6054 fi
6055done
6056 done
6057IFS=$as_save_IFS
6058
6059fi
6060fi
6061ac_ct_CC=$ac_cv_prog_ac_ct_CC
6062if test -n "$ac_ct_CC"; then
6063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
6064$as_echo "$ac_ct_CC" >&6; }
6065else
6066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6067$as_echo "no" >&6; }
6068fi
6069
6070
6071 test -n "$ac_ct_CC" && break
6072done
6073
6074 if test "x$ac_ct_CC" = x; then
6075 CC=""
6076 else
6077 case $cross_compiling:$ac_tool_warned in
6078yes:)
6079{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6080$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6081ac_tool_warned=yes ;;
6082esac
6083 CC=$ac_ct_CC
6084 fi
6085fi
6086
6087fi
6088
6089
6090test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6091$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
63a9e923
SM
6092as_fn_error $? "no acceptable C compiler found in \$PATH
6093See \`config.log' for more details" "$LINENO" 5; }
c971b7fa
PA
6094
6095# Provide some information about the compiler.
6096$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
6097set X $ac_compile
6098ac_compiler=$2
6099for ac_option in --version -v -V -qversion; do
6100 { { ac_try="$ac_compiler $ac_option >&5"
6101case "(($ac_try" in
6102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6103 *) ac_try_echo=$ac_try;;
6104esac
6105eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6106$as_echo "$ac_try_echo"; } >&5
6107 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
6108 ac_status=$?
6109 if test -s conftest.err; then
6110 sed '10a\
6111... rest of stderr output deleted ...
6112 10q' conftest.err >conftest.er1
6113 cat conftest.er1 >&5
c971b7fa 6114 fi
63a9e923 6115 rm -f conftest.er1 conftest.err
c971b7fa
PA
6116 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6117 test $ac_status = 0; }
6118done
6119
6120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
6121$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
63a9e923 6122if ${ac_cv_c_compiler_gnu+:} false; then :
c971b7fa
PA
6123 $as_echo_n "(cached) " >&6
6124else
6125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6126/* end confdefs.h. */
6127
6128int
6129main ()
6130{
6131#ifndef __GNUC__
6132 choke me
6133#endif
6134
6135 ;
6136 return 0;
6137}
6138_ACEOF
6139if ac_fn_c_try_compile "$LINENO"; then :
6140 ac_compiler_gnu=yes
6141else
6142 ac_compiler_gnu=no
6143fi
6144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6145ac_cv_c_compiler_gnu=$ac_compiler_gnu
6146
6147fi
6148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
6149$as_echo "$ac_cv_c_compiler_gnu" >&6; }
6150if test $ac_compiler_gnu = yes; then
6151 GCC=yes
6152else
6153 GCC=
6154fi
6155ac_test_CFLAGS=${CFLAGS+set}
6156ac_save_CFLAGS=$CFLAGS
6157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
6158$as_echo_n "checking whether $CC accepts -g... " >&6; }
63a9e923 6159if ${ac_cv_prog_cc_g+:} false; then :
c971b7fa
PA
6160 $as_echo_n "(cached) " >&6
6161else
6162 ac_save_c_werror_flag=$ac_c_werror_flag
6163 ac_c_werror_flag=yes
6164 ac_cv_prog_cc_g=no
6165 CFLAGS="-g"
6166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6167/* end confdefs.h. */
6168
6169int
6170main ()
6171{
6172
6173 ;
6174 return 0;
6175}
6176_ACEOF
6177if ac_fn_c_try_compile "$LINENO"; then :
6178 ac_cv_prog_cc_g=yes
6179else
6180 CFLAGS=""
6181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6182/* end confdefs.h. */
6183
6184int
6185main ()
6186{
6187
6188 ;
6189 return 0;
6190}
6191_ACEOF
6192if ac_fn_c_try_compile "$LINENO"; then :
6193
6194else
6195 ac_c_werror_flag=$ac_save_c_werror_flag
6196 CFLAGS="-g"
6197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6198/* end confdefs.h. */
6199
6200int
6201main ()
6202{
6203
6204 ;
6205 return 0;
6206}
6207_ACEOF
6208if ac_fn_c_try_compile "$LINENO"; then :
6209 ac_cv_prog_cc_g=yes
6210fi
6211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6212fi
6213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6214fi
6215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6216 ac_c_werror_flag=$ac_save_c_werror_flag
6217fi
6218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
6219$as_echo "$ac_cv_prog_cc_g" >&6; }
6220if test "$ac_test_CFLAGS" = set; then
6221 CFLAGS=$ac_save_CFLAGS
6222elif test $ac_cv_prog_cc_g = yes; then
6223 if test "$GCC" = yes; then
6224 CFLAGS="-g -O2"
6225 else
6226 CFLAGS="-g"
6227 fi
6228else
6229 if test "$GCC" = yes; then
6230 CFLAGS="-O2"
6231 else
6232 CFLAGS=
6233 fi
6234fi
6235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6236$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
63a9e923 6237if ${ac_cv_prog_cc_c89+:} false; then :
c971b7fa
PA
6238 $as_echo_n "(cached) " >&6
6239else
6240 ac_cv_prog_cc_c89=no
6241ac_save_CC=$CC
6242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6243/* end confdefs.h. */
6244#include <stdarg.h>
6245#include <stdio.h>
63a9e923 6246struct stat;
c971b7fa
PA
6247/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
6248struct buf { int x; };
6249FILE * (*rcsopen) (struct buf *, struct stat *, int);
6250static char *e (p, i)
6251 char **p;
6252 int i;
6253{
6254 return p[i];
6255}
6256static char *f (char * (*g) (char **, int), char **p, ...)
6257{
6258 char *s;
6259 va_list v;
6260 va_start (v,p);
6261 s = g (p, va_arg (v,int));
6262 va_end (v);
6263 return s;
6264}
6265
6266/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
6267 function prototypes and stuff, but not '\xHH' hex character constants.
6268 These don't provoke an error unfortunately, instead are silently treated
6269 as 'x'. The following induces an error, until -std is added to get
6270 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
6271 array size at least. It's necessary to write '\x00'==0 to get something
6272 that's true only with -std. */
6273int osf4_cc_array ['\x00' == 0 ? 1 : -1];
6274
6275/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6276 inside strings and character constants. */
6277#define FOO(x) 'x'
6278int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
6279
6280int test (int i, double x);
6281struct s1 {int (*f) (int a);};
6282struct s2 {int (*f) (double a);};
6283int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6284int argc;
6285char **argv;
6286int
6287main ()
6288{
6289return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
6290 ;
6291 return 0;
6292}
6293_ACEOF
6294for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6295 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6296do
6297 CC="$ac_save_CC $ac_arg"
6298 if ac_fn_c_try_compile "$LINENO"; then :
6299 ac_cv_prog_cc_c89=$ac_arg
6300fi
6301rm -f core conftest.err conftest.$ac_objext
6302 test "x$ac_cv_prog_cc_c89" != "xno" && break
6303done
6304rm -f conftest.$ac_ext
6305CC=$ac_save_CC
6306
6307fi
6308# AC_CACHE_VAL
6309case "x$ac_cv_prog_cc_c89" in
6310 x)
6311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6312$as_echo "none needed" >&6; } ;;
6313 xno)
6314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6315$as_echo "unsupported" >&6; } ;;
6316 *)
6317 CC="$CC $ac_cv_prog_cc_c89"
6318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6319$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6320esac
6321if test "x$ac_cv_prog_cc_c89" != xno; then :
6322
6323fi
6324
6325ac_ext=c
6326ac_cpp='$CPP $CPPFLAGS'
6327ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6328ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6329ac_compiler_gnu=$ac_cv_c_compiler_gnu
6330
63a9e923
SM
6331ac_ext=c
6332ac_cpp='$CPP $CPPFLAGS'
6333ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6334ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6335ac_compiler_gnu=$ac_cv_c_compiler_gnu
6336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
6337$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
6338if ${am_cv_prog_cc_c_o+:} false; then :
6339 $as_echo_n "(cached) " >&6
6340else
6341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6342/* end confdefs.h. */
6343
6344int
6345main ()
6346{
6347
6348 ;
6349 return 0;
6350}
6351_ACEOF
6352 # Make sure it works both with $CC and with simple cc.
6353 # Following AC_PROG_CC_C_O, we do the test twice because some
6354 # compilers refuse to overwrite an existing .o file with -o,
6355 # though they will create one.
6356 am_cv_prog_cc_c_o=yes
6357 for am_i in 1 2; do
6358 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
6359 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
6360 ac_status=$?
6361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6362 (exit $ac_status); } \
6363 && test -f conftest2.$ac_objext; then
6364 : OK
6365 else
6366 am_cv_prog_cc_c_o=no
6367 break
6368 fi
6369 done
6370 rm -f core conftest*
6371 unset am_i
6372fi
6373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
6374$as_echo "$am_cv_prog_cc_c_o" >&6; }
6375if test "$am_cv_prog_cc_c_o" != yes; then
6376 # Losing compiler, so override with the script.
6377 # FIXME: It is wrong to rewrite CC.
6378 # But if we don't then we get into trouble of one sort or another.
6379 # A longer-term fix would be to have automake use am__CC in this case,
6380 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
6381 CC="$am_aux_dir/compile $CC"
6382fi
6383ac_ext=c
6384ac_cpp='$CPP $CPPFLAGS'
6385ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6386ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6387ac_compiler_gnu=$ac_cv_c_compiler_gnu
6388
c971b7fa
PA
6389
6390am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
6391
6392
6393ac_aux_dir=
6394for ac_dir in ../.. "$srcdir"/../..; do
63a9e923
SM
6395 if test -f "$ac_dir/install-sh"; then
6396 ac_aux_dir=$ac_dir
6397 ac_install_sh="$ac_aux_dir/install-sh -c"
6398 break
6399 elif test -f "$ac_dir/install.sh"; then
6400 ac_aux_dir=$ac_dir
6401 ac_install_sh="$ac_aux_dir/install.sh -c"
6402 break
6403 elif test -f "$ac_dir/shtool"; then
6404 ac_aux_dir=$ac_dir
6405 ac_install_sh="$ac_aux_dir/shtool install -c"
6406 break
6407 fi
c971b7fa
PA
6408done
6409if test -z "$ac_aux_dir"; then
63a9e923 6410 as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../.. \"$srcdir\"/../.." "$LINENO" 5
c971b7fa
PA
6411fi
6412
6413# These three variables are undocumented and unsupported,
6414# and are intended to be withdrawn in a future Autoconf release.
6415# They can cause serious problems if a builder's source tree is in a directory
6416# whose full name contains unusual characters.
6417ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
6418ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
6419ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
6420
6421
6422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6423$as_echo_n "checking target system type... " >&6; }
63a9e923 6424if ${ac_cv_target+:} false; then :
c971b7fa
PA
6425 $as_echo_n "(cached) " >&6
6426else
6427 if test "x$target_alias" = x; then
6428 ac_cv_target=$ac_cv_host
6429else
6430 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
63a9e923 6431 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
c971b7fa
PA
6432fi
6433
6434fi
6435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6436$as_echo "$ac_cv_target" >&6; }
6437case $ac_cv_target in
6438*-*-*) ;;
63a9e923 6439*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
c971b7fa
PA
6440esac
6441target=$ac_cv_target
6442ac_save_IFS=$IFS; IFS='-'
6443set x $ac_cv_target
6444shift
6445target_cpu=$1
6446target_vendor=$2
6447shift; shift
6448# Remember, the first character of IFS is used to create $*,
6449# except with old shells:
6450target_os=$*
6451IFS=$ac_save_IFS
6452case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6453
6454
6455# The aliases save the names the user supplied, while $host etc.
6456# will get canonicalized.
6457test -n "$target_alias" &&
6458 test "$program_prefix$program_suffix$program_transform_name" = \
6459 NONENONEs,x,x, &&
6460 program_prefix=${target_alias}-
6461
6462
6463
6464
6465
6466
6467
6468 LIBC_FATAL_STDERR_=1
6469 export LIBC_FATAL_STDERR_
6470
63a9e923
SM
6471ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6472if test "x$ac_cv_type_size_t" = xyes; then :
6473
6474else
6475
6476cat >>confdefs.h <<_ACEOF
6477#define size_t unsigned int
6478_ACEOF
6479
6480fi
6481
8690e634
JK
6482# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6483# for constant arguments. Useless!
6484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
6485$as_echo_n "checking for working alloca.h... " >&6; }
63a9e923 6486if ${ac_cv_working_alloca_h+:} false; then :
c971b7fa
PA
6487 $as_echo_n "(cached) " >&6
6488else
8690e634 6489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 6490/* end confdefs.h. */
8690e634 6491#include <alloca.h>
c971b7fa
PA
6492int
6493main ()
6494{
8690e634
JK
6495char *p = (char *) alloca (2 * sizeof (int));
6496 if (p) return 0;
c971b7fa
PA
6497 ;
6498 return 0;
6499}
c971b7fa
PA
6500_ACEOF
6501if ac_fn_c_try_link "$LINENO"; then :
8690e634 6502 ac_cv_working_alloca_h=yes
c971b7fa 6503else
8690e634 6504 ac_cv_working_alloca_h=no
c971b7fa
PA
6505fi
6506rm -f core conftest.err conftest.$ac_objext \
6507 conftest$ac_exeext conftest.$ac_ext
c971b7fa 6508fi
8690e634
JK
6509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
6510$as_echo "$ac_cv_working_alloca_h" >&6; }
6511if test $ac_cv_working_alloca_h = yes; then
c971b7fa 6512
8690e634 6513$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c971b7fa 6514
8690e634 6515fi
c971b7fa 6516
8690e634
JK
6517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
6518$as_echo_n "checking for alloca... " >&6; }
63a9e923 6519if ${ac_cv_func_alloca_works+:} false; then :
c971b7fa 6520 $as_echo_n "(cached) " >&6
c971b7fa
PA
6521else
6522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6523/* end confdefs.h. */
8690e634
JK
6524#ifdef __GNUC__
6525# define alloca __builtin_alloca
6526#else
6527# ifdef _MSC_VER
6528# include <malloc.h>
6529# define alloca _alloca
6530# else
6531# ifdef HAVE_ALLOCA_H
6532# include <alloca.h>
6533# else
6534# ifdef _AIX
6535 #pragma alloca
6536# else
6537# ifndef alloca /* predefined by HP cc +Olibcalls */
63a9e923 6538void *alloca (size_t);
8690e634
JK
6539# endif
6540# endif
6541# endif
6542# endif
6543#endif
6544
c971b7fa
PA
6545int
6546main ()
6547{
8690e634
JK
6548char *p = (char *) alloca (1);
6549 if (p) return 0;
c971b7fa
PA
6550 ;
6551 return 0;
6552}
6553_ACEOF
8690e634
JK
6554if ac_fn_c_try_link "$LINENO"; then :
6555 ac_cv_func_alloca_works=yes
c971b7fa 6556else
8690e634 6557 ac_cv_func_alloca_works=no
c971b7fa 6558fi
8690e634
JK
6559rm -f core conftest.err conftest.$ac_objext \
6560 conftest$ac_exeext conftest.$ac_ext
c971b7fa 6561fi
a143c6de
JB
6562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
6563$as_echo "$ac_cv_func_alloca_works" >&6; }
c971b7fa 6564
a143c6de 6565if test $ac_cv_func_alloca_works = yes; then
c971b7fa 6566
a143c6de 6567$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c971b7fa 6568
a143c6de
JB
6569else
6570 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6571# that cause trouble. Some versions do not even contain alloca or
6572# contain a buggy version. If you still want to use their alloca,
6573# use ar to extract alloca.o from them instead of compiling alloca.c.
c971b7fa
PA
6574
6575
6576
6577
6578
a143c6de 6579ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
c971b7fa 6580
a143c6de 6581$as_echo "#define C_ALLOCA 1" >>confdefs.h
c971b7fa 6582
c971b7fa 6583
63a9e923
SM
6584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
6585$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
6586if ${ac_cv_os_cray+:} false; then :
8690e634
JK
6587 $as_echo_n "(cached) " >&6
6588else
a143c6de 6589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 6590/* end confdefs.h. */
a143c6de
JB
6591#if defined CRAY && ! defined CRAY2
6592webecray
6593#else
6594wenotbecray
8690e634 6595#endif
c971b7fa 6596
8690e634
JK
6597_ACEOF
6598if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
a143c6de
JB
6599 $EGREP "webecray" >/dev/null 2>&1; then :
6600 ac_cv_os_cray=yes
8690e634 6601else
a143c6de 6602 ac_cv_os_cray=no
8690e634
JK
6603fi
6604rm -f conftest*
c971b7fa 6605
c0fc7f8b 6606fi
a143c6de
JB
6607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
6608$as_echo "$ac_cv_os_cray" >&6; }
6609if test $ac_cv_os_cray = yes; then
6610 for ac_func in _getb67 GETB67 getb67; do
6611 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6612ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
63a9e923 6613if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
c0fc7f8b 6614
a143c6de
JB
6615cat >>confdefs.h <<_ACEOF
6616#define CRAY_STACKSEG_END $ac_func
6617_ACEOF
c971b7fa 6618
a143c6de 6619 break
8690e634 6620fi
c971b7fa 6621
a143c6de 6622 done
8690e634 6623fi
c0fc7f8b 6624
a143c6de
JB
6625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
6626$as_echo_n "checking stack direction for C alloca... " >&6; }
63a9e923 6627if ${ac_cv_c_stack_direction+:} false; then :
c971b7fa
PA
6628 $as_echo_n "(cached) " >&6
6629else
a143c6de
JB
6630 if test "$cross_compiling" = yes; then :
6631 ac_cv_c_stack_direction=0
6632else
6633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 6634/* end confdefs.h. */
a143c6de
JB
6635$ac_includes_default
6636int
6637find_stack_direction (int *addr, int depth)
6638{
6639 int dir, dummy = 0;
6640 if (! addr)
6641 addr = &dummy;
6642 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
6643 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
6644 return dir + dummy;
6645}
8690e634 6646
a143c6de
JB
6647int
6648main (int argc, char **argv)
6649{
6650 return find_stack_direction (0, argc + !argv + 20) < 0;
6651}
c971b7fa 6652_ACEOF
a143c6de
JB
6653if ac_fn_c_try_run "$LINENO"; then :
6654 ac_cv_c_stack_direction=1
c971b7fa 6655else
a143c6de 6656 ac_cv_c_stack_direction=-1
8690e634 6657fi
a143c6de
JB
6658rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6659 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 6660fi
c971b7fa
PA
6661
6662fi
a143c6de
JB
6663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
6664$as_echo "$ac_cv_c_stack_direction" >&6; }
6665cat >>confdefs.h <<_ACEOF
6666#define STACK_DIRECTION $ac_cv_c_stack_direction
6667_ACEOF
8690e634 6668
c971b7fa
PA
6669
6670fi
c971b7fa
PA
6671
6672
98399780
YQ
6673 GNULIB__EXIT=0;
6674 GNULIB_ATOLL=0;
6675 GNULIB_CALLOC_POSIX=0;
6676 GNULIB_CANONICALIZE_FILE_NAME=0;
6677 GNULIB_GETLOADAVG=0;
6678 GNULIB_GETSUBOPT=0;
6679 GNULIB_GRANTPT=0;
6680 GNULIB_MALLOC_POSIX=0;
6681 GNULIB_MBTOWC=0;
6682 GNULIB_MKDTEMP=0;
6683 GNULIB_MKOSTEMP=0;
6684 GNULIB_MKOSTEMPS=0;
6685 GNULIB_MKSTEMP=0;
6686 GNULIB_MKSTEMPS=0;
6687 GNULIB_POSIX_OPENPT=0;
6688 GNULIB_PTSNAME=0;
6689 GNULIB_PTSNAME_R=0;
6690 GNULIB_PUTENV=0;
4a626d0a 6691 GNULIB_QSORT_R=0;
98399780
YQ
6692 GNULIB_RANDOM=0;
6693 GNULIB_RANDOM_R=0;
6694 GNULIB_REALLOC_POSIX=0;
6695 GNULIB_REALPATH=0;
6696 GNULIB_RPMATCH=0;
4a626d0a 6697 GNULIB_SECURE_GETENV=0;
98399780
YQ
6698 GNULIB_SETENV=0;
6699 GNULIB_STRTOD=0;
6700 GNULIB_STRTOLL=0;
6701 GNULIB_STRTOULL=0;
6702 GNULIB_SYSTEM_POSIX=0;
6703 GNULIB_UNLOCKPT=0;
6704 GNULIB_UNSETENV=0;
6705 GNULIB_WCTOMB=0;
6706 HAVE__EXIT=1;
6707 HAVE_ATOLL=1;
6708 HAVE_CANONICALIZE_FILE_NAME=1;
6709 HAVE_DECL_GETLOADAVG=1;
6710 HAVE_GETSUBOPT=1;
6711 HAVE_GRANTPT=1;
6712 HAVE_MKDTEMP=1;
6713 HAVE_MKOSTEMP=1;
6714 HAVE_MKOSTEMPS=1;
6715 HAVE_MKSTEMP=1;
6716 HAVE_MKSTEMPS=1;
6717 HAVE_POSIX_OPENPT=1;
6718 HAVE_PTSNAME=1;
6719 HAVE_PTSNAME_R=1;
4c62b19f 6720 HAVE_QSORT_R=1;
98399780
YQ
6721 HAVE_RANDOM=1;
6722 HAVE_RANDOM_H=1;
6723 HAVE_RANDOM_R=1;
6724 HAVE_REALPATH=1;
6725 HAVE_RPMATCH=1;
4a626d0a 6726 HAVE_SECURE_GETENV=1;
98399780
YQ
6727 HAVE_SETENV=1;
6728 HAVE_DECL_SETENV=1;
6729 HAVE_STRTOD=1;
6730 HAVE_STRTOLL=1;
6731 HAVE_STRTOULL=1;
6732 HAVE_STRUCT_RANDOM_DATA=1;
6733 HAVE_SYS_LOADAVG_H=0;
6734 HAVE_UNLOCKPT=1;
6735 HAVE_DECL_UNSETENV=1;
6736 REPLACE_CALLOC=0;
6737 REPLACE_CANONICALIZE_FILE_NAME=0;
6738 REPLACE_MALLOC=0;
6739 REPLACE_MBTOWC=0;
6740 REPLACE_MKSTEMP=0;
6741 REPLACE_PTSNAME=0;
6742 REPLACE_PTSNAME_R=0;
6743 REPLACE_PUTENV=0;
4a626d0a 6744 REPLACE_QSORT_R=0;
98399780
YQ
6745 REPLACE_RANDOM_R=0;
6746 REPLACE_REALLOC=0;
6747 REPLACE_REALPATH=0;
6748 REPLACE_SETENV=0;
6749 REPLACE_STRTOD=0;
6750 REPLACE_UNSETENV=0;
6751 REPLACE_WCTOMB=0;
6752
6753
6754
6755
6756 for ac_func in $ac_func_list
6757do :
6758 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6759ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
63a9e923 6760if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
98399780
YQ
6761 cat >>confdefs.h <<_ACEOF
6762#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6763_ACEOF
6764
6765fi
6766done
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
6777$as_echo_n "checking whether // is distinct from /... " >&6; }
63a9e923 6778if ${gl_cv_double_slash_root+:} false; then :
98399780
YQ
6779 $as_echo_n "(cached) " >&6
6780else
6781 if test x"$cross_compiling" = xyes ; then
6782 # When cross-compiling, there is no way to tell whether // is special
6783 # short of a list of hosts. However, the only known hosts to date
6784 # that have a distinct // are Apollo DomainOS (too old to port to),
6785 # Cygwin, and z/OS. If anyone knows of another system for which // has
6786 # special semantics and is distinct from /, please report it to
6787 # <bug-gnulib@gnu.org>.
6788 case $host in
6789 *-cygwin | i370-ibm-openedition)
6790 gl_cv_double_slash_root=yes ;;
6791 *)
6792 # Be optimistic and assume that / and // are the same when we
6793 # don't know.
6794 gl_cv_double_slash_root='unknown, assuming no' ;;
6795 esac
6796 else
6797 set x `ls -di / // 2>/dev/null`
6798 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
6799 gl_cv_double_slash_root=no
6800 else
6801 gl_cv_double_slash_root=yes
6802 fi
6803 fi
6804fi
6805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
6806$as_echo "$gl_cv_double_slash_root" >&6; }
6807 if test "$gl_cv_double_slash_root" = yes; then
6808
6809$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
6810
6811 fi
6812
6813
6814
6815
6816
6817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
6818$as_echo_n "checking whether realpath works... " >&6; }
63a9e923 6819if ${gl_cv_func_realpath_works+:} false; then :
98399780
YQ
6820 $as_echo_n "(cached) " >&6
6821else
6822
6823 touch conftest.a
6824 mkdir conftest.d
6825 if test "$cross_compiling" = yes; then :
6826 case "$host_os" in
6827 # Guess yes on glibc systems.
6828 *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
6829 # If we don't know, assume the worst.
6830 *) gl_cv_func_realpath_works="guessing no" ;;
6831 esac
6832
6833else
6834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6835/* end confdefs.h. */
6836
6837
6838
6839#include <stdlib.h>
6840#if defined __MACH__ && defined __APPLE__
6841/* Avoid a crash on Mac OS X. */
6842#include <mach/mach.h>
6843#include <mach/mach_error.h>
6844#include <mach/thread_status.h>
6845#include <mach/exception.h>
6846#include <mach/task.h>
6847#include <pthread.h>
6848/* The exception port on which our thread listens. */
6849static mach_port_t our_exception_port;
6850/* The main function of the thread listening for exceptions of type
6851 EXC_BAD_ACCESS. */
6852static void *
6853mach_exception_thread (void *arg)
6854{
6855 /* Buffer for a message to be received. */
6856 struct {
6857 mach_msg_header_t head;
6858 mach_msg_body_t msgh_body;
6859 char data[1024];
6860 } msg;
6861 mach_msg_return_t retval;
6862 /* Wait for a message on the exception port. */
6863 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
6864 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
6865 if (retval != MACH_MSG_SUCCESS)
6866 abort ();
6867 exit (1);
6868}
6869static void
6870nocrash_init (void)
6871{
6872 mach_port_t self = mach_task_self ();
6873 /* Allocate a port on which the thread shall listen for exceptions. */
6874 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
6875 == KERN_SUCCESS) {
6876 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
6877 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
6878 MACH_MSG_TYPE_MAKE_SEND)
6879 == KERN_SUCCESS) {
6880 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
6881 for us. */
6882 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
6883 /* Create the thread listening on the exception port. */
6884 pthread_attr_t attr;
6885 pthread_t thread;
6886 if (pthread_attr_init (&attr) == 0
6887 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
6888 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
6889 pthread_attr_destroy (&attr);
6890 /* Replace the exception port info for these exceptions with our own.
6891 Note that we replace the exception port for the entire task, not only
6892 for a particular thread. This has the effect that when our exception
6893 port gets the message, the thread specific exception port has already
6894 been asked, and we don't need to bother about it.
6895 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
6896 task_set_exception_ports (self, mask, our_exception_port,
6897 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
6898 }
6899 }
6900 }
6901}
6902#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6903/* Avoid a crash on native Windows. */
6904#define WIN32_LEAN_AND_MEAN
6905#include <windows.h>
6906#include <winerror.h>
6907static LONG WINAPI
6908exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
6909{
6910 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
6911 {
6912 case EXCEPTION_ACCESS_VIOLATION:
6913 case EXCEPTION_IN_PAGE_ERROR:
6914 case EXCEPTION_STACK_OVERFLOW:
6915 case EXCEPTION_GUARD_PAGE:
6916 case EXCEPTION_PRIV_INSTRUCTION:
6917 case EXCEPTION_ILLEGAL_INSTRUCTION:
6918 case EXCEPTION_DATATYPE_MISALIGNMENT:
6919 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
6920 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
6921 exit (1);
6922 }
6923 return EXCEPTION_CONTINUE_SEARCH;
6924}
6925static void
6926nocrash_init (void)
6927{
6928 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
6929}
6930#else
6931/* Avoid a crash on POSIX systems. */
6932#include <signal.h>
49e4877c 6933#include <unistd.h>
98399780
YQ
6934/* A POSIX signal handler. */
6935static void
6936exception_handler (int sig)
6937{
49e4877c 6938 _exit (1);
98399780
YQ
6939}
6940static void
6941nocrash_init (void)
6942{
6943#ifdef SIGSEGV
6944 signal (SIGSEGV, exception_handler);
6945#endif
6946#ifdef SIGBUS
6947 signal (SIGBUS, exception_handler);
6948#endif
6949}
6950#endif
6951
6952 #include <stdlib.h>
6953 #include <string.h>
6954
6955int
6956main ()
6957{
6958
6959 int result = 0;
6960 {
6961 char *name = realpath ("conftest.a", NULL);
6962 if (!(name && *name == '/'))
6963 result |= 1;
49e4877c 6964 free (name);
98399780
YQ
6965 }
6966 {
6967 char *name = realpath ("conftest.b/../conftest.a", NULL);
6968 if (name != NULL)
6969 result |= 2;
49e4877c 6970 free (name);
98399780
YQ
6971 }
6972 {
6973 char *name = realpath ("conftest.a/", NULL);
6974 if (name != NULL)
6975 result |= 4;
49e4877c 6976 free (name);
98399780
YQ
6977 }
6978 {
6979 char *name1 = realpath (".", NULL);
6980 char *name2 = realpath ("conftest.d//./..", NULL);
49e4877c 6981 if (! name1 || ! name2 || strcmp (name1, name2))
98399780 6982 result |= 8;
49e4877c
PA
6983 free (name1);
6984 free (name2);
98399780
YQ
6985 }
6986 return result;
6987
6988 ;
6989 return 0;
6990}
6991
6992_ACEOF
6993if ac_fn_c_try_run "$LINENO"; then :
6994 gl_cv_func_realpath_works=yes
6995else
6996 gl_cv_func_realpath_works=no
6997fi
6998rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6999 conftest.$ac_objext conftest.beam conftest.$ac_ext
7000fi
7001
7002 rm -rf conftest.a conftest.d
7003
7004fi
7005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
7006$as_echo "$gl_cv_func_realpath_works" >&6; }
7007 case "$gl_cv_func_realpath_works" in
7008 *yes)
7009
7010$as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
7011
7012 ;;
7013 esac
7014
7015
7016
7017
7018 for ac_header in $ac_header_list
7019do :
7020 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7021ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7022"
63a9e923 7023if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
98399780
YQ
7024 cat >>confdefs.h <<_ACEOF
7025#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7026_ACEOF
7027
7028fi
7029
7030done
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
e26b6bb0
TT
7042 GNULIB_CHDIR=0;
7043 GNULIB_CHOWN=0;
7044 GNULIB_CLOSE=0;
7045 GNULIB_DUP=0;
7046 GNULIB_DUP2=0;
7047 GNULIB_DUP3=0;
7048 GNULIB_ENVIRON=0;
7049 GNULIB_EUIDACCESS=0;
7050 GNULIB_FACCESSAT=0;
7051 GNULIB_FCHDIR=0;
7052 GNULIB_FCHOWNAT=0;
7053 GNULIB_FDATASYNC=0;
7054 GNULIB_FSYNC=0;
7055 GNULIB_FTRUNCATE=0;
7056 GNULIB_GETCWD=0;
7057 GNULIB_GETDOMAINNAME=0;
7058 GNULIB_GETDTABLESIZE=0;
7059 GNULIB_GETGROUPS=0;
7060 GNULIB_GETHOSTNAME=0;
7061 GNULIB_GETLOGIN=0;
7062 GNULIB_GETLOGIN_R=0;
7063 GNULIB_GETPAGESIZE=0;
7064 GNULIB_GETUSERSHELL=0;
7065 GNULIB_GROUP_MEMBER=0;
7066 GNULIB_ISATTY=0;
7067 GNULIB_LCHOWN=0;
7068 GNULIB_LINK=0;
7069 GNULIB_LINKAT=0;
7070 GNULIB_LSEEK=0;
7071 GNULIB_PIPE=0;
7072 GNULIB_PIPE2=0;
7073 GNULIB_PREAD=0;
7074 GNULIB_PWRITE=0;
7075 GNULIB_READ=0;
7076 GNULIB_READLINK=0;
7077 GNULIB_READLINKAT=0;
7078 GNULIB_RMDIR=0;
7079 GNULIB_SETHOSTNAME=0;
7080 GNULIB_SLEEP=0;
7081 GNULIB_SYMLINK=0;
7082 GNULIB_SYMLINKAT=0;
7083 GNULIB_TTYNAME_R=0;
7084 GNULIB_UNISTD_H_NONBLOCKING=0;
7085 GNULIB_UNISTD_H_SIGPIPE=0;
7086 GNULIB_UNLINK=0;
7087 GNULIB_UNLINKAT=0;
7088 GNULIB_USLEEP=0;
7089 GNULIB_WRITE=0;
7090 HAVE_CHOWN=1;
7091 HAVE_DUP2=1;
7092 HAVE_DUP3=1;
7093 HAVE_EUIDACCESS=1;
7094 HAVE_FACCESSAT=1;
7095 HAVE_FCHDIR=1;
7096 HAVE_FCHOWNAT=1;
7097 HAVE_FDATASYNC=1;
7098 HAVE_FSYNC=1;
7099 HAVE_FTRUNCATE=1;
7100 HAVE_GETDTABLESIZE=1;
7101 HAVE_GETGROUPS=1;
7102 HAVE_GETHOSTNAME=1;
7103 HAVE_GETLOGIN=1;
7104 HAVE_GETPAGESIZE=1;
7105 HAVE_GROUP_MEMBER=1;
7106 HAVE_LCHOWN=1;
7107 HAVE_LINK=1;
7108 HAVE_LINKAT=1;
7109 HAVE_PIPE=1;
7110 HAVE_PIPE2=1;
7111 HAVE_PREAD=1;
7112 HAVE_PWRITE=1;
7113 HAVE_READLINK=1;
7114 HAVE_READLINKAT=1;
7115 HAVE_SETHOSTNAME=1;
7116 HAVE_SLEEP=1;
7117 HAVE_SYMLINK=1;
7118 HAVE_SYMLINKAT=1;
7119 HAVE_UNLINKAT=1;
7120 HAVE_USLEEP=1;
7121 HAVE_DECL_ENVIRON=1;
7122 HAVE_DECL_FCHDIR=1;
7123 HAVE_DECL_FDATASYNC=1;
7124 HAVE_DECL_GETDOMAINNAME=1;
7125 HAVE_DECL_GETLOGIN_R=1;
7126 HAVE_DECL_GETPAGESIZE=1;
7127 HAVE_DECL_GETUSERSHELL=1;
7128 HAVE_DECL_SETHOSTNAME=1;
7129 HAVE_DECL_TTYNAME_R=1;
7130 HAVE_OS_H=0;
7131 HAVE_SYS_PARAM_H=0;
7132 REPLACE_CHOWN=0;
7133 REPLACE_CLOSE=0;
7134 REPLACE_DUP=0;
7135 REPLACE_DUP2=0;
7136 REPLACE_FCHOWNAT=0;
7137 REPLACE_FTRUNCATE=0;
7138 REPLACE_GETCWD=0;
7139 REPLACE_GETDOMAINNAME=0;
4a626d0a 7140 REPLACE_GETDTABLESIZE=0;
e26b6bb0
TT
7141 REPLACE_GETLOGIN_R=0;
7142 REPLACE_GETGROUPS=0;
7143 REPLACE_GETPAGESIZE=0;
7144 REPLACE_ISATTY=0;
7145 REPLACE_LCHOWN=0;
7146 REPLACE_LINK=0;
7147 REPLACE_LINKAT=0;
7148 REPLACE_LSEEK=0;
7149 REPLACE_PREAD=0;
7150 REPLACE_PWRITE=0;
7151 REPLACE_READ=0;
7152 REPLACE_READLINK=0;
4a626d0a 7153 REPLACE_READLINKAT=0;
e26b6bb0
TT
7154 REPLACE_RMDIR=0;
7155 REPLACE_SLEEP=0;
7156 REPLACE_SYMLINK=0;
4a626d0a 7157 REPLACE_SYMLINKAT=0;
e26b6bb0
TT
7158 REPLACE_TTYNAME_R=0;
7159 REPLACE_UNLINK=0;
7160 REPLACE_UNLINKAT=0;
7161 REPLACE_USLEEP=0;
7162 REPLACE_WRITE=0;
7163 UNISTD_H_HAVE_WINSOCK2_H=0;
7164 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
7165
7166
7167
6ec2e0f5
SDJ
7168
7169
7170
7171
7172
7173
7174
7175
7176 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
7177 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
7178
7179$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
7180
7181 else
7182 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
7183 fi
7184
7185
7186
7187
7188
7189
7190
e26b6bb0
TT
7191 GNULIB_OPENDIR=0;
7192 GNULIB_READDIR=0;
7193 GNULIB_REWINDDIR=0;
7194 GNULIB_CLOSEDIR=0;
7195 GNULIB_DIRFD=0;
7196 GNULIB_FDOPENDIR=0;
7197 GNULIB_SCANDIR=0;
7198 GNULIB_ALPHASORT=0;
7199 HAVE_OPENDIR=1;
7200 HAVE_READDIR=1;
7201 HAVE_REWINDDIR=1;
7202 HAVE_CLOSEDIR=1;
7203 HAVE_DECL_DIRFD=1;
7204 HAVE_DECL_FDOPENDIR=1;
7205 HAVE_FDOPENDIR=1;
7206 HAVE_SCANDIR=1;
7207 HAVE_ALPHASORT=1;
7208 REPLACE_OPENDIR=0;
7209 REPLACE_CLOSEDIR=0;
7210 REPLACE_DIRFD=0;
7211 REPLACE_FDOPENDIR=0;
7212
7213
7214
7215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
7216$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
63a9e923 7217if ${gl_cv_have_include_next+:} false; then :
e26b6bb0
TT
7218 $as_echo_n "(cached) " >&6
7219else
7220 rm -rf conftestd1a conftestd1b conftestd2
7221 mkdir conftestd1a conftestd1b conftestd2
7222 cat <<EOF > conftestd1a/conftest.h
7223#define DEFINED_IN_CONFTESTD1
7224#include_next <conftest.h>
7225#ifdef DEFINED_IN_CONFTESTD2
7226int foo;
7227#else
88b48903
WN
7228#error "include_next doesn't work"
7229#endif
7230EOF
7231 cat <<EOF > conftestd1b/conftest.h
7232#define DEFINED_IN_CONFTESTD1
7233#include <stdio.h>
7234#include_next <conftest.h>
7235#ifdef DEFINED_IN_CONFTESTD2
7236int foo;
7237#else
7238#error "include_next doesn't work"
7239#endif
7240EOF
7241 cat <<EOF > conftestd2/conftest.h
7242#ifndef DEFINED_IN_CONFTESTD1
7243#error "include_next test doesn't work"
7244#endif
7245#define DEFINED_IN_CONFTESTD2
7246EOF
7247 gl_save_CPPFLAGS="$CPPFLAGS"
7248 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
7249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7250/* end confdefs.h. */
7251#include <conftest.h>
7252_ACEOF
7253if ac_fn_c_try_compile "$LINENO"; then :
7254 gl_cv_have_include_next=yes
7255else
7256 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
7257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7258/* end confdefs.h. */
7259#include <conftest.h>
7260_ACEOF
7261if ac_fn_c_try_compile "$LINENO"; then :
7262 gl_cv_have_include_next=buggy
7263else
7264 gl_cv_have_include_next=no
7265fi
7266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7267
7268fi
7269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7270 CPPFLAGS="$gl_save_CPPFLAGS"
7271 rm -rf conftestd1a conftestd1b conftestd2
7272
7273fi
7274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
7275$as_echo "$gl_cv_have_include_next" >&6; }
7276 PRAGMA_SYSTEM_HEADER=
7277 if test $gl_cv_have_include_next = yes; then
7278 INCLUDE_NEXT=include_next
7279 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7280 if test -n "$GCC"; then
7281 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
7282 fi
7283 else
7284 if test $gl_cv_have_include_next = buggy; then
7285 INCLUDE_NEXT=include
7286 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7287 else
7288 INCLUDE_NEXT=include
7289 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
7290 fi
7291 fi
7292
7293
7294
7295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
7296$as_echo_n "checking whether system header files limit the line length... " >&6; }
63a9e923 7297if ${gl_cv_pragma_columns+:} false; then :
88b48903
WN
7298 $as_echo_n "(cached) " >&6
7299else
7300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7301/* end confdefs.h. */
7302
7303#ifdef __TANDEM
7304choke me
7305#endif
7306
7307_ACEOF
7308if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7309 $EGREP "choke me" >/dev/null 2>&1; then :
7310 gl_cv_pragma_columns=yes
7311else
7312 gl_cv_pragma_columns=no
7313fi
7314rm -f conftest*
7315
7316
7317fi
7318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
7319$as_echo "$gl_cv_pragma_columns" >&6; }
7320 if test $gl_cv_pragma_columns = yes; then
7321 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
7322 else
7323 PRAGMA_COLUMNS=
7324 fi
7325
7326
7327
7328
e26b6bb0 7329
e26b6bb0 7330
3d99e817
AK
7331
7332
7333
7334
7335
3d99e817
AK
7336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
7337$as_echo_n "checking if environ is properly declared... " >&6; }
63a9e923 7338 if ${gt_cv_var_environ_declaration+:} false; then :
3d99e817
AK
7339 $as_echo_n "(cached) " >&6
7340else
7341
7342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7343/* end confdefs.h. */
7344#if HAVE_UNISTD_H
7345 #include <unistd.h>
7346 #endif
7347 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
7348 #include <stdlib.h>
7349
7350 extern struct { int foo; } environ;
7351int
7352main ()
7353{
7354environ.foo = 1;
7355 ;
7356 return 0;
7357}
7358_ACEOF
7359if ac_fn_c_try_compile "$LINENO"; then :
7360 gt_cv_var_environ_declaration=no
7361else
7362 gt_cv_var_environ_declaration=yes
7363fi
7364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7365fi
7366
7367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
7368$as_echo "$gt_cv_var_environ_declaration" >&6; }
7369 if test $gt_cv_var_environ_declaration = yes; then
7370
7371$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
7372
7373 fi
7374
7375
7376 if test $gt_cv_var_environ_declaration != yes; then
7377 HAVE_DECL_ENVIRON=0
7378 fi
7379
7380
7381
18848e28
GF
7382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
7383$as_echo_n "checking for complete errno.h... " >&6; }
63a9e923 7384if ${gl_cv_header_errno_h_complete+:} false; then :
18848e28
GF
7385 $as_echo_n "(cached) " >&6
7386else
7387
7388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7389/* end confdefs.h. */
7390
7391#include <errno.h>
7392#if !defined ETXTBSY
7393booboo
7394#endif
7395#if !defined ENOMSG
7396booboo
7397#endif
7398#if !defined EIDRM
7399booboo
7400#endif
7401#if !defined ENOLINK
7402booboo
7403#endif
7404#if !defined EPROTO
7405booboo
7406#endif
7407#if !defined EMULTIHOP
7408booboo
7409#endif
7410#if !defined EBADMSG
7411booboo
7412#endif
7413#if !defined EOVERFLOW
7414booboo
7415#endif
7416#if !defined ENOTSUP
7417booboo
7418#endif
7419#if !defined ENETRESET
7420booboo
7421#endif
7422#if !defined ECONNABORTED
7423booboo
7424#endif
7425#if !defined ESTALE
7426booboo
7427#endif
7428#if !defined EDQUOT
7429booboo
7430#endif
7431#if !defined ECANCELED
7432booboo
7433#endif
7434#if !defined EOWNERDEAD
7435booboo
7436#endif
7437#if !defined ENOTRECOVERABLE
7438booboo
7439#endif
7440#if !defined EILSEQ
7441booboo
7442#endif
7443
7444_ACEOF
7445if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7446 $EGREP "booboo" >/dev/null 2>&1; then :
7447 gl_cv_header_errno_h_complete=no
7448else
7449 gl_cv_header_errno_h_complete=yes
7450fi
7451rm -f conftest*
7452
7453
7454fi
7455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
7456$as_echo "$gl_cv_header_errno_h_complete" >&6; }
7457 if test $gl_cv_header_errno_h_complete = yes; then
7458 ERRNO_H=''
7459 else
7460
7461
7462
7463
7464
7465
7466
7467
7468 if test $gl_cv_have_include_next = yes; then
7469 gl_cv_next_errno_h='<'errno.h'>'
7470 else
7471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
7472$as_echo_n "checking absolute name of <errno.h>... " >&6; }
63a9e923 7473if ${gl_cv_next_errno_h+:} false; then :
18848e28
GF
7474 $as_echo_n "(cached) " >&6
7475else
7476
4a626d0a
PA
7477
7478
7479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18848e28
GF
7480/* end confdefs.h. */
7481#include <errno.h>
18848e28 7482_ACEOF
4a626d0a
PA
7483 case "$host_os" in
7484 aix*) gl_absname_cpp="$ac_cpp -C" ;;
7485 *) gl_absname_cpp="$ac_cpp" ;;
7486 esac
18848e28 7487
4a626d0a
PA
7488 case "$host_os" in
7489 mingw*)
7490 gl_dirsep_regex='[/\\]'
7491 ;;
7492 *)
7493 gl_dirsep_regex='\/'
7494 ;;
7495 esac
7496 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
7497 gl_header_literal_regex=`echo 'errno.h' \
7498 | sed -e "$gl_make_literal_regex_sed"`
7499 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
7500 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
7501 s|^/[^/]|//&|
7502 p
7503 q
7504 }'
7505
7506 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7507 sed -n "$gl_absolute_header_sed"`
7508
7509 gl_header=$gl_cv_absolute_errno_h
7510 gl_cv_next_errno_h='"'$gl_header'"'
7511
7512
7513fi
7514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
18848e28
GF
7515$as_echo "$gl_cv_next_errno_h" >&6; }
7516 fi
7517 NEXT_ERRNO_H=$gl_cv_next_errno_h
7518
7519 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7520 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
7521 gl_next_as_first_directive='<'errno.h'>'
7522 else
7523 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
7524 gl_next_as_first_directive=$gl_cv_next_errno_h
7525 fi
7526 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
7527
7528
7529
7530
7531 ERRNO_H='errno.h'
7532 fi
7533
7534 if test -n "$ERRNO_H"; then
7535 GL_GENERATE_ERRNO_H_TRUE=
7536 GL_GENERATE_ERRNO_H_FALSE='#'
7537else
7538 GL_GENERATE_ERRNO_H_TRUE='#'
7539 GL_GENERATE_ERRNO_H_FALSE=
7540fi
7541
7542
7543 if test -n "$ERRNO_H"; then
7544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
7545$as_echo_n "checking for EMULTIHOP value... " >&6; }
63a9e923 7546if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
18848e28
GF
7547 $as_echo_n "(cached) " >&6
7548else
7549
7550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7551/* end confdefs.h. */
7552
7553#include <errno.h>
7554#ifdef EMULTIHOP
7555yes
7556#endif
7557
7558_ACEOF
7559if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7560 $EGREP "yes" >/dev/null 2>&1; then :
7561 gl_cv_header_errno_h_EMULTIHOP=yes
7562else
7563 gl_cv_header_errno_h_EMULTIHOP=no
7564fi
7565rm -f conftest*
7566
7567 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
7568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7569/* end confdefs.h. */
7570
7571#define _XOPEN_SOURCE_EXTENDED 1
7572#include <errno.h>
7573#ifdef EMULTIHOP
7574yes
7575#endif
7576
7577_ACEOF
7578if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7579 $EGREP "yes" >/dev/null 2>&1; then :
7580 gl_cv_header_errno_h_EMULTIHOP=hidden
7581fi
7582rm -f conftest*
7583
7584 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
7585 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
7586#define _XOPEN_SOURCE_EXTENDED 1
7587#include <errno.h>
7588/* The following two lines are a workaround against an autoconf-2.52 bug. */
7589#include <stdio.h>
7590#include <stdlib.h>
7591"; then :
7592
7593fi
7594
7595 fi
7596 fi
7597
7598fi
7599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
7600$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
7601 case $gl_cv_header_errno_h_EMULTIHOP in
7602 yes | no)
7603 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
7604 ;;
7605 *)
7606 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
7607 ;;
7608 esac
7609
7610
7611 fi
7612
7613
7614 if test -n "$ERRNO_H"; then
7615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
7616$as_echo_n "checking for ENOLINK value... " >&6; }
63a9e923 7617if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
18848e28
GF
7618 $as_echo_n "(cached) " >&6
7619else
7620
7621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7622/* end confdefs.h. */
7623
7624#include <errno.h>
7625#ifdef ENOLINK
7626yes
7627#endif
7628
7629_ACEOF
7630if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7631 $EGREP "yes" >/dev/null 2>&1; then :
7632 gl_cv_header_errno_h_ENOLINK=yes
7633else
7634 gl_cv_header_errno_h_ENOLINK=no
7635fi
7636rm -f conftest*
7637
7638 if test $gl_cv_header_errno_h_ENOLINK = no; then
7639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7640/* end confdefs.h. */
7641
7642#define _XOPEN_SOURCE_EXTENDED 1
7643#include <errno.h>
7644#ifdef ENOLINK
7645yes
7646#endif
7647
7648_ACEOF
7649if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7650 $EGREP "yes" >/dev/null 2>&1; then :
7651 gl_cv_header_errno_h_ENOLINK=hidden
7652fi
7653rm -f conftest*
7654
7655 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
7656 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
7657#define _XOPEN_SOURCE_EXTENDED 1
7658#include <errno.h>
7659/* The following two lines are a workaround against an autoconf-2.52 bug. */
7660#include <stdio.h>
7661#include <stdlib.h>
7662"; then :
7663
7664fi
7665
7666 fi
7667 fi
7668
7669fi
7670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
7671$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
7672 case $gl_cv_header_errno_h_ENOLINK in
7673 yes | no)
7674 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
7675 ;;
7676 *)
7677 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
7678 ;;
7679 esac
7680
7681
7682 fi
7683
7684
7685 if test -n "$ERRNO_H"; then
7686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
7687$as_echo_n "checking for EOVERFLOW value... " >&6; }
63a9e923 7688if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
18848e28
GF
7689 $as_echo_n "(cached) " >&6
7690else
7691
7692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7693/* end confdefs.h. */
7694
7695#include <errno.h>
7696#ifdef EOVERFLOW
7697yes
7698#endif
7699
7700_ACEOF
7701if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7702 $EGREP "yes" >/dev/null 2>&1; then :
7703 gl_cv_header_errno_h_EOVERFLOW=yes
7704else
7705 gl_cv_header_errno_h_EOVERFLOW=no
7706fi
7707rm -f conftest*
7708
7709 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
7710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7711/* end confdefs.h. */
7712
7713#define _XOPEN_SOURCE_EXTENDED 1
7714#include <errno.h>
7715#ifdef EOVERFLOW
7716yes
7717#endif
7718
7719_ACEOF
7720if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7721 $EGREP "yes" >/dev/null 2>&1; then :
7722 gl_cv_header_errno_h_EOVERFLOW=hidden
7723fi
7724rm -f conftest*
7725
7726 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
7727 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
7728#define _XOPEN_SOURCE_EXTENDED 1
7729#include <errno.h>
7730/* The following two lines are a workaround against an autoconf-2.52 bug. */
7731#include <stdio.h>
7732#include <stdlib.h>
7733"; then :
7734
7735fi
7736
7737 fi
7738 fi
7739
7740fi
7741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
7742$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
7743 case $gl_cv_header_errno_h_EOVERFLOW in
7744 yes | no)
7745 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
7746 ;;
7747 *)
7748 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
7749 ;;
7750 esac
7751
7752
7753 fi
7754
7755
6ec2e0f5 7756ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
63a9e923 7757if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
6ec2e0f5
SDJ
7758 ac_have_decl=1
7759else
7760 ac_have_decl=0
7761fi
18848e28 7762
6ec2e0f5
SDJ
7763cat >>confdefs.h <<_ACEOF
7764#define HAVE_DECL_STRERROR_R $ac_have_decl
7765_ACEOF
18848e28 7766
6ec2e0f5
SDJ
7767for ac_func in strerror_r
7768do :
7769 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
63a9e923 7770if test "x$ac_cv_func_strerror_r" = xyes; then :
6ec2e0f5
SDJ
7771 cat >>confdefs.h <<_ACEOF
7772#define HAVE_STRERROR_R 1
7773_ACEOF
63ce7108 7774
6ec2e0f5
SDJ
7775fi
7776done
63ce7108 7777
6ec2e0f5
SDJ
7778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
7779$as_echo_n "checking whether strerror_r returns char *... " >&6; }
63a9e923 7780if ${ac_cv_func_strerror_r_char_p+:} false; then :
63ce7108
TT
7781 $as_echo_n "(cached) " >&6
7782else
6ec2e0f5
SDJ
7783
7784 ac_cv_func_strerror_r_char_p=no
7785 if test $ac_cv_have_decl_strerror_r = yes; then
7786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63ce7108
TT
7787/* end confdefs.h. */
7788$ac_includes_default
63ce7108
TT
7789int
7790main ()
7791{
6ec2e0f5
SDJ
7792
7793 char buf[100];
7794 char x = *strerror_r (0, buf, sizeof buf);
7795 char *p = strerror_r (0, buf, sizeof buf);
7796 return !p || x;
7797
63ce7108
TT
7798 ;
7799 return 0;
7800}
7801_ACEOF
7802if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 7803 ac_cv_func_strerror_r_char_p=yes
63ce7108
TT
7804fi
7805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
7806 else
7807 # strerror_r is not declared. Choose between
7808 # systems that have relatively inaccessible declarations for the
7809 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
7810 # former has a strerror_r that returns char*, while the latter
7811 # has a strerror_r that returns `int'.
7812 # This test should segfault on the DEC system.
7813 if test "$cross_compiling" = yes; then :
7814 :
7815else
7816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7817/* end confdefs.h. */
7818$ac_includes_default
7819 extern char *strerror_r ();
7820int
7821main ()
7822{
7823char buf[100];
7824 char x = *strerror_r (0, buf, sizeof buf);
7825 return ! isalpha (x);
7826 ;
7827 return 0;
7828}
7829_ACEOF
7830if ac_fn_c_try_run "$LINENO"; then :
7831 ac_cv_func_strerror_r_char_p=yes
7832fi
7833rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7834 conftest.$ac_objext conftest.beam conftest.$ac_ext
63ce7108 7835fi
63ce7108 7836
6ec2e0f5 7837 fi
63ce7108 7838
6ec2e0f5
SDJ
7839fi
7840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
7841$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
7842if test $ac_cv_func_strerror_r_char_p = yes; then
63ce7108 7843
6ec2e0f5 7844$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
63ce7108 7845
6ec2e0f5 7846fi
63ce7108
TT
7847
7848
63a9e923
SM
7849 XGETTEXT_EXTRA_OPTIONS=
7850
7851
63ce7108 7852
63ce7108 7853
6ec2e0f5 7854ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
63a9e923 7855if test "x$ac_cv_have_decl_fchdir" = xyes; then :
6ec2e0f5
SDJ
7856 ac_have_decl=1
7857else
7858 ac_have_decl=0
7859fi
63ce7108 7860
6ec2e0f5
SDJ
7861cat >>confdefs.h <<_ACEOF
7862#define HAVE_DECL_FCHDIR $ac_have_decl
7863_ACEOF
63ce7108
TT
7864
7865
6ec2e0f5
SDJ
7866 GNULIB_FCNTL=0;
7867 GNULIB_NONBLOCKING=0;
7868 GNULIB_OPEN=0;
7869 GNULIB_OPENAT=0;
7870 HAVE_FCNTL=1;
7871 HAVE_OPENAT=1;
7872 REPLACE_FCNTL=0;
7873 REPLACE_OPEN=0;
7874 REPLACE_OPENAT=0;
63ce7108
TT
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
6ec2e0f5
SDJ
7885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
7886$as_echo_n "checking for working fcntl.h... " >&6; }
63a9e923 7887if ${gl_cv_header_working_fcntl_h+:} false; then :
6ec2e0f5
SDJ
7888 $as_echo_n "(cached) " >&6
7889else
7890 if test "$cross_compiling" = yes; then :
7891 gl_cv_header_working_fcntl_h=cross-compiling
7892else
7893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7894/* end confdefs.h. */
7895#include <sys/types.h>
7896 #include <sys/stat.h>
7897 #if HAVE_UNISTD_H
7898 # include <unistd.h>
7899 #else /* on Windows with MSVC */
7900 # include <io.h>
7901 # include <stdlib.h>
7902 # defined sleep(n) _sleep ((n) * 1000)
7903 #endif
7904 #include <fcntl.h>
7905 #ifndef O_NOATIME
7906 #define O_NOATIME 0
7907 #endif
7908 #ifndef O_NOFOLLOW
7909 #define O_NOFOLLOW 0
7910 #endif
7911 static int const constants[] =
7912 {
7913 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
7914 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
7915 };
63ce7108 7916
6ec2e0f5
SDJ
7917int
7918main ()
7919{
63ce7108 7920
6ec2e0f5
SDJ
7921 int result = !constants;
7922 #if HAVE_SYMLINK
7923 {
7924 static char const sym[] = "conftest.sym";
7925 if (symlink ("/dev/null", sym) != 0)
7926 result |= 2;
7927 else
7928 {
7929 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
7930 if (fd >= 0)
7931 {
7932 close (fd);
7933 result |= 4;
7934 }
7935 }
7936 if (unlink (sym) != 0 || symlink (".", sym) != 0)
7937 result |= 2;
7938 else
7939 {
7940 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
7941 if (fd >= 0)
7942 {
7943 close (fd);
7944 result |= 4;
7945 }
7946 }
7947 unlink (sym);
7948 }
7949 #endif
7950 {
7951 static char const file[] = "confdefs.h";
7952 int fd = open (file, O_RDONLY | O_NOATIME);
7953 if (fd < 0)
7954 result |= 8;
7955 else
7956 {
7957 struct stat st0;
7958 if (fstat (fd, &st0) != 0)
7959 result |= 16;
7960 else
7961 {
7962 char c;
7963 sleep (1);
7964 if (read (fd, &c, 1) != 1)
7965 result |= 24;
7966 else
7967 {
7968 if (close (fd) != 0)
7969 result |= 32;
7970 else
7971 {
7972 struct stat st1;
7973 if (stat (file, &st1) != 0)
7974 result |= 40;
7975 else
7976 if (st0.st_atime != st1.st_atime)
7977 result |= 64;
7978 }
7979 }
7980 }
7981 }
7982 }
7983 return result;
7984 ;
7985 return 0;
7986}
7987_ACEOF
7988if ac_fn_c_try_run "$LINENO"; then :
7989 gl_cv_header_working_fcntl_h=yes
7990else
7991 case $? in #(
7992 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
7993 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
7994 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
7995 *) gl_cv_header_working_fcntl_h='no';;
7996 esac
7997fi
7998rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7999 conftest.$ac_objext conftest.beam conftest.$ac_ext
8000fi
8001
8002fi
8003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
8004$as_echo "$gl_cv_header_working_fcntl_h" >&6; }
8005
8006 case $gl_cv_header_working_fcntl_h in #(
8007 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
8008 *) ac_val=1;;
8009 esac
8010
8011cat >>confdefs.h <<_ACEOF
8012#define HAVE_WORKING_O_NOATIME $ac_val
8013_ACEOF
8014
8015
8016 case $gl_cv_header_working_fcntl_h in #(
8017 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
8018 *) ac_val=1;;
8019 esac
8020
8021cat >>confdefs.h <<_ACEOF
8022#define HAVE_WORKING_O_NOFOLLOW $ac_val
8023_ACEOF
8024
8025
8026ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
63a9e923 8027if test "x$ac_cv_type_pid_t" = xyes; then :
6ec2e0f5
SDJ
8028
8029else
8030
8031cat >>confdefs.h <<_ACEOF
8032#define pid_t int
8033_ACEOF
8034
8035fi
8036
8037ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
63a9e923 8038if test "x$ac_cv_type_mode_t" = xyes; then :
6ec2e0f5
SDJ
8039
8040else
8041
8042cat >>confdefs.h <<_ACEOF
8043#define mode_t int
8044_ACEOF
8045
8046fi
8047
8048
8049
8050
8051
8052
8053
8054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
8055$as_echo_n "checking for mbstate_t... " >&6; }
63a9e923 8056if ${ac_cv_type_mbstate_t+:} false; then :
6ec2e0f5
SDJ
8057 $as_echo_n "(cached) " >&6
8058else
8059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8060/* end confdefs.h. */
8061$ac_includes_default
8062/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
8063 <wchar.h>.
8064 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8065 included before <wchar.h>. */
8066#include <stddef.h>
8067#include <stdio.h>
8068#include <time.h>
8069#include <wchar.h>
8070int
8071main ()
8072{
8073mbstate_t x; return sizeof x;
8074 ;
8075 return 0;
8076}
8077_ACEOF
8078if ac_fn_c_try_compile "$LINENO"; then :
8079 ac_cv_type_mbstate_t=yes
8080else
8081 ac_cv_type_mbstate_t=no
8082fi
8083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8084fi
8085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
8086$as_echo "$ac_cv_type_mbstate_t" >&6; }
8087 if test $ac_cv_type_mbstate_t = yes; then
8088
8089$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
8090
8091 else
8092
8093$as_echo "#define mbstate_t int" >>confdefs.h
8094
8095 fi
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114 GNULIB_ACOSF=0;
8115 GNULIB_ACOSL=0;
8116 GNULIB_ASINF=0;
8117 GNULIB_ASINL=0;
8118 GNULIB_ATANF=0;
8119 GNULIB_ATANL=0;
8120 GNULIB_ATAN2F=0;
8121 GNULIB_CBRT=0;
8122 GNULIB_CBRTF=0;
8123 GNULIB_CBRTL=0;
8124 GNULIB_CEIL=0;
8125 GNULIB_CEILF=0;
8126 GNULIB_CEILL=0;
8127 GNULIB_COPYSIGN=0;
8128 GNULIB_COPYSIGNF=0;
8129 GNULIB_COPYSIGNL=0;
8130 GNULIB_COSF=0;
8131 GNULIB_COSL=0;
8132 GNULIB_COSHF=0;
8133 GNULIB_EXPF=0;
8134 GNULIB_EXPL=0;
8135 GNULIB_EXP2=0;
8136 GNULIB_EXP2F=0;
8137 GNULIB_EXP2L=0;
8138 GNULIB_EXPM1=0;
8139 GNULIB_EXPM1F=0;
8140 GNULIB_EXPM1L=0;
8141 GNULIB_FABSF=0;
8142 GNULIB_FABSL=0;
8143 GNULIB_FLOOR=0;
8144 GNULIB_FLOORF=0;
8145 GNULIB_FLOORL=0;
8146 GNULIB_FMA=0;
8147 GNULIB_FMAF=0;
8148 GNULIB_FMAL=0;
8149 GNULIB_FMOD=0;
8150 GNULIB_FMODF=0;
8151 GNULIB_FMODL=0;
8152 GNULIB_FREXPF=0;
8153 GNULIB_FREXP=0;
8154 GNULIB_FREXPL=0;
8155 GNULIB_HYPOT=0;
8156 GNULIB_HYPOTF=0;
8157 GNULIB_HYPOTL=0;
88b48903
WN
8158 GNULIB_ILOGB=0;
8159 GNULIB_ILOGBF=0;
8160 GNULIB_ILOGBL=0;
8161 GNULIB_ISFINITE=0;
8162 GNULIB_ISINF=0;
8163 GNULIB_ISNAN=0;
8164 GNULIB_ISNANF=0;
8165 GNULIB_ISNAND=0;
8166 GNULIB_ISNANL=0;
8167 GNULIB_LDEXPF=0;
8168 GNULIB_LDEXPL=0;
8169 GNULIB_LOG=0;
8170 GNULIB_LOGF=0;
8171 GNULIB_LOGL=0;
8172 GNULIB_LOG10=0;
8173 GNULIB_LOG10F=0;
8174 GNULIB_LOG10L=0;
8175 GNULIB_LOG1P=0;
8176 GNULIB_LOG1PF=0;
8177 GNULIB_LOG1PL=0;
8178 GNULIB_LOG2=0;
8179 GNULIB_LOG2F=0;
8180 GNULIB_LOG2L=0;
8181 GNULIB_LOGB=0;
8182 GNULIB_LOGBF=0;
8183 GNULIB_LOGBL=0;
8184 GNULIB_MODF=0;
8185 GNULIB_MODFF=0;
8186 GNULIB_MODFL=0;
8187 GNULIB_POWF=0;
8188 GNULIB_REMAINDER=0;
8189 GNULIB_REMAINDERF=0;
8190 GNULIB_REMAINDERL=0;
8191 GNULIB_RINT=0;
8192 GNULIB_RINTF=0;
8193 GNULIB_RINTL=0;
8194 GNULIB_ROUND=0;
8195 GNULIB_ROUNDF=0;
8196 GNULIB_ROUNDL=0;
8197 GNULIB_SIGNBIT=0;
8198 GNULIB_SINF=0;
8199 GNULIB_SINL=0;
8200 GNULIB_SINHF=0;
8201 GNULIB_SQRTF=0;
8202 GNULIB_SQRTL=0;
8203 GNULIB_TANF=0;
8204 GNULIB_TANL=0;
8205 GNULIB_TANHF=0;
8206 GNULIB_TRUNC=0;
8207 GNULIB_TRUNCF=0;
8208 GNULIB_TRUNCL=0;
8209 HAVE_ACOSF=1;
8210 HAVE_ACOSL=1;
8211 HAVE_ASINF=1;
8212 HAVE_ASINL=1;
8213 HAVE_ATANF=1;
8214 HAVE_ATANL=1;
8215 HAVE_ATAN2F=1;
8216 HAVE_CBRT=1;
8217 HAVE_CBRTF=1;
8218 HAVE_CBRTL=1;
8219 HAVE_COPYSIGN=1;
8220 HAVE_COPYSIGNL=1;
8221 HAVE_COSF=1;
8222 HAVE_COSL=1;
8223 HAVE_COSHF=1;
8224 HAVE_EXPF=1;
8225 HAVE_EXPL=1;
8226 HAVE_EXPM1=1;
8227 HAVE_EXPM1F=1;
8228 HAVE_FABSF=1;
8229 HAVE_FABSL=1;
8230 HAVE_FMA=1;
8231 HAVE_FMAF=1;
8232 HAVE_FMAL=1;
8233 HAVE_FMODF=1;
8234 HAVE_FMODL=1;
8235 HAVE_FREXPF=1;
8236 HAVE_HYPOTF=1;
8237 HAVE_HYPOTL=1;
8238 HAVE_ILOGB=1;
8239 HAVE_ILOGBF=1;
8240 HAVE_ILOGBL=1;
8241 HAVE_ISNANF=1;
8242 HAVE_ISNAND=1;
8243 HAVE_ISNANL=1;
8244 HAVE_LDEXPF=1;
8245 HAVE_LOGF=1;
8246 HAVE_LOGL=1;
8247 HAVE_LOG10F=1;
8248 HAVE_LOG10L=1;
8249 HAVE_LOG1P=1;
8250 HAVE_LOG1PF=1;
8251 HAVE_LOG1PL=1;
8252 HAVE_LOGBF=1;
8253 HAVE_LOGBL=1;
8254 HAVE_MODFF=1;
8255 HAVE_MODFL=1;
8256 HAVE_POWF=1;
8257 HAVE_REMAINDER=1;
8258 HAVE_REMAINDERF=1;
8259 HAVE_RINT=1;
8260 HAVE_RINTL=1;
8261 HAVE_SINF=1;
8262 HAVE_SINL=1;
8263 HAVE_SINHF=1;
8264 HAVE_SQRTF=1;
8265 HAVE_SQRTL=1;
8266 HAVE_TANF=1;
8267 HAVE_TANL=1;
8268 HAVE_TANHF=1;
8269 HAVE_DECL_ACOSL=1;
8270 HAVE_DECL_ASINL=1;
8271 HAVE_DECL_ATANL=1;
8272 HAVE_DECL_CBRTF=1;
8273 HAVE_DECL_CBRTL=1;
8274 HAVE_DECL_CEILF=1;
8275 HAVE_DECL_CEILL=1;
8276 HAVE_DECL_COPYSIGNF=1;
8277 HAVE_DECL_COSL=1;
8278 HAVE_DECL_EXPL=1;
8279 HAVE_DECL_EXP2=1;
8280 HAVE_DECL_EXP2F=1;
8281 HAVE_DECL_EXP2L=1;
8282 HAVE_DECL_EXPM1L=1;
8283 HAVE_DECL_FLOORF=1;
8284 HAVE_DECL_FLOORL=1;
8285 HAVE_DECL_FREXPL=1;
8286 HAVE_DECL_LDEXPL=1;
8287 HAVE_DECL_LOGL=1;
8288 HAVE_DECL_LOG10L=1;
8289 HAVE_DECL_LOG2=1;
8290 HAVE_DECL_LOG2F=1;
8291 HAVE_DECL_LOG2L=1;
8292 HAVE_DECL_LOGB=1;
8293 HAVE_DECL_REMAINDER=1;
8294 HAVE_DECL_REMAINDERL=1;
8295 HAVE_DECL_RINTF=1;
8296 HAVE_DECL_ROUND=1;
8297 HAVE_DECL_ROUNDF=1;
8298 HAVE_DECL_ROUNDL=1;
8299 HAVE_DECL_SINL=1;
8300 HAVE_DECL_SQRTL=1;
8301 HAVE_DECL_TANL=1;
8302 HAVE_DECL_TRUNC=1;
8303 HAVE_DECL_TRUNCF=1;
8304 HAVE_DECL_TRUNCL=1;
8305 REPLACE_CBRTF=0;
8306 REPLACE_CBRTL=0;
8307 REPLACE_CEIL=0;
8308 REPLACE_CEILF=0;
8309 REPLACE_CEILL=0;
8310 REPLACE_EXPM1=0;
8311 REPLACE_EXPM1F=0;
8312 REPLACE_EXP2=0;
8313 REPLACE_EXP2L=0;
8314 REPLACE_FABSL=0;
8315 REPLACE_FLOOR=0;
8316 REPLACE_FLOORF=0;
8317 REPLACE_FLOORL=0;
8318 REPLACE_FMA=0;
8319 REPLACE_FMAF=0;
8320 REPLACE_FMAL=0;
8321 REPLACE_FMOD=0;
8322 REPLACE_FMODF=0;
8323 REPLACE_FMODL=0;
8324 REPLACE_FREXPF=0;
8325 REPLACE_FREXP=0;
8326 REPLACE_FREXPL=0;
8327 REPLACE_HUGE_VAL=0;
8328 REPLACE_HYPOT=0;
8329 REPLACE_HYPOTF=0;
8330 REPLACE_HYPOTL=0;
8331 REPLACE_ILOGB=0;
8332 REPLACE_ILOGBF=0;
8333 REPLACE_ISFINITE=0;
8334 REPLACE_ISINF=0;
8335 REPLACE_ISNAN=0;
8336 REPLACE_LDEXPL=0;
8337 REPLACE_LOG=0;
8338 REPLACE_LOGF=0;
8339 REPLACE_LOGL=0;
8340 REPLACE_LOG10=0;
8341 REPLACE_LOG10F=0;
8342 REPLACE_LOG10L=0;
8343 REPLACE_LOG1P=0;
8344 REPLACE_LOG1PF=0;
8345 REPLACE_LOG1PL=0;
8346 REPLACE_LOG2=0;
8347 REPLACE_LOG2F=0;
8348 REPLACE_LOG2L=0;
8349 REPLACE_LOGB=0;
8350 REPLACE_LOGBF=0;
8351 REPLACE_LOGBL=0;
8352 REPLACE_MODF=0;
8353 REPLACE_MODFF=0;
8354 REPLACE_MODFL=0;
8355 REPLACE_NAN=0;
8356 REPLACE_REMAINDER=0;
8357 REPLACE_REMAINDERF=0;
8358 REPLACE_REMAINDERL=0;
8359 REPLACE_ROUND=0;
8360 REPLACE_ROUNDF=0;
8361 REPLACE_ROUNDL=0;
8362 REPLACE_SIGNBIT=0;
8363 REPLACE_SIGNBIT_USING_GCC=0;
8364 REPLACE_SQRTL=0;
8365 REPLACE_TRUNC=0;
8366 REPLACE_TRUNCF=0;
8367 REPLACE_TRUNCL=0;
8368
8369
8370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
8371$as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
63a9e923 8372if ${gl_cv_func_frexp_no_libm+:} false; then :
88b48903
WN
8373 $as_echo_n "(cached) " >&6
8374else
8375
8376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8377/* end confdefs.h. */
8378#include <math.h>
8379 double x;
8380int
8381main ()
8382{
8383int e; return frexp (x, &e) > 0;
8384 ;
8385 return 0;
8386}
8387_ACEOF
8388if ac_fn_c_try_link "$LINENO"; then :
8389 gl_cv_func_frexp_no_libm=yes
8390else
8391 gl_cv_func_frexp_no_libm=no
8392fi
8393rm -f core conftest.err conftest.$ac_objext \
8394 conftest$ac_exeext conftest.$ac_ext
8395
8396fi
8397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
8398$as_echo "$gl_cv_func_frexp_no_libm" >&6; }
8399
4a626d0a 8400ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
63a9e923 8401if test "x$ac_cv_have_decl_alarm" = xyes; then :
4a626d0a
PA
8402 ac_have_decl=1
8403else
8404 ac_have_decl=0
8405fi
88b48903 8406
4a626d0a
PA
8407cat >>confdefs.h <<_ACEOF
8408#define HAVE_DECL_ALARM $ac_have_decl
8409_ACEOF
88b48903
WN
8410
8411
88b48903
WN
8412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
8413$as_echo_n "checking whether long double and double are the same... " >&6; }
63a9e923 8414if ${gl_cv_long_double_equals_double+:} false; then :
88b48903
WN
8415 $as_echo_n "(cached) " >&6
8416else
8417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8418/* end confdefs.h. */
8419#include <float.h>
8420int
8421main ()
8422{
8423typedef int check[sizeof (long double) == sizeof (double)
8424 && LDBL_MANT_DIG == DBL_MANT_DIG
8425 && LDBL_MAX_EXP == DBL_MAX_EXP
8426 && LDBL_MIN_EXP == DBL_MIN_EXP
8427 ? 1 : -1];
8428
8429 ;
8430 return 0;
8431}
8432_ACEOF
8433if ac_fn_c_try_compile "$LINENO"; then :
8434 gl_cv_long_double_equals_double=yes
8435else
8436 gl_cv_long_double_equals_double=no
8437fi
8438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8439
8440fi
8441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
8442$as_echo "$gl_cv_long_double_equals_double" >&6; }
8443 if test $gl_cv_long_double_equals_double = yes; then
8444
8445$as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
8446
8447 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
8448 else
8449 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
8450 fi
8451
8452
4a626d0a 8453
6ec2e0f5
SDJ
8454 GNULIB_FCHMODAT=0;
8455 GNULIB_FSTAT=0;
8456 GNULIB_FSTATAT=0;
8457 GNULIB_FUTIMENS=0;
8458 GNULIB_LCHMOD=0;
8459 GNULIB_LSTAT=0;
8460 GNULIB_MKDIRAT=0;
8461 GNULIB_MKFIFO=0;
8462 GNULIB_MKFIFOAT=0;
8463 GNULIB_MKNOD=0;
8464 GNULIB_MKNODAT=0;
8465 GNULIB_STAT=0;
8466 GNULIB_UTIMENSAT=0;
8467 HAVE_FCHMODAT=1;
8468 HAVE_FSTATAT=1;
8469 HAVE_FUTIMENS=1;
8470 HAVE_LCHMOD=1;
8471 HAVE_LSTAT=1;
8472 HAVE_MKDIRAT=1;
8473 HAVE_MKFIFO=1;
8474 HAVE_MKFIFOAT=1;
8475 HAVE_MKNOD=1;
8476 HAVE_MKNODAT=1;
8477 HAVE_UTIMENSAT=1;
8478 REPLACE_FSTAT=0;
8479 REPLACE_FSTATAT=0;
8480 REPLACE_FUTIMENS=0;
8481 REPLACE_LSTAT=0;
8482 REPLACE_MKDIR=0;
8483 REPLACE_MKFIFO=0;
8484 REPLACE_MKNOD=0;
8485 REPLACE_STAT=0;
8486 REPLACE_UTIMENSAT=0;
8487
8488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
8489$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
63a9e923 8490if ${ac_cv_header_stat_broken+:} false; then :
6ec2e0f5
SDJ
8491 $as_echo_n "(cached) " >&6
8492else
8493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8494/* end confdefs.h. */
8495#include <sys/types.h>
8496#include <sys/stat.h>
8497
8498#if defined S_ISBLK && defined S_IFDIR
8499extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
8500#endif
8501
8502#if defined S_ISBLK && defined S_IFCHR
8503extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
8504#endif
8505
8506#if defined S_ISLNK && defined S_IFREG
8507extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
8508#endif
8509
8510#if defined S_ISSOCK && defined S_IFREG
8511extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
8512#endif
4a626d0a 8513
4a626d0a
PA
8514_ACEOF
8515if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5
SDJ
8516 ac_cv_header_stat_broken=no
8517else
8518 ac_cv_header_stat_broken=yes
4a626d0a
PA
8519fi
8520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
8521fi
8522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
8523$as_echo "$ac_cv_header_stat_broken" >&6; }
8524if test $ac_cv_header_stat_broken = yes; then
8525
8526$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
4a626d0a
PA
8527
8528fi
4a626d0a 8529
4a626d0a
PA
8530
8531
4a626d0a
PA
8532
8533
6ec2e0f5
SDJ
8534 case "$host_os" in
8535 mingw*)
8536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
8537$as_echo_n "checking for 64-bit off_t... " >&6; }
63a9e923 8538if ${gl_cv_type_off_t_64+:} false; then :
6ec2e0f5
SDJ
8539 $as_echo_n "(cached) " >&6
8540else
8541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8542/* end confdefs.h. */
8543#include <sys/types.h>
8544 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
8545
8546int
8547main ()
8548{
8549
8550 ;
8551 return 0;
8552}
8553_ACEOF
8554if ac_fn_c_try_compile "$LINENO"; then :
8555 gl_cv_type_off_t_64=yes
8556else
8557 gl_cv_type_off_t_64=no
8558fi
8559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4a626d0a 8560
6ec2e0f5
SDJ
8561fi
8562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
8563$as_echo "$gl_cv_type_off_t_64" >&6; }
8564 if test $gl_cv_type_off_t_64 = no; then
8565 WINDOWS_64_BIT_OFF_T=1
8566 else
8567 WINDOWS_64_BIT_OFF_T=0
8568 fi
8569 WINDOWS_64_BIT_ST_SIZE=1
8570 ;;
8571 *)
8572 WINDOWS_64_BIT_OFF_T=0
8573 WINDOWS_64_BIT_ST_SIZE=0
8574 ;;
8575 esac
4a626d0a
PA
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 8592 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
4a626d0a 8593 else
6ec2e0f5
SDJ
8594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
8595$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
63a9e923 8596if ${gl_cv_next_sys_stat_h+:} false; then :
4a626d0a
PA
8597 $as_echo_n "(cached) " >&6
8598else
8599
6ec2e0f5 8600 if test $ac_cv_header_sys_stat_h = yes; then
4a626d0a
PA
8601
8602
8603
8604
8605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8606/* end confdefs.h. */
6ec2e0f5 8607#include <sys/stat.h>
4a626d0a
PA
8608_ACEOF
8609 case "$host_os" in
8610 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8611 *) gl_absname_cpp="$ac_cpp" ;;
8612 esac
8613
8614 case "$host_os" in
8615 mingw*)
8616 gl_dirsep_regex='[/\\]'
8617 ;;
8618 *)
8619 gl_dirsep_regex='\/'
8620 ;;
8621 esac
8622 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 8623 gl_header_literal_regex=`echo 'sys/stat.h' \
4a626d0a
PA
8624 | sed -e "$gl_make_literal_regex_sed"`
8625 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8626 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8627 s|^/[^/]|//&|
8628 p
8629 q
8630 }'
8631
6ec2e0f5 8632 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a
PA
8633 sed -n "$gl_absolute_header_sed"`
8634
6ec2e0f5
SDJ
8635 gl_header=$gl_cv_absolute_sys_stat_h
8636 gl_cv_next_sys_stat_h='"'$gl_header'"'
4a626d0a 8637 else
6ec2e0f5 8638 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
4a626d0a
PA
8639 fi
8640
8641
8642fi
6ec2e0f5
SDJ
8643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
8644$as_echo "$gl_cv_next_sys_stat_h" >&6; }
4a626d0a 8645 fi
6ec2e0f5 8646 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
4a626d0a
PA
8647
8648 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8649 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 8650 gl_next_as_first_directive='<'sys/stat.h'>'
4a626d0a
PA
8651 else
8652 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 8653 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
4a626d0a 8654 fi
6ec2e0f5 8655 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
4a626d0a
PA
8656
8657
8658
8659
8660
4a626d0a
PA
8661
8662
8663
8664
8665
4a626d0a 8666
6ec2e0f5 8667 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
4a626d0a 8668
6ec2e0f5 8669$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
4a626d0a
PA
8670
8671 fi
4a626d0a 8672
6ec2e0f5
SDJ
8673 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
8674 #include <sys/stat.h>
8675"
63a9e923 8676if test "x$ac_cv_type_nlink_t" = xyes; then :
6ec2e0f5
SDJ
8677
8678else
4a626d0a 8679
6ec2e0f5
SDJ
8680$as_echo "#define nlink_t int" >>confdefs.h
8681
8682fi
8683
8684
8685
8686 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
8687 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
8688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
8689$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
63a9e923 8690if eval \${$as_gl_Symbol+:} false; then :
4a626d0a
PA
8691 $as_echo_n "(cached) " >&6
8692else
8693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8694/* end confdefs.h. */
6ec2e0f5 8695#include <sys/stat.h>
4a626d0a
PA
8696
8697int
8698main ()
8699{
6ec2e0f5
SDJ
8700#undef $gl_func
8701 (void) $gl_func;
4a626d0a
PA
8702 ;
8703 return 0;
8704}
8705_ACEOF
8706if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 8707 eval "$as_gl_Symbol=yes"
4a626d0a 8708else
6ec2e0f5 8709 eval "$as_gl_Symbol=no"
4a626d0a
PA
8710fi
8711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
8712fi
8713eval ac_res=\$$as_gl_Symbol
8714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8715$as_echo "$ac_res" >&6; }
63a9e923 8716 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
6ec2e0f5
SDJ
8717 cat >>confdefs.h <<_ACEOF
8718#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
8719_ACEOF
4a626d0a 8720
6ec2e0f5 8721 eval ac_cv_have_decl_$gl_func=yes
4a626d0a 8722fi
6ec2e0f5
SDJ
8723 done
8724
8725
8726
8727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
8728$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
63a9e923 8729if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
4a626d0a
PA
8730 $as_echo_n "(cached) " >&6
8731else
6ec2e0f5
SDJ
8732 rm -f conftest.sym conftest.file
8733 echo >conftest.file
8734 if test "$cross_compiling" = yes; then :
8735 case "$host_os" in
8736 *-gnu*)
8737 # Guess yes on glibc systems.
8738 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
8739 *)
8740 # If we don't know, assume the worst.
8741 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
8742 esac
4a626d0a 8743
6ec2e0f5
SDJ
8744else
8745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8746/* end confdefs.h. */
8747$ac_includes_default
4a626d0a
PA
8748int
8749main ()
8750{
6ec2e0f5
SDJ
8751struct stat sbuf;
8752 if (symlink ("conftest.file", "conftest.sym") != 0)
8753 return 1;
8754 /* Linux will dereference the symlink and fail, as required by
8755 POSIX. That is better in the sense that it means we will not
8756 have to compile and use the lstat wrapper. */
8757 return lstat ("conftest.sym/", &sbuf) == 0;
4a626d0a
PA
8758
8759 ;
8760 return 0;
8761}
8762_ACEOF
6ec2e0f5
SDJ
8763if ac_fn_c_try_run "$LINENO"; then :
8764 gl_cv_func_lstat_dereferences_slashed_symlink=yes
4a626d0a 8765else
6ec2e0f5
SDJ
8766 gl_cv_func_lstat_dereferences_slashed_symlink=no
8767fi
8768rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8769 conftest.$ac_objext conftest.beam conftest.$ac_ext
4a626d0a 8770fi
6ec2e0f5
SDJ
8771
8772 rm -f conftest.sym conftest.file
4a626d0a
PA
8773
8774fi
6ec2e0f5
SDJ
8775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
8776$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
8777 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
8778 *yes)
4a626d0a 8779
6ec2e0f5
SDJ
8780cat >>confdefs.h <<_ACEOF
8781#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
8782_ACEOF
4a626d0a 8783
6ec2e0f5
SDJ
8784 ;;
8785 esac
8786
8787
8788
8789
8790
8791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
8792$as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
63a9e923 8793if ${gl_cv_func_getcwd_null+:} false; then :
4a626d0a 8794 $as_echo_n "(cached) " >&6
6ec2e0f5
SDJ
8795else
8796 if test "$cross_compiling" = yes; then :
8797 case "$host_os" in
8798 # Guess yes on glibc systems.
8799 *-gnu*) gl_cv_func_getcwd_null="guessing yes";;
8800 # Guess yes on Cygwin.
8801 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
8802 # If we don't know, assume the worst.
8803 *) gl_cv_func_getcwd_null="guessing no";;
8804 esac
8805
4a626d0a
PA
8806else
8807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8808/* end confdefs.h. */
8809
6ec2e0f5
SDJ
8810# include <stdlib.h>
8811# if HAVE_UNISTD_H
8812# include <unistd.h>
8813# else /* on Windows with MSVC */
8814# include <direct.h>
8815# endif
8816# ifndef getcwd
8817 char *getcwd ();
8818# endif
8819
8820int
8821main ()
8822{
8823
8824#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
8825/* mingw cwd does not start with '/', but getcwd does allocate.
8826 However, mingw fails to honor non-zero size. */
8827#else
8828 if (chdir ("/") != 0)
8829 return 1;
8830 else
8831 {
8832 char *f = getcwd (NULL, 0);
8833 if (! f)
8834 return 2;
8835 if (f[0] != '/')
8836 return 3;
8837 if (f[1] != '\0')
8838 return 4;
8839 free (f);
8840 return 0;
8841 }
4a626d0a 8842#endif
4a626d0a 8843
6ec2e0f5
SDJ
8844 ;
8845 return 0;
8846}
8847_ACEOF
8848if ac_fn_c_try_run "$LINENO"; then :
8849 gl_cv_func_getcwd_null=yes
8850else
8851 gl_cv_func_getcwd_null=no
8852fi
8853rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8854 conftest.$ac_objext conftest.beam conftest.$ac_ext
8855fi
8856
8857fi
8858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
8859$as_echo "$gl_cv_func_getcwd_null" >&6; }
8860
8861
8862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
8863$as_echo_n "checking for getcwd with POSIX signature... " >&6; }
63a9e923 8864if ${gl_cv_func_getcwd_posix_signature+:} false; then :
6ec2e0f5
SDJ
8865 $as_echo_n "(cached) " >&6
8866else
8867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8868/* end confdefs.h. */
8869#include <unistd.h>
4a626d0a
PA
8870int
8871main ()
8872{
6ec2e0f5
SDJ
8873extern
8874 #ifdef __cplusplus
8875 "C"
8876 #endif
8877 char *getcwd (char *, size_t);
8878
4a626d0a
PA
8879 ;
8880 return 0;
8881}
6ec2e0f5 8882
4a626d0a
PA
8883_ACEOF
8884if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 8885 gl_cv_func_getcwd_posix_signature=yes
4a626d0a 8886else
6ec2e0f5 8887 gl_cv_func_getcwd_posix_signature=no
4a626d0a
PA
8888fi
8889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5 8890
4a626d0a 8891fi
6ec2e0f5
SDJ
8892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
8893$as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
8894
8895ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
63a9e923 8896if test "x$ac_cv_have_decl_getcwd" = xyes; then :
6ec2e0f5
SDJ
8897 ac_have_decl=1
8898else
8899 ac_have_decl=0
8900fi
8901
8902cat >>confdefs.h <<_ACEOF
8903#define HAVE_DECL_GETCWD $ac_have_decl
4a626d0a
PA
8904_ACEOF
8905
6ec2e0f5
SDJ
8906
8907
8908ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
63a9e923 8909if test "x$ac_cv_have_decl_getdtablesize" = xyes; then :
6ec2e0f5
SDJ
8910 ac_have_decl=1
8911else
8912 ac_have_decl=0
4a626d0a 8913fi
4a626d0a 8914
6ec2e0f5
SDJ
8915cat >>confdefs.h <<_ACEOF
8916#define HAVE_DECL_GETDTABLESIZE $ac_have_decl
8917_ACEOF
8918
8919ac_fn_c_check_decl "$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default"
63a9e923 8920if test "x$ac_cv_have_decl_getlogin_r" = xyes; then :
6ec2e0f5
SDJ
8921 ac_have_decl=1
8922else
8923 ac_have_decl=0
8924fi
8925
8926cat >>confdefs.h <<_ACEOF
8927#define HAVE_DECL_GETLOGIN_R $ac_have_decl
8928_ACEOF
8929
8930
8931
8932ac_fn_c_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default"
63a9e923 8933if test "x$ac_cv_have_decl_getlogin" = xyes; then :
6ec2e0f5
SDJ
8934 ac_have_decl=1
8935else
8936 ac_have_decl=0
8937fi
8938
8939cat >>confdefs.h <<_ACEOF
8940#define HAVE_DECL_GETLOGIN $ac_have_decl
8941_ACEOF
8942
8943
8944
8945
8946
8947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
8948$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
63a9e923 8949if ${ac_cv_c_restrict+:} false; then :
6ec2e0f5
SDJ
8950 $as_echo_n "(cached) " >&6
8951else
8952 ac_cv_c_restrict=no
8953 # The order here caters to the fact that C++ does not require restrict.
8954 for ac_kw in __restrict __restrict__ _Restrict restrict; do
8955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8956/* end confdefs.h. */
8957typedef int *int_ptr;
8958 int foo (int_ptr $ac_kw ip) { return ip[0]; }
8959 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
8960 int bar (int ip[$ac_kw]) { return ip[0]; }
8961
8962int
8963main ()
8964{
8965int s[1];
8966 int *$ac_kw t = s;
8967 t[0] = 0;
8968 return foo (t) + bar (t);
8969
8970 ;
8971 return 0;
8972}
8973_ACEOF
8974if ac_fn_c_try_compile "$LINENO"; then :
8975 ac_cv_c_restrict=$ac_kw
8976fi
8977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8978 test "$ac_cv_c_restrict" != no && break
8979 done
8980
8981fi
8982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
8983$as_echo "$ac_cv_c_restrict" >&6; }
8984
8985 case $ac_cv_c_restrict in
8986 restrict) ;;
8987 no) $as_echo "#define restrict /**/" >>confdefs.h
8988 ;;
8989 *) cat >>confdefs.h <<_ACEOF
8990#define restrict $ac_cv_c_restrict
8991_ACEOF
8992 ;;
8993 esac
4a626d0a
PA
8994
8995
6ec2e0f5
SDJ
8996 GNULIB_GETTIMEOFDAY=0;
8997 HAVE_GETTIMEOFDAY=1;
8998 HAVE_STRUCT_TIMEVAL=1;
8999 HAVE_SYS_TIME_H=1;
9000 HAVE_TIMEZONE_T=0;
9001 REPLACE_GETTIMEOFDAY=0;
9002 REPLACE_STRUCT_TIMEVAL=0;
4a626d0a
PA
9003
9004
9005
9006
88b48903 9007
49e4877c
PA
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 9020 gl_cv_next_sys_time_h='<'sys/time.h'>'
49e4877c 9021 else
6ec2e0f5
SDJ
9022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
9023$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
63a9e923 9024if ${gl_cv_next_sys_time_h+:} false; then :
49e4877c
PA
9025 $as_echo_n "(cached) " >&6
9026else
9027
6ec2e0f5 9028 if test $ac_cv_header_sys_time_h = yes; then
49e4877c
PA
9029
9030
9031
9032
9033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9034/* end confdefs.h. */
6ec2e0f5 9035#include <sys/time.h>
49e4877c
PA
9036_ACEOF
9037 case "$host_os" in
9038 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9039 *) gl_absname_cpp="$ac_cpp" ;;
9040 esac
9041
9042 case "$host_os" in
9043 mingw*)
9044 gl_dirsep_regex='[/\\]'
9045 ;;
9046 *)
9047 gl_dirsep_regex='\/'
9048 ;;
9049 esac
9050 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 9051 gl_header_literal_regex=`echo 'sys/time.h' \
49e4877c
PA
9052 | sed -e "$gl_make_literal_regex_sed"`
9053 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9054 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9055 s|^/[^/]|//&|
9056 p
9057 q
9058 }'
9059
6ec2e0f5 9060 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
49e4877c
PA
9061 sed -n "$gl_absolute_header_sed"`
9062
6ec2e0f5
SDJ
9063 gl_header=$gl_cv_absolute_sys_time_h
9064 gl_cv_next_sys_time_h='"'$gl_header'"'
49e4877c 9065 else
6ec2e0f5 9066 gl_cv_next_sys_time_h='<'sys/time.h'>'
49e4877c
PA
9067 fi
9068
9069
9070fi
6ec2e0f5
SDJ
9071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
9072$as_echo "$gl_cv_next_sys_time_h" >&6; }
49e4877c 9073 fi
6ec2e0f5 9074 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
49e4877c
PA
9075
9076 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9077 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 9078 gl_next_as_first_directive='<'sys/time.h'>'
49e4877c
PA
9079 else
9080 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 9081 gl_next_as_first_directive=$gl_cv_next_sys_time_h
49e4877c 9082 fi
6ec2e0f5 9083 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
49e4877c
PA
9084
9085
9086
9087
9088
6ec2e0f5
SDJ
9089 if test $ac_cv_header_sys_time_h != yes; then
9090 HAVE_SYS_TIME_H=0
9091 fi
9092
9093
9094
9095
9096
9097 if test $ac_cv_header_sys_socket_h != yes; then
9098 for ac_header in winsock2.h
9099do :
9100 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
63a9e923 9101if test "x$ac_cv_header_winsock2_h" = xyes; then :
6ec2e0f5
SDJ
9102 cat >>confdefs.h <<_ACEOF
9103#define HAVE_WINSOCK2_H 1
9104_ACEOF
9105
9106fi
9107
9108done
9109
9110 fi
9111 if test "$ac_cv_header_winsock2_h" = yes; then
9112 HAVE_WINSOCK2_H=1
9113 UNISTD_H_HAVE_WINSOCK2_H=1
9114 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
9115 else
9116 HAVE_WINSOCK2_H=0
9117 fi
9118
9119
9120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
9121$as_echo_n "checking for struct timeval... " >&6; }
63a9e923 9122if ${gl_cv_sys_struct_timeval+:} false; then :
6ec2e0f5
SDJ
9123 $as_echo_n "(cached) " >&6
9124else
9125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9126/* end confdefs.h. */
9127#if HAVE_SYS_TIME_H
9128 #include <sys/time.h>
9129 #endif
9130 #include <time.h>
9131 #if HAVE_WINSOCK2_H
9132 # include <winsock2.h>
9133 #endif
9134
49e4877c
PA
9135int
9136main ()
9137{
6ec2e0f5 9138static struct timeval x; x.tv_sec = x.tv_usec;
49e4877c
PA
9139 ;
9140 return 0;
9141}
9142_ACEOF
9143if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 9144 gl_cv_sys_struct_timeval=yes
49e4877c 9145else
6ec2e0f5 9146 gl_cv_sys_struct_timeval=no
49e4877c
PA
9147fi
9148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49e4877c 9149
49e4877c 9150fi
6ec2e0f5
SDJ
9151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
9152$as_echo "$gl_cv_sys_struct_timeval" >&6; }
9153 if test $gl_cv_sys_struct_timeval != yes; then
9154 HAVE_STRUCT_TIMEVAL=0
9155 else
9156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
9157$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
63a9e923 9158if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
8690e634
JK
9159 $as_echo_n "(cached) " >&6
9160else
6ec2e0f5 9161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 9162/* end confdefs.h. */
6ec2e0f5
SDJ
9163#if HAVE_SYS_TIME_H
9164 #include <sys/time.h>
9165 #endif
9166 #include <time.h>
9167 #if HAVE_WINSOCK2_H
9168 # include <winsock2.h>
9169 #endif
8690e634 9170
8690e634
JK
9171int
9172main ()
9173{
6ec2e0f5
SDJ
9174static struct timeval x;
9175 typedef int verify_tv_sec_type[
9176 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
9177 ];
9178
8690e634
JK
9179 ;
9180 return 0;
9181}
8690e634 9182_ACEOF
6ec2e0f5
SDJ
9183if ac_fn_c_try_compile "$LINENO"; then :
9184 gl_cv_sys_struct_timeval_tv_sec=yes
8690e634 9185else
6ec2e0f5 9186 gl_cv_sys_struct_timeval_tv_sec=no
8690e634 9187fi
6ec2e0f5 9188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 9189
6ec2e0f5
SDJ
9190fi
9191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
9192$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
9193 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
9194 REPLACE_STRUCT_TIMEVAL=1
9195 fi
8690e634
JK
9196 fi
9197
9198
6ec2e0f5
SDJ
9199 for gl_func in gettimeofday; do
9200 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
9201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
9202$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
63a9e923 9203if eval \${$as_gl_Symbol+:} false; then :
8690e634 9204 $as_echo_n "(cached) " >&6
8690e634
JK
9205else
9206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9207/* end confdefs.h. */
6ec2e0f5
SDJ
9208
9209#if HAVE_SYS_TIME_H
9210# include <sys/time.h>
9211#endif
9212#include <time.h>
9213
8690e634
JK
9214int
9215main ()
9216{
6ec2e0f5
SDJ
9217#undef $gl_func
9218 (void) $gl_func;
8690e634
JK
9219 ;
9220 return 0;
9221}
9222_ACEOF
6ec2e0f5
SDJ
9223if ac_fn_c_try_compile "$LINENO"; then :
9224 eval "$as_gl_Symbol=yes"
8690e634 9225else
6ec2e0f5 9226 eval "$as_gl_Symbol=no"
8690e634 9227fi
6ec2e0f5 9228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 9229fi
6ec2e0f5
SDJ
9230eval ac_res=\$$as_gl_Symbol
9231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9232$as_echo "$ac_res" >&6; }
63a9e923 9233 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
6ec2e0f5
SDJ
9234 cat >>confdefs.h <<_ACEOF
9235#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
9236_ACEOF
8690e634 9237
6ec2e0f5 9238 eval ac_cv_have_decl_$gl_func=yes
8690e634 9239fi
6ec2e0f5 9240 done
8690e634 9241
8690e634 9242
8690e634
JK
9243
9244
9245
9246
9247
9248
88b48903 9249
8690e634 9250
8690e634 9251
8690e634
JK
9252
9253
9254
9255
9256
49e4877c
PA
9257
9258
8690e634
JK
9259
9260
8690e634
JK
9261
9262
9263
9264 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 9265 gl_cv_next_limits_h='<'limits.h'>'
8690e634 9266 else
6ec2e0f5
SDJ
9267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
9268$as_echo_n "checking absolute name of <limits.h>... " >&6; }
63a9e923 9269if ${gl_cv_next_limits_h+:} false; then :
8690e634
JK
9270 $as_echo_n "(cached) " >&6
9271else
9272
6ec2e0f5 9273 if test $ac_cv_header_limits_h = yes; then
8690e634
JK
9274
9275
4a626d0a
PA
9276
9277
9278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 9279/* end confdefs.h. */
6ec2e0f5 9280#include <limits.h>
8690e634 9281_ACEOF
4a626d0a
PA
9282 case "$host_os" in
9283 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9284 *) gl_absname_cpp="$ac_cpp" ;;
9285 esac
9286
9287 case "$host_os" in
9288 mingw*)
9289 gl_dirsep_regex='[/\\]'
9290 ;;
9291 *)
9292 gl_dirsep_regex='\/'
9293 ;;
9294 esac
9295 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 9296 gl_header_literal_regex=`echo 'limits.h' \
4a626d0a
PA
9297 | sed -e "$gl_make_literal_regex_sed"`
9298 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9299 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9300 s|^/[^/]|//&|
9301 p
9302 q
9303 }'
9304
6ec2e0f5 9305 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a
PA
9306 sed -n "$gl_absolute_header_sed"`
9307
6ec2e0f5
SDJ
9308 gl_header=$gl_cv_absolute_limits_h
9309 gl_cv_next_limits_h='"'$gl_header'"'
8690e634 9310 else
6ec2e0f5 9311 gl_cv_next_limits_h='<'limits.h'>'
8690e634
JK
9312 fi
9313
9314
9315fi
6ec2e0f5
SDJ
9316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
9317$as_echo "$gl_cv_next_limits_h" >&6; }
8690e634 9318 fi
6ec2e0f5 9319 NEXT_LIMITS_H=$gl_cv_next_limits_h
8690e634
JK
9320
9321 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9322 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 9323 gl_next_as_first_directive='<'limits.h'>'
8690e634
JK
9324 else
9325 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 9326 gl_next_as_first_directive=$gl_cv_next_limits_h
8690e634 9327 fi
6ec2e0f5 9328 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
8690e634
JK
9329
9330
9331
9332
6ec2e0f5
SDJ
9333
9334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has ULLONG_WIDTH etc." >&5
9335$as_echo_n "checking whether limits.h has ULLONG_WIDTH etc.... " >&6; }
63a9e923 9336if ${gl_cv_header_limits_width+:} false; then :
6ec2e0f5
SDJ
9337 $as_echo_n "(cached) " >&6
9338else
9339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9340/* end confdefs.h. */
9341#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
9342 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
9343 #endif
9344 #include <limits.h>
9345 int ullw = ULLONG_WIDTH;
9346int
9347main ()
9348{
9349
9350 ;
9351 return 0;
9352}
9353_ACEOF
9354if ac_fn_c_try_compile "$LINENO"; then :
9355 gl_cv_header_limits_width=yes
9356else
9357 gl_cv_header_limits_width=no
9358fi
9359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9360fi
9361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
9362$as_echo "$gl_cv_header_limits_width" >&6; }
9363 if test "$gl_cv_header_limits_width" = yes; then
9364 LIMITS_H=
8690e634 9365 else
6ec2e0f5 9366 LIMITS_H=limits.h
8690e634
JK
9367 fi
9368
6ec2e0f5
SDJ
9369 if test -n "$LIMITS_H"; then
9370 GL_GENERATE_LIMITS_H_TRUE=
9371 GL_GENERATE_LIMITS_H_FALSE='#'
9372else
9373 GL_GENERATE_LIMITS_H_TRUE='#'
9374 GL_GENERATE_LIMITS_H_FALSE=
9375fi
9376
8690e634 9377
6ec2e0f5
SDJ
9378
9379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
9380$as_echo_n "checking for unsigned long long int... " >&6; }
63a9e923 9381if ${ac_cv_type_unsigned_long_long_int+:} false; then :
8690e634
JK
9382 $as_echo_n "(cached) " >&6
9383else
6ec2e0f5
SDJ
9384 ac_cv_type_unsigned_long_long_int=yes
9385 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
8690e634
JK
9386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9387/* end confdefs.h. */
9388
6ec2e0f5
SDJ
9389 /* For now, do not test the preprocessor; as of 2007 there are too many
9390 implementations with broken preprocessors. Perhaps this can
9391 be revisited in 2012. In the meantime, code should not expect
9392 #if to work with literals wider than 32 bits. */
9393 /* Test literals. */
9394 long long int ll = 9223372036854775807ll;
9395 long long int nll = -9223372036854775807LL;
9396 unsigned long long int ull = 18446744073709551615ULL;
9397 /* Test constant expressions. */
9398 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
9399 ? 1 : -1)];
9400 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
9401 ? 1 : -1)];
9402 int i = 63;
9403int
9404main ()
9405{
9406/* Test availability of runtime routines for shift and division. */
9407 long long int llmax = 9223372036854775807ll;
9408 unsigned long long int ullmax = 18446744073709551615ull;
9409 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
9410 | (llmax / ll) | (llmax % ll)
9411 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
9412 | (ullmax / ull) | (ullmax % ull));
9413 ;
9414 return 0;
9415}
8690e634 9416
6ec2e0f5
SDJ
9417_ACEOF
9418if ac_fn_c_try_link "$LINENO"; then :
8690e634 9419
6ec2e0f5
SDJ
9420else
9421 ac_cv_type_unsigned_long_long_int=no
9422fi
9423rm -f core conftest.err conftest.$ac_objext \
9424 conftest$ac_exeext conftest.$ac_ext
9425 fi
9426fi
9427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
9428$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
9429 if test $ac_cv_type_unsigned_long_long_int = yes; then
8690e634 9430
6ec2e0f5 9431$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
8690e634 9432
6ec2e0f5 9433 fi
8690e634 9434
8690e634 9435
8690e634 9436
6ec2e0f5
SDJ
9437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
9438$as_echo_n "checking for long long int... " >&6; }
63a9e923 9439if ${ac_cv_type_long_long_int+:} false; then :
6ec2e0f5
SDJ
9440 $as_echo_n "(cached) " >&6
9441else
9442 ac_cv_type_long_long_int=yes
9443 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
9444 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
9445 if test $ac_cv_type_long_long_int = yes; then
9446 if test "$cross_compiling" = yes; then :
9447 :
8690e634
JK
9448else
9449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9450/* end confdefs.h. */
6ec2e0f5
SDJ
9451#include <limits.h>
9452 #ifndef LLONG_MAX
9453 # define HALF \
9454 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
9455 # define LLONG_MAX (HALF - 1 + HALF)
9456 #endif
8690e634
JK
9457int
9458main ()
9459{
6ec2e0f5
SDJ
9460long long int n = 1;
9461 int i;
9462 for (i = 0; ; i++)
9463 {
9464 long long int m = n << i;
9465 if (m >> i != n)
9466 return 1;
9467 if (LLONG_MAX / 2 < m)
9468 break;
9469 }
9470 return 0;
8690e634
JK
9471 ;
9472 return 0;
9473}
9474_ACEOF
9475if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5
SDJ
9476
9477else
9478 ac_cv_type_long_long_int=no
8690e634
JK
9479fi
9480rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9481 conftest.$ac_objext conftest.beam conftest.$ac_ext
9482fi
9483
6ec2e0f5
SDJ
9484 fi
9485 fi
8690e634 9486fi
6ec2e0f5
SDJ
9487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
9488$as_echo "$ac_cv_type_long_long_int" >&6; }
9489 if test $ac_cv_type_long_long_int = yes; then
49e4877c 9490
6ec2e0f5 9491$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
49e4877c 9492
6ec2e0f5 9493 fi
49e4877c 9494
49e4877c
PA
9495
9496
49e4877c
PA
9497
9498
49e4877c 9499
6ec2e0f5
SDJ
9500 gl_cv_c_multiarch=no
9501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9502/* end confdefs.h. */
9503#ifndef __APPLE_CC__
9504 not a universal capable compiler
9505 #endif
9506 typedef int dummy;
49e4877c 9507
49e4877c
PA
9508_ACEOF
9509if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5
SDJ
9510
9511 arch=
9512 prev=
9513 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
9514 if test -n "$prev"; then
9515 case $word in
9516 i?86 | x86_64 | ppc | ppc64)
9517 if test -z "$arch" || test "$arch" = "$word"; then
9518 arch="$word"
9519 else
9520 gl_cv_c_multiarch=yes
9521 fi
9522 ;;
9523 esac
9524 prev=
9525 else
9526 if test "x$word" = "x-arch"; then
9527 prev=arch
9528 fi
9529 fi
9530 done
9531
49e4877c
PA
9532fi
9533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
9534 if test $gl_cv_c_multiarch = yes; then
9535 APPLE_UNIVERSAL_BUILD=1
9536 else
9537 APPLE_UNIVERSAL_BUILD=0
9538 fi
49e4877c 9539
49e4877c 9540
49e4877c
PA
9541
9542
49e4877c 9543
49e4877c 9544
49e4877c 9545
6ec2e0f5
SDJ
9546 if test $ac_cv_type_long_long_int = yes; then
9547 HAVE_LONG_LONG_INT=1
9548 else
9549 HAVE_LONG_LONG_INT=0
9550 fi
49e4877c 9551
49e4877c 9552
6ec2e0f5
SDJ
9553 if test $ac_cv_type_unsigned_long_long_int = yes; then
9554 HAVE_UNSIGNED_LONG_LONG_INT=1
8690e634 9555 else
6ec2e0f5
SDJ
9556 HAVE_UNSIGNED_LONG_LONG_INT=0
9557 fi
8690e634 9558
8690e634 9559
8690e634 9560
6ec2e0f5
SDJ
9561 if test $ac_cv_header_wchar_h = yes; then
9562 HAVE_WCHAR_H=1
9563 else
9564 HAVE_WCHAR_H=0
9565 fi
8690e634
JK
9566
9567
6ec2e0f5
SDJ
9568 if test $ac_cv_header_inttypes_h = yes; then
9569 HAVE_INTTYPES_H=1
9570 else
9571 HAVE_INTTYPES_H=0
9572 fi
8690e634
JK
9573
9574
6ec2e0f5
SDJ
9575 if test $ac_cv_header_sys_types_h = yes; then
9576 HAVE_SYS_TYPES_H=1
9577 else
9578 HAVE_SYS_TYPES_H=0
9579 fi
8690e634 9580
8690e634 9581
8690e634 9582
8690e634 9583
8690e634 9584
8690e634
JK
9585
9586
8690e634
JK
9587
9588
6ec2e0f5
SDJ
9589
9590
9591 if test $gl_cv_have_include_next = yes; then
9592 gl_cv_next_stdint_h='<'stdint.h'>'
9593 else
9594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
9595$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
63a9e923 9596if ${gl_cv_next_stdint_h+:} false; then :
8690e634
JK
9597 $as_echo_n "(cached) " >&6
9598else
8690e634 9599
6ec2e0f5 9600 if test $ac_cv_header_stdint_h = yes; then
8690e634 9601
8690e634 9602
8690e634 9603
6ec2e0f5
SDJ
9604
9605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9606/* end confdefs.h. */
9607#include <stdint.h>
8690e634 9608_ACEOF
6ec2e0f5
SDJ
9609 case "$host_os" in
9610 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9611 *) gl_absname_cpp="$ac_cpp" ;;
9612 esac
8690e634 9613
6ec2e0f5
SDJ
9614 case "$host_os" in
9615 mingw*)
9616 gl_dirsep_regex='[/\\]'
9617 ;;
9618 *)
9619 gl_dirsep_regex='\/'
9620 ;;
9621 esac
9622 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9623 gl_header_literal_regex=`echo 'stdint.h' \
9624 | sed -e "$gl_make_literal_regex_sed"`
9625 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9626 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9627 s|^/[^/]|//&|
9628 p
9629 q
9630 }'
9631
9632 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9633 sed -n "$gl_absolute_header_sed"`
9634
9635 gl_header=$gl_cv_absolute_stdint_h
9636 gl_cv_next_stdint_h='"'$gl_header'"'
9637 else
9638 gl_cv_next_stdint_h='<'stdint.h'>'
9639 fi
9640
9641
9642fi
9643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
9644$as_echo "$gl_cv_next_stdint_h" >&6; }
9645 fi
9646 NEXT_STDINT_H=$gl_cv_next_stdint_h
9647
9648 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9649 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9650 gl_next_as_first_directive='<'stdint.h'>'
9651 else
9652 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9653 gl_next_as_first_directive=$gl_cv_next_stdint_h
9654 fi
9655 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
8690e634
JK
9656
9657
9658
9659
6ec2e0f5
SDJ
9660 if test $ac_cv_header_stdint_h = yes; then
9661 HAVE_STDINT_H=1
9662 else
9663 HAVE_STDINT_H=0
9664 fi
9665
9666
9667 if test $ac_cv_header_stdint_h = yes; then
9668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
9669$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
63a9e923 9670if ${gl_cv_header_working_stdint_h+:} false; then :
8690e634
JK
9671 $as_echo_n "(cached) " >&6
9672else
6ec2e0f5
SDJ
9673 gl_cv_header_working_stdint_h=no
9674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
9675/* end confdefs.h. */
9676
6ec2e0f5
SDJ
9677
9678#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
9679#define __STDC_CONSTANT_MACROS 1
9680#define __STDC_LIMIT_MACROS 1
9681#include <stdint.h>
9682/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
9683#if !(defined WCHAR_MIN && defined WCHAR_MAX)
9684#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
9685#endif
9686
9687
8690e634
JK
9688 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9689 included before <wchar.h>. */
9690 #include <stddef.h>
9691 #include <signal.h>
9692 #if HAVE_WCHAR_H
9693 # include <stdio.h>
9694 # include <time.h>
9695 # include <wchar.h>
9696 #endif
9697
8690e634 9698
6ec2e0f5
SDJ
9699#ifdef INT8_MAX
9700int8_t a1 = INT8_MAX;
9701int8_t a1min = INT8_MIN;
9702#endif
9703#ifdef INT16_MAX
9704int16_t a2 = INT16_MAX;
9705int16_t a2min = INT16_MIN;
9706#endif
9707#ifdef INT32_MAX
9708int32_t a3 = INT32_MAX;
9709int32_t a3min = INT32_MIN;
9710#endif
9711#ifdef INT64_MAX
9712int64_t a4 = INT64_MAX;
9713int64_t a4min = INT64_MIN;
9714#endif
9715#ifdef UINT8_MAX
9716uint8_t b1 = UINT8_MAX;
9717#else
9718typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
9719#endif
9720#ifdef UINT16_MAX
9721uint16_t b2 = UINT16_MAX;
9722#endif
9723#ifdef UINT32_MAX
9724uint32_t b3 = UINT32_MAX;
9725#endif
9726#ifdef UINT64_MAX
9727uint64_t b4 = UINT64_MAX;
9728#endif
9729int_least8_t c1 = INT8_C (0x7f);
9730int_least8_t c1max = INT_LEAST8_MAX;
9731int_least8_t c1min = INT_LEAST8_MIN;
9732int_least16_t c2 = INT16_C (0x7fff);
9733int_least16_t c2max = INT_LEAST16_MAX;
9734int_least16_t c2min = INT_LEAST16_MIN;
9735int_least32_t c3 = INT32_C (0x7fffffff);
9736int_least32_t c3max = INT_LEAST32_MAX;
9737int_least32_t c3min = INT_LEAST32_MIN;
9738int_least64_t c4 = INT64_C (0x7fffffffffffffff);
9739int_least64_t c4max = INT_LEAST64_MAX;
9740int_least64_t c4min = INT_LEAST64_MIN;
9741uint_least8_t d1 = UINT8_C (0xff);
9742uint_least8_t d1max = UINT_LEAST8_MAX;
9743uint_least16_t d2 = UINT16_C (0xffff);
9744uint_least16_t d2max = UINT_LEAST16_MAX;
9745uint_least32_t d3 = UINT32_C (0xffffffff);
9746uint_least32_t d3max = UINT_LEAST32_MAX;
9747uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
9748uint_least64_t d4max = UINT_LEAST64_MAX;
9749int_fast8_t e1 = INT_FAST8_MAX;
9750int_fast8_t e1min = INT_FAST8_MIN;
9751int_fast16_t e2 = INT_FAST16_MAX;
9752int_fast16_t e2min = INT_FAST16_MIN;
9753int_fast32_t e3 = INT_FAST32_MAX;
9754int_fast32_t e3min = INT_FAST32_MIN;
9755int_fast64_t e4 = INT_FAST64_MAX;
9756int_fast64_t e4min = INT_FAST64_MIN;
9757uint_fast8_t f1 = UINT_FAST8_MAX;
9758uint_fast16_t f2 = UINT_FAST16_MAX;
9759uint_fast32_t f3 = UINT_FAST32_MAX;
9760uint_fast64_t f4 = UINT_FAST64_MAX;
9761#ifdef INTPTR_MAX
9762intptr_t g = INTPTR_MAX;
9763intptr_t gmin = INTPTR_MIN;
9764#endif
9765#ifdef UINTPTR_MAX
9766uintptr_t h = UINTPTR_MAX;
9767#endif
9768intmax_t i = INTMAX_MAX;
9769uintmax_t j = UINTMAX_MAX;
8690e634 9770
6ec2e0f5
SDJ
9771/* Check that SIZE_MAX has the correct type, if possible. */
9772#if 201112 <= __STDC_VERSION__
9773int k = _Generic (SIZE_MAX, size_t: 0);
9774#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
9775 || (0x5110 <= __SUNPRO_C && !__STDC__))
9776extern size_t k;
9777extern __typeof__ (SIZE_MAX) k;
9778#endif
8690e634 9779
6ec2e0f5
SDJ
9780#include <limits.h> /* for CHAR_BIT */
9781#define TYPE_MINIMUM(t) \
9782 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
9783#define TYPE_MAXIMUM(t) \
9784 ((t) ((t) 0 < (t) -1 \
9785 ? (t) -1 \
9786 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
9787struct s {
9788 int check_PTRDIFF:
9789 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
9790 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
9791 ? 1 : -1;
9792 /* Detect bug in FreeBSD 6.0 / ia64. */
9793 int check_SIG_ATOMIC:
9794 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
9795 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
9796 ? 1 : -1;
9797 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
9798 int check_WCHAR:
9799 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
9800 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
9801 ? 1 : -1;
9802 /* Detect bug in mingw. */
9803 int check_WINT:
9804 WINT_MIN == TYPE_MINIMUM (wint_t)
9805 && WINT_MAX == TYPE_MAXIMUM (wint_t)
9806 ? 1 : -1;
8690e634 9807
6ec2e0f5
SDJ
9808 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
9809 int check_UINT8_C:
9810 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
9811 int check_UINT16_C:
9812 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
8690e634 9813
6ec2e0f5
SDJ
9814 /* Detect bugs in OpenBSD 3.9 stdint.h. */
9815#ifdef UINT8_MAX
9816 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
9817#endif
9818#ifdef UINT16_MAX
9819 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
9820#endif
9821#ifdef UINT32_MAX
9822 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
9823#endif
9824#ifdef UINT64_MAX
9825 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
9826#endif
9827 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
9828 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
9829 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
9830 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
9831 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
9832 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
9833 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
9834 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
9835 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
9836 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
9837 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
9838};
8690e634 9839
8690e634
JK
9840int
9841main ()
9842{
9843
9844 ;
9845 return 0;
9846}
9847_ACEOF
9848if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5
SDJ
9849 if test "$cross_compiling" = yes; then :
9850 gl_cv_header_working_stdint_h=yes
8690e634 9851
6ec2e0f5
SDJ
9852else
9853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9854/* end confdefs.h. */
8690e634 9855
8690e634 9856
6ec2e0f5
SDJ
9857#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
9858#define __STDC_CONSTANT_MACROS 1
9859#define __STDC_LIMIT_MACROS 1
9860#include <stdint.h>
8690e634 9861
8690e634
JK
9862
9863 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9864 included before <wchar.h>. */
9865 #include <stddef.h>
9866 #include <signal.h>
9867 #if HAVE_WCHAR_H
9868 # include <stdio.h>
9869 # include <time.h>
9870 # include <wchar.h>
9871 #endif
9872
8690e634 9873
6ec2e0f5
SDJ
9874#include <stdio.h>
9875#include <string.h>
9876#define MVAL(macro) MVAL1(macro)
9877#define MVAL1(expression) #expression
9878static const char *macro_values[] =
9879 {
9880#ifdef INT8_MAX
9881 MVAL (INT8_MAX),
9882#endif
9883#ifdef INT16_MAX
9884 MVAL (INT16_MAX),
9885#endif
9886#ifdef INT32_MAX
9887 MVAL (INT32_MAX),
9888#endif
9889#ifdef INT64_MAX
9890 MVAL (INT64_MAX),
9891#endif
9892#ifdef UINT8_MAX
9893 MVAL (UINT8_MAX),
9894#endif
9895#ifdef UINT16_MAX
9896 MVAL (UINT16_MAX),
9897#endif
9898#ifdef UINT32_MAX
9899 MVAL (UINT32_MAX),
9900#endif
9901#ifdef UINT64_MAX
9902 MVAL (UINT64_MAX),
9903#endif
9904 NULL
9905 };
9906
9907int
9908main ()
9909{
9910
9911 const char **mv;
9912 for (mv = macro_values; *mv != NULL; mv++)
9913 {
9914 const char *value = *mv;
9915 /* Test whether it looks like a cast expression. */
9916 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
9917 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
9918 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
9919 || strncmp (value, "((int)"/*)*/, 6) == 0
9920 || strncmp (value, "((signed short)"/*)*/, 15) == 0
9921 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
9922 return mv - macro_values + 1;
9923 }
9924 return 0;
9925
9926 ;
8690e634
JK
9927 return 0;
9928}
9929_ACEOF
6ec2e0f5
SDJ
9930if ac_fn_c_try_run "$LINENO"; then :
9931 gl_cv_header_working_stdint_h=yes
8690e634 9932fi
6ec2e0f5
SDJ
9933rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9934 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 9935fi
8690e634
JK
9936
9937
6ec2e0f5
SDJ
9938fi
9939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 9940
6ec2e0f5
SDJ
9941fi
9942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
9943$as_echo "$gl_cv_header_working_stdint_h" >&6; }
8690e634
JK
9944 fi
9945
6ec2e0f5
SDJ
9946 HAVE_C99_STDINT_H=0
9947 HAVE_SYS_BITYPES_H=0
9948 HAVE_SYS_INTTYPES_H=0
9949 STDINT_H=stdint.h
9950 if test "$gl_cv_header_working_stdint_h" = yes; then
9951 HAVE_C99_STDINT_H=1
9952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
9953$as_echo_n "checking whether stdint.h predates C++11... " >&6; }
63a9e923 9954if ${gl_cv_header_stdint_predates_cxx11_h+:} false; then :
6ec2e0f5 9955 $as_echo_n "(cached) " >&6
49e4877c 9956else
6ec2e0f5
SDJ
9957 gl_cv_header_stdint_predates_cxx11_h=yes
9958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9959/* end confdefs.h. */
49e4877c
PA
9960
9961
6ec2e0f5
SDJ
9962#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
9963#include <stdint.h>
49e4877c
PA
9964
9965
6ec2e0f5
SDJ
9966 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9967 included before <wchar.h>. */
9968 #include <stddef.h>
9969 #include <signal.h>
9970 #if HAVE_WCHAR_H
9971 # include <stdio.h>
9972 # include <time.h>
9973 # include <wchar.h>
9974 #endif
49e4877c 9975
8690e634 9976
6ec2e0f5
SDJ
9977intmax_t im = INTMAX_MAX;
9978int32_t i32 = INT32_C (0x7fffffff);
8690e634 9979
6ec2e0f5
SDJ
9980int
9981main ()
9982{
8690e634 9983
6ec2e0f5
SDJ
9984 ;
9985 return 0;
9986}
9987_ACEOF
9988if ac_fn_c_try_compile "$LINENO"; then :
9989 gl_cv_header_stdint_predates_cxx11_h=no
9990fi
9991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9992fi
9993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
9994$as_echo "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
8690e634 9995
6ec2e0f5 9996 if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
8690e634 9997
6ec2e0f5 9998$as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
8690e634
JK
9999
10000
6ec2e0f5 10001$as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
8690e634 10002
6ec2e0f5
SDJ
10003 fi
10004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
10005$as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
63a9e923 10006if ${gl_cv_header_stdint_width+:} false; then :
6ec2e0f5
SDJ
10007 $as_echo_n "(cached) " >&6
10008else
10009 gl_cv_header_stdint_width=no
10010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10011/* end confdefs.h. */
8690e634 10012
6ec2e0f5
SDJ
10013 /* Work if build is not clean. */
10014 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
10015 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
10016 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
10017 #endif
10018 #include <stdint.h>
8690e634 10019
6ec2e0f5
SDJ
10020 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10021 included before <wchar.h>. */
10022 #include <stddef.h>
10023 #include <signal.h>
10024 #if HAVE_WCHAR_H
10025 # include <stdio.h>
10026 # include <time.h>
10027 # include <wchar.h>
10028 #endif
8690e634 10029
6ec2e0f5 10030 int iw = UINTMAX_WIDTH;
8690e634 10031
6ec2e0f5
SDJ
10032int
10033main ()
10034{
8690e634 10035
6ec2e0f5
SDJ
10036 ;
10037 return 0;
10038}
10039_ACEOF
10040if ac_fn_c_try_compile "$LINENO"; then :
10041 gl_cv_header_stdint_width=yes
10042fi
10043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10044fi
10045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
10046$as_echo "$gl_cv_header_stdint_width" >&6; }
10047 if test "$gl_cv_header_stdint_width" = yes; then
10048 STDINT_H=
10049 fi
10050 else
10051 for ac_header in sys/inttypes.h sys/bitypes.h
10052do :
10053 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10054ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
63a9e923 10055if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6ec2e0f5
SDJ
10056 cat >>confdefs.h <<_ACEOF
10057#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10058_ACEOF
8690e634 10059
6ec2e0f5 10060fi
8690e634 10061
6ec2e0f5 10062done
8690e634 10063
6ec2e0f5
SDJ
10064 if test $ac_cv_header_sys_inttypes_h = yes; then
10065 HAVE_SYS_INTTYPES_H=1
10066 fi
10067 if test $ac_cv_header_sys_bitypes_h = yes; then
10068 HAVE_SYS_BITYPES_H=1
10069 fi
8690e634
JK
10070
10071
6ec2e0f5 10072 if test $APPLE_UNIVERSAL_BUILD = 0; then
8690e634
JK
10073
10074
6ec2e0f5
SDJ
10075 for gltype in ptrdiff_t size_t ; do
10076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
10077$as_echo_n "checking for bit size of $gltype... " >&6; }
63a9e923 10078if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
8690e634
JK
10079 $as_echo_n "(cached) " >&6
10080else
6ec2e0f5
SDJ
10081 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
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
8690e634 10091
6ec2e0f5 10092#include <limits.h>"; then :
4a626d0a 10093
6ec2e0f5
SDJ
10094else
10095 result=unknown
10096fi
4a626d0a 10097
6ec2e0f5 10098 eval gl_cv_bitsizeof_${gltype}=\$result
4a626d0a 10099
6ec2e0f5
SDJ
10100fi
10101eval ac_res=\$gl_cv_bitsizeof_${gltype}
10102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10103$as_echo "$ac_res" >&6; }
10104 eval result=\$gl_cv_bitsizeof_${gltype}
10105 if test $result = unknown; then
10106 result=0
10107 fi
10108 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
10109 cat >>confdefs.h <<_ACEOF
10110#define BITSIZEOF_${GLTYPE} $result
10111_ACEOF
4a626d0a 10112
6ec2e0f5
SDJ
10113 eval BITSIZEOF_${GLTYPE}=\$result
10114 done
4a626d0a 10115
8690e634 10116
6ec2e0f5 10117 fi
8690e634 10118
8690e634 10119
6ec2e0f5
SDJ
10120 for gltype in sig_atomic_t wchar_t wint_t ; do
10121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
10122$as_echo_n "checking for bit size of $gltype... " >&6; }
63a9e923 10123if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
6ec2e0f5
SDJ
10124 $as_echo_n "(cached) " >&6
10125else
10126 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
10127 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10128 included before <wchar.h>. */
10129 #include <stddef.h>
10130 #include <signal.h>
10131 #if HAVE_WCHAR_H
10132 # include <stdio.h>
10133 # include <time.h>
10134 # include <wchar.h>
10135 #endif
8690e634 10136
6ec2e0f5
SDJ
10137#include <limits.h>"; then :
10138
10139else
10140 result=unknown
10141fi
8690e634 10142
6ec2e0f5 10143 eval gl_cv_bitsizeof_${gltype}=\$result
8690e634 10144
6ec2e0f5
SDJ
10145fi
10146eval ac_res=\$gl_cv_bitsizeof_${gltype}
10147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10148$as_echo "$ac_res" >&6; }
10149 eval result=\$gl_cv_bitsizeof_${gltype}
10150 if test $result = unknown; then
10151 result=0
10152 fi
10153 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
10154 cat >>confdefs.h <<_ACEOF
10155#define BITSIZEOF_${GLTYPE} $result
10156_ACEOF
8690e634 10157
6ec2e0f5
SDJ
10158 eval BITSIZEOF_${GLTYPE}=\$result
10159 done
8690e634
JK
10160
10161
10162
10163
6ec2e0f5
SDJ
10164 for gltype in sig_atomic_t wchar_t wint_t ; do
10165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
10166$as_echo_n "checking whether $gltype is signed... " >&6; }
63a9e923 10167if eval \${gl_cv_type_${gltype}_signed+:} false; then :
8690e634
JK
10168 $as_echo_n "(cached) " >&6
10169else
10170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10171/* end confdefs.h. */
8690e634 10172
6ec2e0f5
SDJ
10173 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10174 included before <wchar.h>. */
10175 #include <stddef.h>
10176 #include <signal.h>
10177 #if HAVE_WCHAR_H
10178 # include <stdio.h>
10179 # include <time.h>
10180 # include <wchar.h>
10181 #endif
10182
10183 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
8690e634
JK
10184int
10185main ()
10186{
6ec2e0f5 10187
8690e634
JK
10188 ;
10189 return 0;
10190}
10191_ACEOF
10192if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 10193 result=yes
8690e634 10194else
6ec2e0f5 10195 result=no
8690e634
JK
10196fi
10197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
10198 eval gl_cv_type_${gltype}_signed=\$result
10199
8690e634 10200fi
6ec2e0f5 10201eval ac_res=\$gl_cv_type_${gltype}_signed
8690e634
JK
10202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10203$as_echo "$ac_res" >&6; }
6ec2e0f5
SDJ
10204 eval result=\$gl_cv_type_${gltype}_signed
10205 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
10206 if test "$result" = yes; then
10207 cat >>confdefs.h <<_ACEOF
10208#define HAVE_SIGNED_${GLTYPE} 1
8690e634
JK
10209_ACEOF
10210
6ec2e0f5
SDJ
10211 eval HAVE_SIGNED_${GLTYPE}=1
10212 else
10213 eval HAVE_SIGNED_${GLTYPE}=0
10214 fi
10215 done
8690e634 10216
8690e634 10217
6ec2e0f5
SDJ
10218 gl_cv_type_ptrdiff_t_signed=yes
10219 gl_cv_type_size_t_signed=no
10220 if test $APPLE_UNIVERSAL_BUILD = 0; then
8690e634 10221
8690e634 10222
6ec2e0f5
SDJ
10223 for gltype in ptrdiff_t size_t ; do
10224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
10225$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
63a9e923 10226if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
8690e634
JK
10227 $as_echo_n "(cached) " >&6
10228else
6ec2e0f5
SDJ
10229 eval gl_cv_type_${gltype}_suffix=no
10230 eval result=\$gl_cv_type_${gltype}_signed
10231 if test "$result" = yes; then
10232 glsufu=
10233 else
10234 glsufu=u
10235 fi
10236 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
10237 case $glsuf in
10238 '') gltype1='int';;
10239 l) gltype1='long int';;
10240 ll) gltype1='long long int';;
10241 i64) gltype1='__int64';;
10242 u) gltype1='unsigned int';;
10243 ul) gltype1='unsigned long int';;
10244 ull) gltype1='unsigned long long int';;
10245 ui64)gltype1='unsigned __int64';;
10246 esac
10247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
10248/* end confdefs.h. */
10249
6ec2e0f5
SDJ
10250 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10251 included before <wchar.h>. */
10252 #include <stddef.h>
10253 #include <signal.h>
10254 #if HAVE_WCHAR_H
10255 # include <stdio.h>
10256 # include <time.h>
10257 # include <wchar.h>
10258 #endif
8690e634 10259
6ec2e0f5
SDJ
10260 extern $gltype foo;
10261 extern $gltype1 foo;
8690e634
JK
10262int
10263main ()
10264{
10265
10266 ;
10267 return 0;
10268}
10269_ACEOF
10270if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 10271 eval gl_cv_type_${gltype}_suffix=\$glsuf
8690e634
JK
10272fi
10273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
10274 eval result=\$gl_cv_type_${gltype}_suffix
10275 test "$result" != no && break
10276 done
8690e634 10277fi
6ec2e0f5
SDJ
10278eval ac_res=\$gl_cv_type_${gltype}_suffix
10279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10280$as_echo "$ac_res" >&6; }
10281 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
10282 eval result=\$gl_cv_type_${gltype}_suffix
10283 test "$result" = no && result=
10284 eval ${GLTYPE}_SUFFIX=\$result
10285 cat >>confdefs.h <<_ACEOF
10286#define ${GLTYPE}_SUFFIX $result
8690e634
JK
10287_ACEOF
10288
6ec2e0f5 10289 done
8690e634
JK
10290
10291
6ec2e0f5 10292 fi
8690e634 10293
6ec2e0f5
SDJ
10294
10295 for gltype in sig_atomic_t wchar_t wint_t ; do
10296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
10297$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
63a9e923 10298if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
8690e634
JK
10299 $as_echo_n "(cached) " >&6
10300else
6ec2e0f5
SDJ
10301 eval gl_cv_type_${gltype}_suffix=no
10302 eval result=\$gl_cv_type_${gltype}_signed
10303 if test "$result" = yes; then
10304 glsufu=
10305 else
10306 glsufu=u
10307 fi
10308 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
10309 case $glsuf in
10310 '') gltype1='int';;
10311 l) gltype1='long int';;
10312 ll) gltype1='long long int';;
10313 i64) gltype1='__int64';;
10314 u) gltype1='unsigned int';;
10315 ul) gltype1='unsigned long int';;
10316 ull) gltype1='unsigned long long int';;
10317 ui64)gltype1='unsigned __int64';;
10318 esac
10319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 10320/* end confdefs.h. */
88b48903 10321
6ec2e0f5
SDJ
10322 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10323 included before <wchar.h>. */
10324 #include <stddef.h>
10325 #include <signal.h>
10326 #if HAVE_WCHAR_H
10327 # include <stdio.h>
10328 # include <time.h>
10329 # include <wchar.h>
10330 #endif
88b48903 10331
6ec2e0f5
SDJ
10332 extern $gltype foo;
10333 extern $gltype1 foo;
88b48903
WN
10334int
10335main ()
10336{
88b48903
WN
10337
10338 ;
10339 return 0;
10340}
10341_ACEOF
10342if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 10343 eval gl_cv_type_${gltype}_suffix=\$glsuf
8690e634 10344fi
88b48903 10345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
10346 eval result=\$gl_cv_type_${gltype}_suffix
10347 test "$result" != no && break
10348 done
8690e634 10349fi
6ec2e0f5
SDJ
10350eval ac_res=\$gl_cv_type_${gltype}_suffix
10351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10352$as_echo "$ac_res" >&6; }
10353 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
10354 eval result=\$gl_cv_type_${gltype}_suffix
10355 test "$result" = no && result=
10356 eval ${GLTYPE}_SUFFIX=\$result
10357 cat >>confdefs.h <<_ACEOF
10358#define ${GLTYPE}_SUFFIX $result
88b48903 10359_ACEOF
8690e634 10360
6ec2e0f5 10361 done
8690e634
JK
10362
10363
10364
6ec2e0f5
SDJ
10365 if test $BITSIZEOF_WINT_T -lt 32; then
10366 BITSIZEOF_WINT_T=32
10367 fi
8690e634 10368
6ec2e0f5
SDJ
10369 fi
10370
10371 # The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH.
10372 LIMITS_H=limits.h
10373 if test -n "$LIMITS_H"; then
10374 GL_GENERATE_LIMITS_H_TRUE=
10375 GL_GENERATE_LIMITS_H_FALSE='#'
88b48903 10376else
6ec2e0f5
SDJ
10377 GL_GENERATE_LIMITS_H_TRUE='#'
10378 GL_GENERATE_LIMITS_H_FALSE=
88b48903 10379fi
8690e634
JK
10380
10381
10382
10383
10384
6ec2e0f5
SDJ
10385
10386 if test -n "$STDINT_H"; then
10387 GL_GENERATE_STDINT_H_TRUE=
10388 GL_GENERATE_STDINT_H_FALSE='#'
10389else
10390 GL_GENERATE_STDINT_H_TRUE='#'
10391 GL_GENERATE_STDINT_H_FALSE=
88b48903 10392fi
8690e634 10393
8690e634
JK
10394
10395
10396
6ec2e0f5
SDJ
10397
10398 GNULIB_IMAXABS=0;
10399 GNULIB_IMAXDIV=0;
10400 GNULIB_STRTOIMAX=0;
10401 GNULIB_STRTOUMAX=0;
10402 HAVE_DECL_IMAXABS=1;
10403 HAVE_DECL_IMAXDIV=1;
10404 HAVE_DECL_STRTOIMAX=1;
10405 HAVE_DECL_STRTOUMAX=1;
10406 REPLACE_STRTOIMAX=0;
10407 REPLACE_STRTOUMAX=0;
10408 INT32_MAX_LT_INTMAX_MAX=1;
10409 INT64_MAX_EQ_LONG_MAX='defined _LP64';
10410 PRI_MACROS_BROKEN=0;
10411 PRIPTR_PREFIX=__PRIPTR_PREFIX;
10412 UINT32_MAX_LT_UINTMAX_MAX=1;
10413 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429 if test $gl_cv_have_include_next = yes; then
10430 gl_cv_next_inttypes_h='<'inttypes.h'>'
10431 else
10432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
10433$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
63a9e923 10434if ${gl_cv_next_inttypes_h+:} false; then :
6ec2e0f5 10435 $as_echo_n "(cached) " >&6
88b48903 10436else
8690e634 10437
6ec2e0f5 10438 if test $ac_cv_header_inttypes_h = yes; then
8690e634
JK
10439
10440
8690e634
JK
10441
10442
6ec2e0f5
SDJ
10443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10444/* end confdefs.h. */
10445#include <inttypes.h>
88b48903 10446_ACEOF
6ec2e0f5
SDJ
10447 case "$host_os" in
10448 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10449 *) gl_absname_cpp="$ac_cpp" ;;
10450 esac
8690e634 10451
6ec2e0f5
SDJ
10452 case "$host_os" in
10453 mingw*)
10454 gl_dirsep_regex='[/\\]'
10455 ;;
10456 *)
10457 gl_dirsep_regex='\/'
88b48903
WN
10458 ;;
10459 esac
6ec2e0f5
SDJ
10460 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10461 gl_header_literal_regex=`echo 'inttypes.h' \
10462 | sed -e "$gl_make_literal_regex_sed"`
10463 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10464 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10465 s|^/[^/]|//&|
10466 p
10467 q
10468 }'
8690e634 10469
6ec2e0f5
SDJ
10470 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10471 sed -n "$gl_absolute_header_sed"`
8690e634 10472
6ec2e0f5
SDJ
10473 gl_header=$gl_cv_absolute_inttypes_h
10474 gl_cv_next_inttypes_h='"'$gl_header'"'
10475 else
10476 gl_cv_next_inttypes_h='<'inttypes.h'>'
10477 fi
88b48903 10478
88b48903 10479
88b48903 10480fi
6ec2e0f5
SDJ
10481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
10482$as_echo "$gl_cv_next_inttypes_h" >&6; }
10483 fi
10484 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
88b48903 10485
6ec2e0f5
SDJ
10486 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10487 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10488 gl_next_as_first_directive='<'inttypes.h'>'
10489 else
10490 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10491 gl_next_as_first_directive=$gl_cv_next_inttypes_h
10492 fi
10493 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
88b48903 10494
6ec2e0f5
SDJ
10495
10496
10497
10498
10499
10500
10501
10502 for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
10503 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
10504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
10505$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
63a9e923 10506if eval \${$as_gl_Symbol+:} false; then :
6ec2e0f5
SDJ
10507 $as_echo_n "(cached) " >&6
10508else
10509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
88b48903 10510/* end confdefs.h. */
6ec2e0f5 10511#include <inttypes.h>
88b48903
WN
10512
10513int
10514main ()
10515{
6ec2e0f5
SDJ
10516#undef $gl_func
10517 (void) $gl_func;
88b48903
WN
10518 ;
10519 return 0;
10520}
10521_ACEOF
10522if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 10523 eval "$as_gl_Symbol=yes"
88b48903 10524else
6ec2e0f5 10525 eval "$as_gl_Symbol=no"
88b48903
WN
10526fi
10527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10528fi
6ec2e0f5
SDJ
10529eval ac_res=\$$as_gl_Symbol
10530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10531$as_echo "$ac_res" >&6; }
63a9e923 10532 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
6ec2e0f5
SDJ
10533 cat >>confdefs.h <<_ACEOF
10534#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
10535_ACEOF
10536
10537 eval ac_cv_have_decl_$gl_func=yes
10538fi
10539 done
10540
10541
10542
10543 for ac_header in inttypes.h
10544do :
10545 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
63a9e923 10546if test "x$ac_cv_header_inttypes_h" = xyes; then :
6ec2e0f5
SDJ
10547 cat >>confdefs.h <<_ACEOF
10548#define HAVE_INTTYPES_H 1
10549_ACEOF
10550
10551fi
10552
10553done
10554
10555 if test $ac_cv_header_inttypes_h = yes; then
10556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
10557$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
63a9e923 10558if ${gt_cv_inttypes_pri_broken+:} false; then :
6ec2e0f5
SDJ
10559 $as_echo_n "(cached) " >&6
10560else
10561
10562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10563/* end confdefs.h. */
10564
10565#include <inttypes.h>
10566#ifdef PRId32
10567char *p = PRId32;
10568#endif
10569
10570int
10571main ()
10572{
10573
10574 ;
10575 return 0;
10576}
10577_ACEOF
10578if ac_fn_c_try_compile "$LINENO"; then :
10579 gt_cv_inttypes_pri_broken=no
10580else
10581 gt_cv_inttypes_pri_broken=yes
10582fi
10583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10584
10585fi
10586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
10587$as_echo "$gt_cv_inttypes_pri_broken" >&6; }
10588 fi
10589 if test "$gt_cv_inttypes_pri_broken" = yes; then
10590
10591cat >>confdefs.h <<_ACEOF
10592#define PRI_MACROS_BROKEN 1
10593_ACEOF
10594
10595 PRI_MACROS_BROKEN=1
10596 else
10597 PRI_MACROS_BROKEN=0
10598 fi
10599
10600
10601
10602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
10603$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
63a9e923 10604if ${gl_cv_cc_double_expbit0+:} false; then :
6ec2e0f5
SDJ
10605 $as_echo_n "(cached) " >&6
10606else
10607
10608 if test "$cross_compiling" = yes; then :
10609
10610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10611/* end confdefs.h. */
10612
10613#if defined arm || defined __arm || defined __arm__
10614 mixed_endianness
10615#endif
10616
10617_ACEOF
10618if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10619 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
10620 gl_cv_cc_double_expbit0="unknown"
10621else
10622
10623 :
63a9e923 10624if ${ac_cv_c_bigendian+:} false; then :
6ec2e0f5
SDJ
10625 $as_echo_n "(cached) " >&6
10626else
10627 ac_cv_c_bigendian=unknown
10628 # See if we're dealing with a universal compiler.
10629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10630/* end confdefs.h. */
10631#ifndef __APPLE_CC__
10632 not a universal capable compiler
10633 #endif
10634 typedef int dummy;
10635
10636_ACEOF
10637if ac_fn_c_try_compile "$LINENO"; then :
10638
10639 # Check for potential -arch flags. It is not universal unless
10640 # there are at least two -arch flags with different values.
10641 ac_arch=
10642 ac_prev=
10643 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
10644 if test -n "$ac_prev"; then
10645 case $ac_word in
10646 i?86 | x86_64 | ppc | ppc64)
10647 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
10648 ac_arch=$ac_word
10649 else
10650 ac_cv_c_bigendian=universal
10651 break
10652 fi
10653 ;;
10654 esac
10655 ac_prev=
10656 elif test "x$ac_word" = "x-arch"; then
10657 ac_prev=arch
10658 fi
10659 done
10660fi
10661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10662 if test $ac_cv_c_bigendian = unknown; then
10663 # See if sys/param.h defines the BYTE_ORDER macro.
10664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10665/* end confdefs.h. */
10666#include <sys/types.h>
10667 #include <sys/param.h>
10668
10669int
10670main ()
10671{
10672#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
10673 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
10674 && LITTLE_ENDIAN)
10675 bogus endian macros
10676 #endif
10677
10678 ;
10679 return 0;
10680}
10681_ACEOF
10682if ac_fn_c_try_compile "$LINENO"; then :
10683 # It does; now see whether it defined to BIG_ENDIAN or not.
10684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10685/* end confdefs.h. */
10686#include <sys/types.h>
10687 #include <sys/param.h>
10688
10689int
10690main ()
10691{
10692#if BYTE_ORDER != BIG_ENDIAN
10693 not big endian
10694 #endif
10695
10696 ;
10697 return 0;
10698}
10699_ACEOF
10700if ac_fn_c_try_compile "$LINENO"; then :
10701 ac_cv_c_bigendian=yes
10702else
10703 ac_cv_c_bigendian=no
10704fi
10705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10706fi
10707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10708 fi
10709 if test $ac_cv_c_bigendian = unknown; then
10710 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
10711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10712/* end confdefs.h. */
10713#include <limits.h>
10714
10715int
88b48903
WN
10716main ()
10717{
10718#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
10719 bogus endian macros
10720 #endif
10721
10722 ;
10723 return 0;
10724}
10725_ACEOF
10726if ac_fn_c_try_compile "$LINENO"; then :
10727 # It does; now see whether it defined to _BIG_ENDIAN or not.
10728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10729/* end confdefs.h. */
10730#include <limits.h>
10731
10732int
10733main ()
10734{
10735#ifndef _BIG_ENDIAN
10736 not big endian
10737 #endif
10738
10739 ;
10740 return 0;
10741}
10742_ACEOF
10743if ac_fn_c_try_compile "$LINENO"; then :
10744 ac_cv_c_bigendian=yes
10745else
10746 ac_cv_c_bigendian=no
10747fi
10748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10749fi
10750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10751 fi
10752 if test $ac_cv_c_bigendian = unknown; then
10753 # Compile a test program.
10754 if test "$cross_compiling" = yes; then :
10755 # Try to guess by grepping values from an object file.
10756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10757/* end confdefs.h. */
10758short int ascii_mm[] =
10759 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
10760 short int ascii_ii[] =
10761 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
10762 int use_ascii (int i) {
10763 return ascii_mm[i] + ascii_ii[i];
10764 }
10765 short int ebcdic_ii[] =
10766 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
10767 short int ebcdic_mm[] =
10768 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
10769 int use_ebcdic (int i) {
10770 return ebcdic_mm[i] + ebcdic_ii[i];
10771 }
10772 extern int foo;
10773
10774int
10775main ()
10776{
10777return use_ascii (foo) == use_ebcdic (foo);
10778 ;
10779 return 0;
10780}
10781_ACEOF
10782if ac_fn_c_try_compile "$LINENO"; then :
10783 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
10784 ac_cv_c_bigendian=yes
10785 fi
10786 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
10787 if test "$ac_cv_c_bigendian" = unknown; then
10788 ac_cv_c_bigendian=no
10789 else
10790 # finding both strings is unlikely to happen, but who knows?
10791 ac_cv_c_bigendian=unknown
10792 fi
10793 fi
10794fi
10795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10796else
10797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10798/* end confdefs.h. */
10799$ac_includes_default
10800int
10801main ()
10802{
10803
10804 /* Are we little or big endian? From Harbison&Steele. */
10805 union
10806 {
10807 long int l;
10808 char c[sizeof (long int)];
10809 } u;
10810 u.l = 1;
10811 return u.c[sizeof (long int) - 1] == 1;
10812
10813 ;
10814 return 0;
10815}
10816_ACEOF
10817if ac_fn_c_try_run "$LINENO"; then :
10818 ac_cv_c_bigendian=no
10819else
10820 ac_cv_c_bigendian=yes
10821fi
10822rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10823 conftest.$ac_objext conftest.beam conftest.$ac_ext
10824fi
10825
10826 fi
10827fi
6ec2e0f5 10828:
88b48903
WN
10829 case $ac_cv_c_bigendian in #(
10830 yes)
6ec2e0f5 10831 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
88b48903 10832 no)
6ec2e0f5 10833 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
88b48903
WN
10834 universal)
10835
10836$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
10837
10838 ;; #(
10839 *)
6ec2e0f5 10840 gl_cv_cc_double_expbit0="unknown" ;;
88b48903
WN
10841 esac
10842
10843
6ec2e0f5
SDJ
10844fi
10845rm -f conftest*
88b48903 10846
2196f55f 10847
2196f55f
YQ
10848else
10849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10850/* end confdefs.h. */
2196f55f 10851
6ec2e0f5
SDJ
10852#include <float.h>
10853#include <stddef.h>
10854#include <stdio.h>
10855#include <string.h>
10856#define NWORDS \
10857 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
10858typedef union { double value; unsigned int word[NWORDS]; } memory_double;
10859static unsigned int ored_words[NWORDS];
10860static unsigned int anded_words[NWORDS];
10861static void add_to_ored_words (double x)
2196f55f 10862{
6ec2e0f5
SDJ
10863 memory_double m;
10864 size_t i;
10865 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
10866 memset (&m, 0, sizeof (memory_double));
10867 m.value = x;
10868 for (i = 0; i < NWORDS; i++)
10869 {
10870 ored_words[i] |= m.word[i];
10871 anded_words[i] &= m.word[i];
10872 }
2196f55f 10873}
6ec2e0f5 10874int main ()
88b48903 10875{
6ec2e0f5
SDJ
10876 size_t j;
10877 FILE *fp = fopen ("conftest.out", "w");
10878 if (fp == NULL)
10879 return 1;
10880 for (j = 0; j < NWORDS; j++)
10881 anded_words[j] = ~ (unsigned int) 0;
10882 add_to_ored_words (0.25);
10883 add_to_ored_words (0.5);
10884 add_to_ored_words (1.0);
10885 add_to_ored_words (2.0);
10886 add_to_ored_words (4.0);
10887 /* Remove bits that are common (e.g. if representation of the first mantissa
10888 bit is explicit). */
10889 for (j = 0; j < NWORDS; j++)
10890 ored_words[j] &= ~anded_words[j];
10891 /* Now find the nonzero word. */
10892 for (j = 0; j < NWORDS; j++)
10893 if (ored_words[j] != 0)
10894 break;
10895 if (j < NWORDS)
10896 {
10897 size_t i;
10898 for (i = j + 1; i < NWORDS; i++)
10899 if (ored_words[i] != 0)
10900 {
10901 fprintf (fp, "unknown");
10902 return (fclose (fp) != 0);
10903 }
10904 for (i = 0; ; i++)
10905 if ((ored_words[j] >> i) & 1)
10906 {
10907 fprintf (fp, "word %d bit %d", (int) j, (int) i);
10908 return (fclose (fp) != 0);
10909 }
10910 }
10911 fprintf (fp, "unknown");
10912 return (fclose (fp) != 0);
88b48903 10913}
6ec2e0f5 10914
88b48903 10915_ACEOF
6ec2e0f5
SDJ
10916if ac_fn_c_try_run "$LINENO"; then :
10917 gl_cv_cc_double_expbit0=`cat conftest.out`
88b48903 10918else
6ec2e0f5 10919 gl_cv_cc_double_expbit0="unknown"
88b48903 10920fi
6ec2e0f5
SDJ
10921rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10922 conftest.$ac_objext conftest.beam conftest.$ac_ext
10923fi
10924
10925 rm -f conftest.out
88b48903
WN
10926
10927fi
6ec2e0f5
SDJ
10928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
10929$as_echo "$gl_cv_cc_double_expbit0" >&6; }
10930 case "$gl_cv_cc_double_expbit0" in
10931 word*bit*)
10932 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
10933 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
88b48903 10934
6ec2e0f5
SDJ
10935cat >>confdefs.h <<_ACEOF
10936#define DBL_EXPBIT0_WORD $word
10937_ACEOF
88b48903 10938
88b48903 10939
6ec2e0f5
SDJ
10940cat >>confdefs.h <<_ACEOF
10941#define DBL_EXPBIT0_BIT $bit
10942_ACEOF
88b48903 10943
6ec2e0f5
SDJ
10944 ;;
10945 esac
88b48903
WN
10946
10947
6ec2e0f5
SDJ
10948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
10949$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
63a9e923 10950if ${ac_cv_c_bigendian+:} false; then :
6ec2e0f5
SDJ
10951 $as_echo_n "(cached) " >&6
10952else
10953 ac_cv_c_bigendian=unknown
10954 # See if we're dealing with a universal compiler.
10955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10956/* end confdefs.h. */
10957#ifndef __APPLE_CC__
10958 not a universal capable compiler
10959 #endif
10960 typedef int dummy;
88b48903 10961
6ec2e0f5
SDJ
10962_ACEOF
10963if ac_fn_c_try_compile "$LINENO"; then :
88b48903 10964
6ec2e0f5
SDJ
10965 # Check for potential -arch flags. It is not universal unless
10966 # there are at least two -arch flags with different values.
10967 ac_arch=
10968 ac_prev=
10969 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
10970 if test -n "$ac_prev"; then
10971 case $ac_word in
10972 i?86 | x86_64 | ppc | ppc64)
10973 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
10974 ac_arch=$ac_word
10975 else
10976 ac_cv_c_bigendian=universal
10977 break
10978 fi
10979 ;;
10980 esac
10981 ac_prev=
10982 elif test "x$ac_word" = "x-arch"; then
10983 ac_prev=arch
10984 fi
10985 done
10986fi
10987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10988 if test $ac_cv_c_bigendian = unknown; then
10989 # See if sys/param.h defines the BYTE_ORDER macro.
10990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10991/* end confdefs.h. */
10992#include <sys/types.h>
10993 #include <sys/param.h>
88b48903 10994
6ec2e0f5
SDJ
10995int
10996main ()
10997{
10998#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
10999 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11000 && LITTLE_ENDIAN)
11001 bogus endian macros
11002 #endif
88b48903 11003
6ec2e0f5
SDJ
11004 ;
11005 return 0;
11006}
11007_ACEOF
11008if ac_fn_c_try_compile "$LINENO"; then :
11009 # It does; now see whether it defined to BIG_ENDIAN or not.
11010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
88b48903
WN
11011/* end confdefs.h. */
11012#include <sys/types.h>
6ec2e0f5 11013 #include <sys/param.h>
8690e634
JK
11014
11015int
11016main ()
11017{
6ec2e0f5
SDJ
11018#if BYTE_ORDER != BIG_ENDIAN
11019 not big endian
11020 #endif
8690e634 11021
8690e634
JK
11022 ;
11023 return 0;
11024}
11025_ACEOF
6ec2e0f5
SDJ
11026if ac_fn_c_try_compile "$LINENO"; then :
11027 ac_cv_c_bigendian=yes
8690e634 11028else
6ec2e0f5 11029 ac_cv_c_bigendian=no
8690e634 11030fi
6ec2e0f5 11031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 11032fi
6ec2e0f5
SDJ
11033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11034 fi
11035 if test $ac_cv_c_bigendian = unknown; then
11036 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11038/* end confdefs.h. */
11039#include <limits.h>
11040
11041int
11042main ()
11043{
11044#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11045 bogus endian macros
11046 #endif
11047
11048 ;
11049 return 0;
11050}
11051_ACEOF
11052if ac_fn_c_try_compile "$LINENO"; then :
11053 # It does; now see whether it defined to _BIG_ENDIAN or not.
11054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11055/* end confdefs.h. */
11056#include <limits.h>
8690e634 11057
6ec2e0f5
SDJ
11058int
11059main ()
11060{
11061#ifndef _BIG_ENDIAN
11062 not big endian
11063 #endif
11064
11065 ;
11066 return 0;
11067}
11068_ACEOF
11069if ac_fn_c_try_compile "$LINENO"; then :
11070 ac_cv_c_bigendian=yes
11071else
11072 ac_cv_c_bigendian=no
8690e634 11073fi
6ec2e0f5
SDJ
11074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11075fi
11076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11077 fi
11078 if test $ac_cv_c_bigendian = unknown; then
11079 # Compile a test program.
11080 if test "$cross_compiling" = yes; then :
11081 # Try to guess by grepping values from an object file.
11082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11083/* end confdefs.h. */
11084short int ascii_mm[] =
11085 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11086 short int ascii_ii[] =
11087 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11088 int use_ascii (int i) {
11089 return ascii_mm[i] + ascii_ii[i];
11090 }
11091 short int ebcdic_ii[] =
11092 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11093 short int ebcdic_mm[] =
11094 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11095 int use_ebcdic (int i) {
11096 return ebcdic_mm[i] + ebcdic_ii[i];
11097 }
11098 extern int foo;
8690e634 11099
6ec2e0f5
SDJ
11100int
11101main ()
11102{
11103return use_ascii (foo) == use_ebcdic (foo);
11104 ;
11105 return 0;
11106}
11107_ACEOF
11108if ac_fn_c_try_compile "$LINENO"; then :
11109 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11110 ac_cv_c_bigendian=yes
11111 fi
11112 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11113 if test "$ac_cv_c_bigendian" = unknown; then
11114 ac_cv_c_bigendian=no
11115 else
11116 # finding both strings is unlikely to happen, but who knows?
11117 ac_cv_c_bigendian=unknown
11118 fi
11119 fi
11120fi
11121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11122else
11123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11124/* end confdefs.h. */
11125$ac_includes_default
11126int
11127main ()
11128{
8690e634 11129
6ec2e0f5
SDJ
11130 /* Are we little or big endian? From Harbison&Steele. */
11131 union
11132 {
11133 long int l;
11134 char c[sizeof (long int)];
11135 } u;
11136 u.l = 1;
11137 return u.c[sizeof (long int) - 1] == 1;
11138
11139 ;
11140 return 0;
11141}
8690e634 11142_ACEOF
6ec2e0f5
SDJ
11143if ac_fn_c_try_run "$LINENO"; then :
11144 ac_cv_c_bigendian=no
11145else
11146 ac_cv_c_bigendian=yes
11147fi
11148rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11149 conftest.$ac_objext conftest.beam conftest.$ac_ext
11150fi
11151
11152 fi
11153fi
11154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11155$as_echo "$ac_cv_c_bigendian" >&6; }
11156 case $ac_cv_c_bigendian in #(
11157 yes)
11158 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11159;; #(
11160 no)
11161 ;; #(
11162 universal)
8690e634 11163
6ec2e0f5 11164$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
8690e634 11165
6ec2e0f5
SDJ
11166 ;; #(
11167 *)
63a9e923 11168 as_fn_error $? "unknown endianness
6ec2e0f5
SDJ
11169 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11170 esac
8690e634 11171
6ec2e0f5
SDJ
11172
11173
11174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
11175$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
63a9e923 11176if ${am_cv_langinfo_codeset+:} false; then :
6ec2e0f5
SDJ
11177 $as_echo_n "(cached) " >&6
11178else
11179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11180/* end confdefs.h. */
11181#include <langinfo.h>
11182int
11183main ()
11184{
11185char* cs = nl_langinfo(CODESET); return !cs;
11186 ;
11187 return 0;
11188}
8690e634 11189_ACEOF
6ec2e0f5
SDJ
11190if ac_fn_c_try_link "$LINENO"; then :
11191 am_cv_langinfo_codeset=yes
11192else
11193 am_cv_langinfo_codeset=no
11194fi
11195rm -f core conftest.err conftest.$ac_objext \
11196 conftest$ac_exeext conftest.$ac_ext
11197
11198fi
11199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
11200$as_echo "$am_cv_langinfo_codeset" >&6; }
11201 if test $am_cv_langinfo_codeset = yes; then
11202
11203$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8690e634 11204
6ec2e0f5 11205 fi
8690e634 11206
3574124b 11207ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
63a9e923 11208if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
8690e634
JK
11209 ac_have_decl=1
11210else
11211 ac_have_decl=0
11212fi
11213
11214cat >>confdefs.h <<_ACEOF
11215#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
11216_ACEOF
11217
11218
8690e634
JK
11219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
11220$as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
63a9e923 11221if ${ac_cv_gnu_library_2_1+:} false; then :
8690e634
JK
11222 $as_echo_n "(cached) " >&6
11223else
11224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11225/* end confdefs.h. */
11226
11227#include <features.h>
11228#ifdef __GNU_LIBRARY__
11229 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
11230 Lucky GNU user
11231 #endif
11232#endif
11233#ifdef __UCLIBC__
11234 Lucky user
11235#endif
11236
11237_ACEOF
11238if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11239 $EGREP "Lucky" >/dev/null 2>&1; then :
11240 ac_cv_gnu_library_2_1=yes
11241else
11242 ac_cv_gnu_library_2_1=no
11243fi
11244rm -f conftest*
11245
11246
11247
11248fi
11249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
11250$as_echo "$ac_cv_gnu_library_2_1" >&6; }
11251
11252 GLIBC21="$ac_cv_gnu_library_2_1"
11253
11254
11255
f45c62c4
YQ
11256
11257
6ec2e0f5
SDJ
11258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
11259$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
63a9e923 11260if ${gl_cv_func_malloc_posix+:} false; then :
f45c62c4
YQ
11261 $as_echo_n "(cached) " >&6
11262else
f45c62c4 11263
6ec2e0f5 11264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f45c62c4 11265/* end confdefs.h. */
6ec2e0f5 11266
f45c62c4
YQ
11267int
11268main ()
11269{
6ec2e0f5
SDJ
11270#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
11271 choke me
11272 #endif
f45c62c4
YQ
11273
11274 ;
11275 return 0;
11276}
11277_ACEOF
6ec2e0f5
SDJ
11278if ac_fn_c_try_compile "$LINENO"; then :
11279 gl_cv_func_malloc_posix=yes
f45c62c4 11280else
6ec2e0f5 11281 gl_cv_func_malloc_posix=no
f45c62c4 11282fi
6ec2e0f5 11283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6a29c58e
YQ
11284
11285fi
11286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
11287$as_echo "$gl_cv_func_malloc_posix" >&6; }
11288
11289
11290
11291 for ac_header in stdlib.h
98399780
YQ
11292do :
11293 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
63a9e923 11294if test "x$ac_cv_header_stdlib_h" = xyes; then :
98399780
YQ
11295 cat >>confdefs.h <<_ACEOF
11296#define HAVE_STDLIB_H 1
11297_ACEOF
11298
11299fi
11300
11301done
11302
6a29c58e 11303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
98399780 11304$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
63a9e923 11305if ${ac_cv_func_malloc_0_nonnull+:} false; then :
98399780
YQ
11306 $as_echo_n "(cached) " >&6
11307else
11308 if test "$cross_compiling" = yes; then :
6a29c58e
YQ
11309 case "$host_os" in
11310 # Guess yes on platforms where we know the result.
11311 *-gnu* | freebsd* | netbsd* | openbsd* \
11312 | hpux* | solaris* | cygwin* | mingw*)
11313 ac_cv_func_malloc_0_nonnull=yes ;;
11314 # If we don't know, assume the worst.
11315 *) ac_cv_func_malloc_0_nonnull=no ;;
11316 esac
11317
98399780
YQ
11318else
11319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11320/* end confdefs.h. */
11321#if defined STDC_HEADERS || defined HAVE_STDLIB_H
6a29c58e
YQ
11322 # include <stdlib.h>
11323 #else
11324 char *malloc ();
11325 #endif
98399780
YQ
11326
11327int
11328main ()
11329{
49e4877c
PA
11330char *p = malloc (0);
11331 int result = !p;
11332 free (p);
11333 return result;
98399780
YQ
11334 ;
11335 return 0;
11336}
6a29c58e 11337
98399780
YQ
11338_ACEOF
11339if ac_fn_c_try_run "$LINENO"; then :
11340 ac_cv_func_malloc_0_nonnull=yes
11341else
11342 ac_cv_func_malloc_0_nonnull=no
11343fi
11344rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11345 conftest.$ac_objext conftest.beam conftest.$ac_ext
11346fi
11347
6a29c58e 11348
98399780
YQ
11349fi
11350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
11351$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
6a29c58e 11352 if test $ac_cv_func_malloc_0_nonnull = yes; then :
98399780
YQ
11353 gl_cv_func_malloc_0_nonnull=1
11354else
11355 gl_cv_func_malloc_0_nonnull=0
11356fi
11357
11358
11359cat >>confdefs.h <<_ACEOF
11360#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
11361_ACEOF
11362
11363
11364
88b48903
WN
11365
11366
8690e634
JK
11367 GNULIB_BTOWC=0;
11368 GNULIB_WCTOB=0;
11369 GNULIB_MBSINIT=0;
11370 GNULIB_MBRTOWC=0;
11371 GNULIB_MBRLEN=0;
11372 GNULIB_MBSRTOWCS=0;
11373 GNULIB_MBSNRTOWCS=0;
11374 GNULIB_WCRTOMB=0;
11375 GNULIB_WCSRTOMBS=0;
11376 GNULIB_WCSNRTOMBS=0;
11377 GNULIB_WCWIDTH=0;
11378 GNULIB_WMEMCHR=0;
11379 GNULIB_WMEMCMP=0;
11380 GNULIB_WMEMCPY=0;
11381 GNULIB_WMEMMOVE=0;
11382 GNULIB_WMEMSET=0;
11383 GNULIB_WCSLEN=0;
11384 GNULIB_WCSNLEN=0;
11385 GNULIB_WCSCPY=0;
11386 GNULIB_WCPCPY=0;
11387 GNULIB_WCSNCPY=0;
11388 GNULIB_WCPNCPY=0;
11389 GNULIB_WCSCAT=0;
11390 GNULIB_WCSNCAT=0;
11391 GNULIB_WCSCMP=0;
11392 GNULIB_WCSNCMP=0;
11393 GNULIB_WCSCASECMP=0;
11394 GNULIB_WCSNCASECMP=0;
11395 GNULIB_WCSCOLL=0;
11396 GNULIB_WCSXFRM=0;
11397 GNULIB_WCSDUP=0;
11398 GNULIB_WCSCHR=0;
11399 GNULIB_WCSRCHR=0;
11400 GNULIB_WCSCSPN=0;
11401 GNULIB_WCSSPN=0;
11402 GNULIB_WCSPBRK=0;
11403 GNULIB_WCSSTR=0;
11404 GNULIB_WCSTOK=0;
11405 GNULIB_WCSWIDTH=0;
11406 HAVE_BTOWC=1;
11407 HAVE_MBSINIT=1;
11408 HAVE_MBRTOWC=1;
11409 HAVE_MBRLEN=1;
11410 HAVE_MBSRTOWCS=1;
11411 HAVE_MBSNRTOWCS=1;
11412 HAVE_WCRTOMB=1;
11413 HAVE_WCSRTOMBS=1;
11414 HAVE_WCSNRTOMBS=1;
11415 HAVE_WMEMCHR=1;
11416 HAVE_WMEMCMP=1;
11417 HAVE_WMEMCPY=1;
11418 HAVE_WMEMMOVE=1;
11419 HAVE_WMEMSET=1;
11420 HAVE_WCSLEN=1;
11421 HAVE_WCSNLEN=1;
11422 HAVE_WCSCPY=1;
11423 HAVE_WCPCPY=1;
11424 HAVE_WCSNCPY=1;
11425 HAVE_WCPNCPY=1;
11426 HAVE_WCSCAT=1;
11427 HAVE_WCSNCAT=1;
11428 HAVE_WCSCMP=1;
11429 HAVE_WCSNCMP=1;
11430 HAVE_WCSCASECMP=1;
11431 HAVE_WCSNCASECMP=1;
11432 HAVE_WCSCOLL=1;
11433 HAVE_WCSXFRM=1;
11434 HAVE_WCSDUP=1;
11435 HAVE_WCSCHR=1;
11436 HAVE_WCSRCHR=1;
11437 HAVE_WCSCSPN=1;
11438 HAVE_WCSSPN=1;
11439 HAVE_WCSPBRK=1;
11440 HAVE_WCSSTR=1;
11441 HAVE_WCSTOK=1;
11442 HAVE_WCSWIDTH=1;
11443 HAVE_DECL_WCTOB=1;
11444 HAVE_DECL_WCWIDTH=1;
11445 REPLACE_MBSTATE_T=0;
11446 REPLACE_BTOWC=0;
11447 REPLACE_WCTOB=0;
11448 REPLACE_MBSINIT=0;
11449 REPLACE_MBRTOWC=0;
11450 REPLACE_MBRLEN=0;
11451 REPLACE_MBSRTOWCS=0;
11452 REPLACE_MBSNRTOWCS=0;
11453 REPLACE_WCRTOMB=0;
11454 REPLACE_WCSRTOMBS=0;
11455 REPLACE_WCSNRTOMBS=0;
11456 REPLACE_WCWIDTH=0;
11457 REPLACE_WCSWIDTH=0;
11458
11459
11460
11461
11462
11463
11464
11465
8690e634
JK
11466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
11467$as_echo_n "checking for a traditional japanese locale... " >&6; }
63a9e923 11468if ${gt_cv_locale_ja+:} false; then :
8690e634
JK
11469 $as_echo_n "(cached) " >&6
11470else
11471
11472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11473/* end confdefs.h. */
11474
11475#include <locale.h>
11476#include <time.h>
11477#if HAVE_LANGINFO_CODESET
11478# include <langinfo.h>
11479#endif
11480#include <stdlib.h>
11481#include <string.h>
11482struct tm t;
11483char buf[16];
11484int main ()
11485{
11486 const char *p;
11487 /* Check whether the given locale name is recognized by the system. */
11488#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
11489 /* On native Windows, setlocale(category, "") looks at the system settings,
11490 not at the environment variables. Also, when an encoding suffix such
11491 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
11492 category of the locale to "C". */
11493 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
11494 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
11495 return 1;
11496#else
11497 if (setlocale (LC_ALL, "") == NULL) return 1;
11498#endif
11499 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
11500 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
11501 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
11502 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
11503 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
11504 some unit tests fail.
11505 On MirBSD 10, when an unsupported locale is specified, setlocale()
11506 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
11507#if HAVE_LANGINFO_CODESET
11508 {
11509 const char *cs = nl_langinfo (CODESET);
11510 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
11511 || strcmp (cs, "UTF-8") == 0)
11512 return 1;
11513 }
11514#endif
11515#ifdef __CYGWIN__
11516 /* On Cygwin, avoid locale names without encoding suffix, because the
11517 locale_charset() function relies on the encoding suffix. Note that
11518 LC_ALL is set on the command line. */
11519 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
11520#endif
11521 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
11522 on Cygwin 1.5.x. */
11523 if (MB_CUR_MAX == 1)
11524 return 1;
11525 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
11526 This excludes the UTF-8 encoding (except on MirBSD). */
11527 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
11528 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
11529 for (p = buf; *p != '\0'; p++)
11530 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
11531 return 1;
11532 return 0;
11533}
11534
11535_ACEOF
11536 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11537 (eval $ac_link) 2>&5
11538 ac_status=$?
11539 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11540 test $ac_status = 0; } && test -s conftest$ac_exeext; then
11541 case "$host_os" in
11542 # Handle native Windows specially, because there setlocale() interprets
11543 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
11544 # "fr" or "fra" as "French" or "French_France.1252",
11545 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
11546 # "ja" as "Japanese" or "Japanese_Japan.932",
11547 # and similar.
11548 mingw*)
11549 # Note that on native Windows, the Japanese locale is
11550 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
11551 # cannot use it here.
11552 gt_cv_locale_ja=none
11553 ;;
11554 *)
11555 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
11556 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
11557 # configure script would override the LC_ALL setting. Likewise for
11558 # LC_CTYPE, which is also set at the beginning of the configure script.
11559 # Test for the AIX locale name.
11560 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11561 gt_cv_locale_ja=ja_JP
11562 else
11563 # Test for the locale name with explicit encoding suffix.
11564 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11565 gt_cv_locale_ja=ja_JP.EUC-JP
11566 else
11567 # Test for the HP-UX, OSF/1, NetBSD locale name.
11568 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11569 gt_cv_locale_ja=ja_JP.eucJP
11570 else
11571 # Test for the IRIX, FreeBSD locale name.
11572 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11573 gt_cv_locale_ja=ja_JP.EUC
11574 else
11575 # Test for the Solaris 7 locale name.
11576 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11577 gt_cv_locale_ja=ja
11578 else
11579 # Special test for NetBSD 1.6.
11580 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
11581 gt_cv_locale_ja=ja_JP.eucJP
11582 else
11583 # None found.
11584 gt_cv_locale_ja=none
11585 fi
11586 fi
11587 fi
11588 fi
11589 fi
11590 fi
11591 ;;
11592 esac
11593 fi
11594 rm -fr conftest*
11595
11596fi
11597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
11598$as_echo "$gt_cv_locale_ja" >&6; }
11599 LOCALE_JA=$gt_cv_locale_ja
11600
11601
11602
11603
11604
11605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
11606$as_echo_n "checking for a transitional chinese locale... " >&6; }
63a9e923 11607if ${gt_cv_locale_zh_CN+:} false; then :
8690e634
JK
11608 $as_echo_n "(cached) " >&6
11609else
11610
11611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11612/* end confdefs.h. */
11613
11614#include <locale.h>
11615#include <stdlib.h>
11616#include <time.h>
11617#if HAVE_LANGINFO_CODESET
11618# include <langinfo.h>
11619#endif
11620#include <stdlib.h>
11621#include <string.h>
11622struct tm t;
11623char buf[16];
11624int main ()
11625{
11626 const char *p;
11627 /* Check whether the given locale name is recognized by the system. */
11628#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
11629 /* On native Windows, setlocale(category, "") looks at the system settings,
11630 not at the environment variables. Also, when an encoding suffix such
11631 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
11632 category of the locale to "C". */
11633 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
11634 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
11635 return 1;
11636#else
11637 if (setlocale (LC_ALL, "") == NULL) return 1;
11638#endif
11639 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
11640 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
11641 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
11642 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
11643 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
11644 some unit tests fail.
11645 On MirBSD 10, when an unsupported locale is specified, setlocale()
11646 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
11647#if HAVE_LANGINFO_CODESET
11648 {
11649 const char *cs = nl_langinfo (CODESET);
11650 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
11651 || strcmp (cs, "UTF-8") == 0)
11652 return 1;
11653 }
11654#endif
11655#ifdef __CYGWIN__
11656 /* On Cygwin, avoid locale names without encoding suffix, because the
11657 locale_charset() function relies on the encoding suffix. Note that
11658 LC_ALL is set on the command line. */
11659 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
11660#endif
11661 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
11662 This excludes the UTF-8 encoding (except on MirBSD). */
11663 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
11664 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
11665 for (p = buf; *p != '\0'; p++)
11666 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
11667 return 1;
11668 /* Check whether a typical GB18030 multibyte sequence is recognized as a
11669 single wide character. This excludes the GB2312 and GBK encodings. */
11670 if (mblen ("\203\062\332\066", 5) != 4)
11671 return 1;
11672 return 0;
11673}
11674
11675_ACEOF
11676 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11677 (eval $ac_link) 2>&5
11678 ac_status=$?
11679 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11680 test $ac_status = 0; } && test -s conftest$ac_exeext; then
11681 case "$host_os" in
11682 # Handle native Windows specially, because there setlocale() interprets
11683 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
11684 # "fr" or "fra" as "French" or "French_France.1252",
11685 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
11686 # "ja" as "Japanese" or "Japanese_Japan.932",
11687 # and similar.
11688 mingw*)
11689 # Test for the hypothetical native Windows locale name.
11690 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11691 gt_cv_locale_zh_CN=Chinese_China.54936
11692 else
11693 # None found.
11694 gt_cv_locale_zh_CN=none
11695 fi
11696 ;;
11697 solaris2.8)
11698 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
11699 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
11700 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
11701 gt_cv_locale_zh_CN=none
11702 ;;
11703 *)
11704 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
11705 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
11706 # configure script would override the LC_ALL setting. Likewise for
11707 # LC_CTYPE, which is also set at the beginning of the configure script.
11708 # Test for the locale name without encoding suffix.
11709 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11710 gt_cv_locale_zh_CN=zh_CN
11711 else
11712 # Test for the locale name with explicit encoding suffix.
11713 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11714 gt_cv_locale_zh_CN=zh_CN.GB18030
11715 else
11716 # None found.
11717 gt_cv_locale_zh_CN=none
11718 fi
11719 fi
11720 ;;
11721 esac
11722 else
11723 # If there was a link error, due to mblen(), the system is so old that
11724 # it certainly doesn't have a chinese locale.
11725 gt_cv_locale_zh_CN=none
11726 fi
11727 rm -fr conftest*
11728
11729fi
11730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
11731$as_echo "$gt_cv_locale_zh_CN" >&6; }
11732 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
11733
11734
11735
11736
11737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
11738$as_echo_n "checking for a french Unicode locale... " >&6; }
63a9e923 11739if ${gt_cv_locale_fr_utf8+:} false; then :
8690e634
JK
11740 $as_echo_n "(cached) " >&6
11741else
11742
11743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11744/* end confdefs.h. */
11745
11746#include <locale.h>
11747#include <time.h>
11748#if HAVE_LANGINFO_CODESET
11749# include <langinfo.h>
11750#endif
11751#include <stdlib.h>
11752#include <string.h>
11753struct tm t;
11754char buf[16];
11755int main () {
11756 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
11757 imitates locale dependent behaviour by looking at the environment
11758 variables, and all locales use the UTF-8 encoding. */
11759#if !(defined __BEOS__ || defined __HAIKU__)
11760 /* Check whether the given locale name is recognized by the system. */
11761# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
11762 /* On native Windows, setlocale(category, "") looks at the system settings,
11763 not at the environment variables. Also, when an encoding suffix such
11764 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
11765 category of the locale to "C". */
11766 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
11767 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
11768 return 1;
11769# else
11770 if (setlocale (LC_ALL, "") == NULL) return 1;
11771# endif
11772 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
11773 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
11774 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
11775 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
11776 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
11777 some unit tests fail. */
11778# if HAVE_LANGINFO_CODESET
11779 {
11780 const char *cs = nl_langinfo (CODESET);
11781 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
11782 return 1;
11783 }
11784# endif
11785# ifdef __CYGWIN__
11786 /* On Cygwin, avoid locale names without encoding suffix, because the
11787 locale_charset() function relies on the encoding suffix. Note that
11788 LC_ALL is set on the command line. */
11789 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
11790# endif
11791 /* Check whether in the abbreviation of the second month, the second
11792 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
11793 two bytes long, with UTF-8 encoding. */
11794 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
11795 if (strftime (buf, sizeof (buf), "%b", &t) < 4
11796 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
11797 return 1;
11798#endif
11799#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
11800 /* Check whether the decimal separator is a comma.
11801 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
11802 are nl_langinfo(RADIXCHAR) are both ".". */
11803 if (localeconv () ->decimal_point[0] != ',') return 1;
11804#endif
11805 return 0;
11806}
11807
11808_ACEOF
11809 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11810 (eval $ac_link) 2>&5
11811 ac_status=$?
11812 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11813 test $ac_status = 0; } && test -s conftest$ac_exeext; then
11814 case "$host_os" in
11815 # Handle native Windows specially, because there setlocale() interprets
11816 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
11817 # "fr" or "fra" as "French" or "French_France.1252",
11818 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
11819 # "ja" as "Japanese" or "Japanese_Japan.932",
11820 # and similar.
11821 mingw*)
11822 # Test for the hypothetical native Windows locale name.
11823 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11824 gt_cv_locale_fr_utf8=French_France.65001
11825 else
11826 # None found.
11827 gt_cv_locale_fr_utf8=none
11828 fi
11829 ;;
11830 *)
11831 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
11832 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
11833 # configure script would override the LC_ALL setting. Likewise for
11834 # LC_CTYPE, which is also set at the beginning of the configure script.
11835 # Test for the usual locale name.
11836 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11837 gt_cv_locale_fr_utf8=fr_FR
11838 else
11839 # Test for the locale name with explicit encoding suffix.
11840 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11841 gt_cv_locale_fr_utf8=fr_FR.UTF-8
11842 else
11843 # Test for the Solaris 7 locale name.
11844 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11845 gt_cv_locale_fr_utf8=fr.UTF-8
11846 else
11847 # None found.
11848 gt_cv_locale_fr_utf8=none
11849 fi
11850 fi
11851 fi
11852 ;;
11853 esac
11854 fi
11855 rm -fr conftest*
11856
11857fi
11858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
11859$as_echo "$gt_cv_locale_fr_utf8" >&6; }
11860 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
11861
11862
11863
11864
11865
11866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
11867$as_echo_n "checking for a traditional french locale... " >&6; }
63a9e923 11868if ${gt_cv_locale_fr+:} false; then :
8690e634
JK
11869 $as_echo_n "(cached) " >&6
11870else
11871
11872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11873/* end confdefs.h. */
11874
11875#include <locale.h>
11876#include <time.h>
11877#if HAVE_LANGINFO_CODESET
11878# include <langinfo.h>
11879#endif
11880#include <stdlib.h>
11881#include <string.h>
11882struct tm t;
11883char buf[16];
11884int main () {
11885 /* Check whether the given locale name is recognized by the system. */
11886#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
11887 /* On native Windows, setlocale(category, "") looks at the system settings,
11888 not at the environment variables. Also, when an encoding suffix such
11889 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
11890 category of the locale to "C". */
11891 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
11892 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
11893 return 1;
11894#else
11895 if (setlocale (LC_ALL, "") == NULL) return 1;
11896#endif
11897 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
11898 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
11899 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
11900 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
11901 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
11902 some unit tests fail.
11903 On MirBSD 10, when an unsupported locale is specified, setlocale()
11904 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
11905#if HAVE_LANGINFO_CODESET
11906 {
11907 const char *cs = nl_langinfo (CODESET);
11908 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
11909 || strcmp (cs, "UTF-8") == 0)
11910 return 1;
11911 }
11912#endif
11913#ifdef __CYGWIN__
11914 /* On Cygwin, avoid locale names without encoding suffix, because the
11915 locale_charset() function relies on the encoding suffix. Note that
11916 LC_ALL is set on the command line. */
11917 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
11918#endif
11919 /* Check whether in the abbreviation of the second month, the second
11920 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
11921 one byte long. This excludes the UTF-8 encoding. */
11922 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
11923 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
11924#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
11925 /* Check whether the decimal separator is a comma.
11926 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
11927 are nl_langinfo(RADIXCHAR) are both ".". */
11928 if (localeconv () ->decimal_point[0] != ',') return 1;
11929#endif
11930 return 0;
11931}
11932
11933_ACEOF
11934 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11935 (eval $ac_link) 2>&5
11936 ac_status=$?
11937 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11938 test $ac_status = 0; } && test -s conftest$ac_exeext; then
11939 case "$host_os" in
11940 # Handle native Windows specially, because there setlocale() interprets
11941 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
11942 # "fr" or "fra" as "French" or "French_France.1252",
11943 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
11944 # "ja" as "Japanese" or "Japanese_Japan.932",
11945 # and similar.
11946 mingw*)
11947 # Test for the native Windows locale name.
11948 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11949 gt_cv_locale_fr=French_France.1252
11950 else
11951 # None found.
11952 gt_cv_locale_fr=none
11953 fi
11954 ;;
11955 *)
11956 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
11957 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
11958 # configure script would override the LC_ALL setting. Likewise for
11959 # LC_CTYPE, which is also set at the beginning of the configure script.
11960 # Test for the usual locale name.
11961 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11962 gt_cv_locale_fr=fr_FR
11963 else
11964 # Test for the locale name with explicit encoding suffix.
11965 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11966 gt_cv_locale_fr=fr_FR.ISO-8859-1
11967 else
11968 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
11969 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11970 gt_cv_locale_fr=fr_FR.ISO8859-1
11971 else
11972 # Test for the HP-UX locale name.
11973 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11974 gt_cv_locale_fr=fr_FR.iso88591
11975 else
11976 # Test for the Solaris 7 locale name.
11977 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11978 gt_cv_locale_fr=fr
11979 else
11980 # None found.
11981 gt_cv_locale_fr=none
11982 fi
11983 fi
11984 fi
11985 fi
11986 fi
11987 ;;
11988 esac
11989 fi
11990 rm -fr conftest*
11991
11992fi
6ec2e0f5
SDJ
11993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
11994$as_echo "$gt_cv_locale_fr" >&6; }
11995 LOCALE_FR=$gt_cv_locale_fr
11996
11997
11998
11999
12000
12001
12002
12003 GNULIB_FFSL=0;
12004 GNULIB_FFSLL=0;
12005 GNULIB_MEMCHR=0;
12006 GNULIB_MEMMEM=0;
12007 GNULIB_MEMPCPY=0;
12008 GNULIB_MEMRCHR=0;
12009 GNULIB_RAWMEMCHR=0;
12010 GNULIB_STPCPY=0;
12011 GNULIB_STPNCPY=0;
12012 GNULIB_STRCHRNUL=0;
12013 GNULIB_STRDUP=0;
12014 GNULIB_STRNCAT=0;
12015 GNULIB_STRNDUP=0;
12016 GNULIB_STRNLEN=0;
12017 GNULIB_STRPBRK=0;
12018 GNULIB_STRSEP=0;
12019 GNULIB_STRSTR=0;
12020 GNULIB_STRCASESTR=0;
12021 GNULIB_STRTOK_R=0;
12022 GNULIB_MBSLEN=0;
12023 GNULIB_MBSNLEN=0;
12024 GNULIB_MBSCHR=0;
12025 GNULIB_MBSRCHR=0;
12026 GNULIB_MBSSTR=0;
12027 GNULIB_MBSCASECMP=0;
12028 GNULIB_MBSNCASECMP=0;
12029 GNULIB_MBSPCASECMP=0;
12030 GNULIB_MBSCASESTR=0;
12031 GNULIB_MBSCSPN=0;
12032 GNULIB_MBSPBRK=0;
12033 GNULIB_MBSSPN=0;
12034 GNULIB_MBSSEP=0;
12035 GNULIB_MBSTOK_R=0;
12036 GNULIB_STRERROR=0;
12037 GNULIB_STRERROR_R=0;
12038 GNULIB_STRSIGNAL=0;
12039 GNULIB_STRVERSCMP=0;
12040 HAVE_MBSLEN=0;
12041 HAVE_FFSL=1;
12042 HAVE_FFSLL=1;
12043 HAVE_MEMCHR=1;
12044 HAVE_DECL_MEMMEM=1;
12045 HAVE_MEMPCPY=1;
12046 HAVE_DECL_MEMRCHR=1;
12047 HAVE_RAWMEMCHR=1;
12048 HAVE_STPCPY=1;
12049 HAVE_STPNCPY=1;
12050 HAVE_STRCHRNUL=1;
12051 HAVE_DECL_STRDUP=1;
12052 HAVE_DECL_STRNDUP=1;
12053 HAVE_DECL_STRNLEN=1;
12054 HAVE_STRPBRK=1;
12055 HAVE_STRSEP=1;
12056 HAVE_STRCASESTR=1;
12057 HAVE_DECL_STRTOK_R=1;
12058 HAVE_DECL_STRERROR_R=1;
12059 HAVE_DECL_STRSIGNAL=1;
12060 HAVE_STRVERSCMP=1;
12061 REPLACE_MEMCHR=0;
12062 REPLACE_MEMMEM=0;
12063 REPLACE_STPNCPY=0;
12064 REPLACE_STRDUP=0;
12065 REPLACE_STRSTR=0;
12066 REPLACE_STRCASESTR=0;
12067 REPLACE_STRCHRNUL=0;
12068 REPLACE_STRERROR=0;
12069 REPLACE_STRERROR_R=0;
12070 REPLACE_STRNCAT=0;
12071 REPLACE_STRNDUP=0;
12072 REPLACE_STRNLEN=0;
12073 REPLACE_STRSIGNAL=0;
12074 REPLACE_STRTOK_R=0;
12075 UNDEFINE_STRTOK_R=0;
12076
12077
12078
12079
12080
12081 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
12082 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
12083 # irrelevant for anonymous mappings.
12084 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
63a9e923 12085if test "x$ac_cv_func_mmap" = xyes; then :
6ec2e0f5
SDJ
12086 gl_have_mmap=yes
12087else
12088 gl_have_mmap=no
12089fi
12090
12091
12092 # Try to allow MAP_ANONYMOUS.
12093 gl_have_mmap_anonymous=no
12094 if test $gl_have_mmap = yes; then
12095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
12096$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
12097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12098/* end confdefs.h. */
12099
12100#include <sys/mman.h>
12101#ifdef MAP_ANONYMOUS
12102 I cannot identify this map
12103#endif
12104
12105_ACEOF
12106if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12107 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
12108 gl_have_mmap_anonymous=yes
12109fi
12110rm -f conftest*
12111
12112 if test $gl_have_mmap_anonymous != yes; then
12113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12114/* end confdefs.h. */
12115
12116#include <sys/mman.h>
12117#ifdef MAP_ANON
12118 I cannot identify this map
12119#endif
12120
12121_ACEOF
12122if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12123 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
12124
12125$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
12126
12127 gl_have_mmap_anonymous=yes
12128fi
12129rm -f conftest*
12130
12131 fi
12132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
12133$as_echo "$gl_have_mmap_anonymous" >&6; }
12134 if test $gl_have_mmap_anonymous = yes; then
12135
12136$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
12137
12138 fi
12139 fi
12140
12141
12142
12143
12144
12145
12146 if test $HAVE_MEMCHR = 1; then
12147 # Detect platform-specific bugs in some versions of glibc:
12148 # memchr should not dereference anything with length 0
12149 # http://bugzilla.redhat.com/499689
12150 # memchr should not dereference overestimated length after a match
12151 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
12152 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
12153 # Assume that memchr works on platforms that lack mprotect.
12154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
12155$as_echo_n "checking whether memchr works... " >&6; }
63a9e923 12156if ${gl_cv_func_memchr_works+:} false; then :
6ec2e0f5
SDJ
12157 $as_echo_n "(cached) " >&6
12158else
12159 if test "$cross_compiling" = yes; then :
12160 gl_cv_func_memchr_works="guessing no"
12161else
12162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12163/* end confdefs.h. */
12164
12165#include <string.h>
12166#if HAVE_SYS_MMAN_H
12167# include <fcntl.h>
12168# include <unistd.h>
12169# include <sys/types.h>
12170# include <sys/mman.h>
12171# ifndef MAP_FILE
12172# define MAP_FILE 0
12173# endif
12174#endif
12175
12176int
12177main ()
12178{
12179
12180 int result = 0;
12181 char *fence = NULL;
12182#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
12183# if HAVE_MAP_ANONYMOUS
12184 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
12185 const int fd = -1;
12186# else /* !HAVE_MAP_ANONYMOUS */
12187 const int flags = MAP_FILE | MAP_PRIVATE;
12188 int fd = open ("/dev/zero", O_RDONLY, 0666);
12189 if (fd >= 0)
12190# endif
12191 {
12192 int pagesize = getpagesize ();
12193 char *two_pages =
12194 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
12195 flags, fd, 0);
12196 if (two_pages != (char *)(-1)
12197 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
12198 fence = two_pages + pagesize;
12199 }
12200#endif
12201 if (fence)
12202 {
12203 if (memchr (fence, 0, 0))
12204 result |= 1;
12205 strcpy (fence - 9, "12345678");
12206 if (memchr (fence - 9, 0, 79) != fence - 1)
12207 result |= 2;
12208 if (memchr (fence - 1, 0, 3) != fence - 1)
12209 result |= 4;
12210 }
12211 return result;
12212
12213 ;
12214 return 0;
12215}
12216_ACEOF
12217if ac_fn_c_try_run "$LINENO"; then :
12218 gl_cv_func_memchr_works=yes
12219else
12220 gl_cv_func_memchr_works=no
12221fi
12222rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12223 conftest.$ac_objext conftest.beam conftest.$ac_ext
12224fi
12225
12226fi
12227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
12228$as_echo "$gl_cv_func_memchr_works" >&6; }
12229 if test "$gl_cv_func_memchr_works" != yes; then
12230 REPLACE_MEMCHR=1
12231 fi
12232 fi
12233
12234ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
63a9e923 12235if test "x$ac_cv_have_decl_memmem" = xyes; then :
6ec2e0f5
SDJ
12236 ac_have_decl=1
12237else
12238 ac_have_decl=0
12239fi
12240
12241cat >>confdefs.h <<_ACEOF
12242#define HAVE_DECL_MEMMEM $ac_have_decl
12243_ACEOF
12244
12245
12246
12247
12248
12249 for ac_func in memmem
12250do :
12251 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
63a9e923 12252if test "x$ac_cv_func_memmem" = xyes; then :
6ec2e0f5
SDJ
12253 cat >>confdefs.h <<_ACEOF
12254#define HAVE_MEMMEM 1
12255_ACEOF
12256
12257fi
12258done
12259
12260 if test $ac_cv_func_memmem = yes; then
12261 HAVE_MEMMEM=1
12262 else
12263 HAVE_MEMMEM=0
12264 fi
12265
12266 if test $ac_cv_have_decl_memmem = no; then
12267 HAVE_DECL_MEMMEM=0
12268 else
12269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
12270$as_echo_n "checking whether memmem works... " >&6; }
63a9e923 12271if ${gl_cv_func_memmem_works_always+:} false; then :
6ec2e0f5
SDJ
12272 $as_echo_n "(cached) " >&6
12273else
12274 if test "$cross_compiling" = yes; then :
12275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12276/* end confdefs.h. */
12277
12278#ifdef __GNU_LIBRARY__
12279 #include <features.h>
12280 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
12281 || __GLIBC_MINOR__ > 12)) \
12282 || (__GLIBC__ > 2)) \
12283 || defined __UCLIBC__
12284 Lucky user
12285 #endif
12286#elif defined __CYGWIN__
12287 #include <cygwin/version.h>
12288 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
12289 Lucky user
12290 #endif
12291#else
12292 Lucky user
12293#endif
12294
12295_ACEOF
12296if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12297 $EGREP "Lucky user" >/dev/null 2>&1; then :
12298 gl_cv_func_memmem_works_always="guessing yes"
12299else
12300 gl_cv_func_memmem_works_always="guessing no"
12301fi
12302rm -f conftest*
12303
12304
12305else
12306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12307/* end confdefs.h. */
12308
12309#include <string.h> /* for memmem */
12310#define P "_EF_BF_BD"
12311#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
12312#define NEEDLE P P P P P
12313
12314int
12315main ()
12316{
12317
12318 int result = 0;
12319 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
12320 result |= 1;
12321 /* Check for empty needle behavior. */
12322 {
12323 const char *haystack = "AAA";
12324 if (memmem (haystack, 3, NULL, 0) != haystack)
12325 result |= 2;
12326 }
12327 return result;
12328
12329 ;
12330 return 0;
12331}
12332_ACEOF
12333if ac_fn_c_try_run "$LINENO"; then :
12334 gl_cv_func_memmem_works_always=yes
12335else
12336 gl_cv_func_memmem_works_always=no
12337fi
12338rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12339 conftest.$ac_objext conftest.beam conftest.$ac_ext
12340fi
12341
12342
12343fi
12344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
12345$as_echo "$gl_cv_func_memmem_works_always" >&6; }
12346 case "$gl_cv_func_memmem_works_always" in
12347 *yes) ;;
12348 *)
12349 REPLACE_MEMMEM=1
12350 ;;
12351 esac
12352 fi
12353 :
12354
12355ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
63a9e923 12356if test "x$ac_cv_have_decl_memrchr" = xyes; then :
6ec2e0f5
SDJ
12357 ac_have_decl=1
12358else
12359 ac_have_decl=0
12360fi
12361
12362cat >>confdefs.h <<_ACEOF
12363#define HAVE_DECL_MEMRCHR $ac_have_decl
12364_ACEOF
12365
12366
12367
12368
12369
12370
2d8adcbd
MM
12371
12372
6ec2e0f5
SDJ
12373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
12374$as_echo_n "checking for promoted mode_t type... " >&6; }
63a9e923 12375if ${gl_cv_promoted_mode_t+:} false; then :
6ec2e0f5
SDJ
12376 $as_echo_n "(cached) " >&6
12377else
12378
12379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12380/* end confdefs.h. */
12381#include <sys/types.h>
12382int
12383main ()
12384{
12385typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
12386 ;
12387 return 0;
12388}
12389_ACEOF
12390if ac_fn_c_try_compile "$LINENO"; then :
12391 gl_cv_promoted_mode_t='int'
12392else
12393 gl_cv_promoted_mode_t='mode_t'
12394fi
12395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12396
12397fi
12398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
12399$as_echo "$gl_cv_promoted_mode_t" >&6; }
12400
12401cat >>confdefs.h <<_ACEOF
12402#define PROMOTED_MODE_T $gl_cv_promoted_mode_t
12403_ACEOF
12404
12405
12406
12407
12408
12409 GNULIB_DPRINTF=0;
12410 GNULIB_FCLOSE=0;
12411 GNULIB_FDOPEN=0;
12412 GNULIB_FFLUSH=0;
12413 GNULIB_FGETC=0;
12414 GNULIB_FGETS=0;
12415 GNULIB_FOPEN=0;
12416 GNULIB_FPRINTF=0;
12417 GNULIB_FPRINTF_POSIX=0;
12418 GNULIB_FPURGE=0;
12419 GNULIB_FPUTC=0;
12420 GNULIB_FPUTS=0;
12421 GNULIB_FREAD=0;
12422 GNULIB_FREOPEN=0;
12423 GNULIB_FSCANF=0;
12424 GNULIB_FSEEK=0;
12425 GNULIB_FSEEKO=0;
12426 GNULIB_FTELL=0;
12427 GNULIB_FTELLO=0;
12428 GNULIB_FWRITE=0;
12429 GNULIB_GETC=0;
12430 GNULIB_GETCHAR=0;
12431 GNULIB_GETDELIM=0;
12432 GNULIB_GETLINE=0;
12433 GNULIB_OBSTACK_PRINTF=0;
12434 GNULIB_OBSTACK_PRINTF_POSIX=0;
12435 GNULIB_PCLOSE=0;
12436 GNULIB_PERROR=0;
12437 GNULIB_POPEN=0;
12438 GNULIB_PRINTF=0;
12439 GNULIB_PRINTF_POSIX=0;
12440 GNULIB_PUTC=0;
12441 GNULIB_PUTCHAR=0;
12442 GNULIB_PUTS=0;
12443 GNULIB_REMOVE=0;
12444 GNULIB_RENAME=0;
12445 GNULIB_RENAMEAT=0;
12446 GNULIB_SCANF=0;
12447 GNULIB_SNPRINTF=0;
12448 GNULIB_SPRINTF_POSIX=0;
12449 GNULIB_STDIO_H_NONBLOCKING=0;
12450 GNULIB_STDIO_H_SIGPIPE=0;
12451 GNULIB_TMPFILE=0;
12452 GNULIB_VASPRINTF=0;
12453 GNULIB_VFSCANF=0;
12454 GNULIB_VSCANF=0;
12455 GNULIB_VDPRINTF=0;
12456 GNULIB_VFPRINTF=0;
12457 GNULIB_VFPRINTF_POSIX=0;
12458 GNULIB_VPRINTF=0;
12459 GNULIB_VPRINTF_POSIX=0;
12460 GNULIB_VSNPRINTF=0;
12461 GNULIB_VSPRINTF_POSIX=0;
12462 HAVE_DECL_FPURGE=1;
12463 HAVE_DECL_FSEEKO=1;
12464 HAVE_DECL_FTELLO=1;
12465 HAVE_DECL_GETDELIM=1;
12466 HAVE_DECL_GETLINE=1;
12467 HAVE_DECL_OBSTACK_PRINTF=1;
12468 HAVE_DECL_SNPRINTF=1;
12469 HAVE_DECL_VSNPRINTF=1;
12470 HAVE_DPRINTF=1;
12471 HAVE_FSEEKO=1;
12472 HAVE_FTELLO=1;
12473 HAVE_PCLOSE=1;
12474 HAVE_POPEN=1;
12475 HAVE_RENAMEAT=1;
12476 HAVE_VASPRINTF=1;
12477 HAVE_VDPRINTF=1;
12478 REPLACE_DPRINTF=0;
12479 REPLACE_FCLOSE=0;
12480 REPLACE_FDOPEN=0;
12481 REPLACE_FFLUSH=0;
12482 REPLACE_FOPEN=0;
12483 REPLACE_FPRINTF=0;
12484 REPLACE_FPURGE=0;
12485 REPLACE_FREOPEN=0;
12486 REPLACE_FSEEK=0;
12487 REPLACE_FSEEKO=0;
12488 REPLACE_FTELL=0;
12489 REPLACE_FTELLO=0;
12490 REPLACE_GETDELIM=0;
12491 REPLACE_GETLINE=0;
12492 REPLACE_OBSTACK_PRINTF=0;
12493 REPLACE_PERROR=0;
12494 REPLACE_POPEN=0;
12495 REPLACE_PRINTF=0;
12496 REPLACE_REMOVE=0;
12497 REPLACE_RENAME=0;
12498 REPLACE_RENAMEAT=0;
12499 REPLACE_SNPRINTF=0;
12500 REPLACE_SPRINTF=0;
12501 REPLACE_STDIO_READ_FUNCS=0;
12502 REPLACE_STDIO_WRITE_FUNCS=0;
12503 REPLACE_TMPFILE=0;
12504 REPLACE_VASPRINTF=0;
12505 REPLACE_VDPRINTF=0;
12506 REPLACE_VFPRINTF=0;
12507 REPLACE_VPRINTF=0;
12508 REPLACE_VSNPRINTF=0;
12509 REPLACE_VSPRINTF=0;
12510
12511
12512
2d8adcbd
MM
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
6ec2e0f5 12523ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
63a9e923 12524if test "x$ac_cv_have_decl_setenv" = xyes; then :
6ec2e0f5
SDJ
12525 ac_have_decl=1
12526else
12527 ac_have_decl=0
12528fi
12529
12530cat >>confdefs.h <<_ACEOF
12531#define HAVE_DECL_SETENV $ac_have_decl
12532_ACEOF
12533
12534
12535
12536
12537
12538
12539 if test $ac_cv_have_decl_setenv = no; then
12540 HAVE_DECL_SETENV=0
12541 fi
12542
12543
12544
12545
12546
12547 for ac_header in search.h
12548do :
12549 ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
63a9e923 12550if test "x$ac_cv_header_search_h" = xyes; then :
6ec2e0f5
SDJ
12551 cat >>confdefs.h <<_ACEOF
12552#define HAVE_SEARCH_H 1
12553_ACEOF
12554
12555fi
12556
12557done
12558
12559 for ac_func in tsearch
12560do :
12561 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
63a9e923 12562if test "x$ac_cv_func_tsearch" = xyes; then :
6ec2e0f5
SDJ
12563 cat >>confdefs.h <<_ACEOF
12564#define HAVE_TSEARCH 1
12565_ACEOF
12566
12567fi
12568done
12569
12570
12571
12572
12573 GNULIB_PTHREAD_SIGMASK=0;
12574 GNULIB_RAISE=0;
12575 GNULIB_SIGNAL_H_SIGPIPE=0;
12576 GNULIB_SIGPROCMASK=0;
12577 GNULIB_SIGACTION=0;
12578 HAVE_POSIX_SIGNALBLOCKING=1;
12579 HAVE_PTHREAD_SIGMASK=1;
12580 HAVE_RAISE=1;
12581 HAVE_SIGSET_T=1;
12582 HAVE_SIGINFO_T=1;
12583 HAVE_SIGACTION=1;
12584 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
12585
12586 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
12587
12588 HAVE_SIGHANDLER_T=1;
12589 REPLACE_PTHREAD_SIGMASK=0;
12590 REPLACE_RAISE=0;
12591
12592
12593 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
12594 #include <signal.h>
12595 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
12596 #include <sys/types.h>
12597
12598"
63a9e923 12599if test "x$ac_cv_type_sigset_t" = xyes; then :
6ec2e0f5
SDJ
12600
12601cat >>confdefs.h <<_ACEOF
12602#define HAVE_SIGSET_T 1
12603_ACEOF
12604
12605gl_cv_type_sigset_t=yes
12606else
12607 gl_cv_type_sigset_t=no
12608fi
12609
12610 if test $gl_cv_type_sigset_t != yes; then
12611 HAVE_SIGSET_T=0
12612 fi
12613
12614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
12615$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
63a9e923 12616if ${ac_cv_type_uid_t+:} false; then :
6ec2e0f5
SDJ
12617 $as_echo_n "(cached) " >&6
12618else
12619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12620/* end confdefs.h. */
12621#include <sys/types.h>
12622
12623_ACEOF
12624if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12625 $EGREP "uid_t" >/dev/null 2>&1; then :
12626 ac_cv_type_uid_t=yes
12627else
12628 ac_cv_type_uid_t=no
12629fi
12630rm -f conftest*
12631
12632fi
12633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
12634$as_echo "$ac_cv_type_uid_t" >&6; }
12635if test $ac_cv_type_uid_t = no; then
12636
12637$as_echo "#define uid_t int" >>confdefs.h
12638
12639
12640$as_echo "#define gid_t int" >>confdefs.h
12641
12642fi
12643
12644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
12645$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
63a9e923 12646if ${ac_cv_header_stdbool_h+:} false; then :
6ec2e0f5
SDJ
12647 $as_echo_n "(cached) " >&6
12648else
12649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12650/* end confdefs.h. */
12651
12652 #include <stdbool.h>
12653
12654 #ifdef __cplusplus
12655 typedef bool Bool;
12656 #else
12657 typedef _Bool Bool;
12658 #ifndef bool
12659 "error: bool is not defined"
12660 #endif
12661 #ifndef false
12662 "error: false is not defined"
12663 #endif
12664 #if false
12665 "error: false is not 0"
12666 #endif
12667 #ifndef true
12668 "error: true is not defined"
12669 #endif
12670 #if true != 1
12671 "error: true is not 1"
12672 #endif
12673 #endif
12674
12675 #ifndef __bool_true_false_are_defined
12676 "error: __bool_true_false_are_defined is not defined"
12677 #endif
12678
12679 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
12680
12681 char a[true == 1 ? 1 : -1];
12682 char b[false == 0 ? 1 : -1];
12683 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
12684 char d[(bool) 0.5 == true ? 1 : -1];
12685 /* See body of main program for 'e'. */
12686 char f[(Bool) 0.0 == false ? 1 : -1];
12687 char g[true];
12688 char h[sizeof (Bool)];
12689 char i[sizeof s.t];
12690 enum { j = false, k = true, l = false * true, m = true * 256 };
12691 /* The following fails for
12692 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
12693 Bool n[m];
12694 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
12695 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
12696 /* Catch a bug in an HP-UX C compiler. See
12697 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
12698 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
12699 */
12700 Bool q = true;
12701 Bool *pq = &q;
12702 bool *qq = &q;
12703
12704int
12705main ()
12706{
12707
12708 bool e = &s;
12709 *pq |= q; *pq |= ! q;
12710 *qq |= q; *qq |= ! q;
12711 /* Refer to every declared value, to avoid compiler optimizations. */
12712 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
12713 + !m + !n + !o + !p + !q + !pq + !qq);
12714
12715 ;
12716 return 0;
12717}
12718_ACEOF
12719if ac_fn_c_try_compile "$LINENO"; then :
12720 ac_cv_header_stdbool_h=yes
12721else
12722 ac_cv_header_stdbool_h=no
12723fi
12724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12725fi
12726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
12727$as_echo "$ac_cv_header_stdbool_h" >&6; }
12728 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
63a9e923 12729if test "x$ac_cv_type__Bool" = xyes; then :
6ec2e0f5
SDJ
12730
12731cat >>confdefs.h <<_ACEOF
12732#define HAVE__BOOL 1
12733_ACEOF
12734
12735
12736fi
12737
12738
12739
12740 REPLACE_NULL=0;
12741 HAVE_MAX_ALIGN_T=1;
12742 HAVE_WCHAR_T=1;
12743
12744
12745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
12746$as_echo_n "checking for wchar_t... " >&6; }
63a9e923 12747if ${gt_cv_c_wchar_t+:} false; then :
6ec2e0f5
SDJ
12748 $as_echo_n "(cached) " >&6
12749else
12750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12751/* end confdefs.h. */
12752#include <stddef.h>
12753 wchar_t foo = (wchar_t)'\0';
12754int
12755main ()
12756{
12757
12758 ;
12759 return 0;
12760}
12761_ACEOF
12762if ac_fn_c_try_compile "$LINENO"; then :
12763 gt_cv_c_wchar_t=yes
12764else
12765 gt_cv_c_wchar_t=no
12766fi
12767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12768fi
12769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
12770$as_echo "$gt_cv_c_wchar_t" >&6; }
12771 if test $gt_cv_c_wchar_t = yes; then
12772
12773$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
12774
12775 fi
12776
12777
12778
12779ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
63a9e923 12780if test "x$ac_cv_have_decl_strdup" = xyes; then :
6ec2e0f5
SDJ
12781 ac_have_decl=1
12782else
12783 ac_have_decl=0
12784fi
12785
12786cat >>confdefs.h <<_ACEOF
12787#define HAVE_DECL_STRDUP $ac_have_decl
12788_ACEOF
12789
12790
12791 REPLACE_STRERROR_0=0
12792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
12793$as_echo_n "checking whether strerror(0) succeeds... " >&6; }
63a9e923 12794if ${gl_cv_func_strerror_0_works+:} false; then :
6ec2e0f5
SDJ
12795 $as_echo_n "(cached) " >&6
12796else
12797 if test "$cross_compiling" = yes; then :
12798 case "$host_os" in
12799 # Guess yes on glibc systems.
12800 *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
12801 # If we don't know, assume the worst.
12802 *) gl_cv_func_strerror_0_works="guessing no" ;;
12803 esac
12804
12805else
12806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12807/* end confdefs.h. */
12808#include <string.h>
12809 #include <errno.h>
12810
12811int
12812main ()
12813{
12814int result = 0;
12815 char *str;
12816 errno = 0;
12817 str = strerror (0);
12818 if (!*str) result |= 1;
12819 if (errno) result |= 2;
12820 if (strstr (str, "nknown") || strstr (str, "ndefined"))
12821 result |= 4;
12822 return result;
12823 ;
12824 return 0;
12825}
12826_ACEOF
12827if ac_fn_c_try_run "$LINENO"; then :
12828 gl_cv_func_strerror_0_works=yes
12829else
12830 gl_cv_func_strerror_0_works=no
12831fi
12832rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12833 conftest.$ac_objext conftest.beam conftest.$ac_ext
12834fi
12835
12836
12837fi
12838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
12839$as_echo "$gl_cv_func_strerror_0_works" >&6; }
12840 case "$gl_cv_func_strerror_0_works" in
12841 *yes) ;;
12842 *)
12843 REPLACE_STRERROR_0=1
12844
12845$as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
12846
12847 ;;
12848 esac
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861 if test $gl_cv_have_include_next = yes; then
12862 gl_cv_next_string_h='<'string.h'>'
12863 else
12864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
12865$as_echo_n "checking absolute name of <string.h>... " >&6; }
63a9e923 12866if ${gl_cv_next_string_h+:} false; then :
6ec2e0f5
SDJ
12867 $as_echo_n "(cached) " >&6
12868else
12869
12870
12871
12872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12873/* end confdefs.h. */
12874#include <string.h>
12875_ACEOF
12876 case "$host_os" in
12877 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12878 *) gl_absname_cpp="$ac_cpp" ;;
12879 esac
12880
12881 case "$host_os" in
12882 mingw*)
12883 gl_dirsep_regex='[/\\]'
12884 ;;
12885 *)
12886 gl_dirsep_regex='\/'
12887 ;;
12888 esac
12889 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12890 gl_header_literal_regex=`echo 'string.h' \
12891 | sed -e "$gl_make_literal_regex_sed"`
12892 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12893 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12894 s|^/[^/]|//&|
12895 p
12896 q
12897 }'
12898
12899 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12900 sed -n "$gl_absolute_header_sed"`
12901
12902 gl_header=$gl_cv_absolute_string_h
12903 gl_cv_next_string_h='"'$gl_header'"'
12904
12905
12906fi
12907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
12908$as_echo "$gl_cv_next_string_h" >&6; }
12909 fi
12910 NEXT_STRING_H=$gl_cv_next_string_h
12911
12912 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12913 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12914 gl_next_as_first_directive='<'string.h'>'
12915 else
12916 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12917 gl_next_as_first_directive=$gl_cv_next_string_h
12918 fi
12919 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
12920
12921
12922
12923
12924
12925
12926 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
12927 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
12928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
12929$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
63a9e923 12930if eval \${$as_gl_Symbol+:} false; then :
6ec2e0f5
SDJ
12931 $as_echo_n "(cached) " >&6
12932else
12933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12934/* end confdefs.h. */
12935#include <string.h>
12936
12937int
12938main ()
12939{
12940#undef $gl_func
12941 (void) $gl_func;
12942 ;
12943 return 0;
12944}
12945_ACEOF
12946if ac_fn_c_try_compile "$LINENO"; then :
12947 eval "$as_gl_Symbol=yes"
12948else
12949 eval "$as_gl_Symbol=no"
12950fi
12951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12952fi
12953eval ac_res=\$$as_gl_Symbol
12954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12955$as_echo "$ac_res" >&6; }
63a9e923 12956 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
6ec2e0f5
SDJ
12957 cat >>confdefs.h <<_ACEOF
12958#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
12959_ACEOF
12960
12961 eval ac_cv_have_decl_$gl_func=yes
12962fi
12963 done
12964
12965
12966
12967
12968
12969 if test "$gl_cv_func_memchr_works" != yes; then
12970 REPLACE_STRSTR=1
12971 else
12972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
12973$as_echo_n "checking whether strstr works... " >&6; }
63a9e923 12974if ${gl_cv_func_strstr_works_always+:} false; then :
6ec2e0f5
SDJ
12975 $as_echo_n "(cached) " >&6
12976else
12977 if test "$cross_compiling" = yes; then :
12978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12979/* end confdefs.h. */
12980
12981#ifdef __GNU_LIBRARY__
12982 #include <features.h>
12983 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
12984 || defined __UCLIBC__
12985 Lucky user
12986 #endif
12987#elif defined __CYGWIN__
12988 #include <cygwin/version.h>
12989 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
12990 Lucky user
12991 #endif
12992#else
12993 Lucky user
12994#endif
12995
12996_ACEOF
12997if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12998 $EGREP "Lucky user" >/dev/null 2>&1; then :
12999 gl_cv_func_strstr_works_always="guessing yes"
13000else
13001 gl_cv_func_strstr_works_always="guessing no"
13002fi
13003rm -f conftest*
13004
13005
13006else
13007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13008/* end confdefs.h. */
13009
13010#include <string.h> /* for strstr */
13011#define P "_EF_BF_BD"
13012#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
13013#define NEEDLE P P P P P
13014
13015int
13016main ()
13017{
13018return !!strstr (HAYSTACK, NEEDLE);
13019
13020 ;
13021 return 0;
13022}
13023_ACEOF
13024if ac_fn_c_try_run "$LINENO"; then :
13025 gl_cv_func_strstr_works_always=yes
13026else
13027 gl_cv_func_strstr_works_always=no
13028fi
13029rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13030 conftest.$ac_objext conftest.beam conftest.$ac_ext
13031fi
13032
13033
13034fi
13035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
13036$as_echo "$gl_cv_func_strstr_works_always" >&6; }
13037 case "$gl_cv_func_strstr_works_always" in
13038 *yes) ;;
13039 *)
13040 REPLACE_STRSTR=1
13041 ;;
13042 esac
13043 fi
13044
13045ac_fn_c_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default"
63a9e923 13046if test "x$ac_cv_have_decl_strtok_r" = xyes; then :
6ec2e0f5
SDJ
13047 ac_have_decl=1
13048else
13049 ac_have_decl=0
13050fi
13051
13052cat >>confdefs.h <<_ACEOF
13053#define HAVE_DECL_STRTOK_R $ac_have_decl
13054_ACEOF
13055
13056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
13057$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
13058if test -z "$MKDIR_P"; then
63a9e923 13059 if ${ac_cv_path_mkdir+:} false; then :
6ec2e0f5
SDJ
13060 $as_echo_n "(cached) " >&6
13061else
13062 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13063for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
13064do
13065 IFS=$as_save_IFS
13066 test -z "$as_dir" && as_dir=.
13067 for ac_prog in mkdir gmkdir; do
13068 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 13069 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
6ec2e0f5
SDJ
13070 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
13071 'mkdir (GNU coreutils) '* | \
13072 'mkdir (coreutils) '* | \
13073 'mkdir (fileutils) '4.1*)
13074 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
13075 break 3;;
13076 esac
13077 done
13078 done
13079 done
13080IFS=$as_save_IFS
13081
13082fi
13083
63a9e923 13084 test -d ./--version && rmdir ./--version
6ec2e0f5
SDJ
13085 if test "${ac_cv_path_mkdir+set}" = set; then
13086 MKDIR_P="$ac_cv_path_mkdir -p"
13087 else
13088 # As a last resort, use the slow shell script. Don't cache a
13089 # value for MKDIR_P within a source directory, because that will
13090 # break other packages using the cache if that directory is
13091 # removed, or if the value is a relative name.
6ec2e0f5
SDJ
13092 MKDIR_P="$ac_install_sh -d"
13093 fi
13094fi
13095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
13096$as_echo "$MKDIR_P" >&6; }
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112
13113
13114
13115
13116 if test $gl_cv_have_include_next = yes; then
13117 gl_cv_next_sys_types_h='<'sys/types.h'>'
13118 else
13119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
13120$as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
63a9e923 13121if ${gl_cv_next_sys_types_h+:} false; then :
6ec2e0f5
SDJ
13122 $as_echo_n "(cached) " >&6
13123else
13124
13125
13126
13127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13128/* end confdefs.h. */
13129#include <sys/types.h>
13130_ACEOF
13131 case "$host_os" in
13132 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13133 *) gl_absname_cpp="$ac_cpp" ;;
13134 esac
13135
13136 case "$host_os" in
13137 mingw*)
13138 gl_dirsep_regex='[/\\]'
13139 ;;
13140 *)
13141 gl_dirsep_regex='\/'
13142 ;;
13143 esac
13144 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13145 gl_header_literal_regex=`echo 'sys/types.h' \
13146 | sed -e "$gl_make_literal_regex_sed"`
13147 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13148 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13149 s|^/[^/]|//&|
13150 p
13151 q
13152 }'
13153
13154 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13155 sed -n "$gl_absolute_header_sed"`
13156
13157 gl_header=$gl_cv_absolute_sys_types_h
13158 gl_cv_next_sys_types_h='"'$gl_header'"'
13159
13160
13161fi
13162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
13163$as_echo "$gl_cv_next_sys_types_h" >&6; }
13164 fi
13165 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
13166
13167 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13168 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13169 gl_next_as_first_directive='<'sys/types.h'>'
13170 else
13171 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13172 gl_next_as_first_directive=$gl_cv_next_sys_types_h
13173 fi
13174 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
13175
13176
13177
13178
13179
13180
13181
13182
13183
13184
13185
13186
13187 GNULIB_MKTIME=0;
13188 GNULIB_NANOSLEEP=0;
13189 GNULIB_STRPTIME=0;
13190 GNULIB_TIMEGM=0;
13191 GNULIB_TIME_R=0;
13192 GNULIB_TIME_RZ=0;
13193 HAVE_DECL_LOCALTIME_R=1;
13194 HAVE_NANOSLEEP=1;
13195 HAVE_STRPTIME=1;
13196 HAVE_TIMEGM=1;
13197 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
13198 REPLACE_MKTIME=GNULIB_PORTCHECK;
13199 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
13200 REPLACE_TIMEGM=GNULIB_PORTCHECK;
13201
13202 : ${GNULIB_GETTIMEOFDAY=0};
13203 REPLACE_GMTIME=0;
13204 REPLACE_LOCALTIME=0;
13205
13206
13207
13208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
13209$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
63a9e923 13210if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
6ec2e0f5
SDJ
13211 $as_echo_n "(cached) " >&6
13212else
13213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13214/* end confdefs.h. */
13215#include <time.h>
13216
13217int
13218main ()
13219{
13220static struct timespec x; x.tv_sec = x.tv_nsec;
13221 ;
13222 return 0;
13223}
13224_ACEOF
13225if ac_fn_c_try_compile "$LINENO"; then :
13226 gl_cv_sys_struct_timespec_in_time_h=yes
13227else
13228 gl_cv_sys_struct_timespec_in_time_h=no
13229fi
13230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13231fi
13232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
13233$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
13234
13235 TIME_H_DEFINES_STRUCT_TIMESPEC=0
13236 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
13237 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
13238 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
13239 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
13240 TIME_H_DEFINES_STRUCT_TIMESPEC=1
13241 else
13242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
13243$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
63a9e923 13244if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
6ec2e0f5
SDJ
13245 $as_echo_n "(cached) " >&6
13246else
13247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13248/* end confdefs.h. */
13249#include <sys/time.h>
13250
13251int
13252main ()
13253{
13254static struct timespec x; x.tv_sec = x.tv_nsec;
13255 ;
13256 return 0;
13257}
13258_ACEOF
13259if ac_fn_c_try_compile "$LINENO"; then :
13260 gl_cv_sys_struct_timespec_in_sys_time_h=yes
13261else
13262 gl_cv_sys_struct_timespec_in_sys_time_h=no
13263fi
13264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13265fi
13266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
13267$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
13268 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
13269 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
13270 else
13271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
13272$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
63a9e923 13273if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
6ec2e0f5
SDJ
13274 $as_echo_n "(cached) " >&6
13275else
13276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13277/* end confdefs.h. */
13278#include <pthread.h>
13279
13280int
13281main ()
13282{
13283static struct timespec x; x.tv_sec = x.tv_nsec;
13284 ;
13285 return 0;
13286}
13287_ACEOF
13288if ac_fn_c_try_compile "$LINENO"; then :
13289 gl_cv_sys_struct_timespec_in_pthread_h=yes
13290else
13291 gl_cv_sys_struct_timespec_in_pthread_h=no
13292fi
13293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13294fi
13295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
13296$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
13297 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
13298 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
13299 else
13300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
13301$as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
63a9e923 13302if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then :
6ec2e0f5
SDJ
13303 $as_echo_n "(cached) " >&6
13304else
13305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13306/* end confdefs.h. */
13307#include <unistd.h>
13308
13309int
13310main ()
13311{
13312static struct timespec x; x.tv_sec = x.tv_nsec;
13313 ;
13314 return 0;
13315}
13316_ACEOF
13317if ac_fn_c_try_compile "$LINENO"; then :
13318 gl_cv_sys_struct_timespec_in_unistd_h=yes
13319else
13320 gl_cv_sys_struct_timespec_in_unistd_h=no
13321fi
13322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13323fi
13324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
13325$as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
13326 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
13327 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
13328 fi
13329 fi
13330 fi
13331 fi
13332
13333
13334
13335
13336
13337
13338
13339
13340
13341
13342
13343
13344
13345
13346
13347
13348 if test $gl_cv_have_include_next = yes; then
13349 gl_cv_next_time_h='<'time.h'>'
13350 else
13351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
13352$as_echo_n "checking absolute name of <time.h>... " >&6; }
63a9e923 13353if ${gl_cv_next_time_h+:} false; then :
6ec2e0f5
SDJ
13354 $as_echo_n "(cached) " >&6
13355else
13356
13357
13358
13359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13360/* end confdefs.h. */
13361#include <time.h>
13362_ACEOF
13363 case "$host_os" in
13364 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13365 *) gl_absname_cpp="$ac_cpp" ;;
13366 esac
13367
13368 case "$host_os" in
13369 mingw*)
13370 gl_dirsep_regex='[/\\]'
13371 ;;
13372 *)
13373 gl_dirsep_regex='\/'
13374 ;;
13375 esac
13376 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13377 gl_header_literal_regex=`echo 'time.h' \
13378 | sed -e "$gl_make_literal_regex_sed"`
13379 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13380 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13381 s|^/[^/]|//&|
13382 p
13383 q
13384 }'
13385
13386 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13387 sed -n "$gl_absolute_header_sed"`
13388
13389 gl_header=$gl_cv_absolute_time_h
13390 gl_cv_next_time_h='"'$gl_header'"'
13391
13392
13393fi
13394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
13395$as_echo "$gl_cv_next_time_h" >&6; }
13396 fi
13397 NEXT_TIME_H=$gl_cv_next_time_h
13398
13399 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13400 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13401 gl_next_as_first_directive='<'time.h'>'
13402 else
13403 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13404 gl_next_as_first_directive=$gl_cv_next_time_h
13405 fi
13406 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
13407
13408
13409
13410
13411
13412
13413
13414
13415ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
63a9e923 13416if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
6ec2e0f5
SDJ
13417 ac_have_decl=1
13418else
13419 ac_have_decl=0
13420fi
13421
13422cat >>confdefs.h <<_ACEOF
13423#define HAVE_DECL_UNSETENV $ac_have_decl
13424_ACEOF
13425
13426
13427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
13428$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
63a9e923 13429if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
6ec2e0f5
SDJ
13430 $as_echo_n "(cached) " >&6
13431else
13432 gl_cv_header_wchar_h_correct_inline=yes
13433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13434/* end confdefs.h. */
13435
13436 #define wcstod renamed_wcstod
13437/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13438 <wchar.h>.
13439 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13440 included before <wchar.h>. */
13441#include <stddef.h>
13442#include <stdio.h>
13443#include <time.h>
13444#include <wchar.h>
13445extern int zero (void);
13446int main () { return zero(); }
13447
13448_ACEOF
13449 save_ac_compile="$ac_compile"
13450 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
13451 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
13452 (eval $ac_compile) 2>&5
13453 ac_status=$?
13454 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13455 test $ac_status = 0; }; then
13456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13457/* end confdefs.h. */
13458
13459 #define wcstod renamed_wcstod
13460/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13461 <wchar.h>.
13462 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13463 included before <wchar.h>. */
13464#include <stddef.h>
13465#include <stdio.h>
13466#include <time.h>
13467#include <wchar.h>
13468int zero (void) { return 0; }
13469
13470_ACEOF
13471 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
13472 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
13473 (eval $ac_compile) 2>&5
13474 ac_status=$?
13475 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13476 test $ac_status = 0; }; then
13477 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
13478 :
13479 else
13480 gl_cv_header_wchar_h_correct_inline=no
13481 fi
13482 fi
13483 fi
13484 ac_compile="$save_ac_compile"
13485 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
13486
13487fi
13488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
13489$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
13490 if test $gl_cv_header_wchar_h_correct_inline = no; then
63a9e923 13491 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
6ec2e0f5
SDJ
13492This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
13493C99 mode. You have four options:
13494 - Add the flag -fgnu89-inline to CC and reconfigure, or
13495 - Fix your include files, using parts of
13496 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
13497 - Use a gcc version older than 4.3, or
13498 - Don't use the flags -std=c99 or -std=gnu99.
13499Configuration aborted." "$LINENO" 5
13500 fi
13501
13502
13503
13504
13505
13506 if test $ac_cv_header_features_h = yes; then
13507 HAVE_FEATURES_H=1
13508 else
13509 HAVE_FEATURES_H=0
13510 fi
13511
13512
13513
13514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
13515$as_echo_n "checking for wint_t... " >&6; }
63a9e923 13516if ${gt_cv_c_wint_t+:} false; then :
6ec2e0f5
SDJ
13517 $as_echo_n "(cached) " >&6
13518else
13519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13520/* end confdefs.h. */
13521
13522/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13523 <wchar.h>.
13524 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
13525 before <wchar.h>. */
13526#include <stddef.h>
13527#include <stdio.h>
13528#include <time.h>
13529#include <wchar.h>
13530 wint_t foo = (wchar_t)'\0';
13531int
13532main ()
13533{
13534
13535 ;
13536 return 0;
13537}
13538_ACEOF
13539if ac_fn_c_try_compile "$LINENO"; then :
13540 gt_cv_c_wint_t=yes
13541else
13542 gt_cv_c_wint_t=no
13543fi
13544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13545fi
13546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
13547$as_echo "$gt_cv_c_wint_t" >&6; }
13548 if test $gt_cv_c_wint_t = yes; then
13549
13550$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
13551
13552 fi
13553
13554
13555 GNULIB_ISWBLANK=0;
13556 GNULIB_WCTYPE=0;
13557 GNULIB_ISWCTYPE=0;
13558 GNULIB_WCTRANS=0;
13559 GNULIB_TOWCTRANS=0;
13560 HAVE_ISWBLANK=1;
13561 HAVE_WCTYPE_T=1;
13562 HAVE_WCTRANS_T=1;
13563 REPLACE_ISWBLANK=0;
13564
13565
13566
13567
13568 if false; then
13569 GL_COND_LIBTOOL_TRUE=
13570 GL_COND_LIBTOOL_FALSE='#'
13571else
13572 GL_COND_LIBTOOL_TRUE='#'
13573 GL_COND_LIBTOOL_FALSE=
13574fi
13575
13576 gl_cond_libtool=false
13577 gl_libdeps=
13578 gl_ltlibdeps=
13579 gl_m4_base='import/m4'
13580
13581
13582
13583
13584
13585
13586
13587
13588
13589 gl_source_base='import'
13590
13591
13592 if test $ac_cv_func_alloca_works = no; then
13593 :
13594 fi
13595
13596 # Define an additional variable used in the Makefile substitution.
13597 if test $ac_cv_working_alloca_h = yes; then
13598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
13599$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
63a9e923 13600if ${gl_cv_rpl_alloca+:} false; then :
6ec2e0f5
SDJ
13601 $as_echo_n "(cached) " >&6
13602else
13603
13604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13605/* end confdefs.h. */
13606
13607#if defined __GNUC__ || defined _AIX || defined _MSC_VER
13608 Need own alloca
13609#endif
13610
13611_ACEOF
13612if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13613 $EGREP "Need own alloca" >/dev/null 2>&1; then :
13614 gl_cv_rpl_alloca=yes
13615else
13616 gl_cv_rpl_alloca=no
13617fi
13618rm -f conftest*
13619
13620
13621fi
13622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
13623$as_echo "$gl_cv_rpl_alloca" >&6; }
13624 if test $gl_cv_rpl_alloca = yes; then
13625
13626$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13627
13628 ALLOCA_H=alloca.h
13629 else
13630 ALLOCA_H=
13631 fi
13632 else
13633 ALLOCA_H=alloca.h
13634 fi
13635
13636 if test -n "$ALLOCA_H"; then
13637 GL_GENERATE_ALLOCA_H_TRUE=
13638 GL_GENERATE_ALLOCA_H_FALSE='#'
13639else
13640 GL_GENERATE_ALLOCA_H_TRUE='#'
13641 GL_GENERATE_ALLOCA_H_FALSE=
13642fi
13643
13644
13645
13646
13647
13648
13649
13650
13651
13652
13653 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
13654
13655
13656
13657
13658 if test $ac_cv_func_canonicalize_file_name = no; then
13659 HAVE_CANONICALIZE_FILE_NAME=0
13660 if test $ac_cv_func_realpath = no; then
13661 HAVE_REALPATH=0
13662 else
13663 case "$gl_cv_func_realpath_works" in
13664 *yes) ;;
13665 *) REPLACE_REALPATH=1 ;;
13666 esac
13667 fi
13668 else
13669 case "$gl_cv_func_realpath_works" in
13670 *yes)
13671 ;;
13672 *)
13673 REPLACE_CANONICALIZE_FILE_NAME=1
13674 REPLACE_REALPATH=1
13675 ;;
13676 esac
13677 fi
13678
13679 if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
13680
13681
13682
13683
13684
13685
13686
13687
13688 gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
13689
13690 fi
13691
13692
13693cat >>confdefs.h <<_ACEOF
13694#define GNULIB_CANONICALIZE_LGPL 1
13695_ACEOF
13696
13697
13698
13699
13700
13701
13702
13703 GNULIB_CANONICALIZE_FILE_NAME=1
13704
13705
13706
13707
13708
13709$as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
13710
13711
13712
13713
13714
13715
13716
13717
13718 GNULIB_REALPATH=1
13719
13720
13721
13722
13723
13724$as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
13725
13726
13727
13728
13729
13730
13731
13732
13733 GNULIB_CHDIR=1
13734
13735
13736
13737
13738
13739$as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
13740
13741
13742
13743
13744
13745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
13746$as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; }
63a9e923 13747if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then :
6ec2e0f5
SDJ
13748 $as_echo_n "(cached) " >&6
13749else
13750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13751/* end confdefs.h. */
13752
13753/* Arrange to define PATH_MAX, like "pathmax.h" does. */
13754#if HAVE_UNISTD_H
13755# include <unistd.h>
13756#endif
13757#include <limits.h>
13758#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
13759# include <sys/param.h>
13760#endif
13761#if !defined PATH_MAX && defined MAXPATHLEN
13762# define PATH_MAX MAXPATHLEN
13763#endif
13764#ifdef __hpux
13765# undef PATH_MAX
13766# define PATH_MAX 1024
13767#endif
13768#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
13769# undef PATH_MAX
13770# define PATH_MAX 260
13771#endif
13772
13773#ifdef PATH_MAX
13774have_arbitrary_file_name_length_limit
13775#endif
13776_ACEOF
13777if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13778 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
13779 gl_cv_have_arbitrary_file_name_length_limit=yes
13780else
13781 gl_cv_have_arbitrary_file_name_length_limit=no
13782fi
13783rm -f conftest*
13784
13785fi
13786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
13787$as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
13788
13789 if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
13790
13791
13792
13793
13794
13795
13796
13797
13798 gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
13799
13800 :
13801 fi
13802
13803
13804$as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
13805
13806
13807
13808
13809
13810 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
13811 REPLACE_CLOSE=1
13812 fi
13813
13814
13815
13816
13817
13818 if test $ac_cv_header_sys_socket_h != yes; then
13819 for ac_header in winsock2.h
13820do :
13821 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
63a9e923 13822if test "x$ac_cv_header_winsock2_h" = xyes; then :
6ec2e0f5
SDJ
13823 cat >>confdefs.h <<_ACEOF
13824#define HAVE_WINSOCK2_H 1
13825_ACEOF
13826
13827fi
13828
13829done
13830
13831 fi
13832 if test "$ac_cv_header_winsock2_h" = yes; then
13833 HAVE_WINSOCK2_H=1
13834 UNISTD_H_HAVE_WINSOCK2_H=1
13835 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
13836 else
13837 HAVE_WINSOCK2_H=0
13838 fi
13839
13840
13841 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
13842 REPLACE_CLOSE=1
13843 fi
13844
13845
13846 if test $REPLACE_CLOSE = 0; then
13847
13848
13849
13850 if test $ac_cv_func_fchdir = no; then
13851 HAVE_FCHDIR=0
13852 fi
13853
13854 if test $HAVE_FCHDIR = 0; then
13855 REPLACE_CLOSE=1
13856 fi
13857 fi
13858
13859
13860 if test $REPLACE_CLOSE = 1; then
13861
13862
13863
13864
13865
13866
13867
13868
13869 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
13870
13871 fi
13872
13873
13874
13875
13876
13877 GNULIB_CLOSE=1
13878
13879
13880
13881
13882
13883$as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
13884
13885
13886
13887
13888
13889
13890 for ac_func in closedir
13891do :
13892 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
63a9e923 13893if test "x$ac_cv_func_closedir" = xyes; then :
6ec2e0f5
SDJ
13894 cat >>confdefs.h <<_ACEOF
13895#define HAVE_CLOSEDIR 1
13896_ACEOF
13897
13898fi
13899done
13900
13901 if test $ac_cv_func_closedir = no; then
13902 HAVE_CLOSEDIR=0
13903 fi
13904
13905
13906
13907
13908 if test $ac_cv_func_fchdir = no; then
13909 HAVE_FCHDIR=0
13910 fi
13911
13912 if test $HAVE_FCHDIR = 0; then
13913 if test $HAVE_CLOSEDIR = 1; then
13914 REPLACE_CLOSEDIR=1
13915 fi
13916 fi
13917
13918 case $host_os,$HAVE_CLOSEDIR in
13919 os2*,1)
13920 REPLACE_CLOSEDIR=1;;
13921 esac
13922
13923 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
13924
13925
13926
13927
13928
13929
13930
13931
13932 gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
13933
13934 fi
13935
13936
13937
13938
13939
13940 GNULIB_CLOSEDIR=1
13941
13942
13943
13944
13945
13946$as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
13947
13948
13949
13950
13951 if test "x$datarootdir" = x; then
13952 datarootdir='${datadir}'
13953
13954 fi
13955 if test "x$docdir" = x; then
63a9e923 13956 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
6ec2e0f5
SDJ
13957
13958 fi
13959 if test "x$htmldir" = x; then
13960 htmldir='${docdir}'
13961
13962 fi
13963 if test "x$dvidir" = x; then
13964 dvidir='${docdir}'
13965
13966 fi
13967 if test "x$pdfdir" = x; then
13968 pdfdir='${docdir}'
13969
13970 fi
13971 if test "x$psdir" = x; then
13972 psdir='${docdir}'
13973
13974 fi
13975 if test "x$lispdir" = x; then
13976 lispdir='${datarootdir}/emacs/site-lisp'
13977
13978 fi
13979 if test "x$localedir" = x; then
13980 localedir='${datarootdir}/locale'
13981
13982 fi
13983 if test "x$runstatedir" = x; then
13984 runstatedir='${localstatedir}/run'
13985
13986 fi
13987
13988 pkglibexecdir='${libexecdir}/${PACKAGE}'
13989
13990
13991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
13992$as_echo_n "checking for d_ino member in directory struct... " >&6; }
63a9e923 13993if ${gl_cv_struct_dirent_d_ino+:} false; then :
6ec2e0f5
SDJ
13994 $as_echo_n "(cached) " >&6
13995else
13996 if test "$cross_compiling" = yes; then :
13997 case "$host_os" in
13998 # Guess yes on glibc systems with Linux kernel.
13999 linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
14000 # If we don't know, assume the worst.
14001 *) gl_cv_struct_dirent_d_ino="guessing no" ;;
14002 esac
14003
14004else
14005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14006/* end confdefs.h. */
14007#include <sys/types.h>
14008 #include <sys/stat.h>
14009 #include <dirent.h>
14010
14011int
14012main ()
14013{
14014DIR *dp = opendir (".");
14015 struct dirent *e;
14016 struct stat st;
14017 if (! dp)
14018 return 1;
14019 e = readdir (dp);
14020 if (! e)
14021 return 2;
14022 if (lstat (e->d_name, &st) != 0)
14023 return 3;
14024 if (e->d_ino != st.st_ino)
14025 return 4;
14026 closedir (dp);
14027 return 0;
14028
14029 ;
14030 return 0;
14031}
14032_ACEOF
14033if ac_fn_c_try_run "$LINENO"; then :
14034 gl_cv_struct_dirent_d_ino=yes
14035else
14036 gl_cv_struct_dirent_d_ino=no
14037fi
14038rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14039 conftest.$ac_objext conftest.beam conftest.$ac_ext
14040fi
14041
14042fi
14043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
14044$as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
14045 case "$gl_cv_struct_dirent_d_ino" in
14046 *yes)
14047
14048$as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
14049
14050 ;;
14051 esac
14052
14053
14054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
14055$as_echo_n "checking for d_type member in directory struct... " >&6; }
63a9e923 14056if ${gl_cv_struct_dirent_d_type+:} false; then :
6ec2e0f5
SDJ
14057 $as_echo_n "(cached) " >&6
14058else
14059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14060/* end confdefs.h. */
14061
14062#include <sys/types.h>
14063#include <dirent.h>
14064
14065int
14066main ()
14067{
14068struct dirent dp; dp.d_type = 0;
14069 ;
14070 return 0;
14071}
14072_ACEOF
14073if ac_fn_c_try_link "$LINENO"; then :
14074 gl_cv_struct_dirent_d_type=yes
14075else
14076 gl_cv_struct_dirent_d_type=no
14077fi
14078rm -f core conftest.err conftest.$ac_objext \
14079 conftest$ac_exeext conftest.$ac_ext
14080
14081
14082fi
14083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5
14084$as_echo "$gl_cv_struct_dirent_d_type" >&6; }
14085 if test $gl_cv_struct_dirent_d_type = yes; then
14086
14087$as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
14088
14089 fi
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
14102
14103
14104 if test $gl_cv_have_include_next = yes; then
14105 gl_cv_next_dirent_h='<'dirent.h'>'
14106 else
14107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
14108$as_echo_n "checking absolute name of <dirent.h>... " >&6; }
63a9e923 14109if ${gl_cv_next_dirent_h+:} false; then :
6ec2e0f5
SDJ
14110 $as_echo_n "(cached) " >&6
14111else
14112
14113 if test $ac_cv_header_dirent_h = yes; then
14114
14115
14116
14117
14118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14119/* end confdefs.h. */
14120#include <dirent.h>
14121_ACEOF
14122 case "$host_os" in
14123 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14124 *) gl_absname_cpp="$ac_cpp" ;;
14125 esac
14126
14127 case "$host_os" in
14128 mingw*)
14129 gl_dirsep_regex='[/\\]'
14130 ;;
14131 *)
14132 gl_dirsep_regex='\/'
14133 ;;
14134 esac
14135 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14136 gl_header_literal_regex=`echo 'dirent.h' \
14137 | sed -e "$gl_make_literal_regex_sed"`
14138 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14139 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14140 s|^/[^/]|//&|
14141 p
14142 q
14143 }'
14144
14145 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14146 sed -n "$gl_absolute_header_sed"`
14147
14148 gl_header=$gl_cv_absolute_dirent_h
14149 gl_cv_next_dirent_h='"'$gl_header'"'
14150 else
14151 gl_cv_next_dirent_h='<'dirent.h'>'
14152 fi
14153
14154
14155fi
14156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
14157$as_echo "$gl_cv_next_dirent_h" >&6; }
14158 fi
14159 NEXT_DIRENT_H=$gl_cv_next_dirent_h
14160
14161 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14162 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14163 gl_next_as_first_directive='<'dirent.h'>'
14164 else
14165 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14166 gl_next_as_first_directive=$gl_cv_next_dirent_h
14167 fi
14168 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
14169
14170
14171
14172
14173 if test $ac_cv_header_dirent_h = yes; then
14174 HAVE_DIRENT_H=1
14175 else
14176 HAVE_DIRENT_H=0
14177 fi
14178
14179
14180
14181 for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do
14182 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
14183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
14184$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
63a9e923 14185if eval \${$as_gl_Symbol+:} false; then :
6ec2e0f5
SDJ
14186 $as_echo_n "(cached) " >&6
14187else
14188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14189/* end confdefs.h. */
14190#include <dirent.h>
14191
14192int
14193main ()
14194{
14195#undef $gl_func
14196 (void) $gl_func;
14197 ;
14198 return 0;
14199}
14200_ACEOF
14201if ac_fn_c_try_compile "$LINENO"; then :
14202 eval "$as_gl_Symbol=yes"
14203else
14204 eval "$as_gl_Symbol=no"
14205fi
14206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14207fi
14208eval ac_res=\$$as_gl_Symbol
14209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14210$as_echo "$ac_res" >&6; }
63a9e923 14211 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
6ec2e0f5
SDJ
14212 cat >>confdefs.h <<_ACEOF
14213#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
14214_ACEOF
14215
14216 eval ac_cv_have_decl_$gl_func=yes
14217fi
14218 done
14219
14220
14221
14222
14223
14224
14225
14226 for ac_func in dirfd
14227do :
14228 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
63a9e923 14229if test "x$ac_cv_func_dirfd" = xyes; then :
6ec2e0f5
SDJ
14230 cat >>confdefs.h <<_ACEOF
14231#define HAVE_DIRFD 1
14232_ACEOF
14233
14234fi
14235done
14236
14237 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
14238 #include <dirent.h>
14239"
63a9e923 14240if test "x$ac_cv_have_decl_dirfd" = xyes; then :
6ec2e0f5
SDJ
14241 ac_have_decl=1
14242else
14243 ac_have_decl=0
14244fi
14245
14246cat >>confdefs.h <<_ACEOF
14247#define HAVE_DECL_DIRFD $ac_have_decl
14248_ACEOF
14249
14250 if test $ac_cv_have_decl_dirfd = no; then
14251 HAVE_DECL_DIRFD=0
14252 fi
14253
14254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
14255$as_echo_n "checking whether dirfd is a macro... " >&6; }
63a9e923 14256if ${gl_cv_func_dirfd_macro+:} false; then :
6ec2e0f5
SDJ
14257 $as_echo_n "(cached) " >&6
14258else
14259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14260/* end confdefs.h. */
14261
14262#include <sys/types.h>
14263#include <dirent.h>
14264#ifdef dirfd
14265 dirent_header_defines_dirfd
14266#endif
14267_ACEOF
14268if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14269 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
14270 gl_cv_func_dirfd_macro=yes
14271else
14272 gl_cv_func_dirfd_macro=no
14273fi
14274rm -f conftest*
14275
14276fi
14277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
14278$as_echo "$gl_cv_func_dirfd_macro" >&6; }
14279
14280 # Use the replacement if we have no function or macro with that name,
14281 # or if OS/2 kLIBC whose dirfd() does not work.
14282 # Replace only if the system declares dirfd already.
14283 case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
14284 no,no,*,yes | *,*,os2*,yes)
14285 REPLACE_DIRFD=1
14286
14287$as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
14288;;
14289 esac
14290
14291 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
14292 || test $REPLACE_DIRFD = 1; then
14293
14294
14295
14296
14297
14298
14299
14300
14301 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
14302
14303
14304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
14305$as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
63a9e923 14306if ${gl_cv_sys_dir_fd_member_name+:} false; then :
6ec2e0f5
SDJ
14307 $as_echo_n "(cached) " >&6
14308else
14309
14310 dirfd_save_CFLAGS=$CFLAGS
14311 for ac_expr in d_fd dd_fd; do
14312
14313 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
14314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14315/* end confdefs.h. */
14316
14317 #include <sys/types.h>
14318 #include <dirent.h>
14319int
14320main ()
14321{
14322DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
14323 ;
14324 return 0;
14325}
14326_ACEOF
14327if ac_fn_c_try_compile "$LINENO"; then :
14328 dir_fd_found=yes
14329
14330fi
14331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14332 CFLAGS=$dirfd_save_CFLAGS
14333 test "$dir_fd_found" = yes && break
14334 done
14335 test "$dir_fd_found" = yes || ac_expr=no_such_member
14336
14337 gl_cv_sys_dir_fd_member_name=$ac_expr
14338
14339
14340fi
14341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
14342$as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
14343 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
14344
14345cat >>confdefs.h <<_ACEOF
14346#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
14347_ACEOF
14348
14349 fi
14350
14351
14352 fi
14353
14354
14355
14356
14357
14358 GNULIB_DIRFD=1
14359
14360
14361
14362
14363
14364$as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
14365
14366
14367
14368
14369
14370
14371
14372
14373
14374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
14375$as_echo_n "checking whether // is distinct from /... " >&6; }
63a9e923 14376if ${gl_cv_double_slash_root+:} false; then :
6ec2e0f5
SDJ
14377 $as_echo_n "(cached) " >&6
14378else
14379 if test x"$cross_compiling" = xyes ; then
14380 # When cross-compiling, there is no way to tell whether // is special
14381 # short of a list of hosts. However, the only known hosts to date
14382 # that have a distinct // are Apollo DomainOS (too old to port to),
14383 # Cygwin, and z/OS. If anyone knows of another system for which // has
14384 # special semantics and is distinct from /, please report it to
14385 # <bug-gnulib@gnu.org>.
14386 case $host in
14387 *-cygwin | i370-ibm-openedition)
14388 gl_cv_double_slash_root=yes ;;
14389 *)
14390 # Be optimistic and assume that / and // are the same when we
14391 # don't know.
14392 gl_cv_double_slash_root='unknown, assuming no' ;;
14393 esac
14394 else
14395 set x `ls -di / // 2>/dev/null`
14396 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
14397 gl_cv_double_slash_root=no
14398 else
14399 gl_cv_double_slash_root=yes
14400 fi
14401 fi
14402fi
14403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
14404$as_echo "$gl_cv_double_slash_root" >&6; }
14405 if test "$gl_cv_double_slash_root" = yes; then
8690e634 14406
6ec2e0f5 14407$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
8690e634 14408
6ec2e0f5 14409 fi
8690e634
JK
14410
14411
14412
14413
6ec2e0f5
SDJ
14414 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
14415 REPLACE_DUP=1
14416 fi
8690e634 14417
8690e634
JK
14418
14419
14420
6ec2e0f5
SDJ
14421 if test $ac_cv_func_fchdir = no; then
14422 HAVE_FCHDIR=0
14423 fi
8690e634 14424
6ec2e0f5
SDJ
14425 if test $HAVE_FCHDIR = 0; then
14426 REPLACE_DUP=1
14427 fi
8690e634 14428
6ec2e0f5
SDJ
14429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
14430$as_echo_n "checking whether dup works... " >&6; }
63a9e923 14431if ${gl_cv_func_dup_works+:} false; then :
6ec2e0f5 14432 $as_echo_n "(cached) " >&6
8690e634 14433else
6ec2e0f5
SDJ
14434 if test "$cross_compiling" = yes; then :
14435 gl_cv_func_dup_works='guessing yes'
14436else
14437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 14438/* end confdefs.h. */
6ec2e0f5
SDJ
14439#include <unistd.h>
14440 #include <fcntl.h>
14441 #include <errno.h>
14442int
14443main ()
14444{
14445/* On OS/2 kLIBC, dup does not work on a directory fd. */
14446 int fd = open (".", O_RDONLY);
14447 return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
8690e634 14448
6ec2e0f5
SDJ
14449 ;
14450 return 0;
14451}
8690e634
JK
14452
14453_ACEOF
6ec2e0f5
SDJ
14454if ac_fn_c_try_run "$LINENO"; then :
14455 gl_cv_func_dup_works=yes
14456else
14457 gl_cv_func_dup_works=no
14458fi
14459rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14460 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 14461fi
8690e634 14462
8690e634 14463
6ec2e0f5
SDJ
14464fi
14465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
14466$as_echo "$gl_cv_func_dup_works" >&6; }
14467 case "$gl_cv_func_dup_works" in
14468 *yes) ;;
14469 *)
14470 REPLACE_DUP=1
14471 ;;
14472 esac
8690e634 14473
6ec2e0f5 14474 if test $REPLACE_DUP = 1; then
8690e634 14475
8690e634 14476
8690e634 14477
8690e634 14478
8690e634 14479
6ec2e0f5
SDJ
14480
14481
14482
14483 gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
14484
14485 :
8690e634
JK
14486 fi
14487
14488
8690e634
JK
14489
14490
14491
6ec2e0f5 14492 GNULIB_DUP=1
8690e634 14493
6ec2e0f5
SDJ
14494
14495
14496
14497
14498$as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
14499
14500
14501
14502
14503
14504
14505
14506
14507$as_echo "#define HAVE_DUP2 1" >>confdefs.h
14508
14509
14510 if test $HAVE_DUP2 = 1; then
14511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
14512$as_echo_n "checking whether dup2 works... " >&6; }
63a9e923 14513if ${gl_cv_func_dup2_works+:} false; then :
8690e634
JK
14514 $as_echo_n "(cached) " >&6
14515else
14516 if test "$cross_compiling" = yes; then :
6ec2e0f5
SDJ
14517 case "$host_os" in
14518 mingw*) # on this platform, dup2 always returns 0 for success
14519 gl_cv_func_dup2_works="guessing no" ;;
14520 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
14521 gl_cv_func_dup2_works="guessing no" ;;
14522 aix* | freebsd*)
14523 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
14524 # not EBADF.
14525 gl_cv_func_dup2_works="guessing no" ;;
14526 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
14527 gl_cv_func_dup2_works="guessing no" ;;
14528 *-android*) # implemented using dup3(), which fails if oldfd == newfd
14529 gl_cv_func_dup2_works="guessing no" ;;
14530 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
14531 gl_cv_func_dup2_works="guessing no" ;;
14532 *) gl_cv_func_dup2_works="guessing yes" ;;
14533 esac
8690e634
JK
14534else
14535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14536/* end confdefs.h. */
14537
6ec2e0f5
SDJ
14538 #include <errno.h>
14539 #include <fcntl.h>
14540 #include <limits.h>
14541 #include <sys/resource.h>
14542 #include <unistd.h>
14543 #ifndef RLIM_SAVED_CUR
14544 # define RLIM_SAVED_CUR RLIM_INFINITY
14545 #endif
14546 #ifndef RLIM_SAVED_MAX
14547 # define RLIM_SAVED_MAX RLIM_INFINITY
14548 #endif
8690e634
JK
14549
14550int
14551main ()
14552{
6ec2e0f5
SDJ
14553int result = 0;
14554 int bad_fd = INT_MAX;
14555 struct rlimit rlim;
14556 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
14557 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
14558 && rlim.rlim_cur != RLIM_INFINITY
14559 && rlim.rlim_cur != RLIM_SAVED_MAX
14560 && rlim.rlim_cur != RLIM_SAVED_CUR)
14561 bad_fd = rlim.rlim_cur;
14562 #ifdef FD_CLOEXEC
14563 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
14564 result |= 1;
14565 #endif
14566 if (dup2 (1, 1) != 1)
14567 result |= 2;
14568 #ifdef FD_CLOEXEC
14569 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
14570 result |= 4;
14571 #endif
14572 close (0);
14573 if (dup2 (0, 0) != -1)
14574 result |= 8;
14575 /* Many gnulib modules require POSIX conformance of EBADF. */
14576 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
14577 result |= 16;
14578 /* Flush out some cygwin core dumps. */
14579 if (dup2 (2, -1) != -1 || errno != EBADF)
14580 result |= 32;
14581 dup2 (2, 255);
14582 dup2 (2, 256);
14583 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
14584 {
14585 int fd = open (".", O_RDONLY);
14586 if (fd == -1)
14587 result |= 64;
14588 else if (dup2 (fd, fd + 1) == -1)
14589 result |= 128;
14590
14591 close (fd);
14592 }
14593 return result;
8690e634
JK
14594 ;
14595 return 0;
14596}
6ec2e0f5 14597
8690e634
JK
14598_ACEOF
14599if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 14600 gl_cv_func_dup2_works=yes
8690e634 14601else
6ec2e0f5 14602 gl_cv_func_dup2_works=no
8690e634
JK
14603fi
14604rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14605 conftest.$ac_objext conftest.beam conftest.$ac_ext
14606fi
14607
6ec2e0f5
SDJ
14608
14609fi
14610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
14611$as_echo "$gl_cv_func_dup2_works" >&6; }
14612 case "$gl_cv_func_dup2_works" in
14613 *yes) ;;
14614 *)
14615 REPLACE_DUP2=1
14616 for ac_func in setdtablesize
14617do :
14618 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
63a9e923 14619if test "x$ac_cv_func_setdtablesize" = xyes; then :
6ec2e0f5
SDJ
14620 cat >>confdefs.h <<_ACEOF
14621#define HAVE_SETDTABLESIZE 1
14622_ACEOF
14623
14624fi
14625done
14626
14627 ;;
14628 esac
14629 fi
14630
14631
14632
14633
14634 if test $ac_cv_func_fchdir = no; then
14635 HAVE_FCHDIR=0
8690e634
JK
14636 fi
14637
6ec2e0f5
SDJ
14638 if test $HAVE_FCHDIR = 0; then
14639 if test $HAVE_DUP2 = 1; then
14640 REPLACE_DUP2=1
14641 fi
14642 fi
8690e634 14643
8690e634 14644
6ec2e0f5 14645 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
8690e634
JK
14646
14647
14648
14649
8690e634 14650
8690e634 14651
6ec2e0f5
SDJ
14652
14653
14654 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
14655
14656
8690e634
JK
14657 fi
14658
8690e634 14659
8690e634 14660
8690e634
JK
14661
14662
6ec2e0f5
SDJ
14663 GNULIB_DUP2=1
14664
14665
14666
14667
14668
14669$as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
14670
14671
14672
14673
14674
14675
14676
14677
14678
14679 GNULIB_ENVIRON=1
14680
14681
14682
14683
14684
14685$as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
14686
14687
14688
14689
14690
14691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
14692$as_echo_n "checking for error_at_line... " >&6; }
63a9e923 14693if ${ac_cv_lib_error_at_line+:} false; then :
6ec2e0f5 14694 $as_echo_n "(cached) " >&6
8690e634
JK
14695else
14696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14697/* end confdefs.h. */
6ec2e0f5 14698#include <error.h>
8690e634
JK
14699int
14700main ()
14701{
6ec2e0f5 14702error_at_line (0, 0, "", 0, "an error occurred");
8690e634
JK
14703 ;
14704 return 0;
14705}
14706_ACEOF
6ec2e0f5
SDJ
14707if ac_fn_c_try_link "$LINENO"; then :
14708 ac_cv_lib_error_at_line=yes
8690e634 14709else
6ec2e0f5 14710 ac_cv_lib_error_at_line=no
8690e634 14711fi
6ec2e0f5
SDJ
14712rm -f core conftest.err conftest.$ac_objext \
14713 conftest$ac_exeext conftest.$ac_ext
8690e634 14714fi
6ec2e0f5
SDJ
14715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
14716$as_echo "$ac_cv_lib_error_at_line" >&6; }
14717
14718 if test $ac_cv_lib_error_at_line = no; then
14719
14720
14721
14722
14723
14724
14725
14726
14727 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
14728
8690e634
JK
14729
14730
8690e634
JK
14731 :
14732
6ec2e0f5 14733 fi
6a29c58e 14734
6a29c58e 14735
63a9e923
SM
14736 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
14737
14738
14739
14740 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
14741
14742
6a29c58e
YQ
14743
14744
3d99e817 14745
6ec2e0f5
SDJ
14746
14747
14748 if test $ac_cv_have_decl_fchdir = no; then
14749 HAVE_DECL_FCHDIR=0
14750 fi
14751
14752
14753 if test $HAVE_FCHDIR = 0; then
14754
14755
3d99e817
AK
14756
14757
14758
14759
14760
14761
6ec2e0f5 14762 gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
3d99e817 14763
6ec2e0f5 14764 :
3d99e817 14765
6ec2e0f5 14766$as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
3d99e817 14767
6ec2e0f5
SDJ
14768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
14769$as_echo_n "checking whether open can visit directories... " >&6; }
63a9e923 14770if ${gl_cv_func_open_directory_works+:} false; then :
6ec2e0f5
SDJ
14771 $as_echo_n "(cached) " >&6
14772else
14773 if test "$cross_compiling" = yes; then :
14774 case "$host_os" in
14775 # Guess yes on glibc systems.
14776 *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
14777 # If we don't know, assume the worst.
14778 *) gl_cv_func_open_directory_works="guessing no" ;;
14779 esac
3d99e817 14780
6ec2e0f5
SDJ
14781else
14782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14783/* end confdefs.h. */
14784#include <fcntl.h>
3d99e817 14785
6ec2e0f5
SDJ
14786int
14787main ()
14788{
14789return open(".", O_RDONLY) < 0;
14790 ;
14791 return 0;
14792}
3d99e817 14793_ACEOF
6ec2e0f5
SDJ
14794if ac_fn_c_try_run "$LINENO"; then :
14795 gl_cv_func_open_directory_works=yes
14796else
14797 gl_cv_func_open_directory_works=no
14798fi
14799rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14800 conftest.$ac_objext conftest.beam conftest.$ac_ext
14801fi
3d99e817
AK
14802
14803fi
6ec2e0f5
SDJ
14804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
14805$as_echo "$gl_cv_func_open_directory_works" >&6; }
14806 case "$gl_cv_func_open_directory_works" in
14807 *yes) ;;
14808 *)
3d99e817 14809
6ec2e0f5 14810$as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
3d99e817 14811
6ec2e0f5
SDJ
14812 ;;
14813 esac
14814 fi
3d99e817 14815
3d99e817
AK
14816
14817
14818
0750520d 14819
0750520d 14820
6ec2e0f5 14821 GNULIB_FCHDIR=1
0750520d 14822
0750520d
PA
14823
14824
0750520d 14825
0750520d 14826
6ec2e0f5 14827$as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
0750520d 14828
0750520d 14829
0750520d 14830
0750520d 14831
0750520d 14832
0750520d 14833
0750520d 14834
6ec2e0f5
SDJ
14835
14836 if test $ac_cv_func_fcntl = no; then
14837
14838
14839
14840 if test $ac_cv_func_fcntl = no; then
14841 HAVE_FCNTL=0
14842 else
14843 REPLACE_FCNTL=1
14844 fi
14845
14846 else
14847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
14848$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
63a9e923 14849if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
0750520d 14850 $as_echo_n "(cached) " >&6
6ec2e0f5
SDJ
14851else
14852 if test "$cross_compiling" = yes; then :
14853 case $host_os in
14854 aix* | cygwin* | haiku*)
14855 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
14856 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
14857 esac
0750520d
PA
14858else
14859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14860/* end confdefs.h. */
6ec2e0f5
SDJ
14861#include <errno.h>
14862 #include <fcntl.h>
14863 #include <limits.h>
14864 #include <sys/resource.h>
14865 #include <unistd.h>
14866 #ifndef RLIM_SAVED_CUR
14867 # define RLIM_SAVED_CUR RLIM_INFINITY
14868 #endif
14869 #ifndef RLIM_SAVED_MAX
14870 # define RLIM_SAVED_MAX RLIM_INFINITY
14871 #endif
0750520d 14872
6ec2e0f5
SDJ
14873int
14874main ()
14875{
14876int result = 0;
14877 int bad_fd = INT_MAX;
14878 struct rlimit rlim;
14879 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
14880 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
14881 && rlim.rlim_cur != RLIM_INFINITY
14882 && rlim.rlim_cur != RLIM_SAVED_MAX
14883 && rlim.rlim_cur != RLIM_SAVED_CUR)
14884 bad_fd = rlim.rlim_cur;
14885 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
14886 if (errno != EINVAL) result |= 2;
14887 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
14888 if (errno != EINVAL) result |= 8;
14889 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
14890 {
14891 int fd;
14892 fd = open (".", O_RDONLY);
14893 if (fd == -1)
14894 result |= 16;
14895 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
14896 result |= 32;
14897
14898 close (fd);
14899 }
14900 return result;
14901 ;
14902 return 0;
14903}
0750520d 14904_ACEOF
6ec2e0f5
SDJ
14905if ac_fn_c_try_run "$LINENO"; then :
14906 gl_cv_func_fcntl_f_dupfd_works=yes
0750520d 14907else
6ec2e0f5
SDJ
14908 gl_cv_func_fcntl_f_dupfd_works=no
14909fi
14910rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14911 conftest.$ac_objext conftest.beam conftest.$ac_ext
0750520d 14912fi
0750520d
PA
14913
14914fi
6ec2e0f5
SDJ
14915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
14916$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
14917 case $gl_cv_func_fcntl_f_dupfd_works in
14918 *yes) ;;
14919 *)
0750520d 14920
0750520d 14921
6ec2e0f5
SDJ
14922 if test $ac_cv_func_fcntl = no; then
14923 HAVE_FCNTL=0
14924 else
14925 REPLACE_FCNTL=1
14926 fi
0750520d 14927
0750520d 14928
6ec2e0f5
SDJ
14929$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
14930 ;;
14931 esac
0750520d 14932
6ec2e0f5
SDJ
14933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
14934$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
63a9e923 14935if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
8690e634
JK
14936 $as_echo_n "(cached) " >&6
14937else
14938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14939/* end confdefs.h. */
14940
6ec2e0f5
SDJ
14941#include <fcntl.h>
14942#ifndef F_DUPFD_CLOEXEC
14943choke me
14944#endif
49e4877c 14945
6ec2e0f5
SDJ
14946int
14947main ()
14948{
8690e634 14949
6ec2e0f5
SDJ
14950 ;
14951 return 0;
14952}
14953_ACEOF
14954if ac_fn_c_try_compile "$LINENO"; then :
14955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14956/* end confdefs.h. */
8690e634 14957
6ec2e0f5
SDJ
14958#ifdef __linux__
14959/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
14960 it to support the semantics on older kernels that failed with EINVAL. */
14961choke me
14962#endif
8690e634
JK
14963
14964int
14965main ()
14966{
14967
8690e634
JK
14968 ;
14969 return 0;
14970}
14971_ACEOF
14972if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 14973 gl_cv_func_fcntl_f_dupfd_cloexec=yes
8690e634 14974else
6ec2e0f5 14975 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
8690e634
JK
14976fi
14977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
14978else
14979 gl_cv_func_fcntl_f_dupfd_cloexec=no
8690e634 14980fi
6ec2e0f5
SDJ
14981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14982fi
14983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
14984$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
14985 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
14986
14987
14988
14989 if test $ac_cv_func_fcntl = no; then
14990 HAVE_FCNTL=0
14991 else
14992 REPLACE_FCNTL=1
14993 fi
14994
14995 fi
14996 fi
14997
14998
14999
15000
15001 if test $ac_cv_func_fchdir = no; then
15002 HAVE_FCHDIR=0
15003 fi
15004
15005 if test $HAVE_FCHDIR = 0; then
15006
15007
15008
15009 if test $ac_cv_func_fcntl = no; then
15010 HAVE_FCNTL=0
15011 else
15012 REPLACE_FCNTL=1
15013 fi
15014
15015 fi
15016
15017
15018 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
15019
15020
15021
15022
15023
15024
15025
15026
15027 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
15028
15029 fi
8690e634 15030
8690e634
JK
15031
15032
8690e634
JK
15033
15034
6ec2e0f5 15035 GNULIB_FCNTL=1
8690e634 15036
8690e634
JK
15037
15038
8690e634 15039
8690e634 15040
6ec2e0f5
SDJ
15041$as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
15042
8690e634 15043
8690e634 15044
63ce7108
TT
15045
15046
15047
15048
8690e634
JK
15049
15050
15051
15052
15053
15054
15055
15056 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 15057 gl_cv_next_fcntl_h='<'fcntl.h'>'
8690e634 15058 else
6ec2e0f5
SDJ
15059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
15060$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
63a9e923 15061if ${gl_cv_next_fcntl_h+:} false; then :
8690e634
JK
15062 $as_echo_n "(cached) " >&6
15063else
15064
4a626d0a
PA
15065
15066
15067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 15068/* end confdefs.h. */
6ec2e0f5 15069#include <fcntl.h>
8690e634 15070_ACEOF
4a626d0a
PA
15071 case "$host_os" in
15072 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15073 *) gl_absname_cpp="$ac_cpp" ;;
15074 esac
15075
15076 case "$host_os" in
15077 mingw*)
15078 gl_dirsep_regex='[/\\]'
15079 ;;
15080 *)
15081 gl_dirsep_regex='\/'
15082 ;;
15083 esac
15084 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 15085 gl_header_literal_regex=`echo 'fcntl.h' \
4a626d0a
PA
15086 | sed -e "$gl_make_literal_regex_sed"`
15087 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15088 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15089 s|^/[^/]|//&|
15090 p
15091 q
15092 }'
8690e634 15093
6ec2e0f5 15094 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a 15095 sed -n "$gl_absolute_header_sed"`
c971b7fa 15096
6ec2e0f5
SDJ
15097 gl_header=$gl_cv_absolute_fcntl_h
15098 gl_cv_next_fcntl_h='"'$gl_header'"'
8690e634
JK
15099
15100
15101fi
6ec2e0f5
SDJ
15102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
15103$as_echo "$gl_cv_next_fcntl_h" >&6; }
8690e634 15104 fi
6ec2e0f5 15105 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
8690e634
JK
15106
15107 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15108 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 15109 gl_next_as_first_directive='<'fcntl.h'>'
8690e634
JK
15110 else
15111 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 15112 gl_next_as_first_directive=$gl_cv_next_fcntl_h
8690e634 15113 fi
6ec2e0f5 15114 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
8690e634
JK
15115
15116
15117
15118
15119
15120
6ec2e0f5
SDJ
15121
15122
15123
15124
15125 for gl_func in fcntl openat; do
8690e634
JK
15126 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
15127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
15128$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
63a9e923 15129if eval \${$as_gl_Symbol+:} false; then :
8690e634
JK
15130 $as_echo_n "(cached) " >&6
15131else
15132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15133/* end confdefs.h. */
6ec2e0f5 15134#include <fcntl.h>
8690e634
JK
15135
15136int
15137main ()
15138{
15139#undef $gl_func
15140 (void) $gl_func;
15141 ;
15142 return 0;
15143}
15144_ACEOF
15145if ac_fn_c_try_compile "$LINENO"; then :
15146 eval "$as_gl_Symbol=yes"
15147else
15148 eval "$as_gl_Symbol=no"
15149fi
15150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15151fi
15152eval ac_res=\$$as_gl_Symbol
15153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15154$as_echo "$ac_res" >&6; }
63a9e923 15155 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
8690e634
JK
15156 cat >>confdefs.h <<_ACEOF
15157#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
15158_ACEOF
15159
15160 eval ac_cv_have_decl_$gl_func=yes
15161fi
15162 done
15163
15164
15165
8839a007 15166
63ce7108 15167
63ce7108 15168
63ce7108 15169
6ec2e0f5
SDJ
15170 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
15171#include <dirent.h>
15172
15173"
63a9e923 15174if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
6ec2e0f5
SDJ
15175 ac_have_decl=1
15176else
15177 ac_have_decl=0
15178fi
15179
15180cat >>confdefs.h <<_ACEOF
15181#define HAVE_DECL_FDOPENDIR $ac_have_decl
63ce7108 15182_ACEOF
6ec2e0f5
SDJ
15183if test $ac_have_decl = 1; then :
15184
63ce7108 15185else
6ec2e0f5 15186 HAVE_DECL_FDOPENDIR=0
63ce7108 15187fi
63ce7108
TT
15188
15189
6ec2e0f5
SDJ
15190 if test $ac_cv_func_fdopendir = no; then
15191 HAVE_FDOPENDIR=0
15192 else
15193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
15194$as_echo_n "checking whether fdopendir works... " >&6; }
63a9e923 15195if ${gl_cv_func_fdopendir_works+:} false; then :
6ec2e0f5
SDJ
15196 $as_echo_n "(cached) " >&6
15197else
15198 if test "$cross_compiling" = yes; then :
15199 case "$host_os" in
15200 # Guess yes on glibc systems.
15201 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
15202 # If we don't know, assume the worst.
15203 *) gl_cv_func_fdopendir_works="guessing no" ;;
15204 esac
15205
63ce7108
TT
15206else
15207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15208/* end confdefs.h. */
15209
6ec2e0f5
SDJ
15210#include <dirent.h>
15211#include <fcntl.h>
15212#include <unistd.h>
15213#if !HAVE_DECL_FDOPENDIR
15214extern
15215# ifdef __cplusplus
15216"C"
15217# endif
15218DIR *fdopendir (int);
15219#endif
63ce7108
TT
15220
15221int
15222main ()
15223{
6ec2e0f5
SDJ
15224int result = 0;
15225 int fd = open ("conftest.c", O_RDONLY);
15226 if (fd < 0) result |= 1;
15227 if (fdopendir (fd)) result |= 2;
15228 if (close (fd)) result |= 4;
15229 return result;
63ce7108
TT
15230 ;
15231 return 0;
15232}
15233_ACEOF
15234if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 15235 gl_cv_func_fdopendir_works=yes
63ce7108 15236else
6ec2e0f5 15237 gl_cv_func_fdopendir_works=no
63ce7108
TT
15238fi
15239rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15240 conftest.$ac_objext conftest.beam conftest.$ac_ext
15241fi
15242
63ce7108 15243fi
6ec2e0f5
SDJ
15244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
15245$as_echo "$gl_cv_func_fdopendir_works" >&6; }
15246 case "$gl_cv_func_fdopendir_works" in
63ce7108
TT
15247 *yes) ;;
15248 *)
6ec2e0f5 15249 REPLACE_FDOPENDIR=1
63ce7108
TT
15250 ;;
15251 esac
15252 fi
15253
6ec2e0f5 15254 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
09607c9e
TT
15255
15256
15257
4a626d0a
PA
15258
15259
15260
15261
15262
6ec2e0f5 15263 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
4a626d0a 15264
6ec2e0f5 15265 fi
4a626d0a
PA
15266
15267
15268
4a626d0a 15269
4a626d0a 15270
6ec2e0f5 15271 GNULIB_FDOPENDIR=1
4a626d0a
PA
15272
15273
15274
15275
15276
6ec2e0f5 15277$as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
4a626d0a
PA
15278
15279
15280
15281
15282
6ec2e0f5
SDJ
15283cat >>confdefs.h <<_ACEOF
15284#define GNULIB_FDOPENDIR 1
15285_ACEOF
4a626d0a 15286
09607c9e 15287
09607c9e
TT
15288
15289
15290
6ec2e0f5
SDJ
15291
15292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
15293$as_echo_n "checking for flexible array member... " >&6; }
63a9e923 15294if ${ac_cv_c_flexmember+:} false; then :
09607c9e
TT
15295 $as_echo_n "(cached) " >&6
15296else
15297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15298/* end confdefs.h. */
6ec2e0f5
SDJ
15299#include <stdlib.h>
15300 #include <stdio.h>
15301 #include <stddef.h>
15302 struct s { int n; double d[]; };
09607c9e
TT
15303int
15304main ()
15305{
6ec2e0f5
SDJ
15306int m = getchar ();
15307 size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
15308 nbytes += sizeof (struct s) - 1;
15309 nbytes -= nbytes % sizeof (struct s);
15310 struct s *p = malloc (nbytes);
15311 p->d[0] = 0.0;
15312 return p->d != (double *) NULL;
09607c9e
TT
15313 ;
15314 return 0;
15315}
15316_ACEOF
15317if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 15318 ac_cv_c_flexmember=yes
09607c9e 15319else
6ec2e0f5 15320 ac_cv_c_flexmember=no
09607c9e
TT
15321fi
15322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15323fi
6ec2e0f5
SDJ
15324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
15325$as_echo "$ac_cv_c_flexmember" >&6; }
15326 if test $ac_cv_c_flexmember = yes; then
15327
15328$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
09607c9e 15329
09607c9e 15330 else
6ec2e0f5 15331 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
09607c9e 15332
6ec2e0f5
SDJ
15333 fi
15334
15335
15336
15337
15338 FLOAT_H=
15339 REPLACE_FLOAT_LDBL=0
15340 case "$host_os" in
15341 aix* | beos* | openbsd* | mirbsd* | irix*)
15342 FLOAT_H=float.h
15343 ;;
15344 freebsd*)
15345 case "$host_cpu" in
15346 i[34567]86 )
15347 FLOAT_H=float.h
15348 ;;
15349 x86_64 )
15350 # On x86_64 systems, the C compiler may still be generating
15351 # 32-bit code.
15352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15353/* end confdefs.h. */
15354#if defined __LP64__ || defined __x86_64__ || defined __amd64__
15355 yes
15356 #endif
09607c9e 15357_ACEOF
6ec2e0f5
SDJ
15358if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15359 $EGREP "yes" >/dev/null 2>&1; then :
15360
09607c9e 15361else
6ec2e0f5 15362 FLOAT_H=float.h
09607c9e 15363fi
6ec2e0f5
SDJ
15364rm -f conftest*
15365
15366 ;;
15367 esac
15368 ;;
15369 linux*)
15370 case "$host_cpu" in
15371 powerpc*)
15372 FLOAT_H=float.h
15373 ;;
15374 esac
15375 ;;
15376 esac
15377 case "$host_os" in
15378 aix* | freebsd* | linux*)
15379 if test -n "$FLOAT_H"; then
15380 REPLACE_FLOAT_LDBL=1
15381 fi
15382 ;;
15383 esac
15384
15385 REPLACE_ITOLD=0
15386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
15387$as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
63a9e923 15388if ${gl_cv_func_itold_works+:} false; then :
09607c9e
TT
15389 $as_echo_n "(cached) " >&6
15390else
09607c9e 15391
6ec2e0f5
SDJ
15392 if test "$cross_compiling" = yes; then :
15393 case "$host" in
15394 sparc*-*-linux*)
15395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15396/* end confdefs.h. */
15397#if defined __LP64__ || defined __arch64__
15398 yes
15399 #endif
09607c9e 15400_ACEOF
6ec2e0f5
SDJ
15401if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15402 $EGREP "yes" >/dev/null 2>&1; then :
15403 gl_cv_func_itold_works="guessing no"
09607c9e 15404else
6ec2e0f5 15405 gl_cv_func_itold_works="guessing yes"
09607c9e 15406fi
6ec2e0f5
SDJ
15407rm -f conftest*
15408
15409 ;;
15410 *) gl_cv_func_itold_works="guessing yes" ;;
15411 esac
15412
4a626d0a
PA
15413else
15414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15415/* end confdefs.h. */
4a626d0a 15416
6ec2e0f5
SDJ
15417int i = -1;
15418volatile long double ld;
15419int main ()
4a626d0a 15420{
6ec2e0f5
SDJ
15421 ld += i * 1.0L;
15422 if (ld > 0)
15423 return 1;
4a626d0a
PA
15424 return 0;
15425}
15426_ACEOF
6ec2e0f5
SDJ
15427if ac_fn_c_try_run "$LINENO"; then :
15428 gl_cv_func_itold_works=yes
4a626d0a 15429else
6ec2e0f5
SDJ
15430 gl_cv_func_itold_works=no
15431fi
15432rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15433 conftest.$ac_objext conftest.beam conftest.$ac_ext
15434fi
09607c9e
TT
15435
15436
6ec2e0f5
SDJ
15437fi
15438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
15439$as_echo "$gl_cv_func_itold_works" >&6; }
15440 case "$gl_cv_func_itold_works" in
15441 *no)
15442 REPLACE_ITOLD=1
15443 FLOAT_H=float.h
15444 ;;
15445 esac
09607c9e 15446
6ec2e0f5 15447 if test -n "$FLOAT_H"; then
09607c9e
TT
15448
15449
15450
15451
15452
15453
15454
4a626d0a 15455
09607c9e 15456 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 15457 gl_cv_next_float_h='<'float.h'>'
09607c9e 15458 else
6ec2e0f5
SDJ
15459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
15460$as_echo_n "checking absolute name of <float.h>... " >&6; }
63a9e923 15461if ${gl_cv_next_float_h+:} false; then :
09607c9e
TT
15462 $as_echo_n "(cached) " >&6
15463else
15464
4a626d0a
PA
15465
15466
15467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
09607c9e 15468/* end confdefs.h. */
6ec2e0f5 15469#include <float.h>
09607c9e 15470_ACEOF
4a626d0a
PA
15471 case "$host_os" in
15472 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15473 *) gl_absname_cpp="$ac_cpp" ;;
15474 esac
15475
15476 case "$host_os" in
15477 mingw*)
15478 gl_dirsep_regex='[/\\]'
15479 ;;
15480 *)
15481 gl_dirsep_regex='\/'
15482 ;;
15483 esac
15484 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 15485 gl_header_literal_regex=`echo 'float.h' \
4a626d0a
PA
15486 | sed -e "$gl_make_literal_regex_sed"`
15487 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15488 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15489 s|^/[^/]|//&|
15490 p
15491 q
15492 }'
09607c9e 15493
6ec2e0f5 15494 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a 15495 sed -n "$gl_absolute_header_sed"`
09607c9e 15496
6ec2e0f5
SDJ
15497 gl_header=$gl_cv_absolute_float_h
15498 gl_cv_next_float_h='"'$gl_header'"'
09607c9e
TT
15499
15500
15501fi
6ec2e0f5
SDJ
15502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
15503$as_echo "$gl_cv_next_float_h" >&6; }
09607c9e 15504 fi
6ec2e0f5 15505 NEXT_FLOAT_H=$gl_cv_next_float_h
09607c9e
TT
15506
15507 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15508 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 15509 gl_next_as_first_directive='<'float.h'>'
09607c9e
TT
15510 else
15511 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 15512 gl_next_as_first_directive=$gl_cv_next_float_h
09607c9e 15513 fi
6ec2e0f5 15514 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
09607c9e
TT
15515
15516
15517
15518
6ec2e0f5 15519 fi
09607c9e 15520
6ec2e0f5
SDJ
15521 if test -n "$FLOAT_H"; then
15522 GL_GENERATE_FLOAT_H_TRUE=
15523 GL_GENERATE_FLOAT_H_FALSE='#'
3d99e817 15524else
6ec2e0f5
SDJ
15525 GL_GENERATE_FLOAT_H_TRUE='#'
15526 GL_GENERATE_FLOAT_H_FALSE=
3d99e817
AK
15527fi
15528
3d99e817 15529
09607c9e 15530
6ec2e0f5 15531 if test $REPLACE_FLOAT_LDBL = 1; then
8690e634 15532
8690e634 15533
8690e634 15534
8690e634 15535
8690e634 15536
6ec2e0f5
SDJ
15537
15538
15539
15540 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
15541
8690e634 15542 fi
6ec2e0f5 15543 if test $REPLACE_ITOLD = 1; then
8690e634
JK
15544
15545
15546
15547
15548
6ec2e0f5
SDJ
15549
15550
15551
15552 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
15553
8690e634
JK
15554 fi
15555
15556
15557
6ec2e0f5
SDJ
15558
15559
15560 FNMATCH_H=
15561 gl_fnmatch_required_lowercase=`
15562 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
15563 `
15564 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
15565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
15566$as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
63a9e923 15567if eval \${$gl_fnmatch_cache_var+:} false; then :
8690e634 15568 $as_echo_n "(cached) " >&6
6ec2e0f5
SDJ
15569else
15570 if test $gl_fnmatch_required = GNU; then
15571 gl_fnmatch_gnu_start=
15572 gl_fnmatch_gnu_end=
15573 else
15574 gl_fnmatch_gnu_start='#if 0'
15575 gl_fnmatch_gnu_end='#endif'
15576 fi
15577 if test "$cross_compiling" = yes; then :
15578 eval "$gl_fnmatch_cache_var=\"guessing no\""
8690e634
JK
15579else
15580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15581/* end confdefs.h. */
6ec2e0f5
SDJ
15582#include <fnmatch.h>
15583 static int
15584 y (char const *pattern, char const *string, int flags)
15585 {
15586 return fnmatch (pattern, string, flags) == 0;
15587 }
15588 static int
15589 n (char const *pattern, char const *string, int flags)
15590 {
15591 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
15592 }
8690e634 15593
8690e634
JK
15594int
15595main ()
15596{
6ec2e0f5
SDJ
15597char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
15598 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
15599 static char const A_1[] = { 'A' - 1, 0 };
15600 static char const A01[] = { 'A' + 1, 0 };
15601 static char const a_1[] = { 'a' - 1, 0 };
15602 static char const a01[] = { 'a' + 1, 0 };
15603 static char const bs_1[] = { '\\\\' - 1, 0 };
15604 static char const bs01[] = { '\\\\' + 1, 0 };
15605 int result = 0;
15606 if (!n ("a*", "", 0))
15607 return 1;
15608 if (!y ("a*", "abc", 0))
15609 return 1;
15610 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
15611 return 1;
15612 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
15613 return 2;
15614 if (!y ("a\\\\bc", "abc", 0))
15615 return 3;
15616 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
15617 return 3;
15618 if (!y ("*x", ".x", 0))
15619 return 4;
15620 if (!n ("*x", ".x", FNM_PERIOD))
15621 return 4;
15622 if (!y (Apat, "\\\\", 0))
15623 return 5;
15624 if (!y (Apat, "A", 0))
15625 return 5;
15626 if (!y (apat, "\\\\", 0))
15627 return 5;
15628 if (!y (apat, "a", 0))
15629 return 5;
15630 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
15631 return 5;
15632 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
15633 return 5;
15634 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
15635 return 5;
15636 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
15637 return 5;
15638 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
15639 return 5;
15640 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
15641 return 5;
15642 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
15643 return 5;
15644 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
15645 return 5;
15646 $gl_fnmatch_gnu_start
15647 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
15648 result |= 8;
15649 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
15650 result |= 16;
15651 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
15652 result |= 32;
15653 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
15654 result |= 64;
15655 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
15656 result |= 64;
15657 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
15658 result |= 64;
15659 $gl_fnmatch_gnu_end
15660 return result;
8690e634
JK
15661
15662 ;
15663 return 0;
15664}
15665_ACEOF
6ec2e0f5
SDJ
15666if ac_fn_c_try_run "$LINENO"; then :
15667 eval "$gl_fnmatch_cache_var=yes"
8690e634 15668else
6ec2e0f5 15669 eval "$gl_fnmatch_cache_var=no"
8690e634 15670fi
6ec2e0f5
SDJ
15671rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15672 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 15673fi
8690e634 15674
8690e634 15675
6ec2e0f5
SDJ
15676fi
15677eval ac_res=\$$gl_fnmatch_cache_var
15678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15679$as_echo "$ac_res" >&6; }
15680 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
15681 if test "$gl_fnmatch_result" = yes; then
15682 rm -f "$gl_source_base/fnmatch.h"
15683 else
15684 FNMATCH_H=fnmatch.h
8690e634
JK
15685 fi
15686
6ec2e0f5
SDJ
15687 if test -n "$FNMATCH_H"; then
15688 GL_GENERATE_FNMATCH_H_TRUE=
15689 GL_GENERATE_FNMATCH_H_FALSE='#'
15690else
15691 GL_GENERATE_FNMATCH_H_TRUE='#'
15692 GL_GENERATE_FNMATCH_H_FALSE=
15693fi
8690e634 15694
8690e634 15695
6ec2e0f5 15696 if test -n "$FNMATCH_H"; then
8690e634
JK
15697
15698
15699
6ec2e0f5
SDJ
15700
15701
15702
15703
15704
15705 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
15706
15707
15708
15709cat >>confdefs.h <<_ACEOF
15710#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
15711_ACEOF
15712
15713
15714 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
15715"
63a9e923 15716if test "x$ac_cv_have_decl_isblank" = xyes; then :
6ec2e0f5 15717 ac_have_decl=1
8690e634 15718else
6ec2e0f5 15719 ac_have_decl=0
8690e634
JK
15720fi
15721
6ec2e0f5
SDJ
15722cat >>confdefs.h <<_ACEOF
15723#define HAVE_DECL_ISBLANK $ac_have_decl
15724_ACEOF
8690e634
JK
15725
15726
15727
15728
6ec2e0f5 15729 fi
8690e634
JK
15730
15731
15732
15733
15734
6ec2e0f5 15735 if test -n "$FNMATCH_H"; then
8690e634
JK
15736
15737
8690e634 15738
8690e634 15739
8690e634 15740
8690e634 15741
8690e634
JK
15742
15743
6ec2e0f5 15744 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
8690e634 15745
8690e634 15746
8690e634 15747
6ec2e0f5
SDJ
15748cat >>confdefs.h <<_ACEOF
15749#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
15750_ACEOF
15751
15752
15753 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
15754"
63a9e923 15755if test "x$ac_cv_have_decl_isblank" = xyes; then :
6ec2e0f5 15756 ac_have_decl=1
8690e634 15757else
6ec2e0f5 15758 ac_have_decl=0
8690e634
JK
15759fi
15760
6ec2e0f5
SDJ
15761cat >>confdefs.h <<_ACEOF
15762#define HAVE_DECL_ISBLANK $ac_have_decl
15763_ACEOF
8690e634
JK
15764
15765
98399780
YQ
15766
15767
98399780
YQ
15768 fi
15769
98399780
YQ
15770
15771
6ec2e0f5
SDJ
15772 FREXP_LIBM=
15773 if test $gl_cv_func_frexp_no_libm = no; then
15774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5
15775$as_echo_n "checking whether frexp() can be used with libm... " >&6; }
63a9e923 15776if ${gl_cv_func_frexp_in_libm+:} false; then :
6ec2e0f5
SDJ
15777 $as_echo_n "(cached) " >&6
15778else
98399780 15779
6ec2e0f5
SDJ
15780 save_LIBS="$LIBS"
15781 LIBS="$LIBS -lm"
15782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15783/* end confdefs.h. */
15784#include <math.h>
15785 double x;
15786int
15787main ()
15788{
15789int e; return frexp (x, &e) > 0;
15790 ;
15791 return 0;
15792}
15793_ACEOF
15794if ac_fn_c_try_link "$LINENO"; then :
15795 gl_cv_func_frexp_in_libm=yes
15796else
15797 gl_cv_func_frexp_in_libm=no
15798fi
15799rm -f core conftest.err conftest.$ac_objext \
15800 conftest$ac_exeext conftest.$ac_ext
15801 LIBS="$save_LIBS"
98399780 15802
6ec2e0f5
SDJ
15803fi
15804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5
15805$as_echo "$gl_cv_func_frexp_in_libm" >&6; }
15806 if test $gl_cv_func_frexp_in_libm = yes; then
15807 FREXP_LIBM=-lm
15808 fi
15809 fi
15810 if test $gl_cv_func_frexp_no_libm = yes \
15811 || test $gl_cv_func_frexp_in_libm = yes; then
15812 save_LIBS="$LIBS"
15813 LIBS="$LIBS $FREXP_LIBM"
98399780
YQ
15814
15815
15816
6ec2e0f5
SDJ
15817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
15818$as_echo_n "checking whether frexp works... " >&6; }
63a9e923 15819if ${gl_cv_func_frexp_works+:} false; then :
6ec2e0f5
SDJ
15820 $as_echo_n "(cached) " >&6
15821else
98399780 15822
6ec2e0f5
SDJ
15823 if test "$cross_compiling" = yes; then :
15824 case "$host_os" in
15825 netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
15826 *) gl_cv_func_frexp_works="guessing yes";;
15827 esac
98399780 15828
6ec2e0f5
SDJ
15829else
15830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15831/* end confdefs.h. */
98399780 15832
6ec2e0f5
SDJ
15833#include <float.h>
15834#include <math.h>
15835#include <string.h>
15836#if HAVE_DECL_ALARM
15837# include <signal.h>
15838# include <unistd.h>
15839#endif
15840/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
15841 ICC 10.0 has a bug when optimizing the expression -zero.
15842 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
15843 to PowerPC on Mac OS X 10.5. */
15844#if defined __hpux || defined __sgi || defined __ICC
15845static double
15846compute_minus_zero (void)
15847{
15848 return -DBL_MIN * DBL_MIN;
15849}
15850# define minus_zero compute_minus_zero ()
15851#else
15852double minus_zero = -0.0;
15853#endif
15854int main()
15855{
15856 int result = 0;
15857 int i;
15858 volatile double x;
15859 double zero = 0.0;
15860#if HAVE_DECL_ALARM
15861 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
15862 number. Let the test fail in this case. */
15863 signal (SIGALRM, SIG_DFL);
15864 alarm (5);
15865#endif
15866 /* Test on denormalized numbers. */
15867 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
15868 ;
15869 if (x > 0.0)
15870 {
15871 int exp;
15872 double y = frexp (x, &exp);
15873 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
15874 On NetBSD: y = 0.75. Correct: y = 0.5. */
15875 if (y != 0.5)
15876 result |= 1;
15877 }
15878 /* Test on infinite numbers. */
15879 x = 1.0 / zero;
15880 {
15881 int exp;
15882 double y = frexp (x, &exp);
15883 if (y != x)
15884 result |= 2;
15885 }
15886 /* Test on negative zero. */
15887 x = minus_zero;
15888 {
15889 int exp;
15890 double y = frexp (x, &exp);
15891 if (memcmp (&y, &x, sizeof x))
15892 result |= 4;
15893 }
15894 return result;
15895}
98399780 15896_ACEOF
6ec2e0f5
SDJ
15897if ac_fn_c_try_run "$LINENO"; then :
15898 gl_cv_func_frexp_works=yes
15899else
15900 gl_cv_func_frexp_works=no
15901fi
15902rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15903 conftest.$ac_objext conftest.beam conftest.$ac_ext
15904fi
98399780
YQ
15905
15906
6ec2e0f5
SDJ
15907fi
15908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
15909$as_echo "$gl_cv_func_frexp_works" >&6; }
98399780 15910
6ec2e0f5
SDJ
15911 LIBS="$save_LIBS"
15912 case "$gl_cv_func_frexp_works" in
15913 *yes) gl_func_frexp=yes ;;
15914 *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;;
15915 esac
15916 else
15917 gl_func_frexp=no
15918 fi
15919 if test $gl_func_frexp = yes; then
98399780 15920
6ec2e0f5 15921$as_echo "#define HAVE_FREXP 1" >>confdefs.h
98399780 15922
6ec2e0f5 15923 fi
98399780
YQ
15924
15925
6ec2e0f5 15926 if test $gl_func_frexp != yes; then
6a29c58e
YQ
15927
15928
15929
15930
6a29c58e
YQ
15931
15932
15933
15934
6ec2e0f5 15935 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
8690e634
JK
15936
15937 fi
8690e634 15938
8690e634 15939
8690e634 15940
8690e634 15941
8690e634 15942
6ec2e0f5 15943 GNULIB_FREXP=1
8690e634 15944
8690e634 15945
4a626d0a 15946
8690e634 15947
8690e634 15948
6ec2e0f5 15949$as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
8690e634
JK
15950
15951
15952
15953
15954
63ce7108 15955
e26b6bb0
TT
15956
15957
15958
6ec2e0f5
SDJ
15959 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
15960"
63a9e923 15961if test "x$ac_cv_have_decl_frexpl" = xyes; then :
e26b6bb0 15962
6ec2e0f5
SDJ
15963else
15964 HAVE_DECL_FREXPL=0
15965fi
e26b6bb0
TT
15966
15967
6ec2e0f5
SDJ
15968 FREXPL_LIBM=
15969 if test $HAVE_DECL_FREXPL = 1; then
e26b6bb0 15970
6ec2e0f5
SDJ
15971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
15972$as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
63a9e923 15973if ${gl_cv_func_frexpl_no_libm+:} false; then :
e26b6bb0
TT
15974 $as_echo_n "(cached) " >&6
15975else
15976
6ec2e0f5 15977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e26b6bb0 15978/* end confdefs.h. */
6ec2e0f5
SDJ
15979#include <math.h>
15980 long double x;
15981int
15982main ()
15983{
15984int e; return frexpl (x, &e) > 0;
15985 ;
15986 return 0;
15987}
e26b6bb0 15988_ACEOF
6ec2e0f5
SDJ
15989if ac_fn_c_try_link "$LINENO"; then :
15990 gl_cv_func_frexpl_no_libm=yes
15991else
15992 gl_cv_func_frexpl_no_libm=no
e26b6bb0 15993fi
6ec2e0f5
SDJ
15994rm -f core conftest.err conftest.$ac_objext \
15995 conftest$ac_exeext conftest.$ac_ext
e26b6bb0 15996
6ec2e0f5
SDJ
15997fi
15998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
15999$as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
e26b6bb0 16000
6ec2e0f5
SDJ
16001 if test $gl_cv_func_frexpl_no_libm = no; then
16002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5
16003$as_echo_n "checking whether frexpl() can be used with libm... " >&6; }
63a9e923 16004if ${gl_cv_func_frexpl_in_libm+:} false; then :
e26b6bb0
TT
16005 $as_echo_n "(cached) " >&6
16006else
e26b6bb0 16007
6ec2e0f5
SDJ
16008 save_LIBS="$LIBS"
16009 LIBS="$LIBS -lm"
16010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16011/* end confdefs.h. */
16012#include <math.h>
16013 long double x;
e26b6bb0
TT
16014int
16015main ()
16016{
6ec2e0f5 16017int e; return frexpl (x, &e) > 0;
e26b6bb0
TT
16018 ;
16019 return 0;
16020}
16021_ACEOF
6ec2e0f5
SDJ
16022if ac_fn_c_try_link "$LINENO"; then :
16023 gl_cv_func_frexpl_in_libm=yes
e26b6bb0 16024else
6ec2e0f5 16025 gl_cv_func_frexpl_in_libm=no
e26b6bb0 16026fi
6ec2e0f5
SDJ
16027rm -f core conftest.err conftest.$ac_objext \
16028 conftest$ac_exeext conftest.$ac_ext
16029 LIBS="$save_LIBS"
e26b6bb0 16030
e26b6bb0 16031fi
6ec2e0f5
SDJ
16032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5
16033$as_echo "$gl_cv_func_frexpl_in_libm" >&6; }
16034 if test $gl_cv_func_frexpl_in_libm = yes; then
16035 FREXPL_LIBM=-lm
16036 fi
16037 fi
16038 if test $gl_cv_func_frexpl_no_libm = yes \
16039 || test $gl_cv_func_frexpl_in_libm = yes; then
16040 save_LIBS="$LIBS"
16041 LIBS="$LIBS $FREXPL_LIBM"
18848e28 16042
18848e28 16043
6ec2e0f5
SDJ
16044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
16045$as_echo_n "checking whether frexpl works... " >&6; }
63a9e923 16046if ${gl_cv_func_frexpl_works+:} false; then :
6ec2e0f5 16047 $as_echo_n "(cached) " >&6
18848e28 16048else
18848e28 16049
6ec2e0f5 16050 if test "$cross_compiling" = yes; then :
18848e28 16051
6ec2e0f5
SDJ
16052 case "$host_os" in
16053 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
16054 gl_cv_func_frexpl_works="guessing no";;
16055 *) gl_cv_func_frexpl_works="guessing yes";;
16056 esac
18848e28 16057
18848e28
GF
16058else
16059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16060/* end confdefs.h. */
16061
6ec2e0f5
SDJ
16062#include <float.h>
16063#include <math.h>
16064/* Override the values of <float.h>, like done in float.in.h. */
16065#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
16066# undef LDBL_MIN_EXP
16067# define LDBL_MIN_EXP (-16381)
16068#endif
16069#if defined __i386__ && defined __FreeBSD__
16070# undef LDBL_MIN_EXP
16071# define LDBL_MIN_EXP (-16381)
16072#endif
16073#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
16074# undef LDBL_MIN_EXP
16075# define LDBL_MIN_EXP DBL_MIN_EXP
18848e28 16076#endif
6ec2e0f5
SDJ
16077#if defined __sgi && (LDBL_MANT_DIG >= 106)
16078# if defined __GNUC__
16079# undef LDBL_MIN_EXP
16080# define LDBL_MIN_EXP DBL_MIN_EXP
16081# endif
16082#endif
16083extern
16084#ifdef __cplusplus
16085"C"
16086#endif
16087long double frexpl (long double, int *);
16088int main()
16089{
16090 int result = 0;
16091 volatile long double x;
16092 /* Test on finite numbers that fails on AIX 5.1. */
16093 x = 16.0L;
16094 {
16095 int exp = -9999;
16096 frexpl (x, &exp);
16097 if (exp != 5)
16098 result |= 1;
16099 }
16100 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
16101 function returns an invalid (incorrectly normalized) value: it returns
16102 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
16103 but the correct result is
16104 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
16105 x = 1.01L;
16106 {
16107 int exp = -9999;
16108 long double y = frexpl (x, &exp);
16109 if (!(exp == 1 && y == 0.505L))
16110 result |= 2;
16111 }
16112 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
16113 LDBL_MAX_EXP = 16384.
16114 In the loop end test, we test x against Infinity, rather than comparing
16115 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
16116 {
16117 int i;
16118 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
16119 {
16120 int exp = -9999;
16121 frexpl (x, &exp);
16122 if (exp != i)
16123 {
16124 result |= 4;
16125 break;
16126 }
16127 }
16128 }
16129 /* Test on denormalized numbers. */
16130 {
16131 int i;
16132 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
16133 ;
16134 if (x > 0.0L)
16135 {
16136 int exp;
16137 long double y = frexpl (x, &exp);
16138 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
16139 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
16140 if (exp != LDBL_MIN_EXP - 1)
16141 result |= 8;
16142 }
16143 }
16144 /* Test on infinite numbers. */
16145 x = 1.0L / 0.0L;
16146 {
16147 int exp;
16148 long double y = frexpl (x, &exp);
16149 if (y != x)
16150 result |= 16;
16151 }
16152 return result;
16153}
18848e28 16154_ACEOF
6ec2e0f5
SDJ
16155if ac_fn_c_try_run "$LINENO"; then :
16156 gl_cv_func_frexpl_works=yes
18848e28 16157else
6ec2e0f5 16158 gl_cv_func_frexpl_works=no
18848e28 16159fi
6ec2e0f5
SDJ
16160rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16161 conftest.$ac_objext conftest.beam conftest.$ac_ext
18848e28 16162fi
18848e28
GF
16163
16164
6ec2e0f5
SDJ
16165fi
16166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
16167$as_echo "$gl_cv_func_frexpl_works" >&6; }
18848e28 16168
6ec2e0f5
SDJ
16169 LIBS="$save_LIBS"
16170 case "$gl_cv_func_frexpl_works" in
16171 *yes) gl_func_frexpl=yes ;;
16172 *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;;
16173 esac
16174 else
16175 gl_func_frexpl=no
16176 fi
16177 if test $gl_func_frexpl = yes; then
18848e28 16178
6ec2e0f5 16179$as_echo "#define HAVE_FREXPL 1" >>confdefs.h
18848e28 16180
6ec2e0f5
SDJ
16181 fi
16182 fi
16183 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
16184 if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
18848e28 16185
6ec2e0f5
SDJ
16186 FREXPL_LIBM="$FREXP_LIBM"
16187 else
16188 FREXPL_LIBM=
16189 fi
16190 fi
18848e28 16191
18848e28 16192
6ec2e0f5 16193 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
18848e28 16194
18848e28 16195
18848e28 16196
18848e28
GF
16197
16198
18848e28 16199
18848e28 16200
18848e28 16201
6ec2e0f5 16202 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
18848e28
GF
16203
16204 fi
16205
16206
16207
16208
16209
6ec2e0f5 16210 GNULIB_FREXPL=1
18848e28
GF
16211
16212
16213
16214
16215
6ec2e0f5 16216$as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
18848e28
GF
16217
16218
16219
16220
16221
16222
16223
6ec2e0f5
SDJ
16224 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
16225 REPLACE_FSTAT=1
16226 fi
16227
16228
16229 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
16230 REPLACE_FSTAT=1
16231 fi
18848e28 16232
6a29c58e 16233
6a29c58e 16234
6a29c58e 16235
6ec2e0f5
SDJ
16236
16237 if test $ac_cv_func_fchdir = no; then
16238 HAVE_FCHDIR=0
6a29c58e
YQ
16239 fi
16240
6ec2e0f5
SDJ
16241 if test $HAVE_FCHDIR = 0; then
16242 case "$gl_cv_func_open_directory_works" in
16243 *yes) ;;
16244 *)
16245 REPLACE_FSTAT=1
16246 ;;
16247 esac
16248 fi
6a29c58e
YQ
16249
16250
6ec2e0f5 16251 if test $REPLACE_FSTAT = 1; then
6a29c58e 16252
3d99e817
AK
16253
16254
16255
3d99e817
AK
16256
16257
16258
16259
6ec2e0f5 16260 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
3d99e817 16261
6ec2e0f5
SDJ
16262 :
16263 fi
3d99e817
AK
16264
16265
16266
16267
16268
6ec2e0f5 16269 GNULIB_FSTAT=1
3d99e817 16270
49e4877c 16271
49e4877c 16272
49e4877c 16273
49e4877c 16274
6ec2e0f5 16275$as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
49e4877c 16276
6a29c58e
YQ
16277
16278
88b48903 16279
8690e634 16280
a512b375 16281
88b48903 16282
88b48903 16283
6ec2e0f5
SDJ
16284
16285 if test $ac_cv_func_fstatat = no; then
16286 HAVE_FSTATAT=0
16287 else
16288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
16289$as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
63a9e923 16290if ${gl_cv_func_fstatat_zero_flag+:} false; then :
6ec2e0f5
SDJ
16291 $as_echo_n "(cached) " >&6
16292else
16293 if test "$cross_compiling" = yes; then :
16294 case "$host_os" in
16295 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
16296 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
16297 esac
88b48903 16298
8690e634
JK
16299else
16300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16301/* end confdefs.h. */
8690e634 16302
6ec2e0f5
SDJ
16303 #include <fcntl.h>
16304 #include <sys/stat.h>
16305 int
16306 main (void)
16307 {
16308 struct stat a;
16309 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
16310 }
16311
88b48903
WN
16312_ACEOF
16313if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 16314 gl_cv_func_fstatat_zero_flag=yes
88b48903 16315else
6ec2e0f5 16316 gl_cv_func_fstatat_zero_flag=no
88b48903
WN
16317fi
16318rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16319 conftest.$ac_objext conftest.beam conftest.$ac_ext
16320fi
16321
16322
16323fi
6ec2e0f5
SDJ
16324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
16325$as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
88b48903 16326
6ec2e0f5
SDJ
16327 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
16328 *yes+*yes) ;;
16329 *) REPLACE_FSTATAT=1
16330 case $gl_cv_func_fstatat_zero_flag in
16331 *yes)
88b48903 16332
6ec2e0f5 16333$as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
88b48903 16334
6ec2e0f5
SDJ
16335 ;;
16336 esac
16337 ;;
16338 esac
16339 fi
88b48903 16340
6ec2e0f5 16341 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
88b48903
WN
16342
16343
16344
16345
16346
88b48903 16347
4a626d0a
PA
16348
16349
6ec2e0f5
SDJ
16350 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
16351
16352 fi
16353
16354
16355
4a626d0a 16356
6ec2e0f5
SDJ
16357
16358 GNULIB_FSTATAT=1
16359
16360
16361
16362
16363
16364$as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
16365
16366
16367
16368
16369
16370
16371
16372
16373 gl_abort_bug=no
4a626d0a
PA
16374 case "$host_os" in
16375 mingw*)
6ec2e0f5 16376 gl_cv_func_getcwd_path_max=yes
4a626d0a
PA
16377 ;;
16378 *)
88b48903 16379
88b48903 16380
88b48903
WN
16381
16382
88b48903 16383
6ec2e0f5
SDJ
16384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
16385$as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
63a9e923 16386if ${gl_cv_func_getcwd_path_max+:} false; then :
6ec2e0f5
SDJ
16387 $as_echo_n "(cached) " >&6
16388else
16389 # Arrange for deletion of the temporary directory this test creates.
16390 ac_clean_files="$ac_clean_files confdir3"
16391 if test "$cross_compiling" = yes; then :
16392 case "$host_os" in
16393 aix*) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
16394 *) gl_cv_func_getcwd_path_max=no;;
16395 esac
16396else
16397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16398/* end confdefs.h. */
88b48903 16399
6ec2e0f5
SDJ
16400#include <errno.h>
16401#include <stdlib.h>
16402#if HAVE_UNISTD_H
16403# include <unistd.h>
16404#else
16405# include <direct.h>
16406#endif
16407#include <string.h>
16408#include <limits.h>
16409#include <sys/stat.h>
16410#include <sys/types.h>
16411#include <fcntl.h>
88b48903
WN
16412
16413
6ec2e0f5
SDJ
16414/* Arrange to define PATH_MAX, like "pathmax.h" does. */
16415#if HAVE_UNISTD_H
16416# include <unistd.h>
16417#endif
16418#include <limits.h>
16419#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
16420# include <sys/param.h>
16421#endif
16422#if !defined PATH_MAX && defined MAXPATHLEN
16423# define PATH_MAX MAXPATHLEN
16424#endif
16425#ifdef __hpux
16426# undef PATH_MAX
16427# define PATH_MAX 1024
16428#endif
16429#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
16430# undef PATH_MAX
16431# define PATH_MAX 260
16432#endif
88b48903 16433
88b48903 16434
6ec2e0f5
SDJ
16435#ifndef AT_FDCWD
16436# define AT_FDCWD 0
16437#endif
16438#ifdef ENAMETOOLONG
16439# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
16440#else
16441# define is_ENAMETOOLONG(x) 0
16442#endif
88b48903 16443
6ec2e0f5
SDJ
16444/* Use the getcwd function, not any macro. */
16445#undef getcwd
88b48903 16446
6ec2e0f5
SDJ
16447/* Don't get link errors because mkdir is redefined to rpl_mkdir. */
16448#undef mkdir
88b48903 16449
6ec2e0f5
SDJ
16450#ifndef S_IRWXU
16451# define S_IRWXU 0700
16452#endif
88b48903 16453
6ec2e0f5
SDJ
16454/* The length of this name must be 8. */
16455#define DIR_NAME "confdir3"
16456#define DIR_NAME_LEN 8
16457#define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
88b48903 16458
6ec2e0f5
SDJ
16459/* The length of "../". */
16460#define DOTDOTSLASH_LEN 3
88b48903 16461
6ec2e0f5
SDJ
16462/* Leftover bytes in the buffer, to work around library or OS bugs. */
16463#define BUF_SLOP 20
88b48903 16464
6ec2e0f5
SDJ
16465int
16466main ()
16467{
16468#ifndef PATH_MAX
16469 /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
16470 at least not on a local file system. And if we were to start worrying
16471 about remote file systems, we'd have to enable the wrapper function
16472 all of the time, just to be safe. That's not worth the cost. */
16473 exit (0);
16474#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
16475 - DIR_NAME_SIZE - BUF_SLOP) \
16476 <= PATH_MAX)
16477 /* FIXME: Assuming there's a system for which this is true,
16478 this should be done in a compile test. */
16479 exit (0);
16480#else
16481 char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
16482 + DIR_NAME_SIZE + BUF_SLOP];
16483 char *cwd = getcwd (buf, PATH_MAX);
16484 size_t initial_cwd_len;
16485 size_t cwd_len;
16486 int fail = 0;
16487 size_t n_chdirs = 0;
88b48903 16488
6ec2e0f5
SDJ
16489 if (cwd == NULL)
16490 exit (10);
88b48903 16491
6ec2e0f5 16492 cwd_len = initial_cwd_len = strlen (cwd);
88b48903 16493
6ec2e0f5
SDJ
16494 while (1)
16495 {
16496 size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
16497 char *c = NULL;
16498
16499 cwd_len += DIR_NAME_SIZE;
16500 /* If mkdir or chdir fails, it could be that this system cannot create
16501 any file with an absolute name longer than PATH_MAX, such as cygwin.
16502 If so, leave fail as 0, because the current working directory can't
16503 be too long for getcwd if it can't even be created. For other
16504 errors, be pessimistic and consider that as a failure, too. */
16505 if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
16506 {
16507 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
16508 fail = 20;
16509 break;
16510 }
88b48903 16511
6ec2e0f5
SDJ
16512 if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
16513 {
16514 struct stat sb;
88b48903 16515
6ec2e0f5
SDJ
16516 c = getcwd (buf, PATH_MAX);
16517 if (!c && errno == ENOENT)
16518 {
16519 fail = 11;
16520 break;
16521 }
16522 if (c)
16523 {
16524 fail = 31;
16525 break;
16526 }
16527 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
16528 {
16529 fail = 21;
16530 break;
16531 }
88b48903 16532
6ec2e0f5
SDJ
16533 /* Our replacement needs to be able to stat() long ../../paths,
16534 so generate a path larger than PATH_MAX to check,
16535 avoiding the replacement if we can't stat(). */
16536 c = getcwd (buf, cwd_len + 1);
16537 if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno))
16538 {
16539 fail = 32;
16540 break;
16541 }
16542 }
88b48903 16543
6ec2e0f5
SDJ
16544 if (dotdot_max <= cwd_len - initial_cwd_len)
16545 {
16546 if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
16547 break;
16548 c = getcwd (buf, cwd_len + 1);
16549 if (!c)
16550 {
16551 if (! (errno == ERANGE || errno == ENOENT
16552 || is_ENAMETOOLONG (errno)))
16553 {
16554 fail = 22;
16555 break;
16556 }
16557 if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
16558 {
16559 fail = 12;
16560 break;
16561 }
16562 }
16563 }
88b48903 16564
6ec2e0f5
SDJ
16565 if (c && strlen (c) != cwd_len)
16566 {
16567 fail = 23;
16568 break;
16569 }
16570 ++n_chdirs;
16571 }
88b48903 16572
6ec2e0f5
SDJ
16573 /* Leaving behind such a deep directory is not polite.
16574 So clean up here, right away, even though the driving
16575 shell script would also clean up. */
16576 {
16577 size_t i;
88b48903 16578
6ec2e0f5
SDJ
16579 /* Try rmdir first, in case the chdir failed. */
16580 rmdir (DIR_NAME);
16581 for (i = 0; i <= n_chdirs; i++)
16582 {
16583 if (chdir ("..") < 0)
16584 break;
16585 if (rmdir (DIR_NAME) != 0)
16586 break;
16587 }
16588 }
88b48903 16589
6ec2e0f5
SDJ
16590 exit (fail);
16591#endif
16592}
88b48903 16593
6ec2e0f5
SDJ
16594_ACEOF
16595if ac_fn_c_try_run "$LINENO"; then :
16596 gl_cv_func_getcwd_path_max=yes
16597else
16598 case $? in
16599 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
16600 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
16601 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
16602 *) gl_cv_func_getcwd_path_max=no;;
16603 esac
16604fi
16605rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16606 conftest.$ac_objext conftest.beam conftest.$ac_ext
16607fi
88b48903 16608
88b48903 16609
6ec2e0f5
SDJ
16610fi
16611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
16612$as_echo "$gl_cv_func_getcwd_path_max" >&6; }
88b48903 16613
6ec2e0f5
SDJ
16614 case "$gl_cv_func_getcwd_null" in
16615 *yes)
88b48903
WN
16616
16617
16618
16619
6ec2e0f5
SDJ
16620 for ac_func in getpagesize
16621do :
16622 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
63a9e923 16623if test "x$ac_cv_func_getpagesize" = xyes; then :
6ec2e0f5
SDJ
16624 cat >>confdefs.h <<_ACEOF
16625#define HAVE_GETPAGESIZE 1
16626_ACEOF
16627
16628fi
16629done
16630
16631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5
16632$as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; }
63a9e923 16633if ${gl_cv_func_getcwd_abort_bug+:} false; then :
88b48903
WN
16634 $as_echo_n "(cached) " >&6
16635else
6ec2e0f5
SDJ
16636 # Remove any remnants of a previous test.
16637 rm -rf confdir-14B---
16638 # Arrange for deletion of the temporary directory this test creates.
16639 ac_clean_files="$ac_clean_files confdir-14B---"
16640 if test "$cross_compiling" = yes; then :
16641 gl_cv_func_getcwd_abort_bug=yes
88b48903
WN
16642else
16643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16644/* end confdefs.h. */
6ec2e0f5
SDJ
16645
16646#include <errno.h>
16647#include <stdlib.h>
16648#if HAVE_UNISTD_H
16649# include <unistd.h>
16650#else /* on Windows with MSVC */
16651# include <direct.h>
16652#endif
16653#include <string.h>
16654#include <sys/stat.h>
16655
16656
16657/* Arrange to define PATH_MAX, like "pathmax.h" does. */
16658#if HAVE_UNISTD_H
16659# include <unistd.h>
16660#endif
16661#include <limits.h>
16662#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
16663# include <sys/param.h>
16664#endif
16665#if !defined PATH_MAX && defined MAXPATHLEN
16666# define PATH_MAX MAXPATHLEN
16667#endif
16668#ifdef __hpux
16669# undef PATH_MAX
16670# define PATH_MAX 1024
16671#endif
16672#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
16673# undef PATH_MAX
16674# define PATH_MAX 260
16675#endif
16676
16677
16678/* Don't get link errors because mkdir is redefined to rpl_mkdir. */
16679#undef mkdir
16680
16681#ifndef S_IRWXU
16682# define S_IRWXU 0700
16683#endif
16684
16685/* FIXME: skip the run-test altogether on systems without getpagesize. */
16686#if ! HAVE_GETPAGESIZE
16687# define getpagesize() 0
16688#endif
16689
16690/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
16691 the 16kB pagesize on ia64 linux. Those conditions make the code below
16692 trigger a bug in glibc's getcwd implementation before 2.4.90-10. */
16693#define TARGET_LEN (5 * 1024)
88b48903
WN
16694
16695int
16696main ()
16697{
6ec2e0f5
SDJ
16698 char *cwd;
16699 size_t initial_cwd_len;
16700 int fail = 0;
16701
16702 /* The bug is triggered when PATH_MAX < getpagesize (), so skip
16703 this relatively expensive and invasive test if that's not true. */
16704#ifdef PATH_MAX
16705 int bug_possible = PATH_MAX < getpagesize ();
16706#else
16707 int bug_possible = 0;
16708#endif
16709 if (! bug_possible)
16710 return 0;
8690e634 16711
6ec2e0f5
SDJ
16712 cwd = getcwd (NULL, 0);
16713 if (cwd == NULL)
16714 return 2;
16715
16716 initial_cwd_len = strlen (cwd);
16717 free (cwd);
16718
16719 if (1)
16720 {
16721 static char const dir_name[] = "confdir-14B---";
16722 size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
16723 / sizeof dir_name);
16724 size_t d;
16725 for (d = 0; d < desired_depth; d++)
16726 {
16727 if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
16728 {
16729 if (! (errno == ERANGE || errno == ENAMETOOLONG
16730 || errno == ENOENT))
16731 fail = 3; /* Unable to construct deep hierarchy. */
16732 break;
16733 }
16734 }
16735
16736 /* If libc has the bug in question, this invocation of getcwd
16737 results in a failed assertion. */
16738 cwd = getcwd (NULL, 0);
16739 if (cwd == NULL)
16740 fail = 4; /* getcwd didn't assert, but it failed for a long name
16741 where the answer could have been learned. */
16742 free (cwd);
16743
16744 /* Call rmdir first, in case the above chdir failed. */
16745 rmdir (dir_name);
16746 while (0 < d--)
16747 {
16748 if (chdir ("..") < 0)
16749 {
16750 fail = 5;
16751 break;
16752 }
16753 rmdir (dir_name);
16754 }
16755 }
16756
16757 return fail;
8690e634 16758}
6ec2e0f5 16759
8690e634
JK
16760_ACEOF
16761if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 16762 gl_cv_func_getcwd_abort_bug=no
8690e634 16763else
6ec2e0f5
SDJ
16764 ret=$?
16765 if test $ret -ge 128 || test $ret = 4; then
16766 gl_cv_func_getcwd_abort_bug=yes
16767 else
16768 gl_cv_func_getcwd_abort_bug=no
16769 fi
8690e634
JK
16770fi
16771rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16772 conftest.$ac_objext conftest.beam conftest.$ac_ext
16773fi
16774
16775
16776fi
6ec2e0f5
SDJ
16777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5
16778$as_echo "$gl_cv_func_getcwd_abort_bug" >&6; }
16779 if test $gl_cv_func_getcwd_abort_bug = yes; then :
16780 gl_abort_bug=yes
16781fi
16782
16783 ;;
16784 esac
16785 ;;
16786 esac
16787 case "$gl_cv_func_getcwd_path_max" in
16788 "no"|"no, it has the AIX bug") ;;
16789 *)
16790
16791$as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
16792
16793 ;;
16794 esac
16795 case "$gl_cv_func_getcwd_path_max" in
16796 "no, but it is partly working")
16797
16798$as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
16799
16800 ;;
16801 "yes, but with shorter paths")
16802
16803$as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
16804
16805 ;;
16806 esac
16807
16808 if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
16809 || test $gl_cv_func_getcwd_posix_signature != yes \
16810 || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \
16811 || test $gl_abort_bug = yes; then
16812 REPLACE_GETCWD=1
8690e634
JK
16813 fi
16814
6ec2e0f5 16815 if test $REPLACE_GETCWD = 1; then
8690e634
JK
16816
16817
8690e634
JK
16818
16819
16820
16821
16822
16823
6ec2e0f5 16824 gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
8690e634
JK
16825
16826
8690e634
JK
16827
16828
6ec2e0f5
SDJ
16829 :
16830
16831 fi
16832
8690e634
JK
16833
16834cat >>confdefs.h <<_ACEOF
6ec2e0f5 16835#define GNULIB_GETCWD 1
8690e634
JK
16836_ACEOF
16837
16838
8690e634 16839
8690e634
JK
16840
16841
c971b7fa 16842
c971b7fa 16843
6ec2e0f5
SDJ
16844 GNULIB_GETCWD=1
16845
16846
16847
16848
16849
16850$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
16851
c971b7fa 16852
c971b7fa 16853
c971b7fa 16854
c971b7fa 16855
c971b7fa 16856
c971b7fa 16857
c971b7fa 16858
6ec2e0f5
SDJ
16859 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
16860 *yes,yes) ;;
16861 *)
16862 REPLACE_GETCWD=1
16863 ;;
16864 esac
c971b7fa 16865
6ec2e0f5 16866 if test $REPLACE_GETCWD = 1; then
c971b7fa 16867
c971b7fa
PA
16868
16869
c971b7fa
PA
16870
16871
c971b7fa 16872
c971b7fa 16873
c971b7fa 16874
6ec2e0f5 16875 gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
c971b7fa 16876
6ec2e0f5 16877 fi
c971b7fa 16878
c971b7fa 16879
c971b7fa 16880
c971b7fa 16881
8690e634 16882
6ec2e0f5 16883 GNULIB_GETCWD=1
c971b7fa 16884
88b48903
WN
16885
16886
16887
88b48903 16888
6ec2e0f5 16889$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
88b48903 16890
88b48903
WN
16891
16892
16893
6ec2e0f5
SDJ
16894
16895
16896
16897
16898 if test $ac_cv_func_getdtablesize = yes &&
16899 test $ac_cv_have_decl_getdtablesize = yes; then
16900 # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit
16901 # up to an unchangeable hard limit; all other platforms correctly
16902 # require setrlimit before getdtablesize() can report a larger value.
16903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
16904$as_echo_n "checking whether getdtablesize works... " >&6; }
63a9e923 16905if ${gl_cv_func_getdtablesize_works+:} false; then :
88b48903
WN
16906 $as_echo_n "(cached) " >&6
16907else
6ec2e0f5 16908 if test "$cross_compiling" = yes; then :
88b48903 16909 case "$host_os" in
6ec2e0f5
SDJ
16910 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
16911 gl_cv_func_getdtablesize_works="guessing no" ;;
16912 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
88b48903 16913 esac
88b48903
WN
16914else
16915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16916/* end confdefs.h. */
16917
6ec2e0f5
SDJ
16918 #include <unistd.h>
16919int
16920main ()
88b48903 16921{
6ec2e0f5
SDJ
16922int size = getdtablesize();
16923 if (dup2 (0, getdtablesize()) != -1)
16924 return 1;
16925 if (size != getdtablesize())
16926 return 2;
16927
16928 ;
16929 return 0;
88b48903
WN
16930}
16931_ACEOF
16932if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 16933 gl_cv_func_getdtablesize_works=yes
88b48903 16934else
6ec2e0f5 16935 gl_cv_func_getdtablesize_works=no
88b48903
WN
16936fi
16937rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16938 conftest.$ac_objext conftest.beam conftest.$ac_ext
16939fi
16940
16941
16942fi
6ec2e0f5
SDJ
16943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
16944$as_echo "$gl_cv_func_getdtablesize_works" >&6; }
16945 case "$gl_cv_func_getdtablesize_works" in
16946 *yes) ;;
16947 *) REPLACE_GETDTABLESIZE=1 ;;
88b48903
WN
16948 esac
16949 else
6ec2e0f5 16950 HAVE_GETDTABLESIZE=0
88b48903
WN
16951 fi
16952
6ec2e0f5 16953 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
88b48903
WN
16954
16955
16956
16957
16958
16959
16960
16961
6ec2e0f5 16962 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
88b48903 16963
6ec2e0f5 16964 :
88b48903
WN
16965 fi
16966
16967
16968
16969
16970
6ec2e0f5 16971 GNULIB_GETDTABLESIZE=1
88b48903
WN
16972
16973
16974
88b48903 16975
88b48903 16976
6ec2e0f5 16977$as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
88b48903 16978
88b48903 16979
88b48903 16980
88b48903 16981
88b48903 16982
88b48903 16983
88b48903 16984
88b48903
WN
16985
16986
6ec2e0f5
SDJ
16987 if test $ac_cv_have_decl_getlogin_r = no; then
16988 HAVE_DECL_GETLOGIN_R=0
16989 fi
88b48903 16990
88b48903 16991
6ec2e0f5
SDJ
16992 if test $ac_cv_func_getlogin_r = no; then
16993 HAVE_GETLOGIN_R=0
16994 else
16995 HAVE_GETLOGIN_R=1
16996
16997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getlogin_r works with small buffers" >&5
16998$as_echo_n "checking whether getlogin_r works with small buffers... " >&6; }
63a9e923 16999if ${gl_cv_func_getlogin_r_works+:} false; then :
6ec2e0f5
SDJ
17000 $as_echo_n "(cached) " >&6
17001else
88b48903 17002
6ec2e0f5
SDJ
17003 case "$host_os" in
17004 # Guess no on OSF/1.
17005 osf*) gl_cv_func_getlogin_r_works="guessing no" ;;
17006 # Guess yes otherwise.
17007 *) gl_cv_func_getlogin_r_works="guessing yes" ;;
17008 esac
17009 if test "$cross_compiling" = yes; then :
17010 :
88b48903
WN
17011else
17012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17013/* end confdefs.h. */
17014
6ec2e0f5
SDJ
17015#include <stddef.h>
17016#include <unistd.h>
17017#if !HAVE_DECL_GETLOGIN_R
88b48903 17018extern
6ec2e0f5 17019# ifdef __cplusplus
88b48903 17020"C"
6ec2e0f5
SDJ
17021# endif
17022int getlogin_r (char *, size_t);
88b48903 17023#endif
6ec2e0f5
SDJ
17024int
17025main (void)
88b48903
WN
17026{
17027 int result = 0;
6ec2e0f5
SDJ
17028 char buf[100];
17029
17030 if (getlogin_r (buf, 0) == 0)
17031 result |= 16;
17032 if (getlogin_r (buf, 1) == 0)
17033 result |= 17;
88b48903
WN
17034 return result;
17035}
17036_ACEOF
17037if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 17038 gl_cv_func_getlogin_r_works=yes
88b48903 17039else
6ec2e0f5
SDJ
17040 case $? in
17041 16 | 17) gl_cv_func_getlogin_r_works=no ;;
17042 esac
17043
88b48903
WN
17044fi
17045rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17046 conftest.$ac_objext conftest.beam conftest.$ac_ext
17047fi
17048
17049
4a626d0a 17050fi
6ec2e0f5
SDJ
17051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getlogin_r_works" >&5
17052$as_echo "$gl_cv_func_getlogin_r_works" >&6; }
17053 case "$gl_cv_func_getlogin_r_works" in
17054 *yes) ;;
17055 *) REPLACE_GETLOGIN_R=1 ;;
17056 esac
17057 fi
17058
17059 if test $HAVE_GETLOGIN_R = 0 || test $REPLACE_GETLOGIN_R = 1; then
17060
17061
17062
17063
17064
17065
17066
17067
17068 gl_LIBOBJS="$gl_LIBOBJS getlogin_r.$ac_objext"
4a626d0a 17069
4a626d0a 17070
4a626d0a 17071
4a626d0a 17072
4a626d0a
PA
17073 fi
17074
17075
4a626d0a
PA
17076
17077
17078
6ec2e0f5 17079 GNULIB_GETLOGIN_R=1
4a626d0a
PA
17080
17081
17082
17083
17084
6ec2e0f5 17085$as_echo "#define GNULIB_TEST_GETLOGIN_R 1" >>confdefs.h
4a626d0a 17086
4a626d0a
PA
17087
17088
17089
17090
17091
6ec2e0f5
SDJ
17092 ac_found=0
17093 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
17094"
63a9e923 17095if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
6ec2e0f5
SDJ
17096 ac_have_decl=1
17097else
17098 ac_have_decl=0
17099fi
17100
17101cat >>confdefs.h <<_ACEOF
17102#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
17103_ACEOF
17104if test $ac_have_decl = 1; then :
17105 ac_found=1
17106fi
17107
17108 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
17109"
63a9e923 17110if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
6ec2e0f5
SDJ
17111 ac_have_decl=1
17112else
17113 ac_have_decl=0
17114fi
17115
17116cat >>confdefs.h <<_ACEOF
17117#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
17118_ACEOF
17119if test $ac_have_decl = 1; then :
17120 ac_found=1
17121fi
4a626d0a 17122
6ec2e0f5
SDJ
17123 ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
17124"
63a9e923 17125if test "x$ac_cv_have_decl___argv" = xyes; then :
6ec2e0f5
SDJ
17126 ac_have_decl=1
17127else
17128 ac_have_decl=0
17129fi
4a626d0a 17130
6ec2e0f5
SDJ
17131cat >>confdefs.h <<_ACEOF
17132#define HAVE_DECL___ARGV $ac_have_decl
17133_ACEOF
17134if test $ac_have_decl = 1; then :
17135 ac_found=1
17136fi
4a626d0a
PA
17137
17138
6ec2e0f5
SDJ
17139 # Incur the cost of this test only if none of the above worked.
17140 if test $ac_found = 0; then
17141 # On OpenBSD 5.1, using the global __progname variable appears to be
17142 # the only way to implement getprogname.
17143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
17144$as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
63a9e923 17145if ${gl_cv_var___progname+:} false; then :
6ec2e0f5
SDJ
17146 $as_echo_n "(cached) " >&6
17147else
4a626d0a 17148
6ec2e0f5
SDJ
17149 gl_cv_var___progname=
17150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17151/* end confdefs.h. */
17152extern char *__progname;
17153int
17154main ()
17155{
17156return *__progname;
17157
17158 ;
17159 return 0;
17160}
17161_ACEOF
17162if ac_fn_c_try_link "$LINENO"; then :
17163 gl_cv_var___progname=yes
17164
17165fi
17166rm -f core conftest.err conftest.$ac_objext \
17167 conftest$ac_exeext conftest.$ac_ext
17168
17169
17170fi
17171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
17172$as_echo "$gl_cv_var___progname" >&6; }
17173 if test "$gl_cv_var___progname" = yes; then
17174
17175$as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
17176
17177 fi
17178 fi
4a626d0a
PA
17179
17180
17181
17182
17183
17184
17185
17186
17187
17188 gl_gettimeofday_timezone=void
17189 if test $ac_cv_func_gettimeofday != yes; then
17190 HAVE_GETTIMEOFDAY=0
17191 else
17192
17193
17194
17195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
17196$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
63a9e923 17197if ${gl_cv_func_gettimeofday_clobber+:} false; then :
4a626d0a
PA
17198 $as_echo_n "(cached) " >&6
17199else
17200 if test "$cross_compiling" = yes; then :
17201 # When cross-compiling:
17202 case "$host_os" in
17203 # Guess all is fine on glibc systems.
17204 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
17205 # If we don't know, assume the worst.
17206 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
17207 esac
17208
17209else
17210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17211/* end confdefs.h. */
17212#include <string.h>
17213 #include <sys/time.h>
17214 #include <time.h>
17215 #include <stdlib.h>
17216
17217int
17218main ()
17219{
17220
17221 time_t t = 0;
17222 struct tm *lt;
17223 struct tm saved_lt;
17224 struct timeval tv;
17225 lt = localtime (&t);
17226 saved_lt = *lt;
17227 gettimeofday (&tv, NULL);
17228 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
17229
17230 ;
17231 return 0;
17232}
17233_ACEOF
17234if ac_fn_c_try_run "$LINENO"; then :
17235 gl_cv_func_gettimeofday_clobber=no
17236else
17237 gl_cv_func_gettimeofday_clobber=yes
17238fi
17239rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17240 conftest.$ac_objext conftest.beam conftest.$ac_ext
17241fi
17242
17243fi
17244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
17245$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
17246
17247 case "$gl_cv_func_gettimeofday_clobber" in
17248 *yes)
17249 REPLACE_GETTIMEOFDAY=1
17250
17251 REPLACE_GMTIME=1
17252 REPLACE_LOCALTIME=1
17253
17254
17255$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
17256
17257 ;;
17258 esac
17259
17260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
17261$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
63a9e923 17262if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
4a626d0a
PA
17263 $as_echo_n "(cached) " >&6
17264else
17265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17266/* end confdefs.h. */
17267#include <sys/time.h>
17268 struct timeval c;
17269 int gettimeofday (struct timeval *restrict, void *restrict);
17270
17271int
17272main ()
17273{
17274/* glibc uses struct timezone * rather than the POSIX void *
17275 if _GNU_SOURCE is defined. However, since the only portable
17276 use of gettimeofday uses NULL as the second parameter, and
17277 since the glibc definition is actually more typesafe, it is
17278 not worth wrapping this to get a compliant signature. */
17279 int (*f) (struct timeval *restrict, void *restrict)
17280 = gettimeofday;
17281 int x = f (&c, 0);
17282 return !(x | c.tv_sec | c.tv_usec);
17283
17284 ;
17285 return 0;
17286}
17287_ACEOF
17288if ac_fn_c_try_compile "$LINENO"; then :
17289 gl_cv_func_gettimeofday_posix_signature=yes
17290else
17291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17292/* end confdefs.h. */
17293#include <sys/time.h>
17294int gettimeofday (struct timeval *restrict, struct timezone *restrict);
17295
17296int
17297main ()
17298{
17299
17300 ;
17301 return 0;
17302}
17303_ACEOF
17304if ac_fn_c_try_compile "$LINENO"; then :
17305 gl_cv_func_gettimeofday_posix_signature=almost
17306else
17307 gl_cv_func_gettimeofday_posix_signature=no
17308fi
17309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17310fi
17311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17312fi
17313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
17314$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
17315 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
17316 gl_gettimeofday_timezone='struct timezone'
17317 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
17318 REPLACE_GETTIMEOFDAY=1
17319 fi
17320 if test $REPLACE_STRUCT_TIMEVAL = 1; then
17321 REPLACE_GETTIMEOFDAY=1
17322 fi
17323
17324 fi
17325
17326cat >>confdefs.h <<_ACEOF
17327#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
17328_ACEOF
17329
88b48903 17330
4a626d0a 17331 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
88b48903 17332
88b48903 17333
88b48903 17334
88b48903
WN
17335
17336
88b48903
WN
17337
17338
17339
6ec2e0f5
SDJ
17340 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
17341
17342
17343 for ac_header in sys/timeb.h
17344do :
17345 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
63a9e923 17346if test "x$ac_cv_header_sys_timeb_h" = xyes; then :
6ec2e0f5
SDJ
17347 cat >>confdefs.h <<_ACEOF
17348#define HAVE_SYS_TIMEB_H 1
17349_ACEOF
17350
17351fi
17352
17353done
17354
17355 for ac_func in _ftime
17356do :
17357 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
63a9e923 17358if test "x$ac_cv_func__ftime" = xyes; then :
6ec2e0f5
SDJ
17359 cat >>confdefs.h <<_ACEOF
17360#define HAVE__FTIME 1
17361_ACEOF
17362
17363fi
17364done
17365
17366
17367 fi
17368
17369
17370
17371
17372
17373 GNULIB_GETTIMEOFDAY=1
17374
17375
17376
17377
17378
17379$as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
17380
17381
17382
17383 GLOB_H=
17384 for ac_header in glob.h
17385do :
17386 ac_fn_c_check_header_mongrel "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default"
63a9e923 17387if test "x$ac_cv_header_glob_h" = xyes; then :
6ec2e0f5
SDJ
17388 cat >>confdefs.h <<_ACEOF
17389#define HAVE_GLOB_H 1
17390_ACEOF
17391
17392else
17393 GLOB_H=glob.h
17394fi
17395
17396done
17397
17398
17399 if test -z "$GLOB_H"; then
17400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU glob interface version 1" >&5
17401$as_echo_n "checking for GNU glob interface version 1... " >&6; }
63a9e923 17402if ${gl_cv_gnu_glob_interface_version_1+:} false; then :
6ec2e0f5
SDJ
17403 $as_echo_n "(cached) " >&6
17404else
17405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17406/* end confdefs.h. */
17407#include <gnu-versions.h>
17408char a[_GNU_GLOB_INTERFACE_VERSION == 1 ? 1 : -1];
17409_ACEOF
17410if ac_fn_c_try_compile "$LINENO"; then :
17411 gl_cv_gnu_glob_interface_version_1=yes
17412else
17413 gl_cv_gnu_glob_interface_version_1=no
17414fi
17415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17416fi
17417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_gnu_glob_interface_version_1" >&5
17418$as_echo "$gl_cv_gnu_glob_interface_version_1" >&6; }
17419
17420 if test "$gl_cv_gnu_glob_interface_version_1" = "no"; then
17421 GLOB_H=glob.h
17422 fi
17423 fi
17424
17425 if test -z "$GLOB_H"; then
17426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether glob lists broken symlinks" >&5
17427$as_echo_n "checking whether glob lists broken symlinks... " >&6; }
63a9e923 17428if ${gl_cv_glob_lists_symlinks+:} false; then :
6ec2e0f5
SDJ
17429 $as_echo_n "(cached) " >&6
17430else
17431 if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then
17432 gl_cv_glob_lists_symlinks=maybe
17433 else
17434 # If we can't make a symlink, then we cannot test this issue. Be
17435 # pessimistic about this.
17436 gl_cv_glob_lists_symlinks=no
17437 fi
88b48903 17438
6ec2e0f5
SDJ
17439 if test $gl_cv_glob_lists_symlinks = maybe; then
17440 if test "$cross_compiling" = yes; then :
17441 gl_cv_glob_lists_symlinks=no
17442else
17443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17444/* end confdefs.h. */
88b48903 17445
6ec2e0f5
SDJ
17446#include <stddef.h>
17447#include <glob.h>
17448int
17449main ()
17450{
17451glob_t found;
17452if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH) return 1;
17453 ;
17454 return 0;
17455}
4a626d0a 17456_ACEOF
6ec2e0f5
SDJ
17457if ac_fn_c_try_run "$LINENO"; then :
17458 gl_cv_glob_lists_symlinks=yes
17459else
17460 gl_cv_glob_lists_symlinks=no
17461fi
17462rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17463 conftest.$ac_objext conftest.beam conftest.$ac_ext
17464fi
88b48903 17465
6ec2e0f5 17466 fi
4a626d0a 17467fi
6ec2e0f5
SDJ
17468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_glob_lists_symlinks" >&5
17469$as_echo "$gl_cv_glob_lists_symlinks" >&6; }
88b48903 17470
6ec2e0f5
SDJ
17471 if test $gl_cv_glob_lists_symlinks = no; then
17472 GLOB_H=glob.h
17473 fi
17474 fi
4a626d0a 17475
6ec2e0f5 17476 rm -f conf$$-globtest
4a626d0a 17477
88b48903 17478
6ec2e0f5
SDJ
17479 if test -n "$GLOB_H"; then
17480 GL_GENERATE_GLOB_H_TRUE=
17481 GL_GENERATE_GLOB_H_FALSE='#'
17482else
17483 GL_GENERATE_GLOB_H_TRUE='#'
17484 GL_GENERATE_GLOB_H_FALSE=
17485fi
88b48903 17486
88b48903 17487
6ec2e0f5 17488 if test -n "$GLOB_H"; then
88b48903
WN
17489
17490
17491
17492
88b48903
WN
17493
17494
17495
17496
6ec2e0f5 17497 gl_LIBOBJS="$gl_LIBOBJS glob.$ac_objext"
88b48903 17498
88b48903 17499
6ec2e0f5
SDJ
17500 if test $ac_cv_header_sys_cdefs_h = yes; then
17501 HAVE_SYS_CDEFS_H=1
17502 else
17503 HAVE_SYS_CDEFS_H=0
17504 fi
88b48903
WN
17505
17506
6ec2e0f5 17507 fi
88b48903 17508
49e4877c
PA
17509 :
17510
17511
88b48903
WN
17512
17513
17514
17515
17516 PRIPTR_PREFIX=
17517 if test -n "$STDINT_H"; then
17518 PRIPTR_PREFIX='"l"'
17519 else
17520 for glpfx in '' l ll I64; do
17521 case $glpfx in
17522 '') gltype1='int';;
17523 l) gltype1='long int';;
17524 ll) gltype1='long long int';;
17525 I64) gltype1='__int64';;
17526 esac
17527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17528/* end confdefs.h. */
17529#include <stdint.h>
17530 extern intptr_t foo;
17531 extern $gltype1 foo;
17532int
17533main ()
17534{
17535
17536 ;
17537 return 0;
17538}
17539_ACEOF
17540if ac_fn_c_try_compile "$LINENO"; then :
17541 PRIPTR_PREFIX='"'$glpfx'"'
17542fi
17543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17544 test -n "$PRIPTR_PREFIX" && break
17545 done
17546 fi
17547
17548
17549
17550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
17551$as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
63a9e923 17552if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
88b48903
WN
17553 $as_echo_n "(cached) " >&6
17554else
17555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17556/* end confdefs.h. */
17557/* Work also in C++ mode. */
17558 #define __STDC_LIMIT_MACROS 1
17559
17560 /* Work if build is not clean. */
17561 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
17562
17563 #include <limits.h>
17564 #if HAVE_STDINT_H
17565 #include <stdint.h>
17566 #endif
17567
17568 #if defined INT32_MAX && defined INTMAX_MAX
17569 #define CONDITION (INT32_MAX < INTMAX_MAX)
17570 #elif HAVE_LONG_LONG_INT
17571 #define CONDITION (sizeof (int) < sizeof (long long int))
17572 #else
17573 #define CONDITION 0
17574 #endif
17575 int test[CONDITION ? 1 : -1];
17576int
17577main ()
17578{
17579
17580 ;
17581 return 0;
17582}
17583_ACEOF
17584if ac_fn_c_try_compile "$LINENO"; then :
17585 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
17586else
17587 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
17588fi
17589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17590fi
17591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
17592$as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
17593 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
17594 INT32_MAX_LT_INTMAX_MAX=1;
17595 else
17596 INT32_MAX_LT_INTMAX_MAX=0;
17597 fi
17598
17599
17600 if test $APPLE_UNIVERSAL_BUILD = 0; then
17601
17602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
17603$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
63a9e923 17604if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
88b48903
WN
17605 $as_echo_n "(cached) " >&6
17606else
17607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17608/* end confdefs.h. */
17609/* Work also in C++ mode. */
17610 #define __STDC_LIMIT_MACROS 1
17611
17612 /* Work if build is not clean. */
17613 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
17614
17615 #include <limits.h>
17616 #if HAVE_STDINT_H
17617 #include <stdint.h>
17618 #endif
17619
17620 #if defined INT64_MAX
17621 #define CONDITION (INT64_MAX == LONG_MAX)
17622 #elif HAVE_LONG_LONG_INT
17623 #define CONDITION (sizeof (long long int) == sizeof (long int))
17624 #else
17625 #define CONDITION 0
17626 #endif
17627 int test[CONDITION ? 1 : -1];
17628int
17629main ()
17630{
17631
17632 ;
17633 return 0;
17634}
17635_ACEOF
17636if ac_fn_c_try_compile "$LINENO"; then :
17637 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
17638else
17639 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
17640fi
17641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17642fi
17643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
17644$as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
17645 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
17646 INT64_MAX_EQ_LONG_MAX=1;
17647 else
17648 INT64_MAX_EQ_LONG_MAX=0;
17649 fi
17650
17651
17652 else
17653 INT64_MAX_EQ_LONG_MAX=-1
17654 fi
17655
17656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
17657$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
63a9e923 17658if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
88b48903
WN
17659 $as_echo_n "(cached) " >&6
17660else
17661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17662/* end confdefs.h. */
17663/* Work also in C++ mode. */
17664 #define __STDC_LIMIT_MACROS 1
17665
17666 /* Work if build is not clean. */
17667 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
17668
17669 #include <limits.h>
17670 #if HAVE_STDINT_H
17671 #include <stdint.h>
17672 #endif
17673
17674 #if defined UINT32_MAX && defined UINTMAX_MAX
17675 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
17676 #elif HAVE_LONG_LONG_INT
17677 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
17678 #else
17679 #define CONDITION 0
17680 #endif
17681 int test[CONDITION ? 1 : -1];
17682int
17683main ()
17684{
17685
17686 ;
17687 return 0;
17688}
17689_ACEOF
17690if ac_fn_c_try_compile "$LINENO"; then :
17691 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
17692else
17693 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
17694fi
17695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17696fi
17697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
17698$as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
17699 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
17700 UINT32_MAX_LT_UINTMAX_MAX=1;
17701 else
17702 UINT32_MAX_LT_UINTMAX_MAX=0;
17703 fi
17704
17705
17706 if test $APPLE_UNIVERSAL_BUILD = 0; then
17707
17708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
17709$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
63a9e923 17710if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
88b48903
WN
17711 $as_echo_n "(cached) " >&6
17712else
17713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17714/* end confdefs.h. */
17715/* Work also in C++ mode. */
17716 #define __STDC_LIMIT_MACROS 1
17717
17718 /* Work if build is not clean. */
17719 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
17720
17721 #include <limits.h>
17722 #if HAVE_STDINT_H
17723 #include <stdint.h>
17724 #endif
17725
17726 #if defined UINT64_MAX
17727 #define CONDITION (UINT64_MAX == ULONG_MAX)
17728 #elif HAVE_LONG_LONG_INT
17729 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
17730 #else
17731 #define CONDITION 0
17732 #endif
17733 int test[CONDITION ? 1 : -1];
17734int
17735main ()
17736{
17737
17738 ;
17739 return 0;
17740}
17741_ACEOF
17742if ac_fn_c_try_compile "$LINENO"; then :
17743 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
17744else
17745 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
17746fi
17747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17748fi
17749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
17750$as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
17751 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
17752 UINT64_MAX_EQ_ULONG_MAX=1;
17753 else
17754 UINT64_MAX_EQ_ULONG_MAX=0;
17755 fi
17756
17757
17758 else
17759 UINT64_MAX_EQ_ULONG_MAX=-1
17760 fi
17761
17762
17763
17764
17765
17766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
17767$as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
63a9e923 17768if ${gl_cv_func_isnand_no_libm+:} false; then :
88b48903
WN
17769 $as_echo_n "(cached) " >&6
17770else
17771
17772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17773/* end confdefs.h. */
17774#include <math.h>
17775 #if __GNUC__ >= 4
17776 # undef isnand
17777 # define isnand(x) __builtin_isnan ((double)(x))
17778 #else
17779 # undef isnand
17780 # define isnand(x) isnan ((double)(x))
17781 #endif
17782 double x;
17783int
17784main ()
17785{
17786return isnand (x);
17787 ;
17788 return 0;
17789}
17790_ACEOF
17791if ac_fn_c_try_link "$LINENO"; then :
17792 gl_cv_func_isnand_no_libm=yes
17793else
17794 gl_cv_func_isnand_no_libm=no
17795fi
17796rm -f core conftest.err conftest.$ac_objext \
17797 conftest$ac_exeext conftest.$ac_ext
17798
17799fi
17800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
17801$as_echo "$gl_cv_func_isnand_no_libm" >&6; }
17802
17803 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
17804 if test $gl_cv_func_isnand_no_libm = yes; then
17805
17806$as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
17807
17808 fi
17809
17810 if test $gl_func_isnand_no_libm != yes; then
17811
17812
17813
17814
17815
17816
17817
17818
17819 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
17820
17821
17822
17823
17824 fi
17825
17826
17827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
17828$as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
63a9e923 17829if ${gl_cv_func_isnanl_no_libm+:} false; then :
88b48903
WN
17830 $as_echo_n "(cached) " >&6
17831else
17832
17833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17834/* end confdefs.h. */
17835#include <math.h>
17836 #if __GNUC__ >= 4
17837 # undef isnanl
17838 # define isnanl(x) __builtin_isnanl ((long double)(x))
17839 #elif defined isnan
17840 # undef isnanl
17841 # define isnanl(x) isnan ((long double)(x))
17842 #endif
17843 long double x;
17844int
17845main ()
17846{
17847return isnanl (x);
17848 ;
17849 return 0;
17850}
17851_ACEOF
17852if ac_fn_c_try_link "$LINENO"; then :
17853 gl_cv_func_isnanl_no_libm=yes
17854else
17855 gl_cv_func_isnanl_no_libm=no
17856fi
17857rm -f core conftest.err conftest.$ac_objext \
17858 conftest$ac_exeext conftest.$ac_ext
17859
17860fi
17861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
17862$as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
17863
17864 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
17865 if test $gl_func_isnanl_no_libm = yes; then
17866
17867
17868
17869
17870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
17871$as_echo_n "checking whether isnanl works... " >&6; }
63a9e923 17872if ${gl_cv_func_isnanl_works+:} false; then :
88b48903
WN
17873 $as_echo_n "(cached) " >&6
17874else
17875
17876 if test "$cross_compiling" = yes; then :
4a626d0a 17877 gl_cv_func_isnanl_works="guessing yes"
88b48903
WN
17878else
17879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17880/* end confdefs.h. */
17881
17882#include <float.h>
17883#include <limits.h>
17884#include <math.h>
17885#if __GNUC__ >= 4
17886# undef isnanl
17887# define isnanl(x) __builtin_isnanl ((long double)(x))
17888#elif defined isnan
17889# undef isnanl
17890# define isnanl(x) isnan ((long double)(x))
17891#endif
17892#define NWORDS \
17893 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
17894typedef union { unsigned int word[NWORDS]; long double value; }
17895 memory_long_double;
17896/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
17897 runtime type conversion. */
17898#ifdef __sgi
17899static long double NaNl ()
17900{
17901 double zero = 0.0;
17902 return zero / zero;
17903}
17904#else
17905# define NaNl() (0.0L / 0.0L)
17906#endif
17907int main ()
17908{
17909 int result = 0;
17910
17911 if (!isnanl (NaNl ()))
17912 result |= 1;
17913
17914 {
17915 memory_long_double m;
17916 unsigned int i;
17917
17918 /* The isnanl function should be immune against changes in the sign bit and
17919 in the mantissa bits. The xor operation twiddles a bit that can only be
17920 a sign bit or a mantissa bit (since the exponent never extends to
17921 bit 31). */
17922 m.value = NaNl ();
17923 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
17924 for (i = 0; i < NWORDS; i++)
17925 m.word[i] |= 1;
17926 if (!isnanl (m.value))
17927 result |= 1;
17928 }
17929
17930#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
17931/* Representation of an 80-bit 'long double' as an initializer for a sequence
17932 of 'unsigned int' words. */
17933# ifdef WORDS_BIGENDIAN
17934# define LDBL80_WORDS(exponent,manthi,mantlo) \
17935 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
4a626d0a 17936 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
88b48903
WN
17937 (unsigned int) (mantlo) << 16 \
17938 }
17939# else
17940# define LDBL80_WORDS(exponent,manthi,mantlo) \
17941 { mantlo, manthi, exponent }
17942# endif
17943 { /* Quiet NaN. */
17944 static memory_long_double x =
17945 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
17946 if (!isnanl (x.value))
17947 result |= 2;
17948 }
17949 {
17950 /* Signalling NaN. */
17951 static memory_long_double x =
17952 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
17953 if (!isnanl (x.value))
17954 result |= 2;
17955 }
4a626d0a 17956 /* isnanl should return something even for noncanonical values. */
88b48903
WN
17957 { /* Pseudo-NaN. */
17958 static memory_long_double x =
17959 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
4a626d0a 17960 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
17961 result |= 4;
17962 }
17963 { /* Pseudo-Infinity. */
17964 static memory_long_double x =
17965 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
4a626d0a 17966 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
17967 result |= 8;
17968 }
17969 { /* Pseudo-Zero. */
17970 static memory_long_double x =
17971 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
4a626d0a 17972 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
17973 result |= 16;
17974 }
17975 { /* Unnormalized number. */
17976 static memory_long_double x =
17977 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
4a626d0a 17978 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
17979 result |= 32;
17980 }
17981 { /* Pseudo-Denormal. */
17982 static memory_long_double x =
17983 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
4a626d0a 17984 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
17985 result |= 64;
17986 }
17987#endif
17988
17989 return result;
17990}
17991_ACEOF
17992if ac_fn_c_try_run "$LINENO"; then :
17993 gl_cv_func_isnanl_works=yes
17994else
17995 gl_cv_func_isnanl_works=no
17996fi
17997rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17998 conftest.$ac_objext conftest.beam conftest.$ac_ext
17999fi
18000
18001
18002fi
18003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
18004$as_echo "$gl_cv_func_isnanl_works" >&6; }
18005
18006 case "$gl_cv_func_isnanl_works" in
18007 *yes) ;;
18008 *) gl_func_isnanl_no_libm=no ;;
18009 esac
18010 fi
18011 if test $gl_func_isnanl_no_libm = yes; then
18012
18013$as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
18014
18015 fi
18016
18017 if test $gl_func_isnanl_no_libm != yes; then
18018
18019
18020
18021
18022
18023
18024
18025
18026 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
18027
18028
18029
18030
18031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
18032$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
63a9e923 18033if ${gl_cv_cc_long_double_expbit0+:} false; then :
88b48903
WN
18034 $as_echo_n "(cached) " >&6
18035else
18036
18037 if test "$cross_compiling" = yes; then :
18038
18039 gl_cv_cc_long_double_expbit0="unknown"
18040
18041else
18042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18043/* end confdefs.h. */
18044
18045#include <float.h>
18046#include <stddef.h>
18047#include <stdio.h>
18048#include <string.h>
18049#define NWORDS \
18050 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
18051typedef union { long double value; unsigned int word[NWORDS]; }
18052 memory_long_double;
18053static unsigned int ored_words[NWORDS];
18054static unsigned int anded_words[NWORDS];
18055static void add_to_ored_words (long double x)
18056{
18057 memory_long_double m;
18058 size_t i;
18059 /* Clear it first, in case
18060 sizeof (long double) < sizeof (memory_long_double). */
18061 memset (&m, 0, sizeof (memory_long_double));
18062 m.value = x;
18063 for (i = 0; i < NWORDS; i++)
18064 {
18065 ored_words[i] |= m.word[i];
18066 anded_words[i] &= m.word[i];
18067 }
18068}
18069int main ()
18070{
18071 size_t j;
18072 FILE *fp = fopen ("conftest.out", "w");
18073 if (fp == NULL)
18074 return 1;
18075 for (j = 0; j < NWORDS; j++)
18076 anded_words[j] = ~ (unsigned int) 0;
18077 add_to_ored_words (0.25L);
18078 add_to_ored_words (0.5L);
18079 add_to_ored_words (1.0L);
18080 add_to_ored_words (2.0L);
18081 add_to_ored_words (4.0L);
18082 /* Remove bits that are common (e.g. if representation of the first mantissa
18083 bit is explicit). */
18084 for (j = 0; j < NWORDS; j++)
18085 ored_words[j] &= ~anded_words[j];
18086 /* Now find the nonzero word. */
18087 for (j = 0; j < NWORDS; j++)
18088 if (ored_words[j] != 0)
18089 break;
18090 if (j < NWORDS)
18091 {
18092 size_t i;
18093 for (i = j + 1; i < NWORDS; i++)
18094 if (ored_words[i] != 0)
18095 {
18096 fprintf (fp, "unknown");
18097 return (fclose (fp) != 0);
18098 }
18099 for (i = 0; ; i++)
18100 if ((ored_words[j] >> i) & 1)
18101 {
18102 fprintf (fp, "word %d bit %d", (int) j, (int) i);
18103 return (fclose (fp) != 0);
18104 }
18105 }
18106 fprintf (fp, "unknown");
18107 return (fclose (fp) != 0);
18108}
18109
18110_ACEOF
18111if ac_fn_c_try_run "$LINENO"; then :
18112 gl_cv_cc_long_double_expbit0=`cat conftest.out`
18113else
18114 gl_cv_cc_long_double_expbit0="unknown"
18115fi
18116rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18117 conftest.$ac_objext conftest.beam conftest.$ac_ext
18118fi
18119
18120 rm -f conftest.out
18121
18122fi
18123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
18124$as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
18125 case "$gl_cv_cc_long_double_expbit0" in
18126 word*bit*)
18127 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
18128 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
18129
18130cat >>confdefs.h <<_ACEOF
18131#define LDBL_EXPBIT0_WORD $word
18132_ACEOF
18133
18134
18135cat >>confdefs.h <<_ACEOF
18136#define LDBL_EXPBIT0_BIT $bit
18137_ACEOF
18138
18139 ;;
18140 esac
18141
18142
18143
18144 fi
18145
18146
18147
18148
88b48903
WN
18149
18150
18151
18152
2196f55f 18153
49e4877c 18154
88b48903
WN
18155 LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
18156
18157
18158
18159
f45c62c4
YQ
18160 if test $ac_cv_func_lstat = yes; then
18161
18162 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
18163 *no)
18164 REPLACE_LSTAT=1
18165 ;;
18166 esac
18167 else
18168 HAVE_LSTAT=0
18169 fi
18170
18171 if test $REPLACE_LSTAT = 1; then
18172
18173
18174
18175
18176
18177
18178
18179
18180 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
18181
18182 :
18183 fi
18184
18185
18186
18187
18188
18189 GNULIB_LSTAT=1
18190
18191
18192
18193
18194
18195$as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
18196
18197
18198
18199
18200
18201
6a29c58e
YQ
18202 if test $gl_cv_func_malloc_posix = yes; then
18203
18204$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
18205
18206 else
18207 REPLACE_MALLOC=1
18208 fi
18209
18210 if test $REPLACE_MALLOC = 1; then
18211
18212
18213
18214
18215
18216
18217
18218
18219 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
18220
18221 fi
18222
18223
18224
18225
18226
18227 GNULIB_MALLOC_POSIX=1
18228
18229
18230
18231
18232
18233$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
18234
18235
18236
18237
18238
18239
88b48903
WN
18240
18241
18242
18243
18244
88b48903 18245
c971b7fa 18246
c971b7fa 18247
98399780
YQ
18248
18249
18250
18251
88b48903
WN
18252 if test $gl_cv_have_include_next = yes; then
18253 gl_cv_next_math_h='<'math.h'>'
18254 else
18255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
18256$as_echo_n "checking absolute name of <math.h>... " >&6; }
63a9e923 18257if ${gl_cv_next_math_h+:} false; then :
88b48903
WN
18258 $as_echo_n "(cached) " >&6
18259else
c971b7fa 18260
88b48903 18261 if test $ac_cv_header_math_h = yes; then
c971b7fa
PA
18262
18263
4a626d0a
PA
18264
18265
18266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 18267/* end confdefs.h. */
88b48903 18268#include <math.h>
8690e634 18269_ACEOF
4a626d0a
PA
18270 case "$host_os" in
18271 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18272 *) gl_absname_cpp="$ac_cpp" ;;
18273 esac
18274
18275 case "$host_os" in
18276 mingw*)
18277 gl_dirsep_regex='[/\\]'
18278 ;;
18279 *)
18280 gl_dirsep_regex='\/'
18281 ;;
18282 esac
18283 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18284 gl_header_literal_regex=`echo 'math.h' \
18285 | sed -e "$gl_make_literal_regex_sed"`
18286 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18287 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18288 s|^/[^/]|//&|
18289 p
18290 q
18291 }'
18292
18293 gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18294 sed -n "$gl_absolute_header_sed"`
18295
18296 gl_header=$gl_cv_absolute_math_h
18297 gl_cv_next_math_h='"'$gl_header'"'
88b48903
WN
18298 else
18299 gl_cv_next_math_h='<'math.h'>'
18300 fi
8690e634 18301
c971b7fa 18302
88b48903
WN
18303fi
18304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
18305$as_echo "$gl_cv_next_math_h" >&6; }
18306 fi
18307 NEXT_MATH_H=$gl_cv_next_math_h
c971b7fa 18308
88b48903
WN
18309 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18310 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18311 gl_next_as_first_directive='<'math.h'>'
18312 else
18313 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18314 gl_next_as_first_directive=$gl_cv_next_math_h
18315 fi
18316 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
8690e634 18317
c971b7fa 18318
c971b7fa
PA
18319
18320
c971b7fa 18321
88b48903
WN
18322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
18323$as_echo_n "checking whether NAN macro works... " >&6; }
63a9e923 18324if ${gl_cv_header_math_nan_works+:} false; then :
c971b7fa
PA
18325 $as_echo_n "(cached) " >&6
18326else
8690e634
JK
18327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18328/* end confdefs.h. */
88b48903 18329#include <math.h>
c971b7fa
PA
18330int
18331main ()
18332{
88b48903
WN
18333/* Solaris 10 has a broken definition of NAN. Other platforms
18334 fail to provide NAN, or provide it only in C99 mode; this
18335 test only needs to fail when NAN is provided but wrong. */
18336 float f = 1.0f;
18337#ifdef NAN
18338 f = NAN;
18339#endif
18340 return f == 0;
c971b7fa
PA
18341 ;
18342 return 0;
18343}
18344_ACEOF
18345if ac_fn_c_try_compile "$LINENO"; then :
88b48903 18346 gl_cv_header_math_nan_works=yes
8690e634 18347else
88b48903 18348 gl_cv_header_math_nan_works=no
c971b7fa
PA
18349fi
18350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 18351fi
88b48903
WN
18352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
18353$as_echo "$gl_cv_header_math_nan_works" >&6; }
18354 if test $gl_cv_header_math_nan_works = no; then
18355 REPLACE_NAN=1
c971b7fa 18356 fi
88b48903
WN
18357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
18358$as_echo_n "checking whether HUGE_VAL works... " >&6; }
63a9e923 18359if ${gl_cv_header_math_huge_val_works+:} false; then :
c971b7fa
PA
18360 $as_echo_n "(cached) " >&6
18361else
8690e634 18362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 18363/* end confdefs.h. */
88b48903 18364#include <math.h>
c971b7fa
PA
18365int
18366main ()
18367{
88b48903
WN
18368/* Solaris 10 has a broken definition of HUGE_VAL. */
18369 double d = HUGE_VAL;
18370 return d == 0;
c971b7fa
PA
18371 ;
18372 return 0;
18373}
18374_ACEOF
18375if ac_fn_c_try_compile "$LINENO"; then :
88b48903 18376 gl_cv_header_math_huge_val_works=yes
8690e634 18377else
88b48903 18378 gl_cv_header_math_huge_val_works=no
c971b7fa
PA
18379fi
18380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 18381fi
88b48903
WN
18382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
18383$as_echo "$gl_cv_header_math_huge_val_works" >&6; }
18384 if test $gl_cv_header_math_huge_val_works = no; then
18385 REPLACE_HUGE_VAL=1
8690e634 18386 fi
c971b7fa 18387
c971b7fa 18388
88b48903
WN
18389 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
18390 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
18391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
18392$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
63a9e923 18393if eval \${$as_gl_Symbol+:} false; then :
8690e634
JK
18394 $as_echo_n "(cached) " >&6
18395else
18396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18397/* end confdefs.h. */
88b48903 18398#include <math.h>
8690e634
JK
18399int
18400main ()
18401{
88b48903
WN
18402#undef $gl_func
18403 (void) $gl_func;
8690e634
JK
18404 ;
18405 return 0;
18406}
18407_ACEOF
18408if ac_fn_c_try_compile "$LINENO"; then :
88b48903 18409 eval "$as_gl_Symbol=yes"
c971b7fa 18410else
88b48903 18411 eval "$as_gl_Symbol=no"
c971b7fa 18412fi
8690e634
JK
18413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18414fi
88b48903
WN
18415eval ac_res=\$$as_gl_Symbol
18416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18417$as_echo "$ac_res" >&6; }
63a9e923 18418 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
88b48903
WN
18419 cat >>confdefs.h <<_ACEOF
18420#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18421_ACEOF
c971b7fa 18422
88b48903
WN
18423 eval ac_cv_have_decl_$gl_func=yes
18424fi
18425 done
c971b7fa
PA
18426
18427
18428
18429
18430
c971b7fa 18431
c971b7fa 18432
c971b7fa 18433
c971b7fa
PA
18434
18435
c971b7fa 18436
8690e634
JK
18437
18438 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
18439
18440
18441
18442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
18443$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
63a9e923 18444if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
c971b7fa
PA
18445 $as_echo_n "(cached) " >&6
18446else
8690e634
JK
18447
18448 case "$host_os" in
18449 # Guess no on AIX and OSF/1.
18450 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
18451 # Guess yes otherwise.
18452 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
18453 esac
18454 if test $LOCALE_JA != none; then
18455 if test "$cross_compiling" = yes; then :
18456 :
18457else
c971b7fa
PA
18458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18459/* end confdefs.h. */
c971b7fa 18460
8690e634
JK
18461#include <locale.h>
18462#include <string.h>
18463/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18464 <wchar.h>.
18465 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18466 included before <wchar.h>. */
18467#include <stddef.h>
18468#include <stdio.h>
18469#include <time.h>
18470#include <wchar.h>
18471int main ()
c971b7fa 18472{
8690e634
JK
18473 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
18474 {
18475 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
18476 mbstate_t state;
18477 wchar_t wc;
18478
18479 memset (&state, '\0', sizeof (mbstate_t));
18480 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
18481 if (mbsinit (&state))
18482 return 1;
18483 }
c971b7fa
PA
18484 return 0;
18485}
18486_ACEOF
8690e634
JK
18487if ac_fn_c_try_run "$LINENO"; then :
18488 gl_cv_func_mbrtowc_incomplete_state=yes
c971b7fa 18489else
8690e634 18490 gl_cv_func_mbrtowc_incomplete_state=no
c971b7fa 18491fi
8690e634
JK
18492rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18493 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 18494fi
c971b7fa 18495
8690e634 18496 fi
c971b7fa 18497
8690e634
JK
18498fi
18499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
18500$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
c971b7fa 18501
c971b7fa 18502
c971b7fa 18503
c971b7fa 18504
8690e634
JK
18505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
18506$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
63a9e923 18507if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
c971b7fa
PA
18508 $as_echo_n "(cached) " >&6
18509else
18510
8690e634
JK
18511 case "$host_os" in
18512 # Guess no on Solaris 8.
18513 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
18514 # Guess yes otherwise.
18515 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
18516 esac
18517 if test $LOCALE_ZH_CN != none; then
18518 if test "$cross_compiling" = yes; then :
18519 :
18520else
18521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
18522/* end confdefs.h. */
18523
8690e634
JK
18524#include <locale.h>
18525#include <stdlib.h>
18526#include <string.h>
18527/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18528 <wchar.h>.
18529 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18530 included before <wchar.h>. */
18531#include <stddef.h>
18532#include <stdio.h>
18533#include <time.h>
18534#include <wchar.h>
18535int main ()
c971b7fa 18536{
8690e634
JK
18537 /* This fails on Solaris 8:
18538 mbrtowc returns 2, and sets wc to 0x00F0.
18539 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
18540 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
18541 {
18542 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
18543 mbstate_t state;
18544 wchar_t wc;
18545
18546 memset (&state, '\0', sizeof (mbstate_t));
18547 if (mbrtowc (&wc, input + 3, 6, &state) != 4
18548 && mbtowc (&wc, input + 3, 6) == 4)
18549 return 1;
18550 }
c971b7fa
PA
18551 return 0;
18552}
18553_ACEOF
8690e634
JK
18554if ac_fn_c_try_run "$LINENO"; then :
18555 gl_cv_func_mbrtowc_sanitycheck=yes
c971b7fa 18556else
8690e634 18557 gl_cv_func_mbrtowc_sanitycheck=no
c971b7fa 18558fi
8690e634
JK
18559rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18560 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 18561fi
c971b7fa 18562
8690e634 18563 fi
c971b7fa 18564
8690e634
JK
18565fi
18566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
18567$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
18568
18569 REPLACE_MBSTATE_T=0
18570 case "$gl_cv_func_mbrtowc_incomplete_state" in
18571 *yes) ;;
18572 *) REPLACE_MBSTATE_T=1 ;;
18573 esac
18574 case "$gl_cv_func_mbrtowc_sanitycheck" in
18575 *yes) ;;
18576 *) REPLACE_MBSTATE_T=1 ;;
18577 esac
c971b7fa 18578 else
8690e634 18579 REPLACE_MBSTATE_T=1
c971b7fa
PA
18580 fi
18581
18582
18583
8690e634
JK
18584 if test $ac_cv_func_mbrtowc = no; then
18585 HAVE_MBRTOWC=0
18586 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
18587/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18588 <wchar.h>.
18589 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18590 included before <wchar.h>. */
18591#include <stddef.h>
18592#include <stdio.h>
18593#include <time.h>
18594#include <wchar.h>
c971b7fa 18595
8690e634 18596"
63a9e923 18597if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
8690e634
JK
18598 ac_have_decl=1
18599else
18600 ac_have_decl=0
c971b7fa 18601fi
c971b7fa 18602
8690e634
JK
18603cat >>confdefs.h <<_ACEOF
18604#define HAVE_DECL_MBRTOWC $ac_have_decl
18605_ACEOF
c971b7fa 18606
8690e634
JK
18607 if test $ac_cv_have_decl_mbrtowc = yes; then
18608 REPLACE_MBRTOWC=1
18609 fi
18610 else
18611 if test $REPLACE_MBSTATE_T = 1; then
18612 REPLACE_MBRTOWC=1
18613 else
c971b7fa
PA
18614
18615
18616
8690e634
JK
18617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
18618$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
63a9e923 18619if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
8690e634 18620 $as_echo_n "(cached) " >&6
c971b7fa 18621else
c971b7fa 18622
8690e634
JK
18623 case "$host_os" in
18624 # Guess no on Solaris.
18625 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
18626 # Guess yes otherwise.
18627 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
18628 esac
18629 if test $LOCALE_FR_UTF8 != none; then
18630 if test "$cross_compiling" = yes; then :
18631 :
18632else
18633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
18634/* end confdefs.h. */
18635
8690e634
JK
18636#include <locale.h>
18637#include <stdlib.h>
18638#include <string.h>
18639/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18640 <wchar.h>.
18641 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18642 included before <wchar.h>. */
18643#include <stddef.h>
18644#include <stdio.h>
18645#include <time.h>
18646#include <wchar.h>
18647int main ()
18648{
18649 int result = 0;
18650
18651 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
18652 {
18653 char input[] = "\303\237er";
18654 mbstate_t state;
18655 wchar_t wc;
18656 size_t ret;
18657
18658 memset (&state, '\0', sizeof (mbstate_t));
18659 wc = (wchar_t) 0xBADFACE;
18660 ret = mbrtowc (&wc, input, 5, &state);
18661 if (ret != 2)
18662 result |= 1;
18663 if (!mbsinit (&state))
18664 result |= 2;
c971b7fa 18665
8690e634
JK
18666 memset (&state, '\0', sizeof (mbstate_t));
18667 ret = mbrtowc (NULL, input, 5, &state);
18668 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
18669 result |= 4;
18670 if (!mbsinit (&state))
18671 result |= 8;
18672 }
18673 return result;
18674}
c971b7fa 18675_ACEOF
8690e634
JK
18676if ac_fn_c_try_run "$LINENO"; then :
18677 gl_cv_func_mbrtowc_null_arg1=yes
18678else
18679 gl_cv_func_mbrtowc_null_arg1=no
18680fi
18681rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18682 conftest.$ac_objext conftest.beam conftest.$ac_ext
18683fi
c971b7fa 18684
8690e634 18685 fi
c971b7fa 18686
c971b7fa 18687fi
8690e634
JK
18688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
18689$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
c971b7fa 18690
c971b7fa 18691
c971b7fa 18692
c971b7fa 18693
8690e634
JK
18694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
18695$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
63a9e923 18696if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
8690e634
JK
18697 $as_echo_n "(cached) " >&6
18698else
c971b7fa 18699
8690e634
JK
18700 case "$host_os" in
18701 # Guess no on OSF/1.
18702 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
18703 # Guess yes otherwise.
18704 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
18705 esac
18706 if test $LOCALE_FR_UTF8 != none; then
18707 if test "$cross_compiling" = yes; then :
c971b7fa 18708 :
8690e634
JK
18709else
18710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18711/* end confdefs.h. */
18712
18713#include <locale.h>
18714#include <string.h>
18715/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18716 <wchar.h>.
18717 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18718 included before <wchar.h>. */
18719#include <stddef.h>
18720#include <stdio.h>
18721#include <time.h>
18722#include <wchar.h>
18723int main ()
18724{
18725 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
18726 {
18727 mbstate_t state;
18728 wchar_t wc;
18729 int ret;
18730
18731 memset (&state, '\0', sizeof (mbstate_t));
18732 wc = (wchar_t) 0xBADFACE;
18733 mbrtowc (&wc, NULL, 5, &state);
18734 /* Check that wc was not modified. */
18735 if (wc != (wchar_t) 0xBADFACE)
18736 return 1;
18737 }
18738 return 0;
18739}
18740_ACEOF
18741if ac_fn_c_try_run "$LINENO"; then :
18742 gl_cv_func_mbrtowc_null_arg2=yes
18743else
18744 gl_cv_func_mbrtowc_null_arg2=no
18745fi
18746rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18747 conftest.$ac_objext conftest.beam conftest.$ac_ext
18748fi
18749
18750 fi
18751
18752fi
18753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
18754$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
c971b7fa
PA
18755
18756
18757
18758
18759
18760
8690e634
JK
18761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
18762$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
63a9e923 18763if ${gl_cv_func_mbrtowc_retval+:} false; then :
8690e634
JK
18764 $as_echo_n "(cached) " >&6
18765else
18766
18767 case "$host_os" in
18768 # Guess no on HP-UX, Solaris, native Windows.
18769 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
18770 # Guess yes otherwise.
18771 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
18772 esac
18773 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
18774 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
18775 if test "$cross_compiling" = yes; then :
c971b7fa 18776 :
8690e634
JK
18777else
18778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18779/* end confdefs.h. */
c971b7fa 18780
8690e634
JK
18781#include <locale.h>
18782#include <string.h>
18783/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18784 <wchar.h>.
18785 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18786 included before <wchar.h>. */
18787#include <stddef.h>
18788#include <stdio.h>
18789#include <time.h>
18790#include <wchar.h>
18791int main ()
18792{
18793 int result = 0;
18794 int found_some_locale = 0;
18795 /* This fails on Solaris. */
18796 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
18797 {
18798 char input[] = "B\303\274\303\237er"; /* "Büßer" */
18799 mbstate_t state;
18800 wchar_t wc;
18801
18802 memset (&state, '\0', sizeof (mbstate_t));
18803 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
18804 {
18805 input[1] = '\0';
18806 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
18807 result |= 1;
18808 }
18809 found_some_locale = 1;
18810 }
18811 /* This fails on HP-UX 11.11. */
18812 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
18813 {
18814 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
18815 mbstate_t state;
18816 wchar_t wc;
18817
18818 memset (&state, '\0', sizeof (mbstate_t));
18819 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
18820 {
18821 input[1] = '\0';
18822 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
18823 result |= 2;
18824 }
18825 found_some_locale = 1;
18826 }
18827 /* This fails on native Windows. */
18828 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
18829 {
18830 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
18831 mbstate_t state;
18832 wchar_t wc;
18833
18834 memset (&state, '\0', sizeof (mbstate_t));
18835 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
18836 {
18837 input[3] = '\0';
18838 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
18839 result |= 4;
18840 }
18841 found_some_locale = 1;
18842 }
18843 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
18844 {
18845 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
18846 mbstate_t state;
18847 wchar_t wc;
18848
18849 memset (&state, '\0', sizeof (mbstate_t));
18850 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
18851 {
18852 input[3] = '\0';
18853 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
18854 result |= 8;
18855 }
18856 found_some_locale = 1;
18857 }
18858 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
18859 {
18860 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
18861 mbstate_t state;
18862 wchar_t wc;
18863
18864 memset (&state, '\0', sizeof (mbstate_t));
18865 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
18866 {
18867 input[3] = '\0';
18868 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
18869 result |= 16;
18870 }
18871 found_some_locale = 1;
18872 }
18873 return (found_some_locale ? result : 77);
18874}
18875_ACEOF
18876if ac_fn_c_try_run "$LINENO"; then :
18877 gl_cv_func_mbrtowc_retval=yes
18878else
18879 if test $? != 77; then
18880 gl_cv_func_mbrtowc_retval=no
18881 fi
c971b7fa 18882
8690e634
JK
18883fi
18884rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18885 conftest.$ac_objext conftest.beam conftest.$ac_ext
18886fi
c971b7fa 18887
8690e634 18888 fi
c971b7fa 18889
8690e634
JK
18890fi
18891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
18892$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
c971b7fa
PA
18893
18894
18895
18896
8690e634
JK
18897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
18898$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
63a9e923 18899if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
c971b7fa
PA
18900 $as_echo_n "(cached) " >&6
18901else
8690e634
JK
18902
18903 case "$host_os" in
18904 # Guess no on Solaris 8 and 9.
18905 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
18906 # Guess yes otherwise.
18907 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
18908 esac
18909 if test $LOCALE_ZH_CN != none; then
18910 if test "$cross_compiling" = yes; then :
18911 :
c971b7fa
PA
18912else
18913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18914/* end confdefs.h. */
18915
8690e634 18916#include <locale.h>
c971b7fa 18917#include <string.h>
8690e634
JK
18918/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18919 <wchar.h>.
18920 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18921 included before <wchar.h>. */
18922#include <stddef.h>
18923#include <stdio.h>
18924#include <time.h>
18925#include <wchar.h>
18926int main ()
c971b7fa 18927{
8690e634
JK
18928 /* This fails on Solaris 8 and 9. */
18929 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
c971b7fa 18930 {
8690e634
JK
18931 mbstate_t state;
18932 wchar_t wc;
c971b7fa 18933
8690e634
JK
18934 memset (&state, '\0', sizeof (mbstate_t));
18935 if (mbrtowc (&wc, "", 1, &state) != 0)
18936 return 1;
18937 }
c971b7fa
PA
18938 return 0;
18939}
18940_ACEOF
18941if ac_fn_c_try_run "$LINENO"; then :
8690e634 18942 gl_cv_func_mbrtowc_nul_retval=yes
c971b7fa 18943else
8690e634 18944 gl_cv_func_mbrtowc_nul_retval=no
c971b7fa
PA
18945fi
18946rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18947 conftest.$ac_objext conftest.beam conftest.$ac_ext
18948fi
18949
8690e634
JK
18950 fi
18951
c971b7fa 18952fi
8690e634
JK
18953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
18954$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
18955
4a626d0a
PA
18956
18957
18958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
18959$as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
63a9e923 18960if ${gl_cv_func_mbrtowc_empty_input+:} false; then :
4a626d0a
PA
18961 $as_echo_n "(cached) " >&6
18962else
18963
18964 case "$host_os" in
18965 # Guess no on AIX and glibc systems.
18966 aix* | *-gnu*)
18967 gl_cv_func_mbrtowc_empty_input="guessing no" ;;
18968 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
18969 esac
18970 if test "$cross_compiling" = yes; then :
18971 :
18972else
18973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18974/* end confdefs.h. */
18975
18976 #include <wchar.h>
18977 static wchar_t wc;
18978 static mbstate_t mbs;
18979 int
18980 main (void)
18981 {
49e4877c 18982 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
4a626d0a
PA
18983 }
18984_ACEOF
18985if ac_fn_c_try_run "$LINENO"; then :
4a626d0a 18986 gl_cv_func_mbrtowc_empty_input=yes
49e4877c
PA
18987else
18988 gl_cv_func_mbrtowc_empty_input=no
4a626d0a
PA
18989fi
18990rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18991 conftest.$ac_objext conftest.beam conftest.$ac_ext
18992fi
18993
18994
18995fi
18996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
18997$as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
18998
49e4877c
PA
18999
19000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
19001$as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
63a9e923 19002if ${gl_cv_C_locale_sans_EILSEQ+:} false; then :
49e4877c
PA
19003 $as_echo_n "(cached) " >&6
19004else
19005
19006 gl_cv_C_locale_sans_EILSEQ="guessing no"
19007
19008 if test "$cross_compiling" = yes; then :
19009 :
19010else
19011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19012/* end confdefs.h. */
19013#include <limits.h>
19014 #include <locale.h>
19015 #include <wchar.h>
19016
19017int
19018main ()
19019{
19020
19021 int i;
19022 char *locale = setlocale (LC_ALL, "C");
19023 if (! locale)
19024 return 1;
19025 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
19026 {
19027 char c = i;
19028 wchar_t wc;
19029 mbstate_t mbs = { 0, };
19030 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
19031 if (1 < ss)
19032 return 1;
19033 }
19034 return 0;
19035
6ec2e0f5
SDJ
19036 ;
19037 return 0;
19038}
19039_ACEOF
19040if ac_fn_c_try_run "$LINENO"; then :
19041 gl_cv_C_locale_sans_EILSEQ=yes
19042else
19043 gl_cv_C_locale_sans_EILSEQ=no
19044fi
19045rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19046 conftest.$ac_objext conftest.beam conftest.$ac_ext
19047fi
19048
19049fi
19050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5
19051$as_echo "$gl_cv_C_locale_sans_EILSEQ" >&6; }
19052
19053 case "$gl_cv_func_mbrtowc_null_arg1" in
19054 *yes) ;;
19055 *)
19056$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
19057
19058 REPLACE_MBRTOWC=1
19059 ;;
19060 esac
19061 case "$gl_cv_func_mbrtowc_null_arg2" in
19062 *yes) ;;
19063 *)
19064$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
19065
19066 REPLACE_MBRTOWC=1
19067 ;;
19068 esac
19069 case "$gl_cv_func_mbrtowc_retval" in
19070 *yes) ;;
19071 *)
19072$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
19073
19074 REPLACE_MBRTOWC=1
19075 ;;
19076 esac
19077 case "$gl_cv_func_mbrtowc_nul_retval" in
19078 *yes) ;;
19079 *)
19080$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
19081
19082 REPLACE_MBRTOWC=1
19083 ;;
19084 esac
19085 case "$gl_cv_func_mbrtowc_empty_input" in
19086 *yes) ;;
19087 *)
19088$as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
19089
19090 REPLACE_MBRTOWC=1
19091 ;;
19092 esac
19093 case $gl_cv_C_locale_sans_EILSEQ in
19094 *yes) ;;
19095 *)
19096$as_echo "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
19097
19098 REPLACE_MBRTOWC=1
19099 ;;
19100 esac
19101 fi
19102 fi
19103
19104 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
19105
19106
19107
19108
19109
19110
19111
19112
19113 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
19114
19115
19116 :
19117
19118 fi
19119
19120
19121
19122
19123
19124 GNULIB_MBRTOWC=1
19125
19126
19127
19128
19129
19130$as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
19131
19132
19133
19134
19135
19136
19137
19138
19139
19140
19141
19142
19143
19144
19145 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
19146
19147
19148
19149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
19150$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
63a9e923 19151if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
6ec2e0f5
SDJ
19152 $as_echo_n "(cached) " >&6
19153else
19154
19155 case "$host_os" in
19156 # Guess no on AIX and OSF/1.
19157 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
19158 # Guess yes otherwise.
19159 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
19160 esac
19161 if test $LOCALE_JA != none; then
19162 if test "$cross_compiling" = yes; then :
19163 :
19164else
19165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19166/* end confdefs.h. */
19167
19168#include <locale.h>
19169#include <string.h>
19170/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19171 <wchar.h>.
19172 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19173 included before <wchar.h>. */
19174#include <stddef.h>
19175#include <stdio.h>
19176#include <time.h>
19177#include <wchar.h>
19178int main ()
19179{
19180 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
19181 {
19182 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
19183 mbstate_t state;
19184 wchar_t wc;
19185
19186 memset (&state, '\0', sizeof (mbstate_t));
19187 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
19188 if (mbsinit (&state))
19189 return 1;
19190 }
19191 return 0;
19192}
19193_ACEOF
19194if ac_fn_c_try_run "$LINENO"; then :
19195 gl_cv_func_mbrtowc_incomplete_state=yes
19196else
19197 gl_cv_func_mbrtowc_incomplete_state=no
19198fi
19199rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19200 conftest.$ac_objext conftest.beam conftest.$ac_ext
19201fi
19202
19203 fi
19204
19205fi
19206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
19207$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
19208
19209
19210
19211
19212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
19213$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
63a9e923 19214if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
6ec2e0f5
SDJ
19215 $as_echo_n "(cached) " >&6
19216else
19217
19218 case "$host_os" in
19219 # Guess no on Solaris 8.
19220 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
19221 # Guess yes otherwise.
19222 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
19223 esac
19224 if test $LOCALE_ZH_CN != none; then
19225 if test "$cross_compiling" = yes; then :
19226 :
19227else
19228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19229/* end confdefs.h. */
19230
19231#include <locale.h>
19232#include <stdlib.h>
19233#include <string.h>
19234/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19235 <wchar.h>.
19236 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19237 included before <wchar.h>. */
19238#include <stddef.h>
19239#include <stdio.h>
19240#include <time.h>
19241#include <wchar.h>
19242int main ()
19243{
19244 /* This fails on Solaris 8:
19245 mbrtowc returns 2, and sets wc to 0x00F0.
19246 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
19247 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
19248 {
19249 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
19250 mbstate_t state;
19251 wchar_t wc;
19252
19253 memset (&state, '\0', sizeof (mbstate_t));
19254 if (mbrtowc (&wc, input + 3, 6, &state) != 4
19255 && mbtowc (&wc, input + 3, 6) == 4)
19256 return 1;
19257 }
49e4877c
PA
19258 return 0;
19259}
19260_ACEOF
19261if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 19262 gl_cv_func_mbrtowc_sanitycheck=yes
49e4877c 19263else
6ec2e0f5 19264 gl_cv_func_mbrtowc_sanitycheck=no
49e4877c
PA
19265fi
19266rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19267 conftest.$ac_objext conftest.beam conftest.$ac_ext
19268fi
19269
6ec2e0f5
SDJ
19270 fi
19271
49e4877c 19272fi
6ec2e0f5
SDJ
19273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
19274$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
49e4877c 19275
6ec2e0f5
SDJ
19276 REPLACE_MBSTATE_T=0
19277 case "$gl_cv_func_mbrtowc_incomplete_state" in
19278 *yes) ;;
19279 *) REPLACE_MBSTATE_T=1 ;;
19280 esac
19281 case "$gl_cv_func_mbrtowc_sanitycheck" in
19282 *yes) ;;
19283 *) REPLACE_MBSTATE_T=1 ;;
19284 esac
19285 else
19286 REPLACE_MBSTATE_T=1
19287 fi
8690e634 19288
8690e634 19289
8690e634 19290
6ec2e0f5
SDJ
19291 if test $ac_cv_func_mbsinit = no; then
19292 HAVE_MBSINIT=0
19293 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
19294/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19295 <wchar.h>.
19296 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19297 included before <wchar.h>. */
19298#include <stddef.h>
19299#include <stdio.h>
19300#include <time.h>
19301#include <wchar.h>
8690e634 19302
6ec2e0f5 19303"
63a9e923 19304if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
6ec2e0f5
SDJ
19305 ac_have_decl=1
19306else
19307 ac_have_decl=0
19308fi
4a626d0a 19309
6ec2e0f5
SDJ
19310cat >>confdefs.h <<_ACEOF
19311#define HAVE_DECL_MBSINIT $ac_have_decl
19312_ACEOF
49e4877c 19313
6ec2e0f5
SDJ
19314 if test $ac_cv_have_decl_mbsinit = yes; then
19315 REPLACE_MBSINIT=1
19316 fi
19317 else
19318 if test $REPLACE_MBSTATE_T = 1; then
19319 REPLACE_MBSINIT=1
19320 else
19321 case "$host_os" in
19322 mingw*) REPLACE_MBSINIT=1 ;;
8690e634 19323 esac
c971b7fa
PA
19324 fi
19325 fi
19326
6ec2e0f5 19327 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
c971b7fa 19328
c971b7fa 19329
c971b7fa
PA
19330
19331
19332
19333
19334
19335
6ec2e0f5 19336 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
8690e634
JK
19337
19338
19339 :
c971b7fa 19340
a512b375 19341 fi
c971b7fa 19342
8690e634
JK
19343
19344
19345
19346
6ec2e0f5 19347 GNULIB_MBSINIT=1
8690e634
JK
19348
19349
19350
19351
8690e634 19352
6ec2e0f5 19353$as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
8690e634
JK
19354
19355
19356
19357
19358
19359
19360
19361
19362
19363
19364
c971b7fa 19365
c971b7fa 19366
8690e634 19367 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
c971b7fa 19368
8690e634
JK
19369
19370
19371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
19372$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
63a9e923 19373if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
8690e634
JK
19374 $as_echo_n "(cached) " >&6
19375else
19376
19377 case "$host_os" in
19378 # Guess no on AIX and OSF/1.
19379 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
19380 # Guess yes otherwise.
19381 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
19382 esac
19383 if test $LOCALE_JA != none; then
19384 if test "$cross_compiling" = yes; then :
19385 :
c971b7fa
PA
19386else
19387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19388/* end confdefs.h. */
19389
8690e634
JK
19390#include <locale.h>
19391#include <string.h>
19392/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19393 <wchar.h>.
19394 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19395 included before <wchar.h>. */
19396#include <stddef.h>
19397#include <stdio.h>
19398#include <time.h>
19399#include <wchar.h>
19400int main ()
c971b7fa 19401{
8690e634 19402 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
c971b7fa 19403 {
8690e634
JK
19404 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
19405 mbstate_t state;
19406 wchar_t wc;
19407
19408 memset (&state, '\0', sizeof (mbstate_t));
19409 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
19410 if (mbsinit (&state))
19411 return 1;
c971b7fa 19412 }
c971b7fa
PA
19413 return 0;
19414}
19415_ACEOF
19416if ac_fn_c_try_run "$LINENO"; then :
8690e634 19417 gl_cv_func_mbrtowc_incomplete_state=yes
c971b7fa 19418else
8690e634 19419 gl_cv_func_mbrtowc_incomplete_state=no
c971b7fa
PA
19420fi
19421rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19422 conftest.$ac_objext conftest.beam conftest.$ac_ext
19423fi
19424
8690e634 19425 fi
c971b7fa
PA
19426
19427fi
8690e634
JK
19428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
19429$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
c971b7fa
PA
19430
19431
c971b7fa
PA
19432
19433
8690e634
JK
19434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
19435$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
63a9e923 19436if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
c971b7fa
PA
19437 $as_echo_n "(cached) " >&6
19438else
8690e634
JK
19439
19440 case "$host_os" in
19441 # Guess no on Solaris 8.
19442 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
19443 # Guess yes otherwise.
19444 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
19445 esac
19446 if test $LOCALE_ZH_CN != none; then
19447 if test "$cross_compiling" = yes; then :
19448 :
19449else
c971b7fa
PA
19450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19451/* end confdefs.h. */
8690e634
JK
19452
19453#include <locale.h>
19454#include <stdlib.h>
19455#include <string.h>
19456/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19457 <wchar.h>.
19458 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19459 included before <wchar.h>. */
c971b7fa 19460#include <stddef.h>
8690e634
JK
19461#include <stdio.h>
19462#include <time.h>
19463#include <wchar.h>
19464int main ()
c971b7fa 19465{
8690e634
JK
19466 /* This fails on Solaris 8:
19467 mbrtowc returns 2, and sets wc to 0x00F0.
19468 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
19469 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
19470 {
19471 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
19472 mbstate_t state;
19473 wchar_t wc;
19474
19475 memset (&state, '\0', sizeof (mbstate_t));
19476 if (mbrtowc (&wc, input + 3, 6, &state) != 4
19477 && mbtowc (&wc, input + 3, 6) == 4)
19478 return 1;
19479 }
c971b7fa
PA
19480 return 0;
19481}
19482_ACEOF
8690e634
JK
19483if ac_fn_c_try_run "$LINENO"; then :
19484 gl_cv_func_mbrtowc_sanitycheck=yes
c971b7fa 19485else
8690e634 19486 gl_cv_func_mbrtowc_sanitycheck=no
c971b7fa 19487fi
8690e634
JK
19488rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19489 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 19490fi
c971b7fa 19491
8690e634
JK
19492 fi
19493
19494fi
19495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
19496$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
c971b7fa 19497
8690e634
JK
19498 REPLACE_MBSTATE_T=0
19499 case "$gl_cv_func_mbrtowc_incomplete_state" in
19500 *yes) ;;
19501 *) REPLACE_MBSTATE_T=1 ;;
19502 esac
19503 case "$gl_cv_func_mbrtowc_sanitycheck" in
19504 *yes) ;;
19505 *) REPLACE_MBSTATE_T=1 ;;
19506 esac
19507 else
19508 REPLACE_MBSTATE_T=1
c971b7fa
PA
19509 fi
19510
c971b7fa 19511
8690e634 19512
6ec2e0f5
SDJ
19513 if test $ac_cv_func_mbsrtowcs = no; then
19514 HAVE_MBSRTOWCS=0
19515 ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
8690e634
JK
19516/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19517 <wchar.h>.
19518 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19519 included before <wchar.h>. */
19520#include <stddef.h>
19521#include <stdio.h>
19522#include <time.h>
19523#include <wchar.h>
19524
19525"
63a9e923 19526if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
8690e634
JK
19527 ac_have_decl=1
19528else
19529 ac_have_decl=0
c971b7fa 19530fi
c971b7fa 19531
8690e634 19532cat >>confdefs.h <<_ACEOF
6ec2e0f5 19533#define HAVE_DECL_MBSRTOWCS $ac_have_decl
c971b7fa 19534_ACEOF
c971b7fa 19535
6ec2e0f5
SDJ
19536 if test $ac_cv_have_decl_mbsrtowcs = yes; then
19537 REPLACE_MBSRTOWCS=1
8690e634
JK
19538 fi
19539 else
19540 if test $REPLACE_MBSTATE_T = 1; then
6ec2e0f5 19541 REPLACE_MBSRTOWCS=1
8690e634 19542 else
6ec2e0f5
SDJ
19543
19544
19545
19546
19547
19548
19549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
19550$as_echo_n "checking whether mbsrtowcs works... " >&6; }
63a9e923 19551if ${gl_cv_func_mbsrtowcs_works+:} false; then :
6ec2e0f5
SDJ
19552 $as_echo_n "(cached) " >&6
19553else
19554
19555 case "$host_os" in
19556 # Guess no on HP-UX, Solaris, mingw.
19557 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
19558 # Guess yes otherwise.
19559 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
19560 esac
19561 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
19562 if test "$cross_compiling" = yes; then :
19563 :
19564else
19565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19566/* end confdefs.h. */
19567
19568#include <locale.h>
19569#include <string.h>
19570/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19571 <wchar.h>.
19572 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19573 included before <wchar.h>. */
19574#include <stddef.h>
19575#include <stdio.h>
19576#include <time.h>
19577#include <wchar.h>
19578int main ()
19579{
19580 int result = 0;
19581 /* Test whether the function supports a NULL destination argument.
19582 This fails on native Windows. */
19583 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
19584 {
19585 const char input[] = "\337er";
19586 const char *src = input;
19587 mbstate_t state;
19588
19589 memset (&state, '\0', sizeof (mbstate_t));
19590 if (mbsrtowcs (NULL, &src, 1, &state) != 3
19591 || src != input)
19592 result |= 1;
19593 }
19594 /* Test whether the function works when started with a conversion state
19595 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
19596 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
19597 {
19598 const char input[] = "B\303\274\303\237er";
19599 mbstate_t state;
19600
19601 memset (&state, '\0', sizeof (mbstate_t));
19602 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
19603 if (!mbsinit (&state))
19604 {
19605 const char *src = input + 2;
19606 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
19607 result |= 2;
19608 }
19609 }
19610 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
19611 {
19612 const char input[] = "<\306\374\313\334\270\354>";
19613 mbstate_t state;
19614
19615 memset (&state, '\0', sizeof (mbstate_t));
19616 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
19617 if (!mbsinit (&state))
19618 {
19619 const char *src = input + 4;
19620 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
19621 result |= 4;
19622 }
19623 }
19624 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
19625 {
19626 const char input[] = "B\250\271\201\060\211\070er";
19627 mbstate_t state;
19628
19629 memset (&state, '\0', sizeof (mbstate_t));
19630 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
19631 if (!mbsinit (&state))
19632 {
19633 const char *src = input + 2;
19634 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
19635 result |= 8;
19636 }
19637 }
19638 return result;
19639}
19640_ACEOF
19641if ac_fn_c_try_run "$LINENO"; then :
19642 gl_cv_func_mbsrtowcs_works=yes
19643else
19644 gl_cv_func_mbsrtowcs_works=no
19645fi
19646rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19647 conftest.$ac_objext conftest.beam conftest.$ac_ext
19648fi
19649
19650 fi
19651
19652fi
19653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
19654$as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
19655
19656 case "$gl_cv_func_mbsrtowcs_works" in
19657 *yes) ;;
19658 *) REPLACE_MBSRTOWCS=1 ;;
8690e634
JK
19659 esac
19660 fi
19661 fi
c971b7fa 19662
6ec2e0f5 19663 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
c971b7fa
PA
19664
19665
19666
19667
19668
19669
19670
19671
6ec2e0f5
SDJ
19672 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
19673
19674
19675
19676
19677
19678
19679
19680
19681
19682 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
c971b7fa
PA
19683
19684
8690e634 19685 :
c971b7fa 19686
a512b375 19687 fi
c971b7fa 19688
c971b7fa 19689
c971b7fa 19690
c971b7fa
PA
19691
19692
6ec2e0f5 19693 GNULIB_MBSRTOWCS=1
c971b7fa 19694
c971b7fa
PA
19695
19696
19697
19698
6ec2e0f5 19699$as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
c971b7fa
PA
19700
19701
c971b7fa 19702
c971b7fa 19703
6ec2e0f5 19704 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
c971b7fa
PA
19705
19706
19707
c971b7fa 19708
c971b7fa
PA
19709
19710
19711
19712
6ec2e0f5 19713 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
8690e634 19714
c971b7fa 19715
6ec2e0f5
SDJ
19716 for ac_header in bp-sym.h
19717do :
19718 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
63a9e923 19719if test "x$ac_cv_header_bp_sym_h" = xyes; then :
6ec2e0f5
SDJ
19720 cat >>confdefs.h <<_ACEOF
19721#define HAVE_BP_SYM_H 1
19722_ACEOF
c971b7fa 19723
6ec2e0f5 19724fi
c971b7fa 19725
6ec2e0f5
SDJ
19726done
19727
19728
19729 fi
19730
19731
19732
19733
19734
19735 GNULIB_MEMCHR=1
19736
19737
19738
19739
19740
19741$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
19742
19743
19744
19745
19746
19747 if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
19748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
19749$as_echo_n "checking whether memmem works in linear time... " >&6; }
63a9e923 19750if ${gl_cv_func_memmem_works_fast+:} false; then :
8690e634
JK
19751 $as_echo_n "(cached) " >&6
19752else
6ec2e0f5
SDJ
19753 if test "$cross_compiling" = yes; then :
19754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19755/* end confdefs.h. */
19756
19757#include <features.h>
19758#ifdef __GNU_LIBRARY__
19759 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)) \
19760 && !defined __UCLIBC__
19761 Lucky user
19762 #endif
19763#endif
19764#ifdef __CYGWIN__
19765 #include <cygwin/version.h>
19766 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 0)
19767 Lucky user
19768 #endif
19769#endif
19770
19771_ACEOF
19772if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19773 $EGREP "Lucky user" >/dev/null 2>&1; then :
19774 gl_cv_func_memmem_works_fast="guessing yes"
19775else
19776 gl_cv_func_memmem_works_fast="guessing no"
19777fi
19778rm -f conftest*
19779
c971b7fa 19780
8690e634
JK
19781else
19782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 19783/* end confdefs.h. */
c971b7fa 19784
6ec2e0f5
SDJ
19785#include <signal.h> /* for signal */
19786#include <string.h> /* for memmem */
19787#include <stdlib.h> /* for malloc */
19788#include <unistd.h> /* for alarm */
19789static void quit (int sig) { _exit (sig + 128); }
19790
19791int
19792main ()
8690e634 19793{
8690e634 19794
6ec2e0f5
SDJ
19795 int result = 0;
19796 size_t m = 1000000;
19797 char *haystack = (char *) malloc (2 * m + 1);
19798 char *needle = (char *) malloc (m + 1);
19799 /* Failure to compile this test due to missing alarm is okay,
19800 since all such platforms (mingw) also lack memmem. */
19801 signal (SIGALRM, quit);
19802 alarm (5);
19803 /* Check for quadratic performance. */
19804 if (haystack && needle)
19805 {
19806 memset (haystack, 'A', 2 * m);
19807 haystack[2 * m] = 'B';
19808 memset (needle, 'A', m);
19809 needle[m] = 'B';
19810 if (!memmem (haystack, 2 * m + 1, needle, m + 1))
19811 result |= 1;
19812 }
19813 return result;
19814
19815 ;
c971b7fa
PA
19816 return 0;
19817}
19818_ACEOF
8690e634 19819if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 19820 gl_cv_func_memmem_works_fast=yes
8690e634 19821else
6ec2e0f5 19822 gl_cv_func_memmem_works_fast=no
8690e634
JK
19823fi
19824rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19825 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 19826fi
c971b7fa
PA
19827
19828
8690e634 19829fi
6ec2e0f5
SDJ
19830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_fast" >&5
19831$as_echo "$gl_cv_func_memmem_works_fast" >&6; }
19832 case "$gl_cv_func_memmem_works_fast" in
19833 *yes) ;;
19834 *)
19835 REPLACE_MEMMEM=1
19836 ;;
19837 esac
19838 fi
c971b7fa 19839
6ec2e0f5 19840 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
8690e634
JK
19841
19842
19843
6ec2e0f5
SDJ
19844
19845
19846
19847
19848
19849 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
19850
19851 fi
19852
19853
19854
19855
19856 for ac_func in memmem
19857do :
19858 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
63a9e923 19859if test "x$ac_cv_func_memmem" = xyes; then :
6ec2e0f5
SDJ
19860 cat >>confdefs.h <<_ACEOF
19861#define HAVE_MEMMEM 1
19862_ACEOF
19863
19864fi
19865done
19866
19867 if test $ac_cv_func_memmem = yes; then
19868 HAVE_MEMMEM=1
19869 else
19870 HAVE_MEMMEM=0
19871 fi
19872
19873 if test $ac_cv_have_decl_memmem = no; then
19874 HAVE_DECL_MEMMEM=0
19875 else
19876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
19877$as_echo_n "checking whether memmem works... " >&6; }
63a9e923 19878if ${gl_cv_func_memmem_works_always+:} false; then :
c971b7fa
PA
19879 $as_echo_n "(cached) " >&6
19880else
6ec2e0f5
SDJ
19881 if test "$cross_compiling" = yes; then :
19882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19883/* end confdefs.h. */
19884
19885#ifdef __GNU_LIBRARY__
19886 #include <features.h>
19887 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
19888 || __GLIBC_MINOR__ > 12)) \
19889 || (__GLIBC__ > 2)) \
19890 || defined __UCLIBC__
19891 Lucky user
19892 #endif
19893#elif defined __CYGWIN__
19894 #include <cygwin/version.h>
19895 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
19896 Lucky user
19897 #endif
19898#else
19899 Lucky user
19900#endif
19901
19902_ACEOF
19903if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19904 $EGREP "Lucky user" >/dev/null 2>&1; then :
19905 gl_cv_func_memmem_works_always="guessing yes"
19906else
19907 gl_cv_func_memmem_works_always="guessing no"
19908fi
19909rm -f conftest*
19910
8690e634 19911
8690e634 19912else
c971b7fa
PA
19913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19914/* end confdefs.h. */
c971b7fa 19915
6ec2e0f5
SDJ
19916#include <string.h> /* for memmem */
19917#define P "_EF_BF_BD"
19918#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
19919#define NEEDLE P P P P P
19920
19921int
19922main ()
c971b7fa 19923{
8690e634 19924
6ec2e0f5
SDJ
19925 int result = 0;
19926 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
19927 result |= 1;
19928 /* Check for empty needle behavior. */
19929 {
19930 const char *haystack = "AAA";
19931 if (memmem (haystack, 3, NULL, 0) != haystack)
19932 result |= 2;
8690e634 19933 }
6ec2e0f5
SDJ
19934 return result;
19935
19936 ;
c971b7fa
PA
19937 return 0;
19938}
19939_ACEOF
8690e634 19940if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 19941 gl_cv_func_memmem_works_always=yes
c971b7fa 19942else
6ec2e0f5 19943 gl_cv_func_memmem_works_always=no
c971b7fa 19944fi
8690e634
JK
19945rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19946 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 19947fi
8690e634 19948
8690e634
JK
19949
19950fi
6ec2e0f5
SDJ
19951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
19952$as_echo "$gl_cv_func_memmem_works_always" >&6; }
19953 case "$gl_cv_func_memmem_works_always" in
8690e634 19954 *yes) ;;
6ec2e0f5
SDJ
19955 *)
19956 REPLACE_MEMMEM=1
19957 ;;
8690e634 19958 esac
c971b7fa 19959 fi
6ec2e0f5 19960 :
c971b7fa 19961
6ec2e0f5 19962 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
c971b7fa 19963
c971b7fa 19964
8690e634 19965
c971b7fa 19966
6ec2e0f5
SDJ
19967
19968
19969
19970
19971 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
19972
19973 fi
19974
19975
19976
19977
19978
19979 GNULIB_MEMMEM=1
19980
19981
19982
19983
19984
19985$as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
19986
19987
19988
19989
19990
19991
19992
19993
19994
19995 for ac_func in mempcpy
19996do :
19997 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
63a9e923 19998if test "x$ac_cv_func_mempcpy" = xyes; then :
6ec2e0f5
SDJ
19999 cat >>confdefs.h <<_ACEOF
20000#define HAVE_MEMPCPY 1
8690e634 20001_ACEOF
c971b7fa 20002
6ec2e0f5
SDJ
20003fi
20004done
c971b7fa 20005
6ec2e0f5
SDJ
20006 if test $ac_cv_func_mempcpy = no; then
20007 HAVE_MEMPCPY=0
20008 fi
8690e634 20009
6ec2e0f5 20010 if test $HAVE_MEMPCPY = 0; then
8690e634
JK
20011
20012
20013
20014
8690e634 20015
6ec2e0f5
SDJ
20016
20017
20018
20019 gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
20020
20021
8690e634 20022 :
c971b7fa 20023
6ec2e0f5 20024 fi
c971b7fa 20025
8690e634 20026
8690e634 20027
8690e634 20028
6ec2e0f5
SDJ
20029
20030 GNULIB_MEMPCPY=1
20031
20032
20033
20034
20035
20036$as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
20037
20038
20039
20040
20041
20042
20043
20044
20045 if test $ac_cv_have_decl_memrchr = no; then
20046 HAVE_DECL_MEMRCHR=0
20047 fi
20048
20049 for ac_func in memrchr
20050do :
20051 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
63a9e923 20052if test "x$ac_cv_func_memrchr" = xyes; then :
6ec2e0f5
SDJ
20053 cat >>confdefs.h <<_ACEOF
20054#define HAVE_MEMRCHR 1
c971b7fa 20055_ACEOF
6ec2e0f5 20056
c971b7fa 20057fi
6ec2e0f5 20058done
8690e634 20059
8690e634 20060
6ec2e0f5 20061 if test $ac_cv_func_memrchr = no; then
8690e634 20062
6ec2e0f5
SDJ
20063
20064
20065
20066
20067
20068
20069
20070 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
20071
20072 :
c971b7fa
PA
20073 fi
20074
20075
c971b7fa 20076
c971b7fa 20077
c971b7fa 20078
6ec2e0f5
SDJ
20079 GNULIB_MEMRCHR=1
20080
20081
20082
20083
20084
20085$as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
20086
20087
20088
20089
2d8adcbd
MM
20090
20091
20092
20093 if test $ac_cv_func_mkstemp = yes; then
20094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mkstemp" >&5
20095$as_echo_n "checking for working mkstemp... " >&6; }
63a9e923 20096if ${gl_cv_func_working_mkstemp+:} false; then :
2d8adcbd
MM
20097 $as_echo_n "(cached) " >&6
20098else
20099
20100 mkdir conftest.mkstemp
20101 if test "$cross_compiling" = yes; then :
20102 case "$host_os" in
20103 # Guess yes on glibc systems.
20104 *-gnu*) gl_cv_func_working_mkstemp="guessing yes" ;;
20105 # If we don't know, assume the worst.
20106 *) gl_cv_func_working_mkstemp="guessing no" ;;
20107 esac
20108
20109else
20110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20111/* end confdefs.h. */
20112$ac_includes_default
20113int
20114main ()
20115{
20116int result = 0;
20117 int i;
20118 off_t large = (off_t) 4294967295u;
20119 if (large < 0)
20120 large = 2147483647;
20121 umask (0);
20122 for (i = 0; i < 70; i++)
20123 {
20124 char templ[] = "conftest.mkstemp/coXXXXXX";
20125 int (*mkstemp_function) (char *) = mkstemp;
20126 int fd = mkstemp_function (templ);
20127 if (fd < 0)
20128 result |= 1;
20129 else
20130 {
20131 struct stat st;
20132 if (lseek (fd, large, SEEK_SET) != large)
20133 result |= 2;
20134 if (fstat (fd, &st) < 0)
20135 result |= 4;
20136 else if (st.st_mode & 0077)
20137 result |= 8;
20138 if (close (fd))
20139 result |= 16;
20140 }
20141 }
20142 return result;
20143 ;
20144 return 0;
20145}
20146_ACEOF
20147if ac_fn_c_try_run "$LINENO"; then :
20148 gl_cv_func_working_mkstemp=yes
20149else
20150 gl_cv_func_working_mkstemp=no
20151fi
20152rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20153 conftest.$ac_objext conftest.beam conftest.$ac_ext
20154fi
20155
20156 rm -rf conftest.mkstemp
20157
20158fi
20159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mkstemp" >&5
20160$as_echo "$gl_cv_func_working_mkstemp" >&6; }
20161 case "$gl_cv_func_working_mkstemp" in
20162 *yes) ;;
20163 *)
20164 REPLACE_MKSTEMP=1
20165 ;;
20166 esac
20167 else
20168 HAVE_MKSTEMP=0
20169 fi
20170
20171 if test $HAVE_MKSTEMP = 0 || test $REPLACE_MKSTEMP = 1; then
20172
20173
20174
20175
20176
20177
20178
20179
20180 gl_LIBOBJS="$gl_LIBOBJS mkstemp.$ac_objext"
20181
20182
20183
20184 fi
20185
20186
20187
20188
20189
20190 GNULIB_MKSTEMP=1
20191
20192
20193
20194
20195
20196$as_echo "#define GNULIB_TEST_MKSTEMP 1" >>confdefs.h
20197
20198
20199
20200
6ec2e0f5
SDJ
20201 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
20202
20203
20204
c971b7fa 20205
c971b7fa 20206
c971b7fa
PA
20207
20208
8690e634 20209
6ec2e0f5 20210 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
8690e634 20211
6ec2e0f5 20212 fi
8690e634 20213
6ec2e0f5 20214 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
8690e634
JK
20215
20216
20217
20218
20219
20220
8690e634
JK
20221
20222
6ec2e0f5 20223 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
8690e634 20224
a512b375 20225 fi
8690e634
JK
20226
20227
20228
6ec2e0f5
SDJ
20229 case "$host_os" in
20230 mingw* | pw*)
20231 REPLACE_OPEN=1
20232 ;;
20233 *)
20234
20235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
20236$as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
63a9e923 20237if ${gl_cv_func_open_slash+:} false; then :
6ec2e0f5
SDJ
20238 $as_echo_n "(cached) " >&6
20239else
20240 # Assume that if we have lstat, we can also check symlinks.
20241 if test $ac_cv_func_lstat = yes; then
20242 touch conftest.tmp
20243 ln -s conftest.tmp conftest.lnk
20244 fi
20245 if test "$cross_compiling" = yes; then :
8690e634 20246
6ec2e0f5
SDJ
20247 case "$host_os" in
20248 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
20249 gl_cv_func_open_slash="guessing no" ;;
20250 *)
20251 gl_cv_func_open_slash="guessing yes" ;;
20252 esac
8690e634 20253
6ec2e0f5
SDJ
20254else
20255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20256/* end confdefs.h. */
20257
20258#include <fcntl.h>
20259#if HAVE_UNISTD_H
20260# include <unistd.h>
20261#endif
20262int main ()
20263{
20264 int result = 0;
20265#if HAVE_LSTAT
20266 if (open ("conftest.lnk/", O_RDONLY) != -1)
20267 result |= 1;
20268#endif
20269 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
20270 result |= 2;
20271 return result;
20272}
20273_ACEOF
20274if ac_fn_c_try_run "$LINENO"; then :
20275 gl_cv_func_open_slash=yes
20276else
20277 gl_cv_func_open_slash=no
20278fi
20279rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20280 conftest.$ac_objext conftest.beam conftest.$ac_ext
20281fi
8690e634 20282
6ec2e0f5 20283 rm -f conftest.sl conftest.tmp conftest.lnk
8690e634 20284
6ec2e0f5
SDJ
20285fi
20286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
20287$as_echo "$gl_cv_func_open_slash" >&6; }
20288 case "$gl_cv_func_open_slash" in
20289 *no)
8690e634 20290
6ec2e0f5 20291$as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
8690e634 20292
6ec2e0f5
SDJ
20293 REPLACE_OPEN=1
20294 ;;
20295 esac
20296 ;;
20297 esac
8690e634 20298
6ec2e0f5 20299 if test $REPLACE_OPEN = 0; then
c971b7fa
PA
20300
20301
20302
6ec2e0f5
SDJ
20303 if test $ac_cv_func_fchdir = no; then
20304 HAVE_FCHDIR=0
20305 fi
c971b7fa 20306
6ec2e0f5
SDJ
20307 if test $HAVE_FCHDIR = 0; then
20308 REPLACE_OPEN=1
20309 fi
20310 fi
c971b7fa
PA
20311
20312
20313
6ec2e0f5 20314 if test $REPLACE_OPEN = 1; then
c971b7fa
PA
20315
20316
20317
20318
20319
c971b7fa
PA
20320
20321
c971b7fa 20322
6ec2e0f5 20323 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
c971b7fa 20324
c971b7fa
PA
20325
20326
6ec2e0f5
SDJ
20327 :
20328
a512b375 20329 fi
c971b7fa
PA
20330
20331
20332
20333
20334
6ec2e0f5 20335 GNULIB_OPEN=1
c971b7fa
PA
20336
20337
20338
20339
20340
6ec2e0f5 20341$as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
c971b7fa
PA
20342
20343
20344
20345
20346
c971b7fa 20347
c971b7fa 20348
63ce7108 20349
6ec2e0f5
SDJ
20350 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
20351 yes+*yes)
20352 ;;
20353 yes+*)
20354 # Solaris 9 has *at functions, but uniformly mishandles trailing
20355 # slash in all of them.
20356 REPLACE_OPENAT=1
20357 ;;
20358 *)
20359 HAVE_OPENAT=0
20360 ;;
20361 esac
63ce7108 20362
6ec2e0f5 20363 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
63ce7108 20364
63ce7108 20365
63ce7108 20366
63ce7108 20367
63ce7108
TT
20368
20369
63ce7108 20370
63ce7108 20371
6ec2e0f5 20372 gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
63ce7108
TT
20373
20374
20375
6ec2e0f5 20376 :
63ce7108 20377
6ec2e0f5 20378 fi
63ce7108
TT
20379
20380
6ec2e0f5
SDJ
20381cat >>confdefs.h <<_ACEOF
20382#define GNULIB_OPENAT 1
20383_ACEOF
63ce7108 20384
63ce7108 20385
63ce7108
TT
20386
20387
20388
20389
6ec2e0f5 20390 GNULIB_OPENAT=1
63ce7108 20391
63ce7108 20392
63ce7108 20393
63ce7108 20394
63ce7108 20395
6ec2e0f5 20396$as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
63ce7108
TT
20397
20398
63ce7108 20399
63ce7108 20400
63ce7108 20401
63ce7108 20402
6ec2e0f5
SDJ
20403 for ac_func in opendir
20404do :
20405 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
63a9e923 20406if test "x$ac_cv_func_opendir" = xyes; then :
6ec2e0f5
SDJ
20407 cat >>confdefs.h <<_ACEOF
20408#define HAVE_OPENDIR 1
63ce7108 20409_ACEOF
6ec2e0f5 20410
63ce7108 20411fi
6ec2e0f5 20412done
63ce7108 20413
6ec2e0f5
SDJ
20414 if test $ac_cv_func_opendir = no; then
20415 HAVE_OPENDIR=0
20416 fi
63ce7108 20417
6ec2e0f5
SDJ
20418
20419
20420
20421 if test $ac_cv_func_fchdir = no; then
20422 HAVE_FCHDIR=0
63ce7108 20423 fi
63ce7108 20424
6ec2e0f5
SDJ
20425 if test $HAVE_FCHDIR = 0; then
20426 if test $HAVE_OPENDIR = 1; then
20427 REPLACE_OPENDIR=1
20428 fi
20429 fi
20430
20431 case $host_os,$HAVE_OPENDIR in
20432 os2*,1)
20433 REPLACE_OPENDIR=1;;
20434 esac
20435
20436 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
63ce7108
TT
20437
20438
20439
20440
20441
20442
20443
20444
6ec2e0f5 20445 gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
63ce7108
TT
20446
20447 fi
20448
20449
20450
20451
20452
6ec2e0f5 20453 GNULIB_OPENDIR=1
63ce7108
TT
20454
20455
20456
20457
63ce7108 20458
6ec2e0f5 20459$as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
63ce7108
TT
20460
20461
20462
20463
20464
20465
20466
2196f55f
YQ
20467
20468
8424cc97
SM
20469
20470 for ac_func in rawmemchr
20471do :
20472 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
63a9e923 20473if test "x$ac_cv_func_rawmemchr" = xyes; then :
8424cc97
SM
20474 cat >>confdefs.h <<_ACEOF
20475#define HAVE_RAWMEMCHR 1
20476_ACEOF
20477
20478fi
20479done
20480
20481 if test $ac_cv_func_rawmemchr = no; then
20482 HAVE_RAWMEMCHR=0
20483 fi
20484
20485 if test $HAVE_RAWMEMCHR = 0; then
20486
20487
20488
20489
20490
20491
20492
20493
20494 gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
20495
20496 :
20497 fi
20498
20499
20500
20501
20502
20503 GNULIB_RAWMEMCHR=1
20504
20505
20506
20507
20508
20509$as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
20510
20511
20512
20513
20514
20515
6ec2e0f5
SDJ
20516 for ac_func in readdir
20517do :
20518 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
63a9e923 20519if test "x$ac_cv_func_readdir" = xyes; then :
6ec2e0f5
SDJ
20520 cat >>confdefs.h <<_ACEOF
20521#define HAVE_READDIR 1
20522_ACEOF
20523
20524fi
20525done
20526
20527 if test $ac_cv_func_readdir = no; then
20528 HAVE_READDIR=0
20529 fi
20530
20531 if test $HAVE_READDIR = 0; then
20532
20533
20534
20535
20536
20537
20538
20539
20540 gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
20541
20542 fi
20543
20544
20545
20546
20547
20548 GNULIB_READDIR=1
20549
20550
20551
20552
20553
20554$as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
20555
20556
20557
20558
20559
20560
2196f55f
YQ
20561 if test $ac_cv_func_readlink = no; then
20562 HAVE_READLINK=0
20563 else
20564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
20565$as_echo_n "checking whether readlink signature is correct... " >&6; }
63a9e923 20566if ${gl_cv_decl_readlink_works+:} false; then :
2196f55f
YQ
20567 $as_echo_n "(cached) " >&6
20568else
20569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20570/* end confdefs.h. */
20571#include <unistd.h>
20572 /* Cause compilation failure if original declaration has wrong type. */
20573 ssize_t readlink (const char *, char *, size_t);
20574int
20575main ()
20576{
20577
20578 ;
20579 return 0;
20580}
20581_ACEOF
20582if ac_fn_c_try_compile "$LINENO"; then :
20583 gl_cv_decl_readlink_works=yes
20584else
20585 gl_cv_decl_readlink_works=no
20586fi
20587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20588fi
20589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
20590$as_echo "$gl_cv_decl_readlink_works" >&6; }
20591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
20592$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
63a9e923 20593if ${gl_cv_func_readlink_works+:} false; then :
2196f55f
YQ
20594 $as_echo_n "(cached) " >&6
20595else
20596 # We have readlink, so assume ln -s works.
20597 ln -s conftest.no-such conftest.link
20598 ln -s conftest.link conftest.lnk2
20599 if test "$cross_compiling" = yes; then :
20600 case "$host_os" in
20601 # Guess yes on glibc systems.
20602 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
20603 # If we don't know, assume the worst.
20604 *) gl_cv_func_readlink_works="guessing no" ;;
20605 esac
20606
20607else
20608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20609/* end confdefs.h. */
20610#include <unistd.h>
20611
20612int
20613main ()
20614{
20615char buf[20];
20616 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
20617 ;
20618 return 0;
20619}
20620_ACEOF
20621if ac_fn_c_try_run "$LINENO"; then :
20622 gl_cv_func_readlink_works=yes
20623else
20624 gl_cv_func_readlink_works=no
20625fi
20626rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20627 conftest.$ac_objext conftest.beam conftest.$ac_ext
20628fi
20629
20630 rm -f conftest.link conftest.lnk2
20631fi
20632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
20633$as_echo "$gl_cv_func_readlink_works" >&6; }
20634 case "$gl_cv_func_readlink_works" in
20635 *yes)
20636 if test "$gl_cv_decl_readlink_works" != yes; then
20637 REPLACE_READLINK=1
20638 fi
20639 ;;
20640 *)
20641
20642$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
20643
20644 REPLACE_READLINK=1
20645 ;;
20646 esac
20647 fi
20648
20649 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
20650
20651
20652
20653
20654
20655
20656
20657
20658 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
20659
20660
20661 :
20662
20663 fi
20664
20665
20666
20667
20668
20669 GNULIB_READLINK=1
20670
20671
20672
20673
20674
20675$as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
20676
20677
20678
20679
6a29c58e
YQ
20680
20681
6ec2e0f5
SDJ
20682 if test $gl_cv_func_malloc_posix = yes; then
20683
20684$as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
20685
20686 else
20687 REPLACE_REALLOC=1
20688 fi
20689
20690 if test $REPLACE_REALLOC = 1; then
20691
20692
20693
20694
20695
20696
20697
20698
20699 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
20700
20701 fi
20702
20703
20704
20705
20706
20707 GNULIB_REALLOC_POSIX=1
20708
20709
20710
20711
20712
20713$as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
20714
20715
20716
20717
20718
20719
6a29c58e
YQ
20720
20721
20722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
20723$as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
63a9e923 20724if ${gl_cv_func_rename_slash_dst_works+:} false; then :
6a29c58e
YQ
20725 $as_echo_n "(cached) " >&6
20726else
20727 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
20728 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
63a9e923 20729 as_fn_error $? "cannot create temporary files" "$LINENO" 5
6a29c58e
YQ
20730 # Assume that if we have lstat, we can also check symlinks.
20731 if test $ac_cv_func_lstat = yes; then
20732 ln -s conftest.f conftest.lnk
20733 fi
20734 if test "$cross_compiling" = yes; then :
20735 case "$host_os" in
20736 # Guess yes on glibc systems.
20737 *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
20738 # If we don't know, assume the worst.
20739 *) gl_cv_func_rename_slash_dst_works="guessing no" ;;
20740 esac
20741
20742else
20743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20744/* end confdefs.h. */
20745
20746# include <stdio.h>
20747# include <stdlib.h>
20748
20749int
20750main ()
20751{
20752int result = 0;
20753 if (rename ("conftest.f1", "conftest.f2/") == 0)
20754 result |= 1;
20755 if (rename ("conftest.d1", "conftest.d2/") != 0)
20756 result |= 2;
20757#if HAVE_LSTAT
20758 if (rename ("conftest.f", "conftest.lnk/") == 0)
20759 result |= 4;
20760#endif
20761 return result;
20762
20763 ;
20764 return 0;
20765}
20766_ACEOF
20767if ac_fn_c_try_run "$LINENO"; then :
20768 gl_cv_func_rename_slash_dst_works=yes
20769else
20770 gl_cv_func_rename_slash_dst_works=no
20771fi
20772rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20773 conftest.$ac_objext conftest.beam conftest.$ac_ext
20774fi
20775
20776 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
20777
20778fi
20779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
20780$as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
20781 case "$gl_cv_func_rename_slash_dst_works" in
20782 *yes) ;;
20783 *)
20784 REPLACE_RENAME=1
20785
20786$as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
20787
20788 ;;
20789 esac
20790
20791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
20792$as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
63a9e923 20793if ${gl_cv_func_rename_slash_src_works+:} false; then :
6a29c58e
YQ
20794 $as_echo_n "(cached) " >&6
20795else
20796 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
20797 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
63a9e923 20798 as_fn_error $? "cannot create temporary files" "$LINENO" 5
6a29c58e
YQ
20799 # Assume that if we have lstat, we can also check symlinks.
20800 if test $ac_cv_func_lstat = yes; then
20801 ln -s conftest.f conftest.lnk
20802 fi
20803 if test "$cross_compiling" = yes; then :
20804 case "$host_os" in
20805 # Guess yes on glibc systems.
20806 *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
20807 # If we don't know, assume the worst.
20808 *) gl_cv_func_rename_slash_src_works="guessing no" ;;
20809 esac
20810
20811else
20812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20813/* end confdefs.h. */
20814
20815# include <stdio.h>
20816# include <stdlib.h>
20817
20818int
20819main ()
20820{
20821int result = 0;
20822 if (rename ("conftest.f1/", "conftest.d3") == 0)
20823 result |= 1;
20824 if (rename ("conftest.d1/", "conftest.d2") != 0)
20825 result |= 2;
20826#if HAVE_LSTAT
20827 if (rename ("conftest.lnk/", "conftest.f") == 0)
20828 result |= 4;
20829#endif
20830 return result;
20831
20832 ;
20833 return 0;
20834}
20835_ACEOF
20836if ac_fn_c_try_run "$LINENO"; then :
20837 gl_cv_func_rename_slash_src_works=yes
20838else
20839 gl_cv_func_rename_slash_src_works=no
20840fi
20841rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20842 conftest.$ac_objext conftest.beam conftest.$ac_ext
20843fi
20844
20845 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
20846
20847fi
20848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
20849$as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
20850 case "$gl_cv_func_rename_slash_src_works" in
20851 *yes) ;;
20852 *)
20853 REPLACE_RENAME=1
20854
20855$as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
20856
20857 ;;
20858 esac
20859
20860
20861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
20862$as_echo_n "checking whether rename manages hard links correctly... " >&6; }
63a9e923 20863if ${gl_cv_func_rename_link_works+:} false; then :
6a29c58e
YQ
20864 $as_echo_n "(cached) " >&6
20865else
20866 if test $ac_cv_func_link = yes; then
20867 rm -rf conftest.f conftest.f1
20868 if touch conftest.f && ln conftest.f conftest.f1 &&
20869 set x `ls -i conftest.f conftest.f1` && test "" = ""; then
20870 if test "$cross_compiling" = yes; then :
20871 case "$host_os" in
20872 # Guess yes on glibc systems.
20873 *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
20874 # If we don't know, assume the worst.
20875 *) gl_cv_func_rename_link_works="guessing no" ;;
20876 esac
20877
20878else
20879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20880/* end confdefs.h. */
20881
20882# include <stdio.h>
20883# include <stdlib.h>
20884# include <unistd.h>
20885
20886int
20887main ()
20888{
20889int result = 0;
20890 if (rename ("conftest.f", "conftest.f1"))
20891 result |= 1;
20892 if (unlink ("conftest.f1"))
20893 result |= 2;
20894 if (rename ("conftest.f", "conftest.f"))
20895 result |= 4;
20896 if (rename ("conftest.f1", "conftest.f1") == 0)
20897 result |= 8;
20898 return result;
20899
20900 ;
20901 return 0;
20902}
20903_ACEOF
20904if ac_fn_c_try_run "$LINENO"; then :
20905 gl_cv_func_rename_link_works=yes
20906else
20907 gl_cv_func_rename_link_works=no
20908fi
20909rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20910 conftest.$ac_objext conftest.beam conftest.$ac_ext
20911fi
20912
20913 else
20914 gl_cv_func_rename_link_works="guessing no"
20915 fi
20916 rm -rf conftest.f conftest.f1
20917 else
20918 gl_cv_func_rename_link_works=yes
20919 fi
20920
20921fi
20922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
20923$as_echo "$gl_cv_func_rename_link_works" >&6; }
20924 case "$gl_cv_func_rename_link_works" in
20925 *yes) ;;
20926 *)
20927 REPLACE_RENAME=1
20928
20929$as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
20930
20931 ;;
20932 esac
20933
20934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
20935$as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
63a9e923 20936if ${gl_cv_func_rename_dest_works+:} false; then :
6a29c58e
YQ
20937 $as_echo_n "(cached) " >&6
20938else
20939 rm -rf conftest.f conftest.d1 conftest.d2
20940 touch conftest.f && mkdir conftest.d1 conftest.d2 ||
63a9e923 20941 as_fn_error $? "cannot create temporary files" "$LINENO" 5
6a29c58e
YQ
20942 if test "$cross_compiling" = yes; then :
20943 case "$host_os" in
20944 # Guess yes on glibc systems.
20945 *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
20946 # If we don't know, assume the worst.
20947 *) gl_cv_func_rename_dest_works="guessing no" ;;
20948 esac
20949
20950else
20951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20952/* end confdefs.h. */
20953
20954# include <stdio.h>
20955# include <stdlib.h>
20956
20957int
20958main ()
20959{
20960int result = 0;
20961 if (rename ("conftest.d1", "conftest.d2") != 0)
20962 result |= 1;
20963 if (rename ("conftest.d2", "conftest.f") == 0)
20964 result |= 2;
20965 return result;
20966
20967 ;
20968 return 0;
20969}
20970_ACEOF
20971if ac_fn_c_try_run "$LINENO"; then :
20972 gl_cv_func_rename_dest_works=yes
20973else
20974 gl_cv_func_rename_dest_works=no
20975fi
20976rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20977 conftest.$ac_objext conftest.beam conftest.$ac_ext
20978fi
20979
20980 rm -rf conftest.f conftest.d1 conftest.d2
20981
20982fi
20983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
20984$as_echo "$gl_cv_func_rename_dest_works" >&6; }
20985 case "$gl_cv_func_rename_dest_works" in
20986 *yes) ;;
20987 *)
20988 REPLACE_RENAME=1
20989
20990$as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
20991
20992 ;;
20993 esac
20994
20995 if test $REPLACE_RENAME = 1; then
20996
20997
20998
20999
21000
21001
21002
21003
21004 gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
21005
21006 fi
21007
21008
21009
21010
21011
21012 GNULIB_RENAME=1
21013
21014
21015
21016
21017
21018$as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
21019
21020
21021
21022
21023
21024
6ec2e0f5
SDJ
21025 for ac_func in rewinddir
21026do :
21027 ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
63a9e923 21028if test "x$ac_cv_func_rewinddir" = xyes; then :
6ec2e0f5
SDJ
21029 cat >>confdefs.h <<_ACEOF
21030#define HAVE_REWINDDIR 1
21031_ACEOF
21032
21033fi
21034done
21035
21036 if test $ac_cv_func_rewinddir = no; then
21037 HAVE_REWINDDIR=0
21038 fi
21039
21040 if test $HAVE_REWINDDIR = 0; then
21041
21042
21043
21044
21045
21046
21047
21048
21049 gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
21050
21051 fi
21052
21053
21054
21055
21056
21057 GNULIB_REWINDDIR=1
21058
21059
21060
21061
21062
21063$as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
21064
21065
21066
21067
21068
21069
6a29c58e
YQ
21070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
21071$as_echo_n "checking whether rmdir works... " >&6; }
63a9e923 21072if ${gl_cv_func_rmdir_works+:} false; then :
6a29c58e
YQ
21073 $as_echo_n "(cached) " >&6
21074else
21075 mkdir conftest.dir
21076 touch conftest.file
21077 if test "$cross_compiling" = yes; then :
21078 case "$host_os" in
21079 # Guess yes on glibc systems.
21080 *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
21081 # If we don't know, assume the worst.
21082 *) gl_cv_func_rmdir_works="guessing no" ;;
21083 esac
21084
21085else
21086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21087/* end confdefs.h. */
21088#include <stdio.h>
21089 #include <errno.h>
21090 #if HAVE_UNISTD_H
21091 # include <unistd.h>
21092 #else /* on Windows with MSVC */
21093 # include <direct.h>
21094 #endif
21095
21096int
21097main ()
21098{
21099int result = 0;
21100 if (!rmdir ("conftest.file/"))
21101 result |= 1;
21102 else if (errno != ENOTDIR)
21103 result |= 2;
21104 if (!rmdir ("conftest.dir/./"))
21105 result |= 4;
21106 return result;
21107
21108 ;
21109 return 0;
21110}
21111_ACEOF
21112if ac_fn_c_try_run "$LINENO"; then :
21113 gl_cv_func_rmdir_works=yes
21114else
21115 gl_cv_func_rmdir_works=no
21116fi
21117rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21118 conftest.$ac_objext conftest.beam conftest.$ac_ext
21119fi
21120
21121 rm -rf conftest.dir conftest.file
21122fi
21123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
21124$as_echo "$gl_cv_func_rmdir_works" >&6; }
21125 case "$gl_cv_func_rmdir_works" in
21126 *yes) ;;
21127 *)
21128 REPLACE_RMDIR=1
21129 ;;
21130 esac
21131
21132 if test $REPLACE_RMDIR = 1; then
21133
21134
21135
21136
21137
21138
21139
21140
21141 gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
21142
21143 fi
21144
21145
21146
21147
21148
21149 GNULIB_RMDIR=1
21150
21151
21152
21153
21154
21155$as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
21156
21157
21158
21159
0750520d 21160
6ec2e0f5
SDJ
21161
21162
21163
2d8adcbd
MM
21164
21165
21166
21167 if test $ac_cv_func_secure_getenv = no; then
21168 HAVE_SECURE_GETENV=0
21169 fi
21170
21171 if test $HAVE_SECURE_GETENV = 0; then
21172
21173
21174
21175
21176
21177
21178
21179
21180 gl_LIBOBJS="$gl_LIBOBJS secure_getenv.$ac_objext"
21181
21182
21183 for ac_func in __secure_getenv
21184do :
21185 ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
63a9e923 21186if test "x$ac_cv_func___secure_getenv" = xyes; then :
2d8adcbd
MM
21187 cat >>confdefs.h <<_ACEOF
21188#define HAVE___SECURE_GETENV 1
21189_ACEOF
21190
21191fi
21192done
21193
21194 if test $ac_cv_func___secure_getenv = no; then
21195 for ac_func in issetugid
21196do :
21197 ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
63a9e923 21198if test "x$ac_cv_func_issetugid" = xyes; then :
2d8adcbd
MM
21199 cat >>confdefs.h <<_ACEOF
21200#define HAVE_ISSETUGID 1
21201_ACEOF
21202
21203fi
21204done
21205
21206 fi
21207
21208
21209 fi
21210
21211
21212
21213
21214
21215 GNULIB_SECURE_GETENV=1
21216
21217
21218
21219
21220
21221$as_echo "#define GNULIB_TEST_SECURE_GETENV 1" >>confdefs.h
21222
21223
21224
21225
21226
3d99e817
AK
21227 if test $ac_cv_func_setenv = no; then
21228 HAVE_SETENV=0
21229 else
21230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
21231$as_echo_n "checking whether setenv validates arguments... " >&6; }
63a9e923 21232if ${gl_cv_func_setenv_works+:} false; then :
3d99e817
AK
21233 $as_echo_n "(cached) " >&6
21234else
21235 if test "$cross_compiling" = yes; then :
21236 case "$host_os" in
21237 # Guess yes on glibc systems.
21238 *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
21239 # If we don't know, assume the worst.
21240 *) gl_cv_func_setenv_works="guessing no" ;;
21241 esac
21242
21243else
21244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21245/* end confdefs.h. */
21246
21247 #include <stdlib.h>
21248 #include <errno.h>
21249 #include <string.h>
21250
21251int
21252main ()
21253{
21254
21255 int result = 0;
21256 {
21257 if (setenv ("", "", 0) != -1)
21258 result |= 1;
21259 else if (errno != EINVAL)
21260 result |= 2;
21261 }
21262 {
21263 if (setenv ("a", "=", 1) != 0)
21264 result |= 4;
21265 else if (strcmp (getenv ("a"), "=") != 0)
21266 result |= 8;
21267 }
21268 return result;
21269
21270 ;
21271 return 0;
21272}
21273_ACEOF
21274if ac_fn_c_try_run "$LINENO"; then :
21275 gl_cv_func_setenv_works=yes
21276else
21277 gl_cv_func_setenv_works=no
21278fi
21279rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21280 conftest.$ac_objext conftest.beam conftest.$ac_ext
21281fi
21282
21283fi
21284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
21285$as_echo "$gl_cv_func_setenv_works" >&6; }
21286 case "$gl_cv_func_setenv_works" in
21287 *yes) ;;
21288 *)
21289 REPLACE_SETENV=1
21290 ;;
21291 esac
21292 fi
21293
21294 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
21295
21296
21297
21298
21299
21300
21301
21302
21303 gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
21304
21305 fi
21306
21307
21308
21309
21310
21311 GNULIB_SETENV=1
21312
21313
21314
21315
21316
21317$as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
21318
21319
21320
21321
21322
0750520d
PA
21323
21324
21325
21326
21327
21328
21329
21330
21331
21332 if test $gl_cv_have_include_next = yes; then
21333 gl_cv_next_signal_h='<'signal.h'>'
21334 else
21335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
21336$as_echo_n "checking absolute name of <signal.h>... " >&6; }
63a9e923 21337if ${gl_cv_next_signal_h+:} false; then :
0750520d
PA
21338 $as_echo_n "(cached) " >&6
21339else
21340
21341
21342
21343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21344/* end confdefs.h. */
21345#include <signal.h>
21346_ACEOF
21347 case "$host_os" in
21348 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21349 *) gl_absname_cpp="$ac_cpp" ;;
21350 esac
21351
21352 case "$host_os" in
21353 mingw*)
21354 gl_dirsep_regex='[/\\]'
21355 ;;
21356 *)
21357 gl_dirsep_regex='\/'
21358 ;;
21359 esac
21360 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21361 gl_header_literal_regex=`echo 'signal.h' \
21362 | sed -e "$gl_make_literal_regex_sed"`
21363 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21364 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21365 s|^/[^/]|//&|
21366 p
21367 q
21368 }'
21369
21370 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21371 sed -n "$gl_absolute_header_sed"`
21372
21373 gl_header=$gl_cv_absolute_signal_h
21374 gl_cv_next_signal_h='"'$gl_header'"'
21375
21376
21377fi
21378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
21379$as_echo "$gl_cv_next_signal_h" >&6; }
21380 fi
21381 NEXT_SIGNAL_H=$gl_cv_next_signal_h
21382
21383 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21384 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21385 gl_next_as_first_directive='<'signal.h'>'
21386 else
21387 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21388 gl_next_as_first_directive=$gl_cv_next_signal_h
21389 fi
21390 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
21391
21392
21393
21394
21395
21396# AIX declares sig_atomic_t to already include volatile, and C89 compilers
21397# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
21398 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
21399#include <signal.h>
21400
21401"
63a9e923 21402if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
0750520d
PA
21403
21404else
21405 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
21406fi
21407
21408
21409
21410
21411
21412
21413
21414 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
21415#include <signal.h>
21416
21417"
63a9e923 21418if test "x$ac_cv_type_sighandler_t" = xyes; then :
0750520d
PA
21419
21420else
21421 HAVE_SIGHANDLER_T=0
21422fi
21423
21424
21425
21426 for gl_func in pthread_sigmask sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask; do
21427 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
21428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
21429$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
63a9e923 21430if eval \${$as_gl_Symbol+:} false; then :
0750520d
PA
21431 $as_echo_n "(cached) " >&6
21432else
21433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21434/* end confdefs.h. */
21435#include <signal.h>
21436
21437int
21438main ()
21439{
21440#undef $gl_func
21441 (void) $gl_func;
21442 ;
21443 return 0;
21444}
21445_ACEOF
21446if ac_fn_c_try_compile "$LINENO"; then :
21447 eval "$as_gl_Symbol=yes"
21448else
21449 eval "$as_gl_Symbol=no"
21450fi
21451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21452fi
21453eval ac_res=\$$as_gl_Symbol
21454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21455$as_echo "$ac_res" >&6; }
63a9e923 21456 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
0750520d
PA
21457 cat >>confdefs.h <<_ACEOF
21458#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
21459_ACEOF
21460
21461 eval ac_cv_have_decl_$gl_func=yes
21462fi
21463 done
21464
21465
21466
63ce7108
TT
21467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
21468$as_echo_n "checking for ssize_t... " >&6; }
63a9e923 21469if ${gt_cv_ssize_t+:} false; then :
63ce7108
TT
21470 $as_echo_n "(cached) " >&6
21471else
21472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21473/* end confdefs.h. */
21474#include <sys/types.h>
21475int
21476main ()
21477{
21478int x = sizeof (ssize_t *) + sizeof (ssize_t);
21479 return !x;
21480 ;
21481 return 0;
21482}
21483_ACEOF
21484if ac_fn_c_try_compile "$LINENO"; then :
21485 gt_cv_ssize_t=yes
21486else
21487 gt_cv_ssize_t=no
21488fi
21489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21490fi
21491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
21492$as_echo "$gt_cv_ssize_t" >&6; }
21493 if test $gt_cv_ssize_t = no; then
21494
21495$as_echo "#define ssize_t int" >>confdefs.h
21496
21497 fi
21498
21499
21500
21501
2196f55f
YQ
21502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
21503$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
63a9e923 21504if ${gl_cv_func_stat_dir_slash+:} false; then :
2196f55f
YQ
21505 $as_echo_n "(cached) " >&6
21506else
21507 if test "$cross_compiling" = yes; then :
21508 case $host_os in
21509 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
21510 *) gl_cv_func_stat_dir_slash="guessing yes";;
21511 esac
21512else
21513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21514/* end confdefs.h. */
21515#include <sys/stat.h>
21516
21517int
21518main ()
21519{
21520struct stat st; return stat (".", &st) != stat ("./", &st);
21521 ;
21522 return 0;
21523}
21524_ACEOF
21525if ac_fn_c_try_run "$LINENO"; then :
21526 gl_cv_func_stat_dir_slash=yes
21527else
21528 gl_cv_func_stat_dir_slash=no
21529fi
21530rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21531 conftest.$ac_objext conftest.beam conftest.$ac_ext
21532fi
21533
21534fi
21535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
21536$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
21537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
21538$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
63a9e923 21539if ${gl_cv_func_stat_file_slash+:} false; then :
2196f55f
YQ
21540 $as_echo_n "(cached) " >&6
21541else
21542 touch conftest.tmp
21543 # Assume that if we have lstat, we can also check symlinks.
21544 if test $ac_cv_func_lstat = yes; then
21545 ln -s conftest.tmp conftest.lnk
21546 fi
21547 if test "$cross_compiling" = yes; then :
21548 case "$host_os" in
21549 # Guess yes on glibc systems.
21550 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
21551 # If we don't know, assume the worst.
21552 *) gl_cv_func_stat_file_slash="guessing no" ;;
21553 esac
21554
21555else
21556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21557/* end confdefs.h. */
21558#include <sys/stat.h>
21559
21560int
21561main ()
21562{
21563int result = 0;
21564 struct stat st;
21565 if (!stat ("conftest.tmp/", &st))
21566 result |= 1;
21567#if HAVE_LSTAT
21568 if (!stat ("conftest.lnk/", &st))
21569 result |= 2;
21570#endif
21571 return result;
21572
21573 ;
21574 return 0;
21575}
21576_ACEOF
21577if ac_fn_c_try_run "$LINENO"; then :
21578 gl_cv_func_stat_file_slash=yes
21579else
21580 gl_cv_func_stat_file_slash=no
21581fi
21582rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21583 conftest.$ac_objext conftest.beam conftest.$ac_ext
21584fi
21585
21586 rm -f conftest.tmp conftest.lnk
21587fi
21588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
21589$as_echo "$gl_cv_func_stat_file_slash" >&6; }
21590 case $gl_cv_func_stat_dir_slash in
21591 *no) REPLACE_STAT=1
21592
21593$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
21594;;
21595 esac
21596 case $gl_cv_func_stat_file_slash in
21597 *no) REPLACE_STAT=1
21598
21599$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
21600;;
21601 esac
21602
21603 if test $REPLACE_STAT = 1; then
21604
21605
21606
21607
21608
21609
21610
21611
21612 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
21613
21614 :
21615 fi
21616
21617
21618
21619
21620
21621 GNULIB_STAT=1
21622
21623
21624
21625
21626
21627$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
21628
21629
21630
21631
21632
21633
63ce7108
TT
21634 # Define two additional variables used in the Makefile substitution.
21635
21636 if test "$ac_cv_header_stdbool_h" = yes; then
21637 STDBOOL_H=''
21638 else
21639 STDBOOL_H='stdbool.h'
21640 fi
21641
21642 if test -n "$STDBOOL_H"; then
21643 GL_GENERATE_STDBOOL_H_TRUE=
21644 GL_GENERATE_STDBOOL_H_FALSE='#'
21645else
21646 GL_GENERATE_STDBOOL_H_TRUE='#'
21647 GL_GENERATE_STDBOOL_H_FALSE=
21648fi
21649
21650
21651 if test "$ac_cv_type__Bool" = yes; then
21652 HAVE__BOOL=1
21653 else
21654 HAVE__BOOL=0
21655 fi
21656
21657
21658
21659
21660
21661 STDDEF_H=
4a626d0a
PA
21662 ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
21663
21664"
63a9e923 21665if test "x$ac_cv_type_max_align_t" = xyes; then :
4a626d0a
PA
21666
21667else
21668 HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
21669fi
21670
63ce7108
TT
21671 if test $gt_cv_c_wchar_t = no; then
21672 HAVE_WCHAR_T=0
21673 STDDEF_H=stddef.h
21674 fi
21675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
21676$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
63a9e923 21677if ${gl_cv_decl_null_works+:} false; then :
63ce7108
TT
21678 $as_echo_n "(cached) " >&6
21679else
21680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21681/* end confdefs.h. */
21682#include <stddef.h>
21683 int test[2 * (sizeof NULL == sizeof (void *)) -1];
21684
21685int
21686main ()
21687{
21688
21689 ;
21690 return 0;
21691}
21692_ACEOF
21693if ac_fn_c_try_compile "$LINENO"; then :
21694 gl_cv_decl_null_works=yes
21695else
21696 gl_cv_decl_null_works=no
21697fi
21698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21699fi
21700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
21701$as_echo "$gl_cv_decl_null_works" >&6; }
21702 if test $gl_cv_decl_null_works = no; then
21703 REPLACE_NULL=1
21704 STDDEF_H=stddef.h
21705 fi
21706
21707 if test -n "$STDDEF_H"; then
21708 GL_GENERATE_STDDEF_H_TRUE=
21709 GL_GENERATE_STDDEF_H_FALSE='#'
21710else
21711 GL_GENERATE_STDDEF_H_TRUE='#'
21712 GL_GENERATE_STDDEF_H_FALSE=
21713fi
21714
21715 if test -n "$STDDEF_H"; then
21716
21717
21718
21719
21720
21721
21722
21723
21724 if test $gl_cv_have_include_next = yes; then
21725 gl_cv_next_stddef_h='<'stddef.h'>'
21726 else
21727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
21728$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
63a9e923 21729if ${gl_cv_next_stddef_h+:} false; then :
63ce7108
TT
21730 $as_echo_n "(cached) " >&6
21731else
21732
4a626d0a
PA
21733
21734
21735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63ce7108
TT
21736/* end confdefs.h. */
21737#include <stddef.h>
63ce7108 21738_ACEOF
4a626d0a
PA
21739 case "$host_os" in
21740 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21741 *) gl_absname_cpp="$ac_cpp" ;;
21742 esac
63ce7108 21743
4a626d0a
PA
21744 case "$host_os" in
21745 mingw*)
21746 gl_dirsep_regex='[/\\]'
21747 ;;
21748 *)
21749 gl_dirsep_regex='\/'
21750 ;;
21751 esac
21752 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21753 gl_header_literal_regex=`echo 'stddef.h' \
21754 | sed -e "$gl_make_literal_regex_sed"`
21755 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21756 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21757 s|^/[^/]|//&|
21758 p
21759 q
21760 }'
63ce7108 21761
4a626d0a
PA
21762 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21763 sed -n "$gl_absolute_header_sed"`
21764
21765 gl_header=$gl_cv_absolute_stddef_h
21766 gl_cv_next_stddef_h='"'$gl_header'"'
63ce7108
TT
21767
21768
21769fi
21770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
21771$as_echo "$gl_cv_next_stddef_h" >&6; }
21772 fi
21773 NEXT_STDDEF_H=$gl_cv_next_stddef_h
21774
21775 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21776 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21777 gl_next_as_first_directive='<'stddef.h'>'
21778 else
21779 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21780 gl_next_as_first_directive=$gl_cv_next_stddef_h
21781 fi
21782 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
21783
21784
21785
21786
21787 fi
21788
21789
21790
21791
49e4877c 21792 $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
63ce7108
TT
21793
21794
21795
98399780
YQ
21796
21797
21798
21799
21800
4a626d0a
PA
21801
21802
6a29c58e
YQ
21803 if test $gl_cv_have_include_next = yes; then
21804 gl_cv_next_stdio_h='<'stdio.h'>'
21805 else
21806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
21807$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
63a9e923 21808if ${gl_cv_next_stdio_h+:} false; then :
6a29c58e
YQ
21809 $as_echo_n "(cached) " >&6
21810else
21811
4a626d0a
PA
21812
21813
21814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6a29c58e
YQ
21815/* end confdefs.h. */
21816#include <stdio.h>
6a29c58e 21817_ACEOF
4a626d0a
PA
21818 case "$host_os" in
21819 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21820 *) gl_absname_cpp="$ac_cpp" ;;
21821 esac
21822
21823 case "$host_os" in
21824 mingw*)
21825 gl_dirsep_regex='[/\\]'
21826 ;;
21827 *)
21828 gl_dirsep_regex='\/'
21829 ;;
21830 esac
21831 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21832 gl_header_literal_regex=`echo 'stdio.h' \
21833 | sed -e "$gl_make_literal_regex_sed"`
21834 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21835 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21836 s|^/[^/]|//&|
21837 p
21838 q
21839 }'
6a29c58e 21840
4a626d0a
PA
21841 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21842 sed -n "$gl_absolute_header_sed"`
6a29c58e 21843
4a626d0a
PA
21844 gl_header=$gl_cv_absolute_stdio_h
21845 gl_cv_next_stdio_h='"'$gl_header'"'
6a29c58e
YQ
21846
21847
21848fi
21849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
21850$as_echo "$gl_cv_next_stdio_h" >&6; }
21851 fi
21852 NEXT_STDIO_H=$gl_cv_next_stdio_h
21853
21854 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21855 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21856 gl_next_as_first_directive='<'stdio.h'>'
21857 else
21858 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21859 gl_next_as_first_directive=$gl_cv_next_stdio_h
21860 fi
21861 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
21862
21863
21864
21865
21866
4a626d0a
PA
21867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
21868$as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
63a9e923 21869if ${gl_cv_func_printf_attribute_flavor+:} false; then :
4a626d0a
PA
21870 $as_echo_n "(cached) " >&6
21871else
21872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21873/* end confdefs.h. */
21874
21875 #define __STDC_FORMAT_MACROS 1
21876 #include <stdio.h>
21877 #include <inttypes.h>
21878 /* For non-mingw systems, compilation will trivially succeed.
21879 For mingw, compilation will succeed for older mingw (system
21880 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
21881 #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
21882 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
21883 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
21884 #endif
21885
21886int
21887main ()
21888{
21889
21890 ;
21891 return 0;
21892}
21893_ACEOF
21894if ac_fn_c_try_compile "$LINENO"; then :
21895 gl_cv_func_printf_attribute_flavor=system
21896else
21897 gl_cv_func_printf_attribute_flavor=gnu
21898fi
21899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21900fi
21901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
21902$as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
21903 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
21904
21905$as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
21906
21907 fi
21908
6a29c58e
YQ
21909 GNULIB_FSCANF=1
21910
21911
21912cat >>confdefs.h <<_ACEOF
21913#define GNULIB_FSCANF 1
21914_ACEOF
21915
21916
21917 GNULIB_SCANF=1
21918
21919
21920cat >>confdefs.h <<_ACEOF
21921#define GNULIB_SCANF 1
21922_ACEOF
21923
21924
21925 GNULIB_FGETC=1
21926 GNULIB_GETC=1
21927 GNULIB_GETCHAR=1
21928 GNULIB_FGETS=1
21929 GNULIB_FREAD=1
21930
21931
21932 GNULIB_FPRINTF=1
21933 GNULIB_PRINTF=1
21934 GNULIB_VFPRINTF=1
21935 GNULIB_VPRINTF=1
21936 GNULIB_FPUTC=1
21937 GNULIB_PUTC=1
21938 GNULIB_PUTCHAR=1
21939 GNULIB_FPUTS=1
21940 GNULIB_PUTS=1
21941 GNULIB_FWRITE=1
21942
21943
21944
21945
21946 for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen renameat snprintf tmpfile vdprintf vsnprintf; do
21947 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
21948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
21949$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
63a9e923 21950if eval \${$as_gl_Symbol+:} false; then :
6a29c58e
YQ
21951 $as_echo_n "(cached) " >&6
21952else
21953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21954/* end confdefs.h. */
21955#include <stdio.h>
21956
21957int
21958main ()
21959{
21960#undef $gl_func
21961 (void) $gl_func;
21962 ;
21963 return 0;
21964}
21965_ACEOF
21966if ac_fn_c_try_compile "$LINENO"; then :
21967 eval "$as_gl_Symbol=yes"
21968else
21969 eval "$as_gl_Symbol=no"
21970fi
21971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21972fi
21973eval ac_res=\$$as_gl_Symbol
21974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21975$as_echo "$ac_res" >&6; }
63a9e923 21976 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
6a29c58e
YQ
21977 cat >>confdefs.h <<_ACEOF
21978#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
21979_ACEOF
21980
21981 eval ac_cv_have_decl_$gl_func=yes
21982fi
21983 done
21984
21985
21986
21987
21988
21989
21990
21991
21992
21993
21994
21995
98399780
YQ
21996 if test $gl_cv_have_include_next = yes; then
21997 gl_cv_next_stdlib_h='<'stdlib.h'>'
21998 else
21999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
22000$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
63a9e923 22001if ${gl_cv_next_stdlib_h+:} false; then :
98399780
YQ
22002 $as_echo_n "(cached) " >&6
22003else
22004
4a626d0a
PA
22005
22006
22007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
98399780
YQ
22008/* end confdefs.h. */
22009#include <stdlib.h>
98399780 22010_ACEOF
4a626d0a
PA
22011 case "$host_os" in
22012 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22013 *) gl_absname_cpp="$ac_cpp" ;;
22014 esac
22015
22016 case "$host_os" in
22017 mingw*)
22018 gl_dirsep_regex='[/\\]'
22019 ;;
22020 *)
22021 gl_dirsep_regex='\/'
22022 ;;
22023 esac
22024 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22025 gl_header_literal_regex=`echo 'stdlib.h' \
22026 | sed -e "$gl_make_literal_regex_sed"`
22027 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22028 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22029 s|^/[^/]|//&|
22030 p
22031 q
22032 }'
98399780 22033
4a626d0a
PA
22034 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22035 sed -n "$gl_absolute_header_sed"`
98399780 22036
4a626d0a
PA
22037 gl_header=$gl_cv_absolute_stdlib_h
22038 gl_cv_next_stdlib_h='"'$gl_header'"'
98399780
YQ
22039
22040
22041fi
22042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
22043$as_echo "$gl_cv_next_stdlib_h" >&6; }
22044 fi
22045 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
22046
22047 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22048 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22049 gl_next_as_first_directive='<'stdlib.h'>'
22050 else
22051 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22052 gl_next_as_first_directive=$gl_cv_next_stdlib_h
22053 fi
22054 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
22055
22056
22057
22058
22059
22060
4c62b19f 22061 for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt ptsname ptsname_r qsort_r random random_r realpath rpmatch secure_getenv setenv setstate setstate_r srandom srandom_r strtod strtoll strtoull unlockpt unsetenv; do
98399780
YQ
22062 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22064$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
63a9e923 22065if eval \${$as_gl_Symbol+:} false; then :
98399780
YQ
22066 $as_echo_n "(cached) " >&6
22067else
22068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22069/* end confdefs.h. */
22070#include <stdlib.h>
22071#if HAVE_SYS_LOADAVG_H
22072# include <sys/loadavg.h>
22073#endif
22074#if HAVE_RANDOM_H
22075# include <random.h>
22076#endif
22077
22078int
22079main ()
22080{
22081#undef $gl_func
22082 (void) $gl_func;
22083 ;
22084 return 0;
22085}
22086_ACEOF
22087if ac_fn_c_try_compile "$LINENO"; then :
22088 eval "$as_gl_Symbol=yes"
22089else
22090 eval "$as_gl_Symbol=no"
22091fi
22092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22093fi
22094eval ac_res=\$$as_gl_Symbol
22095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22096$as_echo "$ac_res" >&6; }
63a9e923 22097 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
98399780
YQ
22098 cat >>confdefs.h <<_ACEOF
22099#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22100_ACEOF
22101
22102 eval ac_cv_have_decl_$gl_func=yes
22103fi
22104 done
22105
22106
22107
22108
22109
22110
8424cc97
SM
22111 for ac_func in strchrnul
22112do :
22113 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
63a9e923 22114if test "x$ac_cv_func_strchrnul" = xyes; then :
8424cc97
SM
22115 cat >>confdefs.h <<_ACEOF
22116#define HAVE_STRCHRNUL 1
22117_ACEOF
22118
22119fi
22120done
22121
22122 if test $ac_cv_func_strchrnul = no; then
22123 HAVE_STRCHRNUL=0
22124 else
22125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
22126$as_echo_n "checking whether strchrnul works... " >&6; }
63a9e923 22127if ${gl_cv_func_strchrnul_works+:} false; then :
8424cc97
SM
22128 $as_echo_n "(cached) " >&6
22129else
22130 if test "$cross_compiling" = yes; then :
22131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22132/* end confdefs.h. */
22133
22134#if defined __CYGWIN__
22135 #include <cygwin/version.h>
22136 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
22137 Lucky user
22138 #endif
22139#else
22140 Lucky user
22141#endif
22142
22143_ACEOF
22144if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22145 $EGREP "Lucky user" >/dev/null 2>&1; then :
22146 gl_cv_func_strchrnul_works="guessing yes"
22147else
22148 gl_cv_func_strchrnul_works="guessing no"
22149fi
22150rm -f conftest*
22151
22152
22153else
22154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22155/* end confdefs.h. */
22156
22157#include <string.h> /* for strchrnul */
22158
22159int
22160main ()
22161{
22162const char *buf = "a";
22163 return strchrnul (buf, 'b') != buf + 1;
22164
22165 ;
22166 return 0;
22167}
22168_ACEOF
22169if ac_fn_c_try_run "$LINENO"; then :
22170 gl_cv_func_strchrnul_works=yes
22171else
22172 gl_cv_func_strchrnul_works=no
22173fi
22174rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22175 conftest.$ac_objext conftest.beam conftest.$ac_ext
22176fi
22177
22178
22179fi
22180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
22181$as_echo "$gl_cv_func_strchrnul_works" >&6; }
22182 case "$gl_cv_func_strchrnul_works" in
22183 *yes) ;;
22184 *) REPLACE_STRCHRNUL=1 ;;
22185 esac
22186 fi
22187
22188 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
22189
22190
22191
22192
22193
22194
22195
22196
22197 gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
22198
22199 :
22200 fi
22201
22202
22203
22204
22205
22206 GNULIB_STRCHRNUL=1
22207
22208
22209
22210
22211
22212$as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
22213
22214
22215
22216
22217
22218
22219
6ec2e0f5
SDJ
22220 if test $ac_cv_func_strdup = yes; then
22221 if test $gl_cv_func_malloc_posix != yes; then
22222 REPLACE_STRDUP=1
22223 fi
22224 fi
22225
22226 if test $ac_cv_have_decl_strdup = no; then
22227 HAVE_DECL_STRDUP=0
22228 fi
22229
22230 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
22231
22232
22233
22234
22235
22236
22237
22238
22239 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
22240
22241 :
22242 fi
22243
22244
22245
22246
22247
22248 GNULIB_STRDUP=1
22249
22250
22251
22252
22253
22254$as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
22255
22256
22257
22258
22259
22260
22261
22262
22263 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
22264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
22265$as_echo_n "checking for working strerror function... " >&6; }
63a9e923 22266if ${gl_cv_func_working_strerror+:} false; then :
6ec2e0f5
SDJ
22267 $as_echo_n "(cached) " >&6
22268else
22269 if test "$cross_compiling" = yes; then :
22270 case "$host_os" in
22271 # Guess yes on glibc systems.
22272 *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
22273 # If we don't know, assume the worst.
22274 *) gl_cv_func_working_strerror="guessing no" ;;
22275 esac
22276
22277else
22278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22279/* end confdefs.h. */
22280#include <string.h>
22281
22282int
22283main ()
22284{
22285if (!*strerror (-2)) return 1;
22286 ;
22287 return 0;
22288}
22289_ACEOF
22290if ac_fn_c_try_run "$LINENO"; then :
22291 gl_cv_func_working_strerror=yes
22292else
22293 gl_cv_func_working_strerror=no
22294fi
22295rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22296 conftest.$ac_objext conftest.beam conftest.$ac_ext
22297fi
22298
22299
22300fi
22301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
22302$as_echo "$gl_cv_func_working_strerror" >&6; }
22303 case "$gl_cv_func_working_strerror" in
22304 *yes) ;;
22305 *)
22306 REPLACE_STRERROR=1
22307 ;;
22308 esac
22309
22310 else
22311 REPLACE_STRERROR=1
22312 fi
22313
22314 if test $REPLACE_STRERROR = 1; then
22315
22316
22317
22318
22319
22320
22321
22322
22323 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
22324
22325 fi
22326
22327
22328cat >>confdefs.h <<_ACEOF
22329#define GNULIB_STRERROR 1
22330_ACEOF
22331
22332
22333
22334
22335
22336
22337
22338 GNULIB_STRERROR=1
22339
22340
22341
22342
22343
22344$as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
22345
22346
22347
22348
22349
22350 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
22351
22352
22353
22354
22355
22356
22357
22358
22359 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
22360
22361
22362
22363
22364
22365 if test $ac_cv_header_sys_socket_h != yes; then
22366 for ac_header in winsock2.h
22367do :
22368 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
63a9e923 22369if test "x$ac_cv_header_winsock2_h" = xyes; then :
6ec2e0f5
SDJ
22370 cat >>confdefs.h <<_ACEOF
22371#define HAVE_WINSOCK2_H 1
22372_ACEOF
22373
22374fi
22375
22376done
22377
22378 fi
22379 if test "$ac_cv_header_winsock2_h" = yes; then
22380 HAVE_WINSOCK2_H=1
22381 UNISTD_H_HAVE_WINSOCK2_H=1
22382 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
22383 else
22384 HAVE_WINSOCK2_H=0
22385 fi
22386
22387
22388 fi
22389
22390
22391
22392
98399780 22393
63ce7108
TT
22394 if test $REPLACE_STRSTR = 0; then
22395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
22396$as_echo_n "checking whether strstr works in linear time... " >&6; }
63a9e923 22397if ${gl_cv_func_strstr_linear+:} false; then :
63ce7108
TT
22398 $as_echo_n "(cached) " >&6
22399else
22400 if test "$cross_compiling" = yes; then :
22401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22402/* end confdefs.h. */
22403
22404#include <features.h>
22405#ifdef __GNU_LIBRARY__
22406 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
22407 && !(defined __i386__ || defined __x86_64__) \
22408 && !defined __UCLIBC__
22409 Lucky user
22410 #endif
22411#endif
22412#ifdef __CYGWIN__
22413 #include <cygwin/version.h>
22414 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
22415 Lucky user
22416 #endif
22417#endif
22418
22419_ACEOF
22420if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22421 $EGREP "Lucky user" >/dev/null 2>&1; then :
22422 gl_cv_func_strstr_linear="guessing yes"
c971b7fa 22423else
63ce7108 22424 gl_cv_func_strstr_linear="guessing no"
c971b7fa
PA
22425fi
22426rm -f conftest*
22427
22428
22429else
22430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22431/* end confdefs.h. */
22432
49e4877c
PA
22433#ifdef __MVS__
22434/* z/OS does not deliver signals while strstr() is running (thanks to
22435 restrictions on its LE runtime), which prevents us from limiting the
22436 running time of this test. */
22437# error "This test does not work properly on z/OS"
22438#endif
c971b7fa 22439#include <signal.h> /* for signal */
63ce7108 22440#include <string.h> /* for strstr */
c971b7fa
PA
22441#include <stdlib.h> /* for malloc */
22442#include <unistd.h> /* for alarm */
49e4877c 22443static void quit (int sig) { _exit (sig + 128); }
c971b7fa
PA
22444
22445int
22446main ()
22447{
22448
22449 int result = 0;
22450 size_t m = 1000000;
63ce7108
TT
22451 char *haystack = (char *) malloc (2 * m + 2);
22452 char *needle = (char *) malloc (m + 2);
c971b7fa 22453 /* Failure to compile this test due to missing alarm is okay,
63ce7108 22454 since all such platforms (mingw) also have quadratic strstr. */
c971b7fa
PA
22455 signal (SIGALRM, quit);
22456 alarm (5);
22457 /* Check for quadratic performance. */
22458 if (haystack && needle)
22459 {
22460 memset (haystack, 'A', 2 * m);
22461 haystack[2 * m] = 'B';
63ce7108 22462 haystack[2 * m + 1] = 0;
c971b7fa
PA
22463 memset (needle, 'A', m);
22464 needle[m] = 'B';
63ce7108
TT
22465 needle[m + 1] = 0;
22466 if (!strstr (haystack, needle))
c971b7fa
PA
22467 result |= 1;
22468 }
22469 return result;
22470
22471 ;
22472 return 0;
22473}
22474_ACEOF
22475if ac_fn_c_try_run "$LINENO"; then :
63ce7108 22476 gl_cv_func_strstr_linear=yes
c971b7fa 22477else
63ce7108 22478 gl_cv_func_strstr_linear=no
c971b7fa
PA
22479fi
22480rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22481 conftest.$ac_objext conftest.beam conftest.$ac_ext
22482fi
22483
22484
22485fi
63ce7108
TT
22486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
22487$as_echo "$gl_cv_func_strstr_linear" >&6; }
22488 case "$gl_cv_func_strstr_linear" in
40a73391
JK
22489 *yes) ;;
22490 *)
63ce7108 22491 REPLACE_STRSTR=1
40a73391
JK
22492 ;;
22493 esac
c971b7fa
PA
22494 fi
22495
63ce7108 22496 if test $REPLACE_STRSTR = 1; then
c971b7fa
PA
22497
22498
22499
22500
22501
22502
22503
22504
63ce7108 22505 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
c971b7fa 22506
a512b375 22507 fi
c971b7fa
PA
22508
22509
22510
63ce7108
TT
22511 if test "$gl_cv_func_memchr_works" != yes; then
22512 REPLACE_STRSTR=1
c971b7fa 22513 else
63ce7108
TT
22514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
22515$as_echo_n "checking whether strstr works... " >&6; }
63a9e923 22516if ${gl_cv_func_strstr_works_always+:} false; then :
c971b7fa
PA
22517 $as_echo_n "(cached) " >&6
22518else
22519 if test "$cross_compiling" = yes; then :
63ce7108 22520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
22521/* end confdefs.h. */
22522
22523#ifdef __GNU_LIBRARY__
22524 #include <features.h>
63ce7108 22525 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
c971b7fa
PA
22526 || defined __UCLIBC__
22527 Lucky user
22528 #endif
22529#elif defined __CYGWIN__
22530 #include <cygwin/version.h>
22531 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
22532 Lucky user
22533 #endif
22534#else
22535 Lucky user
22536#endif
22537
22538_ACEOF
22539if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22540 $EGREP "Lucky user" >/dev/null 2>&1; then :
63ce7108 22541 gl_cv_func_strstr_works_always="guessing yes"
c971b7fa 22542else
63ce7108 22543 gl_cv_func_strstr_works_always="guessing no"
c971b7fa
PA
22544fi
22545rm -f conftest*
22546
22547
22548else
22549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22550/* end confdefs.h. */
22551
63ce7108 22552#include <string.h> /* for strstr */
c971b7fa
PA
22553#define P "_EF_BF_BD"
22554#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
22555#define NEEDLE P P P P P
22556
22557int
22558main ()
22559{
63ce7108 22560return !!strstr (HAYSTACK, NEEDLE);
c971b7fa
PA
22561
22562 ;
22563 return 0;
22564}
22565_ACEOF
22566if ac_fn_c_try_run "$LINENO"; then :
63ce7108 22567 gl_cv_func_strstr_works_always=yes
c971b7fa 22568else
63ce7108 22569 gl_cv_func_strstr_works_always=no
c971b7fa
PA
22570fi
22571rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22572 conftest.$ac_objext conftest.beam conftest.$ac_ext
22573fi
22574
22575
22576fi
63ce7108
TT
22577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
22578$as_echo "$gl_cv_func_strstr_works_always" >&6; }
22579 case "$gl_cv_func_strstr_works_always" in
40a73391
JK
22580 *yes) ;;
22581 *)
63ce7108 22582 REPLACE_STRSTR=1
40a73391
JK
22583 ;;
22584 esac
c971b7fa 22585 fi
8839a007 22586
63ce7108 22587 if test $REPLACE_STRSTR = 1; then
8839a007 22588
8690e634
JK
22589
22590
8690e634
JK
22591
22592
22593
22594
22595
63ce7108 22596 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
8690e634 22597
8690e634
JK
22598 fi
22599
8690e634
JK
22600
22601
8690e634 22602
8690e634 22603
63ce7108 22604 GNULIB_STRSTR=1
8690e634
JK
22605
22606
22607
8690e634
JK
22608
22609
63ce7108 22610$as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
8690e634
JK
22611
22612
22613
22614
22615
22616
22617
421693b0
PA
22618 for ac_func in strtok_r
22619do :
22620 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
63a9e923 22621if test "x$ac_cv_func_strtok_r" = xyes; then :
421693b0
PA
22622 cat >>confdefs.h <<_ACEOF
22623#define HAVE_STRTOK_R 1
22624_ACEOF
22625
22626fi
22627done
22628
22629 if test $ac_cv_func_strtok_r = yes; then
22630 HAVE_STRTOK_R=1
22631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5
22632$as_echo_n "checking whether strtok_r works... " >&6; }
63a9e923 22633if ${gl_cv_func_strtok_r_works+:} false; then :
421693b0
PA
22634 $as_echo_n "(cached) " >&6
22635else
22636 if test "$cross_compiling" = yes; then :
22637
22638 case "$host_os" in
22639 # Guess no on glibc systems.
22640 *-gnu*) gl_cv_func_strtok_r_works="guessing no";;
22641 *) gl_cv_func_strtok_r_works="guessing yes";;
22642 esac
22643
22644else
22645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22646/* end confdefs.h. */
22647
22648 #ifndef __OPTIMIZE__
22649 # define __OPTIMIZE__ 1
22650 #endif
22651 #undef __OPTIMIZE_SIZE__
22652 #undef __NO_INLINE__
22653 #include <stdlib.h>
22654 #include <string.h>
22655
22656int
22657main ()
22658{
22659static const char dummy[] = "\177\01a";
22660 char delimiters[] = "xxxxxxxx";
22661 char *save_ptr = (char *) dummy;
22662 strtok_r (delimiters, "x", &save_ptr);
22663 strtok_r (NULL, "x", &save_ptr);
22664 return 0;
22665
22666 ;
22667 return 0;
22668}
22669
22670_ACEOF
22671if ac_fn_c_try_run "$LINENO"; then :
22672 gl_cv_func_strtok_r_works=yes
22673else
22674 gl_cv_func_strtok_r_works=no
22675fi
22676rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22677 conftest.$ac_objext conftest.beam conftest.$ac_ext
22678fi
22679
22680
22681fi
22682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5
22683$as_echo "$gl_cv_func_strtok_r_works" >&6; }
22684 case "$gl_cv_func_strtok_r_works" in
22685 *no)
22686 UNDEFINE_STRTOK_R=1
22687 ;;
22688 esac
22689 else
22690 HAVE_STRTOK_R=0
22691 fi
22692
22693 if test $ac_cv_have_decl_strtok_r = no; then
22694 HAVE_DECL_STRTOK_R=0
22695 fi
22696
22697 if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
22698
22699
22700
22701
22702
22703
22704
22705
22706 gl_LIBOBJS="$gl_LIBOBJS strtok_r.$ac_objext"
22707
22708
22709 :
22710
22711 fi
22712
22713
22714
22715
22716
22717 GNULIB_STRTOK_R=1
22718
22719
22720
22721
22722
22723$as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h
22724
22725
22726
22727
22728
22729
22730
8690e634
JK
22731
22732
22733
22734
22735
8690e634 22736
09607c9e
TT
22737
22738
22739
22740
22741 if test $gl_cv_have_include_next = yes; then
22742 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
22743 else
22744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
22745$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
63a9e923 22746if ${gl_cv_next_sys_stat_h+:} false; then :
09607c9e
TT
22747 $as_echo_n "(cached) " >&6
22748else
22749
22750 if test $ac_cv_header_sys_stat_h = yes; then
22751
22752
4a626d0a
PA
22753
22754
22755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
09607c9e
TT
22756/* end confdefs.h. */
22757#include <sys/stat.h>
09607c9e 22758_ACEOF
4a626d0a
PA
22759 case "$host_os" in
22760 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22761 *) gl_absname_cpp="$ac_cpp" ;;
22762 esac
22763
22764 case "$host_os" in
22765 mingw*)
22766 gl_dirsep_regex='[/\\]'
22767 ;;
22768 *)
22769 gl_dirsep_regex='\/'
22770 ;;
22771 esac
22772 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22773 gl_header_literal_regex=`echo 'sys/stat.h' \
22774 | sed -e "$gl_make_literal_regex_sed"`
22775 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22776 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22777 s|^/[^/]|//&|
22778 p
22779 q
22780 }'
22781
22782 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22783 sed -n "$gl_absolute_header_sed"`
22784
22785 gl_header=$gl_cv_absolute_sys_stat_h
22786 gl_cv_next_sys_stat_h='"'$gl_header'"'
09607c9e
TT
22787 else
22788 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
22789 fi
22790
22791
22792fi
22793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
22794$as_echo "$gl_cv_next_sys_stat_h" >&6; }
22795 fi
22796 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
22797
22798 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22799 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22800 gl_next_as_first_directive='<'sys/stat.h'>'
22801 else
22802 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22803 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
22804 fi
22805 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
22806
22807
22808
22809
22810
22811
22812
22813
2196f55f 22814
09607c9e
TT
22815
22816
22817 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
22818
22819$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
22820
22821 fi
22822
22823 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
22824 #include <sys/stat.h>
22825"
63a9e923 22826if test "x$ac_cv_type_nlink_t" = xyes; then :
09607c9e
TT
22827
22828else
22829
22830$as_echo "#define nlink_t int" >>confdefs.h
22831
22832fi
22833
22834
22835
22836 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
22837 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22839$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
63a9e923 22840if eval \${$as_gl_Symbol+:} false; then :
09607c9e
TT
22841 $as_echo_n "(cached) " >&6
22842else
22843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22844/* end confdefs.h. */
22845#include <sys/stat.h>
22846
22847int
22848main ()
22849{
22850#undef $gl_func
22851 (void) $gl_func;
22852 ;
22853 return 0;
22854}
22855_ACEOF
22856if ac_fn_c_try_compile "$LINENO"; then :
22857 eval "$as_gl_Symbol=yes"
22858else
22859 eval "$as_gl_Symbol=no"
22860fi
22861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22862fi
22863eval ac_res=\$$as_gl_Symbol
22864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22865$as_echo "$ac_res" >&6; }
63a9e923 22866 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
09607c9e
TT
22867 cat >>confdefs.h <<_ACEOF
22868#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22869_ACEOF
22870
22871 eval ac_cv_have_decl_$gl_func=yes
22872fi
22873 done
22874
22875
22876
22877
22878
22879
22880
22881
22882
22883
22884
2d8adcbd
MM
22885 :
22886
22887
22888
22889
09607c9e
TT
22890
22891
22892
8839a007
PA
22893
22894
22895
22896
09607c9e
TT
22897
22898
8839a007
PA
22899
22900
22901
22902
22903 if test $gl_cv_have_include_next = yes; then
22904 gl_cv_next_unistd_h='<'unistd.h'>'
22905 else
22906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
22907$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
63a9e923 22908if ${gl_cv_next_unistd_h+:} false; then :
8839a007
PA
22909 $as_echo_n "(cached) " >&6
22910else
22911
22912 if test $ac_cv_header_unistd_h = yes; then
22913
22914
4a626d0a
PA
22915
22916
22917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8839a007
PA
22918/* end confdefs.h. */
22919#include <unistd.h>
8839a007 22920_ACEOF
4a626d0a
PA
22921 case "$host_os" in
22922 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22923 *) gl_absname_cpp="$ac_cpp" ;;
22924 esac
22925
22926 case "$host_os" in
22927 mingw*)
22928 gl_dirsep_regex='[/\\]'
22929 ;;
22930 *)
22931 gl_dirsep_regex='\/'
22932 ;;
22933 esac
22934 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22935 gl_header_literal_regex=`echo 'unistd.h' \
22936 | sed -e "$gl_make_literal_regex_sed"`
22937 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22938 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22939 s|^/[^/]|//&|
22940 p
22941 q
22942 }'
22943
22944 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22945 sed -n "$gl_absolute_header_sed"`
22946
22947 gl_header=$gl_cv_absolute_unistd_h
22948 gl_cv_next_unistd_h='"'$gl_header'"'
8839a007
PA
22949 else
22950 gl_cv_next_unistd_h='<'unistd.h'>'
22951 fi
22952
22953
22954fi
22955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
22956$as_echo "$gl_cv_next_unistd_h" >&6; }
22957 fi
22958 NEXT_UNISTD_H=$gl_cv_next_unistd_h
22959
22960 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22961 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22962 gl_next_as_first_directive='<'unistd.h'>'
22963 else
22964 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22965 gl_next_as_first_directive=$gl_cv_next_unistd_h
22966 fi
22967 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
22968
22969
22970
22971
22972 if test $ac_cv_header_unistd_h = yes; then
22973 HAVE_UNISTD_H=1
22974 else
22975 HAVE_UNISTD_H=0
22976 fi
22977
22978
22979
22980
22981
22982
22983
22984 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
22985 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22987$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
63a9e923 22988if eval \${$as_gl_Symbol+:} false; then :
8839a007
PA
22989 $as_echo_n "(cached) " >&6
22990else
22991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22992/* end confdefs.h. */
22993
22994#if HAVE_UNISTD_H
22995# include <unistd.h>
22996#endif
22997/* Some systems declare various items in the wrong headers. */
22998#if !(defined __GLIBC__ && !defined __UCLIBC__)
22999# include <fcntl.h>
23000# include <stdio.h>
23001# include <stdlib.h>
23002# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
23003# include <io.h>
23004# endif
23005#endif
23006
23007int
23008main ()
23009{
23010#undef $gl_func
23011 (void) $gl_func;
23012 ;
23013 return 0;
23014}
23015_ACEOF
23016if ac_fn_c_try_compile "$LINENO"; then :
23017 eval "$as_gl_Symbol=yes"
23018else
23019 eval "$as_gl_Symbol=no"
23020fi
23021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23022fi
23023eval ac_res=\$$as_gl_Symbol
23024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23025$as_echo "$ac_res" >&6; }
63a9e923 23026 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
8839a007
PA
23027 cat >>confdefs.h <<_ACEOF
23028#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
23029_ACEOF
23030
23031 eval ac_cv_have_decl_$gl_func=yes
23032fi
23033 done
23034
23035
23036
23037
23038
6ec2e0f5
SDJ
23039
23040
23041
3d99e817
AK
23042 if test $ac_cv_have_decl_unsetenv = no; then
23043 HAVE_DECL_UNSETENV=0
23044 fi
23045 for ac_func in unsetenv
23046do :
23047 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
63a9e923 23048if test "x$ac_cv_func_unsetenv" = xyes; then :
3d99e817
AK
23049 cat >>confdefs.h <<_ACEOF
23050#define HAVE_UNSETENV 1
23051_ACEOF
23052
23053fi
23054done
23055
23056 if test $ac_cv_func_unsetenv = no; then
23057 HAVE_UNSETENV=0
23058 else
23059 HAVE_UNSETENV=1
23060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
23061$as_echo_n "checking for unsetenv() return type... " >&6; }
63a9e923 23062if ${gt_cv_func_unsetenv_ret+:} false; then :
3d99e817
AK
23063 $as_echo_n "(cached) " >&6
23064else
23065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23066/* end confdefs.h. */
23067
23068#undef _BSD
23069#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
23070#include <stdlib.h>
23071extern
23072#ifdef __cplusplus
23073"C"
23074#endif
23075int unsetenv (const char *name);
23076
23077int
23078main ()
23079{
23080
23081 ;
23082 return 0;
23083}
23084_ACEOF
23085if ac_fn_c_try_compile "$LINENO"; then :
23086 gt_cv_func_unsetenv_ret='int'
23087else
23088 gt_cv_func_unsetenv_ret='void'
23089fi
23090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23091fi
23092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
23093$as_echo "$gt_cv_func_unsetenv_ret" >&6; }
23094 if test $gt_cv_func_unsetenv_ret = 'void'; then
23095
23096$as_echo "#define VOID_UNSETENV 1" >>confdefs.h
23097
23098 REPLACE_UNSETENV=1
23099 fi
23100
23101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
23102$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
63a9e923 23103if ${gl_cv_func_unsetenv_works+:} false; then :
3d99e817
AK
23104 $as_echo_n "(cached) " >&6
23105else
23106 if test "$cross_compiling" = yes; then :
23107 case "$host_os" in
23108 # Guess yes on glibc systems.
23109 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
23110 # If we don't know, assume the worst.
23111 *) gl_cv_func_unsetenv_works="guessing no" ;;
23112 esac
23113
23114else
23115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23116/* end confdefs.h. */
23117
23118 #include <stdlib.h>
23119 #include <errno.h>
23120 extern char **environ;
23121
23122int
23123main ()
23124{
23125
23126 char entry1[] = "a=1";
23127 char entry2[] = "b=2";
23128 char *env[] = { entry1, entry2, NULL };
23129 if (putenv ((char *) "a=1")) return 1;
23130 if (putenv (entry2)) return 2;
23131 entry2[0] = 'a';
23132 unsetenv ("a");
23133 if (getenv ("a")) return 3;
23134 if (!unsetenv ("") || errno != EINVAL) return 4;
23135 entry2[0] = 'b';
23136 environ = env;
23137 if (!getenv ("a")) return 5;
23138 entry2[0] = 'a';
23139 unsetenv ("a");
23140 if (getenv ("a")) return 6;
23141
23142 ;
23143 return 0;
23144}
23145_ACEOF
23146if ac_fn_c_try_run "$LINENO"; then :
23147 gl_cv_func_unsetenv_works=yes
23148else
23149 gl_cv_func_unsetenv_works=no
23150fi
23151rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23152 conftest.$ac_objext conftest.beam conftest.$ac_ext
23153fi
23154
23155fi
23156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
23157$as_echo "$gl_cv_func_unsetenv_works" >&6; }
23158 case "$gl_cv_func_unsetenv_works" in
23159 *yes) ;;
23160 *)
23161 REPLACE_UNSETENV=1
23162 ;;
23163 esac
23164 fi
23165
23166 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
23167
23168
23169
23170
23171
23172
23173
23174
23175 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
23176
23177
23178
23179
23180
23181 fi
23182
23183
23184
23185
23186
23187 GNULIB_UNSETENV=1
23188
23189
23190
23191
23192
23193$as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
23194
23195
23196
23197
23198
23199
8839a007
PA
23200
23201
23202
23203
23204
23205
23206
8690e634
JK
23207
23208
23209 if test $gl_cv_have_include_next = yes; then
23210 gl_cv_next_wchar_h='<'wchar.h'>'
23211 else
23212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
23213$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
63a9e923 23214if ${gl_cv_next_wchar_h+:} false; then :
8690e634
JK
23215 $as_echo_n "(cached) " >&6
23216else
23217
23218 if test $ac_cv_header_wchar_h = yes; then
23219
23220
4a626d0a
PA
23221
23222
23223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
23224/* end confdefs.h. */
23225#include <wchar.h>
8690e634 23226_ACEOF
4a626d0a
PA
23227 case "$host_os" in
23228 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23229 *) gl_absname_cpp="$ac_cpp" ;;
23230 esac
23231
23232 case "$host_os" in
23233 mingw*)
23234 gl_dirsep_regex='[/\\]'
23235 ;;
23236 *)
23237 gl_dirsep_regex='\/'
23238 ;;
23239 esac
23240 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23241 gl_header_literal_regex=`echo 'wchar.h' \
23242 | sed -e "$gl_make_literal_regex_sed"`
23243 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23244 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23245 s|^/[^/]|//&|
23246 p
23247 q
23248 }'
23249
23250 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23251 sed -n "$gl_absolute_header_sed"`
23252
23253 gl_header=$gl_cv_absolute_wchar_h
23254 gl_cv_next_wchar_h='"'$gl_header'"'
8690e634
JK
23255 else
23256 gl_cv_next_wchar_h='<'wchar.h'>'
23257 fi
23258
23259
23260fi
23261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
23262$as_echo "$gl_cv_next_wchar_h" >&6; }
23263 fi
23264 NEXT_WCHAR_H=$gl_cv_next_wchar_h
23265
23266 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23267 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23268 gl_next_as_first_directive='<'wchar.h'>'
23269 else
23270 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23271 gl_next_as_first_directive=$gl_cv_next_wchar_h
23272 fi
23273 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
23274
23275
23276
23277
23278 if test $ac_cv_header_wchar_h = yes; then
23279 HAVE_WCHAR_H=1
23280 else
23281 HAVE_WCHAR_H=0
23282 fi
23283
c971b7fa
PA
23284
23285
23286
23287
8690e634
JK
23288 if test $gt_cv_c_wint_t = yes; then
23289 HAVE_WINT_T=1
23290 else
23291 HAVE_WINT_T=0
23292 fi
c971b7fa
PA
23293
23294
23295
8690e634
JK
23296 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
23297 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
23298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
23299$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
63a9e923 23300if eval \${$as_gl_Symbol+:} false; then :
c971b7fa
PA
23301 $as_echo_n "(cached) " >&6
23302else
23303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23304/* end confdefs.h. */
8690e634
JK
23305
23306/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23307 <wchar.h>.
23308 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23309 included before <wchar.h>. */
23310#if !(defined __GLIBC__ && !defined __UCLIBC__)
23311# include <stddef.h>
23312# include <stdio.h>
23313# include <time.h>
23314#endif
23315#include <wchar.h>
c971b7fa
PA
23316
23317int
23318main ()
23319{
8690e634
JK
23320#undef $gl_func
23321 (void) $gl_func;
c971b7fa
PA
23322 ;
23323 return 0;
23324}
23325_ACEOF
23326if ac_fn_c_try_compile "$LINENO"; then :
8690e634 23327 eval "$as_gl_Symbol=yes"
c971b7fa 23328else
8690e634 23329 eval "$as_gl_Symbol=no"
c971b7fa
PA
23330fi
23331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23332fi
8690e634
JK
23333eval ac_res=\$$as_gl_Symbol
23334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23335$as_echo "$ac_res" >&6; }
63a9e923 23336 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
8690e634
JK
23337 cat >>confdefs.h <<_ACEOF
23338#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
23339_ACEOF
c971b7fa 23340
8690e634 23341 eval ac_cv_have_decl_$gl_func=yes
c971b7fa 23342fi
8690e634
JK
23343 done
23344
23345
23346
23347
23348
23349
23350
8690e634
JK
23351 if test $ac_cv_func_iswcntrl = yes; then
23352 HAVE_ISWCNTRL=1
23353 else
23354 HAVE_ISWCNTRL=0
23355 fi
23356
23357
23358
8690e634
JK
23359 if test $gt_cv_c_wint_t = yes; then
23360 HAVE_WINT_T=1
23361 else
23362 HAVE_WINT_T=0
23363 fi
23364
23365
23366
23367
23368
23369
c971b7fa 23370
8690e634 23371
c971b7fa
PA
23372
23373
23374
23375 if test $gl_cv_have_include_next = yes; then
8690e634 23376 gl_cv_next_wctype_h='<'wctype.h'>'
c971b7fa 23377 else
8690e634
JK
23378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
23379$as_echo_n "checking absolute name of <wctype.h>... " >&6; }
63a9e923 23380if ${gl_cv_next_wctype_h+:} false; then :
c971b7fa
PA
23381 $as_echo_n "(cached) " >&6
23382else
23383
8690e634
JK
23384 if test $ac_cv_header_wctype_h = yes; then
23385
23386
4a626d0a
PA
23387
23388
23389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 23390/* end confdefs.h. */
8690e634 23391#include <wctype.h>
c971b7fa 23392_ACEOF
4a626d0a
PA
23393 case "$host_os" in
23394 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23395 *) gl_absname_cpp="$ac_cpp" ;;
23396 esac
23397
23398 case "$host_os" in
23399 mingw*)
23400 gl_dirsep_regex='[/\\]'
23401 ;;
23402 *)
23403 gl_dirsep_regex='\/'
23404 ;;
23405 esac
23406 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23407 gl_header_literal_regex=`echo 'wctype.h' \
23408 | sed -e "$gl_make_literal_regex_sed"`
23409 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23410 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23411 s|^/[^/]|//&|
23412 p
23413 q
23414 }'
23415
23416 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23417 sed -n "$gl_absolute_header_sed"`
23418
23419 gl_header=$gl_cv_absolute_wctype_h
23420 gl_cv_next_wctype_h='"'$gl_header'"'
8690e634
JK
23421 else
23422 gl_cv_next_wctype_h='<'wctype.h'>'
23423 fi
c971b7fa
PA
23424
23425
23426fi
8690e634
JK
23427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
23428$as_echo "$gl_cv_next_wctype_h" >&6; }
c971b7fa 23429 fi
8690e634 23430 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
c971b7fa
PA
23431
23432 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23433 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8690e634 23434 gl_next_as_first_directive='<'wctype.h'>'
c971b7fa
PA
23435 else
23436 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8690e634 23437 gl_next_as_first_directive=$gl_cv_next_wctype_h
c971b7fa 23438 fi
8690e634
JK
23439 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
23440
23441
23442
23443
23444 if test $ac_cv_header_wctype_h = yes; then
23445 if test $ac_cv_func_iswcntrl = yes; then
23446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
23447$as_echo_n "checking whether iswcntrl works... " >&6; }
63a9e923 23448if ${gl_cv_func_iswcntrl_works+:} false; then :
8690e634
JK
23449 $as_echo_n "(cached) " >&6
23450else
23451
23452 if test "$cross_compiling" = yes; then :
23453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23454/* end confdefs.h. */
23455#include <stdlib.h>
23456 #if __GNU_LIBRARY__ == 1
23457 Linux libc5 i18n is broken.
23458 #endif
23459int
23460main ()
23461{
23462
23463 ;
23464 return 0;
23465}
23466_ACEOF
23467if ac_fn_c_try_compile "$LINENO"; then :
23468 gl_cv_func_iswcntrl_works="guessing yes"
23469else
23470 gl_cv_func_iswcntrl_works="guessing no"
23471fi
23472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23473
23474else
23475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23476/* end confdefs.h. */
23477
23478 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
23479 included before <wchar.h>.
23480 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
23481 must be included before <wchar.h>. */
23482 #include <stddef.h>
23483 #include <stdio.h>
23484 #include <time.h>
23485 #include <wchar.h>
23486 #include <wctype.h>
23487 int main () { return iswprint ('x') == 0; }
23488
23489_ACEOF
23490if ac_fn_c_try_run "$LINENO"; then :
23491 gl_cv_func_iswcntrl_works=yes
23492else
23493 gl_cv_func_iswcntrl_works=no
23494fi
23495rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23496 conftest.$ac_objext conftest.beam conftest.$ac_ext
23497fi
23498
23499
23500fi
23501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
23502$as_echo "$gl_cv_func_iswcntrl_works" >&6; }
23503 fi
23504 HAVE_WCTYPE_H=1
23505 else
23506 HAVE_WCTYPE_H=0
23507 fi
23508
23509
23510 case "$gl_cv_func_iswcntrl_works" in
23511 *yes) REPLACE_ISWCNTRL=0 ;;
23512 *) REPLACE_ISWCNTRL=1 ;;
23513 esac
23514
23515
23516 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
23517 :
23518 fi
23519
23520 if test $REPLACE_ISWCNTRL = 1; then
23521 REPLACE_TOWLOWER=1
23522 else
23523 for ac_func in towlower
23524do :
23525 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
63a9e923 23526if test "x$ac_cv_func_towlower" = xyes; then :
8690e634
JK
23527 cat >>confdefs.h <<_ACEOF
23528#define HAVE_TOWLOWER 1
23529_ACEOF
23530
23531fi
23532done
23533
23534 if test $ac_cv_func_towlower = yes; then
23535 REPLACE_TOWLOWER=0
23536 else
23537 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
23538 included before <wchar.h>.
23539 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
23540 must be included before <wchar.h>. */
23541 #include <stddef.h>
23542 #include <stdio.h>
23543 #include <time.h>
23544 #include <wchar.h>
23545 #if HAVE_WCTYPE_H
23546 # include <wctype.h>
23547 #endif
23548
23549"
63a9e923 23550if test "x$ac_cv_have_decl_towlower" = xyes; then :
8690e634
JK
23551 ac_have_decl=1
23552else
23553 ac_have_decl=0
23554fi
23555
23556cat >>confdefs.h <<_ACEOF
23557#define HAVE_DECL_TOWLOWER $ac_have_decl
23558_ACEOF
23559
23560 if test $ac_cv_have_decl_towlower = yes; then
23561 REPLACE_TOWLOWER=1
23562 else
23563 REPLACE_TOWLOWER=0
23564 fi
23565 fi
23566 fi
23567
23568
23569 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
23570 :
23571 fi
23572
23573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
23574$as_echo_n "checking for wctype_t... " >&6; }
63a9e923 23575if ${gl_cv_type_wctype_t+:} false; then :
8690e634
JK
23576 $as_echo_n "(cached) " >&6
23577else
23578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23579/* end confdefs.h. */
23580/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
23581 included before <wchar.h>.
23582 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
23583 must be included before <wchar.h>. */
23584 #include <stddef.h>
23585 #include <stdio.h>
23586 #include <time.h>
23587 #include <wchar.h>
23588 #if HAVE_WCTYPE_H
23589 # include <wctype.h>
23590 #endif
23591 wctype_t a;
23592
23593int
23594main ()
23595{
23596
23597 ;
23598 return 0;
23599}
23600_ACEOF
23601if ac_fn_c_try_compile "$LINENO"; then :
23602 gl_cv_type_wctype_t=yes
23603else
23604 gl_cv_type_wctype_t=no
23605fi
23606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 23607
8690e634
JK
23608fi
23609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
23610$as_echo "$gl_cv_type_wctype_t" >&6; }
23611 if test $gl_cv_type_wctype_t = no; then
23612 HAVE_WCTYPE_T=0
23613 fi
23614
23615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
23616$as_echo_n "checking for wctrans_t... " >&6; }
63a9e923 23617if ${gl_cv_type_wctrans_t+:} false; then :
8690e634
JK
23618 $as_echo_n "(cached) " >&6
23619else
23620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23621/* end confdefs.h. */
23622/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
23623 included before <wchar.h>.
23624 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
23625 must be included before <wchar.h>. */
23626 #include <stddef.h>
23627 #include <stdio.h>
23628 #include <time.h>
23629 #include <wchar.h>
23630 #include <wctype.h>
23631 wctrans_t a;
c971b7fa 23632
8690e634
JK
23633int
23634main ()
23635{
c971b7fa 23636
8690e634
JK
23637 ;
23638 return 0;
23639}
23640_ACEOF
23641if ac_fn_c_try_compile "$LINENO"; then :
23642 gl_cv_type_wctrans_t=yes
23643else
23644 gl_cv_type_wctrans_t=no
23645fi
23646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 23647
8690e634
JK
23648fi
23649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
23650$as_echo "$gl_cv_type_wctrans_t" >&6; }
23651 if test $gl_cv_type_wctrans_t = no; then
23652 HAVE_WCTRANS_T=0
c971b7fa
PA
23653 fi
23654
23655
8690e634
JK
23656 for gl_func in wctype iswctype wctrans towctrans ; do
23657 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
23658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
23659$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
63a9e923 23660if eval \${$as_gl_Symbol+:} false; then :
8690e634
JK
23661 $as_echo_n "(cached) " >&6
23662else
23663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23664/* end confdefs.h. */
23665
23666/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23667 <wchar.h>.
23668 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23669 included before <wchar.h>. */
23670#if !(defined __GLIBC__ && !defined __UCLIBC__)
23671# include <stddef.h>
23672# include <stdio.h>
23673# include <time.h>
23674# include <wchar.h>
23675#endif
23676#include <wctype.h>
23677
23678int
23679main ()
23680{
23681#undef $gl_func
23682 (void) $gl_func;
23683 ;
23684 return 0;
23685}
23686_ACEOF
23687if ac_fn_c_try_compile "$LINENO"; then :
23688 eval "$as_gl_Symbol=yes"
23689else
23690 eval "$as_gl_Symbol=no"
23691fi
23692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23693fi
23694eval ac_res=\$$as_gl_Symbol
23695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23696$as_echo "$ac_res" >&6; }
63a9e923 23697 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
8690e634
JK
23698 cat >>confdefs.h <<_ACEOF
23699#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
23700_ACEOF
c971b7fa 23701
8690e634
JK
23702 eval ac_cv_have_decl_$gl_func=yes
23703fi
23704 done
c971b7fa
PA
23705
23706
23707 # End of code from modules
23708
23709
23710
23711
23712
23713
23714
23715
23716
23717 gltests_libdeps=
23718 gltests_ltlibdeps=
23719
23720
23721
23722
23723
23724
23725
23726
23727
23728 gl_source_base='tests'
23729 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
23730
23731 gl_module_indicator_condition=$gltests_WITNESS
23732
23733
23734
23735
23736
23737
23738
23739
23740
23741 LIBGNU_LIBDEPS="$gl_libdeps"
23742
23743 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
23744
23745
23746
23747# We don't use automake, but gnulib does. This line lets us generate
23748# its Makefile.in.
63a9e923 23749am__api_version='1.15'
c971b7fa
PA
23750
23751# Find a good install program. We prefer a C program (faster),
23752# so one script is as good as another. But avoid the broken or
23753# incompatible versions:
23754# SysV /etc/install, /usr/sbin/install
23755# SunOS /usr/etc/install
23756# IRIX /sbin/install
23757# AIX /bin/install
23758# AmigaOS /C/install, which installs bootblocks on floppy discs
23759# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
23760# AFS /usr/afsws/bin/install, which mishandles nonexistent args
23761# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
23762# OS/2's system install, which has a completely different semantic
23763# ./install, which can be erroneously created by make from ./install.sh.
23764# Reject install programs that cannot install multiple files.
23765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
23766$as_echo_n "checking for a BSD-compatible install... " >&6; }
23767if test -z "$INSTALL"; then
63a9e923 23768if ${ac_cv_path_install+:} false; then :
c971b7fa
PA
23769 $as_echo_n "(cached) " >&6
23770else
23771 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23772for as_dir in $PATH
23773do
23774 IFS=$as_save_IFS
23775 test -z "$as_dir" && as_dir=.
23776 # Account for people who put trailing slashes in PATH elements.
23777case $as_dir/ in #((
23778 ./ | .// | /[cC]/* | \
23779 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
23780 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
23781 /usr/ucb/* ) ;;
23782 *)
23783 # OSF1 and SCO ODT 3.0 have their own names for install.
23784 # Don't use installbsd from OSF since it installs stuff as root
23785 # by default.
23786 for ac_prog in ginstall scoinst install; do
23787 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 23788 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
c971b7fa
PA
23789 if test $ac_prog = install &&
23790 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
23791 # AIX install. It has an incompatible calling convention.
23792 :
23793 elif test $ac_prog = install &&
23794 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
23795 # program-specific install script used by HP pwplus--don't use.
23796 :
23797 else
23798 rm -rf conftest.one conftest.two conftest.dir
23799 echo one > conftest.one
23800 echo two > conftest.two
23801 mkdir conftest.dir
23802 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
23803 test -s conftest.one && test -s conftest.two &&
23804 test -s conftest.dir/conftest.one &&
23805 test -s conftest.dir/conftest.two
23806 then
23807 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
23808 break 3
23809 fi
23810 fi
23811 fi
23812 done
23813 done
23814 ;;
23815esac
23816
23817 done
23818IFS=$as_save_IFS
23819
23820rm -rf conftest.one conftest.two conftest.dir
23821
23822fi
23823 if test "${ac_cv_path_install+set}" = set; then
23824 INSTALL=$ac_cv_path_install
23825 else
23826 # As a last resort, use the slow shell script. Don't cache a
23827 # value for INSTALL within a source directory, because that will
23828 # break other packages using the cache if that directory is
23829 # removed, or if the value is a relative name.
23830 INSTALL=$ac_install_sh
23831 fi
23832fi
23833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
23834$as_echo "$INSTALL" >&6; }
23835
23836# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
23837# It thinks the first close brace ends the variable substitution.
23838test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
23839
23840test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
23841
23842test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
23843
23844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
23845$as_echo_n "checking whether build environment is sane... " >&6; }
c971b7fa
PA
23846# Reject unsafe characters in $srcdir or the absolute working directory
23847# name. Accept space and tab only in the latter.
23848am_lf='
23849'
23850case `pwd` in
23851 *[\\\"\#\$\&\'\`$am_lf]*)
63a9e923 23852 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
c971b7fa
PA
23853esac
23854case $srcdir in
23855 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
63a9e923 23856 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
c971b7fa
PA
23857esac
23858
63a9e923 23859# Do 'set' in a subshell so we don't clobber the current shell's
c971b7fa
PA
23860# arguments. Must try -L first in case configure is actually a
23861# symlink; some systems play weird games with the mod time of symlinks
23862# (eg FreeBSD returns the mod time of the symlink's containing
23863# directory).
23864if (
63a9e923
SM
23865 am_has_slept=no
23866 for am_try in 1 2; do
23867 echo "timestamp, slept: $am_has_slept" > conftest.file
23868 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
23869 if test "$*" = "X"; then
23870 # -L didn't work.
23871 set X `ls -t "$srcdir/configure" conftest.file`
23872 fi
23873 if test "$*" != "X $srcdir/configure conftest.file" \
23874 && test "$*" != "X conftest.file $srcdir/configure"; then
23875
23876 # If neither matched, then we have a broken ls. This can happen
23877 # if, for instance, CONFIG_SHELL is bash and it inherits a
23878 # broken ls alias from the environment. This has actually
23879 # happened. Such a system could not be considered "sane".
23880 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
23881 alias in your environment" "$LINENO" 5
23882 fi
23883 if test "$2" = conftest.file || test $am_try -eq 2; then
23884 break
23885 fi
23886 # Just in case.
23887 sleep 1
23888 am_has_slept=yes
23889 done
c971b7fa
PA
23890 test "$2" = conftest.file
23891 )
23892then
23893 # Ok.
23894 :
23895else
63a9e923 23896 as_fn_error $? "newly created file is older than distributed files!
c971b7fa
PA
23897Check your system clock" "$LINENO" 5
23898fi
23899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23900$as_echo "yes" >&6; }
63a9e923
SM
23901# If we didn't sleep, we still need to ensure time stamps of config.status and
23902# generated files are strictly newer.
23903am_sleep_pid=
23904if grep 'slept: no' conftest.file >/dev/null 2>&1; then
23905 ( sleep 1 ) &
23906 am_sleep_pid=$!
23907fi
23908
23909rm -f conftest.file
23910
c971b7fa
PA
23911test "$program_prefix" != NONE &&
23912 program_transform_name="s&^&$program_prefix&;$program_transform_name"
23913# Use a double $ so make ignores it.
23914test "$program_suffix" != NONE &&
23915 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
23916# Double any \ or $.
23917# By default was `s,x,x', remove it if useless.
23918ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
23919program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
23920
c971b7fa
PA
23921if test x"${MISSING+set}" != xset; then
23922 case $am_aux_dir in
23923 *\ * | *\ *)
23924 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
23925 *)
23926 MISSING="\${SHELL} $am_aux_dir/missing" ;;
23927 esac
23928fi
23929# Use eval to expand $SHELL
63a9e923
SM
23930if eval "$MISSING --is-lightweight"; then
23931 am_missing_run="$MISSING "
c971b7fa
PA
23932else
23933 am_missing_run=
63a9e923
SM
23934 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
23935$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
c971b7fa
PA
23936fi
23937
63a9e923 23938if test x"${install_sh+set}" != xset; then
c971b7fa
PA
23939 case $am_aux_dir in
23940 *\ * | *\ *)
23941 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
23942 *)
23943 install_sh="\${SHELL} $am_aux_dir/install-sh"
23944 esac
23945fi
23946
63a9e923
SM
23947# Installed binaries are usually stripped using 'strip' when the user
23948# run "make install-strip". However 'strip' might not be the right
c971b7fa 23949# tool to use in cross-compilation environments, therefore Automake
63a9e923 23950# will honor the 'STRIP' environment variable to overrule this program.
c971b7fa
PA
23951if test "$cross_compiling" != no; then
23952 if test -n "$ac_tool_prefix"; then
23953 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
23954set dummy ${ac_tool_prefix}strip; ac_word=$2
23955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23956$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 23957if ${ac_cv_prog_STRIP+:} false; then :
c971b7fa
PA
23958 $as_echo_n "(cached) " >&6
23959else
23960 if test -n "$STRIP"; then
23961 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
23962else
23963as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23964for as_dir in $PATH
23965do
23966 IFS=$as_save_IFS
23967 test -z "$as_dir" && as_dir=.
23968 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 23969 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
23970 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
23971 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23972 break 2
23973 fi
23974done
23975 done
23976IFS=$as_save_IFS
23977
23978fi
23979fi
23980STRIP=$ac_cv_prog_STRIP
23981if test -n "$STRIP"; then
23982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
23983$as_echo "$STRIP" >&6; }
23984else
23985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23986$as_echo "no" >&6; }
23987fi
23988
23989
23990fi
23991if test -z "$ac_cv_prog_STRIP"; then
23992 ac_ct_STRIP=$STRIP
23993 # Extract the first word of "strip", so it can be a program name with args.
23994set dummy strip; ac_word=$2
23995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23996$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 23997if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
c971b7fa
PA
23998 $as_echo_n "(cached) " >&6
23999else
24000 if test -n "$ac_ct_STRIP"; then
24001 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
24002else
24003as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24004for as_dir in $PATH
24005do
24006 IFS=$as_save_IFS
24007 test -z "$as_dir" && as_dir=.
24008 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 24009 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
24010 ac_cv_prog_ac_ct_STRIP="strip"
24011 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24012 break 2
24013 fi
24014done
24015 done
24016IFS=$as_save_IFS
24017
24018fi
24019fi
24020ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
24021if test -n "$ac_ct_STRIP"; then
24022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
24023$as_echo "$ac_ct_STRIP" >&6; }
24024else
24025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24026$as_echo "no" >&6; }
24027fi
24028
24029 if test "x$ac_ct_STRIP" = x; then
24030 STRIP=":"
24031 else
24032 case $cross_compiling:$ac_tool_warned in
24033yes:)
24034{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24035$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24036ac_tool_warned=yes ;;
24037esac
24038 STRIP=$ac_ct_STRIP
24039 fi
24040else
24041 STRIP="$ac_cv_prog_STRIP"
24042fi
24043
24044fi
24045INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
24046
c971b7fa
PA
24047for ac_prog in gawk mawk nawk awk
24048do
24049 # Extract the first word of "$ac_prog", so it can be a program name with args.
24050set dummy $ac_prog; ac_word=$2
24051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24052$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 24053if ${ac_cv_prog_AWK+:} false; then :
c971b7fa
PA
24054 $as_echo_n "(cached) " >&6
24055else
24056 if test -n "$AWK"; then
24057 ac_cv_prog_AWK="$AWK" # Let the user override the test.
24058else
24059as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24060for as_dir in $PATH
24061do
24062 IFS=$as_save_IFS
24063 test -z "$as_dir" && as_dir=.
24064 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 24065 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
24066 ac_cv_prog_AWK="$ac_prog"
24067 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24068 break 2
24069 fi
24070done
24071 done
24072IFS=$as_save_IFS
24073
24074fi
24075fi
24076AWK=$ac_cv_prog_AWK
24077if test -n "$AWK"; then
24078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
24079$as_echo "$AWK" >&6; }
24080else
24081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24082$as_echo "no" >&6; }
24083fi
24084
24085
24086 test -n "$AWK" && break
24087done
24088
24089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
24090$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
24091set x ${MAKE-make}
24092ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
63a9e923 24093if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
c971b7fa
PA
24094 $as_echo_n "(cached) " >&6
24095else
24096 cat >conftest.make <<\_ACEOF
24097SHELL = /bin/sh
24098all:
24099 @echo '@@@%%%=$(MAKE)=@@@%%%'
24100_ACEOF
63a9e923 24101# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
c971b7fa
PA
24102case `${MAKE-make} -f conftest.make 2>/dev/null` in
24103 *@@@%%%=?*=@@@%%%*)
24104 eval ac_cv_prog_make_${ac_make}_set=yes;;
24105 *)
24106 eval ac_cv_prog_make_${ac_make}_set=no;;
24107esac
24108rm -f conftest.make
24109fi
24110if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
24111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24112$as_echo "yes" >&6; }
24113 SET_MAKE=
24114else
24115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24116$as_echo "no" >&6; }
24117 SET_MAKE="MAKE=${MAKE-make}"
24118fi
24119
24120rm -rf .tst 2>/dev/null
24121mkdir .tst 2>/dev/null
24122if test -d .tst; then
24123 am__leading_dot=.
24124else
24125 am__leading_dot=_
24126fi
24127rmdir .tst 2>/dev/null
24128
24129DEPDIR="${am__leading_dot}deps"
24130
24131ac_config_commands="$ac_config_commands depfiles"
24132
24133
24134am_make=${MAKE-make}
24135cat > confinc << 'END'
24136am__doit:
24137 @echo this is the am__doit target
24138.PHONY: am__doit
24139END
24140# If we don't find an include directive, just comment out the code.
24141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
24142$as_echo_n "checking for style of include used by $am_make... " >&6; }
24143am__include="#"
24144am__quote=
24145_am_result=none
24146# First try GNU make style include.
24147echo "include confinc" > confmf
63a9e923 24148# Ignore all kinds of additional output from 'make'.
c971b7fa
PA
24149case `$am_make -s -f confmf 2> /dev/null` in #(
24150*the\ am__doit\ target*)
24151 am__include=include
24152 am__quote=
24153 _am_result=GNU
24154 ;;
24155esac
24156# Now try BSD make style include.
24157if test "$am__include" = "#"; then
24158 echo '.include "confinc"' > confmf
24159 case `$am_make -s -f confmf 2> /dev/null` in #(
24160 *the\ am__doit\ target*)
24161 am__include=.include
24162 am__quote="\""
24163 _am_result=BSD
24164 ;;
24165 esac
24166fi
24167
24168
24169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
24170$as_echo "$_am_result" >&6; }
24171rm -f confinc confmf
24172
24173# Check whether --enable-dependency-tracking was given.
24174if test "${enable_dependency_tracking+set}" = set; then :
24175 enableval=$enable_dependency_tracking;
24176fi
24177
24178if test "x$enable_dependency_tracking" != xno; then
24179 am_depcomp="$ac_aux_dir/depcomp"
24180 AMDEPBACKSLASH='\'
63a9e923 24181 am__nodep='_no'
c971b7fa
PA
24182fi
24183 if test "x$enable_dependency_tracking" != xno; then
24184 AMDEP_TRUE=
24185 AMDEP_FALSE='#'
24186else
24187 AMDEP_TRUE='#'
24188 AMDEP_FALSE=
24189fi
24190
24191
63a9e923
SM
24192# Check whether --enable-silent-rules was given.
24193if test "${enable_silent_rules+set}" = set; then :
24194 enableval=$enable_silent_rules;
24195fi
24196
24197case $enable_silent_rules in # (((
24198 yes) AM_DEFAULT_VERBOSITY=0;;
24199 no) AM_DEFAULT_VERBOSITY=1;;
24200 *) AM_DEFAULT_VERBOSITY=1;;
24201esac
24202am_make=${MAKE-make}
24203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
24204$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
24205if ${am_cv_make_support_nested_variables+:} false; then :
24206 $as_echo_n "(cached) " >&6
24207else
24208 if $as_echo 'TRUE=$(BAR$(V))
24209BAR0=false
24210BAR1=true
24211V=1
24212am__doit:
24213 @$(TRUE)
24214.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
24215 am_cv_make_support_nested_variables=yes
24216else
24217 am_cv_make_support_nested_variables=no
24218fi
24219fi
24220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
24221$as_echo "$am_cv_make_support_nested_variables" >&6; }
24222if test $am_cv_make_support_nested_variables = yes; then
24223 AM_V='$(V)'
24224 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
24225else
24226 AM_V=$AM_DEFAULT_VERBOSITY
24227 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
24228fi
24229AM_BACKSLASH='\'
24230
c971b7fa
PA
24231if test "`cd $srcdir && pwd`" != "`pwd`"; then
24232 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
24233 # is not polluted with repeated "-I."
24234 am__isrc=' -I$(srcdir)'
24235 # test to see if srcdir already configured
24236 if test -f $srcdir/config.status; then
63a9e923 24237 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
c971b7fa
PA
24238 fi
24239fi
24240
24241# test whether we have cygpath
24242if test -z "$CYGPATH_W"; then
24243 if (cygpath --version) >/dev/null 2>/dev/null; then
24244 CYGPATH_W='cygpath -w'
24245 else
24246 CYGPATH_W=echo
24247 fi
24248fi
24249
24250
24251# Define the identity of the package.
63a9e923
SM
24252 PACKAGE='libgnu'
24253 VERSION='UNUSED-VERSION'
c971b7fa
PA
24254
24255
24256# Some tools Automake needs.
24257
24258ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
24259
24260
24261AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
24262
24263
24264AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
24265
24266
24267AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
24268
24269
24270MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
24271
63a9e923
SM
24272# For better backward compatibility. To be removed once Automake 1.9.x
24273# dies out for good. For more background, see:
24274# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
24275# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
24276mkdir_p='$(MKDIR_P)'
24277
24278# We need awk for the "check" target (and possibly the TAP driver). The
24279# system "awk" is bad on some platforms.
24280# Always define AMTAR for backward compatibility. Yes, it's still used
24281# in the wild :-( We should find a proper way to deprecate it ...
24282AMTAR='$${TAR-tar}'
24283
24284
24285# We'll loop over all known methods to create a tar archive until one works.
24286_am_tools='gnutar pax cpio none'
c971b7fa 24287
63a9e923 24288am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
c971b7fa 24289
c971b7fa
PA
24290
24291
24292
24293
24294depcc="$CC" am_compiler_list=
24295
24296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
24297$as_echo_n "checking dependency style of $depcc... " >&6; }
63a9e923 24298if ${am_cv_CC_dependencies_compiler_type+:} false; then :
c971b7fa
PA
24299 $as_echo_n "(cached) " >&6
24300else
24301 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
24302 # We make a subdir and do the tests there. Otherwise we can end up
24303 # making bogus files that we don't know about and never remove. For
24304 # instance it was reported that on HP-UX the gcc test will end up
63a9e923
SM
24305 # making a dummy file named 'D' -- because '-MD' means "put the output
24306 # in D".
24307 rm -rf conftest.dir
c971b7fa
PA
24308 mkdir conftest.dir
24309 # Copy depcomp to subdir because otherwise we won't find it if we're
24310 # using a relative directory.
24311 cp "$am_depcomp" conftest.dir
24312 cd conftest.dir
24313 # We will build objects and dependencies in a subdirectory because
24314 # it helps to detect inapplicable dependency modes. For instance
24315 # both Tru64's cc and ICC support -MD to output dependencies as a
24316 # side effect of compilation, but ICC will put the dependencies in
24317 # the current directory while Tru64 will put them in the object
24318 # directory.
24319 mkdir sub
24320
24321 am_cv_CC_dependencies_compiler_type=none
24322 if test "$am_compiler_list" = ""; then
24323 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
24324 fi
24325 am__universal=false
24326 case " $depcc " in #(
24327 *\ -arch\ *\ -arch\ *) am__universal=true ;;
24328 esac
24329
24330 for depmode in $am_compiler_list; do
24331 # Setup a source with many dependencies, because some compilers
24332 # like to wrap large dependency lists on column 80 (with \), and
24333 # we should not choose a depcomp mode which is confused by this.
24334 #
24335 # We need to recreate these files for each test, as the compiler may
24336 # overwrite some of them when testing with obscure command lines.
24337 # This happens at least with the AIX C compiler.
24338 : > sub/conftest.c
24339 for i in 1 2 3 4 5 6; do
24340 echo '#include "conftst'$i'.h"' >> sub/conftest.c
63a9e923
SM
24341 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
24342 # Solaris 10 /bin/sh.
24343 echo '/* dummy */' > sub/conftst$i.h
c971b7fa
PA
24344 done
24345 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
24346
63a9e923 24347 # We check with '-c' and '-o' for the sake of the "dashmstdout"
c971b7fa 24348 # mode. It turns out that the SunPro C++ compiler does not properly
63a9e923
SM
24349 # handle '-M -o', and we need to detect this. Also, some Intel
24350 # versions had trouble with output in subdirs.
c971b7fa
PA
24351 am__obj=sub/conftest.${OBJEXT-o}
24352 am__minus_obj="-o $am__obj"
24353 case $depmode in
24354 gcc)
24355 # This depmode causes a compiler race in universal mode.
24356 test "$am__universal" = false || continue
24357 ;;
24358 nosideeffect)
63a9e923
SM
24359 # After this tag, mechanisms are not by side-effect, so they'll
24360 # only be used when explicitly requested.
c971b7fa
PA
24361 if test "x$enable_dependency_tracking" = xyes; then
24362 continue
24363 else
24364 break
24365 fi
24366 ;;
63a9e923
SM
24367 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
24368 # This compiler won't grok '-c -o', but also, the minuso test has
c971b7fa
PA
24369 # not run yet. These depmodes are late enough in the game, and
24370 # so weak that their functioning should not be impacted.
24371 am__obj=conftest.${OBJEXT-o}
24372 am__minus_obj=
24373 ;;
24374 none) break ;;
24375 esac
24376 if depmode=$depmode \
24377 source=sub/conftest.c object=$am__obj \
24378 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
24379 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
24380 >/dev/null 2>conftest.err &&
24381 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
24382 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
24383 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
24384 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
24385 # icc doesn't choke on unknown options, it will just issue warnings
24386 # or remarks (even with -Werror). So we grep stderr for any message
24387 # that says an option was ignored or not supported.
24388 # When given -MP, icc 7.0 and 7.1 complain thusly:
24389 # icc: Command line warning: ignoring option '-M'; no argument required
24390 # The diagnosis changed in icc 8.0:
24391 # icc: Command line remark: option '-MP' not supported
24392 if (grep 'ignoring option' conftest.err ||
24393 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
24394 am_cv_CC_dependencies_compiler_type=$depmode
24395 break
24396 fi
24397 fi
24398 done
24399
24400 cd ..
24401 rm -rf conftest.dir
24402else
24403 am_cv_CC_dependencies_compiler_type=none
24404fi
24405
24406fi
24407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
24408$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
24409CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
24410
24411 if
24412 test "x$enable_dependency_tracking" != xno \
24413 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
24414 am__fastdepCC_TRUE=
24415 am__fastdepCC_FALSE='#'
24416else
24417 am__fastdepCC_TRUE='#'
24418 am__fastdepCC_FALSE=
24419fi
24420
24421
24422
63a9e923
SM
24423# POSIX will say in a future version that running "rm -f" with no argument
24424# is OK; and we want to be able to make that assumption in our Makefile
24425# recipes. So use an aggressive probe to check that the usage we want is
24426# actually supported "in the wild" to an acceptable degree.
24427# See automake bug#10828.
24428# To make any issue more visible, cause the running configure to be aborted
24429# by default if the 'rm' program in use doesn't match our expectations; the
24430# user can still override this though.
24431if rm -f && rm -fr && rm -rf; then : OK; else
24432 cat >&2 <<'END'
24433Oops!
24434
24435Your 'rm' program seems unable to run without file operands specified
24436on the command line, even when the '-f' option is present. This is contrary
24437to the behaviour of most rm programs out there, and not conforming with
24438the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
24439
24440Please tell bug-automake@gnu.org about your system, including the value
24441of your $PATH and any error possibly output before this message. This
24442can help us improve future automake versions.
24443
24444END
24445 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
24446 echo 'Configuration will proceed anyway, since you have set the' >&2
24447 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
24448 echo >&2
24449 else
24450 cat >&2 <<'END'
24451Aborting the configuration process, to ensure you take notice of the issue.
24452
24453You can download and install GNU coreutils to get an 'rm' implementation
24454that behaves properly: <http://www.gnu.org/software/coreutils/>.
24455
24456If you want to complete the configuration process using your problematic
24457'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
24458to "yes", and re-run configure.
24459
24460END
24461 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
24462 fi
24463fi
24464
c971b7fa 24465
39be3c7e
SM
24466# Check whether --enable-silent-rules was given.
24467if test "${enable_silent_rules+set}" = set; then :
24468 enableval=$enable_silent_rules;
24469fi
24470
63a9e923
SM
24471case $enable_silent_rules in # (((
24472 yes) AM_DEFAULT_VERBOSITY=0;;
24473 no) AM_DEFAULT_VERBOSITY=1;;
24474 *) AM_DEFAULT_VERBOSITY=0;;
39be3c7e 24475esac
63a9e923
SM
24476am_make=${MAKE-make}
24477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
24478$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
24479if ${am_cv_make_support_nested_variables+:} false; then :
24480 $as_echo_n "(cached) " >&6
24481else
24482 if $as_echo 'TRUE=$(BAR$(V))
24483BAR0=false
24484BAR1=true
24485V=1
24486am__doit:
24487 @$(TRUE)
24488.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
24489 am_cv_make_support_nested_variables=yes
24490else
24491 am_cv_make_support_nested_variables=no
24492fi
24493fi
24494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
24495$as_echo "$am_cv_make_support_nested_variables" >&6; }
24496if test $am_cv_make_support_nested_variables = yes; then
24497 AM_V='$(V)'
24498 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
24499else
24500 AM_V=$AM_DEFAULT_VERBOSITY
24501 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
24502fi
39be3c7e
SM
24503AM_BACKSLASH='\'
24504
24505
c971b7fa
PA
24506# --------------------- #
24507# Checks for programs. #
24508# --------------------- #
24509
24510
24511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
24512$as_echo_n "checking whether ln -s works... " >&6; }
24513LN_S=$as_ln_s
24514if test "$LN_S" = "ln -s"; then
24515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24516$as_echo "yes" >&6; }
24517else
24518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
24519$as_echo "no, using $LN_S" >&6; }
24520fi
24521
24522if test -n "$ac_tool_prefix"; then
24523 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
24524set dummy ${ac_tool_prefix}ranlib; ac_word=$2
24525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24526$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 24527if ${ac_cv_prog_RANLIB+:} false; then :
c971b7fa
PA
24528 $as_echo_n "(cached) " >&6
24529else
24530 if test -n "$RANLIB"; then
24531 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
24532else
24533as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24534for as_dir in $PATH
24535do
24536 IFS=$as_save_IFS
24537 test -z "$as_dir" && as_dir=.
24538 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 24539 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
24540 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
24541 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24542 break 2
24543 fi
24544done
24545 done
24546IFS=$as_save_IFS
24547
24548fi
24549fi
24550RANLIB=$ac_cv_prog_RANLIB
24551if test -n "$RANLIB"; then
24552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
24553$as_echo "$RANLIB" >&6; }
24554else
24555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24556$as_echo "no" >&6; }
24557fi
24558
24559
24560fi
24561if test -z "$ac_cv_prog_RANLIB"; then
24562 ac_ct_RANLIB=$RANLIB
24563 # Extract the first word of "ranlib", so it can be a program name with args.
24564set dummy ranlib; ac_word=$2
24565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24566$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 24567if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
c971b7fa
PA
24568 $as_echo_n "(cached) " >&6
24569else
24570 if test -n "$ac_ct_RANLIB"; then
24571 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
24572else
24573as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24574for as_dir in $PATH
24575do
24576 IFS=$as_save_IFS
24577 test -z "$as_dir" && as_dir=.
24578 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 24579 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
24580 ac_cv_prog_ac_ct_RANLIB="ranlib"
24581 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24582 break 2
24583 fi
24584done
24585 done
24586IFS=$as_save_IFS
24587
24588fi
24589fi
24590ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
24591if test -n "$ac_ct_RANLIB"; then
24592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
24593$as_echo "$ac_ct_RANLIB" >&6; }
24594else
24595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24596$as_echo "no" >&6; }
24597fi
24598
24599 if test "x$ac_ct_RANLIB" = x; then
24600 RANLIB=":"
24601 else
24602 case $cross_compiling:$ac_tool_warned in
24603yes:)
24604{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24605$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24606ac_tool_warned=yes ;;
24607esac
24608 RANLIB=$ac_ct_RANLIB
24609 fi
24610else
24611 RANLIB="$ac_cv_prog_RANLIB"
24612fi
24613
24614
24615if test -n "$ac_tool_prefix"; then
24616 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
24617set dummy ${ac_tool_prefix}ar; ac_word=$2
24618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24619$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 24620if ${ac_cv_prog_AR+:} false; then :
c971b7fa
PA
24621 $as_echo_n "(cached) " >&6
24622else
24623 if test -n "$AR"; then
24624 ac_cv_prog_AR="$AR" # Let the user override the test.
24625else
24626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24627for as_dir in $PATH
24628do
24629 IFS=$as_save_IFS
24630 test -z "$as_dir" && as_dir=.
24631 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 24632 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
24633 ac_cv_prog_AR="${ac_tool_prefix}ar"
24634 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24635 break 2
24636 fi
24637done
24638 done
24639IFS=$as_save_IFS
24640
24641fi
24642fi
24643AR=$ac_cv_prog_AR
24644if test -n "$AR"; then
24645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
24646$as_echo "$AR" >&6; }
24647else
24648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24649$as_echo "no" >&6; }
24650fi
24651
24652
24653fi
24654if test -z "$ac_cv_prog_AR"; then
24655 ac_ct_AR=$AR
24656 # Extract the first word of "ar", so it can be a program name with args.
24657set dummy ar; ac_word=$2
24658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24659$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 24660if ${ac_cv_prog_ac_ct_AR+:} false; then :
c971b7fa
PA
24661 $as_echo_n "(cached) " >&6
24662else
24663 if test -n "$ac_ct_AR"; then
24664 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
24665else
24666as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24667for as_dir in $PATH
24668do
24669 IFS=$as_save_IFS
24670 test -z "$as_dir" && as_dir=.
24671 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 24672 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
24673 ac_cv_prog_ac_ct_AR="ar"
24674 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24675 break 2
24676 fi
24677done
24678 done
24679IFS=$as_save_IFS
24680
24681fi
24682fi
24683ac_ct_AR=$ac_cv_prog_ac_ct_AR
24684if test -n "$ac_ct_AR"; then
24685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
24686$as_echo "$ac_ct_AR" >&6; }
24687else
24688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24689$as_echo "no" >&6; }
24690fi
24691
24692 if test "x$ac_ct_AR" = x; then
24693 AR=""
24694 else
24695 case $cross_compiling:$ac_tool_warned in
24696yes:)
24697{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24698$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24699ac_tool_warned=yes ;;
24700esac
24701 AR=$ac_ct_AR
24702 fi
24703else
24704 AR="$ac_cv_prog_AR"
24705fi
24706
24707
24708# ---------------------- #
24709# Checks for libraries. #
24710# ---------------------- #
24711
24712ac_config_files="$ac_config_files Makefile import/Makefile"
24713
24714ac_config_commands="$ac_config_commands default"
24715
24716cat >confcache <<\_ACEOF
24717# This file is a shell script that caches the results of configure
24718# tests run on this system so they can be shared between configure
24719# scripts and configure runs, see configure's option --config-cache.
24720# It is not useful on other systems. If it contains results you don't
24721# want to keep, you may remove or edit it.
24722#
24723# config.status only pays attention to the cache file if you give it
24724# the --recheck option to rerun configure.
24725#
24726# `ac_cv_env_foo' variables (set or unset) will be overridden when
24727# loading this file, other *unset* `ac_cv_foo' will be assigned the
24728# following values.
24729
24730_ACEOF
24731
24732# The following way of writing the cache mishandles newlines in values,
24733# but we know of no workaround that is simple, portable, and efficient.
24734# So, we kill variables containing newlines.
24735# Ultrix sh set writes to stderr and can't be redirected directly,
24736# and sets the high bit in the cache file unless we assign to the vars.
24737(
24738 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24739 eval ac_val=\$$ac_var
24740 case $ac_val in #(
24741 *${as_nl}*)
24742 case $ac_var in #(
24743 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
24744$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
24745 esac
24746 case $ac_var in #(
24747 _ | IFS | as_nl) ;; #(
24748 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
24749 *) { eval $ac_var=; unset $ac_var;} ;;
24750 esac ;;
24751 esac
24752 done
24753
24754 (set) 2>&1 |
24755 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24756 *${as_nl}ac_space=\ *)
24757 # `set' does not quote correctly, so add quotes: double-quote
24758 # substitution turns \\\\ into \\, and sed turns \\ into \.
24759 sed -n \
24760 "s/'/'\\\\''/g;
24761 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
24762 ;; #(
24763 *)
24764 # `set' quotes correctly as required by POSIX, so do not add quotes.
24765 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
24766 ;;
24767 esac |
24768 sort
24769) |
24770 sed '
24771 /^ac_cv_env_/b end
24772 t clear
24773 :clear
24774 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24775 t end
24776 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24777 :end' >>confcache
24778if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24779 if test -w "$cache_file"; then
63a9e923 24780 if test "x$cache_file" != "x/dev/null"; then
c971b7fa
PA
24781 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
24782$as_echo "$as_me: updating cache $cache_file" >&6;}
63a9e923
SM
24783 if test ! -f "$cache_file" || test -h "$cache_file"; then
24784 cat confcache >"$cache_file"
24785 else
24786 case $cache_file in #(
24787 */* | ?:*)
24788 mv -f confcache "$cache_file"$$ &&
24789 mv -f "$cache_file"$$ "$cache_file" ;; #(
24790 *)
24791 mv -f confcache "$cache_file" ;;
24792 esac
24793 fi
24794 fi
c971b7fa
PA
24795 else
24796 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
24797$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
24798 fi
24799fi
24800rm -f confcache
24801
24802test "x$prefix" = xNONE && prefix=$ac_default_prefix
24803# Let make expand exec_prefix.
24804test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24805
24806DEFS=-DHAVE_CONFIG_H
24807
24808ac_libobjs=
24809ac_ltlibobjs=
24810for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24811 # 1. Remove the extension, and $U if already installed.
24812 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24813 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
24814 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24815 # will be set to the directory where LIBOBJS objects are built.
24816 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24817 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
24818done
24819LIBOBJS=$ac_libobjs
24820
24821LTLIBOBJS=$ac_ltlibobjs
24822
24823
24824if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
63a9e923 24825 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
c971b7fa
PA
24826Usually this means the macro was only invoked conditionally." "$LINENO" 5
24827fi
24828if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
63a9e923 24829 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
c971b7fa
PA
24830Usually this means the macro was only invoked conditionally." "$LINENO" 5
24831fi
8690e634 24832if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
63a9e923 24833 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
8690e634
JK
24834Usually this means the macro was only invoked conditionally." "$LINENO" 5
24835fi
18848e28 24836if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
63a9e923 24837 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
18848e28
GF
24838Usually this means the macro was only invoked conditionally." "$LINENO" 5
24839fi
88b48903 24840if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
63a9e923 24841 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
88b48903
WN
24842Usually this means the macro was only invoked conditionally." "$LINENO" 5
24843fi
8690e634 24844if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
63a9e923 24845 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
8690e634
JK
24846Usually this means the macro was only invoked conditionally." "$LINENO" 5
24847fi
6ec2e0f5 24848if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
63a9e923 24849 as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined.
6ec2e0f5
SDJ
24850Usually this means the macro was only invoked conditionally." "$LINENO" 5
24851fi
49e4877c 24852if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
63a9e923 24853 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
49e4877c
PA
24854Usually this means the macro was only invoked conditionally." "$LINENO" 5
24855fi
24856if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
63a9e923 24857 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
49e4877c
PA
24858Usually this means the macro was only invoked conditionally." "$LINENO" 5
24859fi
c971b7fa 24860if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
63a9e923 24861 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
c971b7fa
PA
24862Usually this means the macro was only invoked conditionally." "$LINENO" 5
24863fi
88b48903
WN
24864
24865
8690e634 24866if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
63a9e923 24867 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
8690e634
JK
24868Usually this means the macro was only invoked conditionally." "$LINENO" 5
24869fi
c971b7fa 24870if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
63a9e923 24871 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
c971b7fa
PA
24872Usually this means the macro was only invoked conditionally." "$LINENO" 5
24873fi
24874
24875 gl_libobjs=
24876 gl_ltlibobjs=
24877 if test -n "$gl_LIBOBJS"; then
24878 # Remove the extension.
24879 sed_drop_objext='s/\.o$//;s/\.obj$//'
24880 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
24881 gl_libobjs="$gl_libobjs $i.$ac_objext"
24882 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
24883 done
24884 fi
24885 gl_LIBOBJS=$gl_libobjs
24886
24887 gl_LTLIBOBJS=$gl_ltlibobjs
24888
24889
24890
24891 gltests_libobjs=
24892 gltests_ltlibobjs=
24893 if test -n "$gltests_LIBOBJS"; then
24894 # Remove the extension.
24895 sed_drop_objext='s/\.o$//;s/\.obj$//'
24896 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
24897 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
24898 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
24899 done
24900 fi
24901 gltests_LIBOBJS=$gltests_libobjs
24902
24903 gltests_LTLIBOBJS=$gltests_ltlibobjs
24904
24905
63a9e923
SM
24906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
24907$as_echo_n "checking that generated files are newer than configure... " >&6; }
24908 if test -n "$am_sleep_pid"; then
24909 # Hide warnings about reused PIDs.
24910 wait $am_sleep_pid 2>/dev/null
24911 fi
24912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
24913$as_echo "done" >&6; }
c971b7fa 24914if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
63a9e923 24915 as_fn_error $? "conditional \"AMDEP\" was never defined.
c971b7fa
PA
24916Usually this means the macro was only invoked conditionally." "$LINENO" 5
24917fi
24918if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
63a9e923 24919 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
c971b7fa
PA
24920Usually this means the macro was only invoked conditionally." "$LINENO" 5
24921fi
24922 if test -n "$EXEEXT"; then
24923 am__EXEEXT_TRUE=
24924 am__EXEEXT_FALSE='#'
24925else
24926 am__EXEEXT_TRUE='#'
24927 am__EXEEXT_FALSE=
24928fi
24929
24930
63a9e923 24931: "${CONFIG_STATUS=./config.status}"
c971b7fa
PA
24932ac_write_fail=0
24933ac_clean_files_save=$ac_clean_files
24934ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24935{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
24936$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
24937as_write_fail=0
24938cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
24939#! $SHELL
24940# Generated by $as_me.
24941# Run this file to recreate the current configuration.
24942# Compiler output produced by configure, useful for debugging
24943# configure, is in config.log if it exists.
24944
24945debug=false
24946ac_cs_recheck=false
24947ac_cs_silent=false
24948
24949SHELL=\${CONFIG_SHELL-$SHELL}
24950export SHELL
24951_ASEOF
24952cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
24953## -------------------- ##
24954## M4sh Initialization. ##
24955## -------------------- ##
24956
24957# Be more Bourne compatible
24958DUALCASE=1; export DUALCASE # for MKS sh
24959if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
24960 emulate sh
24961 NULLCMD=:
24962 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
24963 # is contrary to our usage. Disable this feature.
24964 alias -g '${1+"$@"}'='"$@"'
24965 setopt NO_GLOB_SUBST
24966else
24967 case `(set -o) 2>/dev/null` in #(
24968 *posix*) :
24969 set -o posix ;; #(
24970 *) :
24971 ;;
24972esac
24973fi
24974
24975
24976as_nl='
24977'
24978export as_nl
24979# Printing a long string crashes Solaris 7 /usr/bin/printf.
24980as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
24981as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
24982as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
24983# Prefer a ksh shell builtin over an external printf program on Solaris,
24984# but without wasting forks for bash or zsh.
24985if test -z "$BASH_VERSION$ZSH_VERSION" \
24986 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
24987 as_echo='print -r --'
24988 as_echo_n='print -rn --'
24989elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
24990 as_echo='printf %s\n'
24991 as_echo_n='printf %s'
24992else
24993 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
24994 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
24995 as_echo_n='/usr/ucb/echo -n'
24996 else
24997 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
24998 as_echo_n_body='eval
24999 arg=$1;
25000 case $arg in #(
25001 *"$as_nl"*)
25002 expr "X$arg" : "X\\(.*\\)$as_nl";
25003 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
25004 esac;
25005 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
25006 '
25007 export as_echo_n_body
25008 as_echo_n='sh -c $as_echo_n_body as_echo'
25009 fi
25010 export as_echo_body
25011 as_echo='sh -c $as_echo_body as_echo'
25012fi
25013
25014# The user is always right.
25015if test "${PATH_SEPARATOR+set}" != set; then
25016 PATH_SEPARATOR=:
25017 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
25018 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
25019 PATH_SEPARATOR=';'
25020 }
25021fi
25022
25023
25024# IFS
25025# We need space, tab and new line, in precisely that order. Quoting is
25026# there to prevent editors from complaining about space-tab.
25027# (If _AS_PATH_WALK were called with IFS unset, it would disable word
25028# splitting by setting IFS to empty value.)
25029IFS=" "" $as_nl"
25030
25031# Find who we are. Look in the path if we contain no directory separator.
63a9e923 25032as_myself=
c971b7fa
PA
25033case $0 in #((
25034 *[\\/]* ) as_myself=$0 ;;
25035 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25036for as_dir in $PATH
25037do
25038 IFS=$as_save_IFS
25039 test -z "$as_dir" && as_dir=.
25040 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
25041 done
25042IFS=$as_save_IFS
25043
25044 ;;
25045esac
25046# We did not find ourselves, most probably we were run as `sh COMMAND'
25047# in which case we are not to be found in the path.
25048if test "x$as_myself" = x; then
25049 as_myself=$0
25050fi
25051if test ! -f "$as_myself"; then
25052 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
25053 exit 1
25054fi
25055
25056# Unset variables that we do not need and which cause bugs (e.g. in
25057# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
25058# suppresses any "Segmentation fault" message there. '((' could
25059# trigger a bug in pdksh 5.2.14.
25060for as_var in BASH_ENV ENV MAIL MAILPATH
25061do eval test x\${$as_var+set} = xset \
25062 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
25063done
25064PS1='$ '
25065PS2='> '
25066PS4='+ '
25067
25068# NLS nuisances.
25069LC_ALL=C
25070export LC_ALL
25071LANGUAGE=C
25072export LANGUAGE
25073
25074# CDPATH.
25075(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
25076
25077
63a9e923
SM
25078# as_fn_error STATUS ERROR [LINENO LOG_FD]
25079# ----------------------------------------
c971b7fa
PA
25080# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
25081# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
63a9e923 25082# script with STATUS, using 1 if that was 0.
c971b7fa
PA
25083as_fn_error ()
25084{
63a9e923
SM
25085 as_status=$1; test $as_status -eq 0 && as_status=1
25086 if test "$4"; then
25087 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
25088 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
c971b7fa 25089 fi
63a9e923 25090 $as_echo "$as_me: error: $2" >&2
c971b7fa
PA
25091 as_fn_exit $as_status
25092} # as_fn_error
25093
25094
25095# as_fn_set_status STATUS
25096# -----------------------
25097# Set $? to STATUS, without forking.
25098as_fn_set_status ()
25099{
25100 return $1
25101} # as_fn_set_status
25102
25103# as_fn_exit STATUS
25104# -----------------
25105# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
25106as_fn_exit ()
25107{
25108 set +e
25109 as_fn_set_status $1
25110 exit $1
25111} # as_fn_exit
25112
25113# as_fn_unset VAR
25114# ---------------
25115# Portably unset VAR.
25116as_fn_unset ()
25117{
25118 { eval $1=; unset $1;}
25119}
25120as_unset=as_fn_unset
25121# as_fn_append VAR VALUE
25122# ----------------------
25123# Append the text in VALUE to the end of the definition contained in VAR. Take
25124# advantage of any shell optimizations that allow amortized linear growth over
25125# repeated appends, instead of the typical quadratic growth present in naive
25126# implementations.
25127if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
25128 eval 'as_fn_append ()
25129 {
25130 eval $1+=\$2
25131 }'
25132else
25133 as_fn_append ()
25134 {
25135 eval $1=\$$1\$2
25136 }
25137fi # as_fn_append
25138
25139# as_fn_arith ARG...
25140# ------------------
25141# Perform arithmetic evaluation on the ARGs, and store the result in the
25142# global $as_val. Take advantage of shells that can avoid forks. The arguments
25143# must be portable across $(()) and expr.
25144if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
25145 eval 'as_fn_arith ()
25146 {
25147 as_val=$(( $* ))
25148 }'
25149else
25150 as_fn_arith ()
25151 {
25152 as_val=`expr "$@" || test $? -eq 1`
25153 }
25154fi # as_fn_arith
25155
25156
25157if expr a : '\(a\)' >/dev/null 2>&1 &&
25158 test "X`expr 00001 : '.*\(...\)'`" = X001; then
25159 as_expr=expr
25160else
25161 as_expr=false
25162fi
25163
25164if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
25165 as_basename=basename
25166else
25167 as_basename=false
25168fi
25169
25170if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
25171 as_dirname=dirname
25172else
25173 as_dirname=false
25174fi
25175
25176as_me=`$as_basename -- "$0" ||
25177$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25178 X"$0" : 'X\(//\)$' \| \
25179 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
25180$as_echo X/"$0" |
25181 sed '/^.*\/\([^/][^/]*\)\/*$/{
25182 s//\1/
25183 q
25184 }
25185 /^X\/\(\/\/\)$/{
25186 s//\1/
25187 q
25188 }
25189 /^X\/\(\/\).*/{
25190 s//\1/
25191 q
25192 }
25193 s/.*/./; q'`
25194
25195# Avoid depending upon Character Ranges.
25196as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25197as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25198as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25199as_cr_digits='0123456789'
25200as_cr_alnum=$as_cr_Letters$as_cr_digits
25201
25202ECHO_C= ECHO_N= ECHO_T=
25203case `echo -n x` in #(((((
25204-n*)
25205 case `echo 'xy\c'` in
25206 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
25207 xy) ECHO_C='\c';;
25208 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
25209 ECHO_T=' ';;
25210 esac;;
25211*)
25212 ECHO_N='-n';;
25213esac
25214
25215rm -f conf$$ conf$$.exe conf$$.file
25216if test -d conf$$.dir; then
25217 rm -f conf$$.dir/conf$$.file
25218else
25219 rm -f conf$$.dir
25220 mkdir conf$$.dir 2>/dev/null
25221fi
25222if (echo >conf$$.file) 2>/dev/null; then
25223 if ln -s conf$$.file conf$$ 2>/dev/null; then
25224 as_ln_s='ln -s'
25225 # ... but there are two gotchas:
25226 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25227 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
63a9e923 25228 # In both cases, we have to default to `cp -pR'.
c971b7fa 25229 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
63a9e923 25230 as_ln_s='cp -pR'
c971b7fa
PA
25231 elif ln conf$$.file conf$$ 2>/dev/null; then
25232 as_ln_s=ln
25233 else
63a9e923 25234 as_ln_s='cp -pR'
c971b7fa
PA
25235 fi
25236else
63a9e923 25237 as_ln_s='cp -pR'
c971b7fa
PA
25238fi
25239rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25240rmdir conf$$.dir 2>/dev/null
25241
25242
25243# as_fn_mkdir_p
25244# -------------
25245# Create "$as_dir" as a directory, including parents if necessary.
25246as_fn_mkdir_p ()
25247{
25248
25249 case $as_dir in #(
25250 -*) as_dir=./$as_dir;;
25251 esac
25252 test -d "$as_dir" || eval $as_mkdir_p || {
25253 as_dirs=
25254 while :; do
25255 case $as_dir in #(
25256 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
25257 *) as_qdir=$as_dir;;
25258 esac
25259 as_dirs="'$as_qdir' $as_dirs"
25260 as_dir=`$as_dirname -- "$as_dir" ||
25261$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25262 X"$as_dir" : 'X\(//\)[^/]' \| \
25263 X"$as_dir" : 'X\(//\)$' \| \
25264 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
25265$as_echo X"$as_dir" |
25266 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25267 s//\1/
25268 q
25269 }
25270 /^X\(\/\/\)[^/].*/{
25271 s//\1/
25272 q
25273 }
25274 /^X\(\/\/\)$/{
25275 s//\1/
25276 q
25277 }
25278 /^X\(\/\).*/{
25279 s//\1/
25280 q
25281 }
25282 s/.*/./; q'`
25283 test -d "$as_dir" && break
25284 done
25285 test -z "$as_dirs" || eval "mkdir $as_dirs"
63a9e923 25286 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
c971b7fa
PA
25287
25288
25289} # as_fn_mkdir_p
25290if mkdir -p . 2>/dev/null; then
25291 as_mkdir_p='mkdir -p "$as_dir"'
25292else
25293 test -d ./-p && rmdir ./-p
25294 as_mkdir_p=false
25295fi
25296
63a9e923
SM
25297
25298# as_fn_executable_p FILE
25299# -----------------------
25300# Test if FILE is an executable regular file.
25301as_fn_executable_p ()
25302{
25303 test -f "$1" && test -x "$1"
25304} # as_fn_executable_p
25305as_test_x='test -x'
25306as_executable_p=as_fn_executable_p
c971b7fa
PA
25307
25308# Sed expression to map a string onto a valid CPP name.
25309as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
25310
25311# Sed expression to map a string onto a valid variable name.
25312as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
25313
25314
25315exec 6>&1
25316## ----------------------------------- ##
25317## Main body of $CONFIG_STATUS script. ##
25318## ----------------------------------- ##
25319_ASEOF
25320test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
25321
25322cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25323# Save the log message, to keep $0 and so on meaningful, and to
25324# report actual input values of CONFIG_FILES etc. instead of their
25325# values after options handling.
25326ac_log="
63a9e923
SM
25327This file was extended by libgnu $as_me UNUSED-VERSION, which was
25328generated by GNU Autoconf 2.69. Invocation command line was
c971b7fa
PA
25329
25330 CONFIG_FILES = $CONFIG_FILES
25331 CONFIG_HEADERS = $CONFIG_HEADERS
25332 CONFIG_LINKS = $CONFIG_LINKS
25333 CONFIG_COMMANDS = $CONFIG_COMMANDS
25334 $ $0 $@
25335
25336on `(hostname || uname -n) 2>/dev/null | sed 1q`
25337"
25338
25339_ACEOF
25340
25341case $ac_config_files in *"
25342"*) set x $ac_config_files; shift; ac_config_files=$*;;
25343esac
25344
25345case $ac_config_headers in *"
25346"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
25347esac
25348
25349
25350cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25351# Files that config.status was made for.
25352config_files="$ac_config_files"
25353config_headers="$ac_config_headers"
25354config_commands="$ac_config_commands"
25355
25356_ACEOF
25357
25358cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25359ac_cs_usage="\
25360\`$as_me' instantiates files and other configuration actions
25361from templates according to the current configuration. Unless the files
25362and actions are specified as TAGs, all are instantiated by default.
25363
25364Usage: $0 [OPTION]... [TAG]...
25365
25366 -h, --help print this help, then exit
25367 -V, --version print version number and configuration settings, then exit
63a9e923 25368 --config print configuration, then exit
c971b7fa
PA
25369 -q, --quiet, --silent
25370 do not print progress messages
25371 -d, --debug don't remove temporary files
25372 --recheck update $as_me by reconfiguring in the same conditions
25373 --file=FILE[:TEMPLATE]
25374 instantiate the configuration file FILE
25375 --header=FILE[:TEMPLATE]
25376 instantiate the configuration header FILE
25377
25378Configuration files:
25379$config_files
25380
25381Configuration headers:
25382$config_headers
25383
25384Configuration commands:
25385$config_commands
25386
25387Report bugs to the package provider."
25388
25389_ACEOF
25390cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
63a9e923 25391ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
c971b7fa 25392ac_cs_version="\\
63a9e923
SM
25393libgnu config.status UNUSED-VERSION
25394configured by $0, generated by GNU Autoconf 2.69,
25395 with options \\"\$ac_cs_config\\"
c971b7fa 25396
63a9e923 25397Copyright (C) 2012 Free Software Foundation, Inc.
c971b7fa
PA
25398This config.status script is free software; the Free Software Foundation
25399gives unlimited permission to copy, distribute and modify it."
25400
25401ac_pwd='$ac_pwd'
25402srcdir='$srcdir'
25403INSTALL='$INSTALL'
25404MKDIR_P='$MKDIR_P'
25405AWK='$AWK'
25406test -n "\$AWK" || AWK=awk
25407_ACEOF
25408
25409cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25410# The default lists apply if the user does not specify any file.
25411ac_need_defaults=:
25412while test $# != 0
25413do
25414 case $1 in
63a9e923 25415 --*=?*)
c971b7fa
PA
25416 ac_option=`expr "X$1" : 'X\([^=]*\)='`
25417 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
25418 ac_shift=:
25419 ;;
63a9e923
SM
25420 --*=)
25421 ac_option=`expr "X$1" : 'X\([^=]*\)='`
25422 ac_optarg=
25423 ac_shift=:
25424 ;;
c971b7fa
PA
25425 *)
25426 ac_option=$1
25427 ac_optarg=$2
25428 ac_shift=shift
25429 ;;
25430 esac
25431
25432 case $ac_option in
25433 # Handling of the options.
25434 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25435 ac_cs_recheck=: ;;
25436 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25437 $as_echo "$ac_cs_version"; exit ;;
63a9e923
SM
25438 --config | --confi | --conf | --con | --co | --c )
25439 $as_echo "$ac_cs_config"; exit ;;
c971b7fa
PA
25440 --debug | --debu | --deb | --de | --d | -d )
25441 debug=: ;;
25442 --file | --fil | --fi | --f )
25443 $ac_shift
25444 case $ac_optarg in
25445 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
63a9e923 25446 '') as_fn_error $? "missing file argument" ;;
c971b7fa
PA
25447 esac
25448 as_fn_append CONFIG_FILES " '$ac_optarg'"
25449 ac_need_defaults=false;;
25450 --header | --heade | --head | --hea )
25451 $ac_shift
25452 case $ac_optarg in
25453 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25454 esac
25455 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
25456 ac_need_defaults=false;;
25457 --he | --h)
25458 # Conflict between --help and --header
63a9e923 25459 as_fn_error $? "ambiguous option: \`$1'
c971b7fa
PA
25460Try \`$0 --help' for more information.";;
25461 --help | --hel | -h )
25462 $as_echo "$ac_cs_usage"; exit ;;
25463 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25464 | -silent | --silent | --silen | --sile | --sil | --si | --s)
25465 ac_cs_silent=: ;;
25466
25467 # This is an error.
63a9e923 25468 -*) as_fn_error $? "unrecognized option: \`$1'
c971b7fa
PA
25469Try \`$0 --help' for more information." ;;
25470
25471 *) as_fn_append ac_config_targets " $1"
25472 ac_need_defaults=false ;;
25473
25474 esac
25475 shift
25476done
25477
25478ac_configure_extra_args=
25479
25480if $ac_cs_silent; then
25481 exec 6>/dev/null
25482 ac_configure_extra_args="$ac_configure_extra_args --silent"
25483fi
25484
25485_ACEOF
25486cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25487if \$ac_cs_recheck; then
63a9e923 25488 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
c971b7fa
PA
25489 shift
25490 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
25491 CONFIG_SHELL='$SHELL'
25492 export CONFIG_SHELL
25493 exec "\$@"
25494fi
25495
25496_ACEOF
25497cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25498exec 5>>config.log
25499{
25500 echo
25501 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25502## Running $as_me. ##
25503_ASBOX
25504 $as_echo "$ac_log"
25505} >&5
25506
25507_ACEOF
25508cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25509#
25510# INIT-COMMANDS
25511#
25512AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
25513
25514_ACEOF
25515
25516cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25517
25518# Handling of arguments.
25519for ac_config_target in $ac_config_targets
25520do
25521 case $ac_config_target in
25522 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
25523 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
25524 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
25525 "import/Makefile") CONFIG_FILES="$CONFIG_FILES import/Makefile" ;;
25526 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
25527
63a9e923 25528 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c971b7fa
PA
25529 esac
25530done
25531
25532
25533# If the user did not use the arguments to specify the items to instantiate,
25534# then the envvar interface is used. Set only those that are not.
25535# We use the long form for the default assignment because of an extremely
25536# bizarre bug on SunOS 4.1.3.
25537if $ac_need_defaults; then
25538 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25539 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25540 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
25541fi
25542
25543# Have a temporary directory for convenience. Make it in the build tree
25544# simply because there is no reason against having it here, and in addition,
25545# creating and moving files from /tmp can sometimes cause problems.
25546# Hook for its removal unless debugging.
25547# Note that there is a small window in which the directory will not be cleaned:
25548# after its creation but before its name has been assigned to `$tmp'.
25549$debug ||
25550{
63a9e923 25551 tmp= ac_tmp=
c971b7fa 25552 trap 'exit_status=$?
63a9e923
SM
25553 : "${ac_tmp:=$tmp}"
25554 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
c971b7fa
PA
25555' 0
25556 trap 'as_fn_exit 1' 1 2 13 15
25557}
25558# Create a (secure) tmp directory for tmp files.
25559
25560{
25561 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
63a9e923 25562 test -d "$tmp"
c971b7fa
PA
25563} ||
25564{
25565 tmp=./conf$$-$RANDOM
25566 (umask 077 && mkdir "$tmp")
63a9e923
SM
25567} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
25568ac_tmp=$tmp
c971b7fa
PA
25569
25570# Set up the scripts for CONFIG_FILES section.
25571# No need to generate them if there are no CONFIG_FILES.
25572# This happens for instance with `./config.status config.h'.
25573if test -n "$CONFIG_FILES"; then
25574
25575
25576ac_cr=`echo X | tr X '\015'`
25577# On cygwin, bash can eat \r inside `` if the user requested igncr.
25578# But we know of no other shell where ac_cr would be empty at this
25579# point, so we can use a bashism as a fallback.
25580if test "x$ac_cr" = x; then
25581 eval ac_cr=\$\'\\r\'
25582fi
25583ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
25584if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
63a9e923 25585 ac_cs_awk_cr='\\r'
c971b7fa
PA
25586else
25587 ac_cs_awk_cr=$ac_cr
25588fi
25589
63a9e923 25590echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
c971b7fa
PA
25591_ACEOF
25592
25593
25594{
25595 echo "cat >conf$$subs.awk <<_ACEOF" &&
25596 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
25597 echo "_ACEOF"
25598} >conf$$subs.sh ||
63a9e923
SM
25599 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
25600ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
c971b7fa
PA
25601ac_delim='%!_!# '
25602for ac_last_try in false false false false false :; do
25603 . ./conf$$subs.sh ||
63a9e923 25604 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
c971b7fa
PA
25605
25606 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
25607 if test $ac_delim_n = $ac_delim_num; then
25608 break
25609 elif $ac_last_try; then
63a9e923 25610 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
c971b7fa
PA
25611 else
25612 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25613 fi
25614done
25615rm -f conf$$subs.sh
25616
25617cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
63a9e923 25618cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
c971b7fa
PA
25619_ACEOF
25620sed -n '
25621h
25622s/^/S["/; s/!.*/"]=/
25623p
25624g
25625s/^[^!]*!//
25626:repl
25627t repl
25628s/'"$ac_delim"'$//
25629t delim
25630:nl
25631h
63a9e923 25632s/\(.\{148\}\)..*/\1/
c971b7fa
PA
25633t more1
25634s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
25635p
25636n
25637b repl
25638:more1
25639s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25640p
25641g
25642s/.\{148\}//
25643t nl
25644:delim
25645h
63a9e923 25646s/\(.\{148\}\)..*/\1/
c971b7fa
PA
25647t more2
25648s/["\\]/\\&/g; s/^/"/; s/$/"/
25649p
25650b
25651:more2
25652s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25653p
25654g
25655s/.\{148\}//
25656t delim
25657' <conf$$subs.awk | sed '
25658/^[^""]/{
25659 N
25660 s/\n//
25661}
25662' >>$CONFIG_STATUS || ac_write_fail=1
25663rm -f conf$$subs.awk
25664cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25665_ACAWK
63a9e923 25666cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
c971b7fa
PA
25667 for (key in S) S_is_set[key] = 1
25668 FS = "\a"
25669
25670}
25671{
25672 line = $ 0
25673 nfields = split(line, field, "@")
25674 substed = 0
25675 len = length(field[1])
25676 for (i = 2; i < nfields; i++) {
25677 key = field[i]
25678 keylen = length(key)
25679 if (S_is_set[key]) {
25680 value = S[key]
25681 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
25682 len += length(value) + length(field[++i])
25683 substed = 1
25684 } else
25685 len += 1 + keylen
25686 }
25687
25688 print line
25689}
25690
25691_ACAWK
25692_ACEOF
25693cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25694if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
25695 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
25696else
25697 cat
63a9e923
SM
25698fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
25699 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
c971b7fa
PA
25700_ACEOF
25701
63a9e923
SM
25702# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
25703# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
c971b7fa
PA
25704# trailing colons and then remove the whole line if VPATH becomes empty
25705# (actually we leave an empty line to preserve line numbers).
25706if test "x$srcdir" = x.; then
63a9e923
SM
25707 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
25708h
25709s///
25710s/^/:/
25711s/[ ]*$/:/
25712s/:\$(srcdir):/:/g
25713s/:\${srcdir}:/:/g
25714s/:@srcdir@:/:/g
25715s/^:*//
c971b7fa 25716s/:*$//
63a9e923
SM
25717x
25718s/\(=[ ]*\).*/\1/
25719G
25720s/\n//
c971b7fa
PA
25721s/^[^=]*=[ ]*$//
25722}'
25723fi
25724
25725cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25726fi # test -n "$CONFIG_FILES"
25727
25728# Set up the scripts for CONFIG_HEADERS section.
25729# No need to generate them if there are no CONFIG_HEADERS.
25730# This happens for instance with `./config.status Makefile'.
25731if test -n "$CONFIG_HEADERS"; then
63a9e923 25732cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
c971b7fa
PA
25733BEGIN {
25734_ACEOF
25735
25736# Transform confdefs.h into an awk script `defines.awk', embedded as
25737# here-document in config.status, that substitutes the proper values into
25738# config.h.in to produce config.h.
25739
25740# Create a delimiter string that does not exist in confdefs.h, to ease
25741# handling of long lines.
25742ac_delim='%!_!# '
25743for ac_last_try in false false :; do
63a9e923
SM
25744 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
25745 if test -z "$ac_tt"; then
c971b7fa
PA
25746 break
25747 elif $ac_last_try; then
63a9e923 25748 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
c971b7fa
PA
25749 else
25750 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25751 fi
25752done
25753
25754# For the awk script, D is an array of macro values keyed by name,
25755# likewise P contains macro parameters if any. Preserve backslash
25756# newline sequences.
25757
25758ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25759sed -n '
25760s/.\{148\}/&'"$ac_delim"'/g
25761t rset
25762:rset
25763s/^[ ]*#[ ]*define[ ][ ]*/ /
25764t def
25765d
25766:def
25767s/\\$//
25768t bsnl
25769s/["\\]/\\&/g
25770s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
25771D["\1"]=" \3"/p
25772s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
25773d
25774:bsnl
25775s/["\\]/\\&/g
25776s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
25777D["\1"]=" \3\\\\\\n"\\/p
25778t cont
25779s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
25780t cont
25781d
25782:cont
25783n
25784s/.\{148\}/&'"$ac_delim"'/g
25785t clear
25786:clear
25787s/\\$//
25788t bsnlc
25789s/["\\]/\\&/g; s/^/"/; s/$/"/p
25790d
25791:bsnlc
25792s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
25793b cont
25794' <confdefs.h | sed '
25795s/'"$ac_delim"'/"\\\
25796"/g' >>$CONFIG_STATUS || ac_write_fail=1
25797
25798cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25799 for (key in D) D_is_set[key] = 1
25800 FS = "\a"
25801}
25802/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
25803 line = \$ 0
25804 split(line, arg, " ")
25805 if (arg[1] == "#") {
25806 defundef = arg[2]
25807 mac1 = arg[3]
25808 } else {
25809 defundef = substr(arg[1], 2)
25810 mac1 = arg[2]
25811 }
25812 split(mac1, mac2, "(") #)
25813 macro = mac2[1]
25814 prefix = substr(line, 1, index(line, defundef) - 1)
25815 if (D_is_set[macro]) {
25816 # Preserve the white space surrounding the "#".
25817 print prefix "define", macro P[macro] D[macro]
25818 next
25819 } else {
25820 # Replace #undef with comments. This is necessary, for example,
25821 # in the case of _POSIX_SOURCE, which is predefined and required
25822 # on some systems where configure will not decide to define it.
25823 if (defundef == "undef") {
25824 print "/*", prefix defundef, macro, "*/"
25825 next
25826 }
25827 }
25828}
25829{ print }
25830_ACAWK
25831_ACEOF
25832cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
63a9e923 25833 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
c971b7fa
PA
25834fi # test -n "$CONFIG_HEADERS"
25835
25836
25837eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
25838shift
25839for ac_tag
25840do
25841 case $ac_tag in
25842 :[FHLC]) ac_mode=$ac_tag; continue;;
25843 esac
25844 case $ac_mode$ac_tag in
25845 :[FHL]*:*);;
63a9e923 25846 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
c971b7fa
PA
25847 :[FH]-) ac_tag=-:-;;
25848 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25849 esac
25850 ac_save_IFS=$IFS
25851 IFS=:
25852 set x $ac_tag
25853 IFS=$ac_save_IFS
25854 shift
25855 ac_file=$1
25856 shift
25857
25858 case $ac_mode in
25859 :L) ac_source=$1;;
25860 :[FH])
25861 ac_file_inputs=
25862 for ac_f
25863 do
25864 case $ac_f in
63a9e923 25865 -) ac_f="$ac_tmp/stdin";;
c971b7fa
PA
25866 *) # Look for the file first in the build tree, then in the source tree
25867 # (if the path is not absolute). The absolute path cannot be DOS-style,
25868 # because $ac_f cannot contain `:'.
25869 test -f "$ac_f" ||
25870 case $ac_f in
25871 [\\/$]*) false;;
25872 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25873 esac ||
63a9e923 25874 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
c971b7fa
PA
25875 esac
25876 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
25877 as_fn_append ac_file_inputs " '$ac_f'"
25878 done
25879
25880 # Let's still pretend it is `configure' which instantiates (i.e., don't
25881 # use $as_me), people would be surprised to read:
25882 # /* config.h. Generated by config.status. */
25883 configure_input='Generated from '`
25884 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
25885 `' by configure.'
25886 if test x"$ac_file" != x-; then
25887 configure_input="$ac_file. $configure_input"
25888 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
25889$as_echo "$as_me: creating $ac_file" >&6;}
25890 fi
25891 # Neutralize special characters interpreted by sed in replacement strings.
25892 case $configure_input in #(
25893 *\&* | *\|* | *\\* )
25894 ac_sed_conf_input=`$as_echo "$configure_input" |
25895 sed 's/[\\\\&|]/\\\\&/g'`;; #(
25896 *) ac_sed_conf_input=$configure_input;;
25897 esac
25898
25899 case $ac_tag in
63a9e923
SM
25900 *:-:* | *:-) cat >"$ac_tmp/stdin" \
25901 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
c971b7fa
PA
25902 esac
25903 ;;
25904 esac
25905
25906 ac_dir=`$as_dirname -- "$ac_file" ||
25907$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25908 X"$ac_file" : 'X\(//\)[^/]' \| \
25909 X"$ac_file" : 'X\(//\)$' \| \
25910 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
25911$as_echo X"$ac_file" |
25912 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25913 s//\1/
25914 q
25915 }
25916 /^X\(\/\/\)[^/].*/{
25917 s//\1/
25918 q
25919 }
25920 /^X\(\/\/\)$/{
25921 s//\1/
25922 q
25923 }
25924 /^X\(\/\).*/{
25925 s//\1/
25926 q
25927 }
25928 s/.*/./; q'`
25929 as_dir="$ac_dir"; as_fn_mkdir_p
25930 ac_builddir=.
25931
25932case "$ac_dir" in
25933.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25934*)
25935 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
25936 # A ".." for each directory in $ac_dir_suffix.
25937 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
25938 case $ac_top_builddir_sub in
25939 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25940 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25941 esac ;;
25942esac
25943ac_abs_top_builddir=$ac_pwd
25944ac_abs_builddir=$ac_pwd$ac_dir_suffix
25945# for backward compatibility:
25946ac_top_builddir=$ac_top_build_prefix
25947
25948case $srcdir in
25949 .) # We are building in place.
25950 ac_srcdir=.
25951 ac_top_srcdir=$ac_top_builddir_sub
25952 ac_abs_top_srcdir=$ac_pwd ;;
25953 [\\/]* | ?:[\\/]* ) # Absolute name.
25954 ac_srcdir=$srcdir$ac_dir_suffix;
25955 ac_top_srcdir=$srcdir
25956 ac_abs_top_srcdir=$srcdir ;;
25957 *) # Relative name.
25958 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25959 ac_top_srcdir=$ac_top_build_prefix$srcdir
25960 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
25961esac
25962ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
25963
25964
25965 case $ac_mode in
25966 :F)
25967 #
25968 # CONFIG_FILE
25969 #
25970
25971 case $INSTALL in
25972 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
25973 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
25974 esac
25975 ac_MKDIR_P=$MKDIR_P
25976 case $MKDIR_P in
25977 [\\/$]* | ?:[\\/]* ) ;;
25978 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
25979 esac
25980_ACEOF
25981
25982cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25983# If the template does not know about datarootdir, expand it.
25984# FIXME: This hack should be removed a few years after 2.60.
25985ac_datarootdir_hack=; ac_datarootdir_seen=
25986ac_sed_dataroot='
25987/datarootdir/ {
25988 p
25989 q
25990}
25991/@datadir@/p
25992/@docdir@/p
25993/@infodir@/p
25994/@localedir@/p
25995/@mandir@/p'
25996case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
25997*datarootdir*) ac_datarootdir_seen=yes;;
25998*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25999 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26000$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
26001_ACEOF
26002cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26003 ac_datarootdir_hack='
26004 s&@datadir@&$datadir&g
26005 s&@docdir@&$docdir&g
26006 s&@infodir@&$infodir&g
26007 s&@localedir@&$localedir&g
26008 s&@mandir@&$mandir&g
26009 s&\\\${datarootdir}&$datarootdir&g' ;;
26010esac
26011_ACEOF
26012
26013# Neutralize VPATH when `$srcdir' = `.'.
26014# Shell code in configure.ac might set extrasub.
26015# FIXME: do we really want to maintain this feature?
26016cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26017ac_sed_extra="$ac_vpsub
26018$extrasub
26019_ACEOF
26020cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26021:t
26022/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
26023s|@configure_input@|$ac_sed_conf_input|;t t
26024s&@top_builddir@&$ac_top_builddir_sub&;t t
26025s&@top_build_prefix@&$ac_top_build_prefix&;t t
26026s&@srcdir@&$ac_srcdir&;t t
26027s&@abs_srcdir@&$ac_abs_srcdir&;t t
26028s&@top_srcdir@&$ac_top_srcdir&;t t
26029s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26030s&@builddir@&$ac_builddir&;t t
26031s&@abs_builddir@&$ac_abs_builddir&;t t
26032s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26033s&@INSTALL@&$ac_INSTALL&;t t
26034s&@MKDIR_P@&$ac_MKDIR_P&;t t
26035$ac_datarootdir_hack
26036"
63a9e923
SM
26037eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
26038 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
c971b7fa
PA
26039
26040test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
63a9e923
SM
26041 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
26042 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
26043 "$ac_tmp/out"`; test -z "$ac_out"; } &&
c971b7fa 26044 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
63a9e923 26045which seems to be undefined. Please make sure it is defined" >&5
c971b7fa 26046$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
63a9e923 26047which seems to be undefined. Please make sure it is defined" >&2;}
c971b7fa 26048
63a9e923 26049 rm -f "$ac_tmp/stdin"
c971b7fa 26050 case $ac_file in
63a9e923
SM
26051 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
26052 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
c971b7fa 26053 esac \
63a9e923 26054 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
c971b7fa
PA
26055 ;;
26056 :H)
26057 #
26058 # CONFIG_HEADER
26059 #
26060 if test x"$ac_file" != x-; then
26061 {
26062 $as_echo "/* $configure_input */" \
63a9e923
SM
26063 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
26064 } >"$ac_tmp/config.h" \
26065 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
26066 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
c971b7fa
PA
26067 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
26068$as_echo "$as_me: $ac_file is unchanged" >&6;}
26069 else
26070 rm -f "$ac_file"
63a9e923
SM
26071 mv "$ac_tmp/config.h" "$ac_file" \
26072 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
c971b7fa
PA
26073 fi
26074 else
26075 $as_echo "/* $configure_input */" \
63a9e923
SM
26076 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
26077 || as_fn_error $? "could not create -" "$LINENO" 5
c971b7fa
PA
26078 fi
26079# Compute "$ac_file"'s index in $config_headers.
26080_am_arg="$ac_file"
26081_am_stamp_count=1
26082for _am_header in $config_headers :; do
26083 case $_am_header in
26084 $_am_arg | $_am_arg:* )
26085 break ;;
26086 * )
26087 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
26088 esac
26089done
26090echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
26091$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26092 X"$_am_arg" : 'X\(//\)[^/]' \| \
26093 X"$_am_arg" : 'X\(//\)$' \| \
26094 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
26095$as_echo X"$_am_arg" |
26096 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26097 s//\1/
26098 q
26099 }
26100 /^X\(\/\/\)[^/].*/{
26101 s//\1/
26102 q
26103 }
26104 /^X\(\/\/\)$/{
26105 s//\1/
26106 q
26107 }
26108 /^X\(\/\).*/{
26109 s//\1/
26110 q
26111 }
26112 s/.*/./; q'`/stamp-h$_am_stamp_count
26113 ;;
26114
26115 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
26116$as_echo "$as_me: executing $ac_file commands" >&6;}
26117 ;;
26118 esac
26119
26120
26121 case $ac_file$ac_mode in
26122 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
63a9e923 26123 # Older Autoconf quotes --file arguments for eval, but not when files
c971b7fa
PA
26124 # are listed without --file. Let's play safe and only enable the eval
26125 # if we detect the quoting.
26126 case $CONFIG_FILES in
26127 *\'*) eval set x "$CONFIG_FILES" ;;
26128 *) set x $CONFIG_FILES ;;
26129 esac
26130 shift
26131 for mf
26132 do
26133 # Strip MF so we end up with the name of the file.
26134 mf=`echo "$mf" | sed -e 's/:.*$//'`
26135 # Check whether this is an Automake generated Makefile or not.
63a9e923 26136 # We used to match only the files named 'Makefile.in', but
c971b7fa
PA
26137 # some people rename them; so instead we look at the file content.
26138 # Grep'ing the first line is not enough: some people post-process
26139 # each Makefile.in and add a new line on top of each file to say so.
26140 # Grep'ing the whole file is not good either: AIX grep has a line
26141 # limit of 2048, but all sed's we know have understand at least 4000.
26142 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
26143 dirpart=`$as_dirname -- "$mf" ||
26144$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26145 X"$mf" : 'X\(//\)[^/]' \| \
26146 X"$mf" : 'X\(//\)$' \| \
26147 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
26148$as_echo X"$mf" |
26149 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26150 s//\1/
26151 q
26152 }
26153 /^X\(\/\/\)[^/].*/{
26154 s//\1/
26155 q
26156 }
26157 /^X\(\/\/\)$/{
26158 s//\1/
26159 q
26160 }
26161 /^X\(\/\).*/{
26162 s//\1/
26163 q
26164 }
26165 s/.*/./; q'`
26166 else
26167 continue
26168 fi
26169 # Extract the definition of DEPDIR, am__include, and am__quote
63a9e923 26170 # from the Makefile without running 'make'.
c971b7fa
PA
26171 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
26172 test -z "$DEPDIR" && continue
26173 am__include=`sed -n 's/^am__include = //p' < "$mf"`
63a9e923 26174 test -z "$am__include" && continue
c971b7fa 26175 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
c971b7fa
PA
26176 # Find all dependency output files, they are included files with
26177 # $(DEPDIR) in their names. We invoke sed twice because it is the
26178 # simplest approach to changing $(DEPDIR) to its actual value in the
26179 # expansion.
26180 for file in `sed -n "
26181 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
63a9e923 26182 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
c971b7fa
PA
26183 # Make sure the directory exists.
26184 test -f "$dirpart/$file" && continue
26185 fdir=`$as_dirname -- "$file" ||
26186$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26187 X"$file" : 'X\(//\)[^/]' \| \
26188 X"$file" : 'X\(//\)$' \| \
26189 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
26190$as_echo X"$file" |
26191 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26192 s//\1/
26193 q
26194 }
26195 /^X\(\/\/\)[^/].*/{
26196 s//\1/
26197 q
26198 }
26199 /^X\(\/\/\)$/{
26200 s//\1/
26201 q
26202 }
26203 /^X\(\/\).*/{
26204 s//\1/
26205 q
26206 }
26207 s/.*/./; q'`
26208 as_dir=$dirpart/$fdir; as_fn_mkdir_p
26209 # echo "creating $dirpart/$file"
26210 echo '# dummy' > "$dirpart/$file"
26211 done
26212 done
26213}
26214 ;;
26215 "default":C)
26216case x$CONFIG_HEADERS in
26217xconfig.h:config.in)
26218echo > stamp-h ;;
26219esac
26220 ;;
26221
26222 esac
26223done # for ac_tag
26224
26225
26226as_fn_exit 0
26227_ACEOF
26228ac_clean_files=$ac_clean_files_save
26229
26230test $ac_write_fail = 0 ||
63a9e923 26231 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
c971b7fa
PA
26232
26233
26234# configure is writing to config.log, and then calls config.status.
26235# config.status does its own redirection, appending to config.log.
26236# Unfortunately, on DOS this fails, as config.log is still kept open
26237# by configure, so config.status won't be able to write to it; its
26238# output is simply discarded. So we exec the FD to /dev/null,
26239# effectively closing config.log, so it can be properly (re)opened and
26240# appended to by config.status. When coming back to configure, we
26241# need to make the FD available again.
26242if test "$no_create" != yes; then
26243 ac_cs_success=:
26244 ac_config_status_args=
26245 test "$silent" = yes &&
26246 ac_config_status_args="$ac_config_status_args --quiet"
26247 exec 5>/dev/null
26248 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
26249 exec 5>>config.log
26250 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26251 # would make configure fail if this is the last instruction.
63a9e923 26252 $ac_cs_success || as_fn_exit 1
c971b7fa
PA
26253fi
26254if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
26255 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
26256$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
26257fi
26258
26259
26260exit 0