Fix ld action in run_dump_test
[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 622gl_header_list=
725e2999 623gl_func_list=
8690e634 624gl_fnmatch_required=POSIX
c971b7fa
PA
625ac_subst_vars='am__EXEEXT_FALSE
626am__EXEEXT_TRUE
627gltests_LTLIBOBJS
628gltests_LIBOBJS
629gl_LTLIBOBJS
630gl_LIBOBJS
631LTLIBOBJS
632LIBOBJS
633LN_S
39be3c7e
SM
634AM_BACKSLASH
635AM_DEFAULT_VERBOSITY
d0ac1c44
SM
636AM_DEFAULT_V
637AM_V
c971b7fa
PA
638am__fastdepCC_FALSE
639am__fastdepCC_TRUE
640CCDEPMODE
d0ac1c44 641am__nodep
c971b7fa
PA
642AMDEPBACKSLASH
643AMDEP_FALSE
644AMDEP_TRUE
645am__quote
646am__include
647DEPDIR
648am__untar
649am__tar
650AMTAR
651am__leading_dot
652SET_MAKE
653AWK
654mkdir_p
c971b7fa
PA
655INSTALL_STRIP_PROGRAM
656STRIP
657install_sh
658MAKEINFO
659AUTOHEADER
660AUTOMAKE
661AUTOCONF
662ACLOCAL
663VERSION
664PACKAGE
665CYGPATH_W
666am__isrc
667INSTALL_DATA
668INSTALL_SCRIPT
669INSTALL_PROGRAM
670LIBGNU_LTLIBDEPS
671LIBGNU_LIBDEPS
672gltests_WITNESS
8690e634
JK
673REPLACE_TOWLOWER
674REPLACE_ISWCNTRL
675HAVE_WCTYPE_H
676NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
677NEXT_WCTYPE_H
678HAVE_ISWCNTRL
679REPLACE_ISWBLANK
680HAVE_WCTRANS_T
681HAVE_WCTYPE_T
682HAVE_ISWBLANK
683GNULIB_TOWCTRANS
684GNULIB_WCTRANS
685GNULIB_ISWCTYPE
686GNULIB_WCTYPE
687GNULIB_ISWBLANK
688HAVE_WINT_T
8690e634
JK
689NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
690NEXT_WCHAR_H
8839a007
PA
691HAVE_UNISTD_H
692NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
693NEXT_UNISTD_H
4a626d0a 694UNISTD_H_DEFINES_STRUCT_TIMESPEC
09607c9e
TT
695PTHREAD_H_DEFINES_STRUCT_TIMESPEC
696SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
697TIME_H_DEFINES_STRUCT_TIMESPEC
698NEXT_AS_FIRST_DIRECTIVE_TIME_H
699NEXT_TIME_H
5e8754f9
SDJ
700REPLACE_LOCALTIME
701REPLACE_GMTIME
702REPLACE_TIMEGM
703REPLACE_NANOSLEEP
704REPLACE_MKTIME
705REPLACE_LOCALTIME_R
706HAVE_TIMEGM
707HAVE_STRPTIME
708HAVE_NANOSLEEP
709HAVE_DECL_LOCALTIME_R
710GNULIB_TIME_RZ
711GNULIB_TIME_R
712GNULIB_TIMEGM
713GNULIB_STRPTIME
714GNULIB_NANOSLEEP
715GNULIB_MKTIME
725e2999
JB
716HAVE_SYS_UIO_H
717NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H
718NEXT_SYS_UIO_H
63ce7108
TT
719WINDOWS_64_BIT_OFF_T
720NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
721NEXT_SYS_TYPES_H
2196f55f
YQ
722NEXT_AS_FIRST_DIRECTIVE_STRING_H
723NEXT_STRING_H
98399780
YQ
724NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
725NEXT_STDLIB_H
6a29c58e
YQ
726NEXT_AS_FIRST_DIRECTIVE_STDIO_H
727NEXT_STDIO_H
2196f55f
YQ
728NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
729NEXT_STDDEF_H
730GL_GENERATE_STDDEF_H_FALSE
731GL_GENERATE_STDDEF_H_TRUE
732STDDEF_H
733HAVE_WCHAR_T
4a626d0a 734HAVE_MAX_ALIGN_T
2196f55f
YQ
735REPLACE_NULL
736HAVE__BOOL
737GL_GENERATE_STDBOOL_H_FALSE
738GL_GENERATE_STDBOOL_H_TRUE
739STDBOOL_H
725e2999
JB
740GL_GENERATE_STDALIGN_H_FALSE
741GL_GENERATE_STDALIGN_H_TRUE
742STDALIGN_H
0750520d
PA
743NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
744NEXT_SIGNAL_H
745REPLACE_RAISE
746REPLACE_PTHREAD_SIGMASK
747HAVE_SIGHANDLER_T
748HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
749HAVE_STRUCT_SIGACTION_SA_SIGACTION
750HAVE_SIGACTION
751HAVE_SIGINFO_T
752HAVE_SIGSET_T
753HAVE_RAISE
754HAVE_PTHREAD_SIGMASK
755HAVE_POSIX_SIGNALBLOCKING
756GNULIB_SIGACTION
757GNULIB_SIGPROCMASK
758GNULIB_SIGNAL_H_SIGPIPE
759GNULIB_RAISE
760GNULIB_PTHREAD_SIGMASK
6a29c58e
YQ
761REPLACE_VSPRINTF
762REPLACE_VSNPRINTF
763REPLACE_VPRINTF
764REPLACE_VFPRINTF
765REPLACE_VDPRINTF
766REPLACE_VASPRINTF
767REPLACE_TMPFILE
768REPLACE_STDIO_WRITE_FUNCS
769REPLACE_STDIO_READ_FUNCS
770REPLACE_SPRINTF
771REPLACE_SNPRINTF
772REPLACE_RENAMEAT
773REPLACE_RENAME
774REPLACE_REMOVE
775REPLACE_PRINTF
776REPLACE_POPEN
777REPLACE_PERROR
778REPLACE_OBSTACK_PRINTF
779REPLACE_GETLINE
780REPLACE_GETDELIM
781REPLACE_FTELLO
782REPLACE_FTELL
783REPLACE_FSEEKO
784REPLACE_FSEEK
785REPLACE_FREOPEN
786REPLACE_FPURGE
787REPLACE_FPRINTF
788REPLACE_FOPEN
789REPLACE_FFLUSH
790REPLACE_FDOPEN
791REPLACE_FCLOSE
792REPLACE_DPRINTF
793HAVE_VDPRINTF
794HAVE_VASPRINTF
795HAVE_RENAMEAT
796HAVE_POPEN
797HAVE_PCLOSE
798HAVE_FTELLO
799HAVE_FSEEKO
800HAVE_DPRINTF
801HAVE_DECL_VSNPRINTF
802HAVE_DECL_SNPRINTF
803HAVE_DECL_OBSTACK_PRINTF
804HAVE_DECL_GETLINE
805HAVE_DECL_GETDELIM
806HAVE_DECL_FTELLO
807HAVE_DECL_FSEEKO
808HAVE_DECL_FPURGE
809GNULIB_VSPRINTF_POSIX
810GNULIB_VSNPRINTF
811GNULIB_VPRINTF_POSIX
812GNULIB_VPRINTF
813GNULIB_VFPRINTF_POSIX
814GNULIB_VFPRINTF
815GNULIB_VDPRINTF
816GNULIB_VSCANF
817GNULIB_VFSCANF
818GNULIB_VASPRINTF
819GNULIB_TMPFILE
820GNULIB_STDIO_H_SIGPIPE
821GNULIB_STDIO_H_NONBLOCKING
822GNULIB_SPRINTF_POSIX
823GNULIB_SNPRINTF
824GNULIB_SCANF
825GNULIB_RENAMEAT
826GNULIB_RENAME
827GNULIB_REMOVE
828GNULIB_PUTS
829GNULIB_PUTCHAR
830GNULIB_PUTC
831GNULIB_PRINTF_POSIX
832GNULIB_PRINTF
833GNULIB_POPEN
834GNULIB_PERROR
835GNULIB_PCLOSE
836GNULIB_OBSTACK_PRINTF_POSIX
837GNULIB_OBSTACK_PRINTF
838GNULIB_GETLINE
839GNULIB_GETDELIM
840GNULIB_GETCHAR
841GNULIB_GETC
842GNULIB_FWRITE
843GNULIB_FTELLO
844GNULIB_FTELL
845GNULIB_FSEEKO
846GNULIB_FSEEK
847GNULIB_FSCANF
848GNULIB_FREOPEN
849GNULIB_FREAD
850GNULIB_FPUTS
851GNULIB_FPUTC
852GNULIB_FPURGE
853GNULIB_FPRINTF_POSIX
854GNULIB_FPRINTF
855GNULIB_FOPEN
856GNULIB_FGETS
857GNULIB_FGETC
858GNULIB_FFLUSH
859GNULIB_FDOPEN
860GNULIB_FCLOSE
861GNULIB_DPRINTF
725e2999
JB
862GL_GENERATE_NETINET_IN_H_FALSE
863GL_GENERATE_NETINET_IN_H_TRUE
864NETINET_IN_H
865HAVE_NETINET_IN_H
866NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H
867NEXT_NETINET_IN_H
c971b7fa 868UNDEFINE_STRTOK_R
5e8754f9 869REPLACE_STRTOK_R
c971b7fa 870REPLACE_STRSIGNAL
5e8754f9
SDJ
871REPLACE_STRNLEN
872REPLACE_STRNDUP
873REPLACE_STRNCAT
c971b7fa
PA
874REPLACE_STRERROR_R
875REPLACE_STRERROR
5e8754f9 876REPLACE_STRCHRNUL
c971b7fa
PA
877REPLACE_STRCASESTR
878REPLACE_STRSTR
879REPLACE_STRDUP
880REPLACE_STPNCPY
881REPLACE_MEMMEM
882REPLACE_MEMCHR
883HAVE_STRVERSCMP
884HAVE_DECL_STRSIGNAL
885HAVE_DECL_STRERROR_R
886HAVE_DECL_STRTOK_R
887HAVE_STRCASESTR
888HAVE_STRSEP
889HAVE_STRPBRK
890HAVE_DECL_STRNLEN
891HAVE_DECL_STRNDUP
892HAVE_DECL_STRDUP
893HAVE_STRCHRNUL
894HAVE_STPNCPY
895HAVE_STPCPY
896HAVE_RAWMEMCHR
897HAVE_DECL_MEMRCHR
898HAVE_MEMPCPY
899HAVE_DECL_MEMMEM
900HAVE_MEMCHR
901HAVE_FFSLL
902HAVE_FFSL
903HAVE_MBSLEN
904GNULIB_STRVERSCMP
905GNULIB_STRSIGNAL
906GNULIB_STRERROR_R
907GNULIB_STRERROR
908GNULIB_MBSTOK_R
909GNULIB_MBSSEP
910GNULIB_MBSSPN
911GNULIB_MBSPBRK
912GNULIB_MBSCSPN
913GNULIB_MBSCASESTR
914GNULIB_MBSPCASECMP
915GNULIB_MBSNCASECMP
916GNULIB_MBSCASECMP
917GNULIB_MBSSTR
918GNULIB_MBSRCHR
919GNULIB_MBSCHR
920GNULIB_MBSNLEN
921GNULIB_MBSLEN
922GNULIB_STRTOK_R
923GNULIB_STRCASESTR
924GNULIB_STRSTR
925GNULIB_STRSEP
926GNULIB_STRPBRK
927GNULIB_STRNLEN
928GNULIB_STRNDUP
929GNULIB_STRNCAT
930GNULIB_STRDUP
931GNULIB_STRCHRNUL
932GNULIB_STPNCPY
933GNULIB_STPCPY
934GNULIB_RAWMEMCHR
935GNULIB_MEMRCHR
936GNULIB_MEMPCPY
937GNULIB_MEMMEM
938GNULIB_MEMCHR
939GNULIB_FFSLL
940GNULIB_FFSL
8690e634
JK
941LOCALE_FR
942LOCALE_FR_UTF8
943LOCALE_ZH_CN
944LOCALE_JA
945REPLACE_WCSWIDTH
946REPLACE_WCWIDTH
947REPLACE_WCSNRTOMBS
948REPLACE_WCSRTOMBS
949REPLACE_WCRTOMB
950REPLACE_MBSNRTOWCS
951REPLACE_MBSRTOWCS
952REPLACE_MBRLEN
953REPLACE_MBRTOWC
954REPLACE_MBSINIT
955REPLACE_WCTOB
956REPLACE_BTOWC
957REPLACE_MBSTATE_T
958HAVE_DECL_WCWIDTH
959HAVE_DECL_WCTOB
960HAVE_WCSWIDTH
961HAVE_WCSTOK
962HAVE_WCSSTR
963HAVE_WCSPBRK
964HAVE_WCSSPN
965HAVE_WCSCSPN
966HAVE_WCSRCHR
967HAVE_WCSCHR
968HAVE_WCSDUP
969HAVE_WCSXFRM
970HAVE_WCSCOLL
971HAVE_WCSNCASECMP
972HAVE_WCSCASECMP
973HAVE_WCSNCMP
974HAVE_WCSCMP
975HAVE_WCSNCAT
976HAVE_WCSCAT
977HAVE_WCPNCPY
978HAVE_WCSNCPY
979HAVE_WCPCPY
980HAVE_WCSCPY
981HAVE_WCSNLEN
982HAVE_WCSLEN
983HAVE_WMEMSET
984HAVE_WMEMMOVE
985HAVE_WMEMCPY
986HAVE_WMEMCMP
987HAVE_WMEMCHR
988HAVE_WCSNRTOMBS
989HAVE_WCSRTOMBS
990HAVE_WCRTOMB
991HAVE_MBSNRTOWCS
992HAVE_MBSRTOWCS
993HAVE_MBRLEN
994HAVE_MBRTOWC
995HAVE_MBSINIT
996HAVE_BTOWC
997GNULIB_WCSWIDTH
998GNULIB_WCSTOK
999GNULIB_WCSSTR
1000GNULIB_WCSPBRK
1001GNULIB_WCSSPN
1002GNULIB_WCSCSPN
1003GNULIB_WCSRCHR
1004GNULIB_WCSCHR
1005GNULIB_WCSDUP
1006GNULIB_WCSXFRM
1007GNULIB_WCSCOLL
1008GNULIB_WCSNCASECMP
1009GNULIB_WCSCASECMP
1010GNULIB_WCSNCMP
1011GNULIB_WCSCMP
1012GNULIB_WCSNCAT
1013GNULIB_WCSCAT
1014GNULIB_WCPNCPY
1015GNULIB_WCSNCPY
1016GNULIB_WCPCPY
1017GNULIB_WCSCPY
1018GNULIB_WCSNLEN
1019GNULIB_WCSLEN
1020GNULIB_WMEMSET
1021GNULIB_WMEMMOVE
1022GNULIB_WMEMCPY
1023GNULIB_WMEMCMP
1024GNULIB_WMEMCHR
1025GNULIB_WCWIDTH
1026GNULIB_WCSNRTOMBS
1027GNULIB_WCSRTOMBS
1028GNULIB_WCRTOMB
1029GNULIB_MBSNRTOWCS
1030GNULIB_MBSRTOWCS
1031GNULIB_MBRLEN
1032GNULIB_MBRTOWC
1033GNULIB_MBSINIT
1034GNULIB_WCTOB
1035GNULIB_BTOWC
88b48903
WN
1036NEXT_AS_FIRST_DIRECTIVE_MATH_H
1037NEXT_MATH_H
8690e634 1038LOCALCHARSET_TESTS_ENVIRONMENT
5e8754f9 1039GLIBC21
c971b7fa
PA
1040NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
1041NEXT_INTTYPES_H
1042UINT64_MAX_EQ_ULONG_MAX
1043UINT32_MAX_LT_UINTMAX_MAX
1044PRIPTR_PREFIX
1045PRI_MACROS_BROKEN
1046INT64_MAX_EQ_LONG_MAX
1047INT32_MAX_LT_INTMAX_MAX
4a626d0a 1048REPLACE_STRTOUMAX
c971b7fa
PA
1049REPLACE_STRTOIMAX
1050HAVE_DECL_STRTOUMAX
1051HAVE_DECL_STRTOIMAX
1052HAVE_DECL_IMAXDIV
1053HAVE_DECL_IMAXABS
1054GNULIB_STRTOUMAX
1055GNULIB_STRTOIMAX
1056GNULIB_IMAXDIV
1057GNULIB_IMAXABS
1058GL_GENERATE_STDINT_H_FALSE
1059GL_GENERATE_STDINT_H_TRUE
1060STDINT_H
49e4877c
PA
1061HAVE_SYS_INTTYPES_H
1062HAVE_SYS_BITYPES_H
1063HAVE_C99_STDINT_H
c971b7fa
PA
1064WINT_T_SUFFIX
1065WCHAR_T_SUFFIX
1066SIG_ATOMIC_T_SUFFIX
1067SIZE_T_SUFFIX
1068PTRDIFF_T_SUFFIX
1069HAVE_SIGNED_WINT_T
1070HAVE_SIGNED_WCHAR_T
1071HAVE_SIGNED_SIG_ATOMIC_T
1072BITSIZEOF_WINT_T
1073BITSIZEOF_WCHAR_T
1074BITSIZEOF_SIG_ATOMIC_T
1075BITSIZEOF_SIZE_T
1076BITSIZEOF_PTRDIFF_T
1077APPLE_UNIVERSAL_BUILD
c971b7fa
PA
1078HAVE_STDINT_H
1079NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1080NEXT_STDINT_H
c971b7fa
PA
1081HAVE_SYS_TYPES_H
1082HAVE_INTTYPES_H
1083HAVE_WCHAR_H
1084HAVE_UNSIGNED_LONG_LONG_INT
1085HAVE_LONG_LONG_INT
49e4877c
PA
1086GL_GENERATE_LIMITS_H_FALSE
1087GL_GENERATE_LIMITS_H_TRUE
1088LIMITS_H
1089NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
1090NEXT_LIMITS_H
725e2999
JB
1091HAVE_WS2TCPIP_H
1092HAVE_SYS_SOCKET_H
1093NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H
1094NEXT_SYS_SOCKET_H
1095HAVE_ACCEPT4
1096HAVE_SA_FAMILY_T
1097HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
1098HAVE_STRUCT_SOCKADDR_STORAGE
1099GNULIB_ACCEPT4
1100GNULIB_SHUTDOWN
1101GNULIB_SETSOCKOPT
1102GNULIB_SENDTO
1103GNULIB_RECVFROM
1104GNULIB_SEND
1105GNULIB_RECV
1106GNULIB_LISTEN
1107GNULIB_GETSOCKOPT
1108GNULIB_GETSOCKNAME
1109GNULIB_GETPEERNAME
1110GNULIB_BIND
1111GNULIB_ACCEPT
1112GNULIB_CONNECT
1113GNULIB_SOCKET
1114INET_NTOP_LIB
5e8754f9 1115HAVE_SYS_CDEFS_H
6ec2e0f5
SDJ
1116GL_GENERATE_GLOB_H_FALSE
1117GL_GENERATE_GLOB_H_TRUE
1118GLOB_H
4a626d0a
PA
1119NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1120NEXT_SYS_TIME_H
1121REPLACE_STRUCT_TIMEVAL
1122REPLACE_GETTIMEOFDAY
5e8754f9 1123HAVE_TIMEZONE_T
4a626d0a
PA
1124HAVE_SYS_TIME_H
1125HAVE_STRUCT_TIMEVAL
1126HAVE_GETTIMEOFDAY
1127GNULIB_GETTIMEOFDAY
6ec2e0f5
SDJ
1128LTLIBINTL
1129LIBINTL
1130WINDOWS_64_BIT_ST_SIZE
1131NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1132NEXT_SYS_STAT_H
1133REPLACE_UTIMENSAT
1134REPLACE_STAT
1135REPLACE_MKNOD
1136REPLACE_MKFIFO
1137REPLACE_MKDIR
1138REPLACE_LSTAT
1139REPLACE_FUTIMENS
1140REPLACE_FSTATAT
1141REPLACE_FSTAT
1142HAVE_UTIMENSAT
1143HAVE_MKNODAT
1144HAVE_MKNOD
1145HAVE_MKFIFOAT
1146HAVE_MKFIFO
1147HAVE_MKDIRAT
1148HAVE_LSTAT
1149HAVE_LCHMOD
1150HAVE_FUTIMENS
1151HAVE_FSTATAT
1152HAVE_FCHMODAT
1153GNULIB_UTIMENSAT
1154GNULIB_STAT
1155GNULIB_MKNODAT
1156GNULIB_MKNOD
1157GNULIB_MKFIFOAT
1158GNULIB_MKFIFO
1159GNULIB_MKDIRAT
1160GNULIB_LSTAT
1161GNULIB_LCHMOD
1162GNULIB_FUTIMENS
1163GNULIB_FSTATAT
1164GNULIB_FSTAT
1165GNULIB_FCHMODAT
88b48903
WN
1166FREXPL_LIBM
1167HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1168FREXP_LIBM
1169REPLACE_TRUNCL
1170REPLACE_TRUNCF
1171REPLACE_TRUNC
1172REPLACE_SQRTL
1173REPLACE_SIGNBIT_USING_GCC
1174REPLACE_SIGNBIT
1175REPLACE_ROUNDL
1176REPLACE_ROUNDF
1177REPLACE_ROUND
1178REPLACE_REMAINDERL
1179REPLACE_REMAINDERF
1180REPLACE_REMAINDER
1181REPLACE_NAN
1182REPLACE_MODFL
1183REPLACE_MODFF
1184REPLACE_MODF
1185REPLACE_LOGBL
1186REPLACE_LOGBF
1187REPLACE_LOGB
1188REPLACE_LOG2L
1189REPLACE_LOG2F
1190REPLACE_LOG2
1191REPLACE_LOG1PL
1192REPLACE_LOG1PF
1193REPLACE_LOG1P
1194REPLACE_LOG10L
1195REPLACE_LOG10F
1196REPLACE_LOG10
1197REPLACE_LOGL
1198REPLACE_LOGF
1199REPLACE_LOG
1200REPLACE_LDEXPL
1201REPLACE_ISNAN
1202REPLACE_ISINF
1203REPLACE_ISFINITE
1204REPLACE_ILOGBF
1205REPLACE_ILOGB
1206REPLACE_HYPOTL
1207REPLACE_HYPOTF
1208REPLACE_HYPOT
1209REPLACE_HUGE_VAL
1210REPLACE_FREXPL
1211REPLACE_FREXP
1212REPLACE_FREXPF
1213REPLACE_FMODL
1214REPLACE_FMODF
1215REPLACE_FMOD
1216REPLACE_FMAL
1217REPLACE_FMAF
1218REPLACE_FMA
1219REPLACE_FLOORL
1220REPLACE_FLOORF
1221REPLACE_FLOOR
1222REPLACE_FABSL
1223REPLACE_EXP2L
1224REPLACE_EXP2
1225REPLACE_EXPM1F
1226REPLACE_EXPM1
1227REPLACE_CEILL
1228REPLACE_CEILF
1229REPLACE_CEIL
1230REPLACE_CBRTL
1231REPLACE_CBRTF
1232HAVE_DECL_TRUNCL
1233HAVE_DECL_TRUNCF
1234HAVE_DECL_TRUNC
1235HAVE_DECL_TANL
1236HAVE_DECL_SQRTL
1237HAVE_DECL_SINL
1238HAVE_DECL_ROUNDL
1239HAVE_DECL_ROUNDF
1240HAVE_DECL_ROUND
1241HAVE_DECL_RINTF
1242HAVE_DECL_REMAINDERL
1243HAVE_DECL_REMAINDER
1244HAVE_DECL_LOGB
1245HAVE_DECL_LOG2L
1246HAVE_DECL_LOG2F
1247HAVE_DECL_LOG2
1248HAVE_DECL_LOG10L
1249HAVE_DECL_LOGL
1250HAVE_DECL_LDEXPL
1251HAVE_DECL_FREXPL
1252HAVE_DECL_FLOORL
1253HAVE_DECL_FLOORF
1254HAVE_DECL_EXPM1L
1255HAVE_DECL_EXP2L
1256HAVE_DECL_EXP2F
1257HAVE_DECL_EXP2
1258HAVE_DECL_EXPL
1259HAVE_DECL_COSL
1260HAVE_DECL_COPYSIGNF
1261HAVE_DECL_CEILL
1262HAVE_DECL_CEILF
1263HAVE_DECL_CBRTL
1264HAVE_DECL_CBRTF
1265HAVE_DECL_ATANL
1266HAVE_DECL_ASINL
1267HAVE_DECL_ACOSL
1268HAVE_TANHF
1269HAVE_TANL
1270HAVE_TANF
1271HAVE_SQRTL
1272HAVE_SQRTF
1273HAVE_SINHF
1274HAVE_SINL
1275HAVE_SINF
1276HAVE_RINTL
1277HAVE_RINT
1278HAVE_REMAINDERF
1279HAVE_REMAINDER
1280HAVE_POWF
1281HAVE_MODFL
1282HAVE_MODFF
1283HAVE_LOGBL
1284HAVE_LOGBF
1285HAVE_LOG1PL
1286HAVE_LOG1PF
1287HAVE_LOG1P
1288HAVE_LOG10L
1289HAVE_LOG10F
1290HAVE_LOGL
1291HAVE_LOGF
1292HAVE_LDEXPF
1293HAVE_ISNANL
1294HAVE_ISNAND
1295HAVE_ISNANF
1296HAVE_ILOGBL
1297HAVE_ILOGBF
1298HAVE_ILOGB
1299HAVE_HYPOTL
1300HAVE_HYPOTF
1301HAVE_FREXPF
1302HAVE_FMODL
1303HAVE_FMODF
1304HAVE_FMAL
1305HAVE_FMAF
1306HAVE_FMA
1307HAVE_FABSL
1308HAVE_FABSF
1309HAVE_EXPM1F
1310HAVE_EXPM1
1311HAVE_EXPL
1312HAVE_EXPF
1313HAVE_COSHF
1314HAVE_COSL
1315HAVE_COSF
1316HAVE_COPYSIGNL
1317HAVE_COPYSIGN
1318HAVE_CBRTL
1319HAVE_CBRTF
1320HAVE_CBRT
1321HAVE_ATAN2F
1322HAVE_ATANL
1323HAVE_ATANF
1324HAVE_ASINL
1325HAVE_ASINF
1326HAVE_ACOSL
1327HAVE_ACOSF
1328GNULIB_TRUNCL
1329GNULIB_TRUNCF
1330GNULIB_TRUNC
1331GNULIB_TANHF
1332GNULIB_TANL
1333GNULIB_TANF
1334GNULIB_SQRTL
1335GNULIB_SQRTF
1336GNULIB_SINHF
1337GNULIB_SINL
1338GNULIB_SINF
1339GNULIB_SIGNBIT
1340GNULIB_ROUNDL
1341GNULIB_ROUNDF
1342GNULIB_ROUND
1343GNULIB_RINTL
1344GNULIB_RINTF
1345GNULIB_RINT
1346GNULIB_REMAINDERL
1347GNULIB_REMAINDERF
1348GNULIB_REMAINDER
1349GNULIB_POWF
1350GNULIB_MODFL
1351GNULIB_MODFF
1352GNULIB_MODF
1353GNULIB_LOGBL
1354GNULIB_LOGBF
1355GNULIB_LOGB
1356GNULIB_LOG2L
1357GNULIB_LOG2F
1358GNULIB_LOG2
1359GNULIB_LOG1PL
1360GNULIB_LOG1PF
1361GNULIB_LOG1P
1362GNULIB_LOG10L
1363GNULIB_LOG10F
1364GNULIB_LOG10
1365GNULIB_LOGL
1366GNULIB_LOGF
1367GNULIB_LOG
1368GNULIB_LDEXPL
1369GNULIB_LDEXPF
1370GNULIB_ISNANL
1371GNULIB_ISNAND
1372GNULIB_ISNANF
1373GNULIB_ISNAN
1374GNULIB_ISINF
1375GNULIB_ISFINITE
1376GNULIB_ILOGBL
1377GNULIB_ILOGBF
1378GNULIB_ILOGB
1379GNULIB_HYPOTL
1380GNULIB_HYPOTF
1381GNULIB_HYPOT
1382GNULIB_FREXPL
1383GNULIB_FREXP
1384GNULIB_FREXPF
1385GNULIB_FMODL
1386GNULIB_FMODF
1387GNULIB_FMOD
1388GNULIB_FMAL
1389GNULIB_FMAF
1390GNULIB_FMA
1391GNULIB_FLOORL
1392GNULIB_FLOORF
1393GNULIB_FLOOR
1394GNULIB_FABSL
1395GNULIB_FABSF
1396GNULIB_EXPM1L
1397GNULIB_EXPM1F
1398GNULIB_EXPM1
1399GNULIB_EXP2L
1400GNULIB_EXP2F
1401GNULIB_EXP2
1402GNULIB_EXPL
1403GNULIB_EXPF
1404GNULIB_COSHF
1405GNULIB_COSL
1406GNULIB_COSF
1407GNULIB_COPYSIGNL
1408GNULIB_COPYSIGNF
1409GNULIB_COPYSIGN
1410GNULIB_CEILL
1411GNULIB_CEILF
1412GNULIB_CEIL
1413GNULIB_CBRTL
1414GNULIB_CBRTF
1415GNULIB_CBRT
1416GNULIB_ATAN2F
1417GNULIB_ATANL
1418GNULIB_ATANF
1419GNULIB_ASINL
1420GNULIB_ASINF
1421GNULIB_ACOSL
1422GNULIB_ACOSF
8690e634
JK
1423GL_GENERATE_FNMATCH_H_FALSE
1424GL_GENERATE_FNMATCH_H_TRUE
1425FNMATCH_H
88b48903
WN
1426REPLACE_ITOLD
1427GL_GENERATE_FLOAT_H_FALSE
1428GL_GENERATE_FLOAT_H_TRUE
1429FLOAT_H
1430NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1431NEXT_FLOAT_H
6ec2e0f5
SDJ
1432NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1433NEXT_FCNTL_H
1434REPLACE_OPENAT
1435REPLACE_OPEN
1436REPLACE_FCNTL
1437HAVE_OPENAT
1438HAVE_FCNTL
1439GNULIB_OPENAT
1440GNULIB_OPEN
1441GNULIB_NONBLOCKING
1442GNULIB_FCNTL
18848e28
GF
1443EOVERFLOW_VALUE
1444EOVERFLOW_HIDDEN
1445ENOLINK_VALUE
1446ENOLINK_HIDDEN
1447EMULTIHOP_VALUE
1448EMULTIHOP_HIDDEN
1449GL_GENERATE_ERRNO_H_FALSE
1450GL_GENERATE_ERRNO_H_TRUE
1451ERRNO_H
1452NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1453NEXT_ERRNO_H
e26b6bb0
TT
1454HAVE_DIRENT_H
1455NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1456NEXT_DIRENT_H
5e8754f9
SDJ
1457pkglibexecdir
1458runstatedir
1459lispdir
e26b6bb0
TT
1460REPLACE_FDOPENDIR
1461REPLACE_DIRFD
1462REPLACE_CLOSEDIR
1463REPLACE_OPENDIR
1464HAVE_ALPHASORT
1465HAVE_SCANDIR
1466HAVE_FDOPENDIR
1467HAVE_DECL_FDOPENDIR
1468HAVE_DECL_DIRFD
1469HAVE_CLOSEDIR
1470HAVE_REWINDDIR
1471HAVE_READDIR
1472HAVE_OPENDIR
1473GNULIB_ALPHASORT
1474GNULIB_SCANDIR
1475GNULIB_FDOPENDIR
1476GNULIB_DIRFD
1477GNULIB_CLOSEDIR
1478GNULIB_REWINDDIR
1479GNULIB_READDIR
1480GNULIB_OPENDIR
6ec2e0f5
SDJ
1481HAVE_WINSOCK2_H
1482HAVE_MSVC_INVALID_PARAMETER_HANDLER
e26b6bb0
TT
1483UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1484UNISTD_H_HAVE_WINSOCK2_H
1485REPLACE_WRITE
1486REPLACE_USLEEP
1487REPLACE_UNLINKAT
1488REPLACE_UNLINK
1489REPLACE_TTYNAME_R
4a626d0a 1490REPLACE_SYMLINKAT
e26b6bb0
TT
1491REPLACE_SYMLINK
1492REPLACE_SLEEP
1493REPLACE_RMDIR
4a626d0a 1494REPLACE_READLINKAT
e26b6bb0
TT
1495REPLACE_READLINK
1496REPLACE_READ
1497REPLACE_PWRITE
1498REPLACE_PREAD
1499REPLACE_LSEEK
1500REPLACE_LINKAT
1501REPLACE_LINK
1502REPLACE_LCHOWN
1503REPLACE_ISATTY
1504REPLACE_GETPAGESIZE
1505REPLACE_GETGROUPS
1506REPLACE_GETLOGIN_R
4a626d0a 1507REPLACE_GETDTABLESIZE
e26b6bb0
TT
1508REPLACE_GETDOMAINNAME
1509REPLACE_GETCWD
1510REPLACE_FTRUNCATE
1511REPLACE_FCHOWNAT
1512REPLACE_DUP2
1513REPLACE_DUP
1514REPLACE_CLOSE
1515REPLACE_CHOWN
1516HAVE_SYS_PARAM_H
1517HAVE_OS_H
1518HAVE_DECL_TTYNAME_R
1519HAVE_DECL_SETHOSTNAME
1520HAVE_DECL_GETUSERSHELL
1521HAVE_DECL_GETPAGESIZE
1522HAVE_DECL_GETLOGIN_R
1523HAVE_DECL_GETDOMAINNAME
1524HAVE_DECL_FDATASYNC
1525HAVE_DECL_FCHDIR
1526HAVE_DECL_ENVIRON
1527HAVE_USLEEP
1528HAVE_UNLINKAT
1529HAVE_SYMLINKAT
1530HAVE_SYMLINK
1531HAVE_SLEEP
1532HAVE_SETHOSTNAME
1533HAVE_READLINKAT
1534HAVE_READLINK
1535HAVE_PWRITE
1536HAVE_PREAD
1537HAVE_PIPE2
1538HAVE_PIPE
1539HAVE_LINKAT
1540HAVE_LINK
1541HAVE_LCHOWN
1542HAVE_GROUP_MEMBER
1543HAVE_GETPAGESIZE
1544HAVE_GETLOGIN
1545HAVE_GETHOSTNAME
1546HAVE_GETGROUPS
1547HAVE_GETDTABLESIZE
1548HAVE_FTRUNCATE
1549HAVE_FSYNC
1550HAVE_FDATASYNC
1551HAVE_FCHOWNAT
1552HAVE_FCHDIR
1553HAVE_FACCESSAT
1554HAVE_EUIDACCESS
1555HAVE_DUP3
1556HAVE_DUP2
1557HAVE_CHOWN
1558GNULIB_WRITE
1559GNULIB_USLEEP
1560GNULIB_UNLINKAT
1561GNULIB_UNLINK
1562GNULIB_UNISTD_H_SIGPIPE
1563GNULIB_UNISTD_H_NONBLOCKING
1564GNULIB_TTYNAME_R
1565GNULIB_SYMLINKAT
1566GNULIB_SYMLINK
1567GNULIB_SLEEP
1568GNULIB_SETHOSTNAME
1569GNULIB_RMDIR
1570GNULIB_READLINKAT
1571GNULIB_READLINK
1572GNULIB_READ
1573GNULIB_PWRITE
1574GNULIB_PREAD
1575GNULIB_PIPE2
1576GNULIB_PIPE
1577GNULIB_LSEEK
1578GNULIB_LINKAT
1579GNULIB_LINK
1580GNULIB_LCHOWN
1581GNULIB_ISATTY
1582GNULIB_GROUP_MEMBER
1583GNULIB_GETUSERSHELL
1584GNULIB_GETPAGESIZE
1585GNULIB_GETLOGIN_R
1586GNULIB_GETLOGIN
1587GNULIB_GETHOSTNAME
1588GNULIB_GETGROUPS
1589GNULIB_GETDTABLESIZE
1590GNULIB_GETDOMAINNAME
1591GNULIB_GETCWD
1592GNULIB_FTRUNCATE
1593GNULIB_FSYNC
1594GNULIB_FDATASYNC
1595GNULIB_FCHOWNAT
1596GNULIB_FCHDIR
1597GNULIB_FACCESSAT
1598GNULIB_EUIDACCESS
1599GNULIB_ENVIRON
1600GNULIB_DUP3
1601GNULIB_DUP2
1602GNULIB_DUP
1603GNULIB_CLOSE
1604GNULIB_CHOWN
1605GNULIB_CHDIR
98399780
YQ
1606REPLACE_WCTOMB
1607REPLACE_UNSETENV
1608REPLACE_STRTOD
1609REPLACE_SETENV
1610REPLACE_REALPATH
1611REPLACE_REALLOC
1612REPLACE_RANDOM_R
4a626d0a 1613REPLACE_QSORT_R
98399780
YQ
1614REPLACE_PUTENV
1615REPLACE_PTSNAME_R
1616REPLACE_PTSNAME
1617REPLACE_MKSTEMP
1618REPLACE_MBTOWC
1619REPLACE_MALLOC
1620REPLACE_CANONICALIZE_FILE_NAME
1621REPLACE_CALLOC
1622HAVE_DECL_UNSETENV
1623HAVE_UNLOCKPT
1624HAVE_SYS_LOADAVG_H
1625HAVE_STRUCT_RANDOM_DATA
1626HAVE_STRTOULL
1627HAVE_STRTOLL
1628HAVE_STRTOD
1629HAVE_DECL_SETENV
1630HAVE_SETENV
4a626d0a 1631HAVE_SECURE_GETENV
98399780
YQ
1632HAVE_RPMATCH
1633HAVE_REALPATH
1634HAVE_RANDOM_R
1635HAVE_RANDOM_H
1636HAVE_RANDOM
4c62b19f 1637HAVE_QSORT_R
98399780
YQ
1638HAVE_PTSNAME_R
1639HAVE_PTSNAME
1640HAVE_POSIX_OPENPT
1641HAVE_MKSTEMPS
1642HAVE_MKSTEMP
1643HAVE_MKOSTEMPS
1644HAVE_MKOSTEMP
1645HAVE_MKDTEMP
1646HAVE_GRANTPT
1647HAVE_GETSUBOPT
1648HAVE_DECL_GETLOADAVG
1649HAVE_CANONICALIZE_FILE_NAME
1650HAVE_ATOLL
1651HAVE__EXIT
1652GNULIB_WCTOMB
1653GNULIB_UNSETENV
1654GNULIB_UNLOCKPT
1655GNULIB_SYSTEM_POSIX
1656GNULIB_STRTOULL
1657GNULIB_STRTOLL
1658GNULIB_STRTOD
1659GNULIB_SETENV
4a626d0a 1660GNULIB_SECURE_GETENV
98399780
YQ
1661GNULIB_RPMATCH
1662GNULIB_REALPATH
1663GNULIB_REALLOC_POSIX
1664GNULIB_RANDOM_R
1665GNULIB_RANDOM
4a626d0a 1666GNULIB_QSORT_R
98399780
YQ
1667GNULIB_PUTENV
1668GNULIB_PTSNAME_R
1669GNULIB_PTSNAME
1670GNULIB_POSIX_OPENPT
1671GNULIB_MKSTEMPS
1672GNULIB_MKSTEMP
1673GNULIB_MKOSTEMPS
1674GNULIB_MKOSTEMP
1675GNULIB_MKDTEMP
1676GNULIB_MBTOWC
1677GNULIB_MALLOC_POSIX
1678GNULIB_GRANTPT
1679GNULIB_GETSUBOPT
1680GNULIB_GETLOADAVG
1681GNULIB_CANONICALIZE_FILE_NAME
1682GNULIB_CALLOC_POSIX
1683GNULIB_ATOLL
1684GNULIB__EXIT
725e2999
JB
1685MKDIR_P
1686HAVE_FEATURES_H
1687NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H
1688NEXT_ARPA_INET_H
1689PRAGMA_COLUMNS
1690PRAGMA_SYSTEM_HEADER
1691INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1692INCLUDE_NEXT
1693HAVE_ARPA_INET_H
1694REPLACE_INET_PTON
1695REPLACE_INET_NTOP
1696HAVE_DECL_INET_PTON
1697HAVE_DECL_INET_NTOP
1698GNULIB_INET_PTON
1699GNULIB_INET_NTOP
8690e634
JK
1700GL_GENERATE_ALLOCA_H_FALSE
1701GL_GENERATE_ALLOCA_H_TRUE
1702ALLOCA_H
1703ALLOCA
c971b7fa
PA
1704GL_COND_LIBTOOL_FALSE
1705GL_COND_LIBTOOL_TRUE
1706target_os
1707target_vendor
1708target_cpu
1709target
c971b7fa
PA
1710host_os
1711host_vendor
1712host_cpu
1713host
1714build_os
1715build_vendor
1716build_cpu
1717build
4a626d0a
PA
1718RANLIB
1719ARFLAGS
5e8754f9 1720ac_ct_AR
4a626d0a
PA
1721AR
1722EGREP
1723GREP
1724CPP
c971b7fa
PA
1725OBJEXT
1726EXEEXT
1727ac_ct_CC
1728CPPFLAGS
1729LDFLAGS
1730CFLAGS
1731CC
1732MAINT
1733MAINTAINER_MODE_FALSE
1734MAINTAINER_MODE_TRUE
1735target_alias
1736host_alias
1737build_alias
1738LIBS
1739ECHO_T
1740ECHO_N
1741ECHO_C
1742DEFS
1743mandir
1744localedir
1745libdir
1746psdir
1747pdfdir
1748dvidir
1749htmldir
1750infodir
1751docdir
1752oldincludedir
1753includedir
1754localstatedir
1755sharedstatedir
1756sysconfdir
1757datadir
1758datarootdir
1759libexecdir
1760sbindir
1761bindir
1762program_transform_name
1763prefix
1764exec_prefix
1765PACKAGE_URL
1766PACKAGE_BUGREPORT
1767PACKAGE_STRING
1768PACKAGE_VERSION
1769PACKAGE_TARNAME
1770PACKAGE_NAME
1771PATH_SEPARATOR
1772SHELL'
1773ac_subst_files=''
1774ac_user_opts='
1775enable_option_checking
1776enable_maintainer_mode
2196f55f 1777enable_largefile
c971b7fa 1778enable_dependency_tracking
39be3c7e 1779enable_silent_rules
c971b7fa
PA
1780'
1781 ac_precious_vars='build_alias
1782host_alias
1783target_alias
1784CC
1785CFLAGS
1786LDFLAGS
1787LIBS
1788CPPFLAGS
1789CPP'
1790
1791
1792# Initialize some variables set by options.
1793ac_init_help=
1794ac_init_version=false
1795ac_unrecognized_opts=
1796ac_unrecognized_sep=
1797# The variables have the same names as the options, with
1798# dashes changed to underlines.
1799cache_file=/dev/null
1800exec_prefix=NONE
1801no_create=
1802no_recursion=
1803prefix=NONE
1804program_prefix=NONE
1805program_suffix=NONE
1806program_transform_name=s,x,x,
1807silent=
1808site=
1809srcdir=
1810verbose=
1811x_includes=NONE
1812x_libraries=NONE
1813
1814# Installation directory options.
1815# These are left unexpanded so users can "make install exec_prefix=/foo"
1816# and all the variables that are supposed to be based on exec_prefix
1817# by default will actually change.
1818# Use braces instead of parens because sh, perl, etc. also accept them.
1819# (The list follows the same order as the GNU Coding Standards.)
1820bindir='${exec_prefix}/bin'
1821sbindir='${exec_prefix}/sbin'
1822libexecdir='${exec_prefix}/libexec'
1823datarootdir='${prefix}/share'
1824datadir='${datarootdir}'
1825sysconfdir='${prefix}/etc'
1826sharedstatedir='${prefix}/com'
1827localstatedir='${prefix}/var'
1828includedir='${prefix}/include'
1829oldincludedir='/usr/include'
d0ac1c44 1830docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
c971b7fa
PA
1831infodir='${datarootdir}/info'
1832htmldir='${docdir}'
1833dvidir='${docdir}'
1834pdfdir='${docdir}'
1835psdir='${docdir}'
1836libdir='${exec_prefix}/lib'
1837localedir='${datarootdir}/locale'
1838mandir='${datarootdir}/man'
1839
1840ac_prev=
1841ac_dashdash=
1842for ac_option
1843do
1844 # If the previous option needs an argument, assign it.
1845 if test -n "$ac_prev"; then
1846 eval $ac_prev=\$ac_option
1847 ac_prev=
1848 continue
1849 fi
1850
1851 case $ac_option in
d0ac1c44
SM
1852 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1853 *=) ac_optarg= ;;
1854 *) ac_optarg=yes ;;
c971b7fa
PA
1855 esac
1856
1857 # Accept the important Cygnus configure options, so we can diagnose typos.
1858
1859 case $ac_dashdash$ac_option in
1860 --)
1861 ac_dashdash=yes ;;
1862
1863 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1864 ac_prev=bindir ;;
1865 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1866 bindir=$ac_optarg ;;
1867
1868 -build | --build | --buil | --bui | --bu)
1869 ac_prev=build_alias ;;
1870 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1871 build_alias=$ac_optarg ;;
1872
1873 -cache-file | --cache-file | --cache-fil | --cache-fi \
1874 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1875 ac_prev=cache_file ;;
1876 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1877 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1878 cache_file=$ac_optarg ;;
1879
1880 --config-cache | -C)
1881 cache_file=config.cache ;;
1882
1883 -datadir | --datadir | --datadi | --datad)
1884 ac_prev=datadir ;;
1885 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1886 datadir=$ac_optarg ;;
1887
1888 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1889 | --dataroo | --dataro | --datar)
1890 ac_prev=datarootdir ;;
1891 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1892 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1893 datarootdir=$ac_optarg ;;
1894
1895 -disable-* | --disable-*)
1896 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1897 # Reject names that are not valid shell variable names.
1898 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1899 as_fn_error $? "invalid feature name: $ac_useropt"
c971b7fa
PA
1900 ac_useropt_orig=$ac_useropt
1901 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1902 case $ac_user_opts in
1903 *"
1904"enable_$ac_useropt"
1905"*) ;;
1906 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1907 ac_unrecognized_sep=', ';;
1908 esac
1909 eval enable_$ac_useropt=no ;;
1910
1911 -docdir | --docdir | --docdi | --doc | --do)
1912 ac_prev=docdir ;;
1913 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1914 docdir=$ac_optarg ;;
1915
1916 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1917 ac_prev=dvidir ;;
1918 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1919 dvidir=$ac_optarg ;;
1920
1921 -enable-* | --enable-*)
1922 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1923 # Reject names that are not valid shell variable names.
1924 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1925 as_fn_error $? "invalid feature name: $ac_useropt"
c971b7fa
PA
1926 ac_useropt_orig=$ac_useropt
1927 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1928 case $ac_user_opts in
1929 *"
1930"enable_$ac_useropt"
1931"*) ;;
1932 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1933 ac_unrecognized_sep=', ';;
1934 esac
1935 eval enable_$ac_useropt=\$ac_optarg ;;
1936
1937 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1938 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1939 | --exec | --exe | --ex)
1940 ac_prev=exec_prefix ;;
1941 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1942 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1943 | --exec=* | --exe=* | --ex=*)
1944 exec_prefix=$ac_optarg ;;
1945
1946 -gas | --gas | --ga | --g)
1947 # Obsolete; use --with-gas.
1948 with_gas=yes ;;
1949
1950 -help | --help | --hel | --he | -h)
1951 ac_init_help=long ;;
1952 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1953 ac_init_help=recursive ;;
1954 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1955 ac_init_help=short ;;
1956
1957 -host | --host | --hos | --ho)
1958 ac_prev=host_alias ;;
1959 -host=* | --host=* | --hos=* | --ho=*)
1960 host_alias=$ac_optarg ;;
1961
1962 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1963 ac_prev=htmldir ;;
1964 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1965 | --ht=*)
1966 htmldir=$ac_optarg ;;
1967
1968 -includedir | --includedir | --includedi | --included | --include \
1969 | --includ | --inclu | --incl | --inc)
1970 ac_prev=includedir ;;
1971 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1972 | --includ=* | --inclu=* | --incl=* | --inc=*)
1973 includedir=$ac_optarg ;;
1974
1975 -infodir | --infodir | --infodi | --infod | --info | --inf)
1976 ac_prev=infodir ;;
1977 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1978 infodir=$ac_optarg ;;
1979
1980 -libdir | --libdir | --libdi | --libd)
1981 ac_prev=libdir ;;
1982 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1983 libdir=$ac_optarg ;;
1984
1985 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1986 | --libexe | --libex | --libe)
1987 ac_prev=libexecdir ;;
1988 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1989 | --libexe=* | --libex=* | --libe=*)
1990 libexecdir=$ac_optarg ;;
1991
1992 -localedir | --localedir | --localedi | --localed | --locale)
1993 ac_prev=localedir ;;
1994 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1995 localedir=$ac_optarg ;;
1996
1997 -localstatedir | --localstatedir | --localstatedi | --localstated \
1998 | --localstate | --localstat | --localsta | --localst | --locals)
1999 ac_prev=localstatedir ;;
2000 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2001 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
2002 localstatedir=$ac_optarg ;;
2003
2004 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2005 ac_prev=mandir ;;
2006 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2007 mandir=$ac_optarg ;;
2008
2009 -nfp | --nfp | --nf)
2010 # Obsolete; use --without-fp.
2011 with_fp=no ;;
2012
2013 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2014 | --no-cr | --no-c | -n)
2015 no_create=yes ;;
2016
2017 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
2018 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
2019 no_recursion=yes ;;
2020
2021 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
2022 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
2023 | --oldin | --oldi | --old | --ol | --o)
2024 ac_prev=oldincludedir ;;
2025 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
2026 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
2027 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2028 oldincludedir=$ac_optarg ;;
2029
2030 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2031 ac_prev=prefix ;;
2032 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2033 prefix=$ac_optarg ;;
2034
2035 -program-prefix | --program-prefix | --program-prefi | --program-pref \
2036 | --program-pre | --program-pr | --program-p)
2037 ac_prev=program_prefix ;;
2038 -program-prefix=* | --program-prefix=* | --program-prefi=* \
2039 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2040 program_prefix=$ac_optarg ;;
2041
2042 -program-suffix | --program-suffix | --program-suffi | --program-suff \
2043 | --program-suf | --program-su | --program-s)
2044 ac_prev=program_suffix ;;
2045 -program-suffix=* | --program-suffix=* | --program-suffi=* \
2046 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2047 program_suffix=$ac_optarg ;;
2048
2049 -program-transform-name | --program-transform-name \
2050 | --program-transform-nam | --program-transform-na \
2051 | --program-transform-n | --program-transform- \
2052 | --program-transform | --program-transfor \
2053 | --program-transfo | --program-transf \
2054 | --program-trans | --program-tran \
2055 | --progr-tra | --program-tr | --program-t)
2056 ac_prev=program_transform_name ;;
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 program_transform_name=$ac_optarg ;;
2065
2066 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2067 ac_prev=pdfdir ;;
2068 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2069 pdfdir=$ac_optarg ;;
2070
2071 -psdir | --psdir | --psdi | --psd | --ps)
2072 ac_prev=psdir ;;
2073 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2074 psdir=$ac_optarg ;;
2075
2076 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2077 | -silent | --silent | --silen | --sile | --sil)
2078 silent=yes ;;
2079
2080 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2081 ac_prev=sbindir ;;
2082 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2083 | --sbi=* | --sb=*)
2084 sbindir=$ac_optarg ;;
2085
2086 -sharedstatedir | --sharedstatedir | --sharedstatedi \
2087 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2088 | --sharedst | --shareds | --shared | --share | --shar \
2089 | --sha | --sh)
2090 ac_prev=sharedstatedir ;;
2091 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2092 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2093 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2094 | --sha=* | --sh=*)
2095 sharedstatedir=$ac_optarg ;;
2096
2097 -site | --site | --sit)
2098 ac_prev=site ;;
2099 -site=* | --site=* | --sit=*)
2100 site=$ac_optarg ;;
2101
2102 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2103 ac_prev=srcdir ;;
2104 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2105 srcdir=$ac_optarg ;;
2106
2107 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2108 | --syscon | --sysco | --sysc | --sys | --sy)
2109 ac_prev=sysconfdir ;;
2110 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2111 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2112 sysconfdir=$ac_optarg ;;
2113
2114 -target | --target | --targe | --targ | --tar | --ta | --t)
2115 ac_prev=target_alias ;;
2116 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2117 target_alias=$ac_optarg ;;
2118
2119 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2120 verbose=yes ;;
2121
2122 -version | --version | --versio | --versi | --vers | -V)
2123 ac_init_version=: ;;
2124
2125 -with-* | --with-*)
2126 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2127 # Reject names that are not valid shell variable names.
2128 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 2129 as_fn_error $? "invalid package name: $ac_useropt"
c971b7fa
PA
2130 ac_useropt_orig=$ac_useropt
2131 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2132 case $ac_user_opts in
2133 *"
2134"with_$ac_useropt"
2135"*) ;;
2136 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2137 ac_unrecognized_sep=', ';;
2138 esac
2139 eval with_$ac_useropt=\$ac_optarg ;;
2140
2141 -without-* | --without-*)
2142 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2143 # Reject names that are not valid shell variable names.
2144 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 2145 as_fn_error $? "invalid package name: $ac_useropt"
c971b7fa
PA
2146 ac_useropt_orig=$ac_useropt
2147 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2148 case $ac_user_opts in
2149 *"
2150"with_$ac_useropt"
2151"*) ;;
2152 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2153 ac_unrecognized_sep=', ';;
2154 esac
2155 eval with_$ac_useropt=no ;;
2156
2157 --x)
2158 # Obsolete; use --with-x.
2159 with_x=yes ;;
2160
2161 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2162 | --x-incl | --x-inc | --x-in | --x-i)
2163 ac_prev=x_includes ;;
2164 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2165 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2166 x_includes=$ac_optarg ;;
2167
2168 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2169 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2170 ac_prev=x_libraries ;;
2171 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2172 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2173 x_libraries=$ac_optarg ;;
2174
d0ac1c44
SM
2175 -*) as_fn_error $? "unrecognized option: \`$ac_option'
2176Try \`$0 --help' for more information"
c971b7fa
PA
2177 ;;
2178
2179 *=*)
2180 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2181 # Reject names that are not valid shell variable names.
2182 case $ac_envvar in #(
2183 '' | [0-9]* | *[!_$as_cr_alnum]* )
d0ac1c44 2184 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
c971b7fa
PA
2185 esac
2186 eval $ac_envvar=\$ac_optarg
2187 export $ac_envvar ;;
2188
2189 *)
2190 # FIXME: should be removed in autoconf 3.0.
2191 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2192 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2193 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
d0ac1c44 2194 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
c971b7fa
PA
2195 ;;
2196
2197 esac
2198done
2199
2200if test -n "$ac_prev"; then
2201 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
d0ac1c44 2202 as_fn_error $? "missing argument to $ac_option"
c971b7fa
PA
2203fi
2204
2205if test -n "$ac_unrecognized_opts"; then
2206 case $enable_option_checking in
2207 no) ;;
d0ac1c44 2208 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
c971b7fa
PA
2209 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2210 esac
2211fi
2212
2213# Check all directory arguments for consistency.
2214for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2215 datadir sysconfdir sharedstatedir localstatedir includedir \
2216 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2217 libdir localedir mandir
2218do
2219 eval ac_val=\$$ac_var
2220 # Remove trailing slashes.
2221 case $ac_val in
2222 */ )
2223 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2224 eval $ac_var=\$ac_val;;
2225 esac
2226 # Be sure to have absolute directory names.
2227 case $ac_val in
2228 [\\/$]* | ?:[\\/]* ) continue;;
2229 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2230 esac
d0ac1c44 2231 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
c971b7fa
PA
2232done
2233
2234# There might be people who depend on the old broken behavior: `$host'
2235# used to hold the argument of --host etc.
2236# FIXME: To remove some day.
2237build=$build_alias
2238host=$host_alias
2239target=$target_alias
2240
2241# FIXME: To remove some day.
2242if test "x$host_alias" != x; then
2243 if test "x$build_alias" = x; then
2244 cross_compiling=maybe
c971b7fa
PA
2245 elif test "x$build_alias" != "x$host_alias"; then
2246 cross_compiling=yes
2247 fi
2248fi
2249
2250ac_tool_prefix=
2251test -n "$host_alias" && ac_tool_prefix=$host_alias-
2252
2253test "$silent" = yes && exec 6>/dev/null
2254
2255
2256ac_pwd=`pwd` && test -n "$ac_pwd" &&
2257ac_ls_di=`ls -di .` &&
2258ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
d0ac1c44 2259 as_fn_error $? "working directory cannot be determined"
c971b7fa 2260test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
d0ac1c44 2261 as_fn_error $? "pwd does not report name of working directory"
c971b7fa
PA
2262
2263
2264# Find the source files, if location was not specified.
2265if test -z "$srcdir"; then
2266 ac_srcdir_defaulted=yes
2267 # Try the directory containing this script, then the parent directory.
2268 ac_confdir=`$as_dirname -- "$as_myself" ||
2269$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2270 X"$as_myself" : 'X\(//\)[^/]' \| \
2271 X"$as_myself" : 'X\(//\)$' \| \
2272 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2273$as_echo X"$as_myself" |
2274 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2275 s//\1/
2276 q
2277 }
2278 /^X\(\/\/\)[^/].*/{
2279 s//\1/
2280 q
2281 }
2282 /^X\(\/\/\)$/{
2283 s//\1/
2284 q
2285 }
2286 /^X\(\/\).*/{
2287 s//\1/
2288 q
2289 }
2290 s/.*/./; q'`
2291 srcdir=$ac_confdir
2292 if test ! -r "$srcdir/$ac_unique_file"; then
2293 srcdir=..
2294 fi
2295else
2296 ac_srcdir_defaulted=no
2297fi
2298if test ! -r "$srcdir/$ac_unique_file"; then
2299 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
d0ac1c44 2300 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
c971b7fa
PA
2301fi
2302ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2303ac_abs_confdir=`(
d0ac1c44 2304 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
c971b7fa
PA
2305 pwd)`
2306# When building in place, set srcdir=.
2307if test "$ac_abs_confdir" = "$ac_pwd"; then
2308 srcdir=.
2309fi
2310# Remove unnecessary trailing slashes from srcdir.
2311# Double slashes in file names in object file debugging info
2312# mess up M-x gdb in Emacs.
2313case $srcdir in
2314*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2315esac
2316for ac_var in $ac_precious_vars; do
2317 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2318 eval ac_env_${ac_var}_value=\$${ac_var}
2319 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2320 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2321done
2322
2323#
2324# Report the --help message.
2325#
2326if test "$ac_init_help" = "long"; then
2327 # Omit some internal or obsolete options to make the list less imposing.
2328 # This message is too long to be a string in the A/UX 3.1 sh.
2329 cat <<_ACEOF
d0ac1c44 2330\`configure' configures libgnu UNUSED-VERSION to adapt to many kinds of systems.
c971b7fa
PA
2331
2332Usage: $0 [OPTION]... [VAR=VALUE]...
2333
2334To assign environment variables (e.g., CC, CFLAGS...), specify them as
2335VAR=VALUE. See below for descriptions of some of the useful variables.
2336
2337Defaults for the options are specified in brackets.
2338
2339Configuration:
2340 -h, --help display this help and exit
2341 --help=short display options specific to this package
2342 --help=recursive display the short help of all the included packages
2343 -V, --version display version information and exit
d0ac1c44 2344 -q, --quiet, --silent do not print \`checking ...' messages
c971b7fa
PA
2345 --cache-file=FILE cache test results in FILE [disabled]
2346 -C, --config-cache alias for \`--cache-file=config.cache'
2347 -n, --no-create do not create output files
2348 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2349
2350Installation directories:
2351 --prefix=PREFIX install architecture-independent files in PREFIX
2352 [$ac_default_prefix]
2353 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2354 [PREFIX]
2355
2356By default, \`make install' will install all the files in
2357\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2358an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2359for instance \`--prefix=\$HOME'.
2360
2361For better control, use the options below.
2362
2363Fine tuning of the installation directories:
2364 --bindir=DIR user executables [EPREFIX/bin]
2365 --sbindir=DIR system admin executables [EPREFIX/sbin]
2366 --libexecdir=DIR program executables [EPREFIX/libexec]
2367 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2368 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2369 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2370 --libdir=DIR object code libraries [EPREFIX/lib]
2371 --includedir=DIR C header files [PREFIX/include]
2372 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2373 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2374 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2375 --infodir=DIR info documentation [DATAROOTDIR/info]
2376 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2377 --mandir=DIR man documentation [DATAROOTDIR/man]
d0ac1c44 2378 --docdir=DIR documentation root [DATAROOTDIR/doc/libgnu]
c971b7fa
PA
2379 --htmldir=DIR html documentation [DOCDIR]
2380 --dvidir=DIR dvi documentation [DOCDIR]
2381 --pdfdir=DIR pdf documentation [DOCDIR]
2382 --psdir=DIR ps documentation [DOCDIR]
2383_ACEOF
2384
2385 cat <<\_ACEOF
2386
2387Program names:
2388 --program-prefix=PREFIX prepend PREFIX to installed program names
2389 --program-suffix=SUFFIX append SUFFIX to installed program names
2390 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2391
2392System types:
2393 --build=BUILD configure for building on BUILD [guessed]
2394 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2395 --target=TARGET configure for building compilers for TARGET [HOST]
2396_ACEOF
2397fi
2398
2399if test -n "$ac_init_help"; then
d0ac1c44
SM
2400 case $ac_init_help in
2401 short | recursive ) echo "Configuration of libgnu UNUSED-VERSION:";;
2402 esac
c971b7fa
PA
2403 cat <<\_ACEOF
2404
2405Optional Features:
2406 --disable-option-checking ignore unrecognized --enable/--with options
2407 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2408 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
d0ac1c44
SM
2409 --enable-maintainer-mode
2410 enable make rules and dependencies not useful (and
2411 sometimes confusing) to the casual installer
2196f55f 2412 --disable-largefile omit support for large files
d0ac1c44
SM
2413 --enable-dependency-tracking
2414 do not reject slow dependency extractors
2415 --disable-dependency-tracking
2416 speeds up one-time build
2417 --enable-silent-rules less verbose build output (undo: "make V=1")
2418 --disable-silent-rules verbose build output (undo: "make V=0")
c971b7fa
PA
2419
2420Some influential environment variables:
2421 CC C compiler command
2422 CFLAGS C compiler flags
2423 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2424 nonstandard directory <lib dir>
2425 LIBS libraries to pass to the linker, e.g. -l<library>
d0ac1c44 2426 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
c971b7fa
PA
2427 you have headers in a nonstandard directory <include dir>
2428 CPP C preprocessor
2429
2430Use these variables to override the choices made by `configure' or to help
2431it to find libraries and programs with nonstandard names/locations.
2432
2433Report bugs to the package provider.
2434_ACEOF
2435ac_status=$?
2436fi
2437
2438if test "$ac_init_help" = "recursive"; then
2439 # If there are subdirs, report their specific --help.
2440 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2441 test -d "$ac_dir" ||
2442 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2443 continue
2444 ac_builddir=.
2445
2446case "$ac_dir" in
2447.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2448*)
2449 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2450 # A ".." for each directory in $ac_dir_suffix.
2451 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2452 case $ac_top_builddir_sub in
2453 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2454 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2455 esac ;;
2456esac
2457ac_abs_top_builddir=$ac_pwd
2458ac_abs_builddir=$ac_pwd$ac_dir_suffix
2459# for backward compatibility:
2460ac_top_builddir=$ac_top_build_prefix
2461
2462case $srcdir in
2463 .) # We are building in place.
2464 ac_srcdir=.
2465 ac_top_srcdir=$ac_top_builddir_sub
2466 ac_abs_top_srcdir=$ac_pwd ;;
2467 [\\/]* | ?:[\\/]* ) # Absolute name.
2468 ac_srcdir=$srcdir$ac_dir_suffix;
2469 ac_top_srcdir=$srcdir
2470 ac_abs_top_srcdir=$srcdir ;;
2471 *) # Relative name.
2472 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2473 ac_top_srcdir=$ac_top_build_prefix$srcdir
2474 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2475esac
2476ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2477
2478 cd "$ac_dir" || { ac_status=$?; continue; }
2479 # Check for guested configure.
2480 if test -f "$ac_srcdir/configure.gnu"; then
2481 echo &&
2482 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2483 elif test -f "$ac_srcdir/configure"; then
2484 echo &&
2485 $SHELL "$ac_srcdir/configure" --help=recursive
2486 else
2487 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2488 fi || ac_status=$?
2489 cd "$ac_pwd" || { ac_status=$?; break; }
2490 done
2491fi
2492
2493test -n "$ac_init_help" && exit $ac_status
2494if $ac_init_version; then
2495 cat <<\_ACEOF
d0ac1c44
SM
2496libgnu configure UNUSED-VERSION
2497generated by GNU Autoconf 2.69
c971b7fa 2498
d0ac1c44 2499Copyright (C) 2012 Free Software Foundation, Inc.
c971b7fa
PA
2500This configure script is free software; the Free Software Foundation
2501gives unlimited permission to copy, distribute and modify it.
2502_ACEOF
2503 exit
2504fi
2505
2506## ------------------------ ##
2507## Autoconf initialization. ##
2508## ------------------------ ##
2509
2510# ac_fn_c_try_compile LINENO
2511# --------------------------
2512# Try to compile conftest.$ac_ext, and return whether this succeeded.
2513ac_fn_c_try_compile ()
2514{
2515 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2516 rm -f conftest.$ac_objext
2517 if { { ac_try="$ac_compile"
2518case "(($ac_try" in
2519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2520 *) ac_try_echo=$ac_try;;
2521esac
2522eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2523$as_echo "$ac_try_echo"; } >&5
2524 (eval "$ac_compile") 2>conftest.err
2525 ac_status=$?
2526 if test -s conftest.err; then
2527 grep -v '^ *+' conftest.err >conftest.er1
2528 cat conftest.er1 >&5
2529 mv -f conftest.er1 conftest.err
2530 fi
2531 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2532 test $ac_status = 0; } && {
2533 test -z "$ac_c_werror_flag" ||
2534 test ! -s conftest.err
2535 } && test -s conftest.$ac_objext; then :
2536 ac_retval=0
2537else
2538 $as_echo "$as_me: failed program was:" >&5
2539sed 's/^/| /' conftest.$ac_ext >&5
2540
2541 ac_retval=1
2542fi
d0ac1c44
SM
2543 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2544 as_fn_set_status $ac_retval
c971b7fa
PA
2545
2546} # ac_fn_c_try_compile
2547
2548# ac_fn_c_try_cpp LINENO
2549# ----------------------
2550# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2551ac_fn_c_try_cpp ()
2552{
2553 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2554 if { { ac_try="$ac_cpp conftest.$ac_ext"
2555case "(($ac_try" in
2556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2557 *) ac_try_echo=$ac_try;;
2558esac
2559eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2560$as_echo "$ac_try_echo"; } >&5
2561 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2562 ac_status=$?
2563 if test -s conftest.err; then
2564 grep -v '^ *+' conftest.err >conftest.er1
2565 cat conftest.er1 >&5
2566 mv -f conftest.er1 conftest.err
2567 fi
2568 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
d0ac1c44 2569 test $ac_status = 0; } > conftest.i && {
c971b7fa
PA
2570 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2571 test ! -s conftest.err
2572 }; then :
2573 ac_retval=0
2574else
2575 $as_echo "$as_me: failed program was:" >&5
2576sed 's/^/| /' conftest.$ac_ext >&5
2577
2578 ac_retval=1
2579fi
d0ac1c44
SM
2580 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2581 as_fn_set_status $ac_retval
c971b7fa
PA
2582
2583} # ac_fn_c_try_cpp
2584
2585# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2586# -------------------------------------------------------
2587# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2588# the include files in INCLUDES and setting the cache variable VAR
2589# accordingly.
2590ac_fn_c_check_header_mongrel ()
2591{
2592 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44 2593 if eval \${$3+:} false; then :
c971b7fa
PA
2594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2595$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2596if eval \${$3+:} false; then :
c971b7fa
PA
2597 $as_echo_n "(cached) " >&6
2598fi
2599eval ac_res=\$$3
2600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2601$as_echo "$ac_res" >&6; }
2602else
2603 # Is the header compilable?
2604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2605$as_echo_n "checking $2 usability... " >&6; }
2606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2607/* end confdefs.h. */
2608$4
2609#include <$2>
2610_ACEOF
2611if ac_fn_c_try_compile "$LINENO"; then :
2612 ac_header_compiler=yes
2613else
2614 ac_header_compiler=no
2615fi
2616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2618$as_echo "$ac_header_compiler" >&6; }
2619
2620# Is the header present?
2621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2622$as_echo_n "checking $2 presence... " >&6; }
2623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2624/* end confdefs.h. */
2625#include <$2>
2626_ACEOF
2627if ac_fn_c_try_cpp "$LINENO"; then :
2628 ac_header_preproc=yes
2629else
2630 ac_header_preproc=no
2631fi
d0ac1c44 2632rm -f conftest.err conftest.i conftest.$ac_ext
c971b7fa
PA
2633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2634$as_echo "$ac_header_preproc" >&6; }
2635
2636# So? What about this header?
2637case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2638 yes:no: )
2639 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2640$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2641 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2642$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2643 ;;
2644 no:yes:* )
2645 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2646$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2648$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2649 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2650$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2651 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2652$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2653 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2654$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2655 ;;
2656esac
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2658$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2659if eval \${$3+:} false; then :
c971b7fa
PA
2660 $as_echo_n "(cached) " >&6
2661else
2662 eval "$3=\$ac_header_compiler"
2663fi
2664eval ac_res=\$$3
2665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2666$as_echo "$ac_res" >&6; }
2667fi
d0ac1c44 2668 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
c971b7fa
PA
2669
2670} # ac_fn_c_check_header_mongrel
2671
2672# ac_fn_c_try_run LINENO
2673# ----------------------
2674# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2675# that executables *can* be run.
2676ac_fn_c_try_run ()
2677{
2678 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2679 if { { ac_try="$ac_link"
2680case "(($ac_try" in
2681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2682 *) ac_try_echo=$ac_try;;
2683esac
2684eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2685$as_echo "$ac_try_echo"; } >&5
2686 (eval "$ac_link") 2>&5
2687 ac_status=$?
2688 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2689 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2690 { { case "(($ac_try" in
2691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2692 *) ac_try_echo=$ac_try;;
2693esac
2694eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2695$as_echo "$ac_try_echo"; } >&5
2696 (eval "$ac_try") 2>&5
2697 ac_status=$?
2698 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2699 test $ac_status = 0; }; }; then :
2700 ac_retval=0
2701else
2702 $as_echo "$as_me: program exited with status $ac_status" >&5
2703 $as_echo "$as_me: failed program was:" >&5
2704sed 's/^/| /' conftest.$ac_ext >&5
2705
2706 ac_retval=$ac_status
2707fi
2708 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2709 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2710 as_fn_set_status $ac_retval
c971b7fa
PA
2711
2712} # ac_fn_c_try_run
2713
2714# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2715# -------------------------------------------------------
2716# Tests whether HEADER exists and can be compiled using the include files in
2717# INCLUDES, setting the cache variable VAR accordingly.
2718ac_fn_c_check_header_compile ()
2719{
2720 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2722$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2723if eval \${$3+:} false; then :
c971b7fa
PA
2724 $as_echo_n "(cached) " >&6
2725else
2726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2727/* end confdefs.h. */
2728$4
2729#include <$2>
2730_ACEOF
2731if ac_fn_c_try_compile "$LINENO"; then :
2732 eval "$3=yes"
2733else
2734 eval "$3=no"
2735fi
2736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2737fi
2738eval ac_res=\$$3
2739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2740$as_echo "$ac_res" >&6; }
d0ac1c44 2741 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
c971b7fa
PA
2742
2743} # ac_fn_c_check_header_compile
2744
d0ac1c44
SM
2745# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2746# -------------------------------------------
2747# Tests whether TYPE exists after having included INCLUDES, setting cache
2748# variable VAR accordingly.
2749ac_fn_c_check_type ()
2750{
2751 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2753$as_echo_n "checking for $2... " >&6; }
2754if eval \${$3+:} false; then :
2755 $as_echo_n "(cached) " >&6
2756else
2757 eval "$3=no"
2758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2759/* end confdefs.h. */
2760$4
2761int
2762main ()
2763{
2764if (sizeof ($2))
2765 return 0;
2766 ;
2767 return 0;
2768}
2769_ACEOF
2770if ac_fn_c_try_compile "$LINENO"; then :
2771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2772/* end confdefs.h. */
2773$4
2774int
2775main ()
2776{
2777if (sizeof (($2)))
2778 return 0;
2779 ;
2780 return 0;
2781}
2782_ACEOF
2783if ac_fn_c_try_compile "$LINENO"; then :
2784
2785else
2786 eval "$3=yes"
2787fi
2788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2789fi
2790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2791fi
2792eval ac_res=\$$3
2793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2794$as_echo "$ac_res" >&6; }
2795 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2796
2797} # ac_fn_c_check_type
2798
c971b7fa
PA
2799# ac_fn_c_try_link LINENO
2800# -----------------------
2801# Try to link conftest.$ac_ext, and return whether this succeeded.
2802ac_fn_c_try_link ()
2803{
2804 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2805 rm -f conftest.$ac_objext conftest$ac_exeext
2806 if { { ac_try="$ac_link"
2807case "(($ac_try" in
2808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2809 *) ac_try_echo=$ac_try;;
2810esac
2811eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2812$as_echo "$ac_try_echo"; } >&5
2813 (eval "$ac_link") 2>conftest.err
2814 ac_status=$?
2815 if test -s conftest.err; then
2816 grep -v '^ *+' conftest.err >conftest.er1
2817 cat conftest.er1 >&5
2818 mv -f conftest.er1 conftest.err
2819 fi
2820 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2821 test $ac_status = 0; } && {
2822 test -z "$ac_c_werror_flag" ||
2823 test ! -s conftest.err
2824 } && test -s conftest$ac_exeext && {
2825 test "$cross_compiling" = yes ||
d0ac1c44 2826 test -x conftest$ac_exeext
c971b7fa
PA
2827 }; then :
2828 ac_retval=0
2829else
2830 $as_echo "$as_me: failed program was:" >&5
2831sed 's/^/| /' conftest.$ac_ext >&5
2832
2833 ac_retval=1
2834fi
2835 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2836 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2837 # interfere with the next link command; also delete a directory that is
2838 # left behind by Apple's compiler. We do this before executing the actions.
2839 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2840 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2841 as_fn_set_status $ac_retval
c971b7fa
PA
2842
2843} # ac_fn_c_try_link
2844
8690e634
JK
2845# ac_fn_c_check_func LINENO FUNC VAR
2846# ----------------------------------
2847# Tests whether FUNC exists, setting the cache variable VAR accordingly
2848ac_fn_c_check_func ()
2849{
2850 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2852$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2853if eval \${$3+:} false; then :
8690e634
JK
2854 $as_echo_n "(cached) " >&6
2855else
2856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2857/* end confdefs.h. */
2858/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2859 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2860#define $2 innocuous_$2
2861
2862/* System header to define __stub macros and hopefully few prototypes,
2863 which can conflict with char $2 (); below.
2864 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2865 <limits.h> exists even on freestanding compilers. */
2866
2867#ifdef __STDC__
2868# include <limits.h>
2869#else
2870# include <assert.h>
2871#endif
2872
2873#undef $2
2874
2875/* Override any GCC internal prototype to avoid an error.
2876 Use char because int might match the return type of a GCC
2877 builtin and then its argument prototype would still apply. */
2878#ifdef __cplusplus
2879extern "C"
2880#endif
2881char $2 ();
2882/* The GNU C library defines this for functions which it implements
2883 to always fail with ENOSYS. Some functions are actually named
2884 something starting with __ and the normal name is an alias. */
2885#if defined __stub_$2 || defined __stub___$2
2886choke me
2887#endif
2888
2889int
2890main ()
2891{
2892return $2 ();
2893 ;
2894 return 0;
2895}
2896_ACEOF
2897if ac_fn_c_try_link "$LINENO"; then :
2898 eval "$3=yes"
2899else
2900 eval "$3=no"
2901fi
2902rm -f core conftest.err conftest.$ac_objext \
2903 conftest$ac_exeext conftest.$ac_ext
2904fi
2905eval ac_res=\$$3
2906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2907$as_echo "$ac_res" >&6; }
d0ac1c44 2908 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
8690e634
JK
2909
2910} # ac_fn_c_check_func
2911
d0ac1c44
SM
2912# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2913# ---------------------------------------------
2914# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2915# accordingly.
8986e351
TT
2916ac_fn_c_check_decl ()
2917{
2918 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44
SM
2919 as_decl_name=`echo $2|sed 's/ *(.*//'`
2920 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2922$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2923if eval \${$3+:} false; then :
8986e351
TT
2924 $as_echo_n "(cached) " >&6
2925else
2926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2927/* end confdefs.h. */
2928$4
2929int
2930main ()
2931{
d0ac1c44
SM
2932#ifndef $as_decl_name
2933#ifdef __cplusplus
2934 (void) $as_decl_use;
2935#else
2936 (void) $as_decl_name;
2937#endif
8986e351
TT
2938#endif
2939
2940 ;
2941 return 0;
2942}
2943_ACEOF
2944if ac_fn_c_try_compile "$LINENO"; then :
2945 eval "$3=yes"
2946else
2947 eval "$3=no"
2948fi
2949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2950fi
2951eval ac_res=\$$3
2952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2953$as_echo "$ac_res" >&6; }
d0ac1c44 2954 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
8986e351
TT
2955
2956} # ac_fn_c_check_decl
2957
c971b7fa
PA
2958# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2959# --------------------------------------------
2960# Tries to find the compile-time value of EXPR in a program that includes
2961# INCLUDES, setting VAR accordingly. Returns whether the value could be
2962# computed
2963ac_fn_c_compute_int ()
2964{
2965 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2966 if test "$cross_compiling" = yes; then
2967 # Depending upon the size, compute the lo and hi bounds.
2968cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2969/* end confdefs.h. */
2970$4
2971int
2972main ()
2973{
2974static int test_array [1 - 2 * !(($2) >= 0)];
d0ac1c44
SM
2975test_array [0] = 0;
2976return test_array [0];
c971b7fa
PA
2977
2978 ;
2979 return 0;
2980}
2981_ACEOF
2982if ac_fn_c_try_compile "$LINENO"; then :
2983 ac_lo=0 ac_mid=0
2984 while :; do
2985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2986/* end confdefs.h. */
2987$4
2988int
2989main ()
2990{
2991static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2992test_array [0] = 0;
2993return test_array [0];
c971b7fa
PA
2994
2995 ;
2996 return 0;
2997}
2998_ACEOF
2999if ac_fn_c_try_compile "$LINENO"; then :
3000 ac_hi=$ac_mid; break
3001else
3002 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
3003 if test $ac_lo -le $ac_mid; then
3004 ac_lo= ac_hi=
3005 break
3006 fi
3007 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
3008fi
3009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3010 done
3011else
3012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3013/* end confdefs.h. */
3014$4
3015int
3016main ()
3017{
3018static int test_array [1 - 2 * !(($2) < 0)];
d0ac1c44
SM
3019test_array [0] = 0;
3020return test_array [0];
c971b7fa
PA
3021
3022 ;
3023 return 0;
3024}
3025_ACEOF
3026if ac_fn_c_try_compile "$LINENO"; then :
3027 ac_hi=-1 ac_mid=-1
3028 while :; do
3029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3030/* end confdefs.h. */
3031$4
3032int
3033main ()
3034{
3035static int test_array [1 - 2 * !(($2) >= $ac_mid)];
d0ac1c44
SM
3036test_array [0] = 0;
3037return test_array [0];
c971b7fa
PA
3038
3039 ;
3040 return 0;
3041}
3042_ACEOF
3043if ac_fn_c_try_compile "$LINENO"; then :
3044 ac_lo=$ac_mid; break
3045else
3046 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3047 if test $ac_mid -le $ac_hi; then
3048 ac_lo= ac_hi=
3049 break
3050 fi
3051 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3052fi
3053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3054 done
3055else
3056 ac_lo= ac_hi=
3057fi
3058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3059fi
3060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3061# Binary search between lo and hi bounds.
3062while test "x$ac_lo" != "x$ac_hi"; do
3063 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3065/* end confdefs.h. */
3066$4
3067int
3068main ()
3069{
3070static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
3071test_array [0] = 0;
3072return test_array [0];
c971b7fa
PA
3073
3074 ;
3075 return 0;
3076}
3077_ACEOF
3078if ac_fn_c_try_compile "$LINENO"; then :
3079 ac_hi=$ac_mid
3080else
3081 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3082fi
3083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3084done
3085case $ac_lo in #((
3086?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3087'') ac_retval=1 ;;
3088esac
3089 else
3090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3091/* end confdefs.h. */
3092$4
3093static long int longval () { return $2; }
3094static unsigned long int ulongval () { return $2; }
3095#include <stdio.h>
3096#include <stdlib.h>
3097int
3098main ()
3099{
3100
3101 FILE *f = fopen ("conftest.val", "w");
3102 if (! f)
3103 return 1;
3104 if (($2) < 0)
3105 {
3106 long int i = longval ();
3107 if (i != ($2))
3108 return 1;
3109 fprintf (f, "%ld", i);
3110 }
3111 else
3112 {
3113 unsigned long int i = ulongval ();
3114 if (i != ($2))
3115 return 1;
3116 fprintf (f, "%lu", i);
3117 }
3118 /* Do not output a trailing newline, as this causes \r\n confusion
3119 on some platforms. */
3120 return ferror (f) || fclose (f) != 0;
3121
3122 ;
3123 return 0;
3124}
3125_ACEOF
3126if ac_fn_c_try_run "$LINENO"; then :
3127 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3128else
3129 ac_retval=1
3130fi
3131rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3132 conftest.$ac_objext conftest.beam conftest.$ac_ext
3133rm -f conftest.val
3134
3135 fi
d0ac1c44
SM
3136 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3137 as_fn_set_status $ac_retval
c971b7fa
PA
3138
3139} # ac_fn_c_compute_int
725e2999
JB
3140
3141# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3142# ----------------------------------------------------
3143# Tries to find if the field MEMBER exists in type AGGR, after including
3144# INCLUDES, setting cache variable VAR accordingly.
3145ac_fn_c_check_member ()
3146{
3147 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3149$as_echo_n "checking for $2.$3... " >&6; }
3150if eval \${$4+:} false; then :
3151 $as_echo_n "(cached) " >&6
3152else
3153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3154/* end confdefs.h. */
3155$5
3156int
3157main ()
3158{
3159static $2 ac_aggr;
3160if (ac_aggr.$3)
3161return 0;
3162 ;
3163 return 0;
3164}
3165_ACEOF
3166if ac_fn_c_try_compile "$LINENO"; then :
3167 eval "$4=yes"
3168else
3169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3170/* end confdefs.h. */
3171$5
3172int
3173main ()
3174{
3175static $2 ac_aggr;
3176if (sizeof ac_aggr.$3)
3177return 0;
3178 ;
3179 return 0;
3180}
3181_ACEOF
3182if ac_fn_c_try_compile "$LINENO"; then :
3183 eval "$4=yes"
3184else
3185 eval "$4=no"
3186fi
3187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3188fi
3189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3190fi
3191eval ac_res=\$$4
3192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3193$as_echo "$ac_res" >&6; }
3194 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3195
3196} # ac_fn_c_check_member
c971b7fa
PA
3197cat >config.log <<_ACEOF
3198This file contains any messages produced by compilers while
3199running configure, to aid debugging if configure makes a mistake.
3200
d0ac1c44
SM
3201It was created by libgnu $as_me UNUSED-VERSION, which was
3202generated by GNU Autoconf 2.69. Invocation command line was
c971b7fa
PA
3203
3204 $ $0 $@
3205
3206_ACEOF
3207exec 5>>config.log
3208{
3209cat <<_ASUNAME
3210## --------- ##
3211## Platform. ##
3212## --------- ##
3213
3214hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3215uname -m = `(uname -m) 2>/dev/null || echo unknown`
3216uname -r = `(uname -r) 2>/dev/null || echo unknown`
3217uname -s = `(uname -s) 2>/dev/null || echo unknown`
3218uname -v = `(uname -v) 2>/dev/null || echo unknown`
3219
3220/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3221/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3222
3223/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3224/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3225/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3226/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3227/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3228/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3229/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3230
3231_ASUNAME
3232
3233as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3234for as_dir in $PATH
3235do
3236 IFS=$as_save_IFS
3237 test -z "$as_dir" && as_dir=.
3238 $as_echo "PATH: $as_dir"
3239 done
3240IFS=$as_save_IFS
3241
3242} >&5
3243
3244cat >&5 <<_ACEOF
3245
3246
3247## ----------- ##
3248## Core tests. ##
3249## ----------- ##
3250
3251_ACEOF
3252
3253
3254# Keep a trace of the command line.
3255# Strip out --no-create and --no-recursion so they do not pile up.
3256# Strip out --silent because we don't want to record it for future runs.
3257# Also quote any args containing shell meta-characters.
3258# Make two passes to allow for proper duplicate-argument suppression.
3259ac_configure_args=
3260ac_configure_args0=
3261ac_configure_args1=
3262ac_must_keep_next=false
3263for ac_pass in 1 2
3264do
3265 for ac_arg
3266 do
3267 case $ac_arg in
3268 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3269 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3270 | -silent | --silent | --silen | --sile | --sil)
3271 continue ;;
3272 *\'*)
3273 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3274 esac
3275 case $ac_pass in
3276 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3277 2)
3278 as_fn_append ac_configure_args1 " '$ac_arg'"
3279 if test $ac_must_keep_next = true; then
3280 ac_must_keep_next=false # Got value, back to normal.
3281 else
3282 case $ac_arg in
3283 *=* | --config-cache | -C | -disable-* | --disable-* \
3284 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3285 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3286 | -with-* | --with-* | -without-* | --without-* | --x)
3287 case "$ac_configure_args0 " in
3288 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3289 esac
3290 ;;
3291 -* ) ac_must_keep_next=true ;;
3292 esac
3293 fi
3294 as_fn_append ac_configure_args " '$ac_arg'"
3295 ;;
3296 esac
3297 done
3298done
3299{ ac_configure_args0=; unset ac_configure_args0;}
3300{ ac_configure_args1=; unset ac_configure_args1;}
3301
3302# When interrupted or exit'd, cleanup temporary files, and complete
3303# config.log. We remove comments because anyway the quotes in there
3304# would cause problems or look ugly.
3305# WARNING: Use '\'' to represent an apostrophe within the trap.
3306# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3307trap 'exit_status=$?
3308 # Save into config.log some information that might help in debugging.
3309 {
3310 echo
3311
d0ac1c44 3312 $as_echo "## ---------------- ##
c971b7fa 3313## Cache variables. ##
d0ac1c44 3314## ---------------- ##"
c971b7fa
PA
3315 echo
3316 # The following way of writing the cache mishandles newlines in values,
3317(
3318 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3319 eval ac_val=\$$ac_var
3320 case $ac_val in #(
3321 *${as_nl}*)
3322 case $ac_var in #(
3323 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3324$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3325 esac
3326 case $ac_var in #(
3327 _ | IFS | as_nl) ;; #(
3328 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3329 *) { eval $ac_var=; unset $ac_var;} ;;
3330 esac ;;
3331 esac
3332 done
3333 (set) 2>&1 |
3334 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3335 *${as_nl}ac_space=\ *)
3336 sed -n \
3337 "s/'\''/'\''\\\\'\'''\''/g;
3338 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3339 ;; #(
3340 *)
3341 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3342 ;;
3343 esac |
3344 sort
3345)
3346 echo
3347
d0ac1c44 3348 $as_echo "## ----------------- ##
c971b7fa 3349## Output variables. ##
d0ac1c44 3350## ----------------- ##"
c971b7fa
PA
3351 echo
3352 for ac_var in $ac_subst_vars
3353 do
3354 eval ac_val=\$$ac_var
3355 case $ac_val in
3356 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3357 esac
3358 $as_echo "$ac_var='\''$ac_val'\''"
3359 done | sort
3360 echo
3361
3362 if test -n "$ac_subst_files"; then
d0ac1c44 3363 $as_echo "## ------------------- ##
c971b7fa 3364## File substitutions. ##
d0ac1c44 3365## ------------------- ##"
c971b7fa
PA
3366 echo
3367 for ac_var in $ac_subst_files
3368 do
3369 eval ac_val=\$$ac_var
3370 case $ac_val in
3371 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3372 esac
3373 $as_echo "$ac_var='\''$ac_val'\''"
3374 done | sort
3375 echo
3376 fi
3377
3378 if test -s confdefs.h; then
d0ac1c44 3379 $as_echo "## ----------- ##
c971b7fa 3380## confdefs.h. ##
d0ac1c44 3381## ----------- ##"
c971b7fa
PA
3382 echo
3383 cat confdefs.h
3384 echo
3385 fi
3386 test "$ac_signal" != 0 &&
3387 $as_echo "$as_me: caught signal $ac_signal"
3388 $as_echo "$as_me: exit $exit_status"
3389 } >&5
3390 rm -f core *.core core.conftest.* &&
3391 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3392 exit $exit_status
3393' 0
3394for ac_signal in 1 2 13 15; do
3395 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3396done
3397ac_signal=0
3398
3399# confdefs.h avoids OS command line length limits that DEFS can exceed.
3400rm -f -r conftest* confdefs.h
3401
3402$as_echo "/* confdefs.h */" > confdefs.h
3403
3404# Predefined preprocessor variables.
3405
3406cat >>confdefs.h <<_ACEOF
3407#define PACKAGE_NAME "$PACKAGE_NAME"
3408_ACEOF
3409
3410cat >>confdefs.h <<_ACEOF
3411#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3412_ACEOF
3413
3414cat >>confdefs.h <<_ACEOF
3415#define PACKAGE_VERSION "$PACKAGE_VERSION"
3416_ACEOF
3417
3418cat >>confdefs.h <<_ACEOF
3419#define PACKAGE_STRING "$PACKAGE_STRING"
3420_ACEOF
3421
3422cat >>confdefs.h <<_ACEOF
3423#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3424_ACEOF
3425
3426cat >>confdefs.h <<_ACEOF
3427#define PACKAGE_URL "$PACKAGE_URL"
3428_ACEOF
3429
3430
3431# Let the site file select an alternate cache file if it wants to.
3432# Prefer an explicitly selected file to automatically selected ones.
3433ac_site_file1=NONE
3434ac_site_file2=NONE
3435if test -n "$CONFIG_SITE"; then
d0ac1c44
SM
3436 # We do not want a PATH search for config.site.
3437 case $CONFIG_SITE in #((
3438 -*) ac_site_file1=./$CONFIG_SITE;;
3439 */*) ac_site_file1=$CONFIG_SITE;;
3440 *) ac_site_file1=./$CONFIG_SITE;;
3441 esac
c971b7fa
PA
3442elif test "x$prefix" != xNONE; then
3443 ac_site_file1=$prefix/share/config.site
3444 ac_site_file2=$prefix/etc/config.site
3445else
3446 ac_site_file1=$ac_default_prefix/share/config.site
3447 ac_site_file2=$ac_default_prefix/etc/config.site
3448fi
3449for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3450do
3451 test "x$ac_site_file" = xNONE && continue
d0ac1c44 3452 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
c971b7fa
PA
3453 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3454$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3455 sed 's/^/| /' "$ac_site_file" >&5
d0ac1c44
SM
3456 . "$ac_site_file" \
3457 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3458$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3459as_fn_error $? "failed to load site script $ac_site_file
3460See \`config.log' for more details" "$LINENO" 5; }
c971b7fa
PA
3461 fi
3462done
3463
3464if test -r "$cache_file"; then
d0ac1c44
SM
3465 # Some versions of bash will fail to source /dev/null (special files
3466 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3467 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
c971b7fa
PA
3468 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3469$as_echo "$as_me: loading cache $cache_file" >&6;}
3470 case $cache_file in
3471 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3472 *) . "./$cache_file";;
3473 esac
3474 fi
3475else
3476 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3477$as_echo "$as_me: creating cache $cache_file" >&6;}
3478 >$cache_file
3479fi
3480
725e2999
JB
3481gl_header_list="$gl_header_list arpa/inet.h"
3482gl_header_list="$gl_header_list features.h"
472fa5ee
SM
3483gl_func_list="$gl_func_list canonicalize_file_name"
3484gl_func_list="$gl_func_list getcwd"
3485gl_func_list="$gl_func_list readlink"
3486gl_func_list="$gl_func_list realpath"
3487gl_header_list="$gl_header_list sys/param.h"
3488gl_header_list="$gl_header_list unistd.h"
3489gl_func_list="$gl_func_list _set_invalid_parameter_handler"
3490gl_header_list="$gl_header_list sys/socket.h"
3491gl_func_list="$gl_func_list fchdir"
3492gl_header_list="$gl_header_list dirent.h"
3493gl_func_list="$gl_func_list fcntl"
3494gl_func_list="$gl_func_list symlink"
3495gl_func_list="$gl_func_list fdopendir"
3496gl_func_list="$gl_func_list mempcpy"
3497gl_func_list="$gl_func_list btowc"
3498gl_func_list="$gl_func_list isblank"
3499gl_func_list="$gl_func_list iswctype"
3500gl_func_list="$gl_func_list mbsrtowcs"
3501gl_func_list="$gl_func_list wmemchr"
3502gl_func_list="$gl_func_list wmemcpy"
3503gl_func_list="$gl_func_list wmempcpy"
3504gl_header_list="$gl_header_list wctype.h"
8690e634 3505gl_fnmatch_required=GNU
472fa5ee
SM
3506gl_header_list="$gl_header_list sys/stat.h"
3507gl_func_list="$gl_func_list fstatat"
3508gl_func_list="$gl_func_list getdtablesize"
3509gl_func_list="$gl_func_list getlogin_r"
3510gl_func_list="$gl_func_list getprogname"
3511gl_func_list="$gl_func_list getexecname"
3512gl_header_list="$gl_header_list sys/time.h"
3513gl_func_list="$gl_func_list gettimeofday"
5e8754f9 3514gl_header_list="$gl_header_list sys/cdefs.h"
472fa5ee 3515gl_func_list="$gl_func_list getpwnam_r"
725e2999
JB
3516gl_header_list="$gl_header_list netdb.h"
3517gl_header_list="$gl_header_list netinet/in.h"
472fa5ee
SM
3518gl_header_list="$gl_header_list limits.h"
3519gl_header_list="$gl_header_list wchar.h"
3520gl_header_list="$gl_header_list stdint.h"
3521gl_header_list="$gl_header_list inttypes.h"
3522gl_func_list="$gl_func_list lstat"
3523gl_header_list="$gl_header_list math.h"
3524gl_func_list="$gl_func_list mbsinit"
3525gl_func_list="$gl_func_list mbrtowc"
3526gl_header_list="$gl_header_list sys/mman.h"
3527gl_func_list="$gl_func_list mprotect"
b3279b60 3528gl_func_list="$gl_func_list mkostemp"
472fa5ee
SM
3529gl_func_list="$gl_func_list openat"
3530gl_func_list="$gl_func_list link"
5e8754f9
SDJ
3531gl_func_list="$gl_func_list secure_getenv"
3532gl_func_list="$gl_func_list getuid"
3533gl_func_list="$gl_func_list geteuid"
3534gl_func_list="$gl_func_list getgid"
3535gl_func_list="$gl_func_list getegid"
472fa5ee
SM
3536gl_func_list="$gl_func_list setenv"
3537gl_func_list="$gl_func_list strdup"
725e2999 3538gl_header_list="$gl_header_list sys/uio.h"
472fa5ee 3539gl_func_list="$gl_func_list pipe"
472fa5ee 3540gl_func_list="$gl_func_list iswcntrl"
c971b7fa
PA
3541# Check that the precious variables saved in the cache have kept the same
3542# value.
3543ac_cache_corrupted=false
3544for ac_var in $ac_precious_vars; do
3545 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3546 eval ac_new_set=\$ac_env_${ac_var}_set
3547 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3548 eval ac_new_val=\$ac_env_${ac_var}_value
3549 case $ac_old_set,$ac_new_set in
3550 set,)
3551 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3552$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3553 ac_cache_corrupted=: ;;
3554 ,set)
3555 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3556$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3557 ac_cache_corrupted=: ;;
3558 ,);;
3559 *)
3560 if test "x$ac_old_val" != "x$ac_new_val"; then
3561 # differences in whitespace do not lead to failure.
3562 ac_old_val_w=`echo x $ac_old_val`
3563 ac_new_val_w=`echo x $ac_new_val`
3564 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3565 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3566$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3567 ac_cache_corrupted=:
3568 else
3569 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3570$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3571 eval $ac_var=\$ac_old_val
3572 fi
3573 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3574$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3575 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3576$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3577 fi;;
3578 esac
3579 # Pass precious variables to config.status.
3580 if test "$ac_new_set" = set; then
3581 case $ac_new_val in
3582 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3583 *) ac_arg=$ac_var=$ac_new_val ;;
3584 esac
3585 case " $ac_configure_args " in
3586 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3587 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3588 esac
3589 fi
3590done
3591if $ac_cache_corrupted; then
3592 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3593$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3594 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3595$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d0ac1c44 3596 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
c971b7fa
PA
3597fi
3598## -------------------- ##
3599## Main body of script. ##
3600## -------------------- ##
3601
3602ac_ext=c
3603ac_cpp='$CPP $CPPFLAGS'
3604ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3605ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3606ac_compiler_gnu=$ac_cv_c_compiler_gnu
3607
3608
d0ac1c44 3609
c971b7fa
PA
3610ac_config_headers="$ac_config_headers config.h:config.in"
3611
3612
3613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
3614$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
3615 # Check whether --enable-maintainer-mode was given.
3616if test "${enable_maintainer_mode+set}" = set; then :
3617 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
3618else
3619 USE_MAINTAINER_MODE=no
3620fi
3621
3622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3623$as_echo "$USE_MAINTAINER_MODE" >&6; }
3624 if test $USE_MAINTAINER_MODE = yes; then
3625 MAINTAINER_MODE_TRUE=
3626 MAINTAINER_MODE_FALSE='#'
3627else
3628 MAINTAINER_MODE_TRUE='#'
3629 MAINTAINER_MODE_FALSE=
3630fi
3631
3632 MAINT=$MAINTAINER_MODE_TRUE
3633
3634
3635
3636ac_ext=c
3637ac_cpp='$CPP $CPPFLAGS'
3638ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3639ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3640ac_compiler_gnu=$ac_cv_c_compiler_gnu
3641if test -n "$ac_tool_prefix"; then
3642 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3643set dummy ${ac_tool_prefix}gcc; ac_word=$2
3644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3645$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3646if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
3647 $as_echo_n "(cached) " >&6
3648else
3649 if test -n "$CC"; then
3650 ac_cv_prog_CC="$CC" # Let the user override the test.
3651else
3652as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3653for as_dir in $PATH
3654do
3655 IFS=$as_save_IFS
3656 test -z "$as_dir" && as_dir=.
3657 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3658 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3659 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3660 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3661 break 2
3662 fi
3663done
3664 done
3665IFS=$as_save_IFS
3666
3667fi
3668fi
3669CC=$ac_cv_prog_CC
3670if test -n "$CC"; then
3671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3672$as_echo "$CC" >&6; }
3673else
3674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3675$as_echo "no" >&6; }
3676fi
3677
3678
3679fi
3680if test -z "$ac_cv_prog_CC"; then
3681 ac_ct_CC=$CC
3682 # Extract the first word of "gcc", so it can be a program name with args.
3683set dummy gcc; ac_word=$2
3684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3685$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3686if ${ac_cv_prog_ac_ct_CC+:} false; then :
c971b7fa
PA
3687 $as_echo_n "(cached) " >&6
3688else
3689 if test -n "$ac_ct_CC"; then
3690 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3691else
3692as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3693for as_dir in $PATH
3694do
3695 IFS=$as_save_IFS
3696 test -z "$as_dir" && as_dir=.
3697 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3698 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3699 ac_cv_prog_ac_ct_CC="gcc"
3700 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3701 break 2
3702 fi
3703done
3704 done
3705IFS=$as_save_IFS
3706
3707fi
3708fi
3709ac_ct_CC=$ac_cv_prog_ac_ct_CC
3710if test -n "$ac_ct_CC"; then
3711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3712$as_echo "$ac_ct_CC" >&6; }
3713else
3714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3715$as_echo "no" >&6; }
3716fi
3717
3718 if test "x$ac_ct_CC" = x; then
3719 CC=""
3720 else
3721 case $cross_compiling:$ac_tool_warned in
3722yes:)
3723{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3724$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3725ac_tool_warned=yes ;;
3726esac
3727 CC=$ac_ct_CC
3728 fi
3729else
3730 CC="$ac_cv_prog_CC"
3731fi
3732
3733if test -z "$CC"; then
3734 if test -n "$ac_tool_prefix"; then
3735 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3736set dummy ${ac_tool_prefix}cc; ac_word=$2
3737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3738$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3739if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
3740 $as_echo_n "(cached) " >&6
3741else
3742 if test -n "$CC"; then
3743 ac_cv_prog_CC="$CC" # Let the user override the test.
3744else
3745as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3746for as_dir in $PATH
3747do
3748 IFS=$as_save_IFS
3749 test -z "$as_dir" && as_dir=.
3750 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3751 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3752 ac_cv_prog_CC="${ac_tool_prefix}cc"
3753 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3754 break 2
3755 fi
3756done
3757 done
3758IFS=$as_save_IFS
3759
3760fi
3761fi
3762CC=$ac_cv_prog_CC
3763if test -n "$CC"; then
3764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3765$as_echo "$CC" >&6; }
3766else
3767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3768$as_echo "no" >&6; }
3769fi
3770
3771
3772 fi
3773fi
3774if test -z "$CC"; then
3775 # Extract the first word of "cc", so it can be a program name with args.
3776set dummy cc; ac_word=$2
3777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3778$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3779if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
3780 $as_echo_n "(cached) " >&6
3781else
3782 if test -n "$CC"; then
3783 ac_cv_prog_CC="$CC" # Let the user override the test.
3784else
3785 ac_prog_rejected=no
3786as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3787for as_dir in $PATH
3788do
3789 IFS=$as_save_IFS
3790 test -z "$as_dir" && as_dir=.
3791 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3792 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3793 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3794 ac_prog_rejected=yes
3795 continue
3796 fi
3797 ac_cv_prog_CC="cc"
3798 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3799 break 2
3800 fi
3801done
3802 done
3803IFS=$as_save_IFS
3804
3805if test $ac_prog_rejected = yes; then
3806 # We found a bogon in the path, so make sure we never use it.
3807 set dummy $ac_cv_prog_CC
3808 shift
3809 if test $# != 0; then
3810 # We chose a different compiler from the bogus one.
3811 # However, it has the same basename, so the bogon will be chosen
3812 # first if we set CC to just the basename; use the full file name.
3813 shift
3814 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3815 fi
3816fi
3817fi
3818fi
3819CC=$ac_cv_prog_CC
3820if test -n "$CC"; then
3821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3822$as_echo "$CC" >&6; }
3823else
3824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3825$as_echo "no" >&6; }
3826fi
3827
3828
3829fi
3830if test -z "$CC"; then
3831 if test -n "$ac_tool_prefix"; then
3832 for ac_prog in cl.exe
3833 do
3834 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3835set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3837$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3838if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
3839 $as_echo_n "(cached) " >&6
3840else
3841 if test -n "$CC"; then
3842 ac_cv_prog_CC="$CC" # Let the user override the test.
3843else
3844as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3845for as_dir in $PATH
3846do
3847 IFS=$as_save_IFS
3848 test -z "$as_dir" && as_dir=.
3849 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3850 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3851 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3852 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3853 break 2
3854 fi
3855done
3856 done
3857IFS=$as_save_IFS
3858
3859fi
3860fi
3861CC=$ac_cv_prog_CC
3862if test -n "$CC"; then
3863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3864$as_echo "$CC" >&6; }
3865else
3866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3867$as_echo "no" >&6; }
3868fi
3869
3870
3871 test -n "$CC" && break
3872 done
3873fi
3874if test -z "$CC"; then
3875 ac_ct_CC=$CC
3876 for ac_prog in cl.exe
3877do
3878 # Extract the first word of "$ac_prog", so it can be a program name with args.
3879set dummy $ac_prog; ac_word=$2
3880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3881$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3882if ${ac_cv_prog_ac_ct_CC+:} false; then :
c971b7fa
PA
3883 $as_echo_n "(cached) " >&6
3884else
3885 if test -n "$ac_ct_CC"; then
3886 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3887else
3888as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3889for as_dir in $PATH
3890do
3891 IFS=$as_save_IFS
3892 test -z "$as_dir" && as_dir=.
3893 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3894 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3895 ac_cv_prog_ac_ct_CC="$ac_prog"
3896 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3897 break 2
3898 fi
3899done
3900 done
3901IFS=$as_save_IFS
3902
3903fi
3904fi
3905ac_ct_CC=$ac_cv_prog_ac_ct_CC
3906if test -n "$ac_ct_CC"; then
3907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3908$as_echo "$ac_ct_CC" >&6; }
3909else
3910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3911$as_echo "no" >&6; }
3912fi
3913
3914
3915 test -n "$ac_ct_CC" && break
3916done
3917
3918 if test "x$ac_ct_CC" = x; then
3919 CC=""
3920 else
3921 case $cross_compiling:$ac_tool_warned in
3922yes:)
3923{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3924$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3925ac_tool_warned=yes ;;
3926esac
3927 CC=$ac_ct_CC
3928 fi
3929fi
3930
3931fi
3932
3933
3934test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3935$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3936as_fn_error $? "no acceptable C compiler found in \$PATH
3937See \`config.log' for more details" "$LINENO" 5; }
c971b7fa
PA
3938
3939# Provide some information about the compiler.
3940$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3941set X $ac_compile
3942ac_compiler=$2
5e8754f9 3943for ac_option in --version -v -V -qversion; do
c971b7fa
PA
3944 { { ac_try="$ac_compiler $ac_option >&5"
3945case "(($ac_try" in
3946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3947 *) ac_try_echo=$ac_try;;
3948esac
3949eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3950$as_echo "$ac_try_echo"; } >&5
3951 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3952 ac_status=$?
3953 if test -s conftest.err; then
3954 sed '10a\
3955... rest of stderr output deleted ...
3956 10q' conftest.err >conftest.er1
3957 cat conftest.er1 >&5
c971b7fa 3958 fi
d0ac1c44 3959 rm -f conftest.er1 conftest.err
c971b7fa
PA
3960 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3961 test $ac_status = 0; }
3962done
3963
3964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3965/* end confdefs.h. */
d0ac1c44 3966
c971b7fa
PA
3967int
3968main ()
3969{
c971b7fa
PA
3970
3971 ;
3972 return 0;
3973}
3974_ACEOF
3975ac_clean_files_save=$ac_clean_files
d0ac1c44 3976ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
c971b7fa
PA
3977# Try to create an executable without -o first, disregard a.out.
3978# It will help us diagnose broken compilers, and finding out an intuition
3979# of exeext.
d0ac1c44
SM
3980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3981$as_echo_n "checking whether the C compiler works... " >&6; }
c971b7fa
PA
3982ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3983
3984# The possible output files:
3985ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3986
3987ac_rmfiles=
3988for ac_file in $ac_files
3989do
3990 case $ac_file in
3991 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3992 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3993 esac
3994done
3995rm -f $ac_rmfiles
3996
3997if { { ac_try="$ac_link_default"
3998case "(($ac_try" in
3999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4000 *) ac_try_echo=$ac_try;;
4001esac
4002eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4003$as_echo "$ac_try_echo"; } >&5
4004 (eval "$ac_link_default") 2>&5
4005 ac_status=$?
4006 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4007 test $ac_status = 0; }; then :
4008 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4009# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4010# in a Makefile. We should not override ac_cv_exeext if it was cached,
4011# so that the user can short-circuit this test for compilers unknown to
4012# Autoconf.
4013for ac_file in $ac_files ''
4014do
4015 test -f "$ac_file" || continue
4016 case $ac_file in
4017 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4018 ;;
4019 [ab].out )
4020 # We found the default executable, but exeext='' is most
4021 # certainly right.
4022 break;;
4023 *.* )
4024 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4025 then :; else
4026 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4027 fi
4028 # We set ac_cv_exeext here because the later test for it is not
4029 # safe: cross compilers may not add the suffix if given an `-o'
4030 # argument, so we may need to know it at that point already.
4031 # Even if this section looks crufty: it has the advantage of
4032 # actually working.
4033 break;;
4034 * )
4035 break;;
4036 esac
4037done
4038test "$ac_cv_exeext" = no && ac_cv_exeext=
4039
4040else
4041 ac_file=''
4042fi
c971b7fa 4043if test -z "$ac_file"; then :
d0ac1c44
SM
4044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4045$as_echo "no" >&6; }
4046$as_echo "$as_me: failed program was:" >&5
c971b7fa
PA
4047sed 's/^/| /' conftest.$ac_ext >&5
4048
4049{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4050$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4051as_fn_error 77 "C compiler cannot create executables
4052See \`config.log' for more details" "$LINENO" 5; }
4053else
4054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4055$as_echo "yes" >&6; }
c971b7fa 4056fi
d0ac1c44
SM
4057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4058$as_echo_n "checking for C compiler default output file name... " >&6; }
4059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4060$as_echo "$ac_file" >&6; }
c971b7fa
PA
4061ac_exeext=$ac_cv_exeext
4062
d0ac1c44 4063rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
c971b7fa 4064ac_clean_files=$ac_clean_files_save
c971b7fa
PA
4065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4066$as_echo_n "checking for suffix of executables... " >&6; }
4067if { { ac_try="$ac_link"
4068case "(($ac_try" in
4069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4070 *) ac_try_echo=$ac_try;;
4071esac
4072eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4073$as_echo "$ac_try_echo"; } >&5
4074 (eval "$ac_link") 2>&5
4075 ac_status=$?
4076 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4077 test $ac_status = 0; }; then :
4078 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4079# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4080# work properly (i.e., refer to `conftest.exe'), while it won't with
4081# `rm'.
4082for ac_file in conftest.exe conftest conftest.*; do
4083 test -f "$ac_file" || continue
4084 case $ac_file in
4085 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4086 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4087 break;;
4088 * ) break;;
4089 esac
4090done
4091else
4092 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4093$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4094as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4095See \`config.log' for more details" "$LINENO" 5; }
c971b7fa 4096fi
d0ac1c44 4097rm -f conftest conftest$ac_cv_exeext
c971b7fa
PA
4098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4099$as_echo "$ac_cv_exeext" >&6; }
4100
4101rm -f conftest.$ac_ext
4102EXEEXT=$ac_cv_exeext
4103ac_exeext=$EXEEXT
d0ac1c44
SM
4104cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4105/* end confdefs.h. */
4106#include <stdio.h>
4107int
4108main ()
4109{
4110FILE *f = fopen ("conftest.out", "w");
4111 return ferror (f) || fclose (f) != 0;
4112
4113 ;
4114 return 0;
4115}
4116_ACEOF
4117ac_clean_files="$ac_clean_files conftest.out"
4118# Check that the compiler produces executables we can run. If not, either
4119# the compiler is broken, or we cross compile.
4120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4121$as_echo_n "checking whether we are cross compiling... " >&6; }
4122if test "$cross_compiling" != yes; then
4123 { { ac_try="$ac_link"
4124case "(($ac_try" in
4125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4126 *) ac_try_echo=$ac_try;;
4127esac
4128eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4129$as_echo "$ac_try_echo"; } >&5
4130 (eval "$ac_link") 2>&5
4131 ac_status=$?
4132 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4133 test $ac_status = 0; }
4134 if { ac_try='./conftest$ac_cv_exeext'
4135 { { case "(($ac_try" in
4136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4137 *) ac_try_echo=$ac_try;;
4138esac
4139eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4140$as_echo "$ac_try_echo"; } >&5
4141 (eval "$ac_try") 2>&5
4142 ac_status=$?
4143 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4144 test $ac_status = 0; }; }; then
4145 cross_compiling=no
4146 else
4147 if test "$cross_compiling" = maybe; then
4148 cross_compiling=yes
4149 else
4150 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4151$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4152as_fn_error $? "cannot run C compiled programs.
4153If you meant to cross compile, use \`--host'.
4154See \`config.log' for more details" "$LINENO" 5; }
4155 fi
4156 fi
4157fi
4158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4159$as_echo "$cross_compiling" >&6; }
4160
4161rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4162ac_clean_files=$ac_clean_files_save
c971b7fa
PA
4163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4164$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 4165if ${ac_cv_objext+:} false; then :
c971b7fa
PA
4166 $as_echo_n "(cached) " >&6
4167else
4168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4169/* end confdefs.h. */
4170
4171int
4172main ()
4173{
4174
4175 ;
4176 return 0;
4177}
4178_ACEOF
4179rm -f conftest.o conftest.obj
4180if { { ac_try="$ac_compile"
4181case "(($ac_try" in
4182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4183 *) ac_try_echo=$ac_try;;
4184esac
4185eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4186$as_echo "$ac_try_echo"; } >&5
4187 (eval "$ac_compile") 2>&5
4188 ac_status=$?
4189 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4190 test $ac_status = 0; }; then :
4191 for ac_file in conftest.o conftest.obj conftest.*; do
4192 test -f "$ac_file" || continue;
4193 case $ac_file in
4194 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4195 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4196 break;;
4197 esac
4198done
4199else
4200 $as_echo "$as_me: failed program was:" >&5
4201sed 's/^/| /' conftest.$ac_ext >&5
4202
4203{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4204$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4205as_fn_error $? "cannot compute suffix of object files: cannot compile
4206See \`config.log' for more details" "$LINENO" 5; }
c971b7fa
PA
4207fi
4208rm -f conftest.$ac_cv_objext conftest.$ac_ext
4209fi
4210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4211$as_echo "$ac_cv_objext" >&6; }
4212OBJEXT=$ac_cv_objext
4213ac_objext=$OBJEXT
4214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4215$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 4216if ${ac_cv_c_compiler_gnu+:} false; then :
c971b7fa
PA
4217 $as_echo_n "(cached) " >&6
4218else
4219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4220/* end confdefs.h. */
4221
4222int
4223main ()
4224{
4225#ifndef __GNUC__
4226 choke me
4227#endif
4228
4229 ;
4230 return 0;
4231}
4232_ACEOF
4233if ac_fn_c_try_compile "$LINENO"; then :
4234 ac_compiler_gnu=yes
4235else
4236 ac_compiler_gnu=no
4237fi
4238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4239ac_cv_c_compiler_gnu=$ac_compiler_gnu
4240
4241fi
4242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4243$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4244if test $ac_compiler_gnu = yes; then
4245 GCC=yes
4246else
4247 GCC=
4248fi
4249ac_test_CFLAGS=${CFLAGS+set}
4250ac_save_CFLAGS=$CFLAGS
4251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4252$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 4253if ${ac_cv_prog_cc_g+:} false; then :
c971b7fa
PA
4254 $as_echo_n "(cached) " >&6
4255else
4256 ac_save_c_werror_flag=$ac_c_werror_flag
4257 ac_c_werror_flag=yes
4258 ac_cv_prog_cc_g=no
4259 CFLAGS="-g"
4260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4261/* end confdefs.h. */
4262
4263int
4264main ()
4265{
4266
4267 ;
4268 return 0;
4269}
4270_ACEOF
4271if ac_fn_c_try_compile "$LINENO"; then :
4272 ac_cv_prog_cc_g=yes
4273else
4274 CFLAGS=""
4275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4276/* end confdefs.h. */
4277
4278int
4279main ()
4280{
4281
4282 ;
4283 return 0;
4284}
4285_ACEOF
4286if ac_fn_c_try_compile "$LINENO"; then :
4287
4288else
4289 ac_c_werror_flag=$ac_save_c_werror_flag
4290 CFLAGS="-g"
4291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4292/* end confdefs.h. */
4293
4294int
4295main ()
4296{
4297
4298 ;
4299 return 0;
4300}
4301_ACEOF
4302if ac_fn_c_try_compile "$LINENO"; then :
4303 ac_cv_prog_cc_g=yes
4304fi
4305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4306fi
4307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4308fi
4309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4310 ac_c_werror_flag=$ac_save_c_werror_flag
4311fi
4312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4313$as_echo "$ac_cv_prog_cc_g" >&6; }
4314if test "$ac_test_CFLAGS" = set; then
4315 CFLAGS=$ac_save_CFLAGS
4316elif test $ac_cv_prog_cc_g = yes; then
4317 if test "$GCC" = yes; then
4318 CFLAGS="-g -O2"
4319 else
4320 CFLAGS="-g"
4321 fi
4322else
4323 if test "$GCC" = yes; then
4324 CFLAGS="-O2"
4325 else
4326 CFLAGS=
4327 fi
4328fi
5e8754f9
SDJ
4329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4330$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4331if ${ac_cv_prog_cc_c89+:} false; then :
c971b7fa
PA
4332 $as_echo_n "(cached) " >&6
4333else
5e8754f9 4334 ac_cv_prog_cc_c89=no
c971b7fa
PA
4335ac_save_CC=$CC
4336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4337/* end confdefs.h. */
4338#include <stdarg.h>
4339#include <stdio.h>
5e8754f9
SDJ
4340struct stat;
4341/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4342struct buf { int x; };
4343FILE * (*rcsopen) (struct buf *, struct stat *, int);
4344static char *e (p, i)
4345 char **p;
4346 int i;
7a6dbc2f 4347{
5e8754f9 4348 return p[i];
c971b7fa 4349}
5e8754f9 4350static char *f (char * (*g) (char **, int), char **p, ...)
7a6dbc2f 4351{
5e8754f9
SDJ
4352 char *s;
4353 va_list v;
4354 va_start (v,p);
4355 s = g (p, va_arg (v,int));
4356 va_end (v);
4357 return s;
7a6dbc2f 4358}
7a6dbc2f 4359
5e8754f9
SDJ
4360/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4361 function prototypes and stuff, but not '\xHH' hex character constants.
4362 These don't provoke an error unfortunately, instead are silently treated
4363 as 'x'. The following induces an error, until -std is added to get
4364 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4365 array size at least. It's necessary to write '\x00'==0 to get something
4366 that's true only with -std. */
4367int osf4_cc_array ['\x00' == 0 ? 1 : -1];
7a6dbc2f 4368
5e8754f9
SDJ
4369/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4370 inside strings and character constants. */
4371#define FOO(x) 'x'
4372int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
c971b7fa 4373
5e8754f9
SDJ
4374int test (int i, double x);
4375struct s1 {int (*f) (int a);};
4376struct s2 {int (*f) (double a);};
4377int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4378int argc;
4379char **argv;
c971b7fa
PA
4380int
4381main ()
4382{
5e8754f9 4383return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
c971b7fa
PA
4384 ;
4385 return 0;
4386}
4387_ACEOF
5e8754f9
SDJ
4388for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4389 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
c971b7fa
PA
4390do
4391 CC="$ac_save_CC $ac_arg"
4392 if ac_fn_c_try_compile "$LINENO"; then :
5e8754f9 4393 ac_cv_prog_cc_c89=$ac_arg
c971b7fa
PA
4394fi
4395rm -f core conftest.err conftest.$ac_objext
5e8754f9 4396 test "x$ac_cv_prog_cc_c89" != "xno" && break
c971b7fa
PA
4397done
4398rm -f conftest.$ac_ext
4399CC=$ac_save_CC
4400
4401fi
4402# AC_CACHE_VAL
5e8754f9 4403case "x$ac_cv_prog_cc_c89" in
c971b7fa
PA
4404 x)
4405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4406$as_echo "none needed" >&6; } ;;
4407 xno)
4408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4409$as_echo "unsupported" >&6; } ;;
4410 *)
5e8754f9
SDJ
4411 CC="$CC $ac_cv_prog_cc_c89"
4412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4413$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c971b7fa 4414esac
5e8754f9 4415if test "x$ac_cv_prog_cc_c89" != xno; then :
7a6dbc2f 4416
5e8754f9 4417fi
7a6dbc2f 4418
5e8754f9
SDJ
4419ac_ext=c
4420ac_cpp='$CPP $CPPFLAGS'
4421ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4422ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4423ac_compiler_gnu=$ac_cv_c_compiler_gnu
7a6dbc2f 4424
5e8754f9
SDJ
4425ac_aux_dir=
4426for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4427 if test -f "$ac_dir/install-sh"; then
4428 ac_aux_dir=$ac_dir
4429 ac_install_sh="$ac_aux_dir/install-sh -c"
4430 break
4431 elif test -f "$ac_dir/install.sh"; then
4432 ac_aux_dir=$ac_dir
4433 ac_install_sh="$ac_aux_dir/install.sh -c"
4434 break
4435 elif test -f "$ac_dir/shtool"; then
4436 ac_aux_dir=$ac_dir
4437 ac_install_sh="$ac_aux_dir/shtool install -c"
4438 break
4439 fi
4440done
4441if test -z "$ac_aux_dir"; then
4442 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4443fi
7a6dbc2f 4444
5e8754f9
SDJ
4445# These three variables are undocumented and unsupported,
4446# and are intended to be withdrawn in a future Autoconf release.
4447# They can cause serious problems if a builder's source tree is in a directory
4448# whose full name contains unusual characters.
4449ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4450ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4451ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
7a6dbc2f 4452
7a6dbc2f 4453
5e8754f9
SDJ
4454# Expand $ac_aux_dir to an absolute path.
4455am_aux_dir=`cd "$ac_aux_dir" && pwd`
7a6dbc2f 4456
5e8754f9
SDJ
4457ac_ext=c
4458ac_cpp='$CPP $CPPFLAGS'
4459ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4460ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4461ac_compiler_gnu=$ac_cv_c_compiler_gnu
4462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
4463$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
4464if ${am_cv_prog_cc_c_o+:} false; then :
d0ac1c44
SM
4465 $as_echo_n "(cached) " >&6
4466else
5e8754f9 4467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d0ac1c44
SM
4468/* end confdefs.h. */
4469
4470int
4471main ()
4472{
5e8754f9 4473
d0ac1c44
SM
4474 ;
4475 return 0;
4476}
4477_ACEOF
5e8754f9
SDJ
4478 # Make sure it works both with $CC and with simple cc.
4479 # Following AC_PROG_CC_C_O, we do the test twice because some
4480 # compilers refuse to overwrite an existing .o file with -o,
4481 # though they will create one.
4482 am_cv_prog_cc_c_o=yes
4483 for am_i in 1 2; do
4484 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
4485 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
4486 ac_status=$?
4487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4488 (exit $ac_status); } \
4489 && test -f conftest2.$ac_objext; then
4490 : OK
4491 else
4492 am_cv_prog_cc_c_o=no
4493 break
4494 fi
4495 done
4496 rm -f core conftest*
4497 unset am_i
4498fi
4499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
4500$as_echo "$am_cv_prog_cc_c_o" >&6; }
4501if test "$am_cv_prog_cc_c_o" != yes; then
4502 # Losing compiler, so override with the script.
4503 # FIXME: It is wrong to rewrite CC.
4504 # But if we don't then we get into trouble of one sort or another.
4505 # A longer-term fix would be to have automake use am__CC in this case,
4506 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4507 CC="$am_aux_dir/compile $CC"
7a6dbc2f 4508fi
d0ac1c44
SM
4509ac_ext=c
4510ac_cpp='$CPP $CPPFLAGS'
4511ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4512ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4513ac_compiler_gnu=$ac_cv_c_compiler_gnu
4514
4515
5e8754f9 4516
c971b7fa
PA
4517ac_ext=c
4518ac_cpp='$CPP $CPPFLAGS'
4519ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4520ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4521ac_compiler_gnu=$ac_cv_c_compiler_gnu
4522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4523$as_echo_n "checking how to run the C preprocessor... " >&6; }
4524# On Suns, sometimes $CPP names a directory.
4525if test -n "$CPP" && test -d "$CPP"; then
4526 CPP=
4527fi
4528if test -z "$CPP"; then
d0ac1c44 4529 if ${ac_cv_prog_CPP+:} false; then :
c971b7fa
PA
4530 $as_echo_n "(cached) " >&6
4531else
4532 # Double quotes because CPP needs to be expanded
4533 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4534 do
4535 ac_preproc_ok=false
4536for ac_c_preproc_warn_flag in '' yes
4537do
4538 # Use a header file that comes with gcc, so configuring glibc
4539 # with a fresh cross-compiler works.
4540 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4541 # <limits.h> exists even on freestanding compilers.
4542 # On the NeXT, cc -E runs the code through the compiler's parser,
4543 # not just through cpp. "Syntax error" is here to catch this case.
4544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4545/* end confdefs.h. */
4546#ifdef __STDC__
4547# include <limits.h>
4548#else
4549# include <assert.h>
4550#endif
4551 Syntax error
4552_ACEOF
4553if ac_fn_c_try_cpp "$LINENO"; then :
4554
4555else
4556 # Broken: fails on valid input.
4557continue
4558fi
d0ac1c44 4559rm -f conftest.err conftest.i conftest.$ac_ext
c971b7fa
PA
4560
4561 # OK, works on sane cases. Now check whether nonexistent headers
4562 # can be detected and how.
4563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4564/* end confdefs.h. */
4565#include <ac_nonexistent.h>
4566_ACEOF
4567if ac_fn_c_try_cpp "$LINENO"; then :
4568 # Broken: success on invalid input.
4569continue
4570else
4571 # Passes both tests.
4572ac_preproc_ok=:
4573break
4574fi
d0ac1c44 4575rm -f conftest.err conftest.i conftest.$ac_ext
c971b7fa
PA
4576
4577done
4578# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4579rm -f conftest.i conftest.err conftest.$ac_ext
c971b7fa
PA
4580if $ac_preproc_ok; then :
4581 break
4582fi
4583
4584 done
4585 ac_cv_prog_CPP=$CPP
4586
4587fi
4588 CPP=$ac_cv_prog_CPP
4589else
4590 ac_cv_prog_CPP=$CPP
4591fi
4592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4593$as_echo "$CPP" >&6; }
4594ac_preproc_ok=false
4595for ac_c_preproc_warn_flag in '' yes
4596do
4597 # Use a header file that comes with gcc, so configuring glibc
4598 # with a fresh cross-compiler works.
4599 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4600 # <limits.h> exists even on freestanding compilers.
4601 # On the NeXT, cc -E runs the code through the compiler's parser,
4602 # not just through cpp. "Syntax error" is here to catch this case.
4603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4604/* end confdefs.h. */
4605#ifdef __STDC__
4606# include <limits.h>
4607#else
4608# include <assert.h>
4609#endif
4610 Syntax error
4611_ACEOF
4612if ac_fn_c_try_cpp "$LINENO"; then :
4613
4614else
4615 # Broken: fails on valid input.
4616continue
4617fi
d0ac1c44 4618rm -f conftest.err conftest.i conftest.$ac_ext
c971b7fa
PA
4619
4620 # OK, works on sane cases. Now check whether nonexistent headers
4621 # can be detected and how.
4622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4623/* end confdefs.h. */
4624#include <ac_nonexistent.h>
4625_ACEOF
4626if ac_fn_c_try_cpp "$LINENO"; then :
4627 # Broken: success on invalid input.
4628continue
4629else
4630 # Passes both tests.
4631ac_preproc_ok=:
4632break
4633fi
d0ac1c44 4634rm -f conftest.err conftest.i conftest.$ac_ext
c971b7fa
PA
4635
4636done
4637# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4638rm -f conftest.i conftest.err conftest.$ac_ext
c971b7fa
PA
4639if $ac_preproc_ok; then :
4640
4641else
4642 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4643$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4644as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4645See \`config.log' for more details" "$LINENO" 5; }
c971b7fa
PA
4646fi
4647
4648ac_ext=c
4649ac_cpp='$CPP $CPPFLAGS'
4650ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4651ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4652ac_compiler_gnu=$ac_cv_c_compiler_gnu
4653
4654
4655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4656$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 4657if ${ac_cv_path_GREP+:} false; then :
c971b7fa
PA
4658 $as_echo_n "(cached) " >&6
4659else
4660 if test -z "$GREP"; then
4661 ac_path_GREP_found=false
4662 # Loop through the user's path and test for each of PROGNAME-LIST
4663 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4664for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4665do
4666 IFS=$as_save_IFS
4667 test -z "$as_dir" && as_dir=.
4668 for ac_prog in grep ggrep; do
4669 for ac_exec_ext in '' $ac_executable_extensions; do
4670 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4671 as_fn_executable_p "$ac_path_GREP" || continue
c971b7fa
PA
4672# Check for GNU ac_path_GREP and select it if it is found.
4673 # Check for GNU $ac_path_GREP
4674case `"$ac_path_GREP" --version 2>&1` in
4675*GNU*)
4676 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4677*)
4678 ac_count=0
4679 $as_echo_n 0123456789 >"conftest.in"
4680 while :
4681 do
4682 cat "conftest.in" "conftest.in" >"conftest.tmp"
4683 mv "conftest.tmp" "conftest.in"
4684 cp "conftest.in" "conftest.nl"
4685 $as_echo 'GREP' >> "conftest.nl"
4686 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4687 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4688 as_fn_arith $ac_count + 1 && ac_count=$as_val
4689 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4690 # Best one so far, save it but keep looking for a better one
4691 ac_cv_path_GREP="$ac_path_GREP"
4692 ac_path_GREP_max=$ac_count
4693 fi
4694 # 10*(2^10) chars as input seems more than enough
4695 test $ac_count -gt 10 && break
4696 done
4697 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4698esac
4699
4700 $ac_path_GREP_found && break 3
4701 done
4702 done
4703 done
4704IFS=$as_save_IFS
4705 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 4706 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
c971b7fa
PA
4707 fi
4708else
4709 ac_cv_path_GREP=$GREP
4710fi
4711
4712fi
4713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4714$as_echo "$ac_cv_path_GREP" >&6; }
4715 GREP="$ac_cv_path_GREP"
4716
4717
4718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4719$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 4720if ${ac_cv_path_EGREP+:} false; then :
c971b7fa
PA
4721 $as_echo_n "(cached) " >&6
4722else
4723 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4724 then ac_cv_path_EGREP="$GREP -E"
4725 else
4726 if test -z "$EGREP"; then
4727 ac_path_EGREP_found=false
4728 # Loop through the user's path and test for each of PROGNAME-LIST
4729 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4730for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4731do
4732 IFS=$as_save_IFS
4733 test -z "$as_dir" && as_dir=.
4734 for ac_prog in egrep; do
4735 for ac_exec_ext in '' $ac_executable_extensions; do
4736 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4737 as_fn_executable_p "$ac_path_EGREP" || continue
c971b7fa
PA
4738# Check for GNU ac_path_EGREP and select it if it is found.
4739 # Check for GNU $ac_path_EGREP
4740case `"$ac_path_EGREP" --version 2>&1` in
4741*GNU*)
4742 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4743*)
4744 ac_count=0
4745 $as_echo_n 0123456789 >"conftest.in"
4746 while :
4747 do
4748 cat "conftest.in" "conftest.in" >"conftest.tmp"
4749 mv "conftest.tmp" "conftest.in"
4750 cp "conftest.in" "conftest.nl"
4751 $as_echo 'EGREP' >> "conftest.nl"
4752 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4753 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4754 as_fn_arith $ac_count + 1 && ac_count=$as_val
4755 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4756 # Best one so far, save it but keep looking for a better one
4757 ac_cv_path_EGREP="$ac_path_EGREP"
4758 ac_path_EGREP_max=$ac_count
4759 fi
4760 # 10*(2^10) chars as input seems more than enough
4761 test $ac_count -gt 10 && break
4762 done
4763 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4764esac
4765
4766 $ac_path_EGREP_found && break 3
4767 done
4768 done
4769 done
4770IFS=$as_save_IFS
4771 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 4772 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
c971b7fa
PA
4773 fi
4774else
4775 ac_cv_path_EGREP=$EGREP
4776fi
4777
4778 fi
4779fi
4780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4781$as_echo "$ac_cv_path_EGREP" >&6; }
4782 EGREP="$ac_cv_path_EGREP"
4783
4784
4785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4786$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 4787if ${ac_cv_header_stdc+:} false; then :
c971b7fa
PA
4788 $as_echo_n "(cached) " >&6
4789else
4790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4791/* end confdefs.h. */
4792#include <stdlib.h>
4793#include <stdarg.h>
4794#include <string.h>
4795#include <float.h>
4796
4797int
4798main ()
4799{
4800
4801 ;
4802 return 0;
4803}
4804_ACEOF
4805if ac_fn_c_try_compile "$LINENO"; then :
4806 ac_cv_header_stdc=yes
4807else
4808 ac_cv_header_stdc=no
4809fi
4810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4811
4812if test $ac_cv_header_stdc = yes; then
4813 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4815/* end confdefs.h. */
4816#include <string.h>
4817
4818_ACEOF
4819if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4820 $EGREP "memchr" >/dev/null 2>&1; then :
4821
4822else
4823 ac_cv_header_stdc=no
4824fi
4825rm -f conftest*
4826
4827fi
4828
4829if test $ac_cv_header_stdc = yes; then
4830 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4832/* end confdefs.h. */
4833#include <stdlib.h>
4834
4835_ACEOF
4836if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4837 $EGREP "free" >/dev/null 2>&1; then :
4838
4839else
4840 ac_cv_header_stdc=no
4841fi
4842rm -f conftest*
4843
4844fi
4845
4846if test $ac_cv_header_stdc = yes; then
4847 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4848 if test "$cross_compiling" = yes; then :
4849 :
4850else
4851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4852/* end confdefs.h. */
4853#include <ctype.h>
4854#include <stdlib.h>
4855#if ((' ' & 0x0FF) == 0x020)
4856# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4857# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4858#else
4859# define ISLOWER(c) \
4860 (('a' <= (c) && (c) <= 'i') \
4861 || ('j' <= (c) && (c) <= 'r') \
4862 || ('s' <= (c) && (c) <= 'z'))
4863# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4864#endif
4865
4866#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4867int
4868main ()
4869{
4870 int i;
4871 for (i = 0; i < 256; i++)
4872 if (XOR (islower (i), ISLOWER (i))
4873 || toupper (i) != TOUPPER (i))
4874 return 2;
4875 return 0;
4876}
4877_ACEOF
4878if ac_fn_c_try_run "$LINENO"; then :
4879
4880else
4881 ac_cv_header_stdc=no
4882fi
4883rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4884 conftest.$ac_objext conftest.beam conftest.$ac_ext
4885fi
4886
4887fi
4888fi
4889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4890$as_echo "$ac_cv_header_stdc" >&6; }
4891if test $ac_cv_header_stdc = yes; then
4892
4893$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4894
4895fi
4896
4897# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4898for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4899 inttypes.h stdint.h unistd.h
4900do :
4901 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4902ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4903"
d0ac1c44 4904if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
c971b7fa
PA
4905 cat >>confdefs.h <<_ACEOF
4906#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4907_ACEOF
4908
4909fi
4910
4911done
4912
4913
4914
c971b7fa 4915 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 4916if test "x$ac_cv_header_minix_config_h" = xyes; then :
c971b7fa
PA
4917 MINIX=yes
4918else
4919 MINIX=
4920fi
4921
4922
4923 if test "$MINIX" = yes; then
4924
4925$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4926
4927
4928$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4929
4930
4931$as_echo "#define _MINIX 1" >>confdefs.h
4932
c971b7fa 4933
4a626d0a 4934$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
c971b7fa 4935
4a626d0a 4936 fi
c971b7fa
PA
4937
4938
4939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4940$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 4941if ${ac_cv_safe_to_define___extensions__+:} false; then :
c971b7fa
PA
4942 $as_echo_n "(cached) " >&6
4943else
4944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4945/* end confdefs.h. */
4946
4947# define __EXTENSIONS__ 1
4948 $ac_includes_default
4949int
4950main ()
4951{
4952
4953 ;
4954 return 0;
4955}
4956_ACEOF
4957if ac_fn_c_try_compile "$LINENO"; then :
4958 ac_cv_safe_to_define___extensions__=yes
4959else
4960 ac_cv_safe_to_define___extensions__=no
4961fi
4962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4963fi
4964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4965$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4966 test $ac_cv_safe_to_define___extensions__ = yes &&
4967 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4968
4969 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4970
4971 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
4972
4973 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4974
4975 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4976
49e4877c
PA
4977 $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
4978
4979 $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
4980
4981 $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
4982
4983 $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
4984
4985 $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
4986
4987 $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
4988
4989 $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
4990
c971b7fa
PA
4991 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4992
4a626d0a
PA
4993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
4994$as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
d0ac1c44 4995if ${ac_cv_should_define__xopen_source+:} false; then :
4a626d0a
PA
4996 $as_echo_n "(cached) " >&6
4997else
4998 ac_cv_should_define__xopen_source=no
4999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5000/* end confdefs.h. */
5001
5002 #include <wchar.h>
5003 mbstate_t x;
5004int
5005main ()
5006{
5007
5008 ;
5009 return 0;
5010}
5011_ACEOF
5012if ac_fn_c_try_compile "$LINENO"; then :
5013
5014else
5015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5016/* end confdefs.h. */
5017
5018 #define _XOPEN_SOURCE 500
5019 #include <wchar.h>
5020 mbstate_t x;
5021int
5022main ()
5023{
5024
5025 ;
5026 return 0;
5027}
5028_ACEOF
5029if ac_fn_c_try_compile "$LINENO"; then :
5030 ac_cv_should_define__xopen_source=yes
5031fi
d0ac1c44
SM
5032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5033fi
5034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5035fi
5036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
5037$as_echo "$ac_cv_should_define__xopen_source" >&6; }
5038 test $ac_cv_should_define__xopen_source = yes &&
5039 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
5052$as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
5053if ${gl_cv_c_amsterdam_compiler+:} false; then :
5054 $as_echo_n "(cached) " >&6
5055else
5056
5057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5058/* end confdefs.h. */
5059
5060#ifdef __ACK__
5061Amsterdam
5062#endif
5063
5064_ACEOF
5065if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5066 $EGREP "Amsterdam" >/dev/null 2>&1; then :
5067 gl_cv_c_amsterdam_compiler=yes
5068else
5069 gl_cv_c_amsterdam_compiler=no
5070fi
5071rm -f conftest*
5072
5073
5074fi
5075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
5076$as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
5077
5078 if test $gl_cv_c_amsterdam_compiler = yes; then
5079 if test -z "$AR"; then
5080 AR='cc -c.a'
5081 fi
5082 if test -z "$ARFLAGS"; then
5083 ARFLAGS='-o'
5084 fi
5085 else
5e8754f9
SDJ
5086 if test -n "$ac_tool_prefix"; then
5087 for ac_prog in ar lib "link -lib"
5088 do
5089 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5090set dummy $ac_tool_prefix$ac_prog; ac_word=$2
d0ac1c44
SM
5091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5092$as_echo_n "checking for $ac_word... " >&6; }
5093if ${ac_cv_prog_AR+:} false; then :
5094 $as_echo_n "(cached) " >&6
5095else
5096 if test -n "$AR"; then
5097 ac_cv_prog_AR="$AR" # Let the user override the test.
5098else
5099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5100for as_dir in $PATH
5101do
5102 IFS=$as_save_IFS
5103 test -z "$as_dir" && as_dir=.
5104 for ac_exec_ext in '' $ac_executable_extensions; do
5105 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5e8754f9 5106 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
d0ac1c44
SM
5107 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5108 break 2
5109 fi
5110done
5111 done
5112IFS=$as_save_IFS
5113
5114fi
4a626d0a 5115fi
d0ac1c44
SM
5116AR=$ac_cv_prog_AR
5117if test -n "$AR"; then
5118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5119$as_echo "$AR" >&6; }
5120else
5121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5122$as_echo "no" >&6; }
4a626d0a 5123fi
c971b7fa 5124
49e4877c 5125
5e8754f9
SDJ
5126 test -n "$AR" && break
5127 done
d0ac1c44 5128fi
5e8754f9 5129if test -z "$AR"; then
d0ac1c44 5130 ac_ct_AR=$AR
5e8754f9
SDJ
5131 for ac_prog in ar lib "link -lib"
5132do
5133 # Extract the first word of "$ac_prog", so it can be a program name with args.
5134set dummy $ac_prog; ac_word=$2
d0ac1c44
SM
5135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5136$as_echo_n "checking for $ac_word... " >&6; }
5137if ${ac_cv_prog_ac_ct_AR+:} false; then :
5138 $as_echo_n "(cached) " >&6
5139else
5140 if test -n "$ac_ct_AR"; then
5141 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5142else
5143as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5144for as_dir in $PATH
5145do
5146 IFS=$as_save_IFS
5147 test -z "$as_dir" && as_dir=.
5148 for ac_exec_ext in '' $ac_executable_extensions; do
5149 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5e8754f9 5150 ac_cv_prog_ac_ct_AR="$ac_prog"
d0ac1c44
SM
5151 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5152 break 2
5153 fi
5154done
5155 done
5156IFS=$as_save_IFS
49e4877c 5157
d0ac1c44
SM
5158fi
5159fi
5160ac_ct_AR=$ac_cv_prog_ac_ct_AR
5161if test -n "$ac_ct_AR"; then
5162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5163$as_echo "$ac_ct_AR" >&6; }
5164else
5165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5166$as_echo "no" >&6; }
5167fi
49e4877c 5168
5e8754f9
SDJ
5169
5170 test -n "$ac_ct_AR" && break
5171done
5172
d0ac1c44 5173 if test "x$ac_ct_AR" = x; then
5e8754f9 5174 AR="false"
d0ac1c44
SM
5175 else
5176 case $cross_compiling:$ac_tool_warned in
5177yes:)
5178{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5179$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5180ac_tool_warned=yes ;;
5181esac
5182 AR=$ac_ct_AR
5183 fi
d0ac1c44 5184fi
c971b7fa 5185
5e8754f9 5186: ${AR=ar}
c971b7fa 5187
5e8754f9
SDJ
5188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
5189$as_echo_n "checking the archiver ($AR) interface... " >&6; }
5190if ${am_cv_ar_interface+:} false; then :
c971b7fa
PA
5191 $as_echo_n "(cached) " >&6
5192else
5e8754f9
SDJ
5193 ac_ext=c
5194ac_cpp='$CPP $CPPFLAGS'
5195ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5196ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5197ac_compiler_gnu=$ac_cv_c_compiler_gnu
5198
5199 am_cv_ar_interface=ar
5200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5201/* end confdefs.h. */
5202int some_variable = 0;
5203_ACEOF
5204if ac_fn_c_try_compile "$LINENO"; then :
5205 am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
5206 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
5207 (eval $am_ar_try) 2>&5
5208 ac_status=$?
5209 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5210 test $ac_status = 0; }
5211 if test "$ac_status" -eq 0; then
5212 am_cv_ar_interface=ar
5213 else
5214 am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
5215 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
5216 (eval $am_ar_try) 2>&5
5217 ac_status=$?
5218 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5219 test $ac_status = 0; }
5220 if test "$ac_status" -eq 0; then
5221 am_cv_ar_interface=lib
5222 else
5223 am_cv_ar_interface=unknown
5224 fi
5225 fi
5226 rm -f conftest.lib libconftest.a
5227
5228fi
5229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5230 ac_ext=c
5231ac_cpp='$CPP $CPPFLAGS'
5232ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5233ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5234ac_compiler_gnu=$ac_cv_c_compiler_gnu
5235
5236fi
5237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
5238$as_echo "$am_cv_ar_interface" >&6; }
5239
5240case $am_cv_ar_interface in
5241ar)
5242 ;;
5243lib)
5244 # Microsoft lib, so override with the ar-lib wrapper script.
5245 # FIXME: It is wrong to rewrite AR.
5246 # But if we don't then we get into trouble of one sort or another.
5247 # A longer-term fix would be to have automake use am__AR in this case,
5248 # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
5249 # similar.
5250 AR="$am_aux_dir/ar-lib $AR"
5251 ;;
5252unknown)
5253 as_fn_error $? "could not determine $AR interface" "$LINENO" 5
5254 ;;
5255esac
5256
5257 fi
5258
5259 if test -n "$ac_tool_prefix"; then
5260 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5261set dummy ${ac_tool_prefix}ar; ac_word=$2
5262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5263$as_echo_n "checking for $ac_word... " >&6; }
5264if ${ac_cv_prog_AR+:} false; then :
5265 $as_echo_n "(cached) " >&6
5266else
5267 if test -n "$AR"; then
5268 ac_cv_prog_AR="$AR" # Let the user override the test.
5269else
5270as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5271for as_dir in $PATH
5272do
5273 IFS=$as_save_IFS
5274 test -z "$as_dir" && as_dir=.
5275 for ac_exec_ext in '' $ac_executable_extensions; do
5276 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5277 ac_cv_prog_AR="${ac_tool_prefix}ar"
5278 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5279 break 2
5280 fi
5281done
5282 done
5283IFS=$as_save_IFS
5284
5285fi
5286fi
5287AR=$ac_cv_prog_AR
5288if test -n "$AR"; then
5289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5290$as_echo "$AR" >&6; }
5291else
5292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5293$as_echo "no" >&6; }
5294fi
5295
5296
5297fi
5298if test -z "$ac_cv_prog_AR"; then
5299 ac_ct_AR=$AR
5300 # Extract the first word of "ar", so it can be a program name with args.
5301set dummy ar; ac_word=$2
5302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5303$as_echo_n "checking for $ac_word... " >&6; }
5304if ${ac_cv_prog_ac_ct_AR+:} false; then :
5305 $as_echo_n "(cached) " >&6
5306else
5307 if test -n "$ac_ct_AR"; then
5308 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5309else
5310as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5311for as_dir in $PATH
5312do
5313 IFS=$as_save_IFS
5314 test -z "$as_dir" && as_dir=.
5315 for ac_exec_ext in '' $ac_executable_extensions; do
5316 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5317 ac_cv_prog_ac_ct_AR="ar"
5318 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5319 break 2
5320 fi
5321done
5322 done
5323IFS=$as_save_IFS
5324
5325fi
5326fi
5327ac_ct_AR=$ac_cv_prog_ac_ct_AR
5328if test -n "$ac_ct_AR"; then
5329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5330$as_echo "$ac_ct_AR" >&6; }
5331else
5332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5333$as_echo "no" >&6; }
5334fi
5335
5336 if test "x$ac_ct_AR" = x; then
5337 AR="ar"
5338 else
5339 case $cross_compiling:$ac_tool_warned in
5340yes:)
5341{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5342$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5343ac_tool_warned=yes ;;
5344esac
5345 AR=$ac_ct_AR
5346 fi
5347else
5348 AR="$ac_cv_prog_AR"
5349fi
5350
5351 if test -z "$ARFLAGS"; then
5352 ARFLAGS='cr'
5353 fi
5354
c971b7fa 5355
5e8754f9
SDJ
5356
5357 if test -z "$RANLIB"; then
5358 if test $gl_cv_c_amsterdam_compiler = yes; then
5359 RANLIB=':'
5360 else
5361 if test -n "$ac_tool_prefix"; then
5362 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5363set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5365$as_echo_n "checking for $ac_word... " >&6; }
5366if ${ac_cv_prog_RANLIB+:} false; then :
5367 $as_echo_n "(cached) " >&6
5368else
5369 if test -n "$RANLIB"; then
5370 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5371else
5372as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5373for as_dir in $PATH
5374do
5375 IFS=$as_save_IFS
5376 test -z "$as_dir" && as_dir=.
5377 for ac_exec_ext in '' $ac_executable_extensions; do
5378 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5379 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5380 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5381 break 2
5382 fi
5383done
5384 done
5385IFS=$as_save_IFS
5386
5387fi
5388fi
5389RANLIB=$ac_cv_prog_RANLIB
5390if test -n "$RANLIB"; then
5391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5392$as_echo "$RANLIB" >&6; }
5393else
5394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5395$as_echo "no" >&6; }
5396fi
c971b7fa
PA
5397
5398
5399fi
5400if test -z "$ac_cv_prog_RANLIB"; then
5401 ac_ct_RANLIB=$RANLIB
5402 # Extract the first word of "ranlib", so it can be a program name with args.
5403set dummy ranlib; ac_word=$2
5404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5405$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5406if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
c971b7fa
PA
5407 $as_echo_n "(cached) " >&6
5408else
5409 if test -n "$ac_ct_RANLIB"; then
5410 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5411else
5412as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5413for as_dir in $PATH
5414do
5415 IFS=$as_save_IFS
5416 test -z "$as_dir" && as_dir=.
5417 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5418 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
5419 ac_cv_prog_ac_ct_RANLIB="ranlib"
5420 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5421 break 2
5422 fi
5423done
5424 done
5425IFS=$as_save_IFS
5426
5427fi
5428fi
5429ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5430if test -n "$ac_ct_RANLIB"; then
5431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5432$as_echo "$ac_ct_RANLIB" >&6; }
5433else
5434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5435$as_echo "no" >&6; }
5436fi
5437
5438 if test "x$ac_ct_RANLIB" = x; then
5439 RANLIB=":"
5440 else
5441 case $cross_compiling:$ac_tool_warned in
5442yes:)
5443{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5444$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5445ac_tool_warned=yes ;;
5446esac
5447 RANLIB=$ac_ct_RANLIB
5448 fi
5449else
5450 RANLIB="$ac_cv_prog_RANLIB"
5451fi
5452
5453 fi
5454 fi
5455
5456
4a626d0a
PA
5457# Make sure we can run config.sub.
5458$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 5459 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4a626d0a
PA
5460
5461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5462$as_echo_n "checking build system type... " >&6; }
d0ac1c44 5463if ${ac_cv_build+:} false; then :
4a626d0a
PA
5464 $as_echo_n "(cached) " >&6
5465else
5466 ac_build_alias=$build_alias
5467test "x$ac_build_alias" = x &&
5468 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5469test "x$ac_build_alias" = x &&
d0ac1c44 5470 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4a626d0a 5471ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 5472 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4a626d0a
PA
5473
5474fi
5475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5476$as_echo "$ac_cv_build" >&6; }
5477case $ac_cv_build in
5478*-*-*) ;;
d0ac1c44 5479*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4a626d0a
PA
5480esac
5481build=$ac_cv_build
5482ac_save_IFS=$IFS; IFS='-'
5483set x $ac_cv_build
5484shift
5485build_cpu=$1
5486build_vendor=$2
5487shift; shift
5488# Remember, the first character of IFS is used to create $*,
5489# except with old shells:
5490build_os=$*
5491IFS=$ac_save_IFS
5492case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5493
5494
5495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5496$as_echo_n "checking host system type... " >&6; }
d0ac1c44 5497if ${ac_cv_host+:} false; then :
4a626d0a
PA
5498 $as_echo_n "(cached) " >&6
5499else
5500 if test "x$host_alias" = x; then
5501 ac_cv_host=$ac_cv_build
5502else
5503 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 5504 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4a626d0a
PA
5505fi
5506
5507fi
5508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5509$as_echo "$ac_cv_host" >&6; }
5510case $ac_cv_host in
5511*-*-*) ;;
d0ac1c44 5512*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4a626d0a
PA
5513esac
5514host=$ac_cv_host
5515ac_save_IFS=$IFS; IFS='-'
5516set x $ac_cv_host
5517shift
5518host_cpu=$1
5519host_vendor=$2
5520shift; shift
5521# Remember, the first character of IFS is used to create $*,
5522# except with old shells:
5523host_os=$*
5524IFS=$ac_save_IFS
5525case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5526
5527
c971b7fa
PA
5528
5529
88b48903
WN
5530
5531 # IEEE behaviour is the default on all CPUs except Alpha and SH
5532 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
5533 # and the GCC 4.1.2 manual).
5534 case "$host_cpu" in
5535 alpha*)
5536 # On Alpha systems, a compiler option provides the behaviour.
5537 # See the ieee(3) manual page, also available at
5e8754f9 5538 # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
88b48903
WN
5539 if test -n "$GCC"; then
5540 # GCC has the option -mieee.
5541 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
5542 CPPFLAGS="$CPPFLAGS -mieee"
5543 else
5544 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
5545 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
5546 CPPFLAGS="$CPPFLAGS -ieee"
5547 fi
5548 ;;
5549 sh*)
5550 if test -n "$GCC"; then
5551 # GCC has the option -mieee.
5552 CPPFLAGS="$CPPFLAGS -mieee"
5553 fi
5554 ;;
5555 esac
5556
2196f55f
YQ
5557# Check whether --enable-largefile was given.
5558if test "${enable_largefile+set}" = set; then :
5559 enableval=$enable_largefile;
5560fi
5561
5562if test "$enable_largefile" != no; then
5563
5564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5565$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 5566if ${ac_cv_sys_largefile_CC+:} false; then :
2196f55f
YQ
5567 $as_echo_n "(cached) " >&6
5568else
5569 ac_cv_sys_largefile_CC=no
5570 if test "$GCC" != yes; then
5571 ac_save_CC=$CC
5572 while :; do
5573 # IRIX 6.2 and later do not support large files by default,
5574 # so use the C compiler's -n32 option if that helps.
5575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5576/* end confdefs.h. */
5577#include <sys/types.h>
5578 /* Check that off_t can represent 2**63 - 1 correctly.
5579 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5580 since some C++ compilers masquerading as C compilers
5581 incorrectly reject 9223372036854775807. */
5582#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5583 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5584 && LARGE_OFF_T % 2147483647 == 1)
5585 ? 1 : -1];
5586int
5587main ()
5588{
5589
5590 ;
5591 return 0;
5592}
5593_ACEOF
5594 if ac_fn_c_try_compile "$LINENO"; then :
5595 break
5596fi
5597rm -f core conftest.err conftest.$ac_objext
5598 CC="$CC -n32"
5599 if ac_fn_c_try_compile "$LINENO"; then :
5600 ac_cv_sys_largefile_CC=' -n32'; break
5601fi
5602rm -f core conftest.err conftest.$ac_objext
5603 break
5604 done
5605 CC=$ac_save_CC
5606 rm -f conftest.$ac_ext
5607 fi
5608fi
5609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5610$as_echo "$ac_cv_sys_largefile_CC" >&6; }
5611 if test "$ac_cv_sys_largefile_CC" != no; then
5612 CC=$CC$ac_cv_sys_largefile_CC
5613 fi
5614
5615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5616$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 5617if ${ac_cv_sys_file_offset_bits+:} false; then :
2196f55f
YQ
5618 $as_echo_n "(cached) " >&6
5619else
5620 while :; do
5621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5622/* end confdefs.h. */
5623#include <sys/types.h>
5624 /* Check that off_t can represent 2**63 - 1 correctly.
5625 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5626 since some C++ compilers masquerading as C compilers
5627 incorrectly reject 9223372036854775807. */
5628#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5629 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5630 && LARGE_OFF_T % 2147483647 == 1)
5631 ? 1 : -1];
5632int
5633main ()
5634{
5635
5636 ;
5637 return 0;
5638}
5639_ACEOF
5640if ac_fn_c_try_compile "$LINENO"; then :
5641 ac_cv_sys_file_offset_bits=no; break
5642fi
5643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5645/* end confdefs.h. */
5646#define _FILE_OFFSET_BITS 64
5647#include <sys/types.h>
5648 /* Check that off_t can represent 2**63 - 1 correctly.
5649 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5650 since some C++ compilers masquerading as C compilers
5651 incorrectly reject 9223372036854775807. */
5652#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5653 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5654 && LARGE_OFF_T % 2147483647 == 1)
5655 ? 1 : -1];
5656int
5657main ()
5658{
5659
5660 ;
5661 return 0;
5662}
5663_ACEOF
5664if ac_fn_c_try_compile "$LINENO"; then :
5665 ac_cv_sys_file_offset_bits=64; break
5666fi
5667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5668 ac_cv_sys_file_offset_bits=unknown
5669 break
5670done
5671fi
5672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5673$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5674case $ac_cv_sys_file_offset_bits in #(
5675 no | unknown) ;;
5676 *)
5677cat >>confdefs.h <<_ACEOF
5678#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5679_ACEOF
5680;;
5681esac
5682rm -rf conftest*
5683 if test $ac_cv_sys_file_offset_bits = unknown; then
5684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5685$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 5686if ${ac_cv_sys_large_files+:} false; then :
2196f55f
YQ
5687 $as_echo_n "(cached) " >&6
5688else
5689 while :; do
5690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5691/* end confdefs.h. */
5692#include <sys/types.h>
5693 /* Check that off_t can represent 2**63 - 1 correctly.
5694 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5695 since some C++ compilers masquerading as C compilers
5696 incorrectly reject 9223372036854775807. */
5697#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5698 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5699 && LARGE_OFF_T % 2147483647 == 1)
5700 ? 1 : -1];
5701int
5702main ()
5703{
5704
5705 ;
5706 return 0;
5707}
5708_ACEOF
5709if ac_fn_c_try_compile "$LINENO"; then :
5710 ac_cv_sys_large_files=no; break
5711fi
5712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5714/* end confdefs.h. */
5715#define _LARGE_FILES 1
5716#include <sys/types.h>
5717 /* Check that off_t can represent 2**63 - 1 correctly.
5718 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5719 since some C++ compilers masquerading as C compilers
5720 incorrectly reject 9223372036854775807. */
5721#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5722 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5723 && LARGE_OFF_T % 2147483647 == 1)
5724 ? 1 : -1];
5725int
5726main ()
5727{
5728
5729 ;
5730 return 0;
5731}
5732_ACEOF
5733if ac_fn_c_try_compile "$LINENO"; then :
5734 ac_cv_sys_large_files=1; break
5735fi
5736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5737 ac_cv_sys_large_files=unknown
5738 break
5739done
5740fi
5741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5742$as_echo "$ac_cv_sys_large_files" >&6; }
5743case $ac_cv_sys_large_files in #(
5744 no | unknown) ;;
5745 *)
5746cat >>confdefs.h <<_ACEOF
5747#define _LARGE_FILES $ac_cv_sys_large_files
5748_ACEOF
5749;;
5750esac
5751rm -rf conftest*
5752 fi
5753
5754
4a626d0a
PA
5755$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
5756
2196f55f
YQ
5757fi
5758
88b48903
WN
5759
5760
49e4877c
PA
5761 # Pre-early section.
5762
5763
5764
4a626d0a 5765 # Code from module absolute-header:
8690e634
JK
5766 # Code from module alloca:
5767 # Code from module alloca-opt:
725e2999 5768 # Code from module arpa_inet:
6ec2e0f5
SDJ
5769 # Code from module assure:
5770 # Code from module at-internal:
98399780 5771 # Code from module canonicalize-lgpl:
6a29c58e 5772 # Code from module chdir:
6ec2e0f5
SDJ
5773 # Code from module chdir-long:
5774 # Code from module cloexec:
5775 # Code from module close:
5776 # Code from module closedir:
5e8754f9 5777 # Code from module configmake:
6ec2e0f5
SDJ
5778 # Code from module d-ino:
5779 # Code from module d-type:
e26b6bb0 5780 # Code from module dirent:
18848e28 5781 # Code from module dirfd:
6a29c58e 5782 # Code from module dirname-lgpl:
2196f55f 5783 # Code from module dosname:
6a29c58e 5784 # Code from module double-slash-root:
6ec2e0f5
SDJ
5785 # Code from module dup:
5786 # Code from module dup2:
3d99e817 5787 # Code from module environ:
18848e28 5788 # Code from module errno:
6ec2e0f5
SDJ
5789 # Code from module error:
5790 # Code from module exitfail:
c971b7fa 5791 # Code from module extensions:
a512b375 5792 # Code from module extern-inline:
6ec2e0f5
SDJ
5793 # Code from module fchdir:
5794 # Code from module fcntl:
5795 # Code from module fcntl-h:
5796 # Code from module fd-hook:
5797 # Code from module fdopendir:
5798 # Code from module filename:
5799 # Code from module filenamecat-lgpl:
49e4877c 5800 # Code from module flexmember:
88b48903 5801 # Code from module float:
8690e634
JK
5802 # Code from module fnmatch:
5803 # Code from module fnmatch-gnu:
88b48903
WN
5804 # Code from module fpieee:
5805
5806 # Code from module fpucw:
5807 # Code from module frexp:
5808 # Code from module frexpl:
6ec2e0f5
SDJ
5809 # Code from module fstat:
5810 # Code from module fstatat:
5811 # Code from module getcwd:
5812 # Code from module getcwd-lgpl:
5813 # Code from module getdtablesize:
5814 # Code from module getlogin_r:
5815 # Code from module getprogname:
5816 # Code from module gettext-h:
4a626d0a 5817 # Code from module gettimeofday:
6ec2e0f5 5818 # Code from module glob:
49e4877c 5819 # Code from module hard-locale:
c971b7fa 5820 # Code from module include_next:
725e2999 5821 # Code from module inet_ntop:
6ec2e0f5 5822 # Code from module intprops:
c971b7fa
PA
5823 # Code from module inttypes:
5824 # Code from module inttypes-incomplete:
88b48903
WN
5825 # Code from module isnand-nolibm:
5826 # Code from module isnanl-nolibm:
2196f55f
YQ
5827 # Code from module largefile:
5828
49e4877c 5829 # Code from module limits-h:
8690e634 5830 # Code from module localcharset:
f45c62c4 5831 # Code from module lstat:
6a29c58e 5832 # Code from module malloc-posix:
98399780 5833 # Code from module malloca:
88b48903 5834 # Code from module math:
8690e634
JK
5835 # Code from module mbrtowc:
5836 # Code from module mbsinit:
5837 # Code from module mbsrtowcs:
c971b7fa
PA
5838 # Code from module memchr:
5839 # Code from module memmem:
5840 # Code from module memmem-simple:
6ec2e0f5
SDJ
5841 # Code from module mempcpy:
5842 # Code from module memrchr:
8a99096f 5843 # Code from module mkdir:
b3279b60 5844 # Code from module mkostemp:
6ec2e0f5
SDJ
5845 # Code from module msvc-inval:
5846 # Code from module msvc-nothrow:
c971b7fa 5847 # Code from module multiarch:
725e2999 5848 # Code from module netinet_in:
98399780 5849 # Code from module nocrash:
6ec2e0f5
SDJ
5850 # Code from module open:
5851 # Code from module openat:
5852 # Code from module openat-die:
5853 # Code from module openat-h:
5854 # Code from module opendir:
38ec2207 5855 # Code from module pathmax:
8424cc97 5856 # Code from module rawmemchr:
6ec2e0f5 5857 # Code from module readdir:
2196f55f 5858 # Code from module readlink:
6ec2e0f5 5859 # Code from module realloc-posix:
6a29c58e 5860 # Code from module rename:
6ec2e0f5 5861 # Code from module rewinddir:
6a29c58e
YQ
5862 # Code from module rmdir:
5863 # Code from module same-inode:
6ec2e0f5 5864 # Code from module save-cwd:
5e8754f9 5865 # Code from module secure_getenv:
3d99e817 5866 # Code from module setenv:
0750520d 5867 # Code from module signal-h:
98399780 5868 # Code from module snippet/_Noreturn:
c971b7fa
PA
5869 # Code from module snippet/arg-nonnull:
5870 # Code from module snippet/c++defs:
5871 # Code from module snippet/warn-on-use:
725e2999 5872 # Code from module socklen:
8839a007 5873 # Code from module ssize_t:
2196f55f 5874 # Code from module stat:
725e2999 5875 # Code from module stdalign:
8690e634 5876 # Code from module stdbool:
c971b7fa
PA
5877 # Code from module stddef:
5878 # Code from module stdint:
6a29c58e 5879 # Code from module stdio:
98399780 5880 # Code from module stdlib:
8424cc97 5881 # Code from module strchrnul:
6ec2e0f5 5882 # Code from module strdup-posix:
8690e634 5883 # Code from module streq:
6ec2e0f5
SDJ
5884 # Code from module strerror:
5885 # Code from module strerror-override:
c971b7fa 5886 # Code from module string:
8690e634 5887 # Code from module strnlen1:
63ce7108
TT
5888 # Code from module strstr:
5889 # Code from module strstr-simple:
421693b0 5890 # Code from module strtok_r:
725e2999 5891 # Code from module sys_socket:
09607c9e 5892 # Code from module sys_stat:
4a626d0a 5893 # Code from module sys_time:
8839a007 5894 # Code from module sys_types:
725e2999 5895 # Code from module sys_uio:
2d8adcbd 5896 # Code from module tempname:
09607c9e 5897 # Code from module time:
8839a007 5898 # Code from module unistd:
6ec2e0f5 5899 # Code from module unistd-safer:
3d99e817 5900 # Code from module unsetenv:
c971b7fa 5901 # Code from module update-copyright:
8690e634
JK
5902 # Code from module verify:
5903 # Code from module wchar:
5904 # Code from module wctype-h:
c971b7fa 5905
5e8754f9
SDJ
5906ac_ext=c
5907ac_cpp='$CPP $CPPFLAGS'
5908ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5909ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5910ac_compiler_gnu=$ac_cv_c_compiler_gnu
5911if test -n "$ac_tool_prefix"; then
5912 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5913set dummy ${ac_tool_prefix}gcc; ac_word=$2
5914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5915$as_echo_n "checking for $ac_word... " >&6; }
5916if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
5917 $as_echo_n "(cached) " >&6
5918else
5e8754f9
SDJ
5919 if test -n "$CC"; then
5920 ac_cv_prog_CC="$CC" # Let the user override the test.
c971b7fa 5921else
5e8754f9
SDJ
5922as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5923for as_dir in $PATH
5924do
5925 IFS=$as_save_IFS
5926 test -z "$as_dir" && as_dir=.
5927 for ac_exec_ext in '' $ac_executable_extensions; do
5928 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5929 ac_cv_prog_CC="${ac_tool_prefix}gcc"
5930 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5931 break 2
5932 fi
5933done
5934 done
5935IFS=$as_save_IFS
c971b7fa 5936
5e8754f9
SDJ
5937fi
5938fi
5939CC=$ac_cv_prog_CC
5940if test -n "$CC"; then
5941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5942$as_echo "$CC" >&6; }
7a6dbc2f 5943else
5e8754f9
SDJ
5944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5945$as_echo "no" >&6; }
5946fi
c971b7fa 5947
c971b7fa 5948
7a6dbc2f 5949fi
5e8754f9
SDJ
5950if test -z "$ac_cv_prog_CC"; then
5951 ac_ct_CC=$CC
5952 # Extract the first word of "gcc", so it can be a program name with args.
5953set dummy gcc; ac_word=$2
5954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5955$as_echo_n "checking for $ac_word... " >&6; }
5956if ${ac_cv_prog_ac_ct_CC+:} false; then :
c971b7fa
PA
5957 $as_echo_n "(cached) " >&6
5958else
5e8754f9
SDJ
5959 if test -n "$ac_ct_CC"; then
5960 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
c971b7fa 5961else
5e8754f9
SDJ
5962as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5963for as_dir in $PATH
5964do
5965 IFS=$as_save_IFS
5966 test -z "$as_dir" && as_dir=.
5967 for ac_exec_ext in '' $ac_executable_extensions; do
5968 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5969 ac_cv_prog_ac_ct_CC="gcc"
5970 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5971 break 2
5972 fi
5973done
5974 done
5975IFS=$as_save_IFS
5976
c971b7fa 5977fi
c971b7fa 5978fi
5e8754f9
SDJ
5979ac_ct_CC=$ac_cv_prog_ac_ct_CC
5980if test -n "$ac_ct_CC"; then
5981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5982$as_echo "$ac_ct_CC" >&6; }
5983else
5984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5985$as_echo "no" >&6; }
5986fi
7a6dbc2f 5987
5e8754f9
SDJ
5988 if test "x$ac_ct_CC" = x; then
5989 CC=""
5990 else
5991 case $cross_compiling:$ac_tool_warned in
5992yes:)
5993{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5994$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5995ac_tool_warned=yes ;;
5996esac
5997 CC=$ac_ct_CC
5998 fi
5999else
6000 CC="$ac_cv_prog_CC"
c971b7fa 6001fi
7a6dbc2f 6002
5e8754f9
SDJ
6003if test -z "$CC"; then
6004 if test -n "$ac_tool_prefix"; then
6005 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
6006set dummy ${ac_tool_prefix}cc; ac_word=$2
6007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6008$as_echo_n "checking for $ac_word... " >&6; }
6009if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
6010 $as_echo_n "(cached) " >&6
6011else
5e8754f9
SDJ
6012 if test -n "$CC"; then
6013 ac_cv_prog_CC="$CC" # Let the user override the test.
c971b7fa 6014else
5e8754f9
SDJ
6015as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6016for as_dir in $PATH
6017do
6018 IFS=$as_save_IFS
6019 test -z "$as_dir" && as_dir=.
6020 for ac_exec_ext in '' $ac_executable_extensions; do
6021 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6022 ac_cv_prog_CC="${ac_tool_prefix}cc"
6023 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6024 break 2
6025 fi
6026done
6027 done
6028IFS=$as_save_IFS
6029
7a6dbc2f 6030fi
7a6dbc2f 6031fi
5e8754f9
SDJ
6032CC=$ac_cv_prog_CC
6033if test -n "$CC"; then
6034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6035$as_echo "$CC" >&6; }
c971b7fa 6036else
5e8754f9
SDJ
6037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6038$as_echo "no" >&6; }
6039fi
7a6dbc2f
SDJ
6040
6041
5e8754f9
SDJ
6042 fi
6043fi
6044if test -z "$CC"; then
6045 # Extract the first word of "cc", so it can be a program name with args.
6046set dummy cc; ac_word=$2
6047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6048$as_echo_n "checking for $ac_word... " >&6; }
6049if ${ac_cv_prog_CC+:} false; then :
7a6dbc2f
SDJ
6050 $as_echo_n "(cached) " >&6
6051else
5e8754f9
SDJ
6052 if test -n "$CC"; then
6053 ac_cv_prog_CC="$CC" # Let the user override the test.
7a6dbc2f 6054else
5e8754f9
SDJ
6055 ac_prog_rejected=no
6056as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6057for as_dir in $PATH
6058do
6059 IFS=$as_save_IFS
6060 test -z "$as_dir" && as_dir=.
6061 for ac_exec_ext in '' $ac_executable_extensions; do
6062 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6063 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
6064 ac_prog_rejected=yes
6065 continue
6066 fi
6067 ac_cv_prog_CC="cc"
6068 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6069 break 2
6070 fi
6071done
6072 done
6073IFS=$as_save_IFS
6074
6075if test $ac_prog_rejected = yes; then
6076 # We found a bogon in the path, so make sure we never use it.
6077 set dummy $ac_cv_prog_CC
6078 shift
6079 if test $# != 0; then
6080 # We chose a different compiler from the bogus one.
6081 # However, it has the same basename, so the bogon will be chosen
6082 # first if we set CC to just the basename; use the full file name.
6083 shift
6084 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
6085 fi
6086fi
6087fi
6088fi
6089CC=$ac_cv_prog_CC
6090if test -n "$CC"; then
6091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6092$as_echo "$CC" >&6; }
6093else
6094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6095$as_echo "no" >&6; }
c971b7fa 6096fi
7a6dbc2f 6097
7a6dbc2f 6098
c971b7fa 6099fi
5e8754f9
SDJ
6100if test -z "$CC"; then
6101 if test -n "$ac_tool_prefix"; then
6102 for ac_prog in cl.exe
6103 do
6104 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6105set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6107$as_echo_n "checking for $ac_word... " >&6; }
6108if ${ac_cv_prog_CC+:} false; then :
6109 $as_echo_n "(cached) " >&6
6110else
6111 if test -n "$CC"; then
6112 ac_cv_prog_CC="$CC" # Let the user override the test.
6113else
6114as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6115for as_dir in $PATH
6116do
6117 IFS=$as_save_IFS
6118 test -z "$as_dir" && as_dir=.
6119 for ac_exec_ext in '' $ac_executable_extensions; do
6120 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6121 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
6122 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6123 break 2
6124 fi
6125done
7a6dbc2f 6126 done
5e8754f9
SDJ
6127IFS=$as_save_IFS
6128
6129fi
6130fi
6131CC=$ac_cv_prog_CC
6132if test -n "$CC"; then
6133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6134$as_echo "$CC" >&6; }
6135else
6136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6137$as_echo "no" >&6; }
c971b7fa 6138fi
7a6dbc2f 6139
5e8754f9
SDJ
6140
6141 test -n "$CC" && break
6142 done
6143fi
6144if test -z "$CC"; then
6145 ac_ct_CC=$CC
6146 for ac_prog in cl.exe
6147do
6148 # Extract the first word of "$ac_prog", so it can be a program name with args.
6149set dummy $ac_prog; ac_word=$2
6150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6151$as_echo_n "checking for $ac_word... " >&6; }
6152if ${ac_cv_prog_ac_ct_CC+:} false; then :
c971b7fa
PA
6153 $as_echo_n "(cached) " >&6
6154else
5e8754f9
SDJ
6155 if test -n "$ac_ct_CC"; then
6156 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
6157else
6158as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6159for as_dir in $PATH
6160do
6161 IFS=$as_save_IFS
6162 test -z "$as_dir" && as_dir=.
6163 for ac_exec_ext in '' $ac_executable_extensions; do
6164 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6165 ac_cv_prog_ac_ct_CC="$ac_prog"
6166 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6167 break 2
6168 fi
6169done
6170 done
6171IFS=$as_save_IFS
6172
6173fi
6174fi
6175ac_ct_CC=$ac_cv_prog_ac_ct_CC
6176if test -n "$ac_ct_CC"; then
6177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
6178$as_echo "$ac_ct_CC" >&6; }
6179else
6180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6181$as_echo "no" >&6; }
6182fi
6183
6184
6185 test -n "$ac_ct_CC" && break
6186done
6187
6188 if test "x$ac_ct_CC" = x; then
6189 CC=""
6190 else
6191 case $cross_compiling:$ac_tool_warned in
6192yes:)
6193{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6194$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6195ac_tool_warned=yes ;;
6196esac
6197 CC=$ac_ct_CC
6198 fi
6199fi
6200
6201fi
6202
6203
6204test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6205$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6206as_fn_error $? "no acceptable C compiler found in \$PATH
6207See \`config.log' for more details" "$LINENO" 5; }
6208
6209# Provide some information about the compiler.
6210$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
6211set X $ac_compile
6212ac_compiler=$2
6213for ac_option in --version -v -V -qversion; do
6214 { { ac_try="$ac_compiler $ac_option >&5"
6215case "(($ac_try" in
6216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6217 *) ac_try_echo=$ac_try;;
6218esac
6219eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6220$as_echo "$ac_try_echo"; } >&5
6221 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
6222 ac_status=$?
6223 if test -s conftest.err; then
6224 sed '10a\
6225... rest of stderr output deleted ...
6226 10q' conftest.err >conftest.er1
6227 cat conftest.er1 >&5
6228 fi
6229 rm -f conftest.er1 conftest.err
6230 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6231 test $ac_status = 0; }
6232done
6233
6234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
6235$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
6236if ${ac_cv_c_compiler_gnu+:} false; then :
6237 $as_echo_n "(cached) " >&6
7a6dbc2f
SDJ
6238else
6239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 6240/* end confdefs.h. */
c971b7fa 6241
c971b7fa 6242int
5e8754f9 6243main ()
c971b7fa 6244{
5e8754f9
SDJ
6245#ifndef __GNUC__
6246 choke me
6247#endif
6248
6249 ;
6250 return 0;
c971b7fa
PA
6251}
6252_ACEOF
5e8754f9
SDJ
6253if ac_fn_c_try_compile "$LINENO"; then :
6254 ac_compiler_gnu=yes
7a6dbc2f 6255else
5e8754f9 6256 ac_compiler_gnu=no
c971b7fa 6257fi
5e8754f9
SDJ
6258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6259ac_cv_c_compiler_gnu=$ac_compiler_gnu
c971b7fa
PA
6260
6261fi
5e8754f9
SDJ
6262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
6263$as_echo "$ac_cv_c_compiler_gnu" >&6; }
6264if test $ac_compiler_gnu = yes; then
6265 GCC=yes
6266else
6267 GCC=
d0ac1c44 6268fi
5e8754f9
SDJ
6269ac_test_CFLAGS=${CFLAGS+set}
6270ac_save_CFLAGS=$CFLAGS
6271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
6272$as_echo_n "checking whether $CC accepts -g... " >&6; }
6273if ${ac_cv_prog_cc_g+:} false; then :
6274 $as_echo_n "(cached) " >&6
6275else
6276 ac_save_c_werror_flag=$ac_c_werror_flag
6277 ac_c_werror_flag=yes
6278 ac_cv_prog_cc_g=no
6279 CFLAGS="-g"
6280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6281/* end confdefs.h. */
d0ac1c44 6282
5e8754f9
SDJ
6283int
6284main ()
6285{
c971b7fa 6286
5e8754f9
SDJ
6287 ;
6288 return 0;
6289}
6290_ACEOF
6291if ac_fn_c_try_compile "$LINENO"; then :
6292 ac_cv_prog_cc_g=yes
6293else
6294 CFLAGS=""
6295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6296/* end confdefs.h. */
c971b7fa 6297
5e8754f9
SDJ
6298int
6299main ()
6300{
c971b7fa 6301
5e8754f9
SDJ
6302 ;
6303 return 0;
6304}
6305_ACEOF
6306if ac_fn_c_try_compile "$LINENO"; then :
c971b7fa 6307
5e8754f9
SDJ
6308else
6309 ac_c_werror_flag=$ac_save_c_werror_flag
6310 CFLAGS="-g"
6311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6312/* end confdefs.h. */
c971b7fa 6313
5e8754f9
SDJ
6314int
6315main ()
6316{
c971b7fa 6317
5e8754f9
SDJ
6318 ;
6319 return 0;
6320}
7a6dbc2f 6321_ACEOF
5e8754f9
SDJ
6322if ac_fn_c_try_compile "$LINENO"; then :
6323 ac_cv_prog_cc_g=yes
c971b7fa 6324fi
5e8754f9
SDJ
6325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6326fi
6327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6328fi
6329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6330 ac_c_werror_flag=$ac_save_c_werror_flag
6331fi
6332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
6333$as_echo "$ac_cv_prog_cc_g" >&6; }
6334if test "$ac_test_CFLAGS" = set; then
6335 CFLAGS=$ac_save_CFLAGS
6336elif test $ac_cv_prog_cc_g = yes; then
6337 if test "$GCC" = yes; then
6338 CFLAGS="-g -O2"
6339 else
6340 CFLAGS="-g"
6341 fi
6342else
6343 if test "$GCC" = yes; then
6344 CFLAGS="-O2"
6345 else
6346 CFLAGS=
6347 fi
6348fi
6349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6350$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
6351if ${ac_cv_prog_cc_c89+:} false; then :
6352 $as_echo_n "(cached) " >&6
6353else
6354 ac_cv_prog_cc_c89=no
6355ac_save_CC=$CC
6356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6357/* end confdefs.h. */
6358#include <stdarg.h>
6359#include <stdio.h>
6360struct stat;
6361/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
6362struct buf { int x; };
6363FILE * (*rcsopen) (struct buf *, struct stat *, int);
6364static char *e (p, i)
6365 char **p;
6366 int i;
6367{
6368 return p[i];
6369}
6370static char *f (char * (*g) (char **, int), char **p, ...)
6371{
6372 char *s;
6373 va_list v;
6374 va_start (v,p);
6375 s = g (p, va_arg (v,int));
6376 va_end (v);
6377 return s;
6378}
c971b7fa 6379
5e8754f9
SDJ
6380/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
6381 function prototypes and stuff, but not '\xHH' hex character constants.
6382 These don't provoke an error unfortunately, instead are silently treated
6383 as 'x'. The following induces an error, until -std is added to get
6384 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
6385 array size at least. It's necessary to write '\x00'==0 to get something
6386 that's true only with -std. */
6387int osf4_cc_array ['\x00' == 0 ? 1 : -1];
c971b7fa 6388
5e8754f9
SDJ
6389/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6390 inside strings and character constants. */
6391#define FOO(x) 'x'
6392int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
c971b7fa 6393
5e8754f9
SDJ
6394int test (int i, double x);
6395struct s1 {int (*f) (int a);};
6396struct s2 {int (*f) (double a);};
6397int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6398int argc;
6399char **argv;
6400int
6401main ()
6402{
6403return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
6404 ;
6405 return 0;
6406}
6407_ACEOF
6408for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6409 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6410do
6411 CC="$ac_save_CC $ac_arg"
6412 if ac_fn_c_try_compile "$LINENO"; then :
6413 ac_cv_prog_cc_c89=$ac_arg
6414fi
6415rm -f core conftest.err conftest.$ac_objext
6416 test "x$ac_cv_prog_cc_c89" != "xno" && break
6417done
6418rm -f conftest.$ac_ext
6419CC=$ac_save_CC
c971b7fa 6420
5e8754f9
SDJ
6421fi
6422# AC_CACHE_VAL
6423case "x$ac_cv_prog_cc_c89" in
6424 x)
6425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6426$as_echo "none needed" >&6; } ;;
6427 xno)
6428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6429$as_echo "unsupported" >&6; } ;;
6430 *)
6431 CC="$CC $ac_cv_prog_cc_c89"
6432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6433$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6434esac
6435if test "x$ac_cv_prog_cc_c89" != xno; then :
c971b7fa 6436
5e8754f9 6437fi
c971b7fa 6438
5e8754f9
SDJ
6439ac_ext=c
6440ac_cpp='$CPP $CPPFLAGS'
6441ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6442ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6443ac_compiler_gnu=$ac_cv_c_compiler_gnu
d0ac1c44 6444
5e8754f9
SDJ
6445ac_ext=c
6446ac_cpp='$CPP $CPPFLAGS'
6447ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6448ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6449ac_compiler_gnu=$ac_cv_c_compiler_gnu
6450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
6451$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
6452if ${am_cv_prog_cc_c_o+:} false; then :
6453 $as_echo_n "(cached) " >&6
6454else
6455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6456/* end confdefs.h. */
d0ac1c44 6457
5e8754f9
SDJ
6458int
6459main ()
6460{
d0ac1c44 6461
5e8754f9
SDJ
6462 ;
6463 return 0;
6464}
6465_ACEOF
6466 # Make sure it works both with $CC and with simple cc.
6467 # Following AC_PROG_CC_C_O, we do the test twice because some
6468 # compilers refuse to overwrite an existing .o file with -o,
6469 # though they will create one.
6470 am_cv_prog_cc_c_o=yes
6471 for am_i in 1 2; do
6472 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
6473 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
6474 ac_status=$?
6475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6476 (exit $ac_status); } \
6477 && test -f conftest2.$ac_objext; then
6478 : OK
6479 else
6480 am_cv_prog_cc_c_o=no
6481 break
6482 fi
6483 done
6484 rm -f core conftest*
6485 unset am_i
6486fi
6487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
6488$as_echo "$am_cv_prog_cc_c_o" >&6; }
6489if test "$am_cv_prog_cc_c_o" != yes; then
6490 # Losing compiler, so override with the script.
6491 # FIXME: It is wrong to rewrite CC.
6492 # But if we don't then we get into trouble of one sort or another.
6493 # A longer-term fix would be to have automake use am__CC in this case,
6494 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
6495 CC="$am_aux_dir/compile $CC"
6496fi
6497ac_ext=c
6498ac_cpp='$CPP $CPPFLAGS'
6499ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6500ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6501ac_compiler_gnu=$ac_cv_c_compiler_gnu
d0ac1c44 6502
7a6dbc2f 6503
5e8754f9 6504am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
7a6dbc2f
SDJ
6505
6506
5e8754f9
SDJ
6507ac_aux_dir=
6508for ac_dir in ../.. "$srcdir"/../..; do
6509 if test -f "$ac_dir/install-sh"; then
6510 ac_aux_dir=$ac_dir
6511 ac_install_sh="$ac_aux_dir/install-sh -c"
6512 break
6513 elif test -f "$ac_dir/install.sh"; then
6514 ac_aux_dir=$ac_dir
6515 ac_install_sh="$ac_aux_dir/install.sh -c"
6516 break
6517 elif test -f "$ac_dir/shtool"; then
6518 ac_aux_dir=$ac_dir
6519 ac_install_sh="$ac_aux_dir/shtool install -c"
6520 break
6521 fi
6522done
6523if test -z "$ac_aux_dir"; then
6524 as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../.. \"$srcdir\"/../.." "$LINENO" 5
6525fi
6526
6527# These three variables are undocumented and unsupported,
6528# and are intended to be withdrawn in a future Autoconf release.
6529# They can cause serious problems if a builder's source tree is in a directory
6530# whose full name contains unusual characters.
6531ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
6532ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
6533ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
6534
6535
6536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6537$as_echo_n "checking target system type... " >&6; }
6538if ${ac_cv_target+:} false; then :
c971b7fa
PA
6539 $as_echo_n "(cached) " >&6
6540else
5e8754f9
SDJ
6541 if test "x$target_alias" = x; then
6542 ac_cv_target=$ac_cv_host
6543else
6544 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6545 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
c971b7fa 6546fi
c971b7fa 6547
5e8754f9
SDJ
6548fi
6549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6550$as_echo "$ac_cv_target" >&6; }
6551case $ac_cv_target in
6552*-*-*) ;;
6553*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6554esac
6555target=$ac_cv_target
6556ac_save_IFS=$IFS; IFS='-'
6557set x $ac_cv_target
6558shift
6559target_cpu=$1
6560target_vendor=$2
6561shift; shift
6562# Remember, the first character of IFS is used to create $*,
6563# except with old shells:
6564target_os=$*
6565IFS=$ac_save_IFS
6566case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
c971b7fa
PA
6567
6568
5e8754f9
SDJ
6569# The aliases save the names the user supplied, while $host etc.
6570# will get canonicalized.
6571test -n "$target_alias" &&
6572 test "$program_prefix$program_suffix$program_transform_name" = \
6573 NONENONEs,x,x, &&
6574 program_prefix=${target_alias}-
7a6dbc2f
SDJ
6575
6576
6577
6578
6579
6580
6581
5e8754f9
SDJ
6582 LIBC_FATAL_STDERR_=1
6583 export LIBC_FATAL_STDERR_
7a6dbc2f 6584
5e8754f9
SDJ
6585ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6586if test "x$ac_cv_type_size_t" = xyes; then :
7a6dbc2f 6587
5e8754f9 6588else
7a6dbc2f 6589
5e8754f9
SDJ
6590cat >>confdefs.h <<_ACEOF
6591#define size_t unsigned int
6592_ACEOF
7a6dbc2f 6593
5e8754f9 6594fi
7a6dbc2f 6595
5e8754f9
SDJ
6596# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6597# for constant arguments. Useless!
6598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
6599$as_echo_n "checking for working alloca.h... " >&6; }
6600if ${ac_cv_working_alloca_h+:} false; then :
c971b7fa 6601 $as_echo_n "(cached) " >&6
7a6dbc2f 6602else
5e8754f9
SDJ
6603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6604/* end confdefs.h. */
6605#include <alloca.h>
6606int
6607main ()
6608{
6609char *p = (char *) alloca (2 * sizeof (int));
6610 if (p) return 0;
6611 ;
6612 return 0;
6613}
6614_ACEOF
6615if ac_fn_c_try_link "$LINENO"; then :
6616 ac_cv_working_alloca_h=yes
6617else
6618 ac_cv_working_alloca_h=no
6619fi
6620rm -f core conftest.err conftest.$ac_objext \
6621 conftest$ac_exeext conftest.$ac_ext
6622fi
6623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
6624$as_echo "$ac_cv_working_alloca_h" >&6; }
6625if test $ac_cv_working_alloca_h = yes; then
7a6dbc2f 6626
5e8754f9
SDJ
6627$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
6628
6629fi
7a6dbc2f 6630
5e8754f9
SDJ
6631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
6632$as_echo_n "checking for alloca... " >&6; }
6633if ${ac_cv_func_alloca_works+:} false; then :
6634 $as_echo_n "(cached) " >&6
c971b7fa
PA
6635else
6636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6637/* end confdefs.h. */
5e8754f9
SDJ
6638#ifdef __GNUC__
6639# define alloca __builtin_alloca
6640#else
6641# ifdef _MSC_VER
6642# include <malloc.h>
6643# define alloca _alloca
6644# else
6645# ifdef HAVE_ALLOCA_H
6646# include <alloca.h>
6647# else
6648# ifdef _AIX
6649 #pragma alloca
6650# else
6651# ifndef alloca /* predefined by HP cc +Olibcalls */
6652void *alloca (size_t);
6653# endif
6654# endif
6655# endif
6656# endif
6657#endif
7a6dbc2f 6658
5e8754f9
SDJ
6659int
6660main ()
7a6dbc2f 6661{
5e8754f9
SDJ
6662char *p = (char *) alloca (1);
6663 if (p) return 0;
6664 ;
6665 return 0;
7a6dbc2f 6666}
c971b7fa 6667_ACEOF
5e8754f9
SDJ
6668if ac_fn_c_try_link "$LINENO"; then :
6669 ac_cv_func_alloca_works=yes
c971b7fa 6670else
5e8754f9 6671 ac_cv_func_alloca_works=no
7a6dbc2f 6672fi
5e8754f9
SDJ
6673rm -f core conftest.err conftest.$ac_objext \
6674 conftest$ac_exeext conftest.$ac_ext
c0fc7f8b 6675fi
5e8754f9
SDJ
6676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
6677$as_echo "$ac_cv_func_alloca_works" >&6; }
98399780 6678
5e8754f9 6679if test $ac_cv_func_alloca_works = yes; then
98399780 6680
5e8754f9 6681$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
472fa5ee 6682
5e8754f9
SDJ
6683else
6684 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6685# that cause trouble. Some versions do not even contain alloca or
6686# contain a buggy version. If you still want to use their alloca,
6687# use ar to extract alloca.o from them instead of compiling alloca.c.
472fa5ee
SM
6688
6689
6690
6691
6692
5e8754f9 6693ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
472fa5ee 6694
5e8754f9 6695$as_echo "#define C_ALLOCA 1" >>confdefs.h
472fa5ee
SM
6696
6697
5e8754f9
SDJ
6698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
6699$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
6700if ${ac_cv_os_cray+:} false; then :
6701 $as_echo_n "(cached) " >&6
6702else
6703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6704/* end confdefs.h. */
6705#if defined CRAY && ! defined CRAY2
6706webecray
6707#else
6708wenotbecray
6709#endif
472fa5ee 6710
5e8754f9
SDJ
6711_ACEOF
6712if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6713 $EGREP "webecray" >/dev/null 2>&1; then :
6714 ac_cv_os_cray=yes
6715else
6716 ac_cv_os_cray=no
6717fi
6718rm -f conftest*
472fa5ee 6719
5e8754f9
SDJ
6720fi
6721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
6722$as_echo "$ac_cv_os_cray" >&6; }
6723if test $ac_cv_os_cray = yes; then
6724 for ac_func in _getb67 GETB67 getb67; do
6725 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6726ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6727if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
472fa5ee 6728
5e8754f9
SDJ
6729cat >>confdefs.h <<_ACEOF
6730#define CRAY_STACKSEG_END $ac_func
6731_ACEOF
472fa5ee 6732
5e8754f9
SDJ
6733 break
6734fi
472fa5ee 6735
5e8754f9
SDJ
6736 done
6737fi
472fa5ee 6738
5e8754f9
SDJ
6739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
6740$as_echo_n "checking stack direction for C alloca... " >&6; }
6741if ${ac_cv_c_stack_direction+:} false; then :
6742 $as_echo_n "(cached) " >&6
6743else
6744 if test "$cross_compiling" = yes; then :
6745 ac_cv_c_stack_direction=0
6746else
6747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6748/* end confdefs.h. */
6749$ac_includes_default
6750int
6751find_stack_direction (int *addr, int depth)
6752{
6753 int dir, dummy = 0;
6754 if (! addr)
6755 addr = &dummy;
6756 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
6757 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
6758 return dir + dummy;
6759}
472fa5ee 6760
5e8754f9
SDJ
6761int
6762main (int argc, char **argv)
6763{
6764 return find_stack_direction (0, argc + !argv + 20) < 0;
6765}
6766_ACEOF
6767if ac_fn_c_try_run "$LINENO"; then :
6768 ac_cv_c_stack_direction=1
6769else
6770 ac_cv_c_stack_direction=-1
6771fi
6772rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6773 conftest.$ac_objext conftest.beam conftest.$ac_ext
6774fi
472fa5ee 6775
5e8754f9
SDJ
6776fi
6777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
6778$as_echo "$ac_cv_c_stack_direction" >&6; }
6779cat >>confdefs.h <<_ACEOF
6780#define STACK_DIRECTION $ac_cv_c_stack_direction
6781_ACEOF
472fa5ee 6782
98399780 6783
5e8754f9 6784fi
98399780
YQ
6785
6786
725e2999
JB
6787 GNULIB_INET_NTOP=0;
6788 GNULIB_INET_PTON=0;
6789 HAVE_DECL_INET_NTOP=1;
6790 HAVE_DECL_INET_PTON=1;
6791 REPLACE_INET_NTOP=0;
6792 REPLACE_INET_PTON=0;
6793
6794
6795
6796
6797
6798 for ac_header in $gl_header_list
6799do :
6800 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6801ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6802if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6803 cat >>confdefs.h <<_ACEOF
6804#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6805_ACEOF
6806
6807fi
6808
6809done
6810
6811
6812
6813
6814
6815
6816
6817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
6818$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
6819if ${gl_cv_have_include_next+:} false; then :
6820 $as_echo_n "(cached) " >&6
6821else
6822 rm -rf conftestd1a conftestd1b conftestd2
6823 mkdir conftestd1a conftestd1b conftestd2
6824 cat <<EOF > conftestd1a/conftest.h
6825#define DEFINED_IN_CONFTESTD1
6826#include_next <conftest.h>
6827#ifdef DEFINED_IN_CONFTESTD2
6828int foo;
6829#else
6830#error "include_next doesn't work"
6831#endif
6832EOF
6833 cat <<EOF > conftestd1b/conftest.h
6834#define DEFINED_IN_CONFTESTD1
6835#include <stdio.h>
6836#include_next <conftest.h>
6837#ifdef DEFINED_IN_CONFTESTD2
6838int foo;
6839#else
6840#error "include_next doesn't work"
6841#endif
6842EOF
6843 cat <<EOF > conftestd2/conftest.h
6844#ifndef DEFINED_IN_CONFTESTD1
6845#error "include_next test doesn't work"
6846#endif
6847#define DEFINED_IN_CONFTESTD2
6848EOF
6849 gl_save_CPPFLAGS="$CPPFLAGS"
6850 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
6851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6852/* end confdefs.h. */
6853#include <conftest.h>
6854_ACEOF
6855if ac_fn_c_try_compile "$LINENO"; then :
6856 gl_cv_have_include_next=yes
6857else
6858 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
6859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6860/* end confdefs.h. */
6861#include <conftest.h>
6862_ACEOF
6863if ac_fn_c_try_compile "$LINENO"; then :
6864 gl_cv_have_include_next=buggy
6865else
6866 gl_cv_have_include_next=no
6867fi
6868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6869
6870fi
6871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6872 CPPFLAGS="$gl_save_CPPFLAGS"
6873 rm -rf conftestd1a conftestd1b conftestd2
6874
6875fi
6876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
6877$as_echo "$gl_cv_have_include_next" >&6; }
6878 PRAGMA_SYSTEM_HEADER=
6879 if test $gl_cv_have_include_next = yes; then
6880 INCLUDE_NEXT=include_next
6881 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
6882 if test -n "$GCC"; then
6883 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
6884 fi
6885 else
6886 if test $gl_cv_have_include_next = buggy; then
6887 INCLUDE_NEXT=include
6888 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
6889 else
6890 INCLUDE_NEXT=include
6891 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
6892 fi
6893 fi
6894
6895
6896
6897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
6898$as_echo_n "checking whether system header files limit the line length... " >&6; }
6899if ${gl_cv_pragma_columns+:} false; then :
6900 $as_echo_n "(cached) " >&6
6901else
6902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6903/* end confdefs.h. */
6904
6905#ifdef __TANDEM
6906choke me
6907#endif
6908
6909_ACEOF
6910if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6911 $EGREP "choke me" >/dev/null 2>&1; then :
6912 gl_cv_pragma_columns=yes
6913else
6914 gl_cv_pragma_columns=no
6915fi
6916rm -f conftest*
6917
6918
6919fi
6920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
6921$as_echo "$gl_cv_pragma_columns" >&6; }
6922 if test $gl_cv_pragma_columns = yes; then
6923 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
6924 else
6925 PRAGMA_COLUMNS=
6926 fi
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936 :
6937
6938
6939
6940
6941
6942 if test $ac_cv_header_features_h = yes; then
6943 HAVE_FEATURES_H=1
6944 else
6945 HAVE_FEATURES_H=0
6946 fi
6947
6948
6949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6950$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6951if test -z "$MKDIR_P"; then
6952 if ${ac_cv_path_mkdir+:} false; then :
6953 $as_echo_n "(cached) " >&6
6954else
6955 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6956for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6957do
6958 IFS=$as_save_IFS
6959 test -z "$as_dir" && as_dir=.
6960 for ac_prog in mkdir gmkdir; do
6961 for ac_exec_ext in '' $ac_executable_extensions; do
6962 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
6963 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6964 'mkdir (GNU coreutils) '* | \
6965 'mkdir (coreutils) '* | \
6966 'mkdir (fileutils) '4.1*)
6967 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6968 break 3;;
6969 esac
6970 done
6971 done
6972 done
6973IFS=$as_save_IFS
6974
6975fi
6976
6977 test -d ./--version && rmdir ./--version
6978 if test "${ac_cv_path_mkdir+set}" = set; then
6979 MKDIR_P="$ac_cv_path_mkdir -p"
6980 else
6981 # As a last resort, use the slow shell script. Don't cache a
6982 # value for MKDIR_P within a source directory, because that will
6983 # break other packages using the cache if that directory is
6984 # removed, or if the value is a relative name.
6985 MKDIR_P="$ac_install_sh -d"
6986 fi
6987fi
6988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6989$as_echo "$MKDIR_P" >&6; }
6990
6991
5e8754f9
SDJ
6992 GNULIB__EXIT=0;
6993 GNULIB_ATOLL=0;
6994 GNULIB_CALLOC_POSIX=0;
6995 GNULIB_CANONICALIZE_FILE_NAME=0;
6996 GNULIB_GETLOADAVG=0;
6997 GNULIB_GETSUBOPT=0;
6998 GNULIB_GRANTPT=0;
6999 GNULIB_MALLOC_POSIX=0;
7000 GNULIB_MBTOWC=0;
7001 GNULIB_MKDTEMP=0;
7002 GNULIB_MKOSTEMP=0;
7003 GNULIB_MKOSTEMPS=0;
7004 GNULIB_MKSTEMP=0;
7005 GNULIB_MKSTEMPS=0;
7006 GNULIB_POSIX_OPENPT=0;
7007 GNULIB_PTSNAME=0;
7008 GNULIB_PTSNAME_R=0;
7009 GNULIB_PUTENV=0;
7010 GNULIB_QSORT_R=0;
7011 GNULIB_RANDOM=0;
7012 GNULIB_RANDOM_R=0;
7013 GNULIB_REALLOC_POSIX=0;
7014 GNULIB_REALPATH=0;
7015 GNULIB_RPMATCH=0;
7016 GNULIB_SECURE_GETENV=0;
7017 GNULIB_SETENV=0;
7018 GNULIB_STRTOD=0;
7019 GNULIB_STRTOLL=0;
7020 GNULIB_STRTOULL=0;
7021 GNULIB_SYSTEM_POSIX=0;
7022 GNULIB_UNLOCKPT=0;
7023 GNULIB_UNSETENV=0;
7024 GNULIB_WCTOMB=0;
7025 HAVE__EXIT=1;
7026 HAVE_ATOLL=1;
7027 HAVE_CANONICALIZE_FILE_NAME=1;
7028 HAVE_DECL_GETLOADAVG=1;
7029 HAVE_GETSUBOPT=1;
7030 HAVE_GRANTPT=1;
7031 HAVE_MKDTEMP=1;
7032 HAVE_MKOSTEMP=1;
7033 HAVE_MKOSTEMPS=1;
7034 HAVE_MKSTEMP=1;
7035 HAVE_MKSTEMPS=1;
7036 HAVE_POSIX_OPENPT=1;
7037 HAVE_PTSNAME=1;
7038 HAVE_PTSNAME_R=1;
7039 HAVE_QSORT_R=1;
7040 HAVE_RANDOM=1;
7041 HAVE_RANDOM_H=1;
7042 HAVE_RANDOM_R=1;
7043 HAVE_REALPATH=1;
7044 HAVE_RPMATCH=1;
7045 HAVE_SECURE_GETENV=1;
7046 HAVE_SETENV=1;
7047 HAVE_DECL_SETENV=1;
7048 HAVE_STRTOD=1;
7049 HAVE_STRTOLL=1;
7050 HAVE_STRTOULL=1;
7051 HAVE_STRUCT_RANDOM_DATA=1;
7052 HAVE_SYS_LOADAVG_H=0;
7053 HAVE_UNLOCKPT=1;
7054 HAVE_DECL_UNSETENV=1;
7055 REPLACE_CALLOC=0;
7056 REPLACE_CANONICALIZE_FILE_NAME=0;
7057 REPLACE_MALLOC=0;
7058 REPLACE_MBTOWC=0;
7059 REPLACE_MKSTEMP=0;
7060 REPLACE_PTSNAME=0;
7061 REPLACE_PTSNAME_R=0;
7062 REPLACE_PUTENV=0;
7063 REPLACE_QSORT_R=0;
7064 REPLACE_RANDOM_R=0;
7065 REPLACE_REALLOC=0;
7066 REPLACE_REALPATH=0;
7067 REPLACE_SETENV=0;
7068 REPLACE_STRTOD=0;
7069 REPLACE_UNSETENV=0;
7070 REPLACE_WCTOMB=0;
6ec2e0f5
SDJ
7071
7072
7073
7074
472fa5ee 7075
5e8754f9
SDJ
7076 for ac_func in $gl_func_list
7077do :
7078 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7079ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7080if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7081 cat >>confdefs.h <<_ACEOF
7082#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7083_ACEOF
472fa5ee 7084
5e8754f9
SDJ
7085fi
7086done
472fa5ee
SM
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
472fa5ee
SM
7101
7102
7103
5e8754f9
SDJ
7104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
7105$as_echo_n "checking whether // is distinct from /... " >&6; }
7106if ${gl_cv_double_slash_root+:} false; then :
7107 $as_echo_n "(cached) " >&6
7108else
7109 if test x"$cross_compiling" = xyes ; then
7110 # When cross-compiling, there is no way to tell whether // is special
7111 # short of a list of hosts. However, the only known hosts to date
7112 # that have a distinct // are Apollo DomainOS (too old to port to),
7113 # Cygwin, and z/OS. If anyone knows of another system for which // has
7114 # special semantics and is distinct from /, please report it to
7115 # <bug-gnulib@gnu.org>.
7116 case $host in
7117 *-cygwin | i370-ibm-openedition)
7118 gl_cv_double_slash_root=yes ;;
7119 *)
7120 # Be optimistic and assume that / and // are the same when we
7121 # don't know.
7122 gl_cv_double_slash_root='unknown, assuming no' ;;
7123 esac
7124 else
7125 set x `ls -di / // 2>/dev/null`
7126 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
7127 gl_cv_double_slash_root=no
7128 else
7129 gl_cv_double_slash_root=yes
7130 fi
7131 fi
7132fi
7133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
7134$as_echo "$gl_cv_double_slash_root" >&6; }
7135 if test "$gl_cv_double_slash_root" = yes; then
6ec2e0f5 7136
5e8754f9 7137$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
6ec2e0f5 7138
5e8754f9 7139 fi
6ec2e0f5 7140
6ec2e0f5 7141
6ec2e0f5
SDJ
7142
7143
7144
7145
7146
7147
5e8754f9 7148 :
6ec2e0f5 7149
472fa5ee
SM
7150
7151
7152
7153
5e8754f9
SDJ
7154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
7155$as_echo_n "checking whether realpath works... " >&6; }
7156if ${gl_cv_func_realpath_works+:} false; then :
7157 $as_echo_n "(cached) " >&6
7158else
472fa5ee 7159
5e8754f9
SDJ
7160 touch conftest.a
7161 mkdir conftest.d
7162 if test "$cross_compiling" = yes; then :
7163 case "$host_os" in
7164 # Guess yes on glibc systems.
7165 *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
7166 # If we don't know, assume the worst.
7167 *) gl_cv_func_realpath_works="guessing no" ;;
7168 esac
472fa5ee 7169
5e8754f9
SDJ
7170else
7171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7172/* end confdefs.h. */
e26b6bb0
TT
7173
7174
7175
5e8754f9
SDJ
7176#include <stdlib.h>
7177#if defined __MACH__ && defined __APPLE__
7178/* Avoid a crash on Mac OS X. */
7179#include <mach/mach.h>
7180#include <mach/mach_error.h>
7181#include <mach/thread_status.h>
7182#include <mach/exception.h>
7183#include <mach/task.h>
7184#include <pthread.h>
7185/* The exception port on which our thread listens. */
7186static mach_port_t our_exception_port;
7187/* The main function of the thread listening for exceptions of type
7188 EXC_BAD_ACCESS. */
7189static void *
7190mach_exception_thread (void *arg)
7191{
7192 /* Buffer for a message to be received. */
7193 struct {
7194 mach_msg_header_t head;
7195 mach_msg_body_t msgh_body;
7196 char data[1024];
7197 } msg;
7198 mach_msg_return_t retval;
7199 /* Wait for a message on the exception port. */
7200 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
7201 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
7202 if (retval != MACH_MSG_SUCCESS)
7203 abort ();
7204 exit (1);
7205}
7206static void
7207nocrash_init (void)
7208{
7209 mach_port_t self = mach_task_self ();
7210 /* Allocate a port on which the thread shall listen for exceptions. */
7211 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
7212 == KERN_SUCCESS) {
7213 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
7214 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
7215 MACH_MSG_TYPE_MAKE_SEND)
7216 == KERN_SUCCESS) {
7217 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
7218 for us. */
7219 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
7220 /* Create the thread listening on the exception port. */
7221 pthread_attr_t attr;
7222 pthread_t thread;
7223 if (pthread_attr_init (&attr) == 0
7224 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
7225 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
7226 pthread_attr_destroy (&attr);
7227 /* Replace the exception port info for these exceptions with our own.
7228 Note that we replace the exception port for the entire task, not only
7229 for a particular thread. This has the effect that when our exception
7230 port gets the message, the thread specific exception port has already
7231 been asked, and we don't need to bother about it.
7232 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
7233 task_set_exception_ports (self, mask, our_exception_port,
7234 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
7235 }
7236 }
7237 }
7238}
7239#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
7240/* Avoid a crash on native Windows. */
7241#define WIN32_LEAN_AND_MEAN
7242#include <windows.h>
7243#include <winerror.h>
7244static LONG WINAPI
7245exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
7246{
7247 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
7248 {
7249 case EXCEPTION_ACCESS_VIOLATION:
7250 case EXCEPTION_IN_PAGE_ERROR:
7251 case EXCEPTION_STACK_OVERFLOW:
7252 case EXCEPTION_GUARD_PAGE:
7253 case EXCEPTION_PRIV_INSTRUCTION:
7254 case EXCEPTION_ILLEGAL_INSTRUCTION:
7255 case EXCEPTION_DATATYPE_MISALIGNMENT:
7256 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
7257 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
7258 exit (1);
7259 }
7260 return EXCEPTION_CONTINUE_SEARCH;
7261}
7262static void
7263nocrash_init (void)
7264{
7265 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
7266}
e26b6bb0 7267#else
5e8754f9
SDJ
7268/* Avoid a crash on POSIX systems. */
7269#include <signal.h>
7270#include <unistd.h>
7271/* A POSIX signal handler. */
7272static void
7273exception_handler (int sig)
7274{
7275 _exit (1);
7276}
7277static void
7278nocrash_init (void)
7279{
7280#ifdef SIGSEGV
7281 signal (SIGSEGV, exception_handler);
88b48903 7282#endif
5e8754f9
SDJ
7283#ifdef SIGBUS
7284 signal (SIGBUS, exception_handler);
88b48903 7285#endif
5e8754f9 7286}
88b48903 7287#endif
88b48903 7288
5e8754f9
SDJ
7289 #include <stdlib.h>
7290 #include <string.h>
88b48903 7291
5e8754f9
SDJ
7292int
7293main ()
7294{
88b48903 7295
5e8754f9
SDJ
7296 int result = 0;
7297 {
7298 char *name = realpath ("conftest.a", NULL);
7299 if (!(name && *name == '/'))
7300 result |= 1;
7301 free (name);
7302 }
7303 {
7304 char *name = realpath ("conftest.b/../conftest.a", NULL);
7305 if (name != NULL)
7306 result |= 2;
7307 free (name);
7308 }
7309 {
7310 char *name = realpath ("conftest.a/", NULL);
7311 if (name != NULL)
7312 result |= 4;
7313 free (name);
7314 }
7315 {
7316 char *name1 = realpath (".", NULL);
7317 char *name2 = realpath ("conftest.d//./..", NULL);
7318 if (! name1 || ! name2 || strcmp (name1, name2))
7319 result |= 8;
7320 free (name1);
7321 free (name2);
7322 }
7323 return result;
88b48903 7324
5e8754f9
SDJ
7325 ;
7326 return 0;
7327}
88b48903
WN
7328
7329_ACEOF
5e8754f9
SDJ
7330if ac_fn_c_try_run "$LINENO"; then :
7331 gl_cv_func_realpath_works=yes
88b48903 7332else
5e8754f9
SDJ
7333 gl_cv_func_realpath_works=no
7334fi
7335rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7336 conftest.$ac_objext conftest.beam conftest.$ac_ext
88b48903 7337fi
88b48903 7338
5e8754f9 7339 rm -rf conftest.a conftest.d
88b48903
WN
7340
7341fi
5e8754f9
SDJ
7342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
7343$as_echo "$gl_cv_func_realpath_works" >&6; }
7344 case "$gl_cv_func_realpath_works" in
7345 *yes)
88b48903 7346
5e8754f9 7347$as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
88b48903 7348
5e8754f9
SDJ
7349 ;;
7350 esac
88b48903
WN
7351
7352
e26b6bb0 7353
e26b6bb0 7354
3d99e817 7355
472fa5ee
SM
7356
7357
7358
7359
5e8754f9 7360 :
472fa5ee
SM
7361
7362
3d99e817 7363
3d99e817 7364
3d99e817 7365
3d99e817 7366
3d99e817 7367
3d99e817
AK
7368
7369
3d99e817
AK
7370
7371
7372
18848e28 7373
18848e28 7374
5e8754f9 7375 :
18848e28 7376
18848e28
GF
7377
7378
18848e28
GF
7379
7380
7381
7382
5e8754f9
SDJ
7383 GNULIB_CHDIR=0;
7384 GNULIB_CHOWN=0;
7385 GNULIB_CLOSE=0;
7386 GNULIB_DUP=0;
7387 GNULIB_DUP2=0;
7388 GNULIB_DUP3=0;
7389 GNULIB_ENVIRON=0;
7390 GNULIB_EUIDACCESS=0;
7391 GNULIB_FACCESSAT=0;
7392 GNULIB_FCHDIR=0;
7393 GNULIB_FCHOWNAT=0;
7394 GNULIB_FDATASYNC=0;
7395 GNULIB_FSYNC=0;
7396 GNULIB_FTRUNCATE=0;
7397 GNULIB_GETCWD=0;
7398 GNULIB_GETDOMAINNAME=0;
7399 GNULIB_GETDTABLESIZE=0;
7400 GNULIB_GETGROUPS=0;
7401 GNULIB_GETHOSTNAME=0;
7402 GNULIB_GETLOGIN=0;
7403 GNULIB_GETLOGIN_R=0;
7404 GNULIB_GETPAGESIZE=0;
7405 GNULIB_GETUSERSHELL=0;
7406 GNULIB_GROUP_MEMBER=0;
7407 GNULIB_ISATTY=0;
7408 GNULIB_LCHOWN=0;
7409 GNULIB_LINK=0;
7410 GNULIB_LINKAT=0;
7411 GNULIB_LSEEK=0;
7412 GNULIB_PIPE=0;
7413 GNULIB_PIPE2=0;
7414 GNULIB_PREAD=0;
7415 GNULIB_PWRITE=0;
7416 GNULIB_READ=0;
7417 GNULIB_READLINK=0;
7418 GNULIB_READLINKAT=0;
7419 GNULIB_RMDIR=0;
7420 GNULIB_SETHOSTNAME=0;
7421 GNULIB_SLEEP=0;
7422 GNULIB_SYMLINK=0;
7423 GNULIB_SYMLINKAT=0;
7424 GNULIB_TTYNAME_R=0;
7425 GNULIB_UNISTD_H_NONBLOCKING=0;
7426 GNULIB_UNISTD_H_SIGPIPE=0;
7427 GNULIB_UNLINK=0;
7428 GNULIB_UNLINKAT=0;
7429 GNULIB_USLEEP=0;
7430 GNULIB_WRITE=0;
7431 HAVE_CHOWN=1;
7432 HAVE_DUP2=1;
7433 HAVE_DUP3=1;
7434 HAVE_EUIDACCESS=1;
7435 HAVE_FACCESSAT=1;
7436 HAVE_FCHDIR=1;
7437 HAVE_FCHOWNAT=1;
7438 HAVE_FDATASYNC=1;
7439 HAVE_FSYNC=1;
7440 HAVE_FTRUNCATE=1;
7441 HAVE_GETDTABLESIZE=1;
7442 HAVE_GETGROUPS=1;
7443 HAVE_GETHOSTNAME=1;
7444 HAVE_GETLOGIN=1;
7445 HAVE_GETPAGESIZE=1;
7446 HAVE_GROUP_MEMBER=1;
7447 HAVE_LCHOWN=1;
7448 HAVE_LINK=1;
7449 HAVE_LINKAT=1;
7450 HAVE_PIPE=1;
7451 HAVE_PIPE2=1;
7452 HAVE_PREAD=1;
7453 HAVE_PWRITE=1;
7454 HAVE_READLINK=1;
7455 HAVE_READLINKAT=1;
7456 HAVE_SETHOSTNAME=1;
7457 HAVE_SLEEP=1;
7458 HAVE_SYMLINK=1;
7459 HAVE_SYMLINKAT=1;
7460 HAVE_UNLINKAT=1;
7461 HAVE_USLEEP=1;
7462 HAVE_DECL_ENVIRON=1;
7463 HAVE_DECL_FCHDIR=1;
7464 HAVE_DECL_FDATASYNC=1;
7465 HAVE_DECL_GETDOMAINNAME=1;
7466 HAVE_DECL_GETLOGIN_R=1;
7467 HAVE_DECL_GETPAGESIZE=1;
7468 HAVE_DECL_GETUSERSHELL=1;
7469 HAVE_DECL_SETHOSTNAME=1;
7470 HAVE_DECL_TTYNAME_R=1;
7471 HAVE_OS_H=0;
7472 HAVE_SYS_PARAM_H=0;
7473 REPLACE_CHOWN=0;
7474 REPLACE_CLOSE=0;
7475 REPLACE_DUP=0;
7476 REPLACE_DUP2=0;
7477 REPLACE_FCHOWNAT=0;
7478 REPLACE_FTRUNCATE=0;
7479 REPLACE_GETCWD=0;
7480 REPLACE_GETDOMAINNAME=0;
7481 REPLACE_GETDTABLESIZE=0;
7482 REPLACE_GETLOGIN_R=0;
7483 REPLACE_GETGROUPS=0;
7484 REPLACE_GETPAGESIZE=0;
7485 REPLACE_ISATTY=0;
7486 REPLACE_LCHOWN=0;
7487 REPLACE_LINK=0;
7488 REPLACE_LINKAT=0;
7489 REPLACE_LSEEK=0;
7490 REPLACE_PREAD=0;
7491 REPLACE_PWRITE=0;
7492 REPLACE_READ=0;
7493 REPLACE_READLINK=0;
7494 REPLACE_READLINKAT=0;
7495 REPLACE_RMDIR=0;
7496 REPLACE_SLEEP=0;
7497 REPLACE_SYMLINK=0;
7498 REPLACE_SYMLINKAT=0;
7499 REPLACE_TTYNAME_R=0;
7500 REPLACE_UNLINK=0;
7501 REPLACE_UNLINKAT=0;
7502 REPLACE_USLEEP=0;
7503 REPLACE_WRITE=0;
7504 UNISTD_H_HAVE_WINSOCK2_H=0;
7505 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
18848e28
GF
7506
7507
7508
7509
18848e28 7510
4a626d0a
PA
7511
7512
18848e28 7513
4a626d0a 7514
5e8754f9 7515 :
4a626d0a 7516
4a626d0a
PA
7517
7518
18848e28 7519
18848e28
GF
7520
7521
7522
7523
18848e28 7524
18848e28
GF
7525
7526
18848e28 7527
18848e28 7528
18848e28 7529
18848e28 7530
18848e28 7531
5e8754f9 7532 :
18848e28 7533
18848e28 7534
18848e28 7535
18848e28 7536
18848e28 7537
5e8754f9
SDJ
7538 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
7539 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
18848e28 7540
5e8754f9 7541$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
18848e28 7542
5e8754f9
SDJ
7543 else
7544 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
18848e28
GF
7545 fi
7546
7547
18848e28 7548
18848e28 7549
18848e28 7550
18848e28 7551
18848e28 7552
18848e28 7553
18848e28 7554
18848e28 7555
18848e28 7556
18848e28 7557
18848e28 7558
5e8754f9
SDJ
7559 GNULIB_OPENDIR=0;
7560 GNULIB_READDIR=0;
7561 GNULIB_REWINDDIR=0;
7562 GNULIB_CLOSEDIR=0;
7563 GNULIB_DIRFD=0;
7564 GNULIB_FDOPENDIR=0;
7565 GNULIB_SCANDIR=0;
7566 GNULIB_ALPHASORT=0;
7567 HAVE_OPENDIR=1;
7568 HAVE_READDIR=1;
7569 HAVE_REWINDDIR=1;
7570 HAVE_CLOSEDIR=1;
7571 HAVE_DECL_DIRFD=1;
7572 HAVE_DECL_FDOPENDIR=1;
7573 HAVE_FDOPENDIR=1;
7574 HAVE_SCANDIR=1;
7575 HAVE_ALPHASORT=1;
7576 REPLACE_OPENDIR=0;
7577 REPLACE_CLOSEDIR=0;
7578 REPLACE_DIRFD=0;
7579 REPLACE_FDOPENDIR=0;
18848e28 7580
18848e28
GF
7581
7582
63ce7108
TT
7583
7584
7585
7586
7587
7588
7589
7590
5e8754f9 7591 :
63ce7108 7592
472fa5ee
SM
7593
7594
7595
7596
7597
472fa5ee 7598
5e8754f9
SDJ
7599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
7600$as_echo_n "checking if environ is properly declared... " >&6; }
7601 if ${gt_cv_var_environ_declaration+:} false; then :
7602 $as_echo_n "(cached) " >&6
7603else
472fa5ee 7604
5e8754f9
SDJ
7605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7606/* end confdefs.h. */
7607#if HAVE_UNISTD_H
7608 #include <unistd.h>
7609 #endif
7610 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
7611 #include <stdlib.h>
472fa5ee 7612
5e8754f9
SDJ
7613 extern struct { int foo; } environ;
7614int
7615main ()
7616{
7617environ.foo = 1;
7618 ;
7619 return 0;
7620}
7621_ACEOF
7622if ac_fn_c_try_compile "$LINENO"; then :
7623 gt_cv_var_environ_declaration=no
7624else
7625 gt_cv_var_environ_declaration=yes
7626fi
7627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7628fi
472fa5ee 7629
5e8754f9
SDJ
7630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
7631$as_echo "$gt_cv_var_environ_declaration" >&6; }
7632 if test $gt_cv_var_environ_declaration = yes; then
472fa5ee 7633
5e8754f9 7634$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
472fa5ee 7635
5e8754f9 7636 fi
472fa5ee
SM
7637
7638
5e8754f9
SDJ
7639 if test $gt_cv_var_environ_declaration != yes; then
7640 HAVE_DECL_ENVIRON=0
7641 fi
472fa5ee
SM
7642
7643
7644
5e8754f9
SDJ
7645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
7646$as_echo_n "checking for complete errno.h... " >&6; }
7647if ${gl_cv_header_errno_h_complete+:} false; then :
6ec2e0f5
SDJ
7648 $as_echo_n "(cached) " >&6
7649else
7a6dbc2f 7650
5e8754f9 7651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ec2e0f5 7652/* end confdefs.h. */
63ce7108 7653
5e8754f9
SDJ
7654#include <errno.h>
7655#if !defined ETXTBSY
7656booboo
7657#endif
7658#if !defined ENOMSG
7659booboo
7660#endif
7661#if !defined EIDRM
7662booboo
7663#endif
7664#if !defined ENOLINK
7665booboo
7666#endif
7667#if !defined EPROTO
7668booboo
7669#endif
7670#if !defined EMULTIHOP
7671booboo
7672#endif
7673#if !defined EBADMSG
7674booboo
7675#endif
7676#if !defined EOVERFLOW
7677booboo
7678#endif
7679#if !defined ENOTSUP
7680booboo
7681#endif
7682#if !defined ENETRESET
7683booboo
7684#endif
7685#if !defined ECONNABORTED
7686booboo
7687#endif
7688#if !defined ESTALE
7689booboo
7690#endif
7691#if !defined EDQUOT
7692booboo
7693#endif
7694#if !defined ECANCELED
7695booboo
7696#endif
7697#if !defined EOWNERDEAD
7698booboo
7699#endif
7700#if !defined ENOTRECOVERABLE
7701booboo
7702#endif
7703#if !defined EILSEQ
7704booboo
7705#endif
6ec2e0f5 7706
6ec2e0f5 7707_ACEOF
5e8754f9
SDJ
7708if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7709 $EGREP "booboo" >/dev/null 2>&1; then :
7710 gl_cv_header_errno_h_complete=no
6ec2e0f5 7711else
5e8754f9 7712 gl_cv_header_errno_h_complete=yes
6ec2e0f5 7713fi
5e8754f9 7714rm -f conftest*
6ec2e0f5 7715
6ec2e0f5
SDJ
7716
7717fi
5e8754f9
SDJ
7718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
7719$as_echo "$gl_cv_header_errno_h_complete" >&6; }
7720 if test $gl_cv_header_errno_h_complete = yes; then
7721 ERRNO_H=''
7722 else
472fa5ee
SM
7723
7724
7725
7726
7727
7728
7729
7730
7a6dbc2f 7731 if test $gl_cv_have_include_next = yes; then
5e8754f9 7732 gl_cv_next_errno_h='<'errno.h'>'
7a6dbc2f 7733 else
5e8754f9
SDJ
7734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
7735$as_echo_n "checking absolute name of <errno.h>... " >&6; }
7736if ${gl_cv_next_errno_h+:} false; then :
7a6dbc2f
SDJ
7737 $as_echo_n "(cached) " >&6
7738else
472fa5ee 7739
472fa5ee
SM
7740
7741
7a6dbc2f
SDJ
7742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7743/* end confdefs.h. */
5e8754f9 7744#include <errno.h>
7a6dbc2f
SDJ
7745_ACEOF
7746 case "$host_os" in
7747 aix*) gl_absname_cpp="$ac_cpp -C" ;;
7748 *) gl_absname_cpp="$ac_cpp" ;;
7749 esac
472fa5ee 7750
7a6dbc2f
SDJ
7751 case "$host_os" in
7752 mingw*)
7753 gl_dirsep_regex='[/\\]'
7754 ;;
7755 *)
7756 gl_dirsep_regex='\/'
7757 ;;
7758 esac
7759 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
5e8754f9 7760 gl_header_literal_regex=`echo 'errno.h' \
7a6dbc2f
SDJ
7761 | sed -e "$gl_make_literal_regex_sed"`
7762 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
7763 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
7764 s|^/[^/]|//&|
7765 p
7766 q
7767 }'
7768
5e8754f9 7769 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7a6dbc2f
SDJ
7770 sed -n "$gl_absolute_header_sed"`
7771
5e8754f9
SDJ
7772 gl_header=$gl_cv_absolute_errno_h
7773 gl_cv_next_errno_h='"'$gl_header'"'
7a6dbc2f
SDJ
7774
7775
7776fi
5e8754f9
SDJ
7777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
7778$as_echo "$gl_cv_next_errno_h" >&6; }
7a6dbc2f 7779 fi
5e8754f9 7780 NEXT_ERRNO_H=$gl_cv_next_errno_h
7a6dbc2f
SDJ
7781
7782 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7783 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
5e8754f9 7784 gl_next_as_first_directive='<'errno.h'>'
7a6dbc2f
SDJ
7785 else
7786 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
5e8754f9 7787 gl_next_as_first_directive=$gl_cv_next_errno_h
7a6dbc2f 7788 fi
5e8754f9 7789 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
7a6dbc2f
SDJ
7790
7791
7792
7793
5e8754f9 7794 ERRNO_H='errno.h'
7a6dbc2f
SDJ
7795 fi
7796
5e8754f9
SDJ
7797 if test -n "$ERRNO_H"; then
7798 GL_GENERATE_ERRNO_H_TRUE=
7799 GL_GENERATE_ERRNO_H_FALSE='#'
7a6dbc2f 7800else
5e8754f9
SDJ
7801 GL_GENERATE_ERRNO_H_TRUE='#'
7802 GL_GENERATE_ERRNO_H_FALSE=
7a6dbc2f
SDJ
7803fi
7804
7805
5e8754f9
SDJ
7806 if test -n "$ERRNO_H"; then
7807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
7808$as_echo_n "checking for EMULTIHOP value... " >&6; }
7809if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
7810 $as_echo_n "(cached) " >&6
7811else
7a6dbc2f 7812
5e8754f9
SDJ
7813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7814/* end confdefs.h. */
7a6dbc2f 7815
5e8754f9
SDJ
7816#include <errno.h>
7817#ifdef EMULTIHOP
7818yes
7819#endif
7a6dbc2f 7820
7a6dbc2f 7821_ACEOF
5e8754f9
SDJ
7822if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7823 $EGREP "yes" >/dev/null 2>&1; then :
7824 gl_cv_header_errno_h_EMULTIHOP=yes
7a6dbc2f 7825else
5e8754f9 7826 gl_cv_header_errno_h_EMULTIHOP=no
7a6dbc2f 7827fi
5e8754f9 7828rm -f conftest*
7a6dbc2f 7829
5e8754f9
SDJ
7830 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
7831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7832/* end confdefs.h. */
7a6dbc2f 7833
5e8754f9
SDJ
7834#define _XOPEN_SOURCE_EXTENDED 1
7835#include <errno.h>
7836#ifdef EMULTIHOP
7837yes
7838#endif
7a6dbc2f 7839
5e8754f9
SDJ
7840_ACEOF
7841if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7842 $EGREP "yes" >/dev/null 2>&1; then :
7843 gl_cv_header_errno_h_EMULTIHOP=hidden
7844fi
7845rm -f conftest*
7a6dbc2f 7846
5e8754f9
SDJ
7847 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
7848 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
7849#define _XOPEN_SOURCE_EXTENDED 1
7850#include <errno.h>
7851/* The following two lines are a workaround against an autoconf-2.52 bug. */
7852#include <stdio.h>
7853#include <stdlib.h>
7854"; then :
7a6dbc2f 7855
5e8754f9 7856fi
7a6dbc2f 7857
5e8754f9
SDJ
7858 fi
7859 fi
7a6dbc2f 7860
5e8754f9
SDJ
7861fi
7862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
7863$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
7864 case $gl_cv_header_errno_h_EMULTIHOP in
7865 yes | no)
7866 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
7867 ;;
7868 *)
7869 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
7870 ;;
7871 esac
7a6dbc2f
SDJ
7872
7873
5e8754f9 7874 fi
7a6dbc2f
SDJ
7875
7876
5e8754f9
SDJ
7877 if test -n "$ERRNO_H"; then
7878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
7879$as_echo_n "checking for ENOLINK value... " >&6; }
7880if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
7881 $as_echo_n "(cached) " >&6
7882else
7a6dbc2f 7883
5e8754f9
SDJ
7884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7885/* end confdefs.h. */
7a6dbc2f 7886
5e8754f9
SDJ
7887#include <errno.h>
7888#ifdef ENOLINK
7889yes
7890#endif
7a6dbc2f 7891
5e8754f9
SDJ
7892_ACEOF
7893if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7894 $EGREP "yes" >/dev/null 2>&1; then :
7895 gl_cv_header_errno_h_ENOLINK=yes
7896else
7897 gl_cv_header_errno_h_ENOLINK=no
7898fi
7899rm -f conftest*
7a6dbc2f 7900
5e8754f9
SDJ
7901 if test $gl_cv_header_errno_h_ENOLINK = no; then
7902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7903/* end confdefs.h. */
7a6dbc2f 7904
5e8754f9
SDJ
7905#define _XOPEN_SOURCE_EXTENDED 1
7906#include <errno.h>
7907#ifdef ENOLINK
7908yes
7909#endif
7a6dbc2f 7910
5e8754f9
SDJ
7911_ACEOF
7912if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7913 $EGREP "yes" >/dev/null 2>&1; then :
7914 gl_cv_header_errno_h_ENOLINK=hidden
7915fi
7916rm -f conftest*
7a6dbc2f 7917
5e8754f9
SDJ
7918 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
7919 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
7920#define _XOPEN_SOURCE_EXTENDED 1
7921#include <errno.h>
7922/* The following two lines are a workaround against an autoconf-2.52 bug. */
7923#include <stdio.h>
7924#include <stdlib.h>
7925"; then :
7a6dbc2f 7926
5e8754f9 7927fi
7a6dbc2f 7928
5e8754f9
SDJ
7929 fi
7930 fi
7a6dbc2f 7931
5e8754f9
SDJ
7932fi
7933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
7934$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
7935 case $gl_cv_header_errno_h_ENOLINK in
7936 yes | no)
7937 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
7938 ;;
7939 *)
7940 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
7941 ;;
7942 esac
7a6dbc2f
SDJ
7943
7944
5e8754f9 7945 fi
7a6dbc2f
SDJ
7946
7947
5e8754f9
SDJ
7948 if test -n "$ERRNO_H"; then
7949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
7950$as_echo_n "checking for EOVERFLOW value... " >&6; }
7951if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
7952 $as_echo_n "(cached) " >&6
7953else
7a6dbc2f 7954
5e8754f9
SDJ
7955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7956/* end confdefs.h. */
7a6dbc2f 7957
5e8754f9
SDJ
7958#include <errno.h>
7959#ifdef EOVERFLOW
7960yes
7961#endif
7a6dbc2f 7962
5e8754f9
SDJ
7963_ACEOF
7964if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7965 $EGREP "yes" >/dev/null 2>&1; then :
7966 gl_cv_header_errno_h_EOVERFLOW=yes
7967else
7968 gl_cv_header_errno_h_EOVERFLOW=no
7969fi
7970rm -f conftest*
7a6dbc2f 7971
5e8754f9
SDJ
7972 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
7973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7974/* end confdefs.h. */
7a6dbc2f 7975
5e8754f9
SDJ
7976#define _XOPEN_SOURCE_EXTENDED 1
7977#include <errno.h>
7978#ifdef EOVERFLOW
7979yes
7980#endif
7a6dbc2f 7981
5e8754f9
SDJ
7982_ACEOF
7983if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7984 $EGREP "yes" >/dev/null 2>&1; then :
7985 gl_cv_header_errno_h_EOVERFLOW=hidden
7986fi
7987rm -f conftest*
7a6dbc2f 7988
5e8754f9
SDJ
7989 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
7990 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
7991#define _XOPEN_SOURCE_EXTENDED 1
7992#include <errno.h>
7993/* The following two lines are a workaround against an autoconf-2.52 bug. */
7994#include <stdio.h>
7995#include <stdlib.h>
7996"; then :
7a6dbc2f 7997
5e8754f9 7998fi
7a6dbc2f 7999
5e8754f9
SDJ
8000 fi
8001 fi
7a6dbc2f 8002
5e8754f9
SDJ
8003fi
8004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
8005$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
8006 case $gl_cv_header_errno_h_EOVERFLOW in
8007 yes | no)
8008 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
8009 ;;
8010 *)
8011 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
8012 ;;
8013 esac
7a6dbc2f
SDJ
8014
8015
5e8754f9 8016 fi
7a6dbc2f
SDJ
8017
8018
5e8754f9
SDJ
8019ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
8020if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
8021 ac_have_decl=1
8022else
8023 ac_have_decl=0
8024fi
7a6dbc2f 8025
5e8754f9
SDJ
8026cat >>confdefs.h <<_ACEOF
8027#define HAVE_DECL_STRERROR_R $ac_have_decl
8028_ACEOF
7a6dbc2f 8029
5e8754f9
SDJ
8030for ac_func in strerror_r
8031do :
8032 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
8033if test "x$ac_cv_func_strerror_r" = xyes; then :
8034 cat >>confdefs.h <<_ACEOF
8035#define HAVE_STRERROR_R 1
8036_ACEOF
7a6dbc2f 8037
5e8754f9
SDJ
8038fi
8039done
7a6dbc2f 8040
5e8754f9
SDJ
8041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
8042$as_echo_n "checking whether strerror_r returns char *... " >&6; }
8043if ${ac_cv_func_strerror_r_char_p+:} false; then :
8044 $as_echo_n "(cached) " >&6
8045else
7a6dbc2f 8046
5e8754f9
SDJ
8047 ac_cv_func_strerror_r_char_p=no
8048 if test $ac_cv_have_decl_strerror_r = yes; then
8049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8050/* end confdefs.h. */
8051$ac_includes_default
8052int
8053main ()
8054{
7a6dbc2f 8055
5e8754f9
SDJ
8056 char buf[100];
8057 char x = *strerror_r (0, buf, sizeof buf);
8058 char *p = strerror_r (0, buf, sizeof buf);
8059 return !p || x;
7a6dbc2f 8060
7a6dbc2f
SDJ
8061 ;
8062 return 0;
8063}
8064_ACEOF
5e8754f9
SDJ
8065if ac_fn_c_try_compile "$LINENO"; then :
8066 ac_cv_func_strerror_r_char_p=yes
7a6dbc2f 8067fi
5e8754f9
SDJ
8068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8069 else
8070 # strerror_r is not declared. Choose between
8071 # systems that have relatively inaccessible declarations for the
8072 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
8073 # former has a strerror_r that returns char*, while the latter
8074 # has a strerror_r that returns `int'.
8075 # This test should segfault on the DEC system.
8076 if test "$cross_compiling" = yes; then :
8077 :
7a6dbc2f 8078else
5e8754f9 8079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7a6dbc2f 8080/* end confdefs.h. */
5e8754f9
SDJ
8081$ac_includes_default
8082 extern char *strerror_r ();
7a6dbc2f
SDJ
8083int
8084main ()
8085{
5e8754f9
SDJ
8086char buf[100];
8087 char x = *strerror_r (0, buf, sizeof buf);
8088 return ! isalpha (x);
7a6dbc2f
SDJ
8089 ;
8090 return 0;
8091}
8092_ACEOF
5e8754f9
SDJ
8093if ac_fn_c_try_run "$LINENO"; then :
8094 ac_cv_func_strerror_r_char_p=yes
7a6dbc2f 8095fi
5e8754f9
SDJ
8096rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8097 conftest.$ac_objext conftest.beam conftest.$ac_ext
7a6dbc2f 8098fi
5e8754f9 8099
7a6dbc2f 8100 fi
7a6dbc2f 8101
5e8754f9
SDJ
8102fi
8103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
8104$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
8105if test $ac_cv_func_strerror_r_char_p = yes; then
7a6dbc2f 8106
5e8754f9 8107$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
7a6dbc2f 8108
5e8754f9 8109fi
7a6dbc2f
SDJ
8110
8111
8112
8113
8114
5e8754f9
SDJ
8115 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
8116if test "x$ac_cv_have_decl_fchdir" = xyes; then :
8117 ac_have_decl=1
7a6dbc2f 8118else
5e8754f9
SDJ
8119 ac_have_decl=0
8120fi
7a6dbc2f 8121
5e8754f9
SDJ
8122cat >>confdefs.h <<_ACEOF
8123#define HAVE_DECL_FCHDIR $ac_have_decl
8124_ACEOF
7a6dbc2f 8125
7a6dbc2f 8126
7a6dbc2f 8127
5e8754f9
SDJ
8128 GNULIB_FCNTL=0;
8129 GNULIB_NONBLOCKING=0;
8130 GNULIB_OPEN=0;
8131 GNULIB_OPENAT=0;
8132 HAVE_FCNTL=1;
8133 HAVE_OPENAT=1;
8134 REPLACE_FCNTL=0;
8135 REPLACE_OPEN=0;
8136 REPLACE_OPENAT=0;
7a6dbc2f 8137
7a6dbc2f 8138
7a6dbc2f
SDJ
8139
8140
7a6dbc2f 8141
7a6dbc2f 8142
7a6dbc2f 8143
7a6dbc2f
SDJ
8144
8145
8146
7a6dbc2f 8147
7a6dbc2f 8148
7a6dbc2f 8149
7a6dbc2f 8150
7a6dbc2f 8151
5e8754f9 8152 :
7a6dbc2f
SDJ
8153
8154
8155
8156
8157
8158
5e8754f9 8159 :
7a6dbc2f 8160
7a6dbc2f 8161
7a6dbc2f
SDJ
8162
8163
7a6dbc2f 8164
5e8754f9
SDJ
8165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
8166$as_echo_n "checking for working fcntl.h... " >&6; }
8167if ${gl_cv_header_working_fcntl_h+:} false; then :
88b48903
WN
8168 $as_echo_n "(cached) " >&6
8169else
5e8754f9
SDJ
8170 if test "$cross_compiling" = yes; then :
8171 gl_cv_header_working_fcntl_h=cross-compiling
8172else
8173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
88b48903 8174/* end confdefs.h. */
5e8754f9
SDJ
8175#include <sys/types.h>
8176 #include <sys/stat.h>
8177 #if HAVE_UNISTD_H
8178 # include <unistd.h>
8179 #else /* on Windows with MSVC */
8180 # include <io.h>
8181 # include <stdlib.h>
8182 # defined sleep(n) _sleep ((n) * 1000)
8183 #endif
8184 #include <fcntl.h>
8185 #ifndef O_NOATIME
8186 #define O_NOATIME 0
8187 #endif
8188 #ifndef O_NOFOLLOW
8189 #define O_NOFOLLOW 0
8190 #endif
8191 static int const constants[] =
8192 {
8193 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
8194 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
8195 };
8196
8197int
88b48903
WN
8198main ()
8199{
5e8754f9
SDJ
8200
8201 int result = !constants;
8202 #if HAVE_SYMLINK
8203 {
8204 static char const sym[] = "conftest.sym";
8205 if (symlink ("/dev/null", sym) != 0)
8206 result |= 2;
8207 else
8208 {
8209 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
8210 if (fd >= 0)
8211 {
8212 close (fd);
8213 result |= 4;
8214 }
8215 }
8216 if (unlink (sym) != 0 || symlink (".", sym) != 0)
8217 result |= 2;
8218 else
8219 {
8220 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
8221 if (fd >= 0)
8222 {
8223 close (fd);
8224 result |= 4;
8225 }
8226 }
8227 unlink (sym);
8228 }
8229 #endif
8230 {
8231 static char const file[] = "confdefs.h";
8232 int fd = open (file, O_RDONLY | O_NOATIME);
8233 if (fd < 0)
8234 result |= 8;
8235 else
8236 {
8237 struct stat st0;
8238 if (fstat (fd, &st0) != 0)
8239 result |= 16;
8240 else
8241 {
8242 char c;
8243 sleep (1);
8244 if (read (fd, &c, 1) != 1)
8245 result |= 24;
8246 else
8247 {
8248 if (close (fd) != 0)
8249 result |= 32;
8250 else
8251 {
8252 struct stat st1;
8253 if (stat (file, &st1) != 0)
8254 result |= 40;
8255 else
8256 if (st0.st_atime != st1.st_atime)
8257 result |= 64;
8258 }
8259 }
8260 }
8261 }
8262 }
8263 return result;
88b48903
WN
8264 ;
8265 return 0;
8266}
8267_ACEOF
5e8754f9
SDJ
8268if ac_fn_c_try_run "$LINENO"; then :
8269 gl_cv_header_working_fcntl_h=yes
88b48903 8270else
5e8754f9
SDJ
8271 case $? in #(
8272 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
8273 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
8274 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
8275 *) gl_cv_header_working_fcntl_h='no';;
8276 esac
88b48903 8277fi
5e8754f9
SDJ
8278rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8279 conftest.$ac_objext conftest.beam conftest.$ac_ext
8280fi
8281
8282fi
8283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
8284$as_echo "$gl_cv_header_working_fcntl_h" >&6; }
8285
8286 case $gl_cv_header_working_fcntl_h in #(
8287 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
8288 *) ac_val=1;;
8289 esac
8290
8291cat >>confdefs.h <<_ACEOF
8292#define HAVE_WORKING_O_NOATIME $ac_val
8293_ACEOF
8294
8295
8296 case $gl_cv_header_working_fcntl_h in #(
8297 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
8298 *) ac_val=1;;
8299 esac
8300
8301cat >>confdefs.h <<_ACEOF
8302#define HAVE_WORKING_O_NOFOLLOW $ac_val
8303_ACEOF
8304
8305
8306ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
8307if test "x$ac_cv_type_pid_t" = xyes; then :
8308
8309else
8310
8311cat >>confdefs.h <<_ACEOF
8312#define pid_t int
8313_ACEOF
8314
8315fi
8316
8317ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
8318if test "x$ac_cv_type_mode_t" = xyes; then :
8319
8320else
8321
8322cat >>confdefs.h <<_ACEOF
8323#define mode_t int
8324_ACEOF
8325
8326fi
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
8341$as_echo_n "checking for mbstate_t... " >&6; }
8342if ${ac_cv_type_mbstate_t+:} false; then :
8343 $as_echo_n "(cached) " >&6
8344else
8345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8346/* end confdefs.h. */
8347$ac_includes_default
8348/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
8349 <wchar.h>.
8350 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8351 included before <wchar.h>. */
8352#include <stddef.h>
8353#include <stdio.h>
8354#include <time.h>
8355#include <wchar.h>
8356int
8357main ()
8358{
8359mbstate_t x; return sizeof x;
8360 ;
8361 return 0;
8362}
8363_ACEOF
8364if ac_fn_c_try_compile "$LINENO"; then :
8365 ac_cv_type_mbstate_t=yes
8366else
8367 ac_cv_type_mbstate_t=no
8368fi
8369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8370fi
8371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
8372$as_echo "$ac_cv_type_mbstate_t" >&6; }
8373 if test $ac_cv_type_mbstate_t = yes; then
8374
8375$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
8376
8377 else
8378
8379$as_echo "#define mbstate_t int" >>confdefs.h
8380
8381 fi
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424 GNULIB_ACOSF=0;
8425 GNULIB_ACOSL=0;
8426 GNULIB_ASINF=0;
8427 GNULIB_ASINL=0;
8428 GNULIB_ATANF=0;
8429 GNULIB_ATANL=0;
8430 GNULIB_ATAN2F=0;
8431 GNULIB_CBRT=0;
8432 GNULIB_CBRTF=0;
8433 GNULIB_CBRTL=0;
8434 GNULIB_CEIL=0;
8435 GNULIB_CEILF=0;
8436 GNULIB_CEILL=0;
8437 GNULIB_COPYSIGN=0;
8438 GNULIB_COPYSIGNF=0;
8439 GNULIB_COPYSIGNL=0;
8440 GNULIB_COSF=0;
8441 GNULIB_COSL=0;
8442 GNULIB_COSHF=0;
8443 GNULIB_EXPF=0;
8444 GNULIB_EXPL=0;
8445 GNULIB_EXP2=0;
8446 GNULIB_EXP2F=0;
8447 GNULIB_EXP2L=0;
8448 GNULIB_EXPM1=0;
8449 GNULIB_EXPM1F=0;
8450 GNULIB_EXPM1L=0;
8451 GNULIB_FABSF=0;
8452 GNULIB_FABSL=0;
8453 GNULIB_FLOOR=0;
8454 GNULIB_FLOORF=0;
8455 GNULIB_FLOORL=0;
8456 GNULIB_FMA=0;
8457 GNULIB_FMAF=0;
8458 GNULIB_FMAL=0;
8459 GNULIB_FMOD=0;
8460 GNULIB_FMODF=0;
8461 GNULIB_FMODL=0;
8462 GNULIB_FREXPF=0;
8463 GNULIB_FREXP=0;
8464 GNULIB_FREXPL=0;
8465 GNULIB_HYPOT=0;
8466 GNULIB_HYPOTF=0;
8467 GNULIB_HYPOTL=0;
8468 GNULIB_ILOGB=0;
8469 GNULIB_ILOGBF=0;
8470 GNULIB_ILOGBL=0;
8471 GNULIB_ISFINITE=0;
8472 GNULIB_ISINF=0;
8473 GNULIB_ISNAN=0;
8474 GNULIB_ISNANF=0;
8475 GNULIB_ISNAND=0;
8476 GNULIB_ISNANL=0;
8477 GNULIB_LDEXPF=0;
8478 GNULIB_LDEXPL=0;
8479 GNULIB_LOG=0;
8480 GNULIB_LOGF=0;
8481 GNULIB_LOGL=0;
8482 GNULIB_LOG10=0;
8483 GNULIB_LOG10F=0;
8484 GNULIB_LOG10L=0;
8485 GNULIB_LOG1P=0;
8486 GNULIB_LOG1PF=0;
8487 GNULIB_LOG1PL=0;
8488 GNULIB_LOG2=0;
8489 GNULIB_LOG2F=0;
8490 GNULIB_LOG2L=0;
8491 GNULIB_LOGB=0;
8492 GNULIB_LOGBF=0;
8493 GNULIB_LOGBL=0;
8494 GNULIB_MODF=0;
8495 GNULIB_MODFF=0;
8496 GNULIB_MODFL=0;
8497 GNULIB_POWF=0;
8498 GNULIB_REMAINDER=0;
8499 GNULIB_REMAINDERF=0;
8500 GNULIB_REMAINDERL=0;
8501 GNULIB_RINT=0;
8502 GNULIB_RINTF=0;
8503 GNULIB_RINTL=0;
8504 GNULIB_ROUND=0;
8505 GNULIB_ROUNDF=0;
8506 GNULIB_ROUNDL=0;
8507 GNULIB_SIGNBIT=0;
8508 GNULIB_SINF=0;
8509 GNULIB_SINL=0;
8510 GNULIB_SINHF=0;
8511 GNULIB_SQRTF=0;
8512 GNULIB_SQRTL=0;
8513 GNULIB_TANF=0;
8514 GNULIB_TANL=0;
8515 GNULIB_TANHF=0;
8516 GNULIB_TRUNC=0;
8517 GNULIB_TRUNCF=0;
8518 GNULIB_TRUNCL=0;
8519 HAVE_ACOSF=1;
8520 HAVE_ACOSL=1;
8521 HAVE_ASINF=1;
8522 HAVE_ASINL=1;
8523 HAVE_ATANF=1;
8524 HAVE_ATANL=1;
8525 HAVE_ATAN2F=1;
8526 HAVE_CBRT=1;
8527 HAVE_CBRTF=1;
8528 HAVE_CBRTL=1;
8529 HAVE_COPYSIGN=1;
8530 HAVE_COPYSIGNL=1;
8531 HAVE_COSF=1;
8532 HAVE_COSL=1;
8533 HAVE_COSHF=1;
8534 HAVE_EXPF=1;
8535 HAVE_EXPL=1;
8536 HAVE_EXPM1=1;
8537 HAVE_EXPM1F=1;
8538 HAVE_FABSF=1;
8539 HAVE_FABSL=1;
8540 HAVE_FMA=1;
8541 HAVE_FMAF=1;
8542 HAVE_FMAL=1;
8543 HAVE_FMODF=1;
8544 HAVE_FMODL=1;
8545 HAVE_FREXPF=1;
8546 HAVE_HYPOTF=1;
8547 HAVE_HYPOTL=1;
8548 HAVE_ILOGB=1;
8549 HAVE_ILOGBF=1;
8550 HAVE_ILOGBL=1;
8551 HAVE_ISNANF=1;
8552 HAVE_ISNAND=1;
8553 HAVE_ISNANL=1;
8554 HAVE_LDEXPF=1;
8555 HAVE_LOGF=1;
8556 HAVE_LOGL=1;
8557 HAVE_LOG10F=1;
8558 HAVE_LOG10L=1;
8559 HAVE_LOG1P=1;
8560 HAVE_LOG1PF=1;
8561 HAVE_LOG1PL=1;
8562 HAVE_LOGBF=1;
8563 HAVE_LOGBL=1;
8564 HAVE_MODFF=1;
8565 HAVE_MODFL=1;
8566 HAVE_POWF=1;
8567 HAVE_REMAINDER=1;
8568 HAVE_REMAINDERF=1;
8569 HAVE_RINT=1;
8570 HAVE_RINTL=1;
8571 HAVE_SINF=1;
8572 HAVE_SINL=1;
8573 HAVE_SINHF=1;
8574 HAVE_SQRTF=1;
8575 HAVE_SQRTL=1;
8576 HAVE_TANF=1;
8577 HAVE_TANL=1;
8578 HAVE_TANHF=1;
8579 HAVE_DECL_ACOSL=1;
8580 HAVE_DECL_ASINL=1;
8581 HAVE_DECL_ATANL=1;
8582 HAVE_DECL_CBRTF=1;
8583 HAVE_DECL_CBRTL=1;
8584 HAVE_DECL_CEILF=1;
8585 HAVE_DECL_CEILL=1;
8586 HAVE_DECL_COPYSIGNF=1;
8587 HAVE_DECL_COSL=1;
8588 HAVE_DECL_EXPL=1;
8589 HAVE_DECL_EXP2=1;
8590 HAVE_DECL_EXP2F=1;
8591 HAVE_DECL_EXP2L=1;
8592 HAVE_DECL_EXPM1L=1;
8593 HAVE_DECL_FLOORF=1;
8594 HAVE_DECL_FLOORL=1;
8595 HAVE_DECL_FREXPL=1;
8596 HAVE_DECL_LDEXPL=1;
8597 HAVE_DECL_LOGL=1;
8598 HAVE_DECL_LOG10L=1;
8599 HAVE_DECL_LOG2=1;
8600 HAVE_DECL_LOG2F=1;
8601 HAVE_DECL_LOG2L=1;
8602 HAVE_DECL_LOGB=1;
8603 HAVE_DECL_REMAINDER=1;
8604 HAVE_DECL_REMAINDERL=1;
8605 HAVE_DECL_RINTF=1;
8606 HAVE_DECL_ROUND=1;
8607 HAVE_DECL_ROUNDF=1;
8608 HAVE_DECL_ROUNDL=1;
8609 HAVE_DECL_SINL=1;
8610 HAVE_DECL_SQRTL=1;
8611 HAVE_DECL_TANL=1;
8612 HAVE_DECL_TRUNC=1;
8613 HAVE_DECL_TRUNCF=1;
8614 HAVE_DECL_TRUNCL=1;
8615 REPLACE_CBRTF=0;
8616 REPLACE_CBRTL=0;
8617 REPLACE_CEIL=0;
8618 REPLACE_CEILF=0;
8619 REPLACE_CEILL=0;
8620 REPLACE_EXPM1=0;
8621 REPLACE_EXPM1F=0;
8622 REPLACE_EXP2=0;
8623 REPLACE_EXP2L=0;
8624 REPLACE_FABSL=0;
8625 REPLACE_FLOOR=0;
8626 REPLACE_FLOORF=0;
8627 REPLACE_FLOORL=0;
8628 REPLACE_FMA=0;
8629 REPLACE_FMAF=0;
8630 REPLACE_FMAL=0;
8631 REPLACE_FMOD=0;
8632 REPLACE_FMODF=0;
8633 REPLACE_FMODL=0;
8634 REPLACE_FREXPF=0;
8635 REPLACE_FREXP=0;
8636 REPLACE_FREXPL=0;
8637 REPLACE_HUGE_VAL=0;
8638 REPLACE_HYPOT=0;
8639 REPLACE_HYPOTF=0;
8640 REPLACE_HYPOTL=0;
8641 REPLACE_ILOGB=0;
8642 REPLACE_ILOGBF=0;
8643 REPLACE_ISFINITE=0;
8644 REPLACE_ISINF=0;
8645 REPLACE_ISNAN=0;
8646 REPLACE_LDEXPL=0;
8647 REPLACE_LOG=0;
8648 REPLACE_LOGF=0;
8649 REPLACE_LOGL=0;
8650 REPLACE_LOG10=0;
8651 REPLACE_LOG10F=0;
8652 REPLACE_LOG10L=0;
8653 REPLACE_LOG1P=0;
8654 REPLACE_LOG1PF=0;
8655 REPLACE_LOG1PL=0;
8656 REPLACE_LOG2=0;
8657 REPLACE_LOG2F=0;
8658 REPLACE_LOG2L=0;
8659 REPLACE_LOGB=0;
8660 REPLACE_LOGBF=0;
8661 REPLACE_LOGBL=0;
8662 REPLACE_MODF=0;
8663 REPLACE_MODFF=0;
8664 REPLACE_MODFL=0;
8665 REPLACE_NAN=0;
8666 REPLACE_REMAINDER=0;
8667 REPLACE_REMAINDERF=0;
8668 REPLACE_REMAINDERL=0;
8669 REPLACE_ROUND=0;
8670 REPLACE_ROUNDF=0;
8671 REPLACE_ROUNDL=0;
8672 REPLACE_SIGNBIT=0;
8673 REPLACE_SIGNBIT_USING_GCC=0;
8674 REPLACE_SQRTL=0;
8675 REPLACE_TRUNC=0;
8676 REPLACE_TRUNCF=0;
8677 REPLACE_TRUNCL=0;
88b48903 8678
472fa5ee 8679
5e8754f9
SDJ
8680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
8681$as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
8682if ${gl_cv_func_frexp_no_libm+:} false; then :
7a6dbc2f 8683 $as_echo_n "(cached) " >&6
4a626d0a 8684else
88b48903 8685
5e8754f9 8686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7a6dbc2f
SDJ
8687/* end confdefs.h. */
8688#include <math.h>
5e8754f9 8689 double x;
7a6dbc2f
SDJ
8690int
8691main ()
8692{
5e8754f9 8693int e; return frexp (x, &e) > 0;
7a6dbc2f
SDJ
8694 ;
8695 return 0;
8696}
4a626d0a 8697_ACEOF
7a6dbc2f 8698if ac_fn_c_try_link "$LINENO"; then :
5e8754f9 8699 gl_cv_func_frexp_no_libm=yes
7a6dbc2f 8700else
5e8754f9 8701 gl_cv_func_frexp_no_libm=no
7a6dbc2f
SDJ
8702fi
8703rm -f core conftest.err conftest.$ac_objext \
8704 conftest$ac_exeext conftest.$ac_ext
88b48903 8705
7a6dbc2f 8706fi
5e8754f9
SDJ
8707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
8708$as_echo "$gl_cv_func_frexp_no_libm" >&6; }
88b48903 8709
472fa5ee 8710
5e8754f9
SDJ
8711 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
8712if test "x$ac_cv_have_decl_alarm" = xyes; then :
8713 ac_have_decl=1
7a6dbc2f 8714else
5e8754f9
SDJ
8715 ac_have_decl=0
8716fi
7a6dbc2f 8717
5e8754f9
SDJ
8718cat >>confdefs.h <<_ACEOF
8719#define HAVE_DECL_ALARM $ac_have_decl
8720_ACEOF
7a6dbc2f 8721
7a6dbc2f 8722
5e8754f9
SDJ
8723
8724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
8725$as_echo_n "checking whether long double and double are the same... " >&6; }
8726if ${gl_cv_long_double_equals_double+:} false; then :
8727 $as_echo_n "(cached) " >&6
88b48903
WN
8728else
8729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8730/* end confdefs.h. */
8731#include <float.h>
5e8754f9
SDJ
8732int
8733main ()
88b48903 8734{
5e8754f9
SDJ
8735typedef int check[sizeof (long double) == sizeof (double)
8736 && LDBL_MANT_DIG == DBL_MANT_DIG
8737 && LDBL_MAX_EXP == DBL_MAX_EXP
8738 && LDBL_MIN_EXP == DBL_MIN_EXP
8739 ? 1 : -1];
8740
8741 ;
8742 return 0;
88b48903
WN
8743}
8744_ACEOF
5e8754f9
SDJ
8745if ac_fn_c_try_compile "$LINENO"; then :
8746 gl_cv_long_double_equals_double=yes
88b48903 8747else
5e8754f9 8748 gl_cv_long_double_equals_double=no
88b48903 8749fi
5e8754f9 8750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
88b48903
WN
8751
8752fi
5e8754f9
SDJ
8753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
8754$as_echo "$gl_cv_long_double_equals_double" >&6; }
8755 if test $gl_cv_long_double_equals_double = yes; then
7a6dbc2f 8756
5e8754f9 8757$as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
7a6dbc2f 8758
5e8754f9
SDJ
8759 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
8760 else
8761 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
88b48903
WN
8762 fi
8763
8764
4a626d0a 8765
6ec2e0f5
SDJ
8766 GNULIB_FCHMODAT=0;
8767 GNULIB_FSTAT=0;
8768 GNULIB_FSTATAT=0;
8769 GNULIB_FUTIMENS=0;
8770 GNULIB_LCHMOD=0;
8771 GNULIB_LSTAT=0;
8772 GNULIB_MKDIRAT=0;
8773 GNULIB_MKFIFO=0;
8774 GNULIB_MKFIFOAT=0;
8775 GNULIB_MKNOD=0;
8776 GNULIB_MKNODAT=0;
8777 GNULIB_STAT=0;
8778 GNULIB_UTIMENSAT=0;
8779 HAVE_FCHMODAT=1;
8780 HAVE_FSTATAT=1;
8781 HAVE_FUTIMENS=1;
8782 HAVE_LCHMOD=1;
8783 HAVE_LSTAT=1;
8784 HAVE_MKDIRAT=1;
8785 HAVE_MKFIFO=1;
8786 HAVE_MKFIFOAT=1;
8787 HAVE_MKNOD=1;
8788 HAVE_MKNODAT=1;
8789 HAVE_UTIMENSAT=1;
8790 REPLACE_FSTAT=0;
8791 REPLACE_FSTATAT=0;
8792 REPLACE_FUTIMENS=0;
8793 REPLACE_LSTAT=0;
8794 REPLACE_MKDIR=0;
8795 REPLACE_MKFIFO=0;
8796 REPLACE_MKNOD=0;
8797 REPLACE_STAT=0;
8798 REPLACE_UTIMENSAT=0;
8799
8800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
8801$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
d0ac1c44 8802if ${ac_cv_header_stat_broken+:} false; then :
6ec2e0f5
SDJ
8803 $as_echo_n "(cached) " >&6
8804else
8805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8806/* end confdefs.h. */
8807#include <sys/types.h>
8808#include <sys/stat.h>
8809
8810#if defined S_ISBLK && defined S_IFDIR
8811extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
8812#endif
8813
8814#if defined S_ISBLK && defined S_IFCHR
8815extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
8816#endif
8817
8818#if defined S_ISLNK && defined S_IFREG
8819extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
8820#endif
8821
8822#if defined S_ISSOCK && defined S_IFREG
8823extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
8824#endif
4a626d0a 8825
4a626d0a
PA
8826_ACEOF
8827if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5
SDJ
8828 ac_cv_header_stat_broken=no
8829else
8830 ac_cv_header_stat_broken=yes
4a626d0a
PA
8831fi
8832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
8833fi
8834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
8835$as_echo "$ac_cv_header_stat_broken" >&6; }
8836if test $ac_cv_header_stat_broken = yes; then
8837
8838$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
4a626d0a
PA
8839
8840fi
4a626d0a 8841
4a626d0a
PA
8842
8843
4a626d0a
PA
8844
8845
472fa5ee
SM
8846
8847
8848
6ec2e0f5
SDJ
8849 case "$host_os" in
8850 mingw*)
8851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
8852$as_echo_n "checking for 64-bit off_t... " >&6; }
d0ac1c44 8853if ${gl_cv_type_off_t_64+:} false; then :
6ec2e0f5
SDJ
8854 $as_echo_n "(cached) " >&6
8855else
8856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8857/* end confdefs.h. */
8858#include <sys/types.h>
8859 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
8860
8861int
8862main ()
8863{
8864
8865 ;
8866 return 0;
8867}
8868_ACEOF
8869if ac_fn_c_try_compile "$LINENO"; then :
8870 gl_cv_type_off_t_64=yes
8871else
8872 gl_cv_type_off_t_64=no
8873fi
8874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4a626d0a 8875
6ec2e0f5
SDJ
8876fi
8877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
8878$as_echo "$gl_cv_type_off_t_64" >&6; }
8879 if test $gl_cv_type_off_t_64 = no; then
8880 WINDOWS_64_BIT_OFF_T=1
8881 else
7a6dbc2f
SDJ
8882 WINDOWS_64_BIT_OFF_T=0
8883 fi
5e8754f9 8884 WINDOWS_64_BIT_ST_SIZE=1
6ec2e0f5
SDJ
8885 ;;
8886 *)
8887 WINDOWS_64_BIT_OFF_T=0
8888 WINDOWS_64_BIT_ST_SIZE=0
8889 ;;
8890 esac
4a626d0a
PA
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
472fa5ee
SM
8903 :
8904
8905
8906
8907
8908
4a626d0a
PA
8909
8910
8911
8912 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 8913 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
4a626d0a 8914 else
6ec2e0f5
SDJ
8915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
8916$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
d0ac1c44 8917if ${gl_cv_next_sys_stat_h+:} false; then :
4a626d0a
PA
8918 $as_echo_n "(cached) " >&6
8919else
8920
6ec2e0f5 8921 if test $ac_cv_header_sys_stat_h = yes; then
4a626d0a
PA
8922
8923
8924
8925
8926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8927/* end confdefs.h. */
6ec2e0f5 8928#include <sys/stat.h>
4a626d0a
PA
8929_ACEOF
8930 case "$host_os" in
8931 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8932 *) gl_absname_cpp="$ac_cpp" ;;
8933 esac
8934
8935 case "$host_os" in
8936 mingw*)
8937 gl_dirsep_regex='[/\\]'
8938 ;;
8939 *)
8940 gl_dirsep_regex='\/'
8941 ;;
8942 esac
8943 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 8944 gl_header_literal_regex=`echo 'sys/stat.h' \
4a626d0a
PA
8945 | sed -e "$gl_make_literal_regex_sed"`
8946 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8947 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8948 s|^/[^/]|//&|
8949 p
8950 q
8951 }'
8952
6ec2e0f5 8953 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a
PA
8954 sed -n "$gl_absolute_header_sed"`
8955
6ec2e0f5
SDJ
8956 gl_header=$gl_cv_absolute_sys_stat_h
8957 gl_cv_next_sys_stat_h='"'$gl_header'"'
4a626d0a 8958 else
6ec2e0f5 8959 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
4a626d0a
PA
8960 fi
8961
8962
8963fi
6ec2e0f5
SDJ
8964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
8965$as_echo "$gl_cv_next_sys_stat_h" >&6; }
4a626d0a 8966 fi
6ec2e0f5 8967 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
4a626d0a
PA
8968
8969 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8970 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 8971 gl_next_as_first_directive='<'sys/stat.h'>'
4a626d0a
PA
8972 else
8973 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 8974 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
4a626d0a 8975 fi
6ec2e0f5 8976 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
4a626d0a
PA
8977
8978
8979
8980
8981
4a626d0a
PA
8982
8983
8984
8985
8986
4a626d0a 8987
5e8754f9 8988 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
4a626d0a 8989
5e8754f9 8990$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
4a626d0a 8991
5e8754f9 8992 fi
4a626d0a 8993
6ec2e0f5
SDJ
8994 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
8995 #include <sys/stat.h>
8996"
d0ac1c44 8997if test "x$ac_cv_type_nlink_t" = xyes; then :
6ec2e0f5
SDJ
8998
8999else
4a626d0a 9000
6ec2e0f5
SDJ
9001$as_echo "#define nlink_t int" >>confdefs.h
9002
9003fi
9004
9005
9006
5e8754f9
SDJ
9007 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
9008 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
9009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
9010$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
9011if eval \${$as_gl_Symbol+:} false; then :
9012 $as_echo_n "(cached) " >&6
9013else
9014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9015/* end confdefs.h. */
9016#include <sys/stat.h>
9017
9018int
9019main ()
9020{
9021#undef $gl_func
9022 (void) $gl_func;
9023 ;
9024 return 0;
9025}
9026_ACEOF
9027if ac_fn_c_try_compile "$LINENO"; then :
9028 eval "$as_gl_Symbol=yes"
9029else
9030 eval "$as_gl_Symbol=no"
9031fi
9032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9033fi
9034eval ac_res=\$$as_gl_Symbol
9035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9036$as_echo "$ac_res" >&6; }
9037 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
9038 cat >>confdefs.h <<_ACEOF
9039#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
9040_ACEOF
4a626d0a 9041
5e8754f9
SDJ
9042 eval ac_cv_have_decl_$gl_func=yes
9043fi
9044 done
6ec2e0f5
SDJ
9045
9046
9047
5e8754f9 9048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
6ec2e0f5 9049$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
d0ac1c44 9050if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
4a626d0a
PA
9051 $as_echo_n "(cached) " >&6
9052else
6ec2e0f5
SDJ
9053 rm -f conftest.sym conftest.file
9054 echo >conftest.file
9055 if test "$cross_compiling" = yes; then :
9056 case "$host_os" in
5e8754f9 9057 *-gnu*)
6ec2e0f5
SDJ
9058 # Guess yes on glibc systems.
9059 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
9060 *)
9061 # If we don't know, assume the worst.
9062 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
9063 esac
4a626d0a 9064
6ec2e0f5
SDJ
9065else
9066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9067/* end confdefs.h. */
9068$ac_includes_default
4a626d0a
PA
9069int
9070main ()
9071{
6ec2e0f5
SDJ
9072struct stat sbuf;
9073 if (symlink ("conftest.file", "conftest.sym") != 0)
9074 return 1;
9075 /* Linux will dereference the symlink and fail, as required by
9076 POSIX. That is better in the sense that it means we will not
9077 have to compile and use the lstat wrapper. */
9078 return lstat ("conftest.sym/", &sbuf) == 0;
4a626d0a
PA
9079
9080 ;
9081 return 0;
9082}
9083_ACEOF
6ec2e0f5
SDJ
9084if ac_fn_c_try_run "$LINENO"; then :
9085 gl_cv_func_lstat_dereferences_slashed_symlink=yes
4a626d0a 9086else
6ec2e0f5
SDJ
9087 gl_cv_func_lstat_dereferences_slashed_symlink=no
9088fi
9089rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9090 conftest.$ac_objext conftest.beam conftest.$ac_ext
4a626d0a 9091fi
6ec2e0f5
SDJ
9092
9093 rm -f conftest.sym conftest.file
4a626d0a
PA
9094
9095fi
6ec2e0f5
SDJ
9096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
9097$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
9098 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
9099 *yes)
4a626d0a 9100
6ec2e0f5
SDJ
9101cat >>confdefs.h <<_ACEOF
9102#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
9103_ACEOF
4a626d0a 9104
6ec2e0f5
SDJ
9105 ;;
9106 esac
9107
9108
9109
9110
9111
472fa5ee
SM
9112
9113
9114
9115 :
9116
9117
9118
9119
9120
6ec2e0f5
SDJ
9121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
9122$as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
d0ac1c44 9123if ${gl_cv_func_getcwd_null+:} false; then :
4a626d0a 9124 $as_echo_n "(cached) " >&6
6ec2e0f5
SDJ
9125else
9126 if test "$cross_compiling" = yes; then :
9127 case "$host_os" in
5e8754f9
SDJ
9128 # Guess yes on glibc systems.
9129 *-gnu*) gl_cv_func_getcwd_null="guessing yes";;
9130 # Guess yes on Cygwin.
9131 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
9132 # If we don't know, assume the worst.
9133 *) gl_cv_func_getcwd_null="guessing no";;
6ec2e0f5
SDJ
9134 esac
9135
4a626d0a
PA
9136else
9137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9138/* end confdefs.h. */
9139
6ec2e0f5
SDJ
9140# include <stdlib.h>
9141# if HAVE_UNISTD_H
9142# include <unistd.h>
9143# else /* on Windows with MSVC */
9144# include <direct.h>
9145# endif
9146# ifndef getcwd
9147 char *getcwd ();
9148# endif
9149
9150int
9151main ()
9152{
9153
5e8754f9 9154#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6ec2e0f5
SDJ
9155/* mingw cwd does not start with '/', but getcwd does allocate.
9156 However, mingw fails to honor non-zero size. */
9157#else
9158 if (chdir ("/") != 0)
9159 return 1;
9160 else
9161 {
9162 char *f = getcwd (NULL, 0);
9163 if (! f)
9164 return 2;
9165 if (f[0] != '/')
5e8754f9 9166 return 3;
6ec2e0f5 9167 if (f[1] != '\0')
5e8754f9 9168 return 4;
6ec2e0f5
SDJ
9169 free (f);
9170 return 0;
9171 }
4a626d0a 9172#endif
4a626d0a 9173
6ec2e0f5
SDJ
9174 ;
9175 return 0;
9176}
9177_ACEOF
9178if ac_fn_c_try_run "$LINENO"; then :
9179 gl_cv_func_getcwd_null=yes
9180else
9181 gl_cv_func_getcwd_null=no
9182fi
9183rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9184 conftest.$ac_objext conftest.beam conftest.$ac_ext
9185fi
9186
9187fi
9188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
9189$as_echo "$gl_cv_func_getcwd_null" >&6; }
9190
9191
9192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
9193$as_echo_n "checking for getcwd with POSIX signature... " >&6; }
d0ac1c44 9194if ${gl_cv_func_getcwd_posix_signature+:} false; then :
6ec2e0f5
SDJ
9195 $as_echo_n "(cached) " >&6
9196else
9197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9198/* end confdefs.h. */
9199#include <unistd.h>
4a626d0a
PA
9200int
9201main ()
9202{
6ec2e0f5
SDJ
9203extern
9204 #ifdef __cplusplus
9205 "C"
9206 #endif
9207 char *getcwd (char *, size_t);
9208
4a626d0a
PA
9209 ;
9210 return 0;
9211}
6ec2e0f5 9212
4a626d0a
PA
9213_ACEOF
9214if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 9215 gl_cv_func_getcwd_posix_signature=yes
4a626d0a 9216else
6ec2e0f5 9217 gl_cv_func_getcwd_posix_signature=no
4a626d0a
PA
9218fi
9219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5 9220
4a626d0a 9221fi
6ec2e0f5
SDJ
9222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
9223$as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
9224
472fa5ee
SM
9225
9226 ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
d0ac1c44 9227if test "x$ac_cv_have_decl_getcwd" = xyes; then :
6ec2e0f5
SDJ
9228 ac_have_decl=1
9229else
9230 ac_have_decl=0
9231fi
9232
9233cat >>confdefs.h <<_ACEOF
9234#define HAVE_DECL_GETCWD $ac_have_decl
4a626d0a
PA
9235_ACEOF
9236
6ec2e0f5
SDJ
9237
9238
472fa5ee
SM
9239
9240
9241
9242
9243
9244 ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
d0ac1c44 9245if test "x$ac_cv_have_decl_getdtablesize" = xyes; then :
6ec2e0f5
SDJ
9246 ac_have_decl=1
9247else
9248 ac_have_decl=0
4a626d0a 9249fi
4a626d0a 9250
6ec2e0f5
SDJ
9251cat >>confdefs.h <<_ACEOF
9252#define HAVE_DECL_GETDTABLESIZE $ac_have_decl
9253_ACEOF
9254
472fa5ee
SM
9255
9256
9257 ac_fn_c_check_decl "$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default"
d0ac1c44 9258if test "x$ac_cv_have_decl_getlogin_r" = xyes; then :
6ec2e0f5
SDJ
9259 ac_have_decl=1
9260else
9261 ac_have_decl=0
9262fi
9263
9264cat >>confdefs.h <<_ACEOF
9265#define HAVE_DECL_GETLOGIN_R $ac_have_decl
9266_ACEOF
9267
9268
9269
472fa5ee
SM
9270
9271
9272
9273
9274
9275 ac_fn_c_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default"
d0ac1c44 9276if test "x$ac_cv_have_decl_getlogin" = xyes; then :
6ec2e0f5
SDJ
9277 ac_have_decl=1
9278else
9279 ac_have_decl=0
9280fi
9281
9282cat >>confdefs.h <<_ACEOF
9283#define HAVE_DECL_GETLOGIN $ac_have_decl
9284_ACEOF
9285
9286
9287
9288
7a6dbc2f
SDJ
9289
9290
6ec2e0f5 9291
472fa5ee
SM
9292
9293
9294
9295
9296
6ec2e0f5
SDJ
9297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
9298$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
d0ac1c44 9299if ${ac_cv_c_restrict+:} false; then :
6ec2e0f5
SDJ
9300 $as_echo_n "(cached) " >&6
9301else
9302 ac_cv_c_restrict=no
9303 # The order here caters to the fact that C++ does not require restrict.
9304 for ac_kw in __restrict __restrict__ _Restrict restrict; do
9305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9306/* end confdefs.h. */
9307typedef int *int_ptr;
5e8754f9
SDJ
9308 int foo (int_ptr $ac_kw ip) { return ip[0]; }
9309 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
9310 int bar (int ip[$ac_kw]) { return ip[0]; }
6ec2e0f5
SDJ
9311
9312int
9313main ()
9314{
9315int s[1];
5e8754f9
SDJ
9316 int *$ac_kw t = s;
9317 t[0] = 0;
9318 return foo (t) + bar (t);
6ec2e0f5
SDJ
9319
9320 ;
9321 return 0;
9322}
9323_ACEOF
9324if ac_fn_c_try_compile "$LINENO"; then :
9325 ac_cv_c_restrict=$ac_kw
9326fi
9327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9328 test "$ac_cv_c_restrict" != no && break
9329 done
9330
9331fi
9332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
9333$as_echo "$ac_cv_c_restrict" >&6; }
9334
9335 case $ac_cv_c_restrict in
9336 restrict) ;;
9337 no) $as_echo "#define restrict /**/" >>confdefs.h
9338 ;;
9339 *) cat >>confdefs.h <<_ACEOF
9340#define restrict $ac_cv_c_restrict
9341_ACEOF
9342 ;;
9343 esac
4a626d0a
PA
9344
9345
5e8754f9
SDJ
9346 GNULIB_GETTIMEOFDAY=0;
9347 HAVE_GETTIMEOFDAY=1;
9348 HAVE_STRUCT_TIMEVAL=1;
9349 HAVE_SYS_TIME_H=1;
9350 HAVE_TIMEZONE_T=0;
9351 REPLACE_GETTIMEOFDAY=0;
9352 REPLACE_STRUCT_TIMEVAL=0;
9353
9354
4a626d0a
PA
9355
9356
88b48903 9357
49e4877c
PA
9358
9359
9360
9361
9362
472fa5ee
SM
9363 :
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375 :
9376
9377
49e4877c
PA
9378
9379
9380
9381
9382
9383
9384 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 9385 gl_cv_next_sys_time_h='<'sys/time.h'>'
49e4877c 9386 else
6ec2e0f5
SDJ
9387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
9388$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
d0ac1c44 9389if ${gl_cv_next_sys_time_h+:} false; then :
49e4877c
PA
9390 $as_echo_n "(cached) " >&6
9391else
9392
6ec2e0f5 9393 if test $ac_cv_header_sys_time_h = yes; then
49e4877c
PA
9394
9395
9396
9397
9398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9399/* end confdefs.h. */
6ec2e0f5 9400#include <sys/time.h>
49e4877c
PA
9401_ACEOF
9402 case "$host_os" in
9403 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9404 *) gl_absname_cpp="$ac_cpp" ;;
9405 esac
9406
9407 case "$host_os" in
9408 mingw*)
9409 gl_dirsep_regex='[/\\]'
9410 ;;
9411 *)
9412 gl_dirsep_regex='\/'
9413 ;;
9414 esac
9415 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 9416 gl_header_literal_regex=`echo 'sys/time.h' \
49e4877c
PA
9417 | sed -e "$gl_make_literal_regex_sed"`
9418 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9419 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9420 s|^/[^/]|//&|
9421 p
9422 q
9423 }'
9424
6ec2e0f5 9425 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
49e4877c
PA
9426 sed -n "$gl_absolute_header_sed"`
9427
6ec2e0f5
SDJ
9428 gl_header=$gl_cv_absolute_sys_time_h
9429 gl_cv_next_sys_time_h='"'$gl_header'"'
49e4877c 9430 else
6ec2e0f5 9431 gl_cv_next_sys_time_h='<'sys/time.h'>'
49e4877c
PA
9432 fi
9433
9434
9435fi
6ec2e0f5
SDJ
9436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
9437$as_echo "$gl_cv_next_sys_time_h" >&6; }
49e4877c 9438 fi
6ec2e0f5 9439 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
49e4877c
PA
9440
9441 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9442 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 9443 gl_next_as_first_directive='<'sys/time.h'>'
49e4877c
PA
9444 else
9445 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 9446 gl_next_as_first_directive=$gl_cv_next_sys_time_h
49e4877c 9447 fi
6ec2e0f5 9448 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
49e4877c
PA
9449
9450
9451
9452
9453
6ec2e0f5
SDJ
9454 if test $ac_cv_header_sys_time_h != yes; then
9455 HAVE_SYS_TIME_H=0
9456 fi
9457
9458
9459
9460
9461
472fa5ee
SM
9462 :
9463
9464
9465
9466
9467
6ec2e0f5
SDJ
9468 if test $ac_cv_header_sys_socket_h != yes; then
9469 for ac_header in winsock2.h
9470do :
9471 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
d0ac1c44 9472if test "x$ac_cv_header_winsock2_h" = xyes; then :
6ec2e0f5
SDJ
9473 cat >>confdefs.h <<_ACEOF
9474#define HAVE_WINSOCK2_H 1
9475_ACEOF
9476
9477fi
9478
9479done
9480
9481 fi
9482 if test "$ac_cv_header_winsock2_h" = yes; then
9483 HAVE_WINSOCK2_H=1
9484 UNISTD_H_HAVE_WINSOCK2_H=1
9485 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
9486 else
9487 HAVE_WINSOCK2_H=0
9488 fi
9489
9490
9491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
9492$as_echo_n "checking for struct timeval... " >&6; }
d0ac1c44 9493if ${gl_cv_sys_struct_timeval+:} false; then :
6ec2e0f5
SDJ
9494 $as_echo_n "(cached) " >&6
9495else
9496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9497/* end confdefs.h. */
9498#if HAVE_SYS_TIME_H
9499 #include <sys/time.h>
9500 #endif
9501 #include <time.h>
9502 #if HAVE_WINSOCK2_H
9503 # include <winsock2.h>
9504 #endif
9505
49e4877c
PA
9506int
9507main ()
9508{
6ec2e0f5 9509static struct timeval x; x.tv_sec = x.tv_usec;
49e4877c
PA
9510 ;
9511 return 0;
9512}
9513_ACEOF
9514if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 9515 gl_cv_sys_struct_timeval=yes
49e4877c 9516else
6ec2e0f5 9517 gl_cv_sys_struct_timeval=no
49e4877c
PA
9518fi
9519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49e4877c 9520
49e4877c 9521fi
6ec2e0f5
SDJ
9522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
9523$as_echo "$gl_cv_sys_struct_timeval" >&6; }
9524 if test $gl_cv_sys_struct_timeval != yes; then
9525 HAVE_STRUCT_TIMEVAL=0
9526 else
9527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
9528$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
d0ac1c44 9529if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
8690e634
JK
9530 $as_echo_n "(cached) " >&6
9531else
6ec2e0f5 9532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 9533/* end confdefs.h. */
6ec2e0f5
SDJ
9534#if HAVE_SYS_TIME_H
9535 #include <sys/time.h>
9536 #endif
9537 #include <time.h>
9538 #if HAVE_WINSOCK2_H
9539 # include <winsock2.h>
9540 #endif
8690e634 9541
8690e634
JK
9542int
9543main ()
9544{
6ec2e0f5
SDJ
9545static struct timeval x;
9546 typedef int verify_tv_sec_type[
9547 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
9548 ];
9549
8690e634
JK
9550 ;
9551 return 0;
9552}
8690e634 9553_ACEOF
6ec2e0f5
SDJ
9554if ac_fn_c_try_compile "$LINENO"; then :
9555 gl_cv_sys_struct_timeval_tv_sec=yes
8690e634 9556else
6ec2e0f5 9557 gl_cv_sys_struct_timeval_tv_sec=no
8690e634 9558fi
6ec2e0f5 9559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 9560
6ec2e0f5 9561fi
725e2999
JB
9562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
9563$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
9564 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
9565 REPLACE_STRUCT_TIMEVAL=1
9566 fi
9567 fi
9568
9569
9570 for gl_func in gettimeofday; do
9571 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
9572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
9573$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
9574if eval \${$as_gl_Symbol+:} false; then :
9575 $as_echo_n "(cached) " >&6
9576else
9577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9578/* end confdefs.h. */
9579
9580#if HAVE_SYS_TIME_H
9581# include <sys/time.h>
9582#endif
9583#include <time.h>
9584
9585int
9586main ()
9587{
9588#undef $gl_func
9589 (void) $gl_func;
9590 ;
9591 return 0;
9592}
9593_ACEOF
9594if ac_fn_c_try_compile "$LINENO"; then :
9595 eval "$as_gl_Symbol=yes"
9596else
9597 eval "$as_gl_Symbol=no"
9598fi
9599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9600fi
9601eval ac_res=\$$as_gl_Symbol
9602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9603$as_echo "$ac_res" >&6; }
9604 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
9605 cat >>confdefs.h <<_ACEOF
9606#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
9607_ACEOF
9608
9609 eval ac_cv_have_decl_$gl_func=yes
9610fi
9611 done
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638 GNULIB_SOCKET=0;
9639 GNULIB_CONNECT=0;
9640 GNULIB_ACCEPT=0;
9641 GNULIB_BIND=0;
9642 GNULIB_GETPEERNAME=0;
9643 GNULIB_GETSOCKNAME=0;
9644 GNULIB_GETSOCKOPT=0;
9645 GNULIB_LISTEN=0;
9646 GNULIB_RECV=0;
9647 GNULIB_SEND=0;
9648 GNULIB_RECVFROM=0;
9649 GNULIB_SENDTO=0;
9650 GNULIB_SETSOCKOPT=0;
9651 GNULIB_SHUTDOWN=0;
9652 GNULIB_ACCEPT4=0;
9653 HAVE_STRUCT_SOCKADDR_STORAGE=1;
9654 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
9655
9656 HAVE_SA_FAMILY_T=1;
9657 HAVE_ACCEPT4=1;
9658
9659
9660 :
9661
9662
9663
9664
9665
9666 if test $ac_cv_header_sys_socket_h = no; then
9667 for ac_header in ws2tcpip.h
9668do :
9669 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
9670if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
9671 cat >>confdefs.h <<_ACEOF
9672#define HAVE_WS2TCPIP_H 1
9673_ACEOF
9674
9675fi
9676
9677done
9678
9679 fi
9680
9681
9682
9683
9684
9685 case "$host_os" in
9686 osf*)
9687
9688$as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h
9689
9690 ;;
9691 esac
9692
9693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
9694$as_echo_n "checking whether <sys/socket.h> is self-contained... " >&6; }
9695if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then :
9696 $as_echo_n "(cached) " >&6
9697else
9698
9699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9700/* end confdefs.h. */
9701#include <sys/socket.h>
9702int
9703main ()
9704{
9705
9706 ;
9707 return 0;
9708}
9709_ACEOF
9710if ac_fn_c_try_compile "$LINENO"; then :
9711 gl_cv_header_sys_socket_h_selfcontained=yes
9712else
9713 gl_cv_header_sys_socket_h_selfcontained=no
9714fi
9715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9716
9717fi
9718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
9719$as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
9720 if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
9721 for ac_func in shutdown
9722do :
9723 ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
9724if test "x$ac_cv_func_shutdown" = xyes; then :
9725 cat >>confdefs.h <<_ACEOF
9726#define HAVE_SHUTDOWN 1
9727_ACEOF
9728
9729fi
9730done
9731
9732 if test $ac_cv_func_shutdown = yes; then
9733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
9734$as_echo_n "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
9735if ${gl_cv_header_sys_socket_h_shut+:} false; then :
9736 $as_echo_n "(cached) " >&6
9737else
9738
9739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9740/* end confdefs.h. */
9741#include <sys/socket.h>
9742int
9743main ()
9744{
9745int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
9746 ;
9747 return 0;
9748}
9749_ACEOF
9750if ac_fn_c_try_compile "$LINENO"; then :
9751 gl_cv_header_sys_socket_h_shut=yes
9752else
9753 gl_cv_header_sys_socket_h_shut=no
9754fi
9755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9756
9757fi
9758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
9759$as_echo "$gl_cv_header_sys_socket_h_shut" >&6; }
9760 if test $gl_cv_header_sys_socket_h_shut = no; then
9761 SYS_SOCKET_H='sys/socket.h'
9762 fi
9763 fi
9764 fi
9765 # We need to check for ws2tcpip.h now.
9766
9767
9768
9769
9770
9771
9772
9773
9774 :
9775
9776
9777
9778
9779
9780
9781
9782
9783 if test $gl_cv_have_include_next = yes; then
9784 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
9785 else
9786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
9787$as_echo_n "checking absolute name of <sys/socket.h>... " >&6; }
9788if ${gl_cv_next_sys_socket_h+:} false; then :
9789 $as_echo_n "(cached) " >&6
9790else
9791
9792 if test $ac_cv_header_sys_socket_h = yes; then
9793
9794
9795
9796
9797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9798/* end confdefs.h. */
9799#include <sys/socket.h>
9800_ACEOF
9801 case "$host_os" in
9802 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9803 *) gl_absname_cpp="$ac_cpp" ;;
9804 esac
9805
9806 case "$host_os" in
9807 mingw*)
9808 gl_dirsep_regex='[/\\]'
9809 ;;
9810 *)
9811 gl_dirsep_regex='\/'
9812 ;;
9813 esac
9814 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9815 gl_header_literal_regex=`echo 'sys/socket.h' \
9816 | sed -e "$gl_make_literal_regex_sed"`
9817 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9818 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9819 s|^/[^/]|//&|
9820 p
9821 q
9822 }'
9823
9824 gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9825 sed -n "$gl_absolute_header_sed"`
9826
9827 gl_header=$gl_cv_absolute_sys_socket_h
9828 gl_cv_next_sys_socket_h='"'$gl_header'"'
9829 else
9830 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
9831 fi
9832
9833
9834fi
9835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
9836$as_echo "$gl_cv_next_sys_socket_h" >&6; }
9837 fi
9838 NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
9839
9840 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9841 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9842 gl_next_as_first_directive='<'sys/socket.h'>'
9843 else
9844 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9845 gl_next_as_first_directive=$gl_cv_next_sys_socket_h
9846 fi
9847 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
9848
9849
9850
9851
9852 if test $ac_cv_header_sys_socket_h = yes; then
9853 HAVE_SYS_SOCKET_H=1
9854 HAVE_WS2TCPIP_H=0
9855 else
9856 HAVE_SYS_SOCKET_H=0
9857 if test $ac_cv_header_ws2tcpip_h = yes; then
9858 HAVE_WS2TCPIP_H=1
9859 else
9860 HAVE_WS2TCPIP_H=0
9861 fi
9862 fi
9863
9864
9865
9866 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
9867 /* sys/types.h is not needed according to POSIX, but the
9868 sys/socket.h in i386-unknown-freebsd4.10 and
9869 powerpc-apple-darwin5.5 required it. */
9870#include <sys/types.h>
9871#ifdef HAVE_SYS_SOCKET_H
9872#include <sys/socket.h>
9873#endif
9874#ifdef HAVE_WS2TCPIP_H
9875#include <ws2tcpip.h>
9876#endif
9877
9878"
9879if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
9880
9881cat >>confdefs.h <<_ACEOF
9882#define HAVE_STRUCT_SOCKADDR_STORAGE 1
9883_ACEOF
9884
9885
9886fi
9887ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
9888 /* sys/types.h is not needed according to POSIX, but the
9889 sys/socket.h in i386-unknown-freebsd4.10 and
9890 powerpc-apple-darwin5.5 required it. */
9891#include <sys/types.h>
9892#ifdef HAVE_SYS_SOCKET_H
9893#include <sys/socket.h>
9894#endif
9895#ifdef HAVE_WS2TCPIP_H
9896#include <ws2tcpip.h>
9897#endif
9898
9899"
9900if test "x$ac_cv_type_sa_family_t" = xyes; then :
9901
9902cat >>confdefs.h <<_ACEOF
9903#define HAVE_SA_FAMILY_T 1
9904_ACEOF
9905
9906
9907fi
9908
9909 if test $ac_cv_type_struct_sockaddr_storage = no; then
9910 HAVE_STRUCT_SOCKADDR_STORAGE=0
9911 fi
9912 if test $ac_cv_type_sa_family_t = no; then
9913 HAVE_SA_FAMILY_T=0
9914 fi
9915 if test $ac_cv_type_struct_sockaddr_storage != no; then
9916 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
9917 #ifdef HAVE_SYS_SOCKET_H
9918 #include <sys/socket.h>
9919 #endif
9920 #ifdef HAVE_WS2TCPIP_H
9921 #include <ws2tcpip.h>
9922 #endif
9923
9924"
9925if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
9926
9927cat >>confdefs.h <<_ACEOF
9928#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
9929_ACEOF
9930
9931
9932else
9933 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
9934fi
9935
9936 fi
9937 if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
9938 || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
9939 SYS_SOCKET_H='sys/socket.h'
9940 fi
9941
9942
9943
9944
9945 :
9946
9947
9948
9949
9950
9951 if test $ac_cv_header_sys_socket_h != yes; then
9952 for ac_header in winsock2.h
9953do :
9954 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
9955if test "x$ac_cv_header_winsock2_h" = xyes; then :
9956 cat >>confdefs.h <<_ACEOF
9957#define HAVE_WINSOCK2_H 1
9958_ACEOF
9959
9960fi
9961
9962done
9963
9964 fi
9965 if test "$ac_cv_header_winsock2_h" = yes; then
9966 HAVE_WINSOCK2_H=1
9967 UNISTD_H_HAVE_WINSOCK2_H=1
9968 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
9969 else
9970 HAVE_WINSOCK2_H=0
8690e634
JK
9971 fi
9972
9973
725e2999
JB
9974
9975
9976 for gl_func in socket connect accept bind getpeername getsockname getsockopt listen recv send recvfrom sendto setsockopt shutdown accept4; do
5e8754f9
SDJ
9977 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
9978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
9979$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
9980if eval \${$as_gl_Symbol+:} false; then :
8690e634 9981 $as_echo_n "(cached) " >&6
8690e634
JK
9982else
9983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9984/* end confdefs.h. */
7a6dbc2f 9985
725e2999
JB
9986/* Some systems require prerequisite headers. */
9987#include <sys/types.h>
9988#include <sys/socket.h>
8690e634 9989
5e8754f9
SDJ
9990int
9991main ()
9992{
9993#undef $gl_func
9994 (void) $gl_func;
9995 ;
9996 return 0;
9997}
9998_ACEOF
9999if ac_fn_c_try_compile "$LINENO"; then :
10000 eval "$as_gl_Symbol=yes"
7a6dbc2f 10001else
5e8754f9
SDJ
10002 eval "$as_gl_Symbol=no"
10003fi
10004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 10005fi
5e8754f9
SDJ
10006eval ac_res=\$$as_gl_Symbol
10007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10008$as_echo "$ac_res" >&6; }
10009 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
10010 cat >>confdefs.h <<_ACEOF
10011#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
10012_ACEOF
7a6dbc2f 10013
5e8754f9
SDJ
10014 eval ac_cv_have_decl_$gl_func=yes
10015fi
10016 done
8690e634 10017
8690e634 10018
8690e634
JK
10019
10020
10021
10022
10023
10024
88b48903 10025
8690e634 10026
725e2999
JB
10027 :
10028
10029
10030
8690e634 10031
8690e634
JK
10032
10033
725e2999
JB
10034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
10035$as_echo_n "checking for IPv4 sockets... " >&6; }
10036 if ${gl_cv_socket_ipv4+:} false; then :
10037 $as_echo_n "(cached) " >&6
10038else
10039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10040/* end confdefs.h. */
10041#include <sys/types.h>
10042#ifdef HAVE_SYS_SOCKET_H
10043#include <sys/socket.h>
10044#endif
10045#ifdef HAVE_NETINET_IN_H
10046#include <netinet/in.h>
10047#endif
10048#ifdef HAVE_WINSOCK2_H
10049#include <winsock2.h>
10050#endif
10051int
10052main ()
10053{
10054int x = AF_INET; struct in_addr y; struct sockaddr_in z;
10055 if (&x && &y && &z) return 0;
10056 ;
10057 return 0;
10058}
10059_ACEOF
10060if ac_fn_c_try_compile "$LINENO"; then :
10061 gl_cv_socket_ipv4=yes
10062else
10063 gl_cv_socket_ipv4=no
10064fi
10065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10066fi
10067
10068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
10069$as_echo "$gl_cv_socket_ipv4" >&6; }
10070 if test $gl_cv_socket_ipv4 = yes; then
8690e634 10071
725e2999 10072$as_echo "#define HAVE_IPV4 1" >>confdefs.h
8690e634 10073
725e2999 10074 fi
8690e634 10075
725e2999
JB
10076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
10077$as_echo_n "checking for IPv6 sockets... " >&6; }
10078 if ${gl_cv_socket_ipv6+:} false; then :
10079 $as_echo_n "(cached) " >&6
10080else
10081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10082/* end confdefs.h. */
10083#include <sys/types.h>
10084#ifdef HAVE_SYS_SOCKET_H
10085#include <sys/socket.h>
10086#endif
10087#ifdef HAVE_NETINET_IN_H
10088#include <netinet/in.h>
10089#endif
10090#ifdef HAVE_WINSOCK2_H
10091#include <winsock2.h>
10092#endif
10093#ifdef HAVE_WS2TCPIP_H
10094#include <ws2tcpip.h>
10095#endif
10096int
10097main ()
10098{
10099int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
10100 if (&x && &y && &z) return 0;
10101 ;
10102 return 0;
10103}
10104_ACEOF
10105if ac_fn_c_try_compile "$LINENO"; then :
10106 gl_cv_socket_ipv6=yes
10107else
10108 gl_cv_socket_ipv6=no
10109fi
10110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10111fi
49e4877c 10112
725e2999
JB
10113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
10114$as_echo "$gl_cv_socket_ipv6" >&6; }
10115 if test $gl_cv_socket_ipv6 = yes; then
49e4877c 10116
725e2999 10117$as_echo "#define HAVE_IPV6 1" >>confdefs.h
8690e634 10118
725e2999 10119 fi
8690e634 10120
472fa5ee
SM
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133 :
10134
10135
10136
10137
10138
8690e634
JK
10139
10140
10141
10142 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 10143 gl_cv_next_limits_h='<'limits.h'>'
8690e634 10144 else
6ec2e0f5
SDJ
10145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
10146$as_echo_n "checking absolute name of <limits.h>... " >&6; }
d0ac1c44 10147if ${gl_cv_next_limits_h+:} false; then :
8690e634
JK
10148 $as_echo_n "(cached) " >&6
10149else
10150
6ec2e0f5 10151 if test $ac_cv_header_limits_h = yes; then
8690e634
JK
10152
10153
4a626d0a
PA
10154
10155
10156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 10157/* end confdefs.h. */
6ec2e0f5 10158#include <limits.h>
8690e634 10159_ACEOF
4a626d0a
PA
10160 case "$host_os" in
10161 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10162 *) gl_absname_cpp="$ac_cpp" ;;
10163 esac
10164
10165 case "$host_os" in
10166 mingw*)
10167 gl_dirsep_regex='[/\\]'
10168 ;;
10169 *)
10170 gl_dirsep_regex='\/'
10171 ;;
10172 esac
10173 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 10174 gl_header_literal_regex=`echo 'limits.h' \
4a626d0a
PA
10175 | sed -e "$gl_make_literal_regex_sed"`
10176 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10177 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10178 s|^/[^/]|//&|
10179 p
10180 q
10181 }'
10182
6ec2e0f5 10183 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a
PA
10184 sed -n "$gl_absolute_header_sed"`
10185
6ec2e0f5
SDJ
10186 gl_header=$gl_cv_absolute_limits_h
10187 gl_cv_next_limits_h='"'$gl_header'"'
8690e634 10188 else
6ec2e0f5 10189 gl_cv_next_limits_h='<'limits.h'>'
8690e634
JK
10190 fi
10191
5e8754f9 10192
7a6dbc2f 10193fi
5e8754f9
SDJ
10194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
10195$as_echo "$gl_cv_next_limits_h" >&6; }
10196 fi
10197 NEXT_LIMITS_H=$gl_cv_next_limits_h
10198
10199 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10200 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10201 gl_next_as_first_directive='<'limits.h'>'
10202 else
10203 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10204 gl_next_as_first_directive=$gl_cv_next_limits_h
10205 fi
10206 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
7a6dbc2f 10207
7a6dbc2f
SDJ
10208
10209
5e8754f9
SDJ
10210
10211
10212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has ULLONG_WIDTH etc." >&5
10213$as_echo_n "checking whether limits.h has ULLONG_WIDTH etc.... " >&6; }
10214if ${gl_cv_header_limits_width+:} false; then :
6ec2e0f5
SDJ
10215 $as_echo_n "(cached) " >&6
10216else
10217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10218/* end confdefs.h. */
5e8754f9
SDJ
10219#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
10220 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
10221 #endif
10222 #include <limits.h>
10223 int ullw = ULLONG_WIDTH;
6ec2e0f5
SDJ
10224int
10225main ()
10226{
10227
10228 ;
10229 return 0;
10230}
10231_ACEOF
10232if ac_fn_c_try_compile "$LINENO"; then :
5e8754f9 10233 gl_cv_header_limits_width=yes
6ec2e0f5 10234else
5e8754f9 10235 gl_cv_header_limits_width=no
6ec2e0f5
SDJ
10236fi
10237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10238fi
5e8754f9
SDJ
10239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
10240$as_echo "$gl_cv_header_limits_width" >&6; }
10241 if test "$gl_cv_header_limits_width" = yes; then
10242 LIMITS_H=
8690e634 10243 else
5e8754f9 10244 LIMITS_H=limits.h
8690e634
JK
10245 fi
10246
5e8754f9
SDJ
10247 if test -n "$LIMITS_H"; then
10248 GL_GENERATE_LIMITS_H_TRUE=
10249 GL_GENERATE_LIMITS_H_FALSE='#'
10250else
10251 GL_GENERATE_LIMITS_H_TRUE='#'
10252 GL_GENERATE_LIMITS_H_FALSE=
10253fi
10254
8690e634 10255
6ec2e0f5
SDJ
10256
10257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
10258$as_echo_n "checking for unsigned long long int... " >&6; }
d0ac1c44 10259if ${ac_cv_type_unsigned_long_long_int+:} false; then :
8690e634
JK
10260 $as_echo_n "(cached) " >&6
10261else
6ec2e0f5
SDJ
10262 ac_cv_type_unsigned_long_long_int=yes
10263 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
8690e634
JK
10264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10265/* end confdefs.h. */
10266
6ec2e0f5
SDJ
10267 /* For now, do not test the preprocessor; as of 2007 there are too many
10268 implementations with broken preprocessors. Perhaps this can
10269 be revisited in 2012. In the meantime, code should not expect
10270 #if to work with literals wider than 32 bits. */
10271 /* Test literals. */
10272 long long int ll = 9223372036854775807ll;
10273 long long int nll = -9223372036854775807LL;
10274 unsigned long long int ull = 18446744073709551615ULL;
10275 /* Test constant expressions. */
10276 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
10277 ? 1 : -1)];
10278 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
10279 ? 1 : -1)];
10280 int i = 63;
10281int
10282main ()
10283{
10284/* Test availability of runtime routines for shift and division. */
10285 long long int llmax = 9223372036854775807ll;
10286 unsigned long long int ullmax = 18446744073709551615ull;
10287 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
10288 | (llmax / ll) | (llmax % ll)
10289 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
10290 | (ullmax / ull) | (ullmax % ull));
10291 ;
10292 return 0;
10293}
8690e634 10294
6ec2e0f5
SDJ
10295_ACEOF
10296if ac_fn_c_try_link "$LINENO"; then :
8690e634 10297
6ec2e0f5
SDJ
10298else
10299 ac_cv_type_unsigned_long_long_int=no
10300fi
10301rm -f core conftest.err conftest.$ac_objext \
10302 conftest$ac_exeext conftest.$ac_ext
10303 fi
10304fi
10305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
10306$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
10307 if test $ac_cv_type_unsigned_long_long_int = yes; then
8690e634 10308
6ec2e0f5 10309$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
8690e634 10310
6ec2e0f5 10311 fi
8690e634 10312
8690e634 10313
8690e634 10314
6ec2e0f5
SDJ
10315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
10316$as_echo_n "checking for long long int... " >&6; }
d0ac1c44 10317if ${ac_cv_type_long_long_int+:} false; then :
6ec2e0f5
SDJ
10318 $as_echo_n "(cached) " >&6
10319else
10320 ac_cv_type_long_long_int=yes
10321 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10322 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
10323 if test $ac_cv_type_long_long_int = yes; then
10324 if test "$cross_compiling" = yes; then :
10325 :
8690e634
JK
10326else
10327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10328/* end confdefs.h. */
6ec2e0f5
SDJ
10329#include <limits.h>
10330 #ifndef LLONG_MAX
10331 # define HALF \
10332 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
10333 # define LLONG_MAX (HALF - 1 + HALF)
10334 #endif
8690e634
JK
10335int
10336main ()
10337{
6ec2e0f5
SDJ
10338long long int n = 1;
10339 int i;
10340 for (i = 0; ; i++)
10341 {
10342 long long int m = n << i;
10343 if (m >> i != n)
10344 return 1;
10345 if (LLONG_MAX / 2 < m)
10346 break;
10347 }
10348 return 0;
8690e634
JK
10349 ;
10350 return 0;
10351}
10352_ACEOF
10353if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5
SDJ
10354
10355else
10356 ac_cv_type_long_long_int=no
8690e634
JK
10357fi
10358rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10359 conftest.$ac_objext conftest.beam conftest.$ac_ext
10360fi
10361
6ec2e0f5
SDJ
10362 fi
10363 fi
8690e634 10364fi
6ec2e0f5
SDJ
10365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
10366$as_echo "$ac_cv_type_long_long_int" >&6; }
10367 if test $ac_cv_type_long_long_int = yes; then
49e4877c 10368
6ec2e0f5 10369$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
49e4877c 10370
6ec2e0f5 10371 fi
49e4877c 10372
49e4877c
PA
10373
10374
49e4877c
PA
10375
10376
49e4877c 10377
472fa5ee
SM
10378
10379
10380
10381
10382
10383
6ec2e0f5
SDJ
10384 gl_cv_c_multiarch=no
10385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10386/* end confdefs.h. */
10387#ifndef __APPLE_CC__
10388 not a universal capable compiler
10389 #endif
10390 typedef int dummy;
49e4877c 10391
49e4877c
PA
10392_ACEOF
10393if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5
SDJ
10394
10395 arch=
10396 prev=
10397 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
10398 if test -n "$prev"; then
10399 case $word in
10400 i?86 | x86_64 | ppc | ppc64)
10401 if test -z "$arch" || test "$arch" = "$word"; then
10402 arch="$word"
10403 else
10404 gl_cv_c_multiarch=yes
10405 fi
10406 ;;
10407 esac
10408 prev=
10409 else
10410 if test "x$word" = "x-arch"; then
10411 prev=arch
10412 fi
10413 fi
10414 done
10415
49e4877c
PA
10416fi
10417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
10418 if test $gl_cv_c_multiarch = yes; then
10419 APPLE_UNIVERSAL_BUILD=1
10420 else
10421 APPLE_UNIVERSAL_BUILD=0
10422 fi
49e4877c 10423
49e4877c 10424
49e4877c
PA
10425
10426
49e4877c 10427
49e4877c 10428
49e4877c 10429
6ec2e0f5
SDJ
10430 if test $ac_cv_type_long_long_int = yes; then
10431 HAVE_LONG_LONG_INT=1
10432 else
10433 HAVE_LONG_LONG_INT=0
10434 fi
49e4877c 10435
49e4877c 10436
6ec2e0f5
SDJ
10437 if test $ac_cv_type_unsigned_long_long_int = yes; then
10438 HAVE_UNSIGNED_LONG_LONG_INT=1
8690e634 10439 else
6ec2e0f5
SDJ
10440 HAVE_UNSIGNED_LONG_LONG_INT=0
10441 fi
8690e634 10442
8690e634 10443
8690e634 10444
472fa5ee
SM
10445 :
10446
10447
10448
10449
10450
6ec2e0f5
SDJ
10451 if test $ac_cv_header_wchar_h = yes; then
10452 HAVE_WCHAR_H=1
10453 else
10454 HAVE_WCHAR_H=0
10455 fi
8690e634
JK
10456
10457
6ec2e0f5
SDJ
10458 if test $ac_cv_header_inttypes_h = yes; then
10459 HAVE_INTTYPES_H=1
10460 else
10461 HAVE_INTTYPES_H=0
10462 fi
8690e634
JK
10463
10464
6ec2e0f5
SDJ
10465 if test $ac_cv_header_sys_types_h = yes; then
10466 HAVE_SYS_TYPES_H=1
10467 else
10468 HAVE_SYS_TYPES_H=0
10469 fi
8690e634 10470
8690e634 10471
8690e634 10472
8690e634 10473
8690e634 10474
8690e634
JK
10475
10476
8690e634 10477
472fa5ee
SM
10478 :
10479
10480
10481
10482
10483
8690e634 10484
6ec2e0f5
SDJ
10485
10486
10487 if test $gl_cv_have_include_next = yes; then
10488 gl_cv_next_stdint_h='<'stdint.h'>'
10489 else
10490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
10491$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
d0ac1c44 10492if ${gl_cv_next_stdint_h+:} false; then :
8690e634
JK
10493 $as_echo_n "(cached) " >&6
10494else
8690e634 10495
6ec2e0f5 10496 if test $ac_cv_header_stdint_h = yes; then
8690e634 10497
8690e634 10498
8690e634 10499
6ec2e0f5
SDJ
10500
10501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10502/* end confdefs.h. */
10503#include <stdint.h>
8690e634 10504_ACEOF
6ec2e0f5
SDJ
10505 case "$host_os" in
10506 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10507 *) gl_absname_cpp="$ac_cpp" ;;
10508 esac
8690e634 10509
6ec2e0f5
SDJ
10510 case "$host_os" in
10511 mingw*)
10512 gl_dirsep_regex='[/\\]'
10513 ;;
10514 *)
10515 gl_dirsep_regex='\/'
10516 ;;
10517 esac
10518 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10519 gl_header_literal_regex=`echo 'stdint.h' \
10520 | sed -e "$gl_make_literal_regex_sed"`
10521 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10522 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10523 s|^/[^/]|//&|
10524 p
10525 q
10526 }'
10527
10528 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10529 sed -n "$gl_absolute_header_sed"`
10530
10531 gl_header=$gl_cv_absolute_stdint_h
10532 gl_cv_next_stdint_h='"'$gl_header'"'
10533 else
10534 gl_cv_next_stdint_h='<'stdint.h'>'
10535 fi
10536
10537
10538fi
10539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
10540$as_echo "$gl_cv_next_stdint_h" >&6; }
10541 fi
10542 NEXT_STDINT_H=$gl_cv_next_stdint_h
10543
10544 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10545 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10546 gl_next_as_first_directive='<'stdint.h'>'
10547 else
10548 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10549 gl_next_as_first_directive=$gl_cv_next_stdint_h
10550 fi
10551 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
8690e634
JK
10552
10553
10554
10555
6ec2e0f5
SDJ
10556 if test $ac_cv_header_stdint_h = yes; then
10557 HAVE_STDINT_H=1
10558 else
10559 HAVE_STDINT_H=0
10560 fi
10561
10562
10563 if test $ac_cv_header_stdint_h = yes; then
10564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
10565$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
d0ac1c44 10566if ${gl_cv_header_working_stdint_h+:} false; then :
8690e634
JK
10567 $as_echo_n "(cached) " >&6
10568else
6ec2e0f5
SDJ
10569 gl_cv_header_working_stdint_h=no
10570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
10571/* end confdefs.h. */
10572
6ec2e0f5
SDJ
10573
10574#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
10575#define __STDC_CONSTANT_MACROS 1
10576#define __STDC_LIMIT_MACROS 1
10577#include <stdint.h>
10578/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
10579#if !(defined WCHAR_MIN && defined WCHAR_MAX)
10580#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
10581#endif
10582
10583
8690e634
JK
10584 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10585 included before <wchar.h>. */
10586 #include <stddef.h>
10587 #include <signal.h>
10588 #if HAVE_WCHAR_H
10589 # include <stdio.h>
10590 # include <time.h>
10591 # include <wchar.h>
10592 #endif
10593
8690e634 10594
6ec2e0f5
SDJ
10595#ifdef INT8_MAX
10596int8_t a1 = INT8_MAX;
10597int8_t a1min = INT8_MIN;
10598#endif
10599#ifdef INT16_MAX
10600int16_t a2 = INT16_MAX;
10601int16_t a2min = INT16_MIN;
10602#endif
10603#ifdef INT32_MAX
10604int32_t a3 = INT32_MAX;
10605int32_t a3min = INT32_MIN;
10606#endif
10607#ifdef INT64_MAX
10608int64_t a4 = INT64_MAX;
10609int64_t a4min = INT64_MIN;
10610#endif
10611#ifdef UINT8_MAX
10612uint8_t b1 = UINT8_MAX;
10613#else
10614typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
10615#endif
10616#ifdef UINT16_MAX
10617uint16_t b2 = UINT16_MAX;
10618#endif
10619#ifdef UINT32_MAX
10620uint32_t b3 = UINT32_MAX;
10621#endif
10622#ifdef UINT64_MAX
10623uint64_t b4 = UINT64_MAX;
10624#endif
10625int_least8_t c1 = INT8_C (0x7f);
10626int_least8_t c1max = INT_LEAST8_MAX;
10627int_least8_t c1min = INT_LEAST8_MIN;
10628int_least16_t c2 = INT16_C (0x7fff);
10629int_least16_t c2max = INT_LEAST16_MAX;
10630int_least16_t c2min = INT_LEAST16_MIN;
10631int_least32_t c3 = INT32_C (0x7fffffff);
10632int_least32_t c3max = INT_LEAST32_MAX;
10633int_least32_t c3min = INT_LEAST32_MIN;
10634int_least64_t c4 = INT64_C (0x7fffffffffffffff);
10635int_least64_t c4max = INT_LEAST64_MAX;
10636int_least64_t c4min = INT_LEAST64_MIN;
10637uint_least8_t d1 = UINT8_C (0xff);
10638uint_least8_t d1max = UINT_LEAST8_MAX;
10639uint_least16_t d2 = UINT16_C (0xffff);
10640uint_least16_t d2max = UINT_LEAST16_MAX;
10641uint_least32_t d3 = UINT32_C (0xffffffff);
10642uint_least32_t d3max = UINT_LEAST32_MAX;
10643uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
10644uint_least64_t d4max = UINT_LEAST64_MAX;
10645int_fast8_t e1 = INT_FAST8_MAX;
10646int_fast8_t e1min = INT_FAST8_MIN;
10647int_fast16_t e2 = INT_FAST16_MAX;
10648int_fast16_t e2min = INT_FAST16_MIN;
10649int_fast32_t e3 = INT_FAST32_MAX;
10650int_fast32_t e3min = INT_FAST32_MIN;
10651int_fast64_t e4 = INT_FAST64_MAX;
10652int_fast64_t e4min = INT_FAST64_MIN;
10653uint_fast8_t f1 = UINT_FAST8_MAX;
10654uint_fast16_t f2 = UINT_FAST16_MAX;
10655uint_fast32_t f3 = UINT_FAST32_MAX;
10656uint_fast64_t f4 = UINT_FAST64_MAX;
10657#ifdef INTPTR_MAX
10658intptr_t g = INTPTR_MAX;
10659intptr_t gmin = INTPTR_MIN;
10660#endif
10661#ifdef UINTPTR_MAX
10662uintptr_t h = UINTPTR_MAX;
10663#endif
10664intmax_t i = INTMAX_MAX;
10665uintmax_t j = UINTMAX_MAX;
8690e634 10666
6ec2e0f5
SDJ
10667/* Check that SIZE_MAX has the correct type, if possible. */
10668#if 201112 <= __STDC_VERSION__
10669int k = _Generic (SIZE_MAX, size_t: 0);
10670#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
10671 || (0x5110 <= __SUNPRO_C && !__STDC__))
10672extern size_t k;
10673extern __typeof__ (SIZE_MAX) k;
10674#endif
8690e634 10675
6ec2e0f5
SDJ
10676#include <limits.h> /* for CHAR_BIT */
10677#define TYPE_MINIMUM(t) \
10678 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
10679#define TYPE_MAXIMUM(t) \
10680 ((t) ((t) 0 < (t) -1 \
10681 ? (t) -1 \
10682 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
10683struct s {
10684 int check_PTRDIFF:
10685 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
10686 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
10687 ? 1 : -1;
10688 /* Detect bug in FreeBSD 6.0 / ia64. */
10689 int check_SIG_ATOMIC:
10690 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
10691 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
10692 ? 1 : -1;
10693 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
10694 int check_WCHAR:
10695 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
10696 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
10697 ? 1 : -1;
10698 /* Detect bug in mingw. */
10699 int check_WINT:
10700 WINT_MIN == TYPE_MINIMUM (wint_t)
10701 && WINT_MAX == TYPE_MAXIMUM (wint_t)
10702 ? 1 : -1;
8690e634 10703
6ec2e0f5
SDJ
10704 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
10705 int check_UINT8_C:
10706 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
10707 int check_UINT16_C:
10708 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
8690e634 10709
6ec2e0f5
SDJ
10710 /* Detect bugs in OpenBSD 3.9 stdint.h. */
10711#ifdef UINT8_MAX
10712 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
10713#endif
10714#ifdef UINT16_MAX
10715 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
10716#endif
10717#ifdef UINT32_MAX
10718 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
10719#endif
10720#ifdef UINT64_MAX
10721 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
10722#endif
10723 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
10724 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
10725 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
10726 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
10727 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
10728 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
10729 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
10730 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
10731 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
10732 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
10733 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
10734};
8690e634 10735
8690e634
JK
10736int
10737main ()
10738{
10739
10740 ;
10741 return 0;
10742}
10743_ACEOF
10744if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 10745 if test "$cross_compiling" = yes; then :
5e8754f9 10746 gl_cv_header_working_stdint_h=yes
8690e634 10747
6ec2e0f5
SDJ
10748else
10749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10750/* end confdefs.h. */
8690e634 10751
8690e634 10752
6ec2e0f5
SDJ
10753#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
10754#define __STDC_CONSTANT_MACROS 1
10755#define __STDC_LIMIT_MACROS 1
10756#include <stdint.h>
8690e634 10757
8690e634
JK
10758
10759 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10760 included before <wchar.h>. */
10761 #include <stddef.h>
10762 #include <signal.h>
10763 #if HAVE_WCHAR_H
10764 # include <stdio.h>
10765 # include <time.h>
10766 # include <wchar.h>
10767 #endif
10768
8690e634 10769
6ec2e0f5
SDJ
10770#include <stdio.h>
10771#include <string.h>
10772#define MVAL(macro) MVAL1(macro)
10773#define MVAL1(expression) #expression
10774static const char *macro_values[] =
10775 {
10776#ifdef INT8_MAX
10777 MVAL (INT8_MAX),
10778#endif
10779#ifdef INT16_MAX
10780 MVAL (INT16_MAX),
10781#endif
10782#ifdef INT32_MAX
10783 MVAL (INT32_MAX),
10784#endif
10785#ifdef INT64_MAX
10786 MVAL (INT64_MAX),
10787#endif
10788#ifdef UINT8_MAX
10789 MVAL (UINT8_MAX),
10790#endif
10791#ifdef UINT16_MAX
10792 MVAL (UINT16_MAX),
10793#endif
10794#ifdef UINT32_MAX
10795 MVAL (UINT32_MAX),
10796#endif
10797#ifdef UINT64_MAX
10798 MVAL (UINT64_MAX),
10799#endif
10800 NULL
10801 };
10802
10803int
10804main ()
10805{
10806
10807 const char **mv;
10808 for (mv = macro_values; *mv != NULL; mv++)
10809 {
10810 const char *value = *mv;
10811 /* Test whether it looks like a cast expression. */
10812 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
10813 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
10814 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
10815 || strncmp (value, "((int)"/*)*/, 6) == 0
10816 || strncmp (value, "((signed short)"/*)*/, 15) == 0
10817 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
10818 return mv - macro_values + 1;
10819 }
10820 return 0;
10821
10822 ;
8690e634
JK
10823 return 0;
10824}
10825_ACEOF
6ec2e0f5
SDJ
10826if ac_fn_c_try_run "$LINENO"; then :
10827 gl_cv_header_working_stdint_h=yes
8690e634 10828fi
6ec2e0f5
SDJ
10829rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10830 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 10831fi
8690e634
JK
10832
10833
6ec2e0f5
SDJ
10834fi
10835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 10836
6ec2e0f5
SDJ
10837fi
10838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
10839$as_echo "$gl_cv_header_working_stdint_h" >&6; }
8690e634
JK
10840 fi
10841
6ec2e0f5
SDJ
10842 HAVE_C99_STDINT_H=0
10843 HAVE_SYS_BITYPES_H=0
10844 HAVE_SYS_INTTYPES_H=0
10845 STDINT_H=stdint.h
5e8754f9
SDJ
10846 if test "$gl_cv_header_working_stdint_h" = yes; then
10847 HAVE_C99_STDINT_H=1
10848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
6ec2e0f5 10849$as_echo_n "checking whether stdint.h predates C++11... " >&6; }
d0ac1c44 10850if ${gl_cv_header_stdint_predates_cxx11_h+:} false; then :
6ec2e0f5 10851 $as_echo_n "(cached) " >&6
49e4877c 10852else
6ec2e0f5 10853 gl_cv_header_stdint_predates_cxx11_h=yes
5e8754f9 10854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ec2e0f5 10855/* end confdefs.h. */
49e4877c
PA
10856
10857
6ec2e0f5
SDJ
10858#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
10859#include <stdint.h>
49e4877c
PA
10860
10861
6ec2e0f5
SDJ
10862 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10863 included before <wchar.h>. */
10864 #include <stddef.h>
10865 #include <signal.h>
10866 #if HAVE_WCHAR_H
10867 # include <stdio.h>
10868 # include <time.h>
10869 # include <wchar.h>
10870 #endif
49e4877c 10871
8690e634 10872
6ec2e0f5
SDJ
10873intmax_t im = INTMAX_MAX;
10874int32_t i32 = INT32_C (0x7fffffff);
8690e634 10875
6ec2e0f5
SDJ
10876int
10877main ()
10878{
8690e634 10879
6ec2e0f5
SDJ
10880 ;
10881 return 0;
10882}
10883_ACEOF
10884if ac_fn_c_try_compile "$LINENO"; then :
10885 gl_cv_header_stdint_predates_cxx11_h=no
10886fi
10887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10888fi
10889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
10890$as_echo "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
8690e634 10891
5e8754f9 10892 if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
8690e634 10893
6ec2e0f5 10894$as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
8690e634
JK
10895
10896
6ec2e0f5 10897$as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
8690e634 10898
5e8754f9
SDJ
10899 fi
10900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
6ec2e0f5 10901$as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
d0ac1c44 10902if ${gl_cv_header_stdint_width+:} false; then :
6ec2e0f5
SDJ
10903 $as_echo_n "(cached) " >&6
10904else
10905 gl_cv_header_stdint_width=no
5e8754f9 10906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ec2e0f5 10907/* end confdefs.h. */
8690e634 10908
5e8754f9
SDJ
10909 /* Work if build is not clean. */
10910 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
10911 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
10912 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
10913 #endif
10914 #include <stdint.h>
8690e634 10915
6ec2e0f5
SDJ
10916 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10917 included before <wchar.h>. */
10918 #include <stddef.h>
10919 #include <signal.h>
10920 #if HAVE_WCHAR_H
10921 # include <stdio.h>
10922 # include <time.h>
10923 # include <wchar.h>
10924 #endif
8690e634 10925
5e8754f9 10926 int iw = UINTMAX_WIDTH;
8690e634 10927
6ec2e0f5
SDJ
10928int
10929main ()
10930{
8690e634 10931
6ec2e0f5
SDJ
10932 ;
10933 return 0;
10934}
10935_ACEOF
10936if ac_fn_c_try_compile "$LINENO"; then :
10937 gl_cv_header_stdint_width=yes
10938fi
10939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10940fi
10941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
10942$as_echo "$gl_cv_header_stdint_width" >&6; }
5e8754f9
SDJ
10943 if test "$gl_cv_header_stdint_width" = yes; then
10944 STDINT_H=
10945 fi
10946 else
10947 for ac_header in sys/inttypes.h sys/bitypes.h
6ec2e0f5
SDJ
10948do :
10949 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10950ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 10951if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6ec2e0f5
SDJ
10952 cat >>confdefs.h <<_ACEOF
10953#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10954_ACEOF
8690e634 10955
6ec2e0f5 10956fi
8690e634 10957
6ec2e0f5 10958done
8690e634 10959
5e8754f9
SDJ
10960 if test $ac_cv_header_sys_inttypes_h = yes; then
10961 HAVE_SYS_INTTYPES_H=1
10962 fi
10963 if test $ac_cv_header_sys_bitypes_h = yes; then
10964 HAVE_SYS_BITYPES_H=1
10965 fi
8690e634
JK
10966
10967
6ec2e0f5 10968 if test $APPLE_UNIVERSAL_BUILD = 0; then
8690e634
JK
10969
10970
6ec2e0f5
SDJ
10971 for gltype in ptrdiff_t size_t ; do
10972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
10973$as_echo_n "checking for bit size of $gltype... " >&6; }
d0ac1c44 10974if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
8690e634
JK
10975 $as_echo_n "(cached) " >&6
10976else
6ec2e0f5
SDJ
10977 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
10978 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10979 included before <wchar.h>. */
10980 #include <stddef.h>
10981 #include <signal.h>
10982 #if HAVE_WCHAR_H
10983 # include <stdio.h>
10984 # include <time.h>
10985 # include <wchar.h>
10986 #endif
8690e634 10987
6ec2e0f5 10988#include <limits.h>"; then :
4a626d0a 10989
6ec2e0f5
SDJ
10990else
10991 result=unknown
10992fi
4a626d0a 10993
6ec2e0f5 10994 eval gl_cv_bitsizeof_${gltype}=\$result
4a626d0a 10995
6ec2e0f5
SDJ
10996fi
10997eval ac_res=\$gl_cv_bitsizeof_${gltype}
10998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10999$as_echo "$ac_res" >&6; }
11000 eval result=\$gl_cv_bitsizeof_${gltype}
11001 if test $result = unknown; then
11002 result=0
11003 fi
11004 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11005 cat >>confdefs.h <<_ACEOF
11006#define BITSIZEOF_${GLTYPE} $result
11007_ACEOF
4a626d0a 11008
6ec2e0f5
SDJ
11009 eval BITSIZEOF_${GLTYPE}=\$result
11010 done
4a626d0a 11011
8690e634 11012
6ec2e0f5 11013 fi
8690e634 11014
8690e634 11015
6ec2e0f5
SDJ
11016 for gltype in sig_atomic_t wchar_t wint_t ; do
11017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
11018$as_echo_n "checking for bit size of $gltype... " >&6; }
d0ac1c44 11019if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
6ec2e0f5
SDJ
11020 $as_echo_n "(cached) " >&6
11021else
11022 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
11023 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11024 included before <wchar.h>. */
11025 #include <stddef.h>
11026 #include <signal.h>
11027 #if HAVE_WCHAR_H
11028 # include <stdio.h>
11029 # include <time.h>
11030 # include <wchar.h>
11031 #endif
8690e634 11032
6ec2e0f5
SDJ
11033#include <limits.h>"; then :
11034
11035else
11036 result=unknown
11037fi
8690e634 11038
6ec2e0f5 11039 eval gl_cv_bitsizeof_${gltype}=\$result
8690e634 11040
6ec2e0f5
SDJ
11041fi
11042eval ac_res=\$gl_cv_bitsizeof_${gltype}
11043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11044$as_echo "$ac_res" >&6; }
11045 eval result=\$gl_cv_bitsizeof_${gltype}
11046 if test $result = unknown; then
11047 result=0
11048 fi
11049 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11050 cat >>confdefs.h <<_ACEOF
11051#define BITSIZEOF_${GLTYPE} $result
11052_ACEOF
8690e634 11053
6ec2e0f5
SDJ
11054 eval BITSIZEOF_${GLTYPE}=\$result
11055 done
8690e634
JK
11056
11057
11058
11059
6ec2e0f5
SDJ
11060 for gltype in sig_atomic_t wchar_t wint_t ; do
11061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
11062$as_echo_n "checking whether $gltype is signed... " >&6; }
d0ac1c44 11063if eval \${gl_cv_type_${gltype}_signed+:} false; then :
8690e634
JK
11064 $as_echo_n "(cached) " >&6
11065else
11066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11067/* end confdefs.h. */
8690e634 11068
6ec2e0f5
SDJ
11069 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11070 included before <wchar.h>. */
11071 #include <stddef.h>
11072 #include <signal.h>
11073 #if HAVE_WCHAR_H
11074 # include <stdio.h>
11075 # include <time.h>
11076 # include <wchar.h>
11077 #endif
11078
11079 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
8690e634
JK
11080int
11081main ()
11082{
6ec2e0f5 11083
8690e634
JK
11084 ;
11085 return 0;
11086}
11087_ACEOF
11088if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 11089 result=yes
8690e634 11090else
6ec2e0f5 11091 result=no
8690e634
JK
11092fi
11093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
11094 eval gl_cv_type_${gltype}_signed=\$result
11095
8690e634 11096fi
6ec2e0f5 11097eval ac_res=\$gl_cv_type_${gltype}_signed
8690e634
JK
11098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11099$as_echo "$ac_res" >&6; }
6ec2e0f5
SDJ
11100 eval result=\$gl_cv_type_${gltype}_signed
11101 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11102 if test "$result" = yes; then
11103 cat >>confdefs.h <<_ACEOF
11104#define HAVE_SIGNED_${GLTYPE} 1
8690e634
JK
11105_ACEOF
11106
6ec2e0f5
SDJ
11107 eval HAVE_SIGNED_${GLTYPE}=1
11108 else
11109 eval HAVE_SIGNED_${GLTYPE}=0
11110 fi
11111 done
8690e634 11112
8690e634 11113
6ec2e0f5
SDJ
11114 gl_cv_type_ptrdiff_t_signed=yes
11115 gl_cv_type_size_t_signed=no
11116 if test $APPLE_UNIVERSAL_BUILD = 0; then
8690e634 11117
8690e634 11118
6ec2e0f5
SDJ
11119 for gltype in ptrdiff_t size_t ; do
11120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
11121$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
d0ac1c44 11122if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
8690e634
JK
11123 $as_echo_n "(cached) " >&6
11124else
6ec2e0f5
SDJ
11125 eval gl_cv_type_${gltype}_suffix=no
11126 eval result=\$gl_cv_type_${gltype}_signed
11127 if test "$result" = yes; then
11128 glsufu=
11129 else
11130 glsufu=u
11131 fi
11132 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
11133 case $glsuf in
11134 '') gltype1='int';;
11135 l) gltype1='long int';;
11136 ll) gltype1='long long int';;
11137 i64) gltype1='__int64';;
11138 u) gltype1='unsigned int';;
11139 ul) gltype1='unsigned long int';;
11140 ull) gltype1='unsigned long long int';;
11141 ui64)gltype1='unsigned __int64';;
11142 esac
11143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
11144/* end confdefs.h. */
11145
6ec2e0f5
SDJ
11146 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11147 included before <wchar.h>. */
11148 #include <stddef.h>
11149 #include <signal.h>
11150 #if HAVE_WCHAR_H
11151 # include <stdio.h>
11152 # include <time.h>
11153 # include <wchar.h>
11154 #endif
8690e634 11155
6ec2e0f5
SDJ
11156 extern $gltype foo;
11157 extern $gltype1 foo;
8690e634
JK
11158int
11159main ()
11160{
11161
11162 ;
11163 return 0;
11164}
11165_ACEOF
11166if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 11167 eval gl_cv_type_${gltype}_suffix=\$glsuf
8690e634
JK
11168fi
11169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
11170 eval result=\$gl_cv_type_${gltype}_suffix
11171 test "$result" != no && break
11172 done
8690e634 11173fi
6ec2e0f5
SDJ
11174eval ac_res=\$gl_cv_type_${gltype}_suffix
11175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11176$as_echo "$ac_res" >&6; }
11177 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11178 eval result=\$gl_cv_type_${gltype}_suffix
11179 test "$result" = no && result=
11180 eval ${GLTYPE}_SUFFIX=\$result
11181 cat >>confdefs.h <<_ACEOF
11182#define ${GLTYPE}_SUFFIX $result
8690e634
JK
11183_ACEOF
11184
6ec2e0f5 11185 done
8690e634
JK
11186
11187
6ec2e0f5 11188 fi
8690e634 11189
6ec2e0f5
SDJ
11190
11191 for gltype in sig_atomic_t wchar_t wint_t ; do
11192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
11193$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
d0ac1c44 11194if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
8690e634
JK
11195 $as_echo_n "(cached) " >&6
11196else
6ec2e0f5
SDJ
11197 eval gl_cv_type_${gltype}_suffix=no
11198 eval result=\$gl_cv_type_${gltype}_signed
11199 if test "$result" = yes; then
11200 glsufu=
11201 else
11202 glsufu=u
11203 fi
11204 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
11205 case $glsuf in
11206 '') gltype1='int';;
11207 l) gltype1='long int';;
11208 ll) gltype1='long long int';;
11209 i64) gltype1='__int64';;
11210 u) gltype1='unsigned int';;
11211 ul) gltype1='unsigned long int';;
11212 ull) gltype1='unsigned long long int';;
11213 ui64)gltype1='unsigned __int64';;
11214 esac
11215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 11216/* end confdefs.h. */
88b48903 11217
6ec2e0f5
SDJ
11218 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11219 included before <wchar.h>. */
11220 #include <stddef.h>
11221 #include <signal.h>
11222 #if HAVE_WCHAR_H
11223 # include <stdio.h>
11224 # include <time.h>
11225 # include <wchar.h>
11226 #endif
88b48903 11227
6ec2e0f5
SDJ
11228 extern $gltype foo;
11229 extern $gltype1 foo;
88b48903
WN
11230int
11231main ()
11232{
88b48903
WN
11233
11234 ;
11235 return 0;
11236}
11237_ACEOF
11238if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 11239 eval gl_cv_type_${gltype}_suffix=\$glsuf
8690e634 11240fi
88b48903 11241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
11242 eval result=\$gl_cv_type_${gltype}_suffix
11243 test "$result" != no && break
11244 done
8690e634 11245fi
6ec2e0f5
SDJ
11246eval ac_res=\$gl_cv_type_${gltype}_suffix
11247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11248$as_echo "$ac_res" >&6; }
11249 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11250 eval result=\$gl_cv_type_${gltype}_suffix
11251 test "$result" = no && result=
11252 eval ${GLTYPE}_SUFFIX=\$result
11253 cat >>confdefs.h <<_ACEOF
11254#define ${GLTYPE}_SUFFIX $result
88b48903 11255_ACEOF
8690e634 11256
6ec2e0f5 11257 done
8690e634
JK
11258
11259
11260
5e8754f9 11261 if test $BITSIZEOF_WINT_T -lt 32; then
6ec2e0f5
SDJ
11262 BITSIZEOF_WINT_T=32
11263 fi
8690e634 11264
5e8754f9 11265 fi
7a6dbc2f 11266
5e8754f9
SDJ
11267 # The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH.
11268 LIMITS_H=limits.h
6ec2e0f5
SDJ
11269 if test -n "$LIMITS_H"; then
11270 GL_GENERATE_LIMITS_H_TRUE=
11271 GL_GENERATE_LIMITS_H_FALSE='#'
88b48903 11272else
6ec2e0f5
SDJ
11273 GL_GENERATE_LIMITS_H_TRUE='#'
11274 GL_GENERATE_LIMITS_H_FALSE=
88b48903 11275fi
8690e634
JK
11276
11277
11278
11279
11280
6ec2e0f5
SDJ
11281
11282 if test -n "$STDINT_H"; then
11283 GL_GENERATE_STDINT_H_TRUE=
11284 GL_GENERATE_STDINT_H_FALSE='#'
11285else
11286 GL_GENERATE_STDINT_H_TRUE='#'
11287 GL_GENERATE_STDINT_H_FALSE=
88b48903 11288fi
8690e634 11289
8690e634
JK
11290
11291
11292
6ec2e0f5 11293
472fa5ee
SM
11294
11295
11296
6ec2e0f5
SDJ
11297 GNULIB_IMAXABS=0;
11298 GNULIB_IMAXDIV=0;
11299 GNULIB_STRTOIMAX=0;
11300 GNULIB_STRTOUMAX=0;
11301 HAVE_DECL_IMAXABS=1;
11302 HAVE_DECL_IMAXDIV=1;
11303 HAVE_DECL_STRTOIMAX=1;
11304 HAVE_DECL_STRTOUMAX=1;
11305 REPLACE_STRTOIMAX=0;
11306 REPLACE_STRTOUMAX=0;
11307 INT32_MAX_LT_INTMAX_MAX=1;
11308 INT64_MAX_EQ_LONG_MAX='defined _LP64';
11309 PRI_MACROS_BROKEN=0;
11310 PRIPTR_PREFIX=__PRIPTR_PREFIX;
11311 UINT32_MAX_LT_UINTMAX_MAX=1;
11312 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
11313
11314
11315
11316
472fa5ee
SM
11317 :
11318
11319
11320
11321
11322
11323
11324
6ec2e0f5
SDJ
11325
11326
11327
11328
11329
11330
472fa5ee
SM
11331 :
11332
11333
11334
6ec2e0f5
SDJ
11335
11336
11337
11338
11339
11340 if test $gl_cv_have_include_next = yes; then
11341 gl_cv_next_inttypes_h='<'inttypes.h'>'
11342 else
11343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
11344$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
d0ac1c44 11345if ${gl_cv_next_inttypes_h+:} false; then :
6ec2e0f5 11346 $as_echo_n "(cached) " >&6
88b48903 11347else
8690e634 11348
6ec2e0f5 11349 if test $ac_cv_header_inttypes_h = yes; then
8690e634
JK
11350
11351
8690e634
JK
11352
11353
6ec2e0f5
SDJ
11354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11355/* end confdefs.h. */
11356#include <inttypes.h>
88b48903 11357_ACEOF
6ec2e0f5
SDJ
11358 case "$host_os" in
11359 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11360 *) gl_absname_cpp="$ac_cpp" ;;
11361 esac
8690e634 11362
6ec2e0f5
SDJ
11363 case "$host_os" in
11364 mingw*)
11365 gl_dirsep_regex='[/\\]'
11366 ;;
11367 *)
11368 gl_dirsep_regex='\/'
88b48903
WN
11369 ;;
11370 esac
6ec2e0f5
SDJ
11371 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11372 gl_header_literal_regex=`echo 'inttypes.h' \
11373 | sed -e "$gl_make_literal_regex_sed"`
11374 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11375 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11376 s|^/[^/]|//&|
11377 p
11378 q
11379 }'
8690e634 11380
6ec2e0f5
SDJ
11381 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11382 sed -n "$gl_absolute_header_sed"`
8690e634 11383
6ec2e0f5
SDJ
11384 gl_header=$gl_cv_absolute_inttypes_h
11385 gl_cv_next_inttypes_h='"'$gl_header'"'
11386 else
11387 gl_cv_next_inttypes_h='<'inttypes.h'>'
11388 fi
88b48903 11389
88b48903 11390
88b48903 11391fi
6ec2e0f5
SDJ
11392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
11393$as_echo "$gl_cv_next_inttypes_h" >&6; }
11394 fi
11395 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
88b48903 11396
6ec2e0f5
SDJ
11397 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11398 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11399 gl_next_as_first_directive='<'inttypes.h'>'
11400 else
11401 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11402 gl_next_as_first_directive=$gl_cv_next_inttypes_h
11403 fi
11404 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
88b48903 11405
6ec2e0f5
SDJ
11406
11407
11408
11409
11410
11411
11412
5e8754f9
SDJ
11413 for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
11414 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
11415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
11416$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
11417if eval \${$as_gl_Symbol+:} false; then :
11418 $as_echo_n "(cached) " >&6
11419else
11420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11421/* end confdefs.h. */
11422#include <inttypes.h>
11423
11424int
11425main ()
11426{
11427#undef $gl_func
11428 (void) $gl_func;
11429 ;
11430 return 0;
11431}
11432_ACEOF
11433if ac_fn_c_try_compile "$LINENO"; then :
11434 eval "$as_gl_Symbol=yes"
11435else
11436 eval "$as_gl_Symbol=no"
11437fi
11438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11439fi
11440eval ac_res=\$$as_gl_Symbol
11441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11442$as_echo "$ac_res" >&6; }
11443 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
11444 cat >>confdefs.h <<_ACEOF
11445#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
11446_ACEOF
6ec2e0f5 11447
5e8754f9
SDJ
11448 eval ac_cv_have_decl_$gl_func=yes
11449fi
11450 done
6ec2e0f5
SDJ
11451
11452
11453
11454 for ac_header in inttypes.h
11455do :
11456 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
d0ac1c44 11457if test "x$ac_cv_header_inttypes_h" = xyes; then :
6ec2e0f5
SDJ
11458 cat >>confdefs.h <<_ACEOF
11459#define HAVE_INTTYPES_H 1
11460_ACEOF
11461
11462fi
11463
11464done
11465
11466 if test $ac_cv_header_inttypes_h = yes; then
11467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
11468$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
d0ac1c44 11469if ${gt_cv_inttypes_pri_broken+:} false; then :
6ec2e0f5
SDJ
11470 $as_echo_n "(cached) " >&6
11471else
11472
11473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11474/* end confdefs.h. */
11475
11476#include <inttypes.h>
11477#ifdef PRId32
11478char *p = PRId32;
11479#endif
11480
11481int
11482main ()
11483{
11484
11485 ;
11486 return 0;
11487}
11488_ACEOF
11489if ac_fn_c_try_compile "$LINENO"; then :
11490 gt_cv_inttypes_pri_broken=no
11491else
11492 gt_cv_inttypes_pri_broken=yes
11493fi
11494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11495
11496fi
11497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
11498$as_echo "$gt_cv_inttypes_pri_broken" >&6; }
11499 fi
11500 if test "$gt_cv_inttypes_pri_broken" = yes; then
11501
11502cat >>confdefs.h <<_ACEOF
11503#define PRI_MACROS_BROKEN 1
11504_ACEOF
11505
11506 PRI_MACROS_BROKEN=1
11507 else
11508 PRI_MACROS_BROKEN=0
11509 fi
11510
11511
11512
11513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
11514$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
d0ac1c44 11515if ${gl_cv_cc_double_expbit0+:} false; then :
6ec2e0f5
SDJ
11516 $as_echo_n "(cached) " >&6
11517else
11518
11519 if test "$cross_compiling" = yes; then :
11520
11521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11522/* end confdefs.h. */
11523
11524#if defined arm || defined __arm || defined __arm__
11525 mixed_endianness
11526#endif
11527
11528_ACEOF
11529if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11530 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
11531 gl_cv_cc_double_expbit0="unknown"
11532else
11533
11534 :
d0ac1c44 11535if ${ac_cv_c_bigendian+:} false; then :
6ec2e0f5
SDJ
11536 $as_echo_n "(cached) " >&6
11537else
11538 ac_cv_c_bigendian=unknown
11539 # See if we're dealing with a universal compiler.
11540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11541/* end confdefs.h. */
11542#ifndef __APPLE_CC__
11543 not a universal capable compiler
11544 #endif
11545 typedef int dummy;
11546
11547_ACEOF
11548if ac_fn_c_try_compile "$LINENO"; then :
11549
11550 # Check for potential -arch flags. It is not universal unless
11551 # there are at least two -arch flags with different values.
11552 ac_arch=
11553 ac_prev=
11554 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11555 if test -n "$ac_prev"; then
11556 case $ac_word in
11557 i?86 | x86_64 | ppc | ppc64)
11558 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11559 ac_arch=$ac_word
11560 else
11561 ac_cv_c_bigendian=universal
11562 break
11563 fi
11564 ;;
11565 esac
11566 ac_prev=
11567 elif test "x$ac_word" = "x-arch"; then
11568 ac_prev=arch
11569 fi
11570 done
11571fi
11572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11573 if test $ac_cv_c_bigendian = unknown; then
11574 # See if sys/param.h defines the BYTE_ORDER macro.
11575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11576/* end confdefs.h. */
11577#include <sys/types.h>
11578 #include <sys/param.h>
11579
11580int
11581main ()
11582{
11583#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11584 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11585 && LITTLE_ENDIAN)
11586 bogus endian macros
11587 #endif
11588
11589 ;
11590 return 0;
11591}
11592_ACEOF
11593if ac_fn_c_try_compile "$LINENO"; then :
11594 # It does; now see whether it defined to BIG_ENDIAN or not.
11595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11596/* end confdefs.h. */
11597#include <sys/types.h>
11598 #include <sys/param.h>
11599
11600int
11601main ()
11602{
11603#if BYTE_ORDER != BIG_ENDIAN
11604 not big endian
11605 #endif
11606
11607 ;
11608 return 0;
11609}
11610_ACEOF
11611if ac_fn_c_try_compile "$LINENO"; then :
11612 ac_cv_c_bigendian=yes
11613else
11614 ac_cv_c_bigendian=no
11615fi
11616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11617fi
11618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11619 fi
11620 if test $ac_cv_c_bigendian = unknown; then
11621 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11623/* end confdefs.h. */
11624#include <limits.h>
11625
11626int
88b48903
WN
11627main ()
11628{
11629#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11630 bogus endian macros
11631 #endif
11632
11633 ;
11634 return 0;
11635}
11636_ACEOF
11637if ac_fn_c_try_compile "$LINENO"; then :
11638 # It does; now see whether it defined to _BIG_ENDIAN or not.
11639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11640/* end confdefs.h. */
11641#include <limits.h>
11642
11643int
11644main ()
11645{
11646#ifndef _BIG_ENDIAN
11647 not big endian
11648 #endif
11649
11650 ;
11651 return 0;
11652}
11653_ACEOF
11654if ac_fn_c_try_compile "$LINENO"; then :
11655 ac_cv_c_bigendian=yes
11656else
11657 ac_cv_c_bigendian=no
11658fi
11659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11660fi
11661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11662 fi
11663 if test $ac_cv_c_bigendian = unknown; then
11664 # Compile a test program.
11665 if test "$cross_compiling" = yes; then :
11666 # Try to guess by grepping values from an object file.
11667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11668/* end confdefs.h. */
11669short int ascii_mm[] =
11670 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11671 short int ascii_ii[] =
11672 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11673 int use_ascii (int i) {
11674 return ascii_mm[i] + ascii_ii[i];
11675 }
11676 short int ebcdic_ii[] =
11677 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11678 short int ebcdic_mm[] =
11679 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11680 int use_ebcdic (int i) {
11681 return ebcdic_mm[i] + ebcdic_ii[i];
11682 }
11683 extern int foo;
11684
11685int
11686main ()
11687{
11688return use_ascii (foo) == use_ebcdic (foo);
11689 ;
11690 return 0;
11691}
11692_ACEOF
11693if ac_fn_c_try_compile "$LINENO"; then :
11694 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11695 ac_cv_c_bigendian=yes
11696 fi
11697 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11698 if test "$ac_cv_c_bigendian" = unknown; then
11699 ac_cv_c_bigendian=no
11700 else
11701 # finding both strings is unlikely to happen, but who knows?
11702 ac_cv_c_bigendian=unknown
11703 fi
11704 fi
11705fi
11706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11707else
11708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11709/* end confdefs.h. */
11710$ac_includes_default
11711int
11712main ()
11713{
11714
11715 /* Are we little or big endian? From Harbison&Steele. */
11716 union
11717 {
11718 long int l;
11719 char c[sizeof (long int)];
11720 } u;
11721 u.l = 1;
11722 return u.c[sizeof (long int) - 1] == 1;
11723
11724 ;
11725 return 0;
11726}
11727_ACEOF
11728if ac_fn_c_try_run "$LINENO"; then :
11729 ac_cv_c_bigendian=no
11730else
11731 ac_cv_c_bigendian=yes
11732fi
11733rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11734 conftest.$ac_objext conftest.beam conftest.$ac_ext
11735fi
11736
11737 fi
11738fi
6ec2e0f5 11739:
88b48903
WN
11740 case $ac_cv_c_bigendian in #(
11741 yes)
6ec2e0f5 11742 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
88b48903 11743 no)
6ec2e0f5 11744 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
88b48903
WN
11745 universal)
11746
11747$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11748
11749 ;; #(
11750 *)
6ec2e0f5 11751 gl_cv_cc_double_expbit0="unknown" ;;
88b48903
WN
11752 esac
11753
11754
6ec2e0f5
SDJ
11755fi
11756rm -f conftest*
88b48903 11757
2196f55f 11758
2196f55f
YQ
11759else
11760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11761/* end confdefs.h. */
2196f55f 11762
6ec2e0f5
SDJ
11763#include <float.h>
11764#include <stddef.h>
11765#include <stdio.h>
11766#include <string.h>
11767#define NWORDS \
11768 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
11769typedef union { double value; unsigned int word[NWORDS]; } memory_double;
11770static unsigned int ored_words[NWORDS];
11771static unsigned int anded_words[NWORDS];
11772static void add_to_ored_words (double x)
2196f55f 11773{
6ec2e0f5
SDJ
11774 memory_double m;
11775 size_t i;
11776 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
11777 memset (&m, 0, sizeof (memory_double));
11778 m.value = x;
11779 for (i = 0; i < NWORDS; i++)
11780 {
11781 ored_words[i] |= m.word[i];
11782 anded_words[i] &= m.word[i];
11783 }
2196f55f 11784}
6ec2e0f5 11785int main ()
88b48903 11786{
6ec2e0f5
SDJ
11787 size_t j;
11788 FILE *fp = fopen ("conftest.out", "w");
11789 if (fp == NULL)
11790 return 1;
11791 for (j = 0; j < NWORDS; j++)
11792 anded_words[j] = ~ (unsigned int) 0;
11793 add_to_ored_words (0.25);
11794 add_to_ored_words (0.5);
11795 add_to_ored_words (1.0);
11796 add_to_ored_words (2.0);
11797 add_to_ored_words (4.0);
11798 /* Remove bits that are common (e.g. if representation of the first mantissa
11799 bit is explicit). */
11800 for (j = 0; j < NWORDS; j++)
11801 ored_words[j] &= ~anded_words[j];
11802 /* Now find the nonzero word. */
11803 for (j = 0; j < NWORDS; j++)
11804 if (ored_words[j] != 0)
11805 break;
11806 if (j < NWORDS)
11807 {
11808 size_t i;
11809 for (i = j + 1; i < NWORDS; i++)
11810 if (ored_words[i] != 0)
11811 {
11812 fprintf (fp, "unknown");
11813 return (fclose (fp) != 0);
11814 }
11815 for (i = 0; ; i++)
11816 if ((ored_words[j] >> i) & 1)
11817 {
11818 fprintf (fp, "word %d bit %d", (int) j, (int) i);
11819 return (fclose (fp) != 0);
11820 }
11821 }
11822 fprintf (fp, "unknown");
11823 return (fclose (fp) != 0);
88b48903 11824}
6ec2e0f5 11825
88b48903 11826_ACEOF
6ec2e0f5
SDJ
11827if ac_fn_c_try_run "$LINENO"; then :
11828 gl_cv_cc_double_expbit0=`cat conftest.out`
88b48903 11829else
6ec2e0f5 11830 gl_cv_cc_double_expbit0="unknown"
88b48903 11831fi
6ec2e0f5
SDJ
11832rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11833 conftest.$ac_objext conftest.beam conftest.$ac_ext
11834fi
11835
11836 rm -f conftest.out
88b48903
WN
11837
11838fi
6ec2e0f5
SDJ
11839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
11840$as_echo "$gl_cv_cc_double_expbit0" >&6; }
11841 case "$gl_cv_cc_double_expbit0" in
11842 word*bit*)
11843 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
11844 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
88b48903 11845
6ec2e0f5
SDJ
11846cat >>confdefs.h <<_ACEOF
11847#define DBL_EXPBIT0_WORD $word
11848_ACEOF
88b48903 11849
88b48903 11850
6ec2e0f5
SDJ
11851cat >>confdefs.h <<_ACEOF
11852#define DBL_EXPBIT0_BIT $bit
11853_ACEOF
88b48903 11854
6ec2e0f5
SDJ
11855 ;;
11856 esac
88b48903
WN
11857
11858
6ec2e0f5
SDJ
11859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11860$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
d0ac1c44 11861if ${ac_cv_c_bigendian+:} false; then :
6ec2e0f5
SDJ
11862 $as_echo_n "(cached) " >&6
11863else
11864 ac_cv_c_bigendian=unknown
11865 # See if we're dealing with a universal compiler.
11866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11867/* end confdefs.h. */
11868#ifndef __APPLE_CC__
11869 not a universal capable compiler
11870 #endif
11871 typedef int dummy;
88b48903 11872
6ec2e0f5
SDJ
11873_ACEOF
11874if ac_fn_c_try_compile "$LINENO"; then :
88b48903 11875
6ec2e0f5
SDJ
11876 # Check for potential -arch flags. It is not universal unless
11877 # there are at least two -arch flags with different values.
11878 ac_arch=
11879 ac_prev=
11880 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11881 if test -n "$ac_prev"; then
11882 case $ac_word in
11883 i?86 | x86_64 | ppc | ppc64)
11884 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11885 ac_arch=$ac_word
11886 else
11887 ac_cv_c_bigendian=universal
11888 break
11889 fi
11890 ;;
11891 esac
11892 ac_prev=
11893 elif test "x$ac_word" = "x-arch"; then
11894 ac_prev=arch
11895 fi
11896 done
11897fi
11898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11899 if test $ac_cv_c_bigendian = unknown; then
11900 # See if sys/param.h defines the BYTE_ORDER macro.
11901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11902/* end confdefs.h. */
11903#include <sys/types.h>
11904 #include <sys/param.h>
88b48903 11905
6ec2e0f5
SDJ
11906int
11907main ()
11908{
11909#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11910 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11911 && LITTLE_ENDIAN)
11912 bogus endian macros
11913 #endif
88b48903 11914
6ec2e0f5
SDJ
11915 ;
11916 return 0;
11917}
11918_ACEOF
11919if ac_fn_c_try_compile "$LINENO"; then :
11920 # It does; now see whether it defined to BIG_ENDIAN or not.
11921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
88b48903
WN
11922/* end confdefs.h. */
11923#include <sys/types.h>
6ec2e0f5 11924 #include <sys/param.h>
8690e634
JK
11925
11926int
11927main ()
11928{
6ec2e0f5
SDJ
11929#if BYTE_ORDER != BIG_ENDIAN
11930 not big endian
11931 #endif
8690e634 11932
8690e634
JK
11933 ;
11934 return 0;
11935}
11936_ACEOF
6ec2e0f5
SDJ
11937if ac_fn_c_try_compile "$LINENO"; then :
11938 ac_cv_c_bigendian=yes
8690e634 11939else
6ec2e0f5 11940 ac_cv_c_bigendian=no
8690e634 11941fi
6ec2e0f5 11942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 11943fi
6ec2e0f5
SDJ
11944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11945 fi
11946 if test $ac_cv_c_bigendian = unknown; then
11947 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11949/* end confdefs.h. */
11950#include <limits.h>
11951
11952int
11953main ()
11954{
11955#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11956 bogus endian macros
11957 #endif
11958
11959 ;
11960 return 0;
11961}
11962_ACEOF
11963if ac_fn_c_try_compile "$LINENO"; then :
11964 # It does; now see whether it defined to _BIG_ENDIAN or not.
11965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11966/* end confdefs.h. */
11967#include <limits.h>
8690e634 11968
6ec2e0f5
SDJ
11969int
11970main ()
11971{
11972#ifndef _BIG_ENDIAN
11973 not big endian
11974 #endif
11975
11976 ;
11977 return 0;
11978}
11979_ACEOF
11980if ac_fn_c_try_compile "$LINENO"; then :
11981 ac_cv_c_bigendian=yes
11982else
11983 ac_cv_c_bigendian=no
8690e634 11984fi
6ec2e0f5
SDJ
11985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11986fi
11987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11988 fi
11989 if test $ac_cv_c_bigendian = unknown; then
11990 # Compile a test program.
11991 if test "$cross_compiling" = yes; then :
11992 # Try to guess by grepping values from an object file.
11993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11994/* end confdefs.h. */
11995short int ascii_mm[] =
11996 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11997 short int ascii_ii[] =
11998 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11999 int use_ascii (int i) {
12000 return ascii_mm[i] + ascii_ii[i];
12001 }
12002 short int ebcdic_ii[] =
12003 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12004 short int ebcdic_mm[] =
12005 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12006 int use_ebcdic (int i) {
12007 return ebcdic_mm[i] + ebcdic_ii[i];
12008 }
12009 extern int foo;
8690e634 12010
6ec2e0f5
SDJ
12011int
12012main ()
12013{
12014return use_ascii (foo) == use_ebcdic (foo);
12015 ;
12016 return 0;
12017}
12018_ACEOF
12019if ac_fn_c_try_compile "$LINENO"; then :
12020 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12021 ac_cv_c_bigendian=yes
12022 fi
12023 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12024 if test "$ac_cv_c_bigendian" = unknown; then
12025 ac_cv_c_bigendian=no
12026 else
12027 # finding both strings is unlikely to happen, but who knows?
12028 ac_cv_c_bigendian=unknown
12029 fi
12030 fi
12031fi
12032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12033else
12034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12035/* end confdefs.h. */
12036$ac_includes_default
12037int
12038main ()
12039{
8690e634 12040
6ec2e0f5
SDJ
12041 /* Are we little or big endian? From Harbison&Steele. */
12042 union
12043 {
12044 long int l;
12045 char c[sizeof (long int)];
12046 } u;
12047 u.l = 1;
12048 return u.c[sizeof (long int) - 1] == 1;
12049
12050 ;
12051 return 0;
12052}
8690e634 12053_ACEOF
6ec2e0f5
SDJ
12054if ac_fn_c_try_run "$LINENO"; then :
12055 ac_cv_c_bigendian=no
12056else
12057 ac_cv_c_bigendian=yes
12058fi
12059rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12060 conftest.$ac_objext conftest.beam conftest.$ac_ext
12061fi
12062
12063 fi
12064fi
12065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12066$as_echo "$ac_cv_c_bigendian" >&6; }
12067 case $ac_cv_c_bigendian in #(
12068 yes)
12069 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12070;; #(
12071 no)
12072 ;; #(
12073 universal)
8690e634 12074
6ec2e0f5 12075$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
8690e634 12076
6ec2e0f5
SDJ
12077 ;; #(
12078 *)
d0ac1c44 12079 as_fn_error $? "unknown endianness
6ec2e0f5
SDJ
12080 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12081 esac
8690e634 12082
6ec2e0f5
SDJ
12083
12084
12085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12086$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 12087if ${am_cv_langinfo_codeset+:} false; then :
6ec2e0f5
SDJ
12088 $as_echo_n "(cached) " >&6
12089else
12090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12091/* end confdefs.h. */
12092#include <langinfo.h>
12093int
12094main ()
12095{
12096char* cs = nl_langinfo(CODESET); return !cs;
12097 ;
12098 return 0;
12099}
8690e634 12100_ACEOF
6ec2e0f5
SDJ
12101if ac_fn_c_try_link "$LINENO"; then :
12102 am_cv_langinfo_codeset=yes
12103else
12104 am_cv_langinfo_codeset=no
12105fi
12106rm -f core conftest.err conftest.$ac_objext \
12107 conftest$ac_exeext conftest.$ac_ext
12108
12109fi
12110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12111$as_echo "$am_cv_langinfo_codeset" >&6; }
12112 if test $am_cv_langinfo_codeset = yes; then
12113
12114$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8690e634 12115
6ec2e0f5 12116 fi
8690e634 12117
472fa5ee 12118
5e8754f9
SDJ
12119 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
12120if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
12121 ac_have_decl=1
12122else
12123 ac_have_decl=0
12124fi
12125
12126cat >>confdefs.h <<_ACEOF
12127#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
12128_ACEOF
12129
12130
12131
12132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
12133$as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
12134if ${ac_cv_gnu_library_2_1+:} false; then :
12135 $as_echo_n "(cached) " >&6
12136else
12137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12138/* end confdefs.h. */
12139
12140#include <features.h>
12141#ifdef __GNU_LIBRARY__
12142 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
12143 Lucky GNU user
12144 #endif
12145#endif
12146#ifdef __UCLIBC__
12147 Lucky user
12148#endif
12149
12150_ACEOF
12151if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12152 $EGREP "Lucky" >/dev/null 2>&1; then :
12153 ac_cv_gnu_library_2_1=yes
12154else
12155 ac_cv_gnu_library_2_1=no
12156fi
12157rm -f conftest*
12158
12159
12160
12161fi
12162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
12163$as_echo "$ac_cv_gnu_library_2_1" >&6; }
12164
12165 GLIBC21="$ac_cv_gnu_library_2_1"
12166
12167
12168
f45c62c4
YQ
12169
12170
472fa5ee
SM
12171
12172
12173
6ec2e0f5
SDJ
12174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
12175$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
d0ac1c44 12176if ${gl_cv_func_malloc_posix+:} false; then :
f45c62c4
YQ
12177 $as_echo_n "(cached) " >&6
12178else
f45c62c4 12179
6ec2e0f5 12180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f45c62c4 12181/* end confdefs.h. */
6ec2e0f5 12182
f45c62c4
YQ
12183int
12184main ()
12185{
5e8754f9 12186#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6ec2e0f5
SDJ
12187 choke me
12188 #endif
f45c62c4
YQ
12189
12190 ;
12191 return 0;
12192}
12193_ACEOF
6ec2e0f5
SDJ
12194if ac_fn_c_try_compile "$LINENO"; then :
12195 gl_cv_func_malloc_posix=yes
f45c62c4 12196else
6ec2e0f5 12197 gl_cv_func_malloc_posix=no
f45c62c4 12198fi
6ec2e0f5 12199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6a29c58e
YQ
12200
12201fi
12202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
12203$as_echo "$gl_cv_func_malloc_posix" >&6; }
12204
12205
12206
12207 for ac_header in stdlib.h
98399780
YQ
12208do :
12209 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
d0ac1c44 12210if test "x$ac_cv_header_stdlib_h" = xyes; then :
98399780
YQ
12211 cat >>confdefs.h <<_ACEOF
12212#define HAVE_STDLIB_H 1
12213_ACEOF
12214
12215fi
12216
12217done
12218
6a29c58e 12219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
98399780 12220$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
d0ac1c44 12221if ${ac_cv_func_malloc_0_nonnull+:} false; then :
98399780
YQ
12222 $as_echo_n "(cached) " >&6
12223else
12224 if test "$cross_compiling" = yes; then :
6a29c58e
YQ
12225 case "$host_os" in
12226 # Guess yes on platforms where we know the result.
5e8754f9 12227 *-gnu* | freebsd* | netbsd* | openbsd* \
6a29c58e
YQ
12228 | hpux* | solaris* | cygwin* | mingw*)
12229 ac_cv_func_malloc_0_nonnull=yes ;;
12230 # If we don't know, assume the worst.
12231 *) ac_cv_func_malloc_0_nonnull=no ;;
12232 esac
12233
98399780
YQ
12234else
12235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12236/* end confdefs.h. */
12237#if defined STDC_HEADERS || defined HAVE_STDLIB_H
6a29c58e
YQ
12238 # include <stdlib.h>
12239 #else
12240 char *malloc ();
12241 #endif
98399780
YQ
12242
12243int
12244main ()
12245{
49e4877c
PA
12246char *p = malloc (0);
12247 int result = !p;
12248 free (p);
12249 return result;
98399780
YQ
12250 ;
12251 return 0;
12252}
6a29c58e 12253
98399780
YQ
12254_ACEOF
12255if ac_fn_c_try_run "$LINENO"; then :
12256 ac_cv_func_malloc_0_nonnull=yes
12257else
12258 ac_cv_func_malloc_0_nonnull=no
12259fi
12260rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12261 conftest.$ac_objext conftest.beam conftest.$ac_ext
12262fi
12263
6a29c58e 12264
98399780
YQ
12265fi
12266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
12267$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
6a29c58e 12268 if test $ac_cv_func_malloc_0_nonnull = yes; then :
98399780
YQ
12269 gl_cv_func_malloc_0_nonnull=1
12270else
12271 gl_cv_func_malloc_0_nonnull=0
12272fi
12273
12274
12275cat >>confdefs.h <<_ACEOF
12276#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
12277_ACEOF
12278
12279
12280
88b48903
WN
12281
12282
472fa5ee
SM
12283
12284
12285
8690e634
JK
12286 GNULIB_BTOWC=0;
12287 GNULIB_WCTOB=0;
12288 GNULIB_MBSINIT=0;
12289 GNULIB_MBRTOWC=0;
12290 GNULIB_MBRLEN=0;
12291 GNULIB_MBSRTOWCS=0;
12292 GNULIB_MBSNRTOWCS=0;
12293 GNULIB_WCRTOMB=0;
12294 GNULIB_WCSRTOMBS=0;
12295 GNULIB_WCSNRTOMBS=0;
12296 GNULIB_WCWIDTH=0;
12297 GNULIB_WMEMCHR=0;
12298 GNULIB_WMEMCMP=0;
12299 GNULIB_WMEMCPY=0;
12300 GNULIB_WMEMMOVE=0;
12301 GNULIB_WMEMSET=0;
12302 GNULIB_WCSLEN=0;
12303 GNULIB_WCSNLEN=0;
12304 GNULIB_WCSCPY=0;
12305 GNULIB_WCPCPY=0;
12306 GNULIB_WCSNCPY=0;
12307 GNULIB_WCPNCPY=0;
12308 GNULIB_WCSCAT=0;
12309 GNULIB_WCSNCAT=0;
12310 GNULIB_WCSCMP=0;
12311 GNULIB_WCSNCMP=0;
12312 GNULIB_WCSCASECMP=0;
12313 GNULIB_WCSNCASECMP=0;
12314 GNULIB_WCSCOLL=0;
12315 GNULIB_WCSXFRM=0;
12316 GNULIB_WCSDUP=0;
12317 GNULIB_WCSCHR=0;
12318 GNULIB_WCSRCHR=0;
12319 GNULIB_WCSCSPN=0;
12320 GNULIB_WCSSPN=0;
12321 GNULIB_WCSPBRK=0;
12322 GNULIB_WCSSTR=0;
12323 GNULIB_WCSTOK=0;
12324 GNULIB_WCSWIDTH=0;
12325 HAVE_BTOWC=1;
12326 HAVE_MBSINIT=1;
12327 HAVE_MBRTOWC=1;
12328 HAVE_MBRLEN=1;
12329 HAVE_MBSRTOWCS=1;
12330 HAVE_MBSNRTOWCS=1;
12331 HAVE_WCRTOMB=1;
12332 HAVE_WCSRTOMBS=1;
12333 HAVE_WCSNRTOMBS=1;
12334 HAVE_WMEMCHR=1;
12335 HAVE_WMEMCMP=1;
12336 HAVE_WMEMCPY=1;
12337 HAVE_WMEMMOVE=1;
12338 HAVE_WMEMSET=1;
12339 HAVE_WCSLEN=1;
12340 HAVE_WCSNLEN=1;
12341 HAVE_WCSCPY=1;
12342 HAVE_WCPCPY=1;
12343 HAVE_WCSNCPY=1;
12344 HAVE_WCPNCPY=1;
12345 HAVE_WCSCAT=1;
12346 HAVE_WCSNCAT=1;
12347 HAVE_WCSCMP=1;
12348 HAVE_WCSNCMP=1;
12349 HAVE_WCSCASECMP=1;
12350 HAVE_WCSNCASECMP=1;
12351 HAVE_WCSCOLL=1;
12352 HAVE_WCSXFRM=1;
12353 HAVE_WCSDUP=1;
12354 HAVE_WCSCHR=1;
12355 HAVE_WCSRCHR=1;
12356 HAVE_WCSCSPN=1;
12357 HAVE_WCSSPN=1;
12358 HAVE_WCSPBRK=1;
12359 HAVE_WCSSTR=1;
12360 HAVE_WCSTOK=1;
12361 HAVE_WCSWIDTH=1;
12362 HAVE_DECL_WCTOB=1;
12363 HAVE_DECL_WCWIDTH=1;
12364 REPLACE_MBSTATE_T=0;
12365 REPLACE_BTOWC=0;
12366 REPLACE_WCTOB=0;
12367 REPLACE_MBSINIT=0;
12368 REPLACE_MBRTOWC=0;
12369 REPLACE_MBRLEN=0;
12370 REPLACE_MBSRTOWCS=0;
12371 REPLACE_MBSNRTOWCS=0;
12372 REPLACE_WCRTOMB=0;
12373 REPLACE_WCSRTOMBS=0;
12374 REPLACE_WCSNRTOMBS=0;
12375 REPLACE_WCWIDTH=0;
12376 REPLACE_WCSWIDTH=0;
12377
12378
12379
12380
12381
12382
12383
12384
472fa5ee
SM
12385
12386
12387
12388
12389
12390
8690e634
JK
12391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
12392$as_echo_n "checking for a traditional japanese locale... " >&6; }
d0ac1c44 12393if ${gt_cv_locale_ja+:} false; then :
8690e634
JK
12394 $as_echo_n "(cached) " >&6
12395else
12396
12397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12398/* end confdefs.h. */
12399
12400#include <locale.h>
12401#include <time.h>
12402#if HAVE_LANGINFO_CODESET
12403# include <langinfo.h>
12404#endif
12405#include <stdlib.h>
12406#include <string.h>
12407struct tm t;
12408char buf[16];
12409int main ()
12410{
5e8754f9 12411 const char *p;
8690e634 12412 /* Check whether the given locale name is recognized by the system. */
5e8754f9 12413#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8690e634
JK
12414 /* On native Windows, setlocale(category, "") looks at the system settings,
12415 not at the environment variables. Also, when an encoding suffix such
12416 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
12417 category of the locale to "C". */
12418 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
12419 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
12420 return 1;
5e8754f9 12421#else
8690e634 12422 if (setlocale (LC_ALL, "") == NULL) return 1;
5e8754f9 12423#endif
8690e634
JK
12424 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
12425 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
12426 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
12427 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
12428 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
12429 some unit tests fail.
12430 On MirBSD 10, when an unsupported locale is specified, setlocale()
12431 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
5e8754f9 12432#if HAVE_LANGINFO_CODESET
8690e634
JK
12433 {
12434 const char *cs = nl_langinfo (CODESET);
12435 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
12436 || strcmp (cs, "UTF-8") == 0)
12437 return 1;
12438 }
5e8754f9
SDJ
12439#endif
12440#ifdef __CYGWIN__
8690e634
JK
12441 /* On Cygwin, avoid locale names without encoding suffix, because the
12442 locale_charset() function relies on the encoding suffix. Note that
12443 LC_ALL is set on the command line. */
12444 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
5e8754f9 12445#endif
8690e634
JK
12446 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
12447 on Cygwin 1.5.x. */
12448 if (MB_CUR_MAX == 1)
12449 return 1;
12450 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
12451 This excludes the UTF-8 encoding (except on MirBSD). */
5e8754f9
SDJ
12452 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
12453 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
12454 for (p = buf; *p != '\0'; p++)
12455 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
12456 return 1;
8690e634
JK
12457 return 0;
12458}
12459
12460_ACEOF
12461 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12462 (eval $ac_link) 2>&5
12463 ac_status=$?
12464 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12465 test $ac_status = 0; } && test -s conftest$ac_exeext; then
12466 case "$host_os" in
12467 # Handle native Windows specially, because there setlocale() interprets
12468 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
12469 # "fr" or "fra" as "French" or "French_France.1252",
12470 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
12471 # "ja" as "Japanese" or "Japanese_Japan.932",
12472 # and similar.
12473 mingw*)
12474 # Note that on native Windows, the Japanese locale is
12475 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
12476 # cannot use it here.
12477 gt_cv_locale_ja=none
12478 ;;
12479 *)
12480 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
12481 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
12482 # configure script would override the LC_ALL setting. Likewise for
12483 # LC_CTYPE, which is also set at the beginning of the configure script.
12484 # Test for the AIX locale name.
12485 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12486 gt_cv_locale_ja=ja_JP
12487 else
12488 # Test for the locale name with explicit encoding suffix.
12489 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12490 gt_cv_locale_ja=ja_JP.EUC-JP
12491 else
12492 # Test for the HP-UX, OSF/1, NetBSD locale name.
12493 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12494 gt_cv_locale_ja=ja_JP.eucJP
12495 else
12496 # Test for the IRIX, FreeBSD locale name.
12497 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12498 gt_cv_locale_ja=ja_JP.EUC
12499 else
12500 # Test for the Solaris 7 locale name.
12501 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12502 gt_cv_locale_ja=ja
12503 else
12504 # Special test for NetBSD 1.6.
12505 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
12506 gt_cv_locale_ja=ja_JP.eucJP
12507 else
12508 # None found.
12509 gt_cv_locale_ja=none
12510 fi
12511 fi
12512 fi
12513 fi
12514 fi
12515 fi
12516 ;;
12517 esac
12518 fi
12519 rm -fr conftest*
12520
12521fi
12522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
12523$as_echo "$gt_cv_locale_ja" >&6; }
12524 LOCALE_JA=$gt_cv_locale_ja
12525
12526
12527
12528
12529
12530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
12531$as_echo_n "checking for a transitional chinese locale... " >&6; }
d0ac1c44 12532if ${gt_cv_locale_zh_CN+:} false; then :
8690e634
JK
12533 $as_echo_n "(cached) " >&6
12534else
12535
12536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12537/* end confdefs.h. */
12538
12539#include <locale.h>
12540#include <stdlib.h>
12541#include <time.h>
12542#if HAVE_LANGINFO_CODESET
12543# include <langinfo.h>
12544#endif
12545#include <stdlib.h>
12546#include <string.h>
12547struct tm t;
12548char buf[16];
12549int main ()
12550{
5e8754f9 12551 const char *p;
8690e634 12552 /* Check whether the given locale name is recognized by the system. */
5e8754f9 12553#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8690e634
JK
12554 /* On native Windows, setlocale(category, "") looks at the system settings,
12555 not at the environment variables. Also, when an encoding suffix such
12556 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
12557 category of the locale to "C". */
12558 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
12559 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
12560 return 1;
5e8754f9 12561#else
8690e634 12562 if (setlocale (LC_ALL, "") == NULL) return 1;
5e8754f9 12563#endif
8690e634
JK
12564 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
12565 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
12566 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
12567 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
12568 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
12569 some unit tests fail.
12570 On MirBSD 10, when an unsupported locale is specified, setlocale()
12571 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
5e8754f9 12572#if HAVE_LANGINFO_CODESET
8690e634
JK
12573 {
12574 const char *cs = nl_langinfo (CODESET);
12575 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
12576 || strcmp (cs, "UTF-8") == 0)
12577 return 1;
12578 }
5e8754f9
SDJ
12579#endif
12580#ifdef __CYGWIN__
8690e634
JK
12581 /* On Cygwin, avoid locale names without encoding suffix, because the
12582 locale_charset() function relies on the encoding suffix. Note that
12583 LC_ALL is set on the command line. */
12584 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
5e8754f9 12585#endif
8690e634
JK
12586 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
12587 This excludes the UTF-8 encoding (except on MirBSD). */
5e8754f9
SDJ
12588 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
12589 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
12590 for (p = buf; *p != '\0'; p++)
12591 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
12592 return 1;
8690e634
JK
12593 /* Check whether a typical GB18030 multibyte sequence is recognized as a
12594 single wide character. This excludes the GB2312 and GBK encodings. */
12595 if (mblen ("\203\062\332\066", 5) != 4)
12596 return 1;
12597 return 0;
12598}
12599
12600_ACEOF
12601 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12602 (eval $ac_link) 2>&5
12603 ac_status=$?
12604 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12605 test $ac_status = 0; } && test -s conftest$ac_exeext; then
12606 case "$host_os" in
12607 # Handle native Windows specially, because there setlocale() interprets
12608 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
12609 # "fr" or "fra" as "French" or "French_France.1252",
12610 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
12611 # "ja" as "Japanese" or "Japanese_Japan.932",
12612 # and similar.
12613 mingw*)
12614 # Test for the hypothetical native Windows locale name.
12615 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12616 gt_cv_locale_zh_CN=Chinese_China.54936
12617 else
12618 # None found.
12619 gt_cv_locale_zh_CN=none
12620 fi
12621 ;;
12622 solaris2.8)
12623 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
12624 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
12625 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
12626 gt_cv_locale_zh_CN=none
12627 ;;
12628 *)
12629 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
12630 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
12631 # configure script would override the LC_ALL setting. Likewise for
12632 # LC_CTYPE, which is also set at the beginning of the configure script.
12633 # Test for the locale name without encoding suffix.
12634 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12635 gt_cv_locale_zh_CN=zh_CN
12636 else
12637 # Test for the locale name with explicit encoding suffix.
12638 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12639 gt_cv_locale_zh_CN=zh_CN.GB18030
12640 else
12641 # None found.
12642 gt_cv_locale_zh_CN=none
12643 fi
12644 fi
12645 ;;
12646 esac
12647 else
12648 # If there was a link error, due to mblen(), the system is so old that
12649 # it certainly doesn't have a chinese locale.
12650 gt_cv_locale_zh_CN=none
12651 fi
12652 rm -fr conftest*
12653
12654fi
12655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
12656$as_echo "$gt_cv_locale_zh_CN" >&6; }
12657 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
12658
12659
12660
12661
12662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
12663$as_echo_n "checking for a french Unicode locale... " >&6; }
d0ac1c44 12664if ${gt_cv_locale_fr_utf8+:} false; then :
8690e634
JK
12665 $as_echo_n "(cached) " >&6
12666else
12667
12668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12669/* end confdefs.h. */
12670
12671#include <locale.h>
12672#include <time.h>
12673#if HAVE_LANGINFO_CODESET
12674# include <langinfo.h>
12675#endif
12676#include <stdlib.h>
12677#include <string.h>
12678struct tm t;
12679char buf[16];
12680int main () {
12681 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
12682 imitates locale dependent behaviour by looking at the environment
12683 variables, and all locales use the UTF-8 encoding. */
12684#if !(defined __BEOS__ || defined __HAIKU__)
12685 /* Check whether the given locale name is recognized by the system. */
5e8754f9 12686# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8690e634
JK
12687 /* On native Windows, setlocale(category, "") looks at the system settings,
12688 not at the environment variables. Also, when an encoding suffix such
12689 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
12690 category of the locale to "C". */
12691 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
12692 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
12693 return 1;
12694# else
12695 if (setlocale (LC_ALL, "") == NULL) return 1;
12696# endif
12697 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
12698 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
12699 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
12700 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
12701 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
12702 some unit tests fail. */
12703# if HAVE_LANGINFO_CODESET
12704 {
12705 const char *cs = nl_langinfo (CODESET);
12706 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
12707 return 1;
12708 }
12709# endif
12710# ifdef __CYGWIN__
12711 /* On Cygwin, avoid locale names without encoding suffix, because the
12712 locale_charset() function relies on the encoding suffix. Note that
12713 LC_ALL is set on the command line. */
12714 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
12715# endif
12716 /* Check whether in the abbreviation of the second month, the second
12717 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
12718 two bytes long, with UTF-8 encoding. */
12719 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
12720 if (strftime (buf, sizeof (buf), "%b", &t) < 4
12721 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
12722 return 1;
12723#endif
12724#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
12725 /* Check whether the decimal separator is a comma.
12726 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
12727 are nl_langinfo(RADIXCHAR) are both ".". */
12728 if (localeconv () ->decimal_point[0] != ',') return 1;
12729#endif
12730 return 0;
12731}
12732
12733_ACEOF
12734 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12735 (eval $ac_link) 2>&5
12736 ac_status=$?
12737 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12738 test $ac_status = 0; } && test -s conftest$ac_exeext; then
12739 case "$host_os" in
12740 # Handle native Windows specially, because there setlocale() interprets
12741 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
12742 # "fr" or "fra" as "French" or "French_France.1252",
12743 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
12744 # "ja" as "Japanese" or "Japanese_Japan.932",
12745 # and similar.
12746 mingw*)
12747 # Test for the hypothetical native Windows locale name.
12748 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12749 gt_cv_locale_fr_utf8=French_France.65001
12750 else
12751 # None found.
12752 gt_cv_locale_fr_utf8=none
12753 fi
12754 ;;
12755 *)
12756 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
12757 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
12758 # configure script would override the LC_ALL setting. Likewise for
12759 # LC_CTYPE, which is also set at the beginning of the configure script.
12760 # Test for the usual locale name.
12761 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12762 gt_cv_locale_fr_utf8=fr_FR
12763 else
12764 # Test for the locale name with explicit encoding suffix.
12765 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12766 gt_cv_locale_fr_utf8=fr_FR.UTF-8
12767 else
12768 # Test for the Solaris 7 locale name.
12769 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12770 gt_cv_locale_fr_utf8=fr.UTF-8
12771 else
12772 # None found.
12773 gt_cv_locale_fr_utf8=none
12774 fi
12775 fi
12776 fi
12777 ;;
12778 esac
12779 fi
12780 rm -fr conftest*
12781
12782fi
12783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
12784$as_echo "$gt_cv_locale_fr_utf8" >&6; }
12785 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
12786
12787
12788
12789
12790
12791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
12792$as_echo_n "checking for a traditional french locale... " >&6; }
d0ac1c44 12793if ${gt_cv_locale_fr+:} false; then :
8690e634
JK
12794 $as_echo_n "(cached) " >&6
12795else
12796
12797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12798/* end confdefs.h. */
12799
12800#include <locale.h>
12801#include <time.h>
12802#if HAVE_LANGINFO_CODESET
12803# include <langinfo.h>
12804#endif
12805#include <stdlib.h>
12806#include <string.h>
12807struct tm t;
12808char buf[16];
12809int main () {
12810 /* Check whether the given locale name is recognized by the system. */
5e8754f9 12811#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8690e634
JK
12812 /* On native Windows, setlocale(category, "") looks at the system settings,
12813 not at the environment variables. Also, when an encoding suffix such
12814 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
12815 category of the locale to "C". */
12816 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
12817 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
12818 return 1;
5e8754f9 12819#else
8690e634 12820 if (setlocale (LC_ALL, "") == NULL) return 1;
5e8754f9 12821#endif
8690e634
JK
12822 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
12823 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
12824 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
12825 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
12826 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
12827 some unit tests fail.
12828 On MirBSD 10, when an unsupported locale is specified, setlocale()
12829 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
5e8754f9 12830#if HAVE_LANGINFO_CODESET
8690e634
JK
12831 {
12832 const char *cs = nl_langinfo (CODESET);
12833 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
12834 || strcmp (cs, "UTF-8") == 0)
12835 return 1;
12836 }
5e8754f9
SDJ
12837#endif
12838#ifdef __CYGWIN__
8690e634
JK
12839 /* On Cygwin, avoid locale names without encoding suffix, because the
12840 locale_charset() function relies on the encoding suffix. Note that
12841 LC_ALL is set on the command line. */
12842 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
5e8754f9 12843#endif
8690e634
JK
12844 /* Check whether in the abbreviation of the second month, the second
12845 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
12846 one byte long. This excludes the UTF-8 encoding. */
12847 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
12848 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
5e8754f9 12849#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
8690e634
JK
12850 /* Check whether the decimal separator is a comma.
12851 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
12852 are nl_langinfo(RADIXCHAR) are both ".". */
12853 if (localeconv () ->decimal_point[0] != ',') return 1;
7a6dbc2f 12854#endif
5e8754f9 12855 return 0;
8690e634
JK
12856}
12857
12858_ACEOF
12859 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12860 (eval $ac_link) 2>&5
12861 ac_status=$?
12862 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12863 test $ac_status = 0; } && test -s conftest$ac_exeext; then
12864 case "$host_os" in
12865 # Handle native Windows specially, because there setlocale() interprets
12866 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
12867 # "fr" or "fra" as "French" or "French_France.1252",
12868 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
12869 # "ja" as "Japanese" or "Japanese_Japan.932",
12870 # and similar.
12871 mingw*)
12872 # Test for the native Windows locale name.
12873 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12874 gt_cv_locale_fr=French_France.1252
12875 else
12876 # None found.
12877 gt_cv_locale_fr=none
12878 fi
12879 ;;
12880 *)
12881 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
12882 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
12883 # configure script would override the LC_ALL setting. Likewise for
12884 # LC_CTYPE, which is also set at the beginning of the configure script.
12885 # Test for the usual locale name.
12886 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12887 gt_cv_locale_fr=fr_FR
12888 else
12889 # Test for the locale name with explicit encoding suffix.
12890 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12891 gt_cv_locale_fr=fr_FR.ISO-8859-1
12892 else
12893 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
12894 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12895 gt_cv_locale_fr=fr_FR.ISO8859-1
12896 else
12897 # Test for the HP-UX locale name.
12898 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12899 gt_cv_locale_fr=fr_FR.iso88591
12900 else
12901 # Test for the Solaris 7 locale name.
12902 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12903 gt_cv_locale_fr=fr
12904 else
12905 # None found.
12906 gt_cv_locale_fr=none
12907 fi
12908 fi
12909 fi
12910 fi
12911 fi
12912 ;;
12913 esac
12914 fi
12915 rm -fr conftest*
12916
12917fi
6ec2e0f5
SDJ
12918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
12919$as_echo "$gt_cv_locale_fr" >&6; }
12920 LOCALE_FR=$gt_cv_locale_fr
12921
12922
12923
12924
12925
12926
12927
472fa5ee
SM
12928
12929
12930
12931
12932
12933
12934 GNULIB_FFSL=0;
12935 GNULIB_FFSLL=0;
6ec2e0f5
SDJ
12936 GNULIB_MEMCHR=0;
12937 GNULIB_MEMMEM=0;
12938 GNULIB_MEMPCPY=0;
12939 GNULIB_MEMRCHR=0;
12940 GNULIB_RAWMEMCHR=0;
12941 GNULIB_STPCPY=0;
12942 GNULIB_STPNCPY=0;
12943 GNULIB_STRCHRNUL=0;
12944 GNULIB_STRDUP=0;
12945 GNULIB_STRNCAT=0;
12946 GNULIB_STRNDUP=0;
12947 GNULIB_STRNLEN=0;
12948 GNULIB_STRPBRK=0;
12949 GNULIB_STRSEP=0;
12950 GNULIB_STRSTR=0;
12951 GNULIB_STRCASESTR=0;
12952 GNULIB_STRTOK_R=0;
12953 GNULIB_MBSLEN=0;
12954 GNULIB_MBSNLEN=0;
12955 GNULIB_MBSCHR=0;
12956 GNULIB_MBSRCHR=0;
12957 GNULIB_MBSSTR=0;
12958 GNULIB_MBSCASECMP=0;
12959 GNULIB_MBSNCASECMP=0;
12960 GNULIB_MBSPCASECMP=0;
12961 GNULIB_MBSCASESTR=0;
12962 GNULIB_MBSCSPN=0;
12963 GNULIB_MBSPBRK=0;
12964 GNULIB_MBSSPN=0;
12965 GNULIB_MBSSEP=0;
12966 GNULIB_MBSTOK_R=0;
12967 GNULIB_STRERROR=0;
12968 GNULIB_STRERROR_R=0;
12969 GNULIB_STRSIGNAL=0;
12970 GNULIB_STRVERSCMP=0;
12971 HAVE_MBSLEN=0;
5e8754f9 12972 HAVE_FFSL=1;
6ec2e0f5
SDJ
12973 HAVE_FFSLL=1;
12974 HAVE_MEMCHR=1;
12975 HAVE_DECL_MEMMEM=1;
12976 HAVE_MEMPCPY=1;
12977 HAVE_DECL_MEMRCHR=1;
12978 HAVE_RAWMEMCHR=1;
12979 HAVE_STPCPY=1;
12980 HAVE_STPNCPY=1;
12981 HAVE_STRCHRNUL=1;
12982 HAVE_DECL_STRDUP=1;
12983 HAVE_DECL_STRNDUP=1;
12984 HAVE_DECL_STRNLEN=1;
12985 HAVE_STRPBRK=1;
12986 HAVE_STRSEP=1;
12987 HAVE_STRCASESTR=1;
12988 HAVE_DECL_STRTOK_R=1;
12989 HAVE_DECL_STRERROR_R=1;
12990 HAVE_DECL_STRSIGNAL=1;
12991 HAVE_STRVERSCMP=1;
12992 REPLACE_MEMCHR=0;
12993 REPLACE_MEMMEM=0;
12994 REPLACE_STPNCPY=0;
12995 REPLACE_STRDUP=0;
12996 REPLACE_STRSTR=0;
12997 REPLACE_STRCASESTR=0;
5e8754f9 12998 REPLACE_STRCHRNUL=0;
6ec2e0f5
SDJ
12999 REPLACE_STRERROR=0;
13000 REPLACE_STRERROR_R=0;
5e8754f9
SDJ
13001 REPLACE_STRNCAT=0;
13002 REPLACE_STRNDUP=0;
13003 REPLACE_STRNLEN=0;
6ec2e0f5 13004 REPLACE_STRSIGNAL=0;
5e8754f9 13005 REPLACE_STRTOK_R=0;
6ec2e0f5
SDJ
13006 UNDEFINE_STRTOK_R=0;
13007
13008
13009
13010
13011
13012 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
13013 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
13014 # irrelevant for anonymous mappings.
13015 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
d0ac1c44 13016if test "x$ac_cv_func_mmap" = xyes; then :
6ec2e0f5
SDJ
13017 gl_have_mmap=yes
13018else
13019 gl_have_mmap=no
13020fi
13021
13022
13023 # Try to allow MAP_ANONYMOUS.
13024 gl_have_mmap_anonymous=no
13025 if test $gl_have_mmap = yes; then
13026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
13027$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
13028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13029/* end confdefs.h. */
13030
13031#include <sys/mman.h>
13032#ifdef MAP_ANONYMOUS
13033 I cannot identify this map
13034#endif
13035
13036_ACEOF
13037if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13038 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
13039 gl_have_mmap_anonymous=yes
13040fi
13041rm -f conftest*
13042
13043 if test $gl_have_mmap_anonymous != yes; then
13044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13045/* end confdefs.h. */
13046
13047#include <sys/mman.h>
13048#ifdef MAP_ANON
13049 I cannot identify this map
13050#endif
13051
13052_ACEOF
13053if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13054 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
13055
13056$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
13057
13058 gl_have_mmap_anonymous=yes
13059fi
13060rm -f conftest*
13061
13062 fi
13063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
13064$as_echo "$gl_have_mmap_anonymous" >&6; }
13065 if test $gl_have_mmap_anonymous = yes; then
13066
13067$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
13068
13069 fi
13070 fi
13071
13072
472fa5ee
SM
13073 :
13074
13075
13076
13077
13078
13079
13080 :
13081
13082
13083
13084
6ec2e0f5
SDJ
13085
13086
13087
13088
13089 if test $HAVE_MEMCHR = 1; then
13090 # Detect platform-specific bugs in some versions of glibc:
13091 # memchr should not dereference anything with length 0
5e8754f9 13092 # http://bugzilla.redhat.com/499689
6ec2e0f5 13093 # memchr should not dereference overestimated length after a match
5e8754f9
SDJ
13094 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
13095 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
6ec2e0f5
SDJ
13096 # Assume that memchr works on platforms that lack mprotect.
13097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
13098$as_echo_n "checking whether memchr works... " >&6; }
d0ac1c44 13099if ${gl_cv_func_memchr_works+:} false; then :
6ec2e0f5
SDJ
13100 $as_echo_n "(cached) " >&6
13101else
13102 if test "$cross_compiling" = yes; then :
5e8754f9 13103 gl_cv_func_memchr_works="guessing no"
6ec2e0f5
SDJ
13104else
13105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13106/* end confdefs.h. */
13107
13108#include <string.h>
13109#if HAVE_SYS_MMAN_H
13110# include <fcntl.h>
13111# include <unistd.h>
13112# include <sys/types.h>
13113# include <sys/mman.h>
13114# ifndef MAP_FILE
13115# define MAP_FILE 0
13116# endif
13117#endif
13118
13119int
13120main ()
13121{
13122
13123 int result = 0;
13124 char *fence = NULL;
13125#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
13126# if HAVE_MAP_ANONYMOUS
13127 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
13128 const int fd = -1;
13129# else /* !HAVE_MAP_ANONYMOUS */
13130 const int flags = MAP_FILE | MAP_PRIVATE;
13131 int fd = open ("/dev/zero", O_RDONLY, 0666);
13132 if (fd >= 0)
13133# endif
13134 {
13135 int pagesize = getpagesize ();
13136 char *two_pages =
13137 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
13138 flags, fd, 0);
13139 if (two_pages != (char *)(-1)
13140 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
13141 fence = two_pages + pagesize;
13142 }
13143#endif
13144 if (fence)
13145 {
13146 if (memchr (fence, 0, 0))
13147 result |= 1;
13148 strcpy (fence - 9, "12345678");
13149 if (memchr (fence - 9, 0, 79) != fence - 1)
13150 result |= 2;
13151 if (memchr (fence - 1, 0, 3) != fence - 1)
13152 result |= 4;
13153 }
13154 return result;
13155
13156 ;
13157 return 0;
13158}
13159_ACEOF
13160if ac_fn_c_try_run "$LINENO"; then :
13161 gl_cv_func_memchr_works=yes
13162else
13163 gl_cv_func_memchr_works=no
13164fi
13165rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13166 conftest.$ac_objext conftest.beam conftest.$ac_ext
13167fi
13168
13169fi
13170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
13171$as_echo "$gl_cv_func_memchr_works" >&6; }
5e8754f9
SDJ
13172 if test "$gl_cv_func_memchr_works" != yes; then
13173 REPLACE_MEMCHR=1
13174 fi
6ec2e0f5
SDJ
13175 fi
13176
472fa5ee
SM
13177
13178 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
d0ac1c44 13179if test "x$ac_cv_have_decl_memmem" = xyes; then :
6ec2e0f5
SDJ
13180 ac_have_decl=1
13181else
13182 ac_have_decl=0
13183fi
13184
13185cat >>confdefs.h <<_ACEOF
13186#define HAVE_DECL_MEMMEM $ac_have_decl
13187_ACEOF
13188
13189
13190
13191
13192
472fa5ee 13193
6ec2e0f5
SDJ
13194 for ac_func in memmem
13195do :
13196 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
d0ac1c44 13197if test "x$ac_cv_func_memmem" = xyes; then :
6ec2e0f5
SDJ
13198 cat >>confdefs.h <<_ACEOF
13199#define HAVE_MEMMEM 1
13200_ACEOF
13201
13202fi
13203done
13204
13205 if test $ac_cv_func_memmem = yes; then
13206 HAVE_MEMMEM=1
13207 else
13208 HAVE_MEMMEM=0
13209 fi
13210
472fa5ee
SM
13211 :
13212
13213
13214
13215
13216
6ec2e0f5
SDJ
13217 if test $ac_cv_have_decl_memmem = no; then
13218 HAVE_DECL_MEMMEM=0
13219 else
13220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
13221$as_echo_n "checking whether memmem works... " >&6; }
d0ac1c44 13222if ${gl_cv_func_memmem_works_always+:} false; then :
6ec2e0f5
SDJ
13223 $as_echo_n "(cached) " >&6
13224else
13225 if test "$cross_compiling" = yes; then :
13226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13227/* end confdefs.h. */
13228
13229#ifdef __GNU_LIBRARY__
13230 #include <features.h>
13231 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
13232 || __GLIBC_MINOR__ > 12)) \
13233 || (__GLIBC__ > 2)) \
13234 || defined __UCLIBC__
13235 Lucky user
13236 #endif
13237#elif defined __CYGWIN__
13238 #include <cygwin/version.h>
13239 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
13240 Lucky user
13241 #endif
13242#else
13243 Lucky user
13244#endif
13245
13246_ACEOF
13247if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13248 $EGREP "Lucky user" >/dev/null 2>&1; then :
13249 gl_cv_func_memmem_works_always="guessing yes"
13250else
13251 gl_cv_func_memmem_works_always="guessing no"
13252fi
13253rm -f conftest*
13254
13255
13256else
13257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13258/* end confdefs.h. */
13259
13260#include <string.h> /* for memmem */
13261#define P "_EF_BF_BD"
13262#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
13263#define NEEDLE P P P P P
13264
13265int
13266main ()
13267{
13268
13269 int result = 0;
13270 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
13271 result |= 1;
13272 /* Check for empty needle behavior. */
13273 {
13274 const char *haystack = "AAA";
13275 if (memmem (haystack, 3, NULL, 0) != haystack)
13276 result |= 2;
13277 }
13278 return result;
13279
13280 ;
13281 return 0;
13282}
13283_ACEOF
13284if ac_fn_c_try_run "$LINENO"; then :
13285 gl_cv_func_memmem_works_always=yes
13286else
13287 gl_cv_func_memmem_works_always=no
13288fi
13289rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13290 conftest.$ac_objext conftest.beam conftest.$ac_ext
13291fi
13292
13293
13294fi
13295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
13296$as_echo "$gl_cv_func_memmem_works_always" >&6; }
13297 case "$gl_cv_func_memmem_works_always" in
13298 *yes) ;;
13299 *)
13300 REPLACE_MEMMEM=1
13301 ;;
13302 esac
13303 fi
13304 :
13305
472fa5ee
SM
13306
13307 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
d0ac1c44 13308if test "x$ac_cv_have_decl_memrchr" = xyes; then :
6ec2e0f5
SDJ
13309 ac_have_decl=1
13310else
13311 ac_have_decl=0
13312fi
13313
13314cat >>confdefs.h <<_ACEOF
13315#define HAVE_DECL_MEMRCHR $ac_have_decl
13316_ACEOF
13317
13318
13319
13320
13321
13322
2d8adcbd
MM
13323
13324
472fa5ee
SM
13325
13326
13327
13328
6ec2e0f5
SDJ
13329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
13330$as_echo_n "checking for promoted mode_t type... " >&6; }
d0ac1c44 13331if ${gl_cv_promoted_mode_t+:} false; then :
6ec2e0f5
SDJ
13332 $as_echo_n "(cached) " >&6
13333else
13334
13335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13336/* end confdefs.h. */
13337#include <sys/types.h>
13338int
13339main ()
13340{
13341typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
13342 ;
13343 return 0;
13344}
13345_ACEOF
13346if ac_fn_c_try_compile "$LINENO"; then :
13347 gl_cv_promoted_mode_t='int'
13348else
13349 gl_cv_promoted_mode_t='mode_t'
13350fi
13351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13352
13353fi
13354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
13355$as_echo "$gl_cv_promoted_mode_t" >&6; }
13356
13357cat >>confdefs.h <<_ACEOF
13358#define PROMOTED_MODE_T $gl_cv_promoted_mode_t
13359_ACEOF
13360
13361
13362
13363
13364
472fa5ee
SM
13365
13366
13367
6ec2e0f5
SDJ
13368 GNULIB_DPRINTF=0;
13369 GNULIB_FCLOSE=0;
13370 GNULIB_FDOPEN=0;
13371 GNULIB_FFLUSH=0;
13372 GNULIB_FGETC=0;
13373 GNULIB_FGETS=0;
13374 GNULIB_FOPEN=0;
13375 GNULIB_FPRINTF=0;
13376 GNULIB_FPRINTF_POSIX=0;
13377 GNULIB_FPURGE=0;
13378 GNULIB_FPUTC=0;
13379 GNULIB_FPUTS=0;
13380 GNULIB_FREAD=0;
13381 GNULIB_FREOPEN=0;
13382 GNULIB_FSCANF=0;
13383 GNULIB_FSEEK=0;
13384 GNULIB_FSEEKO=0;
13385 GNULIB_FTELL=0;
13386 GNULIB_FTELLO=0;
13387 GNULIB_FWRITE=0;
13388 GNULIB_GETC=0;
13389 GNULIB_GETCHAR=0;
13390 GNULIB_GETDELIM=0;
13391 GNULIB_GETLINE=0;
13392 GNULIB_OBSTACK_PRINTF=0;
13393 GNULIB_OBSTACK_PRINTF_POSIX=0;
13394 GNULIB_PCLOSE=0;
13395 GNULIB_PERROR=0;
13396 GNULIB_POPEN=0;
13397 GNULIB_PRINTF=0;
13398 GNULIB_PRINTF_POSIX=0;
13399 GNULIB_PUTC=0;
13400 GNULIB_PUTCHAR=0;
13401 GNULIB_PUTS=0;
13402 GNULIB_REMOVE=0;
13403 GNULIB_RENAME=0;
13404 GNULIB_RENAMEAT=0;
13405 GNULIB_SCANF=0;
13406 GNULIB_SNPRINTF=0;
13407 GNULIB_SPRINTF_POSIX=0;
13408 GNULIB_STDIO_H_NONBLOCKING=0;
13409 GNULIB_STDIO_H_SIGPIPE=0;
13410 GNULIB_TMPFILE=0;
13411 GNULIB_VASPRINTF=0;
13412 GNULIB_VFSCANF=0;
13413 GNULIB_VSCANF=0;
13414 GNULIB_VDPRINTF=0;
13415 GNULIB_VFPRINTF=0;
13416 GNULIB_VFPRINTF_POSIX=0;
13417 GNULIB_VPRINTF=0;
13418 GNULIB_VPRINTF_POSIX=0;
13419 GNULIB_VSNPRINTF=0;
13420 GNULIB_VSPRINTF_POSIX=0;
13421 HAVE_DECL_FPURGE=1;
13422 HAVE_DECL_FSEEKO=1;
13423 HAVE_DECL_FTELLO=1;
13424 HAVE_DECL_GETDELIM=1;
13425 HAVE_DECL_GETLINE=1;
13426 HAVE_DECL_OBSTACK_PRINTF=1;
13427 HAVE_DECL_SNPRINTF=1;
13428 HAVE_DECL_VSNPRINTF=1;
13429 HAVE_DPRINTF=1;
13430 HAVE_FSEEKO=1;
13431 HAVE_FTELLO=1;
13432 HAVE_PCLOSE=1;
13433 HAVE_POPEN=1;
13434 HAVE_RENAMEAT=1;
13435 HAVE_VASPRINTF=1;
13436 HAVE_VDPRINTF=1;
13437 REPLACE_DPRINTF=0;
13438 REPLACE_FCLOSE=0;
13439 REPLACE_FDOPEN=0;
13440 REPLACE_FFLUSH=0;
13441 REPLACE_FOPEN=0;
13442 REPLACE_FPRINTF=0;
13443 REPLACE_FPURGE=0;
13444 REPLACE_FREOPEN=0;
13445 REPLACE_FSEEK=0;
13446 REPLACE_FSEEKO=0;
13447 REPLACE_FTELL=0;
13448 REPLACE_FTELLO=0;
13449 REPLACE_GETDELIM=0;
13450 REPLACE_GETLINE=0;
13451 REPLACE_OBSTACK_PRINTF=0;
13452 REPLACE_PERROR=0;
13453 REPLACE_POPEN=0;
13454 REPLACE_PRINTF=0;
13455 REPLACE_REMOVE=0;
13456 REPLACE_RENAME=0;
13457 REPLACE_RENAMEAT=0;
13458 REPLACE_SNPRINTF=0;
13459 REPLACE_SPRINTF=0;
13460 REPLACE_STDIO_READ_FUNCS=0;
13461 REPLACE_STDIO_WRITE_FUNCS=0;
13462 REPLACE_TMPFILE=0;
13463 REPLACE_VASPRINTF=0;
13464 REPLACE_VDPRINTF=0;
13465 REPLACE_VFPRINTF=0;
13466 REPLACE_VPRINTF=0;
13467 REPLACE_VSNPRINTF=0;
13468 REPLACE_VSPRINTF=0;
13469
13470
13471
2d8adcbd
MM
13472
13473
13474
13475
5e8754f9
SDJ
13476
13477
13478
13479
13480
13481
13482
13483
13484
13485
13486
13487
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
472fa5ee 13501 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
d0ac1c44 13502if test "x$ac_cv_have_decl_setenv" = xyes; then :
6ec2e0f5
SDJ
13503 ac_have_decl=1
13504else
13505 ac_have_decl=0
13506fi
13507
13508cat >>confdefs.h <<_ACEOF
13509#define HAVE_DECL_SETENV $ac_have_decl
13510_ACEOF
13511
13512
13513
13514
13515
13516
472fa5ee
SM
13517
13518
13519
13520
13521 :
13522
13523
13524
13525
13526
6ec2e0f5
SDJ
13527 if test $ac_cv_have_decl_setenv = no; then
13528 HAVE_DECL_SETENV=0
13529 fi
13530
472fa5ee
SM
13531 :
13532
13533
13534
13535
13536
13537
13538
13539
13540
13541 :
13542
6ec2e0f5
SDJ
13543
13544
13545
13546
13547 for ac_header in search.h
13548do :
13549 ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
d0ac1c44 13550if test "x$ac_cv_header_search_h" = xyes; then :
6ec2e0f5
SDJ
13551 cat >>confdefs.h <<_ACEOF
13552#define HAVE_SEARCH_H 1
13553_ACEOF
13554
13555fi
13556
13557done
13558
13559 for ac_func in tsearch
13560do :
13561 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
d0ac1c44 13562if test "x$ac_cv_func_tsearch" = xyes; then :
6ec2e0f5
SDJ
13563 cat >>confdefs.h <<_ACEOF
13564#define HAVE_TSEARCH 1
13565_ACEOF
13566
13567fi
13568done
13569
13570
13571
13572
13573 GNULIB_PTHREAD_SIGMASK=0;
13574 GNULIB_RAISE=0;
13575 GNULIB_SIGNAL_H_SIGPIPE=0;
13576 GNULIB_SIGPROCMASK=0;
13577 GNULIB_SIGACTION=0;
13578 HAVE_POSIX_SIGNALBLOCKING=1;
13579 HAVE_PTHREAD_SIGMASK=1;
13580 HAVE_RAISE=1;
13581 HAVE_SIGSET_T=1;
13582 HAVE_SIGINFO_T=1;
13583 HAVE_SIGACTION=1;
13584 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
13585
13586 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
13587
13588 HAVE_SIGHANDLER_T=1;
13589 REPLACE_PTHREAD_SIGMASK=0;
13590 REPLACE_RAISE=0;
13591
13592
13593 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
13594 #include <signal.h>
13595 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
13596 #include <sys/types.h>
13597
13598"
d0ac1c44 13599if test "x$ac_cv_type_sigset_t" = xyes; then :
6ec2e0f5
SDJ
13600
13601cat >>confdefs.h <<_ACEOF
13602#define HAVE_SIGSET_T 1
13603_ACEOF
13604
13605gl_cv_type_sigset_t=yes
13606else
13607 gl_cv_type_sigset_t=no
13608fi
13609
13610 if test $gl_cv_type_sigset_t != yes; then
13611 HAVE_SIGSET_T=0
13612 fi
13613
13614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
13615$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
d0ac1c44 13616if ${ac_cv_type_uid_t+:} false; then :
6ec2e0f5
SDJ
13617 $as_echo_n "(cached) " >&6
13618else
13619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13620/* end confdefs.h. */
13621#include <sys/types.h>
13622
13623_ACEOF
13624if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13625 $EGREP "uid_t" >/dev/null 2>&1; then :
13626 ac_cv_type_uid_t=yes
13627else
13628 ac_cv_type_uid_t=no
13629fi
13630rm -f conftest*
13631
13632fi
13633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
13634$as_echo "$ac_cv_type_uid_t" >&6; }
13635if test $ac_cv_type_uid_t = no; then
13636
13637$as_echo "#define uid_t int" >>confdefs.h
13638
13639
13640$as_echo "#define gid_t int" >>confdefs.h
13641
13642fi
13643
13644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
13645$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
d0ac1c44 13646if ${ac_cv_header_stdbool_h+:} false; then :
6ec2e0f5
SDJ
13647 $as_echo_n "(cached) " >&6
13648else
13649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13650/* end confdefs.h. */
13651
13652 #include <stdbool.h>
13653
13654 #ifdef __cplusplus
13655 typedef bool Bool;
13656 #else
13657 typedef _Bool Bool;
13658 #ifndef bool
13659 "error: bool is not defined"
13660 #endif
13661 #ifndef false
13662 "error: false is not defined"
13663 #endif
13664 #if false
13665 "error: false is not 0"
13666 #endif
13667 #ifndef true
13668 "error: true is not defined"
13669 #endif
13670 #if true != 1
13671 "error: true is not 1"
13672 #endif
13673 #endif
13674
13675 #ifndef __bool_true_false_are_defined
13676 "error: __bool_true_false_are_defined is not defined"
13677 #endif
13678
13679 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
13680
13681 char a[true == 1 ? 1 : -1];
13682 char b[false == 0 ? 1 : -1];
13683 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
13684 char d[(bool) 0.5 == true ? 1 : -1];
13685 /* See body of main program for 'e'. */
13686 char f[(Bool) 0.0 == false ? 1 : -1];
13687 char g[true];
13688 char h[sizeof (Bool)];
13689 char i[sizeof s.t];
13690 enum { j = false, k = true, l = false * true, m = true * 256 };
13691 /* The following fails for
13692 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
13693 Bool n[m];
13694 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
13695 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
13696 /* Catch a bug in an HP-UX C compiler. See
5e8754f9
SDJ
13697 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
13698 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
6ec2e0f5
SDJ
13699 */
13700 Bool q = true;
13701 Bool *pq = &q;
13702 bool *qq = &q;
13703
13704int
13705main ()
13706{
13707
13708 bool e = &s;
13709 *pq |= q; *pq |= ! q;
13710 *qq |= q; *qq |= ! q;
13711 /* Refer to every declared value, to avoid compiler optimizations. */
13712 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
13713 + !m + !n + !o + !p + !q + !pq + !qq);
13714
13715 ;
13716 return 0;
13717}
13718_ACEOF
13719if ac_fn_c_try_compile "$LINENO"; then :
13720 ac_cv_header_stdbool_h=yes
13721else
13722 ac_cv_header_stdbool_h=no
13723fi
13724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13725fi
13726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
13727$as_echo "$ac_cv_header_stdbool_h" >&6; }
13728 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
d0ac1c44 13729if test "x$ac_cv_type__Bool" = xyes; then :
6ec2e0f5
SDJ
13730
13731cat >>confdefs.h <<_ACEOF
13732#define HAVE__BOOL 1
13733_ACEOF
13734
13735
13736fi
13737
13738
13739
13740 REPLACE_NULL=0;
13741 HAVE_MAX_ALIGN_T=1;
13742 HAVE_WCHAR_T=1;
13743
13744
13745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
13746$as_echo_n "checking for wchar_t... " >&6; }
d0ac1c44 13747if ${gt_cv_c_wchar_t+:} false; then :
6ec2e0f5
SDJ
13748 $as_echo_n "(cached) " >&6
13749else
13750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13751/* end confdefs.h. */
13752#include <stddef.h>
13753 wchar_t foo = (wchar_t)'\0';
13754int
13755main ()
13756{
13757
13758 ;
13759 return 0;
13760}
13761_ACEOF
13762if ac_fn_c_try_compile "$LINENO"; then :
13763 gt_cv_c_wchar_t=yes
13764else
13765 gt_cv_c_wchar_t=no
13766fi
13767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13768fi
13769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
13770$as_echo "$gt_cv_c_wchar_t" >&6; }
13771 if test $gt_cv_c_wchar_t = yes; then
13772
13773$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
13774
13775 fi
13776
13777
13778
472fa5ee
SM
13779
13780
13781
13782
13783 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
d0ac1c44 13784if test "x$ac_cv_have_decl_strdup" = xyes; then :
6ec2e0f5
SDJ
13785 ac_have_decl=1
13786else
13787 ac_have_decl=0
13788fi
13789
13790cat >>confdefs.h <<_ACEOF
13791#define HAVE_DECL_STRDUP $ac_have_decl
13792_ACEOF
13793
13794
472fa5ee 13795
6ec2e0f5
SDJ
13796 REPLACE_STRERROR_0=0
13797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
13798$as_echo_n "checking whether strerror(0) succeeds... " >&6; }
d0ac1c44 13799if ${gl_cv_func_strerror_0_works+:} false; then :
6ec2e0f5
SDJ
13800 $as_echo_n "(cached) " >&6
13801else
13802 if test "$cross_compiling" = yes; then :
13803 case "$host_os" in
5e8754f9
SDJ
13804 # Guess yes on glibc systems.
13805 *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
13806 # If we don't know, assume the worst.
13807 *) gl_cv_func_strerror_0_works="guessing no" ;;
6ec2e0f5
SDJ
13808 esac
13809
13810else
13811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13812/* end confdefs.h. */
13813#include <string.h>
13814 #include <errno.h>
13815
13816int
13817main ()
13818{
13819int result = 0;
13820 char *str;
13821 errno = 0;
13822 str = strerror (0);
13823 if (!*str) result |= 1;
13824 if (errno) result |= 2;
13825 if (strstr (str, "nknown") || strstr (str, "ndefined"))
13826 result |= 4;
13827 return result;
13828 ;
13829 return 0;
13830}
13831_ACEOF
13832if ac_fn_c_try_run "$LINENO"; then :
13833 gl_cv_func_strerror_0_works=yes
13834else
13835 gl_cv_func_strerror_0_works=no
13836fi
13837rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13838 conftest.$ac_objext conftest.beam conftest.$ac_ext
13839fi
13840
13841
13842fi
13843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
13844$as_echo "$gl_cv_func_strerror_0_works" >&6; }
13845 case "$gl_cv_func_strerror_0_works" in
13846 *yes) ;;
13847 *)
13848 REPLACE_STRERROR_0=1
13849
13850$as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
13851
13852 ;;
13853 esac
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866 if test $gl_cv_have_include_next = yes; then
13867 gl_cv_next_string_h='<'string.h'>'
13868 else
13869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
13870$as_echo_n "checking absolute name of <string.h>... " >&6; }
d0ac1c44 13871if ${gl_cv_next_string_h+:} false; then :
6ec2e0f5
SDJ
13872 $as_echo_n "(cached) " >&6
13873else
13874
13875
13876
13877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13878/* end confdefs.h. */
13879#include <string.h>
13880_ACEOF
13881 case "$host_os" in
13882 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13883 *) gl_absname_cpp="$ac_cpp" ;;
13884 esac
13885
13886 case "$host_os" in
13887 mingw*)
13888 gl_dirsep_regex='[/\\]'
13889 ;;
13890 *)
13891 gl_dirsep_regex='\/'
13892 ;;
13893 esac
13894 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13895 gl_header_literal_regex=`echo 'string.h' \
13896 | sed -e "$gl_make_literal_regex_sed"`
13897 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13898 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13899 s|^/[^/]|//&|
13900 p
13901 q
13902 }'
13903
13904 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13905 sed -n "$gl_absolute_header_sed"`
13906
13907 gl_header=$gl_cv_absolute_string_h
13908 gl_cv_next_string_h='"'$gl_header'"'
13909
13910
13911fi
13912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
13913$as_echo "$gl_cv_next_string_h" >&6; }
13914 fi
13915 NEXT_STRING_H=$gl_cv_next_string_h
13916
13917 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13918 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13919 gl_next_as_first_directive='<'string.h'>'
13920 else
13921 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13922 gl_next_as_first_directive=$gl_cv_next_string_h
13923 fi
13924 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
13925
13926
13927
13928
13929
13930
5e8754f9
SDJ
13931 for gl_func in ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r strsignal strverscmp; do
13932 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
13933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
13934$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
13935if eval \${$as_gl_Symbol+:} false; then :
13936 $as_echo_n "(cached) " >&6
13937else
13938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13939/* end confdefs.h. */
13940#include <string.h>
13941
13942int
13943main ()
13944{
13945#undef $gl_func
13946 (void) $gl_func;
13947 ;
13948 return 0;
13949}
13950_ACEOF
13951if ac_fn_c_try_compile "$LINENO"; then :
13952 eval "$as_gl_Symbol=yes"
13953else
13954 eval "$as_gl_Symbol=no"
13955fi
13956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13957fi
13958eval ac_res=\$$as_gl_Symbol
13959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13960$as_echo "$ac_res" >&6; }
13961 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
13962 cat >>confdefs.h <<_ACEOF
13963#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
13964_ACEOF
6ec2e0f5 13965
5e8754f9
SDJ
13966 eval ac_cv_have_decl_$gl_func=yes
13967fi
13968 done
6ec2e0f5
SDJ
13969
13970
13971
13972
13973
5e8754f9 13974 if test "$gl_cv_func_memchr_works" != yes; then
6ec2e0f5
SDJ
13975 REPLACE_STRSTR=1
13976 else
13977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
13978$as_echo_n "checking whether strstr works... " >&6; }
d0ac1c44 13979if ${gl_cv_func_strstr_works_always+:} false; then :
6ec2e0f5
SDJ
13980 $as_echo_n "(cached) " >&6
13981else
13982 if test "$cross_compiling" = yes; then :
13983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13984/* end confdefs.h. */
13985
13986#ifdef __GNU_LIBRARY__
13987 #include <features.h>
13988 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
13989 || defined __UCLIBC__
13990 Lucky user
13991 #endif
13992#elif defined __CYGWIN__
13993 #include <cygwin/version.h>
13994 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
13995 Lucky user
13996 #endif
13997#else
13998 Lucky user
13999#endif
14000
14001_ACEOF
14002if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14003 $EGREP "Lucky user" >/dev/null 2>&1; then :
14004 gl_cv_func_strstr_works_always="guessing yes"
14005else
14006 gl_cv_func_strstr_works_always="guessing no"
14007fi
14008rm -f conftest*
14009
14010
14011else
14012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14013/* end confdefs.h. */
14014
14015#include <string.h> /* for strstr */
14016#define P "_EF_BF_BD"
14017#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
14018#define NEEDLE P P P P P
14019
14020int
14021main ()
14022{
14023return !!strstr (HAYSTACK, NEEDLE);
14024
14025 ;
14026 return 0;
14027}
14028_ACEOF
14029if ac_fn_c_try_run "$LINENO"; then :
14030 gl_cv_func_strstr_works_always=yes
14031else
14032 gl_cv_func_strstr_works_always=no
14033fi
14034rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14035 conftest.$ac_objext conftest.beam conftest.$ac_ext
14036fi
14037
14038
14039fi
14040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
14041$as_echo "$gl_cv_func_strstr_works_always" >&6; }
14042 case "$gl_cv_func_strstr_works_always" in
14043 *yes) ;;
14044 *)
14045 REPLACE_STRSTR=1
14046 ;;
14047 esac
14048 fi
14049
472fa5ee
SM
14050
14051 ac_fn_c_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default"
d0ac1c44 14052if test "x$ac_cv_have_decl_strtok_r" = xyes; then :
6ec2e0f5
SDJ
14053 ac_have_decl=1
14054else
14055 ac_have_decl=0
14056fi
14057
14058cat >>confdefs.h <<_ACEOF
14059#define HAVE_DECL_STRTOK_R $ac_have_decl
14060_ACEOF
14061
472fa5ee 14062
6ec2e0f5
SDJ
14063
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081 if test $gl_cv_have_include_next = yes; then
14082 gl_cv_next_sys_types_h='<'sys/types.h'>'
14083 else
14084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
14085$as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
d0ac1c44 14086if ${gl_cv_next_sys_types_h+:} false; then :
6ec2e0f5
SDJ
14087 $as_echo_n "(cached) " >&6
14088else
14089
14090
14091
14092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14093/* end confdefs.h. */
14094#include <sys/types.h>
14095_ACEOF
14096 case "$host_os" in
14097 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14098 *) gl_absname_cpp="$ac_cpp" ;;
14099 esac
14100
14101 case "$host_os" in
14102 mingw*)
14103 gl_dirsep_regex='[/\\]'
14104 ;;
14105 *)
14106 gl_dirsep_regex='\/'
14107 ;;
14108 esac
14109 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14110 gl_header_literal_regex=`echo 'sys/types.h' \
14111 | sed -e "$gl_make_literal_regex_sed"`
14112 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14113 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14114 s|^/[^/]|//&|
14115 p
14116 q
14117 }'
14118
14119 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14120 sed -n "$gl_absolute_header_sed"`
14121
14122 gl_header=$gl_cv_absolute_sys_types_h
14123 gl_cv_next_sys_types_h='"'$gl_header'"'
14124
14125
14126fi
14127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
14128$as_echo "$gl_cv_next_sys_types_h" >&6; }
14129 fi
14130 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
14131
14132 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14133 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14134 gl_next_as_first_directive='<'sys/types.h'>'
14135 else
14136 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14137 gl_next_as_first_directive=$gl_cv_next_sys_types_h
14138 fi
14139 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
725e2999
JB
14152
14153
14154
14155
14156
14157
14158
5e8754f9
SDJ
14159 GNULIB_MKTIME=0;
14160 GNULIB_NANOSLEEP=0;
14161 GNULIB_STRPTIME=0;
14162 GNULIB_TIMEGM=0;
14163 GNULIB_TIME_R=0;
14164 GNULIB_TIME_RZ=0;
14165 HAVE_DECL_LOCALTIME_R=1;
14166 HAVE_NANOSLEEP=1;
14167 HAVE_STRPTIME=1;
14168 HAVE_TIMEGM=1;
14169 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
14170 REPLACE_MKTIME=GNULIB_PORTCHECK;
14171 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
14172 REPLACE_TIMEGM=GNULIB_PORTCHECK;
6ec2e0f5 14173
5e8754f9
SDJ
14174 : ${GNULIB_GETTIMEOFDAY=0};
14175 REPLACE_GMTIME=0;
14176 REPLACE_LOCALTIME=0;
6ec2e0f5
SDJ
14177
14178
14179
472fa5ee
SM
14180 :
14181
14182
14183
14184
14185
6ec2e0f5
SDJ
14186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
14187$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
d0ac1c44 14188if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
6ec2e0f5
SDJ
14189 $as_echo_n "(cached) " >&6
14190else
14191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14192/* end confdefs.h. */
14193#include <time.h>
14194
14195int
14196main ()
14197{
14198static struct timespec x; x.tv_sec = x.tv_nsec;
14199 ;
14200 return 0;
14201}
14202_ACEOF
14203if ac_fn_c_try_compile "$LINENO"; then :
14204 gl_cv_sys_struct_timespec_in_time_h=yes
14205else
14206 gl_cv_sys_struct_timespec_in_time_h=no
14207fi
14208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14209fi
14210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
14211$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
14212
14213 TIME_H_DEFINES_STRUCT_TIMESPEC=0
14214 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
14215 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
14216 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
14217 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
14218 TIME_H_DEFINES_STRUCT_TIMESPEC=1
14219 else
14220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
14221$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
d0ac1c44 14222if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
6ec2e0f5
SDJ
14223 $as_echo_n "(cached) " >&6
14224else
14225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14226/* end confdefs.h. */
14227#include <sys/time.h>
14228
14229int
14230main ()
14231{
14232static struct timespec x; x.tv_sec = x.tv_nsec;
14233 ;
14234 return 0;
14235}
14236_ACEOF
14237if ac_fn_c_try_compile "$LINENO"; then :
14238 gl_cv_sys_struct_timespec_in_sys_time_h=yes
14239else
14240 gl_cv_sys_struct_timespec_in_sys_time_h=no
14241fi
14242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14243fi
14244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
14245$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
14246 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
14247 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
14248 else
14249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
14250$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
d0ac1c44 14251if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
6ec2e0f5
SDJ
14252 $as_echo_n "(cached) " >&6
14253else
14254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14255/* end confdefs.h. */
14256#include <pthread.h>
14257
14258int
14259main ()
14260{
14261static struct timespec x; x.tv_sec = x.tv_nsec;
14262 ;
14263 return 0;
14264}
14265_ACEOF
14266if ac_fn_c_try_compile "$LINENO"; then :
14267 gl_cv_sys_struct_timespec_in_pthread_h=yes
14268else
14269 gl_cv_sys_struct_timespec_in_pthread_h=no
14270fi
14271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14272fi
14273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
14274$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
14275 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
14276 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
14277 else
14278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
14279$as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
d0ac1c44 14280if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then :
6ec2e0f5
SDJ
14281 $as_echo_n "(cached) " >&6
14282else
14283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14284/* end confdefs.h. */
14285#include <unistd.h>
14286
14287int
14288main ()
14289{
14290static struct timespec x; x.tv_sec = x.tv_nsec;
14291 ;
14292 return 0;
14293}
14294_ACEOF
14295if ac_fn_c_try_compile "$LINENO"; then :
14296 gl_cv_sys_struct_timespec_in_unistd_h=yes
14297else
14298 gl_cv_sys_struct_timespec_in_unistd_h=no
14299fi
14300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14301fi
14302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
14303$as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
14304 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
14305 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
14306 fi
14307 fi
14308 fi
14309 fi
14310
14311
14312
14313
14314
14315
14316
14317
14318
14319
14320
14321
14322
14323
14324
14325
14326 if test $gl_cv_have_include_next = yes; then
14327 gl_cv_next_time_h='<'time.h'>'
14328 else
14329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
14330$as_echo_n "checking absolute name of <time.h>... " >&6; }
d0ac1c44 14331if ${gl_cv_next_time_h+:} false; then :
6ec2e0f5
SDJ
14332 $as_echo_n "(cached) " >&6
14333else
14334
14335
14336
14337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14338/* end confdefs.h. */
14339#include <time.h>
14340_ACEOF
14341 case "$host_os" in
14342 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14343 *) gl_absname_cpp="$ac_cpp" ;;
14344 esac
14345
14346 case "$host_os" in
14347 mingw*)
14348 gl_dirsep_regex='[/\\]'
14349 ;;
14350 *)
14351 gl_dirsep_regex='\/'
14352 ;;
14353 esac
14354 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14355 gl_header_literal_regex=`echo 'time.h' \
14356 | sed -e "$gl_make_literal_regex_sed"`
14357 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14358 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14359 s|^/[^/]|//&|
14360 p
14361 q
14362 }'
14363
14364 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14365 sed -n "$gl_absolute_header_sed"`
14366
14367 gl_header=$gl_cv_absolute_time_h
14368 gl_cv_next_time_h='"'$gl_header'"'
14369
14370
14371fi
14372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
14373$as_echo "$gl_cv_next_time_h" >&6; }
14374 fi
14375 NEXT_TIME_H=$gl_cv_next_time_h
14376
14377 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14378 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14379 gl_next_as_first_directive='<'time.h'>'
14380 else
14381 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14382 gl_next_as_first_directive=$gl_cv_next_time_h
14383 fi
14384 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
14385
14386
14387
14388
14389
14390
14391
14392
472fa5ee
SM
14393
14394
14395
14396
14397 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
d0ac1c44 14398if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
6ec2e0f5
SDJ
14399 ac_have_decl=1
14400else
14401 ac_have_decl=0
14402fi
14403
14404cat >>confdefs.h <<_ACEOF
14405#define HAVE_DECL_UNSETENV $ac_have_decl
14406_ACEOF
14407
14408
472fa5ee 14409
6ec2e0f5
SDJ
14410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
14411$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
d0ac1c44 14412if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
6ec2e0f5
SDJ
14413 $as_echo_n "(cached) " >&6
14414else
14415 gl_cv_header_wchar_h_correct_inline=yes
14416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14417/* end confdefs.h. */
14418
14419 #define wcstod renamed_wcstod
14420/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14421 <wchar.h>.
14422 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14423 included before <wchar.h>. */
14424#include <stddef.h>
14425#include <stdio.h>
14426#include <time.h>
14427#include <wchar.h>
14428extern int zero (void);
14429int main () { return zero(); }
14430
14431_ACEOF
14432 save_ac_compile="$ac_compile"
14433 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
5e8754f9 14434 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6ec2e0f5
SDJ
14435 (eval $ac_compile) 2>&5
14436 ac_status=$?
14437 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14438 test $ac_status = 0; }; then
14439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14440/* end confdefs.h. */
14441
14442 #define wcstod renamed_wcstod
14443/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14444 <wchar.h>.
14445 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14446 included before <wchar.h>. */
14447#include <stddef.h>
14448#include <stdio.h>
14449#include <time.h>
14450#include <wchar.h>
14451int zero (void) { return 0; }
14452
14453_ACEOF
14454 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
5e8754f9 14455 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6ec2e0f5
SDJ
14456 (eval $ac_compile) 2>&5
14457 ac_status=$?
14458 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14459 test $ac_status = 0; }; then
14460 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
14461 :
14462 else
14463 gl_cv_header_wchar_h_correct_inline=no
14464 fi
14465 fi
14466 fi
14467 ac_compile="$save_ac_compile"
5e8754f9 14468 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
6ec2e0f5
SDJ
14469
14470fi
14471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
14472$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
14473 if test $gl_cv_header_wchar_h_correct_inline = no; then
d0ac1c44 14474 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
6ec2e0f5
SDJ
14475This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
14476C99 mode. You have four options:
14477 - Add the flag -fgnu89-inline to CC and reconfigure, or
14478 - Fix your include files, using parts of
5e8754f9 14479 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
6ec2e0f5
SDJ
14480 - Use a gcc version older than 4.3, or
14481 - Don't use the flags -std=c99 or -std=gnu99.
14482Configuration aborted." "$LINENO" 5
14483 fi
14484
14485
5e8754f9
SDJ
14486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
14487$as_echo_n "checking for wint_t... " >&6; }
14488if ${gt_cv_c_wint_t+:} false; then :
14489 $as_echo_n "(cached) " >&6
14490else
14491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14492/* end confdefs.h. */
6ec2e0f5 14493
5e8754f9
SDJ
14494/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14495 <wchar.h>.
14496 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
14497 before <wchar.h>. */
14498#include <stddef.h>
14499#include <stdio.h>
14500#include <time.h>
14501#include <wchar.h>
14502 wint_t foo = (wchar_t)'\0';
14503int
14504main ()
14505{
6ec2e0f5 14506
5e8754f9
SDJ
14507 ;
14508 return 0;
14509}
14510_ACEOF
14511if ac_fn_c_try_compile "$LINENO"; then :
14512 gt_cv_c_wint_t=yes
14513else
14514 gt_cv_c_wint_t=no
14515fi
14516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14517fi
14518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
14519$as_echo "$gt_cv_c_wint_t" >&6; }
14520 if test $gt_cv_c_wint_t = yes; then
6ec2e0f5 14521
5e8754f9 14522$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
6ec2e0f5
SDJ
14523
14524 fi
14525
14526
14527 GNULIB_ISWBLANK=0;
14528 GNULIB_WCTYPE=0;
14529 GNULIB_ISWCTYPE=0;
14530 GNULIB_WCTRANS=0;
14531 GNULIB_TOWCTRANS=0;
14532 HAVE_ISWBLANK=1;
14533 HAVE_WCTYPE_T=1;
14534 HAVE_WCTRANS_T=1;
14535 REPLACE_ISWBLANK=0;
14536
14537
14538
14539
472fa5ee
SM
14540
14541
14542
725e2999
JB
14543 if false; then
14544 GL_COND_LIBTOOL_TRUE=
14545 GL_COND_LIBTOOL_FALSE='#'
14546else
14547 GL_COND_LIBTOOL_TRUE='#'
14548 GL_COND_LIBTOOL_FALSE=
14549fi
14550
14551 gl_cond_libtool=false
14552 gl_libdeps=
14553 gl_ltlibdeps=
14554 gl_m4_base='import/m4'
14555
14556
14557
14558
14559
14560
14561
14562
14563
14564 gl_source_base='import'
14565
14566
14567 if test $ac_cv_func_alloca_works = no; then
14568 :
14569 fi
14570
14571 # Define an additional variable used in the Makefile substitution.
14572 if test $ac_cv_working_alloca_h = yes; then
14573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
14574$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
14575if ${gl_cv_rpl_alloca+:} false; then :
14576 $as_echo_n "(cached) " >&6
14577else
14578
14579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14580/* end confdefs.h. */
14581
14582#if defined __GNUC__ || defined _AIX || defined _MSC_VER
14583 Need own alloca
14584#endif
14585
14586_ACEOF
14587if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14588 $EGREP "Need own alloca" >/dev/null 2>&1; then :
14589 gl_cv_rpl_alloca=yes
14590else
14591 gl_cv_rpl_alloca=no
14592fi
14593rm -f conftest*
14594
14595
14596fi
14597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
14598$as_echo "$gl_cv_rpl_alloca" >&6; }
14599 if test $gl_cv_rpl_alloca = yes; then
14600
14601$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
14602
14603 ALLOCA_H=alloca.h
14604 else
14605 ALLOCA_H=
14606 fi
14607 else
14608 ALLOCA_H=alloca.h
14609 fi
14610
14611 if test -n "$ALLOCA_H"; then
14612 GL_GENERATE_ALLOCA_H_TRUE=
14613 GL_GENERATE_ALLOCA_H_FALSE='#'
14614else
14615 GL_GENERATE_ALLOCA_H_TRUE='#'
14616 GL_GENERATE_ALLOCA_H_FALSE=
14617fi
14618
14619
14620
14621
14622
14623
14624 :
14625
14626
14627
14628
14629
14630 if test $ac_cv_header_arpa_inet_h = yes; then
14631 HAVE_ARPA_INET_H=1
14632 else
14633 HAVE_ARPA_INET_H=0
14634 fi
14635
14636
14637
14638
14639
14640
14641
14642 :
14643
14644
14645
14646
14647
14648
14649
14650
14651 if test $gl_cv_have_include_next = yes; then
14652 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
14653 else
14654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
14655$as_echo_n "checking absolute name of <arpa/inet.h>... " >&6; }
14656if ${gl_cv_next_arpa_inet_h+:} false; then :
14657 $as_echo_n "(cached) " >&6
14658else
14659
14660 if test $ac_cv_header_arpa_inet_h = yes; then
14661
14662
14663
14664
14665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14666/* end confdefs.h. */
14667#include <arpa/inet.h>
14668_ACEOF
14669 case "$host_os" in
14670 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14671 *) gl_absname_cpp="$ac_cpp" ;;
14672 esac
14673
14674 case "$host_os" in
14675 mingw*)
14676 gl_dirsep_regex='[/\\]'
14677 ;;
14678 *)
14679 gl_dirsep_regex='\/'
14680 ;;
14681 esac
14682 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14683 gl_header_literal_regex=`echo 'arpa/inet.h' \
14684 | sed -e "$gl_make_literal_regex_sed"`
14685 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14686 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14687 s|^/[^/]|//&|
14688 p
14689 q
14690 }'
6ec2e0f5 14691
725e2999
JB
14692 gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14693 sed -n "$gl_absolute_header_sed"`
6ec2e0f5 14694
725e2999
JB
14695 gl_header=$gl_cv_absolute_arpa_inet_h
14696 gl_cv_next_arpa_inet_h='"'$gl_header'"'
14697 else
14698 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
14699 fi
6ec2e0f5
SDJ
14700
14701
725e2999
JB
14702fi
14703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
14704$as_echo "$gl_cv_next_arpa_inet_h" >&6; }
14705 fi
14706 NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
6ec2e0f5 14707
725e2999
JB
14708 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14709 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14710 gl_next_as_first_directive='<'arpa/inet.h'>'
14711 else
14712 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14713 gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
14714 fi
14715 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
6ec2e0f5
SDJ
14716
14717
14718
14719
14720
6ec2e0f5
SDJ
14721
14722
6ec2e0f5 14723
725e2999
JB
14724 for gl_func in inet_ntop inet_pton; do
14725 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
14726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
14727$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
14728if eval \${$as_gl_Symbol+:} false; then :
6ec2e0f5
SDJ
14729 $as_echo_n "(cached) " >&6
14730else
725e2999 14731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ec2e0f5
SDJ
14732/* end confdefs.h. */
14733
725e2999
JB
14734/* On some systems, this header is not self-consistent. */
14735#if !(defined __GLIBC__ || defined __UCLIBC__)
14736# include <sys/socket.h>
6ec2e0f5 14737#endif
725e2999
JB
14738#ifdef __TANDEM
14739# include <netdb.h>
14740#endif
14741#include <arpa/inet.h>
6ec2e0f5 14742
725e2999
JB
14743int
14744main ()
14745{
14746#undef $gl_func
14747 (void) $gl_func;
14748 ;
14749 return 0;
14750}
6ec2e0f5 14751_ACEOF
725e2999
JB
14752if ac_fn_c_try_compile "$LINENO"; then :
14753 eval "$as_gl_Symbol=yes"
6ec2e0f5 14754else
725e2999 14755 eval "$as_gl_Symbol=no"
6ec2e0f5 14756fi
725e2999 14757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5 14758fi
725e2999
JB
14759eval ac_res=\$$as_gl_Symbol
14760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14761$as_echo "$ac_res" >&6; }
14762 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
14763 cat >>confdefs.h <<_ACEOF
14764#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
14765_ACEOF
6ec2e0f5 14766
725e2999 14767 eval ac_cv_have_decl_$gl_func=yes
6ec2e0f5 14768fi
725e2999
JB
14769 done
14770
6ec2e0f5
SDJ
14771
14772
14773
14774
14775
14776
14777
14778
14779
14780
14781 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
14782
14783
14784
14785
14786 if test $ac_cv_func_canonicalize_file_name = no; then
14787 HAVE_CANONICALIZE_FILE_NAME=0
14788 if test $ac_cv_func_realpath = no; then
14789 HAVE_REALPATH=0
14790 else
14791 case "$gl_cv_func_realpath_works" in
5e8754f9
SDJ
14792 *yes) ;;
14793 *) REPLACE_REALPATH=1 ;;
6ec2e0f5
SDJ
14794 esac
14795 fi
14796 else
14797 case "$gl_cv_func_realpath_works" in
14798 *yes)
14799 ;;
14800 *)
14801 REPLACE_CANONICALIZE_FILE_NAME=1
14802 REPLACE_REALPATH=1
14803 ;;
14804 esac
14805 fi
14806
14807 if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
14808
14809
14810
14811
14812
14813
14814
14815
14816 gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
14817
14818 fi
14819
14820
14821cat >>confdefs.h <<_ACEOF
14822#define GNULIB_CANONICALIZE_LGPL 1
14823_ACEOF
14824
14825
14826
14827
14828
14829
14830
14831 GNULIB_CANONICALIZE_FILE_NAME=1
14832
14833
14834
14835
14836
14837$as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
14838
14839
14840
14841
14842
14843
14844
14845
14846 GNULIB_REALPATH=1
14847
14848
14849
14850
14851
14852$as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
14853
14854
14855
14856
14857
14858
14859
14860
14861 GNULIB_CHDIR=1
14862
14863
14864
14865
14866
14867$as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
14868
14869
14870
14871
14872
14873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
14874$as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; }
d0ac1c44 14875if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then :
6ec2e0f5
SDJ
14876 $as_echo_n "(cached) " >&6
14877else
14878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14879/* end confdefs.h. */
14880
14881/* Arrange to define PATH_MAX, like "pathmax.h" does. */
14882#if HAVE_UNISTD_H
14883# include <unistd.h>
14884#endif
14885#include <limits.h>
14886#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
14887# include <sys/param.h>
14888#endif
14889#if !defined PATH_MAX && defined MAXPATHLEN
14890# define PATH_MAX MAXPATHLEN
14891#endif
14892#ifdef __hpux
14893# undef PATH_MAX
14894# define PATH_MAX 1024
14895#endif
5e8754f9 14896#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6ec2e0f5
SDJ
14897# undef PATH_MAX
14898# define PATH_MAX 260
14899#endif
14900
14901#ifdef PATH_MAX
14902have_arbitrary_file_name_length_limit
14903#endif
14904_ACEOF
14905if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14906 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
14907 gl_cv_have_arbitrary_file_name_length_limit=yes
14908else
14909 gl_cv_have_arbitrary_file_name_length_limit=no
14910fi
14911rm -f conftest*
14912
14913fi
14914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
14915$as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
14916
14917 if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
14918
14919
14920
14921
14922
14923
14924
14925
14926 gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
14927
14928 :
14929 fi
14930
14931
14932$as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
14933
14934
14935
14936
14937
5e8754f9
SDJ
14938 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
14939 REPLACE_CLOSE=1
14940 fi
6ec2e0f5
SDJ
14941
14942
14943
14944
14945
472fa5ee
SM
14946 :
14947
14948
14949
14950
14951
6ec2e0f5
SDJ
14952 if test $ac_cv_header_sys_socket_h != yes; then
14953 for ac_header in winsock2.h
14954do :
14955 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
d0ac1c44 14956if test "x$ac_cv_header_winsock2_h" = xyes; then :
6ec2e0f5
SDJ
14957 cat >>confdefs.h <<_ACEOF
14958#define HAVE_WINSOCK2_H 1
14959_ACEOF
14960
14961fi
14962
14963done
14964
14965 fi
14966 if test "$ac_cv_header_winsock2_h" = yes; then
14967 HAVE_WINSOCK2_H=1
14968 UNISTD_H_HAVE_WINSOCK2_H=1
14969 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
14970 else
14971 HAVE_WINSOCK2_H=0
14972 fi
14973
14974
14975 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
14976 REPLACE_CLOSE=1
14977 fi
14978
14979
14980 if test $REPLACE_CLOSE = 0; then
14981
14982
14983
472fa5ee
SM
14984 :
14985
14986
14987
14988
14989
6ec2e0f5
SDJ
14990 if test $ac_cv_func_fchdir = no; then
14991 HAVE_FCHDIR=0
14992 fi
14993
14994 if test $HAVE_FCHDIR = 0; then
14995 REPLACE_CLOSE=1
14996 fi
14997 fi
14998
14999
15000 if test $REPLACE_CLOSE = 1; then
15001
15002
15003
15004
15005
15006
15007
15008
15009 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
15010
15011 fi
15012
15013
15014
15015
15016
15017 GNULIB_CLOSE=1
15018
15019
15020
15021
15022
15023$as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
15024
15025
15026
15027
15028
15029
15030 for ac_func in closedir
15031do :
15032 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
d0ac1c44 15033if test "x$ac_cv_func_closedir" = xyes; then :
6ec2e0f5
SDJ
15034 cat >>confdefs.h <<_ACEOF
15035#define HAVE_CLOSEDIR 1
15036_ACEOF
15037
15038fi
15039done
15040
15041 if test $ac_cv_func_closedir = no; then
15042 HAVE_CLOSEDIR=0
15043 fi
15044
15045
15046
15047
472fa5ee
SM
15048 :
15049
15050
15051
15052
15053
6ec2e0f5
SDJ
15054 if test $ac_cv_func_fchdir = no; then
15055 HAVE_FCHDIR=0
15056 fi
15057
15058 if test $HAVE_FCHDIR = 0; then
15059 if test $HAVE_CLOSEDIR = 1; then
15060 REPLACE_CLOSEDIR=1
15061 fi
15062 fi
15063
15064 case $host_os,$HAVE_CLOSEDIR in
15065 os2*,1)
15066 REPLACE_CLOSEDIR=1;;
15067 esac
15068
15069 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
15070
15071
15072
15073
15074
15075
15076
15077
15078 gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
15079
15080 fi
15081
15082
15083
15084
15085
15086 GNULIB_CLOSEDIR=1
15087
15088
15089
15090
15091
15092$as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
15093
15094
15095
5e8754f9
SDJ
15096
15097 if test "x$datarootdir" = x; then
15098 datarootdir='${datadir}'
15099
15100 fi
15101 if test "x$docdir" = x; then
15102 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
15103
15104 fi
15105 if test "x$htmldir" = x; then
15106 htmldir='${docdir}'
15107
15108 fi
15109 if test "x$dvidir" = x; then
15110 dvidir='${docdir}'
15111
15112 fi
15113 if test "x$pdfdir" = x; then
15114 pdfdir='${docdir}'
15115
15116 fi
15117 if test "x$psdir" = x; then
15118 psdir='${docdir}'
15119
15120 fi
15121 if test "x$lispdir" = x; then
15122 lispdir='${datarootdir}/emacs/site-lisp'
15123
15124 fi
15125 if test "x$localedir" = x; then
15126 localedir='${datarootdir}/locale'
15127
15128 fi
15129 if test "x$runstatedir" = x; then
15130 runstatedir='${localstatedir}/run'
15131
15132 fi
15133
15134 pkglibexecdir='${libexecdir}/${PACKAGE}'
15135
15136
6ec2e0f5
SDJ
15137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
15138$as_echo_n "checking for d_ino member in directory struct... " >&6; }
d0ac1c44 15139if ${gl_cv_struct_dirent_d_ino+:} false; then :
6ec2e0f5
SDJ
15140 $as_echo_n "(cached) " >&6
15141else
15142 if test "$cross_compiling" = yes; then :
15143 case "$host_os" in
15144 # Guess yes on glibc systems with Linux kernel.
15145 linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
15146 # If we don't know, assume the worst.
15147 *) gl_cv_struct_dirent_d_ino="guessing no" ;;
15148 esac
15149
15150else
15151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15152/* end confdefs.h. */
15153#include <sys/types.h>
15154 #include <sys/stat.h>
15155 #include <dirent.h>
15156
15157int
15158main ()
15159{
15160DIR *dp = opendir (".");
15161 struct dirent *e;
15162 struct stat st;
15163 if (! dp)
15164 return 1;
15165 e = readdir (dp);
15166 if (! e)
5e8754f9 15167 return 2;
6ec2e0f5 15168 if (lstat (e->d_name, &st) != 0)
5e8754f9 15169 return 3;
6ec2e0f5 15170 if (e->d_ino != st.st_ino)
5e8754f9 15171 return 4;
6ec2e0f5
SDJ
15172 closedir (dp);
15173 return 0;
15174
15175 ;
15176 return 0;
15177}
15178_ACEOF
15179if ac_fn_c_try_run "$LINENO"; then :
15180 gl_cv_struct_dirent_d_ino=yes
15181else
15182 gl_cv_struct_dirent_d_ino=no
15183fi
15184rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15185 conftest.$ac_objext conftest.beam conftest.$ac_ext
15186fi
15187
15188fi
15189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
15190$as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
15191 case "$gl_cv_struct_dirent_d_ino" in
15192 *yes)
15193
15194$as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
15195
15196 ;;
15197 esac
15198
15199
15200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
15201$as_echo_n "checking for d_type member in directory struct... " >&6; }
d0ac1c44 15202if ${gl_cv_struct_dirent_d_type+:} false; then :
6ec2e0f5
SDJ
15203 $as_echo_n "(cached) " >&6
15204else
15205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15206/* end confdefs.h. */
15207
15208#include <sys/types.h>
15209#include <dirent.h>
15210
15211int
15212main ()
15213{
15214struct dirent dp; dp.d_type = 0;
15215 ;
15216 return 0;
15217}
15218_ACEOF
15219if ac_fn_c_try_link "$LINENO"; then :
15220 gl_cv_struct_dirent_d_type=yes
15221else
15222 gl_cv_struct_dirent_d_type=no
15223fi
15224rm -f core conftest.err conftest.$ac_objext \
15225 conftest$ac_exeext conftest.$ac_ext
15226
15227
15228fi
15229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5
15230$as_echo "$gl_cv_struct_dirent_d_type" >&6; }
15231 if test $gl_cv_struct_dirent_d_type = yes; then
15232
15233$as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
15234
15235 fi
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
472fa5ee
SM
15247 :
15248
15249
15250
15251
15252
6ec2e0f5
SDJ
15253
15254
15255
15256 if test $gl_cv_have_include_next = yes; then
15257 gl_cv_next_dirent_h='<'dirent.h'>'
15258 else
15259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
15260$as_echo_n "checking absolute name of <dirent.h>... " >&6; }
d0ac1c44 15261if ${gl_cv_next_dirent_h+:} false; then :
6ec2e0f5
SDJ
15262 $as_echo_n "(cached) " >&6
15263else
15264
15265 if test $ac_cv_header_dirent_h = yes; then
15266
15267
15268
15269
15270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15271/* end confdefs.h. */
15272#include <dirent.h>
15273_ACEOF
15274 case "$host_os" in
15275 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15276 *) gl_absname_cpp="$ac_cpp" ;;
15277 esac
15278
15279 case "$host_os" in
15280 mingw*)
15281 gl_dirsep_regex='[/\\]'
15282 ;;
15283 *)
15284 gl_dirsep_regex='\/'
15285 ;;
15286 esac
15287 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15288 gl_header_literal_regex=`echo 'dirent.h' \
15289 | sed -e "$gl_make_literal_regex_sed"`
15290 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15291 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15292 s|^/[^/]|//&|
15293 p
15294 q
15295 }'
15296
15297 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15298 sed -n "$gl_absolute_header_sed"`
15299
15300 gl_header=$gl_cv_absolute_dirent_h
15301 gl_cv_next_dirent_h='"'$gl_header'"'
15302 else
15303 gl_cv_next_dirent_h='<'dirent.h'>'
15304 fi
15305
15306
15307fi
15308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
15309$as_echo "$gl_cv_next_dirent_h" >&6; }
15310 fi
15311 NEXT_DIRENT_H=$gl_cv_next_dirent_h
15312
15313 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15314 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15315 gl_next_as_first_directive='<'dirent.h'>'
15316 else
15317 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15318 gl_next_as_first_directive=$gl_cv_next_dirent_h
15319 fi
15320 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
15321
15322
15323
15324
15325 if test $ac_cv_header_dirent_h = yes; then
15326 HAVE_DIRENT_H=1
15327 else
15328 HAVE_DIRENT_H=0
15329 fi
15330
15331
15332
5e8754f9
SDJ
15333 for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do
15334 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
15335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
15336$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
15337if eval \${$as_gl_Symbol+:} false; then :
15338 $as_echo_n "(cached) " >&6
15339else
15340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15341/* end confdefs.h. */
15342#include <dirent.h>
15343
15344int
15345main ()
15346{
15347#undef $gl_func
15348 (void) $gl_func;
15349 ;
15350 return 0;
15351}
15352_ACEOF
15353if ac_fn_c_try_compile "$LINENO"; then :
15354 eval "$as_gl_Symbol=yes"
15355else
15356 eval "$as_gl_Symbol=no"
15357fi
15358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15359fi
15360eval ac_res=\$$as_gl_Symbol
15361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15362$as_echo "$ac_res" >&6; }
15363 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
15364 cat >>confdefs.h <<_ACEOF
15365#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
15366_ACEOF
6ec2e0f5 15367
5e8754f9
SDJ
15368 eval ac_cv_have_decl_$gl_func=yes
15369fi
15370 done
6ec2e0f5
SDJ
15371
15372
15373
15374
15375
15376
15377
15378 for ac_func in dirfd
15379do :
15380 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
d0ac1c44 15381if test "x$ac_cv_func_dirfd" = xyes; then :
6ec2e0f5
SDJ
15382 cat >>confdefs.h <<_ACEOF
15383#define HAVE_DIRFD 1
15384_ACEOF
15385
15386fi
15387done
15388
15389 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
15390 #include <dirent.h>
15391"
d0ac1c44 15392if test "x$ac_cv_have_decl_dirfd" = xyes; then :
6ec2e0f5
SDJ
15393 ac_have_decl=1
15394else
15395 ac_have_decl=0
15396fi
15397
15398cat >>confdefs.h <<_ACEOF
15399#define HAVE_DECL_DIRFD $ac_have_decl
15400_ACEOF
15401
15402 if test $ac_cv_have_decl_dirfd = no; then
15403 HAVE_DECL_DIRFD=0
15404 fi
15405
15406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
15407$as_echo_n "checking whether dirfd is a macro... " >&6; }
d0ac1c44 15408if ${gl_cv_func_dirfd_macro+:} false; then :
6ec2e0f5
SDJ
15409 $as_echo_n "(cached) " >&6
15410else
15411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15412/* end confdefs.h. */
15413
15414#include <sys/types.h>
15415#include <dirent.h>
15416#ifdef dirfd
15417 dirent_header_defines_dirfd
15418#endif
15419_ACEOF
15420if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15421 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
15422 gl_cv_func_dirfd_macro=yes
15423else
15424 gl_cv_func_dirfd_macro=no
15425fi
15426rm -f conftest*
15427
15428fi
15429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
15430$as_echo "$gl_cv_func_dirfd_macro" >&6; }
15431
15432 # Use the replacement if we have no function or macro with that name,
15433 # or if OS/2 kLIBC whose dirfd() does not work.
15434 # Replace only if the system declares dirfd already.
15435 case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
15436 no,no,*,yes | *,*,os2*,yes)
15437 REPLACE_DIRFD=1
15438
15439$as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
15440;;
15441 esac
15442
15443 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
15444 || test $REPLACE_DIRFD = 1; then
15445
15446
15447
15448
15449
15450
15451
15452
15453 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
15454
15455
15456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
15457$as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
d0ac1c44 15458if ${gl_cv_sys_dir_fd_member_name+:} false; then :
6ec2e0f5
SDJ
15459 $as_echo_n "(cached) " >&6
15460else
15461
15462 dirfd_save_CFLAGS=$CFLAGS
15463 for ac_expr in d_fd dd_fd; do
15464
15465 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
15466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15467/* end confdefs.h. */
15468
15469 #include <sys/types.h>
15470 #include <dirent.h>
15471int
15472main ()
15473{
15474DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
15475 ;
15476 return 0;
15477}
15478_ACEOF
15479if ac_fn_c_try_compile "$LINENO"; then :
15480 dir_fd_found=yes
15481
15482fi
15483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15484 CFLAGS=$dirfd_save_CFLAGS
15485 test "$dir_fd_found" = yes && break
15486 done
15487 test "$dir_fd_found" = yes || ac_expr=no_such_member
15488
15489 gl_cv_sys_dir_fd_member_name=$ac_expr
15490
15491
15492fi
15493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
15494$as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
15495 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
15496
15497cat >>confdefs.h <<_ACEOF
15498#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
15499_ACEOF
15500
15501 fi
15502
15503
15504 fi
15505
15506
15507
15508
15509
15510 GNULIB_DIRFD=1
15511
15512
15513
15514
15515
15516$as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
15527$as_echo_n "checking whether // is distinct from /... " >&6; }
d0ac1c44 15528if ${gl_cv_double_slash_root+:} false; then :
6ec2e0f5
SDJ
15529 $as_echo_n "(cached) " >&6
15530else
15531 if test x"$cross_compiling" = xyes ; then
15532 # When cross-compiling, there is no way to tell whether // is special
15533 # short of a list of hosts. However, the only known hosts to date
15534 # that have a distinct // are Apollo DomainOS (too old to port to),
15535 # Cygwin, and z/OS. If anyone knows of another system for which // has
15536 # special semantics and is distinct from /, please report it to
15537 # <bug-gnulib@gnu.org>.
15538 case $host in
15539 *-cygwin | i370-ibm-openedition)
15540 gl_cv_double_slash_root=yes ;;
15541 *)
15542 # Be optimistic and assume that / and // are the same when we
15543 # don't know.
15544 gl_cv_double_slash_root='unknown, assuming no' ;;
15545 esac
15546 else
15547 set x `ls -di / // 2>/dev/null`
15548 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
15549 gl_cv_double_slash_root=no
15550 else
15551 gl_cv_double_slash_root=yes
15552 fi
15553 fi
15554fi
15555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
15556$as_echo "$gl_cv_double_slash_root" >&6; }
15557 if test "$gl_cv_double_slash_root" = yes; then
8690e634 15558
6ec2e0f5 15559$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
8690e634 15560
6ec2e0f5 15561 fi
8690e634
JK
15562
15563
15564
15565
5e8754f9
SDJ
15566 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
15567 REPLACE_DUP=1
15568 fi
8690e634 15569
8690e634
JK
15570
15571
15572
472fa5ee
SM
15573 :
15574
15575
15576
15577
15578
6ec2e0f5
SDJ
15579 if test $ac_cv_func_fchdir = no; then
15580 HAVE_FCHDIR=0
15581 fi
8690e634 15582
6ec2e0f5
SDJ
15583 if test $HAVE_FCHDIR = 0; then
15584 REPLACE_DUP=1
15585 fi
8690e634 15586
6ec2e0f5
SDJ
15587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
15588$as_echo_n "checking whether dup works... " >&6; }
d0ac1c44 15589if ${gl_cv_func_dup_works+:} false; then :
6ec2e0f5 15590 $as_echo_n "(cached) " >&6
8690e634 15591else
6ec2e0f5 15592 if test "$cross_compiling" = yes; then :
5e8754f9 15593 gl_cv_func_dup_works='guessing yes'
6ec2e0f5
SDJ
15594else
15595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 15596/* end confdefs.h. */
6ec2e0f5
SDJ
15597#include <unistd.h>
15598 #include <fcntl.h>
15599 #include <errno.h>
15600int
15601main ()
15602{
15603/* On OS/2 kLIBC, dup does not work on a directory fd. */
15604 int fd = open (".", O_RDONLY);
15605 return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
8690e634 15606
6ec2e0f5
SDJ
15607 ;
15608 return 0;
15609}
8690e634
JK
15610
15611_ACEOF
6ec2e0f5
SDJ
15612if ac_fn_c_try_run "$LINENO"; then :
15613 gl_cv_func_dup_works=yes
15614else
15615 gl_cv_func_dup_works=no
15616fi
15617rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15618 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 15619fi
8690e634 15620
8690e634 15621
6ec2e0f5
SDJ
15622fi
15623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
15624$as_echo "$gl_cv_func_dup_works" >&6; }
15625 case "$gl_cv_func_dup_works" in
15626 *yes) ;;
15627 *)
15628 REPLACE_DUP=1
15629 ;;
15630 esac
8690e634 15631
6ec2e0f5 15632 if test $REPLACE_DUP = 1; then
8690e634 15633
8690e634 15634
8690e634 15635
8690e634 15636
8690e634 15637
6ec2e0f5
SDJ
15638
15639
15640
15641 gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
15642
15643 :
8690e634
JK
15644 fi
15645
15646
8690e634
JK
15647
15648
15649
6ec2e0f5 15650 GNULIB_DUP=1
8690e634 15651
6ec2e0f5
SDJ
15652
15653
15654
15655
15656$as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
15657
15658
15659
15660
15661
15662
15663
15664
15665$as_echo "#define HAVE_DUP2 1" >>confdefs.h
15666
15667
15668 if test $HAVE_DUP2 = 1; then
15669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
15670$as_echo_n "checking whether dup2 works... " >&6; }
d0ac1c44 15671if ${gl_cv_func_dup2_works+:} false; then :
8690e634
JK
15672 $as_echo_n "(cached) " >&6
15673else
15674 if test "$cross_compiling" = yes; then :
6ec2e0f5
SDJ
15675 case "$host_os" in
15676 mingw*) # on this platform, dup2 always returns 0 for success
15677 gl_cv_func_dup2_works="guessing no" ;;
15678 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
15679 gl_cv_func_dup2_works="guessing no" ;;
15680 aix* | freebsd*)
15681 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
15682 # not EBADF.
15683 gl_cv_func_dup2_works="guessing no" ;;
15684 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
15685 gl_cv_func_dup2_works="guessing no" ;;
15686 *-android*) # implemented using dup3(), which fails if oldfd == newfd
15687 gl_cv_func_dup2_works="guessing no" ;;
15688 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
15689 gl_cv_func_dup2_works="guessing no" ;;
15690 *) gl_cv_func_dup2_works="guessing yes" ;;
15691 esac
8690e634
JK
15692else
15693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15694/* end confdefs.h. */
15695
6ec2e0f5
SDJ
15696 #include <errno.h>
15697 #include <fcntl.h>
15698 #include <limits.h>
15699 #include <sys/resource.h>
15700 #include <unistd.h>
15701 #ifndef RLIM_SAVED_CUR
15702 # define RLIM_SAVED_CUR RLIM_INFINITY
15703 #endif
15704 #ifndef RLIM_SAVED_MAX
15705 # define RLIM_SAVED_MAX RLIM_INFINITY
15706 #endif
8690e634
JK
15707
15708int
15709main ()
15710{
6ec2e0f5
SDJ
15711int result = 0;
15712 int bad_fd = INT_MAX;
15713 struct rlimit rlim;
15714 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
15715 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
15716 && rlim.rlim_cur != RLIM_INFINITY
15717 && rlim.rlim_cur != RLIM_SAVED_MAX
15718 && rlim.rlim_cur != RLIM_SAVED_CUR)
15719 bad_fd = rlim.rlim_cur;
15720 #ifdef FD_CLOEXEC
15721 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
15722 result |= 1;
15723 #endif
15724 if (dup2 (1, 1) != 1)
15725 result |= 2;
15726 #ifdef FD_CLOEXEC
15727 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
15728 result |= 4;
15729 #endif
15730 close (0);
15731 if (dup2 (0, 0) != -1)
15732 result |= 8;
15733 /* Many gnulib modules require POSIX conformance of EBADF. */
15734 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
15735 result |= 16;
15736 /* Flush out some cygwin core dumps. */
15737 if (dup2 (2, -1) != -1 || errno != EBADF)
15738 result |= 32;
15739 dup2 (2, 255);
15740 dup2 (2, 256);
15741 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
15742 {
15743 int fd = open (".", O_RDONLY);
15744 if (fd == -1)
15745 result |= 64;
15746 else if (dup2 (fd, fd + 1) == -1)
15747 result |= 128;
15748
15749 close (fd);
15750 }
15751 return result;
8690e634
JK
15752 ;
15753 return 0;
15754}
6ec2e0f5 15755
8690e634
JK
15756_ACEOF
15757if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 15758 gl_cv_func_dup2_works=yes
8690e634 15759else
6ec2e0f5 15760 gl_cv_func_dup2_works=no
8690e634
JK
15761fi
15762rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15763 conftest.$ac_objext conftest.beam conftest.$ac_ext
15764fi
15765
6ec2e0f5
SDJ
15766
15767fi
15768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
15769$as_echo "$gl_cv_func_dup2_works" >&6; }
15770 case "$gl_cv_func_dup2_works" in
15771 *yes) ;;
15772 *)
15773 REPLACE_DUP2=1
15774 for ac_func in setdtablesize
15775do :
15776 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
d0ac1c44 15777if test "x$ac_cv_func_setdtablesize" = xyes; then :
6ec2e0f5
SDJ
15778 cat >>confdefs.h <<_ACEOF
15779#define HAVE_SETDTABLESIZE 1
15780_ACEOF
15781
15782fi
15783done
15784
15785 ;;
15786 esac
15787 fi
15788
15789
15790
15791
472fa5ee
SM
15792 :
15793
15794
15795
15796
15797
6ec2e0f5
SDJ
15798 if test $ac_cv_func_fchdir = no; then
15799 HAVE_FCHDIR=0
8690e634
JK
15800 fi
15801
6ec2e0f5
SDJ
15802 if test $HAVE_FCHDIR = 0; then
15803 if test $HAVE_DUP2 = 1; then
15804 REPLACE_DUP2=1
15805 fi
15806 fi
8690e634 15807
8690e634 15808
6ec2e0f5 15809 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
8690e634
JK
15810
15811
15812
15813
8690e634 15814
8690e634 15815
6ec2e0f5
SDJ
15816
15817
15818 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
15819
15820
8690e634
JK
15821 fi
15822
8690e634 15823
8690e634 15824
8690e634
JK
15825
15826
6ec2e0f5
SDJ
15827 GNULIB_DUP2=1
15828
15829
15830
15831
15832
15833$as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
15834
15835
15836
15837
15838
15839
15840
15841
15842
15843 GNULIB_ENVIRON=1
15844
15845
15846
15847
15848
15849$as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
15850
15851
15852
15853
15854
15855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
15856$as_echo_n "checking for error_at_line... " >&6; }
d0ac1c44 15857if ${ac_cv_lib_error_at_line+:} false; then :
6ec2e0f5 15858 $as_echo_n "(cached) " >&6
8690e634
JK
15859else
15860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15861/* end confdefs.h. */
6ec2e0f5 15862#include <error.h>
8690e634
JK
15863int
15864main ()
15865{
6ec2e0f5 15866error_at_line (0, 0, "", 0, "an error occurred");
8690e634
JK
15867 ;
15868 return 0;
15869}
15870_ACEOF
6ec2e0f5
SDJ
15871if ac_fn_c_try_link "$LINENO"; then :
15872 ac_cv_lib_error_at_line=yes
8690e634 15873else
6ec2e0f5 15874 ac_cv_lib_error_at_line=no
8690e634 15875fi
6ec2e0f5
SDJ
15876rm -f core conftest.err conftest.$ac_objext \
15877 conftest$ac_exeext conftest.$ac_ext
8690e634 15878fi
6ec2e0f5
SDJ
15879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
15880$as_echo "$ac_cv_lib_error_at_line" >&6; }
15881
15882 if test $ac_cv_lib_error_at_line = no; then
15883
15884
15885
15886
15887
15888
15889
15890
15891 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
15892
8690e634
JK
15893
15894
8690e634
JK
15895 :
15896
6ec2e0f5 15897 fi
6a29c58e 15898
6a29c58e 15899
d0ac1c44
SM
15900
15901
15902
d0ac1c44
SM
15903
15904
472fa5ee 15905 :
6a29c58e
YQ
15906
15907
3d99e817 15908
6ec2e0f5
SDJ
15909
15910
15911 if test $ac_cv_have_decl_fchdir = no; then
15912 HAVE_DECL_FCHDIR=0
15913 fi
15914
15915
15916 if test $HAVE_FCHDIR = 0; then
15917
15918
3d99e817
AK
15919
15920
15921
15922
15923
15924
6ec2e0f5 15925 gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
3d99e817 15926
6ec2e0f5 15927 :
3d99e817 15928
6ec2e0f5 15929$as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
3d99e817 15930
6ec2e0f5
SDJ
15931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
15932$as_echo_n "checking whether open can visit directories... " >&6; }
d0ac1c44 15933if ${gl_cv_func_open_directory_works+:} false; then :
6ec2e0f5
SDJ
15934 $as_echo_n "(cached) " >&6
15935else
15936 if test "$cross_compiling" = yes; then :
15937 case "$host_os" in
5e8754f9
SDJ
15938 # Guess yes on glibc systems.
15939 *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
15940 # If we don't know, assume the worst.
15941 *) gl_cv_func_open_directory_works="guessing no" ;;
6ec2e0f5 15942 esac
3d99e817 15943
6ec2e0f5
SDJ
15944else
15945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15946/* end confdefs.h. */
15947#include <fcntl.h>
3d99e817 15948
6ec2e0f5
SDJ
15949int
15950main ()
15951{
15952return open(".", O_RDONLY) < 0;
15953 ;
15954 return 0;
15955}
3d99e817 15956_ACEOF
6ec2e0f5
SDJ
15957if ac_fn_c_try_run "$LINENO"; then :
15958 gl_cv_func_open_directory_works=yes
15959else
15960 gl_cv_func_open_directory_works=no
15961fi
15962rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15963 conftest.$ac_objext conftest.beam conftest.$ac_ext
15964fi
3d99e817
AK
15965
15966fi
6ec2e0f5
SDJ
15967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
15968$as_echo "$gl_cv_func_open_directory_works" >&6; }
15969 case "$gl_cv_func_open_directory_works" in
15970 *yes) ;;
15971 *)
3d99e817 15972
6ec2e0f5 15973$as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
3d99e817 15974
6ec2e0f5
SDJ
15975 ;;
15976 esac
15977 fi
3d99e817 15978
3d99e817
AK
15979
15980
15981
0750520d 15982
0750520d 15983
6ec2e0f5 15984 GNULIB_FCHDIR=1
0750520d 15985
0750520d
PA
15986
15987
0750520d 15988
0750520d 15989
6ec2e0f5 15990$as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
0750520d 15991
0750520d 15992
0750520d 15993
0750520d 15994
0750520d 15995
0750520d 15996
0750520d 15997
6ec2e0f5 15998
472fa5ee
SM
15999 :
16000
16001
16002
16003
16004
6ec2e0f5
SDJ
16005 if test $ac_cv_func_fcntl = no; then
16006
16007
16008
472fa5ee
SM
16009 :
16010
16011
16012
16013
16014
6ec2e0f5
SDJ
16015 if test $ac_cv_func_fcntl = no; then
16016 HAVE_FCNTL=0
16017 else
16018 REPLACE_FCNTL=1
16019 fi
16020
16021 else
16022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
16023$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
d0ac1c44 16024if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
0750520d 16025 $as_echo_n "(cached) " >&6
6ec2e0f5
SDJ
16026else
16027 if test "$cross_compiling" = yes; then :
16028 case $host_os in
16029 aix* | cygwin* | haiku*)
16030 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
16031 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
16032 esac
0750520d
PA
16033else
16034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16035/* end confdefs.h. */
6ec2e0f5
SDJ
16036#include <errno.h>
16037 #include <fcntl.h>
16038 #include <limits.h>
16039 #include <sys/resource.h>
16040 #include <unistd.h>
16041 #ifndef RLIM_SAVED_CUR
16042 # define RLIM_SAVED_CUR RLIM_INFINITY
16043 #endif
16044 #ifndef RLIM_SAVED_MAX
16045 # define RLIM_SAVED_MAX RLIM_INFINITY
16046 #endif
0750520d 16047
6ec2e0f5
SDJ
16048int
16049main ()
16050{
16051int result = 0;
16052 int bad_fd = INT_MAX;
16053 struct rlimit rlim;
16054 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
16055 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
16056 && rlim.rlim_cur != RLIM_INFINITY
16057 && rlim.rlim_cur != RLIM_SAVED_MAX
16058 && rlim.rlim_cur != RLIM_SAVED_CUR)
16059 bad_fd = rlim.rlim_cur;
16060 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
16061 if (errno != EINVAL) result |= 2;
16062 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
16063 if (errno != EINVAL) result |= 8;
16064 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
16065 {
16066 int fd;
16067 fd = open (".", O_RDONLY);
16068 if (fd == -1)
16069 result |= 16;
16070 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
16071 result |= 32;
16072
16073 close (fd);
16074 }
16075 return result;
16076 ;
16077 return 0;
16078}
0750520d 16079_ACEOF
6ec2e0f5
SDJ
16080if ac_fn_c_try_run "$LINENO"; then :
16081 gl_cv_func_fcntl_f_dupfd_works=yes
0750520d 16082else
6ec2e0f5
SDJ
16083 gl_cv_func_fcntl_f_dupfd_works=no
16084fi
16085rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16086 conftest.$ac_objext conftest.beam conftest.$ac_ext
0750520d 16087fi
0750520d
PA
16088
16089fi
6ec2e0f5
SDJ
16090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
16091$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
16092 case $gl_cv_func_fcntl_f_dupfd_works in
16093 *yes) ;;
16094 *)
0750520d 16095
0750520d 16096
472fa5ee
SM
16097 :
16098
16099
16100
16101
16102
6ec2e0f5
SDJ
16103 if test $ac_cv_func_fcntl = no; then
16104 HAVE_FCNTL=0
16105 else
16106 REPLACE_FCNTL=1
16107 fi
0750520d 16108
0750520d 16109
6ec2e0f5
SDJ
16110$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
16111 ;;
16112 esac
0750520d 16113
6ec2e0f5
SDJ
16114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
16115$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
d0ac1c44 16116if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
8690e634
JK
16117 $as_echo_n "(cached) " >&6
16118else
16119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16120/* end confdefs.h. */
16121
6ec2e0f5
SDJ
16122#include <fcntl.h>
16123#ifndef F_DUPFD_CLOEXEC
16124choke me
16125#endif
49e4877c 16126
6ec2e0f5
SDJ
16127int
16128main ()
16129{
8690e634 16130
6ec2e0f5
SDJ
16131 ;
16132 return 0;
16133}
16134_ACEOF
16135if ac_fn_c_try_compile "$LINENO"; then :
16136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16137/* end confdefs.h. */
8690e634 16138
6ec2e0f5
SDJ
16139#ifdef __linux__
16140/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
16141 it to support the semantics on older kernels that failed with EINVAL. */
16142choke me
16143#endif
8690e634
JK
16144
16145int
16146main ()
16147{
16148
8690e634
JK
16149 ;
16150 return 0;
16151}
16152_ACEOF
16153if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 16154 gl_cv_func_fcntl_f_dupfd_cloexec=yes
8690e634 16155else
6ec2e0f5 16156 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
8690e634
JK
16157fi
16158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
16159else
16160 gl_cv_func_fcntl_f_dupfd_cloexec=no
8690e634 16161fi
6ec2e0f5
SDJ
16162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16163fi
16164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
16165$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
16166 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
16167
16168
16169
472fa5ee
SM
16170 :
16171
16172
16173
16174
16175
6ec2e0f5
SDJ
16176 if test $ac_cv_func_fcntl = no; then
16177 HAVE_FCNTL=0
16178 else
16179 REPLACE_FCNTL=1
16180 fi
16181
16182 fi
16183 fi
16184
16185
16186
16187
472fa5ee
SM
16188 :
16189
16190
16191
16192
16193
6ec2e0f5
SDJ
16194 if test $ac_cv_func_fchdir = no; then
16195 HAVE_FCHDIR=0
16196 fi
16197
16198 if test $HAVE_FCHDIR = 0; then
16199
16200
16201
472fa5ee
SM
16202 :
16203
16204
16205
16206
16207
6ec2e0f5
SDJ
16208 if test $ac_cv_func_fcntl = no; then
16209 HAVE_FCNTL=0
16210 else
16211 REPLACE_FCNTL=1
16212 fi
16213
16214 fi
16215
16216
16217 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
16218
16219
16220
16221
16222
16223
16224
16225
16226 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
16227
16228 fi
8690e634 16229
8690e634
JK
16230
16231
8690e634
JK
16232
16233
6ec2e0f5 16234 GNULIB_FCNTL=1
8690e634 16235
8690e634
JK
16236
16237
8690e634 16238
8690e634 16239
6ec2e0f5
SDJ
16240$as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
16241
8690e634 16242
8690e634 16243
63ce7108
TT
16244
16245
16246
16247
8690e634
JK
16248
16249
16250
16251
16252
16253
16254
16255 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 16256 gl_cv_next_fcntl_h='<'fcntl.h'>'
8690e634 16257 else
6ec2e0f5
SDJ
16258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
16259$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
d0ac1c44 16260if ${gl_cv_next_fcntl_h+:} false; then :
8690e634
JK
16261 $as_echo_n "(cached) " >&6
16262else
16263
4a626d0a
PA
16264
16265
16266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 16267/* end confdefs.h. */
6ec2e0f5 16268#include <fcntl.h>
8690e634 16269_ACEOF
4a626d0a
PA
16270 case "$host_os" in
16271 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16272 *) gl_absname_cpp="$ac_cpp" ;;
16273 esac
16274
16275 case "$host_os" in
16276 mingw*)
16277 gl_dirsep_regex='[/\\]'
16278 ;;
16279 *)
16280 gl_dirsep_regex='\/'
16281 ;;
16282 esac
16283 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 16284 gl_header_literal_regex=`echo 'fcntl.h' \
4a626d0a
PA
16285 | sed -e "$gl_make_literal_regex_sed"`
16286 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16287 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16288 s|^/[^/]|//&|
16289 p
16290 q
16291 }'
8690e634 16292
6ec2e0f5 16293 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a 16294 sed -n "$gl_absolute_header_sed"`
c971b7fa 16295
6ec2e0f5
SDJ
16296 gl_header=$gl_cv_absolute_fcntl_h
16297 gl_cv_next_fcntl_h='"'$gl_header'"'
8690e634
JK
16298
16299
16300fi
6ec2e0f5
SDJ
16301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
16302$as_echo "$gl_cv_next_fcntl_h" >&6; }
8690e634 16303 fi
6ec2e0f5 16304 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
8690e634
JK
16305
16306 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16307 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 16308 gl_next_as_first_directive='<'fcntl.h'>'
8690e634
JK
16309 else
16310 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 16311 gl_next_as_first_directive=$gl_cv_next_fcntl_h
8690e634 16312 fi
6ec2e0f5 16313 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
8690e634
JK
16314
16315
16316
16317
16318
16319
6ec2e0f5
SDJ
16320
16321
16322
16323
5e8754f9
SDJ
16324 for gl_func in fcntl openat; do
16325 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
16326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
16327$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
16328if eval \${$as_gl_Symbol+:} false; then :
16329 $as_echo_n "(cached) " >&6
16330else
16331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16332/* end confdefs.h. */
16333#include <fcntl.h>
8690e634 16334
5e8754f9
SDJ
16335int
16336main ()
16337{
16338#undef $gl_func
16339 (void) $gl_func;
16340 ;
16341 return 0;
16342}
16343_ACEOF
16344if ac_fn_c_try_compile "$LINENO"; then :
16345 eval "$as_gl_Symbol=yes"
16346else
16347 eval "$as_gl_Symbol=no"
16348fi
16349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16350fi
16351eval ac_res=\$$as_gl_Symbol
16352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16353$as_echo "$ac_res" >&6; }
16354 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
16355 cat >>confdefs.h <<_ACEOF
16356#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
7a6dbc2f 16357_ACEOF
8690e634 16358
5e8754f9
SDJ
16359 eval ac_cv_have_decl_$gl_func=yes
16360fi
16361 done
16362
8690e634
JK
16363
16364
8839a007 16365
63ce7108 16366
63ce7108 16367
63ce7108 16368
6ec2e0f5
SDJ
16369 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
16370#include <dirent.h>
16371
16372"
d0ac1c44 16373if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
6ec2e0f5
SDJ
16374 ac_have_decl=1
16375else
16376 ac_have_decl=0
16377fi
16378
16379cat >>confdefs.h <<_ACEOF
16380#define HAVE_DECL_FDOPENDIR $ac_have_decl
63ce7108 16381_ACEOF
6ec2e0f5
SDJ
16382if test $ac_have_decl = 1; then :
16383
63ce7108 16384else
6ec2e0f5 16385 HAVE_DECL_FDOPENDIR=0
63ce7108 16386fi
63ce7108
TT
16387
16388
472fa5ee
SM
16389 :
16390
16391
16392
16393
16394
6ec2e0f5
SDJ
16395 if test $ac_cv_func_fdopendir = no; then
16396 HAVE_FDOPENDIR=0
16397 else
16398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
16399$as_echo_n "checking whether fdopendir works... " >&6; }
d0ac1c44 16400if ${gl_cv_func_fdopendir_works+:} false; then :
6ec2e0f5
SDJ
16401 $as_echo_n "(cached) " >&6
16402else
16403 if test "$cross_compiling" = yes; then :
16404 case "$host_os" in
16405 # Guess yes on glibc systems.
16406 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
16407 # If we don't know, assume the worst.
16408 *) gl_cv_func_fdopendir_works="guessing no" ;;
16409 esac
16410
63ce7108
TT
16411else
16412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16413/* end confdefs.h. */
16414
6ec2e0f5
SDJ
16415#include <dirent.h>
16416#include <fcntl.h>
16417#include <unistd.h>
16418#if !HAVE_DECL_FDOPENDIR
16419extern
16420# ifdef __cplusplus
16421"C"
16422# endif
16423DIR *fdopendir (int);
16424#endif
63ce7108
TT
16425
16426int
16427main ()
16428{
6ec2e0f5
SDJ
16429int result = 0;
16430 int fd = open ("conftest.c", O_RDONLY);
16431 if (fd < 0) result |= 1;
16432 if (fdopendir (fd)) result |= 2;
16433 if (close (fd)) result |= 4;
16434 return result;
63ce7108
TT
16435 ;
16436 return 0;
16437}
16438_ACEOF
16439if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 16440 gl_cv_func_fdopendir_works=yes
63ce7108 16441else
6ec2e0f5 16442 gl_cv_func_fdopendir_works=no
63ce7108
TT
16443fi
16444rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16445 conftest.$ac_objext conftest.beam conftest.$ac_ext
16446fi
16447
63ce7108 16448fi
6ec2e0f5
SDJ
16449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
16450$as_echo "$gl_cv_func_fdopendir_works" >&6; }
16451 case "$gl_cv_func_fdopendir_works" in
63ce7108
TT
16452 *yes) ;;
16453 *)
6ec2e0f5 16454 REPLACE_FDOPENDIR=1
63ce7108
TT
16455 ;;
16456 esac
16457 fi
16458
6ec2e0f5 16459 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
09607c9e
TT
16460
16461
16462
4a626d0a
PA
16463
16464
16465
16466
16467
6ec2e0f5 16468 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
4a626d0a 16469
6ec2e0f5 16470 fi
4a626d0a
PA
16471
16472
16473
4a626d0a 16474
4a626d0a 16475
6ec2e0f5 16476 GNULIB_FDOPENDIR=1
4a626d0a
PA
16477
16478
16479
16480
16481
6ec2e0f5 16482$as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
4a626d0a
PA
16483
16484
16485
16486
16487
6ec2e0f5
SDJ
16488cat >>confdefs.h <<_ACEOF
16489#define GNULIB_FDOPENDIR 1
16490_ACEOF
4a626d0a 16491
09607c9e 16492
09607c9e
TT
16493
16494
472fa5ee
SM
16495 :
16496
16497
16498
16499
16500
09607c9e 16501
6ec2e0f5
SDJ
16502
16503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
16504$as_echo_n "checking for flexible array member... " >&6; }
d0ac1c44 16505if ${ac_cv_c_flexmember+:} false; then :
09607c9e
TT
16506 $as_echo_n "(cached) " >&6
16507else
16508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16509/* end confdefs.h. */
6ec2e0f5
SDJ
16510#include <stdlib.h>
16511 #include <stdio.h>
16512 #include <stddef.h>
5e8754f9 16513 struct s { int n; double d[]; };
09607c9e
TT
16514int
16515main ()
16516{
6ec2e0f5
SDJ
16517int m = getchar ();
16518 size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
16519 nbytes += sizeof (struct s) - 1;
16520 nbytes -= nbytes % sizeof (struct s);
16521 struct s *p = malloc (nbytes);
16522 p->d[0] = 0.0;
16523 return p->d != (double *) NULL;
09607c9e
TT
16524 ;
16525 return 0;
16526}
16527_ACEOF
16528if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 16529 ac_cv_c_flexmember=yes
09607c9e 16530else
6ec2e0f5 16531 ac_cv_c_flexmember=no
09607c9e
TT
16532fi
16533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16534fi
6ec2e0f5
SDJ
16535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
16536$as_echo "$ac_cv_c_flexmember" >&6; }
16537 if test $ac_cv_c_flexmember = yes; then
16538
16539$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
09607c9e 16540
09607c9e 16541 else
6ec2e0f5 16542 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
09607c9e 16543
6ec2e0f5
SDJ
16544 fi
16545
16546
16547
16548
16549 FLOAT_H=
16550 REPLACE_FLOAT_LDBL=0
16551 case "$host_os" in
16552 aix* | beos* | openbsd* | mirbsd* | irix*)
16553 FLOAT_H=float.h
16554 ;;
5e8754f9 16555 freebsd*)
6ec2e0f5
SDJ
16556 case "$host_cpu" in
16557 i[34567]86 )
16558 FLOAT_H=float.h
16559 ;;
16560 x86_64 )
16561 # On x86_64 systems, the C compiler may still be generating
16562 # 32-bit code.
16563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16564/* end confdefs.h. */
16565#if defined __LP64__ || defined __x86_64__ || defined __amd64__
5e8754f9
SDJ
16566 yes
16567 #endif
09607c9e 16568_ACEOF
5e8754f9
SDJ
16569if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16570 $EGREP "yes" >/dev/null 2>&1; then :
6ec2e0f5 16571
09607c9e 16572else
6ec2e0f5 16573 FLOAT_H=float.h
09607c9e 16574fi
5e8754f9
SDJ
16575rm -f conftest*
16576
6ec2e0f5
SDJ
16577 ;;
16578 esac
16579 ;;
16580 linux*)
16581 case "$host_cpu" in
16582 powerpc*)
16583 FLOAT_H=float.h
16584 ;;
16585 esac
16586 ;;
16587 esac
16588 case "$host_os" in
5e8754f9 16589 aix* | freebsd* | linux*)
6ec2e0f5
SDJ
16590 if test -n "$FLOAT_H"; then
16591 REPLACE_FLOAT_LDBL=1
16592 fi
16593 ;;
16594 esac
16595
16596 REPLACE_ITOLD=0
16597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
16598$as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
d0ac1c44 16599if ${gl_cv_func_itold_works+:} false; then :
09607c9e
TT
16600 $as_echo_n "(cached) " >&6
16601else
09607c9e 16602
6ec2e0f5
SDJ
16603 if test "$cross_compiling" = yes; then :
16604 case "$host" in
16605 sparc*-*-linux*)
16606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16607/* end confdefs.h. */
16608#if defined __LP64__ || defined __arch64__
5e8754f9
SDJ
16609 yes
16610 #endif
09607c9e 16611_ACEOF
5e8754f9
SDJ
16612if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16613 $EGREP "yes" >/dev/null 2>&1; then :
6ec2e0f5 16614 gl_cv_func_itold_works="guessing no"
09607c9e 16615else
6ec2e0f5 16616 gl_cv_func_itold_works="guessing yes"
09607c9e 16617fi
5e8754f9
SDJ
16618rm -f conftest*
16619
6ec2e0f5 16620 ;;
5e8754f9 16621 *) gl_cv_func_itold_works="guessing yes" ;;
6ec2e0f5
SDJ
16622 esac
16623
4a626d0a
PA
16624else
16625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16626/* end confdefs.h. */
4a626d0a 16627
6ec2e0f5
SDJ
16628int i = -1;
16629volatile long double ld;
16630int main ()
4a626d0a 16631{
6ec2e0f5
SDJ
16632 ld += i * 1.0L;
16633 if (ld > 0)
16634 return 1;
4a626d0a
PA
16635 return 0;
16636}
16637_ACEOF
6ec2e0f5
SDJ
16638if ac_fn_c_try_run "$LINENO"; then :
16639 gl_cv_func_itold_works=yes
4a626d0a 16640else
6ec2e0f5
SDJ
16641 gl_cv_func_itold_works=no
16642fi
16643rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16644 conftest.$ac_objext conftest.beam conftest.$ac_ext
16645fi
09607c9e
TT
16646
16647
6ec2e0f5
SDJ
16648fi
16649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
16650$as_echo "$gl_cv_func_itold_works" >&6; }
16651 case "$gl_cv_func_itold_works" in
16652 *no)
16653 REPLACE_ITOLD=1
16654 FLOAT_H=float.h
16655 ;;
16656 esac
09607c9e 16657
6ec2e0f5 16658 if test -n "$FLOAT_H"; then
09607c9e
TT
16659
16660
16661
16662
16663
16664
16665
4a626d0a 16666
09607c9e 16667 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 16668 gl_cv_next_float_h='<'float.h'>'
09607c9e 16669 else
6ec2e0f5
SDJ
16670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
16671$as_echo_n "checking absolute name of <float.h>... " >&6; }
d0ac1c44 16672if ${gl_cv_next_float_h+:} false; then :
09607c9e
TT
16673 $as_echo_n "(cached) " >&6
16674else
16675
4a626d0a
PA
16676
16677
16678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
09607c9e 16679/* end confdefs.h. */
6ec2e0f5 16680#include <float.h>
09607c9e 16681_ACEOF
4a626d0a
PA
16682 case "$host_os" in
16683 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16684 *) gl_absname_cpp="$ac_cpp" ;;
16685 esac
16686
16687 case "$host_os" in
16688 mingw*)
16689 gl_dirsep_regex='[/\\]'
16690 ;;
16691 *)
16692 gl_dirsep_regex='\/'
16693 ;;
16694 esac
16695 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 16696 gl_header_literal_regex=`echo 'float.h' \
4a626d0a
PA
16697 | sed -e "$gl_make_literal_regex_sed"`
16698 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16699 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16700 s|^/[^/]|//&|
16701 p
16702 q
16703 }'
09607c9e 16704
6ec2e0f5 16705 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a 16706 sed -n "$gl_absolute_header_sed"`
09607c9e 16707
6ec2e0f5
SDJ
16708 gl_header=$gl_cv_absolute_float_h
16709 gl_cv_next_float_h='"'$gl_header'"'
09607c9e
TT
16710
16711
16712fi
6ec2e0f5
SDJ
16713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
16714$as_echo "$gl_cv_next_float_h" >&6; }
09607c9e 16715 fi
6ec2e0f5 16716 NEXT_FLOAT_H=$gl_cv_next_float_h
09607c9e
TT
16717
16718 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16719 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 16720 gl_next_as_first_directive='<'float.h'>'
09607c9e
TT
16721 else
16722 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 16723 gl_next_as_first_directive=$gl_cv_next_float_h
09607c9e 16724 fi
6ec2e0f5 16725 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
09607c9e
TT
16726
16727
16728
16729
6ec2e0f5 16730 fi
09607c9e 16731
6ec2e0f5
SDJ
16732 if test -n "$FLOAT_H"; then
16733 GL_GENERATE_FLOAT_H_TRUE=
16734 GL_GENERATE_FLOAT_H_FALSE='#'
3d99e817 16735else
6ec2e0f5
SDJ
16736 GL_GENERATE_FLOAT_H_TRUE='#'
16737 GL_GENERATE_FLOAT_H_FALSE=
3d99e817
AK
16738fi
16739
3d99e817 16740
09607c9e 16741
6ec2e0f5 16742 if test $REPLACE_FLOAT_LDBL = 1; then
8690e634 16743
8690e634 16744
8690e634 16745
8690e634 16746
8690e634 16747
6ec2e0f5
SDJ
16748
16749
16750
16751 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
16752
8690e634 16753 fi
6ec2e0f5 16754 if test $REPLACE_ITOLD = 1; then
8690e634
JK
16755
16756
16757
16758
16759
6ec2e0f5
SDJ
16760
16761
16762
16763 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
16764
8690e634
JK
16765 fi
16766
16767
16768
6ec2e0f5 16769
5e8754f9
SDJ
16770
16771 FNMATCH_H=
6ec2e0f5
SDJ
16772 gl_fnmatch_required_lowercase=`
16773 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
16774 `
5e8754f9
SDJ
16775 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
16776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
6ec2e0f5 16777$as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
d0ac1c44 16778if eval \${$gl_fnmatch_cache_var+:} false; then :
8690e634 16779 $as_echo_n "(cached) " >&6
6ec2e0f5 16780else
5e8754f9
SDJ
16781 if test $gl_fnmatch_required = GNU; then
16782 gl_fnmatch_gnu_start=
16783 gl_fnmatch_gnu_end=
16784 else
16785 gl_fnmatch_gnu_start='#if 0'
16786 gl_fnmatch_gnu_end='#endif'
16787 fi
16788 if test "$cross_compiling" = yes; then :
6ec2e0f5 16789 eval "$gl_fnmatch_cache_var=\"guessing no\""
8690e634
JK
16790else
16791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16792/* end confdefs.h. */
6ec2e0f5 16793#include <fnmatch.h>
5e8754f9
SDJ
16794 static int
16795 y (char const *pattern, char const *string, int flags)
16796 {
16797 return fnmatch (pattern, string, flags) == 0;
16798 }
16799 static int
16800 n (char const *pattern, char const *string, int flags)
16801 {
16802 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
16803 }
8690e634 16804
8690e634
JK
16805int
16806main ()
16807{
6ec2e0f5 16808char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
5e8754f9
SDJ
16809 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
16810 static char const A_1[] = { 'A' - 1, 0 };
16811 static char const A01[] = { 'A' + 1, 0 };
16812 static char const a_1[] = { 'a' - 1, 0 };
16813 static char const a01[] = { 'a' + 1, 0 };
16814 static char const bs_1[] = { '\\\\' - 1, 0 };
16815 static char const bs01[] = { '\\\\' + 1, 0 };
16816 int result = 0;
16817 if (!n ("a*", "", 0))
16818 return 1;
16819 if (!y ("a*", "abc", 0))
16820 return 1;
16821 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
16822 return 1;
16823 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
16824 return 2;
16825 if (!y ("a\\\\bc", "abc", 0))
16826 return 3;
16827 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
16828 return 3;
16829 if (!y ("*x", ".x", 0))
16830 return 4;
16831 if (!n ("*x", ".x", FNM_PERIOD))
16832 return 4;
16833 if (!y (Apat, "\\\\", 0))
16834 return 5;
16835 if (!y (Apat, "A", 0))
16836 return 5;
16837 if (!y (apat, "\\\\", 0))
16838 return 5;
16839 if (!y (apat, "a", 0))
16840 return 5;
16841 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
16842 return 5;
16843 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
16844 return 5;
16845 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
16846 return 5;
16847 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
16848 return 5;
16849 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
16850 return 5;
16851 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
16852 return 5;
16853 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
16854 return 5;
16855 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
16856 return 5;
16857 $gl_fnmatch_gnu_start
16858 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
16859 result |= 8;
16860 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
16861 result |= 16;
16862 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
16863 result |= 32;
16864 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
16865 result |= 64;
16866 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
16867 result |= 64;
16868 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
16869 result |= 64;
16870 $gl_fnmatch_gnu_end
16871 return result;
8690e634
JK
16872
16873 ;
16874 return 0;
16875}
16876_ACEOF
6ec2e0f5
SDJ
16877if ac_fn_c_try_run "$LINENO"; then :
16878 eval "$gl_fnmatch_cache_var=yes"
8690e634 16879else
6ec2e0f5 16880 eval "$gl_fnmatch_cache_var=no"
8690e634 16881fi
6ec2e0f5
SDJ
16882rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16883 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 16884fi
8690e634 16885
8690e634 16886
6ec2e0f5
SDJ
16887fi
16888eval ac_res=\$$gl_fnmatch_cache_var
16889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16890$as_echo "$ac_res" >&6; }
5e8754f9
SDJ
16891 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
16892 if test "$gl_fnmatch_result" = yes; then
16893 rm -f "$gl_source_base/fnmatch.h"
16894 else
16895 FNMATCH_H=fnmatch.h
8690e634
JK
16896 fi
16897
6ec2e0f5
SDJ
16898 if test -n "$FNMATCH_H"; then
16899 GL_GENERATE_FNMATCH_H_TRUE=
16900 GL_GENERATE_FNMATCH_H_FALSE='#'
16901else
16902 GL_GENERATE_FNMATCH_H_TRUE='#'
16903 GL_GENERATE_FNMATCH_H_FALSE=
16904fi
8690e634 16905
8690e634 16906
5e8754f9 16907 if test -n "$FNMATCH_H"; then
8690e634 16908
6ec2e0f5
SDJ
16909
16910
16911
16912
16913
6ec2e0f5
SDJ
16914
16915
7a6dbc2f 16916 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
6ec2e0f5 16917
6ec2e0f5
SDJ
16918
16919
5e8754f9
SDJ
16920cat >>confdefs.h <<_ACEOF
16921#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
16922_ACEOF
16923
16924
6ec2e0f5
SDJ
16925 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
16926"
d0ac1c44 16927if test "x$ac_cv_have_decl_isblank" = xyes; then :
6ec2e0f5 16928 ac_have_decl=1
8690e634 16929else
6ec2e0f5 16930 ac_have_decl=0
8690e634
JK
16931fi
16932
6ec2e0f5
SDJ
16933cat >>confdefs.h <<_ACEOF
16934#define HAVE_DECL_ISBLANK $ac_have_decl
16935_ACEOF
8690e634
JK
16936
16937
472fa5ee
SM
16938 :
16939
16940
16941
16942
16943
16944
16945
16946
16947
16948
16949
16950
16951
16952
16953
16954
16955
16956
16957
16958
16959
16960
16961
16962
16963
16964
16965
16966 :
16967
16968
16969
16970
8690e634
JK
16971
16972
6ec2e0f5 16973 fi
8690e634
JK
16974
16975
16976
16977
16978
5e8754f9
SDJ
16979 if test -n "$FNMATCH_H"; then
16980
16981
16982
16983
472fa5ee
SM
16984
16985
16986
16987
5e8754f9 16988 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
472fa5ee
SM
16989
16990
16991
5e8754f9
SDJ
16992cat >>confdefs.h <<_ACEOF
16993#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
16994_ACEOF
472fa5ee
SM
16995
16996
5e8754f9
SDJ
16997 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
16998"
16999if test "x$ac_cv_have_decl_isblank" = xyes; then :
17000 ac_have_decl=1
17001else
17002 ac_have_decl=0
17003fi
472fa5ee 17004
5e8754f9
SDJ
17005cat >>confdefs.h <<_ACEOF
17006#define HAVE_DECL_ISBLANK $ac_have_decl
17007_ACEOF
472fa5ee
SM
17008
17009
5e8754f9 17010 :
472fa5ee
SM
17011
17012
17013
17014
17015
17016
17017
17018
17019
17020
17021
98399780 17022
5e8754f9
SDJ
17023
17024
17025
17026
17027
17028
17029
17030
17031
17032
17033
17034
17035
17036
17037
17038 :
17039
17040
17041
17042
17043
17044
17045 fi
17046
17047
17048
17049 FREXP_LIBM=
17050 if test $gl_cv_func_frexp_no_libm = no; then
17051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5
17052$as_echo_n "checking whether frexp() can be used with libm... " >&6; }
17053if ${gl_cv_func_frexp_in_libm+:} false; then :
17054 $as_echo_n "(cached) " >&6
6ec2e0f5 17055else
98399780 17056
5e8754f9
SDJ
17057 save_LIBS="$LIBS"
17058 LIBS="$LIBS -lm"
17059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17060/* end confdefs.h. */
17061#include <math.h>
17062 double x;
17063int
17064main ()
17065{
17066int e; return frexp (x, &e) > 0;
17067 ;
17068 return 0;
17069}
7a6dbc2f 17070_ACEOF
5e8754f9
SDJ
17071if ac_fn_c_try_link "$LINENO"; then :
17072 gl_cv_func_frexp_in_libm=yes
17073else
17074 gl_cv_func_frexp_in_libm=no
17075fi
17076rm -f core conftest.err conftest.$ac_objext \
17077 conftest$ac_exeext conftest.$ac_ext
17078 LIBS="$save_LIBS"
17079
17080fi
17081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5
17082$as_echo "$gl_cv_func_frexp_in_libm" >&6; }
17083 if test $gl_cv_func_frexp_in_libm = yes; then
17084 FREXP_LIBM=-lm
17085 fi
17086 fi
17087 if test $gl_cv_func_frexp_no_libm = yes \
17088 || test $gl_cv_func_frexp_in_libm = yes; then
17089 save_LIBS="$LIBS"
17090 LIBS="$LIBS $FREXP_LIBM"
17091
98399780
YQ
17092
17093
472fa5ee
SM
17094 :
17095
17096
17097
17098
17099
5e8754f9
SDJ
17100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
17101$as_echo_n "checking whether frexp works... " >&6; }
17102if ${gl_cv_func_frexp_works+:} false; then :
17103 $as_echo_n "(cached) " >&6
17104else
17105
17106 if test "$cross_compiling" = yes; then :
17107 case "$host_os" in
17108 netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
17109 *) gl_cv_func_frexp_works="guessing yes";;
17110 esac
17111
17112else
17113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17114/* end confdefs.h. */
17115
17116#include <float.h>
17117#include <math.h>
17118#include <string.h>
17119#if HAVE_DECL_ALARM
17120# include <signal.h>
17121# include <unistd.h>
17122#endif
17123/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
17124 ICC 10.0 has a bug when optimizing the expression -zero.
17125 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
17126 to PowerPC on Mac OS X 10.5. */
17127#if defined __hpux || defined __sgi || defined __ICC
17128static double
17129compute_minus_zero (void)
17130{
17131 return -DBL_MIN * DBL_MIN;
17132}
17133# define minus_zero compute_minus_zero ()
17134#else
17135double minus_zero = -0.0;
17136#endif
17137int main()
17138{
17139 int result = 0;
17140 int i;
17141 volatile double x;
17142 double zero = 0.0;
17143#if HAVE_DECL_ALARM
17144 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
17145 number. Let the test fail in this case. */
17146 signal (SIGALRM, SIG_DFL);
17147 alarm (5);
17148#endif
17149 /* Test on denormalized numbers. */
17150 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
17151 ;
17152 if (x > 0.0)
17153 {
17154 int exp;
17155 double y = frexp (x, &exp);
17156 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
17157 On NetBSD: y = 0.75. Correct: y = 0.5. */
17158 if (y != 0.5)
17159 result |= 1;
17160 }
17161 /* Test on infinite numbers. */
17162 x = 1.0 / zero;
17163 {
17164 int exp;
17165 double y = frexp (x, &exp);
17166 if (y != x)
17167 result |= 2;
17168 }
17169 /* Test on negative zero. */
17170 x = minus_zero;
17171 {
17172 int exp;
17173 double y = frexp (x, &exp);
17174 if (memcmp (&y, &x, sizeof x))
17175 result |= 4;
17176 }
17177 return result;
17178}
17179_ACEOF
17180if ac_fn_c_try_run "$LINENO"; then :
17181 gl_cv_func_frexp_works=yes
17182else
17183 gl_cv_func_frexp_works=no
17184fi
17185rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17186 conftest.$ac_objext conftest.beam conftest.$ac_ext
17187fi
17188
98399780 17189
5e8754f9
SDJ
17190fi
17191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
17192$as_echo "$gl_cv_func_frexp_works" >&6; }
98399780 17193
5e8754f9
SDJ
17194 LIBS="$save_LIBS"
17195 case "$gl_cv_func_frexp_works" in
17196 *yes) gl_func_frexp=yes ;;
17197 *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;;
17198 esac
17199 else
17200 gl_func_frexp=no
17201 fi
17202 if test $gl_func_frexp = yes; then
98399780 17203
5e8754f9 17204$as_echo "#define HAVE_FREXP 1" >>confdefs.h
98399780 17205
5e8754f9 17206 fi
98399780
YQ
17207
17208
5e8754f9 17209 if test $gl_func_frexp != yes; then
6a29c58e
YQ
17210
17211
17212
17213
6a29c58e
YQ
17214
17215
17216
17217
5e8754f9 17218 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
8690e634 17219
5e8754f9 17220 fi
8690e634 17221
8690e634 17222
8690e634 17223
8690e634 17224
8690e634 17225
5e8754f9 17226 GNULIB_FREXP=1
8690e634 17227
8690e634 17228
4a626d0a 17229
8690e634 17230
8690e634 17231
5e8754f9 17232$as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
8690e634
JK
17233
17234
17235
17236
17237
63ce7108 17238
e26b6bb0
TT
17239
17240
17241
5e8754f9
SDJ
17242 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
17243"
17244if test "x$ac_cv_have_decl_frexpl" = xyes; then :
e26b6bb0 17245
5e8754f9
SDJ
17246else
17247 HAVE_DECL_FREXPL=0
17248fi
e26b6bb0
TT
17249
17250
5e8754f9
SDJ
17251 FREXPL_LIBM=
17252 if test $HAVE_DECL_FREXPL = 1; then
e26b6bb0 17253
5e8754f9
SDJ
17254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
17255$as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
17256if ${gl_cv_func_frexpl_no_libm+:} false; then :
17257 $as_echo_n "(cached) " >&6
17258else
e26b6bb0 17259
5e8754f9
SDJ
17260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17261/* end confdefs.h. */
17262#include <math.h>
17263 long double x;
17264int
17265main ()
17266{
17267int e; return frexpl (x, &e) > 0;
17268 ;
17269 return 0;
17270}
17271_ACEOF
17272if ac_fn_c_try_link "$LINENO"; then :
17273 gl_cv_func_frexpl_no_libm=yes
17274else
17275 gl_cv_func_frexpl_no_libm=no
17276fi
17277rm -f core conftest.err conftest.$ac_objext \
17278 conftest$ac_exeext conftest.$ac_ext
e26b6bb0 17279
5e8754f9
SDJ
17280fi
17281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
17282$as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
e26b6bb0 17283
5e8754f9
SDJ
17284 if test $gl_cv_func_frexpl_no_libm = no; then
17285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5
17286$as_echo_n "checking whether frexpl() can be used with libm... " >&6; }
17287if ${gl_cv_func_frexpl_in_libm+:} false; then :
17288 $as_echo_n "(cached) " >&6
17289else
e26b6bb0 17290
5e8754f9
SDJ
17291 save_LIBS="$LIBS"
17292 LIBS="$LIBS -lm"
17293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17294/* end confdefs.h. */
17295#include <math.h>
17296 long double x;
17297int
17298main ()
17299{
17300int e; return frexpl (x, &e) > 0;
17301 ;
17302 return 0;
17303}
17304_ACEOF
17305if ac_fn_c_try_link "$LINENO"; then :
17306 gl_cv_func_frexpl_in_libm=yes
17307else
17308 gl_cv_func_frexpl_in_libm=no
17309fi
17310rm -f core conftest.err conftest.$ac_objext \
17311 conftest$ac_exeext conftest.$ac_ext
17312 LIBS="$save_LIBS"
e26b6bb0 17313
5e8754f9
SDJ
17314fi
17315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5
17316$as_echo "$gl_cv_func_frexpl_in_libm" >&6; }
17317 if test $gl_cv_func_frexpl_in_libm = yes; then
17318 FREXPL_LIBM=-lm
17319 fi
17320 fi
17321 if test $gl_cv_func_frexpl_no_libm = yes \
17322 || test $gl_cv_func_frexpl_in_libm = yes; then
17323 save_LIBS="$LIBS"
17324 LIBS="$LIBS $FREXPL_LIBM"
18848e28 17325
18848e28 17326
5e8754f9
SDJ
17327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
17328$as_echo_n "checking whether frexpl works... " >&6; }
17329if ${gl_cv_func_frexpl_works+:} false; then :
17330 $as_echo_n "(cached) " >&6
17331else
18848e28 17332
5e8754f9 17333 if test "$cross_compiling" = yes; then :
18848e28 17334
5e8754f9
SDJ
17335 case "$host_os" in
17336 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
17337 gl_cv_func_frexpl_works="guessing no";;
17338 *) gl_cv_func_frexpl_works="guessing yes";;
17339 esac
18848e28 17340
5e8754f9
SDJ
17341else
17342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17343/* end confdefs.h. */
18848e28 17344
5e8754f9
SDJ
17345#include <float.h>
17346#include <math.h>
17347/* Override the values of <float.h>, like done in float.in.h. */
17348#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
17349# undef LDBL_MIN_EXP
17350# define LDBL_MIN_EXP (-16381)
17351#endif
17352#if defined __i386__ && defined __FreeBSD__
17353# undef LDBL_MIN_EXP
17354# define LDBL_MIN_EXP (-16381)
17355#endif
17356#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
17357# undef LDBL_MIN_EXP
17358# define LDBL_MIN_EXP DBL_MIN_EXP
17359#endif
17360#if defined __sgi && (LDBL_MANT_DIG >= 106)
17361# if defined __GNUC__
17362# undef LDBL_MIN_EXP
17363# define LDBL_MIN_EXP DBL_MIN_EXP
17364# endif
17365#endif
17366extern
17367#ifdef __cplusplus
17368"C"
17369#endif
17370long double frexpl (long double, int *);
17371int main()
17372{
17373 int result = 0;
17374 volatile long double x;
17375 /* Test on finite numbers that fails on AIX 5.1. */
17376 x = 16.0L;
17377 {
17378 int exp = -9999;
17379 frexpl (x, &exp);
17380 if (exp != 5)
17381 result |= 1;
17382 }
17383 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
17384 function returns an invalid (incorrectly normalized) value: it returns
17385 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
17386 but the correct result is
17387 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
17388 x = 1.01L;
17389 {
17390 int exp = -9999;
17391 long double y = frexpl (x, &exp);
17392 if (!(exp == 1 && y == 0.505L))
17393 result |= 2;
17394 }
17395 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
17396 LDBL_MAX_EXP = 16384.
17397 In the loop end test, we test x against Infinity, rather than comparing
17398 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
17399 {
17400 int i;
17401 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
17402 {
17403 int exp = -9999;
17404 frexpl (x, &exp);
17405 if (exp != i)
17406 {
17407 result |= 4;
17408 break;
17409 }
17410 }
17411 }
17412 /* Test on denormalized numbers. */
17413 {
17414 int i;
17415 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
17416 ;
17417 if (x > 0.0L)
17418 {
17419 int exp;
17420 long double y = frexpl (x, &exp);
17421 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
17422 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
17423 if (exp != LDBL_MIN_EXP - 1)
17424 result |= 8;
17425 }
17426 }
17427 /* Test on infinite numbers. */
17428 x = 1.0L / 0.0L;
17429 {
17430 int exp;
17431 long double y = frexpl (x, &exp);
17432 if (y != x)
17433 result |= 16;
17434 }
17435 return result;
17436}
17437_ACEOF
17438if ac_fn_c_try_run "$LINENO"; then :
17439 gl_cv_func_frexpl_works=yes
17440else
17441 gl_cv_func_frexpl_works=no
17442fi
17443rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17444 conftest.$ac_objext conftest.beam conftest.$ac_ext
17445fi
18848e28
GF
17446
17447
5e8754f9
SDJ
17448fi
17449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
17450$as_echo "$gl_cv_func_frexpl_works" >&6; }
18848e28 17451
5e8754f9
SDJ
17452 LIBS="$save_LIBS"
17453 case "$gl_cv_func_frexpl_works" in
17454 *yes) gl_func_frexpl=yes ;;
17455 *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;;
17456 esac
17457 else
17458 gl_func_frexpl=no
17459 fi
17460 if test $gl_func_frexpl = yes; then
18848e28 17461
5e8754f9 17462$as_echo "#define HAVE_FREXPL 1" >>confdefs.h
18848e28 17463
5e8754f9
SDJ
17464 fi
17465 fi
17466 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
17467 if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
18848e28 17468
5e8754f9
SDJ
17469 FREXPL_LIBM="$FREXP_LIBM"
17470 else
17471 FREXPL_LIBM=
17472 fi
17473 fi
18848e28 17474
18848e28 17475
6ec2e0f5 17476 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
18848e28 17477
18848e28 17478
18848e28 17479
18848e28
GF
17480
17481
18848e28 17482
18848e28 17483
18848e28 17484
6ec2e0f5 17485 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
18848e28
GF
17486
17487 fi
17488
17489
17490
17491
17492
6ec2e0f5 17493 GNULIB_FREXPL=1
18848e28
GF
17494
17495
17496
17497
17498
6ec2e0f5 17499$as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
18848e28
GF
17500
17501
17502
17503
17504
17505
17506
5e8754f9
SDJ
17507 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
17508 REPLACE_FSTAT=1
17509 fi
17510
17511
17512 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
17513 REPLACE_FSTAT=1
17514 fi
18848e28 17515
6a29c58e 17516
6a29c58e 17517
6a29c58e 17518
6ec2e0f5 17519
472fa5ee
SM
17520 :
17521
17522
17523
17524
17525
6ec2e0f5
SDJ
17526 if test $ac_cv_func_fchdir = no; then
17527 HAVE_FCHDIR=0
6a29c58e
YQ
17528 fi
17529
6ec2e0f5
SDJ
17530 if test $HAVE_FCHDIR = 0; then
17531 case "$gl_cv_func_open_directory_works" in
17532 *yes) ;;
17533 *)
17534 REPLACE_FSTAT=1
17535 ;;
17536 esac
17537 fi
6a29c58e
YQ
17538
17539
6ec2e0f5 17540 if test $REPLACE_FSTAT = 1; then
6a29c58e 17541
3d99e817
AK
17542
17543
17544
3d99e817
AK
17545
17546
17547
17548
6ec2e0f5 17549 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
3d99e817 17550
5e8754f9 17551 :
6ec2e0f5 17552 fi
3d99e817
AK
17553
17554
17555
17556
17557
6ec2e0f5 17558 GNULIB_FSTAT=1
3d99e817 17559
49e4877c 17560
49e4877c 17561
49e4877c 17562
49e4877c 17563
6ec2e0f5 17564$as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
49e4877c 17565
6a29c58e
YQ
17566
17567
88b48903 17568
8690e634 17569
a512b375 17570
88b48903 17571
88b48903 17572
472fa5ee
SM
17573 :
17574
17575
17576
17577
17578
6ec2e0f5
SDJ
17579
17580 if test $ac_cv_func_fstatat = no; then
17581 HAVE_FSTATAT=0
17582 else
17583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
17584$as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
d0ac1c44 17585if ${gl_cv_func_fstatat_zero_flag+:} false; then :
6ec2e0f5
SDJ
17586 $as_echo_n "(cached) " >&6
17587else
17588 if test "$cross_compiling" = yes; then :
17589 case "$host_os" in
17590 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
17591 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
17592 esac
88b48903 17593
8690e634
JK
17594else
17595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17596/* end confdefs.h. */
8690e634 17597
6ec2e0f5
SDJ
17598 #include <fcntl.h>
17599 #include <sys/stat.h>
17600 int
17601 main (void)
17602 {
17603 struct stat a;
17604 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
17605 }
17606
88b48903
WN
17607_ACEOF
17608if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 17609 gl_cv_func_fstatat_zero_flag=yes
88b48903 17610else
6ec2e0f5 17611 gl_cv_func_fstatat_zero_flag=no
88b48903
WN
17612fi
17613rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17614 conftest.$ac_objext conftest.beam conftest.$ac_ext
17615fi
17616
17617
17618fi
6ec2e0f5
SDJ
17619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
17620$as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
88b48903 17621
6ec2e0f5
SDJ
17622 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
17623 *yes+*yes) ;;
5e8754f9
SDJ
17624 *) REPLACE_FSTATAT=1
17625 case $gl_cv_func_fstatat_zero_flag in
17626 *yes)
88b48903 17627
6ec2e0f5 17628$as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
88b48903 17629
7a6dbc2f 17630 ;;
5e8754f9
SDJ
17631 esac
17632 ;;
6ec2e0f5
SDJ
17633 esac
17634 fi
88b48903 17635
6ec2e0f5 17636 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
88b48903
WN
17637
17638
17639
17640
17641
88b48903 17642
4a626d0a
PA
17643
17644
6ec2e0f5
SDJ
17645 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
17646
17647 fi
17648
17649
17650
4a626d0a 17651
6ec2e0f5
SDJ
17652
17653 GNULIB_FSTATAT=1
17654
17655
17656
17657
17658
17659$as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
17660
17661
17662
17663
17664
17665
17666
17667
17668 gl_abort_bug=no
4a626d0a
PA
17669 case "$host_os" in
17670 mingw*)
6ec2e0f5 17671 gl_cv_func_getcwd_path_max=yes
4a626d0a
PA
17672 ;;
17673 *)
88b48903 17674
88b48903 17675
472fa5ee
SM
17676 :
17677
17678
17679
17680
17681
17682
17683
17684 :
17685
17686
17687
88b48903
WN
17688
17689
88b48903 17690
6ec2e0f5
SDJ
17691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
17692$as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
d0ac1c44 17693if ${gl_cv_func_getcwd_path_max+:} false; then :
6ec2e0f5
SDJ
17694 $as_echo_n "(cached) " >&6
17695else
17696 # Arrange for deletion of the temporary directory this test creates.
17697 ac_clean_files="$ac_clean_files confdir3"
17698 if test "$cross_compiling" = yes; then :
b567ca63
SM
17699 # Cross-compilation guesses:
17700 case "$host_os" in
17701 aix*) # On AIX, it has the AIX bug.
17702 gl_cv_func_getcwd_path_max='no, it has the AIX bug' ;;
17703 gnu*) # On Hurd, it is 'yes'.
17704 gl_cv_func_getcwd_path_max=yes ;;
17705 linux* | kfreebsd*)
17706 # On older Linux+glibc it's 'no, but it is partly working',
17707 # on newer Linux+glibc it's 'yes'.
17708 # On Linux+musl libc, it's 'no, but it is partly working'.
17709 # On kFreeBSD+glibc, it's 'no, but it is partly working'.
17710 gl_cv_func_getcwd_path_max='no, but it is partly working' ;;
17711 *) # If we don't know, assume the worst.
17712 gl_cv_func_getcwd_path_max=no ;;
5e8754f9 17713 esac
b567ca63 17714
6ec2e0f5
SDJ
17715else
17716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17717/* end confdefs.h. */
88b48903 17718
6ec2e0f5
SDJ
17719#include <errno.h>
17720#include <stdlib.h>
17721#if HAVE_UNISTD_H
17722# include <unistd.h>
17723#else
17724# include <direct.h>
17725#endif
17726#include <string.h>
17727#include <limits.h>
17728#include <sys/stat.h>
17729#include <sys/types.h>
17730#include <fcntl.h>
88b48903
WN
17731
17732
6ec2e0f5
SDJ
17733/* Arrange to define PATH_MAX, like "pathmax.h" does. */
17734#if HAVE_UNISTD_H
17735# include <unistd.h>
17736#endif
17737#include <limits.h>
17738#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
17739# include <sys/param.h>
17740#endif
17741#if !defined PATH_MAX && defined MAXPATHLEN
17742# define PATH_MAX MAXPATHLEN
17743#endif
17744#ifdef __hpux
17745# undef PATH_MAX
17746# define PATH_MAX 1024
17747#endif
5e8754f9 17748#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6ec2e0f5
SDJ
17749# undef PATH_MAX
17750# define PATH_MAX 260
17751#endif
88b48903 17752
88b48903 17753
6ec2e0f5
SDJ
17754#ifndef AT_FDCWD
17755# define AT_FDCWD 0
17756#endif
17757#ifdef ENAMETOOLONG
17758# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
17759#else
17760# define is_ENAMETOOLONG(x) 0
17761#endif
88b48903 17762
6ec2e0f5
SDJ
17763/* Use the getcwd function, not any macro. */
17764#undef getcwd
88b48903 17765
6ec2e0f5
SDJ
17766/* Don't get link errors because mkdir is redefined to rpl_mkdir. */
17767#undef mkdir
88b48903 17768
6ec2e0f5
SDJ
17769#ifndef S_IRWXU
17770# define S_IRWXU 0700
17771#endif
88b48903 17772
6ec2e0f5
SDJ
17773/* The length of this name must be 8. */
17774#define DIR_NAME "confdir3"
17775#define DIR_NAME_LEN 8
17776#define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
88b48903 17777
6ec2e0f5
SDJ
17778/* The length of "../". */
17779#define DOTDOTSLASH_LEN 3
88b48903 17780
6ec2e0f5
SDJ
17781/* Leftover bytes in the buffer, to work around library or OS bugs. */
17782#define BUF_SLOP 20
88b48903 17783
6ec2e0f5
SDJ
17784int
17785main ()
17786{
17787#ifndef PATH_MAX
17788 /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
17789 at least not on a local file system. And if we were to start worrying
17790 about remote file systems, we'd have to enable the wrapper function
17791 all of the time, just to be safe. That's not worth the cost. */
17792 exit (0);
17793#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
17794 - DIR_NAME_SIZE - BUF_SLOP) \
17795 <= PATH_MAX)
17796 /* FIXME: Assuming there's a system for which this is true,
17797 this should be done in a compile test. */
17798 exit (0);
17799#else
17800 char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
17801 + DIR_NAME_SIZE + BUF_SLOP];
17802 char *cwd = getcwd (buf, PATH_MAX);
17803 size_t initial_cwd_len;
17804 size_t cwd_len;
17805 int fail = 0;
17806 size_t n_chdirs = 0;
88b48903 17807
6ec2e0f5
SDJ
17808 if (cwd == NULL)
17809 exit (10);
88b48903 17810
6ec2e0f5 17811 cwd_len = initial_cwd_len = strlen (cwd);
88b48903 17812
6ec2e0f5
SDJ
17813 while (1)
17814 {
17815 size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
17816 char *c = NULL;
17817
17818 cwd_len += DIR_NAME_SIZE;
17819 /* If mkdir or chdir fails, it could be that this system cannot create
17820 any file with an absolute name longer than PATH_MAX, such as cygwin.
17821 If so, leave fail as 0, because the current working directory can't
17822 be too long for getcwd if it can't even be created. For other
17823 errors, be pessimistic and consider that as a failure, too. */
17824 if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
17825 {
17826 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
17827 fail = 20;
17828 break;
17829 }
88b48903 17830
6ec2e0f5
SDJ
17831 if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
17832 {
17833 struct stat sb;
88b48903 17834
6ec2e0f5
SDJ
17835 c = getcwd (buf, PATH_MAX);
17836 if (!c && errno == ENOENT)
17837 {
17838 fail = 11;
17839 break;
17840 }
17841 if (c)
17842 {
17843 fail = 31;
17844 break;
17845 }
17846 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
17847 {
17848 fail = 21;
17849 break;
17850 }
88b48903 17851
6ec2e0f5
SDJ
17852 /* Our replacement needs to be able to stat() long ../../paths,
17853 so generate a path larger than PATH_MAX to check,
17854 avoiding the replacement if we can't stat(). */
17855 c = getcwd (buf, cwd_len + 1);
17856 if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno))
17857 {
17858 fail = 32;
17859 break;
17860 }
17861 }
88b48903 17862
6ec2e0f5
SDJ
17863 if (dotdot_max <= cwd_len - initial_cwd_len)
17864 {
17865 if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
17866 break;
17867 c = getcwd (buf, cwd_len + 1);
17868 if (!c)
17869 {
17870 if (! (errno == ERANGE || errno == ENOENT
17871 || is_ENAMETOOLONG (errno)))
17872 {
17873 fail = 22;
17874 break;
17875 }
17876 if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
17877 {
17878 fail = 12;
17879 break;
17880 }
17881 }
17882 }
88b48903 17883
6ec2e0f5
SDJ
17884 if (c && strlen (c) != cwd_len)
17885 {
17886 fail = 23;
17887 break;
17888 }
17889 ++n_chdirs;
17890 }
88b48903 17891
6ec2e0f5
SDJ
17892 /* Leaving behind such a deep directory is not polite.
17893 So clean up here, right away, even though the driving
17894 shell script would also clean up. */
17895 {
17896 size_t i;
88b48903 17897
6ec2e0f5
SDJ
17898 /* Try rmdir first, in case the chdir failed. */
17899 rmdir (DIR_NAME);
17900 for (i = 0; i <= n_chdirs; i++)
17901 {
17902 if (chdir ("..") < 0)
17903 break;
17904 if (rmdir (DIR_NAME) != 0)
17905 break;
17906 }
17907 }
88b48903 17908
6ec2e0f5
SDJ
17909 exit (fail);
17910#endif
17911}
88b48903 17912
6ec2e0f5
SDJ
17913_ACEOF
17914if ac_fn_c_try_run "$LINENO"; then :
17915 gl_cv_func_getcwd_path_max=yes
17916else
17917 case $? in
5e8754f9
SDJ
17918 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
17919 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
17920 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
17921 *) gl_cv_func_getcwd_path_max=no;;
17922 esac
6ec2e0f5
SDJ
17923fi
17924rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17925 conftest.$ac_objext conftest.beam conftest.$ac_ext
17926fi
88b48903 17927
88b48903 17928
6ec2e0f5
SDJ
17929fi
17930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
17931$as_echo "$gl_cv_func_getcwd_path_max" >&6; }
88b48903 17932
6ec2e0f5
SDJ
17933 case "$gl_cv_func_getcwd_null" in
17934 *yes)
88b48903
WN
17935
17936
472fa5ee
SM
17937 :
17938
17939
17940
17941
17942
17943
17944 :
17945
17946
17947
17948
88b48903
WN
17949
17950
5e8754f9
SDJ
17951 for ac_func in getpagesize
17952do :
17953 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
17954if test "x$ac_cv_func_getpagesize" = xyes; then :
17955 cat >>confdefs.h <<_ACEOF
7a6dbc2f
SDJ
17956#define HAVE_GETPAGESIZE 1
17957_ACEOF
17958
5e8754f9
SDJ
17959fi
17960done
6ec2e0f5
SDJ
17961
17962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5
17963$as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; }
d0ac1c44 17964if ${gl_cv_func_getcwd_abort_bug+:} false; then :
88b48903
WN
17965 $as_echo_n "(cached) " >&6
17966else
6ec2e0f5
SDJ
17967 # Remove any remnants of a previous test.
17968 rm -rf confdir-14B---
17969 # Arrange for deletion of the temporary directory this test creates.
17970 ac_clean_files="$ac_clean_files confdir-14B---"
17971 if test "$cross_compiling" = yes; then :
17972 gl_cv_func_getcwd_abort_bug=yes
88b48903
WN
17973else
17974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17975/* end confdefs.h. */
6ec2e0f5
SDJ
17976
17977#include <errno.h>
17978#include <stdlib.h>
17979#if HAVE_UNISTD_H
17980# include <unistd.h>
17981#else /* on Windows with MSVC */
17982# include <direct.h>
17983#endif
17984#include <string.h>
17985#include <sys/stat.h>
17986
17987
17988/* Arrange to define PATH_MAX, like "pathmax.h" does. */
17989#if HAVE_UNISTD_H
17990# include <unistd.h>
17991#endif
17992#include <limits.h>
17993#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
17994# include <sys/param.h>
17995#endif
17996#if !defined PATH_MAX && defined MAXPATHLEN
17997# define PATH_MAX MAXPATHLEN
17998#endif
17999#ifdef __hpux
18000# undef PATH_MAX
18001# define PATH_MAX 1024
18002#endif
5e8754f9 18003#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6ec2e0f5
SDJ
18004# undef PATH_MAX
18005# define PATH_MAX 260
18006#endif
18007
18008
18009/* Don't get link errors because mkdir is redefined to rpl_mkdir. */
18010#undef mkdir
18011
18012#ifndef S_IRWXU
18013# define S_IRWXU 0700
18014#endif
18015
18016/* FIXME: skip the run-test altogether on systems without getpagesize. */
18017#if ! HAVE_GETPAGESIZE
18018# define getpagesize() 0
18019#endif
18020
18021/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
18022 the 16kB pagesize on ia64 linux. Those conditions make the code below
18023 trigger a bug in glibc's getcwd implementation before 2.4.90-10. */
18024#define TARGET_LEN (5 * 1024)
88b48903
WN
18025
18026int
18027main ()
18028{
6ec2e0f5
SDJ
18029 char *cwd;
18030 size_t initial_cwd_len;
18031 int fail = 0;
18032
18033 /* The bug is triggered when PATH_MAX < getpagesize (), so skip
18034 this relatively expensive and invasive test if that's not true. */
18035#ifdef PATH_MAX
18036 int bug_possible = PATH_MAX < getpagesize ();
18037#else
18038 int bug_possible = 0;
18039#endif
18040 if (! bug_possible)
18041 return 0;
8690e634 18042
6ec2e0f5
SDJ
18043 cwd = getcwd (NULL, 0);
18044 if (cwd == NULL)
18045 return 2;
18046
18047 initial_cwd_len = strlen (cwd);
18048 free (cwd);
18049
18050 if (1)
18051 {
18052 static char const dir_name[] = "confdir-14B---";
18053 size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
18054 / sizeof dir_name);
18055 size_t d;
18056 for (d = 0; d < desired_depth; d++)
18057 {
18058 if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
18059 {
18060 if (! (errno == ERANGE || errno == ENAMETOOLONG
18061 || errno == ENOENT))
18062 fail = 3; /* Unable to construct deep hierarchy. */
18063 break;
18064 }
18065 }
18066
18067 /* If libc has the bug in question, this invocation of getcwd
18068 results in a failed assertion. */
18069 cwd = getcwd (NULL, 0);
18070 if (cwd == NULL)
18071 fail = 4; /* getcwd didn't assert, but it failed for a long name
18072 where the answer could have been learned. */
18073 free (cwd);
18074
18075 /* Call rmdir first, in case the above chdir failed. */
18076 rmdir (dir_name);
18077 while (0 < d--)
18078 {
18079 if (chdir ("..") < 0)
18080 {
18081 fail = 5;
18082 break;
18083 }
18084 rmdir (dir_name);
18085 }
18086 }
18087
18088 return fail;
8690e634 18089}
6ec2e0f5 18090
8690e634
JK
18091_ACEOF
18092if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 18093 gl_cv_func_getcwd_abort_bug=no
8690e634 18094else
5e8754f9
SDJ
18095 ret=$?
18096 if test $ret -ge 128 || test $ret = 4; then
18097 gl_cv_func_getcwd_abort_bug=yes
18098 else
18099 gl_cv_func_getcwd_abort_bug=no
18100 fi
8690e634
JK
18101fi
18102rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18103 conftest.$ac_objext conftest.beam conftest.$ac_ext
18104fi
18105
18106
18107fi
6ec2e0f5
SDJ
18108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5
18109$as_echo "$gl_cv_func_getcwd_abort_bug" >&6; }
18110 if test $gl_cv_func_getcwd_abort_bug = yes; then :
18111 gl_abort_bug=yes
18112fi
18113
18114 ;;
18115 esac
18116 ;;
18117 esac
18118 case "$gl_cv_func_getcwd_path_max" in
18119 "no"|"no, it has the AIX bug") ;;
18120 *)
18121
18122$as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
18123
18124 ;;
18125 esac
18126 case "$gl_cv_func_getcwd_path_max" in
18127 "no, but it is partly working")
18128
18129$as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
18130
18131 ;;
18132 "yes, but with shorter paths")
18133
18134$as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
18135
18136 ;;
18137 esac
18138
18139 if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
18140 || test $gl_cv_func_getcwd_posix_signature != yes \
18141 || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \
18142 || test $gl_abort_bug = yes; then
18143 REPLACE_GETCWD=1
8690e634
JK
18144 fi
18145
6ec2e0f5 18146 if test $REPLACE_GETCWD = 1; then
8690e634
JK
18147
18148
8690e634
JK
18149
18150
18151
18152
18153
18154
6ec2e0f5 18155 gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
8690e634
JK
18156
18157
8690e634
JK
18158
18159
6ec2e0f5
SDJ
18160 :
18161
18162 fi
18163
8690e634
JK
18164
18165cat >>confdefs.h <<_ACEOF
6ec2e0f5 18166#define GNULIB_GETCWD 1
8690e634
JK
18167_ACEOF
18168
18169
8690e634 18170
8690e634
JK
18171
18172
c971b7fa 18173
c971b7fa 18174
6ec2e0f5
SDJ
18175 GNULIB_GETCWD=1
18176
18177
18178
18179
18180
18181$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
18182
c971b7fa 18183
c971b7fa 18184
c971b7fa 18185
c971b7fa 18186
c971b7fa 18187
c971b7fa 18188
c971b7fa 18189
6ec2e0f5
SDJ
18190 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
18191 *yes,yes) ;;
18192 *)
18193 REPLACE_GETCWD=1
18194 ;;
18195 esac
c971b7fa 18196
6ec2e0f5 18197 if test $REPLACE_GETCWD = 1; then
c971b7fa 18198
c971b7fa
PA
18199
18200
c971b7fa
PA
18201
18202
c971b7fa 18203
c971b7fa 18204
c971b7fa 18205
6ec2e0f5 18206 gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
c971b7fa 18207
6ec2e0f5 18208 fi
c971b7fa 18209
c971b7fa 18210
c971b7fa 18211
c971b7fa 18212
8690e634 18213
6ec2e0f5 18214 GNULIB_GETCWD=1
c971b7fa 18215
88b48903
WN
18216
18217
18218
88b48903 18219
6ec2e0f5 18220$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
88b48903 18221
88b48903
WN
18222
18223
18224
6ec2e0f5
SDJ
18225
18226
18227
472fa5ee
SM
18228 :
18229
18230
18231
18232
18233
18234
18235 :
18236
18237
18238
18239
6ec2e0f5
SDJ
18240
18241 if test $ac_cv_func_getdtablesize = yes &&
18242 test $ac_cv_have_decl_getdtablesize = yes; then
5e8754f9
SDJ
18243 # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit
18244 # up to an unchangeable hard limit; all other platforms correctly
18245 # require setrlimit before getdtablesize() can report a larger value.
6ec2e0f5
SDJ
18246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
18247$as_echo_n "checking whether getdtablesize works... " >&6; }
d0ac1c44 18248if ${gl_cv_func_getdtablesize_works+:} false; then :
88b48903
WN
18249 $as_echo_n "(cached) " >&6
18250else
5e8754f9 18251 if test "$cross_compiling" = yes; then :
88b48903 18252 case "$host_os" in
5e8754f9
SDJ
18253 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
18254 gl_cv_func_getdtablesize_works="guessing no" ;;
18255 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
18256 esac
88b48903
WN
18257else
18258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18259/* end confdefs.h. */
18260
5e8754f9 18261 #include <unistd.h>
6ec2e0f5
SDJ
18262int
18263main ()
88b48903 18264{
6ec2e0f5 18265int size = getdtablesize();
5e8754f9
SDJ
18266 if (dup2 (0, getdtablesize()) != -1)
18267 return 1;
18268 if (size != getdtablesize())
18269 return 2;
6ec2e0f5
SDJ
18270
18271 ;
18272 return 0;
88b48903
WN
18273}
18274_ACEOF
18275if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 18276 gl_cv_func_getdtablesize_works=yes
88b48903 18277else
6ec2e0f5 18278 gl_cv_func_getdtablesize_works=no
88b48903
WN
18279fi
18280rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18281 conftest.$ac_objext conftest.beam conftest.$ac_ext
18282fi
18283
18284
18285fi
6ec2e0f5
SDJ
18286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
18287$as_echo "$gl_cv_func_getdtablesize_works" >&6; }
18288 case "$gl_cv_func_getdtablesize_works" in
5e8754f9 18289 *yes) ;;
6ec2e0f5 18290 *) REPLACE_GETDTABLESIZE=1 ;;
88b48903
WN
18291 esac
18292 else
6ec2e0f5 18293 HAVE_GETDTABLESIZE=0
88b48903
WN
18294 fi
18295
6ec2e0f5 18296 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
88b48903
WN
18297
18298
18299
18300
18301
18302
18303
18304
6ec2e0f5 18305 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
88b48903 18306
6ec2e0f5 18307 :
88b48903
WN
18308 fi
18309
18310
18311
18312
18313
6ec2e0f5 18314 GNULIB_GETDTABLESIZE=1
88b48903
WN
18315
18316
18317
88b48903 18318
88b48903 18319
6ec2e0f5 18320$as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
88b48903 18321
88b48903 18322
88b48903 18323
88b48903 18324
88b48903 18325
88b48903 18326
88b48903 18327
88b48903
WN
18328
18329
472fa5ee
SM
18330 :
18331
18332
18333
18334
18335
6ec2e0f5
SDJ
18336 if test $ac_cv_have_decl_getlogin_r = no; then
18337 HAVE_DECL_GETLOGIN_R=0
18338 fi
88b48903 18339
88b48903 18340
472fa5ee
SM
18341 :
18342
18343
18344
18345
18346
6ec2e0f5
SDJ
18347 if test $ac_cv_func_getlogin_r = no; then
18348 HAVE_GETLOGIN_R=0
18349 else
18350 HAVE_GETLOGIN_R=1
18351
18352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getlogin_r works with small buffers" >&5
18353$as_echo_n "checking whether getlogin_r works with small buffers... " >&6; }
d0ac1c44 18354if ${gl_cv_func_getlogin_r_works+:} false; then :
6ec2e0f5
SDJ
18355 $as_echo_n "(cached) " >&6
18356else
88b48903 18357
6ec2e0f5 18358 case "$host_os" in
5e8754f9
SDJ
18359 # Guess no on OSF/1.
18360 osf*) gl_cv_func_getlogin_r_works="guessing no" ;;
18361 # Guess yes otherwise.
18362 *) gl_cv_func_getlogin_r_works="guessing yes" ;;
6ec2e0f5
SDJ
18363 esac
18364 if test "$cross_compiling" = yes; then :
18365 :
88b48903
WN
18366else
18367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18368/* end confdefs.h. */
18369
6ec2e0f5
SDJ
18370#include <stddef.h>
18371#include <unistd.h>
18372#if !HAVE_DECL_GETLOGIN_R
88b48903 18373extern
6ec2e0f5 18374# ifdef __cplusplus
88b48903 18375"C"
6ec2e0f5
SDJ
18376# endif
18377int getlogin_r (char *, size_t);
88b48903 18378#endif
6ec2e0f5
SDJ
18379int
18380main (void)
88b48903
WN
18381{
18382 int result = 0;
6ec2e0f5
SDJ
18383 char buf[100];
18384
18385 if (getlogin_r (buf, 0) == 0)
5e8754f9 18386 result |= 16;
6ec2e0f5 18387 if (getlogin_r (buf, 1) == 0)
5e8754f9 18388 result |= 17;
88b48903
WN
18389 return result;
18390}
18391_ACEOF
18392if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 18393 gl_cv_func_getlogin_r_works=yes
88b48903 18394else
5e8754f9
SDJ
18395 case $? in
18396 16 | 17) gl_cv_func_getlogin_r_works=no ;;
18397 esac
18398
88b48903
WN
18399fi
18400rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18401 conftest.$ac_objext conftest.beam conftest.$ac_ext
18402fi
18403
18404
4a626d0a 18405fi
6ec2e0f5
SDJ
18406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getlogin_r_works" >&5
18407$as_echo "$gl_cv_func_getlogin_r_works" >&6; }
18408 case "$gl_cv_func_getlogin_r_works" in
18409 *yes) ;;
18410 *) REPLACE_GETLOGIN_R=1 ;;
18411 esac
18412 fi
18413
18414 if test $HAVE_GETLOGIN_R = 0 || test $REPLACE_GETLOGIN_R = 1; then
18415
18416
18417
18418
18419
18420
18421
18422
18423 gl_LIBOBJS="$gl_LIBOBJS getlogin_r.$ac_objext"
4a626d0a 18424
4a626d0a 18425
4a626d0a 18426
472fa5ee
SM
18427 :
18428
18429
18430
18431
18432
4a626d0a 18433
4a626d0a
PA
18434 fi
18435
18436
4a626d0a
PA
18437
18438
18439
6ec2e0f5 18440 GNULIB_GETLOGIN_R=1
4a626d0a
PA
18441
18442
18443
18444
18445
6ec2e0f5 18446$as_echo "#define GNULIB_TEST_GETLOGIN_R 1" >>confdefs.h
4a626d0a 18447
4a626d0a
PA
18448
18449
18450
18451
472fa5ee
SM
18452 :
18453
18454
18455
18456
18457
18458
18459
18460
4a626d0a 18461
6ec2e0f5
SDJ
18462 ac_found=0
18463 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
18464"
d0ac1c44 18465if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
6ec2e0f5
SDJ
18466 ac_have_decl=1
18467else
18468 ac_have_decl=0
18469fi
18470
18471cat >>confdefs.h <<_ACEOF
18472#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
18473_ACEOF
18474if test $ac_have_decl = 1; then :
18475 ac_found=1
18476fi
18477
18478 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
18479"
d0ac1c44 18480if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
6ec2e0f5
SDJ
18481 ac_have_decl=1
18482else
18483 ac_have_decl=0
18484fi
18485
18486cat >>confdefs.h <<_ACEOF
18487#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
18488_ACEOF
18489if test $ac_have_decl = 1; then :
18490 ac_found=1
18491fi
4a626d0a 18492
6ec2e0f5
SDJ
18493 ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
18494"
d0ac1c44 18495if test "x$ac_cv_have_decl___argv" = xyes; then :
6ec2e0f5
SDJ
18496 ac_have_decl=1
18497else
18498 ac_have_decl=0
18499fi
4a626d0a 18500
6ec2e0f5
SDJ
18501cat >>confdefs.h <<_ACEOF
18502#define HAVE_DECL___ARGV $ac_have_decl
18503_ACEOF
18504if test $ac_have_decl = 1; then :
18505 ac_found=1
18506fi
4a626d0a
PA
18507
18508
6ec2e0f5
SDJ
18509 # Incur the cost of this test only if none of the above worked.
18510 if test $ac_found = 0; then
18511 # On OpenBSD 5.1, using the global __progname variable appears to be
18512 # the only way to implement getprogname.
18513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
18514$as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
d0ac1c44 18515if ${gl_cv_var___progname+:} false; then :
6ec2e0f5
SDJ
18516 $as_echo_n "(cached) " >&6
18517else
4a626d0a 18518
6ec2e0f5
SDJ
18519 gl_cv_var___progname=
18520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18521/* end confdefs.h. */
18522extern char *__progname;
18523int
18524main ()
18525{
18526return *__progname;
18527
18528 ;
18529 return 0;
18530}
18531_ACEOF
18532if ac_fn_c_try_link "$LINENO"; then :
18533 gl_cv_var___progname=yes
18534
18535fi
18536rm -f core conftest.err conftest.$ac_objext \
18537 conftest$ac_exeext conftest.$ac_ext
18538
18539
18540fi
18541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
18542$as_echo "$gl_cv_var___progname" >&6; }
18543 if test "$gl_cv_var___progname" = yes; then
18544
18545$as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
18546
18547 fi
18548 fi
4a626d0a
PA
18549
18550
18551
18552
18553
18554
18555
18556
472fa5ee
SM
18557 :
18558
18559
18560
18561
18562
4a626d0a
PA
18563
18564 gl_gettimeofday_timezone=void
18565 if test $ac_cv_func_gettimeofday != yes; then
18566 HAVE_GETTIMEOFDAY=0
18567 else
18568
18569
18570
18571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
18572$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
d0ac1c44 18573if ${gl_cv_func_gettimeofday_clobber+:} false; then :
4a626d0a
PA
18574 $as_echo_n "(cached) " >&6
18575else
18576 if test "$cross_compiling" = yes; then :
18577 # When cross-compiling:
18578 case "$host_os" in
5e8754f9
SDJ
18579 # Guess all is fine on glibc systems.
18580 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
18581 # If we don't know, assume the worst.
18582 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
4a626d0a
PA
18583 esac
18584
18585else
18586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18587/* end confdefs.h. */
18588#include <string.h>
18589 #include <sys/time.h>
18590 #include <time.h>
18591 #include <stdlib.h>
18592
18593int
18594main ()
18595{
18596
18597 time_t t = 0;
18598 struct tm *lt;
18599 struct tm saved_lt;
18600 struct timeval tv;
18601 lt = localtime (&t);
18602 saved_lt = *lt;
18603 gettimeofday (&tv, NULL);
18604 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
18605
18606 ;
18607 return 0;
18608}
18609_ACEOF
18610if ac_fn_c_try_run "$LINENO"; then :
18611 gl_cv_func_gettimeofday_clobber=no
18612else
18613 gl_cv_func_gettimeofday_clobber=yes
18614fi
18615rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18616 conftest.$ac_objext conftest.beam conftest.$ac_ext
18617fi
18618
18619fi
18620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
18621$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
18622
18623 case "$gl_cv_func_gettimeofday_clobber" in
18624 *yes)
18625 REPLACE_GETTIMEOFDAY=1
18626
7a6dbc2f
SDJ
18627 REPLACE_GMTIME=1
18628 REPLACE_LOCALTIME=1
4a626d0a 18629
5e8754f9
SDJ
18630
18631$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
18632
4a626d0a
PA
18633 ;;
18634 esac
18635
18636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
18637$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
d0ac1c44 18638if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
4a626d0a
PA
18639 $as_echo_n "(cached) " >&6
18640else
18641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18642/* end confdefs.h. */
18643#include <sys/time.h>
18644 struct timeval c;
18645 int gettimeofday (struct timeval *restrict, void *restrict);
18646
18647int
18648main ()
18649{
18650/* glibc uses struct timezone * rather than the POSIX void *
18651 if _GNU_SOURCE is defined. However, since the only portable
18652 use of gettimeofday uses NULL as the second parameter, and
18653 since the glibc definition is actually more typesafe, it is
18654 not worth wrapping this to get a compliant signature. */
18655 int (*f) (struct timeval *restrict, void *restrict)
18656 = gettimeofday;
18657 int x = f (&c, 0);
18658 return !(x | c.tv_sec | c.tv_usec);
18659
18660 ;
18661 return 0;
18662}
18663_ACEOF
18664if ac_fn_c_try_compile "$LINENO"; then :
18665 gl_cv_func_gettimeofday_posix_signature=yes
18666else
18667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18668/* end confdefs.h. */
18669#include <sys/time.h>
18670int gettimeofday (struct timeval *restrict, struct timezone *restrict);
18671
18672int
18673main ()
18674{
18675
18676 ;
18677 return 0;
18678}
18679_ACEOF
18680if ac_fn_c_try_compile "$LINENO"; then :
18681 gl_cv_func_gettimeofday_posix_signature=almost
18682else
18683 gl_cv_func_gettimeofday_posix_signature=no
18684fi
18685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18686fi
18687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18688fi
18689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
18690$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
18691 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
18692 gl_gettimeofday_timezone='struct timezone'
18693 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
18694 REPLACE_GETTIMEOFDAY=1
18695 fi
18696 if test $REPLACE_STRUCT_TIMEVAL = 1; then
18697 REPLACE_GETTIMEOFDAY=1
18698 fi
5e8754f9 18699
4a626d0a
PA
18700 fi
18701
18702cat >>confdefs.h <<_ACEOF
18703#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
18704_ACEOF
18705
88b48903 18706
4a626d0a 18707 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
88b48903 18708
88b48903 18709
88b48903 18710
88b48903
WN
18711
18712
88b48903
WN
18713
18714
18715
6ec2e0f5
SDJ
18716 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
18717
6ec2e0f5 18718
5e8754f9
SDJ
18719 for ac_header in sys/timeb.h
18720do :
18721 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
18722if test "x$ac_cv_header_sys_timeb_h" = xyes; then :
18723 cat >>confdefs.h <<_ACEOF
18724#define HAVE_SYS_TIMEB_H 1
18725_ACEOF
6ec2e0f5 18726
5e8754f9 18727fi
6ec2e0f5 18728
5e8754f9 18729done
6ec2e0f5 18730
5e8754f9
SDJ
18731 for ac_func in _ftime
18732do :
18733 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
18734if test "x$ac_cv_func__ftime" = xyes; then :
18735 cat >>confdefs.h <<_ACEOF
18736#define HAVE__FTIME 1
18737_ACEOF
6ec2e0f5 18738
5e8754f9
SDJ
18739fi
18740done
6ec2e0f5
SDJ
18741
18742
5e8754f9 18743 fi
6ec2e0f5
SDJ
18744
18745
18746
6ec2e0f5
SDJ
18747
18748
5e8754f9 18749 GNULIB_GETTIMEOFDAY=1
6ec2e0f5
SDJ
18750
18751
18752
7a6dbc2f
SDJ
18753
18754
5e8754f9 18755$as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
6ec2e0f5
SDJ
18756
18757
18758
5e8754f9
SDJ
18759 GLOB_H=
18760 for ac_header in glob.h
18761do :
18762 ac_fn_c_check_header_mongrel "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default"
18763if test "x$ac_cv_header_glob_h" = xyes; then :
18764 cat >>confdefs.h <<_ACEOF
18765#define HAVE_GLOB_H 1
18766_ACEOF
6ec2e0f5 18767
5e8754f9
SDJ
18768else
18769 GLOB_H=glob.h
18770fi
6ec2e0f5 18771
5e8754f9 18772done
6ec2e0f5
SDJ
18773
18774
5e8754f9
SDJ
18775 if test -z "$GLOB_H"; then
18776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU glob interface version 1" >&5
18777$as_echo_n "checking for GNU glob interface version 1... " >&6; }
18778if ${gl_cv_gnu_glob_interface_version_1+:} false; then :
6ec2e0f5
SDJ
18779 $as_echo_n "(cached) " >&6
18780else
18781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18782/* end confdefs.h. */
18783#include <gnu-versions.h>
5e8754f9 18784char a[_GNU_GLOB_INTERFACE_VERSION == 1 ? 1 : -1];
6ec2e0f5
SDJ
18785_ACEOF
18786if ac_fn_c_try_compile "$LINENO"; then :
5e8754f9 18787 gl_cv_gnu_glob_interface_version_1=yes
6ec2e0f5 18788else
5e8754f9 18789 gl_cv_gnu_glob_interface_version_1=no
6ec2e0f5
SDJ
18790fi
18791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18792fi
5e8754f9
SDJ
18793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_gnu_glob_interface_version_1" >&5
18794$as_echo "$gl_cv_gnu_glob_interface_version_1" >&6; }
18795
18796 if test "$gl_cv_gnu_glob_interface_version_1" = "no"; then
18797 GLOB_H=glob.h
6ec2e0f5 18798 fi
5e8754f9 18799 fi
6ec2e0f5 18800
5e8754f9
SDJ
18801 if test -z "$GLOB_H"; then
18802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether glob lists broken symlinks" >&5
6ec2e0f5 18803$as_echo_n "checking whether glob lists broken symlinks... " >&6; }
d0ac1c44 18804if ${gl_cv_glob_lists_symlinks+:} false; then :
6ec2e0f5
SDJ
18805 $as_echo_n "(cached) " >&6
18806else
5e8754f9
SDJ
18807 if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then
18808 gl_cv_glob_lists_symlinks=maybe
18809 else
18810 # If we can't make a symlink, then we cannot test this issue. Be
18811 # pessimistic about this.
18812 gl_cv_glob_lists_symlinks=no
18813 fi
18814
18815 if test $gl_cv_glob_lists_symlinks = maybe; then
18816 if test "$cross_compiling" = yes; then :
6ec2e0f5
SDJ
18817 gl_cv_glob_lists_symlinks=no
18818else
18819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18820/* end confdefs.h. */
5e8754f9 18821
6ec2e0f5 18822#include <stddef.h>
5e8754f9 18823#include <glob.h>
6ec2e0f5
SDJ
18824int
18825main ()
18826{
18827glob_t found;
5e8754f9 18828if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH) return 1;
6ec2e0f5
SDJ
18829 ;
18830 return 0;
18831}
4a626d0a 18832_ACEOF
6ec2e0f5
SDJ
18833if ac_fn_c_try_run "$LINENO"; then :
18834 gl_cv_glob_lists_symlinks=yes
18835else
18836 gl_cv_glob_lists_symlinks=no
18837fi
18838rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18839 conftest.$ac_objext conftest.beam conftest.$ac_ext
18840fi
88b48903 18841
5e8754f9 18842 fi
4a626d0a 18843fi
6ec2e0f5
SDJ
18844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_glob_lists_symlinks" >&5
18845$as_echo "$gl_cv_glob_lists_symlinks" >&6; }
88b48903 18846
5e8754f9
SDJ
18847 if test $gl_cv_glob_lists_symlinks = no; then
18848 GLOB_H=glob.h
6ec2e0f5
SDJ
18849 fi
18850 fi
4a626d0a 18851
5e8754f9 18852 rm -f conf$$-globtest
4a626d0a 18853
88b48903 18854
6ec2e0f5
SDJ
18855 if test -n "$GLOB_H"; then
18856 GL_GENERATE_GLOB_H_TRUE=
18857 GL_GENERATE_GLOB_H_FALSE='#'
18858else
18859 GL_GENERATE_GLOB_H_TRUE='#'
18860 GL_GENERATE_GLOB_H_FALSE=
18861fi
88b48903 18862
88b48903 18863
5e8754f9 18864 if test -n "$GLOB_H"; then
472fa5ee
SM
18865
18866
18867
18868
18869
18870
18871
18872
18873 gl_LIBOBJS="$gl_LIBOBJS glob.$ac_objext"
18874
18875
18876
7a6dbc2f
SDJ
18877 :
18878
18879
18880
472fa5ee 18881
472fa5ee 18882
88b48903 18883
88b48903 18884
5e8754f9
SDJ
18885 if test $ac_cv_header_sys_cdefs_h = yes; then
18886 HAVE_SYS_CDEFS_H=1
18887 else
18888 HAVE_SYS_CDEFS_H=0
7a6dbc2f 18889 fi
88b48903
WN
18890
18891
725e2999
JB
18892 :
18893
18894
18895
18896
18897
18898
18899
18900
18901
18902
18903
18904 fi
18905
18906 :
18907
18908
18909
18910
18911
18912
18913
18914
18915 HAVE_INET_NTOP=1
18916 INET_NTOP_LIB=
18917
18918
18919
18920
18921 :
18922
18923
18924
18925
18926
18927 if test $ac_cv_header_sys_socket_h != yes; then
18928 for ac_header in winsock2.h
18929do :
18930 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
18931if test "x$ac_cv_header_winsock2_h" = xyes; then :
18932 cat >>confdefs.h <<_ACEOF
18933#define HAVE_WINSOCK2_H 1
18934_ACEOF
18935
18936fi
18937
18938done
18939
18940 fi
18941 if test "$ac_cv_header_winsock2_h" = yes; then
18942 HAVE_WINSOCK2_H=1
18943 UNISTD_H_HAVE_WINSOCK2_H=1
18944 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
18945 else
18946 HAVE_WINSOCK2_H=0
18947 fi
18948
18949
18950 if test $HAVE_WINSOCK2_H = 1; then
18951 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <ws2tcpip.h>
18952"
18953if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
18954 ac_have_decl=1
18955else
18956 ac_have_decl=0
18957fi
18958
18959cat >>confdefs.h <<_ACEOF
18960#define HAVE_DECL_INET_NTOP $ac_have_decl
18961_ACEOF
18962
18963 if test $ac_cv_have_decl_inet_ntop = yes; then
18964 REPLACE_INET_NTOP=1
18965 INET_NTOP_LIB="-lws2_32"
18966 else
18967 HAVE_DECL_INET_NTOP=0
18968 HAVE_INET_NTOP=0
18969 fi
18970 else
18971 gl_save_LIBS=$LIBS
18972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
18973$as_echo_n "checking for library containing inet_ntop... " >&6; }
18974if ${ac_cv_search_inet_ntop+:} false; then :
18975 $as_echo_n "(cached) " >&6
18976else
18977 ac_func_search_save_LIBS=$LIBS
18978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18979/* end confdefs.h. */
18980
18981/* Override any GCC internal prototype to avoid an error.
18982 Use char because int might match the return type of a GCC
18983 builtin and then its argument prototype would still apply. */
18984#ifdef __cplusplus
18985extern "C"
18986#endif
18987char inet_ntop ();
18988int
18989main ()
18990{
18991return inet_ntop ();
18992 ;
18993 return 0;
18994}
18995_ACEOF
18996for ac_lib in '' nsl resolv; do
18997 if test -z "$ac_lib"; then
18998 ac_res="none required"
18999 else
19000 ac_res=-l$ac_lib
19001 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
19002 fi
19003 if ac_fn_c_try_link "$LINENO"; then :
19004 ac_cv_search_inet_ntop=$ac_res
19005fi
19006rm -f core conftest.err conftest.$ac_objext \
19007 conftest$ac_exeext
19008 if ${ac_cv_search_inet_ntop+:} false; then :
19009 break
19010fi
19011done
19012if ${ac_cv_search_inet_ntop+:} false; then :
19013
19014else
19015 ac_cv_search_inet_ntop=no
19016fi
19017rm conftest.$ac_ext
19018LIBS=$ac_func_search_save_LIBS
19019fi
19020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
19021$as_echo "$ac_cv_search_inet_ntop" >&6; }
19022ac_res=$ac_cv_search_inet_ntop
19023if test "$ac_res" != no; then :
19024 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19025
19026else
19027 for ac_func in inet_ntop
19028do :
19029 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
19030if test "x$ac_cv_func_inet_ntop" = xyes; then :
19031 cat >>confdefs.h <<_ACEOF
19032#define HAVE_INET_NTOP 1
19033_ACEOF
19034
19035fi
19036done
19037
19038 if test $ac_cv_func_inet_ntop = no; then
19039 HAVE_INET_NTOP=0
19040 fi
19041
19042fi
19043
19044 LIBS=$gl_save_LIBS
19045
19046 if test "$ac_cv_search_inet_ntop" != "no" \
19047 && test "$ac_cv_search_inet_ntop" != "none required"; then
19048 INET_NTOP_LIB="$ac_cv_search_inet_ntop"
19049 fi
19050
19051
19052 :
19053
19054
19055
19056
19057
19058 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <arpa/inet.h>
19059 #if HAVE_NETDB_H
19060 # include <netdb.h>
19061 #endif
19062
19063"
19064if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
19065 ac_have_decl=1
19066else
19067 ac_have_decl=0
19068fi
19069
19070cat >>confdefs.h <<_ACEOF
19071#define HAVE_DECL_INET_NTOP $ac_have_decl
19072_ACEOF
19073
19074 if test $ac_cv_have_decl_inet_ntop = no; then
19075 HAVE_DECL_INET_NTOP=0
19076 fi
19077 fi
19078
19079
19080 if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then
19081
19082
19083
19084
19085
19086
19087
7a6dbc2f 19088
725e2999 19089 gl_LIBOBJS="$gl_LIBOBJS inet_ntop.$ac_objext"
7a6dbc2f
SDJ
19090
19091
19092
7a6dbc2f 19093
725e2999 19094 fi
7a6dbc2f
SDJ
19095
19096
19097
19098
7a6dbc2f 19099
725e2999
JB
19100 GNULIB_INET_NTOP=1
19101
7a6dbc2f
SDJ
19102
19103
49e4877c
PA
19104
19105
88b48903
WN
19106
19107
19108
19109
19110 PRIPTR_PREFIX=
19111 if test -n "$STDINT_H"; then
19112 PRIPTR_PREFIX='"l"'
19113 else
19114 for glpfx in '' l ll I64; do
19115 case $glpfx in
19116 '') gltype1='int';;
19117 l) gltype1='long int';;
19118 ll) gltype1='long long int';;
19119 I64) gltype1='__int64';;
19120 esac
19121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19122/* end confdefs.h. */
19123#include <stdint.h>
19124 extern intptr_t foo;
19125 extern $gltype1 foo;
19126int
19127main ()
19128{
19129
19130 ;
19131 return 0;
19132}
19133_ACEOF
19134if ac_fn_c_try_compile "$LINENO"; then :
19135 PRIPTR_PREFIX='"'$glpfx'"'
19136fi
19137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19138 test -n "$PRIPTR_PREFIX" && break
19139 done
19140 fi
19141
19142
19143
19144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
19145$as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
d0ac1c44 19146if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
88b48903
WN
19147 $as_echo_n "(cached) " >&6
19148else
19149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19150/* end confdefs.h. */
19151/* Work also in C++ mode. */
19152 #define __STDC_LIMIT_MACROS 1
19153
19154 /* Work if build is not clean. */
19155 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
19156
19157 #include <limits.h>
19158 #if HAVE_STDINT_H
19159 #include <stdint.h>
19160 #endif
19161
19162 #if defined INT32_MAX && defined INTMAX_MAX
19163 #define CONDITION (INT32_MAX < INTMAX_MAX)
19164 #elif HAVE_LONG_LONG_INT
19165 #define CONDITION (sizeof (int) < sizeof (long long int))
19166 #else
19167 #define CONDITION 0
19168 #endif
19169 int test[CONDITION ? 1 : -1];
19170int
19171main ()
19172{
19173
19174 ;
19175 return 0;
19176}
19177_ACEOF
19178if ac_fn_c_try_compile "$LINENO"; then :
19179 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
19180else
19181 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
19182fi
19183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19184fi
19185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
19186$as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
19187 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
19188 INT32_MAX_LT_INTMAX_MAX=1;
19189 else
19190 INT32_MAX_LT_INTMAX_MAX=0;
19191 fi
19192
19193
19194 if test $APPLE_UNIVERSAL_BUILD = 0; then
19195
19196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
19197$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
d0ac1c44 19198if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
88b48903
WN
19199 $as_echo_n "(cached) " >&6
19200else
19201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19202/* end confdefs.h. */
19203/* Work also in C++ mode. */
19204 #define __STDC_LIMIT_MACROS 1
19205
19206 /* Work if build is not clean. */
19207 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
19208
19209 #include <limits.h>
19210 #if HAVE_STDINT_H
19211 #include <stdint.h>
19212 #endif
19213
19214 #if defined INT64_MAX
19215 #define CONDITION (INT64_MAX == LONG_MAX)
19216 #elif HAVE_LONG_LONG_INT
19217 #define CONDITION (sizeof (long long int) == sizeof (long int))
19218 #else
19219 #define CONDITION 0
19220 #endif
19221 int test[CONDITION ? 1 : -1];
19222int
19223main ()
19224{
19225
19226 ;
19227 return 0;
19228}
19229_ACEOF
19230if ac_fn_c_try_compile "$LINENO"; then :
19231 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
19232else
19233 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
19234fi
19235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19236fi
19237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
19238$as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
19239 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
19240 INT64_MAX_EQ_LONG_MAX=1;
19241 else
19242 INT64_MAX_EQ_LONG_MAX=0;
19243 fi
19244
19245
19246 else
19247 INT64_MAX_EQ_LONG_MAX=-1
19248 fi
19249
19250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
19251$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
d0ac1c44 19252if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
88b48903
WN
19253 $as_echo_n "(cached) " >&6
19254else
19255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19256/* end confdefs.h. */
19257/* Work also in C++ mode. */
19258 #define __STDC_LIMIT_MACROS 1
19259
19260 /* Work if build is not clean. */
19261 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
19262
19263 #include <limits.h>
19264 #if HAVE_STDINT_H
19265 #include <stdint.h>
19266 #endif
19267
19268 #if defined UINT32_MAX && defined UINTMAX_MAX
19269 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
19270 #elif HAVE_LONG_LONG_INT
19271 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
19272 #else
19273 #define CONDITION 0
19274 #endif
19275 int test[CONDITION ? 1 : -1];
19276int
19277main ()
19278{
19279
19280 ;
19281 return 0;
19282}
19283_ACEOF
19284if ac_fn_c_try_compile "$LINENO"; then :
19285 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
19286else
19287 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
19288fi
19289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19290fi
19291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
19292$as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
19293 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
19294 UINT32_MAX_LT_UINTMAX_MAX=1;
19295 else
19296 UINT32_MAX_LT_UINTMAX_MAX=0;
19297 fi
19298
19299
19300 if test $APPLE_UNIVERSAL_BUILD = 0; then
19301
19302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
19303$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
d0ac1c44 19304if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
88b48903
WN
19305 $as_echo_n "(cached) " >&6
19306else
19307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19308/* end confdefs.h. */
19309/* Work also in C++ mode. */
19310 #define __STDC_LIMIT_MACROS 1
19311
19312 /* Work if build is not clean. */
19313 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
19314
19315 #include <limits.h>
19316 #if HAVE_STDINT_H
19317 #include <stdint.h>
19318 #endif
19319
19320 #if defined UINT64_MAX
19321 #define CONDITION (UINT64_MAX == ULONG_MAX)
19322 #elif HAVE_LONG_LONG_INT
19323 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
19324 #else
19325 #define CONDITION 0
19326 #endif
19327 int test[CONDITION ? 1 : -1];
19328int
19329main ()
19330{
19331
19332 ;
19333 return 0;
19334}
19335_ACEOF
19336if ac_fn_c_try_compile "$LINENO"; then :
19337 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
19338else
19339 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
19340fi
19341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19342fi
19343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
19344$as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
19345 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
19346 UINT64_MAX_EQ_ULONG_MAX=1;
19347 else
19348 UINT64_MAX_EQ_ULONG_MAX=0;
19349 fi
19350
19351
19352 else
19353 UINT64_MAX_EQ_ULONG_MAX=-1
19354 fi
19355
19356
19357
19358
19359
19360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
19361$as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
d0ac1c44 19362if ${gl_cv_func_isnand_no_libm+:} false; then :
88b48903
WN
19363 $as_echo_n "(cached) " >&6
19364else
19365
19366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19367/* end confdefs.h. */
19368#include <math.h>
19369 #if __GNUC__ >= 4
19370 # undef isnand
19371 # define isnand(x) __builtin_isnan ((double)(x))
19372 #else
19373 # undef isnand
19374 # define isnand(x) isnan ((double)(x))
19375 #endif
19376 double x;
19377int
19378main ()
19379{
19380return isnand (x);
19381 ;
19382 return 0;
19383}
19384_ACEOF
19385if ac_fn_c_try_link "$LINENO"; then :
19386 gl_cv_func_isnand_no_libm=yes
19387else
19388 gl_cv_func_isnand_no_libm=no
19389fi
19390rm -f core conftest.err conftest.$ac_objext \
19391 conftest$ac_exeext conftest.$ac_ext
19392
19393fi
19394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
19395$as_echo "$gl_cv_func_isnand_no_libm" >&6; }
19396
19397 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
19398 if test $gl_cv_func_isnand_no_libm = yes; then
19399
19400$as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
19401
19402 fi
19403
19404 if test $gl_func_isnand_no_libm != yes; then
19405
19406
19407
19408
19409
19410
19411
19412
19413 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
19414
19415
19416
19417
19418 fi
19419
19420
19421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
19422$as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
d0ac1c44 19423if ${gl_cv_func_isnanl_no_libm+:} false; then :
88b48903
WN
19424 $as_echo_n "(cached) " >&6
19425else
19426
19427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19428/* end confdefs.h. */
19429#include <math.h>
19430 #if __GNUC__ >= 4
19431 # undef isnanl
19432 # define isnanl(x) __builtin_isnanl ((long double)(x))
19433 #elif defined isnan
19434 # undef isnanl
19435 # define isnanl(x) isnan ((long double)(x))
19436 #endif
19437 long double x;
19438int
19439main ()
19440{
19441return isnanl (x);
19442 ;
19443 return 0;
19444}
19445_ACEOF
19446if ac_fn_c_try_link "$LINENO"; then :
19447 gl_cv_func_isnanl_no_libm=yes
19448else
19449 gl_cv_func_isnanl_no_libm=no
19450fi
19451rm -f core conftest.err conftest.$ac_objext \
19452 conftest$ac_exeext conftest.$ac_ext
19453
19454fi
19455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
19456$as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
19457
19458 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
19459 if test $gl_func_isnanl_no_libm = yes; then
19460
19461
19462
19463
19464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
19465$as_echo_n "checking whether isnanl works... " >&6; }
d0ac1c44 19466if ${gl_cv_func_isnanl_works+:} false; then :
88b48903
WN
19467 $as_echo_n "(cached) " >&6
19468else
19469
19470 if test "$cross_compiling" = yes; then :
4a626d0a 19471 gl_cv_func_isnanl_works="guessing yes"
88b48903
WN
19472else
19473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19474/* end confdefs.h. */
19475
19476#include <float.h>
19477#include <limits.h>
19478#include <math.h>
19479#if __GNUC__ >= 4
19480# undef isnanl
19481# define isnanl(x) __builtin_isnanl ((long double)(x))
19482#elif defined isnan
19483# undef isnanl
19484# define isnanl(x) isnan ((long double)(x))
19485#endif
19486#define NWORDS \
19487 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
19488typedef union { unsigned int word[NWORDS]; long double value; }
19489 memory_long_double;
19490/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
19491 runtime type conversion. */
19492#ifdef __sgi
19493static long double NaNl ()
19494{
19495 double zero = 0.0;
19496 return zero / zero;
19497}
19498#else
19499# define NaNl() (0.0L / 0.0L)
19500#endif
19501int main ()
19502{
19503 int result = 0;
19504
19505 if (!isnanl (NaNl ()))
19506 result |= 1;
19507
19508 {
19509 memory_long_double m;
19510 unsigned int i;
19511
19512 /* The isnanl function should be immune against changes in the sign bit and
19513 in the mantissa bits. The xor operation twiddles a bit that can only be
19514 a sign bit or a mantissa bit (since the exponent never extends to
19515 bit 31). */
19516 m.value = NaNl ();
19517 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
19518 for (i = 0; i < NWORDS; i++)
19519 m.word[i] |= 1;
19520 if (!isnanl (m.value))
19521 result |= 1;
19522 }
19523
19524#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
19525/* Representation of an 80-bit 'long double' as an initializer for a sequence
19526 of 'unsigned int' words. */
19527# ifdef WORDS_BIGENDIAN
19528# define LDBL80_WORDS(exponent,manthi,mantlo) \
19529 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
4a626d0a 19530 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
88b48903
WN
19531 (unsigned int) (mantlo) << 16 \
19532 }
19533# else
19534# define LDBL80_WORDS(exponent,manthi,mantlo) \
19535 { mantlo, manthi, exponent }
19536# endif
19537 { /* Quiet NaN. */
19538 static memory_long_double x =
19539 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
19540 if (!isnanl (x.value))
19541 result |= 2;
19542 }
19543 {
19544 /* Signalling NaN. */
19545 static memory_long_double x =
19546 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
19547 if (!isnanl (x.value))
19548 result |= 2;
19549 }
4a626d0a 19550 /* isnanl should return something even for noncanonical values. */
88b48903
WN
19551 { /* Pseudo-NaN. */
19552 static memory_long_double x =
19553 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
4a626d0a 19554 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
19555 result |= 4;
19556 }
19557 { /* Pseudo-Infinity. */
19558 static memory_long_double x =
19559 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
4a626d0a 19560 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
19561 result |= 8;
19562 }
19563 { /* Pseudo-Zero. */
19564 static memory_long_double x =
19565 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
4a626d0a 19566 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
19567 result |= 16;
19568 }
19569 { /* Unnormalized number. */
19570 static memory_long_double x =
19571 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
4a626d0a 19572 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
19573 result |= 32;
19574 }
19575 { /* Pseudo-Denormal. */
19576 static memory_long_double x =
19577 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
4a626d0a 19578 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
19579 result |= 64;
19580 }
19581#endif
19582
19583 return result;
19584}
19585_ACEOF
19586if ac_fn_c_try_run "$LINENO"; then :
19587 gl_cv_func_isnanl_works=yes
19588else
19589 gl_cv_func_isnanl_works=no
19590fi
19591rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19592 conftest.$ac_objext conftest.beam conftest.$ac_ext
19593fi
19594
19595
19596fi
19597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
19598$as_echo "$gl_cv_func_isnanl_works" >&6; }
19599
19600 case "$gl_cv_func_isnanl_works" in
19601 *yes) ;;
19602 *) gl_func_isnanl_no_libm=no ;;
19603 esac
19604 fi
19605 if test $gl_func_isnanl_no_libm = yes; then
19606
19607$as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
19608
19609 fi
19610
19611 if test $gl_func_isnanl_no_libm != yes; then
19612
19613
19614
19615
19616
19617
19618
19619
19620 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
19621
19622
19623
19624
5e8754f9 19625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
88b48903 19626$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
d0ac1c44 19627if ${gl_cv_cc_long_double_expbit0+:} false; then :
88b48903
WN
19628 $as_echo_n "(cached) " >&6
19629else
19630
19631 if test "$cross_compiling" = yes; then :
19632
19633 gl_cv_cc_long_double_expbit0="unknown"
19634
19635else
19636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19637/* end confdefs.h. */
19638
19639#include <float.h>
19640#include <stddef.h>
19641#include <stdio.h>
19642#include <string.h>
19643#define NWORDS \
19644 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
19645typedef union { long double value; unsigned int word[NWORDS]; }
19646 memory_long_double;
19647static unsigned int ored_words[NWORDS];
19648static unsigned int anded_words[NWORDS];
19649static void add_to_ored_words (long double x)
19650{
19651 memory_long_double m;
19652 size_t i;
19653 /* Clear it first, in case
19654 sizeof (long double) < sizeof (memory_long_double). */
19655 memset (&m, 0, sizeof (memory_long_double));
19656 m.value = x;
19657 for (i = 0; i < NWORDS; i++)
19658 {
19659 ored_words[i] |= m.word[i];
19660 anded_words[i] &= m.word[i];
19661 }
19662}
19663int main ()
19664{
19665 size_t j;
19666 FILE *fp = fopen ("conftest.out", "w");
19667 if (fp == NULL)
19668 return 1;
19669 for (j = 0; j < NWORDS; j++)
19670 anded_words[j] = ~ (unsigned int) 0;
19671 add_to_ored_words (0.25L);
19672 add_to_ored_words (0.5L);
19673 add_to_ored_words (1.0L);
19674 add_to_ored_words (2.0L);
19675 add_to_ored_words (4.0L);
19676 /* Remove bits that are common (e.g. if representation of the first mantissa
19677 bit is explicit). */
19678 for (j = 0; j < NWORDS; j++)
19679 ored_words[j] &= ~anded_words[j];
19680 /* Now find the nonzero word. */
19681 for (j = 0; j < NWORDS; j++)
19682 if (ored_words[j] != 0)
19683 break;
19684 if (j < NWORDS)
19685 {
19686 size_t i;
19687 for (i = j + 1; i < NWORDS; i++)
19688 if (ored_words[i] != 0)
19689 {
19690 fprintf (fp, "unknown");
19691 return (fclose (fp) != 0);
19692 }
19693 for (i = 0; ; i++)
19694 if ((ored_words[j] >> i) & 1)
19695 {
19696 fprintf (fp, "word %d bit %d", (int) j, (int) i);
19697 return (fclose (fp) != 0);
19698 }
19699 }
19700 fprintf (fp, "unknown");
19701 return (fclose (fp) != 0);
19702}
19703
19704_ACEOF
19705if ac_fn_c_try_run "$LINENO"; then :
19706 gl_cv_cc_long_double_expbit0=`cat conftest.out`
19707else
19708 gl_cv_cc_long_double_expbit0="unknown"
19709fi
19710rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19711 conftest.$ac_objext conftest.beam conftest.$ac_ext
19712fi
19713
19714 rm -f conftest.out
19715
19716fi
19717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
19718$as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
19719 case "$gl_cv_cc_long_double_expbit0" in
19720 word*bit*)
19721 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
19722 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
19723
19724cat >>confdefs.h <<_ACEOF
19725#define LDBL_EXPBIT0_WORD $word
19726_ACEOF
19727
19728
19729cat >>confdefs.h <<_ACEOF
19730#define LDBL_EXPBIT0_BIT $bit
19731_ACEOF
19732
19733 ;;
19734 esac
19735
19736
19737
19738 fi
19739
19740
19741
19742
88b48903
WN
19743
19744
5e8754f9 19745 :
472fa5ee
SM
19746
19747
19748
19749
19750
88b48903
WN
19751
19752
2196f55f 19753
49e4877c 19754
5e8754f9 19755 LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
88b48903
WN
19756
19757
19758
19759
472fa5ee
SM
19760 :
19761
19762
19763
19764
19765
f45c62c4
YQ
19766 if test $ac_cv_func_lstat = yes; then
19767
5e8754f9
SDJ
19768 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
19769 *no)
f45c62c4
YQ
19770 REPLACE_LSTAT=1
19771 ;;
19772 esac
19773 else
19774 HAVE_LSTAT=0
19775 fi
19776
19777 if test $REPLACE_LSTAT = 1; then
19778
19779
19780
19781
19782
19783
19784
19785
19786 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
19787
19788 :
19789 fi
19790
19791
19792
19793
19794
19795 GNULIB_LSTAT=1
19796
19797
19798
19799
19800
19801$as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
19802
19803
19804
19805
19806
19807
6a29c58e
YQ
19808 if test $gl_cv_func_malloc_posix = yes; then
19809
19810$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
19811
19812 else
19813 REPLACE_MALLOC=1
19814 fi
19815
19816 if test $REPLACE_MALLOC = 1; then
19817
19818
19819
19820
19821
19822
19823
19824
19825 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
19826
19827 fi
19828
19829
19830
19831
19832
19833 GNULIB_MALLOC_POSIX=1
19834
19835
19836
19837
19838
19839$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
19840
19841
19842
19843
19844
19845
88b48903
WN
19846
19847
19848
19849
19850
88b48903 19851
c971b7fa 19852
c971b7fa 19853
98399780 19854
472fa5ee
SM
19855 :
19856
19857
19858
19859
19860
98399780
YQ
19861
19862
19863
88b48903
WN
19864 if test $gl_cv_have_include_next = yes; then
19865 gl_cv_next_math_h='<'math.h'>'
19866 else
19867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
19868$as_echo_n "checking absolute name of <math.h>... " >&6; }
d0ac1c44 19869if ${gl_cv_next_math_h+:} false; then :
88b48903
WN
19870 $as_echo_n "(cached) " >&6
19871else
c971b7fa 19872
88b48903 19873 if test $ac_cv_header_math_h = yes; then
c971b7fa
PA
19874
19875
4a626d0a
PA
19876
19877
19878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 19879/* end confdefs.h. */
88b48903 19880#include <math.h>
8690e634 19881_ACEOF
4a626d0a
PA
19882 case "$host_os" in
19883 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19884 *) gl_absname_cpp="$ac_cpp" ;;
19885 esac
19886
19887 case "$host_os" in
19888 mingw*)
19889 gl_dirsep_regex='[/\\]'
19890 ;;
19891 *)
19892 gl_dirsep_regex='\/'
19893 ;;
19894 esac
19895 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19896 gl_header_literal_regex=`echo 'math.h' \
19897 | sed -e "$gl_make_literal_regex_sed"`
19898 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19899 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19900 s|^/[^/]|//&|
19901 p
19902 q
19903 }'
19904
19905 gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19906 sed -n "$gl_absolute_header_sed"`
19907
19908 gl_header=$gl_cv_absolute_math_h
19909 gl_cv_next_math_h='"'$gl_header'"'
88b48903
WN
19910 else
19911 gl_cv_next_math_h='<'math.h'>'
19912 fi
8690e634 19913
c971b7fa 19914
88b48903
WN
19915fi
19916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
19917$as_echo "$gl_cv_next_math_h" >&6; }
19918 fi
19919 NEXT_MATH_H=$gl_cv_next_math_h
c971b7fa 19920
88b48903
WN
19921 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19922 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19923 gl_next_as_first_directive='<'math.h'>'
19924 else
19925 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19926 gl_next_as_first_directive=$gl_cv_next_math_h
19927 fi
19928 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
8690e634 19929
c971b7fa 19930
c971b7fa
PA
19931
19932
c971b7fa 19933
88b48903
WN
19934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
19935$as_echo_n "checking whether NAN macro works... " >&6; }
d0ac1c44 19936if ${gl_cv_header_math_nan_works+:} false; then :
c971b7fa
PA
19937 $as_echo_n "(cached) " >&6
19938else
8690e634
JK
19939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19940/* end confdefs.h. */
88b48903 19941#include <math.h>
c971b7fa
PA
19942int
19943main ()
19944{
88b48903
WN
19945/* Solaris 10 has a broken definition of NAN. Other platforms
19946 fail to provide NAN, or provide it only in C99 mode; this
19947 test only needs to fail when NAN is provided but wrong. */
19948 float f = 1.0f;
19949#ifdef NAN
19950 f = NAN;
19951#endif
19952 return f == 0;
c971b7fa
PA
19953 ;
19954 return 0;
19955}
19956_ACEOF
19957if ac_fn_c_try_compile "$LINENO"; then :
88b48903 19958 gl_cv_header_math_nan_works=yes
8690e634 19959else
88b48903 19960 gl_cv_header_math_nan_works=no
c971b7fa
PA
19961fi
19962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 19963fi
88b48903
WN
19964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
19965$as_echo "$gl_cv_header_math_nan_works" >&6; }
19966 if test $gl_cv_header_math_nan_works = no; then
19967 REPLACE_NAN=1
c971b7fa 19968 fi
88b48903
WN
19969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
19970$as_echo_n "checking whether HUGE_VAL works... " >&6; }
d0ac1c44 19971if ${gl_cv_header_math_huge_val_works+:} false; then :
c971b7fa
PA
19972 $as_echo_n "(cached) " >&6
19973else
8690e634 19974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 19975/* end confdefs.h. */
88b48903 19976#include <math.h>
c971b7fa
PA
19977int
19978main ()
19979{
88b48903
WN
19980/* Solaris 10 has a broken definition of HUGE_VAL. */
19981 double d = HUGE_VAL;
19982 return d == 0;
c971b7fa
PA
19983 ;
19984 return 0;
19985}
19986_ACEOF
19987if ac_fn_c_try_compile "$LINENO"; then :
88b48903 19988 gl_cv_header_math_huge_val_works=yes
8690e634 19989else
88b48903 19990 gl_cv_header_math_huge_val_works=no
c971b7fa
PA
19991fi
19992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 19993fi
88b48903
WN
19994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
19995$as_echo "$gl_cv_header_math_huge_val_works" >&6; }
19996 if test $gl_cv_header_math_huge_val_works = no; then
19997 REPLACE_HUGE_VAL=1
8690e634 19998 fi
c971b7fa 19999
c971b7fa 20000
5e8754f9
SDJ
20001 for gl_func in acosf acosl asinf asinl atanf atanl cbrt cbrtf cbrtl ceilf ceill copysign copysignf copysignl cosf cosl coshf expf expl exp2 exp2f exp2l expm1 expm1f expm1l fabsf fabsl floorf floorl fma fmaf fmal fmod fmodf fmodl frexpf frexpl hypotf hypotl ilogb ilogbf ilogbl ldexpf ldexpl log logf logl log10 log10f log10l log1p log1pf log1pl log2 log2f log2l logb logbf logbl modf modff modfl powf remainder remainderf remainderl rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl tanf tanl tanhf trunc truncf truncl; do
20002 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
20003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
20004$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
20005if eval \${$as_gl_Symbol+:} false; then :
20006 $as_echo_n "(cached) " >&6
20007else
20008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20009/* end confdefs.h. */
20010#include <math.h>
20011int
20012main ()
20013{
20014#undef $gl_func
20015 (void) $gl_func;
20016 ;
20017 return 0;
20018}
20019_ACEOF
20020if ac_fn_c_try_compile "$LINENO"; then :
20021 eval "$as_gl_Symbol=yes"
20022else
20023 eval "$as_gl_Symbol=no"
20024fi
20025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20026fi
20027eval ac_res=\$$as_gl_Symbol
20028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20029$as_echo "$ac_res" >&6; }
20030 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
20031 cat >>confdefs.h <<_ACEOF
20032#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
20033_ACEOF
c971b7fa 20034
5e8754f9
SDJ
20035 eval ac_cv_have_decl_$gl_func=yes
20036fi
20037 done
c971b7fa
PA
20038
20039
20040
20041
20042
c971b7fa 20043
c971b7fa 20044
c971b7fa 20045
c971b7fa
PA
20046
20047
c971b7fa 20048
472fa5ee
SM
20049 :
20050
20051
20052
20053
20054
20055
20056 :
20057
20058
20059
20060
8690e634
JK
20061
20062 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
20063
20064
20065
20066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
20067$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
d0ac1c44 20068if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
c971b7fa
PA
20069 $as_echo_n "(cached) " >&6
20070else
8690e634
JK
20071
20072 case "$host_os" in
20073 # Guess no on AIX and OSF/1.
20074 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
20075 # Guess yes otherwise.
20076 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
20077 esac
20078 if test $LOCALE_JA != none; then
20079 if test "$cross_compiling" = yes; then :
20080 :
20081else
c971b7fa
PA
20082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20083/* end confdefs.h. */
c971b7fa 20084
8690e634
JK
20085#include <locale.h>
20086#include <string.h>
20087/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20088 <wchar.h>.
20089 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20090 included before <wchar.h>. */
20091#include <stddef.h>
20092#include <stdio.h>
20093#include <time.h>
20094#include <wchar.h>
20095int main ()
c971b7fa 20096{
8690e634
JK
20097 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
20098 {
20099 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
20100 mbstate_t state;
20101 wchar_t wc;
20102
20103 memset (&state, '\0', sizeof (mbstate_t));
20104 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
20105 if (mbsinit (&state))
5e8754f9 20106 return 1;
8690e634 20107 }
c971b7fa
PA
20108 return 0;
20109}
20110_ACEOF
8690e634
JK
20111if ac_fn_c_try_run "$LINENO"; then :
20112 gl_cv_func_mbrtowc_incomplete_state=yes
c971b7fa 20113else
8690e634 20114 gl_cv_func_mbrtowc_incomplete_state=no
c971b7fa 20115fi
8690e634
JK
20116rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20117 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 20118fi
c971b7fa 20119
8690e634 20120 fi
c971b7fa 20121
8690e634
JK
20122fi
20123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
20124$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
c971b7fa 20125
c971b7fa 20126
c971b7fa 20127
c971b7fa 20128
8690e634
JK
20129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
20130$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
d0ac1c44 20131if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
c971b7fa
PA
20132 $as_echo_n "(cached) " >&6
20133else
20134
8690e634
JK
20135 case "$host_os" in
20136 # Guess no on Solaris 8.
20137 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
20138 # Guess yes otherwise.
20139 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
20140 esac
20141 if test $LOCALE_ZH_CN != none; then
20142 if test "$cross_compiling" = yes; then :
20143 :
20144else
20145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
20146/* end confdefs.h. */
20147
8690e634
JK
20148#include <locale.h>
20149#include <stdlib.h>
20150#include <string.h>
20151/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20152 <wchar.h>.
20153 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20154 included before <wchar.h>. */
20155#include <stddef.h>
20156#include <stdio.h>
20157#include <time.h>
20158#include <wchar.h>
20159int main ()
c971b7fa 20160{
8690e634
JK
20161 /* This fails on Solaris 8:
20162 mbrtowc returns 2, and sets wc to 0x00F0.
20163 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
20164 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
20165 {
20166 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
20167 mbstate_t state;
20168 wchar_t wc;
20169
20170 memset (&state, '\0', sizeof (mbstate_t));
20171 if (mbrtowc (&wc, input + 3, 6, &state) != 4
20172 && mbtowc (&wc, input + 3, 6) == 4)
5e8754f9 20173 return 1;
8690e634 20174 }
c971b7fa
PA
20175 return 0;
20176}
20177_ACEOF
8690e634
JK
20178if ac_fn_c_try_run "$LINENO"; then :
20179 gl_cv_func_mbrtowc_sanitycheck=yes
c971b7fa 20180else
8690e634 20181 gl_cv_func_mbrtowc_sanitycheck=no
c971b7fa 20182fi
8690e634
JK
20183rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20184 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 20185fi
c971b7fa 20186
8690e634 20187 fi
c971b7fa 20188
8690e634
JK
20189fi
20190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
20191$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
20192
20193 REPLACE_MBSTATE_T=0
20194 case "$gl_cv_func_mbrtowc_incomplete_state" in
20195 *yes) ;;
20196 *) REPLACE_MBSTATE_T=1 ;;
20197 esac
20198 case "$gl_cv_func_mbrtowc_sanitycheck" in
20199 *yes) ;;
20200 *) REPLACE_MBSTATE_T=1 ;;
20201 esac
c971b7fa 20202 else
8690e634 20203 REPLACE_MBSTATE_T=1
c971b7fa
PA
20204 fi
20205
20206
20207
472fa5ee
SM
20208 :
20209
20210
20211
20212
20213
8690e634
JK
20214 if test $ac_cv_func_mbrtowc = no; then
20215 HAVE_MBRTOWC=0
20216 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
20217/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20218 <wchar.h>.
20219 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20220 included before <wchar.h>. */
20221#include <stddef.h>
20222#include <stdio.h>
20223#include <time.h>
20224#include <wchar.h>
c971b7fa 20225
8690e634 20226"
d0ac1c44 20227if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
8690e634
JK
20228 ac_have_decl=1
20229else
20230 ac_have_decl=0
c971b7fa 20231fi
c971b7fa 20232
8690e634
JK
20233cat >>confdefs.h <<_ACEOF
20234#define HAVE_DECL_MBRTOWC $ac_have_decl
20235_ACEOF
c971b7fa 20236
8690e634
JK
20237 if test $ac_cv_have_decl_mbrtowc = yes; then
20238 REPLACE_MBRTOWC=1
20239 fi
20240 else
20241 if test $REPLACE_MBSTATE_T = 1; then
20242 REPLACE_MBRTOWC=1
20243 else
c971b7fa
PA
20244
20245
20246
8690e634
JK
20247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
20248$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
d0ac1c44 20249if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
8690e634 20250 $as_echo_n "(cached) " >&6
c971b7fa 20251else
c971b7fa 20252
8690e634
JK
20253 case "$host_os" in
20254 # Guess no on Solaris.
20255 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
20256 # Guess yes otherwise.
20257 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
20258 esac
20259 if test $LOCALE_FR_UTF8 != none; then
20260 if test "$cross_compiling" = yes; then :
20261 :
20262else
20263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
20264/* end confdefs.h. */
20265
8690e634
JK
20266#include <locale.h>
20267#include <stdlib.h>
20268#include <string.h>
20269/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20270 <wchar.h>.
20271 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20272 included before <wchar.h>. */
20273#include <stddef.h>
20274#include <stdio.h>
20275#include <time.h>
20276#include <wchar.h>
20277int main ()
20278{
20279 int result = 0;
20280
20281 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
20282 {
20283 char input[] = "\303\237er";
20284 mbstate_t state;
20285 wchar_t wc;
20286 size_t ret;
20287
20288 memset (&state, '\0', sizeof (mbstate_t));
20289 wc = (wchar_t) 0xBADFACE;
20290 ret = mbrtowc (&wc, input, 5, &state);
20291 if (ret != 2)
20292 result |= 1;
20293 if (!mbsinit (&state))
20294 result |= 2;
c971b7fa 20295
8690e634
JK
20296 memset (&state, '\0', sizeof (mbstate_t));
20297 ret = mbrtowc (NULL, input, 5, &state);
20298 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
20299 result |= 4;
20300 if (!mbsinit (&state))
20301 result |= 8;
20302 }
20303 return result;
20304}
c971b7fa 20305_ACEOF
8690e634
JK
20306if ac_fn_c_try_run "$LINENO"; then :
20307 gl_cv_func_mbrtowc_null_arg1=yes
20308else
20309 gl_cv_func_mbrtowc_null_arg1=no
20310fi
20311rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20312 conftest.$ac_objext conftest.beam conftest.$ac_ext
20313fi
c971b7fa 20314
8690e634 20315 fi
c971b7fa 20316
c971b7fa 20317fi
8690e634
JK
20318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
20319$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
c971b7fa 20320
c971b7fa 20321
c971b7fa 20322
c971b7fa 20323
8690e634
JK
20324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
20325$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
d0ac1c44 20326if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
8690e634
JK
20327 $as_echo_n "(cached) " >&6
20328else
c971b7fa 20329
8690e634
JK
20330 case "$host_os" in
20331 # Guess no on OSF/1.
20332 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
20333 # Guess yes otherwise.
20334 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
20335 esac
20336 if test $LOCALE_FR_UTF8 != none; then
20337 if test "$cross_compiling" = yes; then :
c971b7fa 20338 :
8690e634
JK
20339else
20340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20341/* end confdefs.h. */
20342
20343#include <locale.h>
20344#include <string.h>
20345/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20346 <wchar.h>.
20347 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20348 included before <wchar.h>. */
20349#include <stddef.h>
20350#include <stdio.h>
20351#include <time.h>
20352#include <wchar.h>
20353int main ()
20354{
20355 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
20356 {
20357 mbstate_t state;
20358 wchar_t wc;
20359 int ret;
20360
20361 memset (&state, '\0', sizeof (mbstate_t));
20362 wc = (wchar_t) 0xBADFACE;
20363 mbrtowc (&wc, NULL, 5, &state);
20364 /* Check that wc was not modified. */
20365 if (wc != (wchar_t) 0xBADFACE)
5e8754f9 20366 return 1;
8690e634
JK
20367 }
20368 return 0;
20369}
20370_ACEOF
20371if ac_fn_c_try_run "$LINENO"; then :
20372 gl_cv_func_mbrtowc_null_arg2=yes
20373else
20374 gl_cv_func_mbrtowc_null_arg2=no
20375fi
20376rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20377 conftest.$ac_objext conftest.beam conftest.$ac_ext
20378fi
20379
20380 fi
20381
20382fi
20383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
20384$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
c971b7fa
PA
20385
20386
20387
20388
20389
20390
8690e634
JK
20391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
20392$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
d0ac1c44 20393if ${gl_cv_func_mbrtowc_retval+:} false; then :
8690e634
JK
20394 $as_echo_n "(cached) " >&6
20395else
20396
20397 case "$host_os" in
20398 # Guess no on HP-UX, Solaris, native Windows.
20399 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
20400 # Guess yes otherwise.
20401 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
20402 esac
20403 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
20404 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
20405 if test "$cross_compiling" = yes; then :
c971b7fa 20406 :
8690e634
JK
20407else
20408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20409/* end confdefs.h. */
c971b7fa 20410
8690e634
JK
20411#include <locale.h>
20412#include <string.h>
20413/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20414 <wchar.h>.
20415 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20416 included before <wchar.h>. */
20417#include <stddef.h>
20418#include <stdio.h>
20419#include <time.h>
20420#include <wchar.h>
20421int main ()
20422{
20423 int result = 0;
20424 int found_some_locale = 0;
20425 /* This fails on Solaris. */
20426 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
20427 {
20428 char input[] = "B\303\274\303\237er"; /* "Büßer" */
20429 mbstate_t state;
20430 wchar_t wc;
20431
20432 memset (&state, '\0', sizeof (mbstate_t));
20433 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
20434 {
20435 input[1] = '\0';
20436 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
20437 result |= 1;
20438 }
20439 found_some_locale = 1;
20440 }
20441 /* This fails on HP-UX 11.11. */
20442 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
20443 {
20444 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
20445 mbstate_t state;
20446 wchar_t wc;
20447
20448 memset (&state, '\0', sizeof (mbstate_t));
20449 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
20450 {
20451 input[1] = '\0';
20452 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
20453 result |= 2;
20454 }
20455 found_some_locale = 1;
20456 }
20457 /* This fails on native Windows. */
20458 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
20459 {
20460 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
20461 mbstate_t state;
20462 wchar_t wc;
20463
20464 memset (&state, '\0', sizeof (mbstate_t));
20465 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
20466 {
20467 input[3] = '\0';
20468 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
20469 result |= 4;
20470 }
20471 found_some_locale = 1;
20472 }
20473 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
20474 {
20475 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
20476 mbstate_t state;
20477 wchar_t wc;
20478
20479 memset (&state, '\0', sizeof (mbstate_t));
20480 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
20481 {
20482 input[3] = '\0';
20483 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
20484 result |= 8;
20485 }
20486 found_some_locale = 1;
20487 }
20488 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
20489 {
20490 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
20491 mbstate_t state;
20492 wchar_t wc;
20493
20494 memset (&state, '\0', sizeof (mbstate_t));
20495 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
20496 {
20497 input[3] = '\0';
20498 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
20499 result |= 16;
20500 }
20501 found_some_locale = 1;
20502 }
20503 return (found_some_locale ? result : 77);
20504}
20505_ACEOF
20506if ac_fn_c_try_run "$LINENO"; then :
20507 gl_cv_func_mbrtowc_retval=yes
20508else
20509 if test $? != 77; then
20510 gl_cv_func_mbrtowc_retval=no
20511 fi
c971b7fa 20512
8690e634
JK
20513fi
20514rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20515 conftest.$ac_objext conftest.beam conftest.$ac_ext
20516fi
c971b7fa 20517
8690e634 20518 fi
c971b7fa 20519
8690e634
JK
20520fi
20521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
20522$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
c971b7fa
PA
20523
20524
20525
20526
8690e634
JK
20527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
20528$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
d0ac1c44 20529if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
c971b7fa
PA
20530 $as_echo_n "(cached) " >&6
20531else
8690e634
JK
20532
20533 case "$host_os" in
20534 # Guess no on Solaris 8 and 9.
20535 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
20536 # Guess yes otherwise.
20537 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
20538 esac
20539 if test $LOCALE_ZH_CN != none; then
20540 if test "$cross_compiling" = yes; then :
20541 :
c971b7fa
PA
20542else
20543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20544/* end confdefs.h. */
20545
8690e634 20546#include <locale.h>
c971b7fa 20547#include <string.h>
8690e634
JK
20548/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20549 <wchar.h>.
20550 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20551 included before <wchar.h>. */
20552#include <stddef.h>
20553#include <stdio.h>
20554#include <time.h>
20555#include <wchar.h>
20556int main ()
c971b7fa 20557{
8690e634
JK
20558 /* This fails on Solaris 8 and 9. */
20559 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
c971b7fa 20560 {
8690e634
JK
20561 mbstate_t state;
20562 wchar_t wc;
c971b7fa 20563
8690e634
JK
20564 memset (&state, '\0', sizeof (mbstate_t));
20565 if (mbrtowc (&wc, "", 1, &state) != 0)
5e8754f9 20566 return 1;
8690e634 20567 }
c971b7fa
PA
20568 return 0;
20569}
20570_ACEOF
20571if ac_fn_c_try_run "$LINENO"; then :
8690e634 20572 gl_cv_func_mbrtowc_nul_retval=yes
c971b7fa 20573else
8690e634 20574 gl_cv_func_mbrtowc_nul_retval=no
c971b7fa
PA
20575fi
20576rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20577 conftest.$ac_objext conftest.beam conftest.$ac_ext
20578fi
20579
8690e634
JK
20580 fi
20581
c971b7fa 20582fi
8690e634
JK
20583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
20584$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
20585
4a626d0a
PA
20586
20587
20588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
20589$as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
d0ac1c44 20590if ${gl_cv_func_mbrtowc_empty_input+:} false; then :
4a626d0a
PA
20591 $as_echo_n "(cached) " >&6
20592else
20593
20594 case "$host_os" in
5e8754f9
SDJ
20595 # Guess no on AIX and glibc systems.
20596 aix* | *-gnu*)
20597 gl_cv_func_mbrtowc_empty_input="guessing no" ;;
20598 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
4a626d0a
PA
20599 esac
20600 if test "$cross_compiling" = yes; then :
20601 :
20602else
20603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20604/* end confdefs.h. */
20605
20606 #include <wchar.h>
20607 static wchar_t wc;
20608 static mbstate_t mbs;
20609 int
20610 main (void)
20611 {
49e4877c 20612 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
4a626d0a
PA
20613 }
20614_ACEOF
20615if ac_fn_c_try_run "$LINENO"; then :
4a626d0a 20616 gl_cv_func_mbrtowc_empty_input=yes
49e4877c
PA
20617else
20618 gl_cv_func_mbrtowc_empty_input=no
4a626d0a
PA
20619fi
20620rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20621 conftest.$ac_objext conftest.beam conftest.$ac_ext
20622fi
20623
20624
20625fi
20626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
20627$as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
20628
49e4877c 20629
5e8754f9 20630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
49e4877c 20631$as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
d0ac1c44 20632if ${gl_cv_C_locale_sans_EILSEQ+:} false; then :
49e4877c
PA
20633 $as_echo_n "(cached) " >&6
20634else
20635
20636 gl_cv_C_locale_sans_EILSEQ="guessing no"
20637
20638 if test "$cross_compiling" = yes; then :
5e8754f9 20639 :
49e4877c
PA
20640else
20641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20642/* end confdefs.h. */
20643#include <limits.h>
20644 #include <locale.h>
20645 #include <wchar.h>
20646
20647int
20648main ()
20649{
20650
20651 int i;
20652 char *locale = setlocale (LC_ALL, "C");
20653 if (! locale)
5e8754f9 20654 return 1;
49e4877c
PA
20655 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
20656 {
20657 char c = i;
20658 wchar_t wc;
20659 mbstate_t mbs = { 0, };
20660 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
20661 if (1 < ss)
5e8754f9 20662 return 1;
49e4877c
PA
20663 }
20664 return 0;
20665
6ec2e0f5
SDJ
20666 ;
20667 return 0;
20668}
20669_ACEOF
20670if ac_fn_c_try_run "$LINENO"; then :
20671 gl_cv_C_locale_sans_EILSEQ=yes
20672else
20673 gl_cv_C_locale_sans_EILSEQ=no
20674fi
20675rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20676 conftest.$ac_objext conftest.beam conftest.$ac_ext
20677fi
20678
20679fi
20680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5
20681$as_echo "$gl_cv_C_locale_sans_EILSEQ" >&6; }
20682
20683 case "$gl_cv_func_mbrtowc_null_arg1" in
20684 *yes) ;;
20685 *)
20686$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
20687
20688 REPLACE_MBRTOWC=1
20689 ;;
20690 esac
20691 case "$gl_cv_func_mbrtowc_null_arg2" in
20692 *yes) ;;
20693 *)
20694$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
20695
20696 REPLACE_MBRTOWC=1
20697 ;;
20698 esac
20699 case "$gl_cv_func_mbrtowc_retval" in
20700 *yes) ;;
20701 *)
20702$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
20703
20704 REPLACE_MBRTOWC=1
20705 ;;
20706 esac
20707 case "$gl_cv_func_mbrtowc_nul_retval" in
20708 *yes) ;;
20709 *)
20710$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
20711
20712 REPLACE_MBRTOWC=1
20713 ;;
20714 esac
20715 case "$gl_cv_func_mbrtowc_empty_input" in
20716 *yes) ;;
20717 *)
20718$as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
20719
20720 REPLACE_MBRTOWC=1
20721 ;;
20722 esac
20723 case $gl_cv_C_locale_sans_EILSEQ in
20724 *yes) ;;
20725 *)
20726$as_echo "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
20727
20728 REPLACE_MBRTOWC=1
20729 ;;
20730 esac
20731 fi
20732 fi
20733
20734 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
20735
20736
20737
20738
20739
20740
20741
20742
20743 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
20744
20745
20746 :
20747
20748 fi
20749
20750
20751
20752
20753
20754 GNULIB_MBRTOWC=1
20755
20756
20757
20758
20759
20760$as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
20761
20762
20763
20764
20765
20766
20767
20768
20769
20770
20771
20772
20773
472fa5ee
SM
20774 :
20775
20776
20777
20778
20779
20780
20781 :
20782
20783
20784
20785
6ec2e0f5
SDJ
20786
20787 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
20788
20789
20790
20791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
20792$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
d0ac1c44 20793if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
6ec2e0f5
SDJ
20794 $as_echo_n "(cached) " >&6
20795else
20796
20797 case "$host_os" in
20798 # Guess no on AIX and OSF/1.
20799 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
20800 # Guess yes otherwise.
20801 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
20802 esac
20803 if test $LOCALE_JA != none; then
20804 if test "$cross_compiling" = yes; then :
20805 :
20806else
20807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20808/* end confdefs.h. */
20809
20810#include <locale.h>
20811#include <string.h>
20812/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20813 <wchar.h>.
20814 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20815 included before <wchar.h>. */
20816#include <stddef.h>
20817#include <stdio.h>
20818#include <time.h>
20819#include <wchar.h>
20820int main ()
20821{
20822 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
20823 {
20824 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
20825 mbstate_t state;
20826 wchar_t wc;
20827
20828 memset (&state, '\0', sizeof (mbstate_t));
20829 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
20830 if (mbsinit (&state))
5e8754f9 20831 return 1;
6ec2e0f5
SDJ
20832 }
20833 return 0;
20834}
20835_ACEOF
20836if ac_fn_c_try_run "$LINENO"; then :
20837 gl_cv_func_mbrtowc_incomplete_state=yes
20838else
20839 gl_cv_func_mbrtowc_incomplete_state=no
20840fi
20841rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20842 conftest.$ac_objext conftest.beam conftest.$ac_ext
20843fi
20844
20845 fi
20846
20847fi
20848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
20849$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
20850
20851
20852
20853
20854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
20855$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
d0ac1c44 20856if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
6ec2e0f5
SDJ
20857 $as_echo_n "(cached) " >&6
20858else
20859
20860 case "$host_os" in
20861 # Guess no on Solaris 8.
20862 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
20863 # Guess yes otherwise.
20864 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
20865 esac
20866 if test $LOCALE_ZH_CN != none; then
20867 if test "$cross_compiling" = yes; then :
20868 :
20869else
20870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20871/* end confdefs.h. */
20872
20873#include <locale.h>
20874#include <stdlib.h>
20875#include <string.h>
20876/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20877 <wchar.h>.
20878 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20879 included before <wchar.h>. */
20880#include <stddef.h>
20881#include <stdio.h>
20882#include <time.h>
20883#include <wchar.h>
20884int main ()
20885{
20886 /* This fails on Solaris 8:
20887 mbrtowc returns 2, and sets wc to 0x00F0.
20888 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
20889 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
20890 {
20891 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
20892 mbstate_t state;
20893 wchar_t wc;
20894
20895 memset (&state, '\0', sizeof (mbstate_t));
20896 if (mbrtowc (&wc, input + 3, 6, &state) != 4
20897 && mbtowc (&wc, input + 3, 6) == 4)
5e8754f9 20898 return 1;
6ec2e0f5 20899 }
49e4877c
PA
20900 return 0;
20901}
20902_ACEOF
20903if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 20904 gl_cv_func_mbrtowc_sanitycheck=yes
49e4877c 20905else
6ec2e0f5 20906 gl_cv_func_mbrtowc_sanitycheck=no
49e4877c
PA
20907fi
20908rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20909 conftest.$ac_objext conftest.beam conftest.$ac_ext
20910fi
20911
6ec2e0f5
SDJ
20912 fi
20913
49e4877c 20914fi
6ec2e0f5
SDJ
20915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
20916$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
49e4877c 20917
6ec2e0f5
SDJ
20918 REPLACE_MBSTATE_T=0
20919 case "$gl_cv_func_mbrtowc_incomplete_state" in
20920 *yes) ;;
20921 *) REPLACE_MBSTATE_T=1 ;;
20922 esac
20923 case "$gl_cv_func_mbrtowc_sanitycheck" in
20924 *yes) ;;
20925 *) REPLACE_MBSTATE_T=1 ;;
20926 esac
20927 else
20928 REPLACE_MBSTATE_T=1
20929 fi
8690e634 20930
8690e634 20931
8690e634 20932
472fa5ee
SM
20933 :
20934
20935
20936
20937
20938
6ec2e0f5
SDJ
20939 if test $ac_cv_func_mbsinit = no; then
20940 HAVE_MBSINIT=0
20941 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
20942/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20943 <wchar.h>.
20944 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20945 included before <wchar.h>. */
20946#include <stddef.h>
20947#include <stdio.h>
20948#include <time.h>
20949#include <wchar.h>
8690e634 20950
6ec2e0f5 20951"
d0ac1c44 20952if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
6ec2e0f5
SDJ
20953 ac_have_decl=1
20954else
20955 ac_have_decl=0
20956fi
4a626d0a 20957
6ec2e0f5
SDJ
20958cat >>confdefs.h <<_ACEOF
20959#define HAVE_DECL_MBSINIT $ac_have_decl
20960_ACEOF
49e4877c 20961
6ec2e0f5
SDJ
20962 if test $ac_cv_have_decl_mbsinit = yes; then
20963 REPLACE_MBSINIT=1
20964 fi
20965 else
20966 if test $REPLACE_MBSTATE_T = 1; then
20967 REPLACE_MBSINIT=1
20968 else
20969 case "$host_os" in
20970 mingw*) REPLACE_MBSINIT=1 ;;
8690e634 20971 esac
c971b7fa
PA
20972 fi
20973 fi
20974
6ec2e0f5 20975 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
c971b7fa 20976
c971b7fa 20977
c971b7fa
PA
20978
20979
20980
20981
20982
20983
6ec2e0f5 20984 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
8690e634
JK
20985
20986
20987 :
c971b7fa 20988
a512b375 20989 fi
c971b7fa 20990
8690e634
JK
20991
20992
20993
20994
6ec2e0f5 20995 GNULIB_MBSINIT=1
8690e634
JK
20996
20997
20998
20999
8690e634 21000
6ec2e0f5 21001$as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
8690e634
JK
21002
21003
21004
21005
21006
21007
21008
21009
21010
21011
21012
c971b7fa 21013
472fa5ee
SM
21014 :
21015
21016
21017
21018
21019
21020
21021 :
21022
21023
21024
21025
c971b7fa 21026
8690e634 21027 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
c971b7fa 21028
8690e634
JK
21029
21030
21031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
21032$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
d0ac1c44 21033if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
8690e634
JK
21034 $as_echo_n "(cached) " >&6
21035else
21036
21037 case "$host_os" in
21038 # Guess no on AIX and OSF/1.
21039 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
21040 # Guess yes otherwise.
21041 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
21042 esac
21043 if test $LOCALE_JA != none; then
21044 if test "$cross_compiling" = yes; then :
21045 :
c971b7fa
PA
21046else
21047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21048/* end confdefs.h. */
21049
8690e634
JK
21050#include <locale.h>
21051#include <string.h>
21052/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21053 <wchar.h>.
21054 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21055 included before <wchar.h>. */
21056#include <stddef.h>
21057#include <stdio.h>
21058#include <time.h>
21059#include <wchar.h>
21060int main ()
c971b7fa 21061{
8690e634 21062 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
c971b7fa 21063 {
8690e634
JK
21064 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
21065 mbstate_t state;
21066 wchar_t wc;
21067
21068 memset (&state, '\0', sizeof (mbstate_t));
21069 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
21070 if (mbsinit (&state))
5e8754f9 21071 return 1;
c971b7fa 21072 }
c971b7fa
PA
21073 return 0;
21074}
21075_ACEOF
21076if ac_fn_c_try_run "$LINENO"; then :
8690e634 21077 gl_cv_func_mbrtowc_incomplete_state=yes
c971b7fa 21078else
8690e634 21079 gl_cv_func_mbrtowc_incomplete_state=no
c971b7fa
PA
21080fi
21081rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21082 conftest.$ac_objext conftest.beam conftest.$ac_ext
21083fi
21084
8690e634 21085 fi
c971b7fa
PA
21086
21087fi
8690e634
JK
21088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
21089$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
c971b7fa
PA
21090
21091
c971b7fa
PA
21092
21093
8690e634
JK
21094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
21095$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
d0ac1c44 21096if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
c971b7fa
PA
21097 $as_echo_n "(cached) " >&6
21098else
8690e634
JK
21099
21100 case "$host_os" in
21101 # Guess no on Solaris 8.
21102 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
21103 # Guess yes otherwise.
21104 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
21105 esac
21106 if test $LOCALE_ZH_CN != none; then
21107 if test "$cross_compiling" = yes; then :
21108 :
21109else
c971b7fa
PA
21110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21111/* end confdefs.h. */
8690e634
JK
21112
21113#include <locale.h>
21114#include <stdlib.h>
21115#include <string.h>
21116/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21117 <wchar.h>.
21118 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21119 included before <wchar.h>. */
c971b7fa 21120#include <stddef.h>
8690e634
JK
21121#include <stdio.h>
21122#include <time.h>
21123#include <wchar.h>
21124int main ()
c971b7fa 21125{
8690e634
JK
21126 /* This fails on Solaris 8:
21127 mbrtowc returns 2, and sets wc to 0x00F0.
21128 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
21129 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
21130 {
21131 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
21132 mbstate_t state;
21133 wchar_t wc;
21134
21135 memset (&state, '\0', sizeof (mbstate_t));
21136 if (mbrtowc (&wc, input + 3, 6, &state) != 4
21137 && mbtowc (&wc, input + 3, 6) == 4)
5e8754f9 21138 return 1;
8690e634 21139 }
c971b7fa
PA
21140 return 0;
21141}
21142_ACEOF
8690e634
JK
21143if ac_fn_c_try_run "$LINENO"; then :
21144 gl_cv_func_mbrtowc_sanitycheck=yes
c971b7fa 21145else
8690e634 21146 gl_cv_func_mbrtowc_sanitycheck=no
c971b7fa 21147fi
8690e634
JK
21148rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21149 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 21150fi
c971b7fa 21151
8690e634
JK
21152 fi
21153
21154fi
21155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
21156$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
c971b7fa 21157
8690e634
JK
21158 REPLACE_MBSTATE_T=0
21159 case "$gl_cv_func_mbrtowc_incomplete_state" in
21160 *yes) ;;
21161 *) REPLACE_MBSTATE_T=1 ;;
21162 esac
21163 case "$gl_cv_func_mbrtowc_sanitycheck" in
21164 *yes) ;;
21165 *) REPLACE_MBSTATE_T=1 ;;
21166 esac
21167 else
21168 REPLACE_MBSTATE_T=1
c971b7fa
PA
21169 fi
21170
c971b7fa 21171
8690e634 21172
472fa5ee
SM
21173 :
21174
21175
21176
21177
21178
6ec2e0f5
SDJ
21179 if test $ac_cv_func_mbsrtowcs = no; then
21180 HAVE_MBSRTOWCS=0
21181 ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
8690e634
JK
21182/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21183 <wchar.h>.
21184 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21185 included before <wchar.h>. */
21186#include <stddef.h>
21187#include <stdio.h>
21188#include <time.h>
21189#include <wchar.h>
21190
21191"
d0ac1c44 21192if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
8690e634
JK
21193 ac_have_decl=1
21194else
21195 ac_have_decl=0
c971b7fa 21196fi
c971b7fa 21197
8690e634 21198cat >>confdefs.h <<_ACEOF
6ec2e0f5 21199#define HAVE_DECL_MBSRTOWCS $ac_have_decl
c971b7fa 21200_ACEOF
c971b7fa 21201
6ec2e0f5
SDJ
21202 if test $ac_cv_have_decl_mbsrtowcs = yes; then
21203 REPLACE_MBSRTOWCS=1
8690e634
JK
21204 fi
21205 else
21206 if test $REPLACE_MBSTATE_T = 1; then
6ec2e0f5 21207 REPLACE_MBSRTOWCS=1
8690e634 21208 else
6ec2e0f5
SDJ
21209
21210
21211
21212
21213
21214
21215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
21216$as_echo_n "checking whether mbsrtowcs works... " >&6; }
d0ac1c44 21217if ${gl_cv_func_mbsrtowcs_works+:} false; then :
6ec2e0f5
SDJ
21218 $as_echo_n "(cached) " >&6
21219else
21220
21221 case "$host_os" in
21222 # Guess no on HP-UX, Solaris, mingw.
21223 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
21224 # Guess yes otherwise.
21225 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
21226 esac
21227 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
21228 if test "$cross_compiling" = yes; then :
21229 :
21230else
21231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21232/* end confdefs.h. */
21233
21234#include <locale.h>
21235#include <string.h>
21236/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21237 <wchar.h>.
21238 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21239 included before <wchar.h>. */
21240#include <stddef.h>
21241#include <stdio.h>
21242#include <time.h>
21243#include <wchar.h>
21244int main ()
21245{
21246 int result = 0;
21247 /* Test whether the function supports a NULL destination argument.
21248 This fails on native Windows. */
21249 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
21250 {
21251 const char input[] = "\337er";
21252 const char *src = input;
21253 mbstate_t state;
21254
21255 memset (&state, '\0', sizeof (mbstate_t));
21256 if (mbsrtowcs (NULL, &src, 1, &state) != 3
21257 || src != input)
21258 result |= 1;
21259 }
21260 /* Test whether the function works when started with a conversion state
21261 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
21262 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
21263 {
21264 const char input[] = "B\303\274\303\237er";
21265 mbstate_t state;
21266
21267 memset (&state, '\0', sizeof (mbstate_t));
21268 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
21269 if (!mbsinit (&state))
21270 {
21271 const char *src = input + 2;
21272 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
21273 result |= 2;
21274 }
21275 }
21276 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
21277 {
21278 const char input[] = "<\306\374\313\334\270\354>";
21279 mbstate_t state;
21280
21281 memset (&state, '\0', sizeof (mbstate_t));
21282 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
21283 if (!mbsinit (&state))
21284 {
21285 const char *src = input + 4;
21286 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
21287 result |= 4;
21288 }
21289 }
21290 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
21291 {
21292 const char input[] = "B\250\271\201\060\211\070er";
21293 mbstate_t state;
21294
21295 memset (&state, '\0', sizeof (mbstate_t));
21296 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
21297 if (!mbsinit (&state))
21298 {
21299 const char *src = input + 2;
21300 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
21301 result |= 8;
21302 }
21303 }
21304 return result;
21305}
21306_ACEOF
21307if ac_fn_c_try_run "$LINENO"; then :
21308 gl_cv_func_mbsrtowcs_works=yes
21309else
21310 gl_cv_func_mbsrtowcs_works=no
21311fi
21312rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21313 conftest.$ac_objext conftest.beam conftest.$ac_ext
21314fi
21315
21316 fi
21317
21318fi
21319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
21320$as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
21321
21322 case "$gl_cv_func_mbsrtowcs_works" in
21323 *yes) ;;
21324 *) REPLACE_MBSRTOWCS=1 ;;
8690e634
JK
21325 esac
21326 fi
21327 fi
c971b7fa 21328
6ec2e0f5 21329 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
c971b7fa
PA
21330
21331
21332
21333
21334
21335
21336
21337
6ec2e0f5
SDJ
21338 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
21339
21340
21341
21342
21343
21344
21345
21346
21347
21348 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
c971b7fa
PA
21349
21350
8690e634 21351 :
c971b7fa 21352
a512b375 21353 fi
c971b7fa 21354
c971b7fa 21355
c971b7fa 21356
c971b7fa
PA
21357
21358
6ec2e0f5 21359 GNULIB_MBSRTOWCS=1
c971b7fa 21360
c971b7fa
PA
21361
21362
21363
21364
6ec2e0f5 21365$as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
c971b7fa
PA
21366
21367
c971b7fa 21368
c971b7fa 21369
6ec2e0f5 21370 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
c971b7fa
PA
21371
21372
21373
c971b7fa 21374
c971b7fa
PA
21375
21376
21377
21378
6ec2e0f5 21379 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
8690e634 21380
c971b7fa 21381
6ec2e0f5
SDJ
21382 for ac_header in bp-sym.h
21383do :
21384 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
d0ac1c44 21385if test "x$ac_cv_header_bp_sym_h" = xyes; then :
6ec2e0f5
SDJ
21386 cat >>confdefs.h <<_ACEOF
21387#define HAVE_BP_SYM_H 1
21388_ACEOF
c971b7fa 21389
6ec2e0f5 21390fi
c971b7fa 21391
6ec2e0f5
SDJ
21392done
21393
21394
21395 fi
21396
21397
21398
21399
21400
21401 GNULIB_MEMCHR=1
21402
21403
21404
21405
21406
21407$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
21408
21409
21410
21411
21412
21413 if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
21414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
21415$as_echo_n "checking whether memmem works in linear time... " >&6; }
d0ac1c44 21416if ${gl_cv_func_memmem_works_fast+:} false; then :
8690e634
JK
21417 $as_echo_n "(cached) " >&6
21418else
6ec2e0f5
SDJ
21419 if test "$cross_compiling" = yes; then :
21420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21421/* end confdefs.h. */
21422
21423#include <features.h>
21424#ifdef __GNU_LIBRARY__
21425 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)) \
21426 && !defined __UCLIBC__
21427 Lucky user
21428 #endif
21429#endif
21430#ifdef __CYGWIN__
21431 #include <cygwin/version.h>
21432 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 0)
21433 Lucky user
21434 #endif
21435#endif
21436
21437_ACEOF
21438if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21439 $EGREP "Lucky user" >/dev/null 2>&1; then :
21440 gl_cv_func_memmem_works_fast="guessing yes"
21441else
21442 gl_cv_func_memmem_works_fast="guessing no"
21443fi
21444rm -f conftest*
21445
c971b7fa 21446
8690e634
JK
21447else
21448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 21449/* end confdefs.h. */
c971b7fa 21450
6ec2e0f5
SDJ
21451#include <signal.h> /* for signal */
21452#include <string.h> /* for memmem */
21453#include <stdlib.h> /* for malloc */
21454#include <unistd.h> /* for alarm */
21455static void quit (int sig) { _exit (sig + 128); }
21456
21457int
21458main ()
8690e634 21459{
8690e634 21460
6ec2e0f5
SDJ
21461 int result = 0;
21462 size_t m = 1000000;
21463 char *haystack = (char *) malloc (2 * m + 1);
21464 char *needle = (char *) malloc (m + 1);
21465 /* Failure to compile this test due to missing alarm is okay,
21466 since all such platforms (mingw) also lack memmem. */
21467 signal (SIGALRM, quit);
21468 alarm (5);
21469 /* Check for quadratic performance. */
21470 if (haystack && needle)
21471 {
21472 memset (haystack, 'A', 2 * m);
21473 haystack[2 * m] = 'B';
21474 memset (needle, 'A', m);
21475 needle[m] = 'B';
21476 if (!memmem (haystack, 2 * m + 1, needle, m + 1))
21477 result |= 1;
21478 }
21479 return result;
21480
21481 ;
c971b7fa
PA
21482 return 0;
21483}
21484_ACEOF
8690e634 21485if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 21486 gl_cv_func_memmem_works_fast=yes
8690e634 21487else
6ec2e0f5 21488 gl_cv_func_memmem_works_fast=no
8690e634
JK
21489fi
21490rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21491 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 21492fi
c971b7fa
PA
21493
21494
8690e634 21495fi
6ec2e0f5
SDJ
21496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_fast" >&5
21497$as_echo "$gl_cv_func_memmem_works_fast" >&6; }
21498 case "$gl_cv_func_memmem_works_fast" in
21499 *yes) ;;
21500 *)
21501 REPLACE_MEMMEM=1
21502 ;;
21503 esac
21504 fi
c971b7fa 21505
6ec2e0f5 21506 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
8690e634
JK
21507
21508
21509
6ec2e0f5
SDJ
21510
21511
21512
21513
21514
21515 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
21516
21517 fi
21518
21519
21520
21521
21522 for ac_func in memmem
21523do :
21524 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
d0ac1c44 21525if test "x$ac_cv_func_memmem" = xyes; then :
6ec2e0f5
SDJ
21526 cat >>confdefs.h <<_ACEOF
21527#define HAVE_MEMMEM 1
21528_ACEOF
21529
21530fi
21531done
21532
21533 if test $ac_cv_func_memmem = yes; then
21534 HAVE_MEMMEM=1
21535 else
21536 HAVE_MEMMEM=0
21537 fi
21538
472fa5ee
SM
21539 :
21540
21541
21542
21543
21544
6ec2e0f5
SDJ
21545 if test $ac_cv_have_decl_memmem = no; then
21546 HAVE_DECL_MEMMEM=0
21547 else
21548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
21549$as_echo_n "checking whether memmem works... " >&6; }
d0ac1c44 21550if ${gl_cv_func_memmem_works_always+:} false; then :
c971b7fa
PA
21551 $as_echo_n "(cached) " >&6
21552else
6ec2e0f5
SDJ
21553 if test "$cross_compiling" = yes; then :
21554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21555/* end confdefs.h. */
21556
21557#ifdef __GNU_LIBRARY__
21558 #include <features.h>
21559 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
21560 || __GLIBC_MINOR__ > 12)) \
21561 || (__GLIBC__ > 2)) \
21562 || defined __UCLIBC__
21563 Lucky user
21564 #endif
21565#elif defined __CYGWIN__
21566 #include <cygwin/version.h>
21567 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
21568 Lucky user
21569 #endif
21570#else
21571 Lucky user
21572#endif
21573
21574_ACEOF
21575if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21576 $EGREP "Lucky user" >/dev/null 2>&1; then :
21577 gl_cv_func_memmem_works_always="guessing yes"
21578else
21579 gl_cv_func_memmem_works_always="guessing no"
21580fi
21581rm -f conftest*
21582
8690e634 21583
8690e634 21584else
c971b7fa
PA
21585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21586/* end confdefs.h. */
c971b7fa 21587
6ec2e0f5
SDJ
21588#include <string.h> /* for memmem */
21589#define P "_EF_BF_BD"
21590#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
21591#define NEEDLE P P P P P
21592
21593int
21594main ()
c971b7fa 21595{
8690e634 21596
6ec2e0f5
SDJ
21597 int result = 0;
21598 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
21599 result |= 1;
21600 /* Check for empty needle behavior. */
21601 {
21602 const char *haystack = "AAA";
21603 if (memmem (haystack, 3, NULL, 0) != haystack)
21604 result |= 2;
8690e634 21605 }
6ec2e0f5
SDJ
21606 return result;
21607
21608 ;
c971b7fa
PA
21609 return 0;
21610}
21611_ACEOF
8690e634 21612if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 21613 gl_cv_func_memmem_works_always=yes
c971b7fa 21614else
6ec2e0f5 21615 gl_cv_func_memmem_works_always=no
c971b7fa 21616fi
8690e634
JK
21617rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21618 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 21619fi
8690e634 21620
8690e634
JK
21621
21622fi
6ec2e0f5
SDJ
21623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
21624$as_echo "$gl_cv_func_memmem_works_always" >&6; }
21625 case "$gl_cv_func_memmem_works_always" in
8690e634 21626 *yes) ;;
6ec2e0f5
SDJ
21627 *)
21628 REPLACE_MEMMEM=1
21629 ;;
8690e634 21630 esac
c971b7fa 21631 fi
6ec2e0f5 21632 :
c971b7fa 21633
6ec2e0f5 21634 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
c971b7fa 21635
c971b7fa 21636
8690e634 21637
c971b7fa 21638
6ec2e0f5
SDJ
21639
21640
21641
21642
21643 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
21644
21645 fi
21646
21647
21648
21649
21650
21651 GNULIB_MEMMEM=1
21652
21653
21654
21655
21656
21657$as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
21658
21659
21660
21661
21662
21663
21664
21665
21666
21667 for ac_func in mempcpy
21668do :
21669 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
d0ac1c44 21670if test "x$ac_cv_func_mempcpy" = xyes; then :
6ec2e0f5
SDJ
21671 cat >>confdefs.h <<_ACEOF
21672#define HAVE_MEMPCPY 1
8690e634 21673_ACEOF
c971b7fa 21674
6ec2e0f5
SDJ
21675fi
21676done
c971b7fa 21677
6ec2e0f5
SDJ
21678 if test $ac_cv_func_mempcpy = no; then
21679 HAVE_MEMPCPY=0
21680 fi
8690e634 21681
6ec2e0f5 21682 if test $HAVE_MEMPCPY = 0; then
8690e634
JK
21683
21684
21685
21686
8690e634 21687
6ec2e0f5
SDJ
21688
21689
21690
21691 gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
21692
21693
8690e634 21694 :
c971b7fa 21695
6ec2e0f5 21696 fi
c971b7fa 21697
8690e634 21698
8690e634 21699
8690e634 21700
6ec2e0f5
SDJ
21701
21702 GNULIB_MEMPCPY=1
21703
21704
21705
21706
21707
21708$as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
21709
21710
21711
21712
21713
21714
21715
21716
472fa5ee
SM
21717 :
21718
21719
21720
21721
21722
6ec2e0f5
SDJ
21723 if test $ac_cv_have_decl_memrchr = no; then
21724 HAVE_DECL_MEMRCHR=0
21725 fi
21726
21727 for ac_func in memrchr
21728do :
21729 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
d0ac1c44 21730if test "x$ac_cv_func_memrchr" = xyes; then :
6ec2e0f5
SDJ
21731 cat >>confdefs.h <<_ACEOF
21732#define HAVE_MEMRCHR 1
c971b7fa 21733_ACEOF
6ec2e0f5 21734
c971b7fa 21735fi
6ec2e0f5 21736done
8690e634 21737
8690e634 21738
6ec2e0f5 21739 if test $ac_cv_func_memrchr = no; then
8690e634 21740
6ec2e0f5
SDJ
21741
21742
21743
21744
21745
21746
21747
21748 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
21749
21750 :
c971b7fa
PA
21751 fi
21752
21753
c971b7fa 21754
c971b7fa 21755
c971b7fa 21756
6ec2e0f5
SDJ
21757 GNULIB_MEMRCHR=1
21758
21759
21760
21761
21762
21763$as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
21764
21765
21766
21767
2d8adcbd 21768
8a99096f
SM
21769 :
21770
21771
21772
21773
21774
21775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
21776$as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
21777if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then :
21778 $as_echo_n "(cached) " >&6
21779else
21780 rm -rf conftest.dir
21781 if test "$cross_compiling" = yes; then :
21782 case "$host_os" in
5e8754f9
SDJ
21783 # Guess yes on glibc systems.
21784 *-gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
21785 # If we don't know, assume the worst.
21786 *) gl_cv_func_mkdir_trailing_slash_works="guessing no" ;;
8a99096f
SM
21787 esac
21788
21789else
21790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21791/* end confdefs.h. */
21792
21793# include <sys/types.h>
21794# include <sys/stat.h>
21795
21796int
21797main ()
21798{
21799return mkdir ("conftest.dir/", 0700);
21800 ;
21801 return 0;
21802}
21803_ACEOF
21804if ac_fn_c_try_run "$LINENO"; then :
21805 gl_cv_func_mkdir_trailing_slash_works=yes
21806else
21807 gl_cv_func_mkdir_trailing_slash_works=no
21808fi
21809rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21810 conftest.$ac_objext conftest.beam conftest.$ac_ext
21811fi
21812
21813 rm -rf conftest.dir
21814
21815
21816fi
21817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
21818$as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
21819 case "$gl_cv_func_mkdir_trailing_slash_works" in
21820 *yes) ;;
21821 *)
21822 REPLACE_MKDIR=1
21823 ;;
21824 esac
21825
21826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
21827$as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
21828if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then :
21829 $as_echo_n "(cached) " >&6
21830else
21831 rm -rf conftest.dir
21832 if test "$cross_compiling" = yes; then :
21833 case "$host_os" in
5e8754f9
SDJ
21834 # Guess yes on glibc systems.
21835 *-gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
21836 # If we don't know, assume the worst.
21837 *) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
8a99096f
SM
21838 esac
21839
21840else
21841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21842/* end confdefs.h. */
21843
21844# include <sys/types.h>
21845# include <sys/stat.h>
21846
21847int
21848main ()
21849{
21850return !mkdir ("conftest.dir/./", 0700);
21851 ;
21852 return 0;
21853}
21854_ACEOF
21855if ac_fn_c_try_run "$LINENO"; then :
21856 gl_cv_func_mkdir_trailing_dot_works=yes
21857else
21858 gl_cv_func_mkdir_trailing_dot_works=no
21859fi
21860rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21861 conftest.$ac_objext conftest.beam conftest.$ac_ext
21862fi
21863
21864 rm -rf conftest.dir
21865
21866
21867fi
21868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
21869$as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
21870 case "$gl_cv_func_mkdir_trailing_dot_works" in
21871 *yes) ;;
21872 *)
21873 REPLACE_MKDIR=1
21874
21875$as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
21876
21877 ;;
21878 esac
21879
21880 if test $REPLACE_MKDIR = 1; then
21881
21882
21883
21884
21885
21886
21887
21888
21889 gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
21890
21891 fi
21892
21893
2d8adcbd
MM
21894
21895
b3279b60
TT
21896
21897
472fa5ee
SM
21898 :
21899
21900
21901
21902
21903
b3279b60
TT
21904 if test $ac_cv_func_mkostemp != yes; then
21905 HAVE_MKOSTEMP=0
21906 fi
2d8adcbd 21907
b3279b60 21908 if test $HAVE_MKOSTEMP = 0; then
2d8adcbd 21909
2d8adcbd 21910
2d8adcbd 21911
2d8adcbd 21912
2d8adcbd
MM
21913
21914
21915
21916
b3279b60 21917 gl_LIBOBJS="$gl_LIBOBJS mkostemp.$ac_objext"
2d8adcbd
MM
21918
21919
21920
b3279b60 21921 fi
2d8adcbd 21922
2d8adcbd 21923
b3279b60
TT
21924cat >>confdefs.h <<_ACEOF
21925#define GNULIB_MKOSTEMP 1
21926_ACEOF
2d8adcbd
MM
21927
21928
2d8adcbd
MM
21929
21930
21931
21932
21933
b3279b60 21934 GNULIB_MKOSTEMP=1
2d8adcbd
MM
21935
21936
21937
21938
21939
b3279b60 21940$as_echo "#define GNULIB_TEST_MKOSTEMP 1" >>confdefs.h
2d8adcbd
MM
21941
21942
21943
21944
6ec2e0f5
SDJ
21945 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
21946
21947
21948
c971b7fa 21949
c971b7fa 21950
c971b7fa
PA
21951
21952
8690e634 21953
6ec2e0f5 21954 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
8690e634 21955
6ec2e0f5 21956 fi
8690e634 21957
6ec2e0f5 21958 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
8690e634
JK
21959
21960
21961
21962
21963
21964
8690e634
JK
21965
21966
6ec2e0f5 21967 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
8690e634 21968
a512b375 21969 fi
8690e634
JK
21970
21971
725e2999
JB
21972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
21973$as_echo_n "checking whether <netinet/in.h> is self-contained... " >&6; }
21974if ${gl_cv_header_netinet_in_h_selfcontained+:} false; then :
21975 $as_echo_n "(cached) " >&6
21976else
21977
21978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21979/* end confdefs.h. */
21980#include <netinet/in.h>
21981int
21982main ()
21983{
21984
21985 ;
21986 return 0;
21987}
21988_ACEOF
21989if ac_fn_c_try_compile "$LINENO"; then :
21990 gl_cv_header_netinet_in_h_selfcontained=yes
21991else
21992 gl_cv_header_netinet_in_h_selfcontained=no
21993fi
21994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21995
21996fi
21997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
21998$as_echo "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
21999 if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
22000 NETINET_IN_H=''
22001 else
22002 NETINET_IN_H='netinet/in.h'
22003 for ac_header in netinet/in.h
22004do :
22005 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
22006if test "x$ac_cv_header_netinet_in_h" = xyes; then :
22007 cat >>confdefs.h <<_ACEOF
22008#define HAVE_NETINET_IN_H 1
22009_ACEOF
22010
22011fi
22012
22013done
22014
22015
22016
22017
22018
22019
22020
22021 :
22022
22023
22024
22025
22026
22027
22028
22029
22030 if test $gl_cv_have_include_next = yes; then
22031 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
22032 else
22033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
22034$as_echo_n "checking absolute name of <netinet/in.h>... " >&6; }
22035if ${gl_cv_next_netinet_in_h+:} false; then :
22036 $as_echo_n "(cached) " >&6
22037else
22038
22039 if test $ac_cv_header_netinet_in_h = yes; then
22040
22041
22042
22043
22044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22045/* end confdefs.h. */
22046#include <netinet/in.h>
22047_ACEOF
22048 case "$host_os" in
22049 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22050 *) gl_absname_cpp="$ac_cpp" ;;
22051 esac
22052
22053 case "$host_os" in
22054 mingw*)
22055 gl_dirsep_regex='[/\\]'
22056 ;;
22057 *)
22058 gl_dirsep_regex='\/'
22059 ;;
22060 esac
22061 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22062 gl_header_literal_regex=`echo 'netinet/in.h' \
22063 | sed -e "$gl_make_literal_regex_sed"`
22064 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22065 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22066 s|^/[^/]|//&|
22067 p
22068 q
22069 }'
22070
22071 gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22072 sed -n "$gl_absolute_header_sed"`
22073
22074 gl_header=$gl_cv_absolute_netinet_in_h
22075 gl_cv_next_netinet_in_h='"'$gl_header'"'
22076 else
22077 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
22078 fi
22079
22080
22081fi
22082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
22083$as_echo "$gl_cv_next_netinet_in_h" >&6; }
22084 fi
22085 NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
22086
22087 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22088 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22089 gl_next_as_first_directive='<'netinet/in.h'>'
22090 else
22091 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22092 gl_next_as_first_directive=$gl_cv_next_netinet_in_h
22093 fi
22094 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
22095
22096
22097
22098
22099 if test $ac_cv_header_netinet_in_h = yes; then
22100 HAVE_NETINET_IN_H=1
22101 else
22102 HAVE_NETINET_IN_H=0
22103 fi
22104
22105 fi
22106
22107 if test -n "$NETINET_IN_H"; then
22108 GL_GENERATE_NETINET_IN_H_TRUE=
22109 GL_GENERATE_NETINET_IN_H_FALSE='#'
22110else
22111 GL_GENERATE_NETINET_IN_H_TRUE='#'
22112 GL_GENERATE_NETINET_IN_H_FALSE=
22113fi
22114
22115
22116
22117
8690e634 22118
6ec2e0f5
SDJ
22119 case "$host_os" in
22120 mingw* | pw*)
22121 REPLACE_OPEN=1
22122 ;;
22123 *)
22124
472fa5ee
SM
22125 :
22126
22127
22128
22129
22130
6ec2e0f5
SDJ
22131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
22132$as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
d0ac1c44 22133if ${gl_cv_func_open_slash+:} false; then :
6ec2e0f5
SDJ
22134 $as_echo_n "(cached) " >&6
22135else
22136 # Assume that if we have lstat, we can also check symlinks.
22137 if test $ac_cv_func_lstat = yes; then
22138 touch conftest.tmp
22139 ln -s conftest.tmp conftest.lnk
22140 fi
22141 if test "$cross_compiling" = yes; then :
8690e634 22142
6ec2e0f5
SDJ
22143 case "$host_os" in
22144 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
22145 gl_cv_func_open_slash="guessing no" ;;
22146 *)
22147 gl_cv_func_open_slash="guessing yes" ;;
22148 esac
8690e634 22149
6ec2e0f5
SDJ
22150else
22151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22152/* end confdefs.h. */
22153
22154#include <fcntl.h>
22155#if HAVE_UNISTD_H
22156# include <unistd.h>
22157#endif
22158int main ()
22159{
22160 int result = 0;
22161#if HAVE_LSTAT
22162 if (open ("conftest.lnk/", O_RDONLY) != -1)
22163 result |= 1;
22164#endif
22165 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
22166 result |= 2;
22167 return result;
22168}
22169_ACEOF
22170if ac_fn_c_try_run "$LINENO"; then :
22171 gl_cv_func_open_slash=yes
22172else
22173 gl_cv_func_open_slash=no
22174fi
22175rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22176 conftest.$ac_objext conftest.beam conftest.$ac_ext
22177fi
8690e634 22178
6ec2e0f5 22179 rm -f conftest.sl conftest.tmp conftest.lnk
8690e634 22180
6ec2e0f5
SDJ
22181fi
22182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
22183$as_echo "$gl_cv_func_open_slash" >&6; }
22184 case "$gl_cv_func_open_slash" in
22185 *no)
8690e634 22186
6ec2e0f5 22187$as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
8690e634 22188
6ec2e0f5
SDJ
22189 REPLACE_OPEN=1
22190 ;;
22191 esac
22192 ;;
22193 esac
8690e634 22194
6ec2e0f5 22195 if test $REPLACE_OPEN = 0; then
c971b7fa
PA
22196
22197
22198
472fa5ee
SM
22199 :
22200
22201
22202
22203
22204
6ec2e0f5
SDJ
22205 if test $ac_cv_func_fchdir = no; then
22206 HAVE_FCHDIR=0
22207 fi
c971b7fa 22208
6ec2e0f5
SDJ
22209 if test $HAVE_FCHDIR = 0; then
22210 REPLACE_OPEN=1
22211 fi
22212 fi
c971b7fa
PA
22213
22214
22215
6ec2e0f5 22216 if test $REPLACE_OPEN = 1; then
c971b7fa
PA
22217
22218
22219
22220
22221
c971b7fa
PA
22222
22223
c971b7fa 22224
6ec2e0f5 22225 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
c971b7fa 22226
c971b7fa
PA
22227
22228
6ec2e0f5
SDJ
22229 :
22230
a512b375 22231 fi
c971b7fa
PA
22232
22233
22234
22235
22236
6ec2e0f5 22237 GNULIB_OPEN=1
c971b7fa
PA
22238
22239
22240
22241
22242
6ec2e0f5 22243$as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
c971b7fa
PA
22244
22245
22246
22247
22248
c971b7fa 22249
c971b7fa 22250
472fa5ee
SM
22251 :
22252
22253
22254
22255
22256
63ce7108 22257
5e8754f9
SDJ
22258 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
22259 yes+*yes)
6ec2e0f5
SDJ
22260 ;;
22261 yes+*)
22262 # Solaris 9 has *at functions, but uniformly mishandles trailing
22263 # slash in all of them.
22264 REPLACE_OPENAT=1
22265 ;;
22266 *)
22267 HAVE_OPENAT=0
22268 ;;
22269 esac
63ce7108 22270
6ec2e0f5 22271 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
63ce7108 22272
63ce7108 22273
63ce7108 22274
63ce7108 22275
63ce7108
TT
22276
22277
63ce7108 22278
63ce7108 22279
6ec2e0f5 22280 gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
63ce7108
TT
22281
22282
22283
6ec2e0f5 22284 :
63ce7108 22285
6ec2e0f5 22286 fi
63ce7108
TT
22287
22288
6ec2e0f5
SDJ
22289cat >>confdefs.h <<_ACEOF
22290#define GNULIB_OPENAT 1
22291_ACEOF
63ce7108 22292
63ce7108 22293
63ce7108
TT
22294
22295
22296
22297
6ec2e0f5 22298 GNULIB_OPENAT=1
63ce7108 22299
63ce7108 22300
63ce7108 22301
63ce7108 22302
63ce7108 22303
6ec2e0f5 22304$as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
63ce7108
TT
22305
22306
63ce7108 22307
63ce7108 22308
63ce7108 22309
63ce7108 22310
6ec2e0f5
SDJ
22311 for ac_func in opendir
22312do :
22313 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
d0ac1c44 22314if test "x$ac_cv_func_opendir" = xyes; then :
6ec2e0f5
SDJ
22315 cat >>confdefs.h <<_ACEOF
22316#define HAVE_OPENDIR 1
63ce7108 22317_ACEOF
6ec2e0f5 22318
63ce7108 22319fi
6ec2e0f5 22320done
63ce7108 22321
6ec2e0f5
SDJ
22322 if test $ac_cv_func_opendir = no; then
22323 HAVE_OPENDIR=0
22324 fi
63ce7108 22325
6ec2e0f5
SDJ
22326
22327
22328
472fa5ee
SM
22329 :
22330
22331
22332
22333
22334
6ec2e0f5
SDJ
22335 if test $ac_cv_func_fchdir = no; then
22336 HAVE_FCHDIR=0
63ce7108 22337 fi
63ce7108 22338
6ec2e0f5
SDJ
22339 if test $HAVE_FCHDIR = 0; then
22340 if test $HAVE_OPENDIR = 1; then
22341 REPLACE_OPENDIR=1
22342 fi
22343 fi
22344
22345 case $host_os,$HAVE_OPENDIR in
22346 os2*,1)
22347 REPLACE_OPENDIR=1;;
22348 esac
22349
22350 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
63ce7108
TT
22351
22352
22353
22354
22355
22356
22357
22358
6ec2e0f5 22359 gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
63ce7108
TT
22360
22361 fi
22362
22363
22364
22365
22366
6ec2e0f5 22367 GNULIB_OPENDIR=1
63ce7108
TT
22368
22369
22370
22371
63ce7108 22372
6ec2e0f5 22373$as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
63ce7108
TT
22374
22375
22376
22377
22378
472fa5ee
SM
22379 :
22380
22381
22382
22383
22384
63ce7108
TT
22385
22386
2196f55f
YQ
22387
22388
8424cc97
SM
22389
22390 for ac_func in rawmemchr
22391do :
22392 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
d0ac1c44 22393if test "x$ac_cv_func_rawmemchr" = xyes; then :
8424cc97
SM
22394 cat >>confdefs.h <<_ACEOF
22395#define HAVE_RAWMEMCHR 1
22396_ACEOF
22397
22398fi
22399done
22400
22401 if test $ac_cv_func_rawmemchr = no; then
22402 HAVE_RAWMEMCHR=0
22403 fi
22404
22405 if test $HAVE_RAWMEMCHR = 0; then
22406
22407
22408
22409
22410
22411
22412
22413
22414 gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
22415
22416 :
22417 fi
22418
22419
22420
22421
22422
22423 GNULIB_RAWMEMCHR=1
22424
22425
22426
22427
22428
22429$as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
22430
22431
22432
22433
22434
22435
6ec2e0f5
SDJ
22436 for ac_func in readdir
22437do :
22438 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
d0ac1c44 22439if test "x$ac_cv_func_readdir" = xyes; then :
6ec2e0f5
SDJ
22440 cat >>confdefs.h <<_ACEOF
22441#define HAVE_READDIR 1
22442_ACEOF
22443
22444fi
22445done
22446
22447 if test $ac_cv_func_readdir = no; then
22448 HAVE_READDIR=0
22449 fi
22450
22451 if test $HAVE_READDIR = 0; then
22452
22453
22454
22455
22456
22457
22458
22459
22460 gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
22461
22462 fi
22463
22464
22465
22466
22467
22468 GNULIB_READDIR=1
22469
22470
22471
22472
22473
22474$as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
22475
22476
22477
22478
22479
22480
472fa5ee
SM
22481 :
22482
22483
22484
22485
22486
2196f55f
YQ
22487 if test $ac_cv_func_readlink = no; then
22488 HAVE_READLINK=0
22489 else
22490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
22491$as_echo_n "checking whether readlink signature is correct... " >&6; }
d0ac1c44 22492if ${gl_cv_decl_readlink_works+:} false; then :
2196f55f
YQ
22493 $as_echo_n "(cached) " >&6
22494else
22495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22496/* end confdefs.h. */
22497#include <unistd.h>
22498 /* Cause compilation failure if original declaration has wrong type. */
22499 ssize_t readlink (const char *, char *, size_t);
22500int
22501main ()
22502{
22503
22504 ;
22505 return 0;
22506}
22507_ACEOF
22508if ac_fn_c_try_compile "$LINENO"; then :
22509 gl_cv_decl_readlink_works=yes
22510else
22511 gl_cv_decl_readlink_works=no
22512fi
22513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22514fi
22515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
22516$as_echo "$gl_cv_decl_readlink_works" >&6; }
22517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
22518$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
d0ac1c44 22519if ${gl_cv_func_readlink_works+:} false; then :
2196f55f
YQ
22520 $as_echo_n "(cached) " >&6
22521else
22522 # We have readlink, so assume ln -s works.
22523 ln -s conftest.no-such conftest.link
22524 ln -s conftest.link conftest.lnk2
22525 if test "$cross_compiling" = yes; then :
22526 case "$host_os" in
5e8754f9
SDJ
22527 # Guess yes on glibc systems.
22528 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
22529 # If we don't know, assume the worst.
22530 *) gl_cv_func_readlink_works="guessing no" ;;
2196f55f
YQ
22531 esac
22532
22533else
22534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22535/* end confdefs.h. */
22536#include <unistd.h>
22537
22538int
22539main ()
22540{
22541char buf[20];
22542 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
22543 ;
22544 return 0;
22545}
22546_ACEOF
22547if ac_fn_c_try_run "$LINENO"; then :
22548 gl_cv_func_readlink_works=yes
22549else
22550 gl_cv_func_readlink_works=no
22551fi
22552rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22553 conftest.$ac_objext conftest.beam conftest.$ac_ext
22554fi
22555
22556 rm -f conftest.link conftest.lnk2
22557fi
22558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
22559$as_echo "$gl_cv_func_readlink_works" >&6; }
22560 case "$gl_cv_func_readlink_works" in
22561 *yes)
22562 if test "$gl_cv_decl_readlink_works" != yes; then
22563 REPLACE_READLINK=1
22564 fi
22565 ;;
22566 *)
22567
22568$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
22569
22570 REPLACE_READLINK=1
22571 ;;
22572 esac
22573 fi
22574
22575 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
22576
22577
22578
22579
22580
22581
22582
22583
22584 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
22585
22586
22587 :
22588
22589 fi
22590
22591
22592
22593
22594
22595 GNULIB_READLINK=1
22596
22597
22598
22599
22600
22601$as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
22602
22603
22604
22605
6a29c58e
YQ
22606
22607
6ec2e0f5
SDJ
22608 if test $gl_cv_func_malloc_posix = yes; then
22609
22610$as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
22611
22612 else
22613 REPLACE_REALLOC=1
22614 fi
22615
22616 if test $REPLACE_REALLOC = 1; then
22617
22618
22619
22620
22621
22622
22623
22624
22625 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
22626
22627 fi
22628
22629
22630
22631
22632
22633 GNULIB_REALLOC_POSIX=1
22634
22635
22636
22637
22638
22639$as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
22640
22641
22642
22643
22644
22645
6a29c58e 22646
472fa5ee
SM
22647 :
22648
22649
22650
22651
22652
6a29c58e
YQ
22653
22654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
22655$as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
d0ac1c44 22656if ${gl_cv_func_rename_slash_dst_works+:} false; then :
6a29c58e
YQ
22657 $as_echo_n "(cached) " >&6
22658else
22659 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
22660 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
d0ac1c44 22661 as_fn_error $? "cannot create temporary files" "$LINENO" 5
6a29c58e
YQ
22662 # Assume that if we have lstat, we can also check symlinks.
22663 if test $ac_cv_func_lstat = yes; then
22664 ln -s conftest.f conftest.lnk
22665 fi
22666 if test "$cross_compiling" = yes; then :
22667 case "$host_os" in
5e8754f9
SDJ
22668 # Guess yes on glibc systems.
22669 *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
22670 # If we don't know, assume the worst.
22671 *) gl_cv_func_rename_slash_dst_works="guessing no" ;;
6a29c58e
YQ
22672 esac
22673
22674else
22675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22676/* end confdefs.h. */
22677
22678# include <stdio.h>
22679# include <stdlib.h>
22680
22681int
22682main ()
22683{
22684int result = 0;
22685 if (rename ("conftest.f1", "conftest.f2/") == 0)
22686 result |= 1;
22687 if (rename ("conftest.d1", "conftest.d2/") != 0)
22688 result |= 2;
22689#if HAVE_LSTAT
22690 if (rename ("conftest.f", "conftest.lnk/") == 0)
22691 result |= 4;
22692#endif
22693 return result;
22694
22695 ;
22696 return 0;
22697}
22698_ACEOF
22699if ac_fn_c_try_run "$LINENO"; then :
22700 gl_cv_func_rename_slash_dst_works=yes
22701else
22702 gl_cv_func_rename_slash_dst_works=no
22703fi
22704rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22705 conftest.$ac_objext conftest.beam conftest.$ac_ext
22706fi
22707
22708 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
22709
22710fi
22711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
22712$as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
22713 case "$gl_cv_func_rename_slash_dst_works" in
22714 *yes) ;;
22715 *)
22716 REPLACE_RENAME=1
22717
22718$as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
22719
22720 ;;
22721 esac
22722
22723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
22724$as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
d0ac1c44 22725if ${gl_cv_func_rename_slash_src_works+:} false; then :
6a29c58e
YQ
22726 $as_echo_n "(cached) " >&6
22727else
22728 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
22729 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
d0ac1c44 22730 as_fn_error $? "cannot create temporary files" "$LINENO" 5
6a29c58e
YQ
22731 # Assume that if we have lstat, we can also check symlinks.
22732 if test $ac_cv_func_lstat = yes; then
22733 ln -s conftest.f conftest.lnk
22734 fi
22735 if test "$cross_compiling" = yes; then :
22736 case "$host_os" in
5e8754f9
SDJ
22737 # Guess yes on glibc systems.
22738 *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
22739 # If we don't know, assume the worst.
22740 *) gl_cv_func_rename_slash_src_works="guessing no" ;;
6a29c58e
YQ
22741 esac
22742
22743else
22744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22745/* end confdefs.h. */
22746
22747# include <stdio.h>
22748# include <stdlib.h>
22749
22750int
22751main ()
22752{
22753int result = 0;
22754 if (rename ("conftest.f1/", "conftest.d3") == 0)
22755 result |= 1;
22756 if (rename ("conftest.d1/", "conftest.d2") != 0)
22757 result |= 2;
22758#if HAVE_LSTAT
22759 if (rename ("conftest.lnk/", "conftest.f") == 0)
22760 result |= 4;
22761#endif
22762 return result;
22763
22764 ;
22765 return 0;
22766}
22767_ACEOF
22768if ac_fn_c_try_run "$LINENO"; then :
22769 gl_cv_func_rename_slash_src_works=yes
22770else
22771 gl_cv_func_rename_slash_src_works=no
22772fi
22773rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22774 conftest.$ac_objext conftest.beam conftest.$ac_ext
22775fi
22776
22777 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
22778
22779fi
22780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
22781$as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
22782 case "$gl_cv_func_rename_slash_src_works" in
22783 *yes) ;;
22784 *)
22785 REPLACE_RENAME=1
22786
22787$as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
22788
22789 ;;
22790 esac
22791
22792
472fa5ee
SM
22793 :
22794
22795
22796
22797
22798
6a29c58e
YQ
22799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
22800$as_echo_n "checking whether rename manages hard links correctly... " >&6; }
d0ac1c44 22801if ${gl_cv_func_rename_link_works+:} false; then :
6a29c58e
YQ
22802 $as_echo_n "(cached) " >&6
22803else
22804 if test $ac_cv_func_link = yes; then
5e8754f9
SDJ
22805 rm -rf conftest.f conftest.f1
22806 if touch conftest.f && ln conftest.f conftest.f1 &&
6a29c58e
YQ
22807 set x `ls -i conftest.f conftest.f1` && test "" = ""; then
22808 if test "$cross_compiling" = yes; then :
22809 case "$host_os" in
5e8754f9
SDJ
22810 # Guess yes on glibc systems.
22811 *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
22812 # If we don't know, assume the worst.
22813 *) gl_cv_func_rename_link_works="guessing no" ;;
6a29c58e
YQ
22814 esac
22815
22816else
22817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22818/* end confdefs.h. */
22819
22820# include <stdio.h>
22821# include <stdlib.h>
22822# include <unistd.h>
22823
22824int
22825main ()
22826{
22827int result = 0;
22828 if (rename ("conftest.f", "conftest.f1"))
22829 result |= 1;
22830 if (unlink ("conftest.f1"))
22831 result |= 2;
5e8754f9 22832 if (rename ("conftest.f", "conftest.f"))
6a29c58e
YQ
22833 result |= 4;
22834 if (rename ("conftest.f1", "conftest.f1") == 0)
22835 result |= 8;
22836 return result;
22837
22838 ;
22839 return 0;
22840}
22841_ACEOF
22842if ac_fn_c_try_run "$LINENO"; then :
22843 gl_cv_func_rename_link_works=yes
22844else
22845 gl_cv_func_rename_link_works=no
22846fi
22847rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22848 conftest.$ac_objext conftest.beam conftest.$ac_ext
22849fi
22850
22851 else
22852 gl_cv_func_rename_link_works="guessing no"
22853 fi
5e8754f9 22854 rm -rf conftest.f conftest.f1
6a29c58e
YQ
22855 else
22856 gl_cv_func_rename_link_works=yes
22857 fi
22858
22859fi
22860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
22861$as_echo "$gl_cv_func_rename_link_works" >&6; }
22862 case "$gl_cv_func_rename_link_works" in
22863 *yes) ;;
22864 *)
22865 REPLACE_RENAME=1
22866
22867$as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
22868
22869 ;;
22870 esac
22871
22872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
22873$as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
d0ac1c44 22874if ${gl_cv_func_rename_dest_works+:} false; then :
6a29c58e
YQ
22875 $as_echo_n "(cached) " >&6
22876else
22877 rm -rf conftest.f conftest.d1 conftest.d2
22878 touch conftest.f && mkdir conftest.d1 conftest.d2 ||
d0ac1c44 22879 as_fn_error $? "cannot create temporary files" "$LINENO" 5
6a29c58e
YQ
22880 if test "$cross_compiling" = yes; then :
22881 case "$host_os" in
5e8754f9
SDJ
22882 # Guess yes on glibc systems.
22883 *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
22884 # If we don't know, assume the worst.
22885 *) gl_cv_func_rename_dest_works="guessing no" ;;
6a29c58e
YQ
22886 esac
22887
22888else
22889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22890/* end confdefs.h. */
22891
22892# include <stdio.h>
22893# include <stdlib.h>
22894
22895int
22896main ()
22897{
22898int result = 0;
22899 if (rename ("conftest.d1", "conftest.d2") != 0)
22900 result |= 1;
22901 if (rename ("conftest.d2", "conftest.f") == 0)
22902 result |= 2;
22903 return result;
22904
22905 ;
22906 return 0;
22907}
22908_ACEOF
22909if ac_fn_c_try_run "$LINENO"; then :
22910 gl_cv_func_rename_dest_works=yes
22911else
22912 gl_cv_func_rename_dest_works=no
22913fi
22914rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22915 conftest.$ac_objext conftest.beam conftest.$ac_ext
22916fi
22917
22918 rm -rf conftest.f conftest.d1 conftest.d2
22919
22920fi
22921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
22922$as_echo "$gl_cv_func_rename_dest_works" >&6; }
22923 case "$gl_cv_func_rename_dest_works" in
22924 *yes) ;;
22925 *)
22926 REPLACE_RENAME=1
22927
22928$as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
22929
22930 ;;
22931 esac
22932
22933 if test $REPLACE_RENAME = 1; then
22934
22935
22936
22937
22938
22939
22940
22941
22942 gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
22943
22944 fi
22945
22946
22947
22948
22949
22950 GNULIB_RENAME=1
22951
22952
22953
22954
22955
22956$as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
22957
22958
22959
22960
22961
22962
6ec2e0f5
SDJ
22963 for ac_func in rewinddir
22964do :
22965 ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
d0ac1c44 22966if test "x$ac_cv_func_rewinddir" = xyes; then :
6ec2e0f5
SDJ
22967 cat >>confdefs.h <<_ACEOF
22968#define HAVE_REWINDDIR 1
22969_ACEOF
22970
22971fi
22972done
22973
22974 if test $ac_cv_func_rewinddir = no; then
22975 HAVE_REWINDDIR=0
22976 fi
22977
22978 if test $HAVE_REWINDDIR = 0; then
22979
22980
22981
22982
22983
22984
22985
22986
22987 gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
22988
22989 fi
22990
22991
22992
22993
22994
22995 GNULIB_REWINDDIR=1
22996
22997
22998
22999
23000
23001$as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
23002
23003
23004
23005
23006
23007
472fa5ee
SM
23008 :
23009
23010
23011
23012
23013
6a29c58e
YQ
23014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
23015$as_echo_n "checking whether rmdir works... " >&6; }
d0ac1c44 23016if ${gl_cv_func_rmdir_works+:} false; then :
6a29c58e
YQ
23017 $as_echo_n "(cached) " >&6
23018else
23019 mkdir conftest.dir
23020 touch conftest.file
23021 if test "$cross_compiling" = yes; then :
23022 case "$host_os" in
5e8754f9
SDJ
23023 # Guess yes on glibc systems.
23024 *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
23025 # If we don't know, assume the worst.
23026 *) gl_cv_func_rmdir_works="guessing no" ;;
6a29c58e
YQ
23027 esac
23028
23029else
23030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23031/* end confdefs.h. */
23032#include <stdio.h>
23033 #include <errno.h>
23034 #if HAVE_UNISTD_H
23035 # include <unistd.h>
23036 #else /* on Windows with MSVC */
23037 # include <direct.h>
23038 #endif
23039
23040int
23041main ()
23042{
23043int result = 0;
23044 if (!rmdir ("conftest.file/"))
23045 result |= 1;
23046 else if (errno != ENOTDIR)
23047 result |= 2;
23048 if (!rmdir ("conftest.dir/./"))
23049 result |= 4;
23050 return result;
23051
23052 ;
23053 return 0;
23054}
23055_ACEOF
23056if ac_fn_c_try_run "$LINENO"; then :
23057 gl_cv_func_rmdir_works=yes
23058else
23059 gl_cv_func_rmdir_works=no
23060fi
23061rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23062 conftest.$ac_objext conftest.beam conftest.$ac_ext
23063fi
23064
23065 rm -rf conftest.dir conftest.file
23066fi
23067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
23068$as_echo "$gl_cv_func_rmdir_works" >&6; }
23069 case "$gl_cv_func_rmdir_works" in
23070 *yes) ;;
23071 *)
23072 REPLACE_RMDIR=1
23073 ;;
23074 esac
23075
23076 if test $REPLACE_RMDIR = 1; then
23077
23078
23079
23080
23081
23082
23083
23084
23085 gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
23086
23087 fi
23088
23089
23090
23091
23092
23093 GNULIB_RMDIR=1
23094
23095
23096
23097
23098
23099$as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
23100
23101
23102
23103
0750520d 23104
472fa5ee
SM
23105 :
23106
23107
23108
23109
23110
23111
23112
23113
5e8754f9
SDJ
23114
23115
23116
23117 :
23118
23119
23120
23121
23122
23123 if test $ac_cv_func_secure_getenv = no; then
23124 HAVE_SECURE_GETENV=0
23125 fi
23126
23127 if test $HAVE_SECURE_GETENV = 0; then
23128
23129
23130
23131
23132
23133
23134
23135
23136 gl_LIBOBJS="$gl_LIBOBJS secure_getenv.$ac_objext"
23137
23138
23139 for ac_func in __secure_getenv
23140do :
23141 ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
23142if test "x$ac_cv_func___secure_getenv" = xyes; then :
23143 cat >>confdefs.h <<_ACEOF
23144#define HAVE___SECURE_GETENV 1
23145_ACEOF
23146
23147fi
23148done
23149
23150 if test $ac_cv_func___secure_getenv = no; then
23151 for ac_func in issetugid
23152do :
23153 ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
23154if test "x$ac_cv_func_issetugid" = xyes; then :
23155 cat >>confdefs.h <<_ACEOF
23156#define HAVE_ISSETUGID 1
23157_ACEOF
23158
23159fi
23160done
23161
23162 fi
23163
23164 :
23165
23166
23167
23168
23169
23170
23171
23172
23173
23174
23175
23176
23177
23178
23179
23180 fi
23181
23182
23183
23184
23185
23186 GNULIB_SECURE_GETENV=1
23187
23188
23189
23190
23191
23192$as_echo "#define GNULIB_TEST_SECURE_GETENV 1" >>confdefs.h
23193
23194
23195
23196
23197
3d99e817
AK
23198 if test $ac_cv_func_setenv = no; then
23199 HAVE_SETENV=0
23200 else
23201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
23202$as_echo_n "checking whether setenv validates arguments... " >&6; }
d0ac1c44 23203if ${gl_cv_func_setenv_works+:} false; then :
3d99e817
AK
23204 $as_echo_n "(cached) " >&6
23205else
23206 if test "$cross_compiling" = yes; then :
23207 case "$host_os" in
5e8754f9
SDJ
23208 # Guess yes on glibc systems.
23209 *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
23210 # If we don't know, assume the worst.
23211 *) gl_cv_func_setenv_works="guessing no" ;;
3d99e817
AK
23212 esac
23213
23214else
23215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23216/* end confdefs.h. */
23217
23218 #include <stdlib.h>
23219 #include <errno.h>
23220 #include <string.h>
23221
23222int
23223main ()
23224{
23225
23226 int result = 0;
23227 {
23228 if (setenv ("", "", 0) != -1)
23229 result |= 1;
23230 else if (errno != EINVAL)
23231 result |= 2;
23232 }
23233 {
23234 if (setenv ("a", "=", 1) != 0)
23235 result |= 4;
23236 else if (strcmp (getenv ("a"), "=") != 0)
23237 result |= 8;
23238 }
23239 return result;
23240
23241 ;
23242 return 0;
23243}
23244_ACEOF
23245if ac_fn_c_try_run "$LINENO"; then :
23246 gl_cv_func_setenv_works=yes
23247else
23248 gl_cv_func_setenv_works=no
23249fi
23250rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23251 conftest.$ac_objext conftest.beam conftest.$ac_ext
23252fi
23253
23254fi
23255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
23256$as_echo "$gl_cv_func_setenv_works" >&6; }
23257 case "$gl_cv_func_setenv_works" in
23258 *yes) ;;
23259 *)
23260 REPLACE_SETENV=1
23261 ;;
23262 esac
23263 fi
23264
23265 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
23266
23267
23268
23269
23270
23271
23272
23273
23274 gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
23275
23276 fi
23277
23278
23279
23280
23281
23282 GNULIB_SETENV=1
23283
23284
23285
23286
23287
23288$as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
23289
23290
23291
23292
23293
0750520d
PA
23294
23295
23296
23297
23298
23299
23300
23301
23302
23303 if test $gl_cv_have_include_next = yes; then
23304 gl_cv_next_signal_h='<'signal.h'>'
23305 else
23306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
23307$as_echo_n "checking absolute name of <signal.h>... " >&6; }
d0ac1c44 23308if ${gl_cv_next_signal_h+:} false; then :
0750520d
PA
23309 $as_echo_n "(cached) " >&6
23310else
23311
23312
23313
23314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23315/* end confdefs.h. */
23316#include <signal.h>
23317_ACEOF
23318 case "$host_os" in
23319 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23320 *) gl_absname_cpp="$ac_cpp" ;;
23321 esac
23322
23323 case "$host_os" in
23324 mingw*)
23325 gl_dirsep_regex='[/\\]'
23326 ;;
23327 *)
23328 gl_dirsep_regex='\/'
23329 ;;
23330 esac
23331 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23332 gl_header_literal_regex=`echo 'signal.h' \
23333 | sed -e "$gl_make_literal_regex_sed"`
23334 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23335 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23336 s|^/[^/]|//&|
23337 p
23338 q
23339 }'
23340
23341 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23342 sed -n "$gl_absolute_header_sed"`
23343
23344 gl_header=$gl_cv_absolute_signal_h
23345 gl_cv_next_signal_h='"'$gl_header'"'
23346
23347
23348fi
23349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
23350$as_echo "$gl_cv_next_signal_h" >&6; }
23351 fi
23352 NEXT_SIGNAL_H=$gl_cv_next_signal_h
23353
23354 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23355 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23356 gl_next_as_first_directive='<'signal.h'>'
23357 else
23358 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23359 gl_next_as_first_directive=$gl_cv_next_signal_h
23360 fi
23361 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
23362
23363
23364
23365
23366
23367# AIX declares sig_atomic_t to already include volatile, and C89 compilers
23368# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
23369 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
23370#include <signal.h>
23371
23372"
d0ac1c44 23373if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
0750520d
PA
23374
23375else
23376 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
23377fi
23378
23379
23380
23381
23382
23383
23384
23385 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
23386#include <signal.h>
23387
23388"
d0ac1c44 23389if test "x$ac_cv_type_sighandler_t" = xyes; then :
0750520d
PA
23390
23391else
23392 HAVE_SIGHANDLER_T=0
23393fi
23394
23395
23396
5e8754f9
SDJ
23397 for gl_func in pthread_sigmask sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask; do
23398 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
23399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
23400$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
23401if eval \${$as_gl_Symbol+:} false; then :
23402 $as_echo_n "(cached) " >&6
23403else
23404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23405/* end confdefs.h. */
23406#include <signal.h>
23407
23408int
23409main ()
23410{
23411#undef $gl_func
23412 (void) $gl_func;
23413 ;
23414 return 0;
23415}
23416_ACEOF
23417if ac_fn_c_try_compile "$LINENO"; then :
23418 eval "$as_gl_Symbol=yes"
23419else
23420 eval "$as_gl_Symbol=no"
23421fi
23422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23423fi
23424eval ac_res=\$$as_gl_Symbol
23425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23426$as_echo "$ac_res" >&6; }
23427 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
23428 cat >>confdefs.h <<_ACEOF
23429#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
23430_ACEOF
0750520d 23431
5e8754f9
SDJ
23432 eval ac_cv_have_decl_$gl_func=yes
23433fi
23434 done
0750520d
PA
23435
23436
725e2999
JB
23437 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
23438/* <sys/types.h> is not needed according to POSIX, but the
23439 <sys/socket.h> in i386-unknown-freebsd4.10 and
23440 powerpc-apple-darwin5.5 required it. */
23441#include <sys/types.h>
23442#if HAVE_SYS_SOCKET_H
23443# include <sys/socket.h>
23444#elif HAVE_WS2TCPIP_H
23445# include <ws2tcpip.h>
23446#endif
23447
23448"
23449if test "x$ac_cv_type_socklen_t" = xyes; then :
23450
23451else
23452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
23453$as_echo_n "checking for socklen_t equivalent... " >&6; }
23454 if ${gl_cv_socklen_t_equiv+:} false; then :
23455 $as_echo_n "(cached) " >&6
23456else
23457 # Systems have either "struct sockaddr *" or
23458 # "void *" as the second argument to getpeername
23459 gl_cv_socklen_t_equiv=
23460 for arg2 in "struct sockaddr" void; do
23461 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
23462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23463/* end confdefs.h. */
23464#include <sys/types.h>
23465 #include <sys/socket.h>
23466
23467 int getpeername (int, $arg2 *, $t *);
23468int
23469main ()
23470{
23471$t len;
23472 getpeername (0, 0, &len);
23473 ;
23474 return 0;
23475}
23476_ACEOF
23477if ac_fn_c_try_compile "$LINENO"; then :
23478 gl_cv_socklen_t_equiv="$t"
23479fi
23480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23481 test "$gl_cv_socklen_t_equiv" != "" && break
23482 done
23483 test "$gl_cv_socklen_t_equiv" != "" && break
23484 done
23485
23486fi
23487
23488 if test "$gl_cv_socklen_t_equiv" = ""; then
23489 as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
23490 fi
23491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
23492$as_echo "$gl_cv_socklen_t_equiv" >&6; }
23493
23494cat >>confdefs.h <<_ACEOF
23495#define socklen_t $gl_cv_socklen_t_equiv
23496_ACEOF
23497
23498fi
23499
0750520d 23500
63ce7108
TT
23501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
23502$as_echo_n "checking for ssize_t... " >&6; }
d0ac1c44 23503if ${gt_cv_ssize_t+:} false; then :
63ce7108
TT
23504 $as_echo_n "(cached) " >&6
23505else
23506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23507/* end confdefs.h. */
23508#include <sys/types.h>
23509int
23510main ()
23511{
23512int x = sizeof (ssize_t *) + sizeof (ssize_t);
23513 return !x;
23514 ;
23515 return 0;
23516}
23517_ACEOF
23518if ac_fn_c_try_compile "$LINENO"; then :
23519 gt_cv_ssize_t=yes
23520else
23521 gt_cv_ssize_t=no
23522fi
23523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23524fi
23525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
23526$as_echo "$gt_cv_ssize_t" >&6; }
23527 if test $gt_cv_ssize_t = no; then
23528
23529$as_echo "#define ssize_t int" >>confdefs.h
23530
23531 fi
23532
23533
23534
23535
472fa5ee
SM
23536 :
23537
23538
23539
23540
23541
5e8754f9
SDJ
23542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
23543$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
23544if ${gl_cv_func_stat_dir_slash+:} false; then :
2196f55f
YQ
23545 $as_echo_n "(cached) " >&6
23546else
5e8754f9
SDJ
23547 if test "$cross_compiling" = yes; then :
23548 case $host_os in
23549 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
23550 *) gl_cv_func_stat_dir_slash="guessing yes";;
23551 esac
2196f55f
YQ
23552else
23553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23554/* end confdefs.h. */
23555#include <sys/stat.h>
23556
23557int
23558main ()
23559{
5e8754f9 23560struct stat st; return stat (".", &st) != stat ("./", &st);
2196f55f
YQ
23561 ;
23562 return 0;
23563}
23564_ACEOF
23565if ac_fn_c_try_run "$LINENO"; then :
5e8754f9 23566 gl_cv_func_stat_dir_slash=yes
2196f55f 23567else
5e8754f9 23568 gl_cv_func_stat_dir_slash=no
2196f55f
YQ
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
23574fi
5e8754f9
SDJ
23575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
23576$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
23577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
23578$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
23579if ${gl_cv_func_stat_file_slash+:} false; then :
7a6dbc2f 23580 $as_echo_n "(cached) " >&6
2196f55f 23581else
5e8754f9
SDJ
23582 touch conftest.tmp
23583 # Assume that if we have lstat, we can also check symlinks.
23584 if test $ac_cv_func_lstat = yes; then
23585 ln -s conftest.tmp conftest.lnk
23586 fi
23587 if test "$cross_compiling" = yes; then :
23588 case "$host_os" in
23589 # Guess yes on glibc systems.
23590 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
23591 # If we don't know, assume the worst.
23592 *) gl_cv_func_stat_file_slash="guessing no" ;;
23593 esac
7a6dbc2f 23594
2196f55f 23595else
5e8754f9
SDJ
23596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23597/* end confdefs.h. */
23598#include <sys/stat.h>
7a6dbc2f 23599
5e8754f9
SDJ
23600int
23601main ()
23602{
23603int result = 0;
23604 struct stat st;
23605 if (!stat ("conftest.tmp/", &st))
23606 result |= 1;
23607#if HAVE_LSTAT
23608 if (!stat ("conftest.lnk/", &st))
23609 result |= 2;
23610#endif
23611 return result;
7a6dbc2f 23612
5e8754f9
SDJ
23613 ;
23614 return 0;
23615}
23616_ACEOF
23617if ac_fn_c_try_run "$LINENO"; then :
23618 gl_cv_func_stat_file_slash=yes
23619else
23620 gl_cv_func_stat_file_slash=no
2196f55f 23621fi
5e8754f9
SDJ
23622rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23623 conftest.$ac_objext conftest.beam conftest.$ac_ext
2196f55f 23624fi
2196f55f 23625
5e8754f9 23626 rm -f conftest.tmp conftest.lnk
7a6dbc2f 23627fi
5e8754f9
SDJ
23628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
23629$as_echo "$gl_cv_func_stat_file_slash" >&6; }
23630 case $gl_cv_func_stat_dir_slash in
23631 *no) REPLACE_STAT=1
2196f55f 23632
5e8754f9
SDJ
23633$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
23634;;
23635 esac
23636 case $gl_cv_func_stat_file_slash in
23637 *no) REPLACE_STAT=1
2196f55f 23638
5e8754f9
SDJ
23639$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
23640;;
23641 esac
2196f55f 23642
5e8754f9 23643 if test $REPLACE_STAT = 1; then
2196f55f
YQ
23644
23645
23646
23647
23648
23649
23650
2196f55f 23651
5e8754f9 23652 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
2196f55f 23653
5e8754f9
SDJ
23654 :
23655 fi
2196f55f
YQ
23656
23657
23658
23659
2196f55f 23660
5e8754f9 23661 GNULIB_STAT=1
2196f55f
YQ
23662
23663
23664
23665
2196f55f 23666
5e8754f9
SDJ
23667$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
23668
2196f55f
YQ
23669
23670
23671
725e2999
JB
23672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
23673$as_echo_n "checking for working stdalign.h... " >&6; }
23674if ${gl_cv_header_working_stdalign_h+:} false; then :
23675 $as_echo_n "(cached) " >&6
23676else
23677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23678/* end confdefs.h. */
23679#include <stdalign.h>
23680 #include <stddef.h>
23681
23682 /* Test that alignof yields a result consistent with offsetof.
23683 This catches GCC bug 52023
23684 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
23685 #ifdef __cplusplus
23686 template <class t> struct alignof_helper { char a; t b; };
23687 # define ao(type) offsetof (alignof_helper<type>, b)
23688 #else
23689 # define ao(type) offsetof (struct { char a; type b; }, b)
23690 #endif
23691 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
23692 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
23693 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
23694
23695 /* Test _Alignas only on platforms where gnulib can help. */
23696 #if \
23697 ((defined __cplusplus && 201103 <= __cplusplus) \
23698 || (defined __APPLE__ && defined __MACH__ \
23699 ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
23700 : __GNUC__) \
23701 || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \
23702 || __ICC || 0x5110 <= __SUNPRO_C \
23703 || 1300 <= _MSC_VER)
23704 struct alignas_test { char c; char alignas (8) alignas_8; };
23705 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
23706 ? 1 : -1];
23707 #endif
23708
23709int
23710main ()
23711{
23712
23713 ;
23714 return 0;
23715}
23716_ACEOF
23717if ac_fn_c_try_compile "$LINENO"; then :
23718 gl_cv_header_working_stdalign_h=yes
23719else
23720 gl_cv_header_working_stdalign_h=no
23721fi
23722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23723fi
23724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
23725$as_echo "$gl_cv_header_working_stdalign_h" >&6; }
23726
23727 if test $gl_cv_header_working_stdalign_h = yes; then
23728 STDALIGN_H=''
23729 else
23730 STDALIGN_H='stdalign.h'
23731 fi
23732
23733
23734 if test -n "$STDALIGN_H"; then
23735 GL_GENERATE_STDALIGN_H_TRUE=
23736 GL_GENERATE_STDALIGN_H_FALSE='#'
23737else
23738 GL_GENERATE_STDALIGN_H_TRUE='#'
23739 GL_GENERATE_STDALIGN_H_FALSE=
23740fi
23741
23742
23743
2196f55f
YQ
23744
23745
63ce7108
TT
23746 # Define two additional variables used in the Makefile substitution.
23747
23748 if test "$ac_cv_header_stdbool_h" = yes; then
23749 STDBOOL_H=''
23750 else
23751 STDBOOL_H='stdbool.h'
23752 fi
23753
23754 if test -n "$STDBOOL_H"; then
23755 GL_GENERATE_STDBOOL_H_TRUE=
23756 GL_GENERATE_STDBOOL_H_FALSE='#'
23757else
23758 GL_GENERATE_STDBOOL_H_TRUE='#'
23759 GL_GENERATE_STDBOOL_H_FALSE=
23760fi
23761
23762
23763 if test "$ac_cv_type__Bool" = yes; then
23764 HAVE__BOOL=1
23765 else
23766 HAVE__BOOL=0
23767 fi
23768
23769
23770
23771
23772
23773 STDDEF_H=
4a626d0a
PA
23774 ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
23775
23776"
d0ac1c44 23777if test "x$ac_cv_type_max_align_t" = xyes; then :
4a626d0a
PA
23778
23779else
23780 HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
23781fi
23782
63ce7108
TT
23783 if test $gt_cv_c_wchar_t = no; then
23784 HAVE_WCHAR_T=0
23785 STDDEF_H=stddef.h
23786 fi
23787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
23788$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
d0ac1c44 23789if ${gl_cv_decl_null_works+:} false; then :
63ce7108
TT
23790 $as_echo_n "(cached) " >&6
23791else
23792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23793/* end confdefs.h. */
23794#include <stddef.h>
23795 int test[2 * (sizeof NULL == sizeof (void *)) -1];
23796
23797int
23798main ()
23799{
23800
23801 ;
23802 return 0;
23803}
23804_ACEOF
23805if ac_fn_c_try_compile "$LINENO"; then :
23806 gl_cv_decl_null_works=yes
23807else
23808 gl_cv_decl_null_works=no
23809fi
23810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23811fi
23812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
23813$as_echo "$gl_cv_decl_null_works" >&6; }
23814 if test $gl_cv_decl_null_works = no; then
23815 REPLACE_NULL=1
23816 STDDEF_H=stddef.h
23817 fi
23818
23819 if test -n "$STDDEF_H"; then
23820 GL_GENERATE_STDDEF_H_TRUE=
23821 GL_GENERATE_STDDEF_H_FALSE='#'
23822else
23823 GL_GENERATE_STDDEF_H_TRUE='#'
23824 GL_GENERATE_STDDEF_H_FALSE=
23825fi
23826
23827 if test -n "$STDDEF_H"; then
23828
23829
23830
23831
23832
23833
23834
23835
23836 if test $gl_cv_have_include_next = yes; then
23837 gl_cv_next_stddef_h='<'stddef.h'>'
23838 else
23839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
23840$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
d0ac1c44 23841if ${gl_cv_next_stddef_h+:} false; then :
63ce7108
TT
23842 $as_echo_n "(cached) " >&6
23843else
23844
4a626d0a
PA
23845
23846
23847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63ce7108
TT
23848/* end confdefs.h. */
23849#include <stddef.h>
63ce7108 23850_ACEOF
4a626d0a
PA
23851 case "$host_os" in
23852 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23853 *) gl_absname_cpp="$ac_cpp" ;;
23854 esac
63ce7108 23855
4a626d0a
PA
23856 case "$host_os" in
23857 mingw*)
23858 gl_dirsep_regex='[/\\]'
23859 ;;
23860 *)
23861 gl_dirsep_regex='\/'
23862 ;;
23863 esac
23864 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23865 gl_header_literal_regex=`echo 'stddef.h' \
23866 | sed -e "$gl_make_literal_regex_sed"`
23867 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23868 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23869 s|^/[^/]|//&|
23870 p
23871 q
23872 }'
63ce7108 23873
4a626d0a
PA
23874 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23875 sed -n "$gl_absolute_header_sed"`
23876
23877 gl_header=$gl_cv_absolute_stddef_h
23878 gl_cv_next_stddef_h='"'$gl_header'"'
63ce7108
TT
23879
23880
23881fi
23882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
23883$as_echo "$gl_cv_next_stddef_h" >&6; }
23884 fi
23885 NEXT_STDDEF_H=$gl_cv_next_stddef_h
23886
23887 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23888 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23889 gl_next_as_first_directive='<'stddef.h'>'
23890 else
23891 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23892 gl_next_as_first_directive=$gl_cv_next_stddef_h
23893 fi
23894 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
23895
23896
23897
23898
23899 fi
23900
23901
23902
23903
49e4877c 23904 $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
63ce7108
TT
23905
23906
23907
98399780
YQ
23908
23909
23910
23911
23912
4a626d0a
PA
23913
23914
6a29c58e
YQ
23915 if test $gl_cv_have_include_next = yes; then
23916 gl_cv_next_stdio_h='<'stdio.h'>'
23917 else
23918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
23919$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
d0ac1c44 23920if ${gl_cv_next_stdio_h+:} false; then :
6a29c58e
YQ
23921 $as_echo_n "(cached) " >&6
23922else
23923
4a626d0a
PA
23924
23925
23926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6a29c58e
YQ
23927/* end confdefs.h. */
23928#include <stdio.h>
6a29c58e 23929_ACEOF
4a626d0a
PA
23930 case "$host_os" in
23931 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23932 *) gl_absname_cpp="$ac_cpp" ;;
23933 esac
23934
23935 case "$host_os" in
23936 mingw*)
23937 gl_dirsep_regex='[/\\]'
23938 ;;
23939 *)
23940 gl_dirsep_regex='\/'
23941 ;;
23942 esac
23943 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23944 gl_header_literal_regex=`echo 'stdio.h' \
23945 | sed -e "$gl_make_literal_regex_sed"`
23946 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23947 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23948 s|^/[^/]|//&|
23949 p
23950 q
23951 }'
6a29c58e 23952
4a626d0a
PA
23953 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23954 sed -n "$gl_absolute_header_sed"`
6a29c58e 23955
4a626d0a
PA
23956 gl_header=$gl_cv_absolute_stdio_h
23957 gl_cv_next_stdio_h='"'$gl_header'"'
6a29c58e
YQ
23958
23959
23960fi
23961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
23962$as_echo "$gl_cv_next_stdio_h" >&6; }
23963 fi
23964 NEXT_STDIO_H=$gl_cv_next_stdio_h
23965
23966 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23967 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23968 gl_next_as_first_directive='<'stdio.h'>'
23969 else
23970 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23971 gl_next_as_first_directive=$gl_cv_next_stdio_h
23972 fi
23973 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
23974
23975
23976
23977
23978
4a626d0a
PA
23979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
23980$as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
d0ac1c44 23981if ${gl_cv_func_printf_attribute_flavor+:} false; then :
4a626d0a
PA
23982 $as_echo_n "(cached) " >&6
23983else
23984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23985/* end confdefs.h. */
23986
23987 #define __STDC_FORMAT_MACROS 1
23988 #include <stdio.h>
23989 #include <inttypes.h>
23990 /* For non-mingw systems, compilation will trivially succeed.
23991 For mingw, compilation will succeed for older mingw (system
23992 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
5e8754f9 23993 #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
4a626d0a
PA
23994 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
23995 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
23996 #endif
23997
23998int
23999main ()
24000{
24001
24002 ;
24003 return 0;
24004}
24005_ACEOF
24006if ac_fn_c_try_compile "$LINENO"; then :
24007 gl_cv_func_printf_attribute_flavor=system
24008else
24009 gl_cv_func_printf_attribute_flavor=gnu
24010fi
24011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24012fi
24013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
24014$as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
24015 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
24016
24017$as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
24018
24019 fi
24020
6a29c58e
YQ
24021 GNULIB_FSCANF=1
24022
24023
24024cat >>confdefs.h <<_ACEOF
24025#define GNULIB_FSCANF 1
24026_ACEOF
24027
24028
24029 GNULIB_SCANF=1
24030
24031
24032cat >>confdefs.h <<_ACEOF
24033#define GNULIB_SCANF 1
24034_ACEOF
24035
24036
24037 GNULIB_FGETC=1
24038 GNULIB_GETC=1
24039 GNULIB_GETCHAR=1
24040 GNULIB_FGETS=1
24041 GNULIB_FREAD=1
24042
24043
24044 GNULIB_FPRINTF=1
24045 GNULIB_PRINTF=1
24046 GNULIB_VFPRINTF=1
24047 GNULIB_VPRINTF=1
24048 GNULIB_FPUTC=1
24049 GNULIB_PUTC=1
24050 GNULIB_PUTCHAR=1
24051 GNULIB_FPUTS=1
24052 GNULIB_PUTS=1
24053 GNULIB_FWRITE=1
24054
24055
24056
24057
5e8754f9
SDJ
24058 for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen renameat snprintf tmpfile vdprintf vsnprintf; do
24059 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
24060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
24061$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
24062if eval \${$as_gl_Symbol+:} false; then :
24063 $as_echo_n "(cached) " >&6
24064else
24065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24066/* end confdefs.h. */
24067#include <stdio.h>
24068
24069int
24070main ()
24071{
24072#undef $gl_func
24073 (void) $gl_func;
24074 ;
24075 return 0;
24076}
24077_ACEOF
24078if ac_fn_c_try_compile "$LINENO"; then :
24079 eval "$as_gl_Symbol=yes"
24080else
24081 eval "$as_gl_Symbol=no"
24082fi
24083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24084fi
24085eval ac_res=\$$as_gl_Symbol
24086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
24087$as_echo "$ac_res" >&6; }
24088 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
24089 cat >>confdefs.h <<_ACEOF
24090#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
24091_ACEOF
6a29c58e 24092
5e8754f9
SDJ
24093 eval ac_cv_have_decl_$gl_func=yes
24094fi
24095 done
6a29c58e
YQ
24096
24097
24098
24099
24100
24101
24102
24103
24104
24105
24106
24107
98399780
YQ
24108 if test $gl_cv_have_include_next = yes; then
24109 gl_cv_next_stdlib_h='<'stdlib.h'>'
24110 else
24111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
24112$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
d0ac1c44 24113if ${gl_cv_next_stdlib_h+:} false; then :
98399780
YQ
24114 $as_echo_n "(cached) " >&6
24115else
24116
4a626d0a
PA
24117
24118
24119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
98399780
YQ
24120/* end confdefs.h. */
24121#include <stdlib.h>
98399780 24122_ACEOF
4a626d0a
PA
24123 case "$host_os" in
24124 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24125 *) gl_absname_cpp="$ac_cpp" ;;
24126 esac
24127
24128 case "$host_os" in
24129 mingw*)
24130 gl_dirsep_regex='[/\\]'
24131 ;;
24132 *)
24133 gl_dirsep_regex='\/'
24134 ;;
24135 esac
24136 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24137 gl_header_literal_regex=`echo 'stdlib.h' \
24138 | sed -e "$gl_make_literal_regex_sed"`
24139 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24140 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24141 s|^/[^/]|//&|
24142 p
24143 q
24144 }'
98399780 24145
4a626d0a
PA
24146 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24147 sed -n "$gl_absolute_header_sed"`
98399780 24148
4a626d0a
PA
24149 gl_header=$gl_cv_absolute_stdlib_h
24150 gl_cv_next_stdlib_h='"'$gl_header'"'
98399780
YQ
24151
24152
24153fi
24154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
24155$as_echo "$gl_cv_next_stdlib_h" >&6; }
24156 fi
24157 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
24158
24159 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24160 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24161 gl_next_as_first_directive='<'stdlib.h'>'
24162 else
24163 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24164 gl_next_as_first_directive=$gl_cv_next_stdlib_h
24165 fi
24166 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
24167
24168
24169
24170
24171
24172
5e8754f9
SDJ
24173 for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt ptsname ptsname_r qsort_r random random_r realpath rpmatch secure_getenv setenv setstate setstate_r srandom srandom_r strtod strtoll strtoull unlockpt unsetenv; do
24174 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
24175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
24176$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
24177if eval \${$as_gl_Symbol+:} false; then :
24178 $as_echo_n "(cached) " >&6
24179else
24180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24181/* end confdefs.h. */
24182#include <stdlib.h>
24183#if HAVE_SYS_LOADAVG_H
24184# include <sys/loadavg.h>
24185#endif
24186#if HAVE_RANDOM_H
24187# include <random.h>
24188#endif
24189
24190int
24191main ()
24192{
24193#undef $gl_func
24194 (void) $gl_func;
24195 ;
24196 return 0;
24197}
24198_ACEOF
24199if ac_fn_c_try_compile "$LINENO"; then :
24200 eval "$as_gl_Symbol=yes"
24201else
24202 eval "$as_gl_Symbol=no"
24203fi
24204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24205fi
24206eval ac_res=\$$as_gl_Symbol
24207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
24208$as_echo "$ac_res" >&6; }
24209 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
24210 cat >>confdefs.h <<_ACEOF
24211#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
24212_ACEOF
98399780 24213
5e8754f9
SDJ
24214 eval ac_cv_have_decl_$gl_func=yes
24215fi
24216 done
98399780
YQ
24217
24218
24219
24220
24221
24222
8424cc97
SM
24223 for ac_func in strchrnul
24224do :
24225 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
d0ac1c44 24226if test "x$ac_cv_func_strchrnul" = xyes; then :
8424cc97
SM
24227 cat >>confdefs.h <<_ACEOF
24228#define HAVE_STRCHRNUL 1
24229_ACEOF
24230
24231fi
24232done
24233
24234 if test $ac_cv_func_strchrnul = no; then
24235 HAVE_STRCHRNUL=0
24236 else
24237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
24238$as_echo_n "checking whether strchrnul works... " >&6; }
d0ac1c44 24239if ${gl_cv_func_strchrnul_works+:} false; then :
8424cc97
SM
24240 $as_echo_n "(cached) " >&6
24241else
24242 if test "$cross_compiling" = yes; then :
24243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24244/* end confdefs.h. */
24245
24246#if defined __CYGWIN__
24247 #include <cygwin/version.h>
24248 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
24249 Lucky user
24250 #endif
24251#else
24252 Lucky user
24253#endif
24254
24255_ACEOF
24256if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24257 $EGREP "Lucky user" >/dev/null 2>&1; then :
24258 gl_cv_func_strchrnul_works="guessing yes"
24259else
24260 gl_cv_func_strchrnul_works="guessing no"
24261fi
24262rm -f conftest*
24263
24264
24265else
24266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24267/* end confdefs.h. */
24268
24269#include <string.h> /* for strchrnul */
24270
24271int
24272main ()
24273{
24274const char *buf = "a";
24275 return strchrnul (buf, 'b') != buf + 1;
24276
24277 ;
24278 return 0;
24279}
24280_ACEOF
24281if ac_fn_c_try_run "$LINENO"; then :
24282 gl_cv_func_strchrnul_works=yes
24283else
24284 gl_cv_func_strchrnul_works=no
24285fi
24286rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24287 conftest.$ac_objext conftest.beam conftest.$ac_ext
24288fi
24289
24290
24291fi
24292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
24293$as_echo "$gl_cv_func_strchrnul_works" >&6; }
24294 case "$gl_cv_func_strchrnul_works" in
24295 *yes) ;;
24296 *) REPLACE_STRCHRNUL=1 ;;
24297 esac
24298 fi
24299
24300 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
24301
24302
24303
24304
24305
24306
24307
24308
24309 gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
24310
24311 :
24312 fi
24313
24314
24315
24316
24317
24318 GNULIB_STRCHRNUL=1
24319
24320
24321
24322
24323
24324$as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
24325
24326
24327
24328
24329
24330
24331
472fa5ee
SM
24332 :
24333
24334
24335
24336
24337
6ec2e0f5
SDJ
24338 if test $ac_cv_func_strdup = yes; then
24339 if test $gl_cv_func_malloc_posix != yes; then
24340 REPLACE_STRDUP=1
24341 fi
24342 fi
24343
472fa5ee
SM
24344 :
24345
24346
24347
24348
24349
6ec2e0f5
SDJ
24350 if test $ac_cv_have_decl_strdup = no; then
24351 HAVE_DECL_STRDUP=0
24352 fi
24353
24354 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
24355
24356
24357
24358
24359
24360
24361
24362
24363 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
24364
24365 :
24366 fi
24367
24368
24369
24370
24371
24372 GNULIB_STRDUP=1
24373
24374
24375
24376
24377
24378$as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
24379
24380
24381
24382
24383
24384
24385
24386
24387 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
24388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
24389$as_echo_n "checking for working strerror function... " >&6; }
d0ac1c44 24390if ${gl_cv_func_working_strerror+:} false; then :
6ec2e0f5
SDJ
24391 $as_echo_n "(cached) " >&6
24392else
24393 if test "$cross_compiling" = yes; then :
24394 case "$host_os" in
5e8754f9
SDJ
24395 # Guess yes on glibc systems.
24396 *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
24397 # If we don't know, assume the worst.
24398 *) gl_cv_func_working_strerror="guessing no" ;;
6ec2e0f5
SDJ
24399 esac
24400
24401else
24402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24403/* end confdefs.h. */
24404#include <string.h>
24405
24406int
24407main ()
24408{
24409if (!*strerror (-2)) return 1;
24410 ;
24411 return 0;
24412}
24413_ACEOF
24414if ac_fn_c_try_run "$LINENO"; then :
24415 gl_cv_func_working_strerror=yes
24416else
24417 gl_cv_func_working_strerror=no
24418fi
24419rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24420 conftest.$ac_objext conftest.beam conftest.$ac_ext
24421fi
24422
24423
24424fi
24425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
24426$as_echo "$gl_cv_func_working_strerror" >&6; }
24427 case "$gl_cv_func_working_strerror" in
24428 *yes) ;;
24429 *)
24430 REPLACE_STRERROR=1
24431 ;;
24432 esac
24433
24434 else
24435 REPLACE_STRERROR=1
24436 fi
24437
24438 if test $REPLACE_STRERROR = 1; then
24439
24440
24441
24442
24443
24444
24445
24446
24447 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
24448
24449 fi
24450
24451
24452cat >>confdefs.h <<_ACEOF
24453#define GNULIB_STRERROR 1
24454_ACEOF
24455
24456
24457
24458
24459
24460
24461
24462 GNULIB_STRERROR=1
24463
24464
24465
24466
24467
24468$as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
24469
24470
24471
24472
24473
24474 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
24475
24476
24477
24478
24479
24480
24481
24482
24483 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
24484
24485
24486
24487
24488
472fa5ee
SM
24489 :
24490
24491
24492
24493
24494
6ec2e0f5
SDJ
24495 if test $ac_cv_header_sys_socket_h != yes; then
24496 for ac_header in winsock2.h
24497do :
24498 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
d0ac1c44 24499if test "x$ac_cv_header_winsock2_h" = xyes; then :
6ec2e0f5
SDJ
24500 cat >>confdefs.h <<_ACEOF
24501#define HAVE_WINSOCK2_H 1
24502_ACEOF
24503
24504fi
24505
24506done
24507
24508 fi
24509 if test "$ac_cv_header_winsock2_h" = yes; then
24510 HAVE_WINSOCK2_H=1
24511 UNISTD_H_HAVE_WINSOCK2_H=1
24512 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
24513 else
24514 HAVE_WINSOCK2_H=0
24515 fi
24516
24517
24518 fi
24519
24520
24521
24522
98399780 24523
63ce7108
TT
24524 if test $REPLACE_STRSTR = 0; then
24525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
24526$as_echo_n "checking whether strstr works in linear time... " >&6; }
d0ac1c44 24527if ${gl_cv_func_strstr_linear+:} false; then :
63ce7108
TT
24528 $as_echo_n "(cached) " >&6
24529else
24530 if test "$cross_compiling" = yes; then :
24531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24532/* end confdefs.h. */
24533
24534#include <features.h>
24535#ifdef __GNU_LIBRARY__
24536 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
24537 && !(defined __i386__ || defined __x86_64__) \
24538 && !defined __UCLIBC__
24539 Lucky user
24540 #endif
24541#endif
24542#ifdef __CYGWIN__
24543 #include <cygwin/version.h>
24544 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
24545 Lucky user
24546 #endif
24547#endif
24548
24549_ACEOF
24550if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24551 $EGREP "Lucky user" >/dev/null 2>&1; then :
24552 gl_cv_func_strstr_linear="guessing yes"
c971b7fa 24553else
63ce7108 24554 gl_cv_func_strstr_linear="guessing no"
c971b7fa
PA
24555fi
24556rm -f conftest*
24557
24558
24559else
24560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24561/* end confdefs.h. */
24562
49e4877c
PA
24563#ifdef __MVS__
24564/* z/OS does not deliver signals while strstr() is running (thanks to
24565 restrictions on its LE runtime), which prevents us from limiting the
24566 running time of this test. */
24567# error "This test does not work properly on z/OS"
24568#endif
c971b7fa 24569#include <signal.h> /* for signal */
63ce7108 24570#include <string.h> /* for strstr */
c971b7fa
PA
24571#include <stdlib.h> /* for malloc */
24572#include <unistd.h> /* for alarm */
49e4877c 24573static void quit (int sig) { _exit (sig + 128); }
c971b7fa
PA
24574
24575int
24576main ()
24577{
24578
24579 int result = 0;
24580 size_t m = 1000000;
63ce7108
TT
24581 char *haystack = (char *) malloc (2 * m + 2);
24582 char *needle = (char *) malloc (m + 2);
c971b7fa 24583 /* Failure to compile this test due to missing alarm is okay,
63ce7108 24584 since all such platforms (mingw) also have quadratic strstr. */
c971b7fa
PA
24585 signal (SIGALRM, quit);
24586 alarm (5);
24587 /* Check for quadratic performance. */
24588 if (haystack && needle)
24589 {
24590 memset (haystack, 'A', 2 * m);
24591 haystack[2 * m] = 'B';
63ce7108 24592 haystack[2 * m + 1] = 0;
c971b7fa
PA
24593 memset (needle, 'A', m);
24594 needle[m] = 'B';
63ce7108
TT
24595 needle[m + 1] = 0;
24596 if (!strstr (haystack, needle))
c971b7fa
PA
24597 result |= 1;
24598 }
24599 return result;
24600
24601 ;
24602 return 0;
24603}
24604_ACEOF
24605if ac_fn_c_try_run "$LINENO"; then :
63ce7108 24606 gl_cv_func_strstr_linear=yes
c971b7fa 24607else
63ce7108 24608 gl_cv_func_strstr_linear=no
c971b7fa
PA
24609fi
24610rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24611 conftest.$ac_objext conftest.beam conftest.$ac_ext
24612fi
24613
24614
24615fi
63ce7108
TT
24616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
24617$as_echo "$gl_cv_func_strstr_linear" >&6; }
24618 case "$gl_cv_func_strstr_linear" in
40a73391
JK
24619 *yes) ;;
24620 *)
63ce7108 24621 REPLACE_STRSTR=1
40a73391
JK
24622 ;;
24623 esac
c971b7fa
PA
24624 fi
24625
63ce7108 24626 if test $REPLACE_STRSTR = 1; then
c971b7fa
PA
24627
24628
24629
24630
24631
24632
24633
24634
63ce7108 24635 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
c971b7fa 24636
a512b375 24637 fi
c971b7fa
PA
24638
24639
24640
5e8754f9 24641 if test "$gl_cv_func_memchr_works" != yes; then
63ce7108 24642 REPLACE_STRSTR=1
c971b7fa 24643 else
63ce7108
TT
24644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
24645$as_echo_n "checking whether strstr works... " >&6; }
d0ac1c44 24646if ${gl_cv_func_strstr_works_always+:} false; then :
c971b7fa
PA
24647 $as_echo_n "(cached) " >&6
24648else
24649 if test "$cross_compiling" = yes; then :
63ce7108 24650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
24651/* end confdefs.h. */
24652
24653#ifdef __GNU_LIBRARY__
24654 #include <features.h>
63ce7108 24655 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
c971b7fa
PA
24656 || defined __UCLIBC__
24657 Lucky user
24658 #endif
24659#elif defined __CYGWIN__
24660 #include <cygwin/version.h>
24661 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
24662 Lucky user
24663 #endif
24664#else
24665 Lucky user
24666#endif
24667
24668_ACEOF
24669if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24670 $EGREP "Lucky user" >/dev/null 2>&1; then :
63ce7108 24671 gl_cv_func_strstr_works_always="guessing yes"
c971b7fa 24672else
63ce7108 24673 gl_cv_func_strstr_works_always="guessing no"
c971b7fa
PA
24674fi
24675rm -f conftest*
24676
24677
24678else
24679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24680/* end confdefs.h. */
24681
63ce7108 24682#include <string.h> /* for strstr */
c971b7fa
PA
24683#define P "_EF_BF_BD"
24684#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
24685#define NEEDLE P P P P P
24686
24687int
24688main ()
24689{
63ce7108 24690return !!strstr (HAYSTACK, NEEDLE);
c971b7fa
PA
24691
24692 ;
24693 return 0;
24694}
24695_ACEOF
24696if ac_fn_c_try_run "$LINENO"; then :
63ce7108 24697 gl_cv_func_strstr_works_always=yes
c971b7fa 24698else
63ce7108 24699 gl_cv_func_strstr_works_always=no
c971b7fa
PA
24700fi
24701rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24702 conftest.$ac_objext conftest.beam conftest.$ac_ext
24703fi
24704
24705
24706fi
63ce7108
TT
24707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
24708$as_echo "$gl_cv_func_strstr_works_always" >&6; }
24709 case "$gl_cv_func_strstr_works_always" in
40a73391
JK
24710 *yes) ;;
24711 *)
63ce7108 24712 REPLACE_STRSTR=1
40a73391
JK
24713 ;;
24714 esac
c971b7fa 24715 fi
8839a007 24716
63ce7108 24717 if test $REPLACE_STRSTR = 1; then
8839a007 24718
8690e634
JK
24719
24720
8690e634
JK
24721
24722
24723
24724
24725
63ce7108 24726 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
8690e634 24727
8690e634
JK
24728 fi
24729
8690e634
JK
24730
24731
8690e634 24732
8690e634 24733
63ce7108 24734 GNULIB_STRSTR=1
8690e634
JK
24735
24736
24737
8690e634
JK
24738
24739
63ce7108 24740$as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
8690e634
JK
24741
24742
24743
24744
24745
24746
24747
421693b0
PA
24748 for ac_func in strtok_r
24749do :
24750 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
d0ac1c44 24751if test "x$ac_cv_func_strtok_r" = xyes; then :
421693b0
PA
24752 cat >>confdefs.h <<_ACEOF
24753#define HAVE_STRTOK_R 1
24754_ACEOF
24755
24756fi
24757done
24758
24759 if test $ac_cv_func_strtok_r = yes; then
24760 HAVE_STRTOK_R=1
24761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5
24762$as_echo_n "checking whether strtok_r works... " >&6; }
d0ac1c44 24763if ${gl_cv_func_strtok_r_works+:} false; then :
421693b0
PA
24764 $as_echo_n "(cached) " >&6
24765else
24766 if test "$cross_compiling" = yes; then :
5e8754f9
SDJ
24767
24768 case "$host_os" in
24769 # Guess no on glibc systems.
24770 *-gnu*) gl_cv_func_strtok_r_works="guessing no";;
24771 *) gl_cv_func_strtok_r_works="guessing yes";;
421693b0
PA
24772 esac
24773
24774else
24775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24776/* end confdefs.h. */
24777
24778 #ifndef __OPTIMIZE__
24779 # define __OPTIMIZE__ 1
24780 #endif
24781 #undef __OPTIMIZE_SIZE__
24782 #undef __NO_INLINE__
24783 #include <stdlib.h>
24784 #include <string.h>
24785
24786int
24787main ()
24788{
24789static const char dummy[] = "\177\01a";
24790 char delimiters[] = "xxxxxxxx";
24791 char *save_ptr = (char *) dummy;
24792 strtok_r (delimiters, "x", &save_ptr);
24793 strtok_r (NULL, "x", &save_ptr);
24794 return 0;
24795
24796 ;
24797 return 0;
24798}
24799
24800_ACEOF
24801if ac_fn_c_try_run "$LINENO"; then :
24802 gl_cv_func_strtok_r_works=yes
24803else
24804 gl_cv_func_strtok_r_works=no
24805fi
24806rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24807 conftest.$ac_objext conftest.beam conftest.$ac_ext
24808fi
24809
24810
24811fi
24812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5
24813$as_echo "$gl_cv_func_strtok_r_works" >&6; }
24814 case "$gl_cv_func_strtok_r_works" in
24815 *no)
24816 UNDEFINE_STRTOK_R=1
24817 ;;
24818 esac
24819 else
24820 HAVE_STRTOK_R=0
24821 fi
24822
472fa5ee
SM
24823 :
24824
24825
24826
24827
24828
421693b0
PA
24829 if test $ac_cv_have_decl_strtok_r = no; then
24830 HAVE_DECL_STRTOK_R=0
24831 fi
24832
24833 if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
24834
24835
24836
24837
24838
24839
24840
24841
24842 gl_LIBOBJS="$gl_LIBOBJS strtok_r.$ac_objext"
24843
24844
24845 :
24846
24847 fi
24848
24849
24850
24851
24852
24853 GNULIB_STRTOK_R=1
24854
24855
24856
24857
24858
24859$as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h
24860
24861
24862
24863
24864
24865
24866
8690e634
JK
24867
24868
24869
24870
24871
8690e634 24872
09607c9e 24873
725e2999
JB
24874
24875
472fa5ee
SM
24876 :
24877
24878
24879
24880
24881
09607c9e
TT
24882
24883
24884
24885 if test $gl_cv_have_include_next = yes; then
24886 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
24887 else
24888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
24889$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
d0ac1c44 24890if ${gl_cv_next_sys_stat_h+:} false; then :
09607c9e
TT
24891 $as_echo_n "(cached) " >&6
24892else
24893
24894 if test $ac_cv_header_sys_stat_h = yes; then
24895
24896
4a626d0a
PA
24897
24898
24899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
09607c9e
TT
24900/* end confdefs.h. */
24901#include <sys/stat.h>
09607c9e 24902_ACEOF
4a626d0a
PA
24903 case "$host_os" in
24904 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24905 *) gl_absname_cpp="$ac_cpp" ;;
24906 esac
24907
24908 case "$host_os" in
24909 mingw*)
24910 gl_dirsep_regex='[/\\]'
24911 ;;
24912 *)
24913 gl_dirsep_regex='\/'
24914 ;;
24915 esac
24916 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24917 gl_header_literal_regex=`echo 'sys/stat.h' \
24918 | sed -e "$gl_make_literal_regex_sed"`
24919 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24920 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24921 s|^/[^/]|//&|
24922 p
24923 q
24924 }'
24925
24926 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24927 sed -n "$gl_absolute_header_sed"`
24928
24929 gl_header=$gl_cv_absolute_sys_stat_h
24930 gl_cv_next_sys_stat_h='"'$gl_header'"'
09607c9e
TT
24931 else
24932 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
24933 fi
24934
24935
24936fi
24937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
24938$as_echo "$gl_cv_next_sys_stat_h" >&6; }
24939 fi
24940 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
24941
24942 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24943 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24944 gl_next_as_first_directive='<'sys/stat.h'>'
24945 else
24946 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24947 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
24948 fi
24949 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
24950
24951
24952
24953
24954
24955
24956
24957
2196f55f 24958
09607c9e
TT
24959
24960
5e8754f9 24961 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
09607c9e 24962
5e8754f9 24963$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
09607c9e 24964
5e8754f9 24965 fi
09607c9e
TT
24966
24967 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
24968 #include <sys/stat.h>
24969"
d0ac1c44 24970if test "x$ac_cv_type_nlink_t" = xyes; then :
09607c9e
TT
24971
24972else
24973
24974$as_echo "#define nlink_t int" >>confdefs.h
24975
24976fi
24977
24978
24979
5e8754f9
SDJ
24980 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
24981 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
24982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
24983$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
24984if eval \${$as_gl_Symbol+:} false; then :
24985 $as_echo_n "(cached) " >&6
24986else
24987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24988/* end confdefs.h. */
24989#include <sys/stat.h>
24990
24991int
24992main ()
24993{
24994#undef $gl_func
24995 (void) $gl_func;
24996 ;
24997 return 0;
24998}
24999_ACEOF
25000if ac_fn_c_try_compile "$LINENO"; then :
25001 eval "$as_gl_Symbol=yes"
25002else
25003 eval "$as_gl_Symbol=no"
25004fi
25005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25006fi
25007eval ac_res=\$$as_gl_Symbol
25008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
25009$as_echo "$ac_res" >&6; }
25010 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
25011 cat >>confdefs.h <<_ACEOF
25012#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
25013_ACEOF
09607c9e 25014
5e8754f9
SDJ
25015 eval ac_cv_have_decl_$gl_func=yes
25016fi
25017 done
09607c9e
TT
25018
25019
25020
25021
25022
25023
25024
25025
25026
25027
25028
725e2999
JB
25029
25030
25031
25032
25033
25034
25035 :
25036
25037
25038
25039
25040
25041
25042
25043
25044 if test $gl_cv_have_include_next = yes; then
25045 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
25046 else
25047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
25048$as_echo_n "checking absolute name of <sys/uio.h>... " >&6; }
25049if ${gl_cv_next_sys_uio_h+:} false; then :
25050 $as_echo_n "(cached) " >&6
25051else
25052
25053 if test $ac_cv_header_sys_uio_h = yes; then
25054
25055
25056
25057
25058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25059/* end confdefs.h. */
25060#include <sys/uio.h>
25061_ACEOF
25062 case "$host_os" in
25063 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25064 *) gl_absname_cpp="$ac_cpp" ;;
25065 esac
25066
25067 case "$host_os" in
25068 mingw*)
25069 gl_dirsep_regex='[/\\]'
25070 ;;
25071 *)
25072 gl_dirsep_regex='\/'
25073 ;;
25074 esac
25075 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25076 gl_header_literal_regex=`echo 'sys/uio.h' \
25077 | sed -e "$gl_make_literal_regex_sed"`
25078 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25079 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25080 s|^/[^/]|//&|
25081 p
25082 q
25083 }'
25084
25085 gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25086 sed -n "$gl_absolute_header_sed"`
25087
25088 gl_header=$gl_cv_absolute_sys_uio_h
25089 gl_cv_next_sys_uio_h='"'$gl_header'"'
25090 else
25091 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
25092 fi
25093
25094
25095fi
25096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
25097$as_echo "$gl_cv_next_sys_uio_h" >&6; }
25098 fi
25099 NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
25100
25101 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25102 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25103 gl_next_as_first_directive='<'sys/uio.h'>'
25104 else
25105 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25106 gl_next_as_first_directive=$gl_cv_next_sys_uio_h
25107 fi
25108 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
25109
25110
25111
25112
25113 if test $ac_cv_header_sys_uio_h = yes; then
25114 HAVE_SYS_UIO_H=1
25115 else
25116 HAVE_SYS_UIO_H=0
25117 fi
25118
25119
25120
25121
25122
2d8adcbd
MM
25123 :
25124
25125
25126
25127
09607c9e
TT
25128
25129
25130
8839a007
PA
25131
25132
25133
25134
09607c9e
TT
25135
25136
8839a007 25137
472fa5ee
SM
25138 :
25139
25140
25141
25142
25143
8839a007
PA
25144
25145
25146
25147 if test $gl_cv_have_include_next = yes; then
25148 gl_cv_next_unistd_h='<'unistd.h'>'
25149 else
25150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
25151$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
d0ac1c44 25152if ${gl_cv_next_unistd_h+:} false; then :
8839a007
PA
25153 $as_echo_n "(cached) " >&6
25154else
25155
25156 if test $ac_cv_header_unistd_h = yes; then
25157
25158
4a626d0a
PA
25159
25160
25161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8839a007
PA
25162/* end confdefs.h. */
25163#include <unistd.h>
8839a007 25164_ACEOF
4a626d0a
PA
25165 case "$host_os" in
25166 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25167 *) gl_absname_cpp="$ac_cpp" ;;
25168 esac
25169
25170 case "$host_os" in
25171 mingw*)
25172 gl_dirsep_regex='[/\\]'
25173 ;;
25174 *)
25175 gl_dirsep_regex='\/'
25176 ;;
25177 esac
25178 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25179 gl_header_literal_regex=`echo 'unistd.h' \
25180 | sed -e "$gl_make_literal_regex_sed"`
25181 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25182 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25183 s|^/[^/]|//&|
25184 p
25185 q
25186 }'
25187
25188 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25189 sed -n "$gl_absolute_header_sed"`
25190
25191 gl_header=$gl_cv_absolute_unistd_h
25192 gl_cv_next_unistd_h='"'$gl_header'"'
8839a007
PA
25193 else
25194 gl_cv_next_unistd_h='<'unistd.h'>'
25195 fi
25196
25197
25198fi
25199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
25200$as_echo "$gl_cv_next_unistd_h" >&6; }
25201 fi
25202 NEXT_UNISTD_H=$gl_cv_next_unistd_h
25203
25204 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25205 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25206 gl_next_as_first_directive='<'unistd.h'>'
25207 else
25208 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25209 gl_next_as_first_directive=$gl_cv_next_unistd_h
25210 fi
25211 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
25212
25213
25214
25215
25216 if test $ac_cv_header_unistd_h = yes; then
25217 HAVE_UNISTD_H=1
25218 else
25219 HAVE_UNISTD_H=0
25220 fi
25221
25222
25223
25224
25225
25226
25227
5e8754f9
SDJ
25228 for gl_func in chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r unlink unlinkat usleep; do
25229 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
25230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
25231$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
25232if eval \${$as_gl_Symbol+:} false; then :
25233 $as_echo_n "(cached) " >&6
25234else
25235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25236/* end confdefs.h. */
25237
25238#if HAVE_UNISTD_H
25239# include <unistd.h>
25240#endif
25241/* Some systems declare various items in the wrong headers. */
25242#if !(defined __GLIBC__ && !defined __UCLIBC__)
25243# include <fcntl.h>
25244# include <stdio.h>
25245# include <stdlib.h>
25246# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
25247# include <io.h>
25248# endif
25249#endif
25250
25251int
25252main ()
25253{
25254#undef $gl_func
25255 (void) $gl_func;
25256 ;
25257 return 0;
25258}
25259_ACEOF
25260if ac_fn_c_try_compile "$LINENO"; then :
25261 eval "$as_gl_Symbol=yes"
25262else
25263 eval "$as_gl_Symbol=no"
25264fi
25265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25266fi
25267eval ac_res=\$$as_gl_Symbol
25268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
25269$as_echo "$ac_res" >&6; }
25270 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
25271 cat >>confdefs.h <<_ACEOF
25272#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
25273_ACEOF
8839a007 25274
5e8754f9
SDJ
25275 eval ac_cv_have_decl_$gl_func=yes
25276fi
25277 done
8839a007
PA
25278
25279
25280
25281
472fa5ee
SM
25282 :
25283
25284
25285
25286
25287
25288
25289
25290
25291
25292 :
25293
8839a007 25294
6ec2e0f5
SDJ
25295
25296
25297
3d99e817
AK
25298 if test $ac_cv_have_decl_unsetenv = no; then
25299 HAVE_DECL_UNSETENV=0
25300 fi
25301 for ac_func in unsetenv
25302do :
25303 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
d0ac1c44 25304if test "x$ac_cv_func_unsetenv" = xyes; then :
3d99e817
AK
25305 cat >>confdefs.h <<_ACEOF
25306#define HAVE_UNSETENV 1
25307_ACEOF
25308
25309fi
25310done
25311
25312 if test $ac_cv_func_unsetenv = no; then
25313 HAVE_UNSETENV=0
25314 else
25315 HAVE_UNSETENV=1
25316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
25317$as_echo_n "checking for unsetenv() return type... " >&6; }
d0ac1c44 25318if ${gt_cv_func_unsetenv_ret+:} false; then :
3d99e817
AK
25319 $as_echo_n "(cached) " >&6
25320else
25321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25322/* end confdefs.h. */
25323
25324#undef _BSD
25325#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
25326#include <stdlib.h>
25327extern
25328#ifdef __cplusplus
25329"C"
25330#endif
25331int unsetenv (const char *name);
25332
25333int
25334main ()
25335{
25336
25337 ;
25338 return 0;
25339}
25340_ACEOF
25341if ac_fn_c_try_compile "$LINENO"; then :
25342 gt_cv_func_unsetenv_ret='int'
25343else
25344 gt_cv_func_unsetenv_ret='void'
25345fi
25346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25347fi
25348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
25349$as_echo "$gt_cv_func_unsetenv_ret" >&6; }
25350 if test $gt_cv_func_unsetenv_ret = 'void'; then
25351
25352$as_echo "#define VOID_UNSETENV 1" >>confdefs.h
25353
25354 REPLACE_UNSETENV=1
25355 fi
25356
25357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
25358$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
d0ac1c44 25359if ${gl_cv_func_unsetenv_works+:} false; then :
3d99e817
AK
25360 $as_echo_n "(cached) " >&6
25361else
25362 if test "$cross_compiling" = yes; then :
25363 case "$host_os" in
25364 # Guess yes on glibc systems.
25365 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
25366 # If we don't know, assume the worst.
25367 *) gl_cv_func_unsetenv_works="guessing no" ;;
25368 esac
25369
25370else
25371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25372/* end confdefs.h. */
25373
25374 #include <stdlib.h>
25375 #include <errno.h>
25376 extern char **environ;
25377
25378int
25379main ()
25380{
25381
25382 char entry1[] = "a=1";
25383 char entry2[] = "b=2";
25384 char *env[] = { entry1, entry2, NULL };
25385 if (putenv ((char *) "a=1")) return 1;
25386 if (putenv (entry2)) return 2;
25387 entry2[0] = 'a';
25388 unsetenv ("a");
25389 if (getenv ("a")) return 3;
25390 if (!unsetenv ("") || errno != EINVAL) return 4;
25391 entry2[0] = 'b';
25392 environ = env;
25393 if (!getenv ("a")) return 5;
25394 entry2[0] = 'a';
25395 unsetenv ("a");
25396 if (getenv ("a")) return 6;
25397
25398 ;
25399 return 0;
25400}
25401_ACEOF
25402if ac_fn_c_try_run "$LINENO"; then :
25403 gl_cv_func_unsetenv_works=yes
25404else
25405 gl_cv_func_unsetenv_works=no
25406fi
25407rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25408 conftest.$ac_objext conftest.beam conftest.$ac_ext
25409fi
25410
25411fi
25412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
25413$as_echo "$gl_cv_func_unsetenv_works" >&6; }
25414 case "$gl_cv_func_unsetenv_works" in
25415 *yes) ;;
25416 *)
25417 REPLACE_UNSETENV=1
25418 ;;
25419 esac
25420 fi
25421
25422 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
25423
25424
25425
25426
25427
25428
25429
25430
25431 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
25432
25433
25434
25435
472fa5ee
SM
25436 :
25437
25438
25439
25440
25441
3d99e817
AK
25442
25443 fi
25444
25445
25446
25447
25448
25449 GNULIB_UNSETENV=1
25450
25451
25452
25453
25454
25455$as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
25456
25457
25458
25459
25460
25461
8839a007
PA
25462
25463
25464
25465
25466
25467
472fa5ee
SM
25468 :
25469
25470
25471
25472
25473
8839a007 25474
8690e634
JK
25475
25476
25477 if test $gl_cv_have_include_next = yes; then
25478 gl_cv_next_wchar_h='<'wchar.h'>'
25479 else
25480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
25481$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
d0ac1c44 25482if ${gl_cv_next_wchar_h+:} false; then :
8690e634
JK
25483 $as_echo_n "(cached) " >&6
25484else
25485
25486 if test $ac_cv_header_wchar_h = yes; then
25487
25488
4a626d0a
PA
25489
25490
25491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
25492/* end confdefs.h. */
25493#include <wchar.h>
8690e634 25494_ACEOF
4a626d0a
PA
25495 case "$host_os" in
25496 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25497 *) gl_absname_cpp="$ac_cpp" ;;
25498 esac
25499
25500 case "$host_os" in
25501 mingw*)
25502 gl_dirsep_regex='[/\\]'
25503 ;;
25504 *)
25505 gl_dirsep_regex='\/'
25506 ;;
25507 esac
25508 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25509 gl_header_literal_regex=`echo 'wchar.h' \
25510 | sed -e "$gl_make_literal_regex_sed"`
25511 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25512 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25513 s|^/[^/]|//&|
25514 p
25515 q
25516 }'
25517
25518 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25519 sed -n "$gl_absolute_header_sed"`
25520
25521 gl_header=$gl_cv_absolute_wchar_h
25522 gl_cv_next_wchar_h='"'$gl_header'"'
8690e634
JK
25523 else
25524 gl_cv_next_wchar_h='<'wchar.h'>'
25525 fi
25526
25527
25528fi
25529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
25530$as_echo "$gl_cv_next_wchar_h" >&6; }
25531 fi
25532 NEXT_WCHAR_H=$gl_cv_next_wchar_h
25533
25534 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25535 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25536 gl_next_as_first_directive='<'wchar.h'>'
25537 else
25538 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25539 gl_next_as_first_directive=$gl_cv_next_wchar_h
25540 fi
25541 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
25542
25543
25544
25545
25546 if test $ac_cv_header_wchar_h = yes; then
25547 HAVE_WCHAR_H=1
25548 else
25549 HAVE_WCHAR_H=0
25550 fi
25551
c971b7fa
PA
25552
25553
25554
25555
8690e634
JK
25556 if test $gt_cv_c_wint_t = yes; then
25557 HAVE_WINT_T=1
25558 else
25559 HAVE_WINT_T=0
25560 fi
c971b7fa
PA
25561
25562
25563
5e8754f9
SDJ
25564 for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth ; do
25565 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
25566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
25567$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
25568if eval \${$as_gl_Symbol+:} false; then :
25569 $as_echo_n "(cached) " >&6
25570else
25571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25572/* end confdefs.h. */
8690e634 25573
5e8754f9
SDJ
25574/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25575 <wchar.h>.
25576 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25577 included before <wchar.h>. */
25578#if !(defined __GLIBC__ && !defined __UCLIBC__)
25579# include <stddef.h>
25580# include <stdio.h>
25581# include <time.h>
25582#endif
25583#include <wchar.h>
c971b7fa 25584
5e8754f9
SDJ
25585int
25586main ()
25587{
25588#undef $gl_func
25589 (void) $gl_func;
25590 ;
25591 return 0;
25592}
25593_ACEOF
25594if ac_fn_c_try_compile "$LINENO"; then :
25595 eval "$as_gl_Symbol=yes"
25596else
25597 eval "$as_gl_Symbol=no"
25598fi
25599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25600fi
25601eval ac_res=\$$as_gl_Symbol
25602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
25603$as_echo "$ac_res" >&6; }
25604 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
25605 cat >>confdefs.h <<_ACEOF
25606#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
25607_ACEOF
c971b7fa 25608
5e8754f9
SDJ
25609 eval ac_cv_have_decl_$gl_func=yes
25610fi
25611 done
8690e634
JK
25612
25613
25614
25615
25616
25617
25618
472fa5ee
SM
25619 :
25620
25621
25622
25623
25624
8690e634
JK
25625 if test $ac_cv_func_iswcntrl = yes; then
25626 HAVE_ISWCNTRL=1
25627 else
25628 HAVE_ISWCNTRL=0
25629 fi
25630
25631
25632
8690e634
JK
25633 if test $gt_cv_c_wint_t = yes; then
25634 HAVE_WINT_T=1
25635 else
25636 HAVE_WINT_T=0
25637 fi
25638
25639
25640
25641
25642
25643
c971b7fa 25644
8690e634 25645
472fa5ee
SM
25646 :
25647
25648
25649
25650
25651
c971b7fa
PA
25652
25653
25654
25655 if test $gl_cv_have_include_next = yes; then
8690e634 25656 gl_cv_next_wctype_h='<'wctype.h'>'
c971b7fa 25657 else
8690e634
JK
25658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
25659$as_echo_n "checking absolute name of <wctype.h>... " >&6; }
d0ac1c44 25660if ${gl_cv_next_wctype_h+:} false; then :
c971b7fa
PA
25661 $as_echo_n "(cached) " >&6
25662else
25663
8690e634
JK
25664 if test $ac_cv_header_wctype_h = yes; then
25665
25666
4a626d0a
PA
25667
25668
25669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 25670/* end confdefs.h. */
8690e634 25671#include <wctype.h>
c971b7fa 25672_ACEOF
4a626d0a
PA
25673 case "$host_os" in
25674 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25675 *) gl_absname_cpp="$ac_cpp" ;;
25676 esac
25677
25678 case "$host_os" in
25679 mingw*)
25680 gl_dirsep_regex='[/\\]'
25681 ;;
25682 *)
25683 gl_dirsep_regex='\/'
25684 ;;
25685 esac
25686 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25687 gl_header_literal_regex=`echo 'wctype.h' \
25688 | sed -e "$gl_make_literal_regex_sed"`
25689 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25690 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25691 s|^/[^/]|//&|
25692 p
25693 q
25694 }'
25695
25696 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25697 sed -n "$gl_absolute_header_sed"`
25698
25699 gl_header=$gl_cv_absolute_wctype_h
25700 gl_cv_next_wctype_h='"'$gl_header'"'
8690e634
JK
25701 else
25702 gl_cv_next_wctype_h='<'wctype.h'>'
25703 fi
c971b7fa
PA
25704
25705
25706fi
8690e634
JK
25707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
25708$as_echo "$gl_cv_next_wctype_h" >&6; }
c971b7fa 25709 fi
8690e634 25710 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
c971b7fa
PA
25711
25712 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25713 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8690e634 25714 gl_next_as_first_directive='<'wctype.h'>'
c971b7fa
PA
25715 else
25716 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8690e634 25717 gl_next_as_first_directive=$gl_cv_next_wctype_h
c971b7fa 25718 fi
8690e634
JK
25719 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
25720
25721
25722
25723
25724 if test $ac_cv_header_wctype_h = yes; then
25725 if test $ac_cv_func_iswcntrl = yes; then
25726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
25727$as_echo_n "checking whether iswcntrl works... " >&6; }
d0ac1c44 25728if ${gl_cv_func_iswcntrl_works+:} false; then :
8690e634
JK
25729 $as_echo_n "(cached) " >&6
25730else
25731
25732 if test "$cross_compiling" = yes; then :
5e8754f9 25733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
25734/* end confdefs.h. */
25735#include <stdlib.h>
25736 #if __GNU_LIBRARY__ == 1
25737 Linux libc5 i18n is broken.
25738 #endif
25739int
25740main ()
25741{
25742
25743 ;
25744 return 0;
25745}
25746_ACEOF
25747if ac_fn_c_try_compile "$LINENO"; then :
25748 gl_cv_func_iswcntrl_works="guessing yes"
25749else
25750 gl_cv_func_iswcntrl_works="guessing no"
25751fi
25752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25753
25754else
25755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25756/* end confdefs.h. */
25757
25758 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
25759 included before <wchar.h>.
25760 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
25761 must be included before <wchar.h>. */
25762 #include <stddef.h>
25763 #include <stdio.h>
25764 #include <time.h>
25765 #include <wchar.h>
25766 #include <wctype.h>
25767 int main () { return iswprint ('x') == 0; }
25768
25769_ACEOF
25770if ac_fn_c_try_run "$LINENO"; then :
25771 gl_cv_func_iswcntrl_works=yes
25772else
25773 gl_cv_func_iswcntrl_works=no
25774fi
25775rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25776 conftest.$ac_objext conftest.beam conftest.$ac_ext
25777fi
25778
25779
25780fi
25781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
25782$as_echo "$gl_cv_func_iswcntrl_works" >&6; }
25783 fi
25784 HAVE_WCTYPE_H=1
25785 else
25786 HAVE_WCTYPE_H=0
25787 fi
25788
25789
25790 case "$gl_cv_func_iswcntrl_works" in
25791 *yes) REPLACE_ISWCNTRL=0 ;;
25792 *) REPLACE_ISWCNTRL=1 ;;
25793 esac
25794
25795
25796 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
25797 :
25798 fi
25799
25800 if test $REPLACE_ISWCNTRL = 1; then
25801 REPLACE_TOWLOWER=1
25802 else
25803 for ac_func in towlower
25804do :
25805 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
d0ac1c44 25806if test "x$ac_cv_func_towlower" = xyes; then :
8690e634
JK
25807 cat >>confdefs.h <<_ACEOF
25808#define HAVE_TOWLOWER 1
25809_ACEOF
25810
25811fi
25812done
25813
25814 if test $ac_cv_func_towlower = yes; then
25815 REPLACE_TOWLOWER=0
25816 else
25817 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
25818 included before <wchar.h>.
25819 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
25820 must be included before <wchar.h>. */
25821 #include <stddef.h>
25822 #include <stdio.h>
25823 #include <time.h>
25824 #include <wchar.h>
25825 #if HAVE_WCTYPE_H
25826 # include <wctype.h>
25827 #endif
25828
25829"
d0ac1c44 25830if test "x$ac_cv_have_decl_towlower" = xyes; then :
8690e634
JK
25831 ac_have_decl=1
25832else
25833 ac_have_decl=0
25834fi
25835
25836cat >>confdefs.h <<_ACEOF
25837#define HAVE_DECL_TOWLOWER $ac_have_decl
25838_ACEOF
25839
25840 if test $ac_cv_have_decl_towlower = yes; then
25841 REPLACE_TOWLOWER=1
25842 else
25843 REPLACE_TOWLOWER=0
25844 fi
25845 fi
25846 fi
25847
25848
25849 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
25850 :
25851 fi
25852
25853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
25854$as_echo_n "checking for wctype_t... " >&6; }
d0ac1c44 25855if ${gl_cv_type_wctype_t+:} false; then :
8690e634
JK
25856 $as_echo_n "(cached) " >&6
25857else
25858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25859/* end confdefs.h. */
25860/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
25861 included before <wchar.h>.
25862 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
25863 must be included before <wchar.h>. */
25864 #include <stddef.h>
25865 #include <stdio.h>
25866 #include <time.h>
25867 #include <wchar.h>
25868 #if HAVE_WCTYPE_H
25869 # include <wctype.h>
25870 #endif
25871 wctype_t a;
25872
25873int
25874main ()
25875{
25876
25877 ;
25878 return 0;
25879}
25880_ACEOF
25881if ac_fn_c_try_compile "$LINENO"; then :
25882 gl_cv_type_wctype_t=yes
25883else
25884 gl_cv_type_wctype_t=no
25885fi
25886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 25887
8690e634
JK
25888fi
25889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
25890$as_echo "$gl_cv_type_wctype_t" >&6; }
25891 if test $gl_cv_type_wctype_t = no; then
25892 HAVE_WCTYPE_T=0
25893 fi
25894
25895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
25896$as_echo_n "checking for wctrans_t... " >&6; }
d0ac1c44 25897if ${gl_cv_type_wctrans_t+:} false; then :
8690e634
JK
25898 $as_echo_n "(cached) " >&6
25899else
25900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25901/* end confdefs.h. */
25902/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
25903 included before <wchar.h>.
25904 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
25905 must be included before <wchar.h>. */
25906 #include <stddef.h>
25907 #include <stdio.h>
25908 #include <time.h>
25909 #include <wchar.h>
25910 #include <wctype.h>
25911 wctrans_t a;
c971b7fa 25912
8690e634
JK
25913int
25914main ()
25915{
c971b7fa 25916
8690e634
JK
25917 ;
25918 return 0;
25919}
25920_ACEOF
25921if ac_fn_c_try_compile "$LINENO"; then :
25922 gl_cv_type_wctrans_t=yes
25923else
25924 gl_cv_type_wctrans_t=no
25925fi
25926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 25927
8690e634
JK
25928fi
25929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
25930$as_echo "$gl_cv_type_wctrans_t" >&6; }
25931 if test $gl_cv_type_wctrans_t = no; then
25932 HAVE_WCTRANS_T=0
c971b7fa
PA
25933 fi
25934
25935
5e8754f9
SDJ
25936 for gl_func in wctype iswctype wctrans towctrans ; do
25937 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
25938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
25939$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
25940if eval \${$as_gl_Symbol+:} false; then :
25941 $as_echo_n "(cached) " >&6
25942else
25943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25944/* end confdefs.h. */
25945
25946/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25947 <wchar.h>.
25948 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25949 included before <wchar.h>. */
25950#if !(defined __GLIBC__ && !defined __UCLIBC__)
25951# include <stddef.h>
25952# include <stdio.h>
25953# include <time.h>
25954# include <wchar.h>
25955#endif
25956#include <wctype.h>
25957
25958int
25959main ()
25960{
25961#undef $gl_func
25962 (void) $gl_func;
25963 ;
25964 return 0;
25965}
25966_ACEOF
25967if ac_fn_c_try_compile "$LINENO"; then :
25968 eval "$as_gl_Symbol=yes"
25969else
25970 eval "$as_gl_Symbol=no"
25971fi
25972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25973fi
25974eval ac_res=\$$as_gl_Symbol
25975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
25976$as_echo "$ac_res" >&6; }
25977 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
25978 cat >>confdefs.h <<_ACEOF
25979#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
25980_ACEOF
c971b7fa 25981
5e8754f9
SDJ
25982 eval ac_cv_have_decl_$gl_func=yes
25983fi
25984 done
c971b7fa
PA
25985
25986
25987 # End of code from modules
25988
25989
25990
25991
25992
25993
25994
25995
25996
25997 gltests_libdeps=
25998 gltests_ltlibdeps=
25999
26000
26001
26002
26003
26004
26005
26006
26007
26008 gl_source_base='tests'
26009 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
26010
26011 gl_module_indicator_condition=$gltests_WITNESS
26012
26013
26014
26015
26016
26017
26018
26019
26020
26021 LIBGNU_LIBDEPS="$gl_libdeps"
26022
26023 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
26024
26025
26026
26027# We don't use automake, but gnulib does. This line lets us generate
26028# its Makefile.in.
d0ac1c44 26029am__api_version='1.15'
c971b7fa
PA
26030
26031# Find a good install program. We prefer a C program (faster),
26032# so one script is as good as another. But avoid the broken or
26033# incompatible versions:
26034# SysV /etc/install, /usr/sbin/install
26035# SunOS /usr/etc/install
26036# IRIX /sbin/install
26037# AIX /bin/install
26038# AmigaOS /C/install, which installs bootblocks on floppy discs
26039# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
26040# AFS /usr/afsws/bin/install, which mishandles nonexistent args
26041# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
26042# OS/2's system install, which has a completely different semantic
26043# ./install, which can be erroneously created by make from ./install.sh.
26044# Reject install programs that cannot install multiple files.
26045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
26046$as_echo_n "checking for a BSD-compatible install... " >&6; }
26047if test -z "$INSTALL"; then
d0ac1c44 26048if ${ac_cv_path_install+:} false; then :
c971b7fa
PA
26049 $as_echo_n "(cached) " >&6
26050else
26051 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26052for as_dir in $PATH
26053do
26054 IFS=$as_save_IFS
26055 test -z "$as_dir" && as_dir=.
26056 # Account for people who put trailing slashes in PATH elements.
26057case $as_dir/ in #((
26058 ./ | .// | /[cC]/* | \
26059 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
26060 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
26061 /usr/ucb/* ) ;;
26062 *)
26063 # OSF1 and SCO ODT 3.0 have their own names for install.
26064 # Don't use installbsd from OSF since it installs stuff as root
26065 # by default.
26066 for ac_prog in ginstall scoinst install; do
26067 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 26068 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
c971b7fa
PA
26069 if test $ac_prog = install &&
26070 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
26071 # AIX install. It has an incompatible calling convention.
26072 :
26073 elif test $ac_prog = install &&
26074 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
26075 # program-specific install script used by HP pwplus--don't use.
26076 :
26077 else
26078 rm -rf conftest.one conftest.two conftest.dir
26079 echo one > conftest.one
26080 echo two > conftest.two
26081 mkdir conftest.dir
26082 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
26083 test -s conftest.one && test -s conftest.two &&
26084 test -s conftest.dir/conftest.one &&
26085 test -s conftest.dir/conftest.two
26086 then
26087 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
26088 break 3
26089 fi
26090 fi
26091 fi
26092 done
26093 done
26094 ;;
26095esac
26096
26097 done
26098IFS=$as_save_IFS
26099
26100rm -rf conftest.one conftest.two conftest.dir
26101
26102fi
26103 if test "${ac_cv_path_install+set}" = set; then
26104 INSTALL=$ac_cv_path_install
26105 else
26106 # As a last resort, use the slow shell script. Don't cache a
26107 # value for INSTALL within a source directory, because that will
26108 # break other packages using the cache if that directory is
26109 # removed, or if the value is a relative name.
26110 INSTALL=$ac_install_sh
26111 fi
26112fi
26113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
26114$as_echo "$INSTALL" >&6; }
26115
26116# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
26117# It thinks the first close brace ends the variable substitution.
26118test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
26119
26120test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
26121
26122test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
26123
26124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
26125$as_echo_n "checking whether build environment is sane... " >&6; }
c971b7fa
PA
26126# Reject unsafe characters in $srcdir or the absolute working directory
26127# name. Accept space and tab only in the latter.
26128am_lf='
26129'
26130case `pwd` in
26131 *[\\\"\#\$\&\'\`$am_lf]*)
d0ac1c44 26132 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
c971b7fa
PA
26133esac
26134case $srcdir in
26135 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
d0ac1c44 26136 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
c971b7fa
PA
26137esac
26138
d0ac1c44 26139# Do 'set' in a subshell so we don't clobber the current shell's
c971b7fa
PA
26140# arguments. Must try -L first in case configure is actually a
26141# symlink; some systems play weird games with the mod time of symlinks
26142# (eg FreeBSD returns the mod time of the symlink's containing
26143# directory).
26144if (
d0ac1c44
SM
26145 am_has_slept=no
26146 for am_try in 1 2; do
26147 echo "timestamp, slept: $am_has_slept" > conftest.file
26148 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
26149 if test "$*" = "X"; then
26150 # -L didn't work.
26151 set X `ls -t "$srcdir/configure" conftest.file`
26152 fi
26153 if test "$*" != "X $srcdir/configure conftest.file" \
26154 && test "$*" != "X conftest.file $srcdir/configure"; then
26155
26156 # If neither matched, then we have a broken ls. This can happen
26157 # if, for instance, CONFIG_SHELL is bash and it inherits a
26158 # broken ls alias from the environment. This has actually
26159 # happened. Such a system could not be considered "sane".
26160 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
26161 alias in your environment" "$LINENO" 5
26162 fi
26163 if test "$2" = conftest.file || test $am_try -eq 2; then
26164 break
26165 fi
26166 # Just in case.
26167 sleep 1
26168 am_has_slept=yes
26169 done
c971b7fa
PA
26170 test "$2" = conftest.file
26171 )
26172then
26173 # Ok.
26174 :
26175else
d0ac1c44 26176 as_fn_error $? "newly created file is older than distributed files!
c971b7fa
PA
26177Check your system clock" "$LINENO" 5
26178fi
26179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26180$as_echo "yes" >&6; }
d0ac1c44
SM
26181# If we didn't sleep, we still need to ensure time stamps of config.status and
26182# generated files are strictly newer.
26183am_sleep_pid=
26184if grep 'slept: no' conftest.file >/dev/null 2>&1; then
26185 ( sleep 1 ) &
26186 am_sleep_pid=$!
26187fi
26188
26189rm -f conftest.file
26190
c971b7fa
PA
26191test "$program_prefix" != NONE &&
26192 program_transform_name="s&^&$program_prefix&;$program_transform_name"
26193# Use a double $ so make ignores it.
26194test "$program_suffix" != NONE &&
26195 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
26196# Double any \ or $.
26197# By default was `s,x,x', remove it if useless.
26198ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
26199program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
26200
c971b7fa
PA
26201if test x"${MISSING+set}" != xset; then
26202 case $am_aux_dir in
26203 *\ * | *\ *)
26204 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
26205 *)
26206 MISSING="\${SHELL} $am_aux_dir/missing" ;;
26207 esac
26208fi
26209# Use eval to expand $SHELL
d0ac1c44
SM
26210if eval "$MISSING --is-lightweight"; then
26211 am_missing_run="$MISSING "
c971b7fa
PA
26212else
26213 am_missing_run=
d0ac1c44
SM
26214 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
26215$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
c971b7fa
PA
26216fi
26217
d0ac1c44 26218if test x"${install_sh+set}" != xset; then
c971b7fa
PA
26219 case $am_aux_dir in
26220 *\ * | *\ *)
26221 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
26222 *)
26223 install_sh="\${SHELL} $am_aux_dir/install-sh"
26224 esac
26225fi
26226
d0ac1c44
SM
26227# Installed binaries are usually stripped using 'strip' when the user
26228# run "make install-strip". However 'strip' might not be the right
c971b7fa 26229# tool to use in cross-compilation environments, therefore Automake
d0ac1c44 26230# will honor the 'STRIP' environment variable to overrule this program.
c971b7fa
PA
26231if test "$cross_compiling" != no; then
26232 if test -n "$ac_tool_prefix"; then
26233 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
26234set dummy ${ac_tool_prefix}strip; ac_word=$2
26235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26236$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 26237if ${ac_cv_prog_STRIP+:} false; then :
c971b7fa
PA
26238 $as_echo_n "(cached) " >&6
26239else
26240 if test -n "$STRIP"; then
26241 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
26242else
26243as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26244for as_dir in $PATH
26245do
26246 IFS=$as_save_IFS
26247 test -z "$as_dir" && as_dir=.
26248 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 26249 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
26250 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
26251 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26252 break 2
26253 fi
26254done
26255 done
26256IFS=$as_save_IFS
26257
26258fi
26259fi
26260STRIP=$ac_cv_prog_STRIP
26261if test -n "$STRIP"; then
26262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26263$as_echo "$STRIP" >&6; }
26264else
26265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26266$as_echo "no" >&6; }
26267fi
26268
26269
26270fi
26271if test -z "$ac_cv_prog_STRIP"; then
26272 ac_ct_STRIP=$STRIP
26273 # Extract the first word of "strip", so it can be a program name with args.
26274set dummy strip; ac_word=$2
26275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26276$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 26277if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
c971b7fa
PA
26278 $as_echo_n "(cached) " >&6
26279else
26280 if test -n "$ac_ct_STRIP"; then
26281 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
26282else
26283as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26284for as_dir in $PATH
26285do
26286 IFS=$as_save_IFS
26287 test -z "$as_dir" && as_dir=.
26288 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 26289 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
26290 ac_cv_prog_ac_ct_STRIP="strip"
26291 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26292 break 2
26293 fi
26294done
26295 done
26296IFS=$as_save_IFS
26297
26298fi
26299fi
26300ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
26301if test -n "$ac_ct_STRIP"; then
26302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
26303$as_echo "$ac_ct_STRIP" >&6; }
26304else
26305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26306$as_echo "no" >&6; }
26307fi
26308
26309 if test "x$ac_ct_STRIP" = x; then
26310 STRIP=":"
26311 else
26312 case $cross_compiling:$ac_tool_warned in
26313yes:)
26314{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26315$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26316ac_tool_warned=yes ;;
26317esac
26318 STRIP=$ac_ct_STRIP
26319 fi
26320else
26321 STRIP="$ac_cv_prog_STRIP"
26322fi
26323
26324fi
26325INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
26326
c971b7fa
PA
26327for ac_prog in gawk mawk nawk awk
26328do
26329 # Extract the first word of "$ac_prog", so it can be a program name with args.
26330set dummy $ac_prog; ac_word=$2
26331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26332$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 26333if ${ac_cv_prog_AWK+:} false; then :
c971b7fa
PA
26334 $as_echo_n "(cached) " >&6
26335else
26336 if test -n "$AWK"; then
26337 ac_cv_prog_AWK="$AWK" # Let the user override the test.
26338else
26339as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26340for as_dir in $PATH
26341do
26342 IFS=$as_save_IFS
26343 test -z "$as_dir" && as_dir=.
26344 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 26345 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
26346 ac_cv_prog_AWK="$ac_prog"
26347 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26348 break 2
26349 fi
26350done
26351 done
26352IFS=$as_save_IFS
26353
26354fi
26355fi
26356AWK=$ac_cv_prog_AWK
26357if test -n "$AWK"; then
26358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
26359$as_echo "$AWK" >&6; }
26360else
26361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26362$as_echo "no" >&6; }
26363fi
26364
26365
26366 test -n "$AWK" && break
26367done
26368
26369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
26370$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
26371set x ${MAKE-make}
26372ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
d0ac1c44 26373if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
c971b7fa
PA
26374 $as_echo_n "(cached) " >&6
26375else
26376 cat >conftest.make <<\_ACEOF
26377SHELL = /bin/sh
26378all:
26379 @echo '@@@%%%=$(MAKE)=@@@%%%'
26380_ACEOF
d0ac1c44 26381# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
c971b7fa
PA
26382case `${MAKE-make} -f conftest.make 2>/dev/null` in
26383 *@@@%%%=?*=@@@%%%*)
26384 eval ac_cv_prog_make_${ac_make}_set=yes;;
26385 *)
26386 eval ac_cv_prog_make_${ac_make}_set=no;;
26387esac
26388rm -f conftest.make
26389fi
26390if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
26391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26392$as_echo "yes" >&6; }
26393 SET_MAKE=
26394else
26395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26396$as_echo "no" >&6; }
26397 SET_MAKE="MAKE=${MAKE-make}"
26398fi
26399
26400rm -rf .tst 2>/dev/null
26401mkdir .tst 2>/dev/null
26402if test -d .tst; then
26403 am__leading_dot=.
26404else
26405 am__leading_dot=_
26406fi
26407rmdir .tst 2>/dev/null
26408
26409DEPDIR="${am__leading_dot}deps"
26410
26411ac_config_commands="$ac_config_commands depfiles"
26412
26413
26414am_make=${MAKE-make}
26415cat > confinc << 'END'
26416am__doit:
26417 @echo this is the am__doit target
26418.PHONY: am__doit
26419END
26420# If we don't find an include directive, just comment out the code.
26421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
26422$as_echo_n "checking for style of include used by $am_make... " >&6; }
26423am__include="#"
26424am__quote=
26425_am_result=none
26426# First try GNU make style include.
26427echo "include confinc" > confmf
d0ac1c44 26428# Ignore all kinds of additional output from 'make'.
c971b7fa
PA
26429case `$am_make -s -f confmf 2> /dev/null` in #(
26430*the\ am__doit\ target*)
26431 am__include=include
26432 am__quote=
26433 _am_result=GNU
26434 ;;
26435esac
26436# Now try BSD make style include.
26437if test "$am__include" = "#"; then
26438 echo '.include "confinc"' > confmf
26439 case `$am_make -s -f confmf 2> /dev/null` in #(
26440 *the\ am__doit\ target*)
26441 am__include=.include
26442 am__quote="\""
26443 _am_result=BSD
26444 ;;
26445 esac
26446fi
26447
26448
26449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
26450$as_echo "$_am_result" >&6; }
26451rm -f confinc confmf
26452
26453# Check whether --enable-dependency-tracking was given.
26454if test "${enable_dependency_tracking+set}" = set; then :
26455 enableval=$enable_dependency_tracking;
26456fi
26457
26458if test "x$enable_dependency_tracking" != xno; then
26459 am_depcomp="$ac_aux_dir/depcomp"
26460 AMDEPBACKSLASH='\'
d0ac1c44 26461 am__nodep='_no'
c971b7fa
PA
26462fi
26463 if test "x$enable_dependency_tracking" != xno; then
26464 AMDEP_TRUE=
26465 AMDEP_FALSE='#'
26466else
26467 AMDEP_TRUE='#'
26468 AMDEP_FALSE=
26469fi
26470
26471
d0ac1c44
SM
26472# Check whether --enable-silent-rules was given.
26473if test "${enable_silent_rules+set}" = set; then :
26474 enableval=$enable_silent_rules;
26475fi
26476
26477case $enable_silent_rules in # (((
26478 yes) AM_DEFAULT_VERBOSITY=0;;
26479 no) AM_DEFAULT_VERBOSITY=1;;
26480 *) AM_DEFAULT_VERBOSITY=1;;
26481esac
26482am_make=${MAKE-make}
26483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
26484$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
26485if ${am_cv_make_support_nested_variables+:} false; then :
26486 $as_echo_n "(cached) " >&6
26487else
26488 if $as_echo 'TRUE=$(BAR$(V))
26489BAR0=false
26490BAR1=true
26491V=1
26492am__doit:
26493 @$(TRUE)
26494.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
26495 am_cv_make_support_nested_variables=yes
26496else
26497 am_cv_make_support_nested_variables=no
26498fi
26499fi
26500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
26501$as_echo "$am_cv_make_support_nested_variables" >&6; }
26502if test $am_cv_make_support_nested_variables = yes; then
26503 AM_V='$(V)'
26504 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
26505else
26506 AM_V=$AM_DEFAULT_VERBOSITY
26507 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
26508fi
26509AM_BACKSLASH='\'
26510
c971b7fa
PA
26511if test "`cd $srcdir && pwd`" != "`pwd`"; then
26512 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
26513 # is not polluted with repeated "-I."
26514 am__isrc=' -I$(srcdir)'
26515 # test to see if srcdir already configured
26516 if test -f $srcdir/config.status; then
d0ac1c44 26517 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
c971b7fa
PA
26518 fi
26519fi
26520
26521# test whether we have cygpath
26522if test -z "$CYGPATH_W"; then
26523 if (cygpath --version) >/dev/null 2>/dev/null; then
26524 CYGPATH_W='cygpath -w'
26525 else
26526 CYGPATH_W=echo
26527 fi
26528fi
26529
26530
26531# Define the identity of the package.
d0ac1c44
SM
26532 PACKAGE='libgnu'
26533 VERSION='UNUSED-VERSION'
c971b7fa
PA
26534
26535
26536# Some tools Automake needs.
26537
26538ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
26539
26540
26541AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
26542
26543
26544AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
26545
26546
26547AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
26548
26549
26550MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
26551
d0ac1c44
SM
26552# For better backward compatibility. To be removed once Automake 1.9.x
26553# dies out for good. For more background, see:
26554# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
26555# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
26556mkdir_p='$(MKDIR_P)'
26557
26558# We need awk for the "check" target (and possibly the TAP driver). The
26559# system "awk" is bad on some platforms.
26560# Always define AMTAR for backward compatibility. Yes, it's still used
26561# in the wild :-( We should find a proper way to deprecate it ...
26562AMTAR='$${TAR-tar}'
26563
26564
26565# We'll loop over all known methods to create a tar archive until one works.
26566_am_tools='gnutar pax cpio none'
c971b7fa 26567
d0ac1c44 26568am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
c971b7fa 26569
c971b7fa
PA
26570
26571
26572
26573
26574depcc="$CC" am_compiler_list=
26575
26576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
26577$as_echo_n "checking dependency style of $depcc... " >&6; }
d0ac1c44 26578if ${am_cv_CC_dependencies_compiler_type+:} false; then :
c971b7fa
PA
26579 $as_echo_n "(cached) " >&6
26580else
26581 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
26582 # We make a subdir and do the tests there. Otherwise we can end up
26583 # making bogus files that we don't know about and never remove. For
26584 # instance it was reported that on HP-UX the gcc test will end up
d0ac1c44
SM
26585 # making a dummy file named 'D' -- because '-MD' means "put the output
26586 # in D".
26587 rm -rf conftest.dir
c971b7fa
PA
26588 mkdir conftest.dir
26589 # Copy depcomp to subdir because otherwise we won't find it if we're
26590 # using a relative directory.
26591 cp "$am_depcomp" conftest.dir
26592 cd conftest.dir
26593 # We will build objects and dependencies in a subdirectory because
26594 # it helps to detect inapplicable dependency modes. For instance
26595 # both Tru64's cc and ICC support -MD to output dependencies as a
26596 # side effect of compilation, but ICC will put the dependencies in
26597 # the current directory while Tru64 will put them in the object
26598 # directory.
26599 mkdir sub
26600
26601 am_cv_CC_dependencies_compiler_type=none
26602 if test "$am_compiler_list" = ""; then
26603 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
26604 fi
26605 am__universal=false
26606 case " $depcc " in #(
26607 *\ -arch\ *\ -arch\ *) am__universal=true ;;
26608 esac
26609
26610 for depmode in $am_compiler_list; do
26611 # Setup a source with many dependencies, because some compilers
26612 # like to wrap large dependency lists on column 80 (with \), and
26613 # we should not choose a depcomp mode which is confused by this.
26614 #
26615 # We need to recreate these files for each test, as the compiler may
26616 # overwrite some of them when testing with obscure command lines.
26617 # This happens at least with the AIX C compiler.
26618 : > sub/conftest.c
26619 for i in 1 2 3 4 5 6; do
26620 echo '#include "conftst'$i'.h"' >> sub/conftest.c
d0ac1c44
SM
26621 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
26622 # Solaris 10 /bin/sh.
26623 echo '/* dummy */' > sub/conftst$i.h
c971b7fa
PA
26624 done
26625 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
26626
d0ac1c44 26627 # We check with '-c' and '-o' for the sake of the "dashmstdout"
c971b7fa 26628 # mode. It turns out that the SunPro C++ compiler does not properly
d0ac1c44
SM
26629 # handle '-M -o', and we need to detect this. Also, some Intel
26630 # versions had trouble with output in subdirs.
c971b7fa
PA
26631 am__obj=sub/conftest.${OBJEXT-o}
26632 am__minus_obj="-o $am__obj"
26633 case $depmode in
26634 gcc)
26635 # This depmode causes a compiler race in universal mode.
26636 test "$am__universal" = false || continue
26637 ;;
26638 nosideeffect)
d0ac1c44
SM
26639 # After this tag, mechanisms are not by side-effect, so they'll
26640 # only be used when explicitly requested.
c971b7fa
PA
26641 if test "x$enable_dependency_tracking" = xyes; then
26642 continue
26643 else
26644 break
26645 fi
26646 ;;
d0ac1c44
SM
26647 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
26648 # This compiler won't grok '-c -o', but also, the minuso test has
c971b7fa
PA
26649 # not run yet. These depmodes are late enough in the game, and
26650 # so weak that their functioning should not be impacted.
26651 am__obj=conftest.${OBJEXT-o}
26652 am__minus_obj=
26653 ;;
26654 none) break ;;
26655 esac
26656 if depmode=$depmode \
26657 source=sub/conftest.c object=$am__obj \
26658 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
26659 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
26660 >/dev/null 2>conftest.err &&
26661 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
26662 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
26663 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
26664 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
26665 # icc doesn't choke on unknown options, it will just issue warnings
26666 # or remarks (even with -Werror). So we grep stderr for any message
26667 # that says an option was ignored or not supported.
26668 # When given -MP, icc 7.0 and 7.1 complain thusly:
26669 # icc: Command line warning: ignoring option '-M'; no argument required
26670 # The diagnosis changed in icc 8.0:
26671 # icc: Command line remark: option '-MP' not supported
26672 if (grep 'ignoring option' conftest.err ||
26673 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
26674 am_cv_CC_dependencies_compiler_type=$depmode
26675 break
26676 fi
26677 fi
26678 done
26679
26680 cd ..
26681 rm -rf conftest.dir
26682else
26683 am_cv_CC_dependencies_compiler_type=none
26684fi
26685
26686fi
26687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
26688$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
26689CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
26690
26691 if
26692 test "x$enable_dependency_tracking" != xno \
26693 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
26694 am__fastdepCC_TRUE=
26695 am__fastdepCC_FALSE='#'
26696else
26697 am__fastdepCC_TRUE='#'
26698 am__fastdepCC_FALSE=
26699fi
26700
26701
26702
d0ac1c44
SM
26703# POSIX will say in a future version that running "rm -f" with no argument
26704# is OK; and we want to be able to make that assumption in our Makefile
26705# recipes. So use an aggressive probe to check that the usage we want is
26706# actually supported "in the wild" to an acceptable degree.
26707# See automake bug#10828.
26708# To make any issue more visible, cause the running configure to be aborted
26709# by default if the 'rm' program in use doesn't match our expectations; the
26710# user can still override this though.
26711if rm -f && rm -fr && rm -rf; then : OK; else
26712 cat >&2 <<'END'
26713Oops!
26714
26715Your 'rm' program seems unable to run without file operands specified
26716on the command line, even when the '-f' option is present. This is contrary
26717to the behaviour of most rm programs out there, and not conforming with
26718the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
26719
26720Please tell bug-automake@gnu.org about your system, including the value
26721of your $PATH and any error possibly output before this message. This
26722can help us improve future automake versions.
26723
26724END
26725 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
26726 echo 'Configuration will proceed anyway, since you have set the' >&2
26727 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
26728 echo >&2
26729 else
26730 cat >&2 <<'END'
26731Aborting the configuration process, to ensure you take notice of the issue.
26732
26733You can download and install GNU coreutils to get an 'rm' implementation
26734that behaves properly: <http://www.gnu.org/software/coreutils/>.
26735
26736If you want to complete the configuration process using your problematic
26737'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
26738to "yes", and re-run configure.
26739
26740END
26741 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
26742 fi
26743fi
26744
c971b7fa 26745
39be3c7e
SM
26746# Check whether --enable-silent-rules was given.
26747if test "${enable_silent_rules+set}" = set; then :
26748 enableval=$enable_silent_rules;
26749fi
26750
d0ac1c44
SM
26751case $enable_silent_rules in # (((
26752 yes) AM_DEFAULT_VERBOSITY=0;;
26753 no) AM_DEFAULT_VERBOSITY=1;;
26754 *) AM_DEFAULT_VERBOSITY=0;;
39be3c7e 26755esac
d0ac1c44
SM
26756am_make=${MAKE-make}
26757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
26758$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
26759if ${am_cv_make_support_nested_variables+:} false; then :
26760 $as_echo_n "(cached) " >&6
26761else
26762 if $as_echo 'TRUE=$(BAR$(V))
26763BAR0=false
26764BAR1=true
26765V=1
26766am__doit:
26767 @$(TRUE)
26768.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
26769 am_cv_make_support_nested_variables=yes
26770else
26771 am_cv_make_support_nested_variables=no
26772fi
26773fi
26774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
26775$as_echo "$am_cv_make_support_nested_variables" >&6; }
26776if test $am_cv_make_support_nested_variables = yes; then
26777 AM_V='$(V)'
26778 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
26779else
26780 AM_V=$AM_DEFAULT_VERBOSITY
26781 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
26782fi
39be3c7e
SM
26783AM_BACKSLASH='\'
26784
26785
c971b7fa
PA
26786# --------------------- #
26787# Checks for programs. #
26788# --------------------- #
26789
26790
26791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
26792$as_echo_n "checking whether ln -s works... " >&6; }
26793LN_S=$as_ln_s
26794if test "$LN_S" = "ln -s"; then
26795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26796$as_echo "yes" >&6; }
26797else
26798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
26799$as_echo "no, using $LN_S" >&6; }
26800fi
26801
26802if test -n "$ac_tool_prefix"; then
26803 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
26804set dummy ${ac_tool_prefix}ranlib; ac_word=$2
26805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26806$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 26807if ${ac_cv_prog_RANLIB+:} false; then :
c971b7fa
PA
26808 $as_echo_n "(cached) " >&6
26809else
26810 if test -n "$RANLIB"; then
26811 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
26812else
26813as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26814for as_dir in $PATH
26815do
26816 IFS=$as_save_IFS
26817 test -z "$as_dir" && as_dir=.
26818 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 26819 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
26820 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
26821 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26822 break 2
26823 fi
26824done
26825 done
26826IFS=$as_save_IFS
26827
26828fi
26829fi
26830RANLIB=$ac_cv_prog_RANLIB
26831if test -n "$RANLIB"; then
26832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
26833$as_echo "$RANLIB" >&6; }
26834else
26835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26836$as_echo "no" >&6; }
26837fi
26838
26839
26840fi
26841if test -z "$ac_cv_prog_RANLIB"; then
26842 ac_ct_RANLIB=$RANLIB
26843 # Extract the first word of "ranlib", so it can be a program name with args.
26844set dummy ranlib; ac_word=$2
26845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26846$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 26847if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
c971b7fa
PA
26848 $as_echo_n "(cached) " >&6
26849else
26850 if test -n "$ac_ct_RANLIB"; then
26851 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
26852else
26853as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26854for as_dir in $PATH
26855do
26856 IFS=$as_save_IFS
26857 test -z "$as_dir" && as_dir=.
26858 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 26859 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
26860 ac_cv_prog_ac_ct_RANLIB="ranlib"
26861 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26862 break 2
26863 fi
26864done
26865 done
26866IFS=$as_save_IFS
26867
26868fi
26869fi
26870ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
26871if test -n "$ac_ct_RANLIB"; then
26872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
26873$as_echo "$ac_ct_RANLIB" >&6; }
26874else
26875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26876$as_echo "no" >&6; }
26877fi
26878
26879 if test "x$ac_ct_RANLIB" = x; then
26880 RANLIB=":"
26881 else
26882 case $cross_compiling:$ac_tool_warned in
26883yes:)
26884{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26885$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26886ac_tool_warned=yes ;;
26887esac
26888 RANLIB=$ac_ct_RANLIB
26889 fi
26890else
26891 RANLIB="$ac_cv_prog_RANLIB"
26892fi
26893
26894
26895if test -n "$ac_tool_prefix"; then
26896 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
26897set dummy ${ac_tool_prefix}ar; ac_word=$2
26898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26899$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 26900if ${ac_cv_prog_AR+:} false; then :
c971b7fa
PA
26901 $as_echo_n "(cached) " >&6
26902else
26903 if test -n "$AR"; then
26904 ac_cv_prog_AR="$AR" # Let the user override the test.
26905else
26906as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26907for as_dir in $PATH
26908do
26909 IFS=$as_save_IFS
26910 test -z "$as_dir" && as_dir=.
26911 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 26912 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
26913 ac_cv_prog_AR="${ac_tool_prefix}ar"
26914 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26915 break 2
26916 fi
26917done
26918 done
26919IFS=$as_save_IFS
26920
26921fi
26922fi
26923AR=$ac_cv_prog_AR
26924if test -n "$AR"; then
26925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
26926$as_echo "$AR" >&6; }
26927else
26928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26929$as_echo "no" >&6; }
26930fi
26931
26932
26933fi
26934if test -z "$ac_cv_prog_AR"; then
26935 ac_ct_AR=$AR
26936 # Extract the first word of "ar", so it can be a program name with args.
26937set dummy ar; ac_word=$2
26938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26939$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 26940if ${ac_cv_prog_ac_ct_AR+:} false; then :
c971b7fa
PA
26941 $as_echo_n "(cached) " >&6
26942else
26943 if test -n "$ac_ct_AR"; then
26944 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
26945else
26946as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26947for as_dir in $PATH
26948do
26949 IFS=$as_save_IFS
26950 test -z "$as_dir" && as_dir=.
26951 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 26952 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
26953 ac_cv_prog_ac_ct_AR="ar"
26954 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26955 break 2
26956 fi
26957done
26958 done
26959IFS=$as_save_IFS
26960
26961fi
26962fi
26963ac_ct_AR=$ac_cv_prog_ac_ct_AR
26964if test -n "$ac_ct_AR"; then
26965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
26966$as_echo "$ac_ct_AR" >&6; }
26967else
26968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26969$as_echo "no" >&6; }
26970fi
26971
26972 if test "x$ac_ct_AR" = x; then
26973 AR=""
26974 else
26975 case $cross_compiling:$ac_tool_warned in
26976yes:)
26977{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26978$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26979ac_tool_warned=yes ;;
26980esac
26981 AR=$ac_ct_AR
26982 fi
26983else
26984 AR="$ac_cv_prog_AR"
26985fi
26986
26987
26988# ---------------------- #
26989# Checks for libraries. #
26990# ---------------------- #
26991
26992ac_config_files="$ac_config_files Makefile import/Makefile"
26993
26994ac_config_commands="$ac_config_commands default"
26995
26996cat >confcache <<\_ACEOF
26997# This file is a shell script that caches the results of configure
26998# tests run on this system so they can be shared between configure
26999# scripts and configure runs, see configure's option --config-cache.
27000# It is not useful on other systems. If it contains results you don't
27001# want to keep, you may remove or edit it.
27002#
27003# config.status only pays attention to the cache file if you give it
27004# the --recheck option to rerun configure.
27005#
27006# `ac_cv_env_foo' variables (set or unset) will be overridden when
27007# loading this file, other *unset* `ac_cv_foo' will be assigned the
27008# following values.
27009
27010_ACEOF
27011
27012# The following way of writing the cache mishandles newlines in values,
27013# but we know of no workaround that is simple, portable, and efficient.
27014# So, we kill variables containing newlines.
27015# Ultrix sh set writes to stderr and can't be redirected directly,
27016# and sets the high bit in the cache file unless we assign to the vars.
27017(
27018 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27019 eval ac_val=\$$ac_var
27020 case $ac_val in #(
27021 *${as_nl}*)
27022 case $ac_var in #(
27023 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
27024$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
27025 esac
27026 case $ac_var in #(
27027 _ | IFS | as_nl) ;; #(
27028 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
27029 *) { eval $ac_var=; unset $ac_var;} ;;
27030 esac ;;
27031 esac
27032 done
27033
27034 (set) 2>&1 |
27035 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27036 *${as_nl}ac_space=\ *)
27037 # `set' does not quote correctly, so add quotes: double-quote
27038 # substitution turns \\\\ into \\, and sed turns \\ into \.
27039 sed -n \
27040 "s/'/'\\\\''/g;
27041 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
27042 ;; #(
27043 *)
27044 # `set' quotes correctly as required by POSIX, so do not add quotes.
27045 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
27046 ;;
27047 esac |
27048 sort
27049) |
27050 sed '
27051 /^ac_cv_env_/b end
27052 t clear
27053 :clear
27054 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27055 t end
27056 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27057 :end' >>confcache
27058if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27059 if test -w "$cache_file"; then
d0ac1c44 27060 if test "x$cache_file" != "x/dev/null"; then
c971b7fa
PA
27061 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
27062$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
27063 if test ! -f "$cache_file" || test -h "$cache_file"; then
27064 cat confcache >"$cache_file"
27065 else
27066 case $cache_file in #(
27067 */* | ?:*)
27068 mv -f confcache "$cache_file"$$ &&
27069 mv -f "$cache_file"$$ "$cache_file" ;; #(
27070 *)
27071 mv -f confcache "$cache_file" ;;
27072 esac
27073 fi
27074 fi
c971b7fa
PA
27075 else
27076 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
27077$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
27078 fi
27079fi
27080rm -f confcache
27081
27082test "x$prefix" = xNONE && prefix=$ac_default_prefix
27083# Let make expand exec_prefix.
27084test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
27085
27086DEFS=-DHAVE_CONFIG_H
27087
27088ac_libobjs=
27089ac_ltlibobjs=
27090for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27091 # 1. Remove the extension, and $U if already installed.
27092 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
27093 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
27094 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27095 # will be set to the directory where LIBOBJS objects are built.
27096 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27097 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
27098done
27099LIBOBJS=$ac_libobjs
27100
27101LTLIBOBJS=$ac_ltlibobjs
27102
27103
27104if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 27105 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
c971b7fa
PA
27106Usually this means the macro was only invoked conditionally." "$LINENO" 5
27107fi
27108if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
d0ac1c44 27109 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
c971b7fa
PA
27110Usually this means the macro was only invoked conditionally." "$LINENO" 5
27111fi
8690e634 27112if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
d0ac1c44 27113 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
8690e634
JK
27114Usually this means the macro was only invoked conditionally." "$LINENO" 5
27115fi
18848e28 27116if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
d0ac1c44 27117 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
18848e28
GF
27118Usually this means the macro was only invoked conditionally." "$LINENO" 5
27119fi
88b48903 27120if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
d0ac1c44 27121 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
88b48903
WN
27122Usually this means the macro was only invoked conditionally." "$LINENO" 5
27123fi
8690e634 27124if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
d0ac1c44 27125 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
8690e634
JK
27126Usually this means the macro was only invoked conditionally." "$LINENO" 5
27127fi
6ec2e0f5 27128if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
d0ac1c44 27129 as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined.
6ec2e0f5
SDJ
27130Usually this means the macro was only invoked conditionally." "$LINENO" 5
27131fi
49e4877c 27132if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
d0ac1c44 27133 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
49e4877c
PA
27134Usually this means the macro was only invoked conditionally." "$LINENO" 5
27135fi
27136if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
d0ac1c44 27137 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
49e4877c
PA
27138Usually this means the macro was only invoked conditionally." "$LINENO" 5
27139fi
c971b7fa 27140if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
d0ac1c44 27141 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
c971b7fa
PA
27142Usually this means the macro was only invoked conditionally." "$LINENO" 5
27143fi
88b48903
WN
27144
27145
725e2999
JB
27146if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
27147 as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined.
27148Usually this means the macro was only invoked conditionally." "$LINENO" 5
27149fi
27150if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
27151 as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
27152Usually this means the macro was only invoked conditionally." "$LINENO" 5
27153fi
8690e634 27154if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
d0ac1c44 27155 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
8690e634
JK
27156Usually this means the macro was only invoked conditionally." "$LINENO" 5
27157fi
c971b7fa 27158if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
d0ac1c44 27159 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
c971b7fa
PA
27160Usually this means the macro was only invoked conditionally." "$LINENO" 5
27161fi
27162
27163 gl_libobjs=
27164 gl_ltlibobjs=
27165 if test -n "$gl_LIBOBJS"; then
27166 # Remove the extension.
27167 sed_drop_objext='s/\.o$//;s/\.obj$//'
27168 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
27169 gl_libobjs="$gl_libobjs $i.$ac_objext"
27170 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
27171 done
27172 fi
27173 gl_LIBOBJS=$gl_libobjs
27174
27175 gl_LTLIBOBJS=$gl_ltlibobjs
27176
27177
27178
27179 gltests_libobjs=
27180 gltests_ltlibobjs=
27181 if test -n "$gltests_LIBOBJS"; then
27182 # Remove the extension.
27183 sed_drop_objext='s/\.o$//;s/\.obj$//'
27184 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
27185 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
27186 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
27187 done
27188 fi
27189 gltests_LIBOBJS=$gltests_libobjs
27190
27191 gltests_LTLIBOBJS=$gltests_ltlibobjs
27192
27193
d0ac1c44
SM
27194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
27195$as_echo_n "checking that generated files are newer than configure... " >&6; }
27196 if test -n "$am_sleep_pid"; then
27197 # Hide warnings about reused PIDs.
27198 wait $am_sleep_pid 2>/dev/null
27199 fi
27200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
27201$as_echo "done" >&6; }
c971b7fa 27202if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
d0ac1c44 27203 as_fn_error $? "conditional \"AMDEP\" was never defined.
c971b7fa
PA
27204Usually this means the macro was only invoked conditionally." "$LINENO" 5
27205fi
27206if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
d0ac1c44 27207 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
c971b7fa
PA
27208Usually this means the macro was only invoked conditionally." "$LINENO" 5
27209fi
27210 if test -n "$EXEEXT"; then
27211 am__EXEEXT_TRUE=
27212 am__EXEEXT_FALSE='#'
27213else
27214 am__EXEEXT_TRUE='#'
27215 am__EXEEXT_FALSE=
27216fi
27217
27218
d0ac1c44 27219: "${CONFIG_STATUS=./config.status}"
c971b7fa
PA
27220ac_write_fail=0
27221ac_clean_files_save=$ac_clean_files
27222ac_clean_files="$ac_clean_files $CONFIG_STATUS"
27223{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
27224$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
27225as_write_fail=0
27226cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
27227#! $SHELL
27228# Generated by $as_me.
27229# Run this file to recreate the current configuration.
27230# Compiler output produced by configure, useful for debugging
27231# configure, is in config.log if it exists.
27232
27233debug=false
27234ac_cs_recheck=false
27235ac_cs_silent=false
27236
27237SHELL=\${CONFIG_SHELL-$SHELL}
27238export SHELL
27239_ASEOF
27240cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
27241## -------------------- ##
27242## M4sh Initialization. ##
27243## -------------------- ##
27244
27245# Be more Bourne compatible
27246DUALCASE=1; export DUALCASE # for MKS sh
27247if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
27248 emulate sh
27249 NULLCMD=:
27250 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
27251 # is contrary to our usage. Disable this feature.
27252 alias -g '${1+"$@"}'='"$@"'
27253 setopt NO_GLOB_SUBST
27254else
27255 case `(set -o) 2>/dev/null` in #(
27256 *posix*) :
27257 set -o posix ;; #(
27258 *) :
27259 ;;
27260esac
27261fi
27262
27263
27264as_nl='
27265'
27266export as_nl
27267# Printing a long string crashes Solaris 7 /usr/bin/printf.
27268as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
27269as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
27270as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
27271# Prefer a ksh shell builtin over an external printf program on Solaris,
27272# but without wasting forks for bash or zsh.
27273if test -z "$BASH_VERSION$ZSH_VERSION" \
27274 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
27275 as_echo='print -r --'
27276 as_echo_n='print -rn --'
27277elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
27278 as_echo='printf %s\n'
27279 as_echo_n='printf %s'
27280else
27281 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
27282 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
27283 as_echo_n='/usr/ucb/echo -n'
27284 else
27285 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
27286 as_echo_n_body='eval
27287 arg=$1;
27288 case $arg in #(
27289 *"$as_nl"*)
27290 expr "X$arg" : "X\\(.*\\)$as_nl";
27291 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
27292 esac;
27293 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
27294 '
27295 export as_echo_n_body
27296 as_echo_n='sh -c $as_echo_n_body as_echo'
27297 fi
27298 export as_echo_body
27299 as_echo='sh -c $as_echo_body as_echo'
27300fi
27301
27302# The user is always right.
27303if test "${PATH_SEPARATOR+set}" != set; then
27304 PATH_SEPARATOR=:
27305 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
27306 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
27307 PATH_SEPARATOR=';'
27308 }
27309fi
27310
27311
27312# IFS
27313# We need space, tab and new line, in precisely that order. Quoting is
27314# there to prevent editors from complaining about space-tab.
27315# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27316# splitting by setting IFS to empty value.)
27317IFS=" "" $as_nl"
27318
27319# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 27320as_myself=
c971b7fa
PA
27321case $0 in #((
27322 *[\\/]* ) as_myself=$0 ;;
27323 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27324for as_dir in $PATH
27325do
27326 IFS=$as_save_IFS
27327 test -z "$as_dir" && as_dir=.
27328 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27329 done
27330IFS=$as_save_IFS
27331
27332 ;;
27333esac
27334# We did not find ourselves, most probably we were run as `sh COMMAND'
27335# in which case we are not to be found in the path.
27336if test "x$as_myself" = x; then
27337 as_myself=$0
27338fi
27339if test ! -f "$as_myself"; then
27340 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
27341 exit 1
27342fi
27343
27344# Unset variables that we do not need and which cause bugs (e.g. in
27345# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
27346# suppresses any "Segmentation fault" message there. '((' could
27347# trigger a bug in pdksh 5.2.14.
27348for as_var in BASH_ENV ENV MAIL MAILPATH
27349do eval test x\${$as_var+set} = xset \
27350 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
27351done
27352PS1='$ '
27353PS2='> '
27354PS4='+ '
27355
27356# NLS nuisances.
27357LC_ALL=C
27358export LC_ALL
27359LANGUAGE=C
27360export LANGUAGE
27361
27362# CDPATH.
27363(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
27364
27365
d0ac1c44
SM
27366# as_fn_error STATUS ERROR [LINENO LOG_FD]
27367# ----------------------------------------
c971b7fa
PA
27368# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
27369# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 27370# script with STATUS, using 1 if that was 0.
c971b7fa
PA
27371as_fn_error ()
27372{
d0ac1c44
SM
27373 as_status=$1; test $as_status -eq 0 && as_status=1
27374 if test "$4"; then
27375 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
27376 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
c971b7fa 27377 fi
d0ac1c44 27378 $as_echo "$as_me: error: $2" >&2
c971b7fa
PA
27379 as_fn_exit $as_status
27380} # as_fn_error
27381
27382
27383# as_fn_set_status STATUS
27384# -----------------------
27385# Set $? to STATUS, without forking.
27386as_fn_set_status ()
27387{
27388 return $1
27389} # as_fn_set_status
27390
27391# as_fn_exit STATUS
27392# -----------------
27393# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
27394as_fn_exit ()
27395{
27396 set +e
27397 as_fn_set_status $1
27398 exit $1
27399} # as_fn_exit
27400
27401# as_fn_unset VAR
27402# ---------------
27403# Portably unset VAR.
27404as_fn_unset ()
27405{
27406 { eval $1=; unset $1;}
27407}
27408as_unset=as_fn_unset
27409# as_fn_append VAR VALUE
27410# ----------------------
27411# Append the text in VALUE to the end of the definition contained in VAR. Take
27412# advantage of any shell optimizations that allow amortized linear growth over
27413# repeated appends, instead of the typical quadratic growth present in naive
27414# implementations.
27415if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
27416 eval 'as_fn_append ()
27417 {
27418 eval $1+=\$2
27419 }'
27420else
27421 as_fn_append ()
27422 {
27423 eval $1=\$$1\$2
27424 }
27425fi # as_fn_append
27426
27427# as_fn_arith ARG...
27428# ------------------
27429# Perform arithmetic evaluation on the ARGs, and store the result in the
27430# global $as_val. Take advantage of shells that can avoid forks. The arguments
27431# must be portable across $(()) and expr.
27432if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
27433 eval 'as_fn_arith ()
27434 {
27435 as_val=$(( $* ))
27436 }'
27437else
27438 as_fn_arith ()
27439 {
27440 as_val=`expr "$@" || test $? -eq 1`
27441 }
27442fi # as_fn_arith
27443
27444
27445if expr a : '\(a\)' >/dev/null 2>&1 &&
27446 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27447 as_expr=expr
27448else
27449 as_expr=false
27450fi
27451
27452if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27453 as_basename=basename
27454else
27455 as_basename=false
27456fi
27457
27458if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27459 as_dirname=dirname
27460else
27461 as_dirname=false
27462fi
27463
27464as_me=`$as_basename -- "$0" ||
27465$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27466 X"$0" : 'X\(//\)$' \| \
27467 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
27468$as_echo X/"$0" |
27469 sed '/^.*\/\([^/][^/]*\)\/*$/{
27470 s//\1/
27471 q
27472 }
27473 /^X\/\(\/\/\)$/{
27474 s//\1/
27475 q
27476 }
27477 /^X\/\(\/\).*/{
27478 s//\1/
27479 q
27480 }
27481 s/.*/./; q'`
27482
27483# Avoid depending upon Character Ranges.
27484as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27485as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27486as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27487as_cr_digits='0123456789'
27488as_cr_alnum=$as_cr_Letters$as_cr_digits
27489
27490ECHO_C= ECHO_N= ECHO_T=
27491case `echo -n x` in #(((((
27492-n*)
27493 case `echo 'xy\c'` in
27494 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27495 xy) ECHO_C='\c';;
27496 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
27497 ECHO_T=' ';;
27498 esac;;
27499*)
27500 ECHO_N='-n';;
27501esac
27502
27503rm -f conf$$ conf$$.exe conf$$.file
27504if test -d conf$$.dir; then
27505 rm -f conf$$.dir/conf$$.file
27506else
27507 rm -f conf$$.dir
27508 mkdir conf$$.dir 2>/dev/null
27509fi
27510if (echo >conf$$.file) 2>/dev/null; then
27511 if ln -s conf$$.file conf$$ 2>/dev/null; then
27512 as_ln_s='ln -s'
27513 # ... but there are two gotchas:
27514 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27515 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 27516 # In both cases, we have to default to `cp -pR'.
c971b7fa 27517 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 27518 as_ln_s='cp -pR'
c971b7fa
PA
27519 elif ln conf$$.file conf$$ 2>/dev/null; then
27520 as_ln_s=ln
27521 else
d0ac1c44 27522 as_ln_s='cp -pR'
c971b7fa
PA
27523 fi
27524else
d0ac1c44 27525 as_ln_s='cp -pR'
c971b7fa
PA
27526fi
27527rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27528rmdir conf$$.dir 2>/dev/null
27529
27530
27531# as_fn_mkdir_p
27532# -------------
27533# Create "$as_dir" as a directory, including parents if necessary.
27534as_fn_mkdir_p ()
27535{
27536
27537 case $as_dir in #(
27538 -*) as_dir=./$as_dir;;
27539 esac
27540 test -d "$as_dir" || eval $as_mkdir_p || {
27541 as_dirs=
27542 while :; do
27543 case $as_dir in #(
27544 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
27545 *) as_qdir=$as_dir;;
27546 esac
27547 as_dirs="'$as_qdir' $as_dirs"
27548 as_dir=`$as_dirname -- "$as_dir" ||
27549$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27550 X"$as_dir" : 'X\(//\)[^/]' \| \
27551 X"$as_dir" : 'X\(//\)$' \| \
27552 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
27553$as_echo X"$as_dir" |
27554 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27555 s//\1/
27556 q
27557 }
27558 /^X\(\/\/\)[^/].*/{
27559 s//\1/
27560 q
27561 }
27562 /^X\(\/\/\)$/{
27563 s//\1/
27564 q
27565 }
27566 /^X\(\/\).*/{
27567 s//\1/
27568 q
27569 }
27570 s/.*/./; q'`
27571 test -d "$as_dir" && break
27572 done
27573 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 27574 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
c971b7fa
PA
27575
27576
27577} # as_fn_mkdir_p
27578if mkdir -p . 2>/dev/null; then
27579 as_mkdir_p='mkdir -p "$as_dir"'
27580else
27581 test -d ./-p && rmdir ./-p
27582 as_mkdir_p=false
27583fi
27584
d0ac1c44
SM
27585
27586# as_fn_executable_p FILE
27587# -----------------------
27588# Test if FILE is an executable regular file.
27589as_fn_executable_p ()
27590{
27591 test -f "$1" && test -x "$1"
27592} # as_fn_executable_p
27593as_test_x='test -x'
27594as_executable_p=as_fn_executable_p
c971b7fa
PA
27595
27596# Sed expression to map a string onto a valid CPP name.
27597as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
27598
27599# Sed expression to map a string onto a valid variable name.
27600as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
27601
27602
27603exec 6>&1
27604## ----------------------------------- ##
27605## Main body of $CONFIG_STATUS script. ##
27606## ----------------------------------- ##
27607_ASEOF
27608test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
27609
27610cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27611# Save the log message, to keep $0 and so on meaningful, and to
27612# report actual input values of CONFIG_FILES etc. instead of their
27613# values after options handling.
27614ac_log="
d0ac1c44
SM
27615This file was extended by libgnu $as_me UNUSED-VERSION, which was
27616generated by GNU Autoconf 2.69. Invocation command line was
c971b7fa
PA
27617
27618 CONFIG_FILES = $CONFIG_FILES
27619 CONFIG_HEADERS = $CONFIG_HEADERS
27620 CONFIG_LINKS = $CONFIG_LINKS
27621 CONFIG_COMMANDS = $CONFIG_COMMANDS
27622 $ $0 $@
27623
27624on `(hostname || uname -n) 2>/dev/null | sed 1q`
27625"
27626
27627_ACEOF
27628
27629case $ac_config_files in *"
27630"*) set x $ac_config_files; shift; ac_config_files=$*;;
27631esac
27632
27633case $ac_config_headers in *"
27634"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
27635esac
27636
27637
27638cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27639# Files that config.status was made for.
27640config_files="$ac_config_files"
27641config_headers="$ac_config_headers"
27642config_commands="$ac_config_commands"
27643
27644_ACEOF
27645
27646cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27647ac_cs_usage="\
27648\`$as_me' instantiates files and other configuration actions
27649from templates according to the current configuration. Unless the files
27650and actions are specified as TAGs, all are instantiated by default.
27651
27652Usage: $0 [OPTION]... [TAG]...
27653
27654 -h, --help print this help, then exit
27655 -V, --version print version number and configuration settings, then exit
d0ac1c44 27656 --config print configuration, then exit
c971b7fa
PA
27657 -q, --quiet, --silent
27658 do not print progress messages
27659 -d, --debug don't remove temporary files
27660 --recheck update $as_me by reconfiguring in the same conditions
27661 --file=FILE[:TEMPLATE]
27662 instantiate the configuration file FILE
27663 --header=FILE[:TEMPLATE]
27664 instantiate the configuration header FILE
27665
27666Configuration files:
27667$config_files
27668
27669Configuration headers:
27670$config_headers
27671
27672Configuration commands:
27673$config_commands
27674
27675Report bugs to the package provider."
27676
27677_ACEOF
27678cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 27679ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
c971b7fa 27680ac_cs_version="\\
d0ac1c44
SM
27681libgnu config.status UNUSED-VERSION
27682configured by $0, generated by GNU Autoconf 2.69,
27683 with options \\"\$ac_cs_config\\"
c971b7fa 27684
d0ac1c44 27685Copyright (C) 2012 Free Software Foundation, Inc.
c971b7fa
PA
27686This config.status script is free software; the Free Software Foundation
27687gives unlimited permission to copy, distribute and modify it."
27688
27689ac_pwd='$ac_pwd'
27690srcdir='$srcdir'
27691INSTALL='$INSTALL'
27692MKDIR_P='$MKDIR_P'
27693AWK='$AWK'
27694test -n "\$AWK" || AWK=awk
27695_ACEOF
27696
27697cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27698# The default lists apply if the user does not specify any file.
27699ac_need_defaults=:
27700while test $# != 0
27701do
27702 case $1 in
d0ac1c44 27703 --*=?*)
c971b7fa
PA
27704 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27705 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
27706 ac_shift=:
27707 ;;
d0ac1c44
SM
27708 --*=)
27709 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27710 ac_optarg=
27711 ac_shift=:
27712 ;;
c971b7fa
PA
27713 *)
27714 ac_option=$1
27715 ac_optarg=$2
27716 ac_shift=shift
27717 ;;
27718 esac
27719
27720 case $ac_option in
27721 # Handling of the options.
27722 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27723 ac_cs_recheck=: ;;
27724 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
27725 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
27726 --config | --confi | --conf | --con | --co | --c )
27727 $as_echo "$ac_cs_config"; exit ;;
c971b7fa
PA
27728 --debug | --debu | --deb | --de | --d | -d )
27729 debug=: ;;
27730 --file | --fil | --fi | --f )
27731 $ac_shift
27732 case $ac_optarg in
27733 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 27734 '') as_fn_error $? "missing file argument" ;;
c971b7fa
PA
27735 esac
27736 as_fn_append CONFIG_FILES " '$ac_optarg'"
27737 ac_need_defaults=false;;
27738 --header | --heade | --head | --hea )
27739 $ac_shift
27740 case $ac_optarg in
27741 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
27742 esac
27743 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
27744 ac_need_defaults=false;;
27745 --he | --h)
27746 # Conflict between --help and --header
d0ac1c44 27747 as_fn_error $? "ambiguous option: \`$1'
c971b7fa
PA
27748Try \`$0 --help' for more information.";;
27749 --help | --hel | -h )
27750 $as_echo "$ac_cs_usage"; exit ;;
27751 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27752 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27753 ac_cs_silent=: ;;
27754
27755 # This is an error.
d0ac1c44 27756 -*) as_fn_error $? "unrecognized option: \`$1'
c971b7fa
PA
27757Try \`$0 --help' for more information." ;;
27758
27759 *) as_fn_append ac_config_targets " $1"
27760 ac_need_defaults=false ;;
27761
27762 esac
27763 shift
27764done
27765
27766ac_configure_extra_args=
27767
27768if $ac_cs_silent; then
27769 exec 6>/dev/null
27770 ac_configure_extra_args="$ac_configure_extra_args --silent"
27771fi
27772
27773_ACEOF
27774cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27775if \$ac_cs_recheck; then
d0ac1c44 27776 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
c971b7fa
PA
27777 shift
27778 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
27779 CONFIG_SHELL='$SHELL'
27780 export CONFIG_SHELL
27781 exec "\$@"
27782fi
27783
27784_ACEOF
27785cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27786exec 5>>config.log
27787{
27788 echo
27789 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27790## Running $as_me. ##
27791_ASBOX
27792 $as_echo "$ac_log"
27793} >&5
27794
27795_ACEOF
27796cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27797#
27798# INIT-COMMANDS
27799#
27800AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
27801
27802_ACEOF
27803
27804cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27805
27806# Handling of arguments.
27807for ac_config_target in $ac_config_targets
27808do
27809 case $ac_config_target in
27810 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
27811 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
27812 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
27813 "import/Makefile") CONFIG_FILES="$CONFIG_FILES import/Makefile" ;;
27814 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
27815
d0ac1c44 27816 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c971b7fa
PA
27817 esac
27818done
27819
27820
27821# If the user did not use the arguments to specify the items to instantiate,
27822# then the envvar interface is used. Set only those that are not.
27823# We use the long form for the default assignment because of an extremely
27824# bizarre bug on SunOS 4.1.3.
27825if $ac_need_defaults; then
27826 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27827 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27828 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
27829fi
27830
27831# Have a temporary directory for convenience. Make it in the build tree
27832# simply because there is no reason against having it here, and in addition,
27833# creating and moving files from /tmp can sometimes cause problems.
27834# Hook for its removal unless debugging.
27835# Note that there is a small window in which the directory will not be cleaned:
27836# after its creation but before its name has been assigned to `$tmp'.
27837$debug ||
27838{
d0ac1c44 27839 tmp= ac_tmp=
c971b7fa 27840 trap 'exit_status=$?
d0ac1c44
SM
27841 : "${ac_tmp:=$tmp}"
27842 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
c971b7fa
PA
27843' 0
27844 trap 'as_fn_exit 1' 1 2 13 15
27845}
27846# Create a (secure) tmp directory for tmp files.
27847
27848{
27849 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 27850 test -d "$tmp"
c971b7fa
PA
27851} ||
27852{
27853 tmp=./conf$$-$RANDOM
27854 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
27855} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
27856ac_tmp=$tmp
c971b7fa
PA
27857
27858# Set up the scripts for CONFIG_FILES section.
27859# No need to generate them if there are no CONFIG_FILES.
27860# This happens for instance with `./config.status config.h'.
27861if test -n "$CONFIG_FILES"; then
27862
27863
27864ac_cr=`echo X | tr X '\015'`
27865# On cygwin, bash can eat \r inside `` if the user requested igncr.
27866# But we know of no other shell where ac_cr would be empty at this
27867# point, so we can use a bashism as a fallback.
27868if test "x$ac_cr" = x; then
27869 eval ac_cr=\$\'\\r\'
27870fi
27871ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
27872if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 27873 ac_cs_awk_cr='\\r'
c971b7fa
PA
27874else
27875 ac_cs_awk_cr=$ac_cr
27876fi
27877
d0ac1c44 27878echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
c971b7fa
PA
27879_ACEOF
27880
27881
27882{
27883 echo "cat >conf$$subs.awk <<_ACEOF" &&
27884 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
27885 echo "_ACEOF"
27886} >conf$$subs.sh ||
d0ac1c44
SM
27887 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
27888ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
c971b7fa
PA
27889ac_delim='%!_!# '
27890for ac_last_try in false false false false false :; do
27891 . ./conf$$subs.sh ||
d0ac1c44 27892 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
c971b7fa
PA
27893
27894 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
27895 if test $ac_delim_n = $ac_delim_num; then
27896 break
27897 elif $ac_last_try; then
d0ac1c44 27898 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
c971b7fa
PA
27899 else
27900 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27901 fi
27902done
27903rm -f conf$$subs.sh
27904
27905cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 27906cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
c971b7fa
PA
27907_ACEOF
27908sed -n '
27909h
27910s/^/S["/; s/!.*/"]=/
27911p
27912g
27913s/^[^!]*!//
27914:repl
27915t repl
27916s/'"$ac_delim"'$//
27917t delim
27918:nl
27919h
d0ac1c44 27920s/\(.\{148\}\)..*/\1/
c971b7fa
PA
27921t more1
27922s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
27923p
27924n
27925b repl
27926:more1
27927s/["\\]/\\&/g; s/^/"/; s/$/"\\/
27928p
27929g
27930s/.\{148\}//
27931t nl
27932:delim
27933h
d0ac1c44 27934s/\(.\{148\}\)..*/\1/
c971b7fa
PA
27935t more2
27936s/["\\]/\\&/g; s/^/"/; s/$/"/
27937p
27938b
27939:more2
27940s/["\\]/\\&/g; s/^/"/; s/$/"\\/
27941p
27942g
27943s/.\{148\}//
27944t delim
27945' <conf$$subs.awk | sed '
27946/^[^""]/{
27947 N
27948 s/\n//
27949}
27950' >>$CONFIG_STATUS || ac_write_fail=1
27951rm -f conf$$subs.awk
27952cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27953_ACAWK
d0ac1c44 27954cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
c971b7fa
PA
27955 for (key in S) S_is_set[key] = 1
27956 FS = "\a"
27957
27958}
27959{
27960 line = $ 0
27961 nfields = split(line, field, "@")
27962 substed = 0
27963 len = length(field[1])
27964 for (i = 2; i < nfields; i++) {
27965 key = field[i]
27966 keylen = length(key)
27967 if (S_is_set[key]) {
27968 value = S[key]
27969 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
27970 len += length(value) + length(field[++i])
27971 substed = 1
27972 } else
27973 len += 1 + keylen
27974 }
27975
27976 print line
27977}
27978
27979_ACAWK
27980_ACEOF
27981cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27982if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
27983 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
27984else
27985 cat
d0ac1c44
SM
27986fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
27987 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
c971b7fa
PA
27988_ACEOF
27989
d0ac1c44
SM
27990# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
27991# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
c971b7fa
PA
27992# trailing colons and then remove the whole line if VPATH becomes empty
27993# (actually we leave an empty line to preserve line numbers).
27994if test "x$srcdir" = x.; then
d0ac1c44
SM
27995 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
27996h
27997s///
27998s/^/:/
27999s/[ ]*$/:/
28000s/:\$(srcdir):/:/g
28001s/:\${srcdir}:/:/g
28002s/:@srcdir@:/:/g
28003s/^:*//
c971b7fa 28004s/:*$//
d0ac1c44
SM
28005x
28006s/\(=[ ]*\).*/\1/
28007G
28008s/\n//
c971b7fa
PA
28009s/^[^=]*=[ ]*$//
28010}'
28011fi
28012
28013cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28014fi # test -n "$CONFIG_FILES"
28015
28016# Set up the scripts for CONFIG_HEADERS section.
28017# No need to generate them if there are no CONFIG_HEADERS.
28018# This happens for instance with `./config.status Makefile'.
28019if test -n "$CONFIG_HEADERS"; then
d0ac1c44 28020cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
c971b7fa
PA
28021BEGIN {
28022_ACEOF
28023
28024# Transform confdefs.h into an awk script `defines.awk', embedded as
28025# here-document in config.status, that substitutes the proper values into
28026# config.h.in to produce config.h.
28027
28028# Create a delimiter string that does not exist in confdefs.h, to ease
28029# handling of long lines.
28030ac_delim='%!_!# '
28031for ac_last_try in false false :; do
d0ac1c44
SM
28032 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
28033 if test -z "$ac_tt"; then
c971b7fa
PA
28034 break
28035 elif $ac_last_try; then
d0ac1c44 28036 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
c971b7fa
PA
28037 else
28038 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28039 fi
28040done
28041
28042# For the awk script, D is an array of macro values keyed by name,
28043# likewise P contains macro parameters if any. Preserve backslash
28044# newline sequences.
28045
28046ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28047sed -n '
28048s/.\{148\}/&'"$ac_delim"'/g
28049t rset
28050:rset
28051s/^[ ]*#[ ]*define[ ][ ]*/ /
28052t def
28053d
28054:def
28055s/\\$//
28056t bsnl
28057s/["\\]/\\&/g
28058s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
28059D["\1"]=" \3"/p
28060s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
28061d
28062:bsnl
28063s/["\\]/\\&/g
28064s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
28065D["\1"]=" \3\\\\\\n"\\/p
28066t cont
28067s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
28068t cont
28069d
28070:cont
28071n
28072s/.\{148\}/&'"$ac_delim"'/g
28073t clear
28074:clear
28075s/\\$//
28076t bsnlc
28077s/["\\]/\\&/g; s/^/"/; s/$/"/p
28078d
28079:bsnlc
28080s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
28081b cont
28082' <confdefs.h | sed '
28083s/'"$ac_delim"'/"\\\
28084"/g' >>$CONFIG_STATUS || ac_write_fail=1
28085
28086cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28087 for (key in D) D_is_set[key] = 1
28088 FS = "\a"
28089}
28090/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
28091 line = \$ 0
28092 split(line, arg, " ")
28093 if (arg[1] == "#") {
28094 defundef = arg[2]
28095 mac1 = arg[3]
28096 } else {
28097 defundef = substr(arg[1], 2)
28098 mac1 = arg[2]
28099 }
28100 split(mac1, mac2, "(") #)
28101 macro = mac2[1]
28102 prefix = substr(line, 1, index(line, defundef) - 1)
28103 if (D_is_set[macro]) {
28104 # Preserve the white space surrounding the "#".
28105 print prefix "define", macro P[macro] D[macro]
28106 next
28107 } else {
28108 # Replace #undef with comments. This is necessary, for example,
28109 # in the case of _POSIX_SOURCE, which is predefined and required
28110 # on some systems where configure will not decide to define it.
28111 if (defundef == "undef") {
28112 print "/*", prefix defundef, macro, "*/"
28113 next
28114 }
28115 }
28116}
28117{ print }
28118_ACAWK
28119_ACEOF
28120cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 28121 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
c971b7fa
PA
28122fi # test -n "$CONFIG_HEADERS"
28123
28124
28125eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
28126shift
28127for ac_tag
28128do
28129 case $ac_tag in
28130 :[FHLC]) ac_mode=$ac_tag; continue;;
28131 esac
28132 case $ac_mode$ac_tag in
28133 :[FHL]*:*);;
d0ac1c44 28134 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
c971b7fa
PA
28135 :[FH]-) ac_tag=-:-;;
28136 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28137 esac
28138 ac_save_IFS=$IFS
28139 IFS=:
28140 set x $ac_tag
28141 IFS=$ac_save_IFS
28142 shift
28143 ac_file=$1
28144 shift
28145
28146 case $ac_mode in
28147 :L) ac_source=$1;;
28148 :[FH])
28149 ac_file_inputs=
28150 for ac_f
28151 do
28152 case $ac_f in
d0ac1c44 28153 -) ac_f="$ac_tmp/stdin";;
c971b7fa
PA
28154 *) # Look for the file first in the build tree, then in the source tree
28155 # (if the path is not absolute). The absolute path cannot be DOS-style,
28156 # because $ac_f cannot contain `:'.
28157 test -f "$ac_f" ||
28158 case $ac_f in
28159 [\\/$]*) false;;
28160 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28161 esac ||
d0ac1c44 28162 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
c971b7fa
PA
28163 esac
28164 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
28165 as_fn_append ac_file_inputs " '$ac_f'"
28166 done
28167
28168 # Let's still pretend it is `configure' which instantiates (i.e., don't
28169 # use $as_me), people would be surprised to read:
28170 # /* config.h. Generated by config.status. */
28171 configure_input='Generated from '`
28172 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
28173 `' by configure.'
28174 if test x"$ac_file" != x-; then
28175 configure_input="$ac_file. $configure_input"
28176 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
28177$as_echo "$as_me: creating $ac_file" >&6;}
28178 fi
28179 # Neutralize special characters interpreted by sed in replacement strings.
28180 case $configure_input in #(
28181 *\&* | *\|* | *\\* )
28182 ac_sed_conf_input=`$as_echo "$configure_input" |
28183 sed 's/[\\\\&|]/\\\\&/g'`;; #(
28184 *) ac_sed_conf_input=$configure_input;;
28185 esac
28186
28187 case $ac_tag in
d0ac1c44
SM
28188 *:-:* | *:-) cat >"$ac_tmp/stdin" \
28189 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
c971b7fa
PA
28190 esac
28191 ;;
28192 esac
28193
28194 ac_dir=`$as_dirname -- "$ac_file" ||
28195$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28196 X"$ac_file" : 'X\(//\)[^/]' \| \
28197 X"$ac_file" : 'X\(//\)$' \| \
28198 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
28199$as_echo X"$ac_file" |
28200 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28201 s//\1/
28202 q
28203 }
28204 /^X\(\/\/\)[^/].*/{
28205 s//\1/
28206 q
28207 }
28208 /^X\(\/\/\)$/{
28209 s//\1/
28210 q
28211 }
28212 /^X\(\/\).*/{
28213 s//\1/
28214 q
28215 }
28216 s/.*/./; q'`
28217 as_dir="$ac_dir"; as_fn_mkdir_p
28218 ac_builddir=.
28219
28220case "$ac_dir" in
28221.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28222*)
28223 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
28224 # A ".." for each directory in $ac_dir_suffix.
28225 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
28226 case $ac_top_builddir_sub in
28227 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28228 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28229 esac ;;
28230esac
28231ac_abs_top_builddir=$ac_pwd
28232ac_abs_builddir=$ac_pwd$ac_dir_suffix
28233# for backward compatibility:
28234ac_top_builddir=$ac_top_build_prefix
28235
28236case $srcdir in
28237 .) # We are building in place.
28238 ac_srcdir=.
28239 ac_top_srcdir=$ac_top_builddir_sub
28240 ac_abs_top_srcdir=$ac_pwd ;;
28241 [\\/]* | ?:[\\/]* ) # Absolute name.
28242 ac_srcdir=$srcdir$ac_dir_suffix;
28243 ac_top_srcdir=$srcdir
28244 ac_abs_top_srcdir=$srcdir ;;
28245 *) # Relative name.
28246 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28247 ac_top_srcdir=$ac_top_build_prefix$srcdir
28248 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
28249esac
28250ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
28251
28252
28253 case $ac_mode in
28254 :F)
28255 #
28256 # CONFIG_FILE
28257 #
28258
28259 case $INSTALL in
28260 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
28261 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
28262 esac
28263 ac_MKDIR_P=$MKDIR_P
28264 case $MKDIR_P in
28265 [\\/$]* | ?:[\\/]* ) ;;
28266 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
28267 esac
28268_ACEOF
28269
28270cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28271# If the template does not know about datarootdir, expand it.
28272# FIXME: This hack should be removed a few years after 2.60.
28273ac_datarootdir_hack=; ac_datarootdir_seen=
28274ac_sed_dataroot='
28275/datarootdir/ {
28276 p
28277 q
28278}
28279/@datadir@/p
28280/@docdir@/p
28281/@infodir@/p
28282/@localedir@/p
28283/@mandir@/p'
28284case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
28285*datarootdir*) ac_datarootdir_seen=yes;;
28286*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
28287 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28288$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
28289_ACEOF
28290cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28291 ac_datarootdir_hack='
28292 s&@datadir@&$datadir&g
28293 s&@docdir@&$docdir&g
28294 s&@infodir@&$infodir&g
28295 s&@localedir@&$localedir&g
28296 s&@mandir@&$mandir&g
28297 s&\\\${datarootdir}&$datarootdir&g' ;;
28298esac
28299_ACEOF
28300
28301# Neutralize VPATH when `$srcdir' = `.'.
28302# Shell code in configure.ac might set extrasub.
28303# FIXME: do we really want to maintain this feature?
28304cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28305ac_sed_extra="$ac_vpsub
28306$extrasub
28307_ACEOF
28308cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28309:t
28310/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
28311s|@configure_input@|$ac_sed_conf_input|;t t
28312s&@top_builddir@&$ac_top_builddir_sub&;t t
28313s&@top_build_prefix@&$ac_top_build_prefix&;t t
28314s&@srcdir@&$ac_srcdir&;t t
28315s&@abs_srcdir@&$ac_abs_srcdir&;t t
28316s&@top_srcdir@&$ac_top_srcdir&;t t
28317s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28318s&@builddir@&$ac_builddir&;t t
28319s&@abs_builddir@&$ac_abs_builddir&;t t
28320s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28321s&@INSTALL@&$ac_INSTALL&;t t
28322s&@MKDIR_P@&$ac_MKDIR_P&;t t
28323$ac_datarootdir_hack
28324"
d0ac1c44
SM
28325eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
28326 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
c971b7fa
PA
28327
28328test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
28329 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
28330 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
28331 "$ac_tmp/out"`; test -z "$ac_out"; } &&
c971b7fa 28332 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 28333which seems to be undefined. Please make sure it is defined" >&5
c971b7fa 28334$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 28335which seems to be undefined. Please make sure it is defined" >&2;}
c971b7fa 28336
d0ac1c44 28337 rm -f "$ac_tmp/stdin"
c971b7fa 28338 case $ac_file in
d0ac1c44
SM
28339 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
28340 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
c971b7fa 28341 esac \
d0ac1c44 28342 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
c971b7fa
PA
28343 ;;
28344 :H)
28345 #
28346 # CONFIG_HEADER
28347 #
28348 if test x"$ac_file" != x-; then
28349 {
28350 $as_echo "/* $configure_input */" \
d0ac1c44
SM
28351 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
28352 } >"$ac_tmp/config.h" \
28353 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
28354 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
c971b7fa
PA
28355 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
28356$as_echo "$as_me: $ac_file is unchanged" >&6;}
28357 else
28358 rm -f "$ac_file"
d0ac1c44
SM
28359 mv "$ac_tmp/config.h" "$ac_file" \
28360 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
c971b7fa
PA
28361 fi
28362 else
28363 $as_echo "/* $configure_input */" \
d0ac1c44
SM
28364 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
28365 || as_fn_error $? "could not create -" "$LINENO" 5
c971b7fa
PA
28366 fi
28367# Compute "$ac_file"'s index in $config_headers.
28368_am_arg="$ac_file"
28369_am_stamp_count=1
28370for _am_header in $config_headers :; do
28371 case $_am_header in
28372 $_am_arg | $_am_arg:* )
28373 break ;;
28374 * )
28375 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
28376 esac
28377done
28378echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
28379$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28380 X"$_am_arg" : 'X\(//\)[^/]' \| \
28381 X"$_am_arg" : 'X\(//\)$' \| \
28382 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
28383$as_echo X"$_am_arg" |
28384 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28385 s//\1/
28386 q
28387 }
28388 /^X\(\/\/\)[^/].*/{
28389 s//\1/
28390 q
28391 }
28392 /^X\(\/\/\)$/{
28393 s//\1/
28394 q
28395 }
28396 /^X\(\/\).*/{
28397 s//\1/
28398 q
28399 }
28400 s/.*/./; q'`/stamp-h$_am_stamp_count
28401 ;;
28402
28403 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
28404$as_echo "$as_me: executing $ac_file commands" >&6;}
28405 ;;
28406 esac
28407
28408
28409 case $ac_file$ac_mode in
28410 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
d0ac1c44 28411 # Older Autoconf quotes --file arguments for eval, but not when files
c971b7fa
PA
28412 # are listed without --file. Let's play safe and only enable the eval
28413 # if we detect the quoting.
28414 case $CONFIG_FILES in
28415 *\'*) eval set x "$CONFIG_FILES" ;;
28416 *) set x $CONFIG_FILES ;;
28417 esac
28418 shift
28419 for mf
28420 do
28421 # Strip MF so we end up with the name of the file.
28422 mf=`echo "$mf" | sed -e 's/:.*$//'`
28423 # Check whether this is an Automake generated Makefile or not.
d0ac1c44 28424 # We used to match only the files named 'Makefile.in', but
c971b7fa
PA
28425 # some people rename them; so instead we look at the file content.
28426 # Grep'ing the first line is not enough: some people post-process
28427 # each Makefile.in and add a new line on top of each file to say so.
28428 # Grep'ing the whole file is not good either: AIX grep has a line
28429 # limit of 2048, but all sed's we know have understand at least 4000.
28430 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
28431 dirpart=`$as_dirname -- "$mf" ||
28432$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28433 X"$mf" : 'X\(//\)[^/]' \| \
28434 X"$mf" : 'X\(//\)$' \| \
28435 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
28436$as_echo X"$mf" |
28437 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28438 s//\1/
28439 q
28440 }
28441 /^X\(\/\/\)[^/].*/{
28442 s//\1/
28443 q
28444 }
28445 /^X\(\/\/\)$/{
28446 s//\1/
28447 q
28448 }
28449 /^X\(\/\).*/{
28450 s//\1/
28451 q
28452 }
28453 s/.*/./; q'`
28454 else
28455 continue
28456 fi
28457 # Extract the definition of DEPDIR, am__include, and am__quote
d0ac1c44 28458 # from the Makefile without running 'make'.
c971b7fa
PA
28459 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
28460 test -z "$DEPDIR" && continue
28461 am__include=`sed -n 's/^am__include = //p' < "$mf"`
d0ac1c44 28462 test -z "$am__include" && continue
c971b7fa 28463 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
c971b7fa
PA
28464 # Find all dependency output files, they are included files with
28465 # $(DEPDIR) in their names. We invoke sed twice because it is the
28466 # simplest approach to changing $(DEPDIR) to its actual value in the
28467 # expansion.
28468 for file in `sed -n "
28469 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
d0ac1c44 28470 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
c971b7fa
PA
28471 # Make sure the directory exists.
28472 test -f "$dirpart/$file" && continue
28473 fdir=`$as_dirname -- "$file" ||
28474$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28475 X"$file" : 'X\(//\)[^/]' \| \
28476 X"$file" : 'X\(//\)$' \| \
28477 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
28478$as_echo X"$file" |
28479 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28480 s//\1/
28481 q
28482 }
28483 /^X\(\/\/\)[^/].*/{
28484 s//\1/
28485 q
28486 }
28487 /^X\(\/\/\)$/{
28488 s//\1/
28489 q
28490 }
28491 /^X\(\/\).*/{
28492 s//\1/
28493 q
28494 }
28495 s/.*/./; q'`
28496 as_dir=$dirpart/$fdir; as_fn_mkdir_p
28497 # echo "creating $dirpart/$file"
28498 echo '# dummy' > "$dirpart/$file"
28499 done
28500 done
28501}
28502 ;;
28503 "default":C)
28504case x$CONFIG_HEADERS in
28505xconfig.h:config.in)
28506echo > stamp-h ;;
28507esac
28508 ;;
28509
28510 esac
28511done # for ac_tag
28512
28513
28514as_fn_exit 0
28515_ACEOF
28516ac_clean_files=$ac_clean_files_save
28517
28518test $ac_write_fail = 0 ||
d0ac1c44 28519 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
c971b7fa
PA
28520
28521
28522# configure is writing to config.log, and then calls config.status.
28523# config.status does its own redirection, appending to config.log.
28524# Unfortunately, on DOS this fails, as config.log is still kept open
28525# by configure, so config.status won't be able to write to it; its
28526# output is simply discarded. So we exec the FD to /dev/null,
28527# effectively closing config.log, so it can be properly (re)opened and
28528# appended to by config.status. When coming back to configure, we
28529# need to make the FD available again.
28530if test "$no_create" != yes; then
28531 ac_cs_success=:
28532 ac_config_status_args=
28533 test "$silent" = yes &&
28534 ac_config_status_args="$ac_config_status_args --quiet"
28535 exec 5>/dev/null
28536 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
28537 exec 5>>config.log
28538 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28539 # would make configure fail if this is the last instruction.
d0ac1c44 28540 $ac_cs_success || as_fn_exit 1
c971b7fa
PA
28541fi
28542if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
28543 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
28544$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
28545fi
28546
28547
28548exit 0
This page took 2.91873 seconds and 4 git commands to generate.