Update gnulib to current upstream master
[deliverable/binutils-gdb.git] / gdb / gnulib / configure
CommitLineData
c971b7fa
PA
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
d0ac1c44
SM
3# Generated by GNU Autoconf 2.69 for libgnu UNUSED-VERSION.
4#
5#
6# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
c971b7fa 7#
c971b7fa
PA
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
14
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18 emulate sh
19 NULLCMD=:
20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
31fi
32
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
79fi
80
81
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 90as_myself=
c971b7fa
PA
91case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94for as_dir in $PATH
95do
96 IFS=$as_save_IFS
97 test -z "$as_dir" && as_dir=.
98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
100IFS=$as_save_IFS
101
102 ;;
103esac
104# We did not find ourselves, most probably we were run as `sh COMMAND'
105# in which case we are not to be found in the path.
106if test "x$as_myself" = x; then
107 as_myself=$0
108fi
109if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112fi
113
114# Unset variables that we do not need and which cause bugs (e.g. in
115# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116# suppresses any "Segmentation fault" message there. '((' could
117# trigger a bug in pdksh 5.2.14.
118for as_var in BASH_ENV ENV MAIL MAILPATH
119do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121done
122PS1='$ '
123PS2='> '
124PS4='+ '
125
126# NLS nuisances.
127LC_ALL=C
128export LC_ALL
129LANGUAGE=C
130export LANGUAGE
131
132# CDPATH.
133(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
d0ac1c44
SM
135# Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140# neutralization value for shells without unset; and this also
141# works around shells that cannot unset nonexistent variables.
142# Preserve -v and -x to the replacement shell.
143BASH_ENV=/dev/null
144ENV=/dev/null
145(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151esac
152exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153# Admittedly, this is quite paranoid, since all the known shells bail
154# out after a failed `exec'.
155$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
c971b7fa
PA
160if test "x$CONFIG_SHELL" = x; then
161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162 emulate sh
163 NULLCMD=:
164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 # is contrary to our usage. Disable this feature.
166 alias -g '\${1+\"\$@\"}'='\"\$@\"'
167 setopt NO_GLOB_SUBST
168else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174esac
175fi
176"
177 as_required="as_fn_return () { (exit \$1); }
178as_fn_success () { as_fn_return 0; }
179as_fn_failure () { as_fn_return 1; }
180as_fn_ret_success () { return 0; }
181as_fn_ret_failure () { return 1; }
182
183exitcode=0
184as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190else
191 exitcode=1; echo positional parameters were not saved.
192fi
d0ac1c44
SM
193test x\$exitcode = x0 || exit 1
194test -x / || exit 1"
c971b7fa
PA
195 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199test \$(( 1 + 1 )) = 2 || exit 1"
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202else
203 as_have_required=no
204fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209as_found=false
210for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211do
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
216 /*)
217 for as_base in sh bash ksh sh5; do
218 # Try only shells that exist, to save several forks.
219 as_shell=$as_dir/$as_base
220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 CONFIG_SHELL=$as_shell as_have_required=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 break 2
225fi
226fi
227 done;;
228 esac
229 as_found=false
230done
231$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233 CONFIG_SHELL=$SHELL as_have_required=yes
234fi; }
235IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
d0ac1c44
SM
239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241# neutralization value for shells without unset; and this also
242# works around shells that cannot unset nonexistent variables.
243# Preserve -v and -x to the replacement shell.
244BASH_ENV=/dev/null
245ENV=/dev/null
246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252esac
253exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254# Admittedly, this is quite paranoid, since all the known shells bail
255# out after a failed `exec'.
256$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257exit 255
c971b7fa
PA
258fi
259
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266 else
267 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268$0: including any error possibly output before this
269$0: message. Then install a modern shell, or manually run
270$0: the script under such a shell if you do have one."
271 fi
272 exit 1
273fi
274fi
275fi
276SHELL=${CONFIG_SHELL-/bin/sh}
277export SHELL
278# Unset more variables known to interfere with behavior of common tools.
279CLICOLOR_FORCE= GREP_OPTIONS=
280unset CLICOLOR_FORCE GREP_OPTIONS
281
282## --------------------- ##
283## M4sh Shell Functions. ##
284## --------------------- ##
285# as_fn_unset VAR
286# ---------------
287# Portably unset VAR.
288as_fn_unset ()
289{
290 { eval $1=; unset $1;}
291}
292as_unset=as_fn_unset
293
294# as_fn_set_status STATUS
295# -----------------------
296# Set $? to STATUS, without forking.
297as_fn_set_status ()
298{
299 return $1
300} # as_fn_set_status
301
302# as_fn_exit STATUS
303# -----------------
304# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305as_fn_exit ()
306{
307 set +e
308 as_fn_set_status $1
309 exit $1
310} # as_fn_exit
311
312# as_fn_mkdir_p
313# -------------
314# Create "$as_dir" as a directory, including parents if necessary.
315as_fn_mkdir_p ()
316{
317
318 case $as_dir in #(
319 -*) as_dir=./$as_dir;;
320 esac
321 test -d "$as_dir" || eval $as_mkdir_p || {
322 as_dirs=
323 while :; do
324 case $as_dir in #(
325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 *) as_qdir=$as_dir;;
327 esac
328 as_dirs="'$as_qdir' $as_dirs"
329 as_dir=`$as_dirname -- "$as_dir" ||
330$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334$as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 s//\1/
337 q
338 }
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\).*/{
348 s//\1/
349 q
350 }
351 s/.*/./; q'`
352 test -d "$as_dir" && break
353 done
354 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
c971b7fa
PA
356
357
358} # as_fn_mkdir_p
d0ac1c44
SM
359
360# as_fn_executable_p FILE
361# -----------------------
362# Test if FILE is an executable regular file.
363as_fn_executable_p ()
364{
365 test -f "$1" && test -x "$1"
366} # as_fn_executable_p
c971b7fa
PA
367# as_fn_append VAR VALUE
368# ----------------------
369# Append the text in VALUE to the end of the definition contained in VAR. Take
370# advantage of any shell optimizations that allow amortized linear growth over
371# repeated appends, instead of the typical quadratic growth present in naive
372# implementations.
373if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 eval 'as_fn_append ()
375 {
376 eval $1+=\$2
377 }'
378else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383fi # as_fn_append
384
385# as_fn_arith ARG...
386# ------------------
387# Perform arithmetic evaluation on the ARGs, and store the result in the
388# global $as_val. Take advantage of shells that can avoid forks. The arguments
389# must be portable across $(()) and expr.
390if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400fi # as_fn_arith
401
402
d0ac1c44
SM
403# as_fn_error STATUS ERROR [LINENO LOG_FD]
404# ----------------------------------------
c971b7fa
PA
405# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 407# script with STATUS, using 1 if that was 0.
c971b7fa
PA
408as_fn_error ()
409{
d0ac1c44
SM
410 as_status=$1; test $as_status -eq 0 && as_status=1
411 if test "$4"; then
412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
c971b7fa 414 fi
d0ac1c44 415 $as_echo "$as_me: error: $2" >&2
c971b7fa
PA
416 as_fn_exit $as_status
417} # as_fn_error
418
419if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
421 as_expr=expr
422else
423 as_expr=false
424fi
425
426if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427 as_basename=basename
428else
429 as_basename=false
430fi
431
432if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434else
435 as_dirname=false
436fi
437
438as_me=`$as_basename -- "$0" ||
439$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442$as_echo X/"$0" |
443 sed '/^.*\/\([^/][^/]*\)\/*$/{
444 s//\1/
445 q
446 }
447 /^X\/\(\/\/\)$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\).*/{
452 s//\1/
453 q
454 }
455 s/.*/./; q'`
456
457# Avoid depending upon Character Ranges.
458as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461as_cr_digits='0123456789'
462as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465 as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
470 sed -n '
471 p
472 /[$]LINENO/=
473 ' <$as_myself |
474 sed '
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
479 N
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482 t loop
483 s/-\n.*//
484 ' >$as_me.lineno &&
485 chmod +x "$as_me.lineno" ||
486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
d0ac1c44
SM
488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec=no; export _as_can_reexec
c971b7fa
PA
492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
496 # Exit status is that of the last command.
497 exit
498}
499
500ECHO_C= ECHO_N= ECHO_T=
501case `echo -n x` in #(((((
502-n*)
503 case `echo 'xy\c'` in
504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
508 esac;;
509*)
510 ECHO_N='-n';;
511esac
512
513rm -f conf$$ conf$$.exe conf$$.file
514if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
516else
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
519fi
520if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
522 as_ln_s='ln -s'
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 526 # In both cases, we have to default to `cp -pR'.
c971b7fa 527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 528 as_ln_s='cp -pR'
c971b7fa
PA
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
d0ac1c44 532 as_ln_s='cp -pR'
c971b7fa
PA
533 fi
534else
d0ac1c44 535 as_ln_s='cp -pR'
c971b7fa
PA
536fi
537rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538rmdir conf$$.dir 2>/dev/null
539
540if mkdir -p . 2>/dev/null; then
541 as_mkdir_p='mkdir -p "$as_dir"'
542else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545fi
546
d0ac1c44
SM
547as_test_x='test -x'
548as_executable_p=as_fn_executable_p
c971b7fa
PA
549
550# Sed expression to map a string onto a valid CPP name.
551as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553# Sed expression to map a string onto a valid variable name.
554as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
d0ac1c44
SM
557test -n "$DJDIR" || exec 7<&0 </dev/null
558exec 6>&1
c971b7fa
PA
559
560# Name of the host.
d0ac1c44 561# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
c971b7fa
PA
562# so uname gets run too.
563ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565#
566# Initializations.
567#
568ac_default_prefix=/usr/local
569ac_clean_files=
570ac_config_libobj_dir=.
571LIBOBJS=
572cross_compiling=no
573subdirs=
574MFLAGS=
575MAKEFLAGS=
576
577# Identity of this package.
d0ac1c44
SM
578PACKAGE_NAME='libgnu'
579PACKAGE_TARNAME='libgnu'
580PACKAGE_VERSION='UNUSED-VERSION'
581PACKAGE_STRING='libgnu UNUSED-VERSION'
582PACKAGE_BUGREPORT=''
583PACKAGE_URL=''
c971b7fa 584
8690e634 585ac_unique_file="import/memmem.c"
c971b7fa
PA
586# Factoring default headers for most tests.
587ac_includes_default="\
588#include <stdio.h>
589#ifdef HAVE_SYS_TYPES_H
590# include <sys/types.h>
591#endif
592#ifdef HAVE_SYS_STAT_H
593# include <sys/stat.h>
594#endif
595#ifdef STDC_HEADERS
596# include <stdlib.h>
597# include <stddef.h>
598#else
599# ifdef HAVE_STDLIB_H
600# include <stdlib.h>
601# endif
602#endif
603#ifdef HAVE_STRING_H
604# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
605# include <memory.h>
606# endif
607# include <string.h>
608#endif
609#ifdef HAVE_STRINGS_H
610# include <strings.h>
611#endif
612#ifdef HAVE_INTTYPES_H
613# include <inttypes.h>
614#endif
615#ifdef HAVE_STDINT_H
616# include <stdint.h>
617#endif
618#ifdef HAVE_UNISTD_H
619# include <unistd.h>
620#endif"
621
472fa5ee
SM
622gl_func_list=
623gl_header_list=
8690e634 624gl_fnmatch_required=POSIX
c971b7fa
PA
625ac_subst_vars='am__EXEEXT_FALSE
626am__EXEEXT_TRUE
627gltests_LTLIBOBJS
628gltests_LIBOBJS
629gl_LTLIBOBJS
630gl_LIBOBJS
631LTLIBOBJS
632LIBOBJS
633LN_S
39be3c7e
SM
634AM_BACKSLASH
635AM_DEFAULT_VERBOSITY
d0ac1c44
SM
636AM_DEFAULT_V
637AM_V
c971b7fa
PA
638am__fastdepCC_FALSE
639am__fastdepCC_TRUE
640CCDEPMODE
d0ac1c44 641am__nodep
c971b7fa
PA
642AMDEPBACKSLASH
643AMDEP_FALSE
644AMDEP_TRUE
645am__quote
646am__include
647DEPDIR
648am__untar
649am__tar
650AMTAR
651am__leading_dot
652SET_MAKE
653AWK
654mkdir_p
c971b7fa
PA
655INSTALL_STRIP_PROGRAM
656STRIP
657install_sh
658MAKEINFO
659AUTOHEADER
660AUTOMAKE
661AUTOCONF
662ACLOCAL
663VERSION
664PACKAGE
665CYGPATH_W
666am__isrc
667INSTALL_DATA
668INSTALL_SCRIPT
669INSTALL_PROGRAM
670LIBGNU_LTLIBDEPS
671LIBGNU_LIBDEPS
672gltests_WITNESS
8690e634
JK
673REPLACE_TOWLOWER
674REPLACE_ISWCNTRL
675HAVE_WCTYPE_H
676NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
677NEXT_WCTYPE_H
678HAVE_ISWCNTRL
679REPLACE_ISWBLANK
680HAVE_WCTRANS_T
681HAVE_WCTYPE_T
682HAVE_ISWBLANK
683GNULIB_TOWCTRANS
684GNULIB_WCTRANS
685GNULIB_ISWCTYPE
686GNULIB_WCTYPE
687GNULIB_ISWBLANK
7a6dbc2f 688HAVE_CRTDEFS_H
8690e634
JK
689HAVE_WINT_T
690HAVE_FEATURES_H
691NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
692NEXT_WCHAR_H
8839a007
PA
693HAVE_UNISTD_H
694NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
695NEXT_UNISTD_H
4a626d0a 696UNISTD_H_DEFINES_STRUCT_TIMESPEC
09607c9e
TT
697PTHREAD_H_DEFINES_STRUCT_TIMESPEC
698SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
699TIME_H_DEFINES_STRUCT_TIMESPEC
700NEXT_AS_FIRST_DIRECTIVE_TIME_H
701NEXT_TIME_H
7a6dbc2f 702WINDOWS_STAT_INODES
63ce7108
TT
703WINDOWS_64_BIT_OFF_T
704NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
705NEXT_SYS_TYPES_H
09607c9e 706MKDIR_P
2196f55f
YQ
707NEXT_AS_FIRST_DIRECTIVE_STRING_H
708NEXT_STRING_H
98399780
YQ
709NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
710NEXT_STDLIB_H
6a29c58e
YQ
711NEXT_AS_FIRST_DIRECTIVE_STDIO_H
712NEXT_STDIO_H
2196f55f
YQ
713NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
714NEXT_STDDEF_H
715GL_GENERATE_STDDEF_H_FALSE
716GL_GENERATE_STDDEF_H_TRUE
717STDDEF_H
718HAVE_WCHAR_T
4a626d0a 719HAVE_MAX_ALIGN_T
2196f55f
YQ
720REPLACE_NULL
721HAVE__BOOL
722GL_GENERATE_STDBOOL_H_FALSE
723GL_GENERATE_STDBOOL_H_TRUE
724STDBOOL_H
0750520d
PA
725NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
726NEXT_SIGNAL_H
727REPLACE_RAISE
728REPLACE_PTHREAD_SIGMASK
729HAVE_SIGHANDLER_T
730HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
731HAVE_STRUCT_SIGACTION_SA_SIGACTION
732HAVE_SIGACTION
733HAVE_SIGINFO_T
734HAVE_SIGSET_T
735HAVE_RAISE
736HAVE_PTHREAD_SIGMASK
737HAVE_POSIX_SIGNALBLOCKING
738GNULIB_SIGACTION
739GNULIB_SIGPROCMASK
740GNULIB_SIGNAL_H_SIGPIPE
741GNULIB_RAISE
742GNULIB_PTHREAD_SIGMASK
6a29c58e
YQ
743REPLACE_VSPRINTF
744REPLACE_VSNPRINTF
745REPLACE_VPRINTF
746REPLACE_VFPRINTF
747REPLACE_VDPRINTF
748REPLACE_VASPRINTF
749REPLACE_TMPFILE
750REPLACE_STDIO_WRITE_FUNCS
751REPLACE_STDIO_READ_FUNCS
752REPLACE_SPRINTF
753REPLACE_SNPRINTF
754REPLACE_RENAMEAT
755REPLACE_RENAME
756REPLACE_REMOVE
757REPLACE_PRINTF
758REPLACE_POPEN
759REPLACE_PERROR
760REPLACE_OBSTACK_PRINTF
761REPLACE_GETLINE
762REPLACE_GETDELIM
763REPLACE_FTELLO
764REPLACE_FTELL
765REPLACE_FSEEKO
766REPLACE_FSEEK
767REPLACE_FREOPEN
768REPLACE_FPURGE
769REPLACE_FPRINTF
770REPLACE_FOPEN
771REPLACE_FFLUSH
772REPLACE_FDOPEN
773REPLACE_FCLOSE
774REPLACE_DPRINTF
775HAVE_VDPRINTF
776HAVE_VASPRINTF
777HAVE_RENAMEAT
778HAVE_POPEN
779HAVE_PCLOSE
780HAVE_FTELLO
781HAVE_FSEEKO
782HAVE_DPRINTF
783HAVE_DECL_VSNPRINTF
784HAVE_DECL_SNPRINTF
785HAVE_DECL_OBSTACK_PRINTF
786HAVE_DECL_GETLINE
787HAVE_DECL_GETDELIM
788HAVE_DECL_FTELLO
789HAVE_DECL_FSEEKO
790HAVE_DECL_FPURGE
791GNULIB_VSPRINTF_POSIX
792GNULIB_VSNPRINTF
793GNULIB_VPRINTF_POSIX
794GNULIB_VPRINTF
795GNULIB_VFPRINTF_POSIX
796GNULIB_VFPRINTF
797GNULIB_VDPRINTF
798GNULIB_VSCANF
799GNULIB_VFSCANF
800GNULIB_VASPRINTF
801GNULIB_TMPFILE
802GNULIB_STDIO_H_SIGPIPE
803GNULIB_STDIO_H_NONBLOCKING
804GNULIB_SPRINTF_POSIX
805GNULIB_SNPRINTF
806GNULIB_SCANF
807GNULIB_RENAMEAT
808GNULIB_RENAME
809GNULIB_REMOVE
810GNULIB_PUTS
811GNULIB_PUTCHAR
812GNULIB_PUTC
813GNULIB_PRINTF_POSIX
814GNULIB_PRINTF
815GNULIB_POPEN
816GNULIB_PERROR
817GNULIB_PCLOSE
818GNULIB_OBSTACK_PRINTF_POSIX
819GNULIB_OBSTACK_PRINTF
820GNULIB_GETLINE
821GNULIB_GETDELIM
822GNULIB_GETCHAR
823GNULIB_GETC
824GNULIB_FWRITE
825GNULIB_FTELLO
826GNULIB_FTELL
827GNULIB_FSEEKO
828GNULIB_FSEEK
829GNULIB_FSCANF
830GNULIB_FREOPEN
831GNULIB_FREAD
832GNULIB_FPUTS
833GNULIB_FPUTC
834GNULIB_FPURGE
835GNULIB_FPRINTF_POSIX
836GNULIB_FPRINTF
837GNULIB_FOPEN
838GNULIB_FGETS
839GNULIB_FGETC
840GNULIB_FFLUSH
841GNULIB_FDOPEN
842GNULIB_FCLOSE
843GNULIB_DPRINTF
c971b7fa 844UNDEFINE_STRTOK_R
c971b7fa 845REPLACE_STRSIGNAL
c971b7fa
PA
846REPLACE_STRERROR_R
847REPLACE_STRERROR
7a6dbc2f 848REPLACE_STRTOK_R
c971b7fa
PA
849REPLACE_STRCASESTR
850REPLACE_STRSTR
7a6dbc2f
SDJ
851REPLACE_STRNLEN
852REPLACE_STRNDUP
853REPLACE_STRNCAT
c971b7fa 854REPLACE_STRDUP
7a6dbc2f 855REPLACE_STRCHRNUL
c971b7fa
PA
856REPLACE_STPNCPY
857REPLACE_MEMMEM
858REPLACE_MEMCHR
859HAVE_STRVERSCMP
860HAVE_DECL_STRSIGNAL
861HAVE_DECL_STRERROR_R
862HAVE_DECL_STRTOK_R
863HAVE_STRCASESTR
864HAVE_STRSEP
865HAVE_STRPBRK
866HAVE_DECL_STRNLEN
867HAVE_DECL_STRNDUP
868HAVE_DECL_STRDUP
869HAVE_STRCHRNUL
870HAVE_STPNCPY
871HAVE_STPCPY
872HAVE_RAWMEMCHR
873HAVE_DECL_MEMRCHR
874HAVE_MEMPCPY
875HAVE_DECL_MEMMEM
876HAVE_MEMCHR
877HAVE_FFSLL
878HAVE_FFSL
7a6dbc2f 879HAVE_EXPLICIT_BZERO
c971b7fa
PA
880HAVE_MBSLEN
881GNULIB_STRVERSCMP
882GNULIB_STRSIGNAL
883GNULIB_STRERROR_R
884GNULIB_STRERROR
885GNULIB_MBSTOK_R
886GNULIB_MBSSEP
887GNULIB_MBSSPN
888GNULIB_MBSPBRK
889GNULIB_MBSCSPN
890GNULIB_MBSCASESTR
891GNULIB_MBSPCASECMP
892GNULIB_MBSNCASECMP
893GNULIB_MBSCASECMP
894GNULIB_MBSSTR
895GNULIB_MBSRCHR
896GNULIB_MBSCHR
897GNULIB_MBSNLEN
898GNULIB_MBSLEN
899GNULIB_STRTOK_R
900GNULIB_STRCASESTR
901GNULIB_STRSTR
902GNULIB_STRSEP
903GNULIB_STRPBRK
904GNULIB_STRNLEN
905GNULIB_STRNDUP
906GNULIB_STRNCAT
907GNULIB_STRDUP
908GNULIB_STRCHRNUL
909GNULIB_STPNCPY
910GNULIB_STPCPY
911GNULIB_RAWMEMCHR
912GNULIB_MEMRCHR
913GNULIB_MEMPCPY
914GNULIB_MEMMEM
915GNULIB_MEMCHR
916GNULIB_FFSLL
917GNULIB_FFSL
7a6dbc2f 918GNULIB_EXPLICIT_BZERO
8690e634
JK
919LOCALE_FR
920LOCALE_FR_UTF8
921LOCALE_ZH_CN
922LOCALE_JA
7a6dbc2f 923REPLACE_WCSFTIME
8690e634
JK
924REPLACE_WCSWIDTH
925REPLACE_WCWIDTH
926REPLACE_WCSNRTOMBS
927REPLACE_WCSRTOMBS
928REPLACE_WCRTOMB
929REPLACE_MBSNRTOWCS
930REPLACE_MBSRTOWCS
931REPLACE_MBRLEN
932REPLACE_MBRTOWC
933REPLACE_MBSINIT
934REPLACE_WCTOB
935REPLACE_BTOWC
936REPLACE_MBSTATE_T
937HAVE_DECL_WCWIDTH
938HAVE_DECL_WCTOB
7a6dbc2f 939HAVE_WCSFTIME
8690e634
JK
940HAVE_WCSWIDTH
941HAVE_WCSTOK
942HAVE_WCSSTR
943HAVE_WCSPBRK
944HAVE_WCSSPN
945HAVE_WCSCSPN
946HAVE_WCSRCHR
947HAVE_WCSCHR
948HAVE_WCSDUP
949HAVE_WCSXFRM
950HAVE_WCSCOLL
951HAVE_WCSNCASECMP
952HAVE_WCSCASECMP
953HAVE_WCSNCMP
954HAVE_WCSCMP
955HAVE_WCSNCAT
956HAVE_WCSCAT
957HAVE_WCPNCPY
958HAVE_WCSNCPY
959HAVE_WCPCPY
960HAVE_WCSCPY
961HAVE_WCSNLEN
962HAVE_WCSLEN
963HAVE_WMEMSET
964HAVE_WMEMMOVE
965HAVE_WMEMCPY
966HAVE_WMEMCMP
967HAVE_WMEMCHR
968HAVE_WCSNRTOMBS
969HAVE_WCSRTOMBS
970HAVE_WCRTOMB
971HAVE_MBSNRTOWCS
972HAVE_MBSRTOWCS
973HAVE_MBRLEN
974HAVE_MBRTOWC
975HAVE_MBSINIT
976HAVE_BTOWC
7a6dbc2f 977GNULIB_WCSFTIME
8690e634
JK
978GNULIB_WCSWIDTH
979GNULIB_WCSTOK
980GNULIB_WCSSTR
981GNULIB_WCSPBRK
982GNULIB_WCSSPN
983GNULIB_WCSCSPN
984GNULIB_WCSRCHR
985GNULIB_WCSCHR
986GNULIB_WCSDUP
987GNULIB_WCSXFRM
988GNULIB_WCSCOLL
989GNULIB_WCSNCASECMP
990GNULIB_WCSCASECMP
991GNULIB_WCSNCMP
992GNULIB_WCSCMP
993GNULIB_WCSNCAT
994GNULIB_WCSCAT
995GNULIB_WCPNCPY
996GNULIB_WCSNCPY
997GNULIB_WCPCPY
998GNULIB_WCSCPY
999GNULIB_WCSNLEN
1000GNULIB_WCSLEN
1001GNULIB_WMEMSET
1002GNULIB_WMEMMOVE
1003GNULIB_WMEMCPY
1004GNULIB_WMEMCMP
1005GNULIB_WMEMCHR
1006GNULIB_WCWIDTH
1007GNULIB_WCSNRTOMBS
1008GNULIB_WCSRTOMBS
1009GNULIB_WCRTOMB
1010GNULIB_MBSNRTOWCS
1011GNULIB_MBSRTOWCS
1012GNULIB_MBRLEN
1013GNULIB_MBRTOWC
1014GNULIB_MBSINIT
1015GNULIB_WCTOB
1016GNULIB_BTOWC
88b48903
WN
1017NEXT_AS_FIRST_DIRECTIVE_MATH_H
1018NEXT_MATH_H
8690e634 1019LOCALCHARSET_TESTS_ENVIRONMENT
c971b7fa
PA
1020NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
1021NEXT_INTTYPES_H
1022UINT64_MAX_EQ_ULONG_MAX
1023UINT32_MAX_LT_UINTMAX_MAX
1024PRIPTR_PREFIX
1025PRI_MACROS_BROKEN
1026INT64_MAX_EQ_LONG_MAX
1027INT32_MAX_LT_INTMAX_MAX
4a626d0a 1028REPLACE_STRTOUMAX
c971b7fa 1029REPLACE_STRTOIMAX
7a6dbc2f 1030HAVE_IMAXDIV_T
c971b7fa
PA
1031HAVE_DECL_STRTOUMAX
1032HAVE_DECL_STRTOIMAX
1033HAVE_DECL_IMAXDIV
1034HAVE_DECL_IMAXABS
1035GNULIB_STRTOUMAX
1036GNULIB_STRTOIMAX
1037GNULIB_IMAXDIV
1038GNULIB_IMAXABS
1039GL_GENERATE_STDINT_H_FALSE
1040GL_GENERATE_STDINT_H_TRUE
1041STDINT_H
49e4877c
PA
1042HAVE_SYS_INTTYPES_H
1043HAVE_SYS_BITYPES_H
1044HAVE_C99_STDINT_H
c971b7fa
PA
1045WINT_T_SUFFIX
1046WCHAR_T_SUFFIX
1047SIG_ATOMIC_T_SUFFIX
1048SIZE_T_SUFFIX
1049PTRDIFF_T_SUFFIX
1050HAVE_SIGNED_WINT_T
1051HAVE_SIGNED_WCHAR_T
1052HAVE_SIGNED_SIG_ATOMIC_T
1053BITSIZEOF_WINT_T
1054BITSIZEOF_WCHAR_T
1055BITSIZEOF_SIG_ATOMIC_T
1056BITSIZEOF_SIZE_T
1057BITSIZEOF_PTRDIFF_T
1058APPLE_UNIVERSAL_BUILD
c971b7fa
PA
1059HAVE_STDINT_H
1060NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1061NEXT_STDINT_H
c971b7fa
PA
1062HAVE_SYS_TYPES_H
1063HAVE_INTTYPES_H
1064HAVE_WCHAR_H
1065HAVE_UNSIGNED_LONG_LONG_INT
1066HAVE_LONG_LONG_INT
7a6dbc2f 1067GNULIB_OVERRIDES_WINT_T
49e4877c
PA
1068GL_GENERATE_LIMITS_H_FALSE
1069GL_GENERATE_LIMITS_H_TRUE
1070LIMITS_H
1071NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
1072NEXT_LIMITS_H
6ec2e0f5
SDJ
1073GL_GENERATE_GLOB_H_FALSE
1074GL_GENERATE_GLOB_H_TRUE
1075GLOB_H
7a6dbc2f
SDJ
1076HAVE_GLOB_H
1077NEXT_AS_FIRST_DIRECTIVE_GLOB_H
1078NEXT_GLOB_H
1079REPLACE_GLOB_PATTERN_P
1080REPLACE_GLOB
1081HAVE_GLOB_PATTERN_P
1082HAVE_GLOB
1083GNULIB_GLOB
1084REPLACE_LOCALTIME
1085REPLACE_GMTIME
1086REPLACE_TZSET
1087REPLACE_TIMEGM
1088REPLACE_STRFTIME
1089REPLACE_NANOSLEEP
1090REPLACE_MKTIME
1091REPLACE_LOCALTIME_R
1092REPLACE_CTIME
1093HAVE_TIMEZONE_T
1094HAVE_TZSET
1095HAVE_TIMEGM
1096HAVE_STRPTIME
1097HAVE_NANOSLEEP
1098HAVE_DECL_LOCALTIME_R
1099GNULIB_TZSET
1100GNULIB_TIME_RZ
1101GNULIB_TIME_R
1102GNULIB_TIMEGM
1103GNULIB_STRPTIME
1104GNULIB_STRFTIME
1105GNULIB_NANOSLEEP
1106GNULIB_LOCALTIME
1107GNULIB_MKTIME
1108GNULIB_CTIME
4a626d0a
PA
1109NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1110NEXT_SYS_TIME_H
1111REPLACE_STRUCT_TIMEVAL
1112REPLACE_GETTIMEOFDAY
4a626d0a
PA
1113HAVE_SYS_TIME_H
1114HAVE_STRUCT_TIMEVAL
1115HAVE_GETTIMEOFDAY
1116GNULIB_GETTIMEOFDAY
6ec2e0f5
SDJ
1117LTLIBINTL
1118LIBINTL
7a6dbc2f 1119LIB_GETLOGIN
6ec2e0f5 1120WINDOWS_64_BIT_ST_SIZE
7a6dbc2f 1121WINDOWS_STAT_TIMESPEC
6ec2e0f5
SDJ
1122NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1123NEXT_SYS_STAT_H
1124REPLACE_UTIMENSAT
1125REPLACE_STAT
1126REPLACE_MKNOD
1127REPLACE_MKFIFO
1128REPLACE_MKDIR
1129REPLACE_LSTAT
1130REPLACE_FUTIMENS
1131REPLACE_FSTATAT
1132REPLACE_FSTAT
1133HAVE_UTIMENSAT
1134HAVE_MKNODAT
1135HAVE_MKNOD
1136HAVE_MKFIFOAT
1137HAVE_MKFIFO
1138HAVE_MKDIRAT
1139HAVE_LSTAT
1140HAVE_LCHMOD
1141HAVE_FUTIMENS
1142HAVE_FSTATAT
1143HAVE_FCHMODAT
7a6dbc2f 1144GNULIB_OVERRIDES_STRUCT_STAT
6ec2e0f5
SDJ
1145GNULIB_UTIMENSAT
1146GNULIB_STAT
1147GNULIB_MKNODAT
1148GNULIB_MKNOD
1149GNULIB_MKFIFOAT
1150GNULIB_MKFIFO
1151GNULIB_MKDIRAT
1152GNULIB_LSTAT
1153GNULIB_LCHMOD
1154GNULIB_FUTIMENS
1155GNULIB_FSTATAT
1156GNULIB_FSTAT
1157GNULIB_FCHMODAT
88b48903
WN
1158FREXPL_LIBM
1159HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1160FREXP_LIBM
1161REPLACE_TRUNCL
1162REPLACE_TRUNCF
1163REPLACE_TRUNC
7a6dbc2f
SDJ
1164REPLACE_TANHF
1165REPLACE_TANF
88b48903 1166REPLACE_SQRTL
7a6dbc2f
SDJ
1167REPLACE_SQRTF
1168REPLACE_SINHF
1169REPLACE_SINF
88b48903
WN
1170REPLACE_SIGNBIT_USING_GCC
1171REPLACE_SIGNBIT
1172REPLACE_ROUNDL
1173REPLACE_ROUNDF
1174REPLACE_ROUND
1175REPLACE_REMAINDERL
1176REPLACE_REMAINDERF
1177REPLACE_REMAINDER
1178REPLACE_NAN
1179REPLACE_MODFL
1180REPLACE_MODFF
1181REPLACE_MODF
1182REPLACE_LOGBL
1183REPLACE_LOGBF
1184REPLACE_LOGB
1185REPLACE_LOG2L
1186REPLACE_LOG2F
1187REPLACE_LOG2
1188REPLACE_LOG1PL
1189REPLACE_LOG1PF
1190REPLACE_LOG1P
1191REPLACE_LOG10L
1192REPLACE_LOG10F
1193REPLACE_LOG10
1194REPLACE_LOGL
1195REPLACE_LOGF
1196REPLACE_LOG
1197REPLACE_LDEXPL
1198REPLACE_ISNAN
1199REPLACE_ISINF
1200REPLACE_ISFINITE
7a6dbc2f 1201REPLACE_ILOGBL
88b48903
WN
1202REPLACE_ILOGBF
1203REPLACE_ILOGB
1204REPLACE_HYPOTL
1205REPLACE_HYPOTF
1206REPLACE_HYPOT
1207REPLACE_HUGE_VAL
1208REPLACE_FREXPL
1209REPLACE_FREXP
1210REPLACE_FREXPF
1211REPLACE_FMODL
1212REPLACE_FMODF
1213REPLACE_FMOD
1214REPLACE_FMAL
1215REPLACE_FMAF
1216REPLACE_FMA
1217REPLACE_FLOORL
1218REPLACE_FLOORF
1219REPLACE_FLOOR
1220REPLACE_FABSL
1221REPLACE_EXP2L
1222REPLACE_EXP2
1223REPLACE_EXPM1F
1224REPLACE_EXPM1
7a6dbc2f
SDJ
1225REPLACE_EXPF
1226REPLACE_COSHF
1227REPLACE_COSF
88b48903
WN
1228REPLACE_CEILL
1229REPLACE_CEILF
1230REPLACE_CEIL
1231REPLACE_CBRTL
1232REPLACE_CBRTF
7a6dbc2f
SDJ
1233REPLACE_ATAN2F
1234REPLACE_ATANF
1235REPLACE_ASINF
1236REPLACE_ACOSF
88b48903
WN
1237HAVE_DECL_TRUNCL
1238HAVE_DECL_TRUNCF
1239HAVE_DECL_TRUNC
1240HAVE_DECL_TANL
1241HAVE_DECL_SQRTL
1242HAVE_DECL_SINL
1243HAVE_DECL_ROUNDL
1244HAVE_DECL_ROUNDF
1245HAVE_DECL_ROUND
1246HAVE_DECL_RINTF
1247HAVE_DECL_REMAINDERL
1248HAVE_DECL_REMAINDER
1249HAVE_DECL_LOGB
1250HAVE_DECL_LOG2L
1251HAVE_DECL_LOG2F
1252HAVE_DECL_LOG2
1253HAVE_DECL_LOG10L
1254HAVE_DECL_LOGL
1255HAVE_DECL_LDEXPL
1256HAVE_DECL_FREXPL
1257HAVE_DECL_FLOORL
1258HAVE_DECL_FLOORF
1259HAVE_DECL_EXPM1L
1260HAVE_DECL_EXP2L
1261HAVE_DECL_EXP2F
1262HAVE_DECL_EXP2
1263HAVE_DECL_EXPL
1264HAVE_DECL_COSL
1265HAVE_DECL_COPYSIGNF
1266HAVE_DECL_CEILL
1267HAVE_DECL_CEILF
1268HAVE_DECL_CBRTL
1269HAVE_DECL_CBRTF
1270HAVE_DECL_ATANL
1271HAVE_DECL_ASINL
1272HAVE_DECL_ACOSL
1273HAVE_TANHF
1274HAVE_TANL
1275HAVE_TANF
1276HAVE_SQRTL
1277HAVE_SQRTF
1278HAVE_SINHF
1279HAVE_SINL
1280HAVE_SINF
1281HAVE_RINTL
1282HAVE_RINT
1283HAVE_REMAINDERF
1284HAVE_REMAINDER
1285HAVE_POWF
1286HAVE_MODFL
1287HAVE_MODFF
1288HAVE_LOGBL
1289HAVE_LOGBF
1290HAVE_LOG1PL
1291HAVE_LOG1PF
1292HAVE_LOG1P
1293HAVE_LOG10L
1294HAVE_LOG10F
1295HAVE_LOGL
1296HAVE_LOGF
1297HAVE_LDEXPF
1298HAVE_ISNANL
1299HAVE_ISNAND
1300HAVE_ISNANF
1301HAVE_ILOGBL
1302HAVE_ILOGBF
1303HAVE_ILOGB
1304HAVE_HYPOTL
1305HAVE_HYPOTF
1306HAVE_FREXPF
1307HAVE_FMODL
1308HAVE_FMODF
1309HAVE_FMAL
1310HAVE_FMAF
1311HAVE_FMA
1312HAVE_FABSL
1313HAVE_FABSF
1314HAVE_EXPM1F
1315HAVE_EXPM1
1316HAVE_EXPL
1317HAVE_EXPF
1318HAVE_COSHF
1319HAVE_COSL
1320HAVE_COSF
1321HAVE_COPYSIGNL
1322HAVE_COPYSIGN
1323HAVE_CBRTL
1324HAVE_CBRTF
1325HAVE_CBRT
1326HAVE_ATAN2F
1327HAVE_ATANL
1328HAVE_ATANF
1329HAVE_ASINL
1330HAVE_ASINF
1331HAVE_ACOSL
1332HAVE_ACOSF
1333GNULIB_TRUNCL
1334GNULIB_TRUNCF
1335GNULIB_TRUNC
1336GNULIB_TANHF
1337GNULIB_TANL
1338GNULIB_TANF
1339GNULIB_SQRTL
1340GNULIB_SQRTF
1341GNULIB_SINHF
1342GNULIB_SINL
1343GNULIB_SINF
1344GNULIB_SIGNBIT
1345GNULIB_ROUNDL
1346GNULIB_ROUNDF
1347GNULIB_ROUND
1348GNULIB_RINTL
1349GNULIB_RINTF
1350GNULIB_RINT
1351GNULIB_REMAINDERL
1352GNULIB_REMAINDERF
1353GNULIB_REMAINDER
1354GNULIB_POWF
1355GNULIB_MODFL
1356GNULIB_MODFF
1357GNULIB_MODF
1358GNULIB_LOGBL
1359GNULIB_LOGBF
1360GNULIB_LOGB
1361GNULIB_LOG2L
1362GNULIB_LOG2F
1363GNULIB_LOG2
1364GNULIB_LOG1PL
1365GNULIB_LOG1PF
1366GNULIB_LOG1P
1367GNULIB_LOG10L
1368GNULIB_LOG10F
1369GNULIB_LOG10
1370GNULIB_LOGL
1371GNULIB_LOGF
1372GNULIB_LOG
1373GNULIB_LDEXPL
1374GNULIB_LDEXPF
1375GNULIB_ISNANL
1376GNULIB_ISNAND
1377GNULIB_ISNANF
1378GNULIB_ISNAN
1379GNULIB_ISINF
1380GNULIB_ISFINITE
1381GNULIB_ILOGBL
1382GNULIB_ILOGBF
1383GNULIB_ILOGB
1384GNULIB_HYPOTL
1385GNULIB_HYPOTF
1386GNULIB_HYPOT
1387GNULIB_FREXPL
1388GNULIB_FREXP
1389GNULIB_FREXPF
1390GNULIB_FMODL
1391GNULIB_FMODF
1392GNULIB_FMOD
1393GNULIB_FMAL
1394GNULIB_FMAF
1395GNULIB_FMA
1396GNULIB_FLOORL
1397GNULIB_FLOORF
1398GNULIB_FLOOR
1399GNULIB_FABSL
1400GNULIB_FABSF
1401GNULIB_EXPM1L
1402GNULIB_EXPM1F
1403GNULIB_EXPM1
1404GNULIB_EXP2L
1405GNULIB_EXP2F
1406GNULIB_EXP2
1407GNULIB_EXPL
1408GNULIB_EXPF
1409GNULIB_COSHF
1410GNULIB_COSL
1411GNULIB_COSF
1412GNULIB_COPYSIGNL
1413GNULIB_COPYSIGNF
1414GNULIB_COPYSIGN
1415GNULIB_CEILL
1416GNULIB_CEILF
1417GNULIB_CEIL
1418GNULIB_CBRTL
1419GNULIB_CBRTF
1420GNULIB_CBRT
1421GNULIB_ATAN2F
1422GNULIB_ATANL
1423GNULIB_ATANF
1424GNULIB_ASINL
1425GNULIB_ASINF
1426GNULIB_ACOSL
1427GNULIB_ACOSF
8690e634
JK
1428GL_GENERATE_FNMATCH_H_FALSE
1429GL_GENERATE_FNMATCH_H_TRUE
1430FNMATCH_H
7a6dbc2f
SDJ
1431HAVE_FNMATCH_H
1432NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H
1433NEXT_FNMATCH_H
1434REPLACE_FNMATCH
1435HAVE_FNMATCH
1436GNULIB_FNMATCH
88b48903
WN
1437REPLACE_ITOLD
1438GL_GENERATE_FLOAT_H_FALSE
1439GL_GENERATE_FLOAT_H_TRUE
1440FLOAT_H
1441NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1442NEXT_FLOAT_H
6ec2e0f5
SDJ
1443NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1444NEXT_FCNTL_H
1445REPLACE_OPENAT
1446REPLACE_OPEN
1447REPLACE_FCNTL
1448HAVE_OPENAT
1449HAVE_FCNTL
1450GNULIB_OPENAT
1451GNULIB_OPEN
1452GNULIB_NONBLOCKING
1453GNULIB_FCNTL
18848e28
GF
1454EOVERFLOW_VALUE
1455EOVERFLOW_HIDDEN
1456ENOLINK_VALUE
1457ENOLINK_HIDDEN
1458EMULTIHOP_VALUE
1459EMULTIHOP_HIDDEN
1460GL_GENERATE_ERRNO_H_FALSE
1461GL_GENERATE_ERRNO_H_TRUE
1462ERRNO_H
1463NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1464NEXT_ERRNO_H
e26b6bb0
TT
1465HAVE_DIRENT_H
1466NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1467NEXT_DIRENT_H
88b48903
WN
1468PRAGMA_COLUMNS
1469PRAGMA_SYSTEM_HEADER
1470INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1471INCLUDE_NEXT
e26b6bb0
TT
1472REPLACE_FDOPENDIR
1473REPLACE_DIRFD
1474REPLACE_CLOSEDIR
1475REPLACE_OPENDIR
1476HAVE_ALPHASORT
1477HAVE_SCANDIR
1478HAVE_FDOPENDIR
1479HAVE_DECL_FDOPENDIR
1480HAVE_DECL_DIRFD
1481HAVE_CLOSEDIR
1482HAVE_REWINDDIR
1483HAVE_READDIR
1484HAVE_OPENDIR
1485GNULIB_ALPHASORT
1486GNULIB_SCANDIR
1487GNULIB_FDOPENDIR
1488GNULIB_DIRFD
1489GNULIB_CLOSEDIR
1490GNULIB_REWINDDIR
1491GNULIB_READDIR
1492GNULIB_OPENDIR
6ec2e0f5
SDJ
1493HAVE_WINSOCK2_H
1494HAVE_MSVC_INVALID_PARAMETER_HANDLER
e26b6bb0
TT
1495UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1496UNISTD_H_HAVE_WINSOCK2_H
1497REPLACE_WRITE
1498REPLACE_USLEEP
1499REPLACE_UNLINKAT
1500REPLACE_UNLINK
1501REPLACE_TTYNAME_R
7a6dbc2f 1502REPLACE_TRUNCATE
4a626d0a 1503REPLACE_SYMLINKAT
e26b6bb0
TT
1504REPLACE_SYMLINK
1505REPLACE_SLEEP
1506REPLACE_RMDIR
4a626d0a 1507REPLACE_READLINKAT
e26b6bb0
TT
1508REPLACE_READLINK
1509REPLACE_READ
1510REPLACE_PWRITE
1511REPLACE_PREAD
1512REPLACE_LSEEK
1513REPLACE_LINKAT
1514REPLACE_LINK
1515REPLACE_LCHOWN
1516REPLACE_ISATTY
7a6dbc2f 1517REPLACE_GETPASS
e26b6bb0
TT
1518REPLACE_GETPAGESIZE
1519REPLACE_GETGROUPS
1520REPLACE_GETLOGIN_R
4a626d0a 1521REPLACE_GETDTABLESIZE
e26b6bb0
TT
1522REPLACE_GETDOMAINNAME
1523REPLACE_GETCWD
1524REPLACE_FTRUNCATE
1525REPLACE_FCHOWNAT
7a6dbc2f 1526REPLACE_FACCESSAT
e26b6bb0
TT
1527REPLACE_DUP2
1528REPLACE_DUP
1529REPLACE_CLOSE
1530REPLACE_CHOWN
1531HAVE_SYS_PARAM_H
1532HAVE_OS_H
1533HAVE_DECL_TTYNAME_R
7a6dbc2f 1534HAVE_DECL_TRUNCATE
e26b6bb0
TT
1535HAVE_DECL_SETHOSTNAME
1536HAVE_DECL_GETUSERSHELL
1537HAVE_DECL_GETPAGESIZE
1538HAVE_DECL_GETLOGIN_R
7a6dbc2f 1539HAVE_DECL_GETLOGIN
e26b6bb0
TT
1540HAVE_DECL_GETDOMAINNAME
1541HAVE_DECL_FDATASYNC
1542HAVE_DECL_FCHDIR
1543HAVE_DECL_ENVIRON
1544HAVE_USLEEP
1545HAVE_UNLINKAT
1546HAVE_SYMLINKAT
1547HAVE_SYMLINK
1548HAVE_SLEEP
1549HAVE_SETHOSTNAME
1550HAVE_READLINKAT
1551HAVE_READLINK
1552HAVE_PWRITE
1553HAVE_PREAD
1554HAVE_PIPE2
1555HAVE_PIPE
1556HAVE_LINKAT
1557HAVE_LINK
1558HAVE_LCHOWN
1559HAVE_GROUP_MEMBER
7a6dbc2f 1560HAVE_GETPASS
e26b6bb0
TT
1561HAVE_GETPAGESIZE
1562HAVE_GETLOGIN
1563HAVE_GETHOSTNAME
1564HAVE_GETGROUPS
1565HAVE_GETDTABLESIZE
1566HAVE_FTRUNCATE
1567HAVE_FSYNC
1568HAVE_FDATASYNC
1569HAVE_FCHOWNAT
1570HAVE_FCHDIR
1571HAVE_FACCESSAT
1572HAVE_EUIDACCESS
1573HAVE_DUP3
1574HAVE_DUP2
1575HAVE_CHOWN
1576GNULIB_WRITE
1577GNULIB_USLEEP
1578GNULIB_UNLINKAT
1579GNULIB_UNLINK
1580GNULIB_UNISTD_H_SIGPIPE
1581GNULIB_UNISTD_H_NONBLOCKING
1582GNULIB_TTYNAME_R
7a6dbc2f 1583GNULIB_TRUNCATE
e26b6bb0
TT
1584GNULIB_SYMLINKAT
1585GNULIB_SYMLINK
1586GNULIB_SLEEP
1587GNULIB_SETHOSTNAME
1588GNULIB_RMDIR
1589GNULIB_READLINKAT
1590GNULIB_READLINK
1591GNULIB_READ
1592GNULIB_PWRITE
1593GNULIB_PREAD
1594GNULIB_PIPE2
1595GNULIB_PIPE
1596GNULIB_LSEEK
1597GNULIB_LINKAT
1598GNULIB_LINK
1599GNULIB_LCHOWN
1600GNULIB_ISATTY
1601GNULIB_GROUP_MEMBER
1602GNULIB_GETUSERSHELL
7a6dbc2f 1603GNULIB_GETPASS
e26b6bb0
TT
1604GNULIB_GETPAGESIZE
1605GNULIB_GETLOGIN_R
1606GNULIB_GETLOGIN
1607GNULIB_GETHOSTNAME
1608GNULIB_GETGROUPS
1609GNULIB_GETDTABLESIZE
1610GNULIB_GETDOMAINNAME
1611GNULIB_GETCWD
1612GNULIB_FTRUNCATE
1613GNULIB_FSYNC
1614GNULIB_FDATASYNC
1615GNULIB_FCHOWNAT
1616GNULIB_FCHDIR
1617GNULIB_FACCESSAT
1618GNULIB_EUIDACCESS
1619GNULIB_ENVIRON
1620GNULIB_DUP3
1621GNULIB_DUP2
1622GNULIB_DUP
1623GNULIB_CLOSE
1624GNULIB_CHOWN
1625GNULIB_CHDIR
98399780
YQ
1626REPLACE_WCTOMB
1627REPLACE_UNSETENV
1628REPLACE_STRTOD
1629REPLACE_SETENV
1630REPLACE_REALPATH
1631REPLACE_REALLOC
1632REPLACE_RANDOM_R
4a626d0a 1633REPLACE_QSORT_R
98399780
YQ
1634REPLACE_PUTENV
1635REPLACE_PTSNAME_R
1636REPLACE_PTSNAME
1637REPLACE_MKSTEMP
1638REPLACE_MBTOWC
1639REPLACE_MALLOC
1640REPLACE_CANONICALIZE_FILE_NAME
1641REPLACE_CALLOC
1642HAVE_DECL_UNSETENV
1643HAVE_UNLOCKPT
1644HAVE_SYS_LOADAVG_H
1645HAVE_STRUCT_RANDOM_DATA
1646HAVE_STRTOULL
1647HAVE_STRTOLL
1648HAVE_STRTOD
7a6dbc2f 1649HAVE_DECL_SETSTATE
98399780
YQ
1650HAVE_DECL_SETENV
1651HAVE_SETENV
4a626d0a 1652HAVE_SECURE_GETENV
98399780
YQ
1653HAVE_RPMATCH
1654HAVE_REALPATH
7a6dbc2f 1655HAVE_REALLOCARRAY
98399780
YQ
1656HAVE_RANDOM_R
1657HAVE_RANDOM_H
1658HAVE_RANDOM
4c62b19f 1659HAVE_QSORT_R
98399780
YQ
1660HAVE_PTSNAME_R
1661HAVE_PTSNAME
1662HAVE_POSIX_OPENPT
1663HAVE_MKSTEMPS
1664HAVE_MKSTEMP
1665HAVE_MKOSTEMPS
1666HAVE_MKOSTEMP
1667HAVE_MKDTEMP
7a6dbc2f 1668HAVE_DECL_INITSTATE
98399780
YQ
1669HAVE_GRANTPT
1670HAVE_GETSUBOPT
1671HAVE_DECL_GETLOADAVG
1672HAVE_CANONICALIZE_FILE_NAME
1673HAVE_ATOLL
1674HAVE__EXIT
1675GNULIB_WCTOMB
1676GNULIB_UNSETENV
1677GNULIB_UNLOCKPT
1678GNULIB_SYSTEM_POSIX
1679GNULIB_STRTOULL
1680GNULIB_STRTOLL
1681GNULIB_STRTOD
1682GNULIB_SETENV
4a626d0a 1683GNULIB_SECURE_GETENV
98399780
YQ
1684GNULIB_RPMATCH
1685GNULIB_REALPATH
1686GNULIB_REALLOC_POSIX
7a6dbc2f 1687GNULIB_REALLOCARRAY
98399780
YQ
1688GNULIB_RANDOM_R
1689GNULIB_RANDOM
4a626d0a 1690GNULIB_QSORT_R
98399780
YQ
1691GNULIB_PUTENV
1692GNULIB_PTSNAME_R
1693GNULIB_PTSNAME
1694GNULIB_POSIX_OPENPT
1695GNULIB_MKSTEMPS
1696GNULIB_MKSTEMP
1697GNULIB_MKOSTEMPS
1698GNULIB_MKOSTEMP
1699GNULIB_MKDTEMP
1700GNULIB_MBTOWC
1701GNULIB_MALLOC_POSIX
1702GNULIB_GRANTPT
1703GNULIB_GETSUBOPT
1704GNULIB_GETLOADAVG
1705GNULIB_CANONICALIZE_FILE_NAME
1706GNULIB_CALLOC_POSIX
1707GNULIB_ATOLL
1708GNULIB__EXIT
8690e634
JK
1709GL_GENERATE_ALLOCA_H_FALSE
1710GL_GENERATE_ALLOCA_H_TRUE
1711ALLOCA_H
1712ALLOCA
c971b7fa
PA
1713GL_COND_LIBTOOL_FALSE
1714GL_COND_LIBTOOL_TRUE
1715target_os
1716target_vendor
1717target_cpu
1718target
c971b7fa
PA
1719host_os
1720host_vendor
1721host_cpu
1722host
1723build_os
1724build_vendor
1725build_cpu
1726build
4a626d0a
PA
1727RANLIB
1728ARFLAGS
1729AR
1730EGREP
1731GREP
1732CPP
c971b7fa
PA
1733OBJEXT
1734EXEEXT
1735ac_ct_CC
1736CPPFLAGS
1737LDFLAGS
1738CFLAGS
1739CC
1740MAINT
1741MAINTAINER_MODE_FALSE
1742MAINTAINER_MODE_TRUE
1743target_alias
1744host_alias
1745build_alias
1746LIBS
1747ECHO_T
1748ECHO_N
1749ECHO_C
1750DEFS
1751mandir
1752localedir
1753libdir
1754psdir
1755pdfdir
1756dvidir
1757htmldir
1758infodir
1759docdir
1760oldincludedir
1761includedir
1762localstatedir
1763sharedstatedir
1764sysconfdir
1765datadir
1766datarootdir
1767libexecdir
1768sbindir
1769bindir
1770program_transform_name
1771prefix
1772exec_prefix
1773PACKAGE_URL
1774PACKAGE_BUGREPORT
1775PACKAGE_STRING
1776PACKAGE_VERSION
1777PACKAGE_TARNAME
1778PACKAGE_NAME
1779PATH_SEPARATOR
1780SHELL'
1781ac_subst_files=''
1782ac_user_opts='
1783enable_option_checking
1784enable_maintainer_mode
2196f55f 1785enable_largefile
c971b7fa 1786enable_dependency_tracking
39be3c7e 1787enable_silent_rules
c971b7fa
PA
1788'
1789 ac_precious_vars='build_alias
1790host_alias
1791target_alias
1792CC
1793CFLAGS
1794LDFLAGS
1795LIBS
1796CPPFLAGS
1797CPP'
1798
1799
1800# Initialize some variables set by options.
1801ac_init_help=
1802ac_init_version=false
1803ac_unrecognized_opts=
1804ac_unrecognized_sep=
1805# The variables have the same names as the options, with
1806# dashes changed to underlines.
1807cache_file=/dev/null
1808exec_prefix=NONE
1809no_create=
1810no_recursion=
1811prefix=NONE
1812program_prefix=NONE
1813program_suffix=NONE
1814program_transform_name=s,x,x,
1815silent=
1816site=
1817srcdir=
1818verbose=
1819x_includes=NONE
1820x_libraries=NONE
1821
1822# Installation directory options.
1823# These are left unexpanded so users can "make install exec_prefix=/foo"
1824# and all the variables that are supposed to be based on exec_prefix
1825# by default will actually change.
1826# Use braces instead of parens because sh, perl, etc. also accept them.
1827# (The list follows the same order as the GNU Coding Standards.)
1828bindir='${exec_prefix}/bin'
1829sbindir='${exec_prefix}/sbin'
1830libexecdir='${exec_prefix}/libexec'
1831datarootdir='${prefix}/share'
1832datadir='${datarootdir}'
1833sysconfdir='${prefix}/etc'
1834sharedstatedir='${prefix}/com'
1835localstatedir='${prefix}/var'
1836includedir='${prefix}/include'
1837oldincludedir='/usr/include'
d0ac1c44 1838docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
c971b7fa
PA
1839infodir='${datarootdir}/info'
1840htmldir='${docdir}'
1841dvidir='${docdir}'
1842pdfdir='${docdir}'
1843psdir='${docdir}'
1844libdir='${exec_prefix}/lib'
1845localedir='${datarootdir}/locale'
1846mandir='${datarootdir}/man'
1847
1848ac_prev=
1849ac_dashdash=
1850for ac_option
1851do
1852 # If the previous option needs an argument, assign it.
1853 if test -n "$ac_prev"; then
1854 eval $ac_prev=\$ac_option
1855 ac_prev=
1856 continue
1857 fi
1858
1859 case $ac_option in
d0ac1c44
SM
1860 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1861 *=) ac_optarg= ;;
1862 *) ac_optarg=yes ;;
c971b7fa
PA
1863 esac
1864
1865 # Accept the important Cygnus configure options, so we can diagnose typos.
1866
1867 case $ac_dashdash$ac_option in
1868 --)
1869 ac_dashdash=yes ;;
1870
1871 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1872 ac_prev=bindir ;;
1873 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1874 bindir=$ac_optarg ;;
1875
1876 -build | --build | --buil | --bui | --bu)
1877 ac_prev=build_alias ;;
1878 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1879 build_alias=$ac_optarg ;;
1880
1881 -cache-file | --cache-file | --cache-fil | --cache-fi \
1882 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1883 ac_prev=cache_file ;;
1884 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1885 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1886 cache_file=$ac_optarg ;;
1887
1888 --config-cache | -C)
1889 cache_file=config.cache ;;
1890
1891 -datadir | --datadir | --datadi | --datad)
1892 ac_prev=datadir ;;
1893 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1894 datadir=$ac_optarg ;;
1895
1896 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1897 | --dataroo | --dataro | --datar)
1898 ac_prev=datarootdir ;;
1899 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1900 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1901 datarootdir=$ac_optarg ;;
1902
1903 -disable-* | --disable-*)
1904 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1905 # Reject names that are not valid shell variable names.
1906 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1907 as_fn_error $? "invalid feature name: $ac_useropt"
c971b7fa
PA
1908 ac_useropt_orig=$ac_useropt
1909 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1910 case $ac_user_opts in
1911 *"
1912"enable_$ac_useropt"
1913"*) ;;
1914 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1915 ac_unrecognized_sep=', ';;
1916 esac
1917 eval enable_$ac_useropt=no ;;
1918
1919 -docdir | --docdir | --docdi | --doc | --do)
1920 ac_prev=docdir ;;
1921 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1922 docdir=$ac_optarg ;;
1923
1924 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1925 ac_prev=dvidir ;;
1926 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1927 dvidir=$ac_optarg ;;
1928
1929 -enable-* | --enable-*)
1930 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1931 # Reject names that are not valid shell variable names.
1932 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1933 as_fn_error $? "invalid feature name: $ac_useropt"
c971b7fa
PA
1934 ac_useropt_orig=$ac_useropt
1935 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1936 case $ac_user_opts in
1937 *"
1938"enable_$ac_useropt"
1939"*) ;;
1940 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1941 ac_unrecognized_sep=', ';;
1942 esac
1943 eval enable_$ac_useropt=\$ac_optarg ;;
1944
1945 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1946 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1947 | --exec | --exe | --ex)
1948 ac_prev=exec_prefix ;;
1949 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1950 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1951 | --exec=* | --exe=* | --ex=*)
1952 exec_prefix=$ac_optarg ;;
1953
1954 -gas | --gas | --ga | --g)
1955 # Obsolete; use --with-gas.
1956 with_gas=yes ;;
1957
1958 -help | --help | --hel | --he | -h)
1959 ac_init_help=long ;;
1960 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1961 ac_init_help=recursive ;;
1962 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1963 ac_init_help=short ;;
1964
1965 -host | --host | --hos | --ho)
1966 ac_prev=host_alias ;;
1967 -host=* | --host=* | --hos=* | --ho=*)
1968 host_alias=$ac_optarg ;;
1969
1970 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1971 ac_prev=htmldir ;;
1972 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1973 | --ht=*)
1974 htmldir=$ac_optarg ;;
1975
1976 -includedir | --includedir | --includedi | --included | --include \
1977 | --includ | --inclu | --incl | --inc)
1978 ac_prev=includedir ;;
1979 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1980 | --includ=* | --inclu=* | --incl=* | --inc=*)
1981 includedir=$ac_optarg ;;
1982
1983 -infodir | --infodir | --infodi | --infod | --info | --inf)
1984 ac_prev=infodir ;;
1985 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1986 infodir=$ac_optarg ;;
1987
1988 -libdir | --libdir | --libdi | --libd)
1989 ac_prev=libdir ;;
1990 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1991 libdir=$ac_optarg ;;
1992
1993 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1994 | --libexe | --libex | --libe)
1995 ac_prev=libexecdir ;;
1996 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1997 | --libexe=* | --libex=* | --libe=*)
1998 libexecdir=$ac_optarg ;;
1999
2000 -localedir | --localedir | --localedi | --localed | --locale)
2001 ac_prev=localedir ;;
2002 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
2003 localedir=$ac_optarg ;;
2004
2005 -localstatedir | --localstatedir | --localstatedi | --localstated \
2006 | --localstate | --localstat | --localsta | --localst | --locals)
2007 ac_prev=localstatedir ;;
2008 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2009 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
2010 localstatedir=$ac_optarg ;;
2011
2012 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2013 ac_prev=mandir ;;
2014 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2015 mandir=$ac_optarg ;;
2016
2017 -nfp | --nfp | --nf)
2018 # Obsolete; use --without-fp.
2019 with_fp=no ;;
2020
2021 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2022 | --no-cr | --no-c | -n)
2023 no_create=yes ;;
2024
2025 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
2026 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
2027 no_recursion=yes ;;
2028
2029 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
2030 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
2031 | --oldin | --oldi | --old | --ol | --o)
2032 ac_prev=oldincludedir ;;
2033 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
2034 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
2035 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2036 oldincludedir=$ac_optarg ;;
2037
2038 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2039 ac_prev=prefix ;;
2040 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2041 prefix=$ac_optarg ;;
2042
2043 -program-prefix | --program-prefix | --program-prefi | --program-pref \
2044 | --program-pre | --program-pr | --program-p)
2045 ac_prev=program_prefix ;;
2046 -program-prefix=* | --program-prefix=* | --program-prefi=* \
2047 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2048 program_prefix=$ac_optarg ;;
2049
2050 -program-suffix | --program-suffix | --program-suffi | --program-suff \
2051 | --program-suf | --program-su | --program-s)
2052 ac_prev=program_suffix ;;
2053 -program-suffix=* | --program-suffix=* | --program-suffi=* \
2054 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2055 program_suffix=$ac_optarg ;;
2056
2057 -program-transform-name | --program-transform-name \
2058 | --program-transform-nam | --program-transform-na \
2059 | --program-transform-n | --program-transform- \
2060 | --program-transform | --program-transfor \
2061 | --program-transfo | --program-transf \
2062 | --program-trans | --program-tran \
2063 | --progr-tra | --program-tr | --program-t)
2064 ac_prev=program_transform_name ;;
2065 -program-transform-name=* | --program-transform-name=* \
2066 | --program-transform-nam=* | --program-transform-na=* \
2067 | --program-transform-n=* | --program-transform-=* \
2068 | --program-transform=* | --program-transfor=* \
2069 | --program-transfo=* | --program-transf=* \
2070 | --program-trans=* | --program-tran=* \
2071 | --progr-tra=* | --program-tr=* | --program-t=*)
2072 program_transform_name=$ac_optarg ;;
2073
2074 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2075 ac_prev=pdfdir ;;
2076 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2077 pdfdir=$ac_optarg ;;
2078
2079 -psdir | --psdir | --psdi | --psd | --ps)
2080 ac_prev=psdir ;;
2081 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2082 psdir=$ac_optarg ;;
2083
2084 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2085 | -silent | --silent | --silen | --sile | --sil)
2086 silent=yes ;;
2087
2088 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2089 ac_prev=sbindir ;;
2090 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2091 | --sbi=* | --sb=*)
2092 sbindir=$ac_optarg ;;
2093
2094 -sharedstatedir | --sharedstatedir | --sharedstatedi \
2095 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2096 | --sharedst | --shareds | --shared | --share | --shar \
2097 | --sha | --sh)
2098 ac_prev=sharedstatedir ;;
2099 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2100 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2101 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2102 | --sha=* | --sh=*)
2103 sharedstatedir=$ac_optarg ;;
2104
2105 -site | --site | --sit)
2106 ac_prev=site ;;
2107 -site=* | --site=* | --sit=*)
2108 site=$ac_optarg ;;
2109
2110 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2111 ac_prev=srcdir ;;
2112 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2113 srcdir=$ac_optarg ;;
2114
2115 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2116 | --syscon | --sysco | --sysc | --sys | --sy)
2117 ac_prev=sysconfdir ;;
2118 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2119 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2120 sysconfdir=$ac_optarg ;;
2121
2122 -target | --target | --targe | --targ | --tar | --ta | --t)
2123 ac_prev=target_alias ;;
2124 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2125 target_alias=$ac_optarg ;;
2126
2127 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2128 verbose=yes ;;
2129
2130 -version | --version | --versio | --versi | --vers | -V)
2131 ac_init_version=: ;;
2132
2133 -with-* | --with-*)
2134 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2135 # Reject names that are not valid shell variable names.
2136 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 2137 as_fn_error $? "invalid package name: $ac_useropt"
c971b7fa
PA
2138 ac_useropt_orig=$ac_useropt
2139 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2140 case $ac_user_opts in
2141 *"
2142"with_$ac_useropt"
2143"*) ;;
2144 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2145 ac_unrecognized_sep=', ';;
2146 esac
2147 eval with_$ac_useropt=\$ac_optarg ;;
2148
2149 -without-* | --without-*)
2150 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2151 # Reject names that are not valid shell variable names.
2152 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 2153 as_fn_error $? "invalid package name: $ac_useropt"
c971b7fa
PA
2154 ac_useropt_orig=$ac_useropt
2155 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2156 case $ac_user_opts in
2157 *"
2158"with_$ac_useropt"
2159"*) ;;
2160 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2161 ac_unrecognized_sep=', ';;
2162 esac
2163 eval with_$ac_useropt=no ;;
2164
2165 --x)
2166 # Obsolete; use --with-x.
2167 with_x=yes ;;
2168
2169 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2170 | --x-incl | --x-inc | --x-in | --x-i)
2171 ac_prev=x_includes ;;
2172 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2173 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2174 x_includes=$ac_optarg ;;
2175
2176 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2177 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2178 ac_prev=x_libraries ;;
2179 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2180 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2181 x_libraries=$ac_optarg ;;
2182
d0ac1c44
SM
2183 -*) as_fn_error $? "unrecognized option: \`$ac_option'
2184Try \`$0 --help' for more information"
c971b7fa
PA
2185 ;;
2186
2187 *=*)
2188 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2189 # Reject names that are not valid shell variable names.
2190 case $ac_envvar in #(
2191 '' | [0-9]* | *[!_$as_cr_alnum]* )
d0ac1c44 2192 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
c971b7fa
PA
2193 esac
2194 eval $ac_envvar=\$ac_optarg
2195 export $ac_envvar ;;
2196
2197 *)
2198 # FIXME: should be removed in autoconf 3.0.
2199 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2200 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2201 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
d0ac1c44 2202 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
c971b7fa
PA
2203 ;;
2204
2205 esac
2206done
2207
2208if test -n "$ac_prev"; then
2209 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
d0ac1c44 2210 as_fn_error $? "missing argument to $ac_option"
c971b7fa
PA
2211fi
2212
2213if test -n "$ac_unrecognized_opts"; then
2214 case $enable_option_checking in
2215 no) ;;
d0ac1c44 2216 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
c971b7fa
PA
2217 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2218 esac
2219fi
2220
2221# Check all directory arguments for consistency.
2222for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2223 datadir sysconfdir sharedstatedir localstatedir includedir \
2224 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2225 libdir localedir mandir
2226do
2227 eval ac_val=\$$ac_var
2228 # Remove trailing slashes.
2229 case $ac_val in
2230 */ )
2231 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2232 eval $ac_var=\$ac_val;;
2233 esac
2234 # Be sure to have absolute directory names.
2235 case $ac_val in
2236 [\\/$]* | ?:[\\/]* ) continue;;
2237 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2238 esac
d0ac1c44 2239 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
c971b7fa
PA
2240done
2241
2242# There might be people who depend on the old broken behavior: `$host'
2243# used to hold the argument of --host etc.
2244# FIXME: To remove some day.
2245build=$build_alias
2246host=$host_alias
2247target=$target_alias
2248
2249# FIXME: To remove some day.
2250if test "x$host_alias" != x; then
2251 if test "x$build_alias" = x; then
2252 cross_compiling=maybe
c971b7fa
PA
2253 elif test "x$build_alias" != "x$host_alias"; then
2254 cross_compiling=yes
2255 fi
2256fi
2257
2258ac_tool_prefix=
2259test -n "$host_alias" && ac_tool_prefix=$host_alias-
2260
2261test "$silent" = yes && exec 6>/dev/null
2262
2263
2264ac_pwd=`pwd` && test -n "$ac_pwd" &&
2265ac_ls_di=`ls -di .` &&
2266ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
d0ac1c44 2267 as_fn_error $? "working directory cannot be determined"
c971b7fa 2268test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
d0ac1c44 2269 as_fn_error $? "pwd does not report name of working directory"
c971b7fa
PA
2270
2271
2272# Find the source files, if location was not specified.
2273if test -z "$srcdir"; then
2274 ac_srcdir_defaulted=yes
2275 # Try the directory containing this script, then the parent directory.
2276 ac_confdir=`$as_dirname -- "$as_myself" ||
2277$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2278 X"$as_myself" : 'X\(//\)[^/]' \| \
2279 X"$as_myself" : 'X\(//\)$' \| \
2280 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2281$as_echo X"$as_myself" |
2282 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2283 s//\1/
2284 q
2285 }
2286 /^X\(\/\/\)[^/].*/{
2287 s//\1/
2288 q
2289 }
2290 /^X\(\/\/\)$/{
2291 s//\1/
2292 q
2293 }
2294 /^X\(\/\).*/{
2295 s//\1/
2296 q
2297 }
2298 s/.*/./; q'`
2299 srcdir=$ac_confdir
2300 if test ! -r "$srcdir/$ac_unique_file"; then
2301 srcdir=..
2302 fi
2303else
2304 ac_srcdir_defaulted=no
2305fi
2306if test ! -r "$srcdir/$ac_unique_file"; then
2307 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
d0ac1c44 2308 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
c971b7fa
PA
2309fi
2310ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2311ac_abs_confdir=`(
d0ac1c44 2312 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
c971b7fa
PA
2313 pwd)`
2314# When building in place, set srcdir=.
2315if test "$ac_abs_confdir" = "$ac_pwd"; then
2316 srcdir=.
2317fi
2318# Remove unnecessary trailing slashes from srcdir.
2319# Double slashes in file names in object file debugging info
2320# mess up M-x gdb in Emacs.
2321case $srcdir in
2322*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2323esac
2324for ac_var in $ac_precious_vars; do
2325 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2326 eval ac_env_${ac_var}_value=\$${ac_var}
2327 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2328 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2329done
2330
2331#
2332# Report the --help message.
2333#
2334if test "$ac_init_help" = "long"; then
2335 # Omit some internal or obsolete options to make the list less imposing.
2336 # This message is too long to be a string in the A/UX 3.1 sh.
2337 cat <<_ACEOF
d0ac1c44 2338\`configure' configures libgnu UNUSED-VERSION to adapt to many kinds of systems.
c971b7fa
PA
2339
2340Usage: $0 [OPTION]... [VAR=VALUE]...
2341
2342To assign environment variables (e.g., CC, CFLAGS...), specify them as
2343VAR=VALUE. See below for descriptions of some of the useful variables.
2344
2345Defaults for the options are specified in brackets.
2346
2347Configuration:
2348 -h, --help display this help and exit
2349 --help=short display options specific to this package
2350 --help=recursive display the short help of all the included packages
2351 -V, --version display version information and exit
d0ac1c44 2352 -q, --quiet, --silent do not print \`checking ...' messages
c971b7fa
PA
2353 --cache-file=FILE cache test results in FILE [disabled]
2354 -C, --config-cache alias for \`--cache-file=config.cache'
2355 -n, --no-create do not create output files
2356 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2357
2358Installation directories:
2359 --prefix=PREFIX install architecture-independent files in PREFIX
2360 [$ac_default_prefix]
2361 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2362 [PREFIX]
2363
2364By default, \`make install' will install all the files in
2365\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2366an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2367for instance \`--prefix=\$HOME'.
2368
2369For better control, use the options below.
2370
2371Fine tuning of the installation directories:
2372 --bindir=DIR user executables [EPREFIX/bin]
2373 --sbindir=DIR system admin executables [EPREFIX/sbin]
2374 --libexecdir=DIR program executables [EPREFIX/libexec]
2375 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2376 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2377 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2378 --libdir=DIR object code libraries [EPREFIX/lib]
2379 --includedir=DIR C header files [PREFIX/include]
2380 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2381 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2382 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2383 --infodir=DIR info documentation [DATAROOTDIR/info]
2384 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2385 --mandir=DIR man documentation [DATAROOTDIR/man]
d0ac1c44 2386 --docdir=DIR documentation root [DATAROOTDIR/doc/libgnu]
c971b7fa
PA
2387 --htmldir=DIR html documentation [DOCDIR]
2388 --dvidir=DIR dvi documentation [DOCDIR]
2389 --pdfdir=DIR pdf documentation [DOCDIR]
2390 --psdir=DIR ps documentation [DOCDIR]
2391_ACEOF
2392
2393 cat <<\_ACEOF
2394
2395Program names:
2396 --program-prefix=PREFIX prepend PREFIX to installed program names
2397 --program-suffix=SUFFIX append SUFFIX to installed program names
2398 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2399
2400System types:
2401 --build=BUILD configure for building on BUILD [guessed]
2402 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2403 --target=TARGET configure for building compilers for TARGET [HOST]
2404_ACEOF
2405fi
2406
2407if test -n "$ac_init_help"; then
d0ac1c44
SM
2408 case $ac_init_help in
2409 short | recursive ) echo "Configuration of libgnu UNUSED-VERSION:";;
2410 esac
c971b7fa
PA
2411 cat <<\_ACEOF
2412
2413Optional Features:
2414 --disable-option-checking ignore unrecognized --enable/--with options
2415 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2416 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
d0ac1c44
SM
2417 --enable-maintainer-mode
2418 enable make rules and dependencies not useful (and
2419 sometimes confusing) to the casual installer
2196f55f 2420 --disable-largefile omit support for large files
d0ac1c44
SM
2421 --enable-dependency-tracking
2422 do not reject slow dependency extractors
2423 --disable-dependency-tracking
2424 speeds up one-time build
2425 --enable-silent-rules less verbose build output (undo: "make V=1")
2426 --disable-silent-rules verbose build output (undo: "make V=0")
c971b7fa
PA
2427
2428Some influential environment variables:
2429 CC C compiler command
2430 CFLAGS C compiler flags
2431 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2432 nonstandard directory <lib dir>
2433 LIBS libraries to pass to the linker, e.g. -l<library>
d0ac1c44 2434 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
c971b7fa
PA
2435 you have headers in a nonstandard directory <include dir>
2436 CPP C preprocessor
2437
2438Use these variables to override the choices made by `configure' or to help
2439it to find libraries and programs with nonstandard names/locations.
2440
2441Report bugs to the package provider.
2442_ACEOF
2443ac_status=$?
2444fi
2445
2446if test "$ac_init_help" = "recursive"; then
2447 # If there are subdirs, report their specific --help.
2448 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2449 test -d "$ac_dir" ||
2450 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2451 continue
2452 ac_builddir=.
2453
2454case "$ac_dir" in
2455.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2456*)
2457 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2458 # A ".." for each directory in $ac_dir_suffix.
2459 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2460 case $ac_top_builddir_sub in
2461 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2462 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2463 esac ;;
2464esac
2465ac_abs_top_builddir=$ac_pwd
2466ac_abs_builddir=$ac_pwd$ac_dir_suffix
2467# for backward compatibility:
2468ac_top_builddir=$ac_top_build_prefix
2469
2470case $srcdir in
2471 .) # We are building in place.
2472 ac_srcdir=.
2473 ac_top_srcdir=$ac_top_builddir_sub
2474 ac_abs_top_srcdir=$ac_pwd ;;
2475 [\\/]* | ?:[\\/]* ) # Absolute name.
2476 ac_srcdir=$srcdir$ac_dir_suffix;
2477 ac_top_srcdir=$srcdir
2478 ac_abs_top_srcdir=$srcdir ;;
2479 *) # Relative name.
2480 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2481 ac_top_srcdir=$ac_top_build_prefix$srcdir
2482 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2483esac
2484ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2485
2486 cd "$ac_dir" || { ac_status=$?; continue; }
2487 # Check for guested configure.
2488 if test -f "$ac_srcdir/configure.gnu"; then
2489 echo &&
2490 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2491 elif test -f "$ac_srcdir/configure"; then
2492 echo &&
2493 $SHELL "$ac_srcdir/configure" --help=recursive
2494 else
2495 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2496 fi || ac_status=$?
2497 cd "$ac_pwd" || { ac_status=$?; break; }
2498 done
2499fi
2500
2501test -n "$ac_init_help" && exit $ac_status
2502if $ac_init_version; then
2503 cat <<\_ACEOF
d0ac1c44
SM
2504libgnu configure UNUSED-VERSION
2505generated by GNU Autoconf 2.69
c971b7fa 2506
d0ac1c44 2507Copyright (C) 2012 Free Software Foundation, Inc.
c971b7fa
PA
2508This configure script is free software; the Free Software Foundation
2509gives unlimited permission to copy, distribute and modify it.
2510_ACEOF
2511 exit
2512fi
2513
2514## ------------------------ ##
2515## Autoconf initialization. ##
2516## ------------------------ ##
2517
2518# ac_fn_c_try_compile LINENO
2519# --------------------------
2520# Try to compile conftest.$ac_ext, and return whether this succeeded.
2521ac_fn_c_try_compile ()
2522{
2523 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2524 rm -f conftest.$ac_objext
2525 if { { ac_try="$ac_compile"
2526case "(($ac_try" in
2527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2528 *) ac_try_echo=$ac_try;;
2529esac
2530eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2531$as_echo "$ac_try_echo"; } >&5
2532 (eval "$ac_compile") 2>conftest.err
2533 ac_status=$?
2534 if test -s conftest.err; then
2535 grep -v '^ *+' conftest.err >conftest.er1
2536 cat conftest.er1 >&5
2537 mv -f conftest.er1 conftest.err
2538 fi
2539 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2540 test $ac_status = 0; } && {
2541 test -z "$ac_c_werror_flag" ||
2542 test ! -s conftest.err
2543 } && test -s conftest.$ac_objext; then :
2544 ac_retval=0
2545else
2546 $as_echo "$as_me: failed program was:" >&5
2547sed 's/^/| /' conftest.$ac_ext >&5
2548
2549 ac_retval=1
2550fi
d0ac1c44
SM
2551 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2552 as_fn_set_status $ac_retval
c971b7fa
PA
2553
2554} # ac_fn_c_try_compile
2555
2556# ac_fn_c_try_cpp LINENO
2557# ----------------------
2558# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2559ac_fn_c_try_cpp ()
2560{
2561 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2562 if { { ac_try="$ac_cpp conftest.$ac_ext"
2563case "(($ac_try" in
2564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2565 *) ac_try_echo=$ac_try;;
2566esac
2567eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2568$as_echo "$ac_try_echo"; } >&5
2569 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2570 ac_status=$?
2571 if test -s conftest.err; then
2572 grep -v '^ *+' conftest.err >conftest.er1
2573 cat conftest.er1 >&5
2574 mv -f conftest.er1 conftest.err
2575 fi
2576 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
d0ac1c44 2577 test $ac_status = 0; } > conftest.i && {
c971b7fa
PA
2578 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2579 test ! -s conftest.err
2580 }; then :
2581 ac_retval=0
2582else
2583 $as_echo "$as_me: failed program was:" >&5
2584sed 's/^/| /' conftest.$ac_ext >&5
2585
2586 ac_retval=1
2587fi
d0ac1c44
SM
2588 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2589 as_fn_set_status $ac_retval
c971b7fa
PA
2590
2591} # ac_fn_c_try_cpp
2592
2593# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2594# -------------------------------------------------------
2595# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2596# the include files in INCLUDES and setting the cache variable VAR
2597# accordingly.
2598ac_fn_c_check_header_mongrel ()
2599{
2600 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44 2601 if eval \${$3+:} false; then :
c971b7fa
PA
2602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2603$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2604if eval \${$3+:} false; then :
c971b7fa
PA
2605 $as_echo_n "(cached) " >&6
2606fi
2607eval ac_res=\$$3
2608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2609$as_echo "$ac_res" >&6; }
2610else
2611 # Is the header compilable?
2612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2613$as_echo_n "checking $2 usability... " >&6; }
2614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2615/* end confdefs.h. */
2616$4
2617#include <$2>
2618_ACEOF
2619if ac_fn_c_try_compile "$LINENO"; then :
2620 ac_header_compiler=yes
2621else
2622 ac_header_compiler=no
2623fi
2624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2626$as_echo "$ac_header_compiler" >&6; }
2627
2628# Is the header present?
2629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2630$as_echo_n "checking $2 presence... " >&6; }
2631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2632/* end confdefs.h. */
2633#include <$2>
2634_ACEOF
2635if ac_fn_c_try_cpp "$LINENO"; then :
2636 ac_header_preproc=yes
2637else
2638 ac_header_preproc=no
2639fi
d0ac1c44 2640rm -f conftest.err conftest.i conftest.$ac_ext
c971b7fa
PA
2641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2642$as_echo "$ac_header_preproc" >&6; }
2643
2644# So? What about this header?
2645case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2646 yes:no: )
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2648$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2649 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2650$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2651 ;;
2652 no:yes:* )
2653 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2654$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2656$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2658$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2659 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2660$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2661 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2662$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2663 ;;
2664esac
2665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2666$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2667if eval \${$3+:} false; then :
c971b7fa
PA
2668 $as_echo_n "(cached) " >&6
2669else
2670 eval "$3=\$ac_header_compiler"
2671fi
2672eval ac_res=\$$3
2673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2674$as_echo "$ac_res" >&6; }
2675fi
d0ac1c44 2676 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
c971b7fa
PA
2677
2678} # ac_fn_c_check_header_mongrel
2679
2680# ac_fn_c_try_run LINENO
2681# ----------------------
2682# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2683# that executables *can* be run.
2684ac_fn_c_try_run ()
2685{
2686 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2687 if { { ac_try="$ac_link"
2688case "(($ac_try" in
2689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2690 *) ac_try_echo=$ac_try;;
2691esac
2692eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2693$as_echo "$ac_try_echo"; } >&5
2694 (eval "$ac_link") 2>&5
2695 ac_status=$?
2696 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2697 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2698 { { case "(($ac_try" in
2699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2700 *) ac_try_echo=$ac_try;;
2701esac
2702eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2703$as_echo "$ac_try_echo"; } >&5
2704 (eval "$ac_try") 2>&5
2705 ac_status=$?
2706 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2707 test $ac_status = 0; }; }; then :
2708 ac_retval=0
2709else
2710 $as_echo "$as_me: program exited with status $ac_status" >&5
2711 $as_echo "$as_me: failed program was:" >&5
2712sed 's/^/| /' conftest.$ac_ext >&5
2713
2714 ac_retval=$ac_status
2715fi
2716 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2717 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2718 as_fn_set_status $ac_retval
c971b7fa
PA
2719
2720} # ac_fn_c_try_run
2721
2722# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2723# -------------------------------------------------------
2724# Tests whether HEADER exists and can be compiled using the include files in
2725# INCLUDES, setting the cache variable VAR accordingly.
2726ac_fn_c_check_header_compile ()
2727{
2728 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2730$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2731if eval \${$3+:} false; then :
c971b7fa
PA
2732 $as_echo_n "(cached) " >&6
2733else
2734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2735/* end confdefs.h. */
2736$4
2737#include <$2>
2738_ACEOF
2739if ac_fn_c_try_compile "$LINENO"; then :
2740 eval "$3=yes"
2741else
2742 eval "$3=no"
2743fi
2744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2745fi
2746eval ac_res=\$$3
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2748$as_echo "$ac_res" >&6; }
d0ac1c44 2749 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
c971b7fa
PA
2750
2751} # ac_fn_c_check_header_compile
2752
d0ac1c44
SM
2753# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2754# -------------------------------------------
2755# Tests whether TYPE exists after having included INCLUDES, setting cache
2756# variable VAR accordingly.
2757ac_fn_c_check_type ()
2758{
2759 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2761$as_echo_n "checking for $2... " >&6; }
2762if eval \${$3+:} false; then :
2763 $as_echo_n "(cached) " >&6
2764else
2765 eval "$3=no"
2766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2767/* end confdefs.h. */
2768$4
2769int
2770main ()
2771{
2772if (sizeof ($2))
2773 return 0;
2774 ;
2775 return 0;
2776}
2777_ACEOF
2778if ac_fn_c_try_compile "$LINENO"; then :
2779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2780/* end confdefs.h. */
2781$4
2782int
2783main ()
2784{
2785if (sizeof (($2)))
2786 return 0;
2787 ;
2788 return 0;
2789}
2790_ACEOF
2791if ac_fn_c_try_compile "$LINENO"; then :
2792
2793else
2794 eval "$3=yes"
2795fi
2796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2797fi
2798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2799fi
2800eval ac_res=\$$3
2801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2802$as_echo "$ac_res" >&6; }
2803 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2804
2805} # ac_fn_c_check_type
2806
c971b7fa
PA
2807# ac_fn_c_try_link LINENO
2808# -----------------------
2809# Try to link conftest.$ac_ext, and return whether this succeeded.
2810ac_fn_c_try_link ()
2811{
2812 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2813 rm -f conftest.$ac_objext conftest$ac_exeext
2814 if { { ac_try="$ac_link"
2815case "(($ac_try" in
2816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2817 *) ac_try_echo=$ac_try;;
2818esac
2819eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2820$as_echo "$ac_try_echo"; } >&5
2821 (eval "$ac_link") 2>conftest.err
2822 ac_status=$?
2823 if test -s conftest.err; then
2824 grep -v '^ *+' conftest.err >conftest.er1
2825 cat conftest.er1 >&5
2826 mv -f conftest.er1 conftest.err
2827 fi
2828 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2829 test $ac_status = 0; } && {
2830 test -z "$ac_c_werror_flag" ||
2831 test ! -s conftest.err
2832 } && test -s conftest$ac_exeext && {
2833 test "$cross_compiling" = yes ||
d0ac1c44 2834 test -x conftest$ac_exeext
c971b7fa
PA
2835 }; then :
2836 ac_retval=0
2837else
2838 $as_echo "$as_me: failed program was:" >&5
2839sed 's/^/| /' conftest.$ac_ext >&5
2840
2841 ac_retval=1
2842fi
2843 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2844 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2845 # interfere with the next link command; also delete a directory that is
2846 # left behind by Apple's compiler. We do this before executing the actions.
2847 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2848 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2849 as_fn_set_status $ac_retval
c971b7fa
PA
2850
2851} # ac_fn_c_try_link
2852
8690e634
JK
2853# ac_fn_c_check_func LINENO FUNC VAR
2854# ----------------------------------
2855# Tests whether FUNC exists, setting the cache variable VAR accordingly
2856ac_fn_c_check_func ()
2857{
2858 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2860$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2861if eval \${$3+:} false; then :
8690e634
JK
2862 $as_echo_n "(cached) " >&6
2863else
2864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2865/* end confdefs.h. */
2866/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2867 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2868#define $2 innocuous_$2
2869
2870/* System header to define __stub macros and hopefully few prototypes,
2871 which can conflict with char $2 (); below.
2872 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2873 <limits.h> exists even on freestanding compilers. */
2874
2875#ifdef __STDC__
2876# include <limits.h>
2877#else
2878# include <assert.h>
2879#endif
2880
2881#undef $2
2882
2883/* Override any GCC internal prototype to avoid an error.
2884 Use char because int might match the return type of a GCC
2885 builtin and then its argument prototype would still apply. */
2886#ifdef __cplusplus
2887extern "C"
2888#endif
2889char $2 ();
2890/* The GNU C library defines this for functions which it implements
2891 to always fail with ENOSYS. Some functions are actually named
2892 something starting with __ and the normal name is an alias. */
2893#if defined __stub_$2 || defined __stub___$2
2894choke me
2895#endif
2896
2897int
2898main ()
2899{
2900return $2 ();
2901 ;
2902 return 0;
2903}
2904_ACEOF
2905if ac_fn_c_try_link "$LINENO"; then :
2906 eval "$3=yes"
2907else
2908 eval "$3=no"
2909fi
2910rm -f core conftest.err conftest.$ac_objext \
2911 conftest$ac_exeext conftest.$ac_ext
2912fi
2913eval ac_res=\$$3
2914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2915$as_echo "$ac_res" >&6; }
d0ac1c44 2916 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
8690e634
JK
2917
2918} # ac_fn_c_check_func
2919
d0ac1c44
SM
2920# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2921# ---------------------------------------------
2922# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2923# accordingly.
8986e351
TT
2924ac_fn_c_check_decl ()
2925{
2926 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44
SM
2927 as_decl_name=`echo $2|sed 's/ *(.*//'`
2928 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2930$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2931if eval \${$3+:} false; then :
8986e351
TT
2932 $as_echo_n "(cached) " >&6
2933else
2934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2935/* end confdefs.h. */
2936$4
2937int
2938main ()
2939{
d0ac1c44
SM
2940#ifndef $as_decl_name
2941#ifdef __cplusplus
2942 (void) $as_decl_use;
2943#else
2944 (void) $as_decl_name;
2945#endif
8986e351
TT
2946#endif
2947
2948 ;
2949 return 0;
2950}
2951_ACEOF
2952if ac_fn_c_try_compile "$LINENO"; then :
2953 eval "$3=yes"
2954else
2955 eval "$3=no"
2956fi
2957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2958fi
2959eval ac_res=\$$3
2960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2961$as_echo "$ac_res" >&6; }
d0ac1c44 2962 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
8986e351
TT
2963
2964} # ac_fn_c_check_decl
2965
c971b7fa
PA
2966# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2967# --------------------------------------------
2968# Tries to find the compile-time value of EXPR in a program that includes
2969# INCLUDES, setting VAR accordingly. Returns whether the value could be
2970# computed
2971ac_fn_c_compute_int ()
2972{
2973 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2974 if test "$cross_compiling" = yes; then
2975 # Depending upon the size, compute the lo and hi bounds.
2976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2977/* end confdefs.h. */
2978$4
2979int
2980main ()
2981{
2982static int test_array [1 - 2 * !(($2) >= 0)];
d0ac1c44
SM
2983test_array [0] = 0;
2984return test_array [0];
c971b7fa
PA
2985
2986 ;
2987 return 0;
2988}
2989_ACEOF
2990if ac_fn_c_try_compile "$LINENO"; then :
2991 ac_lo=0 ac_mid=0
2992 while :; do
2993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2994/* end confdefs.h. */
2995$4
2996int
2997main ()
2998{
2999static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
3000test_array [0] = 0;
3001return test_array [0];
c971b7fa
PA
3002
3003 ;
3004 return 0;
3005}
3006_ACEOF
3007if ac_fn_c_try_compile "$LINENO"; then :
3008 ac_hi=$ac_mid; break
3009else
3010 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
3011 if test $ac_lo -le $ac_mid; then
3012 ac_lo= ac_hi=
3013 break
3014 fi
3015 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
3016fi
3017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3018 done
3019else
3020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3021/* end confdefs.h. */
3022$4
3023int
3024main ()
3025{
3026static int test_array [1 - 2 * !(($2) < 0)];
d0ac1c44
SM
3027test_array [0] = 0;
3028return test_array [0];
c971b7fa
PA
3029
3030 ;
3031 return 0;
3032}
3033_ACEOF
3034if ac_fn_c_try_compile "$LINENO"; then :
3035 ac_hi=-1 ac_mid=-1
3036 while :; do
3037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3038/* end confdefs.h. */
3039$4
3040int
3041main ()
3042{
3043static int test_array [1 - 2 * !(($2) >= $ac_mid)];
d0ac1c44
SM
3044test_array [0] = 0;
3045return test_array [0];
c971b7fa
PA
3046
3047 ;
3048 return 0;
3049}
3050_ACEOF
3051if ac_fn_c_try_compile "$LINENO"; then :
3052 ac_lo=$ac_mid; break
3053else
3054 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3055 if test $ac_mid -le $ac_hi; then
3056 ac_lo= ac_hi=
3057 break
3058 fi
3059 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3060fi
3061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3062 done
3063else
3064 ac_lo= ac_hi=
3065fi
3066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3067fi
3068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3069# Binary search between lo and hi bounds.
3070while test "x$ac_lo" != "x$ac_hi"; do
3071 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3073/* end confdefs.h. */
3074$4
3075int
3076main ()
3077{
3078static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
3079test_array [0] = 0;
3080return test_array [0];
c971b7fa
PA
3081
3082 ;
3083 return 0;
3084}
3085_ACEOF
3086if ac_fn_c_try_compile "$LINENO"; then :
3087 ac_hi=$ac_mid
3088else
3089 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3090fi
3091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3092done
3093case $ac_lo in #((
3094?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3095'') ac_retval=1 ;;
3096esac
3097 else
3098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3099/* end confdefs.h. */
3100$4
3101static long int longval () { return $2; }
3102static unsigned long int ulongval () { return $2; }
3103#include <stdio.h>
3104#include <stdlib.h>
3105int
3106main ()
3107{
3108
3109 FILE *f = fopen ("conftest.val", "w");
3110 if (! f)
3111 return 1;
3112 if (($2) < 0)
3113 {
3114 long int i = longval ();
3115 if (i != ($2))
3116 return 1;
3117 fprintf (f, "%ld", i);
3118 }
3119 else
3120 {
3121 unsigned long int i = ulongval ();
3122 if (i != ($2))
3123 return 1;
3124 fprintf (f, "%lu", i);
3125 }
3126 /* Do not output a trailing newline, as this causes \r\n confusion
3127 on some platforms. */
3128 return ferror (f) || fclose (f) != 0;
3129
3130 ;
3131 return 0;
3132}
3133_ACEOF
3134if ac_fn_c_try_run "$LINENO"; then :
3135 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3136else
3137 ac_retval=1
3138fi
3139rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3140 conftest.$ac_objext conftest.beam conftest.$ac_ext
3141rm -f conftest.val
3142
3143 fi
d0ac1c44
SM
3144 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3145 as_fn_set_status $ac_retval
c971b7fa
PA
3146
3147} # ac_fn_c_compute_int
7a6dbc2f
SDJ
3148
3149# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3150# ----------------------------------------------------
3151# Tries to find if the field MEMBER exists in type AGGR, after including
3152# INCLUDES, setting cache variable VAR accordingly.
3153ac_fn_c_check_member ()
3154{
3155 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3157$as_echo_n "checking for $2.$3... " >&6; }
3158if eval \${$4+:} false; then :
3159 $as_echo_n "(cached) " >&6
3160else
3161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3162/* end confdefs.h. */
3163$5
3164int
3165main ()
3166{
3167static $2 ac_aggr;
3168if (ac_aggr.$3)
3169return 0;
3170 ;
3171 return 0;
3172}
3173_ACEOF
3174if ac_fn_c_try_compile "$LINENO"; then :
3175 eval "$4=yes"
3176else
3177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3178/* end confdefs.h. */
3179$5
3180int
3181main ()
3182{
3183static $2 ac_aggr;
3184if (sizeof ac_aggr.$3)
3185return 0;
3186 ;
3187 return 0;
3188}
3189_ACEOF
3190if ac_fn_c_try_compile "$LINENO"; then :
3191 eval "$4=yes"
3192else
3193 eval "$4=no"
3194fi
3195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3196fi
3197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3198fi
3199eval ac_res=\$$4
3200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3201$as_echo "$ac_res" >&6; }
3202 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3203
3204} # ac_fn_c_check_member
c971b7fa
PA
3205cat >config.log <<_ACEOF
3206This file contains any messages produced by compilers while
3207running configure, to aid debugging if configure makes a mistake.
3208
d0ac1c44
SM
3209It was created by libgnu $as_me UNUSED-VERSION, which was
3210generated by GNU Autoconf 2.69. Invocation command line was
c971b7fa
PA
3211
3212 $ $0 $@
3213
3214_ACEOF
3215exec 5>>config.log
3216{
3217cat <<_ASUNAME
3218## --------- ##
3219## Platform. ##
3220## --------- ##
3221
3222hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3223uname -m = `(uname -m) 2>/dev/null || echo unknown`
3224uname -r = `(uname -r) 2>/dev/null || echo unknown`
3225uname -s = `(uname -s) 2>/dev/null || echo unknown`
3226uname -v = `(uname -v) 2>/dev/null || echo unknown`
3227
3228/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3229/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3230
3231/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3232/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3233/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3234/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3235/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3236/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3237/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3238
3239_ASUNAME
3240
3241as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3242for as_dir in $PATH
3243do
3244 IFS=$as_save_IFS
3245 test -z "$as_dir" && as_dir=.
3246 $as_echo "PATH: $as_dir"
3247 done
3248IFS=$as_save_IFS
3249
3250} >&5
3251
3252cat >&5 <<_ACEOF
3253
3254
3255## ----------- ##
3256## Core tests. ##
3257## ----------- ##
3258
3259_ACEOF
3260
3261
3262# Keep a trace of the command line.
3263# Strip out --no-create and --no-recursion so they do not pile up.
3264# Strip out --silent because we don't want to record it for future runs.
3265# Also quote any args containing shell meta-characters.
3266# Make two passes to allow for proper duplicate-argument suppression.
3267ac_configure_args=
3268ac_configure_args0=
3269ac_configure_args1=
3270ac_must_keep_next=false
3271for ac_pass in 1 2
3272do
3273 for ac_arg
3274 do
3275 case $ac_arg in
3276 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3277 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3278 | -silent | --silent | --silen | --sile | --sil)
3279 continue ;;
3280 *\'*)
3281 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3282 esac
3283 case $ac_pass in
3284 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3285 2)
3286 as_fn_append ac_configure_args1 " '$ac_arg'"
3287 if test $ac_must_keep_next = true; then
3288 ac_must_keep_next=false # Got value, back to normal.
3289 else
3290 case $ac_arg in
3291 *=* | --config-cache | -C | -disable-* | --disable-* \
3292 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3293 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3294 | -with-* | --with-* | -without-* | --without-* | --x)
3295 case "$ac_configure_args0 " in
3296 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3297 esac
3298 ;;
3299 -* ) ac_must_keep_next=true ;;
3300 esac
3301 fi
3302 as_fn_append ac_configure_args " '$ac_arg'"
3303 ;;
3304 esac
3305 done
3306done
3307{ ac_configure_args0=; unset ac_configure_args0;}
3308{ ac_configure_args1=; unset ac_configure_args1;}
3309
3310# When interrupted or exit'd, cleanup temporary files, and complete
3311# config.log. We remove comments because anyway the quotes in there
3312# would cause problems or look ugly.
3313# WARNING: Use '\'' to represent an apostrophe within the trap.
3314# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3315trap 'exit_status=$?
3316 # Save into config.log some information that might help in debugging.
3317 {
3318 echo
3319
d0ac1c44 3320 $as_echo "## ---------------- ##
c971b7fa 3321## Cache variables. ##
d0ac1c44 3322## ---------------- ##"
c971b7fa
PA
3323 echo
3324 # The following way of writing the cache mishandles newlines in values,
3325(
3326 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3327 eval ac_val=\$$ac_var
3328 case $ac_val in #(
3329 *${as_nl}*)
3330 case $ac_var in #(
3331 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3332$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3333 esac
3334 case $ac_var in #(
3335 _ | IFS | as_nl) ;; #(
3336 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3337 *) { eval $ac_var=; unset $ac_var;} ;;
3338 esac ;;
3339 esac
3340 done
3341 (set) 2>&1 |
3342 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3343 *${as_nl}ac_space=\ *)
3344 sed -n \
3345 "s/'\''/'\''\\\\'\'''\''/g;
3346 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3347 ;; #(
3348 *)
3349 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3350 ;;
3351 esac |
3352 sort
3353)
3354 echo
3355
d0ac1c44 3356 $as_echo "## ----------------- ##
c971b7fa 3357## Output variables. ##
d0ac1c44 3358## ----------------- ##"
c971b7fa
PA
3359 echo
3360 for ac_var in $ac_subst_vars
3361 do
3362 eval ac_val=\$$ac_var
3363 case $ac_val in
3364 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3365 esac
3366 $as_echo "$ac_var='\''$ac_val'\''"
3367 done | sort
3368 echo
3369
3370 if test -n "$ac_subst_files"; then
d0ac1c44 3371 $as_echo "## ------------------- ##
c971b7fa 3372## File substitutions. ##
d0ac1c44 3373## ------------------- ##"
c971b7fa
PA
3374 echo
3375 for ac_var in $ac_subst_files
3376 do
3377 eval ac_val=\$$ac_var
3378 case $ac_val in
3379 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3380 esac
3381 $as_echo "$ac_var='\''$ac_val'\''"
3382 done | sort
3383 echo
3384 fi
3385
3386 if test -s confdefs.h; then
d0ac1c44 3387 $as_echo "## ----------- ##
c971b7fa 3388## confdefs.h. ##
d0ac1c44 3389## ----------- ##"
c971b7fa
PA
3390 echo
3391 cat confdefs.h
3392 echo
3393 fi
3394 test "$ac_signal" != 0 &&
3395 $as_echo "$as_me: caught signal $ac_signal"
3396 $as_echo "$as_me: exit $exit_status"
3397 } >&5
3398 rm -f core *.core core.conftest.* &&
3399 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3400 exit $exit_status
3401' 0
3402for ac_signal in 1 2 13 15; do
3403 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3404done
3405ac_signal=0
3406
3407# confdefs.h avoids OS command line length limits that DEFS can exceed.
3408rm -f -r conftest* confdefs.h
3409
3410$as_echo "/* confdefs.h */" > confdefs.h
3411
3412# Predefined preprocessor variables.
3413
3414cat >>confdefs.h <<_ACEOF
3415#define PACKAGE_NAME "$PACKAGE_NAME"
3416_ACEOF
3417
3418cat >>confdefs.h <<_ACEOF
3419#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3420_ACEOF
3421
3422cat >>confdefs.h <<_ACEOF
3423#define PACKAGE_VERSION "$PACKAGE_VERSION"
3424_ACEOF
3425
3426cat >>confdefs.h <<_ACEOF
3427#define PACKAGE_STRING "$PACKAGE_STRING"
3428_ACEOF
3429
3430cat >>confdefs.h <<_ACEOF
3431#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3432_ACEOF
3433
3434cat >>confdefs.h <<_ACEOF
3435#define PACKAGE_URL "$PACKAGE_URL"
3436_ACEOF
3437
3438
3439# Let the site file select an alternate cache file if it wants to.
3440# Prefer an explicitly selected file to automatically selected ones.
3441ac_site_file1=NONE
3442ac_site_file2=NONE
3443if test -n "$CONFIG_SITE"; then
d0ac1c44
SM
3444 # We do not want a PATH search for config.site.
3445 case $CONFIG_SITE in #((
3446 -*) ac_site_file1=./$CONFIG_SITE;;
3447 */*) ac_site_file1=$CONFIG_SITE;;
3448 *) ac_site_file1=./$CONFIG_SITE;;
3449 esac
c971b7fa
PA
3450elif test "x$prefix" != xNONE; then
3451 ac_site_file1=$prefix/share/config.site
3452 ac_site_file2=$prefix/etc/config.site
3453else
3454 ac_site_file1=$ac_default_prefix/share/config.site
3455 ac_site_file2=$ac_default_prefix/etc/config.site
3456fi
3457for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3458do
3459 test "x$ac_site_file" = xNONE && continue
d0ac1c44 3460 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
c971b7fa
PA
3461 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3462$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3463 sed 's/^/| /' "$ac_site_file" >&5
d0ac1c44
SM
3464 . "$ac_site_file" \
3465 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3466$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3467as_fn_error $? "failed to load site script $ac_site_file
3468See \`config.log' for more details" "$LINENO" 5; }
c971b7fa
PA
3469 fi
3470done
3471
3472if test -r "$cache_file"; then
d0ac1c44
SM
3473 # Some versions of bash will fail to source /dev/null (special files
3474 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3475 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
c971b7fa
PA
3476 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3477$as_echo "$as_me: loading cache $cache_file" >&6;}
3478 case $cache_file in
3479 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3480 *) . "./$cache_file";;
3481 esac
3482 fi
3483else
3484 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3485$as_echo "$as_me: creating cache $cache_file" >&6;}
3486 >$cache_file
3487fi
3488
472fa5ee
SM
3489gl_func_list="$gl_func_list canonicalize_file_name"
3490gl_func_list="$gl_func_list getcwd"
3491gl_func_list="$gl_func_list readlink"
3492gl_func_list="$gl_func_list realpath"
3493gl_header_list="$gl_header_list sys/param.h"
3494gl_header_list="$gl_header_list unistd.h"
3495gl_func_list="$gl_func_list _set_invalid_parameter_handler"
3496gl_header_list="$gl_header_list sys/socket.h"
3497gl_func_list="$gl_func_list fchdir"
3498gl_header_list="$gl_header_list dirent.h"
3499gl_func_list="$gl_func_list fcntl"
3500gl_func_list="$gl_func_list symlink"
3501gl_func_list="$gl_func_list fdopendir"
3502gl_func_list="$gl_func_list mempcpy"
7a6dbc2f
SDJ
3503gl_header_list="$gl_header_list fnmatch.h"
3504gl_func_list="$gl_func_list fnmatch"
472fa5ee
SM
3505gl_func_list="$gl_func_list btowc"
3506gl_func_list="$gl_func_list isblank"
3507gl_func_list="$gl_func_list iswctype"
3508gl_func_list="$gl_func_list mbsrtowcs"
3509gl_func_list="$gl_func_list wmemchr"
3510gl_func_list="$gl_func_list wmemcpy"
3511gl_func_list="$gl_func_list wmempcpy"
3512gl_header_list="$gl_header_list wctype.h"
8690e634 3513gl_fnmatch_required=GNU
472fa5ee
SM
3514gl_header_list="$gl_header_list sys/stat.h"
3515gl_func_list="$gl_func_list fstatat"
3516gl_func_list="$gl_func_list getdtablesize"
3517gl_func_list="$gl_func_list getlogin_r"
3518gl_func_list="$gl_func_list getprogname"
3519gl_func_list="$gl_func_list getexecname"
3520gl_header_list="$gl_header_list sys/time.h"
3521gl_func_list="$gl_func_list gettimeofday"
7a6dbc2f
SDJ
3522gl_header_list="$gl_header_list glob.h"
3523gl_func_list="$gl_func_list glob"
3524gl_func_list="$gl_func_list glob_pattern_p"
472fa5ee
SM
3525gl_func_list="$gl_func_list getpwnam_r"
3526gl_header_list="$gl_header_list limits.h"
3527gl_header_list="$gl_header_list wchar.h"
3528gl_header_list="$gl_header_list stdint.h"
3529gl_header_list="$gl_header_list inttypes.h"
3530gl_func_list="$gl_func_list lstat"
3531gl_header_list="$gl_header_list math.h"
3532gl_func_list="$gl_func_list mbsinit"
3533gl_func_list="$gl_func_list mbrtowc"
3534gl_header_list="$gl_header_list sys/mman.h"
3535gl_func_list="$gl_func_list mprotect"
3536gl_func_list="$gl_func_list mkstemp"
3537gl_func_list="$gl_func_list openat"
3538gl_func_list="$gl_func_list link"
472fa5ee
SM
3539gl_func_list="$gl_func_list setenv"
3540gl_func_list="$gl_func_list strdup"
3541gl_func_list="$gl_func_list pipe"
3542gl_header_list="$gl_header_list features.h"
7a6dbc2f 3543gl_header_list="$gl_header_list crtdefs.h"
472fa5ee 3544gl_func_list="$gl_func_list iswcntrl"
c971b7fa
PA
3545# Check that the precious variables saved in the cache have kept the same
3546# value.
3547ac_cache_corrupted=false
3548for ac_var in $ac_precious_vars; do
3549 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3550 eval ac_new_set=\$ac_env_${ac_var}_set
3551 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3552 eval ac_new_val=\$ac_env_${ac_var}_value
3553 case $ac_old_set,$ac_new_set in
3554 set,)
3555 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3556$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3557 ac_cache_corrupted=: ;;
3558 ,set)
3559 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3560$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3561 ac_cache_corrupted=: ;;
3562 ,);;
3563 *)
3564 if test "x$ac_old_val" != "x$ac_new_val"; then
3565 # differences in whitespace do not lead to failure.
3566 ac_old_val_w=`echo x $ac_old_val`
3567 ac_new_val_w=`echo x $ac_new_val`
3568 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3569 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3570$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3571 ac_cache_corrupted=:
3572 else
3573 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3574$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3575 eval $ac_var=\$ac_old_val
3576 fi
3577 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3578$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3579 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3580$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3581 fi;;
3582 esac
3583 # Pass precious variables to config.status.
3584 if test "$ac_new_set" = set; then
3585 case $ac_new_val in
3586 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3587 *) ac_arg=$ac_var=$ac_new_val ;;
3588 esac
3589 case " $ac_configure_args " in
3590 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3591 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3592 esac
3593 fi
3594done
3595if $ac_cache_corrupted; then
3596 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3597$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3598 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3599$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d0ac1c44 3600 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
c971b7fa
PA
3601fi
3602## -------------------- ##
3603## Main body of script. ##
3604## -------------------- ##
3605
3606ac_ext=c
3607ac_cpp='$CPP $CPPFLAGS'
3608ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3609ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3610ac_compiler_gnu=$ac_cv_c_compiler_gnu
3611
3612
d0ac1c44 3613
c971b7fa
PA
3614ac_config_headers="$ac_config_headers config.h:config.in"
3615
3616
3617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
3618$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
3619 # Check whether --enable-maintainer-mode was given.
3620if test "${enable_maintainer_mode+set}" = set; then :
3621 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
3622else
3623 USE_MAINTAINER_MODE=no
3624fi
3625
3626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3627$as_echo "$USE_MAINTAINER_MODE" >&6; }
3628 if test $USE_MAINTAINER_MODE = yes; then
3629 MAINTAINER_MODE_TRUE=
3630 MAINTAINER_MODE_FALSE='#'
3631else
3632 MAINTAINER_MODE_TRUE='#'
3633 MAINTAINER_MODE_FALSE=
3634fi
3635
3636 MAINT=$MAINTAINER_MODE_TRUE
3637
3638
3639
3640ac_ext=c
3641ac_cpp='$CPP $CPPFLAGS'
3642ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3643ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3644ac_compiler_gnu=$ac_cv_c_compiler_gnu
3645if test -n "$ac_tool_prefix"; then
3646 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3647set dummy ${ac_tool_prefix}gcc; ac_word=$2
3648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3649$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3650if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
3651 $as_echo_n "(cached) " >&6
3652else
3653 if test -n "$CC"; then
3654 ac_cv_prog_CC="$CC" # Let the user override the test.
3655else
3656as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3657for as_dir in $PATH
3658do
3659 IFS=$as_save_IFS
3660 test -z "$as_dir" && as_dir=.
3661 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3662 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3663 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3664 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3665 break 2
3666 fi
3667done
3668 done
3669IFS=$as_save_IFS
3670
3671fi
3672fi
3673CC=$ac_cv_prog_CC
3674if test -n "$CC"; then
3675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3676$as_echo "$CC" >&6; }
3677else
3678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3679$as_echo "no" >&6; }
3680fi
3681
3682
3683fi
3684if test -z "$ac_cv_prog_CC"; then
3685 ac_ct_CC=$CC
3686 # Extract the first word of "gcc", so it can be a program name with args.
3687set dummy gcc; ac_word=$2
3688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3689$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3690if ${ac_cv_prog_ac_ct_CC+:} false; then :
c971b7fa
PA
3691 $as_echo_n "(cached) " >&6
3692else
3693 if test -n "$ac_ct_CC"; then
3694 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3695else
3696as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3697for as_dir in $PATH
3698do
3699 IFS=$as_save_IFS
3700 test -z "$as_dir" && as_dir=.
3701 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3702 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3703 ac_cv_prog_ac_ct_CC="gcc"
3704 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3705 break 2
3706 fi
3707done
3708 done
3709IFS=$as_save_IFS
3710
3711fi
3712fi
3713ac_ct_CC=$ac_cv_prog_ac_ct_CC
3714if test -n "$ac_ct_CC"; then
3715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3716$as_echo "$ac_ct_CC" >&6; }
3717else
3718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3719$as_echo "no" >&6; }
3720fi
3721
3722 if test "x$ac_ct_CC" = x; then
3723 CC=""
3724 else
3725 case $cross_compiling:$ac_tool_warned in
3726yes:)
3727{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3728$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3729ac_tool_warned=yes ;;
3730esac
3731 CC=$ac_ct_CC
3732 fi
3733else
3734 CC="$ac_cv_prog_CC"
3735fi
3736
3737if test -z "$CC"; then
3738 if test -n "$ac_tool_prefix"; then
3739 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3740set dummy ${ac_tool_prefix}cc; ac_word=$2
3741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3742$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3743if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
3744 $as_echo_n "(cached) " >&6
3745else
3746 if test -n "$CC"; then
3747 ac_cv_prog_CC="$CC" # Let the user override the test.
3748else
3749as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3750for as_dir in $PATH
3751do
3752 IFS=$as_save_IFS
3753 test -z "$as_dir" && as_dir=.
3754 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3755 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3756 ac_cv_prog_CC="${ac_tool_prefix}cc"
3757 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3758 break 2
3759 fi
3760done
3761 done
3762IFS=$as_save_IFS
3763
3764fi
3765fi
3766CC=$ac_cv_prog_CC
3767if test -n "$CC"; then
3768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3769$as_echo "$CC" >&6; }
3770else
3771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3772$as_echo "no" >&6; }
3773fi
3774
3775
3776 fi
3777fi
3778if test -z "$CC"; then
3779 # Extract the first word of "cc", so it can be a program name with args.
3780set dummy cc; ac_word=$2
3781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3782$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3783if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
3784 $as_echo_n "(cached) " >&6
3785else
3786 if test -n "$CC"; then
3787 ac_cv_prog_CC="$CC" # Let the user override the test.
3788else
3789 ac_prog_rejected=no
3790as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3791for as_dir in $PATH
3792do
3793 IFS=$as_save_IFS
3794 test -z "$as_dir" && as_dir=.
3795 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3796 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3797 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3798 ac_prog_rejected=yes
3799 continue
3800 fi
3801 ac_cv_prog_CC="cc"
3802 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3803 break 2
3804 fi
3805done
3806 done
3807IFS=$as_save_IFS
3808
3809if test $ac_prog_rejected = yes; then
3810 # We found a bogon in the path, so make sure we never use it.
3811 set dummy $ac_cv_prog_CC
3812 shift
3813 if test $# != 0; then
3814 # We chose a different compiler from the bogus one.
3815 # However, it has the same basename, so the bogon will be chosen
3816 # first if we set CC to just the basename; use the full file name.
3817 shift
3818 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3819 fi
3820fi
3821fi
3822fi
3823CC=$ac_cv_prog_CC
3824if test -n "$CC"; then
3825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3826$as_echo "$CC" >&6; }
3827else
3828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3829$as_echo "no" >&6; }
3830fi
3831
3832
3833fi
3834if test -z "$CC"; then
3835 if test -n "$ac_tool_prefix"; then
3836 for ac_prog in cl.exe
3837 do
3838 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3839set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3841$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3842if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
3843 $as_echo_n "(cached) " >&6
3844else
3845 if test -n "$CC"; then
3846 ac_cv_prog_CC="$CC" # Let the user override the test.
3847else
3848as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3849for as_dir in $PATH
3850do
3851 IFS=$as_save_IFS
3852 test -z "$as_dir" && as_dir=.
3853 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3854 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3855 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3856 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3857 break 2
3858 fi
3859done
3860 done
3861IFS=$as_save_IFS
3862
3863fi
3864fi
3865CC=$ac_cv_prog_CC
3866if test -n "$CC"; then
3867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3868$as_echo "$CC" >&6; }
3869else
3870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3871$as_echo "no" >&6; }
3872fi
3873
3874
3875 test -n "$CC" && break
3876 done
3877fi
3878if test -z "$CC"; then
3879 ac_ct_CC=$CC
3880 for ac_prog in cl.exe
3881do
3882 # Extract the first word of "$ac_prog", so it can be a program name with args.
3883set dummy $ac_prog; ac_word=$2
3884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3885$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3886if ${ac_cv_prog_ac_ct_CC+:} false; then :
c971b7fa
PA
3887 $as_echo_n "(cached) " >&6
3888else
3889 if test -n "$ac_ct_CC"; then
3890 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3891else
3892as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3893for as_dir in $PATH
3894do
3895 IFS=$as_save_IFS
3896 test -z "$as_dir" && as_dir=.
3897 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3898 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3899 ac_cv_prog_ac_ct_CC="$ac_prog"
3900 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3901 break 2
3902 fi
3903done
3904 done
3905IFS=$as_save_IFS
3906
3907fi
3908fi
3909ac_ct_CC=$ac_cv_prog_ac_ct_CC
3910if test -n "$ac_ct_CC"; then
3911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3912$as_echo "$ac_ct_CC" >&6; }
3913else
3914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3915$as_echo "no" >&6; }
3916fi
3917
3918
3919 test -n "$ac_ct_CC" && break
3920done
3921
3922 if test "x$ac_ct_CC" = x; then
3923 CC=""
3924 else
3925 case $cross_compiling:$ac_tool_warned in
3926yes:)
3927{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3928$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3929ac_tool_warned=yes ;;
3930esac
3931 CC=$ac_ct_CC
3932 fi
3933fi
3934
7a6dbc2f
SDJ
3935fi
3936if test -z "$CC"; then
3937 if test -n "$ac_tool_prefix"; then
3938 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
3939set dummy ${ac_tool_prefix}clang; ac_word=$2
3940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3941$as_echo_n "checking for $ac_word... " >&6; }
3942if ${ac_cv_prog_CC+:} false; then :
3943 $as_echo_n "(cached) " >&6
3944else
3945 if test -n "$CC"; then
3946 ac_cv_prog_CC="$CC" # Let the user override the test.
3947else
3948as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3949for as_dir in $PATH
3950do
3951 IFS=$as_save_IFS
3952 test -z "$as_dir" && as_dir=.
3953 for ac_exec_ext in '' $ac_executable_extensions; do
3954 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3955 ac_cv_prog_CC="${ac_tool_prefix}clang"
3956 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3957 break 2
3958 fi
3959done
3960 done
3961IFS=$as_save_IFS
3962
3963fi
3964fi
3965CC=$ac_cv_prog_CC
3966if test -n "$CC"; then
3967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3968$as_echo "$CC" >&6; }
3969else
3970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3971$as_echo "no" >&6; }
3972fi
3973
3974
3975fi
3976if test -z "$ac_cv_prog_CC"; then
3977 ac_ct_CC=$CC
3978 # Extract the first word of "clang", so it can be a program name with args.
3979set dummy clang; ac_word=$2
3980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3981$as_echo_n "checking for $ac_word... " >&6; }
3982if ${ac_cv_prog_ac_ct_CC+:} false; then :
3983 $as_echo_n "(cached) " >&6
3984else
3985 if test -n "$ac_ct_CC"; then
3986 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3987else
3988as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3989for as_dir in $PATH
3990do
3991 IFS=$as_save_IFS
3992 test -z "$as_dir" && as_dir=.
3993 for ac_exec_ext in '' $ac_executable_extensions; do
3994 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3995 ac_cv_prog_ac_ct_CC="clang"
3996 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3997 break 2
3998 fi
3999done
4000 done
4001IFS=$as_save_IFS
4002
4003fi
4004fi
4005ac_ct_CC=$ac_cv_prog_ac_ct_CC
4006if test -n "$ac_ct_CC"; then
4007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4008$as_echo "$ac_ct_CC" >&6; }
4009else
4010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4011$as_echo "no" >&6; }
4012fi
4013
4014 if test "x$ac_ct_CC" = x; then
4015 CC=""
4016 else
4017 case $cross_compiling:$ac_tool_warned in
4018yes:)
4019{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4020$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4021ac_tool_warned=yes ;;
4022esac
4023 CC=$ac_ct_CC
4024 fi
4025else
4026 CC="$ac_cv_prog_CC"
4027fi
4028
c971b7fa
PA
4029fi
4030
4031
4032test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4033$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4034as_fn_error $? "no acceptable C compiler found in \$PATH
4035See \`config.log' for more details" "$LINENO" 5; }
c971b7fa
PA
4036
4037# Provide some information about the compiler.
4038$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4039set X $ac_compile
4040ac_compiler=$2
7a6dbc2f 4041for ac_option in --version -v -V -qversion -version; do
c971b7fa
PA
4042 { { ac_try="$ac_compiler $ac_option >&5"
4043case "(($ac_try" in
4044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4045 *) ac_try_echo=$ac_try;;
4046esac
4047eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4048$as_echo "$ac_try_echo"; } >&5
4049 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4050 ac_status=$?
4051 if test -s conftest.err; then
4052 sed '10a\
4053... rest of stderr output deleted ...
4054 10q' conftest.err >conftest.er1
4055 cat conftest.er1 >&5
c971b7fa 4056 fi
d0ac1c44 4057 rm -f conftest.er1 conftest.err
c971b7fa
PA
4058 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4059 test $ac_status = 0; }
4060done
4061
4062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4063/* end confdefs.h. */
d0ac1c44 4064
c971b7fa
PA
4065int
4066main ()
4067{
c971b7fa
PA
4068
4069 ;
4070 return 0;
4071}
4072_ACEOF
4073ac_clean_files_save=$ac_clean_files
d0ac1c44 4074ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
c971b7fa
PA
4075# Try to create an executable without -o first, disregard a.out.
4076# It will help us diagnose broken compilers, and finding out an intuition
4077# of exeext.
d0ac1c44
SM
4078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4079$as_echo_n "checking whether the C compiler works... " >&6; }
c971b7fa
PA
4080ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4081
4082# The possible output files:
4083ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4084
4085ac_rmfiles=
4086for ac_file in $ac_files
4087do
4088 case $ac_file in
4089 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4090 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4091 esac
4092done
4093rm -f $ac_rmfiles
4094
4095if { { ac_try="$ac_link_default"
4096case "(($ac_try" in
4097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4098 *) ac_try_echo=$ac_try;;
4099esac
4100eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4101$as_echo "$ac_try_echo"; } >&5
4102 (eval "$ac_link_default") 2>&5
4103 ac_status=$?
4104 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4105 test $ac_status = 0; }; then :
4106 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4107# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4108# in a Makefile. We should not override ac_cv_exeext if it was cached,
4109# so that the user can short-circuit this test for compilers unknown to
4110# Autoconf.
4111for ac_file in $ac_files ''
4112do
4113 test -f "$ac_file" || continue
4114 case $ac_file in
4115 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4116 ;;
4117 [ab].out )
4118 # We found the default executable, but exeext='' is most
4119 # certainly right.
4120 break;;
4121 *.* )
4122 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4123 then :; else
4124 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4125 fi
4126 # We set ac_cv_exeext here because the later test for it is not
4127 # safe: cross compilers may not add the suffix if given an `-o'
4128 # argument, so we may need to know it at that point already.
4129 # Even if this section looks crufty: it has the advantage of
4130 # actually working.
4131 break;;
4132 * )
4133 break;;
4134 esac
4135done
4136test "$ac_cv_exeext" = no && ac_cv_exeext=
4137
4138else
4139 ac_file=''
4140fi
c971b7fa 4141if test -z "$ac_file"; then :
d0ac1c44
SM
4142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4143$as_echo "no" >&6; }
4144$as_echo "$as_me: failed program was:" >&5
c971b7fa
PA
4145sed 's/^/| /' conftest.$ac_ext >&5
4146
4147{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4148$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4149as_fn_error 77 "C compiler cannot create executables
4150See \`config.log' for more details" "$LINENO" 5; }
4151else
4152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4153$as_echo "yes" >&6; }
c971b7fa 4154fi
d0ac1c44
SM
4155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4156$as_echo_n "checking for C compiler default output file name... " >&6; }
4157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4158$as_echo "$ac_file" >&6; }
c971b7fa
PA
4159ac_exeext=$ac_cv_exeext
4160
d0ac1c44 4161rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
c971b7fa 4162ac_clean_files=$ac_clean_files_save
c971b7fa
PA
4163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4164$as_echo_n "checking for suffix of executables... " >&6; }
4165if { { ac_try="$ac_link"
4166case "(($ac_try" in
4167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4168 *) ac_try_echo=$ac_try;;
4169esac
4170eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4171$as_echo "$ac_try_echo"; } >&5
4172 (eval "$ac_link") 2>&5
4173 ac_status=$?
4174 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4175 test $ac_status = 0; }; then :
4176 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4177# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4178# work properly (i.e., refer to `conftest.exe'), while it won't with
4179# `rm'.
4180for ac_file in conftest.exe conftest conftest.*; do
4181 test -f "$ac_file" || continue
4182 case $ac_file in
4183 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4184 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4185 break;;
4186 * ) break;;
4187 esac
4188done
4189else
4190 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4191$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4192as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4193See \`config.log' for more details" "$LINENO" 5; }
c971b7fa 4194fi
d0ac1c44 4195rm -f conftest conftest$ac_cv_exeext
c971b7fa
PA
4196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4197$as_echo "$ac_cv_exeext" >&6; }
4198
4199rm -f conftest.$ac_ext
4200EXEEXT=$ac_cv_exeext
4201ac_exeext=$EXEEXT
d0ac1c44
SM
4202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4203/* end confdefs.h. */
4204#include <stdio.h>
4205int
4206main ()
4207{
4208FILE *f = fopen ("conftest.out", "w");
4209 return ferror (f) || fclose (f) != 0;
4210
4211 ;
4212 return 0;
4213}
4214_ACEOF
4215ac_clean_files="$ac_clean_files conftest.out"
4216# Check that the compiler produces executables we can run. If not, either
4217# the compiler is broken, or we cross compile.
4218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4219$as_echo_n "checking whether we are cross compiling... " >&6; }
4220if test "$cross_compiling" != yes; then
4221 { { ac_try="$ac_link"
4222case "(($ac_try" in
4223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4224 *) ac_try_echo=$ac_try;;
4225esac
4226eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4227$as_echo "$ac_try_echo"; } >&5
4228 (eval "$ac_link") 2>&5
4229 ac_status=$?
4230 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4231 test $ac_status = 0; }
4232 if { ac_try='./conftest$ac_cv_exeext'
4233 { { case "(($ac_try" in
4234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4235 *) ac_try_echo=$ac_try;;
4236esac
4237eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4238$as_echo "$ac_try_echo"; } >&5
4239 (eval "$ac_try") 2>&5
4240 ac_status=$?
4241 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4242 test $ac_status = 0; }; }; then
4243 cross_compiling=no
4244 else
4245 if test "$cross_compiling" = maybe; then
4246 cross_compiling=yes
4247 else
4248 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4249$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4250as_fn_error $? "cannot run C compiled programs.
4251If you meant to cross compile, use \`--host'.
4252See \`config.log' for more details" "$LINENO" 5; }
4253 fi
4254 fi
4255fi
4256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4257$as_echo "$cross_compiling" >&6; }
4258
4259rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4260ac_clean_files=$ac_clean_files_save
c971b7fa
PA
4261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4262$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 4263if ${ac_cv_objext+:} false; then :
c971b7fa
PA
4264 $as_echo_n "(cached) " >&6
4265else
4266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4267/* end confdefs.h. */
4268
4269int
4270main ()
4271{
4272
4273 ;
4274 return 0;
4275}
4276_ACEOF
4277rm -f conftest.o conftest.obj
4278if { { ac_try="$ac_compile"
4279case "(($ac_try" in
4280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4281 *) ac_try_echo=$ac_try;;
4282esac
4283eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4284$as_echo "$ac_try_echo"; } >&5
4285 (eval "$ac_compile") 2>&5
4286 ac_status=$?
4287 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4288 test $ac_status = 0; }; then :
4289 for ac_file in conftest.o conftest.obj conftest.*; do
4290 test -f "$ac_file" || continue;
4291 case $ac_file in
4292 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4293 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4294 break;;
4295 esac
4296done
4297else
4298 $as_echo "$as_me: failed program was:" >&5
4299sed 's/^/| /' conftest.$ac_ext >&5
4300
4301{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4302$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4303as_fn_error $? "cannot compute suffix of object files: cannot compile
4304See \`config.log' for more details" "$LINENO" 5; }
c971b7fa
PA
4305fi
4306rm -f conftest.$ac_cv_objext conftest.$ac_ext
4307fi
4308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4309$as_echo "$ac_cv_objext" >&6; }
4310OBJEXT=$ac_cv_objext
4311ac_objext=$OBJEXT
4312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4313$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 4314if ${ac_cv_c_compiler_gnu+:} false; then :
c971b7fa
PA
4315 $as_echo_n "(cached) " >&6
4316else
4317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4318/* end confdefs.h. */
4319
4320int
4321main ()
4322{
4323#ifndef __GNUC__
4324 choke me
4325#endif
4326
4327 ;
4328 return 0;
4329}
4330_ACEOF
4331if ac_fn_c_try_compile "$LINENO"; then :
4332 ac_compiler_gnu=yes
4333else
4334 ac_compiler_gnu=no
4335fi
4336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4337ac_cv_c_compiler_gnu=$ac_compiler_gnu
4338
4339fi
4340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4341$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4342if test $ac_compiler_gnu = yes; then
4343 GCC=yes
4344else
4345 GCC=
4346fi
4347ac_test_CFLAGS=${CFLAGS+set}
4348ac_save_CFLAGS=$CFLAGS
4349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4350$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 4351if ${ac_cv_prog_cc_g+:} false; then :
c971b7fa
PA
4352 $as_echo_n "(cached) " >&6
4353else
4354 ac_save_c_werror_flag=$ac_c_werror_flag
4355 ac_c_werror_flag=yes
4356 ac_cv_prog_cc_g=no
4357 CFLAGS="-g"
4358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4359/* end confdefs.h. */
4360
4361int
4362main ()
4363{
4364
4365 ;
4366 return 0;
4367}
4368_ACEOF
4369if ac_fn_c_try_compile "$LINENO"; then :
4370 ac_cv_prog_cc_g=yes
4371else
4372 CFLAGS=""
4373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4374/* end confdefs.h. */
4375
4376int
4377main ()
4378{
4379
4380 ;
4381 return 0;
4382}
4383_ACEOF
4384if ac_fn_c_try_compile "$LINENO"; then :
4385
4386else
4387 ac_c_werror_flag=$ac_save_c_werror_flag
4388 CFLAGS="-g"
4389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4390/* end confdefs.h. */
4391
4392int
4393main ()
4394{
4395
4396 ;
4397 return 0;
4398}
4399_ACEOF
4400if ac_fn_c_try_compile "$LINENO"; then :
4401 ac_cv_prog_cc_g=yes
4402fi
4403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4404fi
4405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4406fi
4407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4408 ac_c_werror_flag=$ac_save_c_werror_flag
4409fi
4410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4411$as_echo "$ac_cv_prog_cc_g" >&6; }
4412if test "$ac_test_CFLAGS" = set; then
4413 CFLAGS=$ac_save_CFLAGS
4414elif test $ac_cv_prog_cc_g = yes; then
4415 if test "$GCC" = yes; then
4416 CFLAGS="-g -O2"
4417 else
4418 CFLAGS="-g"
4419 fi
4420else
4421 if test "$GCC" = yes; then
4422 CFLAGS="-O2"
4423 else
4424 CFLAGS=
4425 fi
4426fi
7a6dbc2f
SDJ
4427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
4428$as_echo_n "checking for $CC option to enable C11 features... " >&6; }
4429if ${ac_cv_prog_cc_c11+:} false; then :
c971b7fa
PA
4430 $as_echo_n "(cached) " >&6
4431else
7a6dbc2f 4432 ac_cv_prog_cc_c11=no
c971b7fa
PA
4433ac_save_CC=$CC
4434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4435/* end confdefs.h. */
4436#include <stdarg.h>
7a6dbc2f
SDJ
4437#include <stdbool.h>
4438#include <stddef.h>
4439#include <stdlib.h>
4440#include <wchar.h>
c971b7fa 4441#include <stdio.h>
7a6dbc2f
SDJ
4442
4443// Check varargs macros. These examples are taken from C99 6.10.3.5.
4444#define debug(...) fprintf (stderr, __VA_ARGS__)
4445#define showlist(...) puts (#__VA_ARGS__)
4446#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4447static void
4448test_varargs_macros (void)
c971b7fa 4449{
7a6dbc2f
SDJ
4450 int x = 1234;
4451 int y = 5678;
4452 debug ("Flag");
4453 debug ("X = %d\n", x);
4454 showlist (The first, second, and third items.);
4455 report (x>y, "x is %d but y is %d", x, y);
c971b7fa 4456}
7a6dbc2f
SDJ
4457
4458// Check long long types.
4459#define BIG64 18446744073709551615ull
4460#define BIG32 4294967295ul
4461#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4462#if !BIG_OK
4463 your preprocessor is broken;
4464#endif
4465#if BIG_OK
4466#else
4467 your preprocessor is broken;
4468#endif
4469static long long int bignum = -9223372036854775807LL;
4470static unsigned long long int ubignum = BIG64;
4471
4472struct incomplete_array
c971b7fa 4473{
7a6dbc2f
SDJ
4474 int datasize;
4475 double data[];
4476};
4477
4478struct named_init {
4479 int number;
4480 const wchar_t *name;
4481 double average;
4482};
4483
4484typedef const char *ccp;
4485
4486static inline int
4487test_restrict (ccp restrict text)
4488{
4489 // See if C++-style comments work.
4490 // Iterate through items via the restricted pointer.
4491 // Also check for declarations in for loops.
4492 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4493 continue;
4494 return 0;
c971b7fa
PA
4495}
4496
7a6dbc2f
SDJ
4497// Check varargs and va_copy.
4498static bool
4499test_varargs (const char *format, ...)
4500{
4501 va_list args;
4502 va_start (args, format);
4503 va_list args_copy;
4504 va_copy (args_copy, args);
c971b7fa 4505
7a6dbc2f
SDJ
4506 const char *str = "";
4507 int number = 0;
4508 float fnumber = 0;
4509
4510 while (*format)
4511 {
4512 switch (*format++)
4513 {
4514 case 's': // string
4515 str = va_arg (args_copy, const char *);
4516 break;
4517 case 'd': // int
4518 number = va_arg (args_copy, int);
4519 break;
4520 case 'f': // float
4521 fnumber = va_arg (args_copy, double);
4522 break;
4523 default:
4524 break;
4525 }
4526 }
4527 va_end (args_copy);
4528 va_end (args);
4529
4530 return *str && number && fnumber;
4531}
4532// Check _Alignas.
4533char _Alignas (double) aligned_as_double;
4534char _Alignas (0) no_special_alignment;
4535extern char aligned_as_int;
4536char _Alignas (0) _Alignas (int) aligned_as_int;
4537
4538// Check _Alignof.
4539enum
4540{
4541 int_alignment = _Alignof (int),
4542 int_array_alignment = _Alignof (int[100]),
4543 char_alignment = _Alignof (char)
4544};
4545_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
4546
4547// Check _Noreturn.
4548int _Noreturn does_not_return (void) { for (;;) continue; }
4549
4550// Check _Static_assert.
4551struct test_static_assert
4552{
4553 int x;
4554 _Static_assert (sizeof (int) <= sizeof (long int),
4555 "_Static_assert does not work in struct");
4556 long int y;
4557};
4558
4559// Check UTF-8 literals.
4560#define u8 syntax error!
4561char const utf8_literal[] = u8"happens to be ASCII" "another string";
4562
4563// Check duplicate typedefs.
4564typedef long *long_ptr;
4565typedef long int *long_ptr;
4566typedef long_ptr long_ptr;
4567
4568// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
4569struct anonymous
4570{
4571 union {
4572 struct { int i; int j; };
4573 struct { int k; long int l; } w;
4574 };
4575 int m;
4576} v1;
c971b7fa 4577
c971b7fa
PA
4578int
4579main ()
4580{
7a6dbc2f
SDJ
4581
4582 // Check bool.
4583 _Bool success = false;
4584
4585 // Check restrict.
4586 if (test_restrict ("String literal") == 0)
4587 success = true;
4588 char *restrict newvar = "Another string";
4589
4590 // Check varargs.
4591 success &= test_varargs ("s, d' f .", "string", 65, 34.234);
4592 test_varargs_macros ();
4593
4594 // Check flexible array members.
4595 struct incomplete_array *ia =
4596 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4597 ia->datasize = 10;
4598 for (int i = 0; i < ia->datasize; ++i)
4599 ia->data[i] = i * 1.234;
4600
4601 // Check named initializers.
4602 struct named_init ni = {
4603 .number = 34,
4604 .name = L"Test wide string",
4605 .average = 543.34343,
4606 };
4607
4608 ni.number = 58;
4609
4610 int dynamic_array[ni.number];
4611 dynamic_array[ni.number - 1] = 543;
4612
4613 // work around unused variable warnings
4614 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4615 || dynamic_array[ni.number - 1] != 543);
4616
4617 v1.i = 2;
4618 v1.w.k = 5;
4619 _Static_assert ((offsetof (struct anonymous, i)
4620 == offsetof (struct anonymous, w.k)),
4621 "Anonymous union alignment botch");
4622
c971b7fa
PA
4623 ;
4624 return 0;
4625}
4626_ACEOF
7a6dbc2f 4627for ac_arg in '' -std=gnu11
c971b7fa
PA
4628do
4629 CC="$ac_save_CC $ac_arg"
4630 if ac_fn_c_try_compile "$LINENO"; then :
7a6dbc2f 4631 ac_cv_prog_cc_c11=$ac_arg
c971b7fa
PA
4632fi
4633rm -f core conftest.err conftest.$ac_objext
7a6dbc2f 4634 test "x$ac_cv_prog_cc_c11" != "xno" && break
c971b7fa
PA
4635done
4636rm -f conftest.$ac_ext
4637CC=$ac_save_CC
4638
4639fi
4640# AC_CACHE_VAL
7a6dbc2f
SDJ
4641ac_prog_cc_stdc_options=
4642case "x$ac_cv_prog_cc_c11" in
c971b7fa
PA
4643 x)
4644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4645$as_echo "none needed" >&6; } ;;
4646 xno)
4647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4648$as_echo "unsupported" >&6; } ;;
4649 *)
7a6dbc2f
SDJ
4650 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c11"
4651 CC=$CC$ac_prog_cc_stdc_options
4652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
4653$as_echo "$ac_cv_prog_cc_c11" >&6; } ;;
c971b7fa 4654esac
7a6dbc2f
SDJ
4655if test "x$ac_cv_prog_cc_c11" != xno; then :
4656 ac_prog_cc_stdc=c11
4657 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
4658else
4659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
4660$as_echo_n "checking for $CC option to enable C99 features... " >&6; }
4661if ${ac_cv_prog_cc_c99+:} false; then :
4662 $as_echo_n "(cached) " >&6
4663else
4664 ac_cv_prog_cc_c99=no
4665ac_save_CC=$CC
4666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4667/* end confdefs.h. */
4668#include <stdarg.h>
4669#include <stdbool.h>
4670#include <stddef.h>
4671#include <stdlib.h>
4672#include <wchar.h>
4673#include <stdio.h>
c971b7fa 4674
7a6dbc2f
SDJ
4675// Check varargs macros. These examples are taken from C99 6.10.3.5.
4676#define debug(...) fprintf (stderr, __VA_ARGS__)
4677#define showlist(...) puts (#__VA_ARGS__)
4678#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4679static void
4680test_varargs_macros (void)
4681{
4682 int x = 1234;
4683 int y = 5678;
4684 debug ("Flag");
4685 debug ("X = %d\n", x);
4686 showlist (The first, second, and third items.);
4687 report (x>y, "x is %d but y is %d", x, y);
4688}
d0ac1c44 4689
7a6dbc2f
SDJ
4690// Check long long types.
4691#define BIG64 18446744073709551615ull
4692#define BIG32 4294967295ul
4693#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4694#if !BIG_OK
4695 your preprocessor is broken;
4696#endif
4697#if BIG_OK
4698#else
4699 your preprocessor is broken;
4700#endif
4701static long long int bignum = -9223372036854775807LL;
4702static unsigned long long int ubignum = BIG64;
d0ac1c44 4703
7a6dbc2f
SDJ
4704struct incomplete_array
4705{
4706 int datasize;
4707 double data[];
4708};
d0ac1c44 4709
7a6dbc2f
SDJ
4710struct named_init {
4711 int number;
4712 const wchar_t *name;
4713 double average;
4714};
d0ac1c44 4715
7a6dbc2f
SDJ
4716typedef const char *ccp;
4717
4718static inline int
4719test_restrict (ccp restrict text)
4720{
4721 // See if C++-style comments work.
4722 // Iterate through items via the restricted pointer.
4723 // Also check for declarations in for loops.
4724 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4725 continue;
4726 return 0;
4727}
4728
4729// Check varargs and va_copy.
4730static bool
4731test_varargs (const char *format, ...)
4732{
4733 va_list args;
4734 va_start (args, format);
4735 va_list args_copy;
4736 va_copy (args_copy, args);
4737
4738 const char *str = "";
4739 int number = 0;
4740 float fnumber = 0;
4741
4742 while (*format)
4743 {
4744 switch (*format++)
4745 {
4746 case 's': // string
4747 str = va_arg (args_copy, const char *);
4748 break;
4749 case 'd': // int
4750 number = va_arg (args_copy, int);
4751 break;
4752 case 'f': // float
4753 fnumber = va_arg (args_copy, double);
4754 break;
4755 default:
4756 break;
4757 }
4758 }
4759 va_end (args_copy);
4760 va_end (args);
4761
4762 return *str && number && fnumber;
4763}
4764int
4765main ()
4766{
4767
4768 // Check bool.
4769 _Bool success = false;
4770
4771 // Check restrict.
4772 if (test_restrict ("String literal") == 0)
4773 success = true;
4774 char *restrict newvar = "Another string";
4775
4776 // Check varargs.
4777 success &= test_varargs ("s, d' f .", "string", 65, 34.234);
4778 test_varargs_macros ();
4779
4780 // Check flexible array members.
4781 struct incomplete_array *ia =
4782 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4783 ia->datasize = 10;
4784 for (int i = 0; i < ia->datasize; ++i)
4785 ia->data[i] = i * 1.234;
4786
4787 // Check named initializers.
4788 struct named_init ni = {
4789 .number = 34,
4790 .name = L"Test wide string",
4791 .average = 543.34343,
4792 };
4793
4794 ni.number = 58;
4795
4796 int dynamic_array[ni.number];
4797 dynamic_array[ni.number - 1] = 543;
4798
4799 // work around unused variable warnings
4800 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4801 || dynamic_array[ni.number - 1] != 543);
4802
4803 ;
4804 return 0;
4805}
4806_ACEOF
4807for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99
4808do
4809 CC="$ac_save_CC $ac_arg"
4810 if ac_fn_c_try_compile "$LINENO"; then :
4811 ac_cv_prog_cc_c99=$ac_arg
4812fi
4813rm -f core conftest.err conftest.$ac_objext
4814 test "x$ac_cv_prog_cc_c99" != "xno" && break
4815done
4816rm -f conftest.$ac_ext
4817CC=$ac_save_CC
4818
4819fi
4820# AC_CACHE_VAL
4821ac_prog_cc_stdc_options=
4822case "x$ac_cv_prog_cc_c99" in
4823 x)
4824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4825$as_echo "none needed" >&6; } ;;
4826 xno)
4827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4828$as_echo "unsupported" >&6; } ;;
4829 *)
4830 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c99"
4831 CC=$CC$ac_prog_cc_stdc_options
4832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4833$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4834esac
4835if test "x$ac_cv_prog_cc_c99" != xno; then :
4836 ac_prog_cc_stdc=c99
4837 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
4838else
4839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
4840$as_echo_n "checking for $CC option to enable C89 features... " >&6; }
4841if ${ac_cv_prog_cc_c89+:} false; then :
d0ac1c44
SM
4842 $as_echo_n "(cached) " >&6
4843else
7a6dbc2f
SDJ
4844 ac_cv_prog_cc_c89=no
4845ac_save_CC=$CC
4846cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d0ac1c44 4847/* end confdefs.h. */
7a6dbc2f
SDJ
4848#include <stdarg.h>
4849#include <stdio.h>
4850struct stat;
4851/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4852struct buf { int x; };
4853FILE * (*rcsopen) (struct buf *, struct stat *, int);
4854static char *e (p, i)
4855 char **p;
4856 int i;
4857{
4858 return p[i];
4859}
4860static char *f (char * (*g) (char **, int), char **p, ...)
4861{
4862 char *s;
4863 va_list v;
4864 va_start (v,p);
4865 s = g (p, va_arg (v,int));
4866 va_end (v);
4867 return s;
4868}
4869
4870/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4871 function prototypes and stuff, but not '\xHH' hex character constants.
4872 These don't provoke an error unfortunately, instead are silently treated
4873 as 'x'. The following induces an error, until -std is added to get
4874 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4875 array size at least. It's necessary to write '\x00'==0 to get something
4876 that's true only with -std. */
4877int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4878
4879/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4880 inside strings and character constants. */
4881#define FOO(x) 'x'
4882int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
d0ac1c44 4883
7a6dbc2f
SDJ
4884int test (int i, double x);
4885struct s1 {int (*f) (int a);};
4886struct s2 {int (*f) (double a);};
4887int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4888int argc;
4889char **argv;
d0ac1c44
SM
4890int
4891main ()
4892{
7a6dbc2f 4893return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
d0ac1c44
SM
4894 ;
4895 return 0;
4896}
4897_ACEOF
7a6dbc2f
SDJ
4898for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4899 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4900do
4901 CC="$ac_save_CC $ac_arg"
4902 if ac_fn_c_try_compile "$LINENO"; then :
4903 ac_cv_prog_cc_c89=$ac_arg
d0ac1c44 4904fi
7a6dbc2f
SDJ
4905rm -f core conftest.err conftest.$ac_objext
4906 test "x$ac_cv_prog_cc_c89" != "xno" && break
4907done
4908rm -f conftest.$ac_ext
4909CC=$ac_save_CC
4910
4911fi
4912# AC_CACHE_VAL
4913ac_prog_cc_stdc_options=
4914case "x$ac_cv_prog_cc_c89" in
4915 x)
4916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4917$as_echo "none needed" >&6; } ;;
4918 xno)
4919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4920$as_echo "unsupported" >&6; } ;;
4921 *)
4922 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c89"
4923 CC=$CC$ac_prog_cc_stdc_options
4924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4925$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4926esac
4927if test "x$ac_cv_prog_cc_c89" != xno; then :
4928 ac_prog_cc_stdc=c89
4929 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
4930else
4931 ac_prog_cc_stdc=no
4932 ac_cv_prog_cc_stdc=no
4933fi
4934
4935fi
4936
4937fi
4938
d0ac1c44
SM
4939ac_ext=c
4940ac_cpp='$CPP $CPPFLAGS'
4941ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4942ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4943ac_compiler_gnu=$ac_cv_c_compiler_gnu
4944
4945
c971b7fa
PA
4946ac_ext=c
4947ac_cpp='$CPP $CPPFLAGS'
4948ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4949ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4950ac_compiler_gnu=$ac_cv_c_compiler_gnu
4951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4952$as_echo_n "checking how to run the C preprocessor... " >&6; }
4953# On Suns, sometimes $CPP names a directory.
4954if test -n "$CPP" && test -d "$CPP"; then
4955 CPP=
4956fi
4957if test -z "$CPP"; then
d0ac1c44 4958 if ${ac_cv_prog_CPP+:} false; then :
c971b7fa
PA
4959 $as_echo_n "(cached) " >&6
4960else
4961 # Double quotes because CPP needs to be expanded
4962 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4963 do
4964 ac_preproc_ok=false
4965for ac_c_preproc_warn_flag in '' yes
4966do
4967 # Use a header file that comes with gcc, so configuring glibc
4968 # with a fresh cross-compiler works.
4969 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4970 # <limits.h> exists even on freestanding compilers.
4971 # On the NeXT, cc -E runs the code through the compiler's parser,
4972 # not just through cpp. "Syntax error" is here to catch this case.
4973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4974/* end confdefs.h. */
4975#ifdef __STDC__
4976# include <limits.h>
4977#else
4978# include <assert.h>
4979#endif
4980 Syntax error
4981_ACEOF
4982if ac_fn_c_try_cpp "$LINENO"; then :
4983
4984else
4985 # Broken: fails on valid input.
4986continue
4987fi
d0ac1c44 4988rm -f conftest.err conftest.i conftest.$ac_ext
c971b7fa
PA
4989
4990 # OK, works on sane cases. Now check whether nonexistent headers
4991 # can be detected and how.
4992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4993/* end confdefs.h. */
4994#include <ac_nonexistent.h>
4995_ACEOF
4996if ac_fn_c_try_cpp "$LINENO"; then :
4997 # Broken: success on invalid input.
4998continue
4999else
5000 # Passes both tests.
5001ac_preproc_ok=:
5002break
5003fi
d0ac1c44 5004rm -f conftest.err conftest.i conftest.$ac_ext
c971b7fa
PA
5005
5006done
5007# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 5008rm -f conftest.i conftest.err conftest.$ac_ext
c971b7fa
PA
5009if $ac_preproc_ok; then :
5010 break
5011fi
5012
5013 done
5014 ac_cv_prog_CPP=$CPP
5015
5016fi
5017 CPP=$ac_cv_prog_CPP
5018else
5019 ac_cv_prog_CPP=$CPP
5020fi
5021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5022$as_echo "$CPP" >&6; }
5023ac_preproc_ok=false
5024for ac_c_preproc_warn_flag in '' yes
5025do
5026 # Use a header file that comes with gcc, so configuring glibc
5027 # with a fresh cross-compiler works.
5028 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5029 # <limits.h> exists even on freestanding compilers.
5030 # On the NeXT, cc -E runs the code through the compiler's parser,
5031 # not just through cpp. "Syntax error" is here to catch this case.
5032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5033/* end confdefs.h. */
5034#ifdef __STDC__
5035# include <limits.h>
5036#else
5037# include <assert.h>
5038#endif
5039 Syntax error
5040_ACEOF
5041if ac_fn_c_try_cpp "$LINENO"; then :
5042
5043else
5044 # Broken: fails on valid input.
5045continue
5046fi
d0ac1c44 5047rm -f conftest.err conftest.i conftest.$ac_ext
c971b7fa
PA
5048
5049 # OK, works on sane cases. Now check whether nonexistent headers
5050 # can be detected and how.
5051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5052/* end confdefs.h. */
5053#include <ac_nonexistent.h>
5054_ACEOF
5055if ac_fn_c_try_cpp "$LINENO"; then :
5056 # Broken: success on invalid input.
5057continue
5058else
5059 # Passes both tests.
5060ac_preproc_ok=:
5061break
5062fi
d0ac1c44 5063rm -f conftest.err conftest.i conftest.$ac_ext
c971b7fa
PA
5064
5065done
5066# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 5067rm -f conftest.i conftest.err conftest.$ac_ext
c971b7fa
PA
5068if $ac_preproc_ok; then :
5069
5070else
5071 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5072$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
5073as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5074See \`config.log' for more details" "$LINENO" 5; }
c971b7fa
PA
5075fi
5076
5077ac_ext=c
5078ac_cpp='$CPP $CPPFLAGS'
5079ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5080ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5081ac_compiler_gnu=$ac_cv_c_compiler_gnu
5082
5083
5084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5085$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 5086if ${ac_cv_path_GREP+:} false; then :
c971b7fa
PA
5087 $as_echo_n "(cached) " >&6
5088else
5089 if test -z "$GREP"; then
5090 ac_path_GREP_found=false
5091 # Loop through the user's path and test for each of PROGNAME-LIST
5092 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5093for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5094do
5095 IFS=$as_save_IFS
5096 test -z "$as_dir" && as_dir=.
5097 for ac_prog in grep ggrep; do
5098 for ac_exec_ext in '' $ac_executable_extensions; do
5099 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 5100 as_fn_executable_p "$ac_path_GREP" || continue
c971b7fa
PA
5101# Check for GNU ac_path_GREP and select it if it is found.
5102 # Check for GNU $ac_path_GREP
5103case `"$ac_path_GREP" --version 2>&1` in
5104*GNU*)
5105 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5106*)
5107 ac_count=0
5108 $as_echo_n 0123456789 >"conftest.in"
5109 while :
5110 do
5111 cat "conftest.in" "conftest.in" >"conftest.tmp"
5112 mv "conftest.tmp" "conftest.in"
5113 cp "conftest.in" "conftest.nl"
5114 $as_echo 'GREP' >> "conftest.nl"
5115 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5116 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5117 as_fn_arith $ac_count + 1 && ac_count=$as_val
5118 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5119 # Best one so far, save it but keep looking for a better one
5120 ac_cv_path_GREP="$ac_path_GREP"
5121 ac_path_GREP_max=$ac_count
5122 fi
5123 # 10*(2^10) chars as input seems more than enough
5124 test $ac_count -gt 10 && break
5125 done
5126 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5127esac
5128
5129 $ac_path_GREP_found && break 3
5130 done
5131 done
5132 done
5133IFS=$as_save_IFS
5134 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 5135 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
c971b7fa
PA
5136 fi
5137else
5138 ac_cv_path_GREP=$GREP
5139fi
5140
5141fi
5142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5143$as_echo "$ac_cv_path_GREP" >&6; }
5144 GREP="$ac_cv_path_GREP"
5145
5146
5147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5148$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 5149if ${ac_cv_path_EGREP+:} false; then :
c971b7fa
PA
5150 $as_echo_n "(cached) " >&6
5151else
5152 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5153 then ac_cv_path_EGREP="$GREP -E"
5154 else
5155 if test -z "$EGREP"; then
5156 ac_path_EGREP_found=false
5157 # Loop through the user's path and test for each of PROGNAME-LIST
5158 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5159for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5160do
5161 IFS=$as_save_IFS
5162 test -z "$as_dir" && as_dir=.
5163 for ac_prog in egrep; do
5164 for ac_exec_ext in '' $ac_executable_extensions; do
5165 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 5166 as_fn_executable_p "$ac_path_EGREP" || continue
c971b7fa
PA
5167# Check for GNU ac_path_EGREP and select it if it is found.
5168 # Check for GNU $ac_path_EGREP
5169case `"$ac_path_EGREP" --version 2>&1` in
5170*GNU*)
5171 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5172*)
5173 ac_count=0
5174 $as_echo_n 0123456789 >"conftest.in"
5175 while :
5176 do
5177 cat "conftest.in" "conftest.in" >"conftest.tmp"
5178 mv "conftest.tmp" "conftest.in"
5179 cp "conftest.in" "conftest.nl"
5180 $as_echo 'EGREP' >> "conftest.nl"
5181 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5182 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5183 as_fn_arith $ac_count + 1 && ac_count=$as_val
5184 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5185 # Best one so far, save it but keep looking for a better one
5186 ac_cv_path_EGREP="$ac_path_EGREP"
5187 ac_path_EGREP_max=$ac_count
5188 fi
5189 # 10*(2^10) chars as input seems more than enough
5190 test $ac_count -gt 10 && break
5191 done
5192 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5193esac
5194
5195 $ac_path_EGREP_found && break 3
5196 done
5197 done
5198 done
5199IFS=$as_save_IFS
5200 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 5201 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
c971b7fa
PA
5202 fi
5203else
5204 ac_cv_path_EGREP=$EGREP
5205fi
5206
5207 fi
5208fi
5209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5210$as_echo "$ac_cv_path_EGREP" >&6; }
5211 EGREP="$ac_cv_path_EGREP"
5212
5213
5214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5215$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 5216if ${ac_cv_header_stdc+:} false; then :
c971b7fa
PA
5217 $as_echo_n "(cached) " >&6
5218else
5219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5220/* end confdefs.h. */
5221#include <stdlib.h>
5222#include <stdarg.h>
5223#include <string.h>
5224#include <float.h>
5225
5226int
5227main ()
5228{
5229
5230 ;
5231 return 0;
5232}
5233_ACEOF
5234if ac_fn_c_try_compile "$LINENO"; then :
5235 ac_cv_header_stdc=yes
5236else
5237 ac_cv_header_stdc=no
5238fi
5239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5240
5241if test $ac_cv_header_stdc = yes; then
5242 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5244/* end confdefs.h. */
5245#include <string.h>
5246
5247_ACEOF
5248if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5249 $EGREP "memchr" >/dev/null 2>&1; then :
5250
5251else
5252 ac_cv_header_stdc=no
5253fi
5254rm -f conftest*
5255
5256fi
5257
5258if test $ac_cv_header_stdc = yes; then
5259 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5261/* end confdefs.h. */
5262#include <stdlib.h>
5263
5264_ACEOF
5265if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5266 $EGREP "free" >/dev/null 2>&1; then :
5267
5268else
5269 ac_cv_header_stdc=no
5270fi
5271rm -f conftest*
5272
5273fi
5274
5275if test $ac_cv_header_stdc = yes; then
5276 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5277 if test "$cross_compiling" = yes; then :
5278 :
5279else
5280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5281/* end confdefs.h. */
5282#include <ctype.h>
5283#include <stdlib.h>
5284#if ((' ' & 0x0FF) == 0x020)
5285# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5286# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5287#else
5288# define ISLOWER(c) \
5289 (('a' <= (c) && (c) <= 'i') \
5290 || ('j' <= (c) && (c) <= 'r') \
5291 || ('s' <= (c) && (c) <= 'z'))
5292# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5293#endif
5294
5295#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5296int
5297main ()
5298{
5299 int i;
5300 for (i = 0; i < 256; i++)
5301 if (XOR (islower (i), ISLOWER (i))
5302 || toupper (i) != TOUPPER (i))
5303 return 2;
5304 return 0;
5305}
5306_ACEOF
5307if ac_fn_c_try_run "$LINENO"; then :
5308
5309else
5310 ac_cv_header_stdc=no
5311fi
5312rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5313 conftest.$ac_objext conftest.beam conftest.$ac_ext
5314fi
5315
5316fi
5317fi
5318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5319$as_echo "$ac_cv_header_stdc" >&6; }
5320if test $ac_cv_header_stdc = yes; then
5321
5322$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5323
5324fi
5325
5326# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5327for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5328 inttypes.h stdint.h unistd.h
5329do :
5330 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5331ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5332"
d0ac1c44 5333if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
c971b7fa
PA
5334 cat >>confdefs.h <<_ACEOF
5335#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5336_ACEOF
5337
5338fi
5339
5340done
5341
5342
5343
c971b7fa 5344 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 5345if test "x$ac_cv_header_minix_config_h" = xyes; then :
c971b7fa
PA
5346 MINIX=yes
5347else
5348 MINIX=
5349fi
5350
5351
5352 if test "$MINIX" = yes; then
5353
5354$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5355
5356
5357$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5358
5359
5360$as_echo "#define _MINIX 1" >>confdefs.h
5361
c971b7fa 5362
4a626d0a 5363$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
c971b7fa 5364
4a626d0a 5365 fi
c971b7fa
PA
5366
5367
5368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5369$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 5370if ${ac_cv_safe_to_define___extensions__+:} false; then :
c971b7fa
PA
5371 $as_echo_n "(cached) " >&6
5372else
5373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5374/* end confdefs.h. */
5375
5376# define __EXTENSIONS__ 1
5377 $ac_includes_default
5378int
5379main ()
5380{
5381
5382 ;
5383 return 0;
5384}
5385_ACEOF
5386if ac_fn_c_try_compile "$LINENO"; then :
5387 ac_cv_safe_to_define___extensions__=yes
5388else
5389 ac_cv_safe_to_define___extensions__=no
5390fi
5391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5392fi
5393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5394$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5395 test $ac_cv_safe_to_define___extensions__ = yes &&
5396 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5397
5398 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5399
5400 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
5401
5402 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5403
7a6dbc2f
SDJ
5404 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
5405
5406 $as_echo "#define _OPENBSD_SOURCE 1" >>confdefs.h
5407
c971b7fa
PA
5408 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5409
49e4877c
PA
5410 $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
5411
5412 $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
5413
5414 $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
5415
5416 $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
5417
5418 $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
5419
5420 $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
5421
5422 $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
5423
c971b7fa
PA
5424 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5425
4a626d0a
PA
5426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
5427$as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
d0ac1c44 5428if ${ac_cv_should_define__xopen_source+:} false; then :
4a626d0a
PA
5429 $as_echo_n "(cached) " >&6
5430else
5431 ac_cv_should_define__xopen_source=no
5432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5433/* end confdefs.h. */
5434
5435 #include <wchar.h>
5436 mbstate_t x;
5437int
5438main ()
5439{
5440
5441 ;
5442 return 0;
5443}
5444_ACEOF
5445if ac_fn_c_try_compile "$LINENO"; then :
5446
5447else
5448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5449/* end confdefs.h. */
5450
5451 #define _XOPEN_SOURCE 500
5452 #include <wchar.h>
5453 mbstate_t x;
5454int
5455main ()
5456{
5457
5458 ;
5459 return 0;
5460}
5461_ACEOF
5462if ac_fn_c_try_compile "$LINENO"; then :
5463 ac_cv_should_define__xopen_source=yes
5464fi
d0ac1c44
SM
5465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5466fi
5467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5468fi
5469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
5470$as_echo "$ac_cv_should_define__xopen_source" >&6; }
5471 test $ac_cv_should_define__xopen_source = yes &&
5472 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
5473
7a6dbc2f
SDJ
5474 $as_echo "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
5475
d0ac1c44
SM
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
5487$as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
5488if ${gl_cv_c_amsterdam_compiler+:} false; then :
5489 $as_echo_n "(cached) " >&6
5490else
5491
5492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5493/* end confdefs.h. */
5494
5495#ifdef __ACK__
5496Amsterdam
5497#endif
5498
5499_ACEOF
5500if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5501 $EGREP "Amsterdam" >/dev/null 2>&1; then :
5502 gl_cv_c_amsterdam_compiler=yes
5503else
5504 gl_cv_c_amsterdam_compiler=no
5505fi
5506rm -f conftest*
5507
5508
5509fi
5510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
5511$as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
5512
5513 if test $gl_cv_c_amsterdam_compiler = yes; then
5514 if test -z "$AR"; then
5515 AR='cc -c.a'
5516 fi
5517 if test -z "$ARFLAGS"; then
5518 ARFLAGS='-o'
5519 fi
5520 else
7a6dbc2f
SDJ
5521 :
5522 fi
5523
5524 if test -n "$ac_tool_prefix"; then
5525 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5526set dummy ${ac_tool_prefix}ar; ac_word=$2
d0ac1c44
SM
5527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5528$as_echo_n "checking for $ac_word... " >&6; }
5529if ${ac_cv_prog_AR+:} false; then :
5530 $as_echo_n "(cached) " >&6
5531else
5532 if test -n "$AR"; then
5533 ac_cv_prog_AR="$AR" # Let the user override the test.
5534else
5535as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5536for as_dir in $PATH
5537do
5538 IFS=$as_save_IFS
5539 test -z "$as_dir" && as_dir=.
5540 for ac_exec_ext in '' $ac_executable_extensions; do
5541 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7a6dbc2f 5542 ac_cv_prog_AR="${ac_tool_prefix}ar"
d0ac1c44
SM
5543 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5544 break 2
5545 fi
5546done
5547 done
5548IFS=$as_save_IFS
5549
5550fi
4a626d0a 5551fi
d0ac1c44
SM
5552AR=$ac_cv_prog_AR
5553if test -n "$AR"; then
5554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5555$as_echo "$AR" >&6; }
5556else
5557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5558$as_echo "no" >&6; }
4a626d0a 5559fi
c971b7fa 5560
49e4877c 5561
d0ac1c44 5562fi
7a6dbc2f 5563if test -z "$ac_cv_prog_AR"; then
d0ac1c44 5564 ac_ct_AR=$AR
7a6dbc2f
SDJ
5565 # Extract the first word of "ar", so it can be a program name with args.
5566set dummy ar; ac_word=$2
d0ac1c44
SM
5567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5568$as_echo_n "checking for $ac_word... " >&6; }
5569if ${ac_cv_prog_ac_ct_AR+:} false; then :
5570 $as_echo_n "(cached) " >&6
5571else
5572 if test -n "$ac_ct_AR"; then
5573 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5574else
5575as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5576for as_dir in $PATH
5577do
5578 IFS=$as_save_IFS
5579 test -z "$as_dir" && as_dir=.
5580 for ac_exec_ext in '' $ac_executable_extensions; do
5581 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7a6dbc2f 5582 ac_cv_prog_ac_ct_AR="ar"
d0ac1c44
SM
5583 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5584 break 2
5585 fi
5586done
5587 done
5588IFS=$as_save_IFS
49e4877c 5589
d0ac1c44
SM
5590fi
5591fi
5592ac_ct_AR=$ac_cv_prog_ac_ct_AR
5593if test -n "$ac_ct_AR"; then
5594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5595$as_echo "$ac_ct_AR" >&6; }
5596else
5597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5598$as_echo "no" >&6; }
5599fi
49e4877c 5600
d0ac1c44 5601 if test "x$ac_ct_AR" = x; then
7a6dbc2f 5602 AR="ar"
d0ac1c44
SM
5603 else
5604 case $cross_compiling:$ac_tool_warned in
5605yes:)
5606{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5607$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5608ac_tool_warned=yes ;;
5609esac
5610 AR=$ac_ct_AR
5611 fi
c971b7fa 5612else
7a6dbc2f 5613 AR="$ac_cv_prog_AR"
d0ac1c44 5614fi
c971b7fa 5615
7a6dbc2f
SDJ
5616 if test -z "$ARFLAGS"; then
5617 ARFLAGS='cr'
5618 fi
c971b7fa
PA
5619
5620
49e4877c 5621
c971b7fa
PA
5622 if test -z "$RANLIB"; then
5623 if test $gl_cv_c_amsterdam_compiler = yes; then
5624 RANLIB=':'
5625 else
5626 if test -n "$ac_tool_prefix"; then
5627 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5628set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5630$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5631if ${ac_cv_prog_RANLIB+:} false; then :
c971b7fa
PA
5632 $as_echo_n "(cached) " >&6
5633else
5634 if test -n "$RANLIB"; then
5635 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5636else
5637as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5638for as_dir in $PATH
5639do
5640 IFS=$as_save_IFS
5641 test -z "$as_dir" && as_dir=.
5642 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5643 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
5644 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5645 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5646 break 2
5647 fi
5648done
5649 done
5650IFS=$as_save_IFS
5651
5652fi
5653fi
5654RANLIB=$ac_cv_prog_RANLIB
5655if test -n "$RANLIB"; then
5656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5657$as_echo "$RANLIB" >&6; }
5658else
5659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5660$as_echo "no" >&6; }
5661fi
5662
5663
5664fi
5665if test -z "$ac_cv_prog_RANLIB"; then
5666 ac_ct_RANLIB=$RANLIB
5667 # Extract the first word of "ranlib", so it can be a program name with args.
5668set dummy ranlib; ac_word=$2
5669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5670$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5671if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
c971b7fa
PA
5672 $as_echo_n "(cached) " >&6
5673else
5674 if test -n "$ac_ct_RANLIB"; then
5675 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5676else
5677as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5678for as_dir in $PATH
5679do
5680 IFS=$as_save_IFS
5681 test -z "$as_dir" && as_dir=.
5682 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5683 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
5684 ac_cv_prog_ac_ct_RANLIB="ranlib"
5685 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5686 break 2
5687 fi
5688done
5689 done
5690IFS=$as_save_IFS
5691
5692fi
5693fi
5694ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5695if test -n "$ac_ct_RANLIB"; then
5696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5697$as_echo "$ac_ct_RANLIB" >&6; }
5698else
5699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5700$as_echo "no" >&6; }
5701fi
5702
5703 if test "x$ac_ct_RANLIB" = x; then
5704 RANLIB=":"
5705 else
5706 case $cross_compiling:$ac_tool_warned in
5707yes:)
5708{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5709$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5710ac_tool_warned=yes ;;
5711esac
5712 RANLIB=$ac_ct_RANLIB
5713 fi
5714else
5715 RANLIB="$ac_cv_prog_RANLIB"
5716fi
5717
5718 fi
5719 fi
5720
5721
7a6dbc2f
SDJ
5722
5723ac_aux_dir=
5724for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
5725 if test -f "$ac_dir/install-sh"; then
5726 ac_aux_dir=$ac_dir
5727 ac_install_sh="$ac_aux_dir/install-sh -c"
5728 break
5729 elif test -f "$ac_dir/install.sh"; then
5730 ac_aux_dir=$ac_dir
5731 ac_install_sh="$ac_aux_dir/install.sh -c"
5732 break
5733 elif test -f "$ac_dir/shtool"; then
5734 ac_aux_dir=$ac_dir
5735 ac_install_sh="$ac_aux_dir/shtool install -c"
5736 break
5737 fi
5738done
5739if test -z "$ac_aux_dir"; then
5740 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
5741fi
5742
5743# These three variables are undocumented and unsupported,
5744# and are intended to be withdrawn in a future Autoconf release.
5745# They can cause serious problems if a builder's source tree is in a directory
5746# whose full name contains unusual characters.
5747ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5748ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5749ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5750
5751
4a626d0a
PA
5752# Make sure we can run config.sub.
5753$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 5754 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4a626d0a
PA
5755
5756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5757$as_echo_n "checking build system type... " >&6; }
d0ac1c44 5758if ${ac_cv_build+:} false; then :
4a626d0a
PA
5759 $as_echo_n "(cached) " >&6
5760else
5761 ac_build_alias=$build_alias
5762test "x$ac_build_alias" = x &&
5763 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5764test "x$ac_build_alias" = x &&
d0ac1c44 5765 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4a626d0a 5766ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 5767 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4a626d0a
PA
5768
5769fi
5770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5771$as_echo "$ac_cv_build" >&6; }
5772case $ac_cv_build in
5773*-*-*) ;;
d0ac1c44 5774*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4a626d0a
PA
5775esac
5776build=$ac_cv_build
5777ac_save_IFS=$IFS; IFS='-'
5778set x $ac_cv_build
5779shift
5780build_cpu=$1
5781build_vendor=$2
5782shift; shift
5783# Remember, the first character of IFS is used to create $*,
5784# except with old shells:
5785build_os=$*
5786IFS=$ac_save_IFS
5787case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5788
5789
5790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5791$as_echo_n "checking host system type... " >&6; }
d0ac1c44 5792if ${ac_cv_host+:} false; then :
4a626d0a
PA
5793 $as_echo_n "(cached) " >&6
5794else
5795 if test "x$host_alias" = x; then
5796 ac_cv_host=$ac_cv_build
5797else
5798 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 5799 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4a626d0a
PA
5800fi
5801
5802fi
5803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5804$as_echo "$ac_cv_host" >&6; }
5805case $ac_cv_host in
5806*-*-*) ;;
d0ac1c44 5807*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4a626d0a
PA
5808esac
5809host=$ac_cv_host
5810ac_save_IFS=$IFS; IFS='-'
5811set x $ac_cv_host
5812shift
5813host_cpu=$1
5814host_vendor=$2
5815shift; shift
5816# Remember, the first character of IFS is used to create $*,
5817# except with old shells:
5818host_os=$*
5819IFS=$ac_save_IFS
5820case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5821
5822
c971b7fa
PA
5823
5824
88b48903
WN
5825
5826 # IEEE behaviour is the default on all CPUs except Alpha and SH
5827 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
5828 # and the GCC 4.1.2 manual).
5829 case "$host_cpu" in
5830 alpha*)
5831 # On Alpha systems, a compiler option provides the behaviour.
5832 # See the ieee(3) manual page, also available at
7a6dbc2f 5833 # <https://backdrift.org/man/tru64/man3/ieee.3.html>
88b48903
WN
5834 if test -n "$GCC"; then
5835 # GCC has the option -mieee.
5836 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
5837 CPPFLAGS="$CPPFLAGS -mieee"
5838 else
5839 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
5840 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
5841 CPPFLAGS="$CPPFLAGS -ieee"
5842 fi
5843 ;;
5844 sh*)
5845 if test -n "$GCC"; then
5846 # GCC has the option -mieee.
5847 CPPFLAGS="$CPPFLAGS -mieee"
5848 fi
5849 ;;
5850 esac
5851
2196f55f
YQ
5852# Check whether --enable-largefile was given.
5853if test "${enable_largefile+set}" = set; then :
5854 enableval=$enable_largefile;
5855fi
5856
5857if test "$enable_largefile" != no; then
5858
5859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5860$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 5861if ${ac_cv_sys_largefile_CC+:} false; then :
2196f55f
YQ
5862 $as_echo_n "(cached) " >&6
5863else
5864 ac_cv_sys_largefile_CC=no
5865 if test "$GCC" != yes; then
5866 ac_save_CC=$CC
5867 while :; do
5868 # IRIX 6.2 and later do not support large files by default,
5869 # so use the C compiler's -n32 option if that helps.
5870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5871/* end confdefs.h. */
5872#include <sys/types.h>
5873 /* Check that off_t can represent 2**63 - 1 correctly.
5874 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5875 since some C++ compilers masquerading as C compilers
5876 incorrectly reject 9223372036854775807. */
5877#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5878 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5879 && LARGE_OFF_T % 2147483647 == 1)
5880 ? 1 : -1];
5881int
5882main ()
5883{
5884
5885 ;
5886 return 0;
5887}
5888_ACEOF
5889 if ac_fn_c_try_compile "$LINENO"; then :
5890 break
5891fi
5892rm -f core conftest.err conftest.$ac_objext
5893 CC="$CC -n32"
5894 if ac_fn_c_try_compile "$LINENO"; then :
5895 ac_cv_sys_largefile_CC=' -n32'; break
5896fi
5897rm -f core conftest.err conftest.$ac_objext
5898 break
5899 done
5900 CC=$ac_save_CC
5901 rm -f conftest.$ac_ext
5902 fi
5903fi
5904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5905$as_echo "$ac_cv_sys_largefile_CC" >&6; }
5906 if test "$ac_cv_sys_largefile_CC" != no; then
5907 CC=$CC$ac_cv_sys_largefile_CC
5908 fi
5909
5910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5911$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 5912if ${ac_cv_sys_file_offset_bits+:} false; then :
2196f55f
YQ
5913 $as_echo_n "(cached) " >&6
5914else
5915 while :; do
5916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5917/* end confdefs.h. */
5918#include <sys/types.h>
5919 /* Check that off_t can represent 2**63 - 1 correctly.
5920 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5921 since some C++ compilers masquerading as C compilers
5922 incorrectly reject 9223372036854775807. */
5923#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5924 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5925 && LARGE_OFF_T % 2147483647 == 1)
5926 ? 1 : -1];
5927int
5928main ()
5929{
5930
5931 ;
5932 return 0;
5933}
5934_ACEOF
5935if ac_fn_c_try_compile "$LINENO"; then :
5936 ac_cv_sys_file_offset_bits=no; break
5937fi
5938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5940/* end confdefs.h. */
5941#define _FILE_OFFSET_BITS 64
5942#include <sys/types.h>
5943 /* Check that off_t can represent 2**63 - 1 correctly.
5944 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5945 since some C++ compilers masquerading as C compilers
5946 incorrectly reject 9223372036854775807. */
5947#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5948 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5949 && LARGE_OFF_T % 2147483647 == 1)
5950 ? 1 : -1];
5951int
5952main ()
5953{
5954
5955 ;
5956 return 0;
5957}
5958_ACEOF
5959if ac_fn_c_try_compile "$LINENO"; then :
5960 ac_cv_sys_file_offset_bits=64; break
5961fi
5962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5963 ac_cv_sys_file_offset_bits=unknown
5964 break
5965done
5966fi
5967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5968$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5969case $ac_cv_sys_file_offset_bits in #(
5970 no | unknown) ;;
5971 *)
5972cat >>confdefs.h <<_ACEOF
5973#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5974_ACEOF
5975;;
5976esac
5977rm -rf conftest*
5978 if test $ac_cv_sys_file_offset_bits = unknown; then
5979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5980$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 5981if ${ac_cv_sys_large_files+:} false; then :
2196f55f
YQ
5982 $as_echo_n "(cached) " >&6
5983else
5984 while :; do
5985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5986/* end confdefs.h. */
5987#include <sys/types.h>
5988 /* Check that off_t can represent 2**63 - 1 correctly.
5989 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5990 since some C++ compilers masquerading as C compilers
5991 incorrectly reject 9223372036854775807. */
5992#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5993 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5994 && LARGE_OFF_T % 2147483647 == 1)
5995 ? 1 : -1];
5996int
5997main ()
5998{
5999
6000 ;
6001 return 0;
6002}
6003_ACEOF
6004if ac_fn_c_try_compile "$LINENO"; then :
6005 ac_cv_sys_large_files=no; break
6006fi
6007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6009/* end confdefs.h. */
6010#define _LARGE_FILES 1
6011#include <sys/types.h>
6012 /* Check that off_t can represent 2**63 - 1 correctly.
6013 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6014 since some C++ compilers masquerading as C compilers
6015 incorrectly reject 9223372036854775807. */
6016#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6017 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6018 && LARGE_OFF_T % 2147483647 == 1)
6019 ? 1 : -1];
6020int
6021main ()
6022{
6023
6024 ;
6025 return 0;
6026}
6027_ACEOF
6028if ac_fn_c_try_compile "$LINENO"; then :
6029 ac_cv_sys_large_files=1; break
6030fi
6031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6032 ac_cv_sys_large_files=unknown
6033 break
6034done
6035fi
6036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6037$as_echo "$ac_cv_sys_large_files" >&6; }
6038case $ac_cv_sys_large_files in #(
6039 no | unknown) ;;
6040 *)
6041cat >>confdefs.h <<_ACEOF
6042#define _LARGE_FILES $ac_cv_sys_large_files
6043_ACEOF
6044;;
6045esac
6046rm -rf conftest*
6047 fi
6048
6049
4a626d0a
PA
6050$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6051
2196f55f
YQ
6052fi
6053
88b48903
WN
6054
6055
49e4877c
PA
6056 # Pre-early section.
6057
6058
6059
7a6dbc2f 6060
4a626d0a 6061 # Code from module absolute-header:
8690e634
JK
6062 # Code from module alloca:
6063 # Code from module alloca-opt:
6ec2e0f5
SDJ
6064 # Code from module assure:
6065 # Code from module at-internal:
7a6dbc2f
SDJ
6066 # Code from module builtin-expect:
6067 # Code from module c99:
98399780 6068 # Code from module canonicalize-lgpl:
6a29c58e 6069 # Code from module chdir:
6ec2e0f5
SDJ
6070 # Code from module chdir-long:
6071 # Code from module cloexec:
6072 # Code from module close:
6073 # Code from module closedir:
6ec2e0f5
SDJ
6074 # Code from module d-ino:
6075 # Code from module d-type:
e26b6bb0 6076 # Code from module dirent:
18848e28 6077 # Code from module dirfd:
6a29c58e 6078 # Code from module dirname-lgpl:
2196f55f 6079 # Code from module dosname:
6a29c58e 6080 # Code from module double-slash-root:
6ec2e0f5
SDJ
6081 # Code from module dup:
6082 # Code from module dup2:
3d99e817 6083 # Code from module environ:
18848e28 6084 # Code from module errno:
6ec2e0f5
SDJ
6085 # Code from module error:
6086 # Code from module exitfail:
c971b7fa 6087 # Code from module extensions:
a512b375 6088 # Code from module extern-inline:
6ec2e0f5
SDJ
6089 # Code from module fchdir:
6090 # Code from module fcntl:
6091 # Code from module fcntl-h:
6092 # Code from module fd-hook:
7a6dbc2f 6093 # Code from module fd-safer-flag:
6ec2e0f5
SDJ
6094 # Code from module fdopendir:
6095 # Code from module filename:
6096 # Code from module filenamecat-lgpl:
49e4877c 6097 # Code from module flexmember:
88b48903 6098 # Code from module float:
8690e634
JK
6099 # Code from module fnmatch:
6100 # Code from module fnmatch-gnu:
7a6dbc2f 6101 # Code from module fnmatch-h:
88b48903
WN
6102 # Code from module fpieee:
6103
6104 # Code from module fpucw:
6105 # Code from module frexp:
6106 # Code from module frexpl:
6ec2e0f5
SDJ
6107 # Code from module fstat:
6108 # Code from module fstatat:
6109 # Code from module getcwd:
6110 # Code from module getcwd-lgpl:
6111 # Code from module getdtablesize:
6112 # Code from module getlogin_r:
6113 # Code from module getprogname:
6114 # Code from module gettext-h:
4a626d0a 6115 # Code from module gettimeofday:
6ec2e0f5 6116 # Code from module glob:
7a6dbc2f 6117 # Code from module glob-h:
49e4877c 6118 # Code from module hard-locale:
c971b7fa 6119 # Code from module include_next:
6ec2e0f5 6120 # Code from module intprops:
c971b7fa
PA
6121 # Code from module inttypes:
6122 # Code from module inttypes-incomplete:
88b48903
WN
6123 # Code from module isnand-nolibm:
6124 # Code from module isnanl-nolibm:
2196f55f
YQ
6125 # Code from module largefile:
6126
7a6dbc2f 6127 # Code from module libc-config:
49e4877c 6128 # Code from module limits-h:
8690e634 6129 # Code from module localcharset:
7a6dbc2f 6130 # Code from module localtime-buffer:
f45c62c4 6131 # Code from module lstat:
6a29c58e 6132 # Code from module malloc-posix:
98399780 6133 # Code from module malloca:
88b48903 6134 # Code from module math:
8690e634
JK
6135 # Code from module mbrtowc:
6136 # Code from module mbsinit:
6137 # Code from module mbsrtowcs:
c971b7fa
PA
6138 # Code from module memchr:
6139 # Code from module memmem:
6140 # Code from module memmem-simple:
6ec2e0f5
SDJ
6141 # Code from module mempcpy:
6142 # Code from module memrchr:
8a99096f 6143 # Code from module mkdir:
2d8adcbd 6144 # Code from module mkstemp:
6ec2e0f5
SDJ
6145 # Code from module msvc-inval:
6146 # Code from module msvc-nothrow:
c971b7fa 6147 # Code from module multiarch:
98399780 6148 # Code from module nocrash:
6ec2e0f5
SDJ
6149 # Code from module open:
6150 # Code from module openat:
6151 # Code from module openat-die:
6152 # Code from module openat-h:
6153 # Code from module opendir:
38ec2207 6154 # Code from module pathmax:
8424cc97 6155 # Code from module rawmemchr:
6ec2e0f5 6156 # Code from module readdir:
2196f55f 6157 # Code from module readlink:
6ec2e0f5 6158 # Code from module realloc-posix:
6a29c58e 6159 # Code from module rename:
6ec2e0f5 6160 # Code from module rewinddir:
6a29c58e
YQ
6161 # Code from module rmdir:
6162 # Code from module same-inode:
6ec2e0f5 6163 # Code from module save-cwd:
7a6dbc2f 6164 # Code from module scratch_buffer:
3d99e817 6165 # Code from module setenv:
0750520d 6166 # Code from module signal-h:
98399780 6167 # Code from module snippet/_Noreturn:
c971b7fa
PA
6168 # Code from module snippet/arg-nonnull:
6169 # Code from module snippet/c++defs:
6170 # Code from module snippet/warn-on-use:
8839a007 6171 # Code from module ssize_t:
2196f55f 6172 # Code from module stat:
7a6dbc2f
SDJ
6173 # Code from module stat-time:
6174 # Code from module std-gnu11:
8690e634 6175 # Code from module stdbool:
c971b7fa
PA
6176 # Code from module stddef:
6177 # Code from module stdint:
6a29c58e 6178 # Code from module stdio:
98399780 6179 # Code from module stdlib:
8424cc97 6180 # Code from module strchrnul:
6ec2e0f5 6181 # Code from module strdup-posix:
8690e634 6182 # Code from module streq:
6ec2e0f5
SDJ
6183 # Code from module strerror:
6184 # Code from module strerror-override:
c971b7fa 6185 # Code from module string:
8690e634 6186 # Code from module strnlen1:
63ce7108
TT
6187 # Code from module strstr:
6188 # Code from module strstr-simple:
421693b0 6189 # Code from module strtok_r:
09607c9e 6190 # Code from module sys_stat:
4a626d0a 6191 # Code from module sys_time:
8839a007 6192 # Code from module sys_types:
2d8adcbd 6193 # Code from module tempname:
09607c9e 6194 # Code from module time:
8839a007 6195 # Code from module unistd:
6ec2e0f5 6196 # Code from module unistd-safer:
3d99e817 6197 # Code from module unsetenv:
c971b7fa 6198 # Code from module update-copyright:
8690e634
JK
6199 # Code from module verify:
6200 # Code from module wchar:
6201 # Code from module wctype-h:
7a6dbc2f 6202 # Code from module xalloc-oversized:
c971b7fa 6203
c971b7fa 6204
7a6dbc2f 6205am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
c971b7fa
PA
6206
6207
7a6dbc2f
SDJ
6208ac_aux_dir=
6209for ac_dir in ../.. "$srcdir"/../..; do
6210 if test -f "$ac_dir/install-sh"; then
6211 ac_aux_dir=$ac_dir
6212 ac_install_sh="$ac_aux_dir/install-sh -c"
6213 break
6214 elif test -f "$ac_dir/install.sh"; then
6215 ac_aux_dir=$ac_dir
6216 ac_install_sh="$ac_aux_dir/install.sh -c"
6217 break
6218 elif test -f "$ac_dir/shtool"; then
6219 ac_aux_dir=$ac_dir
6220 ac_install_sh="$ac_aux_dir/shtool install -c"
6221 break
c971b7fa
PA
6222 fi
6223done
7a6dbc2f
SDJ
6224if test -z "$ac_aux_dir"; then
6225 as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../.. \"$srcdir\"/../.." "$LINENO" 5
c971b7fa
PA
6226fi
6227
7a6dbc2f
SDJ
6228# These three variables are undocumented and unsupported,
6229# and are intended to be withdrawn in a future Autoconf release.
6230# They can cause serious problems if a builder's source tree is in a directory
6231# whose full name contains unusual characters.
6232ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
6233ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
6234ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
c971b7fa 6235
7a6dbc2f
SDJ
6236
6237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6238$as_echo_n "checking target system type... " >&6; }
6239if ${ac_cv_target+:} false; then :
c971b7fa
PA
6240 $as_echo_n "(cached) " >&6
6241else
7a6dbc2f
SDJ
6242 if test "x$target_alias" = x; then
6243 ac_cv_target=$ac_cv_host
c971b7fa 6244else
7a6dbc2f
SDJ
6245 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6246 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
c971b7fa 6247fi
c971b7fa 6248
c971b7fa 6249fi
7a6dbc2f
SDJ
6250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6251$as_echo "$ac_cv_target" >&6; }
6252case $ac_cv_target in
6253*-*-*) ;;
6254*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6255esac
6256target=$ac_cv_target
6257ac_save_IFS=$IFS; IFS='-'
6258set x $ac_cv_target
6259shift
6260target_cpu=$1
6261target_vendor=$2
6262shift; shift
6263# Remember, the first character of IFS is used to create $*,
6264# except with old shells:
6265target_os=$*
6266IFS=$ac_save_IFS
6267case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
c971b7fa
PA
6268
6269
7a6dbc2f
SDJ
6270# The aliases save the names the user supplied, while $host etc.
6271# will get canonicalized.
6272test -n "$target_alias" &&
6273 test "$program_prefix$program_suffix$program_transform_name" = \
6274 NONENONEs,x,x, &&
6275 program_prefix=${target_alias}-
c971b7fa 6276
c971b7fa
PA
6277
6278
c971b7fa 6279
c971b7fa
PA
6280
6281
c971b7fa 6282
7a6dbc2f
SDJ
6283 LIBC_FATAL_STDERR_=1
6284 export LIBC_FATAL_STDERR_
c971b7fa 6285
7a6dbc2f
SDJ
6286ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6287if test "x$ac_cv_type_size_t" = xyes; then :
c971b7fa 6288
7a6dbc2f 6289else
c971b7fa 6290
7a6dbc2f
SDJ
6291cat >>confdefs.h <<_ACEOF
6292#define size_t unsigned int
6293_ACEOF
c971b7fa 6294
7a6dbc2f 6295fi
c971b7fa 6296
7a6dbc2f
SDJ
6297# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6298# for constant arguments. Useless!
6299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
6300$as_echo_n "checking for working alloca.h... " >&6; }
6301if ${ac_cv_working_alloca_h+:} false; then :
c971b7fa
PA
6302 $as_echo_n "(cached) " >&6
6303else
6304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6305/* end confdefs.h. */
7a6dbc2f 6306#include <alloca.h>
c971b7fa
PA
6307int
6308main ()
6309{
7a6dbc2f
SDJ
6310char *p = (char *) alloca (2 * sizeof (int));
6311 if (p) return 0;
c971b7fa
PA
6312 ;
6313 return 0;
6314}
6315_ACEOF
7a6dbc2f
SDJ
6316if ac_fn_c_try_link "$LINENO"; then :
6317 ac_cv_working_alloca_h=yes
c971b7fa 6318else
7a6dbc2f 6319 ac_cv_working_alloca_h=no
c971b7fa 6320fi
7a6dbc2f
SDJ
6321rm -f core conftest.err conftest.$ac_objext \
6322 conftest$ac_exeext conftest.$ac_ext
c971b7fa 6323fi
7a6dbc2f
SDJ
6324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
6325$as_echo "$ac_cv_working_alloca_h" >&6; }
6326if test $ac_cv_working_alloca_h = yes; then
6327
6328$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
6329
c971b7fa 6330fi
7a6dbc2f
SDJ
6331
6332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
6333$as_echo_n "checking for alloca... " >&6; }
6334if ${ac_cv_func_alloca_works+:} false; then :
c971b7fa
PA
6335 $as_echo_n "(cached) " >&6
6336else
7a6dbc2f 6337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 6338/* end confdefs.h. */
7a6dbc2f
SDJ
6339#ifdef __GNUC__
6340# define alloca __builtin_alloca
6341#else
6342# ifdef _MSC_VER
6343# include <malloc.h>
6344# define alloca _alloca
6345# else
6346# ifdef HAVE_ALLOCA_H
6347# include <alloca.h>
6348# else
6349# ifdef _AIX
6350 #pragma alloca
6351# else
6352# ifndef alloca /* predefined by HP cc +Olibcalls */
6353void *alloca (size_t);
6354# endif
6355# endif
6356# endif
6357# endif
6358#endif
c971b7fa
PA
6359
6360int
6361main ()
6362{
7a6dbc2f
SDJ
6363char *p = (char *) alloca (1);
6364 if (p) return 0;
c971b7fa
PA
6365 ;
6366 return 0;
6367}
6368_ACEOF
7a6dbc2f
SDJ
6369if ac_fn_c_try_link "$LINENO"; then :
6370 ac_cv_func_alloca_works=yes
c971b7fa 6371else
7a6dbc2f
SDJ
6372 ac_cv_func_alloca_works=no
6373fi
6374rm -f core conftest.err conftest.$ac_objext \
6375 conftest$ac_exeext conftest.$ac_ext
6376fi
6377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
6378$as_echo "$ac_cv_func_alloca_works" >&6; }
c971b7fa 6379
7a6dbc2f 6380if test $ac_cv_func_alloca_works = yes; then
c971b7fa 6381
7a6dbc2f 6382$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c971b7fa
PA
6383
6384else
7a6dbc2f
SDJ
6385 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6386# that cause trouble. Some versions do not even contain alloca or
6387# contain a buggy version. If you still want to use their alloca,
6388# use ar to extract alloca.o from them instead of compiling alloca.c.
c971b7fa 6389
c971b7fa 6390
7a6dbc2f
SDJ
6391
6392
6393
6394ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
6395
6396$as_echo "#define C_ALLOCA 1" >>confdefs.h
6397
6398
6399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
6400$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
6401if ${ac_cv_os_cray+:} false; then :
6402 $as_echo_n "(cached) " >&6
6403else
6404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6405/* end confdefs.h. */
6406#if defined CRAY && ! defined CRAY2
6407webecray
6408#else
6409wenotbecray
6410#endif
6411
c971b7fa 6412_ACEOF
7a6dbc2f
SDJ
6413if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6414 $EGREP "webecray" >/dev/null 2>&1; then :
6415 ac_cv_os_cray=yes
6416else
6417 ac_cv_os_cray=no
c971b7fa 6418fi
7a6dbc2f
SDJ
6419rm -f conftest*
6420
c971b7fa 6421fi
7a6dbc2f
SDJ
6422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
6423$as_echo "$ac_cv_os_cray" >&6; }
6424if test $ac_cv_os_cray = yes; then
6425 for ac_func in _getb67 GETB67 getb67; do
6426 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6427ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6428if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6429
6430cat >>confdefs.h <<_ACEOF
6431#define CRAY_STACKSEG_END $ac_func
6432_ACEOF
6433
6434 break
c971b7fa 6435fi
7a6dbc2f
SDJ
6436
6437 done
c971b7fa 6438fi
7a6dbc2f
SDJ
6439
6440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
6441$as_echo_n "checking stack direction for C alloca... " >&6; }
6442if ${ac_cv_c_stack_direction+:} false; then :
c971b7fa
PA
6443 $as_echo_n "(cached) " >&6
6444else
7a6dbc2f
SDJ
6445 if test "$cross_compiling" = yes; then :
6446 ac_cv_c_stack_direction=0
6447else
6448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 6449/* end confdefs.h. */
7a6dbc2f
SDJ
6450$ac_includes_default
6451int
6452find_stack_direction (int *addr, int depth)
c971b7fa 6453{
7a6dbc2f
SDJ
6454 int dir, dummy = 0;
6455 if (! addr)
6456 addr = &dummy;
6457 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
6458 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
6459 return dir + dummy;
c971b7fa
PA
6460}
6461
c971b7fa 6462int
7a6dbc2f 6463main (int argc, char **argv)
c971b7fa 6464{
7a6dbc2f 6465 return find_stack_direction (0, argc + !argv + 20) < 0;
c971b7fa
PA
6466}
6467_ACEOF
7a6dbc2f
SDJ
6468if ac_fn_c_try_run "$LINENO"; then :
6469 ac_cv_c_stack_direction=1
6470else
6471 ac_cv_c_stack_direction=-1
c971b7fa 6472fi
7a6dbc2f
SDJ
6473rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6474 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 6475fi
c971b7fa
PA
6476
6477fi
7a6dbc2f
SDJ
6478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
6479$as_echo "$ac_cv_c_stack_direction" >&6; }
6480cat >>confdefs.h <<_ACEOF
6481#define STACK_DIRECTION $ac_cv_c_stack_direction
6482_ACEOF
c971b7fa 6483
d0ac1c44 6484
d0ac1c44 6485fi
d0ac1c44 6486
c971b7fa 6487
7a6dbc2f
SDJ
6488 GNULIB__EXIT=0;
6489 GNULIB_ATOLL=0;
6490 GNULIB_CALLOC_POSIX=0;
6491 GNULIB_CANONICALIZE_FILE_NAME=0;
6492 GNULIB_GETLOADAVG=0;
6493 GNULIB_GETSUBOPT=0;
6494 GNULIB_GRANTPT=0;
6495 GNULIB_MALLOC_POSIX=0;
6496 GNULIB_MBTOWC=0;
6497 GNULIB_MKDTEMP=0;
6498 GNULIB_MKOSTEMP=0;
6499 GNULIB_MKOSTEMPS=0;
6500 GNULIB_MKSTEMP=0;
6501 GNULIB_MKSTEMPS=0;
6502 GNULIB_POSIX_OPENPT=0;
6503 GNULIB_PTSNAME=0;
6504 GNULIB_PTSNAME_R=0;
6505 GNULIB_PUTENV=0;
6506 GNULIB_QSORT_R=0;
6507 GNULIB_RANDOM=0;
6508 GNULIB_RANDOM_R=0;
6509 GNULIB_REALLOCARRAY=0;
6510 GNULIB_REALLOC_POSIX=0;
6511 GNULIB_REALPATH=0;
6512 GNULIB_RPMATCH=0;
6513 GNULIB_SECURE_GETENV=0;
6514 GNULIB_SETENV=0;
6515 GNULIB_STRTOD=0;
6516 GNULIB_STRTOLL=0;
6517 GNULIB_STRTOULL=0;
6518 GNULIB_SYSTEM_POSIX=0;
6519 GNULIB_UNLOCKPT=0;
6520 GNULIB_UNSETENV=0;
6521 GNULIB_WCTOMB=0;
6522 HAVE__EXIT=1;
6523 HAVE_ATOLL=1;
6524 HAVE_CANONICALIZE_FILE_NAME=1;
6525 HAVE_DECL_GETLOADAVG=1;
6526 HAVE_GETSUBOPT=1;
6527 HAVE_GRANTPT=1;
6528 HAVE_DECL_INITSTATE=1;
6529 HAVE_MKDTEMP=1;
6530 HAVE_MKOSTEMP=1;
6531 HAVE_MKOSTEMPS=1;
6532 HAVE_MKSTEMP=1;
6533 HAVE_MKSTEMPS=1;
6534 HAVE_POSIX_OPENPT=1;
6535 HAVE_PTSNAME=1;
6536 HAVE_PTSNAME_R=1;
6537 HAVE_QSORT_R=1;
6538 HAVE_RANDOM=1;
6539 HAVE_RANDOM_H=1;
6540 HAVE_RANDOM_R=1;
6541 HAVE_REALLOCARRAY=1;
6542 HAVE_REALPATH=1;
6543 HAVE_RPMATCH=1;
6544 HAVE_SECURE_GETENV=1;
6545 HAVE_SETENV=1;
6546 HAVE_DECL_SETENV=1;
6547 HAVE_DECL_SETSTATE=1;
6548 HAVE_STRTOD=1;
6549 HAVE_STRTOLL=1;
6550 HAVE_STRTOULL=1;
6551 HAVE_STRUCT_RANDOM_DATA=1;
6552 HAVE_SYS_LOADAVG_H=0;
6553 HAVE_UNLOCKPT=1;
6554 HAVE_DECL_UNSETENV=1;
6555 REPLACE_CALLOC=0;
6556 REPLACE_CANONICALIZE_FILE_NAME=0;
6557 REPLACE_MALLOC=0;
6558 REPLACE_MBTOWC=0;
6559 REPLACE_MKSTEMP=0;
6560 REPLACE_PTSNAME=0;
6561 REPLACE_PTSNAME_R=0;
6562 REPLACE_PUTENV=0;
6563 REPLACE_QSORT_R=0;
6564 REPLACE_RANDOM_R=0;
6565 REPLACE_REALLOC=0;
6566 REPLACE_REALPATH=0;
6567 REPLACE_SETENV=0;
6568 REPLACE_STRTOD=0;
6569 REPLACE_UNSETENV=0;
6570 REPLACE_WCTOMB=0;
c971b7fa
PA
6571
6572
c971b7fa 6573
c971b7fa
PA
6574
6575
7a6dbc2f
SDJ
6576 for ac_func in $gl_func_list
6577do :
6578 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6579ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6580if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6581 cat >>confdefs.h <<_ACEOF
6582#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6583_ACEOF
c971b7fa
PA
6584
6585fi
7a6dbc2f 6586done
c971b7fa
PA
6587
6588
c971b7fa
PA
6589
6590
6591
6592
6593
6594
6595
c971b7fa 6596
d0ac1c44 6597
d0ac1c44 6598
d0ac1c44 6599
d0ac1c44 6600
7a6dbc2f
SDJ
6601
6602
6603
6604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
6605$as_echo_n "checking whether // is distinct from /... " >&6; }
6606if ${gl_cv_double_slash_root+:} false; then :
c971b7fa
PA
6607 $as_echo_n "(cached) " >&6
6608else
7a6dbc2f
SDJ
6609 if test x"$cross_compiling" = xyes ; then
6610 # When cross-compiling, there is no way to tell whether // is special
6611 # short of a list of hosts. However, the only known hosts to date
6612 # that have a distinct // are Apollo DomainOS (too old to port to),
6613 # Cygwin, and z/OS. If anyone knows of another system for which // has
6614 # special semantics and is distinct from /, please report it to
6615 # <bug-gnulib@gnu.org>.
6616 case $host in
6617 *-cygwin | i370-ibm-openedition)
6618 gl_cv_double_slash_root=yes ;;
6619 *)
6620 # Be optimistic and assume that / and // are the same when we
6621 # don't know.
6622 gl_cv_double_slash_root='unknown, assuming no' ;;
6623 esac
6624 else
6625 set x `ls -di / // 2>/dev/null`
6626 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
6627 gl_cv_double_slash_root=no
6628 else
6629 gl_cv_double_slash_root=yes
6630 fi
6631 fi
c971b7fa 6632fi
7a6dbc2f
SDJ
6633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
6634$as_echo "$gl_cv_double_slash_root" >&6; }
6635 if test "$gl_cv_double_slash_root" = yes; then
c971b7fa 6636
7a6dbc2f 6637$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
c971b7fa 6638
7a6dbc2f 6639 fi
c971b7fa 6640
7a6dbc2f
SDJ
6641
6642
6643
6644
6645
6646
6647
6648 :
6649
6650
6651
6652
6653
6654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
6655$as_echo_n "checking whether realpath works... " >&6; }
6656if ${gl_cv_func_realpath_works+:} false; then :
c971b7fa 6657 $as_echo_n "(cached) " >&6
7a6dbc2f
SDJ
6658else
6659
6660 touch conftest.a
6661 mkdir conftest.d
6662 if test "$cross_compiling" = yes; then :
6663 case "$host_os" in
6664 # Guess yes on glibc systems.
6665 *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
6666 # Guess no on native Windows.
6667 mingw*) gl_cv_func_realpath_works="guessing no" ;;
6668 # If we don't know, assume the worst.
6669 *) gl_cv_func_realpath_works="guessing no" ;;
6670 esac
6671
c971b7fa
PA
6672else
6673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6674/* end confdefs.h. */
7a6dbc2f
SDJ
6675
6676
6677
6678#include <stdlib.h>
6679#if defined __MACH__ && defined __APPLE__
6680/* Avoid a crash on Mac OS X. */
6681#include <mach/mach.h>
6682#include <mach/mach_error.h>
6683#include <mach/thread_status.h>
6684#include <mach/exception.h>
6685#include <mach/task.h>
6686#include <pthread.h>
6687/* The exception port on which our thread listens. */
6688static mach_port_t our_exception_port;
6689/* The main function of the thread listening for exceptions of type
6690 EXC_BAD_ACCESS. */
6691static void *
6692mach_exception_thread (void *arg)
6693{
6694 /* Buffer for a message to be received. */
6695 struct {
6696 mach_msg_header_t head;
6697 mach_msg_body_t msgh_body;
6698 char data[1024];
6699 } msg;
6700 mach_msg_return_t retval;
6701 /* Wait for a message on the exception port. */
6702 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
6703 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
6704 if (retval != MACH_MSG_SUCCESS)
6705 abort ();
6706 exit (1);
6707}
6708static void
6709nocrash_init (void)
6710{
6711 mach_port_t self = mach_task_self ();
6712 /* Allocate a port on which the thread shall listen for exceptions. */
6713 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
6714 == KERN_SUCCESS) {
6715 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
6716 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
6717 MACH_MSG_TYPE_MAKE_SEND)
6718 == KERN_SUCCESS) {
6719 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
6720 for us. */
6721 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
6722 /* Create the thread listening on the exception port. */
6723 pthread_attr_t attr;
6724 pthread_t thread;
6725 if (pthread_attr_init (&attr) == 0
6726 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
6727 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
6728 pthread_attr_destroy (&attr);
6729 /* Replace the exception port info for these exceptions with our own.
6730 Note that we replace the exception port for the entire task, not only
6731 for a particular thread. This has the effect that when our exception
6732 port gets the message, the thread specific exception port has already
6733 been asked, and we don't need to bother about it.
6734 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
6735 task_set_exception_ports (self, mask, our_exception_port,
6736 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
6737 }
6738 }
6739 }
6740}
6741#elif defined _WIN32 && ! defined __CYGWIN__
6742/* Avoid a crash on native Windows. */
6743#define WIN32_LEAN_AND_MEAN
6744#include <windows.h>
6745#include <winerror.h>
6746static LONG WINAPI
6747exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
6748{
6749 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
6750 {
6751 case EXCEPTION_ACCESS_VIOLATION:
6752 case EXCEPTION_IN_PAGE_ERROR:
6753 case EXCEPTION_STACK_OVERFLOW:
6754 case EXCEPTION_GUARD_PAGE:
6755 case EXCEPTION_PRIV_INSTRUCTION:
6756 case EXCEPTION_ILLEGAL_INSTRUCTION:
6757 case EXCEPTION_DATATYPE_MISALIGNMENT:
6758 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
6759 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
6760 exit (1);
6761 }
6762 return EXCEPTION_CONTINUE_SEARCH;
6763}
6764static void
6765nocrash_init (void)
6766{
6767 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
6768}
8690e634 6769#else
7a6dbc2f
SDJ
6770/* Avoid a crash on POSIX systems. */
6771#include <signal.h>
6772#include <unistd.h>
6773/* A POSIX signal handler. */
6774static void
6775exception_handler (int sig)
6776{
6777 _exit (1);
6778}
6779static void
6780nocrash_init (void)
6781{
6782#ifdef SIGSEGV
6783 signal (SIGSEGV, exception_handler);
6784#endif
6785#ifdef SIGBUS
6786 signal (SIGBUS, exception_handler);
6787#endif
6788}
8690e634
JK
6789#endif
6790
7a6dbc2f
SDJ
6791 #include <stdlib.h>
6792 #include <string.h>
6793
c971b7fa
PA
6794int
6795main ()
6796{
7a6dbc2f
SDJ
6797
6798 int result = 0;
6799 {
6800 char *name = realpath ("conftest.a", NULL);
6801 if (!(name && *name == '/'))
6802 result |= 1;
6803 free (name);
6804 }
6805 {
6806 char *name = realpath ("conftest.b/../conftest.a", NULL);
6807 if (name != NULL)
6808 result |= 2;
6809 free (name);
6810 }
6811 {
6812 char *name = realpath ("conftest.a/", NULL);
6813 if (name != NULL)
6814 result |= 4;
6815 free (name);
6816 }
6817 {
6818 char *name1 = realpath (".", NULL);
6819 char *name2 = realpath ("conftest.d//./..", NULL);
6820 if (! name1 || ! name2 || strcmp (name1, name2))
6821 result |= 8;
6822 free (name1);
6823 free (name2);
6824 }
6825 return result;
6826
c971b7fa
PA
6827 ;
6828 return 0;
6829}
7a6dbc2f 6830
c971b7fa 6831_ACEOF
7a6dbc2f
SDJ
6832if ac_fn_c_try_run "$LINENO"; then :
6833 gl_cv_func_realpath_works=yes
c971b7fa 6834else
7a6dbc2f 6835 gl_cv_func_realpath_works=no
c971b7fa 6836fi
7a6dbc2f
SDJ
6837rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6838 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 6839fi
c971b7fa 6840
7a6dbc2f 6841 rm -rf conftest.a conftest.d
c971b7fa 6842
7a6dbc2f
SDJ
6843fi
6844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
6845$as_echo "$gl_cv_func_realpath_works" >&6; }
6846 case "$gl_cv_func_realpath_works" in
6847 *yes)
c971b7fa 6848
7a6dbc2f 6849$as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
c971b7fa 6850
7a6dbc2f
SDJ
6851 ;;
6852 esac
c971b7fa 6853
c971b7fa 6854
c971b7fa 6855
c971b7fa
PA
6856
6857
7a6dbc2f
SDJ
6858 for ac_header in $gl_header_list
6859do :
6860 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6861ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6862if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6863 cat >>confdefs.h <<_ACEOF
6864#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8690e634 6865_ACEOF
c971b7fa 6866
c0fc7f8b 6867fi
98399780 6868
98399780
YQ
6869done
6870
6871
6872
6873
6874
6875
6876
6877
7a6dbc2f 6878 :
472fa5ee
SM
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893 :
6894
6895
6896
6897
98399780
YQ
6898
6899
6900
e26b6bb0
TT
6901 GNULIB_CHDIR=0;
6902 GNULIB_CHOWN=0;
6903 GNULIB_CLOSE=0;
6904 GNULIB_DUP=0;
6905 GNULIB_DUP2=0;
6906 GNULIB_DUP3=0;
6907 GNULIB_ENVIRON=0;
6908 GNULIB_EUIDACCESS=0;
6909 GNULIB_FACCESSAT=0;
6910 GNULIB_FCHDIR=0;
6911 GNULIB_FCHOWNAT=0;
6912 GNULIB_FDATASYNC=0;
6913 GNULIB_FSYNC=0;
6914 GNULIB_FTRUNCATE=0;
6915 GNULIB_GETCWD=0;
6916 GNULIB_GETDOMAINNAME=0;
6917 GNULIB_GETDTABLESIZE=0;
6918 GNULIB_GETGROUPS=0;
6919 GNULIB_GETHOSTNAME=0;
6920 GNULIB_GETLOGIN=0;
6921 GNULIB_GETLOGIN_R=0;
6922 GNULIB_GETPAGESIZE=0;
7a6dbc2f 6923 GNULIB_GETPASS=0;
e26b6bb0
TT
6924 GNULIB_GETUSERSHELL=0;
6925 GNULIB_GROUP_MEMBER=0;
6926 GNULIB_ISATTY=0;
6927 GNULIB_LCHOWN=0;
6928 GNULIB_LINK=0;
6929 GNULIB_LINKAT=0;
6930 GNULIB_LSEEK=0;
6931 GNULIB_PIPE=0;
6932 GNULIB_PIPE2=0;
6933 GNULIB_PREAD=0;
6934 GNULIB_PWRITE=0;
6935 GNULIB_READ=0;
6936 GNULIB_READLINK=0;
6937 GNULIB_READLINKAT=0;
6938 GNULIB_RMDIR=0;
6939 GNULIB_SETHOSTNAME=0;
6940 GNULIB_SLEEP=0;
6941 GNULIB_SYMLINK=0;
6942 GNULIB_SYMLINKAT=0;
7a6dbc2f 6943 GNULIB_TRUNCATE=0;
e26b6bb0
TT
6944 GNULIB_TTYNAME_R=0;
6945 GNULIB_UNISTD_H_NONBLOCKING=0;
6946 GNULIB_UNISTD_H_SIGPIPE=0;
6947 GNULIB_UNLINK=0;
6948 GNULIB_UNLINKAT=0;
6949 GNULIB_USLEEP=0;
6950 GNULIB_WRITE=0;
6951 HAVE_CHOWN=1;
6952 HAVE_DUP2=1;
6953 HAVE_DUP3=1;
6954 HAVE_EUIDACCESS=1;
6955 HAVE_FACCESSAT=1;
6956 HAVE_FCHDIR=1;
6957 HAVE_FCHOWNAT=1;
6958 HAVE_FDATASYNC=1;
6959 HAVE_FSYNC=1;
6960 HAVE_FTRUNCATE=1;
6961 HAVE_GETDTABLESIZE=1;
6962 HAVE_GETGROUPS=1;
6963 HAVE_GETHOSTNAME=1;
6964 HAVE_GETLOGIN=1;
6965 HAVE_GETPAGESIZE=1;
7a6dbc2f 6966 HAVE_GETPASS=1;
e26b6bb0
TT
6967 HAVE_GROUP_MEMBER=1;
6968 HAVE_LCHOWN=1;
6969 HAVE_LINK=1;
6970 HAVE_LINKAT=1;
6971 HAVE_PIPE=1;
6972 HAVE_PIPE2=1;
6973 HAVE_PREAD=1;
6974 HAVE_PWRITE=1;
6975 HAVE_READLINK=1;
6976 HAVE_READLINKAT=1;
6977 HAVE_SETHOSTNAME=1;
6978 HAVE_SLEEP=1;
6979 HAVE_SYMLINK=1;
6980 HAVE_SYMLINKAT=1;
6981 HAVE_UNLINKAT=1;
6982 HAVE_USLEEP=1;
6983 HAVE_DECL_ENVIRON=1;
6984 HAVE_DECL_FCHDIR=1;
6985 HAVE_DECL_FDATASYNC=1;
6986 HAVE_DECL_GETDOMAINNAME=1;
7a6dbc2f 6987 HAVE_DECL_GETLOGIN=1;
e26b6bb0
TT
6988 HAVE_DECL_GETLOGIN_R=1;
6989 HAVE_DECL_GETPAGESIZE=1;
6990 HAVE_DECL_GETUSERSHELL=1;
6991 HAVE_DECL_SETHOSTNAME=1;
7a6dbc2f 6992 HAVE_DECL_TRUNCATE=1;
e26b6bb0
TT
6993 HAVE_DECL_TTYNAME_R=1;
6994 HAVE_OS_H=0;
6995 HAVE_SYS_PARAM_H=0;
6996 REPLACE_CHOWN=0;
6997 REPLACE_CLOSE=0;
6998 REPLACE_DUP=0;
6999 REPLACE_DUP2=0;
7a6dbc2f 7000 REPLACE_FACCESSAT=0;
e26b6bb0
TT
7001 REPLACE_FCHOWNAT=0;
7002 REPLACE_FTRUNCATE=0;
7003 REPLACE_GETCWD=0;
7004 REPLACE_GETDOMAINNAME=0;
4a626d0a 7005 REPLACE_GETDTABLESIZE=0;
e26b6bb0
TT
7006 REPLACE_GETLOGIN_R=0;
7007 REPLACE_GETGROUPS=0;
7008 REPLACE_GETPAGESIZE=0;
7a6dbc2f 7009 REPLACE_GETPASS=0;
e26b6bb0
TT
7010 REPLACE_ISATTY=0;
7011 REPLACE_LCHOWN=0;
7012 REPLACE_LINK=0;
7013 REPLACE_LINKAT=0;
7014 REPLACE_LSEEK=0;
7015 REPLACE_PREAD=0;
7016 REPLACE_PWRITE=0;
7017 REPLACE_READ=0;
7018 REPLACE_READLINK=0;
4a626d0a 7019 REPLACE_READLINKAT=0;
e26b6bb0
TT
7020 REPLACE_RMDIR=0;
7021 REPLACE_SLEEP=0;
7022 REPLACE_SYMLINK=0;
4a626d0a 7023 REPLACE_SYMLINKAT=0;
7a6dbc2f 7024 REPLACE_TRUNCATE=0;
e26b6bb0
TT
7025 REPLACE_TTYNAME_R=0;
7026 REPLACE_UNLINK=0;
7027 REPLACE_UNLINKAT=0;
7028 REPLACE_USLEEP=0;
7029 REPLACE_WRITE=0;
7030 UNISTD_H_HAVE_WINSOCK2_H=0;
7031 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
7032
7033
7034
6ec2e0f5
SDJ
7035
7036
7037
7038
7039
7040
472fa5ee
SM
7041 :
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058 :
7059
7060
7061
6ec2e0f5
SDJ
7062
7063
7064 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
7065 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
7066
7067$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
7068
7069 else
7070 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
7071 fi
7072
7073
7074
7075
7076
7077
7078
472fa5ee
SM
7079
7080
7081
7082
7083
7084
e26b6bb0
TT
7085 GNULIB_OPENDIR=0;
7086 GNULIB_READDIR=0;
7087 GNULIB_REWINDDIR=0;
7088 GNULIB_CLOSEDIR=0;
7089 GNULIB_DIRFD=0;
7090 GNULIB_FDOPENDIR=0;
7091 GNULIB_SCANDIR=0;
7092 GNULIB_ALPHASORT=0;
7093 HAVE_OPENDIR=1;
7094 HAVE_READDIR=1;
7095 HAVE_REWINDDIR=1;
7096 HAVE_CLOSEDIR=1;
7097 HAVE_DECL_DIRFD=1;
7098 HAVE_DECL_FDOPENDIR=1;
7099 HAVE_FDOPENDIR=1;
7100 HAVE_SCANDIR=1;
7101 HAVE_ALPHASORT=1;
7102 REPLACE_OPENDIR=0;
7103 REPLACE_CLOSEDIR=0;
7104 REPLACE_DIRFD=0;
7105 REPLACE_FDOPENDIR=0;
7106
7107
7108
7109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
7110$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
d0ac1c44 7111if ${gl_cv_have_include_next+:} false; then :
e26b6bb0
TT
7112 $as_echo_n "(cached) " >&6
7113else
7114 rm -rf conftestd1a conftestd1b conftestd2
7115 mkdir conftestd1a conftestd1b conftestd2
7116 cat <<EOF > conftestd1a/conftest.h
7117#define DEFINED_IN_CONFTESTD1
7118#include_next <conftest.h>
7119#ifdef DEFINED_IN_CONFTESTD2
7120int foo;
7121#else
88b48903
WN
7122#error "include_next doesn't work"
7123#endif
7124EOF
7125 cat <<EOF > conftestd1b/conftest.h
7126#define DEFINED_IN_CONFTESTD1
7127#include <stdio.h>
7128#include_next <conftest.h>
7129#ifdef DEFINED_IN_CONFTESTD2
7130int foo;
7131#else
7132#error "include_next doesn't work"
7133#endif
7134EOF
7135 cat <<EOF > conftestd2/conftest.h
7136#ifndef DEFINED_IN_CONFTESTD1
7137#error "include_next test doesn't work"
7138#endif
7139#define DEFINED_IN_CONFTESTD2
7140EOF
7141 gl_save_CPPFLAGS="$CPPFLAGS"
7142 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
7143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7144/* end confdefs.h. */
7145#include <conftest.h>
7146_ACEOF
7147if ac_fn_c_try_compile "$LINENO"; then :
7148 gl_cv_have_include_next=yes
7149else
7150 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
7151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7152/* end confdefs.h. */
7153#include <conftest.h>
7154_ACEOF
7155if ac_fn_c_try_compile "$LINENO"; then :
7156 gl_cv_have_include_next=buggy
7157else
7158 gl_cv_have_include_next=no
7159fi
7160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7161
7162fi
7163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7164 CPPFLAGS="$gl_save_CPPFLAGS"
7165 rm -rf conftestd1a conftestd1b conftestd2
7166
7167fi
7168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
7169$as_echo "$gl_cv_have_include_next" >&6; }
7170 PRAGMA_SYSTEM_HEADER=
7171 if test $gl_cv_have_include_next = yes; then
7172 INCLUDE_NEXT=include_next
7173 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7174 if test -n "$GCC"; then
7175 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
7176 fi
7177 else
7178 if test $gl_cv_have_include_next = buggy; then
7179 INCLUDE_NEXT=include
7180 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7181 else
7182 INCLUDE_NEXT=include
7183 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
7184 fi
7185 fi
7186
7187
7188
7189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
7190$as_echo_n "checking whether system header files limit the line length... " >&6; }
d0ac1c44 7191if ${gl_cv_pragma_columns+:} false; then :
88b48903
WN
7192 $as_echo_n "(cached) " >&6
7193else
7194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7195/* end confdefs.h. */
7196
7197#ifdef __TANDEM
7198choke me
7199#endif
7200
7201_ACEOF
7202if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7203 $EGREP "choke me" >/dev/null 2>&1; then :
7204 gl_cv_pragma_columns=yes
7205else
7206 gl_cv_pragma_columns=no
7207fi
7208rm -f conftest*
7209
7210
7211fi
7212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
7213$as_echo "$gl_cv_pragma_columns" >&6; }
7214 if test $gl_cv_pragma_columns = yes; then
7215 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
7216 else
7217 PRAGMA_COLUMNS=
7218 fi
7219
7220
7221
7222
e26b6bb0 7223
e26b6bb0 7224
3d99e817
AK
7225
7226
7227
7228
7229
472fa5ee
SM
7230
7231 :
7232
7233
7234
7235
7236
7237
7238
3d99e817
AK
7239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
7240$as_echo_n "checking if environ is properly declared... " >&6; }
d0ac1c44 7241 if ${gt_cv_var_environ_declaration+:} false; then :
3d99e817
AK
7242 $as_echo_n "(cached) " >&6
7243else
7244
7245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7246/* end confdefs.h. */
7247#if HAVE_UNISTD_H
7248 #include <unistd.h>
7249 #endif
7250 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
7251 #include <stdlib.h>
7252
7253 extern struct { int foo; } environ;
7254int
7255main ()
7256{
7257environ.foo = 1;
7258 ;
7259 return 0;
7260}
7261_ACEOF
7262if ac_fn_c_try_compile "$LINENO"; then :
7263 gt_cv_var_environ_declaration=no
7264else
7265 gt_cv_var_environ_declaration=yes
7266fi
7267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7268fi
7269
7270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
7271$as_echo "$gt_cv_var_environ_declaration" >&6; }
7272 if test $gt_cv_var_environ_declaration = yes; then
7273
7274$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
7275
7276 fi
7277
7278
7279 if test $gt_cv_var_environ_declaration != yes; then
7280 HAVE_DECL_ENVIRON=0
7281 fi
7282
7283
7284
18848e28
GF
7285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
7286$as_echo_n "checking for complete errno.h... " >&6; }
d0ac1c44 7287if ${gl_cv_header_errno_h_complete+:} false; then :
18848e28
GF
7288 $as_echo_n "(cached) " >&6
7289else
7290
7291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7292/* end confdefs.h. */
7293
7294#include <errno.h>
7295#if !defined ETXTBSY
7296booboo
7297#endif
7298#if !defined ENOMSG
7299booboo
7300#endif
7301#if !defined EIDRM
7302booboo
7303#endif
7304#if !defined ENOLINK
7305booboo
7306#endif
7307#if !defined EPROTO
7308booboo
7309#endif
7310#if !defined EMULTIHOP
7311booboo
7312#endif
7313#if !defined EBADMSG
7314booboo
7315#endif
7316#if !defined EOVERFLOW
7317booboo
7318#endif
7319#if !defined ENOTSUP
7320booboo
7321#endif
7322#if !defined ENETRESET
7323booboo
7324#endif
7325#if !defined ECONNABORTED
7326booboo
7327#endif
7328#if !defined ESTALE
7329booboo
7330#endif
7331#if !defined EDQUOT
7332booboo
7333#endif
7334#if !defined ECANCELED
7335booboo
7336#endif
7337#if !defined EOWNERDEAD
7338booboo
7339#endif
7340#if !defined ENOTRECOVERABLE
7341booboo
7342#endif
7343#if !defined EILSEQ
7344booboo
7345#endif
7346
7347_ACEOF
7348if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7349 $EGREP "booboo" >/dev/null 2>&1; then :
7350 gl_cv_header_errno_h_complete=no
7351else
7352 gl_cv_header_errno_h_complete=yes
7353fi
7354rm -f conftest*
7355
7356
7357fi
7358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
7359$as_echo "$gl_cv_header_errno_h_complete" >&6; }
7360 if test $gl_cv_header_errno_h_complete = yes; then
7361 ERRNO_H=''
7362 else
7363
7364
7365
7366
7367
7368
7369
7370
7371 if test $gl_cv_have_include_next = yes; then
7372 gl_cv_next_errno_h='<'errno.h'>'
7373 else
7374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
7375$as_echo_n "checking absolute name of <errno.h>... " >&6; }
d0ac1c44 7376if ${gl_cv_next_errno_h+:} false; then :
18848e28
GF
7377 $as_echo_n "(cached) " >&6
7378else
7379
4a626d0a
PA
7380
7381
7382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18848e28
GF
7383/* end confdefs.h. */
7384#include <errno.h>
18848e28 7385_ACEOF
4a626d0a
PA
7386 case "$host_os" in
7387 aix*) gl_absname_cpp="$ac_cpp -C" ;;
7388 *) gl_absname_cpp="$ac_cpp" ;;
7389 esac
18848e28 7390
4a626d0a
PA
7391 case "$host_os" in
7392 mingw*)
7393 gl_dirsep_regex='[/\\]'
7394 ;;
7395 *)
7396 gl_dirsep_regex='\/'
7397 ;;
7398 esac
7399 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
7400 gl_header_literal_regex=`echo 'errno.h' \
7401 | sed -e "$gl_make_literal_regex_sed"`
7402 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
7403 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
7404 s|^/[^/]|//&|
7405 p
7406 q
7407 }'
7408
7409 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7410 sed -n "$gl_absolute_header_sed"`
7411
7412 gl_header=$gl_cv_absolute_errno_h
7413 gl_cv_next_errno_h='"'$gl_header'"'
7414
7415
7416fi
7417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
18848e28
GF
7418$as_echo "$gl_cv_next_errno_h" >&6; }
7419 fi
7420 NEXT_ERRNO_H=$gl_cv_next_errno_h
7421
7422 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7423 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
7424 gl_next_as_first_directive='<'errno.h'>'
7425 else
7426 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
7427 gl_next_as_first_directive=$gl_cv_next_errno_h
7428 fi
7429 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
7430
7431
7432
7433
7434 ERRNO_H='errno.h'
7435 fi
7436
7437 if test -n "$ERRNO_H"; then
7438 GL_GENERATE_ERRNO_H_TRUE=
7439 GL_GENERATE_ERRNO_H_FALSE='#'
7440else
7441 GL_GENERATE_ERRNO_H_TRUE='#'
7442 GL_GENERATE_ERRNO_H_FALSE=
7443fi
7444
7445
7446 if test -n "$ERRNO_H"; then
7447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
7448$as_echo_n "checking for EMULTIHOP value... " >&6; }
d0ac1c44 7449if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
18848e28
GF
7450 $as_echo_n "(cached) " >&6
7451else
7452
7453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7454/* end confdefs.h. */
7455
7456#include <errno.h>
7457#ifdef EMULTIHOP
7458yes
7459#endif
7460
7461_ACEOF
7462if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7463 $EGREP "yes" >/dev/null 2>&1; then :
7464 gl_cv_header_errno_h_EMULTIHOP=yes
7465else
7466 gl_cv_header_errno_h_EMULTIHOP=no
7467fi
7468rm -f conftest*
7469
7470 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
7471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7472/* end confdefs.h. */
7473
7474#define _XOPEN_SOURCE_EXTENDED 1
7475#include <errno.h>
7476#ifdef EMULTIHOP
7477yes
7478#endif
7479
7480_ACEOF
7481if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7482 $EGREP "yes" >/dev/null 2>&1; then :
7483 gl_cv_header_errno_h_EMULTIHOP=hidden
7484fi
7485rm -f conftest*
7486
7487 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
7488 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
7489#define _XOPEN_SOURCE_EXTENDED 1
7490#include <errno.h>
7491/* The following two lines are a workaround against an autoconf-2.52 bug. */
7492#include <stdio.h>
7493#include <stdlib.h>
7494"; then :
7495
7496fi
7497
7498 fi
7499 fi
7500
7501fi
7502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
7503$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
7504 case $gl_cv_header_errno_h_EMULTIHOP in
7505 yes | no)
7506 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
7507 ;;
7508 *)
7509 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
7510 ;;
7511 esac
7512
7513
7514 fi
7515
7516
7517 if test -n "$ERRNO_H"; then
7518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
7519$as_echo_n "checking for ENOLINK value... " >&6; }
d0ac1c44 7520if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
18848e28
GF
7521 $as_echo_n "(cached) " >&6
7522else
7523
7524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7525/* end confdefs.h. */
7526
7527#include <errno.h>
7528#ifdef ENOLINK
7529yes
7530#endif
7531
7532_ACEOF
7533if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7534 $EGREP "yes" >/dev/null 2>&1; then :
7535 gl_cv_header_errno_h_ENOLINK=yes
7536else
7537 gl_cv_header_errno_h_ENOLINK=no
7538fi
7539rm -f conftest*
7540
7541 if test $gl_cv_header_errno_h_ENOLINK = no; then
7542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7543/* end confdefs.h. */
7544
7545#define _XOPEN_SOURCE_EXTENDED 1
7546#include <errno.h>
7547#ifdef ENOLINK
7548yes
7549#endif
7550
7551_ACEOF
7552if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7553 $EGREP "yes" >/dev/null 2>&1; then :
7554 gl_cv_header_errno_h_ENOLINK=hidden
7555fi
7556rm -f conftest*
7557
7558 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
7559 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
7560#define _XOPEN_SOURCE_EXTENDED 1
7561#include <errno.h>
7562/* The following two lines are a workaround against an autoconf-2.52 bug. */
7563#include <stdio.h>
7564#include <stdlib.h>
7565"; then :
7566
7567fi
7568
7569 fi
7570 fi
7571
7572fi
7573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
7574$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
7575 case $gl_cv_header_errno_h_ENOLINK in
7576 yes | no)
7577 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
7578 ;;
7579 *)
7580 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
7581 ;;
7582 esac
7583
7584
7585 fi
7586
7587
7588 if test -n "$ERRNO_H"; then
7589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
7590$as_echo_n "checking for EOVERFLOW value... " >&6; }
d0ac1c44 7591if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
18848e28
GF
7592 $as_echo_n "(cached) " >&6
7593else
7594
7595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7596/* end confdefs.h. */
7597
7598#include <errno.h>
7599#ifdef EOVERFLOW
7600yes
7601#endif
7602
7603_ACEOF
7604if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7605 $EGREP "yes" >/dev/null 2>&1; then :
7606 gl_cv_header_errno_h_EOVERFLOW=yes
7607else
7608 gl_cv_header_errno_h_EOVERFLOW=no
7609fi
7610rm -f conftest*
7611
7612 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
7613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7614/* end confdefs.h. */
7615
7616#define _XOPEN_SOURCE_EXTENDED 1
7617#include <errno.h>
7618#ifdef EOVERFLOW
7619yes
7620#endif
7621
7622_ACEOF
7623if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7624 $EGREP "yes" >/dev/null 2>&1; then :
7625 gl_cv_header_errno_h_EOVERFLOW=hidden
7626fi
7627rm -f conftest*
7628
7629 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
7630 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
7631#define _XOPEN_SOURCE_EXTENDED 1
7632#include <errno.h>
7633/* The following two lines are a workaround against an autoconf-2.52 bug. */
7634#include <stdio.h>
7635#include <stdlib.h>
7636"; then :
7637
7638fi
7639
7640 fi
7641 fi
7642
7643fi
7644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
7645$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
7646 case $gl_cv_header_errno_h_EOVERFLOW in
7647 yes | no)
7648 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
7649 ;;
7650 *)
7651 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
7652 ;;
7653 esac
7654
7655
7656 fi
7657
7658
6ec2e0f5 7659ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
d0ac1c44 7660if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
6ec2e0f5
SDJ
7661 ac_have_decl=1
7662else
7663 ac_have_decl=0
7664fi
18848e28 7665
6ec2e0f5
SDJ
7666cat >>confdefs.h <<_ACEOF
7667#define HAVE_DECL_STRERROR_R $ac_have_decl
7668_ACEOF
18848e28 7669
6ec2e0f5
SDJ
7670for ac_func in strerror_r
7671do :
7672 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
d0ac1c44 7673if test "x$ac_cv_func_strerror_r" = xyes; then :
6ec2e0f5
SDJ
7674 cat >>confdefs.h <<_ACEOF
7675#define HAVE_STRERROR_R 1
7676_ACEOF
63ce7108 7677
6ec2e0f5
SDJ
7678fi
7679done
63ce7108 7680
6ec2e0f5
SDJ
7681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
7682$as_echo_n "checking whether strerror_r returns char *... " >&6; }
d0ac1c44 7683if ${ac_cv_func_strerror_r_char_p+:} false; then :
63ce7108
TT
7684 $as_echo_n "(cached) " >&6
7685else
6ec2e0f5
SDJ
7686
7687 ac_cv_func_strerror_r_char_p=no
7688 if test $ac_cv_have_decl_strerror_r = yes; then
7689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63ce7108
TT
7690/* end confdefs.h. */
7691$ac_includes_default
63ce7108
TT
7692int
7693main ()
7694{
6ec2e0f5
SDJ
7695
7696 char buf[100];
7697 char x = *strerror_r (0, buf, sizeof buf);
7698 char *p = strerror_r (0, buf, sizeof buf);
7699 return !p || x;
7700
63ce7108
TT
7701 ;
7702 return 0;
7703}
7704_ACEOF
7705if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 7706 ac_cv_func_strerror_r_char_p=yes
63ce7108
TT
7707fi
7708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
7709 else
7710 # strerror_r is not declared. Choose between
7711 # systems that have relatively inaccessible declarations for the
7712 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
7713 # former has a strerror_r that returns char*, while the latter
7714 # has a strerror_r that returns `int'.
7715 # This test should segfault on the DEC system.
7716 if test "$cross_compiling" = yes; then :
7717 :
7718else
7719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7720/* end confdefs.h. */
7721$ac_includes_default
7722 extern char *strerror_r ();
7723int
7724main ()
7725{
7726char buf[100];
7727 char x = *strerror_r (0, buf, sizeof buf);
7728 return ! isalpha (x);
7729 ;
7730 return 0;
7731}
7732_ACEOF
7733if ac_fn_c_try_run "$LINENO"; then :
7734 ac_cv_func_strerror_r_char_p=yes
7735fi
7736rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7737 conftest.$ac_objext conftest.beam conftest.$ac_ext
63ce7108 7738fi
63ce7108 7739
6ec2e0f5 7740 fi
63ce7108 7741
6ec2e0f5
SDJ
7742fi
7743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
7744$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
7745if test $ac_cv_func_strerror_r_char_p = yes; then
63ce7108 7746
6ec2e0f5 7747$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
63ce7108 7748
6ec2e0f5 7749fi
63ce7108
TT
7750
7751
7a6dbc2f
SDJ
7752 XGETTEXT_EXTRA_OPTIONS=
7753
7754
d0ac1c44
SM
7755
7756
63ce7108 7757
472fa5ee 7758 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
d0ac1c44 7759if test "x$ac_cv_have_decl_fchdir" = xyes; then :
6ec2e0f5
SDJ
7760 ac_have_decl=1
7761else
7762 ac_have_decl=0
7763fi
63ce7108 7764
6ec2e0f5
SDJ
7765cat >>confdefs.h <<_ACEOF
7766#define HAVE_DECL_FCHDIR $ac_have_decl
7767_ACEOF
63ce7108
TT
7768
7769
472fa5ee 7770
6ec2e0f5
SDJ
7771 GNULIB_FCNTL=0;
7772 GNULIB_NONBLOCKING=0;
7773 GNULIB_OPEN=0;
7774 GNULIB_OPENAT=0;
7775 HAVE_FCNTL=1;
7776 HAVE_OPENAT=1;
7777 REPLACE_FCNTL=0;
7778 REPLACE_OPEN=0;
7779 REPLACE_OPENAT=0;
63ce7108
TT
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
472fa5ee
SM
7790
7791
7792
7793
7794
7795 :
7796
7797
7798
7799
7800
7801
7802 :
7803
7804
7805
7806
7807
6ec2e0f5
SDJ
7808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
7809$as_echo_n "checking for working fcntl.h... " >&6; }
d0ac1c44 7810if ${gl_cv_header_working_fcntl_h+:} false; then :
6ec2e0f5
SDJ
7811 $as_echo_n "(cached) " >&6
7812else
7813 if test "$cross_compiling" = yes; then :
7a6dbc2f
SDJ
7814 case "$host_os" in
7815 # Guess 'no' on native Windows.
7816 mingw*) gl_cv_header_working_fcntl_h='no' ;;
7817 *) gl_cv_header_working_fcntl_h=cross-compiling ;;
7818 esac
7819
6ec2e0f5
SDJ
7820else
7821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7822/* end confdefs.h. */
7823#include <sys/types.h>
7824 #include <sys/stat.h>
7825 #if HAVE_UNISTD_H
7826 # include <unistd.h>
7827 #else /* on Windows with MSVC */
7828 # include <io.h>
7829 # include <stdlib.h>
7830 # defined sleep(n) _sleep ((n) * 1000)
7831 #endif
7832 #include <fcntl.h>
7833 #ifndef O_NOATIME
7834 #define O_NOATIME 0
7835 #endif
7836 #ifndef O_NOFOLLOW
7837 #define O_NOFOLLOW 0
7838 #endif
7839 static int const constants[] =
7840 {
7841 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
7842 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
7843 };
63ce7108 7844
6ec2e0f5
SDJ
7845int
7846main ()
7847{
63ce7108 7848
6ec2e0f5
SDJ
7849 int result = !constants;
7850 #if HAVE_SYMLINK
7851 {
7852 static char const sym[] = "conftest.sym";
7853 if (symlink ("/dev/null", sym) != 0)
7854 result |= 2;
7855 else
7856 {
7857 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
7858 if (fd >= 0)
7859 {
7860 close (fd);
7861 result |= 4;
7862 }
7863 }
7864 if (unlink (sym) != 0 || symlink (".", sym) != 0)
7865 result |= 2;
7866 else
7867 {
7868 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
7869 if (fd >= 0)
7870 {
7871 close (fd);
7872 result |= 4;
7873 }
7874 }
7875 unlink (sym);
7876 }
7877 #endif
7878 {
7879 static char const file[] = "confdefs.h";
7880 int fd = open (file, O_RDONLY | O_NOATIME);
7881 if (fd < 0)
7882 result |= 8;
7883 else
7884 {
7885 struct stat st0;
7886 if (fstat (fd, &st0) != 0)
7887 result |= 16;
7888 else
7889 {
7890 char c;
7891 sleep (1);
7892 if (read (fd, &c, 1) != 1)
7893 result |= 24;
7894 else
7895 {
7896 if (close (fd) != 0)
7897 result |= 32;
7898 else
7899 {
7900 struct stat st1;
7901 if (stat (file, &st1) != 0)
7902 result |= 40;
7903 else
7904 if (st0.st_atime != st1.st_atime)
7905 result |= 64;
7906 }
7907 }
7908 }
7909 }
7910 }
7911 return result;
7912 ;
7913 return 0;
7914}
7915_ACEOF
7916if ac_fn_c_try_run "$LINENO"; then :
7917 gl_cv_header_working_fcntl_h=yes
7918else
7919 case $? in #(
7920 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
7921 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
7922 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
7923 *) gl_cv_header_working_fcntl_h='no';;
7924 esac
7925fi
7926rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7927 conftest.$ac_objext conftest.beam conftest.$ac_ext
7928fi
7929
7a6dbc2f 7930
6ec2e0f5
SDJ
7931fi
7932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
7933$as_echo "$gl_cv_header_working_fcntl_h" >&6; }
7934
7935 case $gl_cv_header_working_fcntl_h in #(
7936 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
7937 *) ac_val=1;;
7938 esac
7939
7940cat >>confdefs.h <<_ACEOF
7941#define HAVE_WORKING_O_NOATIME $ac_val
7942_ACEOF
7943
7944
7945 case $gl_cv_header_working_fcntl_h in #(
7946 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
7947 *) ac_val=1;;
7948 esac
7949
7950cat >>confdefs.h <<_ACEOF
7951#define HAVE_WORKING_O_NOFOLLOW $ac_val
7952_ACEOF
7953
7954
7955ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
d0ac1c44 7956if test "x$ac_cv_type_pid_t" = xyes; then :
6ec2e0f5
SDJ
7957
7958else
7959
7960cat >>confdefs.h <<_ACEOF
7961#define pid_t int
7962_ACEOF
7963
7964fi
7965
7966ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
d0ac1c44 7967if test "x$ac_cv_type_mode_t" = xyes; then :
6ec2e0f5
SDJ
7968
7969else
7970
7971cat >>confdefs.h <<_ACEOF
7972#define mode_t int
7973_ACEOF
7974
7975fi
7976
7977
7978
7979
7980
7981
7982
472fa5ee
SM
7983
7984
7985
7986
7987
7a6dbc2f
SDJ
7988 GNULIB_FNMATCH=0;
7989 HAVE_FNMATCH=1;
7990 REPLACE_FNMATCH=0;
6ec2e0f5
SDJ
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
7a6dbc2f 8001 :
6ec2e0f5 8002
472fa5ee
SM
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
7a6dbc2f 8013 :
472fa5ee
SM
8014
8015
8016
8017
8018
8019
8020
8021
7a6dbc2f
SDJ
8022 if test $gl_cv_have_include_next = yes; then
8023 gl_cv_next_fnmatch_h='<'fnmatch.h'>'
8024 else
8025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fnmatch.h>" >&5
8026$as_echo_n "checking absolute name of <fnmatch.h>... " >&6; }
8027if ${gl_cv_next_fnmatch_h+:} false; then :
8028 $as_echo_n "(cached) " >&6
8029else
472fa5ee 8030
7a6dbc2f 8031 if test $ac_cv_header_fnmatch_h = yes; then
472fa5ee
SM
8032
8033
8034
8035
7a6dbc2f
SDJ
8036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8037/* end confdefs.h. */
8038#include <fnmatch.h>
8039_ACEOF
8040 case "$host_os" in
8041 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8042 *) gl_absname_cpp="$ac_cpp" ;;
8043 esac
472fa5ee 8044
7a6dbc2f
SDJ
8045 case "$host_os" in
8046 mingw*)
8047 gl_dirsep_regex='[/\\]'
8048 ;;
8049 *)
8050 gl_dirsep_regex='\/'
8051 ;;
8052 esac
8053 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
8054 gl_header_literal_regex=`echo 'fnmatch.h' \
8055 | sed -e "$gl_make_literal_regex_sed"`
8056 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8057 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8058 s|^/[^/]|//&|
8059 p
8060 q
8061 }'
8062
8063 gl_cv_absolute_fnmatch_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8064 sed -n "$gl_absolute_header_sed"`
8065
8066 gl_header=$gl_cv_absolute_fnmatch_h
8067 gl_cv_next_fnmatch_h='"'$gl_header'"'
8068 else
8069 gl_cv_next_fnmatch_h='<'fnmatch.h'>'
8070 fi
8071
8072
8073fi
8074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fnmatch_h" >&5
8075$as_echo "$gl_cv_next_fnmatch_h" >&6; }
8076 fi
8077 NEXT_FNMATCH_H=$gl_cv_next_fnmatch_h
8078
8079 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8080 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8081 gl_next_as_first_directive='<'fnmatch.h'>'
8082 else
8083 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8084 gl_next_as_first_directive=$gl_cv_next_fnmatch_h
8085 fi
8086 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H=$gl_next_as_first_directive
8087
8088
8089
8090
8091
8092
8093
8094 if test $ac_cv_header_fnmatch_h = yes; then
8095 HAVE_FNMATCH_H=1
8096 else
8097 HAVE_FNMATCH_H=0
8098 fi
8099
8100
8101 FNMATCH_H=''
8102 if false; then
8103 FNMATCH_H=fnmatch.h
8104 else
8105 if test $ac_cv_header_fnmatch_h != yes; then
8106 FNMATCH_H=fnmatch.h
8107 fi
8108 fi
8109
8110
8111 if test -n "$FNMATCH_H"; then
8112 GL_GENERATE_FNMATCH_H_TRUE=
8113 GL_GENERATE_FNMATCH_H_FALSE='#'
8114else
8115 GL_GENERATE_FNMATCH_H_TRUE='#'
8116 GL_GENERATE_FNMATCH_H_FALSE=
8117fi
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
8132$as_echo_n "checking for mbstate_t... " >&6; }
8133if ${ac_cv_type_mbstate_t+:} false; then :
8134 $as_echo_n "(cached) " >&6
8135else
8136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8137/* end confdefs.h. */
8138$ac_includes_default
8139/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
8140 <wchar.h>.
8141 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8142 included before <wchar.h>. */
8143#include <stddef.h>
8144#include <stdio.h>
8145#include <time.h>
8146#include <wchar.h>
8147int
8148main ()
8149{
8150mbstate_t x; return sizeof x;
8151 ;
8152 return 0;
8153}
8154_ACEOF
8155if ac_fn_c_try_compile "$LINENO"; then :
8156 ac_cv_type_mbstate_t=yes
8157else
8158 ac_cv_type_mbstate_t=no
8159fi
8160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8161fi
8162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
8163$as_echo "$ac_cv_type_mbstate_t" >&6; }
8164 if test $ac_cv_type_mbstate_t = yes; then
8165
8166$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
8167
8168 else
8169
8170$as_echo "#define mbstate_t int" >>confdefs.h
8171
8172 fi
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215 GNULIB_ACOSF=0;
6ec2e0f5
SDJ
8216 GNULIB_ACOSL=0;
8217 GNULIB_ASINF=0;
8218 GNULIB_ASINL=0;
8219 GNULIB_ATANF=0;
8220 GNULIB_ATANL=0;
8221 GNULIB_ATAN2F=0;
8222 GNULIB_CBRT=0;
8223 GNULIB_CBRTF=0;
8224 GNULIB_CBRTL=0;
8225 GNULIB_CEIL=0;
8226 GNULIB_CEILF=0;
8227 GNULIB_CEILL=0;
8228 GNULIB_COPYSIGN=0;
8229 GNULIB_COPYSIGNF=0;
8230 GNULIB_COPYSIGNL=0;
8231 GNULIB_COSF=0;
8232 GNULIB_COSL=0;
8233 GNULIB_COSHF=0;
8234 GNULIB_EXPF=0;
8235 GNULIB_EXPL=0;
8236 GNULIB_EXP2=0;
8237 GNULIB_EXP2F=0;
8238 GNULIB_EXP2L=0;
8239 GNULIB_EXPM1=0;
8240 GNULIB_EXPM1F=0;
8241 GNULIB_EXPM1L=0;
8242 GNULIB_FABSF=0;
8243 GNULIB_FABSL=0;
8244 GNULIB_FLOOR=0;
8245 GNULIB_FLOORF=0;
8246 GNULIB_FLOORL=0;
8247 GNULIB_FMA=0;
8248 GNULIB_FMAF=0;
8249 GNULIB_FMAL=0;
8250 GNULIB_FMOD=0;
8251 GNULIB_FMODF=0;
8252 GNULIB_FMODL=0;
8253 GNULIB_FREXPF=0;
8254 GNULIB_FREXP=0;
8255 GNULIB_FREXPL=0;
8256 GNULIB_HYPOT=0;
8257 GNULIB_HYPOTF=0;
8258 GNULIB_HYPOTL=0;
88b48903
WN
8259 GNULIB_ILOGB=0;
8260 GNULIB_ILOGBF=0;
8261 GNULIB_ILOGBL=0;
8262 GNULIB_ISFINITE=0;
8263 GNULIB_ISINF=0;
8264 GNULIB_ISNAN=0;
8265 GNULIB_ISNANF=0;
8266 GNULIB_ISNAND=0;
8267 GNULIB_ISNANL=0;
8268 GNULIB_LDEXPF=0;
8269 GNULIB_LDEXPL=0;
8270 GNULIB_LOG=0;
8271 GNULIB_LOGF=0;
8272 GNULIB_LOGL=0;
8273 GNULIB_LOG10=0;
8274 GNULIB_LOG10F=0;
8275 GNULIB_LOG10L=0;
8276 GNULIB_LOG1P=0;
8277 GNULIB_LOG1PF=0;
8278 GNULIB_LOG1PL=0;
8279 GNULIB_LOG2=0;
8280 GNULIB_LOG2F=0;
8281 GNULIB_LOG2L=0;
8282 GNULIB_LOGB=0;
8283 GNULIB_LOGBF=0;
8284 GNULIB_LOGBL=0;
8285 GNULIB_MODF=0;
8286 GNULIB_MODFF=0;
8287 GNULIB_MODFL=0;
8288 GNULIB_POWF=0;
8289 GNULIB_REMAINDER=0;
8290 GNULIB_REMAINDERF=0;
8291 GNULIB_REMAINDERL=0;
8292 GNULIB_RINT=0;
8293 GNULIB_RINTF=0;
8294 GNULIB_RINTL=0;
8295 GNULIB_ROUND=0;
8296 GNULIB_ROUNDF=0;
8297 GNULIB_ROUNDL=0;
8298 GNULIB_SIGNBIT=0;
8299 GNULIB_SINF=0;
8300 GNULIB_SINL=0;
8301 GNULIB_SINHF=0;
8302 GNULIB_SQRTF=0;
8303 GNULIB_SQRTL=0;
8304 GNULIB_TANF=0;
8305 GNULIB_TANL=0;
8306 GNULIB_TANHF=0;
8307 GNULIB_TRUNC=0;
8308 GNULIB_TRUNCF=0;
8309 GNULIB_TRUNCL=0;
8310 HAVE_ACOSF=1;
8311 HAVE_ACOSL=1;
8312 HAVE_ASINF=1;
8313 HAVE_ASINL=1;
8314 HAVE_ATANF=1;
8315 HAVE_ATANL=1;
8316 HAVE_ATAN2F=1;
8317 HAVE_CBRT=1;
8318 HAVE_CBRTF=1;
8319 HAVE_CBRTL=1;
8320 HAVE_COPYSIGN=1;
8321 HAVE_COPYSIGNL=1;
8322 HAVE_COSF=1;
8323 HAVE_COSL=1;
8324 HAVE_COSHF=1;
8325 HAVE_EXPF=1;
8326 HAVE_EXPL=1;
8327 HAVE_EXPM1=1;
8328 HAVE_EXPM1F=1;
8329 HAVE_FABSF=1;
8330 HAVE_FABSL=1;
8331 HAVE_FMA=1;
8332 HAVE_FMAF=1;
8333 HAVE_FMAL=1;
8334 HAVE_FMODF=1;
8335 HAVE_FMODL=1;
8336 HAVE_FREXPF=1;
8337 HAVE_HYPOTF=1;
8338 HAVE_HYPOTL=1;
8339 HAVE_ILOGB=1;
8340 HAVE_ILOGBF=1;
8341 HAVE_ILOGBL=1;
8342 HAVE_ISNANF=1;
8343 HAVE_ISNAND=1;
8344 HAVE_ISNANL=1;
8345 HAVE_LDEXPF=1;
8346 HAVE_LOGF=1;
8347 HAVE_LOGL=1;
8348 HAVE_LOG10F=1;
8349 HAVE_LOG10L=1;
8350 HAVE_LOG1P=1;
8351 HAVE_LOG1PF=1;
8352 HAVE_LOG1PL=1;
8353 HAVE_LOGBF=1;
8354 HAVE_LOGBL=1;
8355 HAVE_MODFF=1;
8356 HAVE_MODFL=1;
8357 HAVE_POWF=1;
8358 HAVE_REMAINDER=1;
8359 HAVE_REMAINDERF=1;
8360 HAVE_RINT=1;
8361 HAVE_RINTL=1;
8362 HAVE_SINF=1;
8363 HAVE_SINL=1;
8364 HAVE_SINHF=1;
8365 HAVE_SQRTF=1;
8366 HAVE_SQRTL=1;
8367 HAVE_TANF=1;
8368 HAVE_TANL=1;
8369 HAVE_TANHF=1;
8370 HAVE_DECL_ACOSL=1;
8371 HAVE_DECL_ASINL=1;
8372 HAVE_DECL_ATANL=1;
8373 HAVE_DECL_CBRTF=1;
8374 HAVE_DECL_CBRTL=1;
8375 HAVE_DECL_CEILF=1;
8376 HAVE_DECL_CEILL=1;
8377 HAVE_DECL_COPYSIGNF=1;
8378 HAVE_DECL_COSL=1;
8379 HAVE_DECL_EXPL=1;
8380 HAVE_DECL_EXP2=1;
8381 HAVE_DECL_EXP2F=1;
8382 HAVE_DECL_EXP2L=1;
8383 HAVE_DECL_EXPM1L=1;
8384 HAVE_DECL_FLOORF=1;
8385 HAVE_DECL_FLOORL=1;
8386 HAVE_DECL_FREXPL=1;
8387 HAVE_DECL_LDEXPL=1;
8388 HAVE_DECL_LOGL=1;
8389 HAVE_DECL_LOG10L=1;
8390 HAVE_DECL_LOG2=1;
8391 HAVE_DECL_LOG2F=1;
8392 HAVE_DECL_LOG2L=1;
8393 HAVE_DECL_LOGB=1;
8394 HAVE_DECL_REMAINDER=1;
8395 HAVE_DECL_REMAINDERL=1;
8396 HAVE_DECL_RINTF=1;
8397 HAVE_DECL_ROUND=1;
8398 HAVE_DECL_ROUNDF=1;
8399 HAVE_DECL_ROUNDL=1;
8400 HAVE_DECL_SINL=1;
8401 HAVE_DECL_SQRTL=1;
8402 HAVE_DECL_TANL=1;
8403 HAVE_DECL_TRUNC=1;
8404 HAVE_DECL_TRUNCF=1;
8405 HAVE_DECL_TRUNCL=1;
7a6dbc2f
SDJ
8406 REPLACE_ACOSF=0;
8407 REPLACE_ASINF=0;
8408 REPLACE_ATANF=0;
8409 REPLACE_ATAN2F=0;
88b48903
WN
8410 REPLACE_CBRTF=0;
8411 REPLACE_CBRTL=0;
8412 REPLACE_CEIL=0;
8413 REPLACE_CEILF=0;
8414 REPLACE_CEILL=0;
7a6dbc2f
SDJ
8415 REPLACE_COSF=0;
8416 REPLACE_COSHF=0;
8417 REPLACE_EXPF=0;
88b48903
WN
8418 REPLACE_EXPM1=0;
8419 REPLACE_EXPM1F=0;
8420 REPLACE_EXP2=0;
8421 REPLACE_EXP2L=0;
8422 REPLACE_FABSL=0;
8423 REPLACE_FLOOR=0;
8424 REPLACE_FLOORF=0;
8425 REPLACE_FLOORL=0;
8426 REPLACE_FMA=0;
8427 REPLACE_FMAF=0;
8428 REPLACE_FMAL=0;
8429 REPLACE_FMOD=0;
8430 REPLACE_FMODF=0;
8431 REPLACE_FMODL=0;
8432 REPLACE_FREXPF=0;
8433 REPLACE_FREXP=0;
8434 REPLACE_FREXPL=0;
8435 REPLACE_HUGE_VAL=0;
8436 REPLACE_HYPOT=0;
8437 REPLACE_HYPOTF=0;
8438 REPLACE_HYPOTL=0;
8439 REPLACE_ILOGB=0;
8440 REPLACE_ILOGBF=0;
7a6dbc2f 8441 REPLACE_ILOGBL=0;
88b48903
WN
8442 REPLACE_ISFINITE=0;
8443 REPLACE_ISINF=0;
8444 REPLACE_ISNAN=0;
8445 REPLACE_LDEXPL=0;
8446 REPLACE_LOG=0;
8447 REPLACE_LOGF=0;
8448 REPLACE_LOGL=0;
8449 REPLACE_LOG10=0;
8450 REPLACE_LOG10F=0;
8451 REPLACE_LOG10L=0;
8452 REPLACE_LOG1P=0;
8453 REPLACE_LOG1PF=0;
8454 REPLACE_LOG1PL=0;
8455 REPLACE_LOG2=0;
8456 REPLACE_LOG2F=0;
8457 REPLACE_LOG2L=0;
8458 REPLACE_LOGB=0;
8459 REPLACE_LOGBF=0;
8460 REPLACE_LOGBL=0;
8461 REPLACE_MODF=0;
8462 REPLACE_MODFF=0;
8463 REPLACE_MODFL=0;
8464 REPLACE_NAN=0;
8465 REPLACE_REMAINDER=0;
8466 REPLACE_REMAINDERF=0;
8467 REPLACE_REMAINDERL=0;
8468 REPLACE_ROUND=0;
8469 REPLACE_ROUNDF=0;
8470 REPLACE_ROUNDL=0;
8471 REPLACE_SIGNBIT=0;
8472 REPLACE_SIGNBIT_USING_GCC=0;
7a6dbc2f
SDJ
8473 REPLACE_SINF=0;
8474 REPLACE_SINHF=0;
8475 REPLACE_SQRTF=0;
88b48903 8476 REPLACE_SQRTL=0;
7a6dbc2f
SDJ
8477 REPLACE_TANF=0;
8478 REPLACE_TANHF=0;
88b48903
WN
8479 REPLACE_TRUNC=0;
8480 REPLACE_TRUNCF=0;
8481 REPLACE_TRUNCL=0;
8482
8483
7a6dbc2f
SDJ
8484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
8485$as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
8486if ${gl_cv_func_frexp_no_libm+:} false; then :
8487 $as_echo_n "(cached) " >&6
8488else
8489
8490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8491/* end confdefs.h. */
8492#include <math.h>
8493 double x;
8494int
8495main ()
8496{
8497int e; return frexp (x, &e) > 0;
8498 ;
8499 return 0;
8500}
8501_ACEOF
8502if ac_fn_c_try_link "$LINENO"; then :
8503 gl_cv_func_frexp_no_libm=yes
8504else
8505 gl_cv_func_frexp_no_libm=no
8506fi
8507rm -f core conftest.err conftest.$ac_objext \
8508 conftest$ac_exeext conftest.$ac_ext
8509
8510fi
8511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
8512$as_echo "$gl_cv_func_frexp_no_libm" >&6; }
8513
8514
8515 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
8516if test "x$ac_cv_have_decl_alarm" = xyes; then :
8517 ac_have_decl=1
8518else
8519 ac_have_decl=0
8520fi
8521
8522cat >>confdefs.h <<_ACEOF
8523#define HAVE_DECL_ALARM $ac_have_decl
8524_ACEOF
8525
8526
8527
8528
8529
8530 FREXP_LIBM=
8531 if test $gl_cv_func_frexp_no_libm = no; then
8532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5
8533$as_echo_n "checking whether frexp() can be used with libm... " >&6; }
8534if ${gl_cv_func_frexp_in_libm+:} false; then :
8535 $as_echo_n "(cached) " >&6
8536else
8537
8538 save_LIBS="$LIBS"
8539 LIBS="$LIBS -lm"
8540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8541/* end confdefs.h. */
8542#include <math.h>
8543 double x;
8544int
8545main ()
8546{
8547int e; return frexp (x, &e) > 0;
8548 ;
8549 return 0;
8550}
8551_ACEOF
8552if ac_fn_c_try_link "$LINENO"; then :
8553 gl_cv_func_frexp_in_libm=yes
8554else
8555 gl_cv_func_frexp_in_libm=no
8556fi
8557rm -f core conftest.err conftest.$ac_objext \
8558 conftest$ac_exeext conftest.$ac_ext
8559 LIBS="$save_LIBS"
8560
8561fi
8562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5
8563$as_echo "$gl_cv_func_frexp_in_libm" >&6; }
8564 if test $gl_cv_func_frexp_in_libm = yes; then
8565 FREXP_LIBM=-lm
8566 fi
8567 fi
8568 if test $gl_cv_func_frexp_no_libm = yes \
8569 || test $gl_cv_func_frexp_in_libm = yes; then
8570 save_LIBS="$LIBS"
8571 LIBS="$LIBS $FREXP_LIBM"
8572
8573
8574
8575 :
8576
8577
8578
8579
8580
8581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
8582$as_echo_n "checking whether frexp works... " >&6; }
8583if ${gl_cv_func_frexp_works+:} false; then :
8584 $as_echo_n "(cached) " >&6
8585else
8586
8587 if test "$cross_compiling" = yes; then :
8588 case "$host_os" in
8589 netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;;
8590 mingw*) # Guess yes with MSVC, no with mingw.
8591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8592/* end confdefs.h. */
8593
8594#ifdef _MSC_VER
8595 Good
8596#endif
8597
8598_ACEOF
8599if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8600 $EGREP "Good" >/dev/null 2>&1; then :
8601 gl_cv_func_frexp_works="guessing yes"
8602else
8603 gl_cv_func_frexp_works="guessing no"
8604fi
8605rm -f conftest*
8606
8607 ;;
8608 *) gl_cv_func_frexp_works="guessing yes" ;;
8609 esac
8610
8611else
8612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8613/* end confdefs.h. */
8614
8615#include <float.h>
8616#include <math.h>
8617#include <string.h>
8618#if HAVE_DECL_ALARM
8619# include <signal.h>
8620# include <unistd.h>
8621#endif
8622/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
8623 ICC 10.0 has a bug when optimizing the expression -zero.
8624 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
8625 to PowerPC on Mac OS X 10.5. */
8626#if defined __hpux || defined __sgi || defined __ICC
8627static double
8628compute_minus_zero (void)
8629{
8630 return -DBL_MIN * DBL_MIN;
8631}
8632# define minus_zero compute_minus_zero ()
8633#else
8634double minus_zero = -0.0;
8635#endif
8636int main()
8637{
8638 int result = 0;
8639 int i;
8640 volatile double x;
8641 double zero = 0.0;
8642#if HAVE_DECL_ALARM
8643 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
8644 number. Let the test fail in this case. */
8645 signal (SIGALRM, SIG_DFL);
8646 alarm (5);
8647#endif
8648 /* Test on denormalized numbers. */
8649 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
8650 ;
8651 if (x > 0.0)
8652 {
8653 int exp;
8654 double y = frexp (x, &exp);
8655 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
8656 On NetBSD: y = 0.75. Correct: y = 0.5. */
8657 if (y != 0.5)
8658 result |= 1;
8659 }
8660 /* Test on infinite numbers. */
8661 x = 1.0 / zero;
8662 {
8663 int exp;
8664 double y = frexp (x, &exp);
8665 if (y != x)
8666 result |= 2;
8667 }
8668 /* Test on negative zero. */
8669 x = minus_zero;
8670 {
8671 int exp;
8672 double y = frexp (x, &exp);
8673 if (memcmp (&y, &x, sizeof x))
8674 result |= 4;
8675 }
8676 return result;
8677}
8678_ACEOF
8679if ac_fn_c_try_run "$LINENO"; then :
8680 gl_cv_func_frexp_works=yes
8681else
8682 gl_cv_func_frexp_works=no
8683fi
8684rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8685 conftest.$ac_objext conftest.beam conftest.$ac_ext
8686fi
8687
8688
8689fi
8690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
8691$as_echo "$gl_cv_func_frexp_works" >&6; }
8692
8693 LIBS="$save_LIBS"
8694 case "$gl_cv_func_frexp_works" in
8695 *yes) gl_func_frexp=yes ;;
8696 *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;;
8697 esac
8698 else
8699 gl_func_frexp=no
8700 fi
8701 if test $gl_func_frexp = yes; then
8702
8703$as_echo "#define HAVE_FREXP 1" >>confdefs.h
8704
8705 fi
8706
8707
8708
8709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
8710$as_echo_n "checking whether long double and double are the same... " >&6; }
8711if ${gl_cv_long_double_equals_double+:} false; then :
8712 $as_echo_n "(cached) " >&6
8713else
8714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8715/* end confdefs.h. */
8716#include <float.h>
8717int
8718main ()
8719{
8720typedef int check[sizeof (long double) == sizeof (double)
8721 && LDBL_MANT_DIG == DBL_MANT_DIG
8722 && LDBL_MAX_EXP == DBL_MAX_EXP
8723 && LDBL_MIN_EXP == DBL_MIN_EXP
8724 ? 1 : -1];
8725
8726 ;
8727 return 0;
8728}
8729_ACEOF
8730if ac_fn_c_try_compile "$LINENO"; then :
8731 gl_cv_long_double_equals_double=yes
8732else
8733 gl_cv_long_double_equals_double=no
8734fi
8735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8736
8737fi
8738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
8739$as_echo "$gl_cv_long_double_equals_double" >&6; }
8740 if test $gl_cv_long_double_equals_double = yes; then
8741
8742$as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
8743
8744 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
8745 else
8746 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
8747 fi
8748
8749
8750
8751
8752
8753
8754
8755
8756 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
8757"
8758if test "x$ac_cv_have_decl_frexpl" = xyes; then :
8759
8760else
8761 HAVE_DECL_FREXPL=0
8762fi
8763
8764
8765 FREXPL_LIBM=
8766 if test $HAVE_DECL_FREXPL = 1; then
8767
8768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
8769$as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
8770if ${gl_cv_func_frexpl_no_libm+:} false; then :
88b48903
WN
8771 $as_echo_n "(cached) " >&6
8772else
8773
8774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8775/* end confdefs.h. */
8776#include <math.h>
7a6dbc2f 8777 long double x;
88b48903
WN
8778int
8779main ()
8780{
7a6dbc2f 8781int e; return frexpl (x, &e) > 0;
88b48903
WN
8782 ;
8783 return 0;
8784}
8785_ACEOF
8786if ac_fn_c_try_link "$LINENO"; then :
7a6dbc2f 8787 gl_cv_func_frexpl_no_libm=yes
88b48903 8788else
7a6dbc2f 8789 gl_cv_func_frexpl_no_libm=no
88b48903
WN
8790fi
8791rm -f core conftest.err conftest.$ac_objext \
8792 conftest$ac_exeext conftest.$ac_ext
8793
8794fi
7a6dbc2f
SDJ
8795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
8796$as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
472fa5ee 8797
7a6dbc2f
SDJ
8798 if test $gl_cv_func_frexpl_no_libm = no; then
8799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5
8800$as_echo_n "checking whether frexpl() can be used with libm... " >&6; }
8801if ${gl_cv_func_frexpl_in_libm+:} false; then :
8802 $as_echo_n "(cached) " >&6
4a626d0a 8803else
88b48903 8804
7a6dbc2f
SDJ
8805 save_LIBS="$LIBS"
8806 LIBS="$LIBS -lm"
8807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8808/* end confdefs.h. */
8809#include <math.h>
8810 long double x;
8811int
8812main ()
8813{
8814int e; return frexpl (x, &e) > 0;
8815 ;
8816 return 0;
8817}
4a626d0a 8818_ACEOF
7a6dbc2f
SDJ
8819if ac_fn_c_try_link "$LINENO"; then :
8820 gl_cv_func_frexpl_in_libm=yes
8821else
8822 gl_cv_func_frexpl_in_libm=no
8823fi
8824rm -f core conftest.err conftest.$ac_objext \
8825 conftest$ac_exeext conftest.$ac_ext
8826 LIBS="$save_LIBS"
88b48903 8827
7a6dbc2f
SDJ
8828fi
8829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5
8830$as_echo "$gl_cv_func_frexpl_in_libm" >&6; }
8831 if test $gl_cv_func_frexpl_in_libm = yes; then
8832 FREXPL_LIBM=-lm
8833 fi
8834 fi
8835 if test $gl_cv_func_frexpl_no_libm = yes \
8836 || test $gl_cv_func_frexpl_in_libm = yes; then
8837 save_LIBS="$LIBS"
8838 LIBS="$LIBS $FREXPL_LIBM"
88b48903 8839
472fa5ee 8840
7a6dbc2f
SDJ
8841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
8842$as_echo_n "checking whether frexpl works... " >&6; }
8843if ${gl_cv_func_frexpl_works+:} false; then :
88b48903 8844 $as_echo_n "(cached) " >&6
7a6dbc2f
SDJ
8845else
8846
8847 if test "$cross_compiling" = yes; then :
8848
8849 case "$host_os" in
8850 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
8851 gl_cv_func_frexpl_works="guessing no";;
8852 *) gl_cv_func_frexpl_works="guessing yes";;
8853 esac
8854
88b48903
WN
8855else
8856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8857/* end confdefs.h. */
7a6dbc2f 8858
88b48903 8859#include <float.h>
7a6dbc2f
SDJ
8860#include <math.h>
8861/* Override the values of <float.h>, like done in float.in.h. */
8862#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
8863# undef LDBL_MIN_EXP
8864# define LDBL_MIN_EXP (-16381)
8865#endif
8866#if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__)
8867# undef LDBL_MIN_EXP
8868# define LDBL_MIN_EXP (-16381)
8869#endif
8870#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
8871# undef LDBL_MIN_EXP
8872# define LDBL_MIN_EXP DBL_MIN_EXP
8873#endif
8874#if defined __sgi && (LDBL_MANT_DIG >= 106)
8875# if defined __GNUC__
8876# undef LDBL_MIN_EXP
8877# define LDBL_MIN_EXP DBL_MIN_EXP
8878# endif
8879#endif
8880extern
8881#ifdef __cplusplus
8882"C"
8883#endif
8884long double frexpl (long double, int *);
8885int main()
88b48903 8886{
7a6dbc2f
SDJ
8887 int result = 0;
8888 volatile long double x;
8889 /* Test on finite numbers that fails on AIX 5.1. */
8890 x = 16.0L;
8891 {
8892 int exp = -9999;
8893 frexpl (x, &exp);
8894 if (exp != 5)
8895 result |= 1;
8896 }
8897 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
8898 function returns an invalid (incorrectly normalized) value: it returns
8899 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
8900 but the correct result is
8901 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
8902 x = 1.01L;
8903 {
8904 int exp = -9999;
8905 long double y = frexpl (x, &exp);
8906 if (!(exp == 1 && y == 0.505L))
8907 result |= 2;
8908 }
8909 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
8910 LDBL_MAX_EXP = 16384.
8911 In the loop end test, we test x against Infinity, rather than comparing
8912 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
8913 {
8914 int i;
8915 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
8916 {
8917 int exp = -9999;
8918 frexpl (x, &exp);
8919 if (exp != i)
8920 {
8921 result |= 4;
8922 break;
8923 }
8924 }
8925 }
8926 /* Test on denormalized numbers. */
8927 {
8928 int i;
8929 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
8930 ;
8931 if (x > 0.0L)
8932 {
8933 int exp;
8934 long double y = frexpl (x, &exp);
8935 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
8936 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
8937 if (exp != LDBL_MIN_EXP - 1)
8938 result |= 8;
8939 }
8940 }
8941 /* Test on infinite numbers. */
8942 x = 1.0L / 0.0L;
8943 {
8944 int exp;
8945 long double y = frexpl (x, &exp);
8946 if (y != x)
8947 result |= 16;
8948 }
8949 return result;
88b48903
WN
8950}
8951_ACEOF
7a6dbc2f
SDJ
8952if ac_fn_c_try_run "$LINENO"; then :
8953 gl_cv_func_frexpl_works=yes
88b48903 8954else
7a6dbc2f
SDJ
8955 gl_cv_func_frexpl_works=no
8956fi
8957rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8958 conftest.$ac_objext conftest.beam conftest.$ac_ext
88b48903 8959fi
7a6dbc2f 8960
88b48903
WN
8961
8962fi
7a6dbc2f
SDJ
8963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
8964$as_echo "$gl_cv_func_frexpl_works" >&6; }
88b48903 8965
7a6dbc2f
SDJ
8966 LIBS="$save_LIBS"
8967 case "$gl_cv_func_frexpl_works" in
8968 *yes) gl_func_frexpl=yes ;;
8969 *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;;
8970 esac
8971 else
8972 gl_func_frexpl=no
8973 fi
8974 if test $gl_func_frexpl = yes; then
88b48903 8975
7a6dbc2f
SDJ
8976$as_echo "#define HAVE_FREXPL 1" >>confdefs.h
8977
8978 fi
8979 fi
8980 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
8981 if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
8982
8983 FREXPL_LIBM="$FREXP_LIBM"
8984 else
8985 FREXPL_LIBM=
8986 fi
88b48903
WN
8987 fi
8988
8989
4a626d0a 8990
6ec2e0f5
SDJ
8991 GNULIB_FCHMODAT=0;
8992 GNULIB_FSTAT=0;
8993 GNULIB_FSTATAT=0;
8994 GNULIB_FUTIMENS=0;
8995 GNULIB_LCHMOD=0;
8996 GNULIB_LSTAT=0;
8997 GNULIB_MKDIRAT=0;
8998 GNULIB_MKFIFO=0;
8999 GNULIB_MKFIFOAT=0;
9000 GNULIB_MKNOD=0;
9001 GNULIB_MKNODAT=0;
9002 GNULIB_STAT=0;
9003 GNULIB_UTIMENSAT=0;
7a6dbc2f 9004 GNULIB_OVERRIDES_STRUCT_STAT=0;
6ec2e0f5
SDJ
9005 HAVE_FCHMODAT=1;
9006 HAVE_FSTATAT=1;
9007 HAVE_FUTIMENS=1;
9008 HAVE_LCHMOD=1;
9009 HAVE_LSTAT=1;
9010 HAVE_MKDIRAT=1;
9011 HAVE_MKFIFO=1;
9012 HAVE_MKFIFOAT=1;
9013 HAVE_MKNOD=1;
9014 HAVE_MKNODAT=1;
9015 HAVE_UTIMENSAT=1;
9016 REPLACE_FSTAT=0;
9017 REPLACE_FSTATAT=0;
9018 REPLACE_FUTIMENS=0;
9019 REPLACE_LSTAT=0;
9020 REPLACE_MKDIR=0;
9021 REPLACE_MKFIFO=0;
9022 REPLACE_MKNOD=0;
9023 REPLACE_STAT=0;
9024 REPLACE_UTIMENSAT=0;
9025
9026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
9027$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
d0ac1c44 9028if ${ac_cv_header_stat_broken+:} false; then :
6ec2e0f5
SDJ
9029 $as_echo_n "(cached) " >&6
9030else
9031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9032/* end confdefs.h. */
9033#include <sys/types.h>
9034#include <sys/stat.h>
9035
9036#if defined S_ISBLK && defined S_IFDIR
9037extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
9038#endif
9039
9040#if defined S_ISBLK && defined S_IFCHR
9041extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
9042#endif
9043
9044#if defined S_ISLNK && defined S_IFREG
9045extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
9046#endif
9047
9048#if defined S_ISSOCK && defined S_IFREG
9049extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
9050#endif
4a626d0a 9051
4a626d0a
PA
9052_ACEOF
9053if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5
SDJ
9054 ac_cv_header_stat_broken=no
9055else
9056 ac_cv_header_stat_broken=yes
4a626d0a
PA
9057fi
9058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
9059fi
9060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
9061$as_echo "$ac_cv_header_stat_broken" >&6; }
9062if test $ac_cv_header_stat_broken = yes; then
9063
9064$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
4a626d0a
PA
9065
9066fi
4a626d0a 9067
4a626d0a
PA
9068
9069
4a626d0a
PA
9070
9071
472fa5ee
SM
9072
9073
9074
6ec2e0f5
SDJ
9075 case "$host_os" in
9076 mingw*)
9077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
9078$as_echo_n "checking for 64-bit off_t... " >&6; }
d0ac1c44 9079if ${gl_cv_type_off_t_64+:} false; then :
6ec2e0f5
SDJ
9080 $as_echo_n "(cached) " >&6
9081else
9082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9083/* end confdefs.h. */
9084#include <sys/types.h>
9085 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
9086
9087int
9088main ()
9089{
9090
9091 ;
9092 return 0;
9093}
9094_ACEOF
9095if ac_fn_c_try_compile "$LINENO"; then :
9096 gl_cv_type_off_t_64=yes
9097else
9098 gl_cv_type_off_t_64=no
9099fi
9100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4a626d0a 9101
6ec2e0f5
SDJ
9102fi
9103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
9104$as_echo "$gl_cv_type_off_t_64" >&6; }
9105 if test $gl_cv_type_off_t_64 = no; then
9106 WINDOWS_64_BIT_OFF_T=1
9107 else
7a6dbc2f
SDJ
9108 WINDOWS_64_BIT_OFF_T=0
9109 fi
9110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
9111$as_echo_n "checking for 64-bit st_size... " >&6; }
9112if ${gl_cv_member_st_size_64+:} false; then :
9113 $as_echo_n "(cached) " >&6
9114else
9115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9116/* end confdefs.h. */
9117#include <sys/types.h>
9118 struct stat buf;
9119 int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
9120
9121int
9122main ()
9123{
9124
9125 ;
9126 return 0;
9127}
9128_ACEOF
9129if ac_fn_c_try_compile "$LINENO"; then :
9130 gl_cv_member_st_size_64=yes
9131else
9132 gl_cv_member_st_size_64=no
9133fi
9134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9135
9136fi
9137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
9138$as_echo "$gl_cv_member_st_size_64" >&6; }
9139 if test $gl_cv_member_st_size_64 = no; then
9140 WINDOWS_64_BIT_ST_SIZE=1
9141 else
9142 WINDOWS_64_BIT_ST_SIZE=0
6ec2e0f5 9143 fi
6ec2e0f5
SDJ
9144 ;;
9145 *)
9146 WINDOWS_64_BIT_OFF_T=0
9147 WINDOWS_64_BIT_ST_SIZE=0
9148 ;;
9149 esac
4a626d0a
PA
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
472fa5ee
SM
9162 :
9163
9164
9165
9166
9167
4a626d0a
PA
9168
9169
9170
9171 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 9172 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
4a626d0a 9173 else
6ec2e0f5
SDJ
9174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
9175$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
d0ac1c44 9176if ${gl_cv_next_sys_stat_h+:} false; then :
4a626d0a
PA
9177 $as_echo_n "(cached) " >&6
9178else
9179
6ec2e0f5 9180 if test $ac_cv_header_sys_stat_h = yes; then
4a626d0a
PA
9181
9182
9183
9184
9185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9186/* end confdefs.h. */
6ec2e0f5 9187#include <sys/stat.h>
4a626d0a
PA
9188_ACEOF
9189 case "$host_os" in
9190 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9191 *) gl_absname_cpp="$ac_cpp" ;;
9192 esac
9193
9194 case "$host_os" in
9195 mingw*)
9196 gl_dirsep_regex='[/\\]'
9197 ;;
9198 *)
9199 gl_dirsep_regex='\/'
9200 ;;
9201 esac
9202 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 9203 gl_header_literal_regex=`echo 'sys/stat.h' \
4a626d0a
PA
9204 | sed -e "$gl_make_literal_regex_sed"`
9205 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9206 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9207 s|^/[^/]|//&|
9208 p
9209 q
9210 }'
9211
6ec2e0f5 9212 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a
PA
9213 sed -n "$gl_absolute_header_sed"`
9214
6ec2e0f5
SDJ
9215 gl_header=$gl_cv_absolute_sys_stat_h
9216 gl_cv_next_sys_stat_h='"'$gl_header'"'
4a626d0a 9217 else
6ec2e0f5 9218 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
4a626d0a
PA
9219 fi
9220
9221
9222fi
6ec2e0f5
SDJ
9223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
9224$as_echo "$gl_cv_next_sys_stat_h" >&6; }
4a626d0a 9225 fi
6ec2e0f5 9226 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
4a626d0a
PA
9227
9228 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9229 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 9230 gl_next_as_first_directive='<'sys/stat.h'>'
4a626d0a
PA
9231 else
9232 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 9233 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
4a626d0a 9234 fi
6ec2e0f5 9235 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
4a626d0a
PA
9236
9237
9238
9239
9240
4a626d0a
PA
9241
9242
9243
7a6dbc2f
SDJ
9244 WINDOWS_STAT_TIMESPEC=0
9245
9246
4a626d0a
PA
9247
9248
4a626d0a 9249
4a626d0a 9250
4a626d0a 9251
4a626d0a 9252
6ec2e0f5
SDJ
9253 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
9254 #include <sys/stat.h>
9255"
d0ac1c44 9256if test "x$ac_cv_type_nlink_t" = xyes; then :
6ec2e0f5
SDJ
9257
9258else
4a626d0a 9259
6ec2e0f5
SDJ
9260$as_echo "#define nlink_t int" >>confdefs.h
9261
9262fi
9263
9264
9265
4a626d0a 9266
6ec2e0f5
SDJ
9267
9268
9269
7a6dbc2f 9270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
6ec2e0f5 9271$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
d0ac1c44 9272if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
4a626d0a
PA
9273 $as_echo_n "(cached) " >&6
9274else
6ec2e0f5
SDJ
9275 rm -f conftest.sym conftest.file
9276 echo >conftest.file
9277 if test "$cross_compiling" = yes; then :
9278 case "$host_os" in
7a6dbc2f
SDJ
9279 linux-* | linux)
9280 # Guess yes on Linux systems.
9281 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
9282 *-gnu* | gnu*)
6ec2e0f5
SDJ
9283 # Guess yes on glibc systems.
9284 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
7a6dbc2f
SDJ
9285 mingw*)
9286 # Guess no on native Windows.
9287 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
6ec2e0f5
SDJ
9288 *)
9289 # If we don't know, assume the worst.
9290 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
9291 esac
4a626d0a 9292
6ec2e0f5
SDJ
9293else
9294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9295/* end confdefs.h. */
9296$ac_includes_default
4a626d0a
PA
9297int
9298main ()
9299{
6ec2e0f5
SDJ
9300struct stat sbuf;
9301 if (symlink ("conftest.file", "conftest.sym") != 0)
9302 return 1;
9303 /* Linux will dereference the symlink and fail, as required by
9304 POSIX. That is better in the sense that it means we will not
9305 have to compile and use the lstat wrapper. */
9306 return lstat ("conftest.sym/", &sbuf) == 0;
4a626d0a
PA
9307
9308 ;
9309 return 0;
9310}
9311_ACEOF
6ec2e0f5
SDJ
9312if ac_fn_c_try_run "$LINENO"; then :
9313 gl_cv_func_lstat_dereferences_slashed_symlink=yes
4a626d0a 9314else
6ec2e0f5
SDJ
9315 gl_cv_func_lstat_dereferences_slashed_symlink=no
9316fi
9317rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9318 conftest.$ac_objext conftest.beam conftest.$ac_ext
4a626d0a 9319fi
6ec2e0f5
SDJ
9320
9321 rm -f conftest.sym conftest.file
4a626d0a
PA
9322
9323fi
6ec2e0f5
SDJ
9324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
9325$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
9326 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
9327 *yes)
4a626d0a 9328
6ec2e0f5
SDJ
9329cat >>confdefs.h <<_ACEOF
9330#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
9331_ACEOF
4a626d0a 9332
6ec2e0f5
SDJ
9333 ;;
9334 esac
9335
9336
9337
9338
9339
472fa5ee
SM
9340
9341
9342
9343 :
9344
9345
9346
9347
9348
6ec2e0f5
SDJ
9349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
9350$as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
d0ac1c44 9351if ${gl_cv_func_getcwd_null+:} false; then :
4a626d0a 9352 $as_echo_n "(cached) " >&6
6ec2e0f5
SDJ
9353else
9354 if test "$cross_compiling" = yes; then :
9355 case "$host_os" in
7a6dbc2f
SDJ
9356 # Guess yes on glibc systems.
9357 *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
9358 # Guess yes on Cygwin.
9359 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
9360 # If we don't know, assume the worst.
9361 *) gl_cv_func_getcwd_null="guessing no";;
6ec2e0f5
SDJ
9362 esac
9363
4a626d0a
PA
9364else
9365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9366/* end confdefs.h. */
9367
6ec2e0f5
SDJ
9368# include <stdlib.h>
9369# if HAVE_UNISTD_H
9370# include <unistd.h>
9371# else /* on Windows with MSVC */
9372# include <direct.h>
9373# endif
9374# ifndef getcwd
9375 char *getcwd ();
9376# endif
9377
9378int
9379main ()
9380{
9381
7a6dbc2f 9382#if defined _WIN32 && ! defined __CYGWIN__
6ec2e0f5
SDJ
9383/* mingw cwd does not start with '/', but getcwd does allocate.
9384 However, mingw fails to honor non-zero size. */
9385#else
9386 if (chdir ("/") != 0)
9387 return 1;
9388 else
9389 {
9390 char *f = getcwd (NULL, 0);
9391 if (! f)
9392 return 2;
9393 if (f[0] != '/')
7a6dbc2f 9394 { free (f); return 3; }
6ec2e0f5 9395 if (f[1] != '\0')
7a6dbc2f 9396 { free (f); return 4; }
6ec2e0f5
SDJ
9397 free (f);
9398 return 0;
9399 }
4a626d0a 9400#endif
4a626d0a 9401
6ec2e0f5
SDJ
9402 ;
9403 return 0;
9404}
9405_ACEOF
9406if ac_fn_c_try_run "$LINENO"; then :
9407 gl_cv_func_getcwd_null=yes
9408else
9409 gl_cv_func_getcwd_null=no
9410fi
9411rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9412 conftest.$ac_objext conftest.beam conftest.$ac_ext
9413fi
9414
9415fi
9416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
9417$as_echo "$gl_cv_func_getcwd_null" >&6; }
9418
9419
9420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
9421$as_echo_n "checking for getcwd with POSIX signature... " >&6; }
d0ac1c44 9422if ${gl_cv_func_getcwd_posix_signature+:} false; then :
6ec2e0f5
SDJ
9423 $as_echo_n "(cached) " >&6
9424else
9425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9426/* end confdefs.h. */
9427#include <unistd.h>
4a626d0a
PA
9428int
9429main ()
9430{
6ec2e0f5
SDJ
9431extern
9432 #ifdef __cplusplus
9433 "C"
9434 #endif
9435 char *getcwd (char *, size_t);
9436
4a626d0a
PA
9437 ;
9438 return 0;
9439}
6ec2e0f5 9440
4a626d0a
PA
9441_ACEOF
9442if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 9443 gl_cv_func_getcwd_posix_signature=yes
4a626d0a 9444else
6ec2e0f5 9445 gl_cv_func_getcwd_posix_signature=no
4a626d0a
PA
9446fi
9447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5 9448
4a626d0a 9449fi
6ec2e0f5
SDJ
9450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
9451$as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
9452
472fa5ee
SM
9453
9454 ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
d0ac1c44 9455if test "x$ac_cv_have_decl_getcwd" = xyes; then :
6ec2e0f5
SDJ
9456 ac_have_decl=1
9457else
9458 ac_have_decl=0
9459fi
9460
9461cat >>confdefs.h <<_ACEOF
9462#define HAVE_DECL_GETCWD $ac_have_decl
4a626d0a
PA
9463_ACEOF
9464
6ec2e0f5
SDJ
9465
9466
472fa5ee
SM
9467
9468
9469
9470
9471
9472 ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
d0ac1c44 9473if test "x$ac_cv_have_decl_getdtablesize" = xyes; then :
6ec2e0f5
SDJ
9474 ac_have_decl=1
9475else
9476 ac_have_decl=0
4a626d0a 9477fi
4a626d0a 9478
6ec2e0f5
SDJ
9479cat >>confdefs.h <<_ACEOF
9480#define HAVE_DECL_GETDTABLESIZE $ac_have_decl
9481_ACEOF
9482
472fa5ee
SM
9483
9484
9485 ac_fn_c_check_decl "$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default"
d0ac1c44 9486if test "x$ac_cv_have_decl_getlogin_r" = xyes; then :
6ec2e0f5
SDJ
9487 ac_have_decl=1
9488else
9489 ac_have_decl=0
9490fi
9491
9492cat >>confdefs.h <<_ACEOF
9493#define HAVE_DECL_GETLOGIN_R $ac_have_decl
9494_ACEOF
9495
9496
9497
472fa5ee
SM
9498
9499
9500
9501
9502
9503 ac_fn_c_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default"
d0ac1c44 9504if test "x$ac_cv_have_decl_getlogin" = xyes; then :
6ec2e0f5
SDJ
9505 ac_have_decl=1
9506else
9507 ac_have_decl=0
9508fi
9509
9510cat >>confdefs.h <<_ACEOF
9511#define HAVE_DECL_GETLOGIN $ac_have_decl
9512_ACEOF
9513
9514
9515
9516
7a6dbc2f
SDJ
9517 case $host_os in
9518 mingw*)
9519 LIB_GETLOGIN='-ladvapi32' ;;
9520 *)
9521 LIB_GETLOGIN= ;;
9522 esac
9523
9524
9525
9526
9527
9528
6ec2e0f5 9529
472fa5ee
SM
9530
9531
9532
9533
9534
9535
7a6dbc2f
SDJ
9536 GNULIB_GETTIMEOFDAY=0;
9537 HAVE_GETTIMEOFDAY=1;
9538 HAVE_STRUCT_TIMEVAL=1;
9539 HAVE_SYS_TIME_H=1;
9540 REPLACE_GETTIMEOFDAY=0;
9541 REPLACE_STRUCT_TIMEVAL=0;
472fa5ee 9542
6ec2e0f5
SDJ
9543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
9544$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
d0ac1c44 9545if ${ac_cv_c_restrict+:} false; then :
6ec2e0f5
SDJ
9546 $as_echo_n "(cached) " >&6
9547else
9548 ac_cv_c_restrict=no
9549 # The order here caters to the fact that C++ does not require restrict.
9550 for ac_kw in __restrict __restrict__ _Restrict restrict; do
9551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9552/* end confdefs.h. */
9553typedef int *int_ptr;
7a6dbc2f
SDJ
9554 int foo (int_ptr $ac_kw ip) { return ip[0]; }
9555 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
9556 int bar (int ip[$ac_kw]) { return ip[0]; }
6ec2e0f5
SDJ
9557
9558int
9559main ()
9560{
9561int s[1];
7a6dbc2f
SDJ
9562 int *$ac_kw t = s;
9563 t[0] = 0;
9564 return foo (t) + bar (t);
6ec2e0f5
SDJ
9565
9566 ;
9567 return 0;
9568}
9569_ACEOF
9570if ac_fn_c_try_compile "$LINENO"; then :
9571 ac_cv_c_restrict=$ac_kw
9572fi
9573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9574 test "$ac_cv_c_restrict" != no && break
9575 done
9576
9577fi
9578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
9579$as_echo "$ac_cv_c_restrict" >&6; }
9580
9581 case $ac_cv_c_restrict in
9582 restrict) ;;
9583 no) $as_echo "#define restrict /**/" >>confdefs.h
9584 ;;
9585 *) cat >>confdefs.h <<_ACEOF
9586#define restrict $ac_cv_c_restrict
9587_ACEOF
9588 ;;
9589 esac
4a626d0a
PA
9590
9591
4a626d0a
PA
9592
9593
88b48903 9594
49e4877c
PA
9595
9596
9597
9598
9599
472fa5ee
SM
9600 :
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612 :
9613
9614
49e4877c
PA
9615
9616
9617
9618
9619
9620
9621 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 9622 gl_cv_next_sys_time_h='<'sys/time.h'>'
49e4877c 9623 else
6ec2e0f5
SDJ
9624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
9625$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
d0ac1c44 9626if ${gl_cv_next_sys_time_h+:} false; then :
49e4877c
PA
9627 $as_echo_n "(cached) " >&6
9628else
9629
6ec2e0f5 9630 if test $ac_cv_header_sys_time_h = yes; then
49e4877c
PA
9631
9632
9633
9634
9635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9636/* end confdefs.h. */
6ec2e0f5 9637#include <sys/time.h>
49e4877c
PA
9638_ACEOF
9639 case "$host_os" in
9640 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9641 *) gl_absname_cpp="$ac_cpp" ;;
9642 esac
9643
9644 case "$host_os" in
9645 mingw*)
9646 gl_dirsep_regex='[/\\]'
9647 ;;
9648 *)
9649 gl_dirsep_regex='\/'
9650 ;;
9651 esac
9652 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 9653 gl_header_literal_regex=`echo 'sys/time.h' \
49e4877c
PA
9654 | sed -e "$gl_make_literal_regex_sed"`
9655 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9656 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9657 s|^/[^/]|//&|
9658 p
9659 q
9660 }'
9661
6ec2e0f5 9662 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
49e4877c
PA
9663 sed -n "$gl_absolute_header_sed"`
9664
6ec2e0f5
SDJ
9665 gl_header=$gl_cv_absolute_sys_time_h
9666 gl_cv_next_sys_time_h='"'$gl_header'"'
49e4877c 9667 else
6ec2e0f5 9668 gl_cv_next_sys_time_h='<'sys/time.h'>'
49e4877c
PA
9669 fi
9670
9671
9672fi
6ec2e0f5
SDJ
9673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
9674$as_echo "$gl_cv_next_sys_time_h" >&6; }
49e4877c 9675 fi
6ec2e0f5 9676 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
49e4877c
PA
9677
9678 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9679 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 9680 gl_next_as_first_directive='<'sys/time.h'>'
49e4877c
PA
9681 else
9682 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 9683 gl_next_as_first_directive=$gl_cv_next_sys_time_h
49e4877c 9684 fi
6ec2e0f5 9685 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
49e4877c
PA
9686
9687
9688
9689
9690
6ec2e0f5
SDJ
9691 if test $ac_cv_header_sys_time_h != yes; then
9692 HAVE_SYS_TIME_H=0
9693 fi
9694
9695
9696
9697
9698
472fa5ee
SM
9699 :
9700
9701
9702
9703
9704
6ec2e0f5
SDJ
9705 if test $ac_cv_header_sys_socket_h != yes; then
9706 for ac_header in winsock2.h
9707do :
9708 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
d0ac1c44 9709if test "x$ac_cv_header_winsock2_h" = xyes; then :
6ec2e0f5
SDJ
9710 cat >>confdefs.h <<_ACEOF
9711#define HAVE_WINSOCK2_H 1
9712_ACEOF
9713
9714fi
9715
9716done
9717
9718 fi
9719 if test "$ac_cv_header_winsock2_h" = yes; then
9720 HAVE_WINSOCK2_H=1
9721 UNISTD_H_HAVE_WINSOCK2_H=1
9722 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
9723 else
9724 HAVE_WINSOCK2_H=0
9725 fi
9726
9727
9728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
9729$as_echo_n "checking for struct timeval... " >&6; }
d0ac1c44 9730if ${gl_cv_sys_struct_timeval+:} false; then :
6ec2e0f5
SDJ
9731 $as_echo_n "(cached) " >&6
9732else
9733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9734/* end confdefs.h. */
9735#if HAVE_SYS_TIME_H
9736 #include <sys/time.h>
9737 #endif
9738 #include <time.h>
9739 #if HAVE_WINSOCK2_H
9740 # include <winsock2.h>
9741 #endif
9742
49e4877c
PA
9743int
9744main ()
9745{
6ec2e0f5 9746static struct timeval x; x.tv_sec = x.tv_usec;
49e4877c
PA
9747 ;
9748 return 0;
9749}
9750_ACEOF
9751if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 9752 gl_cv_sys_struct_timeval=yes
49e4877c 9753else
6ec2e0f5 9754 gl_cv_sys_struct_timeval=no
49e4877c
PA
9755fi
9756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49e4877c 9757
49e4877c 9758fi
6ec2e0f5
SDJ
9759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
9760$as_echo "$gl_cv_sys_struct_timeval" >&6; }
9761 if test $gl_cv_sys_struct_timeval != yes; then
9762 HAVE_STRUCT_TIMEVAL=0
9763 else
9764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
9765$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
d0ac1c44 9766if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
8690e634
JK
9767 $as_echo_n "(cached) " >&6
9768else
6ec2e0f5 9769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 9770/* end confdefs.h. */
6ec2e0f5
SDJ
9771#if HAVE_SYS_TIME_H
9772 #include <sys/time.h>
9773 #endif
9774 #include <time.h>
9775 #if HAVE_WINSOCK2_H
9776 # include <winsock2.h>
9777 #endif
8690e634 9778
8690e634
JK
9779int
9780main ()
9781{
6ec2e0f5
SDJ
9782static struct timeval x;
9783 typedef int verify_tv_sec_type[
9784 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
9785 ];
9786
8690e634
JK
9787 ;
9788 return 0;
9789}
8690e634 9790_ACEOF
6ec2e0f5
SDJ
9791if ac_fn_c_try_compile "$LINENO"; then :
9792 gl_cv_sys_struct_timeval_tv_sec=yes
8690e634 9793else
6ec2e0f5 9794 gl_cv_sys_struct_timeval_tv_sec=no
8690e634 9795fi
6ec2e0f5 9796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 9797
6ec2e0f5
SDJ
9798fi
9799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
9800$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
9801 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
9802 REPLACE_STRUCT_TIMEVAL=1
9803 fi
8690e634
JK
9804 fi
9805
9806
7a6dbc2f
SDJ
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819 NEED_LOCALTIME_BUFFER=0
9820
9821
9822 GNULIB_CTIME=0;
9823 GNULIB_MKTIME=0;
9824 GNULIB_LOCALTIME=0;
9825 GNULIB_NANOSLEEP=0;
9826 GNULIB_STRFTIME=0;
9827 GNULIB_STRPTIME=0;
9828 GNULIB_TIMEGM=0;
9829 GNULIB_TIME_R=0;
9830 GNULIB_TIME_RZ=0;
9831 GNULIB_TZSET=0;
9832 HAVE_DECL_LOCALTIME_R=1;
9833 HAVE_NANOSLEEP=1;
9834 HAVE_STRPTIME=1;
9835 HAVE_TIMEGM=1;
9836 HAVE_TZSET=1;
9837 HAVE_TIMEZONE_T=0;
9838 REPLACE_CTIME=GNULIB_PORTCHECK;
9839 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
9840 REPLACE_MKTIME=GNULIB_PORTCHECK;
9841 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
9842 REPLACE_STRFTIME=GNULIB_PORTCHECK;
9843 REPLACE_TIMEGM=GNULIB_PORTCHECK;
9844 REPLACE_TZSET=GNULIB_PORTCHECK;
9845
9846 : ${GNULIB_GETTIMEOFDAY=0};
9847 REPLACE_GMTIME=0;
9848 REPLACE_LOCALTIME=0;
9849
9850
9851 GNULIB_GLOB=0;
9852 HAVE_GLOB=1;
9853 HAVE_GLOB_PATTERN_P=1;
9854 REPLACE_GLOB=0;
9855 REPLACE_GLOB_PATTERN_P=0;
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867 :
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879 :
9880
9881
9882
9883
9884
9885
9886
9887
9888 if test $gl_cv_have_include_next = yes; then
9889 gl_cv_next_glob_h='<'glob.h'>'
9890 else
9891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <glob.h>" >&5
9892$as_echo_n "checking absolute name of <glob.h>... " >&6; }
9893if ${gl_cv_next_glob_h+:} false; then :
8690e634 9894 $as_echo_n "(cached) " >&6
8690e634 9895else
7a6dbc2f
SDJ
9896
9897 if test $ac_cv_header_glob_h = yes; then
9898
9899
9900
9901
8690e634
JK
9902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9903/* end confdefs.h. */
7a6dbc2f
SDJ
9904#include <glob.h>
9905_ACEOF
9906 case "$host_os" in
9907 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9908 *) gl_absname_cpp="$ac_cpp" ;;
9909 esac
9910
9911 case "$host_os" in
9912 mingw*)
9913 gl_dirsep_regex='[/\\]'
9914 ;;
9915 *)
9916 gl_dirsep_regex='\/'
9917 ;;
9918 esac
9919 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9920 gl_header_literal_regex=`echo 'glob.h' \
9921 | sed -e "$gl_make_literal_regex_sed"`
9922 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9923 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9924 s|^/[^/]|//&|
9925 p
9926 q
9927 }'
9928
9929 gl_cv_absolute_glob_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9930 sed -n "$gl_absolute_header_sed"`
9931
9932 gl_header=$gl_cv_absolute_glob_h
9933 gl_cv_next_glob_h='"'$gl_header'"'
9934 else
9935 gl_cv_next_glob_h='<'glob.h'>'
9936 fi
6ec2e0f5 9937
6ec2e0f5 9938
8690e634 9939fi
7a6dbc2f
SDJ
9940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_glob_h" >&5
9941$as_echo "$gl_cv_next_glob_h" >&6; }
9942 fi
9943 NEXT_GLOB_H=$gl_cv_next_glob_h
9944
9945 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9946 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9947 gl_next_as_first_directive='<'glob.h'>'
9948 else
9949 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9950 gl_next_as_first_directive=$gl_cv_next_glob_h
9951 fi
9952 NEXT_AS_FIRST_DIRECTIVE_GLOB_H=$gl_next_as_first_directive
9953
9954
9955
9956
9957
9958 if test $ac_cv_header_glob_h = yes; then
9959 HAVE_GLOB_H=1
9960 else
9961 HAVE_GLOB_H=0
9962 fi
9963
9964
9965 GLOB_H=''
9966 if false; then
9967 GLOB_H=glob.h
9968 else
9969 if test $ac_cv_header_glob_h != yes; then
9970 GLOB_H=glob.h
9971 fi
9972 fi
9973
8690e634 9974
7a6dbc2f
SDJ
9975 if test -n "$GLOB_H"; then
9976 GL_GENERATE_GLOB_H_TRUE=
9977 GL_GENERATE_GLOB_H_FALSE='#'
9978else
9979 GL_GENERATE_GLOB_H_TRUE='#'
9980 GL_GENERATE_GLOB_H_FALSE=
8690e634 9981fi
7a6dbc2f 9982
8690e634 9983
8690e634 9984
8690e634
JK
9985
9986
9987
9988
9989
9990
88b48903 9991
8690e634 9992
8690e634 9993
8690e634
JK
9994
9995
9996
9997
9998
49e4877c
PA
9999
10000
8690e634
JK
10001
10002
472fa5ee
SM
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015 :
10016
10017
10018
10019
10020
8690e634
JK
10021
10022
10023
10024 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 10025 gl_cv_next_limits_h='<'limits.h'>'
8690e634 10026 else
6ec2e0f5
SDJ
10027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
10028$as_echo_n "checking absolute name of <limits.h>... " >&6; }
d0ac1c44 10029if ${gl_cv_next_limits_h+:} false; then :
8690e634
JK
10030 $as_echo_n "(cached) " >&6
10031else
10032
6ec2e0f5 10033 if test $ac_cv_header_limits_h = yes; then
8690e634
JK
10034
10035
4a626d0a
PA
10036
10037
10038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 10039/* end confdefs.h. */
6ec2e0f5 10040#include <limits.h>
8690e634 10041_ACEOF
4a626d0a
PA
10042 case "$host_os" in
10043 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10044 *) gl_absname_cpp="$ac_cpp" ;;
10045 esac
10046
10047 case "$host_os" in
10048 mingw*)
10049 gl_dirsep_regex='[/\\]'
10050 ;;
10051 *)
10052 gl_dirsep_regex='\/'
10053 ;;
10054 esac
10055 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 10056 gl_header_literal_regex=`echo 'limits.h' \
4a626d0a
PA
10057 | sed -e "$gl_make_literal_regex_sed"`
10058 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10059 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10060 s|^/[^/]|//&|
10061 p
10062 q
10063 }'
10064
6ec2e0f5 10065 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a
PA
10066 sed -n "$gl_absolute_header_sed"`
10067
6ec2e0f5
SDJ
10068 gl_header=$gl_cv_absolute_limits_h
10069 gl_cv_next_limits_h='"'$gl_header'"'
8690e634 10070 else
6ec2e0f5 10071 gl_cv_next_limits_h='<'limits.h'>'
8690e634
JK
10072 fi
10073
10074
10075fi
6ec2e0f5
SDJ
10076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
10077$as_echo "$gl_cv_next_limits_h" >&6; }
8690e634 10078 fi
6ec2e0f5 10079 NEXT_LIMITS_H=$gl_cv_next_limits_h
8690e634
JK
10080
10081 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10082 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 10083 gl_next_as_first_directive='<'limits.h'>'
8690e634
JK
10084 else
10085 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 10086 gl_next_as_first_directive=$gl_cv_next_limits_h
8690e634 10087 fi
6ec2e0f5 10088 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
8690e634
JK
10089
10090
10091
10092
6ec2e0f5 10093
7a6dbc2f
SDJ
10094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has ULLONG_WIDTH etc." >&5
10095$as_echo_n "checking whether limits.h has ULLONG_WIDTH etc.... " >&6; }
10096if ${gl_cv_header_limits_width+:} false; then :
10097 $as_echo_n "(cached) " >&6
10098else
10099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10100/* end confdefs.h. */
10101#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
10102 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
10103 #endif
10104 #include <limits.h>
10105 int ullw = ULLONG_WIDTH;
10106int
10107main ()
10108{
10109
10110 ;
10111 return 0;
10112}
10113_ACEOF
10114if ac_fn_c_try_compile "$LINENO"; then :
10115 gl_cv_header_limits_width=yes
10116else
10117 gl_cv_header_limits_width=no
10118fi
10119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10120fi
10121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
10122$as_echo "$gl_cv_header_limits_width" >&6; }
10123 if test "$gl_cv_header_limits_width" = yes; then
10124 LIMITS_H=
10125 else
10126 LIMITS_H=limits.h
10127 fi
10128
10129 if test -n "$LIMITS_H"; then
10130 GL_GENERATE_LIMITS_H_TRUE=
10131 GL_GENERATE_LIMITS_H_FALSE='#'
10132else
10133 GL_GENERATE_LIMITS_H_TRUE='#'
10134 GL_GENERATE_LIMITS_H_FALSE=
10135fi
10136
10137
10138
10139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
10140$as_echo_n "checking for wint_t... " >&6; }
10141if ${gt_cv_c_wint_t+:} false; then :
10142 $as_echo_n "(cached) " >&6
10143else
10144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10145/* end confdefs.h. */
10146
10147/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
10148 <wchar.h>.
10149 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
10150 before <wchar.h>. */
10151#include <stddef.h>
10152#include <stdio.h>
10153#include <time.h>
10154#include <wchar.h>
10155 wint_t foo = (wchar_t)'\0';
10156int
10157main ()
10158{
10159
10160 ;
10161 return 0;
10162}
10163_ACEOF
10164if ac_fn_c_try_compile "$LINENO"; then :
10165 gt_cv_c_wint_t=yes
10166else
10167 gt_cv_c_wint_t=no
10168fi
10169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10170fi
10171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
10172$as_echo "$gt_cv_c_wint_t" >&6; }
10173 if test $gt_cv_c_wint_t = yes; then
10174
10175$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
10176
10177
10178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wint_t is too small" >&5
10179$as_echo_n "checking whether wint_t is too small... " >&6; }
10180if ${gl_cv_type_wint_t_too_small+:} false; then :
6ec2e0f5
SDJ
10181 $as_echo_n "(cached) " >&6
10182else
10183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10184/* end confdefs.h. */
7a6dbc2f
SDJ
10185
10186/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
10187 <wchar.h>.
10188 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10189 included before <wchar.h>. */
10190#if !(defined __GLIBC__ && !defined __UCLIBC__)
10191# include <stddef.h>
10192# include <stdio.h>
10193# include <time.h>
10194#endif
10195#include <wchar.h>
10196 int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
10197
6ec2e0f5
SDJ
10198int
10199main ()
10200{
10201
10202 ;
10203 return 0;
10204}
10205_ACEOF
10206if ac_fn_c_try_compile "$LINENO"; then :
7a6dbc2f 10207 gl_cv_type_wint_t_too_small=no
6ec2e0f5 10208else
7a6dbc2f 10209 gl_cv_type_wint_t_too_small=yes
6ec2e0f5
SDJ
10210fi
10211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10212fi
7a6dbc2f
SDJ
10213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_too_small" >&5
10214$as_echo "$gl_cv_type_wint_t_too_small" >&6; }
10215 if test $gl_cv_type_wint_t_too_small = yes; then
10216 GNULIB_OVERRIDES_WINT_T=1
10217 else
10218 GNULIB_OVERRIDES_WINT_T=0
10219 fi
8690e634 10220 else
7a6dbc2f 10221 GNULIB_OVERRIDES_WINT_T=0
8690e634
JK
10222 fi
10223
10224
6ec2e0f5
SDJ
10225
10226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
10227$as_echo_n "checking for unsigned long long int... " >&6; }
d0ac1c44 10228if ${ac_cv_type_unsigned_long_long_int+:} false; then :
8690e634
JK
10229 $as_echo_n "(cached) " >&6
10230else
6ec2e0f5
SDJ
10231 ac_cv_type_unsigned_long_long_int=yes
10232 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
8690e634
JK
10233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10234/* end confdefs.h. */
10235
6ec2e0f5
SDJ
10236 /* For now, do not test the preprocessor; as of 2007 there are too many
10237 implementations with broken preprocessors. Perhaps this can
10238 be revisited in 2012. In the meantime, code should not expect
10239 #if to work with literals wider than 32 bits. */
10240 /* Test literals. */
10241 long long int ll = 9223372036854775807ll;
10242 long long int nll = -9223372036854775807LL;
10243 unsigned long long int ull = 18446744073709551615ULL;
10244 /* Test constant expressions. */
10245 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
10246 ? 1 : -1)];
10247 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
10248 ? 1 : -1)];
10249 int i = 63;
10250int
10251main ()
10252{
10253/* Test availability of runtime routines for shift and division. */
10254 long long int llmax = 9223372036854775807ll;
10255 unsigned long long int ullmax = 18446744073709551615ull;
10256 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
10257 | (llmax / ll) | (llmax % ll)
10258 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
10259 | (ullmax / ull) | (ullmax % ull));
10260 ;
10261 return 0;
10262}
8690e634 10263
6ec2e0f5
SDJ
10264_ACEOF
10265if ac_fn_c_try_link "$LINENO"; then :
8690e634 10266
6ec2e0f5
SDJ
10267else
10268 ac_cv_type_unsigned_long_long_int=no
10269fi
10270rm -f core conftest.err conftest.$ac_objext \
10271 conftest$ac_exeext conftest.$ac_ext
10272 fi
10273fi
10274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
10275$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
10276 if test $ac_cv_type_unsigned_long_long_int = yes; then
8690e634 10277
6ec2e0f5 10278$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
8690e634 10279
6ec2e0f5 10280 fi
8690e634 10281
8690e634 10282
8690e634 10283
6ec2e0f5
SDJ
10284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
10285$as_echo_n "checking for long long int... " >&6; }
d0ac1c44 10286if ${ac_cv_type_long_long_int+:} false; then :
6ec2e0f5
SDJ
10287 $as_echo_n "(cached) " >&6
10288else
10289 ac_cv_type_long_long_int=yes
10290 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10291 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
10292 if test $ac_cv_type_long_long_int = yes; then
10293 if test "$cross_compiling" = yes; then :
10294 :
8690e634
JK
10295else
10296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10297/* end confdefs.h. */
6ec2e0f5
SDJ
10298#include <limits.h>
10299 #ifndef LLONG_MAX
10300 # define HALF \
10301 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
10302 # define LLONG_MAX (HALF - 1 + HALF)
10303 #endif
8690e634
JK
10304int
10305main ()
10306{
6ec2e0f5
SDJ
10307long long int n = 1;
10308 int i;
10309 for (i = 0; ; i++)
10310 {
10311 long long int m = n << i;
10312 if (m >> i != n)
10313 return 1;
10314 if (LLONG_MAX / 2 < m)
10315 break;
10316 }
10317 return 0;
8690e634
JK
10318 ;
10319 return 0;
10320}
10321_ACEOF
10322if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5
SDJ
10323
10324else
10325 ac_cv_type_long_long_int=no
8690e634
JK
10326fi
10327rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10328 conftest.$ac_objext conftest.beam conftest.$ac_ext
10329fi
10330
6ec2e0f5
SDJ
10331 fi
10332 fi
8690e634 10333fi
6ec2e0f5
SDJ
10334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
10335$as_echo "$ac_cv_type_long_long_int" >&6; }
10336 if test $ac_cv_type_long_long_int = yes; then
49e4877c 10337
6ec2e0f5 10338$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
49e4877c 10339
6ec2e0f5 10340 fi
49e4877c 10341
49e4877c
PA
10342
10343
49e4877c
PA
10344
10345
49e4877c 10346
472fa5ee
SM
10347
10348
10349
10350
10351
10352
6ec2e0f5
SDJ
10353 gl_cv_c_multiarch=no
10354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10355/* end confdefs.h. */
10356#ifndef __APPLE_CC__
10357 not a universal capable compiler
10358 #endif
10359 typedef int dummy;
49e4877c 10360
49e4877c
PA
10361_ACEOF
10362if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5
SDJ
10363
10364 arch=
10365 prev=
10366 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
10367 if test -n "$prev"; then
10368 case $word in
10369 i?86 | x86_64 | ppc | ppc64)
10370 if test -z "$arch" || test "$arch" = "$word"; then
10371 arch="$word"
10372 else
10373 gl_cv_c_multiarch=yes
10374 fi
10375 ;;
10376 esac
10377 prev=
10378 else
10379 if test "x$word" = "x-arch"; then
10380 prev=arch
10381 fi
10382 fi
10383 done
10384
49e4877c
PA
10385fi
10386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
10387 if test $gl_cv_c_multiarch = yes; then
10388 APPLE_UNIVERSAL_BUILD=1
10389 else
10390 APPLE_UNIVERSAL_BUILD=0
10391 fi
49e4877c 10392
49e4877c 10393
49e4877c
PA
10394
10395
49e4877c 10396
49e4877c 10397
49e4877c 10398
7a6dbc2f 10399
6ec2e0f5
SDJ
10400 if test $ac_cv_type_long_long_int = yes; then
10401 HAVE_LONG_LONG_INT=1
10402 else
10403 HAVE_LONG_LONG_INT=0
10404 fi
49e4877c 10405
49e4877c 10406
6ec2e0f5
SDJ
10407 if test $ac_cv_type_unsigned_long_long_int = yes; then
10408 HAVE_UNSIGNED_LONG_LONG_INT=1
8690e634 10409 else
6ec2e0f5
SDJ
10410 HAVE_UNSIGNED_LONG_LONG_INT=0
10411 fi
8690e634 10412
8690e634 10413
8690e634 10414
472fa5ee
SM
10415 :
10416
10417
10418
10419
10420
6ec2e0f5
SDJ
10421 if test $ac_cv_header_wchar_h = yes; then
10422 HAVE_WCHAR_H=1
10423 else
10424 HAVE_WCHAR_H=0
10425 fi
8690e634
JK
10426
10427
6ec2e0f5
SDJ
10428 if test $ac_cv_header_inttypes_h = yes; then
10429 HAVE_INTTYPES_H=1
10430 else
10431 HAVE_INTTYPES_H=0
10432 fi
8690e634
JK
10433
10434
6ec2e0f5
SDJ
10435 if test $ac_cv_header_sys_types_h = yes; then
10436 HAVE_SYS_TYPES_H=1
10437 else
10438 HAVE_SYS_TYPES_H=0
10439 fi
8690e634 10440
8690e634 10441
8690e634 10442
8690e634 10443
8690e634 10444
8690e634
JK
10445
10446
8690e634 10447
472fa5ee
SM
10448 :
10449
10450
10451
10452
10453
8690e634 10454
6ec2e0f5
SDJ
10455
10456
10457 if test $gl_cv_have_include_next = yes; then
10458 gl_cv_next_stdint_h='<'stdint.h'>'
10459 else
10460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
10461$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
d0ac1c44 10462if ${gl_cv_next_stdint_h+:} false; then :
8690e634
JK
10463 $as_echo_n "(cached) " >&6
10464else
8690e634 10465
6ec2e0f5 10466 if test $ac_cv_header_stdint_h = yes; then
8690e634 10467
8690e634 10468
8690e634 10469
6ec2e0f5
SDJ
10470
10471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10472/* end confdefs.h. */
10473#include <stdint.h>
8690e634 10474_ACEOF
6ec2e0f5
SDJ
10475 case "$host_os" in
10476 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10477 *) gl_absname_cpp="$ac_cpp" ;;
10478 esac
8690e634 10479
6ec2e0f5
SDJ
10480 case "$host_os" in
10481 mingw*)
10482 gl_dirsep_regex='[/\\]'
10483 ;;
10484 *)
10485 gl_dirsep_regex='\/'
10486 ;;
10487 esac
10488 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10489 gl_header_literal_regex=`echo 'stdint.h' \
10490 | sed -e "$gl_make_literal_regex_sed"`
10491 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10492 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10493 s|^/[^/]|//&|
10494 p
10495 q
10496 }'
10497
10498 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10499 sed -n "$gl_absolute_header_sed"`
10500
10501 gl_header=$gl_cv_absolute_stdint_h
10502 gl_cv_next_stdint_h='"'$gl_header'"'
10503 else
10504 gl_cv_next_stdint_h='<'stdint.h'>'
10505 fi
10506
10507
10508fi
10509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
10510$as_echo "$gl_cv_next_stdint_h" >&6; }
10511 fi
10512 NEXT_STDINT_H=$gl_cv_next_stdint_h
10513
10514 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10515 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10516 gl_next_as_first_directive='<'stdint.h'>'
10517 else
10518 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10519 gl_next_as_first_directive=$gl_cv_next_stdint_h
10520 fi
10521 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
8690e634
JK
10522
10523
10524
10525
6ec2e0f5
SDJ
10526 if test $ac_cv_header_stdint_h = yes; then
10527 HAVE_STDINT_H=1
10528 else
10529 HAVE_STDINT_H=0
10530 fi
10531
10532
10533 if test $ac_cv_header_stdint_h = yes; then
10534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
10535$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
d0ac1c44 10536if ${gl_cv_header_working_stdint_h+:} false; then :
8690e634
JK
10537 $as_echo_n "(cached) " >&6
10538else
6ec2e0f5
SDJ
10539 gl_cv_header_working_stdint_h=no
10540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
10541/* end confdefs.h. */
10542
6ec2e0f5
SDJ
10543
10544#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
10545#define __STDC_CONSTANT_MACROS 1
10546#define __STDC_LIMIT_MACROS 1
10547#include <stdint.h>
10548/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
10549#if !(defined WCHAR_MIN && defined WCHAR_MAX)
10550#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
10551#endif
10552
10553
8690e634
JK
10554 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10555 included before <wchar.h>. */
10556 #include <stddef.h>
10557 #include <signal.h>
10558 #if HAVE_WCHAR_H
10559 # include <stdio.h>
10560 # include <time.h>
10561 # include <wchar.h>
10562 #endif
10563
8690e634 10564
6ec2e0f5
SDJ
10565#ifdef INT8_MAX
10566int8_t a1 = INT8_MAX;
10567int8_t a1min = INT8_MIN;
10568#endif
10569#ifdef INT16_MAX
10570int16_t a2 = INT16_MAX;
10571int16_t a2min = INT16_MIN;
10572#endif
10573#ifdef INT32_MAX
10574int32_t a3 = INT32_MAX;
10575int32_t a3min = INT32_MIN;
10576#endif
10577#ifdef INT64_MAX
10578int64_t a4 = INT64_MAX;
10579int64_t a4min = INT64_MIN;
10580#endif
10581#ifdef UINT8_MAX
10582uint8_t b1 = UINT8_MAX;
10583#else
10584typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
10585#endif
10586#ifdef UINT16_MAX
10587uint16_t b2 = UINT16_MAX;
10588#endif
10589#ifdef UINT32_MAX
10590uint32_t b3 = UINT32_MAX;
10591#endif
10592#ifdef UINT64_MAX
10593uint64_t b4 = UINT64_MAX;
10594#endif
10595int_least8_t c1 = INT8_C (0x7f);
10596int_least8_t c1max = INT_LEAST8_MAX;
10597int_least8_t c1min = INT_LEAST8_MIN;
10598int_least16_t c2 = INT16_C (0x7fff);
10599int_least16_t c2max = INT_LEAST16_MAX;
10600int_least16_t c2min = INT_LEAST16_MIN;
10601int_least32_t c3 = INT32_C (0x7fffffff);
10602int_least32_t c3max = INT_LEAST32_MAX;
10603int_least32_t c3min = INT_LEAST32_MIN;
10604int_least64_t c4 = INT64_C (0x7fffffffffffffff);
10605int_least64_t c4max = INT_LEAST64_MAX;
10606int_least64_t c4min = INT_LEAST64_MIN;
10607uint_least8_t d1 = UINT8_C (0xff);
10608uint_least8_t d1max = UINT_LEAST8_MAX;
10609uint_least16_t d2 = UINT16_C (0xffff);
10610uint_least16_t d2max = UINT_LEAST16_MAX;
10611uint_least32_t d3 = UINT32_C (0xffffffff);
10612uint_least32_t d3max = UINT_LEAST32_MAX;
10613uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
10614uint_least64_t d4max = UINT_LEAST64_MAX;
10615int_fast8_t e1 = INT_FAST8_MAX;
10616int_fast8_t e1min = INT_FAST8_MIN;
10617int_fast16_t e2 = INT_FAST16_MAX;
10618int_fast16_t e2min = INT_FAST16_MIN;
10619int_fast32_t e3 = INT_FAST32_MAX;
10620int_fast32_t e3min = INT_FAST32_MIN;
10621int_fast64_t e4 = INT_FAST64_MAX;
10622int_fast64_t e4min = INT_FAST64_MIN;
10623uint_fast8_t f1 = UINT_FAST8_MAX;
10624uint_fast16_t f2 = UINT_FAST16_MAX;
10625uint_fast32_t f3 = UINT_FAST32_MAX;
10626uint_fast64_t f4 = UINT_FAST64_MAX;
10627#ifdef INTPTR_MAX
10628intptr_t g = INTPTR_MAX;
10629intptr_t gmin = INTPTR_MIN;
10630#endif
10631#ifdef UINTPTR_MAX
10632uintptr_t h = UINTPTR_MAX;
10633#endif
10634intmax_t i = INTMAX_MAX;
10635uintmax_t j = UINTMAX_MAX;
8690e634 10636
6ec2e0f5
SDJ
10637/* Check that SIZE_MAX has the correct type, if possible. */
10638#if 201112 <= __STDC_VERSION__
10639int k = _Generic (SIZE_MAX, size_t: 0);
10640#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
10641 || (0x5110 <= __SUNPRO_C && !__STDC__))
10642extern size_t k;
10643extern __typeof__ (SIZE_MAX) k;
10644#endif
8690e634 10645
6ec2e0f5
SDJ
10646#include <limits.h> /* for CHAR_BIT */
10647#define TYPE_MINIMUM(t) \
10648 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
10649#define TYPE_MAXIMUM(t) \
10650 ((t) ((t) 0 < (t) -1 \
10651 ? (t) -1 \
10652 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
10653struct s {
10654 int check_PTRDIFF:
10655 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
10656 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
10657 ? 1 : -1;
10658 /* Detect bug in FreeBSD 6.0 / ia64. */
10659 int check_SIG_ATOMIC:
10660 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
10661 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
10662 ? 1 : -1;
10663 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
10664 int check_WCHAR:
10665 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
10666 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
10667 ? 1 : -1;
10668 /* Detect bug in mingw. */
10669 int check_WINT:
10670 WINT_MIN == TYPE_MINIMUM (wint_t)
10671 && WINT_MAX == TYPE_MAXIMUM (wint_t)
10672 ? 1 : -1;
8690e634 10673
6ec2e0f5
SDJ
10674 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
10675 int check_UINT8_C:
10676 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
10677 int check_UINT16_C:
10678 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
8690e634 10679
6ec2e0f5
SDJ
10680 /* Detect bugs in OpenBSD 3.9 stdint.h. */
10681#ifdef UINT8_MAX
10682 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
10683#endif
10684#ifdef UINT16_MAX
10685 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
10686#endif
10687#ifdef UINT32_MAX
10688 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
10689#endif
10690#ifdef UINT64_MAX
10691 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
10692#endif
10693 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
10694 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
10695 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
10696 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
10697 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
10698 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
10699 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
10700 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
10701 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
10702 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
10703 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
10704};
8690e634 10705
8690e634
JK
10706int
10707main ()
10708{
10709
10710 ;
10711 return 0;
10712}
10713_ACEOF
10714if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 10715 if test "$cross_compiling" = yes; then :
7a6dbc2f
SDJ
10716 case "$host_os" in
10717 # Guess yes on native Windows.
10718 mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
10719 # In general, assume it works.
10720 *) gl_cv_header_working_stdint_h="guessing yes" ;;
10721 esac
8690e634 10722
6ec2e0f5
SDJ
10723else
10724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10725/* end confdefs.h. */
8690e634 10726
8690e634 10727
6ec2e0f5
SDJ
10728#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
10729#define __STDC_CONSTANT_MACROS 1
10730#define __STDC_LIMIT_MACROS 1
10731#include <stdint.h>
8690e634 10732
8690e634
JK
10733
10734 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10735 included before <wchar.h>. */
10736 #include <stddef.h>
10737 #include <signal.h>
10738 #if HAVE_WCHAR_H
10739 # include <stdio.h>
10740 # include <time.h>
10741 # include <wchar.h>
10742 #endif
10743
8690e634 10744
6ec2e0f5
SDJ
10745#include <stdio.h>
10746#include <string.h>
10747#define MVAL(macro) MVAL1(macro)
10748#define MVAL1(expression) #expression
10749static const char *macro_values[] =
10750 {
10751#ifdef INT8_MAX
10752 MVAL (INT8_MAX),
10753#endif
10754#ifdef INT16_MAX
10755 MVAL (INT16_MAX),
10756#endif
10757#ifdef INT32_MAX
10758 MVAL (INT32_MAX),
10759#endif
10760#ifdef INT64_MAX
10761 MVAL (INT64_MAX),
10762#endif
10763#ifdef UINT8_MAX
10764 MVAL (UINT8_MAX),
10765#endif
10766#ifdef UINT16_MAX
10767 MVAL (UINT16_MAX),
10768#endif
10769#ifdef UINT32_MAX
10770 MVAL (UINT32_MAX),
10771#endif
10772#ifdef UINT64_MAX
10773 MVAL (UINT64_MAX),
10774#endif
10775 NULL
10776 };
10777
10778int
10779main ()
10780{
10781
10782 const char **mv;
10783 for (mv = macro_values; *mv != NULL; mv++)
10784 {
10785 const char *value = *mv;
10786 /* Test whether it looks like a cast expression. */
10787 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
10788 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
10789 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
10790 || strncmp (value, "((int)"/*)*/, 6) == 0
10791 || strncmp (value, "((signed short)"/*)*/, 15) == 0
10792 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
10793 return mv - macro_values + 1;
10794 }
10795 return 0;
10796
10797 ;
8690e634
JK
10798 return 0;
10799}
10800_ACEOF
6ec2e0f5
SDJ
10801if ac_fn_c_try_run "$LINENO"; then :
10802 gl_cv_header_working_stdint_h=yes
8690e634 10803fi
6ec2e0f5
SDJ
10804rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10805 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 10806fi
8690e634
JK
10807
10808
6ec2e0f5
SDJ
10809fi
10810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 10811
6ec2e0f5
SDJ
10812fi
10813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
10814$as_echo "$gl_cv_header_working_stdint_h" >&6; }
8690e634
JK
10815 fi
10816
6ec2e0f5
SDJ
10817 HAVE_C99_STDINT_H=0
10818 HAVE_SYS_BITYPES_H=0
10819 HAVE_SYS_INTTYPES_H=0
10820 STDINT_H=stdint.h
7a6dbc2f
SDJ
10821 case "$gl_cv_header_working_stdint_h" in
10822 *yes)
10823 HAVE_C99_STDINT_H=1
10824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
6ec2e0f5 10825$as_echo_n "checking whether stdint.h predates C++11... " >&6; }
d0ac1c44 10826if ${gl_cv_header_stdint_predates_cxx11_h+:} false; then :
6ec2e0f5 10827 $as_echo_n "(cached) " >&6
49e4877c 10828else
6ec2e0f5 10829 gl_cv_header_stdint_predates_cxx11_h=yes
7a6dbc2f 10830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ec2e0f5 10831/* end confdefs.h. */
49e4877c
PA
10832
10833
6ec2e0f5
SDJ
10834#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
10835#include <stdint.h>
49e4877c
PA
10836
10837
6ec2e0f5
SDJ
10838 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10839 included before <wchar.h>. */
10840 #include <stddef.h>
10841 #include <signal.h>
10842 #if HAVE_WCHAR_H
10843 # include <stdio.h>
10844 # include <time.h>
10845 # include <wchar.h>
10846 #endif
49e4877c 10847
8690e634 10848
6ec2e0f5
SDJ
10849intmax_t im = INTMAX_MAX;
10850int32_t i32 = INT32_C (0x7fffffff);
8690e634 10851
6ec2e0f5
SDJ
10852int
10853main ()
10854{
8690e634 10855
6ec2e0f5
SDJ
10856 ;
10857 return 0;
10858}
10859_ACEOF
10860if ac_fn_c_try_compile "$LINENO"; then :
10861 gl_cv_header_stdint_predates_cxx11_h=no
10862fi
10863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10864fi
10865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
10866$as_echo "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
8690e634 10867
7a6dbc2f 10868 if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
8690e634 10869
6ec2e0f5 10870$as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
8690e634
JK
10871
10872
6ec2e0f5 10873$as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
8690e634 10874
7a6dbc2f
SDJ
10875 fi
10876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
6ec2e0f5 10877$as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
d0ac1c44 10878if ${gl_cv_header_stdint_width+:} false; then :
6ec2e0f5
SDJ
10879 $as_echo_n "(cached) " >&6
10880else
10881 gl_cv_header_stdint_width=no
7a6dbc2f 10882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ec2e0f5 10883/* end confdefs.h. */
8690e634 10884
7a6dbc2f
SDJ
10885 /* Work if build is not clean. */
10886 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
10887 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
10888 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
10889 #endif
10890 #include <stdint.h>
8690e634 10891
6ec2e0f5
SDJ
10892 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10893 included before <wchar.h>. */
10894 #include <stddef.h>
10895 #include <signal.h>
10896 #if HAVE_WCHAR_H
10897 # include <stdio.h>
10898 # include <time.h>
10899 # include <wchar.h>
10900 #endif
8690e634 10901
7a6dbc2f 10902 int iw = UINTMAX_WIDTH;
8690e634 10903
6ec2e0f5
SDJ
10904int
10905main ()
10906{
8690e634 10907
6ec2e0f5
SDJ
10908 ;
10909 return 0;
10910}
10911_ACEOF
10912if ac_fn_c_try_compile "$LINENO"; then :
10913 gl_cv_header_stdint_width=yes
10914fi
10915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10916fi
10917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
10918$as_echo "$gl_cv_header_stdint_width" >&6; }
7a6dbc2f
SDJ
10919 if test "$gl_cv_header_stdint_width" = yes; then
10920 STDINT_H=
10921 fi
10922 ;;
10923 *)
10924 for ac_header in sys/inttypes.h sys/bitypes.h
6ec2e0f5
SDJ
10925do :
10926 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10927ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 10928if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6ec2e0f5
SDJ
10929 cat >>confdefs.h <<_ACEOF
10930#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10931_ACEOF
8690e634 10932
6ec2e0f5 10933fi
8690e634 10934
6ec2e0f5 10935done
8690e634 10936
7a6dbc2f
SDJ
10937 if test $ac_cv_header_sys_inttypes_h = yes; then
10938 HAVE_SYS_INTTYPES_H=1
10939 fi
10940 if test $ac_cv_header_sys_bitypes_h = yes; then
10941 HAVE_SYS_BITYPES_H=1
10942 fi
8690e634
JK
10943
10944
6ec2e0f5 10945 if test $APPLE_UNIVERSAL_BUILD = 0; then
8690e634
JK
10946
10947
6ec2e0f5
SDJ
10948 for gltype in ptrdiff_t size_t ; do
10949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
10950$as_echo_n "checking for bit size of $gltype... " >&6; }
d0ac1c44 10951if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
8690e634
JK
10952 $as_echo_n "(cached) " >&6
10953else
6ec2e0f5
SDJ
10954 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
10955 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10956 included before <wchar.h>. */
10957 #include <stddef.h>
10958 #include <signal.h>
10959 #if HAVE_WCHAR_H
10960 # include <stdio.h>
10961 # include <time.h>
10962 # include <wchar.h>
10963 #endif
8690e634 10964
6ec2e0f5 10965#include <limits.h>"; then :
4a626d0a 10966
6ec2e0f5
SDJ
10967else
10968 result=unknown
10969fi
4a626d0a 10970
6ec2e0f5 10971 eval gl_cv_bitsizeof_${gltype}=\$result
4a626d0a 10972
6ec2e0f5
SDJ
10973fi
10974eval ac_res=\$gl_cv_bitsizeof_${gltype}
10975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10976$as_echo "$ac_res" >&6; }
10977 eval result=\$gl_cv_bitsizeof_${gltype}
10978 if test $result = unknown; then
10979 result=0
10980 fi
10981 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
10982 cat >>confdefs.h <<_ACEOF
10983#define BITSIZEOF_${GLTYPE} $result
10984_ACEOF
4a626d0a 10985
6ec2e0f5
SDJ
10986 eval BITSIZEOF_${GLTYPE}=\$result
10987 done
4a626d0a 10988
8690e634 10989
6ec2e0f5 10990 fi
8690e634 10991
8690e634 10992
6ec2e0f5
SDJ
10993 for gltype in sig_atomic_t wchar_t wint_t ; do
10994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
10995$as_echo_n "checking for bit size of $gltype... " >&6; }
d0ac1c44 10996if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
6ec2e0f5
SDJ
10997 $as_echo_n "(cached) " >&6
10998else
10999 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
11000 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11001 included before <wchar.h>. */
11002 #include <stddef.h>
11003 #include <signal.h>
11004 #if HAVE_WCHAR_H
11005 # include <stdio.h>
11006 # include <time.h>
11007 # include <wchar.h>
11008 #endif
8690e634 11009
6ec2e0f5
SDJ
11010#include <limits.h>"; then :
11011
11012else
11013 result=unknown
11014fi
8690e634 11015
6ec2e0f5 11016 eval gl_cv_bitsizeof_${gltype}=\$result
8690e634 11017
6ec2e0f5
SDJ
11018fi
11019eval ac_res=\$gl_cv_bitsizeof_${gltype}
11020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11021$as_echo "$ac_res" >&6; }
11022 eval result=\$gl_cv_bitsizeof_${gltype}
11023 if test $result = unknown; then
11024 result=0
11025 fi
11026 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11027 cat >>confdefs.h <<_ACEOF
11028#define BITSIZEOF_${GLTYPE} $result
11029_ACEOF
8690e634 11030
6ec2e0f5
SDJ
11031 eval BITSIZEOF_${GLTYPE}=\$result
11032 done
8690e634
JK
11033
11034
11035
11036
6ec2e0f5
SDJ
11037 for gltype in sig_atomic_t wchar_t wint_t ; do
11038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
11039$as_echo_n "checking whether $gltype is signed... " >&6; }
d0ac1c44 11040if eval \${gl_cv_type_${gltype}_signed+:} false; then :
8690e634
JK
11041 $as_echo_n "(cached) " >&6
11042else
11043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11044/* end confdefs.h. */
8690e634 11045
6ec2e0f5
SDJ
11046 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11047 included before <wchar.h>. */
11048 #include <stddef.h>
11049 #include <signal.h>
11050 #if HAVE_WCHAR_H
11051 # include <stdio.h>
11052 # include <time.h>
11053 # include <wchar.h>
11054 #endif
11055
11056 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
8690e634
JK
11057int
11058main ()
11059{
6ec2e0f5 11060
8690e634
JK
11061 ;
11062 return 0;
11063}
11064_ACEOF
11065if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 11066 result=yes
8690e634 11067else
6ec2e0f5 11068 result=no
8690e634
JK
11069fi
11070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
11071 eval gl_cv_type_${gltype}_signed=\$result
11072
8690e634 11073fi
6ec2e0f5 11074eval ac_res=\$gl_cv_type_${gltype}_signed
8690e634
JK
11075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11076$as_echo "$ac_res" >&6; }
6ec2e0f5
SDJ
11077 eval result=\$gl_cv_type_${gltype}_signed
11078 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11079 if test "$result" = yes; then
11080 cat >>confdefs.h <<_ACEOF
11081#define HAVE_SIGNED_${GLTYPE} 1
8690e634
JK
11082_ACEOF
11083
6ec2e0f5
SDJ
11084 eval HAVE_SIGNED_${GLTYPE}=1
11085 else
11086 eval HAVE_SIGNED_${GLTYPE}=0
11087 fi
11088 done
8690e634 11089
8690e634 11090
6ec2e0f5
SDJ
11091 gl_cv_type_ptrdiff_t_signed=yes
11092 gl_cv_type_size_t_signed=no
11093 if test $APPLE_UNIVERSAL_BUILD = 0; then
8690e634 11094
8690e634 11095
6ec2e0f5
SDJ
11096 for gltype in ptrdiff_t size_t ; do
11097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
11098$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
d0ac1c44 11099if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
8690e634
JK
11100 $as_echo_n "(cached) " >&6
11101else
6ec2e0f5
SDJ
11102 eval gl_cv_type_${gltype}_suffix=no
11103 eval result=\$gl_cv_type_${gltype}_signed
11104 if test "$result" = yes; then
11105 glsufu=
11106 else
11107 glsufu=u
11108 fi
11109 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
11110 case $glsuf in
11111 '') gltype1='int';;
11112 l) gltype1='long int';;
11113 ll) gltype1='long long int';;
11114 i64) gltype1='__int64';;
11115 u) gltype1='unsigned int';;
11116 ul) gltype1='unsigned long int';;
11117 ull) gltype1='unsigned long long int';;
11118 ui64)gltype1='unsigned __int64';;
11119 esac
11120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
11121/* end confdefs.h. */
11122
6ec2e0f5
SDJ
11123 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11124 included before <wchar.h>. */
11125 #include <stddef.h>
11126 #include <signal.h>
11127 #if HAVE_WCHAR_H
11128 # include <stdio.h>
11129 # include <time.h>
11130 # include <wchar.h>
11131 #endif
8690e634 11132
6ec2e0f5
SDJ
11133 extern $gltype foo;
11134 extern $gltype1 foo;
8690e634
JK
11135int
11136main ()
11137{
11138
11139 ;
11140 return 0;
11141}
11142_ACEOF
11143if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 11144 eval gl_cv_type_${gltype}_suffix=\$glsuf
8690e634
JK
11145fi
11146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
11147 eval result=\$gl_cv_type_${gltype}_suffix
11148 test "$result" != no && break
11149 done
8690e634 11150fi
6ec2e0f5
SDJ
11151eval ac_res=\$gl_cv_type_${gltype}_suffix
11152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11153$as_echo "$ac_res" >&6; }
11154 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11155 eval result=\$gl_cv_type_${gltype}_suffix
11156 test "$result" = no && result=
11157 eval ${GLTYPE}_SUFFIX=\$result
11158 cat >>confdefs.h <<_ACEOF
11159#define ${GLTYPE}_SUFFIX $result
8690e634
JK
11160_ACEOF
11161
6ec2e0f5 11162 done
8690e634
JK
11163
11164
6ec2e0f5 11165 fi
8690e634 11166
6ec2e0f5
SDJ
11167
11168 for gltype in sig_atomic_t wchar_t wint_t ; do
11169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
11170$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
d0ac1c44 11171if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
8690e634
JK
11172 $as_echo_n "(cached) " >&6
11173else
6ec2e0f5
SDJ
11174 eval gl_cv_type_${gltype}_suffix=no
11175 eval result=\$gl_cv_type_${gltype}_signed
11176 if test "$result" = yes; then
11177 glsufu=
11178 else
11179 glsufu=u
11180 fi
11181 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
11182 case $glsuf in
11183 '') gltype1='int';;
11184 l) gltype1='long int';;
11185 ll) gltype1='long long int';;
11186 i64) gltype1='__int64';;
11187 u) gltype1='unsigned int';;
11188 ul) gltype1='unsigned long int';;
11189 ull) gltype1='unsigned long long int';;
11190 ui64)gltype1='unsigned __int64';;
11191 esac
11192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 11193/* end confdefs.h. */
88b48903 11194
6ec2e0f5
SDJ
11195 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11196 included before <wchar.h>. */
11197 #include <stddef.h>
11198 #include <signal.h>
11199 #if HAVE_WCHAR_H
11200 # include <stdio.h>
11201 # include <time.h>
11202 # include <wchar.h>
11203 #endif
88b48903 11204
6ec2e0f5
SDJ
11205 extern $gltype foo;
11206 extern $gltype1 foo;
88b48903
WN
11207int
11208main ()
11209{
88b48903
WN
11210
11211 ;
11212 return 0;
11213}
11214_ACEOF
11215if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 11216 eval gl_cv_type_${gltype}_suffix=\$glsuf
8690e634 11217fi
88b48903 11218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
11219 eval result=\$gl_cv_type_${gltype}_suffix
11220 test "$result" != no && break
11221 done
8690e634 11222fi
6ec2e0f5
SDJ
11223eval ac_res=\$gl_cv_type_${gltype}_suffix
11224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11225$as_echo "$ac_res" >&6; }
11226 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11227 eval result=\$gl_cv_type_${gltype}_suffix
11228 test "$result" = no && result=
11229 eval ${GLTYPE}_SUFFIX=\$result
11230 cat >>confdefs.h <<_ACEOF
11231#define ${GLTYPE}_SUFFIX $result
88b48903 11232_ACEOF
8690e634 11233
6ec2e0f5 11234 done
8690e634
JK
11235
11236
11237
7a6dbc2f 11238 if test $GNULIB_OVERRIDES_WINT_T = 1; then
6ec2e0f5
SDJ
11239 BITSIZEOF_WINT_T=32
11240 fi
8690e634 11241
7a6dbc2f
SDJ
11242 ;;
11243 esac
11244
6ec2e0f5 11245
7a6dbc2f
SDJ
11246
11247 LIMITS_H='limits.h'
6ec2e0f5
SDJ
11248 if test -n "$LIMITS_H"; then
11249 GL_GENERATE_LIMITS_H_TRUE=
11250 GL_GENERATE_LIMITS_H_FALSE='#'
88b48903 11251else
6ec2e0f5
SDJ
11252 GL_GENERATE_LIMITS_H_TRUE='#'
11253 GL_GENERATE_LIMITS_H_FALSE=
88b48903 11254fi
8690e634
JK
11255
11256
11257
11258
11259
6ec2e0f5 11260
7a6dbc2f 11261
6ec2e0f5
SDJ
11262 if test -n "$STDINT_H"; then
11263 GL_GENERATE_STDINT_H_TRUE=
11264 GL_GENERATE_STDINT_H_FALSE='#'
11265else
11266 GL_GENERATE_STDINT_H_TRUE='#'
11267 GL_GENERATE_STDINT_H_FALSE=
88b48903 11268fi
8690e634 11269
8690e634
JK
11270
11271
11272
6ec2e0f5 11273
472fa5ee
SM
11274
11275
11276
6ec2e0f5
SDJ
11277 GNULIB_IMAXABS=0;
11278 GNULIB_IMAXDIV=0;
11279 GNULIB_STRTOIMAX=0;
11280 GNULIB_STRTOUMAX=0;
11281 HAVE_DECL_IMAXABS=1;
11282 HAVE_DECL_IMAXDIV=1;
11283 HAVE_DECL_STRTOIMAX=1;
11284 HAVE_DECL_STRTOUMAX=1;
7a6dbc2f 11285 HAVE_IMAXDIV_T=1;
6ec2e0f5
SDJ
11286 REPLACE_STRTOIMAX=0;
11287 REPLACE_STRTOUMAX=0;
11288 INT32_MAX_LT_INTMAX_MAX=1;
11289 INT64_MAX_EQ_LONG_MAX='defined _LP64';
11290 PRI_MACROS_BROKEN=0;
11291 PRIPTR_PREFIX=__PRIPTR_PREFIX;
11292 UINT32_MAX_LT_UINTMAX_MAX=1;
11293 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
11294
11295
11296
11297
472fa5ee
SM
11298 :
11299
11300
11301
11302
11303
11304
11305
6ec2e0f5
SDJ
11306
11307
11308
11309
11310
11311
472fa5ee
SM
11312 :
11313
11314
11315
6ec2e0f5
SDJ
11316
11317
11318
11319
11320
11321 if test $gl_cv_have_include_next = yes; then
11322 gl_cv_next_inttypes_h='<'inttypes.h'>'
11323 else
11324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
11325$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
d0ac1c44 11326if ${gl_cv_next_inttypes_h+:} false; then :
6ec2e0f5 11327 $as_echo_n "(cached) " >&6
88b48903 11328else
8690e634 11329
6ec2e0f5 11330 if test $ac_cv_header_inttypes_h = yes; then
8690e634
JK
11331
11332
8690e634
JK
11333
11334
6ec2e0f5
SDJ
11335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11336/* end confdefs.h. */
11337#include <inttypes.h>
88b48903 11338_ACEOF
6ec2e0f5
SDJ
11339 case "$host_os" in
11340 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11341 *) gl_absname_cpp="$ac_cpp" ;;
11342 esac
8690e634 11343
6ec2e0f5
SDJ
11344 case "$host_os" in
11345 mingw*)
11346 gl_dirsep_regex='[/\\]'
11347 ;;
11348 *)
11349 gl_dirsep_regex='\/'
88b48903
WN
11350 ;;
11351 esac
6ec2e0f5
SDJ
11352 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11353 gl_header_literal_regex=`echo 'inttypes.h' \
11354 | sed -e "$gl_make_literal_regex_sed"`
11355 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11356 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11357 s|^/[^/]|//&|
11358 p
11359 q
11360 }'
8690e634 11361
6ec2e0f5
SDJ
11362 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11363 sed -n "$gl_absolute_header_sed"`
8690e634 11364
6ec2e0f5
SDJ
11365 gl_header=$gl_cv_absolute_inttypes_h
11366 gl_cv_next_inttypes_h='"'$gl_header'"'
11367 else
11368 gl_cv_next_inttypes_h='<'inttypes.h'>'
11369 fi
88b48903 11370
88b48903 11371
88b48903 11372fi
6ec2e0f5
SDJ
11373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
11374$as_echo "$gl_cv_next_inttypes_h" >&6; }
11375 fi
11376 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
88b48903 11377
6ec2e0f5
SDJ
11378 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11379 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11380 gl_next_as_first_directive='<'inttypes.h'>'
11381 else
11382 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11383 gl_next_as_first_directive=$gl_cv_next_inttypes_h
11384 fi
11385 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
88b48903 11386
6ec2e0f5
SDJ
11387
11388
11389
11390
11391
11392
11393
6ec2e0f5 11394
6ec2e0f5
SDJ
11395
11396
11397
11398 for ac_header in inttypes.h
11399do :
11400 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
d0ac1c44 11401if test "x$ac_cv_header_inttypes_h" = xyes; then :
6ec2e0f5
SDJ
11402 cat >>confdefs.h <<_ACEOF
11403#define HAVE_INTTYPES_H 1
11404_ACEOF
11405
11406fi
11407
11408done
11409
11410 if test $ac_cv_header_inttypes_h = yes; then
11411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
11412$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
d0ac1c44 11413if ${gt_cv_inttypes_pri_broken+:} false; then :
6ec2e0f5
SDJ
11414 $as_echo_n "(cached) " >&6
11415else
11416
11417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11418/* end confdefs.h. */
11419
11420#include <inttypes.h>
11421#ifdef PRId32
11422char *p = PRId32;
11423#endif
11424
11425int
11426main ()
11427{
11428
11429 ;
11430 return 0;
11431}
11432_ACEOF
11433if ac_fn_c_try_compile "$LINENO"; then :
11434 gt_cv_inttypes_pri_broken=no
11435else
11436 gt_cv_inttypes_pri_broken=yes
11437fi
11438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11439
11440fi
11441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
11442$as_echo "$gt_cv_inttypes_pri_broken" >&6; }
11443 fi
11444 if test "$gt_cv_inttypes_pri_broken" = yes; then
11445
11446cat >>confdefs.h <<_ACEOF
11447#define PRI_MACROS_BROKEN 1
11448_ACEOF
11449
11450 PRI_MACROS_BROKEN=1
11451 else
11452 PRI_MACROS_BROKEN=0
11453 fi
11454
11455
11456
11457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
11458$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
d0ac1c44 11459if ${gl_cv_cc_double_expbit0+:} false; then :
6ec2e0f5
SDJ
11460 $as_echo_n "(cached) " >&6
11461else
11462
11463 if test "$cross_compiling" = yes; then :
11464
11465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11466/* end confdefs.h. */
11467
11468#if defined arm || defined __arm || defined __arm__
11469 mixed_endianness
11470#endif
11471
11472_ACEOF
11473if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11474 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
11475 gl_cv_cc_double_expbit0="unknown"
11476else
11477
11478 :
d0ac1c44 11479if ${ac_cv_c_bigendian+:} false; then :
6ec2e0f5
SDJ
11480 $as_echo_n "(cached) " >&6
11481else
11482 ac_cv_c_bigendian=unknown
11483 # See if we're dealing with a universal compiler.
11484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11485/* end confdefs.h. */
11486#ifndef __APPLE_CC__
11487 not a universal capable compiler
11488 #endif
11489 typedef int dummy;
11490
11491_ACEOF
11492if ac_fn_c_try_compile "$LINENO"; then :
11493
11494 # Check for potential -arch flags. It is not universal unless
11495 # there are at least two -arch flags with different values.
11496 ac_arch=
11497 ac_prev=
11498 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11499 if test -n "$ac_prev"; then
11500 case $ac_word in
11501 i?86 | x86_64 | ppc | ppc64)
11502 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11503 ac_arch=$ac_word
11504 else
11505 ac_cv_c_bigendian=universal
11506 break
11507 fi
11508 ;;
11509 esac
11510 ac_prev=
11511 elif test "x$ac_word" = "x-arch"; then
11512 ac_prev=arch
11513 fi
11514 done
11515fi
11516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11517 if test $ac_cv_c_bigendian = unknown; then
11518 # See if sys/param.h defines the BYTE_ORDER macro.
11519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11520/* end confdefs.h. */
11521#include <sys/types.h>
11522 #include <sys/param.h>
11523
11524int
11525main ()
11526{
11527#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11528 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11529 && LITTLE_ENDIAN)
11530 bogus endian macros
11531 #endif
11532
11533 ;
11534 return 0;
11535}
11536_ACEOF
11537if ac_fn_c_try_compile "$LINENO"; then :
11538 # It does; now see whether it defined to BIG_ENDIAN or not.
11539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11540/* end confdefs.h. */
11541#include <sys/types.h>
11542 #include <sys/param.h>
11543
11544int
11545main ()
11546{
11547#if BYTE_ORDER != BIG_ENDIAN
11548 not big endian
11549 #endif
11550
11551 ;
11552 return 0;
11553}
11554_ACEOF
11555if ac_fn_c_try_compile "$LINENO"; then :
11556 ac_cv_c_bigendian=yes
11557else
11558 ac_cv_c_bigendian=no
11559fi
11560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11561fi
11562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11563 fi
11564 if test $ac_cv_c_bigendian = unknown; then
11565 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11567/* end confdefs.h. */
11568#include <limits.h>
11569
11570int
88b48903
WN
11571main ()
11572{
11573#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11574 bogus endian macros
11575 #endif
11576
11577 ;
11578 return 0;
11579}
11580_ACEOF
11581if ac_fn_c_try_compile "$LINENO"; then :
11582 # It does; now see whether it defined to _BIG_ENDIAN or not.
11583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11584/* end confdefs.h. */
11585#include <limits.h>
11586
11587int
11588main ()
11589{
11590#ifndef _BIG_ENDIAN
11591 not big endian
11592 #endif
11593
11594 ;
11595 return 0;
11596}
11597_ACEOF
11598if ac_fn_c_try_compile "$LINENO"; then :
11599 ac_cv_c_bigendian=yes
11600else
11601 ac_cv_c_bigendian=no
11602fi
11603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11604fi
11605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11606 fi
11607 if test $ac_cv_c_bigendian = unknown; then
11608 # Compile a test program.
11609 if test "$cross_compiling" = yes; then :
11610 # Try to guess by grepping values from an object file.
11611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11612/* end confdefs.h. */
11613short int ascii_mm[] =
11614 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11615 short int ascii_ii[] =
11616 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11617 int use_ascii (int i) {
11618 return ascii_mm[i] + ascii_ii[i];
11619 }
11620 short int ebcdic_ii[] =
11621 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11622 short int ebcdic_mm[] =
11623 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11624 int use_ebcdic (int i) {
11625 return ebcdic_mm[i] + ebcdic_ii[i];
11626 }
11627 extern int foo;
11628
11629int
11630main ()
11631{
11632return use_ascii (foo) == use_ebcdic (foo);
11633 ;
11634 return 0;
11635}
11636_ACEOF
11637if ac_fn_c_try_compile "$LINENO"; then :
11638 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11639 ac_cv_c_bigendian=yes
11640 fi
11641 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11642 if test "$ac_cv_c_bigendian" = unknown; then
11643 ac_cv_c_bigendian=no
11644 else
11645 # finding both strings is unlikely to happen, but who knows?
11646 ac_cv_c_bigendian=unknown
11647 fi
11648 fi
11649fi
11650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11651else
11652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11653/* end confdefs.h. */
11654$ac_includes_default
11655int
11656main ()
11657{
11658
11659 /* Are we little or big endian? From Harbison&Steele. */
11660 union
11661 {
11662 long int l;
11663 char c[sizeof (long int)];
11664 } u;
11665 u.l = 1;
11666 return u.c[sizeof (long int) - 1] == 1;
11667
11668 ;
11669 return 0;
11670}
11671_ACEOF
11672if ac_fn_c_try_run "$LINENO"; then :
11673 ac_cv_c_bigendian=no
11674else
11675 ac_cv_c_bigendian=yes
11676fi
11677rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11678 conftest.$ac_objext conftest.beam conftest.$ac_ext
11679fi
11680
11681 fi
11682fi
6ec2e0f5 11683:
88b48903
WN
11684 case $ac_cv_c_bigendian in #(
11685 yes)
6ec2e0f5 11686 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
88b48903 11687 no)
6ec2e0f5 11688 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
88b48903
WN
11689 universal)
11690
11691$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11692
11693 ;; #(
11694 *)
6ec2e0f5 11695 gl_cv_cc_double_expbit0="unknown" ;;
88b48903
WN
11696 esac
11697
11698
6ec2e0f5
SDJ
11699fi
11700rm -f conftest*
88b48903 11701
2196f55f 11702
2196f55f
YQ
11703else
11704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11705/* end confdefs.h. */
2196f55f 11706
6ec2e0f5
SDJ
11707#include <float.h>
11708#include <stddef.h>
11709#include <stdio.h>
11710#include <string.h>
11711#define NWORDS \
11712 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
11713typedef union { double value; unsigned int word[NWORDS]; } memory_double;
11714static unsigned int ored_words[NWORDS];
11715static unsigned int anded_words[NWORDS];
11716static void add_to_ored_words (double x)
2196f55f 11717{
6ec2e0f5
SDJ
11718 memory_double m;
11719 size_t i;
11720 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
11721 memset (&m, 0, sizeof (memory_double));
11722 m.value = x;
11723 for (i = 0; i < NWORDS; i++)
11724 {
11725 ored_words[i] |= m.word[i];
11726 anded_words[i] &= m.word[i];
11727 }
2196f55f 11728}
6ec2e0f5 11729int main ()
88b48903 11730{
6ec2e0f5
SDJ
11731 size_t j;
11732 FILE *fp = fopen ("conftest.out", "w");
11733 if (fp == NULL)
11734 return 1;
11735 for (j = 0; j < NWORDS; j++)
11736 anded_words[j] = ~ (unsigned int) 0;
11737 add_to_ored_words (0.25);
11738 add_to_ored_words (0.5);
11739 add_to_ored_words (1.0);
11740 add_to_ored_words (2.0);
11741 add_to_ored_words (4.0);
11742 /* Remove bits that are common (e.g. if representation of the first mantissa
11743 bit is explicit). */
11744 for (j = 0; j < NWORDS; j++)
11745 ored_words[j] &= ~anded_words[j];
11746 /* Now find the nonzero word. */
11747 for (j = 0; j < NWORDS; j++)
11748 if (ored_words[j] != 0)
11749 break;
11750 if (j < NWORDS)
11751 {
11752 size_t i;
11753 for (i = j + 1; i < NWORDS; i++)
11754 if (ored_words[i] != 0)
11755 {
11756 fprintf (fp, "unknown");
11757 return (fclose (fp) != 0);
11758 }
11759 for (i = 0; ; i++)
11760 if ((ored_words[j] >> i) & 1)
11761 {
11762 fprintf (fp, "word %d bit %d", (int) j, (int) i);
11763 return (fclose (fp) != 0);
11764 }
11765 }
11766 fprintf (fp, "unknown");
11767 return (fclose (fp) != 0);
88b48903 11768}
6ec2e0f5 11769
88b48903 11770_ACEOF
6ec2e0f5
SDJ
11771if ac_fn_c_try_run "$LINENO"; then :
11772 gl_cv_cc_double_expbit0=`cat conftest.out`
88b48903 11773else
6ec2e0f5 11774 gl_cv_cc_double_expbit0="unknown"
88b48903 11775fi
6ec2e0f5
SDJ
11776rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11777 conftest.$ac_objext conftest.beam conftest.$ac_ext
11778fi
11779
11780 rm -f conftest.out
88b48903
WN
11781
11782fi
6ec2e0f5
SDJ
11783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
11784$as_echo "$gl_cv_cc_double_expbit0" >&6; }
11785 case "$gl_cv_cc_double_expbit0" in
11786 word*bit*)
11787 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
11788 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
88b48903 11789
6ec2e0f5
SDJ
11790cat >>confdefs.h <<_ACEOF
11791#define DBL_EXPBIT0_WORD $word
11792_ACEOF
88b48903 11793
88b48903 11794
6ec2e0f5
SDJ
11795cat >>confdefs.h <<_ACEOF
11796#define DBL_EXPBIT0_BIT $bit
11797_ACEOF
88b48903 11798
6ec2e0f5
SDJ
11799 ;;
11800 esac
88b48903
WN
11801
11802
6ec2e0f5
SDJ
11803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11804$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
d0ac1c44 11805if ${ac_cv_c_bigendian+:} false; then :
6ec2e0f5
SDJ
11806 $as_echo_n "(cached) " >&6
11807else
11808 ac_cv_c_bigendian=unknown
11809 # See if we're dealing with a universal compiler.
11810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11811/* end confdefs.h. */
11812#ifndef __APPLE_CC__
11813 not a universal capable compiler
11814 #endif
11815 typedef int dummy;
88b48903 11816
6ec2e0f5
SDJ
11817_ACEOF
11818if ac_fn_c_try_compile "$LINENO"; then :
88b48903 11819
6ec2e0f5
SDJ
11820 # Check for potential -arch flags. It is not universal unless
11821 # there are at least two -arch flags with different values.
11822 ac_arch=
11823 ac_prev=
11824 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11825 if test -n "$ac_prev"; then
11826 case $ac_word in
11827 i?86 | x86_64 | ppc | ppc64)
11828 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11829 ac_arch=$ac_word
11830 else
11831 ac_cv_c_bigendian=universal
11832 break
11833 fi
11834 ;;
11835 esac
11836 ac_prev=
11837 elif test "x$ac_word" = "x-arch"; then
11838 ac_prev=arch
11839 fi
11840 done
11841fi
11842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11843 if test $ac_cv_c_bigendian = unknown; then
11844 # See if sys/param.h defines the BYTE_ORDER macro.
11845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11846/* end confdefs.h. */
11847#include <sys/types.h>
11848 #include <sys/param.h>
88b48903 11849
6ec2e0f5
SDJ
11850int
11851main ()
11852{
11853#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11854 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11855 && LITTLE_ENDIAN)
11856 bogus endian macros
11857 #endif
88b48903 11858
6ec2e0f5
SDJ
11859 ;
11860 return 0;
11861}
11862_ACEOF
11863if ac_fn_c_try_compile "$LINENO"; then :
11864 # It does; now see whether it defined to BIG_ENDIAN or not.
11865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
88b48903
WN
11866/* end confdefs.h. */
11867#include <sys/types.h>
6ec2e0f5 11868 #include <sys/param.h>
8690e634
JK
11869
11870int
11871main ()
11872{
6ec2e0f5
SDJ
11873#if BYTE_ORDER != BIG_ENDIAN
11874 not big endian
11875 #endif
8690e634 11876
8690e634
JK
11877 ;
11878 return 0;
11879}
11880_ACEOF
6ec2e0f5
SDJ
11881if ac_fn_c_try_compile "$LINENO"; then :
11882 ac_cv_c_bigendian=yes
8690e634 11883else
6ec2e0f5 11884 ac_cv_c_bigendian=no
8690e634 11885fi
6ec2e0f5 11886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 11887fi
6ec2e0f5
SDJ
11888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11889 fi
11890 if test $ac_cv_c_bigendian = unknown; then
11891 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11893/* end confdefs.h. */
11894#include <limits.h>
11895
11896int
11897main ()
11898{
11899#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11900 bogus endian macros
11901 #endif
11902
11903 ;
11904 return 0;
11905}
11906_ACEOF
11907if ac_fn_c_try_compile "$LINENO"; then :
11908 # It does; now see whether it defined to _BIG_ENDIAN or not.
11909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11910/* end confdefs.h. */
11911#include <limits.h>
8690e634 11912
6ec2e0f5
SDJ
11913int
11914main ()
11915{
11916#ifndef _BIG_ENDIAN
11917 not big endian
11918 #endif
11919
11920 ;
11921 return 0;
11922}
11923_ACEOF
11924if ac_fn_c_try_compile "$LINENO"; then :
11925 ac_cv_c_bigendian=yes
11926else
11927 ac_cv_c_bigendian=no
8690e634 11928fi
6ec2e0f5
SDJ
11929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11930fi
11931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11932 fi
11933 if test $ac_cv_c_bigendian = unknown; then
11934 # Compile a test program.
11935 if test "$cross_compiling" = yes; then :
11936 # Try to guess by grepping values from an object file.
11937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11938/* end confdefs.h. */
11939short int ascii_mm[] =
11940 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11941 short int ascii_ii[] =
11942 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11943 int use_ascii (int i) {
11944 return ascii_mm[i] + ascii_ii[i];
11945 }
11946 short int ebcdic_ii[] =
11947 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11948 short int ebcdic_mm[] =
11949 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11950 int use_ebcdic (int i) {
11951 return ebcdic_mm[i] + ebcdic_ii[i];
11952 }
11953 extern int foo;
8690e634 11954
6ec2e0f5
SDJ
11955int
11956main ()
11957{
11958return use_ascii (foo) == use_ebcdic (foo);
11959 ;
11960 return 0;
11961}
11962_ACEOF
11963if ac_fn_c_try_compile "$LINENO"; then :
11964 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11965 ac_cv_c_bigendian=yes
11966 fi
11967 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11968 if test "$ac_cv_c_bigendian" = unknown; then
11969 ac_cv_c_bigendian=no
11970 else
11971 # finding both strings is unlikely to happen, but who knows?
11972 ac_cv_c_bigendian=unknown
11973 fi
11974 fi
11975fi
11976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11977else
11978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11979/* end confdefs.h. */
11980$ac_includes_default
11981int
11982main ()
11983{
8690e634 11984
6ec2e0f5
SDJ
11985 /* Are we little or big endian? From Harbison&Steele. */
11986 union
11987 {
11988 long int l;
11989 char c[sizeof (long int)];
11990 } u;
11991 u.l = 1;
11992 return u.c[sizeof (long int) - 1] == 1;
11993
11994 ;
11995 return 0;
11996}
8690e634 11997_ACEOF
6ec2e0f5
SDJ
11998if ac_fn_c_try_run "$LINENO"; then :
11999 ac_cv_c_bigendian=no
12000else
12001 ac_cv_c_bigendian=yes
12002fi
12003rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12004 conftest.$ac_objext conftest.beam conftest.$ac_ext
12005fi
12006
12007 fi
12008fi
12009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12010$as_echo "$ac_cv_c_bigendian" >&6; }
12011 case $ac_cv_c_bigendian in #(
12012 yes)
12013 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12014;; #(
12015 no)
12016 ;; #(
12017 universal)
8690e634 12018
6ec2e0f5 12019$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
8690e634 12020
6ec2e0f5
SDJ
12021 ;; #(
12022 *)
d0ac1c44 12023 as_fn_error $? "unknown endianness
6ec2e0f5
SDJ
12024 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12025 esac
8690e634 12026
6ec2e0f5
SDJ
12027
12028
12029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12030$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 12031if ${am_cv_langinfo_codeset+:} false; then :
6ec2e0f5
SDJ
12032 $as_echo_n "(cached) " >&6
12033else
12034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12035/* end confdefs.h. */
12036#include <langinfo.h>
12037int
12038main ()
12039{
12040char* cs = nl_langinfo(CODESET); return !cs;
12041 ;
12042 return 0;
12043}
8690e634 12044_ACEOF
6ec2e0f5
SDJ
12045if ac_fn_c_try_link "$LINENO"; then :
12046 am_cv_langinfo_codeset=yes
12047else
12048 am_cv_langinfo_codeset=no
12049fi
12050rm -f core conftest.err conftest.$ac_objext \
12051 conftest$ac_exeext conftest.$ac_ext
12052
12053fi
12054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12055$as_echo "$am_cv_langinfo_codeset" >&6; }
12056 if test $am_cv_langinfo_codeset = yes; then
12057
12058$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8690e634 12059
6ec2e0f5 12060 fi
8690e634 12061
472fa5ee 12062
f45c62c4
YQ
12063
12064
472fa5ee
SM
12065
12066
12067
6ec2e0f5
SDJ
12068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
12069$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
d0ac1c44 12070if ${gl_cv_func_malloc_posix+:} false; then :
f45c62c4
YQ
12071 $as_echo_n "(cached) " >&6
12072else
f45c62c4 12073
6ec2e0f5 12074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f45c62c4 12075/* end confdefs.h. */
6ec2e0f5 12076
f45c62c4
YQ
12077int
12078main ()
12079{
7a6dbc2f 12080#if defined _WIN32 && ! defined __CYGWIN__
6ec2e0f5
SDJ
12081 choke me
12082 #endif
f45c62c4
YQ
12083
12084 ;
12085 return 0;
12086}
12087_ACEOF
6ec2e0f5
SDJ
12088if ac_fn_c_try_compile "$LINENO"; then :
12089 gl_cv_func_malloc_posix=yes
f45c62c4 12090else
6ec2e0f5 12091 gl_cv_func_malloc_posix=no
f45c62c4 12092fi
6ec2e0f5 12093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6a29c58e
YQ
12094
12095fi
12096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
12097$as_echo "$gl_cv_func_malloc_posix" >&6; }
12098
12099
12100
12101 for ac_header in stdlib.h
98399780
YQ
12102do :
12103 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
d0ac1c44 12104if test "x$ac_cv_header_stdlib_h" = xyes; then :
98399780
YQ
12105 cat >>confdefs.h <<_ACEOF
12106#define HAVE_STDLIB_H 1
12107_ACEOF
12108
12109fi
12110
12111done
12112
6a29c58e 12113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
98399780 12114$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
d0ac1c44 12115if ${ac_cv_func_malloc_0_nonnull+:} false; then :
98399780
YQ
12116 $as_echo_n "(cached) " >&6
12117else
12118 if test "$cross_compiling" = yes; then :
6a29c58e
YQ
12119 case "$host_os" in
12120 # Guess yes on platforms where we know the result.
7a6dbc2f 12121 *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \
6a29c58e
YQ
12122 | hpux* | solaris* | cygwin* | mingw*)
12123 ac_cv_func_malloc_0_nonnull=yes ;;
12124 # If we don't know, assume the worst.
12125 *) ac_cv_func_malloc_0_nonnull=no ;;
12126 esac
12127
98399780
YQ
12128else
12129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12130/* end confdefs.h. */
12131#if defined STDC_HEADERS || defined HAVE_STDLIB_H
6a29c58e
YQ
12132 # include <stdlib.h>
12133 #else
12134 char *malloc ();
12135 #endif
98399780
YQ
12136
12137int
12138main ()
12139{
49e4877c
PA
12140char *p = malloc (0);
12141 int result = !p;
12142 free (p);
12143 return result;
98399780
YQ
12144 ;
12145 return 0;
12146}
6a29c58e 12147
98399780
YQ
12148_ACEOF
12149if ac_fn_c_try_run "$LINENO"; then :
12150 ac_cv_func_malloc_0_nonnull=yes
12151else
12152 ac_cv_func_malloc_0_nonnull=no
12153fi
12154rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12155 conftest.$ac_objext conftest.beam conftest.$ac_ext
12156fi
12157
6a29c58e 12158
98399780
YQ
12159fi
12160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
12161$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
6a29c58e 12162 if test $ac_cv_func_malloc_0_nonnull = yes; then :
98399780
YQ
12163 gl_cv_func_malloc_0_nonnull=1
12164else
12165 gl_cv_func_malloc_0_nonnull=0
12166fi
12167
12168
12169cat >>confdefs.h <<_ACEOF
12170#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
12171_ACEOF
12172
12173
12174
88b48903
WN
12175
12176
472fa5ee
SM
12177
12178
12179
8690e634
JK
12180 GNULIB_BTOWC=0;
12181 GNULIB_WCTOB=0;
12182 GNULIB_MBSINIT=0;
12183 GNULIB_MBRTOWC=0;
12184 GNULIB_MBRLEN=0;
12185 GNULIB_MBSRTOWCS=0;
12186 GNULIB_MBSNRTOWCS=0;
12187 GNULIB_WCRTOMB=0;
12188 GNULIB_WCSRTOMBS=0;
12189 GNULIB_WCSNRTOMBS=0;
12190 GNULIB_WCWIDTH=0;
12191 GNULIB_WMEMCHR=0;
12192 GNULIB_WMEMCMP=0;
12193 GNULIB_WMEMCPY=0;
12194 GNULIB_WMEMMOVE=0;
12195 GNULIB_WMEMSET=0;
12196 GNULIB_WCSLEN=0;
12197 GNULIB_WCSNLEN=0;
12198 GNULIB_WCSCPY=0;
12199 GNULIB_WCPCPY=0;
12200 GNULIB_WCSNCPY=0;
12201 GNULIB_WCPNCPY=0;
12202 GNULIB_WCSCAT=0;
12203 GNULIB_WCSNCAT=0;
12204 GNULIB_WCSCMP=0;
12205 GNULIB_WCSNCMP=0;
12206 GNULIB_WCSCASECMP=0;
12207 GNULIB_WCSNCASECMP=0;
12208 GNULIB_WCSCOLL=0;
12209 GNULIB_WCSXFRM=0;
12210 GNULIB_WCSDUP=0;
12211 GNULIB_WCSCHR=0;
12212 GNULIB_WCSRCHR=0;
12213 GNULIB_WCSCSPN=0;
12214 GNULIB_WCSSPN=0;
12215 GNULIB_WCSPBRK=0;
12216 GNULIB_WCSSTR=0;
12217 GNULIB_WCSTOK=0;
12218 GNULIB_WCSWIDTH=0;
7a6dbc2f 12219 GNULIB_WCSFTIME=0;
8690e634
JK
12220 HAVE_BTOWC=1;
12221 HAVE_MBSINIT=1;
12222 HAVE_MBRTOWC=1;
12223 HAVE_MBRLEN=1;
12224 HAVE_MBSRTOWCS=1;
12225 HAVE_MBSNRTOWCS=1;
12226 HAVE_WCRTOMB=1;
12227 HAVE_WCSRTOMBS=1;
12228 HAVE_WCSNRTOMBS=1;
12229 HAVE_WMEMCHR=1;
12230 HAVE_WMEMCMP=1;
12231 HAVE_WMEMCPY=1;
12232 HAVE_WMEMMOVE=1;
12233 HAVE_WMEMSET=1;
12234 HAVE_WCSLEN=1;
12235 HAVE_WCSNLEN=1;
12236 HAVE_WCSCPY=1;
12237 HAVE_WCPCPY=1;
12238 HAVE_WCSNCPY=1;
12239 HAVE_WCPNCPY=1;
12240 HAVE_WCSCAT=1;
12241 HAVE_WCSNCAT=1;
12242 HAVE_WCSCMP=1;
12243 HAVE_WCSNCMP=1;
12244 HAVE_WCSCASECMP=1;
12245 HAVE_WCSNCASECMP=1;
12246 HAVE_WCSCOLL=1;
12247 HAVE_WCSXFRM=1;
12248 HAVE_WCSDUP=1;
12249 HAVE_WCSCHR=1;
12250 HAVE_WCSRCHR=1;
12251 HAVE_WCSCSPN=1;
12252 HAVE_WCSSPN=1;
12253 HAVE_WCSPBRK=1;
12254 HAVE_WCSSTR=1;
12255 HAVE_WCSTOK=1;
12256 HAVE_WCSWIDTH=1;
7a6dbc2f 12257 HAVE_WCSFTIME=1;
8690e634
JK
12258 HAVE_DECL_WCTOB=1;
12259 HAVE_DECL_WCWIDTH=1;
12260 REPLACE_MBSTATE_T=0;
12261 REPLACE_BTOWC=0;
12262 REPLACE_WCTOB=0;
12263 REPLACE_MBSINIT=0;
12264 REPLACE_MBRTOWC=0;
12265 REPLACE_MBRLEN=0;
12266 REPLACE_MBSRTOWCS=0;
12267 REPLACE_MBSNRTOWCS=0;
12268 REPLACE_WCRTOMB=0;
12269 REPLACE_WCSRTOMBS=0;
12270 REPLACE_WCSNRTOMBS=0;
12271 REPLACE_WCWIDTH=0;
12272 REPLACE_WCSWIDTH=0;
7a6dbc2f 12273 REPLACE_WCSFTIME=0;
8690e634
JK
12274
12275
12276
12277
12278
12279
12280
12281
472fa5ee
SM
12282
12283
12284
12285
12286
12287
8690e634
JK
12288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
12289$as_echo_n "checking for a traditional japanese locale... " >&6; }
d0ac1c44 12290if ${gt_cv_locale_ja+:} false; then :
8690e634
JK
12291 $as_echo_n "(cached) " >&6
12292else
12293
12294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12295/* end confdefs.h. */
12296
12297#include <locale.h>
12298#include <time.h>
12299#if HAVE_LANGINFO_CODESET
12300# include <langinfo.h>
12301#endif
12302#include <stdlib.h>
12303#include <string.h>
12304struct tm t;
12305char buf[16];
12306int main ()
12307{
7a6dbc2f
SDJ
12308 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
12309 imitates locale dependent behaviour by looking at the environment
12310 variables, and all locales use the UTF-8 encoding. */
12311#if defined __BEOS__ || defined __HAIKU__
12312 return 1;
12313#else
8690e634 12314 /* Check whether the given locale name is recognized by the system. */
7a6dbc2f 12315# if defined _WIN32 && !defined __CYGWIN__
8690e634
JK
12316 /* On native Windows, setlocale(category, "") looks at the system settings,
12317 not at the environment variables. Also, when an encoding suffix such
12318 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
12319 category of the locale to "C". */
12320 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
12321 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
12322 return 1;
7a6dbc2f 12323# else
8690e634 12324 if (setlocale (LC_ALL, "") == NULL) return 1;
7a6dbc2f 12325# endif
8690e634
JK
12326 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
12327 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
12328 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
12329 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
12330 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
12331 some unit tests fail.
12332 On MirBSD 10, when an unsupported locale is specified, setlocale()
12333 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
7a6dbc2f 12334# if HAVE_LANGINFO_CODESET
8690e634
JK
12335 {
12336 const char *cs = nl_langinfo (CODESET);
12337 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
12338 || strcmp (cs, "UTF-8") == 0)
12339 return 1;
12340 }
7a6dbc2f
SDJ
12341# endif
12342# ifdef __CYGWIN__
8690e634
JK
12343 /* On Cygwin, avoid locale names without encoding suffix, because the
12344 locale_charset() function relies on the encoding suffix. Note that
12345 LC_ALL is set on the command line. */
12346 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
7a6dbc2f 12347# endif
8690e634
JK
12348 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
12349 on Cygwin 1.5.x. */
12350 if (MB_CUR_MAX == 1)
12351 return 1;
12352 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
12353 This excludes the UTF-8 encoding (except on MirBSD). */
7a6dbc2f
SDJ
12354 {
12355 const char *p;
12356 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
12357 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
12358 for (p = buf; *p != '\0'; p++)
12359 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
12360 return 1;
12361 }
8690e634 12362 return 0;
7a6dbc2f 12363#endif
8690e634
JK
12364}
12365
12366_ACEOF
12367 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12368 (eval $ac_link) 2>&5
12369 ac_status=$?
12370 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12371 test $ac_status = 0; } && test -s conftest$ac_exeext; then
12372 case "$host_os" in
12373 # Handle native Windows specially, because there setlocale() interprets
12374 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
12375 # "fr" or "fra" as "French" or "French_France.1252",
12376 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
12377 # "ja" as "Japanese" or "Japanese_Japan.932",
12378 # and similar.
12379 mingw*)
12380 # Note that on native Windows, the Japanese locale is
12381 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
12382 # cannot use it here.
12383 gt_cv_locale_ja=none
12384 ;;
12385 *)
12386 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
12387 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
12388 # configure script would override the LC_ALL setting. Likewise for
12389 # LC_CTYPE, which is also set at the beginning of the configure script.
12390 # Test for the AIX locale name.
12391 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12392 gt_cv_locale_ja=ja_JP
12393 else
12394 # Test for the locale name with explicit encoding suffix.
12395 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12396 gt_cv_locale_ja=ja_JP.EUC-JP
12397 else
12398 # Test for the HP-UX, OSF/1, NetBSD locale name.
12399 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12400 gt_cv_locale_ja=ja_JP.eucJP
12401 else
12402 # Test for the IRIX, FreeBSD locale name.
12403 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12404 gt_cv_locale_ja=ja_JP.EUC
12405 else
12406 # Test for the Solaris 7 locale name.
12407 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12408 gt_cv_locale_ja=ja
12409 else
12410 # Special test for NetBSD 1.6.
12411 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
12412 gt_cv_locale_ja=ja_JP.eucJP
12413 else
12414 # None found.
12415 gt_cv_locale_ja=none
12416 fi
12417 fi
12418 fi
12419 fi
12420 fi
12421 fi
12422 ;;
12423 esac
12424 fi
12425 rm -fr conftest*
12426
12427fi
12428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
12429$as_echo "$gt_cv_locale_ja" >&6; }
12430 LOCALE_JA=$gt_cv_locale_ja
12431
12432
12433
12434
12435
12436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
12437$as_echo_n "checking for a transitional chinese locale... " >&6; }
d0ac1c44 12438if ${gt_cv_locale_zh_CN+:} false; then :
8690e634
JK
12439 $as_echo_n "(cached) " >&6
12440else
12441
12442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12443/* end confdefs.h. */
12444
12445#include <locale.h>
12446#include <stdlib.h>
12447#include <time.h>
12448#if HAVE_LANGINFO_CODESET
12449# include <langinfo.h>
12450#endif
12451#include <stdlib.h>
12452#include <string.h>
12453struct tm t;
12454char buf[16];
12455int main ()
12456{
7a6dbc2f
SDJ
12457 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
12458 imitates locale dependent behaviour by looking at the environment
12459 variables, and all locales use the UTF-8 encoding. */
12460#if defined __BEOS__ || defined __HAIKU__
12461 return 1;
12462#else
8690e634 12463 /* Check whether the given locale name is recognized by the system. */
7a6dbc2f 12464# if defined _WIN32 && !defined __CYGWIN__
8690e634
JK
12465 /* On native Windows, setlocale(category, "") looks at the system settings,
12466 not at the environment variables. Also, when an encoding suffix such
12467 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
12468 category of the locale to "C". */
12469 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
12470 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
12471 return 1;
7a6dbc2f 12472# else
8690e634 12473 if (setlocale (LC_ALL, "") == NULL) return 1;
7a6dbc2f 12474# endif
8690e634
JK
12475 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
12476 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
12477 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
12478 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
12479 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
12480 some unit tests fail.
12481 On MirBSD 10, when an unsupported locale is specified, setlocale()
12482 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
7a6dbc2f 12483# if HAVE_LANGINFO_CODESET
8690e634
JK
12484 {
12485 const char *cs = nl_langinfo (CODESET);
12486 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
12487 || strcmp (cs, "UTF-8") == 0)
12488 return 1;
12489 }
7a6dbc2f
SDJ
12490# endif
12491# ifdef __CYGWIN__
8690e634
JK
12492 /* On Cygwin, avoid locale names without encoding suffix, because the
12493 locale_charset() function relies on the encoding suffix. Note that
12494 LC_ALL is set on the command line. */
12495 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
7a6dbc2f 12496# endif
8690e634
JK
12497 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
12498 This excludes the UTF-8 encoding (except on MirBSD). */
7a6dbc2f
SDJ
12499 {
12500 const char *p;
12501 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
12502 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
12503 for (p = buf; *p != '\0'; p++)
12504 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
12505 return 1;
12506 }
8690e634
JK
12507 /* Check whether a typical GB18030 multibyte sequence is recognized as a
12508 single wide character. This excludes the GB2312 and GBK encodings. */
12509 if (mblen ("\203\062\332\066", 5) != 4)
12510 return 1;
12511 return 0;
7a6dbc2f 12512#endif
8690e634
JK
12513}
12514
12515_ACEOF
12516 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12517 (eval $ac_link) 2>&5
12518 ac_status=$?
12519 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12520 test $ac_status = 0; } && test -s conftest$ac_exeext; then
12521 case "$host_os" in
12522 # Handle native Windows specially, because there setlocale() interprets
12523 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
12524 # "fr" or "fra" as "French" or "French_France.1252",
12525 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
12526 # "ja" as "Japanese" or "Japanese_Japan.932",
12527 # and similar.
12528 mingw*)
12529 # Test for the hypothetical native Windows locale name.
12530 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12531 gt_cv_locale_zh_CN=Chinese_China.54936
12532 else
12533 # None found.
12534 gt_cv_locale_zh_CN=none
12535 fi
12536 ;;
12537 solaris2.8)
12538 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
12539 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
12540 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
12541 gt_cv_locale_zh_CN=none
12542 ;;
12543 *)
12544 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
12545 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
12546 # configure script would override the LC_ALL setting. Likewise for
12547 # LC_CTYPE, which is also set at the beginning of the configure script.
12548 # Test for the locale name without encoding suffix.
12549 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12550 gt_cv_locale_zh_CN=zh_CN
12551 else
12552 # Test for the locale name with explicit encoding suffix.
12553 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12554 gt_cv_locale_zh_CN=zh_CN.GB18030
12555 else
12556 # None found.
12557 gt_cv_locale_zh_CN=none
12558 fi
12559 fi
12560 ;;
12561 esac
12562 else
12563 # If there was a link error, due to mblen(), the system is so old that
12564 # it certainly doesn't have a chinese locale.
12565 gt_cv_locale_zh_CN=none
12566 fi
12567 rm -fr conftest*
12568
12569fi
12570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
12571$as_echo "$gt_cv_locale_zh_CN" >&6; }
12572 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
12573
12574
12575
12576
12577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
12578$as_echo_n "checking for a french Unicode locale... " >&6; }
d0ac1c44 12579if ${gt_cv_locale_fr_utf8+:} false; then :
8690e634
JK
12580 $as_echo_n "(cached) " >&6
12581else
12582
12583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12584/* end confdefs.h. */
12585
12586#include <locale.h>
12587#include <time.h>
12588#if HAVE_LANGINFO_CODESET
12589# include <langinfo.h>
12590#endif
12591#include <stdlib.h>
12592#include <string.h>
12593struct tm t;
12594char buf[16];
12595int main () {
12596 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
12597 imitates locale dependent behaviour by looking at the environment
12598 variables, and all locales use the UTF-8 encoding. */
12599#if !(defined __BEOS__ || defined __HAIKU__)
12600 /* Check whether the given locale name is recognized by the system. */
7a6dbc2f 12601# if defined _WIN32 && !defined __CYGWIN__
8690e634
JK
12602 /* On native Windows, setlocale(category, "") looks at the system settings,
12603 not at the environment variables. Also, when an encoding suffix such
12604 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
12605 category of the locale to "C". */
12606 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
12607 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
12608 return 1;
12609# else
12610 if (setlocale (LC_ALL, "") == NULL) return 1;
12611# endif
12612 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
12613 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
12614 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
12615 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
12616 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
12617 some unit tests fail. */
12618# if HAVE_LANGINFO_CODESET
12619 {
12620 const char *cs = nl_langinfo (CODESET);
12621 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
12622 return 1;
12623 }
12624# endif
12625# ifdef __CYGWIN__
12626 /* On Cygwin, avoid locale names without encoding suffix, because the
12627 locale_charset() function relies on the encoding suffix. Note that
12628 LC_ALL is set on the command line. */
12629 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
12630# endif
12631 /* Check whether in the abbreviation of the second month, the second
12632 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
12633 two bytes long, with UTF-8 encoding. */
12634 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
12635 if (strftime (buf, sizeof (buf), "%b", &t) < 4
12636 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
12637 return 1;
12638#endif
12639#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
12640 /* Check whether the decimal separator is a comma.
12641 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
12642 are nl_langinfo(RADIXCHAR) are both ".". */
12643 if (localeconv () ->decimal_point[0] != ',') return 1;
12644#endif
12645 return 0;
12646}
12647
12648_ACEOF
12649 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12650 (eval $ac_link) 2>&5
12651 ac_status=$?
12652 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12653 test $ac_status = 0; } && test -s conftest$ac_exeext; then
12654 case "$host_os" in
12655 # Handle native Windows specially, because there setlocale() interprets
12656 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
12657 # "fr" or "fra" as "French" or "French_France.1252",
12658 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
12659 # "ja" as "Japanese" or "Japanese_Japan.932",
12660 # and similar.
12661 mingw*)
12662 # Test for the hypothetical native Windows locale name.
12663 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12664 gt_cv_locale_fr_utf8=French_France.65001
12665 else
12666 # None found.
12667 gt_cv_locale_fr_utf8=none
12668 fi
12669 ;;
12670 *)
12671 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
12672 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
12673 # configure script would override the LC_ALL setting. Likewise for
12674 # LC_CTYPE, which is also set at the beginning of the configure script.
12675 # Test for the usual locale name.
12676 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12677 gt_cv_locale_fr_utf8=fr_FR
12678 else
12679 # Test for the locale name with explicit encoding suffix.
12680 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12681 gt_cv_locale_fr_utf8=fr_FR.UTF-8
12682 else
12683 # Test for the Solaris 7 locale name.
12684 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12685 gt_cv_locale_fr_utf8=fr.UTF-8
12686 else
12687 # None found.
12688 gt_cv_locale_fr_utf8=none
12689 fi
12690 fi
12691 fi
12692 ;;
12693 esac
12694 fi
12695 rm -fr conftest*
12696
12697fi
12698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
12699$as_echo "$gt_cv_locale_fr_utf8" >&6; }
12700 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
12701
12702
7a6dbc2f
SDJ
12703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12704$as_echo_n "checking for inline... " >&6; }
12705if ${ac_cv_c_inline+:} false; then :
12706 $as_echo_n "(cached) " >&6
12707else
12708 ac_cv_c_inline=no
12709for ac_kw in inline __inline__ __inline; do
12710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12711/* end confdefs.h. */
12712#ifndef __cplusplus
12713typedef int foo_t;
12714static $ac_kw foo_t static_foo () {return 0; }
12715$ac_kw foo_t foo () {return 0; }
12716#endif
12717
12718_ACEOF
12719if ac_fn_c_try_compile "$LINENO"; then :
12720 ac_cv_c_inline=$ac_kw
12721fi
12722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12723 test "$ac_cv_c_inline" != no && break
12724done
12725
12726fi
12727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12728$as_echo "$ac_cv_c_inline" >&6; }
12729
12730case $ac_cv_c_inline in
12731 inline | yes) ;;
12732 *)
12733 case $ac_cv_c_inline in
12734 no) ac_val=;;
12735 *) ac_val=$ac_cv_c_inline;;
12736 esac
12737 cat >>confdefs.h <<_ACEOF
12738#ifndef __cplusplus
12739#define inline $ac_val
12740#endif
12741_ACEOF
12742 ;;
12743esac
12744
8690e634
JK
12745
12746
12747
12748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
12749$as_echo_n "checking for a traditional french locale... " >&6; }
d0ac1c44 12750if ${gt_cv_locale_fr+:} false; then :
8690e634
JK
12751 $as_echo_n "(cached) " >&6
12752else
12753
12754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12755/* end confdefs.h. */
12756
12757#include <locale.h>
12758#include <time.h>
12759#if HAVE_LANGINFO_CODESET
12760# include <langinfo.h>
12761#endif
12762#include <stdlib.h>
12763#include <string.h>
12764struct tm t;
12765char buf[16];
12766int main () {
7a6dbc2f
SDJ
12767 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
12768 imitates locale dependent behaviour by looking at the environment
12769 variables, and all locales use the UTF-8 encoding. */
12770#if defined __BEOS__ || defined __HAIKU__
12771 return 1;
12772#else
8690e634 12773 /* Check whether the given locale name is recognized by the system. */
7a6dbc2f 12774# if defined _WIN32 && !defined __CYGWIN__
8690e634
JK
12775 /* On native Windows, setlocale(category, "") looks at the system settings,
12776 not at the environment variables. Also, when an encoding suffix such
12777 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
12778 category of the locale to "C". */
12779 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
12780 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
12781 return 1;
7a6dbc2f 12782# else
8690e634 12783 if (setlocale (LC_ALL, "") == NULL) return 1;
7a6dbc2f 12784# endif
8690e634
JK
12785 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
12786 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
12787 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
12788 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
12789 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
12790 some unit tests fail.
12791 On MirBSD 10, when an unsupported locale is specified, setlocale()
12792 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
7a6dbc2f 12793# if HAVE_LANGINFO_CODESET
8690e634
JK
12794 {
12795 const char *cs = nl_langinfo (CODESET);
12796 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
12797 || strcmp (cs, "UTF-8") == 0)
12798 return 1;
12799 }
7a6dbc2f
SDJ
12800# endif
12801# ifdef __CYGWIN__
8690e634
JK
12802 /* On Cygwin, avoid locale names without encoding suffix, because the
12803 locale_charset() function relies on the encoding suffix. Note that
12804 LC_ALL is set on the command line. */
12805 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
7a6dbc2f 12806# endif
8690e634
JK
12807 /* Check whether in the abbreviation of the second month, the second
12808 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
12809 one byte long. This excludes the UTF-8 encoding. */
12810 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
12811 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
7a6dbc2f 12812# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
8690e634
JK
12813 /* Check whether the decimal separator is a comma.
12814 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
12815 are nl_langinfo(RADIXCHAR) are both ".". */
12816 if (localeconv () ->decimal_point[0] != ',') return 1;
7a6dbc2f 12817# endif
8690e634 12818 return 0;
7a6dbc2f 12819#endif
8690e634
JK
12820}
12821
12822_ACEOF
12823 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12824 (eval $ac_link) 2>&5
12825 ac_status=$?
12826 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12827 test $ac_status = 0; } && test -s conftest$ac_exeext; then
12828 case "$host_os" in
12829 # Handle native Windows specially, because there setlocale() interprets
12830 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
12831 # "fr" or "fra" as "French" or "French_France.1252",
12832 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
12833 # "ja" as "Japanese" or "Japanese_Japan.932",
12834 # and similar.
12835 mingw*)
12836 # Test for the native Windows locale name.
12837 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12838 gt_cv_locale_fr=French_France.1252
12839 else
12840 # None found.
12841 gt_cv_locale_fr=none
12842 fi
12843 ;;
12844 *)
12845 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
12846 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
12847 # configure script would override the LC_ALL setting. Likewise for
12848 # LC_CTYPE, which is also set at the beginning of the configure script.
12849 # Test for the usual locale name.
12850 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12851 gt_cv_locale_fr=fr_FR
12852 else
12853 # Test for the locale name with explicit encoding suffix.
12854 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12855 gt_cv_locale_fr=fr_FR.ISO-8859-1
12856 else
12857 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
12858 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12859 gt_cv_locale_fr=fr_FR.ISO8859-1
12860 else
12861 # Test for the HP-UX locale name.
12862 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12863 gt_cv_locale_fr=fr_FR.iso88591
12864 else
12865 # Test for the Solaris 7 locale name.
12866 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12867 gt_cv_locale_fr=fr
12868 else
12869 # None found.
12870 gt_cv_locale_fr=none
12871 fi
12872 fi
12873 fi
12874 fi
12875 fi
12876 ;;
12877 esac
12878 fi
12879 rm -fr conftest*
12880
12881fi
6ec2e0f5
SDJ
12882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
12883$as_echo "$gt_cv_locale_fr" >&6; }
12884 LOCALE_FR=$gt_cv_locale_fr
12885
12886
12887
12888
12889
12890
12891
472fa5ee
SM
12892
12893
12894
12895
12896
12897
7a6dbc2f 12898 GNULIB_EXPLICIT_BZERO=0;
472fa5ee
SM
12899 GNULIB_FFSL=0;
12900 GNULIB_FFSLL=0;
6ec2e0f5
SDJ
12901 GNULIB_MEMCHR=0;
12902 GNULIB_MEMMEM=0;
12903 GNULIB_MEMPCPY=0;
12904 GNULIB_MEMRCHR=0;
12905 GNULIB_RAWMEMCHR=0;
12906 GNULIB_STPCPY=0;
12907 GNULIB_STPNCPY=0;
12908 GNULIB_STRCHRNUL=0;
12909 GNULIB_STRDUP=0;
12910 GNULIB_STRNCAT=0;
12911 GNULIB_STRNDUP=0;
12912 GNULIB_STRNLEN=0;
12913 GNULIB_STRPBRK=0;
12914 GNULIB_STRSEP=0;
12915 GNULIB_STRSTR=0;
12916 GNULIB_STRCASESTR=0;
12917 GNULIB_STRTOK_R=0;
12918 GNULIB_MBSLEN=0;
12919 GNULIB_MBSNLEN=0;
12920 GNULIB_MBSCHR=0;
12921 GNULIB_MBSRCHR=0;
12922 GNULIB_MBSSTR=0;
12923 GNULIB_MBSCASECMP=0;
12924 GNULIB_MBSNCASECMP=0;
12925 GNULIB_MBSPCASECMP=0;
12926 GNULIB_MBSCASESTR=0;
12927 GNULIB_MBSCSPN=0;
12928 GNULIB_MBSPBRK=0;
12929 GNULIB_MBSSPN=0;
12930 GNULIB_MBSSEP=0;
12931 GNULIB_MBSTOK_R=0;
12932 GNULIB_STRERROR=0;
12933 GNULIB_STRERROR_R=0;
12934 GNULIB_STRSIGNAL=0;
12935 GNULIB_STRVERSCMP=0;
12936 HAVE_MBSLEN=0;
7a6dbc2f
SDJ
12937 HAVE_EXPLICIT_BZERO=1;
12938 HAVE_FFSL=1;
6ec2e0f5
SDJ
12939 HAVE_FFSLL=1;
12940 HAVE_MEMCHR=1;
12941 HAVE_DECL_MEMMEM=1;
12942 HAVE_MEMPCPY=1;
12943 HAVE_DECL_MEMRCHR=1;
12944 HAVE_RAWMEMCHR=1;
12945 HAVE_STPCPY=1;
12946 HAVE_STPNCPY=1;
12947 HAVE_STRCHRNUL=1;
12948 HAVE_DECL_STRDUP=1;
12949 HAVE_DECL_STRNDUP=1;
12950 HAVE_DECL_STRNLEN=1;
12951 HAVE_STRPBRK=1;
12952 HAVE_STRSEP=1;
12953 HAVE_STRCASESTR=1;
12954 HAVE_DECL_STRTOK_R=1;
12955 HAVE_DECL_STRERROR_R=1;
12956 HAVE_DECL_STRSIGNAL=1;
12957 HAVE_STRVERSCMP=1;
12958 REPLACE_MEMCHR=0;
12959 REPLACE_MEMMEM=0;
12960 REPLACE_STPNCPY=0;
7a6dbc2f 12961 REPLACE_STRCHRNUL=0;
6ec2e0f5 12962 REPLACE_STRDUP=0;
7a6dbc2f
SDJ
12963 REPLACE_STRNCAT=0;
12964 REPLACE_STRNDUP=0;
12965 REPLACE_STRNLEN=0;
6ec2e0f5
SDJ
12966 REPLACE_STRSTR=0;
12967 REPLACE_STRCASESTR=0;
7a6dbc2f 12968 REPLACE_STRTOK_R=0;
6ec2e0f5
SDJ
12969 REPLACE_STRERROR=0;
12970 REPLACE_STRERROR_R=0;
6ec2e0f5 12971 REPLACE_STRSIGNAL=0;
6ec2e0f5
SDJ
12972 UNDEFINE_STRTOK_R=0;
12973
12974
12975
12976
12977
7a6dbc2f 12978
6ec2e0f5
SDJ
12979 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
12980 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
12981 # irrelevant for anonymous mappings.
12982 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
d0ac1c44 12983if test "x$ac_cv_func_mmap" = xyes; then :
6ec2e0f5
SDJ
12984 gl_have_mmap=yes
12985else
12986 gl_have_mmap=no
12987fi
12988
12989
12990 # Try to allow MAP_ANONYMOUS.
12991 gl_have_mmap_anonymous=no
12992 if test $gl_have_mmap = yes; then
12993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
12994$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
12995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12996/* end confdefs.h. */
12997
12998#include <sys/mman.h>
12999#ifdef MAP_ANONYMOUS
13000 I cannot identify this map
13001#endif
13002
13003_ACEOF
13004if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13005 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
13006 gl_have_mmap_anonymous=yes
13007fi
13008rm -f conftest*
13009
13010 if test $gl_have_mmap_anonymous != yes; then
13011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13012/* end confdefs.h. */
13013
13014#include <sys/mman.h>
13015#ifdef MAP_ANON
13016 I cannot identify this map
13017#endif
13018
13019_ACEOF
13020if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13021 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
13022
13023$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
13024
13025 gl_have_mmap_anonymous=yes
13026fi
13027rm -f conftest*
13028
13029 fi
13030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
13031$as_echo "$gl_have_mmap_anonymous" >&6; }
13032 if test $gl_have_mmap_anonymous = yes; then
13033
13034$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
13035
13036 fi
13037 fi
13038
13039
472fa5ee
SM
13040 :
13041
13042
13043
13044
13045
13046
13047 :
13048
13049
13050
13051
6ec2e0f5
SDJ
13052
13053
13054
13055
13056 if test $HAVE_MEMCHR = 1; then
13057 # Detect platform-specific bugs in some versions of glibc:
13058 # memchr should not dereference anything with length 0
7a6dbc2f 13059 # https://bugzilla.redhat.com/show_bug.cgi?id=499689
6ec2e0f5 13060 # memchr should not dereference overestimated length after a match
7a6dbc2f
SDJ
13061 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
13062 # https://sourceware.org/bugzilla/show_bug.cgi?id=10162
6ec2e0f5
SDJ
13063 # Assume that memchr works on platforms that lack mprotect.
13064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
13065$as_echo_n "checking whether memchr works... " >&6; }
d0ac1c44 13066if ${gl_cv_func_memchr_works+:} false; then :
6ec2e0f5
SDJ
13067 $as_echo_n "(cached) " >&6
13068else
13069 if test "$cross_compiling" = yes; then :
7a6dbc2f
SDJ
13070 case "$host_os" in
13071 # Guess yes on native Windows.
13072 mingw*) gl_cv_func_memchr_works="guessing yes" ;;
13073 # Be pessimistic for now.
13074 *) gl_cv_func_memchr_works="guessing no" ;;
13075 esac
13076
6ec2e0f5
SDJ
13077else
13078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13079/* end confdefs.h. */
13080
13081#include <string.h>
13082#if HAVE_SYS_MMAN_H
13083# include <fcntl.h>
13084# include <unistd.h>
13085# include <sys/types.h>
13086# include <sys/mman.h>
13087# ifndef MAP_FILE
13088# define MAP_FILE 0
13089# endif
13090#endif
13091
13092int
13093main ()
13094{
13095
13096 int result = 0;
13097 char *fence = NULL;
13098#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
13099# if HAVE_MAP_ANONYMOUS
13100 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
13101 const int fd = -1;
13102# else /* !HAVE_MAP_ANONYMOUS */
13103 const int flags = MAP_FILE | MAP_PRIVATE;
13104 int fd = open ("/dev/zero", O_RDONLY, 0666);
13105 if (fd >= 0)
13106# endif
13107 {
13108 int pagesize = getpagesize ();
13109 char *two_pages =
13110 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
13111 flags, fd, 0);
13112 if (two_pages != (char *)(-1)
13113 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
13114 fence = two_pages + pagesize;
13115 }
13116#endif
13117 if (fence)
13118 {
13119 if (memchr (fence, 0, 0))
13120 result |= 1;
13121 strcpy (fence - 9, "12345678");
13122 if (memchr (fence - 9, 0, 79) != fence - 1)
13123 result |= 2;
13124 if (memchr (fence - 1, 0, 3) != fence - 1)
13125 result |= 4;
13126 }
13127 return result;
13128
13129 ;
13130 return 0;
13131}
13132_ACEOF
13133if ac_fn_c_try_run "$LINENO"; then :
13134 gl_cv_func_memchr_works=yes
13135else
13136 gl_cv_func_memchr_works=no
13137fi
13138rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13139 conftest.$ac_objext conftest.beam conftest.$ac_ext
13140fi
13141
7a6dbc2f 13142
6ec2e0f5
SDJ
13143fi
13144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
13145$as_echo "$gl_cv_func_memchr_works" >&6; }
7a6dbc2f
SDJ
13146 case "$gl_cv_func_memchr_works" in
13147 *yes) ;;
13148 *) REPLACE_MEMCHR=1 ;;
13149 esac
6ec2e0f5
SDJ
13150 fi
13151
472fa5ee
SM
13152
13153 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
d0ac1c44 13154if test "x$ac_cv_have_decl_memmem" = xyes; then :
6ec2e0f5
SDJ
13155 ac_have_decl=1
13156else
13157 ac_have_decl=0
13158fi
13159
13160cat >>confdefs.h <<_ACEOF
13161#define HAVE_DECL_MEMMEM $ac_have_decl
13162_ACEOF
13163
13164
13165
13166
13167
472fa5ee 13168
6ec2e0f5
SDJ
13169 for ac_func in memmem
13170do :
13171 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
d0ac1c44 13172if test "x$ac_cv_func_memmem" = xyes; then :
6ec2e0f5
SDJ
13173 cat >>confdefs.h <<_ACEOF
13174#define HAVE_MEMMEM 1
13175_ACEOF
13176
13177fi
13178done
13179
13180 if test $ac_cv_func_memmem = yes; then
13181 HAVE_MEMMEM=1
13182 else
13183 HAVE_MEMMEM=0
13184 fi
13185
472fa5ee
SM
13186 :
13187
13188
13189
13190
13191
6ec2e0f5
SDJ
13192 if test $ac_cv_have_decl_memmem = no; then
13193 HAVE_DECL_MEMMEM=0
13194 else
13195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
13196$as_echo_n "checking whether memmem works... " >&6; }
d0ac1c44 13197if ${gl_cv_func_memmem_works_always+:} false; then :
6ec2e0f5
SDJ
13198 $as_echo_n "(cached) " >&6
13199else
13200 if test "$cross_compiling" = yes; then :
13201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13202/* end confdefs.h. */
13203
13204#ifdef __GNU_LIBRARY__
13205 #include <features.h>
13206 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
13207 || __GLIBC_MINOR__ > 12)) \
13208 || (__GLIBC__ > 2)) \
13209 || defined __UCLIBC__
13210 Lucky user
13211 #endif
13212#elif defined __CYGWIN__
13213 #include <cygwin/version.h>
13214 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
13215 Lucky user
13216 #endif
13217#else
13218 Lucky user
13219#endif
13220
13221_ACEOF
13222if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13223 $EGREP "Lucky user" >/dev/null 2>&1; then :
13224 gl_cv_func_memmem_works_always="guessing yes"
13225else
13226 gl_cv_func_memmem_works_always="guessing no"
13227fi
13228rm -f conftest*
13229
13230
13231else
13232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13233/* end confdefs.h. */
13234
13235#include <string.h> /* for memmem */
13236#define P "_EF_BF_BD"
13237#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
13238#define NEEDLE P P P P P
13239
13240int
13241main ()
13242{
13243
13244 int result = 0;
13245 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
13246 result |= 1;
13247 /* Check for empty needle behavior. */
13248 {
13249 const char *haystack = "AAA";
13250 if (memmem (haystack, 3, NULL, 0) != haystack)
13251 result |= 2;
13252 }
13253 return result;
13254
13255 ;
13256 return 0;
13257}
13258_ACEOF
13259if ac_fn_c_try_run "$LINENO"; then :
13260 gl_cv_func_memmem_works_always=yes
13261else
13262 gl_cv_func_memmem_works_always=no
13263fi
13264rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13265 conftest.$ac_objext conftest.beam conftest.$ac_ext
13266fi
13267
13268
13269fi
13270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
13271$as_echo "$gl_cv_func_memmem_works_always" >&6; }
13272 case "$gl_cv_func_memmem_works_always" in
13273 *yes) ;;
13274 *)
13275 REPLACE_MEMMEM=1
13276 ;;
13277 esac
13278 fi
13279 :
13280
472fa5ee
SM
13281
13282 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
d0ac1c44 13283if test "x$ac_cv_have_decl_memrchr" = xyes; then :
6ec2e0f5
SDJ
13284 ac_have_decl=1
13285else
13286 ac_have_decl=0
13287fi
13288
13289cat >>confdefs.h <<_ACEOF
13290#define HAVE_DECL_MEMRCHR $ac_have_decl
13291_ACEOF
13292
13293
13294
13295
13296
13297
2d8adcbd
MM
13298
13299
472fa5ee
SM
13300
13301
13302
7a6dbc2f
SDJ
13303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
13304$as_echo_n "checking for O_CLOEXEC... " >&6; }
13305if ${gl_cv_macro_O_CLOEXEC+:} false; then :
13306 $as_echo_n "(cached) " >&6
13307else
13308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13309/* end confdefs.h. */
13310#include <fcntl.h>
13311 #ifndef O_CLOEXEC
13312 choke me;
13313 #endif
13314
13315int
13316main ()
13317{
13318return O_CLOEXEC;
13319 ;
13320 return 0;
13321}
13322_ACEOF
13323if ac_fn_c_try_compile "$LINENO"; then :
13324 gl_cv_macro_O_CLOEXEC=yes
13325else
13326 gl_cv_macro_O_CLOEXEC=no
13327fi
13328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13329fi
13330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
13331$as_echo "$gl_cv_macro_O_CLOEXEC" >&6; }
13332
13333
472fa5ee 13334
6ec2e0f5
SDJ
13335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
13336$as_echo_n "checking for promoted mode_t type... " >&6; }
d0ac1c44 13337if ${gl_cv_promoted_mode_t+:} false; then :
6ec2e0f5
SDJ
13338 $as_echo_n "(cached) " >&6
13339else
13340
13341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13342/* end confdefs.h. */
13343#include <sys/types.h>
13344int
13345main ()
13346{
13347typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
13348 ;
13349 return 0;
13350}
13351_ACEOF
13352if ac_fn_c_try_compile "$LINENO"; then :
13353 gl_cv_promoted_mode_t='int'
13354else
13355 gl_cv_promoted_mode_t='mode_t'
13356fi
13357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13358
13359fi
13360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
13361$as_echo "$gl_cv_promoted_mode_t" >&6; }
13362
13363cat >>confdefs.h <<_ACEOF
13364#define PROMOTED_MODE_T $gl_cv_promoted_mode_t
13365_ACEOF
13366
13367
13368
13369
13370
472fa5ee
SM
13371
13372
13373
6ec2e0f5
SDJ
13374 GNULIB_DPRINTF=0;
13375 GNULIB_FCLOSE=0;
13376 GNULIB_FDOPEN=0;
13377 GNULIB_FFLUSH=0;
13378 GNULIB_FGETC=0;
13379 GNULIB_FGETS=0;
13380 GNULIB_FOPEN=0;
13381 GNULIB_FPRINTF=0;
13382 GNULIB_FPRINTF_POSIX=0;
13383 GNULIB_FPURGE=0;
13384 GNULIB_FPUTC=0;
13385 GNULIB_FPUTS=0;
13386 GNULIB_FREAD=0;
13387 GNULIB_FREOPEN=0;
13388 GNULIB_FSCANF=0;
13389 GNULIB_FSEEK=0;
13390 GNULIB_FSEEKO=0;
13391 GNULIB_FTELL=0;
13392 GNULIB_FTELLO=0;
13393 GNULIB_FWRITE=0;
13394 GNULIB_GETC=0;
13395 GNULIB_GETCHAR=0;
13396 GNULIB_GETDELIM=0;
13397 GNULIB_GETLINE=0;
13398 GNULIB_OBSTACK_PRINTF=0;
13399 GNULIB_OBSTACK_PRINTF_POSIX=0;
13400 GNULIB_PCLOSE=0;
13401 GNULIB_PERROR=0;
13402 GNULIB_POPEN=0;
13403 GNULIB_PRINTF=0;
13404 GNULIB_PRINTF_POSIX=0;
13405 GNULIB_PUTC=0;
13406 GNULIB_PUTCHAR=0;
13407 GNULIB_PUTS=0;
13408 GNULIB_REMOVE=0;
13409 GNULIB_RENAME=0;
13410 GNULIB_RENAMEAT=0;
13411 GNULIB_SCANF=0;
13412 GNULIB_SNPRINTF=0;
13413 GNULIB_SPRINTF_POSIX=0;
13414 GNULIB_STDIO_H_NONBLOCKING=0;
13415 GNULIB_STDIO_H_SIGPIPE=0;
13416 GNULIB_TMPFILE=0;
13417 GNULIB_VASPRINTF=0;
13418 GNULIB_VFSCANF=0;
13419 GNULIB_VSCANF=0;
13420 GNULIB_VDPRINTF=0;
13421 GNULIB_VFPRINTF=0;
13422 GNULIB_VFPRINTF_POSIX=0;
13423 GNULIB_VPRINTF=0;
13424 GNULIB_VPRINTF_POSIX=0;
13425 GNULIB_VSNPRINTF=0;
13426 GNULIB_VSPRINTF_POSIX=0;
13427 HAVE_DECL_FPURGE=1;
13428 HAVE_DECL_FSEEKO=1;
13429 HAVE_DECL_FTELLO=1;
13430 HAVE_DECL_GETDELIM=1;
13431 HAVE_DECL_GETLINE=1;
13432 HAVE_DECL_OBSTACK_PRINTF=1;
13433 HAVE_DECL_SNPRINTF=1;
13434 HAVE_DECL_VSNPRINTF=1;
13435 HAVE_DPRINTF=1;
13436 HAVE_FSEEKO=1;
13437 HAVE_FTELLO=1;
13438 HAVE_PCLOSE=1;
13439 HAVE_POPEN=1;
13440 HAVE_RENAMEAT=1;
13441 HAVE_VASPRINTF=1;
13442 HAVE_VDPRINTF=1;
13443 REPLACE_DPRINTF=0;
13444 REPLACE_FCLOSE=0;
13445 REPLACE_FDOPEN=0;
13446 REPLACE_FFLUSH=0;
13447 REPLACE_FOPEN=0;
13448 REPLACE_FPRINTF=0;
13449 REPLACE_FPURGE=0;
13450 REPLACE_FREOPEN=0;
13451 REPLACE_FSEEK=0;
13452 REPLACE_FSEEKO=0;
13453 REPLACE_FTELL=0;
13454 REPLACE_FTELLO=0;
13455 REPLACE_GETDELIM=0;
13456 REPLACE_GETLINE=0;
13457 REPLACE_OBSTACK_PRINTF=0;
13458 REPLACE_PERROR=0;
13459 REPLACE_POPEN=0;
13460 REPLACE_PRINTF=0;
13461 REPLACE_REMOVE=0;
13462 REPLACE_RENAME=0;
13463 REPLACE_RENAMEAT=0;
13464 REPLACE_SNPRINTF=0;
13465 REPLACE_SPRINTF=0;
13466 REPLACE_STDIO_READ_FUNCS=0;
13467 REPLACE_STDIO_WRITE_FUNCS=0;
13468 REPLACE_TMPFILE=0;
13469 REPLACE_VASPRINTF=0;
13470 REPLACE_VDPRINTF=0;
13471 REPLACE_VFPRINTF=0;
13472 REPLACE_VPRINTF=0;
13473 REPLACE_VSNPRINTF=0;
13474 REPLACE_VSPRINTF=0;
13475
13476
13477
2d8adcbd
MM
13478
13479
13480
13481
472fa5ee 13482 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
d0ac1c44 13483if test "x$ac_cv_have_decl_setenv" = xyes; then :
6ec2e0f5
SDJ
13484 ac_have_decl=1
13485else
13486 ac_have_decl=0
13487fi
13488
13489cat >>confdefs.h <<_ACEOF
13490#define HAVE_DECL_SETENV $ac_have_decl
13491_ACEOF
13492
13493
13494
13495
13496
13497
472fa5ee
SM
13498
13499
13500
13501
13502 :
13503
13504
13505
13506
13507
6ec2e0f5
SDJ
13508 if test $ac_cv_have_decl_setenv = no; then
13509 HAVE_DECL_SETENV=0
13510 fi
13511
472fa5ee
SM
13512 :
13513
13514
13515
13516
13517
13518
13519
13520
13521
13522 :
13523
6ec2e0f5
SDJ
13524
13525
13526
13527
13528 for ac_header in search.h
13529do :
13530 ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
d0ac1c44 13531if test "x$ac_cv_header_search_h" = xyes; then :
6ec2e0f5
SDJ
13532 cat >>confdefs.h <<_ACEOF
13533#define HAVE_SEARCH_H 1
13534_ACEOF
13535
13536fi
13537
13538done
13539
13540 for ac_func in tsearch
13541do :
13542 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
d0ac1c44 13543if test "x$ac_cv_func_tsearch" = xyes; then :
6ec2e0f5
SDJ
13544 cat >>confdefs.h <<_ACEOF
13545#define HAVE_TSEARCH 1
13546_ACEOF
13547
13548fi
13549done
13550
13551
13552
13553
13554 GNULIB_PTHREAD_SIGMASK=0;
13555 GNULIB_RAISE=0;
13556 GNULIB_SIGNAL_H_SIGPIPE=0;
13557 GNULIB_SIGPROCMASK=0;
13558 GNULIB_SIGACTION=0;
13559 HAVE_POSIX_SIGNALBLOCKING=1;
13560 HAVE_PTHREAD_SIGMASK=1;
13561 HAVE_RAISE=1;
13562 HAVE_SIGSET_T=1;
13563 HAVE_SIGINFO_T=1;
13564 HAVE_SIGACTION=1;
13565 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
13566
13567 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
13568
13569 HAVE_SIGHANDLER_T=1;
13570 REPLACE_PTHREAD_SIGMASK=0;
13571 REPLACE_RAISE=0;
13572
13573
13574 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
13575 #include <signal.h>
13576 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
13577 #include <sys/types.h>
13578
13579"
d0ac1c44 13580if test "x$ac_cv_type_sigset_t" = xyes; then :
6ec2e0f5
SDJ
13581
13582cat >>confdefs.h <<_ACEOF
13583#define HAVE_SIGSET_T 1
13584_ACEOF
13585
13586gl_cv_type_sigset_t=yes
13587else
13588 gl_cv_type_sigset_t=no
13589fi
13590
13591 if test $gl_cv_type_sigset_t != yes; then
13592 HAVE_SIGSET_T=0
13593 fi
13594
13595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
13596$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
d0ac1c44 13597if ${ac_cv_type_uid_t+:} false; then :
6ec2e0f5
SDJ
13598 $as_echo_n "(cached) " >&6
13599else
13600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13601/* end confdefs.h. */
13602#include <sys/types.h>
13603
13604_ACEOF
13605if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13606 $EGREP "uid_t" >/dev/null 2>&1; then :
13607 ac_cv_type_uid_t=yes
13608else
13609 ac_cv_type_uid_t=no
13610fi
13611rm -f conftest*
13612
13613fi
13614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
13615$as_echo "$ac_cv_type_uid_t" >&6; }
13616if test $ac_cv_type_uid_t = no; then
13617
13618$as_echo "#define uid_t int" >>confdefs.h
13619
13620
13621$as_echo "#define gid_t int" >>confdefs.h
13622
13623fi
13624
13625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
13626$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
d0ac1c44 13627if ${ac_cv_header_stdbool_h+:} false; then :
6ec2e0f5
SDJ
13628 $as_echo_n "(cached) " >&6
13629else
13630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13631/* end confdefs.h. */
13632
13633 #include <stdbool.h>
13634
13635 #ifdef __cplusplus
13636 typedef bool Bool;
13637 #else
13638 typedef _Bool Bool;
13639 #ifndef bool
13640 "error: bool is not defined"
13641 #endif
13642 #ifndef false
13643 "error: false is not defined"
13644 #endif
13645 #if false
13646 "error: false is not 0"
13647 #endif
13648 #ifndef true
13649 "error: true is not defined"
13650 #endif
13651 #if true != 1
13652 "error: true is not 1"
13653 #endif
13654 #endif
13655
13656 #ifndef __bool_true_false_are_defined
13657 "error: __bool_true_false_are_defined is not defined"
13658 #endif
13659
13660 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
13661
13662 char a[true == 1 ? 1 : -1];
13663 char b[false == 0 ? 1 : -1];
13664 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
13665 char d[(bool) 0.5 == true ? 1 : -1];
13666 /* See body of main program for 'e'. */
13667 char f[(Bool) 0.0 == false ? 1 : -1];
13668 char g[true];
13669 char h[sizeof (Bool)];
13670 char i[sizeof s.t];
13671 enum { j = false, k = true, l = false * true, m = true * 256 };
13672 /* The following fails for
13673 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
13674 Bool n[m];
13675 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
13676 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
13677 /* Catch a bug in an HP-UX C compiler. See
7a6dbc2f
SDJ
13678 https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
13679 https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
6ec2e0f5
SDJ
13680 */
13681 Bool q = true;
13682 Bool *pq = &q;
13683 bool *qq = &q;
13684
13685int
13686main ()
13687{
13688
13689 bool e = &s;
13690 *pq |= q; *pq |= ! q;
13691 *qq |= q; *qq |= ! q;
13692 /* Refer to every declared value, to avoid compiler optimizations. */
13693 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
13694 + !m + !n + !o + !p + !q + !pq + !qq);
13695
13696 ;
13697 return 0;
13698}
13699_ACEOF
13700if ac_fn_c_try_compile "$LINENO"; then :
13701 ac_cv_header_stdbool_h=yes
13702else
13703 ac_cv_header_stdbool_h=no
13704fi
13705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13706fi
13707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
13708$as_echo "$ac_cv_header_stdbool_h" >&6; }
13709 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
d0ac1c44 13710if test "x$ac_cv_type__Bool" = xyes; then :
6ec2e0f5
SDJ
13711
13712cat >>confdefs.h <<_ACEOF
13713#define HAVE__BOOL 1
13714_ACEOF
13715
13716
13717fi
13718
13719
13720
13721 REPLACE_NULL=0;
13722 HAVE_MAX_ALIGN_T=1;
13723 HAVE_WCHAR_T=1;
13724
13725
13726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
13727$as_echo_n "checking for wchar_t... " >&6; }
d0ac1c44 13728if ${gt_cv_c_wchar_t+:} false; then :
6ec2e0f5
SDJ
13729 $as_echo_n "(cached) " >&6
13730else
13731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13732/* end confdefs.h. */
13733#include <stddef.h>
13734 wchar_t foo = (wchar_t)'\0';
13735int
13736main ()
13737{
13738
13739 ;
13740 return 0;
13741}
13742_ACEOF
13743if ac_fn_c_try_compile "$LINENO"; then :
13744 gt_cv_c_wchar_t=yes
13745else
13746 gt_cv_c_wchar_t=no
13747fi
13748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13749fi
13750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
13751$as_echo "$gt_cv_c_wchar_t" >&6; }
13752 if test $gt_cv_c_wchar_t = yes; then
13753
13754$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
13755
13756 fi
13757
13758
13759
472fa5ee
SM
13760
13761
13762
13763
13764 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
d0ac1c44 13765if test "x$ac_cv_have_decl_strdup" = xyes; then :
6ec2e0f5
SDJ
13766 ac_have_decl=1
13767else
13768 ac_have_decl=0
13769fi
13770
13771cat >>confdefs.h <<_ACEOF
13772#define HAVE_DECL_STRDUP $ac_have_decl
13773_ACEOF
13774
13775
472fa5ee 13776
6ec2e0f5
SDJ
13777 REPLACE_STRERROR_0=0
13778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
13779$as_echo_n "checking whether strerror(0) succeeds... " >&6; }
d0ac1c44 13780if ${gl_cv_func_strerror_0_works+:} false; then :
6ec2e0f5
SDJ
13781 $as_echo_n "(cached) " >&6
13782else
13783 if test "$cross_compiling" = yes; then :
13784 case "$host_os" in
7a6dbc2f
SDJ
13785 # Guess yes on glibc systems.
13786 *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
13787 # Guess yes on native Windows.
13788 mingw*) gl_cv_func_strerror_0_works="guessing yes" ;;
13789 # If we don't know, assume the worst.
13790 *) gl_cv_func_strerror_0_works="guessing no" ;;
6ec2e0f5
SDJ
13791 esac
13792
13793else
13794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13795/* end confdefs.h. */
13796#include <string.h>
13797 #include <errno.h>
13798
13799int
13800main ()
13801{
13802int result = 0;
13803 char *str;
13804 errno = 0;
13805 str = strerror (0);
13806 if (!*str) result |= 1;
13807 if (errno) result |= 2;
13808 if (strstr (str, "nknown") || strstr (str, "ndefined"))
13809 result |= 4;
13810 return result;
13811 ;
13812 return 0;
13813}
13814_ACEOF
13815if ac_fn_c_try_run "$LINENO"; then :
13816 gl_cv_func_strerror_0_works=yes
13817else
13818 gl_cv_func_strerror_0_works=no
13819fi
13820rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13821 conftest.$ac_objext conftest.beam conftest.$ac_ext
13822fi
13823
13824
13825fi
13826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
13827$as_echo "$gl_cv_func_strerror_0_works" >&6; }
13828 case "$gl_cv_func_strerror_0_works" in
13829 *yes) ;;
13830 *)
13831 REPLACE_STRERROR_0=1
13832
13833$as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
13834
13835 ;;
13836 esac
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849 if test $gl_cv_have_include_next = yes; then
13850 gl_cv_next_string_h='<'string.h'>'
13851 else
13852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
13853$as_echo_n "checking absolute name of <string.h>... " >&6; }
d0ac1c44 13854if ${gl_cv_next_string_h+:} false; then :
6ec2e0f5
SDJ
13855 $as_echo_n "(cached) " >&6
13856else
13857
13858
13859
13860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13861/* end confdefs.h. */
13862#include <string.h>
13863_ACEOF
13864 case "$host_os" in
13865 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13866 *) gl_absname_cpp="$ac_cpp" ;;
13867 esac
13868
13869 case "$host_os" in
13870 mingw*)
13871 gl_dirsep_regex='[/\\]'
13872 ;;
13873 *)
13874 gl_dirsep_regex='\/'
13875 ;;
13876 esac
13877 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13878 gl_header_literal_regex=`echo 'string.h' \
13879 | sed -e "$gl_make_literal_regex_sed"`
13880 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13881 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13882 s|^/[^/]|//&|
13883 p
13884 q
13885 }'
13886
13887 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13888 sed -n "$gl_absolute_header_sed"`
13889
13890 gl_header=$gl_cv_absolute_string_h
13891 gl_cv_next_string_h='"'$gl_header'"'
13892
13893
13894fi
13895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
13896$as_echo "$gl_cv_next_string_h" >&6; }
13897 fi
13898 NEXT_STRING_H=$gl_cv_next_string_h
13899
13900 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13901 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13902 gl_next_as_first_directive='<'string.h'>'
13903 else
13904 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13905 gl_next_as_first_directive=$gl_cv_next_string_h
13906 fi
13907 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
13908
13909
13910
13911
13912
13913
6ec2e0f5 13914
6ec2e0f5
SDJ
13915
13916
13917
13918
13919
7a6dbc2f 13920 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
6ec2e0f5
SDJ
13921 REPLACE_STRSTR=1
13922 else
13923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
13924$as_echo_n "checking whether strstr works... " >&6; }
d0ac1c44 13925if ${gl_cv_func_strstr_works_always+:} false; then :
6ec2e0f5
SDJ
13926 $as_echo_n "(cached) " >&6
13927else
13928 if test "$cross_compiling" = yes; then :
13929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13930/* end confdefs.h. */
13931
13932#ifdef __GNU_LIBRARY__
13933 #include <features.h>
13934 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
13935 || defined __UCLIBC__
13936 Lucky user
13937 #endif
13938#elif defined __CYGWIN__
13939 #include <cygwin/version.h>
13940 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
13941 Lucky user
13942 #endif
13943#else
13944 Lucky user
13945#endif
13946
13947_ACEOF
13948if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13949 $EGREP "Lucky user" >/dev/null 2>&1; then :
13950 gl_cv_func_strstr_works_always="guessing yes"
13951else
13952 gl_cv_func_strstr_works_always="guessing no"
13953fi
13954rm -f conftest*
13955
13956
13957else
13958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13959/* end confdefs.h. */
13960
13961#include <string.h> /* for strstr */
13962#define P "_EF_BF_BD"
13963#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
13964#define NEEDLE P P P P P
13965
13966int
13967main ()
13968{
13969return !!strstr (HAYSTACK, NEEDLE);
13970
13971 ;
13972 return 0;
13973}
13974_ACEOF
13975if ac_fn_c_try_run "$LINENO"; then :
13976 gl_cv_func_strstr_works_always=yes
13977else
13978 gl_cv_func_strstr_works_always=no
13979fi
13980rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13981 conftest.$ac_objext conftest.beam conftest.$ac_ext
13982fi
13983
13984
13985fi
13986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
13987$as_echo "$gl_cv_func_strstr_works_always" >&6; }
13988 case "$gl_cv_func_strstr_works_always" in
13989 *yes) ;;
13990 *)
13991 REPLACE_STRSTR=1
13992 ;;
13993 esac
13994 fi
13995
472fa5ee
SM
13996
13997 ac_fn_c_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default"
d0ac1c44 13998if test "x$ac_cv_have_decl_strtok_r" = xyes; then :
6ec2e0f5
SDJ
13999 ac_have_decl=1
14000else
14001 ac_have_decl=0
14002fi
14003
14004cat >>confdefs.h <<_ACEOF
14005#define HAVE_DECL_STRTOK_R $ac_have_decl
14006_ACEOF
14007
472fa5ee 14008
6ec2e0f5
SDJ
14009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
14010$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
14011if test -z "$MKDIR_P"; then
d0ac1c44 14012 if ${ac_cv_path_mkdir+:} false; then :
6ec2e0f5
SDJ
14013 $as_echo_n "(cached) " >&6
14014else
14015 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14016for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
14017do
14018 IFS=$as_save_IFS
14019 test -z "$as_dir" && as_dir=.
14020 for ac_prog in mkdir gmkdir; do
14021 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 14022 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
6ec2e0f5
SDJ
14023 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
14024 'mkdir (GNU coreutils) '* | \
14025 'mkdir (coreutils) '* | \
14026 'mkdir (fileutils) '4.1*)
14027 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
14028 break 3;;
14029 esac
14030 done
14031 done
14032 done
14033IFS=$as_save_IFS
14034
14035fi
14036
d0ac1c44 14037 test -d ./--version && rmdir ./--version
6ec2e0f5
SDJ
14038 if test "${ac_cv_path_mkdir+set}" = set; then
14039 MKDIR_P="$ac_cv_path_mkdir -p"
14040 else
14041 # As a last resort, use the slow shell script. Don't cache a
14042 # value for MKDIR_P within a source directory, because that will
14043 # break other packages using the cache if that directory is
14044 # removed, or if the value is a relative name.
6ec2e0f5
SDJ
14045 MKDIR_P="$ac_install_sh -d"
14046 fi
14047fi
14048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
14049$as_echo "$MKDIR_P" >&6; }
14050
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
7a6dbc2f
SDJ
14061$as_echo "#define _USE_STD_STAT 1" >>confdefs.h
14062
14063
14064
6ec2e0f5
SDJ
14065
14066
14067
14068
14069
14070
14071
14072
14073 if test $gl_cv_have_include_next = yes; then
14074 gl_cv_next_sys_types_h='<'sys/types.h'>'
14075 else
14076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
14077$as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
d0ac1c44 14078if ${gl_cv_next_sys_types_h+:} false; then :
6ec2e0f5
SDJ
14079 $as_echo_n "(cached) " >&6
14080else
14081
14082
14083
14084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14085/* end confdefs.h. */
14086#include <sys/types.h>
14087_ACEOF
14088 case "$host_os" in
14089 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14090 *) gl_absname_cpp="$ac_cpp" ;;
14091 esac
14092
14093 case "$host_os" in
14094 mingw*)
14095 gl_dirsep_regex='[/\\]'
14096 ;;
14097 *)
14098 gl_dirsep_regex='\/'
14099 ;;
14100 esac
14101 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14102 gl_header_literal_regex=`echo 'sys/types.h' \
14103 | sed -e "$gl_make_literal_regex_sed"`
14104 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14105 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14106 s|^/[^/]|//&|
14107 p
14108 q
14109 }'
14110
14111 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14112 sed -n "$gl_absolute_header_sed"`
14113
14114 gl_header=$gl_cv_absolute_sys_types_h
14115 gl_cv_next_sys_types_h='"'$gl_header'"'
14116
14117
14118fi
14119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
14120$as_echo "$gl_cv_next_sys_types_h" >&6; }
14121 fi
14122 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
14123
14124 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14125 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14126 gl_next_as_first_directive='<'sys/types.h'>'
14127 else
14128 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14129 gl_next_as_first_directive=$gl_cv_next_sys_types_h
14130 fi
14131 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
7a6dbc2f
SDJ
14144 WINDOWS_STAT_INODES=0
14145
6ec2e0f5 14146
6ec2e0f5
SDJ
14147
14148
14149
472fa5ee
SM
14150 :
14151
14152
14153
14154
14155
6ec2e0f5
SDJ
14156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
14157$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
d0ac1c44 14158if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
6ec2e0f5
SDJ
14159 $as_echo_n "(cached) " >&6
14160else
14161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14162/* end confdefs.h. */
14163#include <time.h>
14164
14165int
14166main ()
14167{
14168static struct timespec x; x.tv_sec = x.tv_nsec;
14169 ;
14170 return 0;
14171}
14172_ACEOF
14173if ac_fn_c_try_compile "$LINENO"; then :
14174 gl_cv_sys_struct_timespec_in_time_h=yes
14175else
14176 gl_cv_sys_struct_timespec_in_time_h=no
14177fi
14178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14179fi
14180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
14181$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
14182
14183 TIME_H_DEFINES_STRUCT_TIMESPEC=0
14184 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
14185 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
14186 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
14187 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
14188 TIME_H_DEFINES_STRUCT_TIMESPEC=1
14189 else
14190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
14191$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
d0ac1c44 14192if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
6ec2e0f5
SDJ
14193 $as_echo_n "(cached) " >&6
14194else
14195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14196/* end confdefs.h. */
14197#include <sys/time.h>
14198
14199int
14200main ()
14201{
14202static struct timespec x; x.tv_sec = x.tv_nsec;
14203 ;
14204 return 0;
14205}
14206_ACEOF
14207if ac_fn_c_try_compile "$LINENO"; then :
14208 gl_cv_sys_struct_timespec_in_sys_time_h=yes
14209else
14210 gl_cv_sys_struct_timespec_in_sys_time_h=no
14211fi
14212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14213fi
14214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
14215$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
14216 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
14217 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
14218 else
14219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
14220$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
d0ac1c44 14221if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
6ec2e0f5
SDJ
14222 $as_echo_n "(cached) " >&6
14223else
14224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14225/* end confdefs.h. */
14226#include <pthread.h>
14227
14228int
14229main ()
14230{
14231static struct timespec x; x.tv_sec = x.tv_nsec;
14232 ;
14233 return 0;
14234}
14235_ACEOF
14236if ac_fn_c_try_compile "$LINENO"; then :
14237 gl_cv_sys_struct_timespec_in_pthread_h=yes
14238else
14239 gl_cv_sys_struct_timespec_in_pthread_h=no
14240fi
14241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14242fi
14243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
14244$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
14245 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
14246 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
14247 else
14248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
14249$as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
d0ac1c44 14250if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then :
6ec2e0f5
SDJ
14251 $as_echo_n "(cached) " >&6
14252else
14253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14254/* end confdefs.h. */
14255#include <unistd.h>
14256
14257int
14258main ()
14259{
14260static struct timespec x; x.tv_sec = x.tv_nsec;
14261 ;
14262 return 0;
14263}
14264_ACEOF
14265if ac_fn_c_try_compile "$LINENO"; then :
14266 gl_cv_sys_struct_timespec_in_unistd_h=yes
14267else
14268 gl_cv_sys_struct_timespec_in_unistd_h=no
14269fi
14270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14271fi
14272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
14273$as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
14274 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
14275 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
14276 fi
14277 fi
14278 fi
14279 fi
14280
14281
14282
14283
14284
14285
14286
14287
14288
14289
14290
14291
14292
14293
14294
14295
14296 if test $gl_cv_have_include_next = yes; then
14297 gl_cv_next_time_h='<'time.h'>'
14298 else
14299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
14300$as_echo_n "checking absolute name of <time.h>... " >&6; }
d0ac1c44 14301if ${gl_cv_next_time_h+:} false; then :
6ec2e0f5
SDJ
14302 $as_echo_n "(cached) " >&6
14303else
14304
14305
14306
14307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14308/* end confdefs.h. */
14309#include <time.h>
14310_ACEOF
14311 case "$host_os" in
14312 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14313 *) gl_absname_cpp="$ac_cpp" ;;
14314 esac
14315
14316 case "$host_os" in
14317 mingw*)
14318 gl_dirsep_regex='[/\\]'
14319 ;;
14320 *)
14321 gl_dirsep_regex='\/'
14322 ;;
14323 esac
14324 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14325 gl_header_literal_regex=`echo 'time.h' \
14326 | sed -e "$gl_make_literal_regex_sed"`
14327 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14328 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14329 s|^/[^/]|//&|
14330 p
14331 q
14332 }'
14333
14334 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14335 sed -n "$gl_absolute_header_sed"`
14336
14337 gl_header=$gl_cv_absolute_time_h
14338 gl_cv_next_time_h='"'$gl_header'"'
14339
14340
14341fi
14342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
14343$as_echo "$gl_cv_next_time_h" >&6; }
14344 fi
14345 NEXT_TIME_H=$gl_cv_next_time_h
14346
14347 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14348 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14349 gl_next_as_first_directive='<'time.h'>'
14350 else
14351 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14352 gl_next_as_first_directive=$gl_cv_next_time_h
14353 fi
14354 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
14355
14356
14357
14358
14359
14360
14361
14362
472fa5ee
SM
14363
14364
14365
14366
14367 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
d0ac1c44 14368if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
6ec2e0f5
SDJ
14369 ac_have_decl=1
14370else
14371 ac_have_decl=0
14372fi
14373
14374cat >>confdefs.h <<_ACEOF
14375#define HAVE_DECL_UNSETENV $ac_have_decl
14376_ACEOF
14377
14378
472fa5ee 14379
6ec2e0f5
SDJ
14380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
14381$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
d0ac1c44 14382if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
6ec2e0f5
SDJ
14383 $as_echo_n "(cached) " >&6
14384else
14385 gl_cv_header_wchar_h_correct_inline=yes
14386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14387/* end confdefs.h. */
14388
14389 #define wcstod renamed_wcstod
14390/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14391 <wchar.h>.
14392 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14393 included before <wchar.h>. */
14394#include <stddef.h>
14395#include <stdio.h>
14396#include <time.h>
14397#include <wchar.h>
14398extern int zero (void);
14399int main () { return zero(); }
14400
14401_ACEOF
14402 save_ac_compile="$ac_compile"
14403 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
7a6dbc2f
SDJ
14404 if echo '#include "conftest.c"' >conftest1.c &&
14405 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6ec2e0f5
SDJ
14406 (eval $ac_compile) 2>&5
14407 ac_status=$?
14408 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14409 test $ac_status = 0; }; then
14410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14411/* end confdefs.h. */
14412
14413 #define wcstod renamed_wcstod
14414/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14415 <wchar.h>.
14416 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14417 included before <wchar.h>. */
14418#include <stddef.h>
14419#include <stdio.h>
14420#include <time.h>
14421#include <wchar.h>
14422int zero (void) { return 0; }
14423
14424_ACEOF
14425 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
7a6dbc2f
SDJ
14426 if echo '#include "conftest.c"' >conftest2.c &&
14427 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6ec2e0f5
SDJ
14428 (eval $ac_compile) 2>&5
14429 ac_status=$?
14430 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14431 test $ac_status = 0; }; then
14432 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
14433 :
14434 else
14435 gl_cv_header_wchar_h_correct_inline=no
14436 fi
14437 fi
14438 fi
14439 ac_compile="$save_ac_compile"
7a6dbc2f 14440 rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext
6ec2e0f5
SDJ
14441
14442fi
14443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
14444$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
14445 if test $gl_cv_header_wchar_h_correct_inline = no; then
d0ac1c44 14446 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
6ec2e0f5
SDJ
14447This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
14448C99 mode. You have four options:
14449 - Add the flag -fgnu89-inline to CC and reconfigure, or
14450 - Fix your include files, using parts of
7a6dbc2f 14451 <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
6ec2e0f5
SDJ
14452 - Use a gcc version older than 4.3, or
14453 - Don't use the flags -std=c99 or -std=gnu99.
14454Configuration aborted." "$LINENO" 5
14455 fi
14456
14457
14458
14459
14460
472fa5ee
SM
14461
14462
14463
14464 :
14465
14466
14467
14468
14469
6ec2e0f5
SDJ
14470 if test $ac_cv_header_features_h = yes; then
14471 HAVE_FEATURES_H=1
14472 else
14473 HAVE_FEATURES_H=0
14474 fi
14475
14476
14477
6ec2e0f5 14478
6ec2e0f5 14479
6ec2e0f5 14480
6ec2e0f5 14481
7a6dbc2f
SDJ
14482
14483
14484 :
14485
14486
14487
14488
14489
14490 if test $ac_cv_header_crtdefs_h = yes; then
14491 HAVE_CRTDEFS_H=1
14492 else
14493 HAVE_CRTDEFS_H=0
6ec2e0f5
SDJ
14494 fi
14495
14496
7a6dbc2f 14497
6ec2e0f5
SDJ
14498 GNULIB_ISWBLANK=0;
14499 GNULIB_WCTYPE=0;
14500 GNULIB_ISWCTYPE=0;
14501 GNULIB_WCTRANS=0;
14502 GNULIB_TOWCTRANS=0;
14503 HAVE_ISWBLANK=1;
14504 HAVE_WCTYPE_T=1;
14505 HAVE_WCTRANS_T=1;
14506 REPLACE_ISWBLANK=0;
14507
14508
14509
14510
472fa5ee
SM
14511
14512
14513
6ec2e0f5
SDJ
14514 if false; then
14515 GL_COND_LIBTOOL_TRUE=
14516 GL_COND_LIBTOOL_FALSE='#'
14517else
14518 GL_COND_LIBTOOL_TRUE='#'
14519 GL_COND_LIBTOOL_FALSE=
14520fi
14521
14522 gl_cond_libtool=false
14523 gl_libdeps=
14524 gl_ltlibdeps=
14525 gl_m4_base='import/m4'
14526
14527
14528
14529
14530
14531
14532
14533
14534
14535 gl_source_base='import'
14536
14537
14538 if test $ac_cv_func_alloca_works = no; then
14539 :
14540 fi
14541
14542 # Define an additional variable used in the Makefile substitution.
14543 if test $ac_cv_working_alloca_h = yes; then
14544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
14545$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
d0ac1c44 14546if ${gl_cv_rpl_alloca+:} false; then :
6ec2e0f5
SDJ
14547 $as_echo_n "(cached) " >&6
14548else
14549
14550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14551/* end confdefs.h. */
14552
14553#if defined __GNUC__ || defined _AIX || defined _MSC_VER
14554 Need own alloca
14555#endif
14556
14557_ACEOF
14558if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14559 $EGREP "Need own alloca" >/dev/null 2>&1; then :
14560 gl_cv_rpl_alloca=yes
14561else
14562 gl_cv_rpl_alloca=no
14563fi
14564rm -f conftest*
14565
14566
14567fi
14568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
14569$as_echo "$gl_cv_rpl_alloca" >&6; }
14570 if test $gl_cv_rpl_alloca = yes; then
14571
14572$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
14573
14574 ALLOCA_H=alloca.h
14575 else
14576 ALLOCA_H=
14577 fi
14578 else
14579 ALLOCA_H=alloca.h
14580 fi
14581
14582 if test -n "$ALLOCA_H"; then
14583 GL_GENERATE_ALLOCA_H_TRUE=
14584 GL_GENERATE_ALLOCA_H_FALSE='#'
14585else
14586 GL_GENERATE_ALLOCA_H_TRUE='#'
14587 GL_GENERATE_ALLOCA_H_FALSE=
14588fi
14589
14590
14591
14592
14593
14594
14595
14596
14597
14598
14599 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
14600
14601
7a6dbc2f
SDJ
14602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
14603$as_echo_n "checking for __builtin_expect... " >&6; }
14604if ${gl_cv___builtin_expect+:} false; then :
14605 $as_echo_n "(cached) " >&6
14606else
14607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14608/* end confdefs.h. */
14609
14610 int
14611 main (int argc, char **argv)
14612 {
14613 argc = __builtin_expect (argc, 100);
14614 return argv[argc != 100][0];
14615 }
14616_ACEOF
14617if ac_fn_c_try_link "$LINENO"; then :
14618 gl_cv___builtin_expect=yes
14619else
14620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14621/* end confdefs.h. */
14622
14623 #include <builtins.h>
14624 int
14625 main (int argc, char **argv)
14626 {
14627 argc = __builtin_expect (argc, 100);
14628 return argv[argc != 100][0];
14629 }
14630_ACEOF
14631if ac_fn_c_try_link "$LINENO"; then :
14632 gl_cv___builtin_expect="in <builtins.h>"
14633else
14634 gl_cv___builtin_expect=no
14635fi
14636rm -f core conftest.err conftest.$ac_objext \
14637 conftest$ac_exeext conftest.$ac_ext
14638fi
14639rm -f core conftest.err conftest.$ac_objext \
14640 conftest$ac_exeext conftest.$ac_ext
14641fi
14642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
14643$as_echo "$gl_cv___builtin_expect" >&6; }
14644 if test "$gl_cv___builtin_expect" = yes; then
14645 $as_echo "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h
14646
14647 elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
14648 $as_echo "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
14649
14650 fi
14651
14652
14653
6ec2e0f5
SDJ
14654
14655
14656 if test $ac_cv_func_canonicalize_file_name = no; then
14657 HAVE_CANONICALIZE_FILE_NAME=0
14658 if test $ac_cv_func_realpath = no; then
14659 HAVE_REALPATH=0
14660 else
14661 case "$gl_cv_func_realpath_works" in
7a6dbc2f
SDJ
14662 *yes) ;;
14663 *) REPLACE_REALPATH=1 ;;
6ec2e0f5
SDJ
14664 esac
14665 fi
14666 else
14667 case "$gl_cv_func_realpath_works" in
14668 *yes)
14669 ;;
14670 *)
14671 REPLACE_CANONICALIZE_FILE_NAME=1
14672 REPLACE_REALPATH=1
14673 ;;
14674 esac
14675 fi
14676
14677 if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
14678
14679
14680
14681
14682
14683
14684
14685
14686 gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
14687
14688 fi
14689
14690
14691cat >>confdefs.h <<_ACEOF
14692#define GNULIB_CANONICALIZE_LGPL 1
14693_ACEOF
14694
14695
14696
14697
14698
14699
14700
14701 GNULIB_CANONICALIZE_FILE_NAME=1
14702
14703
14704
14705
14706
14707$as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
14708
14709
14710
14711
14712
14713
14714
14715
14716 GNULIB_REALPATH=1
14717
14718
14719
14720
14721
14722$as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
14723
14724
14725
14726
14727
14728
14729
14730
14731 GNULIB_CHDIR=1
14732
14733
14734
14735
14736
14737$as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
14738
14739
14740
14741
14742
14743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
14744$as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; }
d0ac1c44 14745if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then :
6ec2e0f5
SDJ
14746 $as_echo_n "(cached) " >&6
14747else
14748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14749/* end confdefs.h. */
14750
14751/* Arrange to define PATH_MAX, like "pathmax.h" does. */
14752#if HAVE_UNISTD_H
14753# include <unistd.h>
14754#endif
14755#include <limits.h>
14756#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
14757# include <sys/param.h>
14758#endif
14759#if !defined PATH_MAX && defined MAXPATHLEN
14760# define PATH_MAX MAXPATHLEN
14761#endif
14762#ifdef __hpux
14763# undef PATH_MAX
14764# define PATH_MAX 1024
14765#endif
7a6dbc2f 14766#if defined _WIN32 && ! defined __CYGWIN__
6ec2e0f5
SDJ
14767# undef PATH_MAX
14768# define PATH_MAX 260
14769#endif
14770
14771#ifdef PATH_MAX
14772have_arbitrary_file_name_length_limit
14773#endif
14774_ACEOF
14775if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14776 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
14777 gl_cv_have_arbitrary_file_name_length_limit=yes
14778else
14779 gl_cv_have_arbitrary_file_name_length_limit=no
14780fi
14781rm -f conftest*
14782
14783fi
14784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
14785$as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
14786
14787 if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
14788
14789
14790
14791
14792
14793
14794
14795
14796 gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
14797
14798 :
14799 fi
14800
14801
14802$as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
14803
14804
14805
14806
14807
7a6dbc2f
SDJ
14808
14809 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
14810 REPLACE_CLOSE=1
14811 fi
14812
6ec2e0f5
SDJ
14813
14814
14815
14816
14817
472fa5ee
SM
14818 :
14819
14820
14821
14822
14823
6ec2e0f5
SDJ
14824 if test $ac_cv_header_sys_socket_h != yes; then
14825 for ac_header in winsock2.h
14826do :
14827 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
d0ac1c44 14828if test "x$ac_cv_header_winsock2_h" = xyes; then :
6ec2e0f5
SDJ
14829 cat >>confdefs.h <<_ACEOF
14830#define HAVE_WINSOCK2_H 1
14831_ACEOF
14832
14833fi
14834
14835done
14836
14837 fi
14838 if test "$ac_cv_header_winsock2_h" = yes; then
14839 HAVE_WINSOCK2_H=1
14840 UNISTD_H_HAVE_WINSOCK2_H=1
14841 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
14842 else
14843 HAVE_WINSOCK2_H=0
14844 fi
14845
14846
14847 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
14848 REPLACE_CLOSE=1
14849 fi
14850
14851
14852 if test $REPLACE_CLOSE = 0; then
14853
14854
14855
472fa5ee
SM
14856 :
14857
14858
14859
14860
14861
6ec2e0f5
SDJ
14862 if test $ac_cv_func_fchdir = no; then
14863 HAVE_FCHDIR=0
14864 fi
14865
14866 if test $HAVE_FCHDIR = 0; then
14867 REPLACE_CLOSE=1
14868 fi
14869 fi
14870
14871
14872 if test $REPLACE_CLOSE = 1; then
14873
14874
14875
14876
14877
14878
14879
14880
14881 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
14882
14883 fi
14884
14885
14886
14887
14888
14889 GNULIB_CLOSE=1
14890
14891
14892
14893
14894
14895$as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
14896
14897
14898
14899
14900
14901
14902 for ac_func in closedir
14903do :
14904 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
d0ac1c44 14905if test "x$ac_cv_func_closedir" = xyes; then :
6ec2e0f5
SDJ
14906 cat >>confdefs.h <<_ACEOF
14907#define HAVE_CLOSEDIR 1
14908_ACEOF
14909
14910fi
14911done
14912
14913 if test $ac_cv_func_closedir = no; then
14914 HAVE_CLOSEDIR=0
14915 fi
14916
14917
14918
14919
472fa5ee
SM
14920 :
14921
14922
14923
14924
14925
6ec2e0f5
SDJ
14926 if test $ac_cv_func_fchdir = no; then
14927 HAVE_FCHDIR=0
14928 fi
14929
14930 if test $HAVE_FCHDIR = 0; then
14931 if test $HAVE_CLOSEDIR = 1; then
14932 REPLACE_CLOSEDIR=1
14933 fi
14934 fi
14935
14936 case $host_os,$HAVE_CLOSEDIR in
14937 os2*,1)
14938 REPLACE_CLOSEDIR=1;;
14939 esac
14940
14941 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
14942
14943
14944
14945
14946
14947
14948
14949
14950 gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
14951
14952 fi
14953
14954
14955
14956
14957
14958 GNULIB_CLOSEDIR=1
14959
14960
14961
14962
14963
14964$as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
14965
14966
14967
6ec2e0f5
SDJ
14968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
14969$as_echo_n "checking for d_ino member in directory struct... " >&6; }
d0ac1c44 14970if ${gl_cv_struct_dirent_d_ino+:} false; then :
6ec2e0f5
SDJ
14971 $as_echo_n "(cached) " >&6
14972else
14973 if test "$cross_compiling" = yes; then :
14974 case "$host_os" in
14975 # Guess yes on glibc systems with Linux kernel.
14976 linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
7a6dbc2f
SDJ
14977 # Guess no on native Windows.
14978 mingw*) gl_cv_struct_dirent_d_ino="guessing no" ;;
6ec2e0f5
SDJ
14979 # If we don't know, assume the worst.
14980 *) gl_cv_struct_dirent_d_ino="guessing no" ;;
14981 esac
14982
14983else
14984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14985/* end confdefs.h. */
14986#include <sys/types.h>
14987 #include <sys/stat.h>
14988 #include <dirent.h>
14989
14990int
14991main ()
14992{
14993DIR *dp = opendir (".");
14994 struct dirent *e;
14995 struct stat st;
14996 if (! dp)
14997 return 1;
14998 e = readdir (dp);
14999 if (! e)
7a6dbc2f 15000 { closedir (dp); return 2; }
6ec2e0f5 15001 if (lstat (e->d_name, &st) != 0)
7a6dbc2f 15002 { closedir (dp); return 3; }
6ec2e0f5 15003 if (e->d_ino != st.st_ino)
7a6dbc2f 15004 { closedir (dp); return 4; }
6ec2e0f5
SDJ
15005 closedir (dp);
15006 return 0;
15007
15008 ;
15009 return 0;
15010}
15011_ACEOF
15012if ac_fn_c_try_run "$LINENO"; then :
15013 gl_cv_struct_dirent_d_ino=yes
15014else
15015 gl_cv_struct_dirent_d_ino=no
15016fi
15017rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15018 conftest.$ac_objext conftest.beam conftest.$ac_ext
15019fi
15020
15021fi
15022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
15023$as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
15024 case "$gl_cv_struct_dirent_d_ino" in
15025 *yes)
15026
15027$as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
15028
15029 ;;
15030 esac
15031
15032
15033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
15034$as_echo_n "checking for d_type member in directory struct... " >&6; }
d0ac1c44 15035if ${gl_cv_struct_dirent_d_type+:} false; then :
6ec2e0f5
SDJ
15036 $as_echo_n "(cached) " >&6
15037else
15038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15039/* end confdefs.h. */
15040
15041#include <sys/types.h>
15042#include <dirent.h>
15043
15044int
15045main ()
15046{
15047struct dirent dp; dp.d_type = 0;
15048 ;
15049 return 0;
15050}
15051_ACEOF
15052if ac_fn_c_try_link "$LINENO"; then :
15053 gl_cv_struct_dirent_d_type=yes
15054else
15055 gl_cv_struct_dirent_d_type=no
15056fi
15057rm -f core conftest.err conftest.$ac_objext \
15058 conftest$ac_exeext conftest.$ac_ext
15059
15060
15061fi
15062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5
15063$as_echo "$gl_cv_struct_dirent_d_type" >&6; }
15064 if test $gl_cv_struct_dirent_d_type = yes; then
15065
15066$as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
15067
15068 fi
15069
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
472fa5ee
SM
15080 :
15081
15082
15083
15084
15085
6ec2e0f5
SDJ
15086
15087
15088
15089 if test $gl_cv_have_include_next = yes; then
15090 gl_cv_next_dirent_h='<'dirent.h'>'
15091 else
15092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
15093$as_echo_n "checking absolute name of <dirent.h>... " >&6; }
d0ac1c44 15094if ${gl_cv_next_dirent_h+:} false; then :
6ec2e0f5
SDJ
15095 $as_echo_n "(cached) " >&6
15096else
15097
15098 if test $ac_cv_header_dirent_h = yes; then
15099
15100
15101
15102
15103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15104/* end confdefs.h. */
15105#include <dirent.h>
15106_ACEOF
15107 case "$host_os" in
15108 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15109 *) gl_absname_cpp="$ac_cpp" ;;
15110 esac
15111
15112 case "$host_os" in
15113 mingw*)
15114 gl_dirsep_regex='[/\\]'
15115 ;;
15116 *)
15117 gl_dirsep_regex='\/'
15118 ;;
15119 esac
15120 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15121 gl_header_literal_regex=`echo 'dirent.h' \
15122 | sed -e "$gl_make_literal_regex_sed"`
15123 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15124 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15125 s|^/[^/]|//&|
15126 p
15127 q
15128 }'
15129
15130 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15131 sed -n "$gl_absolute_header_sed"`
15132
15133 gl_header=$gl_cv_absolute_dirent_h
15134 gl_cv_next_dirent_h='"'$gl_header'"'
15135 else
15136 gl_cv_next_dirent_h='<'dirent.h'>'
15137 fi
15138
15139
15140fi
15141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
15142$as_echo "$gl_cv_next_dirent_h" >&6; }
15143 fi
15144 NEXT_DIRENT_H=$gl_cv_next_dirent_h
15145
15146 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15147 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15148 gl_next_as_first_directive='<'dirent.h'>'
15149 else
15150 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15151 gl_next_as_first_directive=$gl_cv_next_dirent_h
15152 fi
15153 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
15154
15155
15156
15157
15158 if test $ac_cv_header_dirent_h = yes; then
15159 HAVE_DIRENT_H=1
15160 else
15161 HAVE_DIRENT_H=0
15162 fi
15163
15164
15165
6ec2e0f5 15166
6ec2e0f5
SDJ
15167
15168
15169
15170
15171
15172
15173
15174 for ac_func in dirfd
15175do :
15176 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
d0ac1c44 15177if test "x$ac_cv_func_dirfd" = xyes; then :
6ec2e0f5
SDJ
15178 cat >>confdefs.h <<_ACEOF
15179#define HAVE_DIRFD 1
15180_ACEOF
15181
15182fi
15183done
15184
15185 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
15186 #include <dirent.h>
15187"
d0ac1c44 15188if test "x$ac_cv_have_decl_dirfd" = xyes; then :
6ec2e0f5
SDJ
15189 ac_have_decl=1
15190else
15191 ac_have_decl=0
15192fi
15193
15194cat >>confdefs.h <<_ACEOF
15195#define HAVE_DECL_DIRFD $ac_have_decl
15196_ACEOF
15197
15198 if test $ac_cv_have_decl_dirfd = no; then
15199 HAVE_DECL_DIRFD=0
15200 fi
15201
15202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
15203$as_echo_n "checking whether dirfd is a macro... " >&6; }
d0ac1c44 15204if ${gl_cv_func_dirfd_macro+:} false; then :
6ec2e0f5
SDJ
15205 $as_echo_n "(cached) " >&6
15206else
15207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15208/* end confdefs.h. */
15209
15210#include <sys/types.h>
15211#include <dirent.h>
15212#ifdef dirfd
15213 dirent_header_defines_dirfd
15214#endif
15215_ACEOF
15216if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15217 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
15218 gl_cv_func_dirfd_macro=yes
15219else
15220 gl_cv_func_dirfd_macro=no
15221fi
15222rm -f conftest*
15223
15224fi
15225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
15226$as_echo "$gl_cv_func_dirfd_macro" >&6; }
15227
15228 # Use the replacement if we have no function or macro with that name,
15229 # or if OS/2 kLIBC whose dirfd() does not work.
15230 # Replace only if the system declares dirfd already.
15231 case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
15232 no,no,*,yes | *,*,os2*,yes)
15233 REPLACE_DIRFD=1
15234
15235$as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
15236;;
15237 esac
15238
15239 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
15240 || test $REPLACE_DIRFD = 1; then
15241
15242
15243
15244
15245
15246
15247
15248
15249 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
15250
15251
15252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
15253$as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
d0ac1c44 15254if ${gl_cv_sys_dir_fd_member_name+:} false; then :
6ec2e0f5
SDJ
15255 $as_echo_n "(cached) " >&6
15256else
15257
15258 dirfd_save_CFLAGS=$CFLAGS
15259 for ac_expr in d_fd dd_fd; do
15260
15261 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
15262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15263/* end confdefs.h. */
15264
15265 #include <sys/types.h>
15266 #include <dirent.h>
15267int
15268main ()
15269{
15270DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
15271 ;
15272 return 0;
15273}
15274_ACEOF
15275if ac_fn_c_try_compile "$LINENO"; then :
15276 dir_fd_found=yes
15277
15278fi
15279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15280 CFLAGS=$dirfd_save_CFLAGS
15281 test "$dir_fd_found" = yes && break
15282 done
15283 test "$dir_fd_found" = yes || ac_expr=no_such_member
15284
15285 gl_cv_sys_dir_fd_member_name=$ac_expr
15286
15287
15288fi
15289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
15290$as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
15291 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
15292
15293cat >>confdefs.h <<_ACEOF
15294#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
15295_ACEOF
15296
15297 fi
15298
15299
15300 fi
15301
15302
15303
15304
15305
15306 GNULIB_DIRFD=1
15307
15308
15309
15310
15311
15312$as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
15323$as_echo_n "checking whether // is distinct from /... " >&6; }
d0ac1c44 15324if ${gl_cv_double_slash_root+:} false; then :
6ec2e0f5
SDJ
15325 $as_echo_n "(cached) " >&6
15326else
15327 if test x"$cross_compiling" = xyes ; then
15328 # When cross-compiling, there is no way to tell whether // is special
15329 # short of a list of hosts. However, the only known hosts to date
15330 # that have a distinct // are Apollo DomainOS (too old to port to),
15331 # Cygwin, and z/OS. If anyone knows of another system for which // has
15332 # special semantics and is distinct from /, please report it to
15333 # <bug-gnulib@gnu.org>.
15334 case $host in
15335 *-cygwin | i370-ibm-openedition)
15336 gl_cv_double_slash_root=yes ;;
15337 *)
15338 # Be optimistic and assume that / and // are the same when we
15339 # don't know.
15340 gl_cv_double_slash_root='unknown, assuming no' ;;
15341 esac
15342 else
15343 set x `ls -di / // 2>/dev/null`
15344 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
15345 gl_cv_double_slash_root=no
15346 else
15347 gl_cv_double_slash_root=yes
15348 fi
15349 fi
15350fi
15351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
15352$as_echo "$gl_cv_double_slash_root" >&6; }
15353 if test "$gl_cv_double_slash_root" = yes; then
8690e634 15354
6ec2e0f5 15355$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
8690e634 15356
6ec2e0f5 15357 fi
8690e634
JK
15358
15359
15360
15361
7a6dbc2f
SDJ
15362
15363 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
15364 REPLACE_DUP=1
15365 fi
15366
8690e634 15367
8690e634
JK
15368
15369
15370
472fa5ee
SM
15371 :
15372
15373
15374
15375
15376
6ec2e0f5
SDJ
15377 if test $ac_cv_func_fchdir = no; then
15378 HAVE_FCHDIR=0
15379 fi
8690e634 15380
6ec2e0f5
SDJ
15381 if test $HAVE_FCHDIR = 0; then
15382 REPLACE_DUP=1
15383 fi
8690e634 15384
6ec2e0f5
SDJ
15385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
15386$as_echo_n "checking whether dup works... " >&6; }
d0ac1c44 15387if ${gl_cv_func_dup_works+:} false; then :
6ec2e0f5 15388 $as_echo_n "(cached) " >&6
8690e634 15389else
6ec2e0f5 15390 if test "$cross_compiling" = yes; then :
7a6dbc2f
SDJ
15391 case "$host_os" in
15392 # Guess no on native Windows.
15393 mingw*) gl_cv_func_dup_works="guessing no" ;;
15394 *) gl_cv_func_dup_works="guessing yes" ;;
15395 esac
15396
6ec2e0f5
SDJ
15397else
15398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 15399/* end confdefs.h. */
6ec2e0f5
SDJ
15400#include <unistd.h>
15401 #include <fcntl.h>
15402 #include <errno.h>
15403int
15404main ()
15405{
15406/* On OS/2 kLIBC, dup does not work on a directory fd. */
15407 int fd = open (".", O_RDONLY);
15408 return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
8690e634 15409
6ec2e0f5
SDJ
15410 ;
15411 return 0;
15412}
8690e634
JK
15413
15414_ACEOF
6ec2e0f5
SDJ
15415if ac_fn_c_try_run "$LINENO"; then :
15416 gl_cv_func_dup_works=yes
15417else
15418 gl_cv_func_dup_works=no
15419fi
15420rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15421 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 15422fi
8690e634 15423
8690e634 15424
6ec2e0f5
SDJ
15425fi
15426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
15427$as_echo "$gl_cv_func_dup_works" >&6; }
15428 case "$gl_cv_func_dup_works" in
15429 *yes) ;;
15430 *)
15431 REPLACE_DUP=1
15432 ;;
15433 esac
8690e634 15434
6ec2e0f5 15435 if test $REPLACE_DUP = 1; then
8690e634 15436
8690e634 15437
8690e634 15438
8690e634 15439
8690e634 15440
6ec2e0f5
SDJ
15441
15442
15443
15444 gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
15445
15446 :
8690e634
JK
15447 fi
15448
15449
8690e634
JK
15450
15451
15452
6ec2e0f5 15453 GNULIB_DUP=1
8690e634 15454
6ec2e0f5
SDJ
15455
15456
15457
15458
15459$as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
15460
15461
15462
15463
15464
15465
15466
15467
15468$as_echo "#define HAVE_DUP2 1" >>confdefs.h
15469
15470
15471 if test $HAVE_DUP2 = 1; then
15472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
15473$as_echo_n "checking whether dup2 works... " >&6; }
d0ac1c44 15474if ${gl_cv_func_dup2_works+:} false; then :
8690e634
JK
15475 $as_echo_n "(cached) " >&6
15476else
15477 if test "$cross_compiling" = yes; then :
6ec2e0f5
SDJ
15478 case "$host_os" in
15479 mingw*) # on this platform, dup2 always returns 0 for success
15480 gl_cv_func_dup2_works="guessing no" ;;
15481 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
15482 gl_cv_func_dup2_works="guessing no" ;;
15483 aix* | freebsd*)
15484 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
15485 # not EBADF.
15486 gl_cv_func_dup2_works="guessing no" ;;
15487 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
15488 gl_cv_func_dup2_works="guessing no" ;;
15489 *-android*) # implemented using dup3(), which fails if oldfd == newfd
15490 gl_cv_func_dup2_works="guessing no" ;;
15491 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
15492 gl_cv_func_dup2_works="guessing no" ;;
15493 *) gl_cv_func_dup2_works="guessing yes" ;;
15494 esac
8690e634
JK
15495else
15496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15497/* end confdefs.h. */
15498
6ec2e0f5
SDJ
15499 #include <errno.h>
15500 #include <fcntl.h>
15501 #include <limits.h>
15502 #include <sys/resource.h>
15503 #include <unistd.h>
15504 #ifndef RLIM_SAVED_CUR
15505 # define RLIM_SAVED_CUR RLIM_INFINITY
15506 #endif
15507 #ifndef RLIM_SAVED_MAX
15508 # define RLIM_SAVED_MAX RLIM_INFINITY
15509 #endif
8690e634
JK
15510
15511int
15512main ()
15513{
6ec2e0f5
SDJ
15514int result = 0;
15515 int bad_fd = INT_MAX;
15516 struct rlimit rlim;
15517 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
15518 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
15519 && rlim.rlim_cur != RLIM_INFINITY
15520 && rlim.rlim_cur != RLIM_SAVED_MAX
15521 && rlim.rlim_cur != RLIM_SAVED_CUR)
15522 bad_fd = rlim.rlim_cur;
15523 #ifdef FD_CLOEXEC
15524 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
15525 result |= 1;
15526 #endif
15527 if (dup2 (1, 1) != 1)
15528 result |= 2;
15529 #ifdef FD_CLOEXEC
15530 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
15531 result |= 4;
15532 #endif
15533 close (0);
15534 if (dup2 (0, 0) != -1)
15535 result |= 8;
15536 /* Many gnulib modules require POSIX conformance of EBADF. */
15537 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
15538 result |= 16;
15539 /* Flush out some cygwin core dumps. */
15540 if (dup2 (2, -1) != -1 || errno != EBADF)
15541 result |= 32;
15542 dup2 (2, 255);
15543 dup2 (2, 256);
15544 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
15545 {
15546 int fd = open (".", O_RDONLY);
15547 if (fd == -1)
15548 result |= 64;
15549 else if (dup2 (fd, fd + 1) == -1)
15550 result |= 128;
15551
15552 close (fd);
15553 }
15554 return result;
8690e634
JK
15555 ;
15556 return 0;
15557}
6ec2e0f5 15558
8690e634
JK
15559_ACEOF
15560if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 15561 gl_cv_func_dup2_works=yes
8690e634 15562else
6ec2e0f5 15563 gl_cv_func_dup2_works=no
8690e634
JK
15564fi
15565rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15566 conftest.$ac_objext conftest.beam conftest.$ac_ext
15567fi
15568
6ec2e0f5
SDJ
15569
15570fi
15571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
15572$as_echo "$gl_cv_func_dup2_works" >&6; }
15573 case "$gl_cv_func_dup2_works" in
15574 *yes) ;;
15575 *)
15576 REPLACE_DUP2=1
15577 for ac_func in setdtablesize
15578do :
15579 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
d0ac1c44 15580if test "x$ac_cv_func_setdtablesize" = xyes; then :
6ec2e0f5
SDJ
15581 cat >>confdefs.h <<_ACEOF
15582#define HAVE_SETDTABLESIZE 1
15583_ACEOF
15584
15585fi
15586done
15587
15588 ;;
15589 esac
15590 fi
15591
15592
15593
15594
472fa5ee
SM
15595 :
15596
15597
15598
15599
15600
6ec2e0f5
SDJ
15601 if test $ac_cv_func_fchdir = no; then
15602 HAVE_FCHDIR=0
8690e634
JK
15603 fi
15604
6ec2e0f5
SDJ
15605 if test $HAVE_FCHDIR = 0; then
15606 if test $HAVE_DUP2 = 1; then
15607 REPLACE_DUP2=1
15608 fi
15609 fi
8690e634 15610
8690e634 15611
6ec2e0f5 15612 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
8690e634
JK
15613
15614
15615
15616
8690e634 15617
8690e634 15618
6ec2e0f5
SDJ
15619
15620
15621 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
15622
15623
8690e634
JK
15624 fi
15625
8690e634 15626
8690e634 15627
8690e634
JK
15628
15629
6ec2e0f5
SDJ
15630 GNULIB_DUP2=1
15631
15632
15633
15634
15635
15636$as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
15637
15638
15639
15640
15641
15642
15643
15644
15645
15646 GNULIB_ENVIRON=1
15647
15648
15649
15650
15651
15652$as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
15653
15654
15655
15656
15657
15658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
15659$as_echo_n "checking for error_at_line... " >&6; }
d0ac1c44 15660if ${ac_cv_lib_error_at_line+:} false; then :
6ec2e0f5 15661 $as_echo_n "(cached) " >&6
8690e634
JK
15662else
15663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15664/* end confdefs.h. */
6ec2e0f5 15665#include <error.h>
8690e634
JK
15666int
15667main ()
15668{
6ec2e0f5 15669error_at_line (0, 0, "", 0, "an error occurred");
8690e634
JK
15670 ;
15671 return 0;
15672}
15673_ACEOF
6ec2e0f5
SDJ
15674if ac_fn_c_try_link "$LINENO"; then :
15675 ac_cv_lib_error_at_line=yes
8690e634 15676else
6ec2e0f5 15677 ac_cv_lib_error_at_line=no
8690e634 15678fi
6ec2e0f5
SDJ
15679rm -f core conftest.err conftest.$ac_objext \
15680 conftest$ac_exeext conftest.$ac_ext
8690e634 15681fi
6ec2e0f5
SDJ
15682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
15683$as_echo "$ac_cv_lib_error_at_line" >&6; }
15684
15685 if test $ac_cv_lib_error_at_line = no; then
15686
15687
15688
15689
15690
15691
15692
15693
15694 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
15695
8690e634
JK
15696
15697
8690e634
JK
15698 :
15699
6ec2e0f5 15700 fi
6a29c58e 15701
6a29c58e 15702
7a6dbc2f
SDJ
15703 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
15704
15705
15706
15707 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
15708
15709
d0ac1c44
SM
15710
15711
15712
d0ac1c44
SM
15713
15714
472fa5ee 15715 :
6a29c58e
YQ
15716
15717
3d99e817 15718
6ec2e0f5
SDJ
15719
15720
15721 if test $ac_cv_have_decl_fchdir = no; then
15722 HAVE_DECL_FCHDIR=0
15723 fi
15724
15725
15726 if test $HAVE_FCHDIR = 0; then
15727
15728
3d99e817
AK
15729
15730
15731
15732
15733
15734
6ec2e0f5 15735 gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
3d99e817 15736
6ec2e0f5 15737 :
3d99e817 15738
6ec2e0f5 15739$as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
3d99e817 15740
6ec2e0f5
SDJ
15741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
15742$as_echo_n "checking whether open can visit directories... " >&6; }
d0ac1c44 15743if ${gl_cv_func_open_directory_works+:} false; then :
6ec2e0f5
SDJ
15744 $as_echo_n "(cached) " >&6
15745else
15746 if test "$cross_compiling" = yes; then :
15747 case "$host_os" in
7a6dbc2f
SDJ
15748 # Guess yes on Linux systems.
15749 linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;;
15750 # Guess yes on glibc systems.
15751 *-gnu* | gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
15752 # Guess no on native Windows.
15753 mingw*) gl_cv_func_open_directory_works="guessing no" ;;
15754 # If we don't know, assume the worst.
15755 *) gl_cv_func_open_directory_works="guessing no" ;;
6ec2e0f5 15756 esac
3d99e817 15757
6ec2e0f5
SDJ
15758else
15759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15760/* end confdefs.h. */
15761#include <fcntl.h>
3d99e817 15762
6ec2e0f5
SDJ
15763int
15764main ()
15765{
15766return open(".", O_RDONLY) < 0;
15767 ;
15768 return 0;
15769}
3d99e817 15770_ACEOF
6ec2e0f5
SDJ
15771if ac_fn_c_try_run "$LINENO"; then :
15772 gl_cv_func_open_directory_works=yes
15773else
15774 gl_cv_func_open_directory_works=no
15775fi
15776rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15777 conftest.$ac_objext conftest.beam conftest.$ac_ext
15778fi
3d99e817
AK
15779
15780fi
6ec2e0f5
SDJ
15781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
15782$as_echo "$gl_cv_func_open_directory_works" >&6; }
15783 case "$gl_cv_func_open_directory_works" in
15784 *yes) ;;
15785 *)
3d99e817 15786
6ec2e0f5 15787$as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
3d99e817 15788
6ec2e0f5
SDJ
15789 ;;
15790 esac
15791 fi
3d99e817 15792
3d99e817
AK
15793
15794
15795
0750520d 15796
0750520d 15797
6ec2e0f5 15798 GNULIB_FCHDIR=1
0750520d 15799
0750520d
PA
15800
15801
0750520d 15802
0750520d 15803
6ec2e0f5 15804$as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
0750520d 15805
0750520d 15806
0750520d 15807
0750520d 15808
0750520d 15809
0750520d 15810
0750520d 15811
6ec2e0f5 15812
472fa5ee
SM
15813 :
15814
15815
15816
15817
15818
6ec2e0f5
SDJ
15819 if test $ac_cv_func_fcntl = no; then
15820
15821
15822
472fa5ee
SM
15823 :
15824
15825
15826
15827
15828
6ec2e0f5
SDJ
15829 if test $ac_cv_func_fcntl = no; then
15830 HAVE_FCNTL=0
15831 else
15832 REPLACE_FCNTL=1
15833 fi
15834
15835 else
15836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
15837$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
d0ac1c44 15838if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
0750520d 15839 $as_echo_n "(cached) " >&6
6ec2e0f5
SDJ
15840else
15841 if test "$cross_compiling" = yes; then :
15842 case $host_os in
15843 aix* | cygwin* | haiku*)
15844 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
15845 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
15846 esac
0750520d
PA
15847else
15848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15849/* end confdefs.h. */
6ec2e0f5
SDJ
15850#include <errno.h>
15851 #include <fcntl.h>
15852 #include <limits.h>
15853 #include <sys/resource.h>
15854 #include <unistd.h>
15855 #ifndef RLIM_SAVED_CUR
15856 # define RLIM_SAVED_CUR RLIM_INFINITY
15857 #endif
15858 #ifndef RLIM_SAVED_MAX
15859 # define RLIM_SAVED_MAX RLIM_INFINITY
15860 #endif
0750520d 15861
6ec2e0f5
SDJ
15862int
15863main ()
15864{
15865int result = 0;
15866 int bad_fd = INT_MAX;
15867 struct rlimit rlim;
15868 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
15869 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
15870 && rlim.rlim_cur != RLIM_INFINITY
15871 && rlim.rlim_cur != RLIM_SAVED_MAX
15872 && rlim.rlim_cur != RLIM_SAVED_CUR)
15873 bad_fd = rlim.rlim_cur;
15874 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
15875 if (errno != EINVAL) result |= 2;
15876 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
15877 if (errno != EINVAL) result |= 8;
15878 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
15879 {
15880 int fd;
15881 fd = open (".", O_RDONLY);
15882 if (fd == -1)
15883 result |= 16;
15884 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
15885 result |= 32;
15886
15887 close (fd);
15888 }
15889 return result;
15890 ;
15891 return 0;
15892}
0750520d 15893_ACEOF
6ec2e0f5
SDJ
15894if ac_fn_c_try_run "$LINENO"; then :
15895 gl_cv_func_fcntl_f_dupfd_works=yes
0750520d 15896else
6ec2e0f5
SDJ
15897 gl_cv_func_fcntl_f_dupfd_works=no
15898fi
15899rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15900 conftest.$ac_objext conftest.beam conftest.$ac_ext
0750520d 15901fi
0750520d
PA
15902
15903fi
6ec2e0f5
SDJ
15904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
15905$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
15906 case $gl_cv_func_fcntl_f_dupfd_works in
15907 *yes) ;;
15908 *)
0750520d 15909
0750520d 15910
472fa5ee
SM
15911 :
15912
15913
15914
15915
15916
6ec2e0f5
SDJ
15917 if test $ac_cv_func_fcntl = no; then
15918 HAVE_FCNTL=0
15919 else
15920 REPLACE_FCNTL=1
15921 fi
0750520d 15922
0750520d 15923
6ec2e0f5
SDJ
15924$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
15925 ;;
15926 esac
0750520d 15927
6ec2e0f5
SDJ
15928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
15929$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
d0ac1c44 15930if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
8690e634
JK
15931 $as_echo_n "(cached) " >&6
15932else
15933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15934/* end confdefs.h. */
15935
6ec2e0f5
SDJ
15936#include <fcntl.h>
15937#ifndef F_DUPFD_CLOEXEC
15938choke me
15939#endif
49e4877c 15940
6ec2e0f5
SDJ
15941int
15942main ()
15943{
8690e634 15944
6ec2e0f5
SDJ
15945 ;
15946 return 0;
15947}
15948_ACEOF
15949if ac_fn_c_try_compile "$LINENO"; then :
15950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15951/* end confdefs.h. */
8690e634 15952
6ec2e0f5
SDJ
15953#ifdef __linux__
15954/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
15955 it to support the semantics on older kernels that failed with EINVAL. */
15956choke me
15957#endif
8690e634
JK
15958
15959int
15960main ()
15961{
15962
8690e634
JK
15963 ;
15964 return 0;
15965}
15966_ACEOF
15967if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 15968 gl_cv_func_fcntl_f_dupfd_cloexec=yes
8690e634 15969else
6ec2e0f5 15970 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
8690e634
JK
15971fi
15972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
15973else
15974 gl_cv_func_fcntl_f_dupfd_cloexec=no
8690e634 15975fi
6ec2e0f5
SDJ
15976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15977fi
15978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
15979$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
15980 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
15981
15982
15983
472fa5ee
SM
15984 :
15985
15986
15987
15988
15989
6ec2e0f5
SDJ
15990 if test $ac_cv_func_fcntl = no; then
15991 HAVE_FCNTL=0
15992 else
15993 REPLACE_FCNTL=1
15994 fi
15995
15996 fi
15997 fi
15998
15999
16000
16001
472fa5ee
SM
16002 :
16003
16004
16005
16006
16007
6ec2e0f5
SDJ
16008 if test $ac_cv_func_fchdir = no; then
16009 HAVE_FCHDIR=0
16010 fi
16011
16012 if test $HAVE_FCHDIR = 0; then
16013
16014
16015
472fa5ee
SM
16016 :
16017
16018
16019
16020
16021
6ec2e0f5
SDJ
16022 if test $ac_cv_func_fcntl = no; then
16023 HAVE_FCNTL=0
16024 else
16025 REPLACE_FCNTL=1
16026 fi
16027
16028 fi
16029
16030
16031 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
16032
16033
16034
16035
16036
16037
16038
16039
16040 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
16041
16042 fi
8690e634 16043
8690e634
JK
16044
16045
8690e634
JK
16046
16047
6ec2e0f5 16048 GNULIB_FCNTL=1
8690e634 16049
8690e634
JK
16050
16051
8690e634 16052
8690e634 16053
6ec2e0f5
SDJ
16054$as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
16055
8690e634 16056
8690e634 16057
63ce7108
TT
16058
16059
16060
16061
8690e634
JK
16062
16063
16064
16065
16066
16067
16068
16069 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 16070 gl_cv_next_fcntl_h='<'fcntl.h'>'
8690e634 16071 else
6ec2e0f5
SDJ
16072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
16073$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
d0ac1c44 16074if ${gl_cv_next_fcntl_h+:} false; then :
8690e634
JK
16075 $as_echo_n "(cached) " >&6
16076else
16077
4a626d0a
PA
16078
16079
16080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 16081/* end confdefs.h. */
6ec2e0f5 16082#include <fcntl.h>
8690e634 16083_ACEOF
4a626d0a
PA
16084 case "$host_os" in
16085 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16086 *) gl_absname_cpp="$ac_cpp" ;;
16087 esac
16088
16089 case "$host_os" in
16090 mingw*)
16091 gl_dirsep_regex='[/\\]'
16092 ;;
16093 *)
16094 gl_dirsep_regex='\/'
16095 ;;
16096 esac
16097 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 16098 gl_header_literal_regex=`echo 'fcntl.h' \
4a626d0a
PA
16099 | sed -e "$gl_make_literal_regex_sed"`
16100 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16101 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16102 s|^/[^/]|//&|
16103 p
16104 q
16105 }'
8690e634 16106
6ec2e0f5 16107 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a 16108 sed -n "$gl_absolute_header_sed"`
c971b7fa 16109
6ec2e0f5
SDJ
16110 gl_header=$gl_cv_absolute_fcntl_h
16111 gl_cv_next_fcntl_h='"'$gl_header'"'
8690e634
JK
16112
16113
16114fi
6ec2e0f5
SDJ
16115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
16116$as_echo "$gl_cv_next_fcntl_h" >&6; }
8690e634 16117 fi
6ec2e0f5 16118 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
8690e634
JK
16119
16120 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16121 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 16122 gl_next_as_first_directive='<'fcntl.h'>'
8690e634
JK
16123 else
16124 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 16125 gl_next_as_first_directive=$gl_cv_next_fcntl_h
8690e634 16126 fi
6ec2e0f5 16127 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
8690e634
JK
16128
16129
16130
16131
16132
16133
6ec2e0f5
SDJ
16134
16135
16136
16137
8690e634 16138
8690e634 16139
7a6dbc2f
SDJ
16140
16141
16142
16143cat >>confdefs.h <<_ACEOF
16144#define GNULIB_FD_SAFER_FLAG 1
16145_ACEOF
8690e634
JK
16146
16147
16148
8839a007 16149
63ce7108 16150
63ce7108 16151
63ce7108 16152
6ec2e0f5
SDJ
16153 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
16154#include <dirent.h>
16155
16156"
d0ac1c44 16157if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
6ec2e0f5
SDJ
16158 ac_have_decl=1
16159else
16160 ac_have_decl=0
16161fi
16162
16163cat >>confdefs.h <<_ACEOF
16164#define HAVE_DECL_FDOPENDIR $ac_have_decl
63ce7108 16165_ACEOF
6ec2e0f5
SDJ
16166if test $ac_have_decl = 1; then :
16167
63ce7108 16168else
6ec2e0f5 16169 HAVE_DECL_FDOPENDIR=0
63ce7108 16170fi
63ce7108
TT
16171
16172
472fa5ee
SM
16173 :
16174
16175
16176
16177
16178
6ec2e0f5
SDJ
16179 if test $ac_cv_func_fdopendir = no; then
16180 HAVE_FDOPENDIR=0
16181 else
16182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
16183$as_echo_n "checking whether fdopendir works... " >&6; }
d0ac1c44 16184if ${gl_cv_func_fdopendir_works+:} false; then :
6ec2e0f5
SDJ
16185 $as_echo_n "(cached) " >&6
16186else
16187 if test "$cross_compiling" = yes; then :
16188 case "$host_os" in
16189 # Guess yes on glibc systems.
16190 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
16191 # If we don't know, assume the worst.
16192 *) gl_cv_func_fdopendir_works="guessing no" ;;
16193 esac
16194
63ce7108
TT
16195else
16196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16197/* end confdefs.h. */
16198
6ec2e0f5
SDJ
16199#include <dirent.h>
16200#include <fcntl.h>
16201#include <unistd.h>
16202#if !HAVE_DECL_FDOPENDIR
16203extern
16204# ifdef __cplusplus
16205"C"
16206# endif
16207DIR *fdopendir (int);
16208#endif
63ce7108
TT
16209
16210int
16211main ()
16212{
6ec2e0f5
SDJ
16213int result = 0;
16214 int fd = open ("conftest.c", O_RDONLY);
16215 if (fd < 0) result |= 1;
16216 if (fdopendir (fd)) result |= 2;
16217 if (close (fd)) result |= 4;
16218 return result;
63ce7108
TT
16219 ;
16220 return 0;
16221}
16222_ACEOF
16223if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 16224 gl_cv_func_fdopendir_works=yes
63ce7108 16225else
6ec2e0f5 16226 gl_cv_func_fdopendir_works=no
63ce7108
TT
16227fi
16228rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16229 conftest.$ac_objext conftest.beam conftest.$ac_ext
16230fi
16231
63ce7108 16232fi
6ec2e0f5
SDJ
16233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
16234$as_echo "$gl_cv_func_fdopendir_works" >&6; }
16235 case "$gl_cv_func_fdopendir_works" in
63ce7108
TT
16236 *yes) ;;
16237 *)
6ec2e0f5 16238 REPLACE_FDOPENDIR=1
63ce7108
TT
16239 ;;
16240 esac
16241 fi
16242
6ec2e0f5 16243 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
09607c9e
TT
16244
16245
16246
4a626d0a
PA
16247
16248
16249
16250
16251
6ec2e0f5 16252 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
4a626d0a 16253
6ec2e0f5 16254 fi
4a626d0a
PA
16255
16256
16257
4a626d0a 16258
4a626d0a 16259
6ec2e0f5 16260 GNULIB_FDOPENDIR=1
4a626d0a
PA
16261
16262
16263
16264
16265
6ec2e0f5 16266$as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
4a626d0a
PA
16267
16268
16269
16270
16271
6ec2e0f5
SDJ
16272cat >>confdefs.h <<_ACEOF
16273#define GNULIB_FDOPENDIR 1
16274_ACEOF
4a626d0a 16275
09607c9e 16276
09607c9e
TT
16277
16278
472fa5ee
SM
16279 :
16280
16281
16282
16283
16284
09607c9e 16285
6ec2e0f5
SDJ
16286
16287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
16288$as_echo_n "checking for flexible array member... " >&6; }
d0ac1c44 16289if ${ac_cv_c_flexmember+:} false; then :
09607c9e
TT
16290 $as_echo_n "(cached) " >&6
16291else
16292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16293/* end confdefs.h. */
6ec2e0f5
SDJ
16294#include <stdlib.h>
16295 #include <stdio.h>
16296 #include <stddef.h>
7a6dbc2f
SDJ
16297 struct m { struct m *next, **list; char name[]; };
16298 struct s { struct s *p; struct m *m; int n; double d[]; };
09607c9e
TT
16299int
16300main ()
16301{
6ec2e0f5
SDJ
16302int m = getchar ();
16303 size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
16304 nbytes += sizeof (struct s) - 1;
16305 nbytes -= nbytes % sizeof (struct s);
16306 struct s *p = malloc (nbytes);
7a6dbc2f
SDJ
16307 p->p = p;
16308 p->m = NULL;
6ec2e0f5
SDJ
16309 p->d[0] = 0.0;
16310 return p->d != (double *) NULL;
09607c9e
TT
16311 ;
16312 return 0;
16313}
16314_ACEOF
16315if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 16316 ac_cv_c_flexmember=yes
09607c9e 16317else
6ec2e0f5 16318 ac_cv_c_flexmember=no
09607c9e
TT
16319fi
16320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16321fi
6ec2e0f5
SDJ
16322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
16323$as_echo "$ac_cv_c_flexmember" >&6; }
16324 if test $ac_cv_c_flexmember = yes; then
16325
16326$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
09607c9e 16327
09607c9e 16328 else
6ec2e0f5 16329 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
09607c9e 16330
6ec2e0f5
SDJ
16331 fi
16332
16333
16334
16335
16336 FLOAT_H=
16337 REPLACE_FLOAT_LDBL=0
16338 case "$host_os" in
16339 aix* | beos* | openbsd* | mirbsd* | irix*)
16340 FLOAT_H=float.h
16341 ;;
7a6dbc2f 16342 freebsd* | dragonfly*)
6ec2e0f5
SDJ
16343 case "$host_cpu" in
16344 i[34567]86 )
16345 FLOAT_H=float.h
16346 ;;
16347 x86_64 )
16348 # On x86_64 systems, the C compiler may still be generating
16349 # 32-bit code.
16350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16351/* end confdefs.h. */
16352#if defined __LP64__ || defined __x86_64__ || defined __amd64__
7a6dbc2f
SDJ
16353 int ok;
16354 #else
16355 error fail
16356 #endif
16357
09607c9e 16358_ACEOF
7a6dbc2f 16359if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 16360
09607c9e 16361else
6ec2e0f5 16362 FLOAT_H=float.h
09607c9e 16363fi
7a6dbc2f 16364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
16365 ;;
16366 esac
16367 ;;
16368 linux*)
16369 case "$host_cpu" in
16370 powerpc*)
16371 FLOAT_H=float.h
16372 ;;
16373 esac
16374 ;;
16375 esac
16376 case "$host_os" in
7a6dbc2f 16377 aix* | freebsd* | dragonfly* | linux*)
6ec2e0f5
SDJ
16378 if test -n "$FLOAT_H"; then
16379 REPLACE_FLOAT_LDBL=1
16380 fi
16381 ;;
16382 esac
16383
16384 REPLACE_ITOLD=0
16385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
16386$as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
d0ac1c44 16387if ${gl_cv_func_itold_works+:} false; then :
09607c9e
TT
16388 $as_echo_n "(cached) " >&6
16389else
09607c9e 16390
6ec2e0f5
SDJ
16391 if test "$cross_compiling" = yes; then :
16392 case "$host" in
16393 sparc*-*-linux*)
16394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16395/* end confdefs.h. */
16396#if defined __LP64__ || defined __arch64__
7a6dbc2f
SDJ
16397 int ok;
16398 #else
16399 error fail
16400 #endif
16401
09607c9e 16402_ACEOF
7a6dbc2f 16403if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 16404 gl_cv_func_itold_works="guessing no"
09607c9e 16405else
6ec2e0f5 16406 gl_cv_func_itold_works="guessing yes"
09607c9e 16407fi
7a6dbc2f 16408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5 16409 ;;
7a6dbc2f
SDJ
16410 # Guess yes on native Windows.
16411 mingw*) gl_cv_func_itold_works="guessing yes" ;;
16412 *) gl_cv_func_itold_works="guessing yes" ;;
6ec2e0f5
SDJ
16413 esac
16414
4a626d0a
PA
16415else
16416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16417/* end confdefs.h. */
4a626d0a 16418
6ec2e0f5
SDJ
16419int i = -1;
16420volatile long double ld;
16421int main ()
4a626d0a 16422{
6ec2e0f5
SDJ
16423 ld += i * 1.0L;
16424 if (ld > 0)
16425 return 1;
4a626d0a
PA
16426 return 0;
16427}
16428_ACEOF
6ec2e0f5
SDJ
16429if ac_fn_c_try_run "$LINENO"; then :
16430 gl_cv_func_itold_works=yes
4a626d0a 16431else
6ec2e0f5
SDJ
16432 gl_cv_func_itold_works=no
16433fi
16434rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16435 conftest.$ac_objext conftest.beam conftest.$ac_ext
16436fi
09607c9e
TT
16437
16438
6ec2e0f5
SDJ
16439fi
16440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
16441$as_echo "$gl_cv_func_itold_works" >&6; }
16442 case "$gl_cv_func_itold_works" in
16443 *no)
16444 REPLACE_ITOLD=1
16445 FLOAT_H=float.h
16446 ;;
16447 esac
09607c9e 16448
6ec2e0f5 16449 if test -n "$FLOAT_H"; then
09607c9e
TT
16450
16451
16452
16453
16454
16455
16456
4a626d0a 16457
09607c9e 16458 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 16459 gl_cv_next_float_h='<'float.h'>'
09607c9e 16460 else
6ec2e0f5
SDJ
16461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
16462$as_echo_n "checking absolute name of <float.h>... " >&6; }
d0ac1c44 16463if ${gl_cv_next_float_h+:} false; then :
09607c9e
TT
16464 $as_echo_n "(cached) " >&6
16465else
16466
4a626d0a
PA
16467
16468
16469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
09607c9e 16470/* end confdefs.h. */
6ec2e0f5 16471#include <float.h>
09607c9e 16472_ACEOF
4a626d0a
PA
16473 case "$host_os" in
16474 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16475 *) gl_absname_cpp="$ac_cpp" ;;
16476 esac
16477
16478 case "$host_os" in
16479 mingw*)
16480 gl_dirsep_regex='[/\\]'
16481 ;;
16482 *)
16483 gl_dirsep_regex='\/'
16484 ;;
16485 esac
16486 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 16487 gl_header_literal_regex=`echo 'float.h' \
4a626d0a
PA
16488 | sed -e "$gl_make_literal_regex_sed"`
16489 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16490 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16491 s|^/[^/]|//&|
16492 p
16493 q
16494 }'
09607c9e 16495
6ec2e0f5 16496 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a 16497 sed -n "$gl_absolute_header_sed"`
09607c9e 16498
6ec2e0f5
SDJ
16499 gl_header=$gl_cv_absolute_float_h
16500 gl_cv_next_float_h='"'$gl_header'"'
09607c9e
TT
16501
16502
16503fi
6ec2e0f5
SDJ
16504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
16505$as_echo "$gl_cv_next_float_h" >&6; }
09607c9e 16506 fi
6ec2e0f5 16507 NEXT_FLOAT_H=$gl_cv_next_float_h
09607c9e
TT
16508
16509 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16510 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 16511 gl_next_as_first_directive='<'float.h'>'
09607c9e
TT
16512 else
16513 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 16514 gl_next_as_first_directive=$gl_cv_next_float_h
09607c9e 16515 fi
6ec2e0f5 16516 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
09607c9e
TT
16517
16518
16519
16520
6ec2e0f5 16521 fi
09607c9e 16522
6ec2e0f5
SDJ
16523 if test -n "$FLOAT_H"; then
16524 GL_GENERATE_FLOAT_H_TRUE=
16525 GL_GENERATE_FLOAT_H_FALSE='#'
3d99e817 16526else
6ec2e0f5
SDJ
16527 GL_GENERATE_FLOAT_H_TRUE='#'
16528 GL_GENERATE_FLOAT_H_FALSE=
3d99e817
AK
16529fi
16530
3d99e817 16531
09607c9e 16532
6ec2e0f5 16533 if test $REPLACE_FLOAT_LDBL = 1; then
8690e634 16534
8690e634 16535
8690e634 16536
8690e634 16537
8690e634 16538
6ec2e0f5
SDJ
16539
16540
16541
16542 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
16543
8690e634 16544 fi
6ec2e0f5 16545 if test $REPLACE_ITOLD = 1; then
8690e634
JK
16546
16547
16548
16549
16550
6ec2e0f5
SDJ
16551
16552
16553
16554 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
16555
8690e634
JK
16556 fi
16557
16558
16559
6ec2e0f5 16560
6ec2e0f5
SDJ
16561 gl_fnmatch_required_lowercase=`
16562 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
16563 `
7a6dbc2f
SDJ
16564
16565 :
16566
16567
16568
16569
16570
16571 if test $ac_cv_func_fnmatch = no; then
16572 HAVE_FNMATCH=0
16573 else
16574 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
16575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
6ec2e0f5 16576$as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
d0ac1c44 16577if eval \${$gl_fnmatch_cache_var+:} false; then :
8690e634 16578 $as_echo_n "(cached) " >&6
6ec2e0f5 16579else
7a6dbc2f
SDJ
16580 if test $gl_fnmatch_required = GNU; then
16581 gl_fnmatch_gnu_start=
16582 gl_fnmatch_gnu_end=
16583 else
16584 gl_fnmatch_gnu_start='#if 0'
16585 gl_fnmatch_gnu_end='#endif'
16586 fi
16587 if test "$cross_compiling" = yes; then :
6ec2e0f5 16588 eval "$gl_fnmatch_cache_var=\"guessing no\""
8690e634
JK
16589else
16590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16591/* end confdefs.h. */
6ec2e0f5 16592#include <fnmatch.h>
7a6dbc2f
SDJ
16593 static int
16594 y (char const *pattern, char const *string, int flags)
16595 {
16596 return fnmatch (pattern, string, flags) == 0;
16597 }
16598 static int
16599 n (char const *pattern, char const *string, int flags)
16600 {
16601 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
16602 }
8690e634 16603
8690e634
JK
16604int
16605main ()
16606{
6ec2e0f5 16607char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
7a6dbc2f
SDJ
16608 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
16609 static char const A_1[] = { 'A' - 1, 0 };
16610 static char const A01[] = { 'A' + 1, 0 };
16611 static char const a_1[] = { 'a' - 1, 0 };
16612 static char const a01[] = { 'a' + 1, 0 };
16613 static char const bs_1[] = { '\\\\' - 1, 0 };
16614 static char const bs01[] = { '\\\\' + 1, 0 };
16615 int result = 0;
16616 if (!n ("a*", "", 0))
16617 return 1;
16618 if (!y ("a*", "abc", 0))
16619 return 1;
16620 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
16621 return 1;
16622 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
16623 return 2;
16624 if (!y ("a\\\\bc", "abc", 0))
16625 return 3;
16626 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
16627 return 3;
16628 if (!y ("*x", ".x", 0))
16629 return 4;
16630 if (!n ("*x", ".x", FNM_PERIOD))
16631 return 4;
16632 if (!y (Apat, "\\\\", 0))
16633 return 5;
16634 if (!y (Apat, "A", 0))
16635 return 5;
16636 if (!y (apat, "\\\\", 0))
16637 return 5;
16638 if (!y (apat, "a", 0))
16639 return 5;
16640 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
16641 return 5;
16642 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
16643 return 5;
16644 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
16645 return 5;
16646 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
16647 return 5;
16648 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
16649 return 5;
16650 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
16651 return 5;
16652 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
16653 return 5;
16654 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
16655 return 5;
16656 $gl_fnmatch_gnu_start
16657 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
16658 result |= 8;
16659 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
16660 result |= 16;
16661 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
16662 result |= 32;
16663 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
16664 result |= 64;
16665 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
16666 result |= 64;
16667 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
16668 result |= 64;
16669 $gl_fnmatch_gnu_end
16670 return result;
8690e634
JK
16671
16672 ;
16673 return 0;
16674}
16675_ACEOF
6ec2e0f5
SDJ
16676if ac_fn_c_try_run "$LINENO"; then :
16677 eval "$gl_fnmatch_cache_var=yes"
8690e634 16678else
6ec2e0f5 16679 eval "$gl_fnmatch_cache_var=no"
8690e634 16680fi
6ec2e0f5
SDJ
16681rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16682 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 16683fi
8690e634 16684
8690e634 16685
6ec2e0f5
SDJ
16686fi
16687eval ac_res=\$$gl_fnmatch_cache_var
16688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16689$as_echo "$ac_res" >&6; }
7a6dbc2f
SDJ
16690 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
16691 if test "$gl_fnmatch_result" != yes; then
16692 REPLACE_FNMATCH=1
16693 fi
8690e634 16694 fi
7a6dbc2f
SDJ
16695 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
16696
8690e634 16697
7a6dbc2f 16698 FNMATCH_H='fnmatch.h'
6ec2e0f5
SDJ
16699 if test -n "$FNMATCH_H"; then
16700 GL_GENERATE_FNMATCH_H_TRUE=
16701 GL_GENERATE_FNMATCH_H_FALSE='#'
16702else
16703 GL_GENERATE_FNMATCH_H_TRUE='#'
16704 GL_GENERATE_FNMATCH_H_FALSE=
16705fi
8690e634 16706
8690e634 16707
7a6dbc2f 16708 fi
8690e634 16709
7a6dbc2f 16710 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
8690e634 16711
6ec2e0f5
SDJ
16712
16713
16714
16715
16716
6ec2e0f5
SDJ
16717
16718
7a6dbc2f 16719 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
6ec2e0f5 16720
6ec2e0f5
SDJ
16721
16722
16723 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
16724"
d0ac1c44 16725if test "x$ac_cv_have_decl_isblank" = xyes; then :
6ec2e0f5 16726 ac_have_decl=1
8690e634 16727else
6ec2e0f5 16728 ac_have_decl=0
8690e634
JK
16729fi
16730
6ec2e0f5
SDJ
16731cat >>confdefs.h <<_ACEOF
16732#define HAVE_DECL_ISBLANK $ac_have_decl
16733_ACEOF
8690e634
JK
16734
16735
472fa5ee
SM
16736 :
16737
16738
16739
16740
16741
16742
16743
16744
16745
16746
16747
16748
16749
16750
16751
16752
16753
16754
16755
16756
16757
16758
16759
16760
16761
16762
16763
16764 :
16765
16766
16767
16768
8690e634
JK
16769
16770
6ec2e0f5 16771 fi
8690e634
JK
16772
16773
16774
16775
16776
7a6dbc2f 16777 GNULIB_FNMATCH=1
472fa5ee
SM
16778
16779
16780
16781
16782
7a6dbc2f 16783$as_echo "#define GNULIB_TEST_FNMATCH 1" >>confdefs.h
472fa5ee
SM
16784
16785
16786
16787
16788
16789
16790
16791
7a6dbc2f 16792 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
472fa5ee
SM
16793
16794
16795
16796
16797
16798
16799
16800
7a6dbc2f 16801 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
472fa5ee
SM
16802
16803
98399780 16804
7a6dbc2f
SDJ
16805 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
16806"
16807if test "x$ac_cv_have_decl_isblank" = xyes; then :
16808 ac_have_decl=1
6ec2e0f5 16809else
7a6dbc2f 16810 ac_have_decl=0
6ec2e0f5 16811fi
98399780 16812
7a6dbc2f
SDJ
16813cat >>confdefs.h <<_ACEOF
16814#define HAVE_DECL_ISBLANK $ac_have_decl
16815_ACEOF
98399780
YQ
16816
16817
472fa5ee
SM
16818 :
16819
16820
16821
16822
16823
98399780
YQ
16824
16825
16826
16827
16828
16829
6a29c58e
YQ
16830
16831
16832
16833
6a29c58e
YQ
16834
16835
16836
16837
8690e634 16838
8690e634 16839
8690e634 16840
8690e634 16841
8690e634 16842
8690e634 16843
8690e634 16844
8690e634 16845
7a6dbc2f 16846 :
4a626d0a 16847
8690e634 16848
8690e634
JK
16849
16850
16851
16852
7a6dbc2f 16853 fi
8690e634
JK
16854
16855
7a6dbc2f
SDJ
16856cat >>confdefs.h <<_ACEOF
16857#define GNULIB_FNMATCH_GNU 1
16858_ACEOF
63ce7108 16859
e26b6bb0
TT
16860
16861
16862
7a6dbc2f 16863 if test $gl_func_frexp != yes; then
e26b6bb0
TT
16864
16865
16866
16867
e26b6bb0 16868
e26b6bb0
TT
16869
16870
e26b6bb0 16871
7a6dbc2f 16872 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
e26b6bb0 16873
7a6dbc2f 16874 fi
18848e28 16875
18848e28 16876
18848e28 16877
18848e28 16878
18848e28 16879
7a6dbc2f 16880 GNULIB_FREXP=1
18848e28 16881
18848e28
GF
16882
16883
16884
16885
7a6dbc2f 16886$as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
18848e28
GF
16887
16888
18848e28 16889
18848e28 16890
6ec2e0f5 16891 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
18848e28 16892
18848e28 16893
18848e28 16894
18848e28
GF
16895
16896
18848e28 16897
18848e28 16898
18848e28 16899
6ec2e0f5 16900 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
18848e28
GF
16901
16902 fi
16903
16904
16905
16906
16907
6ec2e0f5 16908 GNULIB_FREXPL=1
18848e28
GF
16909
16910
16911
16912
16913
6ec2e0f5 16914$as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
18848e28
GF
16915
16916
16917
16918
16919
16920
16921
7a6dbc2f
SDJ
16922 case "$host_os" in
16923 mingw* | solaris*)
16924 REPLACE_FSTAT=1
16925 ;;
16926 esac
18848e28 16927
6a29c58e 16928
6a29c58e 16929
6a29c58e 16930
6ec2e0f5 16931
472fa5ee
SM
16932 :
16933
16934
16935
16936
16937
6ec2e0f5
SDJ
16938 if test $ac_cv_func_fchdir = no; then
16939 HAVE_FCHDIR=0
6a29c58e
YQ
16940 fi
16941
6ec2e0f5
SDJ
16942 if test $HAVE_FCHDIR = 0; then
16943 case "$gl_cv_func_open_directory_works" in
16944 *yes) ;;
16945 *)
16946 REPLACE_FSTAT=1
16947 ;;
16948 esac
16949 fi
6a29c58e
YQ
16950
16951
6ec2e0f5 16952 if test $REPLACE_FSTAT = 1; then
6a29c58e 16953
3d99e817
AK
16954
16955
16956
3d99e817
AK
16957
16958
16959
16960
6ec2e0f5 16961 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
3d99e817 16962
7a6dbc2f
SDJ
16963 case "$host_os" in
16964 mingw*)
16965
16966
16967
16968
16969
16970
16971
16972
16973 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
16974
16975 ;;
16976 esac
16977
16978
16979 :
16980
6ec2e0f5 16981 fi
3d99e817
AK
16982
16983
16984
16985
16986
6ec2e0f5 16987 GNULIB_FSTAT=1
3d99e817 16988
49e4877c 16989
49e4877c 16990
49e4877c 16991
49e4877c 16992
6ec2e0f5 16993$as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
49e4877c 16994
6a29c58e
YQ
16995
16996
88b48903 16997
8690e634 16998
a512b375 16999
88b48903 17000
88b48903 17001
7a6dbc2f 17002
472fa5ee
SM
17003 :
17004
17005
17006
17007
17008
6ec2e0f5
SDJ
17009
17010 if test $ac_cv_func_fstatat = no; then
17011 HAVE_FSTATAT=0
17012 else
17013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
17014$as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
d0ac1c44 17015if ${gl_cv_func_fstatat_zero_flag+:} false; then :
6ec2e0f5
SDJ
17016 $as_echo_n "(cached) " >&6
17017else
17018 if test "$cross_compiling" = yes; then :
17019 case "$host_os" in
17020 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
17021 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
17022 esac
88b48903 17023
8690e634
JK
17024else
17025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17026/* end confdefs.h. */
8690e634 17027
6ec2e0f5
SDJ
17028 #include <fcntl.h>
17029 #include <sys/stat.h>
17030 int
17031 main (void)
17032 {
17033 struct stat a;
17034 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
17035 }
17036
88b48903
WN
17037_ACEOF
17038if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 17039 gl_cv_func_fstatat_zero_flag=yes
88b48903 17040else
6ec2e0f5 17041 gl_cv_func_fstatat_zero_flag=no
88b48903
WN
17042fi
17043rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17044 conftest.$ac_objext conftest.beam conftest.$ac_ext
17045fi
17046
17047
17048fi
6ec2e0f5
SDJ
17049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
17050$as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
88b48903 17051
6ec2e0f5
SDJ
17052 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
17053 *yes+*yes) ;;
7a6dbc2f
SDJ
17054 *) REPLACE_FSTATAT=1 ;;
17055 esac
17056
17057 case $host_os in
17058 solaris*)
17059 REPLACE_FSTATAT=1 ;;
17060 esac
17061
17062 case $REPLACE_FSTATAT,$gl_cv_func_fstatat_zero_flag in
17063 1,*yes)
88b48903 17064
6ec2e0f5 17065$as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
88b48903 17066
7a6dbc2f 17067 ;;
6ec2e0f5
SDJ
17068 esac
17069 fi
88b48903 17070
6ec2e0f5 17071 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
88b48903
WN
17072
17073
17074
17075
17076
88b48903 17077
4a626d0a
PA
17078
17079
6ec2e0f5
SDJ
17080 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
17081
17082 fi
17083
17084
17085
4a626d0a 17086
6ec2e0f5
SDJ
17087
17088 GNULIB_FSTATAT=1
17089
17090
17091
17092
17093
17094$as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
17095
17096
17097
17098
17099
17100
17101
17102
17103 gl_abort_bug=no
4a626d0a
PA
17104 case "$host_os" in
17105 mingw*)
6ec2e0f5 17106 gl_cv_func_getcwd_path_max=yes
4a626d0a
PA
17107 ;;
17108 *)
88b48903 17109
88b48903 17110
472fa5ee
SM
17111 :
17112
17113
17114
17115
17116
17117
17118
17119 :
17120
17121
17122
88b48903
WN
17123
17124
88b48903 17125
6ec2e0f5
SDJ
17126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
17127$as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
d0ac1c44 17128if ${gl_cv_func_getcwd_path_max+:} false; then :
6ec2e0f5
SDJ
17129 $as_echo_n "(cached) " >&6
17130else
17131 # Arrange for deletion of the temporary directory this test creates.
17132 ac_clean_files="$ac_clean_files confdir3"
17133 if test "$cross_compiling" = yes; then :
7a6dbc2f
SDJ
17134 # Cross-compilation guesses:
17135 case "$host_os" in
17136 aix*) # On AIX, it has the AIX bug.
17137 gl_cv_func_getcwd_path_max='no, it has the AIX bug' ;;
17138 gnu*) # On Hurd, it is 'yes'.
17139 gl_cv_func_getcwd_path_max=yes ;;
17140 linux* | kfreebsd*)
17141 # On older Linux+glibc it's 'no, but it is partly working',
17142 # on newer Linux+glibc it's 'yes'.
17143 # On Linux+musl libc, it's 'no, but it is partly working'.
17144 # On kFreeBSD+glibc, it's 'no, but it is partly working'.
17145 gl_cv_func_getcwd_path_max='no, but it is partly working' ;;
17146 *) # If we don't know, assume the worst.
17147 gl_cv_func_getcwd_path_max=no ;;
17148 esac
17149
6ec2e0f5
SDJ
17150else
17151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17152/* end confdefs.h. */
88b48903 17153
6ec2e0f5
SDJ
17154#include <errno.h>
17155#include <stdlib.h>
17156#if HAVE_UNISTD_H
17157# include <unistd.h>
17158#else
17159# include <direct.h>
17160#endif
17161#include <string.h>
17162#include <limits.h>
17163#include <sys/stat.h>
17164#include <sys/types.h>
17165#include <fcntl.h>
88b48903
WN
17166
17167
6ec2e0f5
SDJ
17168/* Arrange to define PATH_MAX, like "pathmax.h" does. */
17169#if HAVE_UNISTD_H
17170# include <unistd.h>
17171#endif
17172#include <limits.h>
17173#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
17174# include <sys/param.h>
17175#endif
17176#if !defined PATH_MAX && defined MAXPATHLEN
17177# define PATH_MAX MAXPATHLEN
17178#endif
17179#ifdef __hpux
17180# undef PATH_MAX
17181# define PATH_MAX 1024
17182#endif
7a6dbc2f 17183#if defined _WIN32 && ! defined __CYGWIN__
6ec2e0f5
SDJ
17184# undef PATH_MAX
17185# define PATH_MAX 260
17186#endif
88b48903 17187
88b48903 17188
6ec2e0f5
SDJ
17189#ifndef AT_FDCWD
17190# define AT_FDCWD 0
17191#endif
17192#ifdef ENAMETOOLONG
17193# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
17194#else
17195# define is_ENAMETOOLONG(x) 0
17196#endif
88b48903 17197
6ec2e0f5
SDJ
17198/* Use the getcwd function, not any macro. */
17199#undef getcwd
88b48903 17200
6ec2e0f5
SDJ
17201/* Don't get link errors because mkdir is redefined to rpl_mkdir. */
17202#undef mkdir
88b48903 17203
6ec2e0f5
SDJ
17204#ifndef S_IRWXU
17205# define S_IRWXU 0700
17206#endif
88b48903 17207
6ec2e0f5
SDJ
17208/* The length of this name must be 8. */
17209#define DIR_NAME "confdir3"
17210#define DIR_NAME_LEN 8
17211#define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
88b48903 17212
6ec2e0f5
SDJ
17213/* The length of "../". */
17214#define DOTDOTSLASH_LEN 3
88b48903 17215
6ec2e0f5
SDJ
17216/* Leftover bytes in the buffer, to work around library or OS bugs. */
17217#define BUF_SLOP 20
88b48903 17218
6ec2e0f5
SDJ
17219int
17220main ()
17221{
17222#ifndef PATH_MAX
17223 /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
17224 at least not on a local file system. And if we were to start worrying
17225 about remote file systems, we'd have to enable the wrapper function
17226 all of the time, just to be safe. That's not worth the cost. */
17227 exit (0);
17228#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
17229 - DIR_NAME_SIZE - BUF_SLOP) \
17230 <= PATH_MAX)
17231 /* FIXME: Assuming there's a system for which this is true,
17232 this should be done in a compile test. */
17233 exit (0);
17234#else
17235 char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
17236 + DIR_NAME_SIZE + BUF_SLOP];
17237 char *cwd = getcwd (buf, PATH_MAX);
17238 size_t initial_cwd_len;
17239 size_t cwd_len;
17240 int fail = 0;
17241 size_t n_chdirs = 0;
88b48903 17242
6ec2e0f5
SDJ
17243 if (cwd == NULL)
17244 exit (10);
88b48903 17245
6ec2e0f5 17246 cwd_len = initial_cwd_len = strlen (cwd);
88b48903 17247
6ec2e0f5
SDJ
17248 while (1)
17249 {
17250 size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
17251 char *c = NULL;
17252
17253 cwd_len += DIR_NAME_SIZE;
17254 /* If mkdir or chdir fails, it could be that this system cannot create
17255 any file with an absolute name longer than PATH_MAX, such as cygwin.
17256 If so, leave fail as 0, because the current working directory can't
17257 be too long for getcwd if it can't even be created. For other
17258 errors, be pessimistic and consider that as a failure, too. */
17259 if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
17260 {
17261 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
17262 fail = 20;
17263 break;
17264 }
88b48903 17265
6ec2e0f5
SDJ
17266 if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
17267 {
17268 struct stat sb;
88b48903 17269
6ec2e0f5
SDJ
17270 c = getcwd (buf, PATH_MAX);
17271 if (!c && errno == ENOENT)
17272 {
17273 fail = 11;
17274 break;
17275 }
17276 if (c)
17277 {
17278 fail = 31;
17279 break;
17280 }
17281 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
17282 {
17283 fail = 21;
17284 break;
17285 }
88b48903 17286
6ec2e0f5
SDJ
17287 /* Our replacement needs to be able to stat() long ../../paths,
17288 so generate a path larger than PATH_MAX to check,
17289 avoiding the replacement if we can't stat(). */
17290 c = getcwd (buf, cwd_len + 1);
17291 if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno))
17292 {
17293 fail = 32;
17294 break;
17295 }
17296 }
88b48903 17297
6ec2e0f5
SDJ
17298 if (dotdot_max <= cwd_len - initial_cwd_len)
17299 {
17300 if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
17301 break;
17302 c = getcwd (buf, cwd_len + 1);
17303 if (!c)
17304 {
17305 if (! (errno == ERANGE || errno == ENOENT
17306 || is_ENAMETOOLONG (errno)))
17307 {
17308 fail = 22;
17309 break;
17310 }
17311 if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
17312 {
17313 fail = 12;
17314 break;
17315 }
17316 }
17317 }
88b48903 17318
6ec2e0f5
SDJ
17319 if (c && strlen (c) != cwd_len)
17320 {
17321 fail = 23;
17322 break;
17323 }
17324 ++n_chdirs;
17325 }
88b48903 17326
6ec2e0f5
SDJ
17327 /* Leaving behind such a deep directory is not polite.
17328 So clean up here, right away, even though the driving
17329 shell script would also clean up. */
17330 {
17331 size_t i;
88b48903 17332
6ec2e0f5
SDJ
17333 /* Try rmdir first, in case the chdir failed. */
17334 rmdir (DIR_NAME);
17335 for (i = 0; i <= n_chdirs; i++)
17336 {
17337 if (chdir ("..") < 0)
17338 break;
17339 if (rmdir (DIR_NAME) != 0)
17340 break;
17341 }
17342 }
88b48903 17343
6ec2e0f5
SDJ
17344 exit (fail);
17345#endif
17346}
88b48903 17347
6ec2e0f5
SDJ
17348_ACEOF
17349if ac_fn_c_try_run "$LINENO"; then :
17350 gl_cv_func_getcwd_path_max=yes
17351else
17352 case $? in
7a6dbc2f
SDJ
17353 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
17354 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
17355 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
17356 *) gl_cv_func_getcwd_path_max=no;;
17357 esac
6ec2e0f5
SDJ
17358fi
17359rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17360 conftest.$ac_objext conftest.beam conftest.$ac_ext
17361fi
88b48903 17362
88b48903 17363
6ec2e0f5
SDJ
17364fi
17365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
17366$as_echo "$gl_cv_func_getcwd_path_max" >&6; }
88b48903 17367
6ec2e0f5
SDJ
17368 case "$gl_cv_func_getcwd_null" in
17369 *yes)
88b48903
WN
17370
17371
472fa5ee
SM
17372 :
17373
17374
17375
17376
17377
17378
17379 :
17380
17381
17382
17383
88b48903
WN
17384
17385
7a6dbc2f
SDJ
17386
17387
17388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
17389$as_echo_n "checking for getpagesize... " >&6; }
17390if ${gl_cv_func_getpagesize+:} false; then :
17391 $as_echo_n "(cached) " >&6
17392else
17393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17394/* end confdefs.h. */
17395#include <unistd.h>
17396int
17397main ()
17398{
17399return getpagesize();
17400 ;
17401 return 0;
17402}
17403
6ec2e0f5 17404_ACEOF
7a6dbc2f
SDJ
17405if ac_fn_c_try_link "$LINENO"; then :
17406 gl_cv_func_getpagesize=yes
17407else
17408 gl_cv_func_getpagesize=no
17409fi
17410rm -f core conftest.err conftest.$ac_objext \
17411 conftest$ac_exeext conftest.$ac_ext
6ec2e0f5
SDJ
17412
17413fi
7a6dbc2f
SDJ
17414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpagesize" >&5
17415$as_echo "$gl_cv_func_getpagesize" >&6; }
17416
17417 if test $gl_cv_func_getpagesize = yes; then
17418
17419cat >>confdefs.h <<_ACEOF
17420#define HAVE_GETPAGESIZE 1
17421_ACEOF
17422
17423 fi
6ec2e0f5
SDJ
17424
17425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5
17426$as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; }
d0ac1c44 17427if ${gl_cv_func_getcwd_abort_bug+:} false; then :
88b48903
WN
17428 $as_echo_n "(cached) " >&6
17429else
6ec2e0f5
SDJ
17430 # Remove any remnants of a previous test.
17431 rm -rf confdir-14B---
17432 # Arrange for deletion of the temporary directory this test creates.
17433 ac_clean_files="$ac_clean_files confdir-14B---"
17434 if test "$cross_compiling" = yes; then :
17435 gl_cv_func_getcwd_abort_bug=yes
88b48903
WN
17436else
17437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17438/* end confdefs.h. */
6ec2e0f5
SDJ
17439
17440#include <errno.h>
17441#include <stdlib.h>
17442#if HAVE_UNISTD_H
17443# include <unistd.h>
17444#else /* on Windows with MSVC */
17445# include <direct.h>
17446#endif
17447#include <string.h>
17448#include <sys/stat.h>
17449
17450
17451/* Arrange to define PATH_MAX, like "pathmax.h" does. */
17452#if HAVE_UNISTD_H
17453# include <unistd.h>
17454#endif
17455#include <limits.h>
17456#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
17457# include <sys/param.h>
17458#endif
17459#if !defined PATH_MAX && defined MAXPATHLEN
17460# define PATH_MAX MAXPATHLEN
17461#endif
17462#ifdef __hpux
17463# undef PATH_MAX
17464# define PATH_MAX 1024
17465#endif
7a6dbc2f 17466#if defined _WIN32 && ! defined __CYGWIN__
6ec2e0f5
SDJ
17467# undef PATH_MAX
17468# define PATH_MAX 260
17469#endif
17470
17471
17472/* Don't get link errors because mkdir is redefined to rpl_mkdir. */
17473#undef mkdir
17474
17475#ifndef S_IRWXU
17476# define S_IRWXU 0700
17477#endif
17478
17479/* FIXME: skip the run-test altogether on systems without getpagesize. */
17480#if ! HAVE_GETPAGESIZE
17481# define getpagesize() 0
17482#endif
17483
17484/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
17485 the 16kB pagesize on ia64 linux. Those conditions make the code below
17486 trigger a bug in glibc's getcwd implementation before 2.4.90-10. */
17487#define TARGET_LEN (5 * 1024)
88b48903
WN
17488
17489int
17490main ()
17491{
6ec2e0f5
SDJ
17492 char *cwd;
17493 size_t initial_cwd_len;
17494 int fail = 0;
17495
17496 /* The bug is triggered when PATH_MAX < getpagesize (), so skip
17497 this relatively expensive and invasive test if that's not true. */
17498#ifdef PATH_MAX
17499 int bug_possible = PATH_MAX < getpagesize ();
17500#else
17501 int bug_possible = 0;
17502#endif
17503 if (! bug_possible)
17504 return 0;
8690e634 17505
6ec2e0f5
SDJ
17506 cwd = getcwd (NULL, 0);
17507 if (cwd == NULL)
17508 return 2;
17509
17510 initial_cwd_len = strlen (cwd);
17511 free (cwd);
17512
17513 if (1)
17514 {
17515 static char const dir_name[] = "confdir-14B---";
17516 size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
17517 / sizeof dir_name);
17518 size_t d;
17519 for (d = 0; d < desired_depth; d++)
17520 {
17521 if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
17522 {
17523 if (! (errno == ERANGE || errno == ENAMETOOLONG
17524 || errno == ENOENT))
17525 fail = 3; /* Unable to construct deep hierarchy. */
17526 break;
17527 }
17528 }
17529
17530 /* If libc has the bug in question, this invocation of getcwd
17531 results in a failed assertion. */
17532 cwd = getcwd (NULL, 0);
17533 if (cwd == NULL)
17534 fail = 4; /* getcwd didn't assert, but it failed for a long name
17535 where the answer could have been learned. */
17536 free (cwd);
17537
17538 /* Call rmdir first, in case the above chdir failed. */
17539 rmdir (dir_name);
17540 while (0 < d--)
17541 {
17542 if (chdir ("..") < 0)
17543 {
17544 fail = 5;
17545 break;
17546 }
17547 rmdir (dir_name);
17548 }
17549 }
17550
17551 return fail;
8690e634 17552}
6ec2e0f5 17553
8690e634
JK
17554_ACEOF
17555if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 17556 gl_cv_func_getcwd_abort_bug=no
8690e634 17557else
7a6dbc2f
SDJ
17558 ret=$?
17559 if test $ret -ge 128 || test $ret = 4; then
17560 gl_cv_func_getcwd_abort_bug=yes
17561 else
17562 gl_cv_func_getcwd_abort_bug=no
17563 fi
8690e634
JK
17564fi
17565rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17566 conftest.$ac_objext conftest.beam conftest.$ac_ext
17567fi
17568
17569
17570fi
6ec2e0f5
SDJ
17571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5
17572$as_echo "$gl_cv_func_getcwd_abort_bug" >&6; }
17573 if test $gl_cv_func_getcwd_abort_bug = yes; then :
17574 gl_abort_bug=yes
17575fi
17576
17577 ;;
17578 esac
17579 ;;
17580 esac
17581 case "$gl_cv_func_getcwd_path_max" in
17582 "no"|"no, it has the AIX bug") ;;
17583 *)
17584
17585$as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
17586
17587 ;;
17588 esac
17589 case "$gl_cv_func_getcwd_path_max" in
17590 "no, but it is partly working")
17591
17592$as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
17593
17594 ;;
17595 "yes, but with shorter paths")
17596
17597$as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
17598
17599 ;;
17600 esac
17601
17602 if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
17603 || test $gl_cv_func_getcwd_posix_signature != yes \
17604 || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \
17605 || test $gl_abort_bug = yes; then
17606 REPLACE_GETCWD=1
8690e634
JK
17607 fi
17608
6ec2e0f5 17609 if test $REPLACE_GETCWD = 1; then
8690e634
JK
17610
17611
8690e634
JK
17612
17613
17614
17615
17616
17617
6ec2e0f5 17618 gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
8690e634
JK
17619
17620
8690e634
JK
17621
17622
6ec2e0f5
SDJ
17623 :
17624
17625 fi
17626
8690e634
JK
17627
17628cat >>confdefs.h <<_ACEOF
6ec2e0f5 17629#define GNULIB_GETCWD 1
8690e634
JK
17630_ACEOF
17631
17632
8690e634 17633
8690e634
JK
17634
17635
c971b7fa 17636
c971b7fa 17637
6ec2e0f5
SDJ
17638 GNULIB_GETCWD=1
17639
17640
17641
17642
17643
17644$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
17645
c971b7fa 17646
c971b7fa 17647
c971b7fa 17648
c971b7fa 17649
c971b7fa 17650
c971b7fa 17651
c971b7fa 17652
6ec2e0f5
SDJ
17653 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
17654 *yes,yes) ;;
17655 *)
17656 REPLACE_GETCWD=1
17657 ;;
17658 esac
c971b7fa 17659
6ec2e0f5 17660 if test $REPLACE_GETCWD = 1; then
c971b7fa 17661
c971b7fa
PA
17662
17663
c971b7fa
PA
17664
17665
c971b7fa 17666
c971b7fa 17667
c971b7fa 17668
6ec2e0f5 17669 gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
c971b7fa 17670
6ec2e0f5 17671 fi
c971b7fa 17672
c971b7fa 17673
c971b7fa 17674
c971b7fa 17675
8690e634 17676
6ec2e0f5 17677 GNULIB_GETCWD=1
c971b7fa 17678
88b48903
WN
17679
17680
17681
88b48903 17682
6ec2e0f5 17683$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
88b48903 17684
88b48903
WN
17685
17686
17687
6ec2e0f5
SDJ
17688
17689
17690
472fa5ee
SM
17691 :
17692
17693
17694
17695
17696
17697
17698 :
17699
17700
17701
17702
6ec2e0f5
SDJ
17703
17704 if test $ac_cv_func_getdtablesize = yes &&
17705 test $ac_cv_have_decl_getdtablesize = yes; then
6ec2e0f5
SDJ
17706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
17707$as_echo_n "checking whether getdtablesize works... " >&6; }
d0ac1c44 17708if ${gl_cv_func_getdtablesize_works+:} false; then :
88b48903
WN
17709 $as_echo_n "(cached) " >&6
17710else
7a6dbc2f
SDJ
17711 case "$host_os" in
17712 vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
17713 *)
17714 if test "$cross_compiling" = yes; then :
88b48903 17715 case "$host_os" in
7a6dbc2f
SDJ
17716 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
17717 gl_cv_func_getdtablesize_works="guessing no" ;;
17718 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
17719 esac
17720
88b48903
WN
17721else
17722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17723/* end confdefs.h. */
17724
7a6dbc2f 17725 #include <unistd.h>
6ec2e0f5
SDJ
17726int
17727main ()
88b48903 17728{
6ec2e0f5 17729int size = getdtablesize();
7a6dbc2f
SDJ
17730 if (dup2 (0, getdtablesize()) != -1)
17731 return 1;
17732 if (size != getdtablesize())
17733 return 2;
6ec2e0f5
SDJ
17734
17735 ;
17736 return 0;
88b48903
WN
17737}
17738_ACEOF
17739if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 17740 gl_cv_func_getdtablesize_works=yes
88b48903 17741else
6ec2e0f5 17742 gl_cv_func_getdtablesize_works=no
88b48903
WN
17743fi
17744rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17745 conftest.$ac_objext conftest.beam conftest.$ac_ext
17746fi
17747
7a6dbc2f
SDJ
17748 ;;
17749 esac
88b48903
WN
17750
17751fi
6ec2e0f5
SDJ
17752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
17753$as_echo "$gl_cv_func_getdtablesize_works" >&6; }
17754 case "$gl_cv_func_getdtablesize_works" in
7a6dbc2f 17755 *yes | "no (limitation)") ;;
6ec2e0f5 17756 *) REPLACE_GETDTABLESIZE=1 ;;
88b48903
WN
17757 esac
17758 else
6ec2e0f5 17759 HAVE_GETDTABLESIZE=0
88b48903
WN
17760 fi
17761
6ec2e0f5 17762 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
88b48903
WN
17763
17764
17765
17766
17767
17768
17769
17770
6ec2e0f5 17771 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
88b48903 17772
6ec2e0f5 17773 :
88b48903
WN
17774 fi
17775
17776
17777
17778
17779
6ec2e0f5 17780 GNULIB_GETDTABLESIZE=1
88b48903
WN
17781
17782
17783
88b48903 17784
88b48903 17785
6ec2e0f5 17786$as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
88b48903 17787
88b48903 17788
88b48903 17789
88b48903 17790
88b48903 17791
88b48903 17792
88b48903 17793
88b48903
WN
17794
17795
472fa5ee
SM
17796 :
17797
17798
17799
17800
17801
6ec2e0f5
SDJ
17802 if test $ac_cv_have_decl_getlogin_r = no; then
17803 HAVE_DECL_GETLOGIN_R=0
17804 fi
88b48903 17805
88b48903 17806
472fa5ee
SM
17807 :
17808
17809
17810
17811
17812
6ec2e0f5
SDJ
17813 if test $ac_cv_func_getlogin_r = no; then
17814 HAVE_GETLOGIN_R=0
17815 else
17816 HAVE_GETLOGIN_R=1
17817
17818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getlogin_r works with small buffers" >&5
17819$as_echo_n "checking whether getlogin_r works with small buffers... " >&6; }
d0ac1c44 17820if ${gl_cv_func_getlogin_r_works+:} false; then :
6ec2e0f5
SDJ
17821 $as_echo_n "(cached) " >&6
17822else
88b48903 17823
6ec2e0f5 17824 case "$host_os" in
7a6dbc2f
SDJ
17825 # Guess no on Mac OS X, OSF/1.
17826 darwin* | osf*) gl_cv_func_getlogin_r_works="guessing no" ;;
17827 # Guess yes otherwise.
17828 *) gl_cv_func_getlogin_r_works="guessing yes" ;;
6ec2e0f5
SDJ
17829 esac
17830 if test "$cross_compiling" = yes; then :
17831 :
88b48903
WN
17832else
17833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17834/* end confdefs.h. */
17835
6ec2e0f5 17836#include <stddef.h>
7a6dbc2f 17837#include <string.h>
6ec2e0f5
SDJ
17838#include <unistd.h>
17839#if !HAVE_DECL_GETLOGIN_R
88b48903 17840extern
6ec2e0f5 17841# ifdef __cplusplus
88b48903 17842"C"
6ec2e0f5
SDJ
17843# endif
17844int getlogin_r (char *, size_t);
88b48903 17845#endif
6ec2e0f5
SDJ
17846int
17847main (void)
88b48903
WN
17848{
17849 int result = 0;
6ec2e0f5
SDJ
17850 char buf[100];
17851
17852 if (getlogin_r (buf, 0) == 0)
7a6dbc2f 17853 result |= 1;
6ec2e0f5 17854 if (getlogin_r (buf, 1) == 0)
7a6dbc2f
SDJ
17855 result |= 2;
17856 if (getlogin_r (buf, 100) == 0)
17857 {
17858 size_t n = strlen (buf);
17859 if (getlogin_r (buf, n) == 0)
17860 result |= 4;
17861 }
88b48903
WN
17862 return result;
17863}
17864_ACEOF
17865if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 17866 gl_cv_func_getlogin_r_works=yes
88b48903 17867else
7a6dbc2f 17868 gl_cv_func_getlogin_r_works=no
88b48903
WN
17869fi
17870rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17871 conftest.$ac_objext conftest.beam conftest.$ac_ext
17872fi
17873
17874
4a626d0a 17875fi
6ec2e0f5
SDJ
17876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getlogin_r_works" >&5
17877$as_echo "$gl_cv_func_getlogin_r_works" >&6; }
17878 case "$gl_cv_func_getlogin_r_works" in
17879 *yes) ;;
17880 *) REPLACE_GETLOGIN_R=1 ;;
17881 esac
17882 fi
17883
17884 if test $HAVE_GETLOGIN_R = 0 || test $REPLACE_GETLOGIN_R = 1; then
17885
17886
17887
17888
17889
17890
17891
17892
17893 gl_LIBOBJS="$gl_LIBOBJS getlogin_r.$ac_objext"
4a626d0a 17894
4a626d0a 17895
4a626d0a 17896
472fa5ee
SM
17897 :
17898
17899
17900
17901
17902
4a626d0a 17903
4a626d0a
PA
17904 fi
17905
17906
4a626d0a
PA
17907
17908
17909
6ec2e0f5 17910 GNULIB_GETLOGIN_R=1
4a626d0a
PA
17911
17912
17913
17914
17915
6ec2e0f5 17916$as_echo "#define GNULIB_TEST_GETLOGIN_R 1" >>confdefs.h
4a626d0a 17917
4a626d0a
PA
17918
17919
17920
17921
7a6dbc2f 17922
472fa5ee
SM
17923 :
17924
17925
17926
17927
17928
17929
17930
17931
4a626d0a 17932
6ec2e0f5
SDJ
17933 ac_found=0
17934 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
17935"
d0ac1c44 17936if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
6ec2e0f5
SDJ
17937 ac_have_decl=1
17938else
17939 ac_have_decl=0
17940fi
17941
17942cat >>confdefs.h <<_ACEOF
17943#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
17944_ACEOF
17945if test $ac_have_decl = 1; then :
17946 ac_found=1
17947fi
17948
17949 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
17950"
d0ac1c44 17951if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
6ec2e0f5
SDJ
17952 ac_have_decl=1
17953else
17954 ac_have_decl=0
17955fi
17956
17957cat >>confdefs.h <<_ACEOF
17958#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
17959_ACEOF
17960if test $ac_have_decl = 1; then :
17961 ac_found=1
17962fi
4a626d0a 17963
6ec2e0f5
SDJ
17964 ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
17965"
d0ac1c44 17966if test "x$ac_cv_have_decl___argv" = xyes; then :
6ec2e0f5
SDJ
17967 ac_have_decl=1
17968else
17969 ac_have_decl=0
17970fi
4a626d0a 17971
6ec2e0f5
SDJ
17972cat >>confdefs.h <<_ACEOF
17973#define HAVE_DECL___ARGV $ac_have_decl
17974_ACEOF
17975if test $ac_have_decl = 1; then :
17976 ac_found=1
17977fi
4a626d0a
PA
17978
17979
6ec2e0f5
SDJ
17980 # Incur the cost of this test only if none of the above worked.
17981 if test $ac_found = 0; then
17982 # On OpenBSD 5.1, using the global __progname variable appears to be
17983 # the only way to implement getprogname.
17984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
17985$as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
d0ac1c44 17986if ${gl_cv_var___progname+:} false; then :
6ec2e0f5
SDJ
17987 $as_echo_n "(cached) " >&6
17988else
4a626d0a 17989
6ec2e0f5
SDJ
17990 gl_cv_var___progname=
17991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17992/* end confdefs.h. */
17993extern char *__progname;
17994int
17995main ()
17996{
17997return *__progname;
17998
17999 ;
18000 return 0;
18001}
18002_ACEOF
18003if ac_fn_c_try_link "$LINENO"; then :
18004 gl_cv_var___progname=yes
18005
18006fi
18007rm -f core conftest.err conftest.$ac_objext \
18008 conftest$ac_exeext conftest.$ac_ext
18009
18010
18011fi
18012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
18013$as_echo "$gl_cv_var___progname" >&6; }
18014 if test "$gl_cv_var___progname" = yes; then
18015
18016$as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
18017
18018 fi
18019 fi
4a626d0a
PA
18020
18021
18022
18023
18024
18025
18026
18027
7a6dbc2f 18028
472fa5ee
SM
18029 :
18030
18031
18032
18033
18034
4a626d0a
PA
18035
18036 gl_gettimeofday_timezone=void
18037 if test $ac_cv_func_gettimeofday != yes; then
18038 HAVE_GETTIMEOFDAY=0
18039 else
18040
18041
18042
7a6dbc2f 18043
4a626d0a
PA
18044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
18045$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
d0ac1c44 18046if ${gl_cv_func_gettimeofday_clobber+:} false; then :
4a626d0a
PA
18047 $as_echo_n "(cached) " >&6
18048else
18049 if test "$cross_compiling" = yes; then :
18050 # When cross-compiling:
18051 case "$host_os" in
7a6dbc2f
SDJ
18052 # Guess all is fine on glibc systems.
18053 *-gnu* | gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
18054 # Guess no on native Windows.
18055 mingw*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
18056 # If we don't know, assume the worst.
18057 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
4a626d0a
PA
18058 esac
18059
18060else
18061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18062/* end confdefs.h. */
18063#include <string.h>
18064 #include <sys/time.h>
18065 #include <time.h>
18066 #include <stdlib.h>
18067
18068int
18069main ()
18070{
18071
18072 time_t t = 0;
18073 struct tm *lt;
18074 struct tm saved_lt;
18075 struct timeval tv;
18076 lt = localtime (&t);
18077 saved_lt = *lt;
18078 gettimeofday (&tv, NULL);
18079 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
18080
18081 ;
18082 return 0;
18083}
18084_ACEOF
18085if ac_fn_c_try_run "$LINENO"; then :
18086 gl_cv_func_gettimeofday_clobber=no
18087else
18088 gl_cv_func_gettimeofday_clobber=yes
18089fi
18090rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18091 conftest.$ac_objext conftest.beam conftest.$ac_ext
18092fi
18093
18094fi
18095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
18096$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
18097
18098 case "$gl_cv_func_gettimeofday_clobber" in
18099 *yes)
18100 REPLACE_GETTIMEOFDAY=1
18101
7a6dbc2f 18102$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
4a626d0a
PA
18103
18104
7a6dbc2f
SDJ
18105
18106
18107 NEED_LOCALTIME_BUFFER=1
18108 REPLACE_GMTIME=1
18109 REPLACE_LOCALTIME=1
4a626d0a
PA
18110
18111 ;;
18112 esac
18113
18114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
18115$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
d0ac1c44 18116if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
4a626d0a
PA
18117 $as_echo_n "(cached) " >&6
18118else
18119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18120/* end confdefs.h. */
18121#include <sys/time.h>
18122 struct timeval c;
18123 int gettimeofday (struct timeval *restrict, void *restrict);
18124
18125int
18126main ()
18127{
18128/* glibc uses struct timezone * rather than the POSIX void *
18129 if _GNU_SOURCE is defined. However, since the only portable
18130 use of gettimeofday uses NULL as the second parameter, and
18131 since the glibc definition is actually more typesafe, it is
18132 not worth wrapping this to get a compliant signature. */
18133 int (*f) (struct timeval *restrict, void *restrict)
18134 = gettimeofday;
18135 int x = f (&c, 0);
18136 return !(x | c.tv_sec | c.tv_usec);
18137
18138 ;
18139 return 0;
18140}
18141_ACEOF
18142if ac_fn_c_try_compile "$LINENO"; then :
18143 gl_cv_func_gettimeofday_posix_signature=yes
18144else
18145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18146/* end confdefs.h. */
18147#include <sys/time.h>
18148int gettimeofday (struct timeval *restrict, struct timezone *restrict);
18149
18150int
18151main ()
18152{
18153
18154 ;
18155 return 0;
18156}
18157_ACEOF
18158if ac_fn_c_try_compile "$LINENO"; then :
18159 gl_cv_func_gettimeofday_posix_signature=almost
18160else
18161 gl_cv_func_gettimeofday_posix_signature=no
18162fi
18163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18164fi
18165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18166fi
18167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
18168$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
18169 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
18170 gl_gettimeofday_timezone='struct timezone'
18171 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
18172 REPLACE_GETTIMEOFDAY=1
18173 fi
18174 if test $REPLACE_STRUCT_TIMEVAL = 1; then
18175 REPLACE_GETTIMEOFDAY=1
18176 fi
7a6dbc2f
SDJ
18177 case "$host_os" in
18178 mingw*) REPLACE_GETTIMEOFDAY=1 ;;
18179 esac
4a626d0a
PA
18180 fi
18181
18182cat >>confdefs.h <<_ACEOF
18183#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
18184_ACEOF
18185
88b48903 18186
4a626d0a 18187 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
88b48903 18188
88b48903 18189
88b48903 18190
88b48903
WN
18191
18192
88b48903
WN
18193
18194
18195
6ec2e0f5
SDJ
18196 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
18197
7a6dbc2f
SDJ
18198 :
18199 fi
6ec2e0f5 18200
6ec2e0f5 18201
6ec2e0f5 18202
6ec2e0f5 18203
6ec2e0f5 18204
7a6dbc2f 18205 GNULIB_GETTIMEOFDAY=1
6ec2e0f5
SDJ
18206
18207
6ec2e0f5
SDJ
18208
18209
18210
7a6dbc2f 18211$as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
6ec2e0f5
SDJ
18212
18213
6ec2e0f5
SDJ
18214
18215
18216
18217
18218
7a6dbc2f
SDJ
18219 :
18220
18221
6ec2e0f5
SDJ
18222
18223
18224
6ec2e0f5 18225
6ec2e0f5 18226
6ec2e0f5 18227
7a6dbc2f
SDJ
18228 if test $ac_cv_func_glob = no; then
18229 HAVE_GLOB=0
18230 else
6ec2e0f5 18231
7a6dbc2f
SDJ
18232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU glob interface version 1 or 2" >&5
18233$as_echo_n "checking for GNU glob interface version 1 or 2... " >&6; }
18234if ${gl_cv_gnu_glob_interface_version_1_2+:} false; then :
6ec2e0f5
SDJ
18235 $as_echo_n "(cached) " >&6
18236else
18237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18238/* end confdefs.h. */
18239#include <gnu-versions.h>
7a6dbc2f 18240char a[_GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 ? 1 : -1];
6ec2e0f5
SDJ
18241_ACEOF
18242if ac_fn_c_try_compile "$LINENO"; then :
7a6dbc2f 18243 gl_cv_gnu_glob_interface_version_1_2=yes
6ec2e0f5 18244else
7a6dbc2f 18245 gl_cv_gnu_glob_interface_version_1_2=no
6ec2e0f5
SDJ
18246fi
18247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18248fi
7a6dbc2f
SDJ
18249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_gnu_glob_interface_version_1_2" >&5
18250$as_echo "$gl_cv_gnu_glob_interface_version_1_2" >&6; }
18251 if test "$gl_cv_gnu_glob_interface_version_1_2" = "no"; then
18252 REPLACE_GLOB=1
6ec2e0f5 18253 fi
6ec2e0f5 18254
7a6dbc2f
SDJ
18255 if test $REPLACE_GLOB = 0; then
18256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether glob lists broken symlinks" >&5
6ec2e0f5 18257$as_echo_n "checking whether glob lists broken symlinks... " >&6; }
d0ac1c44 18258if ${gl_cv_glob_lists_symlinks+:} false; then :
6ec2e0f5
SDJ
18259 $as_echo_n "(cached) " >&6
18260else
7a6dbc2f
SDJ
18261 if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then
18262 gl_cv_glob_lists_symlinks=maybe
18263 else
18264 # If we can't make a symlink, then we cannot test this issue. Be
18265 # pessimistic about this.
18266 gl_cv_glob_lists_symlinks=no
18267 fi
18268 if test $gl_cv_glob_lists_symlinks = maybe; then
18269 if test "$cross_compiling" = yes; then :
6ec2e0f5
SDJ
18270 gl_cv_glob_lists_symlinks=no
18271else
18272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18273/* end confdefs.h. */
6ec2e0f5 18274#include <stddef.h>
7a6dbc2f 18275 #include <glob.h>
6ec2e0f5
SDJ
18276int
18277main ()
18278{
18279glob_t found;
7a6dbc2f
SDJ
18280 if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH)
18281 return 1;
18282
6ec2e0f5
SDJ
18283 ;
18284 return 0;
18285}
4a626d0a 18286_ACEOF
6ec2e0f5
SDJ
18287if ac_fn_c_try_run "$LINENO"; then :
18288 gl_cv_glob_lists_symlinks=yes
18289else
18290 gl_cv_glob_lists_symlinks=no
18291fi
18292rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18293 conftest.$ac_objext conftest.beam conftest.$ac_ext
18294fi
88b48903 18295
7a6dbc2f
SDJ
18296 fi
18297 rm -f conf$$-globtest
18298
4a626d0a 18299fi
6ec2e0f5
SDJ
18300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_glob_lists_symlinks" >&5
18301$as_echo "$gl_cv_glob_lists_symlinks" >&6; }
7a6dbc2f
SDJ
18302 if test $gl_cv_glob_lists_symlinks = no; then
18303 REPLACE_GLOB=1
18304 fi
18305 fi
18306
18307 fi
88b48903 18308
7a6dbc2f
SDJ
18309 if test $ac_cv_func_glob_pattern_p = no; then
18310 HAVE_GLOB_PATTERN_P=0
18311 else
18312 if test $REPLACE_GLOB = 1; then
18313 REPLACE_GLOB_PATTERN_P=1
6ec2e0f5
SDJ
18314 fi
18315 fi
4a626d0a 18316
7a6dbc2f 18317 if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then
4a626d0a 18318
88b48903 18319
7a6dbc2f 18320 GLOB_H='glob.h'
6ec2e0f5
SDJ
18321 if test -n "$GLOB_H"; then
18322 GL_GENERATE_GLOB_H_TRUE=
18323 GL_GENERATE_GLOB_H_FALSE='#'
18324else
18325 GL_GENERATE_GLOB_H_TRUE='#'
18326 GL_GENERATE_GLOB_H_FALSE=
18327fi
88b48903 18328
88b48903 18329
7a6dbc2f
SDJ
18330 fi
18331
18332 if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then
472fa5ee
SM
18333
18334
18335
18336
18337
18338
18339
18340
18341 gl_LIBOBJS="$gl_LIBOBJS glob.$ac_objext"
18342
18343
18344
472fa5ee
SM
18345
18346
18347
18348
18349
18350
7a6dbc2f
SDJ
18351 gl_LIBOBJS="$gl_LIBOBJS globfree.$ac_objext"
18352
18353
18354
18355
18356 :
18357
18358
18359
472fa5ee 18360
472fa5ee 18361
88b48903 18362
472fa5ee 18363 :
88b48903
WN
18364
18365
18366
88b48903
WN
18367
18368
18369
18370
18371
88b48903 18372
7a6dbc2f
SDJ
18373 fi
18374 if test $HAVE_GLOB_PATTERN_P = 0 || test $REPLACE_GLOB_PATTERN_P = 1; then
18375
18376
18377
18378
18379
18380
88b48903
WN
18381
18382
7a6dbc2f
SDJ
18383 gl_LIBOBJS="$gl_LIBOBJS glob_pattern_p.$ac_objext"
18384
6ec2e0f5 18385 fi
88b48903 18386
7a6dbc2f
SDJ
18387
18388
18389
18390
18391 GNULIB_GLOB=1
18392
18393
18394
18395
18396
18397$as_echo "#define GNULIB_TEST_GLOB 1" >>confdefs.h
18398
18399
18400
49e4877c
PA
18401
18402
88b48903
WN
18403
18404
18405
18406
18407 PRIPTR_PREFIX=
18408 if test -n "$STDINT_H"; then
18409 PRIPTR_PREFIX='"l"'
18410 else
18411 for glpfx in '' l ll I64; do
18412 case $glpfx in
18413 '') gltype1='int';;
18414 l) gltype1='long int';;
18415 ll) gltype1='long long int';;
18416 I64) gltype1='__int64';;
18417 esac
18418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18419/* end confdefs.h. */
18420#include <stdint.h>
18421 extern intptr_t foo;
18422 extern $gltype1 foo;
18423int
18424main ()
18425{
18426
18427 ;
18428 return 0;
18429}
18430_ACEOF
18431if ac_fn_c_try_compile "$LINENO"; then :
18432 PRIPTR_PREFIX='"'$glpfx'"'
18433fi
18434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18435 test -n "$PRIPTR_PREFIX" && break
18436 done
18437 fi
18438
18439
18440
18441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
18442$as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
d0ac1c44 18443if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
88b48903
WN
18444 $as_echo_n "(cached) " >&6
18445else
18446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18447/* end confdefs.h. */
18448/* Work also in C++ mode. */
18449 #define __STDC_LIMIT_MACROS 1
18450
18451 /* Work if build is not clean. */
18452 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
18453
18454 #include <limits.h>
18455 #if HAVE_STDINT_H
18456 #include <stdint.h>
18457 #endif
18458
18459 #if defined INT32_MAX && defined INTMAX_MAX
18460 #define CONDITION (INT32_MAX < INTMAX_MAX)
18461 #elif HAVE_LONG_LONG_INT
18462 #define CONDITION (sizeof (int) < sizeof (long long int))
18463 #else
18464 #define CONDITION 0
18465 #endif
18466 int test[CONDITION ? 1 : -1];
18467int
18468main ()
18469{
18470
18471 ;
18472 return 0;
18473}
18474_ACEOF
18475if ac_fn_c_try_compile "$LINENO"; then :
18476 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
18477else
18478 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
18479fi
18480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18481fi
18482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
18483$as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
18484 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
18485 INT32_MAX_LT_INTMAX_MAX=1;
18486 else
18487 INT32_MAX_LT_INTMAX_MAX=0;
18488 fi
18489
18490
18491 if test $APPLE_UNIVERSAL_BUILD = 0; then
18492
18493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
18494$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
d0ac1c44 18495if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
88b48903
WN
18496 $as_echo_n "(cached) " >&6
18497else
18498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18499/* end confdefs.h. */
18500/* Work also in C++ mode. */
18501 #define __STDC_LIMIT_MACROS 1
18502
18503 /* Work if build is not clean. */
18504 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
18505
18506 #include <limits.h>
18507 #if HAVE_STDINT_H
18508 #include <stdint.h>
18509 #endif
18510
18511 #if defined INT64_MAX
18512 #define CONDITION (INT64_MAX == LONG_MAX)
18513 #elif HAVE_LONG_LONG_INT
18514 #define CONDITION (sizeof (long long int) == sizeof (long int))
18515 #else
18516 #define CONDITION 0
18517 #endif
18518 int test[CONDITION ? 1 : -1];
18519int
18520main ()
18521{
18522
18523 ;
18524 return 0;
18525}
18526_ACEOF
18527if ac_fn_c_try_compile "$LINENO"; then :
18528 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
18529else
18530 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
18531fi
18532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18533fi
18534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
18535$as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
18536 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
18537 INT64_MAX_EQ_LONG_MAX=1;
18538 else
18539 INT64_MAX_EQ_LONG_MAX=0;
18540 fi
18541
18542
18543 else
18544 INT64_MAX_EQ_LONG_MAX=-1
18545 fi
18546
18547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
18548$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
d0ac1c44 18549if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
88b48903
WN
18550 $as_echo_n "(cached) " >&6
18551else
18552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18553/* end confdefs.h. */
18554/* Work also in C++ mode. */
18555 #define __STDC_LIMIT_MACROS 1
18556
18557 /* Work if build is not clean. */
18558 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
18559
18560 #include <limits.h>
18561 #if HAVE_STDINT_H
18562 #include <stdint.h>
18563 #endif
18564
18565 #if defined UINT32_MAX && defined UINTMAX_MAX
18566 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
18567 #elif HAVE_LONG_LONG_INT
18568 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
18569 #else
18570 #define CONDITION 0
18571 #endif
18572 int test[CONDITION ? 1 : -1];
18573int
18574main ()
18575{
18576
18577 ;
18578 return 0;
18579}
18580_ACEOF
18581if ac_fn_c_try_compile "$LINENO"; then :
18582 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
18583else
18584 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
18585fi
18586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18587fi
18588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
18589$as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
18590 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
18591 UINT32_MAX_LT_UINTMAX_MAX=1;
18592 else
18593 UINT32_MAX_LT_UINTMAX_MAX=0;
18594 fi
18595
18596
18597 if test $APPLE_UNIVERSAL_BUILD = 0; then
18598
18599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
18600$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
d0ac1c44 18601if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
88b48903
WN
18602 $as_echo_n "(cached) " >&6
18603else
18604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18605/* end confdefs.h. */
18606/* Work also in C++ mode. */
18607 #define __STDC_LIMIT_MACROS 1
18608
18609 /* Work if build is not clean. */
18610 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
18611
18612 #include <limits.h>
18613 #if HAVE_STDINT_H
18614 #include <stdint.h>
18615 #endif
18616
18617 #if defined UINT64_MAX
18618 #define CONDITION (UINT64_MAX == ULONG_MAX)
18619 #elif HAVE_LONG_LONG_INT
18620 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
18621 #else
18622 #define CONDITION 0
18623 #endif
18624 int test[CONDITION ? 1 : -1];
18625int
18626main ()
18627{
18628
18629 ;
18630 return 0;
18631}
18632_ACEOF
18633if ac_fn_c_try_compile "$LINENO"; then :
18634 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
18635else
18636 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
18637fi
18638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18639fi
18640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
18641$as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
18642 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
18643 UINT64_MAX_EQ_ULONG_MAX=1;
18644 else
18645 UINT64_MAX_EQ_ULONG_MAX=0;
18646 fi
18647
18648
18649 else
18650 UINT64_MAX_EQ_ULONG_MAX=-1
18651 fi
18652
18653
18654
18655
18656
18657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
18658$as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
d0ac1c44 18659if ${gl_cv_func_isnand_no_libm+:} false; then :
88b48903
WN
18660 $as_echo_n "(cached) " >&6
18661else
18662
18663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18664/* end confdefs.h. */
18665#include <math.h>
18666 #if __GNUC__ >= 4
18667 # undef isnand
18668 # define isnand(x) __builtin_isnan ((double)(x))
18669 #else
18670 # undef isnand
18671 # define isnand(x) isnan ((double)(x))
18672 #endif
18673 double x;
18674int
18675main ()
18676{
18677return isnand (x);
18678 ;
18679 return 0;
18680}
18681_ACEOF
18682if ac_fn_c_try_link "$LINENO"; then :
18683 gl_cv_func_isnand_no_libm=yes
18684else
18685 gl_cv_func_isnand_no_libm=no
18686fi
18687rm -f core conftest.err conftest.$ac_objext \
18688 conftest$ac_exeext conftest.$ac_ext
18689
18690fi
18691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
18692$as_echo "$gl_cv_func_isnand_no_libm" >&6; }
18693
18694 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
18695 if test $gl_cv_func_isnand_no_libm = yes; then
18696
18697$as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
18698
18699 fi
18700
18701 if test $gl_func_isnand_no_libm != yes; then
18702
18703
18704
18705
18706
18707
18708
18709
18710 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
18711
18712
18713
18714
18715 fi
18716
18717
18718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
18719$as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
d0ac1c44 18720if ${gl_cv_func_isnanl_no_libm+:} false; then :
88b48903
WN
18721 $as_echo_n "(cached) " >&6
18722else
18723
18724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18725/* end confdefs.h. */
18726#include <math.h>
18727 #if __GNUC__ >= 4
18728 # undef isnanl
18729 # define isnanl(x) __builtin_isnanl ((long double)(x))
18730 #elif defined isnan
18731 # undef isnanl
18732 # define isnanl(x) isnan ((long double)(x))
18733 #endif
18734 long double x;
18735int
18736main ()
18737{
18738return isnanl (x);
18739 ;
18740 return 0;
18741}
18742_ACEOF
18743if ac_fn_c_try_link "$LINENO"; then :
18744 gl_cv_func_isnanl_no_libm=yes
18745else
18746 gl_cv_func_isnanl_no_libm=no
18747fi
18748rm -f core conftest.err conftest.$ac_objext \
18749 conftest$ac_exeext conftest.$ac_ext
18750
18751fi
18752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
18753$as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
18754
18755 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
18756 if test $gl_func_isnanl_no_libm = yes; then
18757
18758
18759
18760
18761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
18762$as_echo_n "checking whether isnanl works... " >&6; }
d0ac1c44 18763if ${gl_cv_func_isnanl_works+:} false; then :
88b48903
WN
18764 $as_echo_n "(cached) " >&6
18765else
18766
18767 if test "$cross_compiling" = yes; then :
7a6dbc2f
SDJ
18768 case "$host_os" in
18769 mingw*) # Guess yes on mingw, no on MSVC.
18770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18771/* end confdefs.h. */
18772
18773#ifdef __MINGW32__
18774 Known
18775#endif
18776
18777_ACEOF
18778if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18779 $EGREP "Known" >/dev/null 2>&1; then :
4a626d0a 18780 gl_cv_func_isnanl_works="guessing yes"
7a6dbc2f
SDJ
18781else
18782 gl_cv_func_isnanl_works="guessing no"
18783fi
18784rm -f conftest*
18785
18786 ;;
18787 *) gl_cv_func_isnanl_works="guessing yes" ;;
18788 esac
18789
88b48903
WN
18790else
18791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18792/* end confdefs.h. */
18793
18794#include <float.h>
18795#include <limits.h>
18796#include <math.h>
18797#if __GNUC__ >= 4
18798# undef isnanl
18799# define isnanl(x) __builtin_isnanl ((long double)(x))
18800#elif defined isnan
18801# undef isnanl
18802# define isnanl(x) isnan ((long double)(x))
18803#endif
18804#define NWORDS \
18805 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
18806typedef union { unsigned int word[NWORDS]; long double value; }
18807 memory_long_double;
18808/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
18809 runtime type conversion. */
18810#ifdef __sgi
18811static long double NaNl ()
18812{
18813 double zero = 0.0;
18814 return zero / zero;
18815}
18816#else
18817# define NaNl() (0.0L / 0.0L)
18818#endif
18819int main ()
18820{
18821 int result = 0;
18822
18823 if (!isnanl (NaNl ()))
18824 result |= 1;
18825
18826 {
18827 memory_long_double m;
18828 unsigned int i;
18829
18830 /* The isnanl function should be immune against changes in the sign bit and
18831 in the mantissa bits. The xor operation twiddles a bit that can only be
18832 a sign bit or a mantissa bit (since the exponent never extends to
18833 bit 31). */
18834 m.value = NaNl ();
18835 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
18836 for (i = 0; i < NWORDS; i++)
18837 m.word[i] |= 1;
18838 if (!isnanl (m.value))
18839 result |= 1;
18840 }
18841
18842#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
18843/* Representation of an 80-bit 'long double' as an initializer for a sequence
18844 of 'unsigned int' words. */
18845# ifdef WORDS_BIGENDIAN
18846# define LDBL80_WORDS(exponent,manthi,mantlo) \
18847 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
4a626d0a 18848 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
88b48903
WN
18849 (unsigned int) (mantlo) << 16 \
18850 }
18851# else
18852# define LDBL80_WORDS(exponent,manthi,mantlo) \
18853 { mantlo, manthi, exponent }
18854# endif
18855 { /* Quiet NaN. */
18856 static memory_long_double x =
18857 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
18858 if (!isnanl (x.value))
18859 result |= 2;
18860 }
18861 {
18862 /* Signalling NaN. */
18863 static memory_long_double x =
18864 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
18865 if (!isnanl (x.value))
18866 result |= 2;
18867 }
4a626d0a 18868 /* isnanl should return something even for noncanonical values. */
88b48903
WN
18869 { /* Pseudo-NaN. */
18870 static memory_long_double x =
18871 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
4a626d0a 18872 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
18873 result |= 4;
18874 }
18875 { /* Pseudo-Infinity. */
18876 static memory_long_double x =
18877 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
4a626d0a 18878 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
18879 result |= 8;
18880 }
18881 { /* Pseudo-Zero. */
18882 static memory_long_double x =
18883 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
4a626d0a 18884 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
18885 result |= 16;
18886 }
18887 { /* Unnormalized number. */
18888 static memory_long_double x =
18889 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
4a626d0a 18890 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
18891 result |= 32;
18892 }
18893 { /* Pseudo-Denormal. */
18894 static memory_long_double x =
18895 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
4a626d0a 18896 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
18897 result |= 64;
18898 }
18899#endif
18900
18901 return result;
18902}
18903_ACEOF
18904if ac_fn_c_try_run "$LINENO"; then :
18905 gl_cv_func_isnanl_works=yes
18906else
18907 gl_cv_func_isnanl_works=no
18908fi
18909rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18910 conftest.$ac_objext conftest.beam conftest.$ac_ext
18911fi
18912
18913
18914fi
18915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
18916$as_echo "$gl_cv_func_isnanl_works" >&6; }
18917
18918 case "$gl_cv_func_isnanl_works" in
18919 *yes) ;;
18920 *) gl_func_isnanl_no_libm=no ;;
18921 esac
18922 fi
18923 if test $gl_func_isnanl_no_libm = yes; then
18924
18925$as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
18926
18927 fi
18928
18929 if test $gl_func_isnanl_no_libm != yes; then
18930
18931
18932
18933
18934
18935
18936
18937
18938 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
18939
18940
18941
18942
7a6dbc2f 18943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
88b48903 18944$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
d0ac1c44 18945if ${gl_cv_cc_long_double_expbit0+:} false; then :
88b48903
WN
18946 $as_echo_n "(cached) " >&6
18947else
18948
18949 if test "$cross_compiling" = yes; then :
18950
18951 gl_cv_cc_long_double_expbit0="unknown"
7a6dbc2f
SDJ
18952 case "$host_os" in
18953 mingw*) # On native Windows (little-endian), we know the result
18954 # in two cases: mingw, MSVC.
18955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18956/* end confdefs.h. */
18957
18958#ifdef __MINGW32__
18959 Known
18960#endif
18961
18962_ACEOF
18963if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18964 $EGREP "Known" >/dev/null 2>&1; then :
18965 gl_cv_cc_long_double_expbit0="word 2 bit 0"
18966fi
18967rm -f conftest*
18968
18969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18970/* end confdefs.h. */
18971
18972#ifdef _MSC_VER
18973 Known
18974#endif
18975
18976_ACEOF
18977if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18978 $EGREP "Known" >/dev/null 2>&1; then :
18979 gl_cv_cc_long_double_expbit0="word 1 bit 20"
18980fi
18981rm -f conftest*
18982
18983 ;;
18984 esac
88b48903
WN
18985
18986else
18987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18988/* end confdefs.h. */
18989
18990#include <float.h>
18991#include <stddef.h>
18992#include <stdio.h>
18993#include <string.h>
18994#define NWORDS \
18995 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
18996typedef union { long double value; unsigned int word[NWORDS]; }
18997 memory_long_double;
18998static unsigned int ored_words[NWORDS];
18999static unsigned int anded_words[NWORDS];
19000static void add_to_ored_words (long double x)
19001{
19002 memory_long_double m;
19003 size_t i;
19004 /* Clear it first, in case
19005 sizeof (long double) < sizeof (memory_long_double). */
19006 memset (&m, 0, sizeof (memory_long_double));
19007 m.value = x;
19008 for (i = 0; i < NWORDS; i++)
19009 {
19010 ored_words[i] |= m.word[i];
19011 anded_words[i] &= m.word[i];
19012 }
19013}
19014int main ()
19015{
19016 size_t j;
19017 FILE *fp = fopen ("conftest.out", "w");
19018 if (fp == NULL)
19019 return 1;
19020 for (j = 0; j < NWORDS; j++)
19021 anded_words[j] = ~ (unsigned int) 0;
19022 add_to_ored_words (0.25L);
19023 add_to_ored_words (0.5L);
19024 add_to_ored_words (1.0L);
19025 add_to_ored_words (2.0L);
19026 add_to_ored_words (4.0L);
19027 /* Remove bits that are common (e.g. if representation of the first mantissa
19028 bit is explicit). */
19029 for (j = 0; j < NWORDS; j++)
19030 ored_words[j] &= ~anded_words[j];
19031 /* Now find the nonzero word. */
19032 for (j = 0; j < NWORDS; j++)
19033 if (ored_words[j] != 0)
19034 break;
19035 if (j < NWORDS)
19036 {
19037 size_t i;
19038 for (i = j + 1; i < NWORDS; i++)
19039 if (ored_words[i] != 0)
19040 {
19041 fprintf (fp, "unknown");
19042 return (fclose (fp) != 0);
19043 }
19044 for (i = 0; ; i++)
19045 if ((ored_words[j] >> i) & 1)
19046 {
19047 fprintf (fp, "word %d bit %d", (int) j, (int) i);
19048 return (fclose (fp) != 0);
19049 }
19050 }
19051 fprintf (fp, "unknown");
19052 return (fclose (fp) != 0);
19053}
19054
19055_ACEOF
19056if ac_fn_c_try_run "$LINENO"; then :
19057 gl_cv_cc_long_double_expbit0=`cat conftest.out`
19058else
19059 gl_cv_cc_long_double_expbit0="unknown"
19060fi
19061rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19062 conftest.$ac_objext conftest.beam conftest.$ac_ext
19063fi
19064
19065 rm -f conftest.out
19066
19067fi
19068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
19069$as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
19070 case "$gl_cv_cc_long_double_expbit0" in
19071 word*bit*)
19072 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
19073 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
19074
19075cat >>confdefs.h <<_ACEOF
19076#define LDBL_EXPBIT0_WORD $word
19077_ACEOF
19078
19079
19080cat >>confdefs.h <<_ACEOF
19081#define LDBL_EXPBIT0_BIT $bit
19082_ACEOF
19083
19084 ;;
19085 esac
19086
19087
19088
19089 fi
19090
19091
7a6dbc2f
SDJ
19092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5
19093$as_echo_n "checking whether the compiler supports the __inline keyword... " >&6; }
19094if ${gl_cv_c___inline+:} false; then :
19095 $as_echo_n "(cached) " >&6
19096else
19097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19098/* end confdefs.h. */
19099typedef int foo_t;
19100 static __inline foo_t foo (void) { return 0; }
19101int
19102main ()
19103{
19104return foo ();
19105 ;
19106 return 0;
19107}
19108_ACEOF
19109if ac_fn_c_try_compile "$LINENO"; then :
19110 gl_cv_c___inline=yes
19111else
19112 gl_cv_c___inline=no
19113fi
19114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19115fi
19116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5
19117$as_echo "$gl_cv_c___inline" >&6; }
19118 if test $gl_cv_c___inline = yes; then
19119
19120$as_echo "#define HAVE___INLINE 1" >>confdefs.h
19121
19122 fi
19123
19124
88b48903
WN
19125
19126
88b48903 19127
7a6dbc2f
SDJ
19128 LOCALCHARSET_TESTS_ENVIRONMENT=
19129
88b48903 19130
472fa5ee
SM
19131
19132
19133
19134
19135
88b48903
WN
19136
19137
2196f55f 19138
7a6dbc2f 19139 gl_LIBOBJS="$gl_LIBOBJS localtime-buffer.$ac_objext"
49e4877c 19140
88b48903
WN
19141
19142
19143
19144
472fa5ee
SM
19145 :
19146
19147
19148
19149
19150
f45c62c4
YQ
19151 if test $ac_cv_func_lstat = yes; then
19152
7a6dbc2f
SDJ
19153 case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
19154 solaris* | *no)
f45c62c4
YQ
19155 REPLACE_LSTAT=1
19156 ;;
19157 esac
19158 else
19159 HAVE_LSTAT=0
19160 fi
19161
19162 if test $REPLACE_LSTAT = 1; then
19163
19164
19165
19166
19167
19168
19169
19170
19171 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
19172
19173 :
19174 fi
19175
19176
19177
19178
19179
19180 GNULIB_LSTAT=1
19181
19182
19183
19184
19185
19186$as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
19187
19188
19189
19190
19191
19192
6a29c58e
YQ
19193 if test $gl_cv_func_malloc_posix = yes; then
19194
19195$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
19196
19197 else
19198 REPLACE_MALLOC=1
19199 fi
19200
19201 if test $REPLACE_MALLOC = 1; then
19202
19203
19204
19205
19206
19207
19208
19209
19210 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
19211
19212 fi
19213
19214
19215
19216
19217
19218 GNULIB_MALLOC_POSIX=1
19219
19220
19221
19222
19223
19224$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
19225
19226
19227
19228
19229
19230
88b48903
WN
19231
19232
19233
19234
19235
88b48903 19236
c971b7fa 19237
c971b7fa 19238
98399780 19239
472fa5ee
SM
19240 :
19241
19242
19243
19244
19245
98399780
YQ
19246
19247
19248
88b48903
WN
19249 if test $gl_cv_have_include_next = yes; then
19250 gl_cv_next_math_h='<'math.h'>'
19251 else
19252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
19253$as_echo_n "checking absolute name of <math.h>... " >&6; }
d0ac1c44 19254if ${gl_cv_next_math_h+:} false; then :
88b48903
WN
19255 $as_echo_n "(cached) " >&6
19256else
c971b7fa 19257
88b48903 19258 if test $ac_cv_header_math_h = yes; then
c971b7fa
PA
19259
19260
4a626d0a
PA
19261
19262
19263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 19264/* end confdefs.h. */
88b48903 19265#include <math.h>
8690e634 19266_ACEOF
4a626d0a
PA
19267 case "$host_os" in
19268 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19269 *) gl_absname_cpp="$ac_cpp" ;;
19270 esac
19271
19272 case "$host_os" in
19273 mingw*)
19274 gl_dirsep_regex='[/\\]'
19275 ;;
19276 *)
19277 gl_dirsep_regex='\/'
19278 ;;
19279 esac
19280 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19281 gl_header_literal_regex=`echo 'math.h' \
19282 | sed -e "$gl_make_literal_regex_sed"`
19283 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19284 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19285 s|^/[^/]|//&|
19286 p
19287 q
19288 }'
19289
19290 gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19291 sed -n "$gl_absolute_header_sed"`
19292
19293 gl_header=$gl_cv_absolute_math_h
19294 gl_cv_next_math_h='"'$gl_header'"'
88b48903
WN
19295 else
19296 gl_cv_next_math_h='<'math.h'>'
19297 fi
8690e634 19298
c971b7fa 19299
88b48903
WN
19300fi
19301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
19302$as_echo "$gl_cv_next_math_h" >&6; }
19303 fi
19304 NEXT_MATH_H=$gl_cv_next_math_h
c971b7fa 19305
88b48903
WN
19306 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19307 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19308 gl_next_as_first_directive='<'math.h'>'
19309 else
19310 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19311 gl_next_as_first_directive=$gl_cv_next_math_h
19312 fi
19313 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
8690e634 19314
c971b7fa 19315
c971b7fa
PA
19316
19317
c971b7fa 19318
88b48903
WN
19319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
19320$as_echo_n "checking whether NAN macro works... " >&6; }
d0ac1c44 19321if ${gl_cv_header_math_nan_works+:} false; then :
c971b7fa
PA
19322 $as_echo_n "(cached) " >&6
19323else
8690e634
JK
19324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19325/* end confdefs.h. */
88b48903 19326#include <math.h>
c971b7fa
PA
19327int
19328main ()
19329{
88b48903
WN
19330/* Solaris 10 has a broken definition of NAN. Other platforms
19331 fail to provide NAN, or provide it only in C99 mode; this
19332 test only needs to fail when NAN is provided but wrong. */
19333 float f = 1.0f;
19334#ifdef NAN
19335 f = NAN;
19336#endif
19337 return f == 0;
c971b7fa
PA
19338 ;
19339 return 0;
19340}
19341_ACEOF
19342if ac_fn_c_try_compile "$LINENO"; then :
88b48903 19343 gl_cv_header_math_nan_works=yes
8690e634 19344else
88b48903 19345 gl_cv_header_math_nan_works=no
c971b7fa
PA
19346fi
19347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 19348fi
88b48903
WN
19349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
19350$as_echo "$gl_cv_header_math_nan_works" >&6; }
19351 if test $gl_cv_header_math_nan_works = no; then
19352 REPLACE_NAN=1
c971b7fa 19353 fi
88b48903
WN
19354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
19355$as_echo_n "checking whether HUGE_VAL works... " >&6; }
d0ac1c44 19356if ${gl_cv_header_math_huge_val_works+:} false; then :
c971b7fa
PA
19357 $as_echo_n "(cached) " >&6
19358else
8690e634 19359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 19360/* end confdefs.h. */
88b48903 19361#include <math.h>
c971b7fa
PA
19362int
19363main ()
19364{
88b48903
WN
19365/* Solaris 10 has a broken definition of HUGE_VAL. */
19366 double d = HUGE_VAL;
19367 return d == 0;
c971b7fa
PA
19368 ;
19369 return 0;
19370}
19371_ACEOF
19372if ac_fn_c_try_compile "$LINENO"; then :
88b48903 19373 gl_cv_header_math_huge_val_works=yes
8690e634 19374else
88b48903 19375 gl_cv_header_math_huge_val_works=no
c971b7fa
PA
19376fi
19377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 19378fi
88b48903
WN
19379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
19380$as_echo "$gl_cv_header_math_huge_val_works" >&6; }
19381 if test $gl_cv_header_math_huge_val_works = no; then
19382 REPLACE_HUGE_VAL=1
8690e634 19383 fi
c971b7fa 19384
c971b7fa 19385
c971b7fa
PA
19386
19387
19388
19389
19390
19391
c971b7fa 19392
c971b7fa 19393
c971b7fa 19394
c971b7fa
PA
19395
19396
c971b7fa 19397
472fa5ee
SM
19398 :
19399
19400
19401
19402
19403
19404
19405 :
19406
19407
19408
19409
8690e634
JK
19410
19411 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
19412
19413
19414
19415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
19416$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
d0ac1c44 19417if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
c971b7fa
PA
19418 $as_echo_n "(cached) " >&6
19419else
8690e634
JK
19420
19421 case "$host_os" in
19422 # Guess no on AIX and OSF/1.
19423 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
19424 # Guess yes otherwise.
19425 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
19426 esac
19427 if test $LOCALE_JA != none; then
19428 if test "$cross_compiling" = yes; then :
19429 :
19430else
c971b7fa
PA
19431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19432/* end confdefs.h. */
c971b7fa 19433
8690e634
JK
19434#include <locale.h>
19435#include <string.h>
19436/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19437 <wchar.h>.
19438 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19439 included before <wchar.h>. */
19440#include <stddef.h>
19441#include <stdio.h>
19442#include <time.h>
19443#include <wchar.h>
19444int main ()
c971b7fa 19445{
8690e634
JK
19446 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
19447 {
19448 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
19449 mbstate_t state;
19450 wchar_t wc;
19451
19452 memset (&state, '\0', sizeof (mbstate_t));
19453 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
19454 if (mbsinit (&state))
7a6dbc2f 19455 return 2;
8690e634 19456 }
c971b7fa
PA
19457 return 0;
19458}
19459_ACEOF
8690e634
JK
19460if ac_fn_c_try_run "$LINENO"; then :
19461 gl_cv_func_mbrtowc_incomplete_state=yes
c971b7fa 19462else
8690e634 19463 gl_cv_func_mbrtowc_incomplete_state=no
c971b7fa 19464fi
8690e634
JK
19465rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19466 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 19467fi
c971b7fa 19468
8690e634 19469 fi
c971b7fa 19470
8690e634
JK
19471fi
19472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
19473$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
c971b7fa 19474
c971b7fa 19475
c971b7fa 19476
c971b7fa 19477
8690e634
JK
19478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
19479$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
d0ac1c44 19480if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
c971b7fa
PA
19481 $as_echo_n "(cached) " >&6
19482else
19483
8690e634
JK
19484 case "$host_os" in
19485 # Guess no on Solaris 8.
19486 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
19487 # Guess yes otherwise.
19488 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
19489 esac
19490 if test $LOCALE_ZH_CN != none; then
19491 if test "$cross_compiling" = yes; then :
19492 :
19493else
19494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
19495/* end confdefs.h. */
19496
8690e634
JK
19497#include <locale.h>
19498#include <stdlib.h>
19499#include <string.h>
19500/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19501 <wchar.h>.
19502 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19503 included before <wchar.h>. */
19504#include <stddef.h>
19505#include <stdio.h>
19506#include <time.h>
19507#include <wchar.h>
19508int main ()
c971b7fa 19509{
8690e634
JK
19510 /* This fails on Solaris 8:
19511 mbrtowc returns 2, and sets wc to 0x00F0.
19512 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
19513 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
19514 {
19515 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
19516 mbstate_t state;
19517 wchar_t wc;
19518
19519 memset (&state, '\0', sizeof (mbstate_t));
19520 if (mbrtowc (&wc, input + 3, 6, &state) != 4
19521 && mbtowc (&wc, input + 3, 6) == 4)
7a6dbc2f 19522 return 2;
8690e634 19523 }
c971b7fa
PA
19524 return 0;
19525}
19526_ACEOF
8690e634
JK
19527if ac_fn_c_try_run "$LINENO"; then :
19528 gl_cv_func_mbrtowc_sanitycheck=yes
c971b7fa 19529else
8690e634 19530 gl_cv_func_mbrtowc_sanitycheck=no
c971b7fa 19531fi
8690e634
JK
19532rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19533 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 19534fi
c971b7fa 19535
8690e634 19536 fi
c971b7fa 19537
8690e634
JK
19538fi
19539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
19540$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
19541
19542 REPLACE_MBSTATE_T=0
19543 case "$gl_cv_func_mbrtowc_incomplete_state" in
19544 *yes) ;;
19545 *) REPLACE_MBSTATE_T=1 ;;
19546 esac
19547 case "$gl_cv_func_mbrtowc_sanitycheck" in
19548 *yes) ;;
19549 *) REPLACE_MBSTATE_T=1 ;;
19550 esac
c971b7fa 19551 else
8690e634 19552 REPLACE_MBSTATE_T=1
c971b7fa
PA
19553 fi
19554
19555
19556
472fa5ee
SM
19557 :
19558
19559
19560
19561
19562
8690e634
JK
19563 if test $ac_cv_func_mbrtowc = no; then
19564 HAVE_MBRTOWC=0
19565 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
19566/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19567 <wchar.h>.
19568 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19569 included before <wchar.h>. */
19570#include <stddef.h>
19571#include <stdio.h>
19572#include <time.h>
19573#include <wchar.h>
c971b7fa 19574
8690e634 19575"
d0ac1c44 19576if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
8690e634
JK
19577 ac_have_decl=1
19578else
19579 ac_have_decl=0
c971b7fa 19580fi
c971b7fa 19581
8690e634
JK
19582cat >>confdefs.h <<_ACEOF
19583#define HAVE_DECL_MBRTOWC $ac_have_decl
19584_ACEOF
c971b7fa 19585
8690e634
JK
19586 if test $ac_cv_have_decl_mbrtowc = yes; then
19587 REPLACE_MBRTOWC=1
19588 fi
19589 else
19590 if test $REPLACE_MBSTATE_T = 1; then
19591 REPLACE_MBRTOWC=1
19592 else
c971b7fa
PA
19593
19594
19595
8690e634
JK
19596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
19597$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
d0ac1c44 19598if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
8690e634 19599 $as_echo_n "(cached) " >&6
c971b7fa 19600else
c971b7fa 19601
8690e634
JK
19602 case "$host_os" in
19603 # Guess no on Solaris.
19604 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
19605 # Guess yes otherwise.
19606 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
19607 esac
19608 if test $LOCALE_FR_UTF8 != none; then
19609 if test "$cross_compiling" = yes; then :
19610 :
19611else
19612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
19613/* end confdefs.h. */
19614
8690e634
JK
19615#include <locale.h>
19616#include <stdlib.h>
19617#include <string.h>
19618/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19619 <wchar.h>.
19620 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19621 included before <wchar.h>. */
19622#include <stddef.h>
19623#include <stdio.h>
19624#include <time.h>
19625#include <wchar.h>
19626int main ()
19627{
19628 int result = 0;
19629
19630 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
19631 {
19632 char input[] = "\303\237er";
19633 mbstate_t state;
19634 wchar_t wc;
19635 size_t ret;
19636
19637 memset (&state, '\0', sizeof (mbstate_t));
19638 wc = (wchar_t) 0xBADFACE;
19639 ret = mbrtowc (&wc, input, 5, &state);
19640 if (ret != 2)
19641 result |= 1;
19642 if (!mbsinit (&state))
19643 result |= 2;
c971b7fa 19644
8690e634
JK
19645 memset (&state, '\0', sizeof (mbstate_t));
19646 ret = mbrtowc (NULL, input, 5, &state);
19647 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
19648 result |= 4;
19649 if (!mbsinit (&state))
19650 result |= 8;
19651 }
19652 return result;
19653}
c971b7fa 19654_ACEOF
8690e634
JK
19655if ac_fn_c_try_run "$LINENO"; then :
19656 gl_cv_func_mbrtowc_null_arg1=yes
19657else
19658 gl_cv_func_mbrtowc_null_arg1=no
19659fi
19660rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19661 conftest.$ac_objext conftest.beam conftest.$ac_ext
19662fi
c971b7fa 19663
8690e634 19664 fi
c971b7fa 19665
c971b7fa 19666fi
8690e634
JK
19667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
19668$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
c971b7fa 19669
c971b7fa 19670
c971b7fa 19671
c971b7fa 19672
8690e634
JK
19673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
19674$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
d0ac1c44 19675if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
8690e634
JK
19676 $as_echo_n "(cached) " >&6
19677else
c971b7fa 19678
8690e634
JK
19679 case "$host_os" in
19680 # Guess no on OSF/1.
19681 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
19682 # Guess yes otherwise.
19683 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
19684 esac
19685 if test $LOCALE_FR_UTF8 != none; then
19686 if test "$cross_compiling" = yes; then :
c971b7fa 19687 :
8690e634
JK
19688else
19689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19690/* end confdefs.h. */
19691
19692#include <locale.h>
19693#include <string.h>
19694/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19695 <wchar.h>.
19696 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19697 included before <wchar.h>. */
19698#include <stddef.h>
19699#include <stdio.h>
19700#include <time.h>
19701#include <wchar.h>
19702int main ()
19703{
19704 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
19705 {
19706 mbstate_t state;
19707 wchar_t wc;
19708 int ret;
19709
19710 memset (&state, '\0', sizeof (mbstate_t));
19711 wc = (wchar_t) 0xBADFACE;
19712 mbrtowc (&wc, NULL, 5, &state);
19713 /* Check that wc was not modified. */
19714 if (wc != (wchar_t) 0xBADFACE)
7a6dbc2f 19715 return 2;
8690e634
JK
19716 }
19717 return 0;
19718}
19719_ACEOF
19720if ac_fn_c_try_run "$LINENO"; then :
19721 gl_cv_func_mbrtowc_null_arg2=yes
19722else
19723 gl_cv_func_mbrtowc_null_arg2=no
19724fi
19725rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19726 conftest.$ac_objext conftest.beam conftest.$ac_ext
19727fi
19728
19729 fi
19730
19731fi
19732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
19733$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
c971b7fa
PA
19734
19735
19736
19737
19738
19739
8690e634
JK
19740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
19741$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
d0ac1c44 19742if ${gl_cv_func_mbrtowc_retval+:} false; then :
8690e634
JK
19743 $as_echo_n "(cached) " >&6
19744else
19745
19746 case "$host_os" in
19747 # Guess no on HP-UX, Solaris, native Windows.
19748 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
19749 # Guess yes otherwise.
19750 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
19751 esac
19752 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
19753 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
19754 if test "$cross_compiling" = yes; then :
c971b7fa 19755 :
8690e634
JK
19756else
19757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19758/* end confdefs.h. */
c971b7fa 19759
8690e634
JK
19760#include <locale.h>
19761#include <string.h>
19762/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19763 <wchar.h>.
19764 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19765 included before <wchar.h>. */
19766#include <stddef.h>
19767#include <stdio.h>
19768#include <time.h>
19769#include <wchar.h>
19770int main ()
19771{
19772 int result = 0;
19773 int found_some_locale = 0;
19774 /* This fails on Solaris. */
19775 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
19776 {
19777 char input[] = "B\303\274\303\237er"; /* "Büßer" */
19778 mbstate_t state;
19779 wchar_t wc;
19780
19781 memset (&state, '\0', sizeof (mbstate_t));
19782 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
19783 {
19784 input[1] = '\0';
19785 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
19786 result |= 1;
19787 }
19788 found_some_locale = 1;
19789 }
19790 /* This fails on HP-UX 11.11. */
19791 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
19792 {
19793 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
19794 mbstate_t state;
19795 wchar_t wc;
19796
19797 memset (&state, '\0', sizeof (mbstate_t));
19798 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
19799 {
19800 input[1] = '\0';
19801 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
19802 result |= 2;
19803 }
19804 found_some_locale = 1;
19805 }
19806 /* This fails on native Windows. */
19807 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
19808 {
19809 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
19810 mbstate_t state;
19811 wchar_t wc;
19812
19813 memset (&state, '\0', sizeof (mbstate_t));
19814 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
19815 {
19816 input[3] = '\0';
19817 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
19818 result |= 4;
19819 }
19820 found_some_locale = 1;
19821 }
19822 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
19823 {
19824 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
19825 mbstate_t state;
19826 wchar_t wc;
19827
19828 memset (&state, '\0', sizeof (mbstate_t));
19829 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
19830 {
19831 input[3] = '\0';
19832 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
19833 result |= 8;
19834 }
19835 found_some_locale = 1;
19836 }
19837 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
19838 {
19839 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
19840 mbstate_t state;
19841 wchar_t wc;
19842
19843 memset (&state, '\0', sizeof (mbstate_t));
19844 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
19845 {
19846 input[3] = '\0';
19847 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
19848 result |= 16;
19849 }
19850 found_some_locale = 1;
19851 }
19852 return (found_some_locale ? result : 77);
19853}
19854_ACEOF
19855if ac_fn_c_try_run "$LINENO"; then :
19856 gl_cv_func_mbrtowc_retval=yes
19857else
19858 if test $? != 77; then
19859 gl_cv_func_mbrtowc_retval=no
19860 fi
c971b7fa 19861
8690e634
JK
19862fi
19863rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19864 conftest.$ac_objext conftest.beam conftest.$ac_ext
19865fi
c971b7fa 19866
8690e634 19867 fi
c971b7fa 19868
8690e634
JK
19869fi
19870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
19871$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
c971b7fa
PA
19872
19873
19874
19875
8690e634
JK
19876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
19877$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
d0ac1c44 19878if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
c971b7fa
PA
19879 $as_echo_n "(cached) " >&6
19880else
8690e634
JK
19881
19882 case "$host_os" in
19883 # Guess no on Solaris 8 and 9.
19884 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
19885 # Guess yes otherwise.
19886 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
19887 esac
19888 if test $LOCALE_ZH_CN != none; then
19889 if test "$cross_compiling" = yes; then :
19890 :
c971b7fa
PA
19891else
19892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19893/* end confdefs.h. */
19894
8690e634 19895#include <locale.h>
c971b7fa 19896#include <string.h>
8690e634
JK
19897/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19898 <wchar.h>.
19899 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19900 included before <wchar.h>. */
19901#include <stddef.h>
19902#include <stdio.h>
19903#include <time.h>
19904#include <wchar.h>
19905int main ()
c971b7fa 19906{
8690e634
JK
19907 /* This fails on Solaris 8 and 9. */
19908 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
c971b7fa 19909 {
8690e634
JK
19910 mbstate_t state;
19911 wchar_t wc;
c971b7fa 19912
8690e634
JK
19913 memset (&state, '\0', sizeof (mbstate_t));
19914 if (mbrtowc (&wc, "", 1, &state) != 0)
7a6dbc2f 19915 return 2;
8690e634 19916 }
c971b7fa
PA
19917 return 0;
19918}
19919_ACEOF
19920if ac_fn_c_try_run "$LINENO"; then :
8690e634 19921 gl_cv_func_mbrtowc_nul_retval=yes
c971b7fa 19922else
8690e634 19923 gl_cv_func_mbrtowc_nul_retval=no
c971b7fa
PA
19924fi
19925rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19926 conftest.$ac_objext conftest.beam conftest.$ac_ext
19927fi
19928
8690e634
JK
19929 fi
19930
c971b7fa 19931fi
8690e634
JK
19932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
19933$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
19934
4a626d0a
PA
19935
19936
19937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
19938$as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
d0ac1c44 19939if ${gl_cv_func_mbrtowc_empty_input+:} false; then :
4a626d0a
PA
19940 $as_echo_n "(cached) " >&6
19941else
19942
19943 case "$host_os" in
7a6dbc2f
SDJ
19944 # Guess no on AIX and glibc systems.
19945 aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
19946 # Guess yes on native Windows.
19947 mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
19948 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
4a626d0a
PA
19949 esac
19950 if test "$cross_compiling" = yes; then :
19951 :
19952else
19953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19954/* end confdefs.h. */
19955
19956 #include <wchar.h>
19957 static wchar_t wc;
19958 static mbstate_t mbs;
19959 int
19960 main (void)
19961 {
49e4877c 19962 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
4a626d0a
PA
19963 }
19964_ACEOF
19965if ac_fn_c_try_run "$LINENO"; then :
4a626d0a 19966 gl_cv_func_mbrtowc_empty_input=yes
49e4877c
PA
19967else
19968 gl_cv_func_mbrtowc_empty_input=no
4a626d0a
PA
19969fi
19970rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19971 conftest.$ac_objext conftest.beam conftest.$ac_ext
19972fi
19973
19974
19975fi
19976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
19977$as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
19978
49e4877c 19979
7a6dbc2f 19980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
49e4877c 19981$as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
d0ac1c44 19982if ${gl_cv_C_locale_sans_EILSEQ+:} false; then :
49e4877c
PA
19983 $as_echo_n "(cached) " >&6
19984else
19985
19986 gl_cv_C_locale_sans_EILSEQ="guessing no"
19987
19988 if test "$cross_compiling" = yes; then :
7a6dbc2f
SDJ
19989 case "$host_os" in
19990 # Guess yes on native Windows.
19991 mingw*) gl_cv_C_locale_sans_EILSEQ="guessing yes" ;;
19992 esac
19993
49e4877c
PA
19994else
19995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19996/* end confdefs.h. */
19997#include <limits.h>
19998 #include <locale.h>
19999 #include <wchar.h>
20000
20001int
20002main ()
20003{
20004
20005 int i;
20006 char *locale = setlocale (LC_ALL, "C");
20007 if (! locale)
7a6dbc2f 20008 return 2;
49e4877c
PA
20009 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
20010 {
20011 char c = i;
20012 wchar_t wc;
20013 mbstate_t mbs = { 0, };
20014 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
20015 if (1 < ss)
7a6dbc2f 20016 return 3;
49e4877c
PA
20017 }
20018 return 0;
20019
6ec2e0f5
SDJ
20020 ;
20021 return 0;
20022}
20023_ACEOF
20024if ac_fn_c_try_run "$LINENO"; then :
20025 gl_cv_C_locale_sans_EILSEQ=yes
20026else
20027 gl_cv_C_locale_sans_EILSEQ=no
20028fi
20029rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20030 conftest.$ac_objext conftest.beam conftest.$ac_ext
20031fi
20032
7a6dbc2f 20033
6ec2e0f5
SDJ
20034fi
20035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5
20036$as_echo "$gl_cv_C_locale_sans_EILSEQ" >&6; }
20037
20038 case "$gl_cv_func_mbrtowc_null_arg1" in
20039 *yes) ;;
20040 *)
20041$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
20042
20043 REPLACE_MBRTOWC=1
20044 ;;
20045 esac
20046 case "$gl_cv_func_mbrtowc_null_arg2" in
20047 *yes) ;;
20048 *)
20049$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
20050
20051 REPLACE_MBRTOWC=1
20052 ;;
20053 esac
20054 case "$gl_cv_func_mbrtowc_retval" in
20055 *yes) ;;
20056 *)
20057$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
20058
20059 REPLACE_MBRTOWC=1
20060 ;;
20061 esac
20062 case "$gl_cv_func_mbrtowc_nul_retval" in
20063 *yes) ;;
20064 *)
20065$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
20066
20067 REPLACE_MBRTOWC=1
20068 ;;
20069 esac
20070 case "$gl_cv_func_mbrtowc_empty_input" in
20071 *yes) ;;
20072 *)
20073$as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
20074
20075 REPLACE_MBRTOWC=1
20076 ;;
20077 esac
20078 case $gl_cv_C_locale_sans_EILSEQ in
20079 *yes) ;;
20080 *)
20081$as_echo "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
20082
20083 REPLACE_MBRTOWC=1
20084 ;;
20085 esac
20086 fi
20087 fi
20088
20089 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
20090
20091
20092
20093
20094
20095
20096
20097
20098 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
20099
20100
7a6dbc2f 20101
6ec2e0f5
SDJ
20102 :
20103
20104 fi
20105
20106
20107
20108
20109
20110 GNULIB_MBRTOWC=1
20111
20112
20113
20114
20115
20116$as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
20117
20118
20119
20120
20121
20122
20123
20124
20125
20126
20127
20128
20129
472fa5ee
SM
20130 :
20131
20132
20133
20134
20135
20136
20137 :
20138
20139
20140
20141
6ec2e0f5
SDJ
20142
20143 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
20144
20145
20146
20147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
20148$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
d0ac1c44 20149if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
6ec2e0f5
SDJ
20150 $as_echo_n "(cached) " >&6
20151else
20152
20153 case "$host_os" in
20154 # Guess no on AIX and OSF/1.
20155 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
20156 # Guess yes otherwise.
20157 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
20158 esac
20159 if test $LOCALE_JA != none; then
20160 if test "$cross_compiling" = yes; then :
20161 :
20162else
20163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20164/* end confdefs.h. */
20165
20166#include <locale.h>
20167#include <string.h>
20168/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20169 <wchar.h>.
20170 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20171 included before <wchar.h>. */
20172#include <stddef.h>
20173#include <stdio.h>
20174#include <time.h>
20175#include <wchar.h>
20176int main ()
20177{
20178 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
20179 {
20180 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
20181 mbstate_t state;
20182 wchar_t wc;
20183
20184 memset (&state, '\0', sizeof (mbstate_t));
20185 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
20186 if (mbsinit (&state))
7a6dbc2f 20187 return 2;
6ec2e0f5
SDJ
20188 }
20189 return 0;
20190}
20191_ACEOF
20192if ac_fn_c_try_run "$LINENO"; then :
20193 gl_cv_func_mbrtowc_incomplete_state=yes
20194else
20195 gl_cv_func_mbrtowc_incomplete_state=no
20196fi
20197rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20198 conftest.$ac_objext conftest.beam conftest.$ac_ext
20199fi
20200
20201 fi
20202
20203fi
20204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
20205$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
20206
20207
20208
20209
20210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
20211$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
d0ac1c44 20212if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
6ec2e0f5
SDJ
20213 $as_echo_n "(cached) " >&6
20214else
20215
20216 case "$host_os" in
20217 # Guess no on Solaris 8.
20218 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
20219 # Guess yes otherwise.
20220 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
20221 esac
20222 if test $LOCALE_ZH_CN != none; then
20223 if test "$cross_compiling" = yes; then :
20224 :
20225else
20226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20227/* end confdefs.h. */
20228
20229#include <locale.h>
20230#include <stdlib.h>
20231#include <string.h>
20232/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20233 <wchar.h>.
20234 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20235 included before <wchar.h>. */
20236#include <stddef.h>
20237#include <stdio.h>
20238#include <time.h>
20239#include <wchar.h>
20240int main ()
20241{
20242 /* This fails on Solaris 8:
20243 mbrtowc returns 2, and sets wc to 0x00F0.
20244 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
20245 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
20246 {
20247 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
20248 mbstate_t state;
20249 wchar_t wc;
20250
20251 memset (&state, '\0', sizeof (mbstate_t));
20252 if (mbrtowc (&wc, input + 3, 6, &state) != 4
20253 && mbtowc (&wc, input + 3, 6) == 4)
7a6dbc2f 20254 return 2;
6ec2e0f5 20255 }
49e4877c
PA
20256 return 0;
20257}
20258_ACEOF
20259if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 20260 gl_cv_func_mbrtowc_sanitycheck=yes
49e4877c 20261else
6ec2e0f5 20262 gl_cv_func_mbrtowc_sanitycheck=no
49e4877c
PA
20263fi
20264rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20265 conftest.$ac_objext conftest.beam conftest.$ac_ext
20266fi
20267
6ec2e0f5
SDJ
20268 fi
20269
49e4877c 20270fi
6ec2e0f5
SDJ
20271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
20272$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
49e4877c 20273
6ec2e0f5
SDJ
20274 REPLACE_MBSTATE_T=0
20275 case "$gl_cv_func_mbrtowc_incomplete_state" in
20276 *yes) ;;
20277 *) REPLACE_MBSTATE_T=1 ;;
20278 esac
20279 case "$gl_cv_func_mbrtowc_sanitycheck" in
20280 *yes) ;;
20281 *) REPLACE_MBSTATE_T=1 ;;
20282 esac
20283 else
20284 REPLACE_MBSTATE_T=1
20285 fi
8690e634 20286
8690e634 20287
8690e634 20288
472fa5ee
SM
20289 :
20290
20291
20292
20293
20294
6ec2e0f5
SDJ
20295 if test $ac_cv_func_mbsinit = no; then
20296 HAVE_MBSINIT=0
20297 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
20298/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20299 <wchar.h>.
20300 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20301 included before <wchar.h>. */
20302#include <stddef.h>
20303#include <stdio.h>
20304#include <time.h>
20305#include <wchar.h>
8690e634 20306
6ec2e0f5 20307"
d0ac1c44 20308if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
6ec2e0f5
SDJ
20309 ac_have_decl=1
20310else
20311 ac_have_decl=0
20312fi
4a626d0a 20313
6ec2e0f5
SDJ
20314cat >>confdefs.h <<_ACEOF
20315#define HAVE_DECL_MBSINIT $ac_have_decl
20316_ACEOF
49e4877c 20317
6ec2e0f5
SDJ
20318 if test $ac_cv_have_decl_mbsinit = yes; then
20319 REPLACE_MBSINIT=1
20320 fi
20321 else
20322 if test $REPLACE_MBSTATE_T = 1; then
20323 REPLACE_MBSINIT=1
20324 else
20325 case "$host_os" in
20326 mingw*) REPLACE_MBSINIT=1 ;;
8690e634 20327 esac
c971b7fa
PA
20328 fi
20329 fi
20330
6ec2e0f5 20331 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
c971b7fa 20332
c971b7fa 20333
c971b7fa
PA
20334
20335
20336
20337
20338
20339
6ec2e0f5 20340 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
8690e634
JK
20341
20342
20343 :
c971b7fa 20344
a512b375 20345 fi
c971b7fa 20346
8690e634
JK
20347
20348
20349
20350
6ec2e0f5 20351 GNULIB_MBSINIT=1
8690e634
JK
20352
20353
20354
20355
8690e634 20356
6ec2e0f5 20357$as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
8690e634
JK
20358
20359
20360
20361
20362
20363
20364
20365
20366
20367
20368
c971b7fa 20369
472fa5ee
SM
20370 :
20371
20372
20373
20374
20375
20376
20377 :
20378
20379
20380
20381
c971b7fa 20382
8690e634 20383 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
c971b7fa 20384
8690e634
JK
20385
20386
20387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
20388$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
d0ac1c44 20389if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
8690e634
JK
20390 $as_echo_n "(cached) " >&6
20391else
20392
20393 case "$host_os" in
20394 # Guess no on AIX and OSF/1.
20395 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
20396 # Guess yes otherwise.
20397 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
20398 esac
20399 if test $LOCALE_JA != none; then
20400 if test "$cross_compiling" = yes; then :
20401 :
c971b7fa
PA
20402else
20403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20404/* end confdefs.h. */
20405
8690e634
JK
20406#include <locale.h>
20407#include <string.h>
20408/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20409 <wchar.h>.
20410 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20411 included before <wchar.h>. */
20412#include <stddef.h>
20413#include <stdio.h>
20414#include <time.h>
20415#include <wchar.h>
20416int main ()
c971b7fa 20417{
8690e634 20418 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
c971b7fa 20419 {
8690e634
JK
20420 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
20421 mbstate_t state;
20422 wchar_t wc;
20423
20424 memset (&state, '\0', sizeof (mbstate_t));
20425 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
20426 if (mbsinit (&state))
7a6dbc2f 20427 return 2;
c971b7fa 20428 }
c971b7fa
PA
20429 return 0;
20430}
20431_ACEOF
20432if ac_fn_c_try_run "$LINENO"; then :
8690e634 20433 gl_cv_func_mbrtowc_incomplete_state=yes
c971b7fa 20434else
8690e634 20435 gl_cv_func_mbrtowc_incomplete_state=no
c971b7fa
PA
20436fi
20437rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20438 conftest.$ac_objext conftest.beam conftest.$ac_ext
20439fi
20440
8690e634 20441 fi
c971b7fa
PA
20442
20443fi
8690e634
JK
20444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
20445$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
c971b7fa
PA
20446
20447
c971b7fa
PA
20448
20449
8690e634
JK
20450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
20451$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
d0ac1c44 20452if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
c971b7fa
PA
20453 $as_echo_n "(cached) " >&6
20454else
8690e634
JK
20455
20456 case "$host_os" in
20457 # Guess no on Solaris 8.
20458 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
20459 # Guess yes otherwise.
20460 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
20461 esac
20462 if test $LOCALE_ZH_CN != none; then
20463 if test "$cross_compiling" = yes; then :
20464 :
20465else
c971b7fa
PA
20466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20467/* end confdefs.h. */
8690e634
JK
20468
20469#include <locale.h>
20470#include <stdlib.h>
20471#include <string.h>
20472/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20473 <wchar.h>.
20474 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20475 included before <wchar.h>. */
c971b7fa 20476#include <stddef.h>
8690e634
JK
20477#include <stdio.h>
20478#include <time.h>
20479#include <wchar.h>
20480int main ()
c971b7fa 20481{
8690e634
JK
20482 /* This fails on Solaris 8:
20483 mbrtowc returns 2, and sets wc to 0x00F0.
20484 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
20485 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
20486 {
20487 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
20488 mbstate_t state;
20489 wchar_t wc;
20490
20491 memset (&state, '\0', sizeof (mbstate_t));
20492 if (mbrtowc (&wc, input + 3, 6, &state) != 4
20493 && mbtowc (&wc, input + 3, 6) == 4)
7a6dbc2f 20494 return 2;
8690e634 20495 }
c971b7fa
PA
20496 return 0;
20497}
20498_ACEOF
8690e634
JK
20499if ac_fn_c_try_run "$LINENO"; then :
20500 gl_cv_func_mbrtowc_sanitycheck=yes
c971b7fa 20501else
8690e634 20502 gl_cv_func_mbrtowc_sanitycheck=no
c971b7fa 20503fi
8690e634
JK
20504rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20505 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 20506fi
c971b7fa 20507
8690e634
JK
20508 fi
20509
20510fi
20511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
20512$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
c971b7fa 20513
8690e634
JK
20514 REPLACE_MBSTATE_T=0
20515 case "$gl_cv_func_mbrtowc_incomplete_state" in
20516 *yes) ;;
20517 *) REPLACE_MBSTATE_T=1 ;;
20518 esac
20519 case "$gl_cv_func_mbrtowc_sanitycheck" in
20520 *yes) ;;
20521 *) REPLACE_MBSTATE_T=1 ;;
20522 esac
20523 else
20524 REPLACE_MBSTATE_T=1
c971b7fa
PA
20525 fi
20526
c971b7fa 20527
8690e634 20528
472fa5ee
SM
20529 :
20530
20531
20532
20533
20534
6ec2e0f5
SDJ
20535 if test $ac_cv_func_mbsrtowcs = no; then
20536 HAVE_MBSRTOWCS=0
20537 ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
8690e634
JK
20538/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20539 <wchar.h>.
20540 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20541 included before <wchar.h>. */
20542#include <stddef.h>
20543#include <stdio.h>
20544#include <time.h>
20545#include <wchar.h>
20546
20547"
d0ac1c44 20548if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
8690e634
JK
20549 ac_have_decl=1
20550else
20551 ac_have_decl=0
c971b7fa 20552fi
c971b7fa 20553
8690e634 20554cat >>confdefs.h <<_ACEOF
6ec2e0f5 20555#define HAVE_DECL_MBSRTOWCS $ac_have_decl
c971b7fa 20556_ACEOF
c971b7fa 20557
6ec2e0f5
SDJ
20558 if test $ac_cv_have_decl_mbsrtowcs = yes; then
20559 REPLACE_MBSRTOWCS=1
8690e634
JK
20560 fi
20561 else
20562 if test $REPLACE_MBSTATE_T = 1; then
6ec2e0f5 20563 REPLACE_MBSRTOWCS=1
8690e634 20564 else
6ec2e0f5
SDJ
20565
20566
20567
20568
20569
20570
20571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
20572$as_echo_n "checking whether mbsrtowcs works... " >&6; }
d0ac1c44 20573if ${gl_cv_func_mbsrtowcs_works+:} false; then :
6ec2e0f5
SDJ
20574 $as_echo_n "(cached) " >&6
20575else
20576
20577 case "$host_os" in
20578 # Guess no on HP-UX, Solaris, mingw.
20579 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
20580 # Guess yes otherwise.
20581 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
20582 esac
20583 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
20584 if test "$cross_compiling" = yes; then :
20585 :
20586else
20587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20588/* end confdefs.h. */
20589
20590#include <locale.h>
20591#include <string.h>
20592/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20593 <wchar.h>.
20594 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20595 included before <wchar.h>. */
20596#include <stddef.h>
20597#include <stdio.h>
20598#include <time.h>
20599#include <wchar.h>
20600int main ()
20601{
20602 int result = 0;
20603 /* Test whether the function supports a NULL destination argument.
20604 This fails on native Windows. */
20605 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
20606 {
20607 const char input[] = "\337er";
20608 const char *src = input;
20609 mbstate_t state;
20610
20611 memset (&state, '\0', sizeof (mbstate_t));
20612 if (mbsrtowcs (NULL, &src, 1, &state) != 3
20613 || src != input)
20614 result |= 1;
20615 }
20616 /* Test whether the function works when started with a conversion state
20617 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
20618 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
20619 {
20620 const char input[] = "B\303\274\303\237er";
20621 mbstate_t state;
20622
20623 memset (&state, '\0', sizeof (mbstate_t));
20624 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
20625 if (!mbsinit (&state))
20626 {
20627 const char *src = input + 2;
20628 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
20629 result |= 2;
20630 }
20631 }
20632 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
20633 {
20634 const char input[] = "<\306\374\313\334\270\354>";
20635 mbstate_t state;
20636
20637 memset (&state, '\0', sizeof (mbstate_t));
20638 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
20639 if (!mbsinit (&state))
20640 {
20641 const char *src = input + 4;
20642 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
20643 result |= 4;
20644 }
20645 }
20646 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
20647 {
20648 const char input[] = "B\250\271\201\060\211\070er";
20649 mbstate_t state;
20650
20651 memset (&state, '\0', sizeof (mbstate_t));
20652 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
20653 if (!mbsinit (&state))
20654 {
20655 const char *src = input + 2;
20656 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
20657 result |= 8;
20658 }
20659 }
20660 return result;
20661}
20662_ACEOF
20663if ac_fn_c_try_run "$LINENO"; then :
20664 gl_cv_func_mbsrtowcs_works=yes
20665else
20666 gl_cv_func_mbsrtowcs_works=no
20667fi
20668rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20669 conftest.$ac_objext conftest.beam conftest.$ac_ext
20670fi
20671
20672 fi
20673
20674fi
20675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
20676$as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
20677
20678 case "$gl_cv_func_mbsrtowcs_works" in
20679 *yes) ;;
20680 *) REPLACE_MBSRTOWCS=1 ;;
8690e634
JK
20681 esac
20682 fi
20683 fi
c971b7fa 20684
6ec2e0f5 20685 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
c971b7fa
PA
20686
20687
20688
20689
20690
20691
20692
20693
6ec2e0f5
SDJ
20694 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
20695
20696
20697
20698
20699
20700
20701
20702
20703
20704 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
c971b7fa
PA
20705
20706
8690e634 20707 :
c971b7fa 20708
a512b375 20709 fi
c971b7fa 20710
c971b7fa 20711
c971b7fa 20712
c971b7fa
PA
20713
20714
6ec2e0f5 20715 GNULIB_MBSRTOWCS=1
c971b7fa 20716
c971b7fa
PA
20717
20718
20719
20720
6ec2e0f5 20721$as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
c971b7fa
PA
20722
20723
c971b7fa 20724
c971b7fa 20725
6ec2e0f5 20726 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
c971b7fa
PA
20727
20728
20729
c971b7fa 20730
c971b7fa
PA
20731
20732
20733
20734
6ec2e0f5 20735 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
8690e634 20736
c971b7fa 20737
6ec2e0f5
SDJ
20738 for ac_header in bp-sym.h
20739do :
20740 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
d0ac1c44 20741if test "x$ac_cv_header_bp_sym_h" = xyes; then :
6ec2e0f5
SDJ
20742 cat >>confdefs.h <<_ACEOF
20743#define HAVE_BP_SYM_H 1
20744_ACEOF
c971b7fa 20745
6ec2e0f5 20746fi
c971b7fa 20747
6ec2e0f5
SDJ
20748done
20749
20750
20751 fi
20752
20753
20754
20755
20756
20757 GNULIB_MEMCHR=1
20758
20759
20760
20761
20762
20763$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
20764
20765
20766
20767
20768
20769 if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
20770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
20771$as_echo_n "checking whether memmem works in linear time... " >&6; }
d0ac1c44 20772if ${gl_cv_func_memmem_works_fast+:} false; then :
8690e634
JK
20773 $as_echo_n "(cached) " >&6
20774else
6ec2e0f5
SDJ
20775 if test "$cross_compiling" = yes; then :
20776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20777/* end confdefs.h. */
20778
20779#include <features.h>
20780#ifdef __GNU_LIBRARY__
20781 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)) \
20782 && !defined __UCLIBC__
20783 Lucky user
20784 #endif
20785#endif
20786#ifdef __CYGWIN__
20787 #include <cygwin/version.h>
20788 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 0)
20789 Lucky user
20790 #endif
20791#endif
20792
20793_ACEOF
20794if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20795 $EGREP "Lucky user" >/dev/null 2>&1; then :
20796 gl_cv_func_memmem_works_fast="guessing yes"
20797else
20798 gl_cv_func_memmem_works_fast="guessing no"
20799fi
20800rm -f conftest*
20801
c971b7fa 20802
8690e634
JK
20803else
20804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 20805/* end confdefs.h. */
c971b7fa 20806
6ec2e0f5
SDJ
20807#include <signal.h> /* for signal */
20808#include <string.h> /* for memmem */
20809#include <stdlib.h> /* for malloc */
20810#include <unistd.h> /* for alarm */
20811static void quit (int sig) { _exit (sig + 128); }
20812
20813int
20814main ()
8690e634 20815{
8690e634 20816
6ec2e0f5
SDJ
20817 int result = 0;
20818 size_t m = 1000000;
20819 char *haystack = (char *) malloc (2 * m + 1);
20820 char *needle = (char *) malloc (m + 1);
20821 /* Failure to compile this test due to missing alarm is okay,
20822 since all such platforms (mingw) also lack memmem. */
20823 signal (SIGALRM, quit);
20824 alarm (5);
20825 /* Check for quadratic performance. */
20826 if (haystack && needle)
20827 {
20828 memset (haystack, 'A', 2 * m);
20829 haystack[2 * m] = 'B';
20830 memset (needle, 'A', m);
20831 needle[m] = 'B';
20832 if (!memmem (haystack, 2 * m + 1, needle, m + 1))
20833 result |= 1;
20834 }
7a6dbc2f
SDJ
20835 /* Free allocated memory, in case some sanitizer is watching. */
20836 free (haystack);
20837 free (needle);
6ec2e0f5
SDJ
20838 return result;
20839
20840 ;
c971b7fa
PA
20841 return 0;
20842}
20843_ACEOF
8690e634 20844if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 20845 gl_cv_func_memmem_works_fast=yes
8690e634 20846else
6ec2e0f5 20847 gl_cv_func_memmem_works_fast=no
8690e634
JK
20848fi
20849rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20850 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 20851fi
c971b7fa
PA
20852
20853
8690e634 20854fi
6ec2e0f5
SDJ
20855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_fast" >&5
20856$as_echo "$gl_cv_func_memmem_works_fast" >&6; }
20857 case "$gl_cv_func_memmem_works_fast" in
20858 *yes) ;;
20859 *)
20860 REPLACE_MEMMEM=1
20861 ;;
20862 esac
20863 fi
c971b7fa 20864
6ec2e0f5 20865 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
8690e634
JK
20866
20867
20868
6ec2e0f5
SDJ
20869
20870
20871
20872
20873
20874 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
20875
20876 fi
20877
20878
20879
20880
20881 for ac_func in memmem
20882do :
20883 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
d0ac1c44 20884if test "x$ac_cv_func_memmem" = xyes; then :
6ec2e0f5
SDJ
20885 cat >>confdefs.h <<_ACEOF
20886#define HAVE_MEMMEM 1
20887_ACEOF
20888
20889fi
20890done
20891
20892 if test $ac_cv_func_memmem = yes; then
20893 HAVE_MEMMEM=1
20894 else
20895 HAVE_MEMMEM=0
20896 fi
20897
472fa5ee
SM
20898 :
20899
20900
20901
20902
20903
6ec2e0f5
SDJ
20904 if test $ac_cv_have_decl_memmem = no; then
20905 HAVE_DECL_MEMMEM=0
20906 else
20907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
20908$as_echo_n "checking whether memmem works... " >&6; }
d0ac1c44 20909if ${gl_cv_func_memmem_works_always+:} false; then :
c971b7fa
PA
20910 $as_echo_n "(cached) " >&6
20911else
6ec2e0f5
SDJ
20912 if test "$cross_compiling" = yes; then :
20913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20914/* end confdefs.h. */
20915
20916#ifdef __GNU_LIBRARY__
20917 #include <features.h>
20918 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
20919 || __GLIBC_MINOR__ > 12)) \
20920 || (__GLIBC__ > 2)) \
20921 || defined __UCLIBC__
20922 Lucky user
20923 #endif
20924#elif defined __CYGWIN__
20925 #include <cygwin/version.h>
20926 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
20927 Lucky user
20928 #endif
20929#else
20930 Lucky user
20931#endif
20932
20933_ACEOF
20934if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20935 $EGREP "Lucky user" >/dev/null 2>&1; then :
20936 gl_cv_func_memmem_works_always="guessing yes"
20937else
20938 gl_cv_func_memmem_works_always="guessing no"
20939fi
20940rm -f conftest*
20941
8690e634 20942
8690e634 20943else
c971b7fa
PA
20944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20945/* end confdefs.h. */
c971b7fa 20946
6ec2e0f5
SDJ
20947#include <string.h> /* for memmem */
20948#define P "_EF_BF_BD"
20949#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
20950#define NEEDLE P P P P P
20951
20952int
20953main ()
c971b7fa 20954{
8690e634 20955
6ec2e0f5
SDJ
20956 int result = 0;
20957 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
20958 result |= 1;
20959 /* Check for empty needle behavior. */
20960 {
20961 const char *haystack = "AAA";
20962 if (memmem (haystack, 3, NULL, 0) != haystack)
20963 result |= 2;
8690e634 20964 }
6ec2e0f5
SDJ
20965 return result;
20966
20967 ;
c971b7fa
PA
20968 return 0;
20969}
20970_ACEOF
8690e634 20971if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 20972 gl_cv_func_memmem_works_always=yes
c971b7fa 20973else
6ec2e0f5 20974 gl_cv_func_memmem_works_always=no
c971b7fa 20975fi
8690e634
JK
20976rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20977 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 20978fi
8690e634 20979
8690e634
JK
20980
20981fi
6ec2e0f5
SDJ
20982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
20983$as_echo "$gl_cv_func_memmem_works_always" >&6; }
20984 case "$gl_cv_func_memmem_works_always" in
8690e634 20985 *yes) ;;
6ec2e0f5
SDJ
20986 *)
20987 REPLACE_MEMMEM=1
20988 ;;
8690e634 20989 esac
c971b7fa 20990 fi
6ec2e0f5 20991 :
c971b7fa 20992
6ec2e0f5 20993 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
c971b7fa 20994
c971b7fa 20995
8690e634 20996
c971b7fa 20997
6ec2e0f5
SDJ
20998
20999
21000
21001
21002 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
21003
21004 fi
21005
21006
21007
21008
21009
21010 GNULIB_MEMMEM=1
21011
21012
21013
21014
21015
21016$as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
21017
21018
21019
21020
21021
21022
21023
21024
21025
21026 for ac_func in mempcpy
21027do :
21028 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
d0ac1c44 21029if test "x$ac_cv_func_mempcpy" = xyes; then :
6ec2e0f5
SDJ
21030 cat >>confdefs.h <<_ACEOF
21031#define HAVE_MEMPCPY 1
8690e634 21032_ACEOF
c971b7fa 21033
6ec2e0f5
SDJ
21034fi
21035done
c971b7fa 21036
6ec2e0f5
SDJ
21037 if test $ac_cv_func_mempcpy = no; then
21038 HAVE_MEMPCPY=0
21039 fi
8690e634 21040
6ec2e0f5 21041 if test $HAVE_MEMPCPY = 0; then
8690e634
JK
21042
21043
21044
21045
8690e634 21046
6ec2e0f5
SDJ
21047
21048
21049
21050 gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
21051
21052
8690e634 21053 :
c971b7fa 21054
6ec2e0f5 21055 fi
c971b7fa 21056
8690e634 21057
8690e634 21058
8690e634 21059
6ec2e0f5
SDJ
21060
21061 GNULIB_MEMPCPY=1
21062
21063
21064
21065
21066
21067$as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
21068
21069
21070
21071
21072
21073
21074
21075
472fa5ee
SM
21076 :
21077
21078
21079
21080
21081
6ec2e0f5
SDJ
21082 if test $ac_cv_have_decl_memrchr = no; then
21083 HAVE_DECL_MEMRCHR=0
21084 fi
21085
21086 for ac_func in memrchr
21087do :
21088 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
d0ac1c44 21089if test "x$ac_cv_func_memrchr" = xyes; then :
6ec2e0f5
SDJ
21090 cat >>confdefs.h <<_ACEOF
21091#define HAVE_MEMRCHR 1
c971b7fa 21092_ACEOF
6ec2e0f5 21093
c971b7fa 21094fi
6ec2e0f5 21095done
8690e634 21096
8690e634 21097
6ec2e0f5 21098 if test $ac_cv_func_memrchr = no; then
8690e634 21099
6ec2e0f5
SDJ
21100
21101
21102
21103
21104
21105
21106
21107 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
21108
21109 :
c971b7fa
PA
21110 fi
21111
21112
c971b7fa 21113
c971b7fa 21114
c971b7fa 21115
6ec2e0f5
SDJ
21116 GNULIB_MEMRCHR=1
21117
21118
21119
21120
21121
21122$as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
21123
21124
21125
21126
2d8adcbd 21127
8a99096f
SM
21128 :
21129
21130
21131
21132
21133
21134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
21135$as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
21136if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then :
21137 $as_echo_n "(cached) " >&6
21138else
21139 rm -rf conftest.dir
21140 if test "$cross_compiling" = yes; then :
21141 case "$host_os" in
7a6dbc2f
SDJ
21142 # Guess yes on Linux systems.
21143 linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
21144 # Guess yes on glibc systems.
21145 *-gnu* | gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
21146 # Guess yes on MSVC, no on mingw.
21147 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21148/* end confdefs.h. */
21149
21150#ifdef _MSC_VER
21151 Known
21152#endif
21153
21154_ACEOF
21155if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21156 $EGREP "Known" >/dev/null 2>&1; then :
21157 gl_cv_func_mkdir_trailing_slash_works="guessing yes"
21158else
21159 gl_cv_func_mkdir_trailing_slash_works="guessing no"
21160fi
21161rm -f conftest*
21162
21163 ;;
21164 # If we don't know, assume the worst.
21165 *) gl_cv_func_mkdir_trailing_slash_works="guessing no" ;;
8a99096f
SM
21166 esac
21167
21168else
21169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21170/* end confdefs.h. */
21171
21172# include <sys/types.h>
21173# include <sys/stat.h>
21174
21175int
21176main ()
21177{
21178return mkdir ("conftest.dir/", 0700);
21179 ;
21180 return 0;
21181}
21182_ACEOF
21183if ac_fn_c_try_run "$LINENO"; then :
21184 gl_cv_func_mkdir_trailing_slash_works=yes
21185else
21186 gl_cv_func_mkdir_trailing_slash_works=no
21187fi
21188rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21189 conftest.$ac_objext conftest.beam conftest.$ac_ext
21190fi
21191
21192 rm -rf conftest.dir
21193
21194
21195fi
21196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
21197$as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
21198 case "$gl_cv_func_mkdir_trailing_slash_works" in
21199 *yes) ;;
21200 *)
21201 REPLACE_MKDIR=1
21202 ;;
21203 esac
21204
21205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
21206$as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
21207if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then :
21208 $as_echo_n "(cached) " >&6
21209else
21210 rm -rf conftest.dir
21211 if test "$cross_compiling" = yes; then :
21212 case "$host_os" in
7a6dbc2f
SDJ
21213 # Guess yes on glibc systems.
21214 *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
21215 # Guess no on native Windows.
21216 mingw*) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
21217 # If we don't know, assume the worst.
21218 *) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
8a99096f
SM
21219 esac
21220
21221else
21222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21223/* end confdefs.h. */
21224
21225# include <sys/types.h>
21226# include <sys/stat.h>
21227
21228int
21229main ()
21230{
21231return !mkdir ("conftest.dir/./", 0700);
21232 ;
21233 return 0;
21234}
21235_ACEOF
21236if ac_fn_c_try_run "$LINENO"; then :
21237 gl_cv_func_mkdir_trailing_dot_works=yes
21238else
21239 gl_cv_func_mkdir_trailing_dot_works=no
21240fi
21241rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21242 conftest.$ac_objext conftest.beam conftest.$ac_ext
21243fi
21244
21245 rm -rf conftest.dir
21246
21247
21248fi
21249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
21250$as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
21251 case "$gl_cv_func_mkdir_trailing_dot_works" in
21252 *yes) ;;
21253 *)
21254 REPLACE_MKDIR=1
21255
21256$as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
21257
21258 ;;
21259 esac
21260
21261 if test $REPLACE_MKDIR = 1; then
21262
21263
21264
21265
21266
21267
21268
21269
21270 gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
21271
21272 fi
21273
21274
2d8adcbd
MM
21275
21276
472fa5ee
SM
21277 :
21278
21279
21280
21281
21282
2d8adcbd
MM
21283 if test $ac_cv_func_mkstemp = yes; then
21284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mkstemp" >&5
21285$as_echo_n "checking for working mkstemp... " >&6; }
d0ac1c44 21286if ${gl_cv_func_working_mkstemp+:} false; then :
2d8adcbd
MM
21287 $as_echo_n "(cached) " >&6
21288else
21289
21290 mkdir conftest.mkstemp
21291 if test "$cross_compiling" = yes; then :
21292 case "$host_os" in
7a6dbc2f
SDJ
21293 # Guess yes on glibc systems.
21294 *-gnu* | gnu*) gl_cv_func_working_mkstemp="guessing yes" ;;
21295 # Guess no on native Windows.
21296 mingw*) gl_cv_func_working_mkstemp="guessing no" ;;
21297 # If we don't know, assume the worst.
21298 *) gl_cv_func_working_mkstemp="guessing no" ;;
2d8adcbd
MM
21299 esac
21300
21301else
21302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21303/* end confdefs.h. */
21304$ac_includes_default
21305int
21306main ()
21307{
21308int result = 0;
21309 int i;
21310 off_t large = (off_t) 4294967295u;
21311 if (large < 0)
21312 large = 2147483647;
21313 umask (0);
21314 for (i = 0; i < 70; i++)
21315 {
21316 char templ[] = "conftest.mkstemp/coXXXXXX";
21317 int (*mkstemp_function) (char *) = mkstemp;
21318 int fd = mkstemp_function (templ);
21319 if (fd < 0)
21320 result |= 1;
21321 else
21322 {
21323 struct stat st;
21324 if (lseek (fd, large, SEEK_SET) != large)
21325 result |= 2;
21326 if (fstat (fd, &st) < 0)
21327 result |= 4;
21328 else if (st.st_mode & 0077)
21329 result |= 8;
21330 if (close (fd))
21331 result |= 16;
21332 }
21333 }
21334 return result;
21335 ;
21336 return 0;
21337}
21338_ACEOF
21339if ac_fn_c_try_run "$LINENO"; then :
21340 gl_cv_func_working_mkstemp=yes
21341else
21342 gl_cv_func_working_mkstemp=no
21343fi
21344rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21345 conftest.$ac_objext conftest.beam conftest.$ac_ext
21346fi
21347
21348 rm -rf conftest.mkstemp
21349
21350fi
21351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mkstemp" >&5
21352$as_echo "$gl_cv_func_working_mkstemp" >&6; }
21353 case "$gl_cv_func_working_mkstemp" in
21354 *yes) ;;
21355 *)
21356 REPLACE_MKSTEMP=1
21357 ;;
21358 esac
21359 else
21360 HAVE_MKSTEMP=0
21361 fi
21362
21363 if test $HAVE_MKSTEMP = 0 || test $REPLACE_MKSTEMP = 1; then
21364
21365
21366
21367
21368
21369
21370
21371
21372 gl_LIBOBJS="$gl_LIBOBJS mkstemp.$ac_objext"
21373
21374
21375
21376 fi
21377
21378
21379
21380
21381
21382 GNULIB_MKSTEMP=1
21383
21384
21385
21386
21387
21388$as_echo "#define GNULIB_TEST_MKSTEMP 1" >>confdefs.h
21389
21390
21391
21392
6ec2e0f5
SDJ
21393 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
21394
21395
21396
c971b7fa 21397
c971b7fa 21398
c971b7fa
PA
21399
21400
8690e634 21401
6ec2e0f5 21402 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
8690e634 21403
6ec2e0f5 21404 fi
8690e634 21405
6ec2e0f5 21406 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
8690e634
JK
21407
21408
21409
21410
21411
21412
8690e634
JK
21413
21414
6ec2e0f5 21415 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
8690e634 21416
a512b375 21417 fi
8690e634
JK
21418
21419
7a6dbc2f
SDJ
21420cat >>confdefs.h <<_ACEOF
21421#define GNULIB_MSVC_NOTHROW 1
21422_ACEOF
21423
21424
21425
21426
21427
8690e634 21428
6ec2e0f5
SDJ
21429 case "$host_os" in
21430 mingw* | pw*)
21431 REPLACE_OPEN=1
21432 ;;
21433 *)
21434
472fa5ee
SM
21435 :
21436
21437
21438
21439
21440
7a6dbc2f
SDJ
21441 if test "$gl_cv_macro_O_CLOEXEC" != yes; then
21442 REPLACE_OPEN=1
21443 fi
6ec2e0f5
SDJ
21444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
21445$as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
d0ac1c44 21446if ${gl_cv_func_open_slash+:} false; then :
6ec2e0f5
SDJ
21447 $as_echo_n "(cached) " >&6
21448else
21449 # Assume that if we have lstat, we can also check symlinks.
21450 if test $ac_cv_func_lstat = yes; then
21451 touch conftest.tmp
21452 ln -s conftest.tmp conftest.lnk
21453 fi
21454 if test "$cross_compiling" = yes; then :
8690e634 21455
6ec2e0f5
SDJ
21456 case "$host_os" in
21457 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
21458 gl_cv_func_open_slash="guessing no" ;;
21459 *)
21460 gl_cv_func_open_slash="guessing yes" ;;
21461 esac
8690e634 21462
6ec2e0f5
SDJ
21463else
21464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21465/* end confdefs.h. */
21466
21467#include <fcntl.h>
21468#if HAVE_UNISTD_H
21469# include <unistd.h>
21470#endif
21471int main ()
21472{
21473 int result = 0;
21474#if HAVE_LSTAT
21475 if (open ("conftest.lnk/", O_RDONLY) != -1)
21476 result |= 1;
21477#endif
21478 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
21479 result |= 2;
21480 return result;
21481}
21482_ACEOF
21483if ac_fn_c_try_run "$LINENO"; then :
21484 gl_cv_func_open_slash=yes
21485else
21486 gl_cv_func_open_slash=no
21487fi
21488rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21489 conftest.$ac_objext conftest.beam conftest.$ac_ext
21490fi
8690e634 21491
6ec2e0f5 21492 rm -f conftest.sl conftest.tmp conftest.lnk
8690e634 21493
6ec2e0f5
SDJ
21494fi
21495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
21496$as_echo "$gl_cv_func_open_slash" >&6; }
21497 case "$gl_cv_func_open_slash" in
21498 *no)
8690e634 21499
6ec2e0f5 21500$as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
8690e634 21501
6ec2e0f5
SDJ
21502 REPLACE_OPEN=1
21503 ;;
21504 esac
21505 ;;
21506 esac
8690e634 21507
6ec2e0f5 21508 if test $REPLACE_OPEN = 0; then
c971b7fa
PA
21509
21510
21511
472fa5ee
SM
21512 :
21513
21514
21515
21516
21517
6ec2e0f5
SDJ
21518 if test $ac_cv_func_fchdir = no; then
21519 HAVE_FCHDIR=0
21520 fi
c971b7fa 21521
6ec2e0f5
SDJ
21522 if test $HAVE_FCHDIR = 0; then
21523 REPLACE_OPEN=1
21524 fi
21525 fi
c971b7fa
PA
21526
21527
21528
6ec2e0f5 21529 if test $REPLACE_OPEN = 1; then
c971b7fa
PA
21530
21531
21532
21533
21534
c971b7fa
PA
21535
21536
c971b7fa 21537
6ec2e0f5 21538 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
c971b7fa 21539
c971b7fa
PA
21540
21541
6ec2e0f5
SDJ
21542 :
21543
a512b375 21544 fi
c971b7fa
PA
21545
21546
21547
21548
21549
6ec2e0f5 21550 GNULIB_OPEN=1
c971b7fa
PA
21551
21552
21553
21554
21555
6ec2e0f5 21556$as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
c971b7fa
PA
21557
21558
21559
21560
21561
c971b7fa 21562
c971b7fa 21563
472fa5ee
SM
21564 :
21565
21566
21567
21568
21569
63ce7108 21570
7a6dbc2f
SDJ
21571
21572 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC in
21573 yes+*yes+yes)
6ec2e0f5
SDJ
21574 ;;
21575 yes+*)
7a6dbc2f 21576 # Solaris 10 lacks O_CLOEXEC.
6ec2e0f5
SDJ
21577 # Solaris 9 has *at functions, but uniformly mishandles trailing
21578 # slash in all of them.
21579 REPLACE_OPENAT=1
21580 ;;
21581 *)
21582 HAVE_OPENAT=0
21583 ;;
21584 esac
63ce7108 21585
6ec2e0f5 21586 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
63ce7108 21587
63ce7108 21588
63ce7108 21589
63ce7108 21590
63ce7108
TT
21591
21592
63ce7108 21593
63ce7108 21594
6ec2e0f5 21595 gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
63ce7108
TT
21596
21597
21598
6ec2e0f5 21599 :
63ce7108 21600
6ec2e0f5 21601 fi
63ce7108
TT
21602
21603
6ec2e0f5
SDJ
21604cat >>confdefs.h <<_ACEOF
21605#define GNULIB_OPENAT 1
21606_ACEOF
63ce7108 21607
63ce7108 21608
63ce7108
TT
21609
21610
21611
21612
6ec2e0f5 21613 GNULIB_OPENAT=1
63ce7108 21614
63ce7108 21615
63ce7108 21616
63ce7108 21617
63ce7108 21618
6ec2e0f5 21619$as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
63ce7108
TT
21620
21621
63ce7108 21622
63ce7108 21623
63ce7108 21624
63ce7108 21625
6ec2e0f5
SDJ
21626 for ac_func in opendir
21627do :
21628 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
d0ac1c44 21629if test "x$ac_cv_func_opendir" = xyes; then :
6ec2e0f5
SDJ
21630 cat >>confdefs.h <<_ACEOF
21631#define HAVE_OPENDIR 1
63ce7108 21632_ACEOF
6ec2e0f5 21633
63ce7108 21634fi
6ec2e0f5 21635done
63ce7108 21636
6ec2e0f5
SDJ
21637 if test $ac_cv_func_opendir = no; then
21638 HAVE_OPENDIR=0
21639 fi
63ce7108 21640
6ec2e0f5
SDJ
21641
21642
21643
472fa5ee
SM
21644 :
21645
21646
21647
21648
21649
6ec2e0f5
SDJ
21650 if test $ac_cv_func_fchdir = no; then
21651 HAVE_FCHDIR=0
63ce7108 21652 fi
63ce7108 21653
6ec2e0f5
SDJ
21654 if test $HAVE_FCHDIR = 0; then
21655 if test $HAVE_OPENDIR = 1; then
21656 REPLACE_OPENDIR=1
21657 fi
21658 fi
21659
21660 case $host_os,$HAVE_OPENDIR in
21661 os2*,1)
21662 REPLACE_OPENDIR=1;;
21663 esac
21664
21665 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
63ce7108
TT
21666
21667
21668
21669
21670
21671
21672
21673
6ec2e0f5 21674 gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
63ce7108
TT
21675
21676 fi
21677
21678
21679
21680
21681
6ec2e0f5 21682 GNULIB_OPENDIR=1
63ce7108
TT
21683
21684
21685
21686
63ce7108 21687
6ec2e0f5 21688$as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
63ce7108
TT
21689
21690
21691
21692
21693
472fa5ee
SM
21694 :
21695
21696
21697
21698
21699
63ce7108
TT
21700
21701
2196f55f
YQ
21702
21703
8424cc97
SM
21704
21705 for ac_func in rawmemchr
21706do :
21707 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
d0ac1c44 21708if test "x$ac_cv_func_rawmemchr" = xyes; then :
8424cc97
SM
21709 cat >>confdefs.h <<_ACEOF
21710#define HAVE_RAWMEMCHR 1
21711_ACEOF
21712
21713fi
21714done
21715
21716 if test $ac_cv_func_rawmemchr = no; then
21717 HAVE_RAWMEMCHR=0
21718 fi
21719
21720 if test $HAVE_RAWMEMCHR = 0; then
21721
21722
21723
21724
21725
21726
21727
21728
21729 gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
21730
21731 :
21732 fi
21733
21734
21735
21736
21737
21738 GNULIB_RAWMEMCHR=1
21739
21740
21741
21742
21743
21744$as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
21745
21746
21747
21748
21749
21750
6ec2e0f5
SDJ
21751 for ac_func in readdir
21752do :
21753 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
d0ac1c44 21754if test "x$ac_cv_func_readdir" = xyes; then :
6ec2e0f5
SDJ
21755 cat >>confdefs.h <<_ACEOF
21756#define HAVE_READDIR 1
21757_ACEOF
21758
21759fi
21760done
21761
21762 if test $ac_cv_func_readdir = no; then
21763 HAVE_READDIR=0
21764 fi
21765
21766 if test $HAVE_READDIR = 0; then
21767
21768
21769
21770
21771
21772
21773
21774
21775 gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
21776
21777 fi
21778
21779
21780
21781
21782
21783 GNULIB_READDIR=1
21784
21785
21786
21787
21788
21789$as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
21790
21791
21792
21793
21794
21795
472fa5ee
SM
21796 :
21797
21798
21799
21800
21801
2196f55f
YQ
21802 if test $ac_cv_func_readlink = no; then
21803 HAVE_READLINK=0
21804 else
21805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
21806$as_echo_n "checking whether readlink signature is correct... " >&6; }
d0ac1c44 21807if ${gl_cv_decl_readlink_works+:} false; then :
2196f55f
YQ
21808 $as_echo_n "(cached) " >&6
21809else
21810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21811/* end confdefs.h. */
21812#include <unistd.h>
21813 /* Cause compilation failure if original declaration has wrong type. */
21814 ssize_t readlink (const char *, char *, size_t);
21815int
21816main ()
21817{
21818
21819 ;
21820 return 0;
21821}
21822_ACEOF
21823if ac_fn_c_try_compile "$LINENO"; then :
21824 gl_cv_decl_readlink_works=yes
21825else
21826 gl_cv_decl_readlink_works=no
21827fi
21828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21829fi
21830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
21831$as_echo "$gl_cv_decl_readlink_works" >&6; }
21832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
21833$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
d0ac1c44 21834if ${gl_cv_func_readlink_works+:} false; then :
2196f55f
YQ
21835 $as_echo_n "(cached) " >&6
21836else
21837 # We have readlink, so assume ln -s works.
21838 ln -s conftest.no-such conftest.link
21839 ln -s conftest.link conftest.lnk2
21840 if test "$cross_compiling" = yes; then :
21841 case "$host_os" in
7a6dbc2f
SDJ
21842 # Guess yes on Linux systems.
21843 linux-* | linux) gl_cv_func_readlink_works="guessing yes" ;;
21844 # Guess yes on glibc systems.
21845 *-gnu* | gnu*) gl_cv_func_readlink_works="guessing yes" ;;
21846 # If we don't know, assume the worst.
21847 *) gl_cv_func_readlink_works="guessing no" ;;
2196f55f
YQ
21848 esac
21849
21850else
21851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21852/* end confdefs.h. */
21853#include <unistd.h>
21854
21855int
21856main ()
21857{
21858char buf[20];
21859 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
21860 ;
21861 return 0;
21862}
21863_ACEOF
21864if ac_fn_c_try_run "$LINENO"; then :
21865 gl_cv_func_readlink_works=yes
21866else
21867 gl_cv_func_readlink_works=no
21868fi
21869rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21870 conftest.$ac_objext conftest.beam conftest.$ac_ext
21871fi
21872
21873 rm -f conftest.link conftest.lnk2
21874fi
21875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
21876$as_echo "$gl_cv_func_readlink_works" >&6; }
21877 case "$gl_cv_func_readlink_works" in
21878 *yes)
21879 if test "$gl_cv_decl_readlink_works" != yes; then
21880 REPLACE_READLINK=1
21881 fi
21882 ;;
21883 *)
21884
21885$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
21886
21887 REPLACE_READLINK=1
21888 ;;
21889 esac
21890 fi
21891
21892 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
21893
21894
21895
21896
21897
21898
21899
21900
21901 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
21902
21903
21904 :
21905
21906 fi
21907
21908
21909
21910
21911
21912 GNULIB_READLINK=1
21913
21914
21915
21916
21917
21918$as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
21919
21920
21921
21922
6a29c58e
YQ
21923
21924
6ec2e0f5
SDJ
21925 if test $gl_cv_func_malloc_posix = yes; then
21926
21927$as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
21928
21929 else
21930 REPLACE_REALLOC=1
21931 fi
21932
21933 if test $REPLACE_REALLOC = 1; then
21934
21935
21936
21937
21938
21939
21940
21941
21942 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
21943
21944 fi
21945
21946
21947
21948
21949
21950 GNULIB_REALLOC_POSIX=1
21951
21952
21953
21954
21955
21956$as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
21957
21958
21959
21960
21961
21962
6a29c58e 21963
472fa5ee
SM
21964 :
21965
21966
21967
21968
21969
6a29c58e
YQ
21970
21971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
21972$as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
d0ac1c44 21973if ${gl_cv_func_rename_slash_dst_works+:} false; then :
6a29c58e
YQ
21974 $as_echo_n "(cached) " >&6
21975else
21976 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
21977 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
d0ac1c44 21978 as_fn_error $? "cannot create temporary files" "$LINENO" 5
6a29c58e
YQ
21979 # Assume that if we have lstat, we can also check symlinks.
21980 if test $ac_cv_func_lstat = yes; then
21981 ln -s conftest.f conftest.lnk
21982 fi
21983 if test "$cross_compiling" = yes; then :
21984 case "$host_os" in
7a6dbc2f
SDJ
21985 # Guess yes on Linux systems.
21986 linux-* | linux) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
21987 # Guess yes on glibc systems.
21988 *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
21989 # Guess no on native Windows.
21990 mingw*) gl_cv_func_rename_slash_dst_works="guessing no" ;;
21991 # If we don't know, assume the worst.
21992 *) gl_cv_func_rename_slash_dst_works="guessing no" ;;
6a29c58e
YQ
21993 esac
21994
21995else
21996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21997/* end confdefs.h. */
21998
21999# include <stdio.h>
22000# include <stdlib.h>
22001
22002int
22003main ()
22004{
22005int result = 0;
22006 if (rename ("conftest.f1", "conftest.f2/") == 0)
22007 result |= 1;
22008 if (rename ("conftest.d1", "conftest.d2/") != 0)
22009 result |= 2;
22010#if HAVE_LSTAT
22011 if (rename ("conftest.f", "conftest.lnk/") == 0)
22012 result |= 4;
22013#endif
22014 return result;
22015
22016 ;
22017 return 0;
22018}
22019_ACEOF
22020if ac_fn_c_try_run "$LINENO"; then :
22021 gl_cv_func_rename_slash_dst_works=yes
22022else
22023 gl_cv_func_rename_slash_dst_works=no
22024fi
22025rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22026 conftest.$ac_objext conftest.beam conftest.$ac_ext
22027fi
22028
22029 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
22030
22031fi
22032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
22033$as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
22034 case "$gl_cv_func_rename_slash_dst_works" in
22035 *yes) ;;
22036 *)
22037 REPLACE_RENAME=1
22038
22039$as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
22040
22041 ;;
22042 esac
22043
22044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
22045$as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
d0ac1c44 22046if ${gl_cv_func_rename_slash_src_works+:} false; then :
6a29c58e
YQ
22047 $as_echo_n "(cached) " >&6
22048else
22049 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
22050 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
d0ac1c44 22051 as_fn_error $? "cannot create temporary files" "$LINENO" 5
6a29c58e
YQ
22052 # Assume that if we have lstat, we can also check symlinks.
22053 if test $ac_cv_func_lstat = yes; then
22054 ln -s conftest.f conftest.lnk
22055 fi
22056 if test "$cross_compiling" = yes; then :
22057 case "$host_os" in
7a6dbc2f
SDJ
22058 # Guess yes on Linux systems.
22059 linux-* | linux) gl_cv_func_rename_slash_src_works="guessing yes" ;;
22060 # Guess yes on glibc systems.
22061 *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
22062 # Guess yes on native Windows.
22063 mingw*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
22064 # If we don't know, assume the worst.
22065 *) gl_cv_func_rename_slash_src_works="guessing no" ;;
6a29c58e
YQ
22066 esac
22067
22068else
22069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22070/* end confdefs.h. */
22071
22072# include <stdio.h>
22073# include <stdlib.h>
22074
22075int
22076main ()
22077{
22078int result = 0;
22079 if (rename ("conftest.f1/", "conftest.d3") == 0)
22080 result |= 1;
22081 if (rename ("conftest.d1/", "conftest.d2") != 0)
22082 result |= 2;
22083#if HAVE_LSTAT
22084 if (rename ("conftest.lnk/", "conftest.f") == 0)
22085 result |= 4;
22086#endif
22087 return result;
22088
22089 ;
22090 return 0;
22091}
22092_ACEOF
22093if ac_fn_c_try_run "$LINENO"; then :
22094 gl_cv_func_rename_slash_src_works=yes
22095else
22096 gl_cv_func_rename_slash_src_works=no
22097fi
22098rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22099 conftest.$ac_objext conftest.beam conftest.$ac_ext
22100fi
22101
22102 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
22103
22104fi
22105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
22106$as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
22107 case "$gl_cv_func_rename_slash_src_works" in
22108 *yes) ;;
22109 *)
22110 REPLACE_RENAME=1
22111
22112$as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
22113
22114 ;;
22115 esac
22116
22117
472fa5ee
SM
22118 :
22119
22120
22121
22122
22123
6a29c58e
YQ
22124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
22125$as_echo_n "checking whether rename manages hard links correctly... " >&6; }
d0ac1c44 22126if ${gl_cv_func_rename_link_works+:} false; then :
6a29c58e
YQ
22127 $as_echo_n "(cached) " >&6
22128else
22129 if test $ac_cv_func_link = yes; then
7a6dbc2f
SDJ
22130 rm -rf conftest.f conftest.f1 conftest.f2
22131 if touch conftest.f conftest.f2 && ln conftest.f conftest.f1 &&
6a29c58e
YQ
22132 set x `ls -i conftest.f conftest.f1` && test "" = ""; then
22133 if test "$cross_compiling" = yes; then :
22134 case "$host_os" in
7a6dbc2f
SDJ
22135 # Guess yes on Linux systems.
22136 linux-* | linux) gl_cv_func_rename_link_works="guessing yes" ;;
22137 # Guess yes on glibc systems.
22138 *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
22139 # Guess yes on native Windows.
22140 mingw*) gl_cv_func_rename_link_works="guessing yes" ;;
22141 # If we don't know, assume the worst.
22142 *) gl_cv_func_rename_link_works="guessing no" ;;
6a29c58e
YQ
22143 esac
22144
22145else
22146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22147/* end confdefs.h. */
22148
7a6dbc2f 22149# include <errno.h>
6a29c58e
YQ
22150# include <stdio.h>
22151# include <stdlib.h>
22152# include <unistd.h>
22153
22154int
22155main ()
22156{
22157int result = 0;
22158 if (rename ("conftest.f", "conftest.f1"))
22159 result |= 1;
22160 if (unlink ("conftest.f1"))
22161 result |= 2;
7a6dbc2f
SDJ
22162
22163 /* Allow either the POSIX-required behavior, where the
22164 previous rename kept conftest.f, or the (better) NetBSD
22165 behavior, where it removed conftest.f. */
22166 if (rename ("conftest.f", "conftest.f") != 0
22167 && errno != ENOENT)
6a29c58e 22168 result |= 4;
7a6dbc2f 22169
6a29c58e
YQ
22170 if (rename ("conftest.f1", "conftest.f1") == 0)
22171 result |= 8;
7a6dbc2f
SDJ
22172 if (rename ("conftest.f2", "conftest.f2") != 0)
22173 result |= 16;
6a29c58e
YQ
22174 return result;
22175
22176 ;
22177 return 0;
22178}
22179_ACEOF
22180if ac_fn_c_try_run "$LINENO"; then :
22181 gl_cv_func_rename_link_works=yes
22182else
22183 gl_cv_func_rename_link_works=no
22184fi
22185rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22186 conftest.$ac_objext conftest.beam conftest.$ac_ext
22187fi
22188
22189 else
22190 gl_cv_func_rename_link_works="guessing no"
22191 fi
7a6dbc2f 22192 rm -rf conftest.f conftest.f1 conftest.f2
6a29c58e
YQ
22193 else
22194 gl_cv_func_rename_link_works=yes
22195 fi
22196
22197fi
22198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
22199$as_echo "$gl_cv_func_rename_link_works" >&6; }
22200 case "$gl_cv_func_rename_link_works" in
22201 *yes) ;;
22202 *)
22203 REPLACE_RENAME=1
22204
22205$as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
22206
22207 ;;
22208 esac
22209
22210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
22211$as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
d0ac1c44 22212if ${gl_cv_func_rename_dest_works+:} false; then :
6a29c58e
YQ
22213 $as_echo_n "(cached) " >&6
22214else
22215 rm -rf conftest.f conftest.d1 conftest.d2
22216 touch conftest.f && mkdir conftest.d1 conftest.d2 ||
d0ac1c44 22217 as_fn_error $? "cannot create temporary files" "$LINENO" 5
6a29c58e
YQ
22218 if test "$cross_compiling" = yes; then :
22219 case "$host_os" in
7a6dbc2f
SDJ
22220 # Guess yes on Linux systems.
22221 linux-* | linux) gl_cv_func_rename_dest_works="guessing yes" ;;
22222 # Guess yes on glibc systems.
22223 *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
22224 # Guess no on native Windows.
22225 mingw*) gl_cv_func_rename_dest_works="guessing no" ;;
22226 # If we don't know, assume the worst.
22227 *) gl_cv_func_rename_dest_works="guessing no" ;;
6a29c58e
YQ
22228 esac
22229
22230else
22231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22232/* end confdefs.h. */
22233
22234# include <stdio.h>
22235# include <stdlib.h>
22236
22237int
22238main ()
22239{
22240int result = 0;
22241 if (rename ("conftest.d1", "conftest.d2") != 0)
22242 result |= 1;
22243 if (rename ("conftest.d2", "conftest.f") == 0)
22244 result |= 2;
22245 return result;
22246
22247 ;
22248 return 0;
22249}
22250_ACEOF
22251if ac_fn_c_try_run "$LINENO"; then :
22252 gl_cv_func_rename_dest_works=yes
22253else
22254 gl_cv_func_rename_dest_works=no
22255fi
22256rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22257 conftest.$ac_objext conftest.beam conftest.$ac_ext
22258fi
22259
22260 rm -rf conftest.f conftest.d1 conftest.d2
22261
22262fi
22263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
22264$as_echo "$gl_cv_func_rename_dest_works" >&6; }
22265 case "$gl_cv_func_rename_dest_works" in
22266 *yes) ;;
22267 *)
22268 REPLACE_RENAME=1
22269
22270$as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
22271
22272 ;;
22273 esac
22274
22275 if test $REPLACE_RENAME = 1; then
22276
22277
22278
22279
22280
22281
22282
22283
22284 gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
22285
22286 fi
22287
22288
22289
22290
22291
22292 GNULIB_RENAME=1
22293
22294
22295
22296
22297
22298$as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
22299
22300
22301
22302
22303
22304
6ec2e0f5
SDJ
22305 for ac_func in rewinddir
22306do :
22307 ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
d0ac1c44 22308if test "x$ac_cv_func_rewinddir" = xyes; then :
6ec2e0f5
SDJ
22309 cat >>confdefs.h <<_ACEOF
22310#define HAVE_REWINDDIR 1
22311_ACEOF
22312
22313fi
22314done
22315
22316 if test $ac_cv_func_rewinddir = no; then
22317 HAVE_REWINDDIR=0
22318 fi
22319
22320 if test $HAVE_REWINDDIR = 0; then
22321
22322
22323
22324
22325
22326
22327
22328
22329 gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
22330
22331 fi
22332
22333
22334
22335
22336
22337 GNULIB_REWINDDIR=1
22338
22339
22340
22341
22342
22343$as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
22344
22345
22346
22347
22348
22349
472fa5ee
SM
22350 :
22351
22352
22353
22354
22355
6a29c58e
YQ
22356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
22357$as_echo_n "checking whether rmdir works... " >&6; }
d0ac1c44 22358if ${gl_cv_func_rmdir_works+:} false; then :
6a29c58e
YQ
22359 $as_echo_n "(cached) " >&6
22360else
22361 mkdir conftest.dir
22362 touch conftest.file
22363 if test "$cross_compiling" = yes; then :
22364 case "$host_os" in
7a6dbc2f
SDJ
22365 # Guess yes on Linux systems.
22366 linux-* | linux) gl_cv_func_rmdir_works="guessing yes" ;;
22367 # Guess yes on glibc systems.
22368 *-gnu* | gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
22369 # Guess no on native Windows.
22370 mingw*) gl_cv_func_rmdir_works="guessing no" ;;
22371 # If we don't know, assume the worst.
22372 *) gl_cv_func_rmdir_works="guessing no" ;;
6a29c58e
YQ
22373 esac
22374
22375else
22376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22377/* end confdefs.h. */
22378#include <stdio.h>
22379 #include <errno.h>
22380 #if HAVE_UNISTD_H
22381 # include <unistd.h>
22382 #else /* on Windows with MSVC */
22383 # include <direct.h>
22384 #endif
22385
22386int
22387main ()
22388{
22389int result = 0;
22390 if (!rmdir ("conftest.file/"))
22391 result |= 1;
22392 else if (errno != ENOTDIR)
22393 result |= 2;
22394 if (!rmdir ("conftest.dir/./"))
22395 result |= 4;
22396 return result;
22397
22398 ;
22399 return 0;
22400}
22401_ACEOF
22402if ac_fn_c_try_run "$LINENO"; then :
22403 gl_cv_func_rmdir_works=yes
22404else
22405 gl_cv_func_rmdir_works=no
22406fi
22407rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22408 conftest.$ac_objext conftest.beam conftest.$ac_ext
22409fi
22410
22411 rm -rf conftest.dir conftest.file
22412fi
22413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
22414$as_echo "$gl_cv_func_rmdir_works" >&6; }
22415 case "$gl_cv_func_rmdir_works" in
22416 *yes) ;;
22417 *)
22418 REPLACE_RMDIR=1
22419 ;;
22420 esac
22421
22422 if test $REPLACE_RMDIR = 1; then
22423
22424
22425
22426
22427
22428
22429
22430
22431 gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
22432
22433 fi
22434
22435
22436
22437
22438
22439 GNULIB_RMDIR=1
22440
22441
22442
22443
22444
22445$as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
22446
22447
22448
22449
0750520d 22450
472fa5ee
SM
22451 :
22452
22453
22454
22455
22456
22457
22458
22459
3d99e817
AK
22460 if test $ac_cv_func_setenv = no; then
22461 HAVE_SETENV=0
22462 else
22463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
22464$as_echo_n "checking whether setenv validates arguments... " >&6; }
d0ac1c44 22465if ${gl_cv_func_setenv_works+:} false; then :
3d99e817
AK
22466 $as_echo_n "(cached) " >&6
22467else
22468 if test "$cross_compiling" = yes; then :
22469 case "$host_os" in
7a6dbc2f
SDJ
22470 # Guess yes on glibc systems.
22471 *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;;
22472 # If we don't know, assume the worst.
22473 *) gl_cv_func_setenv_works="guessing no" ;;
3d99e817
AK
22474 esac
22475
22476else
22477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22478/* end confdefs.h. */
22479
22480 #include <stdlib.h>
22481 #include <errno.h>
22482 #include <string.h>
22483
22484int
22485main ()
22486{
22487
22488 int result = 0;
22489 {
22490 if (setenv ("", "", 0) != -1)
22491 result |= 1;
22492 else if (errno != EINVAL)
22493 result |= 2;
22494 }
22495 {
22496 if (setenv ("a", "=", 1) != 0)
22497 result |= 4;
22498 else if (strcmp (getenv ("a"), "=") != 0)
22499 result |= 8;
22500 }
22501 return result;
22502
22503 ;
22504 return 0;
22505}
22506_ACEOF
22507if ac_fn_c_try_run "$LINENO"; then :
22508 gl_cv_func_setenv_works=yes
22509else
22510 gl_cv_func_setenv_works=no
22511fi
22512rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22513 conftest.$ac_objext conftest.beam conftest.$ac_ext
22514fi
22515
22516fi
22517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
22518$as_echo "$gl_cv_func_setenv_works" >&6; }
22519 case "$gl_cv_func_setenv_works" in
22520 *yes) ;;
22521 *)
22522 REPLACE_SETENV=1
22523 ;;
22524 esac
22525 fi
22526
22527 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
22528
22529
22530
22531
22532
22533
22534
22535
22536 gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
22537
22538 fi
22539
22540
22541
22542
22543
22544 GNULIB_SETENV=1
22545
22546
22547
22548
22549
22550$as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
22551
22552
22553
22554
22555
0750520d
PA
22556
22557
22558
22559
22560
22561
22562
22563
22564
22565 if test $gl_cv_have_include_next = yes; then
22566 gl_cv_next_signal_h='<'signal.h'>'
22567 else
22568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
22569$as_echo_n "checking absolute name of <signal.h>... " >&6; }
d0ac1c44 22570if ${gl_cv_next_signal_h+:} false; then :
0750520d
PA
22571 $as_echo_n "(cached) " >&6
22572else
22573
22574
22575
22576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22577/* end confdefs.h. */
22578#include <signal.h>
22579_ACEOF
22580 case "$host_os" in
22581 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22582 *) gl_absname_cpp="$ac_cpp" ;;
22583 esac
22584
22585 case "$host_os" in
22586 mingw*)
22587 gl_dirsep_regex='[/\\]'
22588 ;;
22589 *)
22590 gl_dirsep_regex='\/'
22591 ;;
22592 esac
22593 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22594 gl_header_literal_regex=`echo 'signal.h' \
22595 | sed -e "$gl_make_literal_regex_sed"`
22596 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22597 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22598 s|^/[^/]|//&|
22599 p
22600 q
22601 }'
22602
22603 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22604 sed -n "$gl_absolute_header_sed"`
22605
22606 gl_header=$gl_cv_absolute_signal_h
22607 gl_cv_next_signal_h='"'$gl_header'"'
22608
22609
22610fi
22611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
22612$as_echo "$gl_cv_next_signal_h" >&6; }
22613 fi
22614 NEXT_SIGNAL_H=$gl_cv_next_signal_h
22615
22616 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22617 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22618 gl_next_as_first_directive='<'signal.h'>'
22619 else
22620 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22621 gl_next_as_first_directive=$gl_cv_next_signal_h
22622 fi
22623 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
22624
22625
22626
22627
22628
22629# AIX declares sig_atomic_t to already include volatile, and C89 compilers
22630# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
22631 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
22632#include <signal.h>
22633
22634"
d0ac1c44 22635if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
0750520d
PA
22636
22637else
22638 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
22639fi
22640
22641
22642
22643
22644
22645
22646
22647 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
22648#include <signal.h>
22649
22650"
d0ac1c44 22651if test "x$ac_cv_type_sighandler_t" = xyes; then :
0750520d
PA
22652
22653else
22654 HAVE_SIGHANDLER_T=0
22655fi
22656
22657
22658
0750520d 22659
0750520d
PA
22660
22661
22662
63ce7108
TT
22663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
22664$as_echo_n "checking for ssize_t... " >&6; }
d0ac1c44 22665if ${gt_cv_ssize_t+:} false; then :
63ce7108
TT
22666 $as_echo_n "(cached) " >&6
22667else
22668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22669/* end confdefs.h. */
22670#include <sys/types.h>
22671int
22672main ()
22673{
22674int x = sizeof (ssize_t *) + sizeof (ssize_t);
22675 return !x;
22676 ;
22677 return 0;
22678}
22679_ACEOF
22680if ac_fn_c_try_compile "$LINENO"; then :
22681 gt_cv_ssize_t=yes
22682else
22683 gt_cv_ssize_t=no
22684fi
22685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22686fi
22687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
22688$as_echo "$gt_cv_ssize_t" >&6; }
22689 if test $gt_cv_ssize_t = no; then
22690
22691$as_echo "#define ssize_t int" >>confdefs.h
22692
22693 fi
22694
22695
22696
22697
7a6dbc2f 22698
472fa5ee
SM
22699 :
22700
22701
22702
22703
22704
7a6dbc2f
SDJ
22705 case "$host_os" in
22706 mingw*)
22707 REPLACE_STAT=1
22708 ;;
22709 *)
22710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
22711$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
22712if ${gl_cv_func_stat_file_slash+:} false; then :
2196f55f
YQ
22713 $as_echo_n "(cached) " >&6
22714else
7a6dbc2f
SDJ
22715 touch conftest.tmp
22716 # Assume that if we have lstat, we can also check symlinks.
22717 if test $ac_cv_func_lstat = yes; then
22718 ln -s conftest.tmp conftest.lnk
22719 fi
22720 if test "$cross_compiling" = yes; then :
22721 case "$host_os" in
22722 # Guess yes on Linux systems.
22723 linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
22724 # Guess yes on glibc systems.
22725 *-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
22726 # If we don't know, assume the worst.
22727 *) gl_cv_func_stat_file_slash="guessing no" ;;
22728 esac
22729
2196f55f
YQ
22730else
22731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22732/* end confdefs.h. */
22733#include <sys/stat.h>
22734
22735int
22736main ()
22737{
7a6dbc2f
SDJ
22738int result = 0;
22739 struct stat st;
22740 if (!stat ("conftest.tmp/", &st))
22741 result |= 1;
22742#if HAVE_LSTAT
22743 if (!stat ("conftest.lnk/", &st))
22744 result |= 2;
22745#endif
22746 return result;
22747
2196f55f
YQ
22748 ;
22749 return 0;
22750}
22751_ACEOF
22752if ac_fn_c_try_run "$LINENO"; then :
7a6dbc2f 22753 gl_cv_func_stat_file_slash=yes
2196f55f 22754else
7a6dbc2f 22755 gl_cv_func_stat_file_slash=no
2196f55f
YQ
22756fi
22757rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22758 conftest.$ac_objext conftest.beam conftest.$ac_ext
22759fi
22760
7a6dbc2f 22761 rm -f conftest.tmp conftest.lnk
2196f55f 22762fi
7a6dbc2f
SDJ
22763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
22764$as_echo "$gl_cv_func_stat_file_slash" >&6; }
22765 case $gl_cv_func_stat_file_slash in
22766 *no)
22767 REPLACE_STAT=1
22768
22769$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
22770;;
22771 esac
22772 case $host_os in
22773 solaris*)
22774 REPLACE_FSTAT=1 ;;
22775 esac
22776 ;;
22777 esac
22778
22779 if test $REPLACE_STAT = 1; then
22780
22781
22782
22783
22784
22785
22786
22787
22788 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
22789
22790 case "$host_os" in
22791 mingw*)
22792
22793
22794
22795
22796
22797
22798
22799
22800 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
22801
22802 ;;
22803 esac
2196f55f 22804
7a6dbc2f
SDJ
22805
22806 :
22807
22808 fi
22809
22810
22811
22812
22813
22814 GNULIB_STAT=1
22815
22816
22817
22818
22819
22820$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
22821
22822
22823
22824
22825
22826
22827 :
22828
22829
22830
22831
22832
22833
22834 ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include <sys/types.h>
22835 #include <sys/stat.h>
22836"
22837if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
22838
22839cat >>confdefs.h <<_ACEOF
22840#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
22841_ACEOF
22842
22843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
22844$as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
22845if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
22846 $as_echo_n "(cached) " >&6
2196f55f
YQ
22847else
22848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22849/* end confdefs.h. */
2196f55f 22850
7a6dbc2f
SDJ
22851 #include <sys/types.h>
22852 #include <sys/stat.h>
22853 #if HAVE_SYS_TIME_H
22854 # include <sys/time.h>
22855 #endif
22856 #include <time.h>
22857 struct timespec ts;
22858 struct stat st;
22859
22860int
22861main ()
22862{
22863
22864 st.st_atim = ts;
22865
22866 ;
22867 return 0;
22868}
22869_ACEOF
22870if ac_fn_c_try_compile "$LINENO"; then :
22871 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
22872else
22873 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
22874fi
22875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22876fi
22877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
22878$as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
22879 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
22880
22881$as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
22882
22883 fi
22884else
22885 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "#include <sys/types.h>
22886 #include <sys/stat.h>
22887"
22888if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
22889
22890cat >>confdefs.h <<_ACEOF
22891#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
22892_ACEOF
22893
22894
22895else
22896 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
22897 #include <sys/stat.h>
22898"
22899if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
2196f55f 22900
7a6dbc2f
SDJ
22901cat >>confdefs.h <<_ACEOF
22902#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
2196f55f 22903_ACEOF
7a6dbc2f
SDJ
22904
22905
2196f55f 22906else
7a6dbc2f
SDJ
22907 ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.st__tim.tv_nsec" "ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" "#include <sys/types.h>
22908 #include <sys/stat.h>
22909"
22910if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
22911
22912cat >>confdefs.h <<_ACEOF
22913#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
22914_ACEOF
22915
22916
2196f55f
YQ
22917fi
22918
2196f55f 22919fi
2196f55f 22920
7a6dbc2f 22921fi
2196f55f 22922
7a6dbc2f 22923fi
2196f55f 22924
2196f55f
YQ
22925
22926
22927
22928
7a6dbc2f 22929 :
2196f55f
YQ
22930
22931
22932
22933
2196f55f 22934
7a6dbc2f
SDJ
22935 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimespec.tv_nsec" "ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" "#include <sys/types.h>
22936 #include <sys/stat.h>
22937"
22938if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
2196f55f 22939
7a6dbc2f
SDJ
22940cat >>confdefs.h <<_ACEOF
22941#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
22942_ACEOF
2196f55f
YQ
22943
22944
7a6dbc2f
SDJ
22945else
22946 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
22947 #include <sys/stat.h>
22948"
22949if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
2196f55f 22950
7a6dbc2f
SDJ
22951cat >>confdefs.h <<_ACEOF
22952#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
22953_ACEOF
2196f55f 22954
2196f55f 22955
7a6dbc2f
SDJ
22956else
22957 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtim.tv_nsec" "ac_cv_member_struct_stat_st_birthtim_tv_nsec" "#include <sys/types.h>
22958 #include <sys/stat.h>
22959"
22960if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
2196f55f 22961
7a6dbc2f
SDJ
22962cat >>confdefs.h <<_ACEOF
22963#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
22964_ACEOF
2196f55f
YQ
22965
22966
7a6dbc2f 22967fi
2196f55f 22968
7a6dbc2f 22969fi
2196f55f 22970
7a6dbc2f 22971fi
2196f55f
YQ
22972
22973
22974
22975
22976
63ce7108
TT
22977 # Define two additional variables used in the Makefile substitution.
22978
22979 if test "$ac_cv_header_stdbool_h" = yes; then
22980 STDBOOL_H=''
22981 else
22982 STDBOOL_H='stdbool.h'
22983 fi
22984
22985 if test -n "$STDBOOL_H"; then
22986 GL_GENERATE_STDBOOL_H_TRUE=
22987 GL_GENERATE_STDBOOL_H_FALSE='#'
22988else
22989 GL_GENERATE_STDBOOL_H_TRUE='#'
22990 GL_GENERATE_STDBOOL_H_FALSE=
22991fi
22992
22993
22994 if test "$ac_cv_type__Bool" = yes; then
22995 HAVE__BOOL=1
22996 else
22997 HAVE__BOOL=0
22998 fi
22999
23000
23001
23002
23003
23004 STDDEF_H=
4a626d0a
PA
23005 ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
23006
23007"
d0ac1c44 23008if test "x$ac_cv_type_max_align_t" = xyes; then :
4a626d0a
PA
23009
23010else
23011 HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
23012fi
23013
63ce7108
TT
23014 if test $gt_cv_c_wchar_t = no; then
23015 HAVE_WCHAR_T=0
23016 STDDEF_H=stddef.h
23017 fi
23018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
23019$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
d0ac1c44 23020if ${gl_cv_decl_null_works+:} false; then :
63ce7108
TT
23021 $as_echo_n "(cached) " >&6
23022else
23023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23024/* end confdefs.h. */
23025#include <stddef.h>
23026 int test[2 * (sizeof NULL == sizeof (void *)) -1];
23027
23028int
23029main ()
23030{
23031
23032 ;
23033 return 0;
23034}
23035_ACEOF
23036if ac_fn_c_try_compile "$LINENO"; then :
23037 gl_cv_decl_null_works=yes
23038else
23039 gl_cv_decl_null_works=no
23040fi
23041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23042fi
23043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
23044$as_echo "$gl_cv_decl_null_works" >&6; }
23045 if test $gl_cv_decl_null_works = no; then
23046 REPLACE_NULL=1
23047 STDDEF_H=stddef.h
23048 fi
23049
23050 if test -n "$STDDEF_H"; then
23051 GL_GENERATE_STDDEF_H_TRUE=
23052 GL_GENERATE_STDDEF_H_FALSE='#'
23053else
23054 GL_GENERATE_STDDEF_H_TRUE='#'
23055 GL_GENERATE_STDDEF_H_FALSE=
23056fi
23057
23058 if test -n "$STDDEF_H"; then
23059
23060
23061
23062
23063
23064
23065
23066
23067 if test $gl_cv_have_include_next = yes; then
23068 gl_cv_next_stddef_h='<'stddef.h'>'
23069 else
23070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
23071$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
d0ac1c44 23072if ${gl_cv_next_stddef_h+:} false; then :
63ce7108
TT
23073 $as_echo_n "(cached) " >&6
23074else
23075
4a626d0a
PA
23076
23077
23078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63ce7108
TT
23079/* end confdefs.h. */
23080#include <stddef.h>
63ce7108 23081_ACEOF
4a626d0a
PA
23082 case "$host_os" in
23083 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23084 *) gl_absname_cpp="$ac_cpp" ;;
23085 esac
63ce7108 23086
4a626d0a
PA
23087 case "$host_os" in
23088 mingw*)
23089 gl_dirsep_regex='[/\\]'
23090 ;;
23091 *)
23092 gl_dirsep_regex='\/'
23093 ;;
23094 esac
23095 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23096 gl_header_literal_regex=`echo 'stddef.h' \
23097 | sed -e "$gl_make_literal_regex_sed"`
23098 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23099 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23100 s|^/[^/]|//&|
23101 p
23102 q
23103 }'
63ce7108 23104
4a626d0a
PA
23105 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23106 sed -n "$gl_absolute_header_sed"`
23107
23108 gl_header=$gl_cv_absolute_stddef_h
23109 gl_cv_next_stddef_h='"'$gl_header'"'
63ce7108
TT
23110
23111
23112fi
23113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
23114$as_echo "$gl_cv_next_stddef_h" >&6; }
23115 fi
23116 NEXT_STDDEF_H=$gl_cv_next_stddef_h
23117
23118 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23119 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23120 gl_next_as_first_directive='<'stddef.h'>'
23121 else
23122 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23123 gl_next_as_first_directive=$gl_cv_next_stddef_h
23124 fi
23125 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
23126
23127
23128
23129
23130 fi
23131
23132
23133
23134
49e4877c 23135 $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
63ce7108
TT
23136
23137
23138
98399780
YQ
23139
23140
23141
23142
23143
4a626d0a
PA
23144
23145
6a29c58e
YQ
23146 if test $gl_cv_have_include_next = yes; then
23147 gl_cv_next_stdio_h='<'stdio.h'>'
23148 else
23149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
23150$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
d0ac1c44 23151if ${gl_cv_next_stdio_h+:} false; then :
6a29c58e
YQ
23152 $as_echo_n "(cached) " >&6
23153else
23154
4a626d0a
PA
23155
23156
23157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6a29c58e
YQ
23158/* end confdefs.h. */
23159#include <stdio.h>
6a29c58e 23160_ACEOF
4a626d0a
PA
23161 case "$host_os" in
23162 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23163 *) gl_absname_cpp="$ac_cpp" ;;
23164 esac
23165
23166 case "$host_os" in
23167 mingw*)
23168 gl_dirsep_regex='[/\\]'
23169 ;;
23170 *)
23171 gl_dirsep_regex='\/'
23172 ;;
23173 esac
23174 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23175 gl_header_literal_regex=`echo 'stdio.h' \
23176 | sed -e "$gl_make_literal_regex_sed"`
23177 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23178 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23179 s|^/[^/]|//&|
23180 p
23181 q
23182 }'
6a29c58e 23183
4a626d0a
PA
23184 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23185 sed -n "$gl_absolute_header_sed"`
6a29c58e 23186
4a626d0a
PA
23187 gl_header=$gl_cv_absolute_stdio_h
23188 gl_cv_next_stdio_h='"'$gl_header'"'
6a29c58e
YQ
23189
23190
23191fi
23192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
23193$as_echo "$gl_cv_next_stdio_h" >&6; }
23194 fi
23195 NEXT_STDIO_H=$gl_cv_next_stdio_h
23196
23197 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23198 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23199 gl_next_as_first_directive='<'stdio.h'>'
23200 else
23201 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23202 gl_next_as_first_directive=$gl_cv_next_stdio_h
23203 fi
23204 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
23205
23206
23207
23208
23209
4a626d0a
PA
23210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
23211$as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
d0ac1c44 23212if ${gl_cv_func_printf_attribute_flavor+:} false; then :
4a626d0a
PA
23213 $as_echo_n "(cached) " >&6
23214else
23215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23216/* end confdefs.h. */
23217
23218 #define __STDC_FORMAT_MACROS 1
23219 #include <stdio.h>
23220 #include <inttypes.h>
23221 /* For non-mingw systems, compilation will trivially succeed.
23222 For mingw, compilation will succeed for older mingw (system
23223 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
7a6dbc2f 23224 #if (defined _WIN32 && ! defined __CYGWIN__) && \
4a626d0a
PA
23225 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
23226 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
23227 #endif
23228
23229int
23230main ()
23231{
23232
23233 ;
23234 return 0;
23235}
23236_ACEOF
23237if ac_fn_c_try_compile "$LINENO"; then :
23238 gl_cv_func_printf_attribute_flavor=system
23239else
23240 gl_cv_func_printf_attribute_flavor=gnu
23241fi
23242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23243fi
23244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
23245$as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
23246 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
23247
23248$as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
23249
23250 fi
23251
6a29c58e
YQ
23252 GNULIB_FSCANF=1
23253
23254
23255cat >>confdefs.h <<_ACEOF
23256#define GNULIB_FSCANF 1
23257_ACEOF
23258
23259
23260 GNULIB_SCANF=1
23261
23262
23263cat >>confdefs.h <<_ACEOF
23264#define GNULIB_SCANF 1
23265_ACEOF
23266
23267
23268 GNULIB_FGETC=1
23269 GNULIB_GETC=1
23270 GNULIB_GETCHAR=1
23271 GNULIB_FGETS=1
23272 GNULIB_FREAD=1
23273
23274
23275 GNULIB_FPRINTF=1
23276 GNULIB_PRINTF=1
23277 GNULIB_VFPRINTF=1
23278 GNULIB_VPRINTF=1
23279 GNULIB_FPUTC=1
23280 GNULIB_PUTC=1
23281 GNULIB_PUTCHAR=1
23282 GNULIB_FPUTS=1
23283 GNULIB_PUTS=1
23284 GNULIB_FWRITE=1
23285
23286
23287
23288
6a29c58e 23289
6a29c58e
YQ
23290
23291
23292
23293
23294
23295
23296
23297
23298
23299
23300
23301
98399780
YQ
23302 if test $gl_cv_have_include_next = yes; then
23303 gl_cv_next_stdlib_h='<'stdlib.h'>'
23304 else
23305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
23306$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
d0ac1c44 23307if ${gl_cv_next_stdlib_h+:} false; then :
98399780
YQ
23308 $as_echo_n "(cached) " >&6
23309else
23310
4a626d0a
PA
23311
23312
23313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
98399780
YQ
23314/* end confdefs.h. */
23315#include <stdlib.h>
98399780 23316_ACEOF
4a626d0a
PA
23317 case "$host_os" in
23318 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23319 *) gl_absname_cpp="$ac_cpp" ;;
23320 esac
23321
23322 case "$host_os" in
23323 mingw*)
23324 gl_dirsep_regex='[/\\]'
23325 ;;
23326 *)
23327 gl_dirsep_regex='\/'
23328 ;;
23329 esac
23330 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23331 gl_header_literal_regex=`echo 'stdlib.h' \
23332 | sed -e "$gl_make_literal_regex_sed"`
23333 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23334 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23335 s|^/[^/]|//&|
23336 p
23337 q
23338 }'
98399780 23339
4a626d0a
PA
23340 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23341 sed -n "$gl_absolute_header_sed"`
98399780 23342
4a626d0a
PA
23343 gl_header=$gl_cv_absolute_stdlib_h
23344 gl_cv_next_stdlib_h='"'$gl_header'"'
98399780
YQ
23345
23346
23347fi
23348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
23349$as_echo "$gl_cv_next_stdlib_h" >&6; }
23350 fi
23351 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
23352
23353 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23354 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23355 gl_next_as_first_directive='<'stdlib.h'>'
23356 else
23357 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23358 gl_next_as_first_directive=$gl_cv_next_stdlib_h
23359 fi
23360 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
23361
23362
23363
23364
23365
23366
98399780 23367
98399780
YQ
23368
23369
23370
23371
23372
23373
8424cc97
SM
23374 for ac_func in strchrnul
23375do :
23376 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
d0ac1c44 23377if test "x$ac_cv_func_strchrnul" = xyes; then :
8424cc97
SM
23378 cat >>confdefs.h <<_ACEOF
23379#define HAVE_STRCHRNUL 1
23380_ACEOF
23381
23382fi
23383done
23384
23385 if test $ac_cv_func_strchrnul = no; then
23386 HAVE_STRCHRNUL=0
23387 else
23388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
23389$as_echo_n "checking whether strchrnul works... " >&6; }
d0ac1c44 23390if ${gl_cv_func_strchrnul_works+:} false; then :
8424cc97
SM
23391 $as_echo_n "(cached) " >&6
23392else
23393 if test "$cross_compiling" = yes; then :
23394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23395/* end confdefs.h. */
23396
23397#if defined __CYGWIN__
23398 #include <cygwin/version.h>
23399 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
23400 Lucky user
23401 #endif
23402#else
23403 Lucky user
23404#endif
23405
23406_ACEOF
23407if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23408 $EGREP "Lucky user" >/dev/null 2>&1; then :
23409 gl_cv_func_strchrnul_works="guessing yes"
23410else
23411 gl_cv_func_strchrnul_works="guessing no"
23412fi
23413rm -f conftest*
23414
23415
23416else
23417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23418/* end confdefs.h. */
23419
23420#include <string.h> /* for strchrnul */
23421
23422int
23423main ()
23424{
23425const char *buf = "a";
23426 return strchrnul (buf, 'b') != buf + 1;
23427
23428 ;
23429 return 0;
23430}
23431_ACEOF
23432if ac_fn_c_try_run "$LINENO"; then :
23433 gl_cv_func_strchrnul_works=yes
23434else
23435 gl_cv_func_strchrnul_works=no
23436fi
23437rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23438 conftest.$ac_objext conftest.beam conftest.$ac_ext
23439fi
23440
23441
23442fi
23443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
23444$as_echo "$gl_cv_func_strchrnul_works" >&6; }
23445 case "$gl_cv_func_strchrnul_works" in
23446 *yes) ;;
23447 *) REPLACE_STRCHRNUL=1 ;;
23448 esac
23449 fi
23450
23451 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
23452
23453
23454
23455
23456
23457
23458
23459
23460 gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
23461
23462 :
23463 fi
23464
23465
23466
23467
23468
23469 GNULIB_STRCHRNUL=1
23470
23471
23472
23473
23474
23475$as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
23476
23477
23478
23479
23480
23481
23482
472fa5ee
SM
23483 :
23484
23485
23486
23487
23488
6ec2e0f5
SDJ
23489 if test $ac_cv_func_strdup = yes; then
23490 if test $gl_cv_func_malloc_posix != yes; then
23491 REPLACE_STRDUP=1
23492 fi
23493 fi
23494
472fa5ee
SM
23495 :
23496
23497
23498
23499
23500
6ec2e0f5
SDJ
23501 if test $ac_cv_have_decl_strdup = no; then
23502 HAVE_DECL_STRDUP=0
23503 fi
23504
23505 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
23506
23507
23508
23509
23510
23511
23512
23513
23514 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
23515
23516 :
23517 fi
23518
23519
23520
23521
23522
23523 GNULIB_STRDUP=1
23524
23525
23526
23527
23528
23529$as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
23530
23531
23532
23533
23534
23535
23536
23537
23538 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
23539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
23540$as_echo_n "checking for working strerror function... " >&6; }
d0ac1c44 23541if ${gl_cv_func_working_strerror+:} false; then :
6ec2e0f5
SDJ
23542 $as_echo_n "(cached) " >&6
23543else
23544 if test "$cross_compiling" = yes; then :
23545 case "$host_os" in
7a6dbc2f
SDJ
23546 # Guess yes on glibc systems.
23547 *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
23548 # If we don't know, assume the worst.
23549 *) gl_cv_func_working_strerror="guessing no" ;;
6ec2e0f5
SDJ
23550 esac
23551
23552else
23553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23554/* end confdefs.h. */
23555#include <string.h>
23556
23557int
23558main ()
23559{
23560if (!*strerror (-2)) return 1;
23561 ;
23562 return 0;
23563}
23564_ACEOF
23565if ac_fn_c_try_run "$LINENO"; then :
23566 gl_cv_func_working_strerror=yes
23567else
23568 gl_cv_func_working_strerror=no
23569fi
23570rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23571 conftest.$ac_objext conftest.beam conftest.$ac_ext
23572fi
23573
23574
23575fi
23576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
23577$as_echo "$gl_cv_func_working_strerror" >&6; }
23578 case "$gl_cv_func_working_strerror" in
23579 *yes) ;;
23580 *)
23581 REPLACE_STRERROR=1
23582 ;;
23583 esac
23584
23585 else
23586 REPLACE_STRERROR=1
23587 fi
23588
23589 if test $REPLACE_STRERROR = 1; then
23590
23591
23592
23593
23594
23595
23596
23597
23598 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
23599
23600 fi
23601
23602
23603cat >>confdefs.h <<_ACEOF
23604#define GNULIB_STRERROR 1
23605_ACEOF
23606
23607
23608
23609
23610
23611
23612
23613 GNULIB_STRERROR=1
23614
23615
23616
23617
23618
23619$as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
23620
23621
23622
23623
23624
23625 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
23626
23627
23628
23629
23630
23631
23632
23633
23634 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
23635
23636
23637
23638
23639
472fa5ee
SM
23640 :
23641
23642
23643
23644
23645
6ec2e0f5
SDJ
23646 if test $ac_cv_header_sys_socket_h != yes; then
23647 for ac_header in winsock2.h
23648do :
23649 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
d0ac1c44 23650if test "x$ac_cv_header_winsock2_h" = xyes; then :
6ec2e0f5
SDJ
23651 cat >>confdefs.h <<_ACEOF
23652#define HAVE_WINSOCK2_H 1
23653_ACEOF
23654
23655fi
23656
23657done
23658
23659 fi
23660 if test "$ac_cv_header_winsock2_h" = yes; then
23661 HAVE_WINSOCK2_H=1
23662 UNISTD_H_HAVE_WINSOCK2_H=1
23663 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
23664 else
23665 HAVE_WINSOCK2_H=0
23666 fi
23667
23668
23669 fi
23670
23671
23672
23673
98399780 23674
63ce7108
TT
23675 if test $REPLACE_STRSTR = 0; then
23676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
23677$as_echo_n "checking whether strstr works in linear time... " >&6; }
d0ac1c44 23678if ${gl_cv_func_strstr_linear+:} false; then :
63ce7108
TT
23679 $as_echo_n "(cached) " >&6
23680else
23681 if test "$cross_compiling" = yes; then :
23682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23683/* end confdefs.h. */
23684
23685#include <features.h>
23686#ifdef __GNU_LIBRARY__
23687 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
23688 && !(defined __i386__ || defined __x86_64__) \
23689 && !defined __UCLIBC__
23690 Lucky user
23691 #endif
23692#endif
23693#ifdef __CYGWIN__
23694 #include <cygwin/version.h>
23695 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
23696 Lucky user
23697 #endif
23698#endif
23699
23700_ACEOF
23701if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23702 $EGREP "Lucky user" >/dev/null 2>&1; then :
23703 gl_cv_func_strstr_linear="guessing yes"
c971b7fa 23704else
63ce7108 23705 gl_cv_func_strstr_linear="guessing no"
c971b7fa
PA
23706fi
23707rm -f conftest*
23708
23709
23710else
23711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23712/* end confdefs.h. */
23713
49e4877c
PA
23714#ifdef __MVS__
23715/* z/OS does not deliver signals while strstr() is running (thanks to
23716 restrictions on its LE runtime), which prevents us from limiting the
23717 running time of this test. */
23718# error "This test does not work properly on z/OS"
23719#endif
c971b7fa 23720#include <signal.h> /* for signal */
63ce7108 23721#include <string.h> /* for strstr */
c971b7fa
PA
23722#include <stdlib.h> /* for malloc */
23723#include <unistd.h> /* for alarm */
49e4877c 23724static void quit (int sig) { _exit (sig + 128); }
c971b7fa
PA
23725
23726int
23727main ()
23728{
23729
23730 int result = 0;
23731 size_t m = 1000000;
63ce7108
TT
23732 char *haystack = (char *) malloc (2 * m + 2);
23733 char *needle = (char *) malloc (m + 2);
c971b7fa 23734 /* Failure to compile this test due to missing alarm is okay,
63ce7108 23735 since all such platforms (mingw) also have quadratic strstr. */
c971b7fa
PA
23736 signal (SIGALRM, quit);
23737 alarm (5);
23738 /* Check for quadratic performance. */
23739 if (haystack && needle)
23740 {
23741 memset (haystack, 'A', 2 * m);
23742 haystack[2 * m] = 'B';
63ce7108 23743 haystack[2 * m + 1] = 0;
c971b7fa
PA
23744 memset (needle, 'A', m);
23745 needle[m] = 'B';
63ce7108
TT
23746 needle[m + 1] = 0;
23747 if (!strstr (haystack, needle))
c971b7fa
PA
23748 result |= 1;
23749 }
7a6dbc2f
SDJ
23750 /* Free allocated memory, in case some sanitizer is watching. */
23751 free (haystack);
23752 free (needle);
c971b7fa
PA
23753 return result;
23754
23755 ;
23756 return 0;
23757}
23758_ACEOF
23759if ac_fn_c_try_run "$LINENO"; then :
63ce7108 23760 gl_cv_func_strstr_linear=yes
c971b7fa 23761else
63ce7108 23762 gl_cv_func_strstr_linear=no
c971b7fa
PA
23763fi
23764rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23765 conftest.$ac_objext conftest.beam conftest.$ac_ext
23766fi
23767
23768
23769fi
63ce7108
TT
23770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
23771$as_echo "$gl_cv_func_strstr_linear" >&6; }
23772 case "$gl_cv_func_strstr_linear" in
40a73391
JK
23773 *yes) ;;
23774 *)
63ce7108 23775 REPLACE_STRSTR=1
40a73391
JK
23776 ;;
23777 esac
c971b7fa
PA
23778 fi
23779
63ce7108 23780 if test $REPLACE_STRSTR = 1; then
c971b7fa
PA
23781
23782
23783
23784
23785
23786
23787
23788
63ce7108 23789 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
c971b7fa 23790
a512b375 23791 fi
c971b7fa
PA
23792
23793
23794
7a6dbc2f 23795 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
63ce7108 23796 REPLACE_STRSTR=1
c971b7fa 23797 else
63ce7108
TT
23798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
23799$as_echo_n "checking whether strstr works... " >&6; }
d0ac1c44 23800if ${gl_cv_func_strstr_works_always+:} false; then :
c971b7fa
PA
23801 $as_echo_n "(cached) " >&6
23802else
23803 if test "$cross_compiling" = yes; then :
63ce7108 23804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
23805/* end confdefs.h. */
23806
23807#ifdef __GNU_LIBRARY__
23808 #include <features.h>
63ce7108 23809 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
c971b7fa
PA
23810 || defined __UCLIBC__
23811 Lucky user
23812 #endif
23813#elif defined __CYGWIN__
23814 #include <cygwin/version.h>
23815 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
23816 Lucky user
23817 #endif
23818#else
23819 Lucky user
23820#endif
23821
23822_ACEOF
23823if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23824 $EGREP "Lucky user" >/dev/null 2>&1; then :
63ce7108 23825 gl_cv_func_strstr_works_always="guessing yes"
c971b7fa 23826else
63ce7108 23827 gl_cv_func_strstr_works_always="guessing no"
c971b7fa
PA
23828fi
23829rm -f conftest*
23830
23831
23832else
23833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23834/* end confdefs.h. */
23835
63ce7108 23836#include <string.h> /* for strstr */
c971b7fa
PA
23837#define P "_EF_BF_BD"
23838#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
23839#define NEEDLE P P P P P
23840
23841int
23842main ()
23843{
63ce7108 23844return !!strstr (HAYSTACK, NEEDLE);
c971b7fa
PA
23845
23846 ;
23847 return 0;
23848}
23849_ACEOF
23850if ac_fn_c_try_run "$LINENO"; then :
63ce7108 23851 gl_cv_func_strstr_works_always=yes
c971b7fa 23852else
63ce7108 23853 gl_cv_func_strstr_works_always=no
c971b7fa
PA
23854fi
23855rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23856 conftest.$ac_objext conftest.beam conftest.$ac_ext
23857fi
23858
23859
23860fi
63ce7108
TT
23861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
23862$as_echo "$gl_cv_func_strstr_works_always" >&6; }
23863 case "$gl_cv_func_strstr_works_always" in
40a73391
JK
23864 *yes) ;;
23865 *)
63ce7108 23866 REPLACE_STRSTR=1
40a73391
JK
23867 ;;
23868 esac
c971b7fa 23869 fi
8839a007 23870
63ce7108 23871 if test $REPLACE_STRSTR = 1; then
8839a007 23872
8690e634
JK
23873
23874
8690e634
JK
23875
23876
23877
23878
23879
63ce7108 23880 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
8690e634 23881
8690e634
JK
23882 fi
23883
8690e634
JK
23884
23885
8690e634 23886
8690e634 23887
63ce7108 23888 GNULIB_STRSTR=1
8690e634
JK
23889
23890
23891
8690e634
JK
23892
23893
63ce7108 23894$as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
8690e634
JK
23895
23896
23897
23898
23899
23900
23901
421693b0
PA
23902 for ac_func in strtok_r
23903do :
23904 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
d0ac1c44 23905if test "x$ac_cv_func_strtok_r" = xyes; then :
421693b0
PA
23906 cat >>confdefs.h <<_ACEOF
23907#define HAVE_STRTOK_R 1
23908_ACEOF
23909
23910fi
23911done
23912
23913 if test $ac_cv_func_strtok_r = yes; then
23914 HAVE_STRTOK_R=1
23915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5
23916$as_echo_n "checking whether strtok_r works... " >&6; }
d0ac1c44 23917if ${gl_cv_func_strtok_r_works+:} false; then :
421693b0
PA
23918 $as_echo_n "(cached) " >&6
23919else
23920 if test "$cross_compiling" = yes; then :
7a6dbc2f
SDJ
23921 case "$host_os" in
23922 # Guess no on glibc systems.
23923 *-gnu* | gnu*) gl_cv_func_strtok_r_works="guessing no" ;;
23924 # Guess yes on native Windows.
23925 mingw*) gl_cv_func_strtok_r_works="guessing yes" ;;
23926 *) gl_cv_func_strtok_r_works="guessing yes" ;;
421693b0
PA
23927 esac
23928
23929else
23930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23931/* end confdefs.h. */
23932
23933 #ifndef __OPTIMIZE__
23934 # define __OPTIMIZE__ 1
23935 #endif
23936 #undef __OPTIMIZE_SIZE__
23937 #undef __NO_INLINE__
23938 #include <stdlib.h>
23939 #include <string.h>
23940
23941int
23942main ()
23943{
23944static const char dummy[] = "\177\01a";
23945 char delimiters[] = "xxxxxxxx";
23946 char *save_ptr = (char *) dummy;
23947 strtok_r (delimiters, "x", &save_ptr);
23948 strtok_r (NULL, "x", &save_ptr);
23949 return 0;
23950
23951 ;
23952 return 0;
23953}
23954
23955_ACEOF
23956if ac_fn_c_try_run "$LINENO"; then :
23957 gl_cv_func_strtok_r_works=yes
23958else
23959 gl_cv_func_strtok_r_works=no
23960fi
23961rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23962 conftest.$ac_objext conftest.beam conftest.$ac_ext
23963fi
23964
23965
23966fi
23967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5
23968$as_echo "$gl_cv_func_strtok_r_works" >&6; }
23969 case "$gl_cv_func_strtok_r_works" in
23970 *no)
23971 UNDEFINE_STRTOK_R=1
23972 ;;
23973 esac
23974 else
23975 HAVE_STRTOK_R=0
23976 fi
23977
472fa5ee
SM
23978 :
23979
23980
23981
23982
23983
421693b0
PA
23984 if test $ac_cv_have_decl_strtok_r = no; then
23985 HAVE_DECL_STRTOK_R=0
23986 fi
23987
23988 if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
23989
23990
23991
23992
23993
23994
23995
23996
23997 gl_LIBOBJS="$gl_LIBOBJS strtok_r.$ac_objext"
23998
23999
24000 :
24001
24002 fi
24003
24004
24005
24006
24007
24008 GNULIB_STRTOK_R=1
24009
24010
24011
24012
24013
24014$as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h
24015
24016
24017
24018
24019
24020
24021
8690e634
JK
24022
24023
24024
24025
24026
8690e634 24027
09607c9e 24028
472fa5ee
SM
24029 :
24030
24031
24032
24033
24034
09607c9e
TT
24035
24036
24037
24038 if test $gl_cv_have_include_next = yes; then
24039 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
24040 else
24041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
24042$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
d0ac1c44 24043if ${gl_cv_next_sys_stat_h+:} false; then :
09607c9e
TT
24044 $as_echo_n "(cached) " >&6
24045else
24046
24047 if test $ac_cv_header_sys_stat_h = yes; then
24048
24049
4a626d0a
PA
24050
24051
24052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
09607c9e
TT
24053/* end confdefs.h. */
24054#include <sys/stat.h>
09607c9e 24055_ACEOF
4a626d0a
PA
24056 case "$host_os" in
24057 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24058 *) gl_absname_cpp="$ac_cpp" ;;
24059 esac
24060
24061 case "$host_os" in
24062 mingw*)
24063 gl_dirsep_regex='[/\\]'
24064 ;;
24065 *)
24066 gl_dirsep_regex='\/'
24067 ;;
24068 esac
24069 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24070 gl_header_literal_regex=`echo 'sys/stat.h' \
24071 | sed -e "$gl_make_literal_regex_sed"`
24072 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24073 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24074 s|^/[^/]|//&|
24075 p
24076 q
24077 }'
24078
24079 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24080 sed -n "$gl_absolute_header_sed"`
24081
24082 gl_header=$gl_cv_absolute_sys_stat_h
24083 gl_cv_next_sys_stat_h='"'$gl_header'"'
09607c9e
TT
24084 else
24085 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
24086 fi
24087
24088
24089fi
24090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
24091$as_echo "$gl_cv_next_sys_stat_h" >&6; }
24092 fi
24093 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
24094
24095 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24096 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24097 gl_next_as_first_directive='<'sys/stat.h'>'
24098 else
24099 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24100 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
24101 fi
24102 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
24103
24104
24105
24106
24107
24108
24109
24110
7a6dbc2f
SDJ
24111 WINDOWS_STAT_TIMESPEC=0
24112
24113
2196f55f 24114
09607c9e
TT
24115
24116
09607c9e 24117
09607c9e 24118
09607c9e
TT
24119
24120 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
24121 #include <sys/stat.h>
24122"
d0ac1c44 24123if test "x$ac_cv_type_nlink_t" = xyes; then :
09607c9e
TT
24124
24125else
24126
24127$as_echo "#define nlink_t int" >>confdefs.h
24128
24129fi
24130
24131
24132
09607c9e 24133
09607c9e
TT
24134
24135
24136
24137
24138
24139
24140
24141
24142
24143
24144
2d8adcbd
MM
24145 :
24146
24147
24148
24149
09607c9e
TT
24150
24151
24152
8839a007
PA
24153
24154
24155
24156
09607c9e
TT
24157
24158
8839a007 24159
472fa5ee
SM
24160 :
24161
24162
24163
24164
24165
8839a007
PA
24166
24167
24168
24169 if test $gl_cv_have_include_next = yes; then
24170 gl_cv_next_unistd_h='<'unistd.h'>'
24171 else
24172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
24173$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
d0ac1c44 24174if ${gl_cv_next_unistd_h+:} false; then :
8839a007
PA
24175 $as_echo_n "(cached) " >&6
24176else
24177
24178 if test $ac_cv_header_unistd_h = yes; then
24179
24180
4a626d0a
PA
24181
24182
24183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8839a007
PA
24184/* end confdefs.h. */
24185#include <unistd.h>
8839a007 24186_ACEOF
4a626d0a
PA
24187 case "$host_os" in
24188 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24189 *) gl_absname_cpp="$ac_cpp" ;;
24190 esac
24191
24192 case "$host_os" in
24193 mingw*)
24194 gl_dirsep_regex='[/\\]'
24195 ;;
24196 *)
24197 gl_dirsep_regex='\/'
24198 ;;
24199 esac
24200 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24201 gl_header_literal_regex=`echo 'unistd.h' \
24202 | sed -e "$gl_make_literal_regex_sed"`
24203 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24204 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24205 s|^/[^/]|//&|
24206 p
24207 q
24208 }'
24209
24210 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24211 sed -n "$gl_absolute_header_sed"`
24212
24213 gl_header=$gl_cv_absolute_unistd_h
24214 gl_cv_next_unistd_h='"'$gl_header'"'
8839a007
PA
24215 else
24216 gl_cv_next_unistd_h='<'unistd.h'>'
24217 fi
24218
24219
24220fi
24221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
24222$as_echo "$gl_cv_next_unistd_h" >&6; }
24223 fi
24224 NEXT_UNISTD_H=$gl_cv_next_unistd_h
24225
24226 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24227 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24228 gl_next_as_first_directive='<'unistd.h'>'
24229 else
24230 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24231 gl_next_as_first_directive=$gl_cv_next_unistd_h
24232 fi
24233 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
24234
24235
24236
24237
24238 if test $ac_cv_header_unistd_h = yes; then
24239 HAVE_UNISTD_H=1
24240 else
24241 HAVE_UNISTD_H=0
24242 fi
24243
24244
24245
24246
24247
24248
24249
8839a007 24250
8839a007
PA
24251
24252
24253
24254
472fa5ee
SM
24255 :
24256
24257
24258
24259
24260
24261
24262
24263
24264
24265 :
24266
8839a007 24267
6ec2e0f5
SDJ
24268
24269
24270
3d99e817
AK
24271 if test $ac_cv_have_decl_unsetenv = no; then
24272 HAVE_DECL_UNSETENV=0
24273 fi
24274 for ac_func in unsetenv
24275do :
24276 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
d0ac1c44 24277if test "x$ac_cv_func_unsetenv" = xyes; then :
3d99e817
AK
24278 cat >>confdefs.h <<_ACEOF
24279#define HAVE_UNSETENV 1
24280_ACEOF
24281
24282fi
24283done
24284
24285 if test $ac_cv_func_unsetenv = no; then
24286 HAVE_UNSETENV=0
24287 else
24288 HAVE_UNSETENV=1
24289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
24290$as_echo_n "checking for unsetenv() return type... " >&6; }
d0ac1c44 24291if ${gt_cv_func_unsetenv_ret+:} false; then :
3d99e817
AK
24292 $as_echo_n "(cached) " >&6
24293else
24294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24295/* end confdefs.h. */
24296
24297#undef _BSD
24298#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
24299#include <stdlib.h>
24300extern
24301#ifdef __cplusplus
24302"C"
24303#endif
24304int unsetenv (const char *name);
24305
24306int
24307main ()
24308{
24309
24310 ;
24311 return 0;
24312}
24313_ACEOF
24314if ac_fn_c_try_compile "$LINENO"; then :
24315 gt_cv_func_unsetenv_ret='int'
24316else
24317 gt_cv_func_unsetenv_ret='void'
24318fi
24319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24320fi
24321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
24322$as_echo "$gt_cv_func_unsetenv_ret" >&6; }
24323 if test $gt_cv_func_unsetenv_ret = 'void'; then
24324
24325$as_echo "#define VOID_UNSETENV 1" >>confdefs.h
24326
24327 REPLACE_UNSETENV=1
24328 fi
24329
24330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
24331$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
d0ac1c44 24332if ${gl_cv_func_unsetenv_works+:} false; then :
3d99e817
AK
24333 $as_echo_n "(cached) " >&6
24334else
24335 if test "$cross_compiling" = yes; then :
24336 case "$host_os" in
24337 # Guess yes on glibc systems.
24338 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
24339 # If we don't know, assume the worst.
24340 *) gl_cv_func_unsetenv_works="guessing no" ;;
24341 esac
24342
24343else
24344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24345/* end confdefs.h. */
24346
24347 #include <stdlib.h>
24348 #include <errno.h>
24349 extern char **environ;
24350
24351int
24352main ()
24353{
24354
24355 char entry1[] = "a=1";
24356 char entry2[] = "b=2";
24357 char *env[] = { entry1, entry2, NULL };
24358 if (putenv ((char *) "a=1")) return 1;
24359 if (putenv (entry2)) return 2;
24360 entry2[0] = 'a';
24361 unsetenv ("a");
24362 if (getenv ("a")) return 3;
24363 if (!unsetenv ("") || errno != EINVAL) return 4;
24364 entry2[0] = 'b';
24365 environ = env;
24366 if (!getenv ("a")) return 5;
24367 entry2[0] = 'a';
24368 unsetenv ("a");
24369 if (getenv ("a")) return 6;
24370
24371 ;
24372 return 0;
24373}
24374_ACEOF
24375if ac_fn_c_try_run "$LINENO"; then :
24376 gl_cv_func_unsetenv_works=yes
24377else
24378 gl_cv_func_unsetenv_works=no
24379fi
24380rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24381 conftest.$ac_objext conftest.beam conftest.$ac_ext
24382fi
24383
24384fi
24385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
24386$as_echo "$gl_cv_func_unsetenv_works" >&6; }
24387 case "$gl_cv_func_unsetenv_works" in
24388 *yes) ;;
24389 *)
24390 REPLACE_UNSETENV=1
24391 ;;
24392 esac
24393 fi
24394
24395 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
24396
24397
24398
24399
24400
24401
24402
24403
24404 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
24405
24406
24407
24408
472fa5ee
SM
24409 :
24410
24411
24412
24413
24414
3d99e817
AK
24415
24416 fi
24417
24418
24419
24420
24421
24422 GNULIB_UNSETENV=1
24423
24424
24425
24426
24427
24428$as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
24429
24430
24431
24432
24433
24434
8839a007
PA
24435
24436
24437
24438
24439
24440
472fa5ee
SM
24441 :
24442
24443
24444
24445
24446
8839a007 24447
8690e634
JK
24448
24449
24450 if test $gl_cv_have_include_next = yes; then
24451 gl_cv_next_wchar_h='<'wchar.h'>'
24452 else
24453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
24454$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
d0ac1c44 24455if ${gl_cv_next_wchar_h+:} false; then :
8690e634
JK
24456 $as_echo_n "(cached) " >&6
24457else
24458
24459 if test $ac_cv_header_wchar_h = yes; then
24460
24461
4a626d0a
PA
24462
24463
24464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
24465/* end confdefs.h. */
24466#include <wchar.h>
8690e634 24467_ACEOF
4a626d0a
PA
24468 case "$host_os" in
24469 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24470 *) gl_absname_cpp="$ac_cpp" ;;
24471 esac
24472
24473 case "$host_os" in
24474 mingw*)
24475 gl_dirsep_regex='[/\\]'
24476 ;;
24477 *)
24478 gl_dirsep_regex='\/'
24479 ;;
24480 esac
24481 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24482 gl_header_literal_regex=`echo 'wchar.h' \
24483 | sed -e "$gl_make_literal_regex_sed"`
24484 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24485 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24486 s|^/[^/]|//&|
24487 p
24488 q
24489 }'
24490
24491 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24492 sed -n "$gl_absolute_header_sed"`
24493
24494 gl_header=$gl_cv_absolute_wchar_h
24495 gl_cv_next_wchar_h='"'$gl_header'"'
8690e634
JK
24496 else
24497 gl_cv_next_wchar_h='<'wchar.h'>'
24498 fi
24499
24500
24501fi
24502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
24503$as_echo "$gl_cv_next_wchar_h" >&6; }
24504 fi
24505 NEXT_WCHAR_H=$gl_cv_next_wchar_h
24506
24507 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24508 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24509 gl_next_as_first_directive='<'wchar.h'>'
24510 else
24511 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24512 gl_next_as_first_directive=$gl_cv_next_wchar_h
24513 fi
24514 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
24515
24516
24517
24518
24519 if test $ac_cv_header_wchar_h = yes; then
24520 HAVE_WCHAR_H=1
24521 else
24522 HAVE_WCHAR_H=0
24523 fi
24524
c971b7fa
PA
24525
24526
24527
24528
8690e634
JK
24529 if test $gt_cv_c_wint_t = yes; then
24530 HAVE_WINT_T=1
24531 else
24532 HAVE_WINT_T=0
24533 fi
c971b7fa
PA
24534
24535
24536
8690e634 24537
c971b7fa 24538
c971b7fa 24539
8690e634
JK
24540
24541
24542
24543
24544
24545
24546
472fa5ee
SM
24547 :
24548
24549
24550
24551
24552
8690e634
JK
24553 if test $ac_cv_func_iswcntrl = yes; then
24554 HAVE_ISWCNTRL=1
24555 else
24556 HAVE_ISWCNTRL=0
24557 fi
24558
24559
24560
8690e634
JK
24561 if test $gt_cv_c_wint_t = yes; then
24562 HAVE_WINT_T=1
24563 else
24564 HAVE_WINT_T=0
24565 fi
24566
24567
24568
24569
24570
24571
c971b7fa 24572
8690e634 24573
7a6dbc2f
SDJ
24574
24575
472fa5ee
SM
24576 :
24577
24578
24579
24580
24581
c971b7fa
PA
24582
24583
24584
24585 if test $gl_cv_have_include_next = yes; then
8690e634 24586 gl_cv_next_wctype_h='<'wctype.h'>'
c971b7fa 24587 else
8690e634
JK
24588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
24589$as_echo_n "checking absolute name of <wctype.h>... " >&6; }
d0ac1c44 24590if ${gl_cv_next_wctype_h+:} false; then :
c971b7fa
PA
24591 $as_echo_n "(cached) " >&6
24592else
24593
8690e634
JK
24594 if test $ac_cv_header_wctype_h = yes; then
24595
24596
4a626d0a
PA
24597
24598
24599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 24600/* end confdefs.h. */
8690e634 24601#include <wctype.h>
c971b7fa 24602_ACEOF
4a626d0a
PA
24603 case "$host_os" in
24604 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24605 *) gl_absname_cpp="$ac_cpp" ;;
24606 esac
24607
24608 case "$host_os" in
24609 mingw*)
24610 gl_dirsep_regex='[/\\]'
24611 ;;
24612 *)
24613 gl_dirsep_regex='\/'
24614 ;;
24615 esac
24616 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24617 gl_header_literal_regex=`echo 'wctype.h' \
24618 | sed -e "$gl_make_literal_regex_sed"`
24619 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24620 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24621 s|^/[^/]|//&|
24622 p
24623 q
24624 }'
24625
24626 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24627 sed -n "$gl_absolute_header_sed"`
24628
24629 gl_header=$gl_cv_absolute_wctype_h
24630 gl_cv_next_wctype_h='"'$gl_header'"'
8690e634
JK
24631 else
24632 gl_cv_next_wctype_h='<'wctype.h'>'
24633 fi
c971b7fa
PA
24634
24635
24636fi
8690e634
JK
24637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
24638$as_echo "$gl_cv_next_wctype_h" >&6; }
c971b7fa 24639 fi
8690e634 24640 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
c971b7fa
PA
24641
24642 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24643 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8690e634 24644 gl_next_as_first_directive='<'wctype.h'>'
c971b7fa
PA
24645 else
24646 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8690e634 24647 gl_next_as_first_directive=$gl_cv_next_wctype_h
c971b7fa 24648 fi
8690e634
JK
24649 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
24650
24651
24652
24653
24654 if test $ac_cv_header_wctype_h = yes; then
24655 if test $ac_cv_func_iswcntrl = yes; then
24656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
24657$as_echo_n "checking whether iswcntrl works... " >&6; }
d0ac1c44 24658if ${gl_cv_func_iswcntrl_works+:} false; then :
8690e634
JK
24659 $as_echo_n "(cached) " >&6
24660else
24661
24662 if test "$cross_compiling" = yes; then :
7a6dbc2f 24663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
24664/* end confdefs.h. */
24665#include <stdlib.h>
24666 #if __GNU_LIBRARY__ == 1
24667 Linux libc5 i18n is broken.
24668 #endif
24669int
24670main ()
24671{
24672
24673 ;
24674 return 0;
24675}
24676_ACEOF
24677if ac_fn_c_try_compile "$LINENO"; then :
24678 gl_cv_func_iswcntrl_works="guessing yes"
24679else
24680 gl_cv_func_iswcntrl_works="guessing no"
24681fi
24682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24683
24684else
24685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24686/* end confdefs.h. */
24687
24688 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
24689 included before <wchar.h>.
24690 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
24691 must be included before <wchar.h>. */
24692 #include <stddef.h>
24693 #include <stdio.h>
24694 #include <time.h>
24695 #include <wchar.h>
24696 #include <wctype.h>
24697 int main () { return iswprint ('x') == 0; }
24698
24699_ACEOF
24700if ac_fn_c_try_run "$LINENO"; then :
24701 gl_cv_func_iswcntrl_works=yes
24702else
24703 gl_cv_func_iswcntrl_works=no
24704fi
24705rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24706 conftest.$ac_objext conftest.beam conftest.$ac_ext
24707fi
24708
24709
24710fi
24711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
24712$as_echo "$gl_cv_func_iswcntrl_works" >&6; }
24713 fi
24714 HAVE_WCTYPE_H=1
24715 else
24716 HAVE_WCTYPE_H=0
24717 fi
24718
24719
24720 case "$gl_cv_func_iswcntrl_works" in
24721 *yes) REPLACE_ISWCNTRL=0 ;;
24722 *) REPLACE_ISWCNTRL=1 ;;
24723 esac
24724
24725
24726 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
24727 :
24728 fi
24729
24730 if test $REPLACE_ISWCNTRL = 1; then
24731 REPLACE_TOWLOWER=1
24732 else
24733 for ac_func in towlower
24734do :
24735 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
d0ac1c44 24736if test "x$ac_cv_func_towlower" = xyes; then :
8690e634
JK
24737 cat >>confdefs.h <<_ACEOF
24738#define HAVE_TOWLOWER 1
24739_ACEOF
24740
24741fi
24742done
24743
24744 if test $ac_cv_func_towlower = yes; then
24745 REPLACE_TOWLOWER=0
24746 else
24747 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
24748 included before <wchar.h>.
24749 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
24750 must be included before <wchar.h>. */
24751 #include <stddef.h>
24752 #include <stdio.h>
24753 #include <time.h>
24754 #include <wchar.h>
24755 #if HAVE_WCTYPE_H
24756 # include <wctype.h>
24757 #endif
24758
24759"
d0ac1c44 24760if test "x$ac_cv_have_decl_towlower" = xyes; then :
8690e634
JK
24761 ac_have_decl=1
24762else
24763 ac_have_decl=0
24764fi
24765
24766cat >>confdefs.h <<_ACEOF
24767#define HAVE_DECL_TOWLOWER $ac_have_decl
24768_ACEOF
24769
24770 if test $ac_cv_have_decl_towlower = yes; then
24771 REPLACE_TOWLOWER=1
24772 else
24773 REPLACE_TOWLOWER=0
24774 fi
24775 fi
24776 fi
24777
24778
24779 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
24780 :
24781 fi
24782
24783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
24784$as_echo_n "checking for wctype_t... " >&6; }
d0ac1c44 24785if ${gl_cv_type_wctype_t+:} false; then :
8690e634
JK
24786 $as_echo_n "(cached) " >&6
24787else
24788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24789/* end confdefs.h. */
24790/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
24791 included before <wchar.h>.
24792 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
24793 must be included before <wchar.h>. */
24794 #include <stddef.h>
24795 #include <stdio.h>
24796 #include <time.h>
24797 #include <wchar.h>
24798 #if HAVE_WCTYPE_H
24799 # include <wctype.h>
24800 #endif
24801 wctype_t a;
24802
24803int
24804main ()
24805{
24806
24807 ;
24808 return 0;
24809}
24810_ACEOF
24811if ac_fn_c_try_compile "$LINENO"; then :
24812 gl_cv_type_wctype_t=yes
24813else
24814 gl_cv_type_wctype_t=no
24815fi
24816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 24817
8690e634
JK
24818fi
24819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
24820$as_echo "$gl_cv_type_wctype_t" >&6; }
24821 if test $gl_cv_type_wctype_t = no; then
24822 HAVE_WCTYPE_T=0
24823 fi
24824
24825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
24826$as_echo_n "checking for wctrans_t... " >&6; }
d0ac1c44 24827if ${gl_cv_type_wctrans_t+:} false; then :
8690e634
JK
24828 $as_echo_n "(cached) " >&6
24829else
24830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24831/* end confdefs.h. */
24832/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
24833 included before <wchar.h>.
24834 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
24835 must be included before <wchar.h>. */
24836 #include <stddef.h>
24837 #include <stdio.h>
24838 #include <time.h>
24839 #include <wchar.h>
24840 #include <wctype.h>
24841 wctrans_t a;
c971b7fa 24842
8690e634
JK
24843int
24844main ()
24845{
c971b7fa 24846
8690e634
JK
24847 ;
24848 return 0;
24849}
24850_ACEOF
24851if ac_fn_c_try_compile "$LINENO"; then :
24852 gl_cv_type_wctrans_t=yes
24853else
24854 gl_cv_type_wctrans_t=no
24855fi
24856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 24857
8690e634
JK
24858fi
24859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
24860$as_echo "$gl_cv_type_wctrans_t" >&6; }
24861 if test $gl_cv_type_wctrans_t = no; then
24862 HAVE_WCTRANS_T=0
c971b7fa
PA
24863 fi
24864
24865
24866
24867
24868
24869 # End of code from modules
24870
24871
24872
24873
24874
24875
24876
24877
24878
24879 gltests_libdeps=
24880 gltests_ltlibdeps=
24881
24882
24883
24884
24885
24886
24887
24888
24889
24890 gl_source_base='tests'
24891 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
24892
24893 gl_module_indicator_condition=$gltests_WITNESS
24894
24895
24896
24897
24898
24899
24900
24901
24902
24903 LIBGNU_LIBDEPS="$gl_libdeps"
24904
24905 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
24906
24907
24908
24909# We don't use automake, but gnulib does. This line lets us generate
24910# its Makefile.in.
d0ac1c44 24911am__api_version='1.15'
c971b7fa
PA
24912
24913# Find a good install program. We prefer a C program (faster),
24914# so one script is as good as another. But avoid the broken or
24915# incompatible versions:
24916# SysV /etc/install, /usr/sbin/install
24917# SunOS /usr/etc/install
24918# IRIX /sbin/install
24919# AIX /bin/install
24920# AmigaOS /C/install, which installs bootblocks on floppy discs
24921# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
24922# AFS /usr/afsws/bin/install, which mishandles nonexistent args
24923# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
24924# OS/2's system install, which has a completely different semantic
24925# ./install, which can be erroneously created by make from ./install.sh.
24926# Reject install programs that cannot install multiple files.
24927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
24928$as_echo_n "checking for a BSD-compatible install... " >&6; }
24929if test -z "$INSTALL"; then
d0ac1c44 24930if ${ac_cv_path_install+:} false; then :
c971b7fa
PA
24931 $as_echo_n "(cached) " >&6
24932else
24933 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24934for as_dir in $PATH
24935do
24936 IFS=$as_save_IFS
24937 test -z "$as_dir" && as_dir=.
24938 # Account for people who put trailing slashes in PATH elements.
24939case $as_dir/ in #((
24940 ./ | .// | /[cC]/* | \
24941 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
24942 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
24943 /usr/ucb/* ) ;;
24944 *)
24945 # OSF1 and SCO ODT 3.0 have their own names for install.
24946 # Don't use installbsd from OSF since it installs stuff as root
24947 # by default.
24948 for ac_prog in ginstall scoinst install; do
24949 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 24950 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
c971b7fa
PA
24951 if test $ac_prog = install &&
24952 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
24953 # AIX install. It has an incompatible calling convention.
24954 :
24955 elif test $ac_prog = install &&
24956 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
24957 # program-specific install script used by HP pwplus--don't use.
24958 :
24959 else
24960 rm -rf conftest.one conftest.two conftest.dir
24961 echo one > conftest.one
24962 echo two > conftest.two
24963 mkdir conftest.dir
24964 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
24965 test -s conftest.one && test -s conftest.two &&
24966 test -s conftest.dir/conftest.one &&
24967 test -s conftest.dir/conftest.two
24968 then
24969 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
24970 break 3
24971 fi
24972 fi
24973 fi
24974 done
24975 done
24976 ;;
24977esac
24978
24979 done
24980IFS=$as_save_IFS
24981
24982rm -rf conftest.one conftest.two conftest.dir
24983
24984fi
24985 if test "${ac_cv_path_install+set}" = set; then
24986 INSTALL=$ac_cv_path_install
24987 else
24988 # As a last resort, use the slow shell script. Don't cache a
24989 # value for INSTALL within a source directory, because that will
24990 # break other packages using the cache if that directory is
24991 # removed, or if the value is a relative name.
24992 INSTALL=$ac_install_sh
24993 fi
24994fi
24995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
24996$as_echo "$INSTALL" >&6; }
24997
24998# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
24999# It thinks the first close brace ends the variable substitution.
25000test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
25001
25002test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
25003
25004test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
25005
25006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
25007$as_echo_n "checking whether build environment is sane... " >&6; }
c971b7fa
PA
25008# Reject unsafe characters in $srcdir or the absolute working directory
25009# name. Accept space and tab only in the latter.
25010am_lf='
25011'
25012case `pwd` in
25013 *[\\\"\#\$\&\'\`$am_lf]*)
d0ac1c44 25014 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
c971b7fa
PA
25015esac
25016case $srcdir in
25017 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
d0ac1c44 25018 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
c971b7fa
PA
25019esac
25020
d0ac1c44 25021# Do 'set' in a subshell so we don't clobber the current shell's
c971b7fa
PA
25022# arguments. Must try -L first in case configure is actually a
25023# symlink; some systems play weird games with the mod time of symlinks
25024# (eg FreeBSD returns the mod time of the symlink's containing
25025# directory).
25026if (
d0ac1c44
SM
25027 am_has_slept=no
25028 for am_try in 1 2; do
25029 echo "timestamp, slept: $am_has_slept" > conftest.file
25030 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
25031 if test "$*" = "X"; then
25032 # -L didn't work.
25033 set X `ls -t "$srcdir/configure" conftest.file`
25034 fi
25035 if test "$*" != "X $srcdir/configure conftest.file" \
25036 && test "$*" != "X conftest.file $srcdir/configure"; then
25037
25038 # If neither matched, then we have a broken ls. This can happen
25039 # if, for instance, CONFIG_SHELL is bash and it inherits a
25040 # broken ls alias from the environment. This has actually
25041 # happened. Such a system could not be considered "sane".
25042 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
25043 alias in your environment" "$LINENO" 5
25044 fi
25045 if test "$2" = conftest.file || test $am_try -eq 2; then
25046 break
25047 fi
25048 # Just in case.
25049 sleep 1
25050 am_has_slept=yes
25051 done
c971b7fa
PA
25052 test "$2" = conftest.file
25053 )
25054then
25055 # Ok.
25056 :
25057else
d0ac1c44 25058 as_fn_error $? "newly created file is older than distributed files!
c971b7fa
PA
25059Check your system clock" "$LINENO" 5
25060fi
25061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25062$as_echo "yes" >&6; }
d0ac1c44
SM
25063# If we didn't sleep, we still need to ensure time stamps of config.status and
25064# generated files are strictly newer.
25065am_sleep_pid=
25066if grep 'slept: no' conftest.file >/dev/null 2>&1; then
25067 ( sleep 1 ) &
25068 am_sleep_pid=$!
25069fi
25070
25071rm -f conftest.file
25072
c971b7fa
PA
25073test "$program_prefix" != NONE &&
25074 program_transform_name="s&^&$program_prefix&;$program_transform_name"
25075# Use a double $ so make ignores it.
25076test "$program_suffix" != NONE &&
25077 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
25078# Double any \ or $.
25079# By default was `s,x,x', remove it if useless.
25080ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
25081program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
25082
7a6dbc2f
SDJ
25083# Expand $ac_aux_dir to an absolute path.
25084am_aux_dir=`cd "$ac_aux_dir" && pwd`
25085
c971b7fa
PA
25086if test x"${MISSING+set}" != xset; then
25087 case $am_aux_dir in
25088 *\ * | *\ *)
25089 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
25090 *)
25091 MISSING="\${SHELL} $am_aux_dir/missing" ;;
25092 esac
25093fi
25094# Use eval to expand $SHELL
d0ac1c44
SM
25095if eval "$MISSING --is-lightweight"; then
25096 am_missing_run="$MISSING "
c971b7fa
PA
25097else
25098 am_missing_run=
d0ac1c44
SM
25099 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
25100$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
c971b7fa
PA
25101fi
25102
d0ac1c44 25103if test x"${install_sh+set}" != xset; then
c971b7fa
PA
25104 case $am_aux_dir in
25105 *\ * | *\ *)
25106 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
25107 *)
25108 install_sh="\${SHELL} $am_aux_dir/install-sh"
25109 esac
25110fi
25111
d0ac1c44
SM
25112# Installed binaries are usually stripped using 'strip' when the user
25113# run "make install-strip". However 'strip' might not be the right
c971b7fa 25114# tool to use in cross-compilation environments, therefore Automake
d0ac1c44 25115# will honor the 'STRIP' environment variable to overrule this program.
c971b7fa
PA
25116if test "$cross_compiling" != no; then
25117 if test -n "$ac_tool_prefix"; then
25118 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
25119set dummy ${ac_tool_prefix}strip; ac_word=$2
25120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25121$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 25122if ${ac_cv_prog_STRIP+:} false; then :
c971b7fa
PA
25123 $as_echo_n "(cached) " >&6
25124else
25125 if test -n "$STRIP"; then
25126 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
25127else
25128as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25129for as_dir in $PATH
25130do
25131 IFS=$as_save_IFS
25132 test -z "$as_dir" && as_dir=.
25133 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 25134 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
25135 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
25136 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25137 break 2
25138 fi
25139done
25140 done
25141IFS=$as_save_IFS
25142
25143fi
25144fi
25145STRIP=$ac_cv_prog_STRIP
25146if test -n "$STRIP"; then
25147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25148$as_echo "$STRIP" >&6; }
25149else
25150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25151$as_echo "no" >&6; }
25152fi
25153
25154
25155fi
25156if test -z "$ac_cv_prog_STRIP"; then
25157 ac_ct_STRIP=$STRIP
25158 # Extract the first word of "strip", so it can be a program name with args.
25159set dummy strip; ac_word=$2
25160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25161$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 25162if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
c971b7fa
PA
25163 $as_echo_n "(cached) " >&6
25164else
25165 if test -n "$ac_ct_STRIP"; then
25166 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
25167else
25168as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25169for as_dir in $PATH
25170do
25171 IFS=$as_save_IFS
25172 test -z "$as_dir" && as_dir=.
25173 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 25174 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
25175 ac_cv_prog_ac_ct_STRIP="strip"
25176 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25177 break 2
25178 fi
25179done
25180 done
25181IFS=$as_save_IFS
25182
25183fi
25184fi
25185ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
25186if test -n "$ac_ct_STRIP"; then
25187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
25188$as_echo "$ac_ct_STRIP" >&6; }
25189else
25190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25191$as_echo "no" >&6; }
25192fi
25193
25194 if test "x$ac_ct_STRIP" = x; then
25195 STRIP=":"
25196 else
25197 case $cross_compiling:$ac_tool_warned in
25198yes:)
25199{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25200$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25201ac_tool_warned=yes ;;
25202esac
25203 STRIP=$ac_ct_STRIP
25204 fi
25205else
25206 STRIP="$ac_cv_prog_STRIP"
25207fi
25208
25209fi
25210INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
25211
c971b7fa
PA
25212for ac_prog in gawk mawk nawk awk
25213do
25214 # Extract the first word of "$ac_prog", so it can be a program name with args.
25215set dummy $ac_prog; ac_word=$2
25216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25217$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 25218if ${ac_cv_prog_AWK+:} false; then :
c971b7fa
PA
25219 $as_echo_n "(cached) " >&6
25220else
25221 if test -n "$AWK"; then
25222 ac_cv_prog_AWK="$AWK" # Let the user override the test.
25223else
25224as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25225for as_dir in $PATH
25226do
25227 IFS=$as_save_IFS
25228 test -z "$as_dir" && as_dir=.
25229 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 25230 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
25231 ac_cv_prog_AWK="$ac_prog"
25232 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25233 break 2
25234 fi
25235done
25236 done
25237IFS=$as_save_IFS
25238
25239fi
25240fi
25241AWK=$ac_cv_prog_AWK
25242if test -n "$AWK"; then
25243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
25244$as_echo "$AWK" >&6; }
25245else
25246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25247$as_echo "no" >&6; }
25248fi
25249
25250
25251 test -n "$AWK" && break
25252done
25253
25254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
25255$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
25256set x ${MAKE-make}
25257ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
d0ac1c44 25258if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
c971b7fa
PA
25259 $as_echo_n "(cached) " >&6
25260else
25261 cat >conftest.make <<\_ACEOF
25262SHELL = /bin/sh
25263all:
25264 @echo '@@@%%%=$(MAKE)=@@@%%%'
25265_ACEOF
d0ac1c44 25266# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
c971b7fa
PA
25267case `${MAKE-make} -f conftest.make 2>/dev/null` in
25268 *@@@%%%=?*=@@@%%%*)
25269 eval ac_cv_prog_make_${ac_make}_set=yes;;
25270 *)
25271 eval ac_cv_prog_make_${ac_make}_set=no;;
25272esac
25273rm -f conftest.make
25274fi
25275if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
25276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25277$as_echo "yes" >&6; }
25278 SET_MAKE=
25279else
25280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25281$as_echo "no" >&6; }
25282 SET_MAKE="MAKE=${MAKE-make}"
25283fi
25284
25285rm -rf .tst 2>/dev/null
25286mkdir .tst 2>/dev/null
25287if test -d .tst; then
25288 am__leading_dot=.
25289else
25290 am__leading_dot=_
25291fi
25292rmdir .tst 2>/dev/null
25293
25294DEPDIR="${am__leading_dot}deps"
25295
25296ac_config_commands="$ac_config_commands depfiles"
25297
25298
25299am_make=${MAKE-make}
25300cat > confinc << 'END'
25301am__doit:
25302 @echo this is the am__doit target
25303.PHONY: am__doit
25304END
25305# If we don't find an include directive, just comment out the code.
25306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
25307$as_echo_n "checking for style of include used by $am_make... " >&6; }
25308am__include="#"
25309am__quote=
25310_am_result=none
25311# First try GNU make style include.
25312echo "include confinc" > confmf
d0ac1c44 25313# Ignore all kinds of additional output from 'make'.
c971b7fa
PA
25314case `$am_make -s -f confmf 2> /dev/null` in #(
25315*the\ am__doit\ target*)
25316 am__include=include
25317 am__quote=
25318 _am_result=GNU
25319 ;;
25320esac
25321# Now try BSD make style include.
25322if test "$am__include" = "#"; then
25323 echo '.include "confinc"' > confmf
25324 case `$am_make -s -f confmf 2> /dev/null` in #(
25325 *the\ am__doit\ target*)
25326 am__include=.include
25327 am__quote="\""
25328 _am_result=BSD
25329 ;;
25330 esac
25331fi
25332
25333
25334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
25335$as_echo "$_am_result" >&6; }
25336rm -f confinc confmf
25337
25338# Check whether --enable-dependency-tracking was given.
25339if test "${enable_dependency_tracking+set}" = set; then :
25340 enableval=$enable_dependency_tracking;
25341fi
25342
25343if test "x$enable_dependency_tracking" != xno; then
25344 am_depcomp="$ac_aux_dir/depcomp"
25345 AMDEPBACKSLASH='\'
d0ac1c44 25346 am__nodep='_no'
c971b7fa
PA
25347fi
25348 if test "x$enable_dependency_tracking" != xno; then
25349 AMDEP_TRUE=
25350 AMDEP_FALSE='#'
25351else
25352 AMDEP_TRUE='#'
25353 AMDEP_FALSE=
25354fi
25355
25356
d0ac1c44
SM
25357# Check whether --enable-silent-rules was given.
25358if test "${enable_silent_rules+set}" = set; then :
25359 enableval=$enable_silent_rules;
25360fi
25361
25362case $enable_silent_rules in # (((
25363 yes) AM_DEFAULT_VERBOSITY=0;;
25364 no) AM_DEFAULT_VERBOSITY=1;;
25365 *) AM_DEFAULT_VERBOSITY=1;;
25366esac
25367am_make=${MAKE-make}
25368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
25369$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
25370if ${am_cv_make_support_nested_variables+:} false; then :
25371 $as_echo_n "(cached) " >&6
25372else
25373 if $as_echo 'TRUE=$(BAR$(V))
25374BAR0=false
25375BAR1=true
25376V=1
25377am__doit:
25378 @$(TRUE)
25379.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
25380 am_cv_make_support_nested_variables=yes
25381else
25382 am_cv_make_support_nested_variables=no
25383fi
25384fi
25385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
25386$as_echo "$am_cv_make_support_nested_variables" >&6; }
25387if test $am_cv_make_support_nested_variables = yes; then
25388 AM_V='$(V)'
25389 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
25390else
25391 AM_V=$AM_DEFAULT_VERBOSITY
25392 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
25393fi
25394AM_BACKSLASH='\'
25395
c971b7fa
PA
25396if test "`cd $srcdir && pwd`" != "`pwd`"; then
25397 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
25398 # is not polluted with repeated "-I."
25399 am__isrc=' -I$(srcdir)'
25400 # test to see if srcdir already configured
25401 if test -f $srcdir/config.status; then
d0ac1c44 25402 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
c971b7fa
PA
25403 fi
25404fi
25405
25406# test whether we have cygpath
25407if test -z "$CYGPATH_W"; then
25408 if (cygpath --version) >/dev/null 2>/dev/null; then
25409 CYGPATH_W='cygpath -w'
25410 else
25411 CYGPATH_W=echo
25412 fi
25413fi
25414
25415
25416# Define the identity of the package.
d0ac1c44
SM
25417 PACKAGE='libgnu'
25418 VERSION='UNUSED-VERSION'
c971b7fa
PA
25419
25420
25421# Some tools Automake needs.
25422
25423ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
25424
25425
25426AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
25427
25428
25429AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
25430
25431
25432AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
25433
25434
25435MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
25436
d0ac1c44
SM
25437# For better backward compatibility. To be removed once Automake 1.9.x
25438# dies out for good. For more background, see:
25439# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
25440# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
25441mkdir_p='$(MKDIR_P)'
25442
25443# We need awk for the "check" target (and possibly the TAP driver). The
25444# system "awk" is bad on some platforms.
25445# Always define AMTAR for backward compatibility. Yes, it's still used
25446# in the wild :-( We should find a proper way to deprecate it ...
25447AMTAR='$${TAR-tar}'
25448
25449
25450# We'll loop over all known methods to create a tar archive until one works.
25451_am_tools='gnutar pax cpio none'
c971b7fa 25452
d0ac1c44 25453am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
c971b7fa 25454
c971b7fa
PA
25455
25456
25457
25458
25459depcc="$CC" am_compiler_list=
25460
25461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
25462$as_echo_n "checking dependency style of $depcc... " >&6; }
d0ac1c44 25463if ${am_cv_CC_dependencies_compiler_type+:} false; then :
c971b7fa
PA
25464 $as_echo_n "(cached) " >&6
25465else
25466 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
25467 # We make a subdir and do the tests there. Otherwise we can end up
25468 # making bogus files that we don't know about and never remove. For
25469 # instance it was reported that on HP-UX the gcc test will end up
d0ac1c44
SM
25470 # making a dummy file named 'D' -- because '-MD' means "put the output
25471 # in D".
25472 rm -rf conftest.dir
c971b7fa
PA
25473 mkdir conftest.dir
25474 # Copy depcomp to subdir because otherwise we won't find it if we're
25475 # using a relative directory.
25476 cp "$am_depcomp" conftest.dir
25477 cd conftest.dir
25478 # We will build objects and dependencies in a subdirectory because
25479 # it helps to detect inapplicable dependency modes. For instance
25480 # both Tru64's cc and ICC support -MD to output dependencies as a
25481 # side effect of compilation, but ICC will put the dependencies in
25482 # the current directory while Tru64 will put them in the object
25483 # directory.
25484 mkdir sub
25485
25486 am_cv_CC_dependencies_compiler_type=none
25487 if test "$am_compiler_list" = ""; then
25488 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
25489 fi
25490 am__universal=false
25491 case " $depcc " in #(
25492 *\ -arch\ *\ -arch\ *) am__universal=true ;;
25493 esac
25494
25495 for depmode in $am_compiler_list; do
25496 # Setup a source with many dependencies, because some compilers
25497 # like to wrap large dependency lists on column 80 (with \), and
25498 # we should not choose a depcomp mode which is confused by this.
25499 #
25500 # We need to recreate these files for each test, as the compiler may
25501 # overwrite some of them when testing with obscure command lines.
25502 # This happens at least with the AIX C compiler.
25503 : > sub/conftest.c
25504 for i in 1 2 3 4 5 6; do
25505 echo '#include "conftst'$i'.h"' >> sub/conftest.c
d0ac1c44
SM
25506 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
25507 # Solaris 10 /bin/sh.
25508 echo '/* dummy */' > sub/conftst$i.h
c971b7fa
PA
25509 done
25510 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
25511
d0ac1c44 25512 # We check with '-c' and '-o' for the sake of the "dashmstdout"
c971b7fa 25513 # mode. It turns out that the SunPro C++ compiler does not properly
d0ac1c44
SM
25514 # handle '-M -o', and we need to detect this. Also, some Intel
25515 # versions had trouble with output in subdirs.
c971b7fa
PA
25516 am__obj=sub/conftest.${OBJEXT-o}
25517 am__minus_obj="-o $am__obj"
25518 case $depmode in
25519 gcc)
25520 # This depmode causes a compiler race in universal mode.
25521 test "$am__universal" = false || continue
25522 ;;
25523 nosideeffect)
d0ac1c44
SM
25524 # After this tag, mechanisms are not by side-effect, so they'll
25525 # only be used when explicitly requested.
c971b7fa
PA
25526 if test "x$enable_dependency_tracking" = xyes; then
25527 continue
25528 else
25529 break
25530 fi
25531 ;;
d0ac1c44
SM
25532 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
25533 # This compiler won't grok '-c -o', but also, the minuso test has
c971b7fa
PA
25534 # not run yet. These depmodes are late enough in the game, and
25535 # so weak that their functioning should not be impacted.
25536 am__obj=conftest.${OBJEXT-o}
25537 am__minus_obj=
25538 ;;
25539 none) break ;;
25540 esac
25541 if depmode=$depmode \
25542 source=sub/conftest.c object=$am__obj \
25543 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
25544 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
25545 >/dev/null 2>conftest.err &&
25546 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
25547 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
25548 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
25549 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
25550 # icc doesn't choke on unknown options, it will just issue warnings
25551 # or remarks (even with -Werror). So we grep stderr for any message
25552 # that says an option was ignored or not supported.
25553 # When given -MP, icc 7.0 and 7.1 complain thusly:
25554 # icc: Command line warning: ignoring option '-M'; no argument required
25555 # The diagnosis changed in icc 8.0:
25556 # icc: Command line remark: option '-MP' not supported
25557 if (grep 'ignoring option' conftest.err ||
25558 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
25559 am_cv_CC_dependencies_compiler_type=$depmode
25560 break
25561 fi
25562 fi
25563 done
25564
25565 cd ..
25566 rm -rf conftest.dir
25567else
25568 am_cv_CC_dependencies_compiler_type=none
25569fi
25570
25571fi
25572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
25573$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
25574CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
25575
25576 if
25577 test "x$enable_dependency_tracking" != xno \
25578 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
25579 am__fastdepCC_TRUE=
25580 am__fastdepCC_FALSE='#'
25581else
25582 am__fastdepCC_TRUE='#'
25583 am__fastdepCC_FALSE=
25584fi
25585
25586
25587
d0ac1c44
SM
25588# POSIX will say in a future version that running "rm -f" with no argument
25589# is OK; and we want to be able to make that assumption in our Makefile
25590# recipes. So use an aggressive probe to check that the usage we want is
25591# actually supported "in the wild" to an acceptable degree.
25592# See automake bug#10828.
25593# To make any issue more visible, cause the running configure to be aborted
25594# by default if the 'rm' program in use doesn't match our expectations; the
25595# user can still override this though.
25596if rm -f && rm -fr && rm -rf; then : OK; else
25597 cat >&2 <<'END'
25598Oops!
25599
25600Your 'rm' program seems unable to run without file operands specified
25601on the command line, even when the '-f' option is present. This is contrary
25602to the behaviour of most rm programs out there, and not conforming with
25603the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
25604
25605Please tell bug-automake@gnu.org about your system, including the value
25606of your $PATH and any error possibly output before this message. This
25607can help us improve future automake versions.
25608
25609END
25610 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
25611 echo 'Configuration will proceed anyway, since you have set the' >&2
25612 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
25613 echo >&2
25614 else
25615 cat >&2 <<'END'
25616Aborting the configuration process, to ensure you take notice of the issue.
25617
25618You can download and install GNU coreutils to get an 'rm' implementation
25619that behaves properly: <http://www.gnu.org/software/coreutils/>.
25620
25621If you want to complete the configuration process using your problematic
25622'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
25623to "yes", and re-run configure.
25624
25625END
25626 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
25627 fi
25628fi
25629
c971b7fa 25630
39be3c7e
SM
25631# Check whether --enable-silent-rules was given.
25632if test "${enable_silent_rules+set}" = set; then :
25633 enableval=$enable_silent_rules;
25634fi
25635
d0ac1c44
SM
25636case $enable_silent_rules in # (((
25637 yes) AM_DEFAULT_VERBOSITY=0;;
25638 no) AM_DEFAULT_VERBOSITY=1;;
25639 *) AM_DEFAULT_VERBOSITY=0;;
39be3c7e 25640esac
d0ac1c44
SM
25641am_make=${MAKE-make}
25642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
25643$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
25644if ${am_cv_make_support_nested_variables+:} false; then :
25645 $as_echo_n "(cached) " >&6
25646else
25647 if $as_echo 'TRUE=$(BAR$(V))
25648BAR0=false
25649BAR1=true
25650V=1
25651am__doit:
25652 @$(TRUE)
25653.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
25654 am_cv_make_support_nested_variables=yes
25655else
25656 am_cv_make_support_nested_variables=no
25657fi
25658fi
25659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
25660$as_echo "$am_cv_make_support_nested_variables" >&6; }
25661if test $am_cv_make_support_nested_variables = yes; then
25662 AM_V='$(V)'
25663 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
25664else
25665 AM_V=$AM_DEFAULT_VERBOSITY
25666 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
25667fi
39be3c7e
SM
25668AM_BACKSLASH='\'
25669
25670
c971b7fa
PA
25671# --------------------- #
25672# Checks for programs. #
25673# --------------------- #
25674
25675
25676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
25677$as_echo_n "checking whether ln -s works... " >&6; }
25678LN_S=$as_ln_s
25679if test "$LN_S" = "ln -s"; then
25680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25681$as_echo "yes" >&6; }
25682else
25683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
25684$as_echo "no, using $LN_S" >&6; }
25685fi
25686
25687if test -n "$ac_tool_prefix"; then
25688 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
25689set dummy ${ac_tool_prefix}ranlib; ac_word=$2
25690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25691$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 25692if ${ac_cv_prog_RANLIB+:} false; then :
c971b7fa
PA
25693 $as_echo_n "(cached) " >&6
25694else
25695 if test -n "$RANLIB"; then
25696 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
25697else
25698as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25699for as_dir in $PATH
25700do
25701 IFS=$as_save_IFS
25702 test -z "$as_dir" && as_dir=.
25703 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 25704 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
25705 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
25706 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25707 break 2
25708 fi
25709done
25710 done
25711IFS=$as_save_IFS
25712
25713fi
25714fi
25715RANLIB=$ac_cv_prog_RANLIB
25716if test -n "$RANLIB"; then
25717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
25718$as_echo "$RANLIB" >&6; }
25719else
25720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25721$as_echo "no" >&6; }
25722fi
25723
25724
25725fi
25726if test -z "$ac_cv_prog_RANLIB"; then
25727 ac_ct_RANLIB=$RANLIB
25728 # Extract the first word of "ranlib", so it can be a program name with args.
25729set dummy ranlib; ac_word=$2
25730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25731$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 25732if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
c971b7fa
PA
25733 $as_echo_n "(cached) " >&6
25734else
25735 if test -n "$ac_ct_RANLIB"; then
25736 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
25737else
25738as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25739for as_dir in $PATH
25740do
25741 IFS=$as_save_IFS
25742 test -z "$as_dir" && as_dir=.
25743 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 25744 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
25745 ac_cv_prog_ac_ct_RANLIB="ranlib"
25746 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25747 break 2
25748 fi
25749done
25750 done
25751IFS=$as_save_IFS
25752
25753fi
25754fi
25755ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
25756if test -n "$ac_ct_RANLIB"; then
25757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
25758$as_echo "$ac_ct_RANLIB" >&6; }
25759else
25760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25761$as_echo "no" >&6; }
25762fi
25763
25764 if test "x$ac_ct_RANLIB" = x; then
25765 RANLIB=":"
25766 else
25767 case $cross_compiling:$ac_tool_warned in
25768yes:)
25769{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25770$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25771ac_tool_warned=yes ;;
25772esac
25773 RANLIB=$ac_ct_RANLIB
25774 fi
25775else
25776 RANLIB="$ac_cv_prog_RANLIB"
25777fi
25778
25779
25780if test -n "$ac_tool_prefix"; then
25781 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
25782set dummy ${ac_tool_prefix}ar; ac_word=$2
25783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25784$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 25785if ${ac_cv_prog_AR+:} false; then :
c971b7fa
PA
25786 $as_echo_n "(cached) " >&6
25787else
25788 if test -n "$AR"; then
25789 ac_cv_prog_AR="$AR" # Let the user override the test.
25790else
25791as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25792for as_dir in $PATH
25793do
25794 IFS=$as_save_IFS
25795 test -z "$as_dir" && as_dir=.
25796 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 25797 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
25798 ac_cv_prog_AR="${ac_tool_prefix}ar"
25799 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25800 break 2
25801 fi
25802done
25803 done
25804IFS=$as_save_IFS
25805
25806fi
25807fi
25808AR=$ac_cv_prog_AR
25809if test -n "$AR"; then
25810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
25811$as_echo "$AR" >&6; }
25812else
25813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25814$as_echo "no" >&6; }
25815fi
25816
25817
25818fi
25819if test -z "$ac_cv_prog_AR"; then
25820 ac_ct_AR=$AR
25821 # Extract the first word of "ar", so it can be a program name with args.
25822set dummy ar; ac_word=$2
25823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25824$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 25825if ${ac_cv_prog_ac_ct_AR+:} false; then :
c971b7fa
PA
25826 $as_echo_n "(cached) " >&6
25827else
25828 if test -n "$ac_ct_AR"; then
25829 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
25830else
25831as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25832for as_dir in $PATH
25833do
25834 IFS=$as_save_IFS
25835 test -z "$as_dir" && as_dir=.
25836 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 25837 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
25838 ac_cv_prog_ac_ct_AR="ar"
25839 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25840 break 2
25841 fi
25842done
25843 done
25844IFS=$as_save_IFS
25845
25846fi
25847fi
25848ac_ct_AR=$ac_cv_prog_ac_ct_AR
25849if test -n "$ac_ct_AR"; then
25850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
25851$as_echo "$ac_ct_AR" >&6; }
25852else
25853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25854$as_echo "no" >&6; }
25855fi
25856
25857 if test "x$ac_ct_AR" = x; then
25858 AR=""
25859 else
25860 case $cross_compiling:$ac_tool_warned in
25861yes:)
25862{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25863$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25864ac_tool_warned=yes ;;
25865esac
25866 AR=$ac_ct_AR
25867 fi
25868else
25869 AR="$ac_cv_prog_AR"
25870fi
25871
25872
25873# ---------------------- #
25874# Checks for libraries. #
25875# ---------------------- #
25876
25877ac_config_files="$ac_config_files Makefile import/Makefile"
25878
25879ac_config_commands="$ac_config_commands default"
25880
25881cat >confcache <<\_ACEOF
25882# This file is a shell script that caches the results of configure
25883# tests run on this system so they can be shared between configure
25884# scripts and configure runs, see configure's option --config-cache.
25885# It is not useful on other systems. If it contains results you don't
25886# want to keep, you may remove or edit it.
25887#
25888# config.status only pays attention to the cache file if you give it
25889# the --recheck option to rerun configure.
25890#
25891# `ac_cv_env_foo' variables (set or unset) will be overridden when
25892# loading this file, other *unset* `ac_cv_foo' will be assigned the
25893# following values.
25894
25895_ACEOF
25896
25897# The following way of writing the cache mishandles newlines in values,
25898# but we know of no workaround that is simple, portable, and efficient.
25899# So, we kill variables containing newlines.
25900# Ultrix sh set writes to stderr and can't be redirected directly,
25901# and sets the high bit in the cache file unless we assign to the vars.
25902(
25903 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
25904 eval ac_val=\$$ac_var
25905 case $ac_val in #(
25906 *${as_nl}*)
25907 case $ac_var in #(
25908 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
25909$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
25910 esac
25911 case $ac_var in #(
25912 _ | IFS | as_nl) ;; #(
25913 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
25914 *) { eval $ac_var=; unset $ac_var;} ;;
25915 esac ;;
25916 esac
25917 done
25918
25919 (set) 2>&1 |
25920 case $as_nl`(ac_space=' '; set) 2>&1` in #(
25921 *${as_nl}ac_space=\ *)
25922 # `set' does not quote correctly, so add quotes: double-quote
25923 # substitution turns \\\\ into \\, and sed turns \\ into \.
25924 sed -n \
25925 "s/'/'\\\\''/g;
25926 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
25927 ;; #(
25928 *)
25929 # `set' quotes correctly as required by POSIX, so do not add quotes.
25930 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
25931 ;;
25932 esac |
25933 sort
25934) |
25935 sed '
25936 /^ac_cv_env_/b end
25937 t clear
25938 :clear
25939 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
25940 t end
25941 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25942 :end' >>confcache
25943if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
25944 if test -w "$cache_file"; then
d0ac1c44 25945 if test "x$cache_file" != "x/dev/null"; then
c971b7fa
PA
25946 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
25947$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
25948 if test ! -f "$cache_file" || test -h "$cache_file"; then
25949 cat confcache >"$cache_file"
25950 else
25951 case $cache_file in #(
25952 */* | ?:*)
25953 mv -f confcache "$cache_file"$$ &&
25954 mv -f "$cache_file"$$ "$cache_file" ;; #(
25955 *)
25956 mv -f confcache "$cache_file" ;;
25957 esac
25958 fi
25959 fi
c971b7fa
PA
25960 else
25961 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
25962$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
25963 fi
25964fi
25965rm -f confcache
25966
25967test "x$prefix" = xNONE && prefix=$ac_default_prefix
25968# Let make expand exec_prefix.
25969test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25970
25971DEFS=-DHAVE_CONFIG_H
25972
25973ac_libobjs=
25974ac_ltlibobjs=
25975for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25976 # 1. Remove the extension, and $U if already installed.
25977 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
25978 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
25979 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
25980 # will be set to the directory where LIBOBJS objects are built.
25981 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25982 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
25983done
25984LIBOBJS=$ac_libobjs
25985
25986LTLIBOBJS=$ac_ltlibobjs
25987
25988
25989if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 25990 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
c971b7fa
PA
25991Usually this means the macro was only invoked conditionally." "$LINENO" 5
25992fi
25993if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
d0ac1c44 25994 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
c971b7fa
PA
25995Usually this means the macro was only invoked conditionally." "$LINENO" 5
25996fi
8690e634 25997if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
d0ac1c44 25998 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
8690e634
JK
25999Usually this means the macro was only invoked conditionally." "$LINENO" 5
26000fi
18848e28 26001if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
d0ac1c44 26002 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
18848e28
GF
26003Usually this means the macro was only invoked conditionally." "$LINENO" 5
26004fi
88b48903 26005if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
d0ac1c44 26006 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
88b48903
WN
26007Usually this means the macro was only invoked conditionally." "$LINENO" 5
26008fi
8690e634 26009if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
d0ac1c44 26010 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
8690e634
JK
26011Usually this means the macro was only invoked conditionally." "$LINENO" 5
26012fi
7a6dbc2f
SDJ
26013if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
26014 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
26015Usually this means the macro was only invoked conditionally." "$LINENO" 5
26016fi
26017if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
26018 as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined.
26019Usually this means the macro was only invoked conditionally." "$LINENO" 5
26020fi
6ec2e0f5 26021if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
d0ac1c44 26022 as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined.
6ec2e0f5
SDJ
26023Usually this means the macro was only invoked conditionally." "$LINENO" 5
26024fi
49e4877c 26025if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
d0ac1c44 26026 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
49e4877c
PA
26027Usually this means the macro was only invoked conditionally." "$LINENO" 5
26028fi
26029if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
d0ac1c44 26030 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
49e4877c
PA
26031Usually this means the macro was only invoked conditionally." "$LINENO" 5
26032fi
c971b7fa 26033if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
d0ac1c44 26034 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
c971b7fa
PA
26035Usually this means the macro was only invoked conditionally." "$LINENO" 5
26036fi
88b48903
WN
26037
26038
8690e634 26039if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
d0ac1c44 26040 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
8690e634
JK
26041Usually this means the macro was only invoked conditionally." "$LINENO" 5
26042fi
c971b7fa 26043if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
d0ac1c44 26044 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
c971b7fa
PA
26045Usually this means the macro was only invoked conditionally." "$LINENO" 5
26046fi
26047
26048 gl_libobjs=
26049 gl_ltlibobjs=
26050 if test -n "$gl_LIBOBJS"; then
26051 # Remove the extension.
26052 sed_drop_objext='s/\.o$//;s/\.obj$//'
26053 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
26054 gl_libobjs="$gl_libobjs $i.$ac_objext"
26055 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
26056 done
26057 fi
26058 gl_LIBOBJS=$gl_libobjs
26059
26060 gl_LTLIBOBJS=$gl_ltlibobjs
26061
26062
26063
26064 gltests_libobjs=
26065 gltests_ltlibobjs=
26066 if test -n "$gltests_LIBOBJS"; then
26067 # Remove the extension.
26068 sed_drop_objext='s/\.o$//;s/\.obj$//'
26069 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
26070 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
26071 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
26072 done
26073 fi
26074 gltests_LIBOBJS=$gltests_libobjs
26075
26076 gltests_LTLIBOBJS=$gltests_ltlibobjs
26077
26078
d0ac1c44
SM
26079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
26080$as_echo_n "checking that generated files are newer than configure... " >&6; }
26081 if test -n "$am_sleep_pid"; then
26082 # Hide warnings about reused PIDs.
26083 wait $am_sleep_pid 2>/dev/null
26084 fi
26085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
26086$as_echo "done" >&6; }
c971b7fa 26087if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
d0ac1c44 26088 as_fn_error $? "conditional \"AMDEP\" was never defined.
c971b7fa
PA
26089Usually this means the macro was only invoked conditionally." "$LINENO" 5
26090fi
26091if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
d0ac1c44 26092 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
c971b7fa
PA
26093Usually this means the macro was only invoked conditionally." "$LINENO" 5
26094fi
26095 if test -n "$EXEEXT"; then
26096 am__EXEEXT_TRUE=
26097 am__EXEEXT_FALSE='#'
26098else
26099 am__EXEEXT_TRUE='#'
26100 am__EXEEXT_FALSE=
26101fi
26102
26103
d0ac1c44 26104: "${CONFIG_STATUS=./config.status}"
c971b7fa
PA
26105ac_write_fail=0
26106ac_clean_files_save=$ac_clean_files
26107ac_clean_files="$ac_clean_files $CONFIG_STATUS"
26108{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
26109$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
26110as_write_fail=0
26111cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
26112#! $SHELL
26113# Generated by $as_me.
26114# Run this file to recreate the current configuration.
26115# Compiler output produced by configure, useful for debugging
26116# configure, is in config.log if it exists.
26117
26118debug=false
26119ac_cs_recheck=false
26120ac_cs_silent=false
26121
26122SHELL=\${CONFIG_SHELL-$SHELL}
26123export SHELL
26124_ASEOF
26125cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
26126## -------------------- ##
26127## M4sh Initialization. ##
26128## -------------------- ##
26129
26130# Be more Bourne compatible
26131DUALCASE=1; export DUALCASE # for MKS sh
26132if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26133 emulate sh
26134 NULLCMD=:
26135 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
26136 # is contrary to our usage. Disable this feature.
26137 alias -g '${1+"$@"}'='"$@"'
26138 setopt NO_GLOB_SUBST
26139else
26140 case `(set -o) 2>/dev/null` in #(
26141 *posix*) :
26142 set -o posix ;; #(
26143 *) :
26144 ;;
26145esac
26146fi
26147
26148
26149as_nl='
26150'
26151export as_nl
26152# Printing a long string crashes Solaris 7 /usr/bin/printf.
26153as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
26154as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
26155as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
26156# Prefer a ksh shell builtin over an external printf program on Solaris,
26157# but without wasting forks for bash or zsh.
26158if test -z "$BASH_VERSION$ZSH_VERSION" \
26159 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
26160 as_echo='print -r --'
26161 as_echo_n='print -rn --'
26162elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
26163 as_echo='printf %s\n'
26164 as_echo_n='printf %s'
26165else
26166 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
26167 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
26168 as_echo_n='/usr/ucb/echo -n'
26169 else
26170 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
26171 as_echo_n_body='eval
26172 arg=$1;
26173 case $arg in #(
26174 *"$as_nl"*)
26175 expr "X$arg" : "X\\(.*\\)$as_nl";
26176 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
26177 esac;
26178 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
26179 '
26180 export as_echo_n_body
26181 as_echo_n='sh -c $as_echo_n_body as_echo'
26182 fi
26183 export as_echo_body
26184 as_echo='sh -c $as_echo_body as_echo'
26185fi
26186
26187# The user is always right.
26188if test "${PATH_SEPARATOR+set}" != set; then
26189 PATH_SEPARATOR=:
26190 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
26191 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
26192 PATH_SEPARATOR=';'
26193 }
26194fi
26195
26196
26197# IFS
26198# We need space, tab and new line, in precisely that order. Quoting is
26199# there to prevent editors from complaining about space-tab.
26200# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26201# splitting by setting IFS to empty value.)
26202IFS=" "" $as_nl"
26203
26204# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 26205as_myself=
c971b7fa
PA
26206case $0 in #((
26207 *[\\/]* ) as_myself=$0 ;;
26208 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26209for as_dir in $PATH
26210do
26211 IFS=$as_save_IFS
26212 test -z "$as_dir" && as_dir=.
26213 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26214 done
26215IFS=$as_save_IFS
26216
26217 ;;
26218esac
26219# We did not find ourselves, most probably we were run as `sh COMMAND'
26220# in which case we are not to be found in the path.
26221if test "x$as_myself" = x; then
26222 as_myself=$0
26223fi
26224if test ! -f "$as_myself"; then
26225 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
26226 exit 1
26227fi
26228
26229# Unset variables that we do not need and which cause bugs (e.g. in
26230# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
26231# suppresses any "Segmentation fault" message there. '((' could
26232# trigger a bug in pdksh 5.2.14.
26233for as_var in BASH_ENV ENV MAIL MAILPATH
26234do eval test x\${$as_var+set} = xset \
26235 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
26236done
26237PS1='$ '
26238PS2='> '
26239PS4='+ '
26240
26241# NLS nuisances.
26242LC_ALL=C
26243export LC_ALL
26244LANGUAGE=C
26245export LANGUAGE
26246
26247# CDPATH.
26248(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
26249
26250
d0ac1c44
SM
26251# as_fn_error STATUS ERROR [LINENO LOG_FD]
26252# ----------------------------------------
c971b7fa
PA
26253# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
26254# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 26255# script with STATUS, using 1 if that was 0.
c971b7fa
PA
26256as_fn_error ()
26257{
d0ac1c44
SM
26258 as_status=$1; test $as_status -eq 0 && as_status=1
26259 if test "$4"; then
26260 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
26261 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
c971b7fa 26262 fi
d0ac1c44 26263 $as_echo "$as_me: error: $2" >&2
c971b7fa
PA
26264 as_fn_exit $as_status
26265} # as_fn_error
26266
26267
26268# as_fn_set_status STATUS
26269# -----------------------
26270# Set $? to STATUS, without forking.
26271as_fn_set_status ()
26272{
26273 return $1
26274} # as_fn_set_status
26275
26276# as_fn_exit STATUS
26277# -----------------
26278# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
26279as_fn_exit ()
26280{
26281 set +e
26282 as_fn_set_status $1
26283 exit $1
26284} # as_fn_exit
26285
26286# as_fn_unset VAR
26287# ---------------
26288# Portably unset VAR.
26289as_fn_unset ()
26290{
26291 { eval $1=; unset $1;}
26292}
26293as_unset=as_fn_unset
26294# as_fn_append VAR VALUE
26295# ----------------------
26296# Append the text in VALUE to the end of the definition contained in VAR. Take
26297# advantage of any shell optimizations that allow amortized linear growth over
26298# repeated appends, instead of the typical quadratic growth present in naive
26299# implementations.
26300if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
26301 eval 'as_fn_append ()
26302 {
26303 eval $1+=\$2
26304 }'
26305else
26306 as_fn_append ()
26307 {
26308 eval $1=\$$1\$2
26309 }
26310fi # as_fn_append
26311
26312# as_fn_arith ARG...
26313# ------------------
26314# Perform arithmetic evaluation on the ARGs, and store the result in the
26315# global $as_val. Take advantage of shells that can avoid forks. The arguments
26316# must be portable across $(()) and expr.
26317if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
26318 eval 'as_fn_arith ()
26319 {
26320 as_val=$(( $* ))
26321 }'
26322else
26323 as_fn_arith ()
26324 {
26325 as_val=`expr "$@" || test $? -eq 1`
26326 }
26327fi # as_fn_arith
26328
26329
26330if expr a : '\(a\)' >/dev/null 2>&1 &&
26331 test "X`expr 00001 : '.*\(...\)'`" = X001; then
26332 as_expr=expr
26333else
26334 as_expr=false
26335fi
26336
26337if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
26338 as_basename=basename
26339else
26340 as_basename=false
26341fi
26342
26343if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
26344 as_dirname=dirname
26345else
26346 as_dirname=false
26347fi
26348
26349as_me=`$as_basename -- "$0" ||
26350$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26351 X"$0" : 'X\(//\)$' \| \
26352 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
26353$as_echo X/"$0" |
26354 sed '/^.*\/\([^/][^/]*\)\/*$/{
26355 s//\1/
26356 q
26357 }
26358 /^X\/\(\/\/\)$/{
26359 s//\1/
26360 q
26361 }
26362 /^X\/\(\/\).*/{
26363 s//\1/
26364 q
26365 }
26366 s/.*/./; q'`
26367
26368# Avoid depending upon Character Ranges.
26369as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26370as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26371as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26372as_cr_digits='0123456789'
26373as_cr_alnum=$as_cr_Letters$as_cr_digits
26374
26375ECHO_C= ECHO_N= ECHO_T=
26376case `echo -n x` in #(((((
26377-n*)
26378 case `echo 'xy\c'` in
26379 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
26380 xy) ECHO_C='\c';;
26381 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
26382 ECHO_T=' ';;
26383 esac;;
26384*)
26385 ECHO_N='-n';;
26386esac
26387
26388rm -f conf$$ conf$$.exe conf$$.file
26389if test -d conf$$.dir; then
26390 rm -f conf$$.dir/conf$$.file
26391else
26392 rm -f conf$$.dir
26393 mkdir conf$$.dir 2>/dev/null
26394fi
26395if (echo >conf$$.file) 2>/dev/null; then
26396 if ln -s conf$$.file conf$$ 2>/dev/null; then
26397 as_ln_s='ln -s'
26398 # ... but there are two gotchas:
26399 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
26400 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 26401 # In both cases, we have to default to `cp -pR'.
c971b7fa 26402 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 26403 as_ln_s='cp -pR'
c971b7fa
PA
26404 elif ln conf$$.file conf$$ 2>/dev/null; then
26405 as_ln_s=ln
26406 else
d0ac1c44 26407 as_ln_s='cp -pR'
c971b7fa
PA
26408 fi
26409else
d0ac1c44 26410 as_ln_s='cp -pR'
c971b7fa
PA
26411fi
26412rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
26413rmdir conf$$.dir 2>/dev/null
26414
26415
26416# as_fn_mkdir_p
26417# -------------
26418# Create "$as_dir" as a directory, including parents if necessary.
26419as_fn_mkdir_p ()
26420{
26421
26422 case $as_dir in #(
26423 -*) as_dir=./$as_dir;;
26424 esac
26425 test -d "$as_dir" || eval $as_mkdir_p || {
26426 as_dirs=
26427 while :; do
26428 case $as_dir in #(
26429 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
26430 *) as_qdir=$as_dir;;
26431 esac
26432 as_dirs="'$as_qdir' $as_dirs"
26433 as_dir=`$as_dirname -- "$as_dir" ||
26434$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26435 X"$as_dir" : 'X\(//\)[^/]' \| \
26436 X"$as_dir" : 'X\(//\)$' \| \
26437 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
26438$as_echo X"$as_dir" |
26439 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26440 s//\1/
26441 q
26442 }
26443 /^X\(\/\/\)[^/].*/{
26444 s//\1/
26445 q
26446 }
26447 /^X\(\/\/\)$/{
26448 s//\1/
26449 q
26450 }
26451 /^X\(\/\).*/{
26452 s//\1/
26453 q
26454 }
26455 s/.*/./; q'`
26456 test -d "$as_dir" && break
26457 done
26458 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 26459 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
c971b7fa
PA
26460
26461
26462} # as_fn_mkdir_p
26463if mkdir -p . 2>/dev/null; then
26464 as_mkdir_p='mkdir -p "$as_dir"'
26465else
26466 test -d ./-p && rmdir ./-p
26467 as_mkdir_p=false
26468fi
26469
d0ac1c44
SM
26470
26471# as_fn_executable_p FILE
26472# -----------------------
26473# Test if FILE is an executable regular file.
26474as_fn_executable_p ()
26475{
26476 test -f "$1" && test -x "$1"
26477} # as_fn_executable_p
26478as_test_x='test -x'
26479as_executable_p=as_fn_executable_p
c971b7fa
PA
26480
26481# Sed expression to map a string onto a valid CPP name.
26482as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
26483
26484# Sed expression to map a string onto a valid variable name.
26485as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
26486
26487
26488exec 6>&1
26489## ----------------------------------- ##
26490## Main body of $CONFIG_STATUS script. ##
26491## ----------------------------------- ##
26492_ASEOF
26493test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
26494
26495cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26496# Save the log message, to keep $0 and so on meaningful, and to
26497# report actual input values of CONFIG_FILES etc. instead of their
26498# values after options handling.
26499ac_log="
d0ac1c44
SM
26500This file was extended by libgnu $as_me UNUSED-VERSION, which was
26501generated by GNU Autoconf 2.69. Invocation command line was
c971b7fa
PA
26502
26503 CONFIG_FILES = $CONFIG_FILES
26504 CONFIG_HEADERS = $CONFIG_HEADERS
26505 CONFIG_LINKS = $CONFIG_LINKS
26506 CONFIG_COMMANDS = $CONFIG_COMMANDS
26507 $ $0 $@
26508
26509on `(hostname || uname -n) 2>/dev/null | sed 1q`
26510"
26511
26512_ACEOF
26513
26514case $ac_config_files in *"
26515"*) set x $ac_config_files; shift; ac_config_files=$*;;
26516esac
26517
26518case $ac_config_headers in *"
26519"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
26520esac
26521
26522
26523cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26524# Files that config.status was made for.
26525config_files="$ac_config_files"
26526config_headers="$ac_config_headers"
26527config_commands="$ac_config_commands"
26528
26529_ACEOF
26530
26531cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26532ac_cs_usage="\
26533\`$as_me' instantiates files and other configuration actions
26534from templates according to the current configuration. Unless the files
26535and actions are specified as TAGs, all are instantiated by default.
26536
26537Usage: $0 [OPTION]... [TAG]...
26538
26539 -h, --help print this help, then exit
26540 -V, --version print version number and configuration settings, then exit
d0ac1c44 26541 --config print configuration, then exit
c971b7fa
PA
26542 -q, --quiet, --silent
26543 do not print progress messages
26544 -d, --debug don't remove temporary files
26545 --recheck update $as_me by reconfiguring in the same conditions
26546 --file=FILE[:TEMPLATE]
26547 instantiate the configuration file FILE
26548 --header=FILE[:TEMPLATE]
26549 instantiate the configuration header FILE
26550
26551Configuration files:
26552$config_files
26553
26554Configuration headers:
26555$config_headers
26556
26557Configuration commands:
26558$config_commands
26559
26560Report bugs to the package provider."
26561
26562_ACEOF
26563cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 26564ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
c971b7fa 26565ac_cs_version="\\
d0ac1c44
SM
26566libgnu config.status UNUSED-VERSION
26567configured by $0, generated by GNU Autoconf 2.69,
26568 with options \\"\$ac_cs_config\\"
c971b7fa 26569
d0ac1c44 26570Copyright (C) 2012 Free Software Foundation, Inc.
c971b7fa
PA
26571This config.status script is free software; the Free Software Foundation
26572gives unlimited permission to copy, distribute and modify it."
26573
26574ac_pwd='$ac_pwd'
26575srcdir='$srcdir'
26576INSTALL='$INSTALL'
26577MKDIR_P='$MKDIR_P'
26578AWK='$AWK'
26579test -n "\$AWK" || AWK=awk
26580_ACEOF
26581
26582cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26583# The default lists apply if the user does not specify any file.
26584ac_need_defaults=:
26585while test $# != 0
26586do
26587 case $1 in
d0ac1c44 26588 --*=?*)
c971b7fa
PA
26589 ac_option=`expr "X$1" : 'X\([^=]*\)='`
26590 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
26591 ac_shift=:
26592 ;;
d0ac1c44
SM
26593 --*=)
26594 ac_option=`expr "X$1" : 'X\([^=]*\)='`
26595 ac_optarg=
26596 ac_shift=:
26597 ;;
c971b7fa
PA
26598 *)
26599 ac_option=$1
26600 ac_optarg=$2
26601 ac_shift=shift
26602 ;;
26603 esac
26604
26605 case $ac_option in
26606 # Handling of the options.
26607 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26608 ac_cs_recheck=: ;;
26609 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
26610 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
26611 --config | --confi | --conf | --con | --co | --c )
26612 $as_echo "$ac_cs_config"; exit ;;
c971b7fa
PA
26613 --debug | --debu | --deb | --de | --d | -d )
26614 debug=: ;;
26615 --file | --fil | --fi | --f )
26616 $ac_shift
26617 case $ac_optarg in
26618 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 26619 '') as_fn_error $? "missing file argument" ;;
c971b7fa
PA
26620 esac
26621 as_fn_append CONFIG_FILES " '$ac_optarg'"
26622 ac_need_defaults=false;;
26623 --header | --heade | --head | --hea )
26624 $ac_shift
26625 case $ac_optarg in
26626 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
26627 esac
26628 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
26629 ac_need_defaults=false;;
26630 --he | --h)
26631 # Conflict between --help and --header
d0ac1c44 26632 as_fn_error $? "ambiguous option: \`$1'
c971b7fa
PA
26633Try \`$0 --help' for more information.";;
26634 --help | --hel | -h )
26635 $as_echo "$ac_cs_usage"; exit ;;
26636 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
26637 | -silent | --silent | --silen | --sile | --sil | --si | --s)
26638 ac_cs_silent=: ;;
26639
26640 # This is an error.
d0ac1c44 26641 -*) as_fn_error $? "unrecognized option: \`$1'
c971b7fa
PA
26642Try \`$0 --help' for more information." ;;
26643
26644 *) as_fn_append ac_config_targets " $1"
26645 ac_need_defaults=false ;;
26646
26647 esac
26648 shift
26649done
26650
26651ac_configure_extra_args=
26652
26653if $ac_cs_silent; then
26654 exec 6>/dev/null
26655 ac_configure_extra_args="$ac_configure_extra_args --silent"
26656fi
26657
26658_ACEOF
26659cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26660if \$ac_cs_recheck; then
d0ac1c44 26661 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
c971b7fa
PA
26662 shift
26663 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
26664 CONFIG_SHELL='$SHELL'
26665 export CONFIG_SHELL
26666 exec "\$@"
26667fi
26668
26669_ACEOF
26670cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26671exec 5>>config.log
26672{
26673 echo
26674 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
26675## Running $as_me. ##
26676_ASBOX
26677 $as_echo "$ac_log"
26678} >&5
26679
26680_ACEOF
26681cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26682#
26683# INIT-COMMANDS
26684#
26685AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
26686
26687_ACEOF
26688
26689cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26690
26691# Handling of arguments.
26692for ac_config_target in $ac_config_targets
26693do
26694 case $ac_config_target in
26695 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
26696 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
26697 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
26698 "import/Makefile") CONFIG_FILES="$CONFIG_FILES import/Makefile" ;;
26699 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
26700
d0ac1c44 26701 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c971b7fa
PA
26702 esac
26703done
26704
26705
26706# If the user did not use the arguments to specify the items to instantiate,
26707# then the envvar interface is used. Set only those that are not.
26708# We use the long form for the default assignment because of an extremely
26709# bizarre bug on SunOS 4.1.3.
26710if $ac_need_defaults; then
26711 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26712 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26713 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
26714fi
26715
26716# Have a temporary directory for convenience. Make it in the build tree
26717# simply because there is no reason against having it here, and in addition,
26718# creating and moving files from /tmp can sometimes cause problems.
26719# Hook for its removal unless debugging.
26720# Note that there is a small window in which the directory will not be cleaned:
26721# after its creation but before its name has been assigned to `$tmp'.
26722$debug ||
26723{
d0ac1c44 26724 tmp= ac_tmp=
c971b7fa 26725 trap 'exit_status=$?
d0ac1c44
SM
26726 : "${ac_tmp:=$tmp}"
26727 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
c971b7fa
PA
26728' 0
26729 trap 'as_fn_exit 1' 1 2 13 15
26730}
26731# Create a (secure) tmp directory for tmp files.
26732
26733{
26734 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 26735 test -d "$tmp"
c971b7fa
PA
26736} ||
26737{
26738 tmp=./conf$$-$RANDOM
26739 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
26740} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
26741ac_tmp=$tmp
c971b7fa
PA
26742
26743# Set up the scripts for CONFIG_FILES section.
26744# No need to generate them if there are no CONFIG_FILES.
26745# This happens for instance with `./config.status config.h'.
26746if test -n "$CONFIG_FILES"; then
26747
26748
26749ac_cr=`echo X | tr X '\015'`
26750# On cygwin, bash can eat \r inside `` if the user requested igncr.
26751# But we know of no other shell where ac_cr would be empty at this
26752# point, so we can use a bashism as a fallback.
26753if test "x$ac_cr" = x; then
26754 eval ac_cr=\$\'\\r\'
26755fi
26756ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
26757if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 26758 ac_cs_awk_cr='\\r'
c971b7fa
PA
26759else
26760 ac_cs_awk_cr=$ac_cr
26761fi
26762
d0ac1c44 26763echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
c971b7fa
PA
26764_ACEOF
26765
26766
26767{
26768 echo "cat >conf$$subs.awk <<_ACEOF" &&
26769 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
26770 echo "_ACEOF"
26771} >conf$$subs.sh ||
d0ac1c44
SM
26772 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
26773ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
c971b7fa
PA
26774ac_delim='%!_!# '
26775for ac_last_try in false false false false false :; do
26776 . ./conf$$subs.sh ||
d0ac1c44 26777 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
c971b7fa
PA
26778
26779 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
26780 if test $ac_delim_n = $ac_delim_num; then
26781 break
26782 elif $ac_last_try; then
d0ac1c44 26783 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
c971b7fa
PA
26784 else
26785 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26786 fi
26787done
26788rm -f conf$$subs.sh
26789
26790cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 26791cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
c971b7fa
PA
26792_ACEOF
26793sed -n '
26794h
26795s/^/S["/; s/!.*/"]=/
26796p
26797g
26798s/^[^!]*!//
26799:repl
26800t repl
26801s/'"$ac_delim"'$//
26802t delim
26803:nl
26804h
d0ac1c44 26805s/\(.\{148\}\)..*/\1/
c971b7fa
PA
26806t more1
26807s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
26808p
26809n
26810b repl
26811:more1
26812s/["\\]/\\&/g; s/^/"/; s/$/"\\/
26813p
26814g
26815s/.\{148\}//
26816t nl
26817:delim
26818h
d0ac1c44 26819s/\(.\{148\}\)..*/\1/
c971b7fa
PA
26820t more2
26821s/["\\]/\\&/g; s/^/"/; s/$/"/
26822p
26823b
26824:more2
26825s/["\\]/\\&/g; s/^/"/; s/$/"\\/
26826p
26827g
26828s/.\{148\}//
26829t delim
26830' <conf$$subs.awk | sed '
26831/^[^""]/{
26832 N
26833 s/\n//
26834}
26835' >>$CONFIG_STATUS || ac_write_fail=1
26836rm -f conf$$subs.awk
26837cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26838_ACAWK
d0ac1c44 26839cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
c971b7fa
PA
26840 for (key in S) S_is_set[key] = 1
26841 FS = "\a"
26842
26843}
26844{
26845 line = $ 0
26846 nfields = split(line, field, "@")
26847 substed = 0
26848 len = length(field[1])
26849 for (i = 2; i < nfields; i++) {
26850 key = field[i]
26851 keylen = length(key)
26852 if (S_is_set[key]) {
26853 value = S[key]
26854 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
26855 len += length(value) + length(field[++i])
26856 substed = 1
26857 } else
26858 len += 1 + keylen
26859 }
26860
26861 print line
26862}
26863
26864_ACAWK
26865_ACEOF
26866cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26867if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
26868 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
26869else
26870 cat
d0ac1c44
SM
26871fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
26872 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
c971b7fa
PA
26873_ACEOF
26874
d0ac1c44
SM
26875# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
26876# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
c971b7fa
PA
26877# trailing colons and then remove the whole line if VPATH becomes empty
26878# (actually we leave an empty line to preserve line numbers).
26879if test "x$srcdir" = x.; then
d0ac1c44
SM
26880 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
26881h
26882s///
26883s/^/:/
26884s/[ ]*$/:/
26885s/:\$(srcdir):/:/g
26886s/:\${srcdir}:/:/g
26887s/:@srcdir@:/:/g
26888s/^:*//
c971b7fa 26889s/:*$//
d0ac1c44
SM
26890x
26891s/\(=[ ]*\).*/\1/
26892G
26893s/\n//
c971b7fa
PA
26894s/^[^=]*=[ ]*$//
26895}'
26896fi
26897
26898cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26899fi # test -n "$CONFIG_FILES"
26900
26901# Set up the scripts for CONFIG_HEADERS section.
26902# No need to generate them if there are no CONFIG_HEADERS.
26903# This happens for instance with `./config.status Makefile'.
26904if test -n "$CONFIG_HEADERS"; then
d0ac1c44 26905cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
c971b7fa
PA
26906BEGIN {
26907_ACEOF
26908
26909# Transform confdefs.h into an awk script `defines.awk', embedded as
26910# here-document in config.status, that substitutes the proper values into
26911# config.h.in to produce config.h.
26912
26913# Create a delimiter string that does not exist in confdefs.h, to ease
26914# handling of long lines.
26915ac_delim='%!_!# '
26916for ac_last_try in false false :; do
d0ac1c44
SM
26917 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
26918 if test -z "$ac_tt"; then
c971b7fa
PA
26919 break
26920 elif $ac_last_try; then
d0ac1c44 26921 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
c971b7fa
PA
26922 else
26923 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26924 fi
26925done
26926
26927# For the awk script, D is an array of macro values keyed by name,
26928# likewise P contains macro parameters if any. Preserve backslash
26929# newline sequences.
26930
26931ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26932sed -n '
26933s/.\{148\}/&'"$ac_delim"'/g
26934t rset
26935:rset
26936s/^[ ]*#[ ]*define[ ][ ]*/ /
26937t def
26938d
26939:def
26940s/\\$//
26941t bsnl
26942s/["\\]/\\&/g
26943s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
26944D["\1"]=" \3"/p
26945s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
26946d
26947:bsnl
26948s/["\\]/\\&/g
26949s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
26950D["\1"]=" \3\\\\\\n"\\/p
26951t cont
26952s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
26953t cont
26954d
26955:cont
26956n
26957s/.\{148\}/&'"$ac_delim"'/g
26958t clear
26959:clear
26960s/\\$//
26961t bsnlc
26962s/["\\]/\\&/g; s/^/"/; s/$/"/p
26963d
26964:bsnlc
26965s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
26966b cont
26967' <confdefs.h | sed '
26968s/'"$ac_delim"'/"\\\
26969"/g' >>$CONFIG_STATUS || ac_write_fail=1
26970
26971cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26972 for (key in D) D_is_set[key] = 1
26973 FS = "\a"
26974}
26975/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
26976 line = \$ 0
26977 split(line, arg, " ")
26978 if (arg[1] == "#") {
26979 defundef = arg[2]
26980 mac1 = arg[3]
26981 } else {
26982 defundef = substr(arg[1], 2)
26983 mac1 = arg[2]
26984 }
26985 split(mac1, mac2, "(") #)
26986 macro = mac2[1]
26987 prefix = substr(line, 1, index(line, defundef) - 1)
26988 if (D_is_set[macro]) {
26989 # Preserve the white space surrounding the "#".
26990 print prefix "define", macro P[macro] D[macro]
26991 next
26992 } else {
26993 # Replace #undef with comments. This is necessary, for example,
26994 # in the case of _POSIX_SOURCE, which is predefined and required
26995 # on some systems where configure will not decide to define it.
26996 if (defundef == "undef") {
26997 print "/*", prefix defundef, macro, "*/"
26998 next
26999 }
27000 }
27001}
27002{ print }
27003_ACAWK
27004_ACEOF
27005cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 27006 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
c971b7fa
PA
27007fi # test -n "$CONFIG_HEADERS"
27008
27009
27010eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
27011shift
27012for ac_tag
27013do
27014 case $ac_tag in
27015 :[FHLC]) ac_mode=$ac_tag; continue;;
27016 esac
27017 case $ac_mode$ac_tag in
27018 :[FHL]*:*);;
d0ac1c44 27019 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
c971b7fa
PA
27020 :[FH]-) ac_tag=-:-;;
27021 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
27022 esac
27023 ac_save_IFS=$IFS
27024 IFS=:
27025 set x $ac_tag
27026 IFS=$ac_save_IFS
27027 shift
27028 ac_file=$1
27029 shift
27030
27031 case $ac_mode in
27032 :L) ac_source=$1;;
27033 :[FH])
27034 ac_file_inputs=
27035 for ac_f
27036 do
27037 case $ac_f in
d0ac1c44 27038 -) ac_f="$ac_tmp/stdin";;
c971b7fa
PA
27039 *) # Look for the file first in the build tree, then in the source tree
27040 # (if the path is not absolute). The absolute path cannot be DOS-style,
27041 # because $ac_f cannot contain `:'.
27042 test -f "$ac_f" ||
27043 case $ac_f in
27044 [\\/$]*) false;;
27045 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
27046 esac ||
d0ac1c44 27047 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
c971b7fa
PA
27048 esac
27049 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
27050 as_fn_append ac_file_inputs " '$ac_f'"
27051 done
27052
27053 # Let's still pretend it is `configure' which instantiates (i.e., don't
27054 # use $as_me), people would be surprised to read:
27055 # /* config.h. Generated by config.status. */
27056 configure_input='Generated from '`
27057 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
27058 `' by configure.'
27059 if test x"$ac_file" != x-; then
27060 configure_input="$ac_file. $configure_input"
27061 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
27062$as_echo "$as_me: creating $ac_file" >&6;}
27063 fi
27064 # Neutralize special characters interpreted by sed in replacement strings.
27065 case $configure_input in #(
27066 *\&* | *\|* | *\\* )
27067 ac_sed_conf_input=`$as_echo "$configure_input" |
27068 sed 's/[\\\\&|]/\\\\&/g'`;; #(
27069 *) ac_sed_conf_input=$configure_input;;
27070 esac
27071
27072 case $ac_tag in
d0ac1c44
SM
27073 *:-:* | *:-) cat >"$ac_tmp/stdin" \
27074 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
c971b7fa
PA
27075 esac
27076 ;;
27077 esac
27078
27079 ac_dir=`$as_dirname -- "$ac_file" ||
27080$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27081 X"$ac_file" : 'X\(//\)[^/]' \| \
27082 X"$ac_file" : 'X\(//\)$' \| \
27083 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
27084$as_echo X"$ac_file" |
27085 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27086 s//\1/
27087 q
27088 }
27089 /^X\(\/\/\)[^/].*/{
27090 s//\1/
27091 q
27092 }
27093 /^X\(\/\/\)$/{
27094 s//\1/
27095 q
27096 }
27097 /^X\(\/\).*/{
27098 s//\1/
27099 q
27100 }
27101 s/.*/./; q'`
27102 as_dir="$ac_dir"; as_fn_mkdir_p
27103 ac_builddir=.
27104
27105case "$ac_dir" in
27106.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27107*)
27108 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
27109 # A ".." for each directory in $ac_dir_suffix.
27110 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
27111 case $ac_top_builddir_sub in
27112 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27113 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27114 esac ;;
27115esac
27116ac_abs_top_builddir=$ac_pwd
27117ac_abs_builddir=$ac_pwd$ac_dir_suffix
27118# for backward compatibility:
27119ac_top_builddir=$ac_top_build_prefix
27120
27121case $srcdir in
27122 .) # We are building in place.
27123 ac_srcdir=.
27124 ac_top_srcdir=$ac_top_builddir_sub
27125 ac_abs_top_srcdir=$ac_pwd ;;
27126 [\\/]* | ?:[\\/]* ) # Absolute name.
27127 ac_srcdir=$srcdir$ac_dir_suffix;
27128 ac_top_srcdir=$srcdir
27129 ac_abs_top_srcdir=$srcdir ;;
27130 *) # Relative name.
27131 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
27132 ac_top_srcdir=$ac_top_build_prefix$srcdir
27133 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
27134esac
27135ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
27136
27137
27138 case $ac_mode in
27139 :F)
27140 #
27141 # CONFIG_FILE
27142 #
27143
27144 case $INSTALL in
27145 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
27146 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
27147 esac
27148 ac_MKDIR_P=$MKDIR_P
27149 case $MKDIR_P in
27150 [\\/$]* | ?:[\\/]* ) ;;
27151 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
27152 esac
27153_ACEOF
27154
27155cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27156# If the template does not know about datarootdir, expand it.
27157# FIXME: This hack should be removed a few years after 2.60.
27158ac_datarootdir_hack=; ac_datarootdir_seen=
27159ac_sed_dataroot='
27160/datarootdir/ {
27161 p
27162 q
27163}
27164/@datadir@/p
27165/@docdir@/p
27166/@infodir@/p
27167/@localedir@/p
27168/@mandir@/p'
27169case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
27170*datarootdir*) ac_datarootdir_seen=yes;;
27171*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
27172 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
27173$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
27174_ACEOF
27175cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27176 ac_datarootdir_hack='
27177 s&@datadir@&$datadir&g
27178 s&@docdir@&$docdir&g
27179 s&@infodir@&$infodir&g
27180 s&@localedir@&$localedir&g
27181 s&@mandir@&$mandir&g
27182 s&\\\${datarootdir}&$datarootdir&g' ;;
27183esac
27184_ACEOF
27185
27186# Neutralize VPATH when `$srcdir' = `.'.
27187# Shell code in configure.ac might set extrasub.
27188# FIXME: do we really want to maintain this feature?
27189cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27190ac_sed_extra="$ac_vpsub
27191$extrasub
27192_ACEOF
27193cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27194:t
27195/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
27196s|@configure_input@|$ac_sed_conf_input|;t t
27197s&@top_builddir@&$ac_top_builddir_sub&;t t
27198s&@top_build_prefix@&$ac_top_build_prefix&;t t
27199s&@srcdir@&$ac_srcdir&;t t
27200s&@abs_srcdir@&$ac_abs_srcdir&;t t
27201s&@top_srcdir@&$ac_top_srcdir&;t t
27202s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
27203s&@builddir@&$ac_builddir&;t t
27204s&@abs_builddir@&$ac_abs_builddir&;t t
27205s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
27206s&@INSTALL@&$ac_INSTALL&;t t
27207s&@MKDIR_P@&$ac_MKDIR_P&;t t
27208$ac_datarootdir_hack
27209"
d0ac1c44
SM
27210eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
27211 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
c971b7fa
PA
27212
27213test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
27214 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
27215 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
27216 "$ac_tmp/out"`; test -z "$ac_out"; } &&
c971b7fa 27217 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 27218which seems to be undefined. Please make sure it is defined" >&5
c971b7fa 27219$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 27220which seems to be undefined. Please make sure it is defined" >&2;}
c971b7fa 27221
d0ac1c44 27222 rm -f "$ac_tmp/stdin"
c971b7fa 27223 case $ac_file in
d0ac1c44
SM
27224 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
27225 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
c971b7fa 27226 esac \
d0ac1c44 27227 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
c971b7fa
PA
27228 ;;
27229 :H)
27230 #
27231 # CONFIG_HEADER
27232 #
27233 if test x"$ac_file" != x-; then
27234 {
27235 $as_echo "/* $configure_input */" \
d0ac1c44
SM
27236 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
27237 } >"$ac_tmp/config.h" \
27238 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
27239 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
c971b7fa
PA
27240 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
27241$as_echo "$as_me: $ac_file is unchanged" >&6;}
27242 else
27243 rm -f "$ac_file"
d0ac1c44
SM
27244 mv "$ac_tmp/config.h" "$ac_file" \
27245 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
c971b7fa
PA
27246 fi
27247 else
27248 $as_echo "/* $configure_input */" \
d0ac1c44
SM
27249 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
27250 || as_fn_error $? "could not create -" "$LINENO" 5
c971b7fa
PA
27251 fi
27252# Compute "$ac_file"'s index in $config_headers.
27253_am_arg="$ac_file"
27254_am_stamp_count=1
27255for _am_header in $config_headers :; do
27256 case $_am_header in
27257 $_am_arg | $_am_arg:* )
27258 break ;;
27259 * )
27260 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
27261 esac
27262done
27263echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
27264$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27265 X"$_am_arg" : 'X\(//\)[^/]' \| \
27266 X"$_am_arg" : 'X\(//\)$' \| \
27267 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
27268$as_echo X"$_am_arg" |
27269 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27270 s//\1/
27271 q
27272 }
27273 /^X\(\/\/\)[^/].*/{
27274 s//\1/
27275 q
27276 }
27277 /^X\(\/\/\)$/{
27278 s//\1/
27279 q
27280 }
27281 /^X\(\/\).*/{
27282 s//\1/
27283 q
27284 }
27285 s/.*/./; q'`/stamp-h$_am_stamp_count
27286 ;;
27287
27288 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
27289$as_echo "$as_me: executing $ac_file commands" >&6;}
27290 ;;
27291 esac
27292
27293
27294 case $ac_file$ac_mode in
27295 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
d0ac1c44 27296 # Older Autoconf quotes --file arguments for eval, but not when files
c971b7fa
PA
27297 # are listed without --file. Let's play safe and only enable the eval
27298 # if we detect the quoting.
27299 case $CONFIG_FILES in
27300 *\'*) eval set x "$CONFIG_FILES" ;;
27301 *) set x $CONFIG_FILES ;;
27302 esac
27303 shift
27304 for mf
27305 do
27306 # Strip MF so we end up with the name of the file.
27307 mf=`echo "$mf" | sed -e 's/:.*$//'`
27308 # Check whether this is an Automake generated Makefile or not.
d0ac1c44 27309 # We used to match only the files named 'Makefile.in', but
c971b7fa
PA
27310 # some people rename them; so instead we look at the file content.
27311 # Grep'ing the first line is not enough: some people post-process
27312 # each Makefile.in and add a new line on top of each file to say so.
27313 # Grep'ing the whole file is not good either: AIX grep has a line
27314 # limit of 2048, but all sed's we know have understand at least 4000.
27315 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
27316 dirpart=`$as_dirname -- "$mf" ||
27317$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27318 X"$mf" : 'X\(//\)[^/]' \| \
27319 X"$mf" : 'X\(//\)$' \| \
27320 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
27321$as_echo X"$mf" |
27322 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27323 s//\1/
27324 q
27325 }
27326 /^X\(\/\/\)[^/].*/{
27327 s//\1/
27328 q
27329 }
27330 /^X\(\/\/\)$/{
27331 s//\1/
27332 q
27333 }
27334 /^X\(\/\).*/{
27335 s//\1/
27336 q
27337 }
27338 s/.*/./; q'`
27339 else
27340 continue
27341 fi
27342 # Extract the definition of DEPDIR, am__include, and am__quote
d0ac1c44 27343 # from the Makefile without running 'make'.
c971b7fa
PA
27344 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
27345 test -z "$DEPDIR" && continue
27346 am__include=`sed -n 's/^am__include = //p' < "$mf"`
d0ac1c44 27347 test -z "$am__include" && continue
c971b7fa 27348 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
c971b7fa
PA
27349 # Find all dependency output files, they are included files with
27350 # $(DEPDIR) in their names. We invoke sed twice because it is the
27351 # simplest approach to changing $(DEPDIR) to its actual value in the
27352 # expansion.
27353 for file in `sed -n "
27354 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
d0ac1c44 27355 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
c971b7fa
PA
27356 # Make sure the directory exists.
27357 test -f "$dirpart/$file" && continue
27358 fdir=`$as_dirname -- "$file" ||
27359$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27360 X"$file" : 'X\(//\)[^/]' \| \
27361 X"$file" : 'X\(//\)$' \| \
27362 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
27363$as_echo X"$file" |
27364 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27365 s//\1/
27366 q
27367 }
27368 /^X\(\/\/\)[^/].*/{
27369 s//\1/
27370 q
27371 }
27372 /^X\(\/\/\)$/{
27373 s//\1/
27374 q
27375 }
27376 /^X\(\/\).*/{
27377 s//\1/
27378 q
27379 }
27380 s/.*/./; q'`
27381 as_dir=$dirpart/$fdir; as_fn_mkdir_p
27382 # echo "creating $dirpart/$file"
27383 echo '# dummy' > "$dirpart/$file"
27384 done
27385 done
27386}
27387 ;;
27388 "default":C)
27389case x$CONFIG_HEADERS in
27390xconfig.h:config.in)
27391echo > stamp-h ;;
27392esac
27393 ;;
27394
27395 esac
27396done # for ac_tag
27397
27398
27399as_fn_exit 0
27400_ACEOF
27401ac_clean_files=$ac_clean_files_save
27402
27403test $ac_write_fail = 0 ||
d0ac1c44 27404 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
c971b7fa
PA
27405
27406
27407# configure is writing to config.log, and then calls config.status.
27408# config.status does its own redirection, appending to config.log.
27409# Unfortunately, on DOS this fails, as config.log is still kept open
27410# by configure, so config.status won't be able to write to it; its
27411# output is simply discarded. So we exec the FD to /dev/null,
27412# effectively closing config.log, so it can be properly (re)opened and
27413# appended to by config.status. When coming back to configure, we
27414# need to make the FD available again.
27415if test "$no_create" != yes; then
27416 ac_cs_success=:
27417 ac_config_status_args=
27418 test "$silent" = yes &&
27419 ac_config_status_args="$ac_config_status_args --quiet"
27420 exec 5>/dev/null
27421 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
27422 exec 5>>config.log
27423 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27424 # would make configure fail if this is the last instruction.
d0ac1c44 27425 $ac_cs_success || as_fn_exit 1
c971b7fa
PA
27426fi
27427if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
27428 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
27429$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
27430fi
27431
27432
27433exit 0
This page took 1.796128 seconds and 4 git commands to generate.