Import mkdtemp gnulib module, fix mingw build
[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:
e8d8cce6 5844 # Code from module mkdtemp:
b3279b60 5845 # Code from module mkostemp:
6ec2e0f5
SDJ
5846 # Code from module msvc-inval:
5847 # Code from module msvc-nothrow:
c971b7fa 5848 # Code from module multiarch:
725e2999 5849 # Code from module netinet_in:
98399780 5850 # Code from module nocrash:
6ec2e0f5
SDJ
5851 # Code from module open:
5852 # Code from module openat:
5853 # Code from module openat-die:
5854 # Code from module openat-h:
5855 # Code from module opendir:
38ec2207 5856 # Code from module pathmax:
8424cc97 5857 # Code from module rawmemchr:
6ec2e0f5 5858 # Code from module readdir:
2196f55f 5859 # Code from module readlink:
6ec2e0f5 5860 # Code from module realloc-posix:
6a29c58e 5861 # Code from module rename:
6ec2e0f5 5862 # Code from module rewinddir:
6a29c58e
YQ
5863 # Code from module rmdir:
5864 # Code from module same-inode:
6ec2e0f5 5865 # Code from module save-cwd:
5e8754f9 5866 # Code from module secure_getenv:
3d99e817 5867 # Code from module setenv:
0750520d 5868 # Code from module signal-h:
98399780 5869 # Code from module snippet/_Noreturn:
c971b7fa
PA
5870 # Code from module snippet/arg-nonnull:
5871 # Code from module snippet/c++defs:
5872 # Code from module snippet/warn-on-use:
725e2999 5873 # Code from module socklen:
8839a007 5874 # Code from module ssize_t:
2196f55f 5875 # Code from module stat:
725e2999 5876 # Code from module stdalign:
8690e634 5877 # Code from module stdbool:
c971b7fa
PA
5878 # Code from module stddef:
5879 # Code from module stdint:
6a29c58e 5880 # Code from module stdio:
98399780 5881 # Code from module stdlib:
8424cc97 5882 # Code from module strchrnul:
6ec2e0f5 5883 # Code from module strdup-posix:
8690e634 5884 # Code from module streq:
6ec2e0f5
SDJ
5885 # Code from module strerror:
5886 # Code from module strerror-override:
c971b7fa 5887 # Code from module string:
8690e634 5888 # Code from module strnlen1:
63ce7108
TT
5889 # Code from module strstr:
5890 # Code from module strstr-simple:
421693b0 5891 # Code from module strtok_r:
725e2999 5892 # Code from module sys_socket:
09607c9e 5893 # Code from module sys_stat:
4a626d0a 5894 # Code from module sys_time:
8839a007 5895 # Code from module sys_types:
725e2999 5896 # Code from module sys_uio:
2d8adcbd 5897 # Code from module tempname:
09607c9e 5898 # Code from module time:
8839a007 5899 # Code from module unistd:
6ec2e0f5 5900 # Code from module unistd-safer:
3d99e817 5901 # Code from module unsetenv:
c971b7fa 5902 # Code from module update-copyright:
8690e634
JK
5903 # Code from module verify:
5904 # Code from module wchar:
5905 # Code from module wctype-h:
c971b7fa 5906
5e8754f9
SDJ
5907ac_ext=c
5908ac_cpp='$CPP $CPPFLAGS'
5909ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5910ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5911ac_compiler_gnu=$ac_cv_c_compiler_gnu
5912if test -n "$ac_tool_prefix"; then
5913 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5914set dummy ${ac_tool_prefix}gcc; ac_word=$2
5915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5916$as_echo_n "checking for $ac_word... " >&6; }
5917if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
5918 $as_echo_n "(cached) " >&6
5919else
5e8754f9
SDJ
5920 if test -n "$CC"; then
5921 ac_cv_prog_CC="$CC" # Let the user override the test.
c971b7fa 5922else
5e8754f9
SDJ
5923as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5924for as_dir in $PATH
5925do
5926 IFS=$as_save_IFS
5927 test -z "$as_dir" && as_dir=.
5928 for ac_exec_ext in '' $ac_executable_extensions; do
5929 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5930 ac_cv_prog_CC="${ac_tool_prefix}gcc"
5931 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5932 break 2
5933 fi
5934done
5935 done
5936IFS=$as_save_IFS
c971b7fa 5937
5e8754f9
SDJ
5938fi
5939fi
5940CC=$ac_cv_prog_CC
5941if test -n "$CC"; then
5942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5943$as_echo "$CC" >&6; }
7a6dbc2f 5944else
5e8754f9
SDJ
5945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5946$as_echo "no" >&6; }
5947fi
c971b7fa 5948
c971b7fa 5949
7a6dbc2f 5950fi
5e8754f9
SDJ
5951if test -z "$ac_cv_prog_CC"; then
5952 ac_ct_CC=$CC
5953 # Extract the first word of "gcc", so it can be a program name with args.
5954set dummy gcc; ac_word=$2
5955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5956$as_echo_n "checking for $ac_word... " >&6; }
5957if ${ac_cv_prog_ac_ct_CC+:} false; then :
c971b7fa
PA
5958 $as_echo_n "(cached) " >&6
5959else
5e8754f9
SDJ
5960 if test -n "$ac_ct_CC"; then
5961 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
c971b7fa 5962else
5e8754f9
SDJ
5963as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5964for as_dir in $PATH
5965do
5966 IFS=$as_save_IFS
5967 test -z "$as_dir" && as_dir=.
5968 for ac_exec_ext in '' $ac_executable_extensions; do
5969 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5970 ac_cv_prog_ac_ct_CC="gcc"
5971 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5972 break 2
5973 fi
5974done
5975 done
5976IFS=$as_save_IFS
5977
c971b7fa 5978fi
c971b7fa 5979fi
5e8754f9
SDJ
5980ac_ct_CC=$ac_cv_prog_ac_ct_CC
5981if test -n "$ac_ct_CC"; then
5982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5983$as_echo "$ac_ct_CC" >&6; }
5984else
5985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5986$as_echo "no" >&6; }
5987fi
7a6dbc2f 5988
5e8754f9
SDJ
5989 if test "x$ac_ct_CC" = x; then
5990 CC=""
5991 else
5992 case $cross_compiling:$ac_tool_warned in
5993yes:)
5994{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5995$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5996ac_tool_warned=yes ;;
5997esac
5998 CC=$ac_ct_CC
5999 fi
6000else
6001 CC="$ac_cv_prog_CC"
c971b7fa 6002fi
7a6dbc2f 6003
5e8754f9
SDJ
6004if test -z "$CC"; then
6005 if test -n "$ac_tool_prefix"; then
6006 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
6007set dummy ${ac_tool_prefix}cc; ac_word=$2
6008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6009$as_echo_n "checking for $ac_word... " >&6; }
6010if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
6011 $as_echo_n "(cached) " >&6
6012else
5e8754f9
SDJ
6013 if test -n "$CC"; then
6014 ac_cv_prog_CC="$CC" # Let the user override the test.
c971b7fa 6015else
5e8754f9
SDJ
6016as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6017for as_dir in $PATH
6018do
6019 IFS=$as_save_IFS
6020 test -z "$as_dir" && as_dir=.
6021 for ac_exec_ext in '' $ac_executable_extensions; do
6022 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6023 ac_cv_prog_CC="${ac_tool_prefix}cc"
6024 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6025 break 2
6026 fi
6027done
6028 done
6029IFS=$as_save_IFS
6030
7a6dbc2f 6031fi
7a6dbc2f 6032fi
5e8754f9
SDJ
6033CC=$ac_cv_prog_CC
6034if test -n "$CC"; then
6035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6036$as_echo "$CC" >&6; }
c971b7fa 6037else
5e8754f9
SDJ
6038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6039$as_echo "no" >&6; }
6040fi
7a6dbc2f
SDJ
6041
6042
5e8754f9
SDJ
6043 fi
6044fi
6045if test -z "$CC"; then
6046 # Extract the first word of "cc", so it can be a program name with args.
6047set dummy cc; ac_word=$2
6048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6049$as_echo_n "checking for $ac_word... " >&6; }
6050if ${ac_cv_prog_CC+:} false; then :
7a6dbc2f
SDJ
6051 $as_echo_n "(cached) " >&6
6052else
5e8754f9
SDJ
6053 if test -n "$CC"; then
6054 ac_cv_prog_CC="$CC" # Let the user override the test.
7a6dbc2f 6055else
5e8754f9
SDJ
6056 ac_prog_rejected=no
6057as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6058for as_dir in $PATH
6059do
6060 IFS=$as_save_IFS
6061 test -z "$as_dir" && as_dir=.
6062 for ac_exec_ext in '' $ac_executable_extensions; do
6063 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6064 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
6065 ac_prog_rejected=yes
6066 continue
6067 fi
6068 ac_cv_prog_CC="cc"
6069 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6070 break 2
6071 fi
6072done
6073 done
6074IFS=$as_save_IFS
6075
6076if test $ac_prog_rejected = yes; then
6077 # We found a bogon in the path, so make sure we never use it.
6078 set dummy $ac_cv_prog_CC
6079 shift
6080 if test $# != 0; then
6081 # We chose a different compiler from the bogus one.
6082 # However, it has the same basename, so the bogon will be chosen
6083 # first if we set CC to just the basename; use the full file name.
6084 shift
6085 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
6086 fi
6087fi
6088fi
6089fi
6090CC=$ac_cv_prog_CC
6091if test -n "$CC"; then
6092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6093$as_echo "$CC" >&6; }
6094else
6095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6096$as_echo "no" >&6; }
c971b7fa 6097fi
7a6dbc2f 6098
7a6dbc2f 6099
c971b7fa 6100fi
5e8754f9
SDJ
6101if test -z "$CC"; then
6102 if test -n "$ac_tool_prefix"; then
6103 for ac_prog in cl.exe
6104 do
6105 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6106set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6108$as_echo_n "checking for $ac_word... " >&6; }
6109if ${ac_cv_prog_CC+:} false; then :
6110 $as_echo_n "(cached) " >&6
6111else
6112 if test -n "$CC"; then
6113 ac_cv_prog_CC="$CC" # Let the user override the test.
6114else
6115as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6116for as_dir in $PATH
6117do
6118 IFS=$as_save_IFS
6119 test -z "$as_dir" && as_dir=.
6120 for ac_exec_ext in '' $ac_executable_extensions; do
6121 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6122 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
6123 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6124 break 2
6125 fi
6126done
7a6dbc2f 6127 done
5e8754f9
SDJ
6128IFS=$as_save_IFS
6129
6130fi
6131fi
6132CC=$ac_cv_prog_CC
6133if test -n "$CC"; then
6134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6135$as_echo "$CC" >&6; }
6136else
6137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6138$as_echo "no" >&6; }
c971b7fa 6139fi
7a6dbc2f 6140
5e8754f9
SDJ
6141
6142 test -n "$CC" && break
6143 done
6144fi
6145if test -z "$CC"; then
6146 ac_ct_CC=$CC
6147 for ac_prog in cl.exe
6148do
6149 # Extract the first word of "$ac_prog", so it can be a program name with args.
6150set dummy $ac_prog; ac_word=$2
6151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6152$as_echo_n "checking for $ac_word... " >&6; }
6153if ${ac_cv_prog_ac_ct_CC+:} false; then :
c971b7fa
PA
6154 $as_echo_n "(cached) " >&6
6155else
5e8754f9
SDJ
6156 if test -n "$ac_ct_CC"; then
6157 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
6158else
6159as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6160for as_dir in $PATH
6161do
6162 IFS=$as_save_IFS
6163 test -z "$as_dir" && as_dir=.
6164 for ac_exec_ext in '' $ac_executable_extensions; do
6165 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6166 ac_cv_prog_ac_ct_CC="$ac_prog"
6167 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6168 break 2
6169 fi
6170done
6171 done
6172IFS=$as_save_IFS
6173
6174fi
6175fi
6176ac_ct_CC=$ac_cv_prog_ac_ct_CC
6177if test -n "$ac_ct_CC"; then
6178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
6179$as_echo "$ac_ct_CC" >&6; }
6180else
6181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6182$as_echo "no" >&6; }
6183fi
6184
6185
6186 test -n "$ac_ct_CC" && break
6187done
6188
6189 if test "x$ac_ct_CC" = x; then
6190 CC=""
6191 else
6192 case $cross_compiling:$ac_tool_warned in
6193yes:)
6194{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6195$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6196ac_tool_warned=yes ;;
6197esac
6198 CC=$ac_ct_CC
6199 fi
6200fi
6201
6202fi
6203
6204
6205test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6206$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6207as_fn_error $? "no acceptable C compiler found in \$PATH
6208See \`config.log' for more details" "$LINENO" 5; }
6209
6210# Provide some information about the compiler.
6211$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
6212set X $ac_compile
6213ac_compiler=$2
6214for ac_option in --version -v -V -qversion; do
6215 { { ac_try="$ac_compiler $ac_option >&5"
6216case "(($ac_try" in
6217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6218 *) ac_try_echo=$ac_try;;
6219esac
6220eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6221$as_echo "$ac_try_echo"; } >&5
6222 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
6223 ac_status=$?
6224 if test -s conftest.err; then
6225 sed '10a\
6226... rest of stderr output deleted ...
6227 10q' conftest.err >conftest.er1
6228 cat conftest.er1 >&5
6229 fi
6230 rm -f conftest.er1 conftest.err
6231 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6232 test $ac_status = 0; }
6233done
6234
6235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
6236$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
6237if ${ac_cv_c_compiler_gnu+:} false; then :
6238 $as_echo_n "(cached) " >&6
7a6dbc2f
SDJ
6239else
6240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 6241/* end confdefs.h. */
c971b7fa 6242
c971b7fa 6243int
5e8754f9 6244main ()
c971b7fa 6245{
5e8754f9
SDJ
6246#ifndef __GNUC__
6247 choke me
6248#endif
6249
6250 ;
6251 return 0;
c971b7fa
PA
6252}
6253_ACEOF
5e8754f9
SDJ
6254if ac_fn_c_try_compile "$LINENO"; then :
6255 ac_compiler_gnu=yes
7a6dbc2f 6256else
5e8754f9 6257 ac_compiler_gnu=no
c971b7fa 6258fi
5e8754f9
SDJ
6259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6260ac_cv_c_compiler_gnu=$ac_compiler_gnu
c971b7fa
PA
6261
6262fi
5e8754f9
SDJ
6263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
6264$as_echo "$ac_cv_c_compiler_gnu" >&6; }
6265if test $ac_compiler_gnu = yes; then
6266 GCC=yes
6267else
6268 GCC=
d0ac1c44 6269fi
5e8754f9
SDJ
6270ac_test_CFLAGS=${CFLAGS+set}
6271ac_save_CFLAGS=$CFLAGS
6272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
6273$as_echo_n "checking whether $CC accepts -g... " >&6; }
6274if ${ac_cv_prog_cc_g+:} false; then :
6275 $as_echo_n "(cached) " >&6
6276else
6277 ac_save_c_werror_flag=$ac_c_werror_flag
6278 ac_c_werror_flag=yes
6279 ac_cv_prog_cc_g=no
6280 CFLAGS="-g"
6281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6282/* end confdefs.h. */
d0ac1c44 6283
5e8754f9
SDJ
6284int
6285main ()
6286{
c971b7fa 6287
5e8754f9
SDJ
6288 ;
6289 return 0;
6290}
6291_ACEOF
6292if ac_fn_c_try_compile "$LINENO"; then :
6293 ac_cv_prog_cc_g=yes
6294else
6295 CFLAGS=""
6296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6297/* end confdefs.h. */
c971b7fa 6298
5e8754f9
SDJ
6299int
6300main ()
6301{
c971b7fa 6302
5e8754f9
SDJ
6303 ;
6304 return 0;
6305}
6306_ACEOF
6307if ac_fn_c_try_compile "$LINENO"; then :
c971b7fa 6308
5e8754f9
SDJ
6309else
6310 ac_c_werror_flag=$ac_save_c_werror_flag
6311 CFLAGS="-g"
6312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6313/* end confdefs.h. */
c971b7fa 6314
5e8754f9
SDJ
6315int
6316main ()
6317{
c971b7fa 6318
5e8754f9
SDJ
6319 ;
6320 return 0;
6321}
7a6dbc2f 6322_ACEOF
5e8754f9
SDJ
6323if ac_fn_c_try_compile "$LINENO"; then :
6324 ac_cv_prog_cc_g=yes
c971b7fa 6325fi
5e8754f9
SDJ
6326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6327fi
6328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6329fi
6330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6331 ac_c_werror_flag=$ac_save_c_werror_flag
6332fi
6333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
6334$as_echo "$ac_cv_prog_cc_g" >&6; }
6335if test "$ac_test_CFLAGS" = set; then
6336 CFLAGS=$ac_save_CFLAGS
6337elif test $ac_cv_prog_cc_g = yes; then
6338 if test "$GCC" = yes; then
6339 CFLAGS="-g -O2"
6340 else
6341 CFLAGS="-g"
6342 fi
6343else
6344 if test "$GCC" = yes; then
6345 CFLAGS="-O2"
6346 else
6347 CFLAGS=
6348 fi
6349fi
6350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6351$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
6352if ${ac_cv_prog_cc_c89+:} false; then :
6353 $as_echo_n "(cached) " >&6
6354else
6355 ac_cv_prog_cc_c89=no
6356ac_save_CC=$CC
6357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6358/* end confdefs.h. */
6359#include <stdarg.h>
6360#include <stdio.h>
6361struct stat;
6362/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
6363struct buf { int x; };
6364FILE * (*rcsopen) (struct buf *, struct stat *, int);
6365static char *e (p, i)
6366 char **p;
6367 int i;
6368{
6369 return p[i];
6370}
6371static char *f (char * (*g) (char **, int), char **p, ...)
6372{
6373 char *s;
6374 va_list v;
6375 va_start (v,p);
6376 s = g (p, va_arg (v,int));
6377 va_end (v);
6378 return s;
6379}
c971b7fa 6380
5e8754f9
SDJ
6381/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
6382 function prototypes and stuff, but not '\xHH' hex character constants.
6383 These don't provoke an error unfortunately, instead are silently treated
6384 as 'x'. The following induces an error, until -std is added to get
6385 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
6386 array size at least. It's necessary to write '\x00'==0 to get something
6387 that's true only with -std. */
6388int osf4_cc_array ['\x00' == 0 ? 1 : -1];
c971b7fa 6389
5e8754f9
SDJ
6390/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6391 inside strings and character constants. */
6392#define FOO(x) 'x'
6393int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
c971b7fa 6394
5e8754f9
SDJ
6395int test (int i, double x);
6396struct s1 {int (*f) (int a);};
6397struct s2 {int (*f) (double a);};
6398int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6399int argc;
6400char **argv;
6401int
6402main ()
6403{
6404return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
6405 ;
6406 return 0;
6407}
6408_ACEOF
6409for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6410 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6411do
6412 CC="$ac_save_CC $ac_arg"
6413 if ac_fn_c_try_compile "$LINENO"; then :
6414 ac_cv_prog_cc_c89=$ac_arg
6415fi
6416rm -f core conftest.err conftest.$ac_objext
6417 test "x$ac_cv_prog_cc_c89" != "xno" && break
6418done
6419rm -f conftest.$ac_ext
6420CC=$ac_save_CC
c971b7fa 6421
5e8754f9
SDJ
6422fi
6423# AC_CACHE_VAL
6424case "x$ac_cv_prog_cc_c89" in
6425 x)
6426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6427$as_echo "none needed" >&6; } ;;
6428 xno)
6429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6430$as_echo "unsupported" >&6; } ;;
6431 *)
6432 CC="$CC $ac_cv_prog_cc_c89"
6433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6434$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6435esac
6436if test "x$ac_cv_prog_cc_c89" != xno; then :
c971b7fa 6437
5e8754f9 6438fi
c971b7fa 6439
5e8754f9
SDJ
6440ac_ext=c
6441ac_cpp='$CPP $CPPFLAGS'
6442ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6443ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6444ac_compiler_gnu=$ac_cv_c_compiler_gnu
d0ac1c44 6445
5e8754f9
SDJ
6446ac_ext=c
6447ac_cpp='$CPP $CPPFLAGS'
6448ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6449ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6450ac_compiler_gnu=$ac_cv_c_compiler_gnu
6451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
6452$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
6453if ${am_cv_prog_cc_c_o+:} false; then :
6454 $as_echo_n "(cached) " >&6
6455else
6456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6457/* end confdefs.h. */
d0ac1c44 6458
5e8754f9
SDJ
6459int
6460main ()
6461{
d0ac1c44 6462
5e8754f9
SDJ
6463 ;
6464 return 0;
6465}
6466_ACEOF
6467 # Make sure it works both with $CC and with simple cc.
6468 # Following AC_PROG_CC_C_O, we do the test twice because some
6469 # compilers refuse to overwrite an existing .o file with -o,
6470 # though they will create one.
6471 am_cv_prog_cc_c_o=yes
6472 for am_i in 1 2; do
6473 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
6474 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
6475 ac_status=$?
6476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6477 (exit $ac_status); } \
6478 && test -f conftest2.$ac_objext; then
6479 : OK
6480 else
6481 am_cv_prog_cc_c_o=no
6482 break
6483 fi
6484 done
6485 rm -f core conftest*
6486 unset am_i
6487fi
6488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
6489$as_echo "$am_cv_prog_cc_c_o" >&6; }
6490if test "$am_cv_prog_cc_c_o" != yes; then
6491 # Losing compiler, so override with the script.
6492 # FIXME: It is wrong to rewrite CC.
6493 # But if we don't then we get into trouble of one sort or another.
6494 # A longer-term fix would be to have automake use am__CC in this case,
6495 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
6496 CC="$am_aux_dir/compile $CC"
6497fi
6498ac_ext=c
6499ac_cpp='$CPP $CPPFLAGS'
6500ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6501ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6502ac_compiler_gnu=$ac_cv_c_compiler_gnu
d0ac1c44 6503
7a6dbc2f 6504
5e8754f9 6505am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
7a6dbc2f
SDJ
6506
6507
5e8754f9
SDJ
6508ac_aux_dir=
6509for ac_dir in ../.. "$srcdir"/../..; do
6510 if test -f "$ac_dir/install-sh"; then
6511 ac_aux_dir=$ac_dir
6512 ac_install_sh="$ac_aux_dir/install-sh -c"
6513 break
6514 elif test -f "$ac_dir/install.sh"; then
6515 ac_aux_dir=$ac_dir
6516 ac_install_sh="$ac_aux_dir/install.sh -c"
6517 break
6518 elif test -f "$ac_dir/shtool"; then
6519 ac_aux_dir=$ac_dir
6520 ac_install_sh="$ac_aux_dir/shtool install -c"
6521 break
6522 fi
6523done
6524if test -z "$ac_aux_dir"; then
6525 as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../.. \"$srcdir\"/../.." "$LINENO" 5
6526fi
6527
6528# These three variables are undocumented and unsupported,
6529# and are intended to be withdrawn in a future Autoconf release.
6530# They can cause serious problems if a builder's source tree is in a directory
6531# whose full name contains unusual characters.
6532ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
6533ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
6534ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
6535
6536
6537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6538$as_echo_n "checking target system type... " >&6; }
6539if ${ac_cv_target+:} false; then :
c971b7fa
PA
6540 $as_echo_n "(cached) " >&6
6541else
5e8754f9
SDJ
6542 if test "x$target_alias" = x; then
6543 ac_cv_target=$ac_cv_host
6544else
6545 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6546 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
c971b7fa 6547fi
c971b7fa 6548
5e8754f9
SDJ
6549fi
6550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6551$as_echo "$ac_cv_target" >&6; }
6552case $ac_cv_target in
6553*-*-*) ;;
6554*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6555esac
6556target=$ac_cv_target
6557ac_save_IFS=$IFS; IFS='-'
6558set x $ac_cv_target
6559shift
6560target_cpu=$1
6561target_vendor=$2
6562shift; shift
6563# Remember, the first character of IFS is used to create $*,
6564# except with old shells:
6565target_os=$*
6566IFS=$ac_save_IFS
6567case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
c971b7fa
PA
6568
6569
5e8754f9
SDJ
6570# The aliases save the names the user supplied, while $host etc.
6571# will get canonicalized.
6572test -n "$target_alias" &&
6573 test "$program_prefix$program_suffix$program_transform_name" = \
6574 NONENONEs,x,x, &&
6575 program_prefix=${target_alias}-
7a6dbc2f
SDJ
6576
6577
6578
6579
6580
6581
6582
5e8754f9
SDJ
6583 LIBC_FATAL_STDERR_=1
6584 export LIBC_FATAL_STDERR_
7a6dbc2f 6585
5e8754f9
SDJ
6586ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6587if test "x$ac_cv_type_size_t" = xyes; then :
7a6dbc2f 6588
5e8754f9 6589else
7a6dbc2f 6590
5e8754f9
SDJ
6591cat >>confdefs.h <<_ACEOF
6592#define size_t unsigned int
6593_ACEOF
7a6dbc2f 6594
5e8754f9 6595fi
7a6dbc2f 6596
5e8754f9
SDJ
6597# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6598# for constant arguments. Useless!
6599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
6600$as_echo_n "checking for working alloca.h... " >&6; }
6601if ${ac_cv_working_alloca_h+:} false; then :
c971b7fa 6602 $as_echo_n "(cached) " >&6
7a6dbc2f 6603else
5e8754f9
SDJ
6604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6605/* end confdefs.h. */
6606#include <alloca.h>
6607int
6608main ()
6609{
6610char *p = (char *) alloca (2 * sizeof (int));
6611 if (p) return 0;
6612 ;
6613 return 0;
6614}
6615_ACEOF
6616if ac_fn_c_try_link "$LINENO"; then :
6617 ac_cv_working_alloca_h=yes
6618else
6619 ac_cv_working_alloca_h=no
6620fi
6621rm -f core conftest.err conftest.$ac_objext \
6622 conftest$ac_exeext conftest.$ac_ext
6623fi
6624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
6625$as_echo "$ac_cv_working_alloca_h" >&6; }
6626if test $ac_cv_working_alloca_h = yes; then
7a6dbc2f 6627
5e8754f9
SDJ
6628$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
6629
6630fi
7a6dbc2f 6631
5e8754f9
SDJ
6632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
6633$as_echo_n "checking for alloca... " >&6; }
6634if ${ac_cv_func_alloca_works+:} false; then :
6635 $as_echo_n "(cached) " >&6
c971b7fa
PA
6636else
6637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6638/* end confdefs.h. */
5e8754f9
SDJ
6639#ifdef __GNUC__
6640# define alloca __builtin_alloca
6641#else
6642# ifdef _MSC_VER
6643# include <malloc.h>
6644# define alloca _alloca
6645# else
6646# ifdef HAVE_ALLOCA_H
6647# include <alloca.h>
6648# else
6649# ifdef _AIX
6650 #pragma alloca
6651# else
6652# ifndef alloca /* predefined by HP cc +Olibcalls */
6653void *alloca (size_t);
6654# endif
6655# endif
6656# endif
6657# endif
6658#endif
7a6dbc2f 6659
5e8754f9
SDJ
6660int
6661main ()
7a6dbc2f 6662{
5e8754f9
SDJ
6663char *p = (char *) alloca (1);
6664 if (p) return 0;
6665 ;
6666 return 0;
7a6dbc2f 6667}
c971b7fa 6668_ACEOF
5e8754f9
SDJ
6669if ac_fn_c_try_link "$LINENO"; then :
6670 ac_cv_func_alloca_works=yes
c971b7fa 6671else
5e8754f9 6672 ac_cv_func_alloca_works=no
7a6dbc2f 6673fi
5e8754f9
SDJ
6674rm -f core conftest.err conftest.$ac_objext \
6675 conftest$ac_exeext conftest.$ac_ext
c0fc7f8b 6676fi
5e8754f9
SDJ
6677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
6678$as_echo "$ac_cv_func_alloca_works" >&6; }
98399780 6679
5e8754f9 6680if test $ac_cv_func_alloca_works = yes; then
98399780 6681
5e8754f9 6682$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
472fa5ee 6683
5e8754f9
SDJ
6684else
6685 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6686# that cause trouble. Some versions do not even contain alloca or
6687# contain a buggy version. If you still want to use their alloca,
6688# use ar to extract alloca.o from them instead of compiling alloca.c.
472fa5ee
SM
6689
6690
6691
6692
6693
5e8754f9 6694ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
472fa5ee 6695
5e8754f9 6696$as_echo "#define C_ALLOCA 1" >>confdefs.h
472fa5ee
SM
6697
6698
5e8754f9
SDJ
6699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
6700$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
6701if ${ac_cv_os_cray+:} false; then :
6702 $as_echo_n "(cached) " >&6
6703else
6704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6705/* end confdefs.h. */
6706#if defined CRAY && ! defined CRAY2
6707webecray
6708#else
6709wenotbecray
6710#endif
472fa5ee 6711
5e8754f9
SDJ
6712_ACEOF
6713if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6714 $EGREP "webecray" >/dev/null 2>&1; then :
6715 ac_cv_os_cray=yes
6716else
6717 ac_cv_os_cray=no
6718fi
6719rm -f conftest*
472fa5ee 6720
5e8754f9
SDJ
6721fi
6722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
6723$as_echo "$ac_cv_os_cray" >&6; }
6724if test $ac_cv_os_cray = yes; then
6725 for ac_func in _getb67 GETB67 getb67; do
6726 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6727ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6728if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
472fa5ee 6729
5e8754f9
SDJ
6730cat >>confdefs.h <<_ACEOF
6731#define CRAY_STACKSEG_END $ac_func
6732_ACEOF
472fa5ee 6733
5e8754f9
SDJ
6734 break
6735fi
472fa5ee 6736
5e8754f9
SDJ
6737 done
6738fi
472fa5ee 6739
5e8754f9
SDJ
6740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
6741$as_echo_n "checking stack direction for C alloca... " >&6; }
6742if ${ac_cv_c_stack_direction+:} false; then :
6743 $as_echo_n "(cached) " >&6
6744else
6745 if test "$cross_compiling" = yes; then :
6746 ac_cv_c_stack_direction=0
6747else
6748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6749/* end confdefs.h. */
6750$ac_includes_default
6751int
6752find_stack_direction (int *addr, int depth)
6753{
6754 int dir, dummy = 0;
6755 if (! addr)
6756 addr = &dummy;
6757 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
6758 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
6759 return dir + dummy;
6760}
472fa5ee 6761
5e8754f9
SDJ
6762int
6763main (int argc, char **argv)
6764{
6765 return find_stack_direction (0, argc + !argv + 20) < 0;
6766}
6767_ACEOF
6768if ac_fn_c_try_run "$LINENO"; then :
6769 ac_cv_c_stack_direction=1
6770else
6771 ac_cv_c_stack_direction=-1
6772fi
6773rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6774 conftest.$ac_objext conftest.beam conftest.$ac_ext
6775fi
472fa5ee 6776
5e8754f9
SDJ
6777fi
6778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
6779$as_echo "$ac_cv_c_stack_direction" >&6; }
6780cat >>confdefs.h <<_ACEOF
6781#define STACK_DIRECTION $ac_cv_c_stack_direction
6782_ACEOF
472fa5ee 6783
98399780 6784
5e8754f9 6785fi
98399780
YQ
6786
6787
725e2999
JB
6788 GNULIB_INET_NTOP=0;
6789 GNULIB_INET_PTON=0;
6790 HAVE_DECL_INET_NTOP=1;
6791 HAVE_DECL_INET_PTON=1;
6792 REPLACE_INET_NTOP=0;
6793 REPLACE_INET_PTON=0;
6794
6795
6796
6797
6798
6799 for ac_header in $gl_header_list
6800do :
6801 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6802ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6803if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6804 cat >>confdefs.h <<_ACEOF
6805#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6806_ACEOF
6807
6808fi
6809
6810done
6811
6812
6813
6814
6815
6816
6817
6818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
6819$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
6820if ${gl_cv_have_include_next+:} false; then :
6821 $as_echo_n "(cached) " >&6
6822else
6823 rm -rf conftestd1a conftestd1b conftestd2
6824 mkdir conftestd1a conftestd1b conftestd2
6825 cat <<EOF > conftestd1a/conftest.h
6826#define DEFINED_IN_CONFTESTD1
6827#include_next <conftest.h>
6828#ifdef DEFINED_IN_CONFTESTD2
6829int foo;
6830#else
6831#error "include_next doesn't work"
6832#endif
6833EOF
6834 cat <<EOF > conftestd1b/conftest.h
6835#define DEFINED_IN_CONFTESTD1
6836#include <stdio.h>
6837#include_next <conftest.h>
6838#ifdef DEFINED_IN_CONFTESTD2
6839int foo;
6840#else
6841#error "include_next doesn't work"
6842#endif
6843EOF
6844 cat <<EOF > conftestd2/conftest.h
6845#ifndef DEFINED_IN_CONFTESTD1
6846#error "include_next test doesn't work"
6847#endif
6848#define DEFINED_IN_CONFTESTD2
6849EOF
6850 gl_save_CPPFLAGS="$CPPFLAGS"
6851 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
6852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6853/* end confdefs.h. */
6854#include <conftest.h>
6855_ACEOF
6856if ac_fn_c_try_compile "$LINENO"; then :
6857 gl_cv_have_include_next=yes
6858else
6859 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
6860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6861/* end confdefs.h. */
6862#include <conftest.h>
6863_ACEOF
6864if ac_fn_c_try_compile "$LINENO"; then :
6865 gl_cv_have_include_next=buggy
6866else
6867 gl_cv_have_include_next=no
6868fi
6869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6870
6871fi
6872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6873 CPPFLAGS="$gl_save_CPPFLAGS"
6874 rm -rf conftestd1a conftestd1b conftestd2
6875
6876fi
6877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
6878$as_echo "$gl_cv_have_include_next" >&6; }
6879 PRAGMA_SYSTEM_HEADER=
6880 if test $gl_cv_have_include_next = yes; then
6881 INCLUDE_NEXT=include_next
6882 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
6883 if test -n "$GCC"; then
6884 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
6885 fi
6886 else
6887 if test $gl_cv_have_include_next = buggy; then
6888 INCLUDE_NEXT=include
6889 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
6890 else
6891 INCLUDE_NEXT=include
6892 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
6893 fi
6894 fi
6895
6896
6897
6898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
6899$as_echo_n "checking whether system header files limit the line length... " >&6; }
6900if ${gl_cv_pragma_columns+:} false; then :
6901 $as_echo_n "(cached) " >&6
6902else
6903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6904/* end confdefs.h. */
6905
6906#ifdef __TANDEM
6907choke me
6908#endif
6909
6910_ACEOF
6911if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6912 $EGREP "choke me" >/dev/null 2>&1; then :
6913 gl_cv_pragma_columns=yes
6914else
6915 gl_cv_pragma_columns=no
6916fi
6917rm -f conftest*
6918
6919
6920fi
6921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
6922$as_echo "$gl_cv_pragma_columns" >&6; }
6923 if test $gl_cv_pragma_columns = yes; then
6924 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
6925 else
6926 PRAGMA_COLUMNS=
6927 fi
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937 :
6938
6939
6940
6941
6942
6943 if test $ac_cv_header_features_h = yes; then
6944 HAVE_FEATURES_H=1
6945 else
6946 HAVE_FEATURES_H=0
6947 fi
6948
6949
6950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6951$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6952if test -z "$MKDIR_P"; then
6953 if ${ac_cv_path_mkdir+:} false; then :
6954 $as_echo_n "(cached) " >&6
6955else
6956 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6957for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6958do
6959 IFS=$as_save_IFS
6960 test -z "$as_dir" && as_dir=.
6961 for ac_prog in mkdir gmkdir; do
6962 for ac_exec_ext in '' $ac_executable_extensions; do
6963 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
6964 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6965 'mkdir (GNU coreutils) '* | \
6966 'mkdir (coreutils) '* | \
6967 'mkdir (fileutils) '4.1*)
6968 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6969 break 3;;
6970 esac
6971 done
6972 done
6973 done
6974IFS=$as_save_IFS
6975
6976fi
6977
6978 test -d ./--version && rmdir ./--version
6979 if test "${ac_cv_path_mkdir+set}" = set; then
6980 MKDIR_P="$ac_cv_path_mkdir -p"
6981 else
6982 # As a last resort, use the slow shell script. Don't cache a
6983 # value for MKDIR_P within a source directory, because that will
6984 # break other packages using the cache if that directory is
6985 # removed, or if the value is a relative name.
6986 MKDIR_P="$ac_install_sh -d"
6987 fi
6988fi
6989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6990$as_echo "$MKDIR_P" >&6; }
6991
6992
5e8754f9
SDJ
6993 GNULIB__EXIT=0;
6994 GNULIB_ATOLL=0;
6995 GNULIB_CALLOC_POSIX=0;
6996 GNULIB_CANONICALIZE_FILE_NAME=0;
6997 GNULIB_GETLOADAVG=0;
6998 GNULIB_GETSUBOPT=0;
6999 GNULIB_GRANTPT=0;
7000 GNULIB_MALLOC_POSIX=0;
7001 GNULIB_MBTOWC=0;
7002 GNULIB_MKDTEMP=0;
7003 GNULIB_MKOSTEMP=0;
7004 GNULIB_MKOSTEMPS=0;
7005 GNULIB_MKSTEMP=0;
7006 GNULIB_MKSTEMPS=0;
7007 GNULIB_POSIX_OPENPT=0;
7008 GNULIB_PTSNAME=0;
7009 GNULIB_PTSNAME_R=0;
7010 GNULIB_PUTENV=0;
7011 GNULIB_QSORT_R=0;
7012 GNULIB_RANDOM=0;
7013 GNULIB_RANDOM_R=0;
7014 GNULIB_REALLOC_POSIX=0;
7015 GNULIB_REALPATH=0;
7016 GNULIB_RPMATCH=0;
7017 GNULIB_SECURE_GETENV=0;
7018 GNULIB_SETENV=0;
7019 GNULIB_STRTOD=0;
7020 GNULIB_STRTOLL=0;
7021 GNULIB_STRTOULL=0;
7022 GNULIB_SYSTEM_POSIX=0;
7023 GNULIB_UNLOCKPT=0;
7024 GNULIB_UNSETENV=0;
7025 GNULIB_WCTOMB=0;
7026 HAVE__EXIT=1;
7027 HAVE_ATOLL=1;
7028 HAVE_CANONICALIZE_FILE_NAME=1;
7029 HAVE_DECL_GETLOADAVG=1;
7030 HAVE_GETSUBOPT=1;
7031 HAVE_GRANTPT=1;
7032 HAVE_MKDTEMP=1;
7033 HAVE_MKOSTEMP=1;
7034 HAVE_MKOSTEMPS=1;
7035 HAVE_MKSTEMP=1;
7036 HAVE_MKSTEMPS=1;
7037 HAVE_POSIX_OPENPT=1;
7038 HAVE_PTSNAME=1;
7039 HAVE_PTSNAME_R=1;
7040 HAVE_QSORT_R=1;
7041 HAVE_RANDOM=1;
7042 HAVE_RANDOM_H=1;
7043 HAVE_RANDOM_R=1;
7044 HAVE_REALPATH=1;
7045 HAVE_RPMATCH=1;
7046 HAVE_SECURE_GETENV=1;
7047 HAVE_SETENV=1;
7048 HAVE_DECL_SETENV=1;
7049 HAVE_STRTOD=1;
7050 HAVE_STRTOLL=1;
7051 HAVE_STRTOULL=1;
7052 HAVE_STRUCT_RANDOM_DATA=1;
7053 HAVE_SYS_LOADAVG_H=0;
7054 HAVE_UNLOCKPT=1;
7055 HAVE_DECL_UNSETENV=1;
7056 REPLACE_CALLOC=0;
7057 REPLACE_CANONICALIZE_FILE_NAME=0;
7058 REPLACE_MALLOC=0;
7059 REPLACE_MBTOWC=0;
7060 REPLACE_MKSTEMP=0;
7061 REPLACE_PTSNAME=0;
7062 REPLACE_PTSNAME_R=0;
7063 REPLACE_PUTENV=0;
7064 REPLACE_QSORT_R=0;
7065 REPLACE_RANDOM_R=0;
7066 REPLACE_REALLOC=0;
7067 REPLACE_REALPATH=0;
7068 REPLACE_SETENV=0;
7069 REPLACE_STRTOD=0;
7070 REPLACE_UNSETENV=0;
7071 REPLACE_WCTOMB=0;
6ec2e0f5
SDJ
7072
7073
7074
7075
472fa5ee 7076
5e8754f9
SDJ
7077 for ac_func in $gl_func_list
7078do :
7079 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7080ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7081if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7082 cat >>confdefs.h <<_ACEOF
7083#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7084_ACEOF
472fa5ee 7085
5e8754f9
SDJ
7086fi
7087done
472fa5ee
SM
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
472fa5ee
SM
7102
7103
7104
5e8754f9
SDJ
7105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
7106$as_echo_n "checking whether // is distinct from /... " >&6; }
7107if ${gl_cv_double_slash_root+:} false; then :
7108 $as_echo_n "(cached) " >&6
7109else
7110 if test x"$cross_compiling" = xyes ; then
7111 # When cross-compiling, there is no way to tell whether // is special
7112 # short of a list of hosts. However, the only known hosts to date
7113 # that have a distinct // are Apollo DomainOS (too old to port to),
7114 # Cygwin, and z/OS. If anyone knows of another system for which // has
7115 # special semantics and is distinct from /, please report it to
7116 # <bug-gnulib@gnu.org>.
7117 case $host in
7118 *-cygwin | i370-ibm-openedition)
7119 gl_cv_double_slash_root=yes ;;
7120 *)
7121 # Be optimistic and assume that / and // are the same when we
7122 # don't know.
7123 gl_cv_double_slash_root='unknown, assuming no' ;;
7124 esac
7125 else
7126 set x `ls -di / // 2>/dev/null`
7127 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
7128 gl_cv_double_slash_root=no
7129 else
7130 gl_cv_double_slash_root=yes
7131 fi
7132 fi
7133fi
7134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
7135$as_echo "$gl_cv_double_slash_root" >&6; }
7136 if test "$gl_cv_double_slash_root" = yes; then
6ec2e0f5 7137
5e8754f9 7138$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
6ec2e0f5 7139
5e8754f9 7140 fi
6ec2e0f5 7141
6ec2e0f5 7142
6ec2e0f5
SDJ
7143
7144
7145
7146
7147
7148
5e8754f9 7149 :
6ec2e0f5 7150
472fa5ee
SM
7151
7152
7153
7154
5e8754f9
SDJ
7155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
7156$as_echo_n "checking whether realpath works... " >&6; }
7157if ${gl_cv_func_realpath_works+:} false; then :
7158 $as_echo_n "(cached) " >&6
7159else
472fa5ee 7160
5e8754f9
SDJ
7161 touch conftest.a
7162 mkdir conftest.d
7163 if test "$cross_compiling" = yes; then :
7164 case "$host_os" in
7165 # Guess yes on glibc systems.
7166 *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
7167 # If we don't know, assume the worst.
7168 *) gl_cv_func_realpath_works="guessing no" ;;
7169 esac
472fa5ee 7170
5e8754f9
SDJ
7171else
7172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7173/* end confdefs.h. */
e26b6bb0
TT
7174
7175
7176
5e8754f9
SDJ
7177#include <stdlib.h>
7178#if defined __MACH__ && defined __APPLE__
7179/* Avoid a crash on Mac OS X. */
7180#include <mach/mach.h>
7181#include <mach/mach_error.h>
7182#include <mach/thread_status.h>
7183#include <mach/exception.h>
7184#include <mach/task.h>
7185#include <pthread.h>
7186/* The exception port on which our thread listens. */
7187static mach_port_t our_exception_port;
7188/* The main function of the thread listening for exceptions of type
7189 EXC_BAD_ACCESS. */
7190static void *
7191mach_exception_thread (void *arg)
7192{
7193 /* Buffer for a message to be received. */
7194 struct {
7195 mach_msg_header_t head;
7196 mach_msg_body_t msgh_body;
7197 char data[1024];
7198 } msg;
7199 mach_msg_return_t retval;
7200 /* Wait for a message on the exception port. */
7201 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
7202 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
7203 if (retval != MACH_MSG_SUCCESS)
7204 abort ();
7205 exit (1);
7206}
7207static void
7208nocrash_init (void)
7209{
7210 mach_port_t self = mach_task_self ();
7211 /* Allocate a port on which the thread shall listen for exceptions. */
7212 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
7213 == KERN_SUCCESS) {
7214 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
7215 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
7216 MACH_MSG_TYPE_MAKE_SEND)
7217 == KERN_SUCCESS) {
7218 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
7219 for us. */
7220 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
7221 /* Create the thread listening on the exception port. */
7222 pthread_attr_t attr;
7223 pthread_t thread;
7224 if (pthread_attr_init (&attr) == 0
7225 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
7226 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
7227 pthread_attr_destroy (&attr);
7228 /* Replace the exception port info for these exceptions with our own.
7229 Note that we replace the exception port for the entire task, not only
7230 for a particular thread. This has the effect that when our exception
7231 port gets the message, the thread specific exception port has already
7232 been asked, and we don't need to bother about it.
7233 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
7234 task_set_exception_ports (self, mask, our_exception_port,
7235 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
7236 }
7237 }
7238 }
7239}
7240#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
7241/* Avoid a crash on native Windows. */
7242#define WIN32_LEAN_AND_MEAN
7243#include <windows.h>
7244#include <winerror.h>
7245static LONG WINAPI
7246exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
7247{
7248 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
7249 {
7250 case EXCEPTION_ACCESS_VIOLATION:
7251 case EXCEPTION_IN_PAGE_ERROR:
7252 case EXCEPTION_STACK_OVERFLOW:
7253 case EXCEPTION_GUARD_PAGE:
7254 case EXCEPTION_PRIV_INSTRUCTION:
7255 case EXCEPTION_ILLEGAL_INSTRUCTION:
7256 case EXCEPTION_DATATYPE_MISALIGNMENT:
7257 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
7258 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
7259 exit (1);
7260 }
7261 return EXCEPTION_CONTINUE_SEARCH;
7262}
7263static void
7264nocrash_init (void)
7265{
7266 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
7267}
e26b6bb0 7268#else
5e8754f9
SDJ
7269/* Avoid a crash on POSIX systems. */
7270#include <signal.h>
7271#include <unistd.h>
7272/* A POSIX signal handler. */
7273static void
7274exception_handler (int sig)
7275{
7276 _exit (1);
7277}
7278static void
7279nocrash_init (void)
7280{
7281#ifdef SIGSEGV
7282 signal (SIGSEGV, exception_handler);
88b48903 7283#endif
5e8754f9
SDJ
7284#ifdef SIGBUS
7285 signal (SIGBUS, exception_handler);
88b48903 7286#endif
5e8754f9 7287}
88b48903 7288#endif
88b48903 7289
5e8754f9
SDJ
7290 #include <stdlib.h>
7291 #include <string.h>
88b48903 7292
5e8754f9
SDJ
7293int
7294main ()
7295{
88b48903 7296
5e8754f9
SDJ
7297 int result = 0;
7298 {
7299 char *name = realpath ("conftest.a", NULL);
7300 if (!(name && *name == '/'))
7301 result |= 1;
7302 free (name);
7303 }
7304 {
7305 char *name = realpath ("conftest.b/../conftest.a", NULL);
7306 if (name != NULL)
7307 result |= 2;
7308 free (name);
7309 }
7310 {
7311 char *name = realpath ("conftest.a/", NULL);
7312 if (name != NULL)
7313 result |= 4;
7314 free (name);
7315 }
7316 {
7317 char *name1 = realpath (".", NULL);
7318 char *name2 = realpath ("conftest.d//./..", NULL);
7319 if (! name1 || ! name2 || strcmp (name1, name2))
7320 result |= 8;
7321 free (name1);
7322 free (name2);
7323 }
7324 return result;
88b48903 7325
5e8754f9
SDJ
7326 ;
7327 return 0;
7328}
88b48903
WN
7329
7330_ACEOF
5e8754f9
SDJ
7331if ac_fn_c_try_run "$LINENO"; then :
7332 gl_cv_func_realpath_works=yes
88b48903 7333else
5e8754f9
SDJ
7334 gl_cv_func_realpath_works=no
7335fi
7336rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7337 conftest.$ac_objext conftest.beam conftest.$ac_ext
88b48903 7338fi
88b48903 7339
5e8754f9 7340 rm -rf conftest.a conftest.d
88b48903
WN
7341
7342fi
5e8754f9
SDJ
7343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
7344$as_echo "$gl_cv_func_realpath_works" >&6; }
7345 case "$gl_cv_func_realpath_works" in
7346 *yes)
88b48903 7347
5e8754f9 7348$as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
88b48903 7349
5e8754f9
SDJ
7350 ;;
7351 esac
88b48903
WN
7352
7353
e26b6bb0 7354
e26b6bb0 7355
3d99e817 7356
472fa5ee
SM
7357
7358
7359
7360
5e8754f9 7361 :
472fa5ee
SM
7362
7363
3d99e817 7364
3d99e817 7365
3d99e817 7366
3d99e817 7367
3d99e817 7368
3d99e817
AK
7369
7370
3d99e817
AK
7371
7372
7373
18848e28 7374
18848e28 7375
5e8754f9 7376 :
18848e28 7377
18848e28
GF
7378
7379
18848e28
GF
7380
7381
7382
7383
5e8754f9
SDJ
7384 GNULIB_CHDIR=0;
7385 GNULIB_CHOWN=0;
7386 GNULIB_CLOSE=0;
7387 GNULIB_DUP=0;
7388 GNULIB_DUP2=0;
7389 GNULIB_DUP3=0;
7390 GNULIB_ENVIRON=0;
7391 GNULIB_EUIDACCESS=0;
7392 GNULIB_FACCESSAT=0;
7393 GNULIB_FCHDIR=0;
7394 GNULIB_FCHOWNAT=0;
7395 GNULIB_FDATASYNC=0;
7396 GNULIB_FSYNC=0;
7397 GNULIB_FTRUNCATE=0;
7398 GNULIB_GETCWD=0;
7399 GNULIB_GETDOMAINNAME=0;
7400 GNULIB_GETDTABLESIZE=0;
7401 GNULIB_GETGROUPS=0;
7402 GNULIB_GETHOSTNAME=0;
7403 GNULIB_GETLOGIN=0;
7404 GNULIB_GETLOGIN_R=0;
7405 GNULIB_GETPAGESIZE=0;
7406 GNULIB_GETUSERSHELL=0;
7407 GNULIB_GROUP_MEMBER=0;
7408 GNULIB_ISATTY=0;
7409 GNULIB_LCHOWN=0;
7410 GNULIB_LINK=0;
7411 GNULIB_LINKAT=0;
7412 GNULIB_LSEEK=0;
7413 GNULIB_PIPE=0;
7414 GNULIB_PIPE2=0;
7415 GNULIB_PREAD=0;
7416 GNULIB_PWRITE=0;
7417 GNULIB_READ=0;
7418 GNULIB_READLINK=0;
7419 GNULIB_READLINKAT=0;
7420 GNULIB_RMDIR=0;
7421 GNULIB_SETHOSTNAME=0;
7422 GNULIB_SLEEP=0;
7423 GNULIB_SYMLINK=0;
7424 GNULIB_SYMLINKAT=0;
7425 GNULIB_TTYNAME_R=0;
7426 GNULIB_UNISTD_H_NONBLOCKING=0;
7427 GNULIB_UNISTD_H_SIGPIPE=0;
7428 GNULIB_UNLINK=0;
7429 GNULIB_UNLINKAT=0;
7430 GNULIB_USLEEP=0;
7431 GNULIB_WRITE=0;
7432 HAVE_CHOWN=1;
7433 HAVE_DUP2=1;
7434 HAVE_DUP3=1;
7435 HAVE_EUIDACCESS=1;
7436 HAVE_FACCESSAT=1;
7437 HAVE_FCHDIR=1;
7438 HAVE_FCHOWNAT=1;
7439 HAVE_FDATASYNC=1;
7440 HAVE_FSYNC=1;
7441 HAVE_FTRUNCATE=1;
7442 HAVE_GETDTABLESIZE=1;
7443 HAVE_GETGROUPS=1;
7444 HAVE_GETHOSTNAME=1;
7445 HAVE_GETLOGIN=1;
7446 HAVE_GETPAGESIZE=1;
7447 HAVE_GROUP_MEMBER=1;
7448 HAVE_LCHOWN=1;
7449 HAVE_LINK=1;
7450 HAVE_LINKAT=1;
7451 HAVE_PIPE=1;
7452 HAVE_PIPE2=1;
7453 HAVE_PREAD=1;
7454 HAVE_PWRITE=1;
7455 HAVE_READLINK=1;
7456 HAVE_READLINKAT=1;
7457 HAVE_SETHOSTNAME=1;
7458 HAVE_SLEEP=1;
7459 HAVE_SYMLINK=1;
7460 HAVE_SYMLINKAT=1;
7461 HAVE_UNLINKAT=1;
7462 HAVE_USLEEP=1;
7463 HAVE_DECL_ENVIRON=1;
7464 HAVE_DECL_FCHDIR=1;
7465 HAVE_DECL_FDATASYNC=1;
7466 HAVE_DECL_GETDOMAINNAME=1;
7467 HAVE_DECL_GETLOGIN_R=1;
7468 HAVE_DECL_GETPAGESIZE=1;
7469 HAVE_DECL_GETUSERSHELL=1;
7470 HAVE_DECL_SETHOSTNAME=1;
7471 HAVE_DECL_TTYNAME_R=1;
7472 HAVE_OS_H=0;
7473 HAVE_SYS_PARAM_H=0;
7474 REPLACE_CHOWN=0;
7475 REPLACE_CLOSE=0;
7476 REPLACE_DUP=0;
7477 REPLACE_DUP2=0;
7478 REPLACE_FCHOWNAT=0;
7479 REPLACE_FTRUNCATE=0;
7480 REPLACE_GETCWD=0;
7481 REPLACE_GETDOMAINNAME=0;
7482 REPLACE_GETDTABLESIZE=0;
7483 REPLACE_GETLOGIN_R=0;
7484 REPLACE_GETGROUPS=0;
7485 REPLACE_GETPAGESIZE=0;
7486 REPLACE_ISATTY=0;
7487 REPLACE_LCHOWN=0;
7488 REPLACE_LINK=0;
7489 REPLACE_LINKAT=0;
7490 REPLACE_LSEEK=0;
7491 REPLACE_PREAD=0;
7492 REPLACE_PWRITE=0;
7493 REPLACE_READ=0;
7494 REPLACE_READLINK=0;
7495 REPLACE_READLINKAT=0;
7496 REPLACE_RMDIR=0;
7497 REPLACE_SLEEP=0;
7498 REPLACE_SYMLINK=0;
7499 REPLACE_SYMLINKAT=0;
7500 REPLACE_TTYNAME_R=0;
7501 REPLACE_UNLINK=0;
7502 REPLACE_UNLINKAT=0;
7503 REPLACE_USLEEP=0;
7504 REPLACE_WRITE=0;
7505 UNISTD_H_HAVE_WINSOCK2_H=0;
7506 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
18848e28
GF
7507
7508
7509
7510
18848e28 7511
4a626d0a
PA
7512
7513
18848e28 7514
4a626d0a 7515
5e8754f9 7516 :
4a626d0a 7517
4a626d0a
PA
7518
7519
18848e28 7520
18848e28
GF
7521
7522
7523
7524
18848e28 7525
18848e28
GF
7526
7527
18848e28 7528
18848e28 7529
18848e28 7530
18848e28 7531
18848e28 7532
5e8754f9 7533 :
18848e28 7534
18848e28 7535
18848e28 7536
18848e28 7537
18848e28 7538
5e8754f9
SDJ
7539 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
7540 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
18848e28 7541
5e8754f9 7542$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
18848e28 7543
5e8754f9
SDJ
7544 else
7545 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
18848e28
GF
7546 fi
7547
7548
18848e28 7549
18848e28 7550
18848e28 7551
18848e28 7552
18848e28 7553
18848e28 7554
18848e28 7555
18848e28 7556
18848e28 7557
18848e28 7558
18848e28 7559
5e8754f9
SDJ
7560 GNULIB_OPENDIR=0;
7561 GNULIB_READDIR=0;
7562 GNULIB_REWINDDIR=0;
7563 GNULIB_CLOSEDIR=0;
7564 GNULIB_DIRFD=0;
7565 GNULIB_FDOPENDIR=0;
7566 GNULIB_SCANDIR=0;
7567 GNULIB_ALPHASORT=0;
7568 HAVE_OPENDIR=1;
7569 HAVE_READDIR=1;
7570 HAVE_REWINDDIR=1;
7571 HAVE_CLOSEDIR=1;
7572 HAVE_DECL_DIRFD=1;
7573 HAVE_DECL_FDOPENDIR=1;
7574 HAVE_FDOPENDIR=1;
7575 HAVE_SCANDIR=1;
7576 HAVE_ALPHASORT=1;
7577 REPLACE_OPENDIR=0;
7578 REPLACE_CLOSEDIR=0;
7579 REPLACE_DIRFD=0;
7580 REPLACE_FDOPENDIR=0;
18848e28 7581
18848e28
GF
7582
7583
63ce7108
TT
7584
7585
7586
7587
7588
7589
7590
7591
5e8754f9 7592 :
63ce7108 7593
472fa5ee
SM
7594
7595
7596
7597
7598
472fa5ee 7599
5e8754f9
SDJ
7600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
7601$as_echo_n "checking if environ is properly declared... " >&6; }
7602 if ${gt_cv_var_environ_declaration+:} false; then :
7603 $as_echo_n "(cached) " >&6
7604else
472fa5ee 7605
5e8754f9
SDJ
7606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7607/* end confdefs.h. */
7608#if HAVE_UNISTD_H
7609 #include <unistd.h>
7610 #endif
7611 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
7612 #include <stdlib.h>
472fa5ee 7613
5e8754f9
SDJ
7614 extern struct { int foo; } environ;
7615int
7616main ()
7617{
7618environ.foo = 1;
7619 ;
7620 return 0;
7621}
7622_ACEOF
7623if ac_fn_c_try_compile "$LINENO"; then :
7624 gt_cv_var_environ_declaration=no
7625else
7626 gt_cv_var_environ_declaration=yes
7627fi
7628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7629fi
472fa5ee 7630
5e8754f9
SDJ
7631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
7632$as_echo "$gt_cv_var_environ_declaration" >&6; }
7633 if test $gt_cv_var_environ_declaration = yes; then
472fa5ee 7634
5e8754f9 7635$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
472fa5ee 7636
5e8754f9 7637 fi
472fa5ee
SM
7638
7639
5e8754f9
SDJ
7640 if test $gt_cv_var_environ_declaration != yes; then
7641 HAVE_DECL_ENVIRON=0
7642 fi
472fa5ee
SM
7643
7644
7645
5e8754f9
SDJ
7646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
7647$as_echo_n "checking for complete errno.h... " >&6; }
7648if ${gl_cv_header_errno_h_complete+:} false; then :
6ec2e0f5
SDJ
7649 $as_echo_n "(cached) " >&6
7650else
7a6dbc2f 7651
5e8754f9 7652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ec2e0f5 7653/* end confdefs.h. */
63ce7108 7654
5e8754f9
SDJ
7655#include <errno.h>
7656#if !defined ETXTBSY
7657booboo
7658#endif
7659#if !defined ENOMSG
7660booboo
7661#endif
7662#if !defined EIDRM
7663booboo
7664#endif
7665#if !defined ENOLINK
7666booboo
7667#endif
7668#if !defined EPROTO
7669booboo
7670#endif
7671#if !defined EMULTIHOP
7672booboo
7673#endif
7674#if !defined EBADMSG
7675booboo
7676#endif
7677#if !defined EOVERFLOW
7678booboo
7679#endif
7680#if !defined ENOTSUP
7681booboo
7682#endif
7683#if !defined ENETRESET
7684booboo
7685#endif
7686#if !defined ECONNABORTED
7687booboo
7688#endif
7689#if !defined ESTALE
7690booboo
7691#endif
7692#if !defined EDQUOT
7693booboo
7694#endif
7695#if !defined ECANCELED
7696booboo
7697#endif
7698#if !defined EOWNERDEAD
7699booboo
7700#endif
7701#if !defined ENOTRECOVERABLE
7702booboo
7703#endif
7704#if !defined EILSEQ
7705booboo
7706#endif
6ec2e0f5 7707
6ec2e0f5 7708_ACEOF
5e8754f9
SDJ
7709if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7710 $EGREP "booboo" >/dev/null 2>&1; then :
7711 gl_cv_header_errno_h_complete=no
6ec2e0f5 7712else
5e8754f9 7713 gl_cv_header_errno_h_complete=yes
6ec2e0f5 7714fi
5e8754f9 7715rm -f conftest*
6ec2e0f5 7716
6ec2e0f5
SDJ
7717
7718fi
5e8754f9
SDJ
7719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
7720$as_echo "$gl_cv_header_errno_h_complete" >&6; }
7721 if test $gl_cv_header_errno_h_complete = yes; then
7722 ERRNO_H=''
7723 else
472fa5ee
SM
7724
7725
7726
7727
7728
7729
7730
7731
7a6dbc2f 7732 if test $gl_cv_have_include_next = yes; then
5e8754f9 7733 gl_cv_next_errno_h='<'errno.h'>'
7a6dbc2f 7734 else
5e8754f9
SDJ
7735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
7736$as_echo_n "checking absolute name of <errno.h>... " >&6; }
7737if ${gl_cv_next_errno_h+:} false; then :
7a6dbc2f
SDJ
7738 $as_echo_n "(cached) " >&6
7739else
472fa5ee 7740
472fa5ee
SM
7741
7742
7a6dbc2f
SDJ
7743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7744/* end confdefs.h. */
5e8754f9 7745#include <errno.h>
7a6dbc2f
SDJ
7746_ACEOF
7747 case "$host_os" in
7748 aix*) gl_absname_cpp="$ac_cpp -C" ;;
7749 *) gl_absname_cpp="$ac_cpp" ;;
7750 esac
472fa5ee 7751
7a6dbc2f
SDJ
7752 case "$host_os" in
7753 mingw*)
7754 gl_dirsep_regex='[/\\]'
7755 ;;
7756 *)
7757 gl_dirsep_regex='\/'
7758 ;;
7759 esac
7760 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
5e8754f9 7761 gl_header_literal_regex=`echo 'errno.h' \
7a6dbc2f
SDJ
7762 | sed -e "$gl_make_literal_regex_sed"`
7763 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
7764 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
7765 s|^/[^/]|//&|
7766 p
7767 q
7768 }'
7769
5e8754f9 7770 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7a6dbc2f
SDJ
7771 sed -n "$gl_absolute_header_sed"`
7772
5e8754f9
SDJ
7773 gl_header=$gl_cv_absolute_errno_h
7774 gl_cv_next_errno_h='"'$gl_header'"'
7a6dbc2f
SDJ
7775
7776
7777fi
5e8754f9
SDJ
7778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
7779$as_echo "$gl_cv_next_errno_h" >&6; }
7a6dbc2f 7780 fi
5e8754f9 7781 NEXT_ERRNO_H=$gl_cv_next_errno_h
7a6dbc2f
SDJ
7782
7783 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7784 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
5e8754f9 7785 gl_next_as_first_directive='<'errno.h'>'
7a6dbc2f
SDJ
7786 else
7787 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
5e8754f9 7788 gl_next_as_first_directive=$gl_cv_next_errno_h
7a6dbc2f 7789 fi
5e8754f9 7790 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
7a6dbc2f
SDJ
7791
7792
7793
7794
5e8754f9 7795 ERRNO_H='errno.h'
7a6dbc2f
SDJ
7796 fi
7797
5e8754f9
SDJ
7798 if test -n "$ERRNO_H"; then
7799 GL_GENERATE_ERRNO_H_TRUE=
7800 GL_GENERATE_ERRNO_H_FALSE='#'
7a6dbc2f 7801else
5e8754f9
SDJ
7802 GL_GENERATE_ERRNO_H_TRUE='#'
7803 GL_GENERATE_ERRNO_H_FALSE=
7a6dbc2f
SDJ
7804fi
7805
7806
5e8754f9
SDJ
7807 if test -n "$ERRNO_H"; then
7808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
7809$as_echo_n "checking for EMULTIHOP value... " >&6; }
7810if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
7811 $as_echo_n "(cached) " >&6
7812else
7a6dbc2f 7813
5e8754f9
SDJ
7814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7815/* end confdefs.h. */
7a6dbc2f 7816
5e8754f9
SDJ
7817#include <errno.h>
7818#ifdef EMULTIHOP
7819yes
7820#endif
7a6dbc2f 7821
7a6dbc2f 7822_ACEOF
5e8754f9
SDJ
7823if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7824 $EGREP "yes" >/dev/null 2>&1; then :
7825 gl_cv_header_errno_h_EMULTIHOP=yes
7a6dbc2f 7826else
5e8754f9 7827 gl_cv_header_errno_h_EMULTIHOP=no
7a6dbc2f 7828fi
5e8754f9 7829rm -f conftest*
7a6dbc2f 7830
5e8754f9
SDJ
7831 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
7832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7833/* end confdefs.h. */
7a6dbc2f 7834
5e8754f9
SDJ
7835#define _XOPEN_SOURCE_EXTENDED 1
7836#include <errno.h>
7837#ifdef EMULTIHOP
7838yes
7839#endif
7a6dbc2f 7840
5e8754f9
SDJ
7841_ACEOF
7842if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7843 $EGREP "yes" >/dev/null 2>&1; then :
7844 gl_cv_header_errno_h_EMULTIHOP=hidden
7845fi
7846rm -f conftest*
7a6dbc2f 7847
5e8754f9
SDJ
7848 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
7849 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
7850#define _XOPEN_SOURCE_EXTENDED 1
7851#include <errno.h>
7852/* The following two lines are a workaround against an autoconf-2.52 bug. */
7853#include <stdio.h>
7854#include <stdlib.h>
7855"; then :
7a6dbc2f 7856
5e8754f9 7857fi
7a6dbc2f 7858
5e8754f9
SDJ
7859 fi
7860 fi
7a6dbc2f 7861
5e8754f9
SDJ
7862fi
7863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
7864$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
7865 case $gl_cv_header_errno_h_EMULTIHOP in
7866 yes | no)
7867 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
7868 ;;
7869 *)
7870 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
7871 ;;
7872 esac
7a6dbc2f
SDJ
7873
7874
5e8754f9 7875 fi
7a6dbc2f
SDJ
7876
7877
5e8754f9
SDJ
7878 if test -n "$ERRNO_H"; then
7879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
7880$as_echo_n "checking for ENOLINK value... " >&6; }
7881if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
7882 $as_echo_n "(cached) " >&6
7883else
7a6dbc2f 7884
5e8754f9
SDJ
7885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7886/* end confdefs.h. */
7a6dbc2f 7887
5e8754f9
SDJ
7888#include <errno.h>
7889#ifdef ENOLINK
7890yes
7891#endif
7a6dbc2f 7892
5e8754f9
SDJ
7893_ACEOF
7894if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7895 $EGREP "yes" >/dev/null 2>&1; then :
7896 gl_cv_header_errno_h_ENOLINK=yes
7897else
7898 gl_cv_header_errno_h_ENOLINK=no
7899fi
7900rm -f conftest*
7a6dbc2f 7901
5e8754f9
SDJ
7902 if test $gl_cv_header_errno_h_ENOLINK = no; then
7903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7904/* end confdefs.h. */
7a6dbc2f 7905
5e8754f9
SDJ
7906#define _XOPEN_SOURCE_EXTENDED 1
7907#include <errno.h>
7908#ifdef ENOLINK
7909yes
7910#endif
7a6dbc2f 7911
5e8754f9
SDJ
7912_ACEOF
7913if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7914 $EGREP "yes" >/dev/null 2>&1; then :
7915 gl_cv_header_errno_h_ENOLINK=hidden
7916fi
7917rm -f conftest*
7a6dbc2f 7918
5e8754f9
SDJ
7919 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
7920 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
7921#define _XOPEN_SOURCE_EXTENDED 1
7922#include <errno.h>
7923/* The following two lines are a workaround against an autoconf-2.52 bug. */
7924#include <stdio.h>
7925#include <stdlib.h>
7926"; then :
7a6dbc2f 7927
5e8754f9 7928fi
7a6dbc2f 7929
5e8754f9
SDJ
7930 fi
7931 fi
7a6dbc2f 7932
5e8754f9
SDJ
7933fi
7934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
7935$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
7936 case $gl_cv_header_errno_h_ENOLINK in
7937 yes | no)
7938 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
7939 ;;
7940 *)
7941 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
7942 ;;
7943 esac
7a6dbc2f
SDJ
7944
7945
5e8754f9 7946 fi
7a6dbc2f
SDJ
7947
7948
5e8754f9
SDJ
7949 if test -n "$ERRNO_H"; then
7950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
7951$as_echo_n "checking for EOVERFLOW value... " >&6; }
7952if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
7953 $as_echo_n "(cached) " >&6
7954else
7a6dbc2f 7955
5e8754f9
SDJ
7956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7957/* end confdefs.h. */
7a6dbc2f 7958
5e8754f9
SDJ
7959#include <errno.h>
7960#ifdef EOVERFLOW
7961yes
7962#endif
7a6dbc2f 7963
5e8754f9
SDJ
7964_ACEOF
7965if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7966 $EGREP "yes" >/dev/null 2>&1; then :
7967 gl_cv_header_errno_h_EOVERFLOW=yes
7968else
7969 gl_cv_header_errno_h_EOVERFLOW=no
7970fi
7971rm -f conftest*
7a6dbc2f 7972
5e8754f9
SDJ
7973 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
7974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7975/* end confdefs.h. */
7a6dbc2f 7976
5e8754f9
SDJ
7977#define _XOPEN_SOURCE_EXTENDED 1
7978#include <errno.h>
7979#ifdef EOVERFLOW
7980yes
7981#endif
7a6dbc2f 7982
5e8754f9
SDJ
7983_ACEOF
7984if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7985 $EGREP "yes" >/dev/null 2>&1; then :
7986 gl_cv_header_errno_h_EOVERFLOW=hidden
7987fi
7988rm -f conftest*
7a6dbc2f 7989
5e8754f9
SDJ
7990 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
7991 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
7992#define _XOPEN_SOURCE_EXTENDED 1
7993#include <errno.h>
7994/* The following two lines are a workaround against an autoconf-2.52 bug. */
7995#include <stdio.h>
7996#include <stdlib.h>
7997"; then :
7a6dbc2f 7998
5e8754f9 7999fi
7a6dbc2f 8000
5e8754f9
SDJ
8001 fi
8002 fi
7a6dbc2f 8003
5e8754f9
SDJ
8004fi
8005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
8006$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
8007 case $gl_cv_header_errno_h_EOVERFLOW in
8008 yes | no)
8009 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
8010 ;;
8011 *)
8012 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
8013 ;;
8014 esac
7a6dbc2f
SDJ
8015
8016
5e8754f9 8017 fi
7a6dbc2f
SDJ
8018
8019
5e8754f9
SDJ
8020ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
8021if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
8022 ac_have_decl=1
8023else
8024 ac_have_decl=0
8025fi
7a6dbc2f 8026
5e8754f9
SDJ
8027cat >>confdefs.h <<_ACEOF
8028#define HAVE_DECL_STRERROR_R $ac_have_decl
8029_ACEOF
7a6dbc2f 8030
5e8754f9
SDJ
8031for ac_func in strerror_r
8032do :
8033 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
8034if test "x$ac_cv_func_strerror_r" = xyes; then :
8035 cat >>confdefs.h <<_ACEOF
8036#define HAVE_STRERROR_R 1
8037_ACEOF
7a6dbc2f 8038
5e8754f9
SDJ
8039fi
8040done
7a6dbc2f 8041
5e8754f9
SDJ
8042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
8043$as_echo_n "checking whether strerror_r returns char *... " >&6; }
8044if ${ac_cv_func_strerror_r_char_p+:} false; then :
8045 $as_echo_n "(cached) " >&6
8046else
7a6dbc2f 8047
5e8754f9
SDJ
8048 ac_cv_func_strerror_r_char_p=no
8049 if test $ac_cv_have_decl_strerror_r = yes; then
8050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8051/* end confdefs.h. */
8052$ac_includes_default
8053int
8054main ()
8055{
7a6dbc2f 8056
5e8754f9
SDJ
8057 char buf[100];
8058 char x = *strerror_r (0, buf, sizeof buf);
8059 char *p = strerror_r (0, buf, sizeof buf);
8060 return !p || x;
7a6dbc2f 8061
7a6dbc2f
SDJ
8062 ;
8063 return 0;
8064}
8065_ACEOF
5e8754f9
SDJ
8066if ac_fn_c_try_compile "$LINENO"; then :
8067 ac_cv_func_strerror_r_char_p=yes
7a6dbc2f 8068fi
5e8754f9
SDJ
8069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8070 else
8071 # strerror_r is not declared. Choose between
8072 # systems that have relatively inaccessible declarations for the
8073 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
8074 # former has a strerror_r that returns char*, while the latter
8075 # has a strerror_r that returns `int'.
8076 # This test should segfault on the DEC system.
8077 if test "$cross_compiling" = yes; then :
8078 :
7a6dbc2f 8079else
5e8754f9 8080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7a6dbc2f 8081/* end confdefs.h. */
5e8754f9
SDJ
8082$ac_includes_default
8083 extern char *strerror_r ();
7a6dbc2f
SDJ
8084int
8085main ()
8086{
5e8754f9
SDJ
8087char buf[100];
8088 char x = *strerror_r (0, buf, sizeof buf);
8089 return ! isalpha (x);
7a6dbc2f
SDJ
8090 ;
8091 return 0;
8092}
8093_ACEOF
5e8754f9
SDJ
8094if ac_fn_c_try_run "$LINENO"; then :
8095 ac_cv_func_strerror_r_char_p=yes
7a6dbc2f 8096fi
5e8754f9
SDJ
8097rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8098 conftest.$ac_objext conftest.beam conftest.$ac_ext
7a6dbc2f 8099fi
5e8754f9 8100
7a6dbc2f 8101 fi
7a6dbc2f 8102
5e8754f9
SDJ
8103fi
8104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
8105$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
8106if test $ac_cv_func_strerror_r_char_p = yes; then
7a6dbc2f 8107
5e8754f9 8108$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
7a6dbc2f 8109
5e8754f9 8110fi
7a6dbc2f
SDJ
8111
8112
8113
8114
8115
5e8754f9
SDJ
8116 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
8117if test "x$ac_cv_have_decl_fchdir" = xyes; then :
8118 ac_have_decl=1
7a6dbc2f 8119else
5e8754f9
SDJ
8120 ac_have_decl=0
8121fi
7a6dbc2f 8122
5e8754f9
SDJ
8123cat >>confdefs.h <<_ACEOF
8124#define HAVE_DECL_FCHDIR $ac_have_decl
8125_ACEOF
7a6dbc2f 8126
7a6dbc2f 8127
7a6dbc2f 8128
5e8754f9
SDJ
8129 GNULIB_FCNTL=0;
8130 GNULIB_NONBLOCKING=0;
8131 GNULIB_OPEN=0;
8132 GNULIB_OPENAT=0;
8133 HAVE_FCNTL=1;
8134 HAVE_OPENAT=1;
8135 REPLACE_FCNTL=0;
8136 REPLACE_OPEN=0;
8137 REPLACE_OPENAT=0;
7a6dbc2f 8138
7a6dbc2f 8139
7a6dbc2f
SDJ
8140
8141
7a6dbc2f 8142
7a6dbc2f 8143
7a6dbc2f 8144
7a6dbc2f
SDJ
8145
8146
8147
7a6dbc2f 8148
7a6dbc2f 8149
7a6dbc2f 8150
7a6dbc2f 8151
7a6dbc2f 8152
5e8754f9 8153 :
7a6dbc2f
SDJ
8154
8155
8156
8157
8158
8159
5e8754f9 8160 :
7a6dbc2f 8161
7a6dbc2f 8162
7a6dbc2f
SDJ
8163
8164
7a6dbc2f 8165
5e8754f9
SDJ
8166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
8167$as_echo_n "checking for working fcntl.h... " >&6; }
8168if ${gl_cv_header_working_fcntl_h+:} false; then :
88b48903
WN
8169 $as_echo_n "(cached) " >&6
8170else
5e8754f9
SDJ
8171 if test "$cross_compiling" = yes; then :
8172 gl_cv_header_working_fcntl_h=cross-compiling
8173else
8174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
88b48903 8175/* end confdefs.h. */
5e8754f9
SDJ
8176#include <sys/types.h>
8177 #include <sys/stat.h>
8178 #if HAVE_UNISTD_H
8179 # include <unistd.h>
8180 #else /* on Windows with MSVC */
8181 # include <io.h>
8182 # include <stdlib.h>
8183 # defined sleep(n) _sleep ((n) * 1000)
8184 #endif
8185 #include <fcntl.h>
8186 #ifndef O_NOATIME
8187 #define O_NOATIME 0
8188 #endif
8189 #ifndef O_NOFOLLOW
8190 #define O_NOFOLLOW 0
8191 #endif
8192 static int const constants[] =
8193 {
8194 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
8195 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
8196 };
8197
8198int
88b48903
WN
8199main ()
8200{
5e8754f9
SDJ
8201
8202 int result = !constants;
8203 #if HAVE_SYMLINK
8204 {
8205 static char const sym[] = "conftest.sym";
8206 if (symlink ("/dev/null", sym) != 0)
8207 result |= 2;
8208 else
8209 {
8210 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
8211 if (fd >= 0)
8212 {
8213 close (fd);
8214 result |= 4;
8215 }
8216 }
8217 if (unlink (sym) != 0 || symlink (".", sym) != 0)
8218 result |= 2;
8219 else
8220 {
8221 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
8222 if (fd >= 0)
8223 {
8224 close (fd);
8225 result |= 4;
8226 }
8227 }
8228 unlink (sym);
8229 }
8230 #endif
8231 {
8232 static char const file[] = "confdefs.h";
8233 int fd = open (file, O_RDONLY | O_NOATIME);
8234 if (fd < 0)
8235 result |= 8;
8236 else
8237 {
8238 struct stat st0;
8239 if (fstat (fd, &st0) != 0)
8240 result |= 16;
8241 else
8242 {
8243 char c;
8244 sleep (1);
8245 if (read (fd, &c, 1) != 1)
8246 result |= 24;
8247 else
8248 {
8249 if (close (fd) != 0)
8250 result |= 32;
8251 else
8252 {
8253 struct stat st1;
8254 if (stat (file, &st1) != 0)
8255 result |= 40;
8256 else
8257 if (st0.st_atime != st1.st_atime)
8258 result |= 64;
8259 }
8260 }
8261 }
8262 }
8263 }
8264 return result;
88b48903
WN
8265 ;
8266 return 0;
8267}
8268_ACEOF
5e8754f9
SDJ
8269if ac_fn_c_try_run "$LINENO"; then :
8270 gl_cv_header_working_fcntl_h=yes
88b48903 8271else
5e8754f9
SDJ
8272 case $? in #(
8273 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
8274 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
8275 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
8276 *) gl_cv_header_working_fcntl_h='no';;
8277 esac
88b48903 8278fi
5e8754f9
SDJ
8279rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8280 conftest.$ac_objext conftest.beam conftest.$ac_ext
8281fi
8282
8283fi
8284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
8285$as_echo "$gl_cv_header_working_fcntl_h" >&6; }
8286
8287 case $gl_cv_header_working_fcntl_h in #(
8288 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
8289 *) ac_val=1;;
8290 esac
8291
8292cat >>confdefs.h <<_ACEOF
8293#define HAVE_WORKING_O_NOATIME $ac_val
8294_ACEOF
8295
8296
8297 case $gl_cv_header_working_fcntl_h in #(
8298 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
8299 *) ac_val=1;;
8300 esac
8301
8302cat >>confdefs.h <<_ACEOF
8303#define HAVE_WORKING_O_NOFOLLOW $ac_val
8304_ACEOF
8305
8306
8307ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
8308if test "x$ac_cv_type_pid_t" = xyes; then :
8309
8310else
8311
8312cat >>confdefs.h <<_ACEOF
8313#define pid_t int
8314_ACEOF
8315
8316fi
8317
8318ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
8319if test "x$ac_cv_type_mode_t" = xyes; then :
8320
8321else
8322
8323cat >>confdefs.h <<_ACEOF
8324#define mode_t int
8325_ACEOF
8326
8327fi
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
8342$as_echo_n "checking for mbstate_t... " >&6; }
8343if ${ac_cv_type_mbstate_t+:} false; then :
8344 $as_echo_n "(cached) " >&6
8345else
8346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8347/* end confdefs.h. */
8348$ac_includes_default
8349/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
8350 <wchar.h>.
8351 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8352 included before <wchar.h>. */
8353#include <stddef.h>
8354#include <stdio.h>
8355#include <time.h>
8356#include <wchar.h>
8357int
8358main ()
8359{
8360mbstate_t x; return sizeof x;
8361 ;
8362 return 0;
8363}
8364_ACEOF
8365if ac_fn_c_try_compile "$LINENO"; then :
8366 ac_cv_type_mbstate_t=yes
8367else
8368 ac_cv_type_mbstate_t=no
8369fi
8370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8371fi
8372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
8373$as_echo "$ac_cv_type_mbstate_t" >&6; }
8374 if test $ac_cv_type_mbstate_t = yes; then
8375
8376$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
8377
8378 else
8379
8380$as_echo "#define mbstate_t int" >>confdefs.h
8381
8382 fi
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
8425 GNULIB_ACOSF=0;
8426 GNULIB_ACOSL=0;
8427 GNULIB_ASINF=0;
8428 GNULIB_ASINL=0;
8429 GNULIB_ATANF=0;
8430 GNULIB_ATANL=0;
8431 GNULIB_ATAN2F=0;
8432 GNULIB_CBRT=0;
8433 GNULIB_CBRTF=0;
8434 GNULIB_CBRTL=0;
8435 GNULIB_CEIL=0;
8436 GNULIB_CEILF=0;
8437 GNULIB_CEILL=0;
8438 GNULIB_COPYSIGN=0;
8439 GNULIB_COPYSIGNF=0;
8440 GNULIB_COPYSIGNL=0;
8441 GNULIB_COSF=0;
8442 GNULIB_COSL=0;
8443 GNULIB_COSHF=0;
8444 GNULIB_EXPF=0;
8445 GNULIB_EXPL=0;
8446 GNULIB_EXP2=0;
8447 GNULIB_EXP2F=0;
8448 GNULIB_EXP2L=0;
8449 GNULIB_EXPM1=0;
8450 GNULIB_EXPM1F=0;
8451 GNULIB_EXPM1L=0;
8452 GNULIB_FABSF=0;
8453 GNULIB_FABSL=0;
8454 GNULIB_FLOOR=0;
8455 GNULIB_FLOORF=0;
8456 GNULIB_FLOORL=0;
8457 GNULIB_FMA=0;
8458 GNULIB_FMAF=0;
8459 GNULIB_FMAL=0;
8460 GNULIB_FMOD=0;
8461 GNULIB_FMODF=0;
8462 GNULIB_FMODL=0;
8463 GNULIB_FREXPF=0;
8464 GNULIB_FREXP=0;
8465 GNULIB_FREXPL=0;
8466 GNULIB_HYPOT=0;
8467 GNULIB_HYPOTF=0;
8468 GNULIB_HYPOTL=0;
8469 GNULIB_ILOGB=0;
8470 GNULIB_ILOGBF=0;
8471 GNULIB_ILOGBL=0;
8472 GNULIB_ISFINITE=0;
8473 GNULIB_ISINF=0;
8474 GNULIB_ISNAN=0;
8475 GNULIB_ISNANF=0;
8476 GNULIB_ISNAND=0;
8477 GNULIB_ISNANL=0;
8478 GNULIB_LDEXPF=0;
8479 GNULIB_LDEXPL=0;
8480 GNULIB_LOG=0;
8481 GNULIB_LOGF=0;
8482 GNULIB_LOGL=0;
8483 GNULIB_LOG10=0;
8484 GNULIB_LOG10F=0;
8485 GNULIB_LOG10L=0;
8486 GNULIB_LOG1P=0;
8487 GNULIB_LOG1PF=0;
8488 GNULIB_LOG1PL=0;
8489 GNULIB_LOG2=0;
8490 GNULIB_LOG2F=0;
8491 GNULIB_LOG2L=0;
8492 GNULIB_LOGB=0;
8493 GNULIB_LOGBF=0;
8494 GNULIB_LOGBL=0;
8495 GNULIB_MODF=0;
8496 GNULIB_MODFF=0;
8497 GNULIB_MODFL=0;
8498 GNULIB_POWF=0;
8499 GNULIB_REMAINDER=0;
8500 GNULIB_REMAINDERF=0;
8501 GNULIB_REMAINDERL=0;
8502 GNULIB_RINT=0;
8503 GNULIB_RINTF=0;
8504 GNULIB_RINTL=0;
8505 GNULIB_ROUND=0;
8506 GNULIB_ROUNDF=0;
8507 GNULIB_ROUNDL=0;
8508 GNULIB_SIGNBIT=0;
8509 GNULIB_SINF=0;
8510 GNULIB_SINL=0;
8511 GNULIB_SINHF=0;
8512 GNULIB_SQRTF=0;
8513 GNULIB_SQRTL=0;
8514 GNULIB_TANF=0;
8515 GNULIB_TANL=0;
8516 GNULIB_TANHF=0;
8517 GNULIB_TRUNC=0;
8518 GNULIB_TRUNCF=0;
8519 GNULIB_TRUNCL=0;
8520 HAVE_ACOSF=1;
8521 HAVE_ACOSL=1;
8522 HAVE_ASINF=1;
8523 HAVE_ASINL=1;
8524 HAVE_ATANF=1;
8525 HAVE_ATANL=1;
8526 HAVE_ATAN2F=1;
8527 HAVE_CBRT=1;
8528 HAVE_CBRTF=1;
8529 HAVE_CBRTL=1;
8530 HAVE_COPYSIGN=1;
8531 HAVE_COPYSIGNL=1;
8532 HAVE_COSF=1;
8533 HAVE_COSL=1;
8534 HAVE_COSHF=1;
8535 HAVE_EXPF=1;
8536 HAVE_EXPL=1;
8537 HAVE_EXPM1=1;
8538 HAVE_EXPM1F=1;
8539 HAVE_FABSF=1;
8540 HAVE_FABSL=1;
8541 HAVE_FMA=1;
8542 HAVE_FMAF=1;
8543 HAVE_FMAL=1;
8544 HAVE_FMODF=1;
8545 HAVE_FMODL=1;
8546 HAVE_FREXPF=1;
8547 HAVE_HYPOTF=1;
8548 HAVE_HYPOTL=1;
8549 HAVE_ILOGB=1;
8550 HAVE_ILOGBF=1;
8551 HAVE_ILOGBL=1;
8552 HAVE_ISNANF=1;
8553 HAVE_ISNAND=1;
8554 HAVE_ISNANL=1;
8555 HAVE_LDEXPF=1;
8556 HAVE_LOGF=1;
8557 HAVE_LOGL=1;
8558 HAVE_LOG10F=1;
8559 HAVE_LOG10L=1;
8560 HAVE_LOG1P=1;
8561 HAVE_LOG1PF=1;
8562 HAVE_LOG1PL=1;
8563 HAVE_LOGBF=1;
8564 HAVE_LOGBL=1;
8565 HAVE_MODFF=1;
8566 HAVE_MODFL=1;
8567 HAVE_POWF=1;
8568 HAVE_REMAINDER=1;
8569 HAVE_REMAINDERF=1;
8570 HAVE_RINT=1;
8571 HAVE_RINTL=1;
8572 HAVE_SINF=1;
8573 HAVE_SINL=1;
8574 HAVE_SINHF=1;
8575 HAVE_SQRTF=1;
8576 HAVE_SQRTL=1;
8577 HAVE_TANF=1;
8578 HAVE_TANL=1;
8579 HAVE_TANHF=1;
8580 HAVE_DECL_ACOSL=1;
8581 HAVE_DECL_ASINL=1;
8582 HAVE_DECL_ATANL=1;
8583 HAVE_DECL_CBRTF=1;
8584 HAVE_DECL_CBRTL=1;
8585 HAVE_DECL_CEILF=1;
8586 HAVE_DECL_CEILL=1;
8587 HAVE_DECL_COPYSIGNF=1;
8588 HAVE_DECL_COSL=1;
8589 HAVE_DECL_EXPL=1;
8590 HAVE_DECL_EXP2=1;
8591 HAVE_DECL_EXP2F=1;
8592 HAVE_DECL_EXP2L=1;
8593 HAVE_DECL_EXPM1L=1;
8594 HAVE_DECL_FLOORF=1;
8595 HAVE_DECL_FLOORL=1;
8596 HAVE_DECL_FREXPL=1;
8597 HAVE_DECL_LDEXPL=1;
8598 HAVE_DECL_LOGL=1;
8599 HAVE_DECL_LOG10L=1;
8600 HAVE_DECL_LOG2=1;
8601 HAVE_DECL_LOG2F=1;
8602 HAVE_DECL_LOG2L=1;
8603 HAVE_DECL_LOGB=1;
8604 HAVE_DECL_REMAINDER=1;
8605 HAVE_DECL_REMAINDERL=1;
8606 HAVE_DECL_RINTF=1;
8607 HAVE_DECL_ROUND=1;
8608 HAVE_DECL_ROUNDF=1;
8609 HAVE_DECL_ROUNDL=1;
8610 HAVE_DECL_SINL=1;
8611 HAVE_DECL_SQRTL=1;
8612 HAVE_DECL_TANL=1;
8613 HAVE_DECL_TRUNC=1;
8614 HAVE_DECL_TRUNCF=1;
8615 HAVE_DECL_TRUNCL=1;
8616 REPLACE_CBRTF=0;
8617 REPLACE_CBRTL=0;
8618 REPLACE_CEIL=0;
8619 REPLACE_CEILF=0;
8620 REPLACE_CEILL=0;
8621 REPLACE_EXPM1=0;
8622 REPLACE_EXPM1F=0;
8623 REPLACE_EXP2=0;
8624 REPLACE_EXP2L=0;
8625 REPLACE_FABSL=0;
8626 REPLACE_FLOOR=0;
8627 REPLACE_FLOORF=0;
8628 REPLACE_FLOORL=0;
8629 REPLACE_FMA=0;
8630 REPLACE_FMAF=0;
8631 REPLACE_FMAL=0;
8632 REPLACE_FMOD=0;
8633 REPLACE_FMODF=0;
8634 REPLACE_FMODL=0;
8635 REPLACE_FREXPF=0;
8636 REPLACE_FREXP=0;
8637 REPLACE_FREXPL=0;
8638 REPLACE_HUGE_VAL=0;
8639 REPLACE_HYPOT=0;
8640 REPLACE_HYPOTF=0;
8641 REPLACE_HYPOTL=0;
8642 REPLACE_ILOGB=0;
8643 REPLACE_ILOGBF=0;
8644 REPLACE_ISFINITE=0;
8645 REPLACE_ISINF=0;
8646 REPLACE_ISNAN=0;
8647 REPLACE_LDEXPL=0;
8648 REPLACE_LOG=0;
8649 REPLACE_LOGF=0;
8650 REPLACE_LOGL=0;
8651 REPLACE_LOG10=0;
8652 REPLACE_LOG10F=0;
8653 REPLACE_LOG10L=0;
8654 REPLACE_LOG1P=0;
8655 REPLACE_LOG1PF=0;
8656 REPLACE_LOG1PL=0;
8657 REPLACE_LOG2=0;
8658 REPLACE_LOG2F=0;
8659 REPLACE_LOG2L=0;
8660 REPLACE_LOGB=0;
8661 REPLACE_LOGBF=0;
8662 REPLACE_LOGBL=0;
8663 REPLACE_MODF=0;
8664 REPLACE_MODFF=0;
8665 REPLACE_MODFL=0;
8666 REPLACE_NAN=0;
8667 REPLACE_REMAINDER=0;
8668 REPLACE_REMAINDERF=0;
8669 REPLACE_REMAINDERL=0;
8670 REPLACE_ROUND=0;
8671 REPLACE_ROUNDF=0;
8672 REPLACE_ROUNDL=0;
8673 REPLACE_SIGNBIT=0;
8674 REPLACE_SIGNBIT_USING_GCC=0;
8675 REPLACE_SQRTL=0;
8676 REPLACE_TRUNC=0;
8677 REPLACE_TRUNCF=0;
8678 REPLACE_TRUNCL=0;
88b48903 8679
472fa5ee 8680
5e8754f9
SDJ
8681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
8682$as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
8683if ${gl_cv_func_frexp_no_libm+:} false; then :
7a6dbc2f 8684 $as_echo_n "(cached) " >&6
4a626d0a 8685else
88b48903 8686
5e8754f9 8687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7a6dbc2f
SDJ
8688/* end confdefs.h. */
8689#include <math.h>
5e8754f9 8690 double x;
7a6dbc2f
SDJ
8691int
8692main ()
8693{
5e8754f9 8694int e; return frexp (x, &e) > 0;
7a6dbc2f
SDJ
8695 ;
8696 return 0;
8697}
4a626d0a 8698_ACEOF
7a6dbc2f 8699if ac_fn_c_try_link "$LINENO"; then :
5e8754f9 8700 gl_cv_func_frexp_no_libm=yes
7a6dbc2f 8701else
5e8754f9 8702 gl_cv_func_frexp_no_libm=no
7a6dbc2f
SDJ
8703fi
8704rm -f core conftest.err conftest.$ac_objext \
8705 conftest$ac_exeext conftest.$ac_ext
88b48903 8706
7a6dbc2f 8707fi
5e8754f9
SDJ
8708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
8709$as_echo "$gl_cv_func_frexp_no_libm" >&6; }
88b48903 8710
472fa5ee 8711
5e8754f9
SDJ
8712 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
8713if test "x$ac_cv_have_decl_alarm" = xyes; then :
8714 ac_have_decl=1
7a6dbc2f 8715else
5e8754f9
SDJ
8716 ac_have_decl=0
8717fi
7a6dbc2f 8718
5e8754f9
SDJ
8719cat >>confdefs.h <<_ACEOF
8720#define HAVE_DECL_ALARM $ac_have_decl
8721_ACEOF
7a6dbc2f 8722
7a6dbc2f 8723
5e8754f9
SDJ
8724
8725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
8726$as_echo_n "checking whether long double and double are the same... " >&6; }
8727if ${gl_cv_long_double_equals_double+:} false; then :
8728 $as_echo_n "(cached) " >&6
88b48903
WN
8729else
8730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8731/* end confdefs.h. */
8732#include <float.h>
5e8754f9
SDJ
8733int
8734main ()
88b48903 8735{
5e8754f9
SDJ
8736typedef int check[sizeof (long double) == sizeof (double)
8737 && LDBL_MANT_DIG == DBL_MANT_DIG
8738 && LDBL_MAX_EXP == DBL_MAX_EXP
8739 && LDBL_MIN_EXP == DBL_MIN_EXP
8740 ? 1 : -1];
8741
8742 ;
8743 return 0;
88b48903
WN
8744}
8745_ACEOF
5e8754f9
SDJ
8746if ac_fn_c_try_compile "$LINENO"; then :
8747 gl_cv_long_double_equals_double=yes
88b48903 8748else
5e8754f9 8749 gl_cv_long_double_equals_double=no
88b48903 8750fi
5e8754f9 8751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
88b48903
WN
8752
8753fi
5e8754f9
SDJ
8754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
8755$as_echo "$gl_cv_long_double_equals_double" >&6; }
8756 if test $gl_cv_long_double_equals_double = yes; then
7a6dbc2f 8757
5e8754f9 8758$as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
7a6dbc2f 8759
5e8754f9
SDJ
8760 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
8761 else
8762 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
88b48903
WN
8763 fi
8764
8765
4a626d0a 8766
6ec2e0f5
SDJ
8767 GNULIB_FCHMODAT=0;
8768 GNULIB_FSTAT=0;
8769 GNULIB_FSTATAT=0;
8770 GNULIB_FUTIMENS=0;
8771 GNULIB_LCHMOD=0;
8772 GNULIB_LSTAT=0;
8773 GNULIB_MKDIRAT=0;
8774 GNULIB_MKFIFO=0;
8775 GNULIB_MKFIFOAT=0;
8776 GNULIB_MKNOD=0;
8777 GNULIB_MKNODAT=0;
8778 GNULIB_STAT=0;
8779 GNULIB_UTIMENSAT=0;
8780 HAVE_FCHMODAT=1;
8781 HAVE_FSTATAT=1;
8782 HAVE_FUTIMENS=1;
8783 HAVE_LCHMOD=1;
8784 HAVE_LSTAT=1;
8785 HAVE_MKDIRAT=1;
8786 HAVE_MKFIFO=1;
8787 HAVE_MKFIFOAT=1;
8788 HAVE_MKNOD=1;
8789 HAVE_MKNODAT=1;
8790 HAVE_UTIMENSAT=1;
8791 REPLACE_FSTAT=0;
8792 REPLACE_FSTATAT=0;
8793 REPLACE_FUTIMENS=0;
8794 REPLACE_LSTAT=0;
8795 REPLACE_MKDIR=0;
8796 REPLACE_MKFIFO=0;
8797 REPLACE_MKNOD=0;
8798 REPLACE_STAT=0;
8799 REPLACE_UTIMENSAT=0;
8800
8801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
8802$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
d0ac1c44 8803if ${ac_cv_header_stat_broken+:} false; then :
6ec2e0f5
SDJ
8804 $as_echo_n "(cached) " >&6
8805else
8806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8807/* end confdefs.h. */
8808#include <sys/types.h>
8809#include <sys/stat.h>
8810
8811#if defined S_ISBLK && defined S_IFDIR
8812extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
8813#endif
8814
8815#if defined S_ISBLK && defined S_IFCHR
8816extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
8817#endif
8818
8819#if defined S_ISLNK && defined S_IFREG
8820extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
8821#endif
8822
8823#if defined S_ISSOCK && defined S_IFREG
8824extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
8825#endif
4a626d0a 8826
4a626d0a
PA
8827_ACEOF
8828if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5
SDJ
8829 ac_cv_header_stat_broken=no
8830else
8831 ac_cv_header_stat_broken=yes
4a626d0a
PA
8832fi
8833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
8834fi
8835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
8836$as_echo "$ac_cv_header_stat_broken" >&6; }
8837if test $ac_cv_header_stat_broken = yes; then
8838
8839$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
4a626d0a
PA
8840
8841fi
4a626d0a 8842
4a626d0a
PA
8843
8844
4a626d0a
PA
8845
8846
472fa5ee
SM
8847
8848
8849
6ec2e0f5
SDJ
8850 case "$host_os" in
8851 mingw*)
8852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
8853$as_echo_n "checking for 64-bit off_t... " >&6; }
d0ac1c44 8854if ${gl_cv_type_off_t_64+:} false; then :
6ec2e0f5
SDJ
8855 $as_echo_n "(cached) " >&6
8856else
8857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8858/* end confdefs.h. */
8859#include <sys/types.h>
8860 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
8861
8862int
8863main ()
8864{
8865
8866 ;
8867 return 0;
8868}
8869_ACEOF
8870if ac_fn_c_try_compile "$LINENO"; then :
8871 gl_cv_type_off_t_64=yes
8872else
8873 gl_cv_type_off_t_64=no
8874fi
8875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4a626d0a 8876
6ec2e0f5
SDJ
8877fi
8878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
8879$as_echo "$gl_cv_type_off_t_64" >&6; }
8880 if test $gl_cv_type_off_t_64 = no; then
8881 WINDOWS_64_BIT_OFF_T=1
8882 else
7a6dbc2f
SDJ
8883 WINDOWS_64_BIT_OFF_T=0
8884 fi
5e8754f9 8885 WINDOWS_64_BIT_ST_SIZE=1
6ec2e0f5
SDJ
8886 ;;
8887 *)
8888 WINDOWS_64_BIT_OFF_T=0
8889 WINDOWS_64_BIT_ST_SIZE=0
8890 ;;
8891 esac
4a626d0a
PA
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
472fa5ee
SM
8904 :
8905
8906
8907
8908
8909
4a626d0a
PA
8910
8911
8912
8913 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 8914 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
4a626d0a 8915 else
6ec2e0f5
SDJ
8916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
8917$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
d0ac1c44 8918if ${gl_cv_next_sys_stat_h+:} false; then :
4a626d0a
PA
8919 $as_echo_n "(cached) " >&6
8920else
8921
6ec2e0f5 8922 if test $ac_cv_header_sys_stat_h = yes; then
4a626d0a
PA
8923
8924
8925
8926
8927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8928/* end confdefs.h. */
6ec2e0f5 8929#include <sys/stat.h>
4a626d0a
PA
8930_ACEOF
8931 case "$host_os" in
8932 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8933 *) gl_absname_cpp="$ac_cpp" ;;
8934 esac
8935
8936 case "$host_os" in
8937 mingw*)
8938 gl_dirsep_regex='[/\\]'
8939 ;;
8940 *)
8941 gl_dirsep_regex='\/'
8942 ;;
8943 esac
8944 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 8945 gl_header_literal_regex=`echo 'sys/stat.h' \
4a626d0a
PA
8946 | sed -e "$gl_make_literal_regex_sed"`
8947 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8948 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8949 s|^/[^/]|//&|
8950 p
8951 q
8952 }'
8953
6ec2e0f5 8954 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a
PA
8955 sed -n "$gl_absolute_header_sed"`
8956
6ec2e0f5
SDJ
8957 gl_header=$gl_cv_absolute_sys_stat_h
8958 gl_cv_next_sys_stat_h='"'$gl_header'"'
4a626d0a 8959 else
6ec2e0f5 8960 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
4a626d0a
PA
8961 fi
8962
8963
8964fi
6ec2e0f5
SDJ
8965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
8966$as_echo "$gl_cv_next_sys_stat_h" >&6; }
4a626d0a 8967 fi
6ec2e0f5 8968 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
4a626d0a
PA
8969
8970 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8971 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 8972 gl_next_as_first_directive='<'sys/stat.h'>'
4a626d0a
PA
8973 else
8974 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 8975 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
4a626d0a 8976 fi
6ec2e0f5 8977 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
4a626d0a
PA
8978
8979
8980
8981
8982
4a626d0a
PA
8983
8984
8985
8986
8987
4a626d0a 8988
5e8754f9 8989 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
4a626d0a 8990
5e8754f9 8991$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
4a626d0a 8992
5e8754f9 8993 fi
4a626d0a 8994
6ec2e0f5
SDJ
8995 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
8996 #include <sys/stat.h>
8997"
d0ac1c44 8998if test "x$ac_cv_type_nlink_t" = xyes; then :
6ec2e0f5
SDJ
8999
9000else
4a626d0a 9001
6ec2e0f5
SDJ
9002$as_echo "#define nlink_t int" >>confdefs.h
9003
9004fi
9005
9006
9007
5e8754f9
SDJ
9008 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
9009 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
9010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
9011$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
9012if eval \${$as_gl_Symbol+:} false; then :
9013 $as_echo_n "(cached) " >&6
9014else
9015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9016/* end confdefs.h. */
9017#include <sys/stat.h>
9018
9019int
9020main ()
9021{
9022#undef $gl_func
9023 (void) $gl_func;
9024 ;
9025 return 0;
9026}
9027_ACEOF
9028if ac_fn_c_try_compile "$LINENO"; then :
9029 eval "$as_gl_Symbol=yes"
9030else
9031 eval "$as_gl_Symbol=no"
9032fi
9033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9034fi
9035eval ac_res=\$$as_gl_Symbol
9036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9037$as_echo "$ac_res" >&6; }
9038 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
9039 cat >>confdefs.h <<_ACEOF
9040#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
9041_ACEOF
4a626d0a 9042
5e8754f9
SDJ
9043 eval ac_cv_have_decl_$gl_func=yes
9044fi
9045 done
6ec2e0f5
SDJ
9046
9047
9048
5e8754f9 9049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
6ec2e0f5 9050$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
d0ac1c44 9051if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
4a626d0a
PA
9052 $as_echo_n "(cached) " >&6
9053else
6ec2e0f5
SDJ
9054 rm -f conftest.sym conftest.file
9055 echo >conftest.file
9056 if test "$cross_compiling" = yes; then :
9057 case "$host_os" in
5e8754f9 9058 *-gnu*)
6ec2e0f5
SDJ
9059 # Guess yes on glibc systems.
9060 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
9061 *)
9062 # If we don't know, assume the worst.
9063 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
9064 esac
4a626d0a 9065
6ec2e0f5
SDJ
9066else
9067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9068/* end confdefs.h. */
9069$ac_includes_default
4a626d0a
PA
9070int
9071main ()
9072{
6ec2e0f5
SDJ
9073struct stat sbuf;
9074 if (symlink ("conftest.file", "conftest.sym") != 0)
9075 return 1;
9076 /* Linux will dereference the symlink and fail, as required by
9077 POSIX. That is better in the sense that it means we will not
9078 have to compile and use the lstat wrapper. */
9079 return lstat ("conftest.sym/", &sbuf) == 0;
4a626d0a
PA
9080
9081 ;
9082 return 0;
9083}
9084_ACEOF
6ec2e0f5
SDJ
9085if ac_fn_c_try_run "$LINENO"; then :
9086 gl_cv_func_lstat_dereferences_slashed_symlink=yes
4a626d0a 9087else
6ec2e0f5
SDJ
9088 gl_cv_func_lstat_dereferences_slashed_symlink=no
9089fi
9090rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9091 conftest.$ac_objext conftest.beam conftest.$ac_ext
4a626d0a 9092fi
6ec2e0f5
SDJ
9093
9094 rm -f conftest.sym conftest.file
4a626d0a
PA
9095
9096fi
6ec2e0f5
SDJ
9097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
9098$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
9099 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
9100 *yes)
4a626d0a 9101
6ec2e0f5
SDJ
9102cat >>confdefs.h <<_ACEOF
9103#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
9104_ACEOF
4a626d0a 9105
6ec2e0f5
SDJ
9106 ;;
9107 esac
9108
9109
9110
9111
9112
472fa5ee
SM
9113
9114
9115
9116 :
9117
9118
9119
9120
9121
6ec2e0f5
SDJ
9122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
9123$as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
d0ac1c44 9124if ${gl_cv_func_getcwd_null+:} false; then :
4a626d0a 9125 $as_echo_n "(cached) " >&6
6ec2e0f5
SDJ
9126else
9127 if test "$cross_compiling" = yes; then :
9128 case "$host_os" in
5e8754f9
SDJ
9129 # Guess yes on glibc systems.
9130 *-gnu*) gl_cv_func_getcwd_null="guessing yes";;
9131 # Guess yes on Cygwin.
9132 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
9133 # If we don't know, assume the worst.
9134 *) gl_cv_func_getcwd_null="guessing no";;
6ec2e0f5
SDJ
9135 esac
9136
4a626d0a
PA
9137else
9138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9139/* end confdefs.h. */
9140
6ec2e0f5
SDJ
9141# include <stdlib.h>
9142# if HAVE_UNISTD_H
9143# include <unistd.h>
9144# else /* on Windows with MSVC */
9145# include <direct.h>
9146# endif
9147# ifndef getcwd
9148 char *getcwd ();
9149# endif
9150
9151int
9152main ()
9153{
9154
5e8754f9 9155#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6ec2e0f5
SDJ
9156/* mingw cwd does not start with '/', but getcwd does allocate.
9157 However, mingw fails to honor non-zero size. */
9158#else
9159 if (chdir ("/") != 0)
9160 return 1;
9161 else
9162 {
9163 char *f = getcwd (NULL, 0);
9164 if (! f)
9165 return 2;
9166 if (f[0] != '/')
5e8754f9 9167 return 3;
6ec2e0f5 9168 if (f[1] != '\0')
5e8754f9 9169 return 4;
6ec2e0f5
SDJ
9170 free (f);
9171 return 0;
9172 }
4a626d0a 9173#endif
4a626d0a 9174
6ec2e0f5
SDJ
9175 ;
9176 return 0;
9177}
9178_ACEOF
9179if ac_fn_c_try_run "$LINENO"; then :
9180 gl_cv_func_getcwd_null=yes
9181else
9182 gl_cv_func_getcwd_null=no
9183fi
9184rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9185 conftest.$ac_objext conftest.beam conftest.$ac_ext
9186fi
9187
9188fi
9189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
9190$as_echo "$gl_cv_func_getcwd_null" >&6; }
9191
9192
9193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
9194$as_echo_n "checking for getcwd with POSIX signature... " >&6; }
d0ac1c44 9195if ${gl_cv_func_getcwd_posix_signature+:} false; then :
6ec2e0f5
SDJ
9196 $as_echo_n "(cached) " >&6
9197else
9198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9199/* end confdefs.h. */
9200#include <unistd.h>
4a626d0a
PA
9201int
9202main ()
9203{
6ec2e0f5
SDJ
9204extern
9205 #ifdef __cplusplus
9206 "C"
9207 #endif
9208 char *getcwd (char *, size_t);
9209
4a626d0a
PA
9210 ;
9211 return 0;
9212}
6ec2e0f5 9213
4a626d0a
PA
9214_ACEOF
9215if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 9216 gl_cv_func_getcwd_posix_signature=yes
4a626d0a 9217else
6ec2e0f5 9218 gl_cv_func_getcwd_posix_signature=no
4a626d0a
PA
9219fi
9220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5 9221
4a626d0a 9222fi
6ec2e0f5
SDJ
9223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
9224$as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
9225
472fa5ee
SM
9226
9227 ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
d0ac1c44 9228if test "x$ac_cv_have_decl_getcwd" = xyes; then :
6ec2e0f5
SDJ
9229 ac_have_decl=1
9230else
9231 ac_have_decl=0
9232fi
9233
9234cat >>confdefs.h <<_ACEOF
9235#define HAVE_DECL_GETCWD $ac_have_decl
4a626d0a
PA
9236_ACEOF
9237
6ec2e0f5
SDJ
9238
9239
472fa5ee
SM
9240
9241
9242
9243
9244
9245 ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
d0ac1c44 9246if test "x$ac_cv_have_decl_getdtablesize" = xyes; then :
6ec2e0f5
SDJ
9247 ac_have_decl=1
9248else
9249 ac_have_decl=0
4a626d0a 9250fi
4a626d0a 9251
6ec2e0f5
SDJ
9252cat >>confdefs.h <<_ACEOF
9253#define HAVE_DECL_GETDTABLESIZE $ac_have_decl
9254_ACEOF
9255
472fa5ee
SM
9256
9257
9258 ac_fn_c_check_decl "$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default"
d0ac1c44 9259if test "x$ac_cv_have_decl_getlogin_r" = xyes; then :
6ec2e0f5
SDJ
9260 ac_have_decl=1
9261else
9262 ac_have_decl=0
9263fi
9264
9265cat >>confdefs.h <<_ACEOF
9266#define HAVE_DECL_GETLOGIN_R $ac_have_decl
9267_ACEOF
9268
9269
9270
472fa5ee
SM
9271
9272
9273
9274
9275
9276 ac_fn_c_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default"
d0ac1c44 9277if test "x$ac_cv_have_decl_getlogin" = xyes; then :
6ec2e0f5
SDJ
9278 ac_have_decl=1
9279else
9280 ac_have_decl=0
9281fi
9282
9283cat >>confdefs.h <<_ACEOF
9284#define HAVE_DECL_GETLOGIN $ac_have_decl
9285_ACEOF
9286
9287
9288
9289
7a6dbc2f
SDJ
9290
9291
6ec2e0f5 9292
472fa5ee
SM
9293
9294
9295
9296
9297
6ec2e0f5
SDJ
9298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
9299$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
d0ac1c44 9300if ${ac_cv_c_restrict+:} false; then :
6ec2e0f5
SDJ
9301 $as_echo_n "(cached) " >&6
9302else
9303 ac_cv_c_restrict=no
9304 # The order here caters to the fact that C++ does not require restrict.
9305 for ac_kw in __restrict __restrict__ _Restrict restrict; do
9306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9307/* end confdefs.h. */
9308typedef int *int_ptr;
5e8754f9
SDJ
9309 int foo (int_ptr $ac_kw ip) { return ip[0]; }
9310 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
9311 int bar (int ip[$ac_kw]) { return ip[0]; }
6ec2e0f5
SDJ
9312
9313int
9314main ()
9315{
9316int s[1];
5e8754f9
SDJ
9317 int *$ac_kw t = s;
9318 t[0] = 0;
9319 return foo (t) + bar (t);
6ec2e0f5
SDJ
9320
9321 ;
9322 return 0;
9323}
9324_ACEOF
9325if ac_fn_c_try_compile "$LINENO"; then :
9326 ac_cv_c_restrict=$ac_kw
9327fi
9328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9329 test "$ac_cv_c_restrict" != no && break
9330 done
9331
9332fi
9333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
9334$as_echo "$ac_cv_c_restrict" >&6; }
9335
9336 case $ac_cv_c_restrict in
9337 restrict) ;;
9338 no) $as_echo "#define restrict /**/" >>confdefs.h
9339 ;;
9340 *) cat >>confdefs.h <<_ACEOF
9341#define restrict $ac_cv_c_restrict
9342_ACEOF
9343 ;;
9344 esac
4a626d0a
PA
9345
9346
5e8754f9
SDJ
9347 GNULIB_GETTIMEOFDAY=0;
9348 HAVE_GETTIMEOFDAY=1;
9349 HAVE_STRUCT_TIMEVAL=1;
9350 HAVE_SYS_TIME_H=1;
9351 HAVE_TIMEZONE_T=0;
9352 REPLACE_GETTIMEOFDAY=0;
9353 REPLACE_STRUCT_TIMEVAL=0;
9354
9355
4a626d0a
PA
9356
9357
88b48903 9358
49e4877c
PA
9359
9360
9361
9362
9363
472fa5ee
SM
9364 :
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376 :
9377
9378
49e4877c
PA
9379
9380
9381
9382
9383
9384
9385 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 9386 gl_cv_next_sys_time_h='<'sys/time.h'>'
49e4877c 9387 else
6ec2e0f5
SDJ
9388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
9389$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
d0ac1c44 9390if ${gl_cv_next_sys_time_h+:} false; then :
49e4877c
PA
9391 $as_echo_n "(cached) " >&6
9392else
9393
6ec2e0f5 9394 if test $ac_cv_header_sys_time_h = yes; then
49e4877c
PA
9395
9396
9397
9398
9399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9400/* end confdefs.h. */
6ec2e0f5 9401#include <sys/time.h>
49e4877c
PA
9402_ACEOF
9403 case "$host_os" in
9404 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9405 *) gl_absname_cpp="$ac_cpp" ;;
9406 esac
9407
9408 case "$host_os" in
9409 mingw*)
9410 gl_dirsep_regex='[/\\]'
9411 ;;
9412 *)
9413 gl_dirsep_regex='\/'
9414 ;;
9415 esac
9416 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 9417 gl_header_literal_regex=`echo 'sys/time.h' \
49e4877c
PA
9418 | sed -e "$gl_make_literal_regex_sed"`
9419 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9420 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9421 s|^/[^/]|//&|
9422 p
9423 q
9424 }'
9425
6ec2e0f5 9426 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
49e4877c
PA
9427 sed -n "$gl_absolute_header_sed"`
9428
6ec2e0f5
SDJ
9429 gl_header=$gl_cv_absolute_sys_time_h
9430 gl_cv_next_sys_time_h='"'$gl_header'"'
49e4877c 9431 else
6ec2e0f5 9432 gl_cv_next_sys_time_h='<'sys/time.h'>'
49e4877c
PA
9433 fi
9434
9435
9436fi
6ec2e0f5
SDJ
9437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
9438$as_echo "$gl_cv_next_sys_time_h" >&6; }
49e4877c 9439 fi
6ec2e0f5 9440 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
49e4877c
PA
9441
9442 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9443 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 9444 gl_next_as_first_directive='<'sys/time.h'>'
49e4877c
PA
9445 else
9446 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 9447 gl_next_as_first_directive=$gl_cv_next_sys_time_h
49e4877c 9448 fi
6ec2e0f5 9449 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
49e4877c
PA
9450
9451
9452
9453
9454
6ec2e0f5
SDJ
9455 if test $ac_cv_header_sys_time_h != yes; then
9456 HAVE_SYS_TIME_H=0
9457 fi
9458
9459
9460
9461
9462
472fa5ee
SM
9463 :
9464
9465
9466
9467
9468
6ec2e0f5
SDJ
9469 if test $ac_cv_header_sys_socket_h != yes; then
9470 for ac_header in winsock2.h
9471do :
9472 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
d0ac1c44 9473if test "x$ac_cv_header_winsock2_h" = xyes; then :
6ec2e0f5
SDJ
9474 cat >>confdefs.h <<_ACEOF
9475#define HAVE_WINSOCK2_H 1
9476_ACEOF
9477
9478fi
9479
9480done
9481
9482 fi
9483 if test "$ac_cv_header_winsock2_h" = yes; then
9484 HAVE_WINSOCK2_H=1
9485 UNISTD_H_HAVE_WINSOCK2_H=1
9486 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
9487 else
9488 HAVE_WINSOCK2_H=0
9489 fi
9490
9491
9492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
9493$as_echo_n "checking for struct timeval... " >&6; }
d0ac1c44 9494if ${gl_cv_sys_struct_timeval+:} false; then :
6ec2e0f5
SDJ
9495 $as_echo_n "(cached) " >&6
9496else
9497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9498/* end confdefs.h. */
9499#if HAVE_SYS_TIME_H
9500 #include <sys/time.h>
9501 #endif
9502 #include <time.h>
9503 #if HAVE_WINSOCK2_H
9504 # include <winsock2.h>
9505 #endif
9506
49e4877c
PA
9507int
9508main ()
9509{
6ec2e0f5 9510static struct timeval x; x.tv_sec = x.tv_usec;
49e4877c
PA
9511 ;
9512 return 0;
9513}
9514_ACEOF
9515if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 9516 gl_cv_sys_struct_timeval=yes
49e4877c 9517else
6ec2e0f5 9518 gl_cv_sys_struct_timeval=no
49e4877c
PA
9519fi
9520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49e4877c 9521
49e4877c 9522fi
6ec2e0f5
SDJ
9523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
9524$as_echo "$gl_cv_sys_struct_timeval" >&6; }
9525 if test $gl_cv_sys_struct_timeval != yes; then
9526 HAVE_STRUCT_TIMEVAL=0
9527 else
9528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
9529$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
d0ac1c44 9530if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
8690e634
JK
9531 $as_echo_n "(cached) " >&6
9532else
6ec2e0f5 9533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 9534/* end confdefs.h. */
6ec2e0f5
SDJ
9535#if HAVE_SYS_TIME_H
9536 #include <sys/time.h>
9537 #endif
9538 #include <time.h>
9539 #if HAVE_WINSOCK2_H
9540 # include <winsock2.h>
9541 #endif
8690e634 9542
8690e634
JK
9543int
9544main ()
9545{
6ec2e0f5
SDJ
9546static struct timeval x;
9547 typedef int verify_tv_sec_type[
9548 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
9549 ];
9550
8690e634
JK
9551 ;
9552 return 0;
9553}
8690e634 9554_ACEOF
6ec2e0f5
SDJ
9555if ac_fn_c_try_compile "$LINENO"; then :
9556 gl_cv_sys_struct_timeval_tv_sec=yes
8690e634 9557else
6ec2e0f5 9558 gl_cv_sys_struct_timeval_tv_sec=no
8690e634 9559fi
6ec2e0f5 9560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 9561
6ec2e0f5 9562fi
725e2999
JB
9563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
9564$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
9565 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
9566 REPLACE_STRUCT_TIMEVAL=1
9567 fi
9568 fi
9569
9570
9571 for gl_func in gettimeofday; do
9572 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
9573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
9574$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
9575if eval \${$as_gl_Symbol+:} false; then :
9576 $as_echo_n "(cached) " >&6
9577else
9578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9579/* end confdefs.h. */
9580
9581#if HAVE_SYS_TIME_H
9582# include <sys/time.h>
9583#endif
9584#include <time.h>
9585
9586int
9587main ()
9588{
9589#undef $gl_func
9590 (void) $gl_func;
9591 ;
9592 return 0;
9593}
9594_ACEOF
9595if ac_fn_c_try_compile "$LINENO"; then :
9596 eval "$as_gl_Symbol=yes"
9597else
9598 eval "$as_gl_Symbol=no"
9599fi
9600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9601fi
9602eval ac_res=\$$as_gl_Symbol
9603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9604$as_echo "$ac_res" >&6; }
9605 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
9606 cat >>confdefs.h <<_ACEOF
9607#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
9608_ACEOF
9609
9610 eval ac_cv_have_decl_$gl_func=yes
9611fi
9612 done
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
9639 GNULIB_SOCKET=0;
9640 GNULIB_CONNECT=0;
9641 GNULIB_ACCEPT=0;
9642 GNULIB_BIND=0;
9643 GNULIB_GETPEERNAME=0;
9644 GNULIB_GETSOCKNAME=0;
9645 GNULIB_GETSOCKOPT=0;
9646 GNULIB_LISTEN=0;
9647 GNULIB_RECV=0;
9648 GNULIB_SEND=0;
9649 GNULIB_RECVFROM=0;
9650 GNULIB_SENDTO=0;
9651 GNULIB_SETSOCKOPT=0;
9652 GNULIB_SHUTDOWN=0;
9653 GNULIB_ACCEPT4=0;
9654 HAVE_STRUCT_SOCKADDR_STORAGE=1;
9655 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
9656
9657 HAVE_SA_FAMILY_T=1;
9658 HAVE_ACCEPT4=1;
9659
9660
9661 :
9662
9663
9664
9665
9666
9667 if test $ac_cv_header_sys_socket_h = no; then
9668 for ac_header in ws2tcpip.h
9669do :
9670 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
9671if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
9672 cat >>confdefs.h <<_ACEOF
9673#define HAVE_WS2TCPIP_H 1
9674_ACEOF
9675
9676fi
9677
9678done
9679
9680 fi
9681
9682
9683
9684
9685
9686 case "$host_os" in
9687 osf*)
9688
9689$as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h
9690
9691 ;;
9692 esac
9693
9694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
9695$as_echo_n "checking whether <sys/socket.h> is self-contained... " >&6; }
9696if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then :
9697 $as_echo_n "(cached) " >&6
9698else
9699
9700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9701/* end confdefs.h. */
9702#include <sys/socket.h>
9703int
9704main ()
9705{
9706
9707 ;
9708 return 0;
9709}
9710_ACEOF
9711if ac_fn_c_try_compile "$LINENO"; then :
9712 gl_cv_header_sys_socket_h_selfcontained=yes
9713else
9714 gl_cv_header_sys_socket_h_selfcontained=no
9715fi
9716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9717
9718fi
9719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
9720$as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
9721 if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
9722 for ac_func in shutdown
9723do :
9724 ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
9725if test "x$ac_cv_func_shutdown" = xyes; then :
9726 cat >>confdefs.h <<_ACEOF
9727#define HAVE_SHUTDOWN 1
9728_ACEOF
9729
9730fi
9731done
9732
9733 if test $ac_cv_func_shutdown = yes; then
9734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
9735$as_echo_n "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
9736if ${gl_cv_header_sys_socket_h_shut+:} false; then :
9737 $as_echo_n "(cached) " >&6
9738else
9739
9740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9741/* end confdefs.h. */
9742#include <sys/socket.h>
9743int
9744main ()
9745{
9746int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
9747 ;
9748 return 0;
9749}
9750_ACEOF
9751if ac_fn_c_try_compile "$LINENO"; then :
9752 gl_cv_header_sys_socket_h_shut=yes
9753else
9754 gl_cv_header_sys_socket_h_shut=no
9755fi
9756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9757
9758fi
9759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
9760$as_echo "$gl_cv_header_sys_socket_h_shut" >&6; }
9761 if test $gl_cv_header_sys_socket_h_shut = no; then
9762 SYS_SOCKET_H='sys/socket.h'
9763 fi
9764 fi
9765 fi
9766 # We need to check for ws2tcpip.h now.
9767
9768
9769
9770
9771
9772
9773
9774
9775 :
9776
9777
9778
9779
9780
9781
9782
9783
9784 if test $gl_cv_have_include_next = yes; then
9785 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
9786 else
9787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
9788$as_echo_n "checking absolute name of <sys/socket.h>... " >&6; }
9789if ${gl_cv_next_sys_socket_h+:} false; then :
9790 $as_echo_n "(cached) " >&6
9791else
9792
9793 if test $ac_cv_header_sys_socket_h = yes; then
9794
9795
9796
9797
9798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9799/* end confdefs.h. */
9800#include <sys/socket.h>
9801_ACEOF
9802 case "$host_os" in
9803 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9804 *) gl_absname_cpp="$ac_cpp" ;;
9805 esac
9806
9807 case "$host_os" in
9808 mingw*)
9809 gl_dirsep_regex='[/\\]'
9810 ;;
9811 *)
9812 gl_dirsep_regex='\/'
9813 ;;
9814 esac
9815 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9816 gl_header_literal_regex=`echo 'sys/socket.h' \
9817 | sed -e "$gl_make_literal_regex_sed"`
9818 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9819 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9820 s|^/[^/]|//&|
9821 p
9822 q
9823 }'
9824
9825 gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9826 sed -n "$gl_absolute_header_sed"`
9827
9828 gl_header=$gl_cv_absolute_sys_socket_h
9829 gl_cv_next_sys_socket_h='"'$gl_header'"'
9830 else
9831 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
9832 fi
9833
9834
9835fi
9836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
9837$as_echo "$gl_cv_next_sys_socket_h" >&6; }
9838 fi
9839 NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
9840
9841 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9842 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9843 gl_next_as_first_directive='<'sys/socket.h'>'
9844 else
9845 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9846 gl_next_as_first_directive=$gl_cv_next_sys_socket_h
9847 fi
9848 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
9849
9850
9851
9852
9853 if test $ac_cv_header_sys_socket_h = yes; then
9854 HAVE_SYS_SOCKET_H=1
9855 HAVE_WS2TCPIP_H=0
9856 else
9857 HAVE_SYS_SOCKET_H=0
9858 if test $ac_cv_header_ws2tcpip_h = yes; then
9859 HAVE_WS2TCPIP_H=1
9860 else
9861 HAVE_WS2TCPIP_H=0
9862 fi
9863 fi
9864
9865
9866
9867 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
9868 /* sys/types.h is not needed according to POSIX, but the
9869 sys/socket.h in i386-unknown-freebsd4.10 and
9870 powerpc-apple-darwin5.5 required it. */
9871#include <sys/types.h>
9872#ifdef HAVE_SYS_SOCKET_H
9873#include <sys/socket.h>
9874#endif
9875#ifdef HAVE_WS2TCPIP_H
9876#include <ws2tcpip.h>
9877#endif
9878
9879"
9880if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
9881
9882cat >>confdefs.h <<_ACEOF
9883#define HAVE_STRUCT_SOCKADDR_STORAGE 1
9884_ACEOF
9885
9886
9887fi
9888ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
9889 /* sys/types.h is not needed according to POSIX, but the
9890 sys/socket.h in i386-unknown-freebsd4.10 and
9891 powerpc-apple-darwin5.5 required it. */
9892#include <sys/types.h>
9893#ifdef HAVE_SYS_SOCKET_H
9894#include <sys/socket.h>
9895#endif
9896#ifdef HAVE_WS2TCPIP_H
9897#include <ws2tcpip.h>
9898#endif
9899
9900"
9901if test "x$ac_cv_type_sa_family_t" = xyes; then :
9902
9903cat >>confdefs.h <<_ACEOF
9904#define HAVE_SA_FAMILY_T 1
9905_ACEOF
9906
9907
9908fi
9909
9910 if test $ac_cv_type_struct_sockaddr_storage = no; then
9911 HAVE_STRUCT_SOCKADDR_STORAGE=0
9912 fi
9913 if test $ac_cv_type_sa_family_t = no; then
9914 HAVE_SA_FAMILY_T=0
9915 fi
9916 if test $ac_cv_type_struct_sockaddr_storage != no; then
9917 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
9918 #ifdef HAVE_SYS_SOCKET_H
9919 #include <sys/socket.h>
9920 #endif
9921 #ifdef HAVE_WS2TCPIP_H
9922 #include <ws2tcpip.h>
9923 #endif
9924
9925"
9926if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
9927
9928cat >>confdefs.h <<_ACEOF
9929#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
9930_ACEOF
9931
9932
9933else
9934 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
9935fi
9936
9937 fi
9938 if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
9939 || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
9940 SYS_SOCKET_H='sys/socket.h'
9941 fi
9942
9943
9944
9945
9946 :
9947
9948
9949
9950
9951
9952 if test $ac_cv_header_sys_socket_h != yes; then
9953 for ac_header in winsock2.h
9954do :
9955 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
9956if test "x$ac_cv_header_winsock2_h" = xyes; then :
9957 cat >>confdefs.h <<_ACEOF
9958#define HAVE_WINSOCK2_H 1
9959_ACEOF
9960
9961fi
9962
9963done
9964
9965 fi
9966 if test "$ac_cv_header_winsock2_h" = yes; then
9967 HAVE_WINSOCK2_H=1
9968 UNISTD_H_HAVE_WINSOCK2_H=1
9969 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
9970 else
9971 HAVE_WINSOCK2_H=0
8690e634
JK
9972 fi
9973
9974
725e2999
JB
9975
9976
9977 for gl_func in socket connect accept bind getpeername getsockname getsockopt listen recv send recvfrom sendto setsockopt shutdown accept4; do
5e8754f9
SDJ
9978 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
9979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
9980$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
9981if eval \${$as_gl_Symbol+:} false; then :
8690e634 9982 $as_echo_n "(cached) " >&6
8690e634
JK
9983else
9984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9985/* end confdefs.h. */
7a6dbc2f 9986
725e2999
JB
9987/* Some systems require prerequisite headers. */
9988#include <sys/types.h>
9989#include <sys/socket.h>
8690e634 9990
5e8754f9
SDJ
9991int
9992main ()
9993{
9994#undef $gl_func
9995 (void) $gl_func;
9996 ;
9997 return 0;
9998}
9999_ACEOF
10000if ac_fn_c_try_compile "$LINENO"; then :
10001 eval "$as_gl_Symbol=yes"
7a6dbc2f 10002else
5e8754f9
SDJ
10003 eval "$as_gl_Symbol=no"
10004fi
10005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 10006fi
5e8754f9
SDJ
10007eval ac_res=\$$as_gl_Symbol
10008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10009$as_echo "$ac_res" >&6; }
10010 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
10011 cat >>confdefs.h <<_ACEOF
10012#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
10013_ACEOF
7a6dbc2f 10014
5e8754f9
SDJ
10015 eval ac_cv_have_decl_$gl_func=yes
10016fi
10017 done
8690e634 10018
8690e634 10019
8690e634
JK
10020
10021
10022
10023
10024
10025
88b48903 10026
8690e634 10027
725e2999
JB
10028 :
10029
10030
10031
8690e634 10032
8690e634
JK
10033
10034
725e2999
JB
10035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
10036$as_echo_n "checking for IPv4 sockets... " >&6; }
10037 if ${gl_cv_socket_ipv4+:} false; then :
10038 $as_echo_n "(cached) " >&6
10039else
10040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10041/* end confdefs.h. */
10042#include <sys/types.h>
10043#ifdef HAVE_SYS_SOCKET_H
10044#include <sys/socket.h>
10045#endif
10046#ifdef HAVE_NETINET_IN_H
10047#include <netinet/in.h>
10048#endif
10049#ifdef HAVE_WINSOCK2_H
10050#include <winsock2.h>
10051#endif
10052int
10053main ()
10054{
10055int x = AF_INET; struct in_addr y; struct sockaddr_in z;
10056 if (&x && &y && &z) return 0;
10057 ;
10058 return 0;
10059}
10060_ACEOF
10061if ac_fn_c_try_compile "$LINENO"; then :
10062 gl_cv_socket_ipv4=yes
10063else
10064 gl_cv_socket_ipv4=no
10065fi
10066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10067fi
10068
10069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
10070$as_echo "$gl_cv_socket_ipv4" >&6; }
10071 if test $gl_cv_socket_ipv4 = yes; then
8690e634 10072
725e2999 10073$as_echo "#define HAVE_IPV4 1" >>confdefs.h
8690e634 10074
725e2999 10075 fi
8690e634 10076
725e2999
JB
10077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
10078$as_echo_n "checking for IPv6 sockets... " >&6; }
10079 if ${gl_cv_socket_ipv6+:} false; then :
10080 $as_echo_n "(cached) " >&6
10081else
10082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10083/* end confdefs.h. */
10084#include <sys/types.h>
10085#ifdef HAVE_SYS_SOCKET_H
10086#include <sys/socket.h>
10087#endif
10088#ifdef HAVE_NETINET_IN_H
10089#include <netinet/in.h>
10090#endif
10091#ifdef HAVE_WINSOCK2_H
10092#include <winsock2.h>
10093#endif
10094#ifdef HAVE_WS2TCPIP_H
10095#include <ws2tcpip.h>
10096#endif
10097int
10098main ()
10099{
10100int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
10101 if (&x && &y && &z) return 0;
10102 ;
10103 return 0;
10104}
10105_ACEOF
10106if ac_fn_c_try_compile "$LINENO"; then :
10107 gl_cv_socket_ipv6=yes
10108else
10109 gl_cv_socket_ipv6=no
10110fi
10111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10112fi
49e4877c 10113
725e2999
JB
10114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
10115$as_echo "$gl_cv_socket_ipv6" >&6; }
10116 if test $gl_cv_socket_ipv6 = yes; then
49e4877c 10117
725e2999 10118$as_echo "#define HAVE_IPV6 1" >>confdefs.h
8690e634 10119
725e2999 10120 fi
8690e634 10121
472fa5ee
SM
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134 :
10135
10136
10137
10138
10139
8690e634
JK
10140
10141
10142
10143 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 10144 gl_cv_next_limits_h='<'limits.h'>'
8690e634 10145 else
6ec2e0f5
SDJ
10146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
10147$as_echo_n "checking absolute name of <limits.h>... " >&6; }
d0ac1c44 10148if ${gl_cv_next_limits_h+:} false; then :
8690e634
JK
10149 $as_echo_n "(cached) " >&6
10150else
10151
6ec2e0f5 10152 if test $ac_cv_header_limits_h = yes; then
8690e634
JK
10153
10154
4a626d0a
PA
10155
10156
10157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 10158/* end confdefs.h. */
6ec2e0f5 10159#include <limits.h>
8690e634 10160_ACEOF
4a626d0a
PA
10161 case "$host_os" in
10162 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10163 *) gl_absname_cpp="$ac_cpp" ;;
10164 esac
10165
10166 case "$host_os" in
10167 mingw*)
10168 gl_dirsep_regex='[/\\]'
10169 ;;
10170 *)
10171 gl_dirsep_regex='\/'
10172 ;;
10173 esac
10174 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 10175 gl_header_literal_regex=`echo 'limits.h' \
4a626d0a
PA
10176 | sed -e "$gl_make_literal_regex_sed"`
10177 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10178 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10179 s|^/[^/]|//&|
10180 p
10181 q
10182 }'
10183
6ec2e0f5 10184 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a
PA
10185 sed -n "$gl_absolute_header_sed"`
10186
6ec2e0f5
SDJ
10187 gl_header=$gl_cv_absolute_limits_h
10188 gl_cv_next_limits_h='"'$gl_header'"'
8690e634 10189 else
6ec2e0f5 10190 gl_cv_next_limits_h='<'limits.h'>'
8690e634
JK
10191 fi
10192
5e8754f9 10193
7a6dbc2f 10194fi
5e8754f9
SDJ
10195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
10196$as_echo "$gl_cv_next_limits_h" >&6; }
10197 fi
10198 NEXT_LIMITS_H=$gl_cv_next_limits_h
10199
10200 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10201 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10202 gl_next_as_first_directive='<'limits.h'>'
10203 else
10204 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10205 gl_next_as_first_directive=$gl_cv_next_limits_h
10206 fi
10207 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
7a6dbc2f 10208
7a6dbc2f
SDJ
10209
10210
5e8754f9
SDJ
10211
10212
10213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has ULLONG_WIDTH etc." >&5
10214$as_echo_n "checking whether limits.h has ULLONG_WIDTH etc.... " >&6; }
10215if ${gl_cv_header_limits_width+:} false; then :
6ec2e0f5
SDJ
10216 $as_echo_n "(cached) " >&6
10217else
10218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10219/* end confdefs.h. */
5e8754f9
SDJ
10220#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
10221 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
10222 #endif
10223 #include <limits.h>
10224 int ullw = ULLONG_WIDTH;
6ec2e0f5
SDJ
10225int
10226main ()
10227{
10228
10229 ;
10230 return 0;
10231}
10232_ACEOF
10233if ac_fn_c_try_compile "$LINENO"; then :
5e8754f9 10234 gl_cv_header_limits_width=yes
6ec2e0f5 10235else
5e8754f9 10236 gl_cv_header_limits_width=no
6ec2e0f5
SDJ
10237fi
10238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10239fi
5e8754f9
SDJ
10240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
10241$as_echo "$gl_cv_header_limits_width" >&6; }
10242 if test "$gl_cv_header_limits_width" = yes; then
10243 LIMITS_H=
8690e634 10244 else
5e8754f9 10245 LIMITS_H=limits.h
8690e634
JK
10246 fi
10247
5e8754f9
SDJ
10248 if test -n "$LIMITS_H"; then
10249 GL_GENERATE_LIMITS_H_TRUE=
10250 GL_GENERATE_LIMITS_H_FALSE='#'
10251else
10252 GL_GENERATE_LIMITS_H_TRUE='#'
10253 GL_GENERATE_LIMITS_H_FALSE=
10254fi
10255
8690e634 10256
6ec2e0f5
SDJ
10257
10258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
10259$as_echo_n "checking for unsigned long long int... " >&6; }
d0ac1c44 10260if ${ac_cv_type_unsigned_long_long_int+:} false; then :
8690e634
JK
10261 $as_echo_n "(cached) " >&6
10262else
6ec2e0f5
SDJ
10263 ac_cv_type_unsigned_long_long_int=yes
10264 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
8690e634
JK
10265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10266/* end confdefs.h. */
10267
6ec2e0f5
SDJ
10268 /* For now, do not test the preprocessor; as of 2007 there are too many
10269 implementations with broken preprocessors. Perhaps this can
10270 be revisited in 2012. In the meantime, code should not expect
10271 #if to work with literals wider than 32 bits. */
10272 /* Test literals. */
10273 long long int ll = 9223372036854775807ll;
10274 long long int nll = -9223372036854775807LL;
10275 unsigned long long int ull = 18446744073709551615ULL;
10276 /* Test constant expressions. */
10277 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
10278 ? 1 : -1)];
10279 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
10280 ? 1 : -1)];
10281 int i = 63;
10282int
10283main ()
10284{
10285/* Test availability of runtime routines for shift and division. */
10286 long long int llmax = 9223372036854775807ll;
10287 unsigned long long int ullmax = 18446744073709551615ull;
10288 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
10289 | (llmax / ll) | (llmax % ll)
10290 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
10291 | (ullmax / ull) | (ullmax % ull));
10292 ;
10293 return 0;
10294}
8690e634 10295
6ec2e0f5
SDJ
10296_ACEOF
10297if ac_fn_c_try_link "$LINENO"; then :
8690e634 10298
6ec2e0f5
SDJ
10299else
10300 ac_cv_type_unsigned_long_long_int=no
10301fi
10302rm -f core conftest.err conftest.$ac_objext \
10303 conftest$ac_exeext conftest.$ac_ext
10304 fi
10305fi
10306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
10307$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
10308 if test $ac_cv_type_unsigned_long_long_int = yes; then
8690e634 10309
6ec2e0f5 10310$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
8690e634 10311
6ec2e0f5 10312 fi
8690e634 10313
8690e634 10314
8690e634 10315
6ec2e0f5
SDJ
10316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
10317$as_echo_n "checking for long long int... " >&6; }
d0ac1c44 10318if ${ac_cv_type_long_long_int+:} false; then :
6ec2e0f5
SDJ
10319 $as_echo_n "(cached) " >&6
10320else
10321 ac_cv_type_long_long_int=yes
10322 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10323 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
10324 if test $ac_cv_type_long_long_int = yes; then
10325 if test "$cross_compiling" = yes; then :
10326 :
8690e634
JK
10327else
10328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10329/* end confdefs.h. */
6ec2e0f5
SDJ
10330#include <limits.h>
10331 #ifndef LLONG_MAX
10332 # define HALF \
10333 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
10334 # define LLONG_MAX (HALF - 1 + HALF)
10335 #endif
8690e634
JK
10336int
10337main ()
10338{
6ec2e0f5
SDJ
10339long long int n = 1;
10340 int i;
10341 for (i = 0; ; i++)
10342 {
10343 long long int m = n << i;
10344 if (m >> i != n)
10345 return 1;
10346 if (LLONG_MAX / 2 < m)
10347 break;
10348 }
10349 return 0;
8690e634
JK
10350 ;
10351 return 0;
10352}
10353_ACEOF
10354if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5
SDJ
10355
10356else
10357 ac_cv_type_long_long_int=no
8690e634
JK
10358fi
10359rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10360 conftest.$ac_objext conftest.beam conftest.$ac_ext
10361fi
10362
6ec2e0f5
SDJ
10363 fi
10364 fi
8690e634 10365fi
6ec2e0f5
SDJ
10366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
10367$as_echo "$ac_cv_type_long_long_int" >&6; }
10368 if test $ac_cv_type_long_long_int = yes; then
49e4877c 10369
6ec2e0f5 10370$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
49e4877c 10371
6ec2e0f5 10372 fi
49e4877c 10373
49e4877c
PA
10374
10375
49e4877c
PA
10376
10377
49e4877c 10378
472fa5ee
SM
10379
10380
10381
10382
10383
10384
6ec2e0f5
SDJ
10385 gl_cv_c_multiarch=no
10386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10387/* end confdefs.h. */
10388#ifndef __APPLE_CC__
10389 not a universal capable compiler
10390 #endif
10391 typedef int dummy;
49e4877c 10392
49e4877c
PA
10393_ACEOF
10394if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5
SDJ
10395
10396 arch=
10397 prev=
10398 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
10399 if test -n "$prev"; then
10400 case $word in
10401 i?86 | x86_64 | ppc | ppc64)
10402 if test -z "$arch" || test "$arch" = "$word"; then
10403 arch="$word"
10404 else
10405 gl_cv_c_multiarch=yes
10406 fi
10407 ;;
10408 esac
10409 prev=
10410 else
10411 if test "x$word" = "x-arch"; then
10412 prev=arch
10413 fi
10414 fi
10415 done
10416
49e4877c
PA
10417fi
10418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
10419 if test $gl_cv_c_multiarch = yes; then
10420 APPLE_UNIVERSAL_BUILD=1
10421 else
10422 APPLE_UNIVERSAL_BUILD=0
10423 fi
49e4877c 10424
49e4877c 10425
49e4877c
PA
10426
10427
49e4877c 10428
49e4877c 10429
49e4877c 10430
6ec2e0f5
SDJ
10431 if test $ac_cv_type_long_long_int = yes; then
10432 HAVE_LONG_LONG_INT=1
10433 else
10434 HAVE_LONG_LONG_INT=0
10435 fi
49e4877c 10436
49e4877c 10437
6ec2e0f5
SDJ
10438 if test $ac_cv_type_unsigned_long_long_int = yes; then
10439 HAVE_UNSIGNED_LONG_LONG_INT=1
8690e634 10440 else
6ec2e0f5
SDJ
10441 HAVE_UNSIGNED_LONG_LONG_INT=0
10442 fi
8690e634 10443
8690e634 10444
8690e634 10445
472fa5ee
SM
10446 :
10447
10448
10449
10450
10451
6ec2e0f5
SDJ
10452 if test $ac_cv_header_wchar_h = yes; then
10453 HAVE_WCHAR_H=1
10454 else
10455 HAVE_WCHAR_H=0
10456 fi
8690e634
JK
10457
10458
6ec2e0f5
SDJ
10459 if test $ac_cv_header_inttypes_h = yes; then
10460 HAVE_INTTYPES_H=1
10461 else
10462 HAVE_INTTYPES_H=0
10463 fi
8690e634
JK
10464
10465
6ec2e0f5
SDJ
10466 if test $ac_cv_header_sys_types_h = yes; then
10467 HAVE_SYS_TYPES_H=1
10468 else
10469 HAVE_SYS_TYPES_H=0
10470 fi
8690e634 10471
8690e634 10472
8690e634 10473
8690e634 10474
8690e634 10475
8690e634
JK
10476
10477
8690e634 10478
472fa5ee
SM
10479 :
10480
10481
10482
10483
10484
8690e634 10485
6ec2e0f5
SDJ
10486
10487
10488 if test $gl_cv_have_include_next = yes; then
10489 gl_cv_next_stdint_h='<'stdint.h'>'
10490 else
10491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
10492$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
d0ac1c44 10493if ${gl_cv_next_stdint_h+:} false; then :
8690e634
JK
10494 $as_echo_n "(cached) " >&6
10495else
8690e634 10496
6ec2e0f5 10497 if test $ac_cv_header_stdint_h = yes; then
8690e634 10498
8690e634 10499
8690e634 10500
6ec2e0f5
SDJ
10501
10502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10503/* end confdefs.h. */
10504#include <stdint.h>
8690e634 10505_ACEOF
6ec2e0f5
SDJ
10506 case "$host_os" in
10507 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10508 *) gl_absname_cpp="$ac_cpp" ;;
10509 esac
8690e634 10510
6ec2e0f5
SDJ
10511 case "$host_os" in
10512 mingw*)
10513 gl_dirsep_regex='[/\\]'
10514 ;;
10515 *)
10516 gl_dirsep_regex='\/'
10517 ;;
10518 esac
10519 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10520 gl_header_literal_regex=`echo 'stdint.h' \
10521 | sed -e "$gl_make_literal_regex_sed"`
10522 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10523 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10524 s|^/[^/]|//&|
10525 p
10526 q
10527 }'
10528
10529 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10530 sed -n "$gl_absolute_header_sed"`
10531
10532 gl_header=$gl_cv_absolute_stdint_h
10533 gl_cv_next_stdint_h='"'$gl_header'"'
10534 else
10535 gl_cv_next_stdint_h='<'stdint.h'>'
10536 fi
10537
10538
10539fi
10540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
10541$as_echo "$gl_cv_next_stdint_h" >&6; }
10542 fi
10543 NEXT_STDINT_H=$gl_cv_next_stdint_h
10544
10545 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10546 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10547 gl_next_as_first_directive='<'stdint.h'>'
10548 else
10549 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10550 gl_next_as_first_directive=$gl_cv_next_stdint_h
10551 fi
10552 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
8690e634
JK
10553
10554
10555
10556
6ec2e0f5
SDJ
10557 if test $ac_cv_header_stdint_h = yes; then
10558 HAVE_STDINT_H=1
10559 else
10560 HAVE_STDINT_H=0
10561 fi
10562
10563
10564 if test $ac_cv_header_stdint_h = yes; then
10565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
10566$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
d0ac1c44 10567if ${gl_cv_header_working_stdint_h+:} false; then :
8690e634
JK
10568 $as_echo_n "(cached) " >&6
10569else
6ec2e0f5
SDJ
10570 gl_cv_header_working_stdint_h=no
10571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
10572/* end confdefs.h. */
10573
6ec2e0f5
SDJ
10574
10575#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
10576#define __STDC_CONSTANT_MACROS 1
10577#define __STDC_LIMIT_MACROS 1
10578#include <stdint.h>
10579/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
10580#if !(defined WCHAR_MIN && defined WCHAR_MAX)
10581#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
10582#endif
10583
10584
8690e634
JK
10585 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10586 included before <wchar.h>. */
10587 #include <stddef.h>
10588 #include <signal.h>
10589 #if HAVE_WCHAR_H
10590 # include <stdio.h>
10591 # include <time.h>
10592 # include <wchar.h>
10593 #endif
10594
8690e634 10595
6ec2e0f5
SDJ
10596#ifdef INT8_MAX
10597int8_t a1 = INT8_MAX;
10598int8_t a1min = INT8_MIN;
10599#endif
10600#ifdef INT16_MAX
10601int16_t a2 = INT16_MAX;
10602int16_t a2min = INT16_MIN;
10603#endif
10604#ifdef INT32_MAX
10605int32_t a3 = INT32_MAX;
10606int32_t a3min = INT32_MIN;
10607#endif
10608#ifdef INT64_MAX
10609int64_t a4 = INT64_MAX;
10610int64_t a4min = INT64_MIN;
10611#endif
10612#ifdef UINT8_MAX
10613uint8_t b1 = UINT8_MAX;
10614#else
10615typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
10616#endif
10617#ifdef UINT16_MAX
10618uint16_t b2 = UINT16_MAX;
10619#endif
10620#ifdef UINT32_MAX
10621uint32_t b3 = UINT32_MAX;
10622#endif
10623#ifdef UINT64_MAX
10624uint64_t b4 = UINT64_MAX;
10625#endif
10626int_least8_t c1 = INT8_C (0x7f);
10627int_least8_t c1max = INT_LEAST8_MAX;
10628int_least8_t c1min = INT_LEAST8_MIN;
10629int_least16_t c2 = INT16_C (0x7fff);
10630int_least16_t c2max = INT_LEAST16_MAX;
10631int_least16_t c2min = INT_LEAST16_MIN;
10632int_least32_t c3 = INT32_C (0x7fffffff);
10633int_least32_t c3max = INT_LEAST32_MAX;
10634int_least32_t c3min = INT_LEAST32_MIN;
10635int_least64_t c4 = INT64_C (0x7fffffffffffffff);
10636int_least64_t c4max = INT_LEAST64_MAX;
10637int_least64_t c4min = INT_LEAST64_MIN;
10638uint_least8_t d1 = UINT8_C (0xff);
10639uint_least8_t d1max = UINT_LEAST8_MAX;
10640uint_least16_t d2 = UINT16_C (0xffff);
10641uint_least16_t d2max = UINT_LEAST16_MAX;
10642uint_least32_t d3 = UINT32_C (0xffffffff);
10643uint_least32_t d3max = UINT_LEAST32_MAX;
10644uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
10645uint_least64_t d4max = UINT_LEAST64_MAX;
10646int_fast8_t e1 = INT_FAST8_MAX;
10647int_fast8_t e1min = INT_FAST8_MIN;
10648int_fast16_t e2 = INT_FAST16_MAX;
10649int_fast16_t e2min = INT_FAST16_MIN;
10650int_fast32_t e3 = INT_FAST32_MAX;
10651int_fast32_t e3min = INT_FAST32_MIN;
10652int_fast64_t e4 = INT_FAST64_MAX;
10653int_fast64_t e4min = INT_FAST64_MIN;
10654uint_fast8_t f1 = UINT_FAST8_MAX;
10655uint_fast16_t f2 = UINT_FAST16_MAX;
10656uint_fast32_t f3 = UINT_FAST32_MAX;
10657uint_fast64_t f4 = UINT_FAST64_MAX;
10658#ifdef INTPTR_MAX
10659intptr_t g = INTPTR_MAX;
10660intptr_t gmin = INTPTR_MIN;
10661#endif
10662#ifdef UINTPTR_MAX
10663uintptr_t h = UINTPTR_MAX;
10664#endif
10665intmax_t i = INTMAX_MAX;
10666uintmax_t j = UINTMAX_MAX;
8690e634 10667
6ec2e0f5
SDJ
10668/* Check that SIZE_MAX has the correct type, if possible. */
10669#if 201112 <= __STDC_VERSION__
10670int k = _Generic (SIZE_MAX, size_t: 0);
10671#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
10672 || (0x5110 <= __SUNPRO_C && !__STDC__))
10673extern size_t k;
10674extern __typeof__ (SIZE_MAX) k;
10675#endif
8690e634 10676
6ec2e0f5
SDJ
10677#include <limits.h> /* for CHAR_BIT */
10678#define TYPE_MINIMUM(t) \
10679 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
10680#define TYPE_MAXIMUM(t) \
10681 ((t) ((t) 0 < (t) -1 \
10682 ? (t) -1 \
10683 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
10684struct s {
10685 int check_PTRDIFF:
10686 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
10687 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
10688 ? 1 : -1;
10689 /* Detect bug in FreeBSD 6.0 / ia64. */
10690 int check_SIG_ATOMIC:
10691 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
10692 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
10693 ? 1 : -1;
10694 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
10695 int check_WCHAR:
10696 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
10697 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
10698 ? 1 : -1;
10699 /* Detect bug in mingw. */
10700 int check_WINT:
10701 WINT_MIN == TYPE_MINIMUM (wint_t)
10702 && WINT_MAX == TYPE_MAXIMUM (wint_t)
10703 ? 1 : -1;
8690e634 10704
6ec2e0f5
SDJ
10705 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
10706 int check_UINT8_C:
10707 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
10708 int check_UINT16_C:
10709 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
8690e634 10710
6ec2e0f5
SDJ
10711 /* Detect bugs in OpenBSD 3.9 stdint.h. */
10712#ifdef UINT8_MAX
10713 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
10714#endif
10715#ifdef UINT16_MAX
10716 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
10717#endif
10718#ifdef UINT32_MAX
10719 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
10720#endif
10721#ifdef UINT64_MAX
10722 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
10723#endif
10724 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
10725 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
10726 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
10727 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
10728 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
10729 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
10730 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
10731 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
10732 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
10733 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
10734 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
10735};
8690e634 10736
8690e634
JK
10737int
10738main ()
10739{
10740
10741 ;
10742 return 0;
10743}
10744_ACEOF
10745if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 10746 if test "$cross_compiling" = yes; then :
5e8754f9 10747 gl_cv_header_working_stdint_h=yes
8690e634 10748
6ec2e0f5
SDJ
10749else
10750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10751/* end confdefs.h. */
8690e634 10752
8690e634 10753
6ec2e0f5
SDJ
10754#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
10755#define __STDC_CONSTANT_MACROS 1
10756#define __STDC_LIMIT_MACROS 1
10757#include <stdint.h>
8690e634 10758
8690e634
JK
10759
10760 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10761 included before <wchar.h>. */
10762 #include <stddef.h>
10763 #include <signal.h>
10764 #if HAVE_WCHAR_H
10765 # include <stdio.h>
10766 # include <time.h>
10767 # include <wchar.h>
10768 #endif
10769
8690e634 10770
6ec2e0f5
SDJ
10771#include <stdio.h>
10772#include <string.h>
10773#define MVAL(macro) MVAL1(macro)
10774#define MVAL1(expression) #expression
10775static const char *macro_values[] =
10776 {
10777#ifdef INT8_MAX
10778 MVAL (INT8_MAX),
10779#endif
10780#ifdef INT16_MAX
10781 MVAL (INT16_MAX),
10782#endif
10783#ifdef INT32_MAX
10784 MVAL (INT32_MAX),
10785#endif
10786#ifdef INT64_MAX
10787 MVAL (INT64_MAX),
10788#endif
10789#ifdef UINT8_MAX
10790 MVAL (UINT8_MAX),
10791#endif
10792#ifdef UINT16_MAX
10793 MVAL (UINT16_MAX),
10794#endif
10795#ifdef UINT32_MAX
10796 MVAL (UINT32_MAX),
10797#endif
10798#ifdef UINT64_MAX
10799 MVAL (UINT64_MAX),
10800#endif
10801 NULL
10802 };
10803
10804int
10805main ()
10806{
10807
10808 const char **mv;
10809 for (mv = macro_values; *mv != NULL; mv++)
10810 {
10811 const char *value = *mv;
10812 /* Test whether it looks like a cast expression. */
10813 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
10814 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
10815 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
10816 || strncmp (value, "((int)"/*)*/, 6) == 0
10817 || strncmp (value, "((signed short)"/*)*/, 15) == 0
10818 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
10819 return mv - macro_values + 1;
10820 }
10821 return 0;
10822
10823 ;
8690e634
JK
10824 return 0;
10825}
10826_ACEOF
6ec2e0f5
SDJ
10827if ac_fn_c_try_run "$LINENO"; then :
10828 gl_cv_header_working_stdint_h=yes
8690e634 10829fi
6ec2e0f5
SDJ
10830rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10831 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 10832fi
8690e634
JK
10833
10834
6ec2e0f5
SDJ
10835fi
10836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 10837
6ec2e0f5
SDJ
10838fi
10839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
10840$as_echo "$gl_cv_header_working_stdint_h" >&6; }
8690e634
JK
10841 fi
10842
6ec2e0f5
SDJ
10843 HAVE_C99_STDINT_H=0
10844 HAVE_SYS_BITYPES_H=0
10845 HAVE_SYS_INTTYPES_H=0
10846 STDINT_H=stdint.h
5e8754f9
SDJ
10847 if test "$gl_cv_header_working_stdint_h" = yes; then
10848 HAVE_C99_STDINT_H=1
10849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
6ec2e0f5 10850$as_echo_n "checking whether stdint.h predates C++11... " >&6; }
d0ac1c44 10851if ${gl_cv_header_stdint_predates_cxx11_h+:} false; then :
6ec2e0f5 10852 $as_echo_n "(cached) " >&6
49e4877c 10853else
6ec2e0f5 10854 gl_cv_header_stdint_predates_cxx11_h=yes
5e8754f9 10855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ec2e0f5 10856/* end confdefs.h. */
49e4877c
PA
10857
10858
6ec2e0f5
SDJ
10859#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
10860#include <stdint.h>
49e4877c
PA
10861
10862
6ec2e0f5
SDJ
10863 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10864 included before <wchar.h>. */
10865 #include <stddef.h>
10866 #include <signal.h>
10867 #if HAVE_WCHAR_H
10868 # include <stdio.h>
10869 # include <time.h>
10870 # include <wchar.h>
10871 #endif
49e4877c 10872
8690e634 10873
6ec2e0f5
SDJ
10874intmax_t im = INTMAX_MAX;
10875int32_t i32 = INT32_C (0x7fffffff);
8690e634 10876
6ec2e0f5
SDJ
10877int
10878main ()
10879{
8690e634 10880
6ec2e0f5
SDJ
10881 ;
10882 return 0;
10883}
10884_ACEOF
10885if ac_fn_c_try_compile "$LINENO"; then :
10886 gl_cv_header_stdint_predates_cxx11_h=no
10887fi
10888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10889fi
10890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
10891$as_echo "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
8690e634 10892
5e8754f9 10893 if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
8690e634 10894
6ec2e0f5 10895$as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
8690e634
JK
10896
10897
6ec2e0f5 10898$as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
8690e634 10899
5e8754f9
SDJ
10900 fi
10901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
6ec2e0f5 10902$as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
d0ac1c44 10903if ${gl_cv_header_stdint_width+:} false; then :
6ec2e0f5
SDJ
10904 $as_echo_n "(cached) " >&6
10905else
10906 gl_cv_header_stdint_width=no
5e8754f9 10907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ec2e0f5 10908/* end confdefs.h. */
8690e634 10909
5e8754f9
SDJ
10910 /* Work if build is not clean. */
10911 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
10912 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
10913 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
10914 #endif
10915 #include <stdint.h>
8690e634 10916
6ec2e0f5
SDJ
10917 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10918 included before <wchar.h>. */
10919 #include <stddef.h>
10920 #include <signal.h>
10921 #if HAVE_WCHAR_H
10922 # include <stdio.h>
10923 # include <time.h>
10924 # include <wchar.h>
10925 #endif
8690e634 10926
5e8754f9 10927 int iw = UINTMAX_WIDTH;
8690e634 10928
6ec2e0f5
SDJ
10929int
10930main ()
10931{
8690e634 10932
6ec2e0f5
SDJ
10933 ;
10934 return 0;
10935}
10936_ACEOF
10937if ac_fn_c_try_compile "$LINENO"; then :
10938 gl_cv_header_stdint_width=yes
10939fi
10940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10941fi
10942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
10943$as_echo "$gl_cv_header_stdint_width" >&6; }
5e8754f9
SDJ
10944 if test "$gl_cv_header_stdint_width" = yes; then
10945 STDINT_H=
10946 fi
10947 else
10948 for ac_header in sys/inttypes.h sys/bitypes.h
6ec2e0f5
SDJ
10949do :
10950 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10951ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 10952if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6ec2e0f5
SDJ
10953 cat >>confdefs.h <<_ACEOF
10954#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10955_ACEOF
8690e634 10956
6ec2e0f5 10957fi
8690e634 10958
6ec2e0f5 10959done
8690e634 10960
5e8754f9
SDJ
10961 if test $ac_cv_header_sys_inttypes_h = yes; then
10962 HAVE_SYS_INTTYPES_H=1
10963 fi
10964 if test $ac_cv_header_sys_bitypes_h = yes; then
10965 HAVE_SYS_BITYPES_H=1
10966 fi
8690e634
JK
10967
10968
6ec2e0f5 10969 if test $APPLE_UNIVERSAL_BUILD = 0; then
8690e634
JK
10970
10971
6ec2e0f5
SDJ
10972 for gltype in ptrdiff_t size_t ; do
10973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
10974$as_echo_n "checking for bit size of $gltype... " >&6; }
d0ac1c44 10975if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
8690e634
JK
10976 $as_echo_n "(cached) " >&6
10977else
6ec2e0f5
SDJ
10978 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
10979 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10980 included before <wchar.h>. */
10981 #include <stddef.h>
10982 #include <signal.h>
10983 #if HAVE_WCHAR_H
10984 # include <stdio.h>
10985 # include <time.h>
10986 # include <wchar.h>
10987 #endif
8690e634 10988
6ec2e0f5 10989#include <limits.h>"; then :
4a626d0a 10990
6ec2e0f5
SDJ
10991else
10992 result=unknown
10993fi
4a626d0a 10994
6ec2e0f5 10995 eval gl_cv_bitsizeof_${gltype}=\$result
4a626d0a 10996
6ec2e0f5
SDJ
10997fi
10998eval ac_res=\$gl_cv_bitsizeof_${gltype}
10999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11000$as_echo "$ac_res" >&6; }
11001 eval result=\$gl_cv_bitsizeof_${gltype}
11002 if test $result = unknown; then
11003 result=0
11004 fi
11005 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11006 cat >>confdefs.h <<_ACEOF
11007#define BITSIZEOF_${GLTYPE} $result
11008_ACEOF
4a626d0a 11009
6ec2e0f5
SDJ
11010 eval BITSIZEOF_${GLTYPE}=\$result
11011 done
4a626d0a 11012
8690e634 11013
6ec2e0f5 11014 fi
8690e634 11015
8690e634 11016
6ec2e0f5
SDJ
11017 for gltype in sig_atomic_t wchar_t wint_t ; do
11018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
11019$as_echo_n "checking for bit size of $gltype... " >&6; }
d0ac1c44 11020if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
6ec2e0f5
SDJ
11021 $as_echo_n "(cached) " >&6
11022else
11023 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
11024 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11025 included before <wchar.h>. */
11026 #include <stddef.h>
11027 #include <signal.h>
11028 #if HAVE_WCHAR_H
11029 # include <stdio.h>
11030 # include <time.h>
11031 # include <wchar.h>
11032 #endif
8690e634 11033
6ec2e0f5
SDJ
11034#include <limits.h>"; then :
11035
11036else
11037 result=unknown
11038fi
8690e634 11039
6ec2e0f5 11040 eval gl_cv_bitsizeof_${gltype}=\$result
8690e634 11041
6ec2e0f5
SDJ
11042fi
11043eval ac_res=\$gl_cv_bitsizeof_${gltype}
11044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11045$as_echo "$ac_res" >&6; }
11046 eval result=\$gl_cv_bitsizeof_${gltype}
11047 if test $result = unknown; then
11048 result=0
11049 fi
11050 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11051 cat >>confdefs.h <<_ACEOF
11052#define BITSIZEOF_${GLTYPE} $result
11053_ACEOF
8690e634 11054
6ec2e0f5
SDJ
11055 eval BITSIZEOF_${GLTYPE}=\$result
11056 done
8690e634
JK
11057
11058
11059
11060
6ec2e0f5
SDJ
11061 for gltype in sig_atomic_t wchar_t wint_t ; do
11062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
11063$as_echo_n "checking whether $gltype is signed... " >&6; }
d0ac1c44 11064if eval \${gl_cv_type_${gltype}_signed+:} false; then :
8690e634
JK
11065 $as_echo_n "(cached) " >&6
11066else
11067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11068/* end confdefs.h. */
8690e634 11069
6ec2e0f5
SDJ
11070 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11071 included before <wchar.h>. */
11072 #include <stddef.h>
11073 #include <signal.h>
11074 #if HAVE_WCHAR_H
11075 # include <stdio.h>
11076 # include <time.h>
11077 # include <wchar.h>
11078 #endif
11079
11080 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
8690e634
JK
11081int
11082main ()
11083{
6ec2e0f5 11084
8690e634
JK
11085 ;
11086 return 0;
11087}
11088_ACEOF
11089if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 11090 result=yes
8690e634 11091else
6ec2e0f5 11092 result=no
8690e634
JK
11093fi
11094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
11095 eval gl_cv_type_${gltype}_signed=\$result
11096
8690e634 11097fi
6ec2e0f5 11098eval ac_res=\$gl_cv_type_${gltype}_signed
8690e634
JK
11099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11100$as_echo "$ac_res" >&6; }
6ec2e0f5
SDJ
11101 eval result=\$gl_cv_type_${gltype}_signed
11102 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11103 if test "$result" = yes; then
11104 cat >>confdefs.h <<_ACEOF
11105#define HAVE_SIGNED_${GLTYPE} 1
8690e634
JK
11106_ACEOF
11107
6ec2e0f5
SDJ
11108 eval HAVE_SIGNED_${GLTYPE}=1
11109 else
11110 eval HAVE_SIGNED_${GLTYPE}=0
11111 fi
11112 done
8690e634 11113
8690e634 11114
6ec2e0f5
SDJ
11115 gl_cv_type_ptrdiff_t_signed=yes
11116 gl_cv_type_size_t_signed=no
11117 if test $APPLE_UNIVERSAL_BUILD = 0; then
8690e634 11118
8690e634 11119
6ec2e0f5
SDJ
11120 for gltype in ptrdiff_t size_t ; do
11121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
11122$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
d0ac1c44 11123if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
8690e634
JK
11124 $as_echo_n "(cached) " >&6
11125else
6ec2e0f5
SDJ
11126 eval gl_cv_type_${gltype}_suffix=no
11127 eval result=\$gl_cv_type_${gltype}_signed
11128 if test "$result" = yes; then
11129 glsufu=
11130 else
11131 glsufu=u
11132 fi
11133 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
11134 case $glsuf in
11135 '') gltype1='int';;
11136 l) gltype1='long int';;
11137 ll) gltype1='long long int';;
11138 i64) gltype1='__int64';;
11139 u) gltype1='unsigned int';;
11140 ul) gltype1='unsigned long int';;
11141 ull) gltype1='unsigned long long int';;
11142 ui64)gltype1='unsigned __int64';;
11143 esac
11144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
11145/* end confdefs.h. */
11146
6ec2e0f5
SDJ
11147 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11148 included before <wchar.h>. */
11149 #include <stddef.h>
11150 #include <signal.h>
11151 #if HAVE_WCHAR_H
11152 # include <stdio.h>
11153 # include <time.h>
11154 # include <wchar.h>
11155 #endif
8690e634 11156
6ec2e0f5
SDJ
11157 extern $gltype foo;
11158 extern $gltype1 foo;
8690e634
JK
11159int
11160main ()
11161{
11162
11163 ;
11164 return 0;
11165}
11166_ACEOF
11167if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 11168 eval gl_cv_type_${gltype}_suffix=\$glsuf
8690e634
JK
11169fi
11170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
11171 eval result=\$gl_cv_type_${gltype}_suffix
11172 test "$result" != no && break
11173 done
8690e634 11174fi
6ec2e0f5
SDJ
11175eval ac_res=\$gl_cv_type_${gltype}_suffix
11176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11177$as_echo "$ac_res" >&6; }
11178 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11179 eval result=\$gl_cv_type_${gltype}_suffix
11180 test "$result" = no && result=
11181 eval ${GLTYPE}_SUFFIX=\$result
11182 cat >>confdefs.h <<_ACEOF
11183#define ${GLTYPE}_SUFFIX $result
8690e634
JK
11184_ACEOF
11185
6ec2e0f5 11186 done
8690e634
JK
11187
11188
6ec2e0f5 11189 fi
8690e634 11190
6ec2e0f5
SDJ
11191
11192 for gltype in sig_atomic_t wchar_t wint_t ; do
11193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
11194$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
d0ac1c44 11195if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
8690e634
JK
11196 $as_echo_n "(cached) " >&6
11197else
6ec2e0f5
SDJ
11198 eval gl_cv_type_${gltype}_suffix=no
11199 eval result=\$gl_cv_type_${gltype}_signed
11200 if test "$result" = yes; then
11201 glsufu=
11202 else
11203 glsufu=u
11204 fi
11205 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
11206 case $glsuf in
11207 '') gltype1='int';;
11208 l) gltype1='long int';;
11209 ll) gltype1='long long int';;
11210 i64) gltype1='__int64';;
11211 u) gltype1='unsigned int';;
11212 ul) gltype1='unsigned long int';;
11213 ull) gltype1='unsigned long long int';;
11214 ui64)gltype1='unsigned __int64';;
11215 esac
11216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 11217/* end confdefs.h. */
88b48903 11218
6ec2e0f5
SDJ
11219 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11220 included before <wchar.h>. */
11221 #include <stddef.h>
11222 #include <signal.h>
11223 #if HAVE_WCHAR_H
11224 # include <stdio.h>
11225 # include <time.h>
11226 # include <wchar.h>
11227 #endif
88b48903 11228
6ec2e0f5
SDJ
11229 extern $gltype foo;
11230 extern $gltype1 foo;
88b48903
WN
11231int
11232main ()
11233{
88b48903
WN
11234
11235 ;
11236 return 0;
11237}
11238_ACEOF
11239if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 11240 eval gl_cv_type_${gltype}_suffix=\$glsuf
8690e634 11241fi
88b48903 11242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
11243 eval result=\$gl_cv_type_${gltype}_suffix
11244 test "$result" != no && break
11245 done
8690e634 11246fi
6ec2e0f5
SDJ
11247eval ac_res=\$gl_cv_type_${gltype}_suffix
11248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11249$as_echo "$ac_res" >&6; }
11250 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11251 eval result=\$gl_cv_type_${gltype}_suffix
11252 test "$result" = no && result=
11253 eval ${GLTYPE}_SUFFIX=\$result
11254 cat >>confdefs.h <<_ACEOF
11255#define ${GLTYPE}_SUFFIX $result
88b48903 11256_ACEOF
8690e634 11257
6ec2e0f5 11258 done
8690e634
JK
11259
11260
11261
5e8754f9 11262 if test $BITSIZEOF_WINT_T -lt 32; then
6ec2e0f5
SDJ
11263 BITSIZEOF_WINT_T=32
11264 fi
8690e634 11265
5e8754f9 11266 fi
7a6dbc2f 11267
5e8754f9
SDJ
11268 # The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH.
11269 LIMITS_H=limits.h
6ec2e0f5
SDJ
11270 if test -n "$LIMITS_H"; then
11271 GL_GENERATE_LIMITS_H_TRUE=
11272 GL_GENERATE_LIMITS_H_FALSE='#'
88b48903 11273else
6ec2e0f5
SDJ
11274 GL_GENERATE_LIMITS_H_TRUE='#'
11275 GL_GENERATE_LIMITS_H_FALSE=
88b48903 11276fi
8690e634
JK
11277
11278
11279
11280
11281
6ec2e0f5
SDJ
11282
11283 if test -n "$STDINT_H"; then
11284 GL_GENERATE_STDINT_H_TRUE=
11285 GL_GENERATE_STDINT_H_FALSE='#'
11286else
11287 GL_GENERATE_STDINT_H_TRUE='#'
11288 GL_GENERATE_STDINT_H_FALSE=
88b48903 11289fi
8690e634 11290
8690e634
JK
11291
11292
11293
6ec2e0f5 11294
472fa5ee
SM
11295
11296
11297
6ec2e0f5
SDJ
11298 GNULIB_IMAXABS=0;
11299 GNULIB_IMAXDIV=0;
11300 GNULIB_STRTOIMAX=0;
11301 GNULIB_STRTOUMAX=0;
11302 HAVE_DECL_IMAXABS=1;
11303 HAVE_DECL_IMAXDIV=1;
11304 HAVE_DECL_STRTOIMAX=1;
11305 HAVE_DECL_STRTOUMAX=1;
11306 REPLACE_STRTOIMAX=0;
11307 REPLACE_STRTOUMAX=0;
11308 INT32_MAX_LT_INTMAX_MAX=1;
11309 INT64_MAX_EQ_LONG_MAX='defined _LP64';
11310 PRI_MACROS_BROKEN=0;
11311 PRIPTR_PREFIX=__PRIPTR_PREFIX;
11312 UINT32_MAX_LT_UINTMAX_MAX=1;
11313 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
11314
11315
11316
11317
472fa5ee
SM
11318 :
11319
11320
11321
11322
11323
11324
11325
6ec2e0f5
SDJ
11326
11327
11328
11329
11330
11331
472fa5ee
SM
11332 :
11333
11334
11335
6ec2e0f5
SDJ
11336
11337
11338
11339
11340
11341 if test $gl_cv_have_include_next = yes; then
11342 gl_cv_next_inttypes_h='<'inttypes.h'>'
11343 else
11344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
11345$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
d0ac1c44 11346if ${gl_cv_next_inttypes_h+:} false; then :
6ec2e0f5 11347 $as_echo_n "(cached) " >&6
88b48903 11348else
8690e634 11349
6ec2e0f5 11350 if test $ac_cv_header_inttypes_h = yes; then
8690e634
JK
11351
11352
8690e634
JK
11353
11354
6ec2e0f5
SDJ
11355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11356/* end confdefs.h. */
11357#include <inttypes.h>
88b48903 11358_ACEOF
6ec2e0f5
SDJ
11359 case "$host_os" in
11360 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11361 *) gl_absname_cpp="$ac_cpp" ;;
11362 esac
8690e634 11363
6ec2e0f5
SDJ
11364 case "$host_os" in
11365 mingw*)
11366 gl_dirsep_regex='[/\\]'
11367 ;;
11368 *)
11369 gl_dirsep_regex='\/'
88b48903
WN
11370 ;;
11371 esac
6ec2e0f5
SDJ
11372 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11373 gl_header_literal_regex=`echo 'inttypes.h' \
11374 | sed -e "$gl_make_literal_regex_sed"`
11375 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11376 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11377 s|^/[^/]|//&|
11378 p
11379 q
11380 }'
8690e634 11381
6ec2e0f5
SDJ
11382 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11383 sed -n "$gl_absolute_header_sed"`
8690e634 11384
6ec2e0f5
SDJ
11385 gl_header=$gl_cv_absolute_inttypes_h
11386 gl_cv_next_inttypes_h='"'$gl_header'"'
11387 else
11388 gl_cv_next_inttypes_h='<'inttypes.h'>'
11389 fi
88b48903 11390
88b48903 11391
88b48903 11392fi
6ec2e0f5
SDJ
11393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
11394$as_echo "$gl_cv_next_inttypes_h" >&6; }
11395 fi
11396 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
88b48903 11397
6ec2e0f5
SDJ
11398 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11399 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11400 gl_next_as_first_directive='<'inttypes.h'>'
11401 else
11402 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11403 gl_next_as_first_directive=$gl_cv_next_inttypes_h
11404 fi
11405 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
88b48903 11406
6ec2e0f5
SDJ
11407
11408
11409
11410
11411
11412
11413
5e8754f9
SDJ
11414 for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
11415 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
11416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
11417$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
11418if eval \${$as_gl_Symbol+:} false; then :
11419 $as_echo_n "(cached) " >&6
11420else
11421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11422/* end confdefs.h. */
11423#include <inttypes.h>
11424
11425int
11426main ()
11427{
11428#undef $gl_func
11429 (void) $gl_func;
11430 ;
11431 return 0;
11432}
11433_ACEOF
11434if ac_fn_c_try_compile "$LINENO"; then :
11435 eval "$as_gl_Symbol=yes"
11436else
11437 eval "$as_gl_Symbol=no"
11438fi
11439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11440fi
11441eval ac_res=\$$as_gl_Symbol
11442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11443$as_echo "$ac_res" >&6; }
11444 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
11445 cat >>confdefs.h <<_ACEOF
11446#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
11447_ACEOF
6ec2e0f5 11448
5e8754f9
SDJ
11449 eval ac_cv_have_decl_$gl_func=yes
11450fi
11451 done
6ec2e0f5
SDJ
11452
11453
11454
11455 for ac_header in inttypes.h
11456do :
11457 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
d0ac1c44 11458if test "x$ac_cv_header_inttypes_h" = xyes; then :
6ec2e0f5
SDJ
11459 cat >>confdefs.h <<_ACEOF
11460#define HAVE_INTTYPES_H 1
11461_ACEOF
11462
11463fi
11464
11465done
11466
11467 if test $ac_cv_header_inttypes_h = yes; then
11468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
11469$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
d0ac1c44 11470if ${gt_cv_inttypes_pri_broken+:} false; then :
6ec2e0f5
SDJ
11471 $as_echo_n "(cached) " >&6
11472else
11473
11474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11475/* end confdefs.h. */
11476
11477#include <inttypes.h>
11478#ifdef PRId32
11479char *p = PRId32;
11480#endif
11481
11482int
11483main ()
11484{
11485
11486 ;
11487 return 0;
11488}
11489_ACEOF
11490if ac_fn_c_try_compile "$LINENO"; then :
11491 gt_cv_inttypes_pri_broken=no
11492else
11493 gt_cv_inttypes_pri_broken=yes
11494fi
11495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11496
11497fi
11498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
11499$as_echo "$gt_cv_inttypes_pri_broken" >&6; }
11500 fi
11501 if test "$gt_cv_inttypes_pri_broken" = yes; then
11502
11503cat >>confdefs.h <<_ACEOF
11504#define PRI_MACROS_BROKEN 1
11505_ACEOF
11506
11507 PRI_MACROS_BROKEN=1
11508 else
11509 PRI_MACROS_BROKEN=0
11510 fi
11511
11512
11513
11514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
11515$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
d0ac1c44 11516if ${gl_cv_cc_double_expbit0+:} false; then :
6ec2e0f5
SDJ
11517 $as_echo_n "(cached) " >&6
11518else
11519
11520 if test "$cross_compiling" = yes; then :
11521
11522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11523/* end confdefs.h. */
11524
11525#if defined arm || defined __arm || defined __arm__
11526 mixed_endianness
11527#endif
11528
11529_ACEOF
11530if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11531 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
11532 gl_cv_cc_double_expbit0="unknown"
11533else
11534
11535 :
d0ac1c44 11536if ${ac_cv_c_bigendian+:} false; then :
6ec2e0f5
SDJ
11537 $as_echo_n "(cached) " >&6
11538else
11539 ac_cv_c_bigendian=unknown
11540 # See if we're dealing with a universal compiler.
11541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11542/* end confdefs.h. */
11543#ifndef __APPLE_CC__
11544 not a universal capable compiler
11545 #endif
11546 typedef int dummy;
11547
11548_ACEOF
11549if ac_fn_c_try_compile "$LINENO"; then :
11550
11551 # Check for potential -arch flags. It is not universal unless
11552 # there are at least two -arch flags with different values.
11553 ac_arch=
11554 ac_prev=
11555 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11556 if test -n "$ac_prev"; then
11557 case $ac_word in
11558 i?86 | x86_64 | ppc | ppc64)
11559 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11560 ac_arch=$ac_word
11561 else
11562 ac_cv_c_bigendian=universal
11563 break
11564 fi
11565 ;;
11566 esac
11567 ac_prev=
11568 elif test "x$ac_word" = "x-arch"; then
11569 ac_prev=arch
11570 fi
11571 done
11572fi
11573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11574 if test $ac_cv_c_bigendian = unknown; then
11575 # See if sys/param.h defines the BYTE_ORDER macro.
11576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11577/* end confdefs.h. */
11578#include <sys/types.h>
11579 #include <sys/param.h>
11580
11581int
11582main ()
11583{
11584#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11585 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11586 && LITTLE_ENDIAN)
11587 bogus endian macros
11588 #endif
11589
11590 ;
11591 return 0;
11592}
11593_ACEOF
11594if ac_fn_c_try_compile "$LINENO"; then :
11595 # It does; now see whether it defined to BIG_ENDIAN or not.
11596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11597/* end confdefs.h. */
11598#include <sys/types.h>
11599 #include <sys/param.h>
11600
11601int
11602main ()
11603{
11604#if BYTE_ORDER != BIG_ENDIAN
11605 not big endian
11606 #endif
11607
11608 ;
11609 return 0;
11610}
11611_ACEOF
11612if ac_fn_c_try_compile "$LINENO"; then :
11613 ac_cv_c_bigendian=yes
11614else
11615 ac_cv_c_bigendian=no
11616fi
11617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11618fi
11619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11620 fi
11621 if test $ac_cv_c_bigendian = unknown; then
11622 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11624/* end confdefs.h. */
11625#include <limits.h>
11626
11627int
88b48903
WN
11628main ()
11629{
11630#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11631 bogus endian macros
11632 #endif
11633
11634 ;
11635 return 0;
11636}
11637_ACEOF
11638if ac_fn_c_try_compile "$LINENO"; then :
11639 # It does; now see whether it defined to _BIG_ENDIAN or not.
11640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11641/* end confdefs.h. */
11642#include <limits.h>
11643
11644int
11645main ()
11646{
11647#ifndef _BIG_ENDIAN
11648 not big endian
11649 #endif
11650
11651 ;
11652 return 0;
11653}
11654_ACEOF
11655if ac_fn_c_try_compile "$LINENO"; then :
11656 ac_cv_c_bigendian=yes
11657else
11658 ac_cv_c_bigendian=no
11659fi
11660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11661fi
11662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11663 fi
11664 if test $ac_cv_c_bigendian = unknown; then
11665 # Compile a test program.
11666 if test "$cross_compiling" = yes; then :
11667 # Try to guess by grepping values from an object file.
11668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11669/* end confdefs.h. */
11670short int ascii_mm[] =
11671 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11672 short int ascii_ii[] =
11673 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11674 int use_ascii (int i) {
11675 return ascii_mm[i] + ascii_ii[i];
11676 }
11677 short int ebcdic_ii[] =
11678 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11679 short int ebcdic_mm[] =
11680 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11681 int use_ebcdic (int i) {
11682 return ebcdic_mm[i] + ebcdic_ii[i];
11683 }
11684 extern int foo;
11685
11686int
11687main ()
11688{
11689return use_ascii (foo) == use_ebcdic (foo);
11690 ;
11691 return 0;
11692}
11693_ACEOF
11694if ac_fn_c_try_compile "$LINENO"; then :
11695 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11696 ac_cv_c_bigendian=yes
11697 fi
11698 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11699 if test "$ac_cv_c_bigendian" = unknown; then
11700 ac_cv_c_bigendian=no
11701 else
11702 # finding both strings is unlikely to happen, but who knows?
11703 ac_cv_c_bigendian=unknown
11704 fi
11705 fi
11706fi
11707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11708else
11709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11710/* end confdefs.h. */
11711$ac_includes_default
11712int
11713main ()
11714{
11715
11716 /* Are we little or big endian? From Harbison&Steele. */
11717 union
11718 {
11719 long int l;
11720 char c[sizeof (long int)];
11721 } u;
11722 u.l = 1;
11723 return u.c[sizeof (long int) - 1] == 1;
11724
11725 ;
11726 return 0;
11727}
11728_ACEOF
11729if ac_fn_c_try_run "$LINENO"; then :
11730 ac_cv_c_bigendian=no
11731else
11732 ac_cv_c_bigendian=yes
11733fi
11734rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11735 conftest.$ac_objext conftest.beam conftest.$ac_ext
11736fi
11737
11738 fi
11739fi
6ec2e0f5 11740:
88b48903
WN
11741 case $ac_cv_c_bigendian in #(
11742 yes)
6ec2e0f5 11743 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
88b48903 11744 no)
6ec2e0f5 11745 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
88b48903
WN
11746 universal)
11747
11748$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11749
11750 ;; #(
11751 *)
6ec2e0f5 11752 gl_cv_cc_double_expbit0="unknown" ;;
88b48903
WN
11753 esac
11754
11755
6ec2e0f5
SDJ
11756fi
11757rm -f conftest*
88b48903 11758
2196f55f 11759
2196f55f
YQ
11760else
11761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11762/* end confdefs.h. */
2196f55f 11763
6ec2e0f5
SDJ
11764#include <float.h>
11765#include <stddef.h>
11766#include <stdio.h>
11767#include <string.h>
11768#define NWORDS \
11769 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
11770typedef union { double value; unsigned int word[NWORDS]; } memory_double;
11771static unsigned int ored_words[NWORDS];
11772static unsigned int anded_words[NWORDS];
11773static void add_to_ored_words (double x)
2196f55f 11774{
6ec2e0f5
SDJ
11775 memory_double m;
11776 size_t i;
11777 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
11778 memset (&m, 0, sizeof (memory_double));
11779 m.value = x;
11780 for (i = 0; i < NWORDS; i++)
11781 {
11782 ored_words[i] |= m.word[i];
11783 anded_words[i] &= m.word[i];
11784 }
2196f55f 11785}
6ec2e0f5 11786int main ()
88b48903 11787{
6ec2e0f5
SDJ
11788 size_t j;
11789 FILE *fp = fopen ("conftest.out", "w");
11790 if (fp == NULL)
11791 return 1;
11792 for (j = 0; j < NWORDS; j++)
11793 anded_words[j] = ~ (unsigned int) 0;
11794 add_to_ored_words (0.25);
11795 add_to_ored_words (0.5);
11796 add_to_ored_words (1.0);
11797 add_to_ored_words (2.0);
11798 add_to_ored_words (4.0);
11799 /* Remove bits that are common (e.g. if representation of the first mantissa
11800 bit is explicit). */
11801 for (j = 0; j < NWORDS; j++)
11802 ored_words[j] &= ~anded_words[j];
11803 /* Now find the nonzero word. */
11804 for (j = 0; j < NWORDS; j++)
11805 if (ored_words[j] != 0)
11806 break;
11807 if (j < NWORDS)
11808 {
11809 size_t i;
11810 for (i = j + 1; i < NWORDS; i++)
11811 if (ored_words[i] != 0)
11812 {
11813 fprintf (fp, "unknown");
11814 return (fclose (fp) != 0);
11815 }
11816 for (i = 0; ; i++)
11817 if ((ored_words[j] >> i) & 1)
11818 {
11819 fprintf (fp, "word %d bit %d", (int) j, (int) i);
11820 return (fclose (fp) != 0);
11821 }
11822 }
11823 fprintf (fp, "unknown");
11824 return (fclose (fp) != 0);
88b48903 11825}
6ec2e0f5 11826
88b48903 11827_ACEOF
6ec2e0f5
SDJ
11828if ac_fn_c_try_run "$LINENO"; then :
11829 gl_cv_cc_double_expbit0=`cat conftest.out`
88b48903 11830else
6ec2e0f5 11831 gl_cv_cc_double_expbit0="unknown"
88b48903 11832fi
6ec2e0f5
SDJ
11833rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11834 conftest.$ac_objext conftest.beam conftest.$ac_ext
11835fi
11836
11837 rm -f conftest.out
88b48903
WN
11838
11839fi
6ec2e0f5
SDJ
11840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
11841$as_echo "$gl_cv_cc_double_expbit0" >&6; }
11842 case "$gl_cv_cc_double_expbit0" in
11843 word*bit*)
11844 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
11845 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
88b48903 11846
6ec2e0f5
SDJ
11847cat >>confdefs.h <<_ACEOF
11848#define DBL_EXPBIT0_WORD $word
11849_ACEOF
88b48903 11850
88b48903 11851
6ec2e0f5
SDJ
11852cat >>confdefs.h <<_ACEOF
11853#define DBL_EXPBIT0_BIT $bit
11854_ACEOF
88b48903 11855
6ec2e0f5
SDJ
11856 ;;
11857 esac
88b48903
WN
11858
11859
6ec2e0f5
SDJ
11860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11861$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
d0ac1c44 11862if ${ac_cv_c_bigendian+:} false; then :
6ec2e0f5
SDJ
11863 $as_echo_n "(cached) " >&6
11864else
11865 ac_cv_c_bigendian=unknown
11866 # See if we're dealing with a universal compiler.
11867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11868/* end confdefs.h. */
11869#ifndef __APPLE_CC__
11870 not a universal capable compiler
11871 #endif
11872 typedef int dummy;
88b48903 11873
6ec2e0f5
SDJ
11874_ACEOF
11875if ac_fn_c_try_compile "$LINENO"; then :
88b48903 11876
6ec2e0f5
SDJ
11877 # Check for potential -arch flags. It is not universal unless
11878 # there are at least two -arch flags with different values.
11879 ac_arch=
11880 ac_prev=
11881 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11882 if test -n "$ac_prev"; then
11883 case $ac_word in
11884 i?86 | x86_64 | ppc | ppc64)
11885 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11886 ac_arch=$ac_word
11887 else
11888 ac_cv_c_bigendian=universal
11889 break
11890 fi
11891 ;;
11892 esac
11893 ac_prev=
11894 elif test "x$ac_word" = "x-arch"; then
11895 ac_prev=arch
11896 fi
11897 done
11898fi
11899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11900 if test $ac_cv_c_bigendian = unknown; then
11901 # See if sys/param.h defines the BYTE_ORDER macro.
11902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11903/* end confdefs.h. */
11904#include <sys/types.h>
11905 #include <sys/param.h>
88b48903 11906
6ec2e0f5
SDJ
11907int
11908main ()
11909{
11910#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11911 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11912 && LITTLE_ENDIAN)
11913 bogus endian macros
11914 #endif
88b48903 11915
6ec2e0f5
SDJ
11916 ;
11917 return 0;
11918}
11919_ACEOF
11920if ac_fn_c_try_compile "$LINENO"; then :
11921 # It does; now see whether it defined to BIG_ENDIAN or not.
11922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
88b48903
WN
11923/* end confdefs.h. */
11924#include <sys/types.h>
6ec2e0f5 11925 #include <sys/param.h>
8690e634
JK
11926
11927int
11928main ()
11929{
6ec2e0f5
SDJ
11930#if BYTE_ORDER != BIG_ENDIAN
11931 not big endian
11932 #endif
8690e634 11933
8690e634
JK
11934 ;
11935 return 0;
11936}
11937_ACEOF
6ec2e0f5
SDJ
11938if ac_fn_c_try_compile "$LINENO"; then :
11939 ac_cv_c_bigendian=yes
8690e634 11940else
6ec2e0f5 11941 ac_cv_c_bigendian=no
8690e634 11942fi
6ec2e0f5 11943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 11944fi
6ec2e0f5
SDJ
11945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11946 fi
11947 if test $ac_cv_c_bigendian = unknown; then
11948 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11950/* end confdefs.h. */
11951#include <limits.h>
11952
11953int
11954main ()
11955{
11956#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11957 bogus endian macros
11958 #endif
11959
11960 ;
11961 return 0;
11962}
11963_ACEOF
11964if ac_fn_c_try_compile "$LINENO"; then :
11965 # It does; now see whether it defined to _BIG_ENDIAN or not.
11966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11967/* end confdefs.h. */
11968#include <limits.h>
8690e634 11969
6ec2e0f5
SDJ
11970int
11971main ()
11972{
11973#ifndef _BIG_ENDIAN
11974 not big endian
11975 #endif
11976
11977 ;
11978 return 0;
11979}
11980_ACEOF
11981if ac_fn_c_try_compile "$LINENO"; then :
11982 ac_cv_c_bigendian=yes
11983else
11984 ac_cv_c_bigendian=no
8690e634 11985fi
6ec2e0f5
SDJ
11986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11987fi
11988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11989 fi
11990 if test $ac_cv_c_bigendian = unknown; then
11991 # Compile a test program.
11992 if test "$cross_compiling" = yes; then :
11993 # Try to guess by grepping values from an object file.
11994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11995/* end confdefs.h. */
11996short int ascii_mm[] =
11997 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11998 short int ascii_ii[] =
11999 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12000 int use_ascii (int i) {
12001 return ascii_mm[i] + ascii_ii[i];
12002 }
12003 short int ebcdic_ii[] =
12004 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12005 short int ebcdic_mm[] =
12006 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12007 int use_ebcdic (int i) {
12008 return ebcdic_mm[i] + ebcdic_ii[i];
12009 }
12010 extern int foo;
8690e634 12011
6ec2e0f5
SDJ
12012int
12013main ()
12014{
12015return use_ascii (foo) == use_ebcdic (foo);
12016 ;
12017 return 0;
12018}
12019_ACEOF
12020if ac_fn_c_try_compile "$LINENO"; then :
12021 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12022 ac_cv_c_bigendian=yes
12023 fi
12024 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12025 if test "$ac_cv_c_bigendian" = unknown; then
12026 ac_cv_c_bigendian=no
12027 else
12028 # finding both strings is unlikely to happen, but who knows?
12029 ac_cv_c_bigendian=unknown
12030 fi
12031 fi
12032fi
12033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12034else
12035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12036/* end confdefs.h. */
12037$ac_includes_default
12038int
12039main ()
12040{
8690e634 12041
6ec2e0f5
SDJ
12042 /* Are we little or big endian? From Harbison&Steele. */
12043 union
12044 {
12045 long int l;
12046 char c[sizeof (long int)];
12047 } u;
12048 u.l = 1;
12049 return u.c[sizeof (long int) - 1] == 1;
12050
12051 ;
12052 return 0;
12053}
8690e634 12054_ACEOF
6ec2e0f5
SDJ
12055if ac_fn_c_try_run "$LINENO"; then :
12056 ac_cv_c_bigendian=no
12057else
12058 ac_cv_c_bigendian=yes
12059fi
12060rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12061 conftest.$ac_objext conftest.beam conftest.$ac_ext
12062fi
12063
12064 fi
12065fi
12066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12067$as_echo "$ac_cv_c_bigendian" >&6; }
12068 case $ac_cv_c_bigendian in #(
12069 yes)
12070 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12071;; #(
12072 no)
12073 ;; #(
12074 universal)
8690e634 12075
6ec2e0f5 12076$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
8690e634 12077
6ec2e0f5
SDJ
12078 ;; #(
12079 *)
d0ac1c44 12080 as_fn_error $? "unknown endianness
6ec2e0f5
SDJ
12081 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12082 esac
8690e634 12083
6ec2e0f5
SDJ
12084
12085
12086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12087$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 12088if ${am_cv_langinfo_codeset+:} false; then :
6ec2e0f5
SDJ
12089 $as_echo_n "(cached) " >&6
12090else
12091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12092/* end confdefs.h. */
12093#include <langinfo.h>
12094int
12095main ()
12096{
12097char* cs = nl_langinfo(CODESET); return !cs;
12098 ;
12099 return 0;
12100}
8690e634 12101_ACEOF
6ec2e0f5
SDJ
12102if ac_fn_c_try_link "$LINENO"; then :
12103 am_cv_langinfo_codeset=yes
12104else
12105 am_cv_langinfo_codeset=no
12106fi
12107rm -f core conftest.err conftest.$ac_objext \
12108 conftest$ac_exeext conftest.$ac_ext
12109
12110fi
12111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12112$as_echo "$am_cv_langinfo_codeset" >&6; }
12113 if test $am_cv_langinfo_codeset = yes; then
12114
12115$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8690e634 12116
6ec2e0f5 12117 fi
8690e634 12118
472fa5ee 12119
5e8754f9
SDJ
12120 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
12121if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
12122 ac_have_decl=1
12123else
12124 ac_have_decl=0
12125fi
12126
12127cat >>confdefs.h <<_ACEOF
12128#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
12129_ACEOF
12130
12131
12132
12133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
12134$as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
12135if ${ac_cv_gnu_library_2_1+:} false; then :
12136 $as_echo_n "(cached) " >&6
12137else
12138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12139/* end confdefs.h. */
12140
12141#include <features.h>
12142#ifdef __GNU_LIBRARY__
12143 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
12144 Lucky GNU user
12145 #endif
12146#endif
12147#ifdef __UCLIBC__
12148 Lucky user
12149#endif
12150
12151_ACEOF
12152if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12153 $EGREP "Lucky" >/dev/null 2>&1; then :
12154 ac_cv_gnu_library_2_1=yes
12155else
12156 ac_cv_gnu_library_2_1=no
12157fi
12158rm -f conftest*
12159
12160
12161
12162fi
12163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
12164$as_echo "$ac_cv_gnu_library_2_1" >&6; }
12165
12166 GLIBC21="$ac_cv_gnu_library_2_1"
12167
12168
12169
f45c62c4
YQ
12170
12171
472fa5ee
SM
12172
12173
12174
6ec2e0f5
SDJ
12175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
12176$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
d0ac1c44 12177if ${gl_cv_func_malloc_posix+:} false; then :
f45c62c4
YQ
12178 $as_echo_n "(cached) " >&6
12179else
f45c62c4 12180
6ec2e0f5 12181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f45c62c4 12182/* end confdefs.h. */
6ec2e0f5 12183
f45c62c4
YQ
12184int
12185main ()
12186{
5e8754f9 12187#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6ec2e0f5
SDJ
12188 choke me
12189 #endif
f45c62c4
YQ
12190
12191 ;
12192 return 0;
12193}
12194_ACEOF
6ec2e0f5
SDJ
12195if ac_fn_c_try_compile "$LINENO"; then :
12196 gl_cv_func_malloc_posix=yes
f45c62c4 12197else
6ec2e0f5 12198 gl_cv_func_malloc_posix=no
f45c62c4 12199fi
6ec2e0f5 12200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6a29c58e
YQ
12201
12202fi
12203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
12204$as_echo "$gl_cv_func_malloc_posix" >&6; }
12205
12206
12207
12208 for ac_header in stdlib.h
98399780
YQ
12209do :
12210 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
d0ac1c44 12211if test "x$ac_cv_header_stdlib_h" = xyes; then :
98399780
YQ
12212 cat >>confdefs.h <<_ACEOF
12213#define HAVE_STDLIB_H 1
12214_ACEOF
12215
12216fi
12217
12218done
12219
6a29c58e 12220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
98399780 12221$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
d0ac1c44 12222if ${ac_cv_func_malloc_0_nonnull+:} false; then :
98399780
YQ
12223 $as_echo_n "(cached) " >&6
12224else
12225 if test "$cross_compiling" = yes; then :
6a29c58e
YQ
12226 case "$host_os" in
12227 # Guess yes on platforms where we know the result.
5e8754f9 12228 *-gnu* | freebsd* | netbsd* | openbsd* \
6a29c58e
YQ
12229 | hpux* | solaris* | cygwin* | mingw*)
12230 ac_cv_func_malloc_0_nonnull=yes ;;
12231 # If we don't know, assume the worst.
12232 *) ac_cv_func_malloc_0_nonnull=no ;;
12233 esac
12234
98399780
YQ
12235else
12236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12237/* end confdefs.h. */
12238#if defined STDC_HEADERS || defined HAVE_STDLIB_H
6a29c58e
YQ
12239 # include <stdlib.h>
12240 #else
12241 char *malloc ();
12242 #endif
98399780
YQ
12243
12244int
12245main ()
12246{
49e4877c
PA
12247char *p = malloc (0);
12248 int result = !p;
12249 free (p);
12250 return result;
98399780
YQ
12251 ;
12252 return 0;
12253}
6a29c58e 12254
98399780
YQ
12255_ACEOF
12256if ac_fn_c_try_run "$LINENO"; then :
12257 ac_cv_func_malloc_0_nonnull=yes
12258else
12259 ac_cv_func_malloc_0_nonnull=no
12260fi
12261rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12262 conftest.$ac_objext conftest.beam conftest.$ac_ext
12263fi
12264
6a29c58e 12265
98399780
YQ
12266fi
12267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
12268$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
6a29c58e 12269 if test $ac_cv_func_malloc_0_nonnull = yes; then :
98399780
YQ
12270 gl_cv_func_malloc_0_nonnull=1
12271else
12272 gl_cv_func_malloc_0_nonnull=0
12273fi
12274
12275
12276cat >>confdefs.h <<_ACEOF
12277#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
12278_ACEOF
12279
12280
12281
88b48903
WN
12282
12283
472fa5ee
SM
12284
12285
12286
8690e634
JK
12287 GNULIB_BTOWC=0;
12288 GNULIB_WCTOB=0;
12289 GNULIB_MBSINIT=0;
12290 GNULIB_MBRTOWC=0;
12291 GNULIB_MBRLEN=0;
12292 GNULIB_MBSRTOWCS=0;
12293 GNULIB_MBSNRTOWCS=0;
12294 GNULIB_WCRTOMB=0;
12295 GNULIB_WCSRTOMBS=0;
12296 GNULIB_WCSNRTOMBS=0;
12297 GNULIB_WCWIDTH=0;
12298 GNULIB_WMEMCHR=0;
12299 GNULIB_WMEMCMP=0;
12300 GNULIB_WMEMCPY=0;
12301 GNULIB_WMEMMOVE=0;
12302 GNULIB_WMEMSET=0;
12303 GNULIB_WCSLEN=0;
12304 GNULIB_WCSNLEN=0;
12305 GNULIB_WCSCPY=0;
12306 GNULIB_WCPCPY=0;
12307 GNULIB_WCSNCPY=0;
12308 GNULIB_WCPNCPY=0;
12309 GNULIB_WCSCAT=0;
12310 GNULIB_WCSNCAT=0;
12311 GNULIB_WCSCMP=0;
12312 GNULIB_WCSNCMP=0;
12313 GNULIB_WCSCASECMP=0;
12314 GNULIB_WCSNCASECMP=0;
12315 GNULIB_WCSCOLL=0;
12316 GNULIB_WCSXFRM=0;
12317 GNULIB_WCSDUP=0;
12318 GNULIB_WCSCHR=0;
12319 GNULIB_WCSRCHR=0;
12320 GNULIB_WCSCSPN=0;
12321 GNULIB_WCSSPN=0;
12322 GNULIB_WCSPBRK=0;
12323 GNULIB_WCSSTR=0;
12324 GNULIB_WCSTOK=0;
12325 GNULIB_WCSWIDTH=0;
12326 HAVE_BTOWC=1;
12327 HAVE_MBSINIT=1;
12328 HAVE_MBRTOWC=1;
12329 HAVE_MBRLEN=1;
12330 HAVE_MBSRTOWCS=1;
12331 HAVE_MBSNRTOWCS=1;
12332 HAVE_WCRTOMB=1;
12333 HAVE_WCSRTOMBS=1;
12334 HAVE_WCSNRTOMBS=1;
12335 HAVE_WMEMCHR=1;
12336 HAVE_WMEMCMP=1;
12337 HAVE_WMEMCPY=1;
12338 HAVE_WMEMMOVE=1;
12339 HAVE_WMEMSET=1;
12340 HAVE_WCSLEN=1;
12341 HAVE_WCSNLEN=1;
12342 HAVE_WCSCPY=1;
12343 HAVE_WCPCPY=1;
12344 HAVE_WCSNCPY=1;
12345 HAVE_WCPNCPY=1;
12346 HAVE_WCSCAT=1;
12347 HAVE_WCSNCAT=1;
12348 HAVE_WCSCMP=1;
12349 HAVE_WCSNCMP=1;
12350 HAVE_WCSCASECMP=1;
12351 HAVE_WCSNCASECMP=1;
12352 HAVE_WCSCOLL=1;
12353 HAVE_WCSXFRM=1;
12354 HAVE_WCSDUP=1;
12355 HAVE_WCSCHR=1;
12356 HAVE_WCSRCHR=1;
12357 HAVE_WCSCSPN=1;
12358 HAVE_WCSSPN=1;
12359 HAVE_WCSPBRK=1;
12360 HAVE_WCSSTR=1;
12361 HAVE_WCSTOK=1;
12362 HAVE_WCSWIDTH=1;
12363 HAVE_DECL_WCTOB=1;
12364 HAVE_DECL_WCWIDTH=1;
12365 REPLACE_MBSTATE_T=0;
12366 REPLACE_BTOWC=0;
12367 REPLACE_WCTOB=0;
12368 REPLACE_MBSINIT=0;
12369 REPLACE_MBRTOWC=0;
12370 REPLACE_MBRLEN=0;
12371 REPLACE_MBSRTOWCS=0;
12372 REPLACE_MBSNRTOWCS=0;
12373 REPLACE_WCRTOMB=0;
12374 REPLACE_WCSRTOMBS=0;
12375 REPLACE_WCSNRTOMBS=0;
12376 REPLACE_WCWIDTH=0;
12377 REPLACE_WCSWIDTH=0;
12378
12379
12380
12381
12382
12383
12384
12385
472fa5ee
SM
12386
12387
12388
12389
12390
12391
8690e634
JK
12392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
12393$as_echo_n "checking for a traditional japanese locale... " >&6; }
d0ac1c44 12394if ${gt_cv_locale_ja+:} false; then :
8690e634
JK
12395 $as_echo_n "(cached) " >&6
12396else
12397
12398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12399/* end confdefs.h. */
12400
12401#include <locale.h>
12402#include <time.h>
12403#if HAVE_LANGINFO_CODESET
12404# include <langinfo.h>
12405#endif
12406#include <stdlib.h>
12407#include <string.h>
12408struct tm t;
12409char buf[16];
12410int main ()
12411{
5e8754f9 12412 const char *p;
8690e634 12413 /* Check whether the given locale name is recognized by the system. */
5e8754f9 12414#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8690e634
JK
12415 /* On native Windows, setlocale(category, "") looks at the system settings,
12416 not at the environment variables. Also, when an encoding suffix such
12417 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
12418 category of the locale to "C". */
12419 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
12420 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
12421 return 1;
5e8754f9 12422#else
8690e634 12423 if (setlocale (LC_ALL, "") == NULL) return 1;
5e8754f9 12424#endif
8690e634
JK
12425 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
12426 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
12427 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
12428 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
12429 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
12430 some unit tests fail.
12431 On MirBSD 10, when an unsupported locale is specified, setlocale()
12432 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
5e8754f9 12433#if HAVE_LANGINFO_CODESET
8690e634
JK
12434 {
12435 const char *cs = nl_langinfo (CODESET);
12436 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
12437 || strcmp (cs, "UTF-8") == 0)
12438 return 1;
12439 }
5e8754f9
SDJ
12440#endif
12441#ifdef __CYGWIN__
8690e634
JK
12442 /* On Cygwin, avoid locale names without encoding suffix, because the
12443 locale_charset() function relies on the encoding suffix. Note that
12444 LC_ALL is set on the command line. */
12445 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
5e8754f9 12446#endif
8690e634
JK
12447 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
12448 on Cygwin 1.5.x. */
12449 if (MB_CUR_MAX == 1)
12450 return 1;
12451 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
12452 This excludes the UTF-8 encoding (except on MirBSD). */
5e8754f9
SDJ
12453 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
12454 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
12455 for (p = buf; *p != '\0'; p++)
12456 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
12457 return 1;
8690e634
JK
12458 return 0;
12459}
12460
12461_ACEOF
12462 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12463 (eval $ac_link) 2>&5
12464 ac_status=$?
12465 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12466 test $ac_status = 0; } && test -s conftest$ac_exeext; then
12467 case "$host_os" in
12468 # Handle native Windows specially, because there setlocale() interprets
12469 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
12470 # "fr" or "fra" as "French" or "French_France.1252",
12471 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
12472 # "ja" as "Japanese" or "Japanese_Japan.932",
12473 # and similar.
12474 mingw*)
12475 # Note that on native Windows, the Japanese locale is
12476 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
12477 # cannot use it here.
12478 gt_cv_locale_ja=none
12479 ;;
12480 *)
12481 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
12482 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
12483 # configure script would override the LC_ALL setting. Likewise for
12484 # LC_CTYPE, which is also set at the beginning of the configure script.
12485 # Test for the AIX locale name.
12486 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12487 gt_cv_locale_ja=ja_JP
12488 else
12489 # Test for the locale name with explicit encoding suffix.
12490 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12491 gt_cv_locale_ja=ja_JP.EUC-JP
12492 else
12493 # Test for the HP-UX, OSF/1, NetBSD locale name.
12494 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12495 gt_cv_locale_ja=ja_JP.eucJP
12496 else
12497 # Test for the IRIX, FreeBSD locale name.
12498 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12499 gt_cv_locale_ja=ja_JP.EUC
12500 else
12501 # Test for the Solaris 7 locale name.
12502 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12503 gt_cv_locale_ja=ja
12504 else
12505 # Special test for NetBSD 1.6.
12506 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
12507 gt_cv_locale_ja=ja_JP.eucJP
12508 else
12509 # None found.
12510 gt_cv_locale_ja=none
12511 fi
12512 fi
12513 fi
12514 fi
12515 fi
12516 fi
12517 ;;
12518 esac
12519 fi
12520 rm -fr conftest*
12521
12522fi
12523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
12524$as_echo "$gt_cv_locale_ja" >&6; }
12525 LOCALE_JA=$gt_cv_locale_ja
12526
12527
12528
12529
12530
12531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
12532$as_echo_n "checking for a transitional chinese locale... " >&6; }
d0ac1c44 12533if ${gt_cv_locale_zh_CN+:} false; then :
8690e634
JK
12534 $as_echo_n "(cached) " >&6
12535else
12536
12537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12538/* end confdefs.h. */
12539
12540#include <locale.h>
12541#include <stdlib.h>
12542#include <time.h>
12543#if HAVE_LANGINFO_CODESET
12544# include <langinfo.h>
12545#endif
12546#include <stdlib.h>
12547#include <string.h>
12548struct tm t;
12549char buf[16];
12550int main ()
12551{
5e8754f9 12552 const char *p;
8690e634 12553 /* Check whether the given locale name is recognized by the system. */
5e8754f9 12554#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8690e634
JK
12555 /* On native Windows, setlocale(category, "") looks at the system settings,
12556 not at the environment variables. Also, when an encoding suffix such
12557 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
12558 category of the locale to "C". */
12559 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
12560 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
12561 return 1;
5e8754f9 12562#else
8690e634 12563 if (setlocale (LC_ALL, "") == NULL) return 1;
5e8754f9 12564#endif
8690e634
JK
12565 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
12566 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
12567 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
12568 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
12569 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
12570 some unit tests fail.
12571 On MirBSD 10, when an unsupported locale is specified, setlocale()
12572 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
5e8754f9 12573#if HAVE_LANGINFO_CODESET
8690e634
JK
12574 {
12575 const char *cs = nl_langinfo (CODESET);
12576 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
12577 || strcmp (cs, "UTF-8") == 0)
12578 return 1;
12579 }
5e8754f9
SDJ
12580#endif
12581#ifdef __CYGWIN__
8690e634
JK
12582 /* On Cygwin, avoid locale names without encoding suffix, because the
12583 locale_charset() function relies on the encoding suffix. Note that
12584 LC_ALL is set on the command line. */
12585 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
5e8754f9 12586#endif
8690e634
JK
12587 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
12588 This excludes the UTF-8 encoding (except on MirBSD). */
5e8754f9
SDJ
12589 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
12590 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
12591 for (p = buf; *p != '\0'; p++)
12592 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
12593 return 1;
8690e634
JK
12594 /* Check whether a typical GB18030 multibyte sequence is recognized as a
12595 single wide character. This excludes the GB2312 and GBK encodings. */
12596 if (mblen ("\203\062\332\066", 5) != 4)
12597 return 1;
12598 return 0;
12599}
12600
12601_ACEOF
12602 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12603 (eval $ac_link) 2>&5
12604 ac_status=$?
12605 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12606 test $ac_status = 0; } && test -s conftest$ac_exeext; then
12607 case "$host_os" in
12608 # Handle native Windows specially, because there setlocale() interprets
12609 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
12610 # "fr" or "fra" as "French" or "French_France.1252",
12611 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
12612 # "ja" as "Japanese" or "Japanese_Japan.932",
12613 # and similar.
12614 mingw*)
12615 # Test for the hypothetical native Windows locale name.
12616 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12617 gt_cv_locale_zh_CN=Chinese_China.54936
12618 else
12619 # None found.
12620 gt_cv_locale_zh_CN=none
12621 fi
12622 ;;
12623 solaris2.8)
12624 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
12625 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
12626 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
12627 gt_cv_locale_zh_CN=none
12628 ;;
12629 *)
12630 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
12631 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
12632 # configure script would override the LC_ALL setting. Likewise for
12633 # LC_CTYPE, which is also set at the beginning of the configure script.
12634 # Test for the locale name without encoding suffix.
12635 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12636 gt_cv_locale_zh_CN=zh_CN
12637 else
12638 # Test for the locale name with explicit encoding suffix.
12639 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12640 gt_cv_locale_zh_CN=zh_CN.GB18030
12641 else
12642 # None found.
12643 gt_cv_locale_zh_CN=none
12644 fi
12645 fi
12646 ;;
12647 esac
12648 else
12649 # If there was a link error, due to mblen(), the system is so old that
12650 # it certainly doesn't have a chinese locale.
12651 gt_cv_locale_zh_CN=none
12652 fi
12653 rm -fr conftest*
12654
12655fi
12656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
12657$as_echo "$gt_cv_locale_zh_CN" >&6; }
12658 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
12659
12660
12661
12662
12663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
12664$as_echo_n "checking for a french Unicode locale... " >&6; }
d0ac1c44 12665if ${gt_cv_locale_fr_utf8+:} false; then :
8690e634
JK
12666 $as_echo_n "(cached) " >&6
12667else
12668
12669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12670/* end confdefs.h. */
12671
12672#include <locale.h>
12673#include <time.h>
12674#if HAVE_LANGINFO_CODESET
12675# include <langinfo.h>
12676#endif
12677#include <stdlib.h>
12678#include <string.h>
12679struct tm t;
12680char buf[16];
12681int main () {
12682 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
12683 imitates locale dependent behaviour by looking at the environment
12684 variables, and all locales use the UTF-8 encoding. */
12685#if !(defined __BEOS__ || defined __HAIKU__)
12686 /* Check whether the given locale name is recognized by the system. */
5e8754f9 12687# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8690e634
JK
12688 /* On native Windows, setlocale(category, "") looks at the system settings,
12689 not at the environment variables. Also, when an encoding suffix such
12690 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
12691 category of the locale to "C". */
12692 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
12693 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
12694 return 1;
12695# else
12696 if (setlocale (LC_ALL, "") == NULL) return 1;
12697# endif
12698 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
12699 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
12700 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
12701 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
12702 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
12703 some unit tests fail. */
12704# if HAVE_LANGINFO_CODESET
12705 {
12706 const char *cs = nl_langinfo (CODESET);
12707 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
12708 return 1;
12709 }
12710# endif
12711# ifdef __CYGWIN__
12712 /* On Cygwin, avoid locale names without encoding suffix, because the
12713 locale_charset() function relies on the encoding suffix. Note that
12714 LC_ALL is set on the command line. */
12715 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
12716# endif
12717 /* Check whether in the abbreviation of the second month, the second
12718 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
12719 two bytes long, with UTF-8 encoding. */
12720 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
12721 if (strftime (buf, sizeof (buf), "%b", &t) < 4
12722 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
12723 return 1;
12724#endif
12725#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
12726 /* Check whether the decimal separator is a comma.
12727 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
12728 are nl_langinfo(RADIXCHAR) are both ".". */
12729 if (localeconv () ->decimal_point[0] != ',') return 1;
12730#endif
12731 return 0;
12732}
12733
12734_ACEOF
12735 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12736 (eval $ac_link) 2>&5
12737 ac_status=$?
12738 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12739 test $ac_status = 0; } && test -s conftest$ac_exeext; then
12740 case "$host_os" in
12741 # Handle native Windows specially, because there setlocale() interprets
12742 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
12743 # "fr" or "fra" as "French" or "French_France.1252",
12744 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
12745 # "ja" as "Japanese" or "Japanese_Japan.932",
12746 # and similar.
12747 mingw*)
12748 # Test for the hypothetical native Windows locale name.
12749 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12750 gt_cv_locale_fr_utf8=French_France.65001
12751 else
12752 # None found.
12753 gt_cv_locale_fr_utf8=none
12754 fi
12755 ;;
12756 *)
12757 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
12758 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
12759 # configure script would override the LC_ALL setting. Likewise for
12760 # LC_CTYPE, which is also set at the beginning of the configure script.
12761 # Test for the usual locale name.
12762 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12763 gt_cv_locale_fr_utf8=fr_FR
12764 else
12765 # Test for the locale name with explicit encoding suffix.
12766 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12767 gt_cv_locale_fr_utf8=fr_FR.UTF-8
12768 else
12769 # Test for the Solaris 7 locale name.
12770 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12771 gt_cv_locale_fr_utf8=fr.UTF-8
12772 else
12773 # None found.
12774 gt_cv_locale_fr_utf8=none
12775 fi
12776 fi
12777 fi
12778 ;;
12779 esac
12780 fi
12781 rm -fr conftest*
12782
12783fi
12784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
12785$as_echo "$gt_cv_locale_fr_utf8" >&6; }
12786 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
12787
12788
12789
12790
12791
12792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
12793$as_echo_n "checking for a traditional french locale... " >&6; }
d0ac1c44 12794if ${gt_cv_locale_fr+:} false; then :
8690e634
JK
12795 $as_echo_n "(cached) " >&6
12796else
12797
12798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12799/* end confdefs.h. */
12800
12801#include <locale.h>
12802#include <time.h>
12803#if HAVE_LANGINFO_CODESET
12804# include <langinfo.h>
12805#endif
12806#include <stdlib.h>
12807#include <string.h>
12808struct tm t;
12809char buf[16];
12810int main () {
12811 /* Check whether the given locale name is recognized by the system. */
5e8754f9 12812#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8690e634
JK
12813 /* On native Windows, setlocale(category, "") looks at the system settings,
12814 not at the environment variables. Also, when an encoding suffix such
12815 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
12816 category of the locale to "C". */
12817 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
12818 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
12819 return 1;
5e8754f9 12820#else
8690e634 12821 if (setlocale (LC_ALL, "") == NULL) return 1;
5e8754f9 12822#endif
8690e634
JK
12823 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
12824 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
12825 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
12826 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
12827 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
12828 some unit tests fail.
12829 On MirBSD 10, when an unsupported locale is specified, setlocale()
12830 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
5e8754f9 12831#if HAVE_LANGINFO_CODESET
8690e634
JK
12832 {
12833 const char *cs = nl_langinfo (CODESET);
12834 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
12835 || strcmp (cs, "UTF-8") == 0)
12836 return 1;
12837 }
5e8754f9
SDJ
12838#endif
12839#ifdef __CYGWIN__
8690e634
JK
12840 /* On Cygwin, avoid locale names without encoding suffix, because the
12841 locale_charset() function relies on the encoding suffix. Note that
12842 LC_ALL is set on the command line. */
12843 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
5e8754f9 12844#endif
8690e634
JK
12845 /* Check whether in the abbreviation of the second month, the second
12846 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
12847 one byte long. This excludes the UTF-8 encoding. */
12848 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
12849 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
5e8754f9 12850#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
8690e634
JK
12851 /* Check whether the decimal separator is a comma.
12852 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
12853 are nl_langinfo(RADIXCHAR) are both ".". */
12854 if (localeconv () ->decimal_point[0] != ',') return 1;
7a6dbc2f 12855#endif
5e8754f9 12856 return 0;
8690e634
JK
12857}
12858
12859_ACEOF
12860 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12861 (eval $ac_link) 2>&5
12862 ac_status=$?
12863 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12864 test $ac_status = 0; } && test -s conftest$ac_exeext; then
12865 case "$host_os" in
12866 # Handle native Windows specially, because there setlocale() interprets
12867 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
12868 # "fr" or "fra" as "French" or "French_France.1252",
12869 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
12870 # "ja" as "Japanese" or "Japanese_Japan.932",
12871 # and similar.
12872 mingw*)
12873 # Test for the native Windows locale name.
12874 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12875 gt_cv_locale_fr=French_France.1252
12876 else
12877 # None found.
12878 gt_cv_locale_fr=none
12879 fi
12880 ;;
12881 *)
12882 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
12883 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
12884 # configure script would override the LC_ALL setting. Likewise for
12885 # LC_CTYPE, which is also set at the beginning of the configure script.
12886 # Test for the usual locale name.
12887 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12888 gt_cv_locale_fr=fr_FR
12889 else
12890 # Test for the locale name with explicit encoding suffix.
12891 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12892 gt_cv_locale_fr=fr_FR.ISO-8859-1
12893 else
12894 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
12895 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12896 gt_cv_locale_fr=fr_FR.ISO8859-1
12897 else
12898 # Test for the HP-UX locale name.
12899 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12900 gt_cv_locale_fr=fr_FR.iso88591
12901 else
12902 # Test for the Solaris 7 locale name.
12903 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12904 gt_cv_locale_fr=fr
12905 else
12906 # None found.
12907 gt_cv_locale_fr=none
12908 fi
12909 fi
12910 fi
12911 fi
12912 fi
12913 ;;
12914 esac
12915 fi
12916 rm -fr conftest*
12917
12918fi
6ec2e0f5
SDJ
12919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
12920$as_echo "$gt_cv_locale_fr" >&6; }
12921 LOCALE_FR=$gt_cv_locale_fr
12922
12923
12924
12925
12926
12927
12928
472fa5ee
SM
12929
12930
12931
12932
12933
12934
12935 GNULIB_FFSL=0;
12936 GNULIB_FFSLL=0;
6ec2e0f5
SDJ
12937 GNULIB_MEMCHR=0;
12938 GNULIB_MEMMEM=0;
12939 GNULIB_MEMPCPY=0;
12940 GNULIB_MEMRCHR=0;
12941 GNULIB_RAWMEMCHR=0;
12942 GNULIB_STPCPY=0;
12943 GNULIB_STPNCPY=0;
12944 GNULIB_STRCHRNUL=0;
12945 GNULIB_STRDUP=0;
12946 GNULIB_STRNCAT=0;
12947 GNULIB_STRNDUP=0;
12948 GNULIB_STRNLEN=0;
12949 GNULIB_STRPBRK=0;
12950 GNULIB_STRSEP=0;
12951 GNULIB_STRSTR=0;
12952 GNULIB_STRCASESTR=0;
12953 GNULIB_STRTOK_R=0;
12954 GNULIB_MBSLEN=0;
12955 GNULIB_MBSNLEN=0;
12956 GNULIB_MBSCHR=0;
12957 GNULIB_MBSRCHR=0;
12958 GNULIB_MBSSTR=0;
12959 GNULIB_MBSCASECMP=0;
12960 GNULIB_MBSNCASECMP=0;
12961 GNULIB_MBSPCASECMP=0;
12962 GNULIB_MBSCASESTR=0;
12963 GNULIB_MBSCSPN=0;
12964 GNULIB_MBSPBRK=0;
12965 GNULIB_MBSSPN=0;
12966 GNULIB_MBSSEP=0;
12967 GNULIB_MBSTOK_R=0;
12968 GNULIB_STRERROR=0;
12969 GNULIB_STRERROR_R=0;
12970 GNULIB_STRSIGNAL=0;
12971 GNULIB_STRVERSCMP=0;
12972 HAVE_MBSLEN=0;
5e8754f9 12973 HAVE_FFSL=1;
6ec2e0f5
SDJ
12974 HAVE_FFSLL=1;
12975 HAVE_MEMCHR=1;
12976 HAVE_DECL_MEMMEM=1;
12977 HAVE_MEMPCPY=1;
12978 HAVE_DECL_MEMRCHR=1;
12979 HAVE_RAWMEMCHR=1;
12980 HAVE_STPCPY=1;
12981 HAVE_STPNCPY=1;
12982 HAVE_STRCHRNUL=1;
12983 HAVE_DECL_STRDUP=1;
12984 HAVE_DECL_STRNDUP=1;
12985 HAVE_DECL_STRNLEN=1;
12986 HAVE_STRPBRK=1;
12987 HAVE_STRSEP=1;
12988 HAVE_STRCASESTR=1;
12989 HAVE_DECL_STRTOK_R=1;
12990 HAVE_DECL_STRERROR_R=1;
12991 HAVE_DECL_STRSIGNAL=1;
12992 HAVE_STRVERSCMP=1;
12993 REPLACE_MEMCHR=0;
12994 REPLACE_MEMMEM=0;
12995 REPLACE_STPNCPY=0;
12996 REPLACE_STRDUP=0;
12997 REPLACE_STRSTR=0;
12998 REPLACE_STRCASESTR=0;
5e8754f9 12999 REPLACE_STRCHRNUL=0;
6ec2e0f5
SDJ
13000 REPLACE_STRERROR=0;
13001 REPLACE_STRERROR_R=0;
5e8754f9
SDJ
13002 REPLACE_STRNCAT=0;
13003 REPLACE_STRNDUP=0;
13004 REPLACE_STRNLEN=0;
6ec2e0f5 13005 REPLACE_STRSIGNAL=0;
5e8754f9 13006 REPLACE_STRTOK_R=0;
6ec2e0f5
SDJ
13007 UNDEFINE_STRTOK_R=0;
13008
13009
13010
13011
13012
13013 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
13014 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
13015 # irrelevant for anonymous mappings.
13016 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
d0ac1c44 13017if test "x$ac_cv_func_mmap" = xyes; then :
6ec2e0f5
SDJ
13018 gl_have_mmap=yes
13019else
13020 gl_have_mmap=no
13021fi
13022
13023
13024 # Try to allow MAP_ANONYMOUS.
13025 gl_have_mmap_anonymous=no
13026 if test $gl_have_mmap = yes; then
13027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
13028$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
13029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13030/* end confdefs.h. */
13031
13032#include <sys/mman.h>
13033#ifdef MAP_ANONYMOUS
13034 I cannot identify this map
13035#endif
13036
13037_ACEOF
13038if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13039 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
13040 gl_have_mmap_anonymous=yes
13041fi
13042rm -f conftest*
13043
13044 if test $gl_have_mmap_anonymous != yes; then
13045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13046/* end confdefs.h. */
13047
13048#include <sys/mman.h>
13049#ifdef MAP_ANON
13050 I cannot identify this map
13051#endif
13052
13053_ACEOF
13054if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13055 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
13056
13057$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
13058
13059 gl_have_mmap_anonymous=yes
13060fi
13061rm -f conftest*
13062
13063 fi
13064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
13065$as_echo "$gl_have_mmap_anonymous" >&6; }
13066 if test $gl_have_mmap_anonymous = yes; then
13067
13068$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
13069
13070 fi
13071 fi
13072
13073
472fa5ee
SM
13074 :
13075
13076
13077
13078
13079
13080
13081 :
13082
13083
13084
13085
6ec2e0f5
SDJ
13086
13087
13088
13089
13090 if test $HAVE_MEMCHR = 1; then
13091 # Detect platform-specific bugs in some versions of glibc:
13092 # memchr should not dereference anything with length 0
5e8754f9 13093 # http://bugzilla.redhat.com/499689
6ec2e0f5 13094 # memchr should not dereference overestimated length after a match
5e8754f9
SDJ
13095 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
13096 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
6ec2e0f5
SDJ
13097 # Assume that memchr works on platforms that lack mprotect.
13098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
13099$as_echo_n "checking whether memchr works... " >&6; }
d0ac1c44 13100if ${gl_cv_func_memchr_works+:} false; then :
6ec2e0f5
SDJ
13101 $as_echo_n "(cached) " >&6
13102else
13103 if test "$cross_compiling" = yes; then :
5e8754f9 13104 gl_cv_func_memchr_works="guessing no"
6ec2e0f5
SDJ
13105else
13106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13107/* end confdefs.h. */
13108
13109#include <string.h>
13110#if HAVE_SYS_MMAN_H
13111# include <fcntl.h>
13112# include <unistd.h>
13113# include <sys/types.h>
13114# include <sys/mman.h>
13115# ifndef MAP_FILE
13116# define MAP_FILE 0
13117# endif
13118#endif
13119
13120int
13121main ()
13122{
13123
13124 int result = 0;
13125 char *fence = NULL;
13126#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
13127# if HAVE_MAP_ANONYMOUS
13128 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
13129 const int fd = -1;
13130# else /* !HAVE_MAP_ANONYMOUS */
13131 const int flags = MAP_FILE | MAP_PRIVATE;
13132 int fd = open ("/dev/zero", O_RDONLY, 0666);
13133 if (fd >= 0)
13134# endif
13135 {
13136 int pagesize = getpagesize ();
13137 char *two_pages =
13138 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
13139 flags, fd, 0);
13140 if (two_pages != (char *)(-1)
13141 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
13142 fence = two_pages + pagesize;
13143 }
13144#endif
13145 if (fence)
13146 {
13147 if (memchr (fence, 0, 0))
13148 result |= 1;
13149 strcpy (fence - 9, "12345678");
13150 if (memchr (fence - 9, 0, 79) != fence - 1)
13151 result |= 2;
13152 if (memchr (fence - 1, 0, 3) != fence - 1)
13153 result |= 4;
13154 }
13155 return result;
13156
13157 ;
13158 return 0;
13159}
13160_ACEOF
13161if ac_fn_c_try_run "$LINENO"; then :
13162 gl_cv_func_memchr_works=yes
13163else
13164 gl_cv_func_memchr_works=no
13165fi
13166rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13167 conftest.$ac_objext conftest.beam conftest.$ac_ext
13168fi
13169
13170fi
13171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
13172$as_echo "$gl_cv_func_memchr_works" >&6; }
5e8754f9
SDJ
13173 if test "$gl_cv_func_memchr_works" != yes; then
13174 REPLACE_MEMCHR=1
13175 fi
6ec2e0f5
SDJ
13176 fi
13177
472fa5ee
SM
13178
13179 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
d0ac1c44 13180if test "x$ac_cv_have_decl_memmem" = xyes; then :
6ec2e0f5
SDJ
13181 ac_have_decl=1
13182else
13183 ac_have_decl=0
13184fi
13185
13186cat >>confdefs.h <<_ACEOF
13187#define HAVE_DECL_MEMMEM $ac_have_decl
13188_ACEOF
13189
13190
13191
13192
13193
472fa5ee 13194
6ec2e0f5
SDJ
13195 for ac_func in memmem
13196do :
13197 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
d0ac1c44 13198if test "x$ac_cv_func_memmem" = xyes; then :
6ec2e0f5
SDJ
13199 cat >>confdefs.h <<_ACEOF
13200#define HAVE_MEMMEM 1
13201_ACEOF
13202
13203fi
13204done
13205
13206 if test $ac_cv_func_memmem = yes; then
13207 HAVE_MEMMEM=1
13208 else
13209 HAVE_MEMMEM=0
13210 fi
13211
472fa5ee
SM
13212 :
13213
13214
13215
13216
13217
6ec2e0f5
SDJ
13218 if test $ac_cv_have_decl_memmem = no; then
13219 HAVE_DECL_MEMMEM=0
13220 else
13221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
13222$as_echo_n "checking whether memmem works... " >&6; }
d0ac1c44 13223if ${gl_cv_func_memmem_works_always+:} false; then :
6ec2e0f5
SDJ
13224 $as_echo_n "(cached) " >&6
13225else
13226 if test "$cross_compiling" = yes; then :
13227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13228/* end confdefs.h. */
13229
13230#ifdef __GNU_LIBRARY__
13231 #include <features.h>
13232 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
13233 || __GLIBC_MINOR__ > 12)) \
13234 || (__GLIBC__ > 2)) \
13235 || defined __UCLIBC__
13236 Lucky user
13237 #endif
13238#elif defined __CYGWIN__
13239 #include <cygwin/version.h>
13240 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
13241 Lucky user
13242 #endif
13243#else
13244 Lucky user
13245#endif
13246
13247_ACEOF
13248if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13249 $EGREP "Lucky user" >/dev/null 2>&1; then :
13250 gl_cv_func_memmem_works_always="guessing yes"
13251else
13252 gl_cv_func_memmem_works_always="guessing no"
13253fi
13254rm -f conftest*
13255
13256
13257else
13258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13259/* end confdefs.h. */
13260
13261#include <string.h> /* for memmem */
13262#define P "_EF_BF_BD"
13263#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
13264#define NEEDLE P P P P P
13265
13266int
13267main ()
13268{
13269
13270 int result = 0;
13271 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
13272 result |= 1;
13273 /* Check for empty needle behavior. */
13274 {
13275 const char *haystack = "AAA";
13276 if (memmem (haystack, 3, NULL, 0) != haystack)
13277 result |= 2;
13278 }
13279 return result;
13280
13281 ;
13282 return 0;
13283}
13284_ACEOF
13285if ac_fn_c_try_run "$LINENO"; then :
13286 gl_cv_func_memmem_works_always=yes
13287else
13288 gl_cv_func_memmem_works_always=no
13289fi
13290rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13291 conftest.$ac_objext conftest.beam conftest.$ac_ext
13292fi
13293
13294
13295fi
13296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
13297$as_echo "$gl_cv_func_memmem_works_always" >&6; }
13298 case "$gl_cv_func_memmem_works_always" in
13299 *yes) ;;
13300 *)
13301 REPLACE_MEMMEM=1
13302 ;;
13303 esac
13304 fi
13305 :
13306
472fa5ee
SM
13307
13308 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
d0ac1c44 13309if test "x$ac_cv_have_decl_memrchr" = xyes; then :
6ec2e0f5
SDJ
13310 ac_have_decl=1
13311else
13312 ac_have_decl=0
13313fi
13314
13315cat >>confdefs.h <<_ACEOF
13316#define HAVE_DECL_MEMRCHR $ac_have_decl
13317_ACEOF
13318
13319
13320
13321
13322
13323
2d8adcbd
MM
13324
13325
472fa5ee
SM
13326
13327
13328
13329
6ec2e0f5
SDJ
13330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
13331$as_echo_n "checking for promoted mode_t type... " >&6; }
d0ac1c44 13332if ${gl_cv_promoted_mode_t+:} false; then :
6ec2e0f5
SDJ
13333 $as_echo_n "(cached) " >&6
13334else
13335
13336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13337/* end confdefs.h. */
13338#include <sys/types.h>
13339int
13340main ()
13341{
13342typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
13343 ;
13344 return 0;
13345}
13346_ACEOF
13347if ac_fn_c_try_compile "$LINENO"; then :
13348 gl_cv_promoted_mode_t='int'
13349else
13350 gl_cv_promoted_mode_t='mode_t'
13351fi
13352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13353
13354fi
13355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
13356$as_echo "$gl_cv_promoted_mode_t" >&6; }
13357
13358cat >>confdefs.h <<_ACEOF
13359#define PROMOTED_MODE_T $gl_cv_promoted_mode_t
13360_ACEOF
13361
13362
13363
13364
13365
472fa5ee
SM
13366
13367
13368
6ec2e0f5
SDJ
13369 GNULIB_DPRINTF=0;
13370 GNULIB_FCLOSE=0;
13371 GNULIB_FDOPEN=0;
13372 GNULIB_FFLUSH=0;
13373 GNULIB_FGETC=0;
13374 GNULIB_FGETS=0;
13375 GNULIB_FOPEN=0;
13376 GNULIB_FPRINTF=0;
13377 GNULIB_FPRINTF_POSIX=0;
13378 GNULIB_FPURGE=0;
13379 GNULIB_FPUTC=0;
13380 GNULIB_FPUTS=0;
13381 GNULIB_FREAD=0;
13382 GNULIB_FREOPEN=0;
13383 GNULIB_FSCANF=0;
13384 GNULIB_FSEEK=0;
13385 GNULIB_FSEEKO=0;
13386 GNULIB_FTELL=0;
13387 GNULIB_FTELLO=0;
13388 GNULIB_FWRITE=0;
13389 GNULIB_GETC=0;
13390 GNULIB_GETCHAR=0;
13391 GNULIB_GETDELIM=0;
13392 GNULIB_GETLINE=0;
13393 GNULIB_OBSTACK_PRINTF=0;
13394 GNULIB_OBSTACK_PRINTF_POSIX=0;
13395 GNULIB_PCLOSE=0;
13396 GNULIB_PERROR=0;
13397 GNULIB_POPEN=0;
13398 GNULIB_PRINTF=0;
13399 GNULIB_PRINTF_POSIX=0;
13400 GNULIB_PUTC=0;
13401 GNULIB_PUTCHAR=0;
13402 GNULIB_PUTS=0;
13403 GNULIB_REMOVE=0;
13404 GNULIB_RENAME=0;
13405 GNULIB_RENAMEAT=0;
13406 GNULIB_SCANF=0;
13407 GNULIB_SNPRINTF=0;
13408 GNULIB_SPRINTF_POSIX=0;
13409 GNULIB_STDIO_H_NONBLOCKING=0;
13410 GNULIB_STDIO_H_SIGPIPE=0;
13411 GNULIB_TMPFILE=0;
13412 GNULIB_VASPRINTF=0;
13413 GNULIB_VFSCANF=0;
13414 GNULIB_VSCANF=0;
13415 GNULIB_VDPRINTF=0;
13416 GNULIB_VFPRINTF=0;
13417 GNULIB_VFPRINTF_POSIX=0;
13418 GNULIB_VPRINTF=0;
13419 GNULIB_VPRINTF_POSIX=0;
13420 GNULIB_VSNPRINTF=0;
13421 GNULIB_VSPRINTF_POSIX=0;
13422 HAVE_DECL_FPURGE=1;
13423 HAVE_DECL_FSEEKO=1;
13424 HAVE_DECL_FTELLO=1;
13425 HAVE_DECL_GETDELIM=1;
13426 HAVE_DECL_GETLINE=1;
13427 HAVE_DECL_OBSTACK_PRINTF=1;
13428 HAVE_DECL_SNPRINTF=1;
13429 HAVE_DECL_VSNPRINTF=1;
13430 HAVE_DPRINTF=1;
13431 HAVE_FSEEKO=1;
13432 HAVE_FTELLO=1;
13433 HAVE_PCLOSE=1;
13434 HAVE_POPEN=1;
13435 HAVE_RENAMEAT=1;
13436 HAVE_VASPRINTF=1;
13437 HAVE_VDPRINTF=1;
13438 REPLACE_DPRINTF=0;
13439 REPLACE_FCLOSE=0;
13440 REPLACE_FDOPEN=0;
13441 REPLACE_FFLUSH=0;
13442 REPLACE_FOPEN=0;
13443 REPLACE_FPRINTF=0;
13444 REPLACE_FPURGE=0;
13445 REPLACE_FREOPEN=0;
13446 REPLACE_FSEEK=0;
13447 REPLACE_FSEEKO=0;
13448 REPLACE_FTELL=0;
13449 REPLACE_FTELLO=0;
13450 REPLACE_GETDELIM=0;
13451 REPLACE_GETLINE=0;
13452 REPLACE_OBSTACK_PRINTF=0;
13453 REPLACE_PERROR=0;
13454 REPLACE_POPEN=0;
13455 REPLACE_PRINTF=0;
13456 REPLACE_REMOVE=0;
13457 REPLACE_RENAME=0;
13458 REPLACE_RENAMEAT=0;
13459 REPLACE_SNPRINTF=0;
13460 REPLACE_SPRINTF=0;
13461 REPLACE_STDIO_READ_FUNCS=0;
13462 REPLACE_STDIO_WRITE_FUNCS=0;
13463 REPLACE_TMPFILE=0;
13464 REPLACE_VASPRINTF=0;
13465 REPLACE_VDPRINTF=0;
13466 REPLACE_VFPRINTF=0;
13467 REPLACE_VPRINTF=0;
13468 REPLACE_VSNPRINTF=0;
13469 REPLACE_VSPRINTF=0;
13470
13471
13472
2d8adcbd
MM
13473
13474
13475
13476
5e8754f9
SDJ
13477
13478
13479
13480
13481
13482
13483
13484
13485
13486
13487
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
472fa5ee 13502 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
d0ac1c44 13503if test "x$ac_cv_have_decl_setenv" = xyes; then :
6ec2e0f5
SDJ
13504 ac_have_decl=1
13505else
13506 ac_have_decl=0
13507fi
13508
13509cat >>confdefs.h <<_ACEOF
13510#define HAVE_DECL_SETENV $ac_have_decl
13511_ACEOF
13512
13513
13514
13515
13516
13517
472fa5ee
SM
13518
13519
13520
13521
13522 :
13523
13524
13525
13526
13527
6ec2e0f5
SDJ
13528 if test $ac_cv_have_decl_setenv = no; then
13529 HAVE_DECL_SETENV=0
13530 fi
13531
472fa5ee
SM
13532 :
13533
13534
13535
13536
13537
13538
13539
13540
13541
13542 :
13543
6ec2e0f5
SDJ
13544
13545
13546
13547
13548 for ac_header in search.h
13549do :
13550 ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
d0ac1c44 13551if test "x$ac_cv_header_search_h" = xyes; then :
6ec2e0f5
SDJ
13552 cat >>confdefs.h <<_ACEOF
13553#define HAVE_SEARCH_H 1
13554_ACEOF
13555
13556fi
13557
13558done
13559
13560 for ac_func in tsearch
13561do :
13562 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
d0ac1c44 13563if test "x$ac_cv_func_tsearch" = xyes; then :
6ec2e0f5
SDJ
13564 cat >>confdefs.h <<_ACEOF
13565#define HAVE_TSEARCH 1
13566_ACEOF
13567
13568fi
13569done
13570
13571
13572
13573
13574 GNULIB_PTHREAD_SIGMASK=0;
13575 GNULIB_RAISE=0;
13576 GNULIB_SIGNAL_H_SIGPIPE=0;
13577 GNULIB_SIGPROCMASK=0;
13578 GNULIB_SIGACTION=0;
13579 HAVE_POSIX_SIGNALBLOCKING=1;
13580 HAVE_PTHREAD_SIGMASK=1;
13581 HAVE_RAISE=1;
13582 HAVE_SIGSET_T=1;
13583 HAVE_SIGINFO_T=1;
13584 HAVE_SIGACTION=1;
13585 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
13586
13587 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
13588
13589 HAVE_SIGHANDLER_T=1;
13590 REPLACE_PTHREAD_SIGMASK=0;
13591 REPLACE_RAISE=0;
13592
13593
13594 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
13595 #include <signal.h>
13596 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
13597 #include <sys/types.h>
13598
13599"
d0ac1c44 13600if test "x$ac_cv_type_sigset_t" = xyes; then :
6ec2e0f5
SDJ
13601
13602cat >>confdefs.h <<_ACEOF
13603#define HAVE_SIGSET_T 1
13604_ACEOF
13605
13606gl_cv_type_sigset_t=yes
13607else
13608 gl_cv_type_sigset_t=no
13609fi
13610
13611 if test $gl_cv_type_sigset_t != yes; then
13612 HAVE_SIGSET_T=0
13613 fi
13614
13615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
13616$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
d0ac1c44 13617if ${ac_cv_type_uid_t+:} false; then :
6ec2e0f5
SDJ
13618 $as_echo_n "(cached) " >&6
13619else
13620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13621/* end confdefs.h. */
13622#include <sys/types.h>
13623
13624_ACEOF
13625if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13626 $EGREP "uid_t" >/dev/null 2>&1; then :
13627 ac_cv_type_uid_t=yes
13628else
13629 ac_cv_type_uid_t=no
13630fi
13631rm -f conftest*
13632
13633fi
13634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
13635$as_echo "$ac_cv_type_uid_t" >&6; }
13636if test $ac_cv_type_uid_t = no; then
13637
13638$as_echo "#define uid_t int" >>confdefs.h
13639
13640
13641$as_echo "#define gid_t int" >>confdefs.h
13642
13643fi
13644
13645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
13646$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
d0ac1c44 13647if ${ac_cv_header_stdbool_h+:} false; then :
6ec2e0f5
SDJ
13648 $as_echo_n "(cached) " >&6
13649else
13650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13651/* end confdefs.h. */
13652
13653 #include <stdbool.h>
13654
13655 #ifdef __cplusplus
13656 typedef bool Bool;
13657 #else
13658 typedef _Bool Bool;
13659 #ifndef bool
13660 "error: bool is not defined"
13661 #endif
13662 #ifndef false
13663 "error: false is not defined"
13664 #endif
13665 #if false
13666 "error: false is not 0"
13667 #endif
13668 #ifndef true
13669 "error: true is not defined"
13670 #endif
13671 #if true != 1
13672 "error: true is not 1"
13673 #endif
13674 #endif
13675
13676 #ifndef __bool_true_false_are_defined
13677 "error: __bool_true_false_are_defined is not defined"
13678 #endif
13679
13680 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
13681
13682 char a[true == 1 ? 1 : -1];
13683 char b[false == 0 ? 1 : -1];
13684 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
13685 char d[(bool) 0.5 == true ? 1 : -1];
13686 /* See body of main program for 'e'. */
13687 char f[(Bool) 0.0 == false ? 1 : -1];
13688 char g[true];
13689 char h[sizeof (Bool)];
13690 char i[sizeof s.t];
13691 enum { j = false, k = true, l = false * true, m = true * 256 };
13692 /* The following fails for
13693 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
13694 Bool n[m];
13695 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
13696 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
13697 /* Catch a bug in an HP-UX C compiler. See
5e8754f9
SDJ
13698 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
13699 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
6ec2e0f5
SDJ
13700 */
13701 Bool q = true;
13702 Bool *pq = &q;
13703 bool *qq = &q;
13704
13705int
13706main ()
13707{
13708
13709 bool e = &s;
13710 *pq |= q; *pq |= ! q;
13711 *qq |= q; *qq |= ! q;
13712 /* Refer to every declared value, to avoid compiler optimizations. */
13713 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
13714 + !m + !n + !o + !p + !q + !pq + !qq);
13715
13716 ;
13717 return 0;
13718}
13719_ACEOF
13720if ac_fn_c_try_compile "$LINENO"; then :
13721 ac_cv_header_stdbool_h=yes
13722else
13723 ac_cv_header_stdbool_h=no
13724fi
13725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13726fi
13727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
13728$as_echo "$ac_cv_header_stdbool_h" >&6; }
13729 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
d0ac1c44 13730if test "x$ac_cv_type__Bool" = xyes; then :
6ec2e0f5
SDJ
13731
13732cat >>confdefs.h <<_ACEOF
13733#define HAVE__BOOL 1
13734_ACEOF
13735
13736
13737fi
13738
13739
13740
13741 REPLACE_NULL=0;
13742 HAVE_MAX_ALIGN_T=1;
13743 HAVE_WCHAR_T=1;
13744
13745
13746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
13747$as_echo_n "checking for wchar_t... " >&6; }
d0ac1c44 13748if ${gt_cv_c_wchar_t+:} false; then :
6ec2e0f5
SDJ
13749 $as_echo_n "(cached) " >&6
13750else
13751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13752/* end confdefs.h. */
13753#include <stddef.h>
13754 wchar_t foo = (wchar_t)'\0';
13755int
13756main ()
13757{
13758
13759 ;
13760 return 0;
13761}
13762_ACEOF
13763if ac_fn_c_try_compile "$LINENO"; then :
13764 gt_cv_c_wchar_t=yes
13765else
13766 gt_cv_c_wchar_t=no
13767fi
13768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13769fi
13770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
13771$as_echo "$gt_cv_c_wchar_t" >&6; }
13772 if test $gt_cv_c_wchar_t = yes; then
13773
13774$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
13775
13776 fi
13777
13778
13779
472fa5ee
SM
13780
13781
13782
13783
13784 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
d0ac1c44 13785if test "x$ac_cv_have_decl_strdup" = xyes; then :
6ec2e0f5
SDJ
13786 ac_have_decl=1
13787else
13788 ac_have_decl=0
13789fi
13790
13791cat >>confdefs.h <<_ACEOF
13792#define HAVE_DECL_STRDUP $ac_have_decl
13793_ACEOF
13794
13795
472fa5ee 13796
6ec2e0f5
SDJ
13797 REPLACE_STRERROR_0=0
13798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
13799$as_echo_n "checking whether strerror(0) succeeds... " >&6; }
d0ac1c44 13800if ${gl_cv_func_strerror_0_works+:} false; then :
6ec2e0f5
SDJ
13801 $as_echo_n "(cached) " >&6
13802else
13803 if test "$cross_compiling" = yes; then :
13804 case "$host_os" in
5e8754f9
SDJ
13805 # Guess yes on glibc systems.
13806 *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
13807 # If we don't know, assume the worst.
13808 *) gl_cv_func_strerror_0_works="guessing no" ;;
6ec2e0f5
SDJ
13809 esac
13810
13811else
13812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13813/* end confdefs.h. */
13814#include <string.h>
13815 #include <errno.h>
13816
13817int
13818main ()
13819{
13820int result = 0;
13821 char *str;
13822 errno = 0;
13823 str = strerror (0);
13824 if (!*str) result |= 1;
13825 if (errno) result |= 2;
13826 if (strstr (str, "nknown") || strstr (str, "ndefined"))
13827 result |= 4;
13828 return result;
13829 ;
13830 return 0;
13831}
13832_ACEOF
13833if ac_fn_c_try_run "$LINENO"; then :
13834 gl_cv_func_strerror_0_works=yes
13835else
13836 gl_cv_func_strerror_0_works=no
13837fi
13838rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13839 conftest.$ac_objext conftest.beam conftest.$ac_ext
13840fi
13841
13842
13843fi
13844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
13845$as_echo "$gl_cv_func_strerror_0_works" >&6; }
13846 case "$gl_cv_func_strerror_0_works" in
13847 *yes) ;;
13848 *)
13849 REPLACE_STRERROR_0=1
13850
13851$as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
13852
13853 ;;
13854 esac
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867 if test $gl_cv_have_include_next = yes; then
13868 gl_cv_next_string_h='<'string.h'>'
13869 else
13870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
13871$as_echo_n "checking absolute name of <string.h>... " >&6; }
d0ac1c44 13872if ${gl_cv_next_string_h+:} false; then :
6ec2e0f5
SDJ
13873 $as_echo_n "(cached) " >&6
13874else
13875
13876
13877
13878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13879/* end confdefs.h. */
13880#include <string.h>
13881_ACEOF
13882 case "$host_os" in
13883 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13884 *) gl_absname_cpp="$ac_cpp" ;;
13885 esac
13886
13887 case "$host_os" in
13888 mingw*)
13889 gl_dirsep_regex='[/\\]'
13890 ;;
13891 *)
13892 gl_dirsep_regex='\/'
13893 ;;
13894 esac
13895 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13896 gl_header_literal_regex=`echo 'string.h' \
13897 | sed -e "$gl_make_literal_regex_sed"`
13898 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13899 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13900 s|^/[^/]|//&|
13901 p
13902 q
13903 }'
13904
13905 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13906 sed -n "$gl_absolute_header_sed"`
13907
13908 gl_header=$gl_cv_absolute_string_h
13909 gl_cv_next_string_h='"'$gl_header'"'
13910
13911
13912fi
13913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
13914$as_echo "$gl_cv_next_string_h" >&6; }
13915 fi
13916 NEXT_STRING_H=$gl_cv_next_string_h
13917
13918 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13919 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13920 gl_next_as_first_directive='<'string.h'>'
13921 else
13922 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13923 gl_next_as_first_directive=$gl_cv_next_string_h
13924 fi
13925 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
13926
13927
13928
13929
13930
13931
5e8754f9
SDJ
13932 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
13933 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
13934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
13935$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
13936if eval \${$as_gl_Symbol+:} false; then :
13937 $as_echo_n "(cached) " >&6
13938else
13939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13940/* end confdefs.h. */
13941#include <string.h>
13942
13943int
13944main ()
13945{
13946#undef $gl_func
13947 (void) $gl_func;
13948 ;
13949 return 0;
13950}
13951_ACEOF
13952if ac_fn_c_try_compile "$LINENO"; then :
13953 eval "$as_gl_Symbol=yes"
13954else
13955 eval "$as_gl_Symbol=no"
13956fi
13957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13958fi
13959eval ac_res=\$$as_gl_Symbol
13960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13961$as_echo "$ac_res" >&6; }
13962 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
13963 cat >>confdefs.h <<_ACEOF
13964#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
13965_ACEOF
6ec2e0f5 13966
5e8754f9
SDJ
13967 eval ac_cv_have_decl_$gl_func=yes
13968fi
13969 done
6ec2e0f5
SDJ
13970
13971
13972
13973
13974
5e8754f9 13975 if test "$gl_cv_func_memchr_works" != yes; then
6ec2e0f5
SDJ
13976 REPLACE_STRSTR=1
13977 else
13978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
13979$as_echo_n "checking whether strstr works... " >&6; }
d0ac1c44 13980if ${gl_cv_func_strstr_works_always+:} false; then :
6ec2e0f5
SDJ
13981 $as_echo_n "(cached) " >&6
13982else
13983 if test "$cross_compiling" = yes; then :
13984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13985/* end confdefs.h. */
13986
13987#ifdef __GNU_LIBRARY__
13988 #include <features.h>
13989 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
13990 || defined __UCLIBC__
13991 Lucky user
13992 #endif
13993#elif defined __CYGWIN__
13994 #include <cygwin/version.h>
13995 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
13996 Lucky user
13997 #endif
13998#else
13999 Lucky user
14000#endif
14001
14002_ACEOF
14003if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14004 $EGREP "Lucky user" >/dev/null 2>&1; then :
14005 gl_cv_func_strstr_works_always="guessing yes"
14006else
14007 gl_cv_func_strstr_works_always="guessing no"
14008fi
14009rm -f conftest*
14010
14011
14012else
14013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14014/* end confdefs.h. */
14015
14016#include <string.h> /* for strstr */
14017#define P "_EF_BF_BD"
14018#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
14019#define NEEDLE P P P P P
14020
14021int
14022main ()
14023{
14024return !!strstr (HAYSTACK, NEEDLE);
14025
14026 ;
14027 return 0;
14028}
14029_ACEOF
14030if ac_fn_c_try_run "$LINENO"; then :
14031 gl_cv_func_strstr_works_always=yes
14032else
14033 gl_cv_func_strstr_works_always=no
14034fi
14035rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14036 conftest.$ac_objext conftest.beam conftest.$ac_ext
14037fi
14038
14039
14040fi
14041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
14042$as_echo "$gl_cv_func_strstr_works_always" >&6; }
14043 case "$gl_cv_func_strstr_works_always" in
14044 *yes) ;;
14045 *)
14046 REPLACE_STRSTR=1
14047 ;;
14048 esac
14049 fi
14050
472fa5ee
SM
14051
14052 ac_fn_c_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default"
d0ac1c44 14053if test "x$ac_cv_have_decl_strtok_r" = xyes; then :
6ec2e0f5
SDJ
14054 ac_have_decl=1
14055else
14056 ac_have_decl=0
14057fi
14058
14059cat >>confdefs.h <<_ACEOF
14060#define HAVE_DECL_STRTOK_R $ac_have_decl
14061_ACEOF
14062
472fa5ee 14063
6ec2e0f5
SDJ
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082 if test $gl_cv_have_include_next = yes; then
14083 gl_cv_next_sys_types_h='<'sys/types.h'>'
14084 else
14085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
14086$as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
d0ac1c44 14087if ${gl_cv_next_sys_types_h+:} false; then :
6ec2e0f5
SDJ
14088 $as_echo_n "(cached) " >&6
14089else
14090
14091
14092
14093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14094/* end confdefs.h. */
14095#include <sys/types.h>
14096_ACEOF
14097 case "$host_os" in
14098 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14099 *) gl_absname_cpp="$ac_cpp" ;;
14100 esac
14101
14102 case "$host_os" in
14103 mingw*)
14104 gl_dirsep_regex='[/\\]'
14105 ;;
14106 *)
14107 gl_dirsep_regex='\/'
14108 ;;
14109 esac
14110 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14111 gl_header_literal_regex=`echo 'sys/types.h' \
14112 | sed -e "$gl_make_literal_regex_sed"`
14113 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14114 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14115 s|^/[^/]|//&|
14116 p
14117 q
14118 }'
14119
14120 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14121 sed -n "$gl_absolute_header_sed"`
14122
14123 gl_header=$gl_cv_absolute_sys_types_h
14124 gl_cv_next_sys_types_h='"'$gl_header'"'
14125
14126
14127fi
14128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
14129$as_echo "$gl_cv_next_sys_types_h" >&6; }
14130 fi
14131 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
14132
14133 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14134 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14135 gl_next_as_first_directive='<'sys/types.h'>'
14136 else
14137 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14138 gl_next_as_first_directive=$gl_cv_next_sys_types_h
14139 fi
14140 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
725e2999
JB
14153
14154
14155
14156
14157
14158
14159
5e8754f9
SDJ
14160 GNULIB_MKTIME=0;
14161 GNULIB_NANOSLEEP=0;
14162 GNULIB_STRPTIME=0;
14163 GNULIB_TIMEGM=0;
14164 GNULIB_TIME_R=0;
14165 GNULIB_TIME_RZ=0;
14166 HAVE_DECL_LOCALTIME_R=1;
14167 HAVE_NANOSLEEP=1;
14168 HAVE_STRPTIME=1;
14169 HAVE_TIMEGM=1;
14170 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
14171 REPLACE_MKTIME=GNULIB_PORTCHECK;
14172 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
14173 REPLACE_TIMEGM=GNULIB_PORTCHECK;
6ec2e0f5 14174
5e8754f9
SDJ
14175 : ${GNULIB_GETTIMEOFDAY=0};
14176 REPLACE_GMTIME=0;
14177 REPLACE_LOCALTIME=0;
6ec2e0f5
SDJ
14178
14179
14180
472fa5ee
SM
14181 :
14182
14183
14184
14185
14186
6ec2e0f5
SDJ
14187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
14188$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
d0ac1c44 14189if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
6ec2e0f5
SDJ
14190 $as_echo_n "(cached) " >&6
14191else
14192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14193/* end confdefs.h. */
14194#include <time.h>
14195
14196int
14197main ()
14198{
14199static struct timespec x; x.tv_sec = x.tv_nsec;
14200 ;
14201 return 0;
14202}
14203_ACEOF
14204if ac_fn_c_try_compile "$LINENO"; then :
14205 gl_cv_sys_struct_timespec_in_time_h=yes
14206else
14207 gl_cv_sys_struct_timespec_in_time_h=no
14208fi
14209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14210fi
14211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
14212$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
14213
14214 TIME_H_DEFINES_STRUCT_TIMESPEC=0
14215 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
14216 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
14217 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
14218 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
14219 TIME_H_DEFINES_STRUCT_TIMESPEC=1
14220 else
14221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
14222$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
d0ac1c44 14223if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
6ec2e0f5
SDJ
14224 $as_echo_n "(cached) " >&6
14225else
14226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14227/* end confdefs.h. */
14228#include <sys/time.h>
14229
14230int
14231main ()
14232{
14233static struct timespec x; x.tv_sec = x.tv_nsec;
14234 ;
14235 return 0;
14236}
14237_ACEOF
14238if ac_fn_c_try_compile "$LINENO"; then :
14239 gl_cv_sys_struct_timespec_in_sys_time_h=yes
14240else
14241 gl_cv_sys_struct_timespec_in_sys_time_h=no
14242fi
14243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14244fi
14245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
14246$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
14247 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
14248 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
14249 else
14250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
14251$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
d0ac1c44 14252if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
6ec2e0f5
SDJ
14253 $as_echo_n "(cached) " >&6
14254else
14255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14256/* end confdefs.h. */
14257#include <pthread.h>
14258
14259int
14260main ()
14261{
14262static struct timespec x; x.tv_sec = x.tv_nsec;
14263 ;
14264 return 0;
14265}
14266_ACEOF
14267if ac_fn_c_try_compile "$LINENO"; then :
14268 gl_cv_sys_struct_timespec_in_pthread_h=yes
14269else
14270 gl_cv_sys_struct_timespec_in_pthread_h=no
14271fi
14272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14273fi
14274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
14275$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
14276 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
14277 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
14278 else
14279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
14280$as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
d0ac1c44 14281if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then :
6ec2e0f5
SDJ
14282 $as_echo_n "(cached) " >&6
14283else
14284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14285/* end confdefs.h. */
14286#include <unistd.h>
14287
14288int
14289main ()
14290{
14291static struct timespec x; x.tv_sec = x.tv_nsec;
14292 ;
14293 return 0;
14294}
14295_ACEOF
14296if ac_fn_c_try_compile "$LINENO"; then :
14297 gl_cv_sys_struct_timespec_in_unistd_h=yes
14298else
14299 gl_cv_sys_struct_timespec_in_unistd_h=no
14300fi
14301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14302fi
14303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
14304$as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
14305 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
14306 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
14307 fi
14308 fi
14309 fi
14310 fi
14311
14312
14313
14314
14315
14316
14317
14318
14319
14320
14321
14322
14323
14324
14325
14326
14327 if test $gl_cv_have_include_next = yes; then
14328 gl_cv_next_time_h='<'time.h'>'
14329 else
14330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
14331$as_echo_n "checking absolute name of <time.h>... " >&6; }
d0ac1c44 14332if ${gl_cv_next_time_h+:} false; then :
6ec2e0f5
SDJ
14333 $as_echo_n "(cached) " >&6
14334else
14335
14336
14337
14338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14339/* end confdefs.h. */
14340#include <time.h>
14341_ACEOF
14342 case "$host_os" in
14343 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14344 *) gl_absname_cpp="$ac_cpp" ;;
14345 esac
14346
14347 case "$host_os" in
14348 mingw*)
14349 gl_dirsep_regex='[/\\]'
14350 ;;
14351 *)
14352 gl_dirsep_regex='\/'
14353 ;;
14354 esac
14355 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14356 gl_header_literal_regex=`echo 'time.h' \
14357 | sed -e "$gl_make_literal_regex_sed"`
14358 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14359 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14360 s|^/[^/]|//&|
14361 p
14362 q
14363 }'
14364
14365 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14366 sed -n "$gl_absolute_header_sed"`
14367
14368 gl_header=$gl_cv_absolute_time_h
14369 gl_cv_next_time_h='"'$gl_header'"'
14370
14371
14372fi
14373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
14374$as_echo "$gl_cv_next_time_h" >&6; }
14375 fi
14376 NEXT_TIME_H=$gl_cv_next_time_h
14377
14378 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14379 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14380 gl_next_as_first_directive='<'time.h'>'
14381 else
14382 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14383 gl_next_as_first_directive=$gl_cv_next_time_h
14384 fi
14385 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
14386
14387
14388
14389
14390
14391
14392
14393
472fa5ee
SM
14394
14395
14396
14397
14398 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
d0ac1c44 14399if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
6ec2e0f5
SDJ
14400 ac_have_decl=1
14401else
14402 ac_have_decl=0
14403fi
14404
14405cat >>confdefs.h <<_ACEOF
14406#define HAVE_DECL_UNSETENV $ac_have_decl
14407_ACEOF
14408
14409
472fa5ee 14410
6ec2e0f5
SDJ
14411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
14412$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
d0ac1c44 14413if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
6ec2e0f5
SDJ
14414 $as_echo_n "(cached) " >&6
14415else
14416 gl_cv_header_wchar_h_correct_inline=yes
14417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14418/* end confdefs.h. */
14419
14420 #define wcstod renamed_wcstod
14421/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14422 <wchar.h>.
14423 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14424 included before <wchar.h>. */
14425#include <stddef.h>
14426#include <stdio.h>
14427#include <time.h>
14428#include <wchar.h>
14429extern int zero (void);
14430int main () { return zero(); }
14431
14432_ACEOF
14433 save_ac_compile="$ac_compile"
14434 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
5e8754f9 14435 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6ec2e0f5
SDJ
14436 (eval $ac_compile) 2>&5
14437 ac_status=$?
14438 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14439 test $ac_status = 0; }; then
14440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14441/* end confdefs.h. */
14442
14443 #define wcstod renamed_wcstod
14444/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14445 <wchar.h>.
14446 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14447 included before <wchar.h>. */
14448#include <stddef.h>
14449#include <stdio.h>
14450#include <time.h>
14451#include <wchar.h>
14452int zero (void) { return 0; }
14453
14454_ACEOF
14455 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
5e8754f9 14456 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6ec2e0f5
SDJ
14457 (eval $ac_compile) 2>&5
14458 ac_status=$?
14459 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14460 test $ac_status = 0; }; then
14461 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
14462 :
14463 else
14464 gl_cv_header_wchar_h_correct_inline=no
14465 fi
14466 fi
14467 fi
14468 ac_compile="$save_ac_compile"
5e8754f9 14469 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
6ec2e0f5
SDJ
14470
14471fi
14472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
14473$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
14474 if test $gl_cv_header_wchar_h_correct_inline = no; then
d0ac1c44 14475 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
6ec2e0f5
SDJ
14476This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
14477C99 mode. You have four options:
14478 - Add the flag -fgnu89-inline to CC and reconfigure, or
14479 - Fix your include files, using parts of
5e8754f9 14480 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
6ec2e0f5
SDJ
14481 - Use a gcc version older than 4.3, or
14482 - Don't use the flags -std=c99 or -std=gnu99.
14483Configuration aborted." "$LINENO" 5
14484 fi
14485
14486
5e8754f9
SDJ
14487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
14488$as_echo_n "checking for wint_t... " >&6; }
14489if ${gt_cv_c_wint_t+:} false; then :
14490 $as_echo_n "(cached) " >&6
14491else
14492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14493/* end confdefs.h. */
6ec2e0f5 14494
5e8754f9
SDJ
14495/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14496 <wchar.h>.
14497 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
14498 before <wchar.h>. */
14499#include <stddef.h>
14500#include <stdio.h>
14501#include <time.h>
14502#include <wchar.h>
14503 wint_t foo = (wchar_t)'\0';
14504int
14505main ()
14506{
6ec2e0f5 14507
5e8754f9
SDJ
14508 ;
14509 return 0;
14510}
14511_ACEOF
14512if ac_fn_c_try_compile "$LINENO"; then :
14513 gt_cv_c_wint_t=yes
14514else
14515 gt_cv_c_wint_t=no
14516fi
14517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14518fi
14519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
14520$as_echo "$gt_cv_c_wint_t" >&6; }
14521 if test $gt_cv_c_wint_t = yes; then
6ec2e0f5 14522
5e8754f9 14523$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
6ec2e0f5
SDJ
14524
14525 fi
14526
14527
14528 GNULIB_ISWBLANK=0;
14529 GNULIB_WCTYPE=0;
14530 GNULIB_ISWCTYPE=0;
14531 GNULIB_WCTRANS=0;
14532 GNULIB_TOWCTRANS=0;
14533 HAVE_ISWBLANK=1;
14534 HAVE_WCTYPE_T=1;
14535 HAVE_WCTRANS_T=1;
14536 REPLACE_ISWBLANK=0;
14537
14538
14539
14540
472fa5ee
SM
14541
14542
14543
725e2999
JB
14544 if false; then
14545 GL_COND_LIBTOOL_TRUE=
14546 GL_COND_LIBTOOL_FALSE='#'
14547else
14548 GL_COND_LIBTOOL_TRUE='#'
14549 GL_COND_LIBTOOL_FALSE=
14550fi
14551
14552 gl_cond_libtool=false
14553 gl_libdeps=
14554 gl_ltlibdeps=
14555 gl_m4_base='import/m4'
14556
14557
14558
14559
14560
14561
14562
14563
14564
14565 gl_source_base='import'
14566
14567
14568 if test $ac_cv_func_alloca_works = no; then
14569 :
14570 fi
14571
14572 # Define an additional variable used in the Makefile substitution.
14573 if test $ac_cv_working_alloca_h = yes; then
14574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
14575$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
14576if ${gl_cv_rpl_alloca+:} false; then :
14577 $as_echo_n "(cached) " >&6
14578else
14579
14580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14581/* end confdefs.h. */
14582
14583#if defined __GNUC__ || defined _AIX || defined _MSC_VER
14584 Need own alloca
14585#endif
14586
14587_ACEOF
14588if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14589 $EGREP "Need own alloca" >/dev/null 2>&1; then :
14590 gl_cv_rpl_alloca=yes
14591else
14592 gl_cv_rpl_alloca=no
14593fi
14594rm -f conftest*
14595
14596
14597fi
14598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
14599$as_echo "$gl_cv_rpl_alloca" >&6; }
14600 if test $gl_cv_rpl_alloca = yes; then
14601
14602$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
14603
14604 ALLOCA_H=alloca.h
14605 else
14606 ALLOCA_H=
14607 fi
14608 else
14609 ALLOCA_H=alloca.h
14610 fi
14611
14612 if test -n "$ALLOCA_H"; then
14613 GL_GENERATE_ALLOCA_H_TRUE=
14614 GL_GENERATE_ALLOCA_H_FALSE='#'
14615else
14616 GL_GENERATE_ALLOCA_H_TRUE='#'
14617 GL_GENERATE_ALLOCA_H_FALSE=
14618fi
14619
14620
14621
14622
14623
14624
14625 :
14626
14627
14628
14629
14630
14631 if test $ac_cv_header_arpa_inet_h = yes; then
14632 HAVE_ARPA_INET_H=1
14633 else
14634 HAVE_ARPA_INET_H=0
14635 fi
14636
14637
14638
14639
14640
14641
14642
14643 :
14644
14645
14646
14647
14648
14649
14650
14651
14652 if test $gl_cv_have_include_next = yes; then
14653 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
14654 else
14655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
14656$as_echo_n "checking absolute name of <arpa/inet.h>... " >&6; }
14657if ${gl_cv_next_arpa_inet_h+:} false; then :
14658 $as_echo_n "(cached) " >&6
14659else
14660
14661 if test $ac_cv_header_arpa_inet_h = yes; then
14662
14663
14664
14665
14666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14667/* end confdefs.h. */
14668#include <arpa/inet.h>
14669_ACEOF
14670 case "$host_os" in
14671 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14672 *) gl_absname_cpp="$ac_cpp" ;;
14673 esac
14674
14675 case "$host_os" in
14676 mingw*)
14677 gl_dirsep_regex='[/\\]'
14678 ;;
14679 *)
14680 gl_dirsep_regex='\/'
14681 ;;
14682 esac
14683 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14684 gl_header_literal_regex=`echo 'arpa/inet.h' \
14685 | sed -e "$gl_make_literal_regex_sed"`
14686 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14687 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14688 s|^/[^/]|//&|
14689 p
14690 q
14691 }'
6ec2e0f5 14692
725e2999
JB
14693 gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14694 sed -n "$gl_absolute_header_sed"`
6ec2e0f5 14695
725e2999
JB
14696 gl_header=$gl_cv_absolute_arpa_inet_h
14697 gl_cv_next_arpa_inet_h='"'$gl_header'"'
14698 else
14699 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
14700 fi
6ec2e0f5
SDJ
14701
14702
725e2999
JB
14703fi
14704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
14705$as_echo "$gl_cv_next_arpa_inet_h" >&6; }
14706 fi
14707 NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
6ec2e0f5 14708
725e2999
JB
14709 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14710 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14711 gl_next_as_first_directive='<'arpa/inet.h'>'
14712 else
14713 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14714 gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
14715 fi
14716 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
6ec2e0f5
SDJ
14717
14718
14719
14720
14721
6ec2e0f5
SDJ
14722
14723
6ec2e0f5 14724
725e2999
JB
14725 for gl_func in inet_ntop inet_pton; do
14726 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
14727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
14728$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
14729if eval \${$as_gl_Symbol+:} false; then :
6ec2e0f5
SDJ
14730 $as_echo_n "(cached) " >&6
14731else
725e2999 14732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ec2e0f5
SDJ
14733/* end confdefs.h. */
14734
725e2999
JB
14735/* On some systems, this header is not self-consistent. */
14736#if !(defined __GLIBC__ || defined __UCLIBC__)
14737# include <sys/socket.h>
6ec2e0f5 14738#endif
725e2999
JB
14739#ifdef __TANDEM
14740# include <netdb.h>
14741#endif
14742#include <arpa/inet.h>
6ec2e0f5 14743
725e2999
JB
14744int
14745main ()
14746{
14747#undef $gl_func
14748 (void) $gl_func;
14749 ;
14750 return 0;
14751}
6ec2e0f5 14752_ACEOF
725e2999
JB
14753if ac_fn_c_try_compile "$LINENO"; then :
14754 eval "$as_gl_Symbol=yes"
6ec2e0f5 14755else
725e2999 14756 eval "$as_gl_Symbol=no"
6ec2e0f5 14757fi
725e2999 14758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5 14759fi
725e2999
JB
14760eval ac_res=\$$as_gl_Symbol
14761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14762$as_echo "$ac_res" >&6; }
14763 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
14764 cat >>confdefs.h <<_ACEOF
14765#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
14766_ACEOF
6ec2e0f5 14767
725e2999 14768 eval ac_cv_have_decl_$gl_func=yes
6ec2e0f5 14769fi
725e2999
JB
14770 done
14771
6ec2e0f5
SDJ
14772
14773
14774
14775
14776
14777
14778
14779
14780
14781
14782 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
14783
14784
14785
14786
14787 if test $ac_cv_func_canonicalize_file_name = no; then
14788 HAVE_CANONICALIZE_FILE_NAME=0
14789 if test $ac_cv_func_realpath = no; then
14790 HAVE_REALPATH=0
14791 else
14792 case "$gl_cv_func_realpath_works" in
5e8754f9
SDJ
14793 *yes) ;;
14794 *) REPLACE_REALPATH=1 ;;
6ec2e0f5
SDJ
14795 esac
14796 fi
14797 else
14798 case "$gl_cv_func_realpath_works" in
14799 *yes)
14800 ;;
14801 *)
14802 REPLACE_CANONICALIZE_FILE_NAME=1
14803 REPLACE_REALPATH=1
14804 ;;
14805 esac
14806 fi
14807
14808 if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
14809
14810
14811
14812
14813
14814
14815
14816
14817 gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
14818
14819 fi
14820
14821
14822cat >>confdefs.h <<_ACEOF
14823#define GNULIB_CANONICALIZE_LGPL 1
14824_ACEOF
14825
14826
14827
14828
14829
14830
14831
14832 GNULIB_CANONICALIZE_FILE_NAME=1
14833
14834
14835
14836
14837
14838$as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
14839
14840
14841
14842
14843
14844
14845
14846
14847 GNULIB_REALPATH=1
14848
14849
14850
14851
14852
14853$as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
14854
14855
14856
14857
14858
14859
14860
14861
14862 GNULIB_CHDIR=1
14863
14864
14865
14866
14867
14868$as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
14869
14870
14871
14872
14873
14874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
14875$as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; }
d0ac1c44 14876if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then :
6ec2e0f5
SDJ
14877 $as_echo_n "(cached) " >&6
14878else
14879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14880/* end confdefs.h. */
14881
14882/* Arrange to define PATH_MAX, like "pathmax.h" does. */
14883#if HAVE_UNISTD_H
14884# include <unistd.h>
14885#endif
14886#include <limits.h>
14887#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
14888# include <sys/param.h>
14889#endif
14890#if !defined PATH_MAX && defined MAXPATHLEN
14891# define PATH_MAX MAXPATHLEN
14892#endif
14893#ifdef __hpux
14894# undef PATH_MAX
14895# define PATH_MAX 1024
14896#endif
5e8754f9 14897#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6ec2e0f5
SDJ
14898# undef PATH_MAX
14899# define PATH_MAX 260
14900#endif
14901
14902#ifdef PATH_MAX
14903have_arbitrary_file_name_length_limit
14904#endif
14905_ACEOF
14906if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14907 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
14908 gl_cv_have_arbitrary_file_name_length_limit=yes
14909else
14910 gl_cv_have_arbitrary_file_name_length_limit=no
14911fi
14912rm -f conftest*
14913
14914fi
14915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
14916$as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
14917
14918 if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
14919
14920
14921
14922
14923
14924
14925
14926
14927 gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
14928
14929 :
14930 fi
14931
14932
14933$as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
14934
14935
14936
14937
14938
5e8754f9
SDJ
14939 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
14940 REPLACE_CLOSE=1
14941 fi
6ec2e0f5
SDJ
14942
14943
14944
14945
14946
472fa5ee
SM
14947 :
14948
14949
14950
14951
14952
6ec2e0f5
SDJ
14953 if test $ac_cv_header_sys_socket_h != yes; then
14954 for ac_header in winsock2.h
14955do :
14956 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
d0ac1c44 14957if test "x$ac_cv_header_winsock2_h" = xyes; then :
6ec2e0f5
SDJ
14958 cat >>confdefs.h <<_ACEOF
14959#define HAVE_WINSOCK2_H 1
14960_ACEOF
14961
14962fi
14963
14964done
14965
14966 fi
14967 if test "$ac_cv_header_winsock2_h" = yes; then
14968 HAVE_WINSOCK2_H=1
14969 UNISTD_H_HAVE_WINSOCK2_H=1
14970 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
14971 else
14972 HAVE_WINSOCK2_H=0
14973 fi
14974
14975
14976 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
14977 REPLACE_CLOSE=1
14978 fi
14979
14980
14981 if test $REPLACE_CLOSE = 0; then
14982
14983
14984
472fa5ee
SM
14985 :
14986
14987
14988
14989
14990
6ec2e0f5
SDJ
14991 if test $ac_cv_func_fchdir = no; then
14992 HAVE_FCHDIR=0
14993 fi
14994
14995 if test $HAVE_FCHDIR = 0; then
14996 REPLACE_CLOSE=1
14997 fi
14998 fi
14999
15000
15001 if test $REPLACE_CLOSE = 1; then
15002
15003
15004
15005
15006
15007
15008
15009
15010 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
15011
15012 fi
15013
15014
15015
15016
15017
15018 GNULIB_CLOSE=1
15019
15020
15021
15022
15023
15024$as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
15025
15026
15027
15028
15029
15030
15031 for ac_func in closedir
15032do :
15033 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
d0ac1c44 15034if test "x$ac_cv_func_closedir" = xyes; then :
6ec2e0f5
SDJ
15035 cat >>confdefs.h <<_ACEOF
15036#define HAVE_CLOSEDIR 1
15037_ACEOF
15038
15039fi
15040done
15041
15042 if test $ac_cv_func_closedir = no; then
15043 HAVE_CLOSEDIR=0
15044 fi
15045
15046
15047
15048
472fa5ee
SM
15049 :
15050
15051
15052
15053
15054
6ec2e0f5
SDJ
15055 if test $ac_cv_func_fchdir = no; then
15056 HAVE_FCHDIR=0
15057 fi
15058
15059 if test $HAVE_FCHDIR = 0; then
15060 if test $HAVE_CLOSEDIR = 1; then
15061 REPLACE_CLOSEDIR=1
15062 fi
15063 fi
15064
15065 case $host_os,$HAVE_CLOSEDIR in
15066 os2*,1)
15067 REPLACE_CLOSEDIR=1;;
15068 esac
15069
15070 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
15071
15072
15073
15074
15075
15076
15077
15078
15079 gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
15080
15081 fi
15082
15083
15084
15085
15086
15087 GNULIB_CLOSEDIR=1
15088
15089
15090
15091
15092
15093$as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
15094
15095
15096
5e8754f9
SDJ
15097
15098 if test "x$datarootdir" = x; then
15099 datarootdir='${datadir}'
15100
15101 fi
15102 if test "x$docdir" = x; then
15103 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
15104
15105 fi
15106 if test "x$htmldir" = x; then
15107 htmldir='${docdir}'
15108
15109 fi
15110 if test "x$dvidir" = x; then
15111 dvidir='${docdir}'
15112
15113 fi
15114 if test "x$pdfdir" = x; then
15115 pdfdir='${docdir}'
15116
15117 fi
15118 if test "x$psdir" = x; then
15119 psdir='${docdir}'
15120
15121 fi
15122 if test "x$lispdir" = x; then
15123 lispdir='${datarootdir}/emacs/site-lisp'
15124
15125 fi
15126 if test "x$localedir" = x; then
15127 localedir='${datarootdir}/locale'
15128
15129 fi
15130 if test "x$runstatedir" = x; then
15131 runstatedir='${localstatedir}/run'
15132
15133 fi
15134
15135 pkglibexecdir='${libexecdir}/${PACKAGE}'
15136
15137
6ec2e0f5
SDJ
15138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
15139$as_echo_n "checking for d_ino member in directory struct... " >&6; }
d0ac1c44 15140if ${gl_cv_struct_dirent_d_ino+:} false; then :
6ec2e0f5
SDJ
15141 $as_echo_n "(cached) " >&6
15142else
15143 if test "$cross_compiling" = yes; then :
15144 case "$host_os" in
15145 # Guess yes on glibc systems with Linux kernel.
15146 linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
15147 # If we don't know, assume the worst.
15148 *) gl_cv_struct_dirent_d_ino="guessing no" ;;
15149 esac
15150
15151else
15152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15153/* end confdefs.h. */
15154#include <sys/types.h>
15155 #include <sys/stat.h>
15156 #include <dirent.h>
15157
15158int
15159main ()
15160{
15161DIR *dp = opendir (".");
15162 struct dirent *e;
15163 struct stat st;
15164 if (! dp)
15165 return 1;
15166 e = readdir (dp);
15167 if (! e)
5e8754f9 15168 return 2;
6ec2e0f5 15169 if (lstat (e->d_name, &st) != 0)
5e8754f9 15170 return 3;
6ec2e0f5 15171 if (e->d_ino != st.st_ino)
5e8754f9 15172 return 4;
6ec2e0f5
SDJ
15173 closedir (dp);
15174 return 0;
15175
15176 ;
15177 return 0;
15178}
15179_ACEOF
15180if ac_fn_c_try_run "$LINENO"; then :
15181 gl_cv_struct_dirent_d_ino=yes
15182else
15183 gl_cv_struct_dirent_d_ino=no
15184fi
15185rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15186 conftest.$ac_objext conftest.beam conftest.$ac_ext
15187fi
15188
15189fi
15190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
15191$as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
15192 case "$gl_cv_struct_dirent_d_ino" in
15193 *yes)
15194
15195$as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
15196
15197 ;;
15198 esac
15199
15200
15201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
15202$as_echo_n "checking for d_type member in directory struct... " >&6; }
d0ac1c44 15203if ${gl_cv_struct_dirent_d_type+:} false; then :
6ec2e0f5
SDJ
15204 $as_echo_n "(cached) " >&6
15205else
15206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15207/* end confdefs.h. */
15208
15209#include <sys/types.h>
15210#include <dirent.h>
15211
15212int
15213main ()
15214{
15215struct dirent dp; dp.d_type = 0;
15216 ;
15217 return 0;
15218}
15219_ACEOF
15220if ac_fn_c_try_link "$LINENO"; then :
15221 gl_cv_struct_dirent_d_type=yes
15222else
15223 gl_cv_struct_dirent_d_type=no
15224fi
15225rm -f core conftest.err conftest.$ac_objext \
15226 conftest$ac_exeext conftest.$ac_ext
15227
15228
15229fi
15230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5
15231$as_echo "$gl_cv_struct_dirent_d_type" >&6; }
15232 if test $gl_cv_struct_dirent_d_type = yes; then
15233
15234$as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
15235
15236 fi
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247
472fa5ee
SM
15248 :
15249
15250
15251
15252
15253
6ec2e0f5
SDJ
15254
15255
15256
15257 if test $gl_cv_have_include_next = yes; then
15258 gl_cv_next_dirent_h='<'dirent.h'>'
15259 else
15260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
15261$as_echo_n "checking absolute name of <dirent.h>... " >&6; }
d0ac1c44 15262if ${gl_cv_next_dirent_h+:} false; then :
6ec2e0f5
SDJ
15263 $as_echo_n "(cached) " >&6
15264else
15265
15266 if test $ac_cv_header_dirent_h = yes; then
15267
15268
15269
15270
15271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15272/* end confdefs.h. */
15273#include <dirent.h>
15274_ACEOF
15275 case "$host_os" in
15276 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15277 *) gl_absname_cpp="$ac_cpp" ;;
15278 esac
15279
15280 case "$host_os" in
15281 mingw*)
15282 gl_dirsep_regex='[/\\]'
15283 ;;
15284 *)
15285 gl_dirsep_regex='\/'
15286 ;;
15287 esac
15288 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15289 gl_header_literal_regex=`echo 'dirent.h' \
15290 | sed -e "$gl_make_literal_regex_sed"`
15291 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15292 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15293 s|^/[^/]|//&|
15294 p
15295 q
15296 }'
15297
15298 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15299 sed -n "$gl_absolute_header_sed"`
15300
15301 gl_header=$gl_cv_absolute_dirent_h
15302 gl_cv_next_dirent_h='"'$gl_header'"'
15303 else
15304 gl_cv_next_dirent_h='<'dirent.h'>'
15305 fi
15306
15307
15308fi
15309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
15310$as_echo "$gl_cv_next_dirent_h" >&6; }
15311 fi
15312 NEXT_DIRENT_H=$gl_cv_next_dirent_h
15313
15314 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15315 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15316 gl_next_as_first_directive='<'dirent.h'>'
15317 else
15318 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15319 gl_next_as_first_directive=$gl_cv_next_dirent_h
15320 fi
15321 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
15322
15323
15324
15325
15326 if test $ac_cv_header_dirent_h = yes; then
15327 HAVE_DIRENT_H=1
15328 else
15329 HAVE_DIRENT_H=0
15330 fi
15331
15332
15333
5e8754f9
SDJ
15334 for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do
15335 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
15336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
15337$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
15338if eval \${$as_gl_Symbol+:} false; then :
15339 $as_echo_n "(cached) " >&6
15340else
15341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15342/* end confdefs.h. */
15343#include <dirent.h>
15344
15345int
15346main ()
15347{
15348#undef $gl_func
15349 (void) $gl_func;
15350 ;
15351 return 0;
15352}
15353_ACEOF
15354if ac_fn_c_try_compile "$LINENO"; then :
15355 eval "$as_gl_Symbol=yes"
15356else
15357 eval "$as_gl_Symbol=no"
15358fi
15359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15360fi
15361eval ac_res=\$$as_gl_Symbol
15362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15363$as_echo "$ac_res" >&6; }
15364 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
15365 cat >>confdefs.h <<_ACEOF
15366#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
15367_ACEOF
6ec2e0f5 15368
5e8754f9
SDJ
15369 eval ac_cv_have_decl_$gl_func=yes
15370fi
15371 done
6ec2e0f5
SDJ
15372
15373
15374
15375
15376
15377
15378
15379 for ac_func in dirfd
15380do :
15381 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
d0ac1c44 15382if test "x$ac_cv_func_dirfd" = xyes; then :
6ec2e0f5
SDJ
15383 cat >>confdefs.h <<_ACEOF
15384#define HAVE_DIRFD 1
15385_ACEOF
15386
15387fi
15388done
15389
15390 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
15391 #include <dirent.h>
15392"
d0ac1c44 15393if test "x$ac_cv_have_decl_dirfd" = xyes; then :
6ec2e0f5
SDJ
15394 ac_have_decl=1
15395else
15396 ac_have_decl=0
15397fi
15398
15399cat >>confdefs.h <<_ACEOF
15400#define HAVE_DECL_DIRFD $ac_have_decl
15401_ACEOF
15402
15403 if test $ac_cv_have_decl_dirfd = no; then
15404 HAVE_DECL_DIRFD=0
15405 fi
15406
15407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
15408$as_echo_n "checking whether dirfd is a macro... " >&6; }
d0ac1c44 15409if ${gl_cv_func_dirfd_macro+:} false; then :
6ec2e0f5
SDJ
15410 $as_echo_n "(cached) " >&6
15411else
15412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15413/* end confdefs.h. */
15414
15415#include <sys/types.h>
15416#include <dirent.h>
15417#ifdef dirfd
15418 dirent_header_defines_dirfd
15419#endif
15420_ACEOF
15421if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15422 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
15423 gl_cv_func_dirfd_macro=yes
15424else
15425 gl_cv_func_dirfd_macro=no
15426fi
15427rm -f conftest*
15428
15429fi
15430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
15431$as_echo "$gl_cv_func_dirfd_macro" >&6; }
15432
15433 # Use the replacement if we have no function or macro with that name,
15434 # or if OS/2 kLIBC whose dirfd() does not work.
15435 # Replace only if the system declares dirfd already.
15436 case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
15437 no,no,*,yes | *,*,os2*,yes)
15438 REPLACE_DIRFD=1
15439
15440$as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
15441;;
15442 esac
15443
15444 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
15445 || test $REPLACE_DIRFD = 1; then
15446
15447
15448
15449
15450
15451
15452
15453
15454 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
15455
15456
15457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
15458$as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
d0ac1c44 15459if ${gl_cv_sys_dir_fd_member_name+:} false; then :
6ec2e0f5
SDJ
15460 $as_echo_n "(cached) " >&6
15461else
15462
15463 dirfd_save_CFLAGS=$CFLAGS
15464 for ac_expr in d_fd dd_fd; do
15465
15466 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
15467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15468/* end confdefs.h. */
15469
15470 #include <sys/types.h>
15471 #include <dirent.h>
15472int
15473main ()
15474{
15475DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
15476 ;
15477 return 0;
15478}
15479_ACEOF
15480if ac_fn_c_try_compile "$LINENO"; then :
15481 dir_fd_found=yes
15482
15483fi
15484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15485 CFLAGS=$dirfd_save_CFLAGS
15486 test "$dir_fd_found" = yes && break
15487 done
15488 test "$dir_fd_found" = yes || ac_expr=no_such_member
15489
15490 gl_cv_sys_dir_fd_member_name=$ac_expr
15491
15492
15493fi
15494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
15495$as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
15496 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
15497
15498cat >>confdefs.h <<_ACEOF
15499#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
15500_ACEOF
15501
15502 fi
15503
15504
15505 fi
15506
15507
15508
15509
15510
15511 GNULIB_DIRFD=1
15512
15513
15514
15515
15516
15517$as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
15528$as_echo_n "checking whether // is distinct from /... " >&6; }
d0ac1c44 15529if ${gl_cv_double_slash_root+:} false; then :
6ec2e0f5
SDJ
15530 $as_echo_n "(cached) " >&6
15531else
15532 if test x"$cross_compiling" = xyes ; then
15533 # When cross-compiling, there is no way to tell whether // is special
15534 # short of a list of hosts. However, the only known hosts to date
15535 # that have a distinct // are Apollo DomainOS (too old to port to),
15536 # Cygwin, and z/OS. If anyone knows of another system for which // has
15537 # special semantics and is distinct from /, please report it to
15538 # <bug-gnulib@gnu.org>.
15539 case $host in
15540 *-cygwin | i370-ibm-openedition)
15541 gl_cv_double_slash_root=yes ;;
15542 *)
15543 # Be optimistic and assume that / and // are the same when we
15544 # don't know.
15545 gl_cv_double_slash_root='unknown, assuming no' ;;
15546 esac
15547 else
15548 set x `ls -di / // 2>/dev/null`
15549 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
15550 gl_cv_double_slash_root=no
15551 else
15552 gl_cv_double_slash_root=yes
15553 fi
15554 fi
15555fi
15556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
15557$as_echo "$gl_cv_double_slash_root" >&6; }
15558 if test "$gl_cv_double_slash_root" = yes; then
8690e634 15559
6ec2e0f5 15560$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
8690e634 15561
6ec2e0f5 15562 fi
8690e634
JK
15563
15564
15565
15566
5e8754f9
SDJ
15567 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
15568 REPLACE_DUP=1
15569 fi
8690e634 15570
8690e634
JK
15571
15572
15573
472fa5ee
SM
15574 :
15575
15576
15577
15578
15579
6ec2e0f5
SDJ
15580 if test $ac_cv_func_fchdir = no; then
15581 HAVE_FCHDIR=0
15582 fi
8690e634 15583
6ec2e0f5
SDJ
15584 if test $HAVE_FCHDIR = 0; then
15585 REPLACE_DUP=1
15586 fi
8690e634 15587
6ec2e0f5
SDJ
15588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
15589$as_echo_n "checking whether dup works... " >&6; }
d0ac1c44 15590if ${gl_cv_func_dup_works+:} false; then :
6ec2e0f5 15591 $as_echo_n "(cached) " >&6
8690e634 15592else
6ec2e0f5 15593 if test "$cross_compiling" = yes; then :
5e8754f9 15594 gl_cv_func_dup_works='guessing yes'
6ec2e0f5
SDJ
15595else
15596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 15597/* end confdefs.h. */
6ec2e0f5
SDJ
15598#include <unistd.h>
15599 #include <fcntl.h>
15600 #include <errno.h>
15601int
15602main ()
15603{
15604/* On OS/2 kLIBC, dup does not work on a directory fd. */
15605 int fd = open (".", O_RDONLY);
15606 return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
8690e634 15607
6ec2e0f5
SDJ
15608 ;
15609 return 0;
15610}
8690e634
JK
15611
15612_ACEOF
6ec2e0f5
SDJ
15613if ac_fn_c_try_run "$LINENO"; then :
15614 gl_cv_func_dup_works=yes
15615else
15616 gl_cv_func_dup_works=no
15617fi
15618rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15619 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 15620fi
8690e634 15621
8690e634 15622
6ec2e0f5
SDJ
15623fi
15624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
15625$as_echo "$gl_cv_func_dup_works" >&6; }
15626 case "$gl_cv_func_dup_works" in
15627 *yes) ;;
15628 *)
15629 REPLACE_DUP=1
15630 ;;
15631 esac
8690e634 15632
6ec2e0f5 15633 if test $REPLACE_DUP = 1; then
8690e634 15634
8690e634 15635
8690e634 15636
8690e634 15637
8690e634 15638
6ec2e0f5
SDJ
15639
15640
15641
15642 gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
15643
15644 :
8690e634
JK
15645 fi
15646
15647
8690e634
JK
15648
15649
15650
6ec2e0f5 15651 GNULIB_DUP=1
8690e634 15652
6ec2e0f5
SDJ
15653
15654
15655
15656
15657$as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
15658
15659
15660
15661
15662
15663
15664
15665
15666$as_echo "#define HAVE_DUP2 1" >>confdefs.h
15667
15668
15669 if test $HAVE_DUP2 = 1; then
15670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
15671$as_echo_n "checking whether dup2 works... " >&6; }
d0ac1c44 15672if ${gl_cv_func_dup2_works+:} false; then :
8690e634
JK
15673 $as_echo_n "(cached) " >&6
15674else
15675 if test "$cross_compiling" = yes; then :
6ec2e0f5
SDJ
15676 case "$host_os" in
15677 mingw*) # on this platform, dup2 always returns 0 for success
15678 gl_cv_func_dup2_works="guessing no" ;;
15679 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
15680 gl_cv_func_dup2_works="guessing no" ;;
15681 aix* | freebsd*)
15682 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
15683 # not EBADF.
15684 gl_cv_func_dup2_works="guessing no" ;;
15685 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
15686 gl_cv_func_dup2_works="guessing no" ;;
15687 *-android*) # implemented using dup3(), which fails if oldfd == newfd
15688 gl_cv_func_dup2_works="guessing no" ;;
15689 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
15690 gl_cv_func_dup2_works="guessing no" ;;
15691 *) gl_cv_func_dup2_works="guessing yes" ;;
15692 esac
8690e634
JK
15693else
15694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15695/* end confdefs.h. */
15696
6ec2e0f5
SDJ
15697 #include <errno.h>
15698 #include <fcntl.h>
15699 #include <limits.h>
15700 #include <sys/resource.h>
15701 #include <unistd.h>
15702 #ifndef RLIM_SAVED_CUR
15703 # define RLIM_SAVED_CUR RLIM_INFINITY
15704 #endif
15705 #ifndef RLIM_SAVED_MAX
15706 # define RLIM_SAVED_MAX RLIM_INFINITY
15707 #endif
8690e634
JK
15708
15709int
15710main ()
15711{
6ec2e0f5
SDJ
15712int result = 0;
15713 int bad_fd = INT_MAX;
15714 struct rlimit rlim;
15715 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
15716 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
15717 && rlim.rlim_cur != RLIM_INFINITY
15718 && rlim.rlim_cur != RLIM_SAVED_MAX
15719 && rlim.rlim_cur != RLIM_SAVED_CUR)
15720 bad_fd = rlim.rlim_cur;
15721 #ifdef FD_CLOEXEC
15722 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
15723 result |= 1;
15724 #endif
15725 if (dup2 (1, 1) != 1)
15726 result |= 2;
15727 #ifdef FD_CLOEXEC
15728 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
15729 result |= 4;
15730 #endif
15731 close (0);
15732 if (dup2 (0, 0) != -1)
15733 result |= 8;
15734 /* Many gnulib modules require POSIX conformance of EBADF. */
15735 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
15736 result |= 16;
15737 /* Flush out some cygwin core dumps. */
15738 if (dup2 (2, -1) != -1 || errno != EBADF)
15739 result |= 32;
15740 dup2 (2, 255);
15741 dup2 (2, 256);
15742 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
15743 {
15744 int fd = open (".", O_RDONLY);
15745 if (fd == -1)
15746 result |= 64;
15747 else if (dup2 (fd, fd + 1) == -1)
15748 result |= 128;
15749
15750 close (fd);
15751 }
15752 return result;
8690e634
JK
15753 ;
15754 return 0;
15755}
6ec2e0f5 15756
8690e634
JK
15757_ACEOF
15758if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 15759 gl_cv_func_dup2_works=yes
8690e634 15760else
6ec2e0f5 15761 gl_cv_func_dup2_works=no
8690e634
JK
15762fi
15763rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15764 conftest.$ac_objext conftest.beam conftest.$ac_ext
15765fi
15766
6ec2e0f5
SDJ
15767
15768fi
15769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
15770$as_echo "$gl_cv_func_dup2_works" >&6; }
15771 case "$gl_cv_func_dup2_works" in
15772 *yes) ;;
15773 *)
15774 REPLACE_DUP2=1
15775 for ac_func in setdtablesize
15776do :
15777 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
d0ac1c44 15778if test "x$ac_cv_func_setdtablesize" = xyes; then :
6ec2e0f5
SDJ
15779 cat >>confdefs.h <<_ACEOF
15780#define HAVE_SETDTABLESIZE 1
15781_ACEOF
15782
15783fi
15784done
15785
15786 ;;
15787 esac
15788 fi
15789
15790
15791
15792
472fa5ee
SM
15793 :
15794
15795
15796
15797
15798
6ec2e0f5
SDJ
15799 if test $ac_cv_func_fchdir = no; then
15800 HAVE_FCHDIR=0
8690e634
JK
15801 fi
15802
6ec2e0f5
SDJ
15803 if test $HAVE_FCHDIR = 0; then
15804 if test $HAVE_DUP2 = 1; then
15805 REPLACE_DUP2=1
15806 fi
15807 fi
8690e634 15808
8690e634 15809
6ec2e0f5 15810 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
8690e634
JK
15811
15812
15813
15814
8690e634 15815
8690e634 15816
6ec2e0f5
SDJ
15817
15818
15819 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
15820
15821
8690e634
JK
15822 fi
15823
8690e634 15824
8690e634 15825
8690e634
JK
15826
15827
6ec2e0f5
SDJ
15828 GNULIB_DUP2=1
15829
15830
15831
15832
15833
15834$as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
15835
15836
15837
15838
15839
15840
15841
15842
15843
15844 GNULIB_ENVIRON=1
15845
15846
15847
15848
15849
15850$as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
15851
15852
15853
15854
15855
15856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
15857$as_echo_n "checking for error_at_line... " >&6; }
d0ac1c44 15858if ${ac_cv_lib_error_at_line+:} false; then :
6ec2e0f5 15859 $as_echo_n "(cached) " >&6
8690e634
JK
15860else
15861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15862/* end confdefs.h. */
6ec2e0f5 15863#include <error.h>
8690e634
JK
15864int
15865main ()
15866{
6ec2e0f5 15867error_at_line (0, 0, "", 0, "an error occurred");
8690e634
JK
15868 ;
15869 return 0;
15870}
15871_ACEOF
6ec2e0f5
SDJ
15872if ac_fn_c_try_link "$LINENO"; then :
15873 ac_cv_lib_error_at_line=yes
8690e634 15874else
6ec2e0f5 15875 ac_cv_lib_error_at_line=no
8690e634 15876fi
6ec2e0f5
SDJ
15877rm -f core conftest.err conftest.$ac_objext \
15878 conftest$ac_exeext conftest.$ac_ext
8690e634 15879fi
6ec2e0f5
SDJ
15880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
15881$as_echo "$ac_cv_lib_error_at_line" >&6; }
15882
15883 if test $ac_cv_lib_error_at_line = no; then
15884
15885
15886
15887
15888
15889
15890
15891
15892 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
15893
8690e634
JK
15894
15895
8690e634
JK
15896 :
15897
6ec2e0f5 15898 fi
6a29c58e 15899
6a29c58e 15900
d0ac1c44
SM
15901
15902
15903
d0ac1c44
SM
15904
15905
472fa5ee 15906 :
6a29c58e
YQ
15907
15908
3d99e817 15909
6ec2e0f5
SDJ
15910
15911
15912 if test $ac_cv_have_decl_fchdir = no; then
15913 HAVE_DECL_FCHDIR=0
15914 fi
15915
15916
15917 if test $HAVE_FCHDIR = 0; then
15918
15919
3d99e817
AK
15920
15921
15922
15923
15924
15925
6ec2e0f5 15926 gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
3d99e817 15927
6ec2e0f5 15928 :
3d99e817 15929
6ec2e0f5 15930$as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
3d99e817 15931
6ec2e0f5
SDJ
15932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
15933$as_echo_n "checking whether open can visit directories... " >&6; }
d0ac1c44 15934if ${gl_cv_func_open_directory_works+:} false; then :
6ec2e0f5
SDJ
15935 $as_echo_n "(cached) " >&6
15936else
15937 if test "$cross_compiling" = yes; then :
15938 case "$host_os" in
5e8754f9
SDJ
15939 # Guess yes on glibc systems.
15940 *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
15941 # If we don't know, assume the worst.
15942 *) gl_cv_func_open_directory_works="guessing no" ;;
6ec2e0f5 15943 esac
3d99e817 15944
6ec2e0f5
SDJ
15945else
15946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15947/* end confdefs.h. */
15948#include <fcntl.h>
3d99e817 15949
6ec2e0f5
SDJ
15950int
15951main ()
15952{
15953return open(".", O_RDONLY) < 0;
15954 ;
15955 return 0;
15956}
3d99e817 15957_ACEOF
6ec2e0f5
SDJ
15958if ac_fn_c_try_run "$LINENO"; then :
15959 gl_cv_func_open_directory_works=yes
15960else
15961 gl_cv_func_open_directory_works=no
15962fi
15963rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15964 conftest.$ac_objext conftest.beam conftest.$ac_ext
15965fi
3d99e817
AK
15966
15967fi
6ec2e0f5
SDJ
15968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
15969$as_echo "$gl_cv_func_open_directory_works" >&6; }
15970 case "$gl_cv_func_open_directory_works" in
15971 *yes) ;;
15972 *)
3d99e817 15973
6ec2e0f5 15974$as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
3d99e817 15975
6ec2e0f5
SDJ
15976 ;;
15977 esac
15978 fi
3d99e817 15979
3d99e817
AK
15980
15981
15982
0750520d 15983
0750520d 15984
6ec2e0f5 15985 GNULIB_FCHDIR=1
0750520d 15986
0750520d
PA
15987
15988
0750520d 15989
0750520d 15990
6ec2e0f5 15991$as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
0750520d 15992
0750520d 15993
0750520d 15994
0750520d 15995
0750520d 15996
0750520d 15997
0750520d 15998
6ec2e0f5 15999
472fa5ee
SM
16000 :
16001
16002
16003
16004
16005
6ec2e0f5
SDJ
16006 if test $ac_cv_func_fcntl = no; then
16007
16008
16009
472fa5ee
SM
16010 :
16011
16012
16013
16014
16015
6ec2e0f5
SDJ
16016 if test $ac_cv_func_fcntl = no; then
16017 HAVE_FCNTL=0
16018 else
16019 REPLACE_FCNTL=1
16020 fi
16021
16022 else
16023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
16024$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
d0ac1c44 16025if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
0750520d 16026 $as_echo_n "(cached) " >&6
6ec2e0f5
SDJ
16027else
16028 if test "$cross_compiling" = yes; then :
16029 case $host_os in
16030 aix* | cygwin* | haiku*)
16031 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
16032 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
16033 esac
0750520d
PA
16034else
16035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16036/* end confdefs.h. */
6ec2e0f5
SDJ
16037#include <errno.h>
16038 #include <fcntl.h>
16039 #include <limits.h>
16040 #include <sys/resource.h>
16041 #include <unistd.h>
16042 #ifndef RLIM_SAVED_CUR
16043 # define RLIM_SAVED_CUR RLIM_INFINITY
16044 #endif
16045 #ifndef RLIM_SAVED_MAX
16046 # define RLIM_SAVED_MAX RLIM_INFINITY
16047 #endif
0750520d 16048
6ec2e0f5
SDJ
16049int
16050main ()
16051{
16052int result = 0;
16053 int bad_fd = INT_MAX;
16054 struct rlimit rlim;
16055 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
16056 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
16057 && rlim.rlim_cur != RLIM_INFINITY
16058 && rlim.rlim_cur != RLIM_SAVED_MAX
16059 && rlim.rlim_cur != RLIM_SAVED_CUR)
16060 bad_fd = rlim.rlim_cur;
16061 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
16062 if (errno != EINVAL) result |= 2;
16063 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
16064 if (errno != EINVAL) result |= 8;
16065 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
16066 {
16067 int fd;
16068 fd = open (".", O_RDONLY);
16069 if (fd == -1)
16070 result |= 16;
16071 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
16072 result |= 32;
16073
16074 close (fd);
16075 }
16076 return result;
16077 ;
16078 return 0;
16079}
0750520d 16080_ACEOF
6ec2e0f5
SDJ
16081if ac_fn_c_try_run "$LINENO"; then :
16082 gl_cv_func_fcntl_f_dupfd_works=yes
0750520d 16083else
6ec2e0f5
SDJ
16084 gl_cv_func_fcntl_f_dupfd_works=no
16085fi
16086rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16087 conftest.$ac_objext conftest.beam conftest.$ac_ext
0750520d 16088fi
0750520d
PA
16089
16090fi
6ec2e0f5
SDJ
16091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
16092$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
16093 case $gl_cv_func_fcntl_f_dupfd_works in
16094 *yes) ;;
16095 *)
0750520d 16096
0750520d 16097
472fa5ee
SM
16098 :
16099
16100
16101
16102
16103
6ec2e0f5
SDJ
16104 if test $ac_cv_func_fcntl = no; then
16105 HAVE_FCNTL=0
16106 else
16107 REPLACE_FCNTL=1
16108 fi
0750520d 16109
0750520d 16110
6ec2e0f5
SDJ
16111$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
16112 ;;
16113 esac
0750520d 16114
6ec2e0f5
SDJ
16115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
16116$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
d0ac1c44 16117if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
8690e634
JK
16118 $as_echo_n "(cached) " >&6
16119else
16120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16121/* end confdefs.h. */
16122
6ec2e0f5
SDJ
16123#include <fcntl.h>
16124#ifndef F_DUPFD_CLOEXEC
16125choke me
16126#endif
49e4877c 16127
6ec2e0f5
SDJ
16128int
16129main ()
16130{
8690e634 16131
6ec2e0f5
SDJ
16132 ;
16133 return 0;
16134}
16135_ACEOF
16136if ac_fn_c_try_compile "$LINENO"; then :
16137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16138/* end confdefs.h. */
8690e634 16139
6ec2e0f5
SDJ
16140#ifdef __linux__
16141/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
16142 it to support the semantics on older kernels that failed with EINVAL. */
16143choke me
16144#endif
8690e634
JK
16145
16146int
16147main ()
16148{
16149
8690e634
JK
16150 ;
16151 return 0;
16152}
16153_ACEOF
16154if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 16155 gl_cv_func_fcntl_f_dupfd_cloexec=yes
8690e634 16156else
6ec2e0f5 16157 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
8690e634
JK
16158fi
16159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
16160else
16161 gl_cv_func_fcntl_f_dupfd_cloexec=no
8690e634 16162fi
6ec2e0f5
SDJ
16163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16164fi
16165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
16166$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
16167 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
16168
16169
16170
472fa5ee
SM
16171 :
16172
16173
16174
16175
16176
6ec2e0f5
SDJ
16177 if test $ac_cv_func_fcntl = no; then
16178 HAVE_FCNTL=0
16179 else
16180 REPLACE_FCNTL=1
16181 fi
16182
16183 fi
16184 fi
16185
16186
16187
16188
472fa5ee
SM
16189 :
16190
16191
16192
16193
16194
6ec2e0f5
SDJ
16195 if test $ac_cv_func_fchdir = no; then
16196 HAVE_FCHDIR=0
16197 fi
16198
16199 if test $HAVE_FCHDIR = 0; then
16200
16201
16202
472fa5ee
SM
16203 :
16204
16205
16206
16207
16208
6ec2e0f5
SDJ
16209 if test $ac_cv_func_fcntl = no; then
16210 HAVE_FCNTL=0
16211 else
16212 REPLACE_FCNTL=1
16213 fi
16214
16215 fi
16216
16217
16218 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
16219
16220
16221
16222
16223
16224
16225
16226
16227 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
16228
16229 fi
8690e634 16230
8690e634
JK
16231
16232
8690e634
JK
16233
16234
6ec2e0f5 16235 GNULIB_FCNTL=1
8690e634 16236
8690e634
JK
16237
16238
8690e634 16239
8690e634 16240
6ec2e0f5
SDJ
16241$as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
16242
8690e634 16243
8690e634 16244
63ce7108
TT
16245
16246
16247
16248
8690e634
JK
16249
16250
16251
16252
16253
16254
16255
16256 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 16257 gl_cv_next_fcntl_h='<'fcntl.h'>'
8690e634 16258 else
6ec2e0f5
SDJ
16259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
16260$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
d0ac1c44 16261if ${gl_cv_next_fcntl_h+:} false; then :
8690e634
JK
16262 $as_echo_n "(cached) " >&6
16263else
16264
4a626d0a
PA
16265
16266
16267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 16268/* end confdefs.h. */
6ec2e0f5 16269#include <fcntl.h>
8690e634 16270_ACEOF
4a626d0a
PA
16271 case "$host_os" in
16272 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16273 *) gl_absname_cpp="$ac_cpp" ;;
16274 esac
16275
16276 case "$host_os" in
16277 mingw*)
16278 gl_dirsep_regex='[/\\]'
16279 ;;
16280 *)
16281 gl_dirsep_regex='\/'
16282 ;;
16283 esac
16284 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 16285 gl_header_literal_regex=`echo 'fcntl.h' \
4a626d0a
PA
16286 | sed -e "$gl_make_literal_regex_sed"`
16287 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16288 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16289 s|^/[^/]|//&|
16290 p
16291 q
16292 }'
8690e634 16293
6ec2e0f5 16294 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a 16295 sed -n "$gl_absolute_header_sed"`
c971b7fa 16296
6ec2e0f5
SDJ
16297 gl_header=$gl_cv_absolute_fcntl_h
16298 gl_cv_next_fcntl_h='"'$gl_header'"'
8690e634
JK
16299
16300
16301fi
6ec2e0f5
SDJ
16302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
16303$as_echo "$gl_cv_next_fcntl_h" >&6; }
8690e634 16304 fi
6ec2e0f5 16305 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
8690e634
JK
16306
16307 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16308 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 16309 gl_next_as_first_directive='<'fcntl.h'>'
8690e634
JK
16310 else
16311 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 16312 gl_next_as_first_directive=$gl_cv_next_fcntl_h
8690e634 16313 fi
6ec2e0f5 16314 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
8690e634
JK
16315
16316
16317
16318
16319
16320
6ec2e0f5
SDJ
16321
16322
16323
16324
5e8754f9
SDJ
16325 for gl_func in fcntl openat; do
16326 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
16327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
16328$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
16329if eval \${$as_gl_Symbol+:} false; then :
16330 $as_echo_n "(cached) " >&6
16331else
16332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16333/* end confdefs.h. */
16334#include <fcntl.h>
8690e634 16335
5e8754f9
SDJ
16336int
16337main ()
16338{
16339#undef $gl_func
16340 (void) $gl_func;
16341 ;
16342 return 0;
16343}
16344_ACEOF
16345if ac_fn_c_try_compile "$LINENO"; then :
16346 eval "$as_gl_Symbol=yes"
16347else
16348 eval "$as_gl_Symbol=no"
16349fi
16350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16351fi
16352eval ac_res=\$$as_gl_Symbol
16353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16354$as_echo "$ac_res" >&6; }
16355 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
16356 cat >>confdefs.h <<_ACEOF
16357#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
7a6dbc2f 16358_ACEOF
8690e634 16359
5e8754f9
SDJ
16360 eval ac_cv_have_decl_$gl_func=yes
16361fi
16362 done
16363
8690e634
JK
16364
16365
8839a007 16366
63ce7108 16367
63ce7108 16368
63ce7108 16369
6ec2e0f5
SDJ
16370 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
16371#include <dirent.h>
16372
16373"
d0ac1c44 16374if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
6ec2e0f5
SDJ
16375 ac_have_decl=1
16376else
16377 ac_have_decl=0
16378fi
16379
16380cat >>confdefs.h <<_ACEOF
16381#define HAVE_DECL_FDOPENDIR $ac_have_decl
63ce7108 16382_ACEOF
6ec2e0f5
SDJ
16383if test $ac_have_decl = 1; then :
16384
63ce7108 16385else
6ec2e0f5 16386 HAVE_DECL_FDOPENDIR=0
63ce7108 16387fi
63ce7108
TT
16388
16389
472fa5ee
SM
16390 :
16391
16392
16393
16394
16395
6ec2e0f5
SDJ
16396 if test $ac_cv_func_fdopendir = no; then
16397 HAVE_FDOPENDIR=0
16398 else
16399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
16400$as_echo_n "checking whether fdopendir works... " >&6; }
d0ac1c44 16401if ${gl_cv_func_fdopendir_works+:} false; then :
6ec2e0f5
SDJ
16402 $as_echo_n "(cached) " >&6
16403else
16404 if test "$cross_compiling" = yes; then :
16405 case "$host_os" in
16406 # Guess yes on glibc systems.
16407 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
16408 # If we don't know, assume the worst.
16409 *) gl_cv_func_fdopendir_works="guessing no" ;;
16410 esac
16411
63ce7108
TT
16412else
16413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16414/* end confdefs.h. */
16415
6ec2e0f5
SDJ
16416#include <dirent.h>
16417#include <fcntl.h>
16418#include <unistd.h>
16419#if !HAVE_DECL_FDOPENDIR
16420extern
16421# ifdef __cplusplus
16422"C"
16423# endif
16424DIR *fdopendir (int);
16425#endif
63ce7108
TT
16426
16427int
16428main ()
16429{
6ec2e0f5
SDJ
16430int result = 0;
16431 int fd = open ("conftest.c", O_RDONLY);
16432 if (fd < 0) result |= 1;
16433 if (fdopendir (fd)) result |= 2;
16434 if (close (fd)) result |= 4;
16435 return result;
63ce7108
TT
16436 ;
16437 return 0;
16438}
16439_ACEOF
16440if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 16441 gl_cv_func_fdopendir_works=yes
63ce7108 16442else
6ec2e0f5 16443 gl_cv_func_fdopendir_works=no
63ce7108
TT
16444fi
16445rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16446 conftest.$ac_objext conftest.beam conftest.$ac_ext
16447fi
16448
63ce7108 16449fi
6ec2e0f5
SDJ
16450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
16451$as_echo "$gl_cv_func_fdopendir_works" >&6; }
16452 case "$gl_cv_func_fdopendir_works" in
63ce7108
TT
16453 *yes) ;;
16454 *)
6ec2e0f5 16455 REPLACE_FDOPENDIR=1
63ce7108
TT
16456 ;;
16457 esac
16458 fi
16459
6ec2e0f5 16460 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
09607c9e
TT
16461
16462
16463
4a626d0a
PA
16464
16465
16466
16467
16468
6ec2e0f5 16469 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
4a626d0a 16470
6ec2e0f5 16471 fi
4a626d0a
PA
16472
16473
16474
4a626d0a 16475
4a626d0a 16476
6ec2e0f5 16477 GNULIB_FDOPENDIR=1
4a626d0a
PA
16478
16479
16480
16481
16482
6ec2e0f5 16483$as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
4a626d0a
PA
16484
16485
16486
16487
16488
6ec2e0f5
SDJ
16489cat >>confdefs.h <<_ACEOF
16490#define GNULIB_FDOPENDIR 1
16491_ACEOF
4a626d0a 16492
09607c9e 16493
09607c9e
TT
16494
16495
472fa5ee
SM
16496 :
16497
16498
16499
16500
16501
09607c9e 16502
6ec2e0f5
SDJ
16503
16504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
16505$as_echo_n "checking for flexible array member... " >&6; }
d0ac1c44 16506if ${ac_cv_c_flexmember+:} false; then :
09607c9e
TT
16507 $as_echo_n "(cached) " >&6
16508else
16509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16510/* end confdefs.h. */
6ec2e0f5
SDJ
16511#include <stdlib.h>
16512 #include <stdio.h>
16513 #include <stddef.h>
5e8754f9 16514 struct s { int n; double d[]; };
09607c9e
TT
16515int
16516main ()
16517{
6ec2e0f5
SDJ
16518int m = getchar ();
16519 size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
16520 nbytes += sizeof (struct s) - 1;
16521 nbytes -= nbytes % sizeof (struct s);
16522 struct s *p = malloc (nbytes);
16523 p->d[0] = 0.0;
16524 return p->d != (double *) NULL;
09607c9e
TT
16525 ;
16526 return 0;
16527}
16528_ACEOF
16529if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 16530 ac_cv_c_flexmember=yes
09607c9e 16531else
6ec2e0f5 16532 ac_cv_c_flexmember=no
09607c9e
TT
16533fi
16534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16535fi
6ec2e0f5
SDJ
16536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
16537$as_echo "$ac_cv_c_flexmember" >&6; }
16538 if test $ac_cv_c_flexmember = yes; then
16539
16540$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
09607c9e 16541
09607c9e 16542 else
6ec2e0f5 16543 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
09607c9e 16544
6ec2e0f5
SDJ
16545 fi
16546
16547
16548
16549
16550 FLOAT_H=
16551 REPLACE_FLOAT_LDBL=0
16552 case "$host_os" in
16553 aix* | beos* | openbsd* | mirbsd* | irix*)
16554 FLOAT_H=float.h
16555 ;;
5e8754f9 16556 freebsd*)
6ec2e0f5
SDJ
16557 case "$host_cpu" in
16558 i[34567]86 )
16559 FLOAT_H=float.h
16560 ;;
16561 x86_64 )
16562 # On x86_64 systems, the C compiler may still be generating
16563 # 32-bit code.
16564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16565/* end confdefs.h. */
16566#if defined __LP64__ || defined __x86_64__ || defined __amd64__
5e8754f9
SDJ
16567 yes
16568 #endif
09607c9e 16569_ACEOF
5e8754f9
SDJ
16570if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16571 $EGREP "yes" >/dev/null 2>&1; then :
6ec2e0f5 16572
09607c9e 16573else
6ec2e0f5 16574 FLOAT_H=float.h
09607c9e 16575fi
5e8754f9
SDJ
16576rm -f conftest*
16577
6ec2e0f5
SDJ
16578 ;;
16579 esac
16580 ;;
16581 linux*)
16582 case "$host_cpu" in
16583 powerpc*)
16584 FLOAT_H=float.h
16585 ;;
16586 esac
16587 ;;
16588 esac
16589 case "$host_os" in
5e8754f9 16590 aix* | freebsd* | linux*)
6ec2e0f5
SDJ
16591 if test -n "$FLOAT_H"; then
16592 REPLACE_FLOAT_LDBL=1
16593 fi
16594 ;;
16595 esac
16596
16597 REPLACE_ITOLD=0
16598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
16599$as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
d0ac1c44 16600if ${gl_cv_func_itold_works+:} false; then :
09607c9e
TT
16601 $as_echo_n "(cached) " >&6
16602else
09607c9e 16603
6ec2e0f5
SDJ
16604 if test "$cross_compiling" = yes; then :
16605 case "$host" in
16606 sparc*-*-linux*)
16607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16608/* end confdefs.h. */
16609#if defined __LP64__ || defined __arch64__
5e8754f9
SDJ
16610 yes
16611 #endif
09607c9e 16612_ACEOF
5e8754f9
SDJ
16613if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16614 $EGREP "yes" >/dev/null 2>&1; then :
6ec2e0f5 16615 gl_cv_func_itold_works="guessing no"
09607c9e 16616else
6ec2e0f5 16617 gl_cv_func_itold_works="guessing yes"
09607c9e 16618fi
5e8754f9
SDJ
16619rm -f conftest*
16620
6ec2e0f5 16621 ;;
5e8754f9 16622 *) gl_cv_func_itold_works="guessing yes" ;;
6ec2e0f5
SDJ
16623 esac
16624
4a626d0a
PA
16625else
16626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16627/* end confdefs.h. */
4a626d0a 16628
6ec2e0f5
SDJ
16629int i = -1;
16630volatile long double ld;
16631int main ()
4a626d0a 16632{
6ec2e0f5
SDJ
16633 ld += i * 1.0L;
16634 if (ld > 0)
16635 return 1;
4a626d0a
PA
16636 return 0;
16637}
16638_ACEOF
6ec2e0f5
SDJ
16639if ac_fn_c_try_run "$LINENO"; then :
16640 gl_cv_func_itold_works=yes
4a626d0a 16641else
6ec2e0f5
SDJ
16642 gl_cv_func_itold_works=no
16643fi
16644rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16645 conftest.$ac_objext conftest.beam conftest.$ac_ext
16646fi
09607c9e
TT
16647
16648
6ec2e0f5
SDJ
16649fi
16650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
16651$as_echo "$gl_cv_func_itold_works" >&6; }
16652 case "$gl_cv_func_itold_works" in
16653 *no)
16654 REPLACE_ITOLD=1
16655 FLOAT_H=float.h
16656 ;;
16657 esac
09607c9e 16658
6ec2e0f5 16659 if test -n "$FLOAT_H"; then
09607c9e
TT
16660
16661
16662
16663
16664
16665
16666
4a626d0a 16667
09607c9e 16668 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 16669 gl_cv_next_float_h='<'float.h'>'
09607c9e 16670 else
6ec2e0f5
SDJ
16671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
16672$as_echo_n "checking absolute name of <float.h>... " >&6; }
d0ac1c44 16673if ${gl_cv_next_float_h+:} false; then :
09607c9e
TT
16674 $as_echo_n "(cached) " >&6
16675else
16676
4a626d0a
PA
16677
16678
16679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
09607c9e 16680/* end confdefs.h. */
6ec2e0f5 16681#include <float.h>
09607c9e 16682_ACEOF
4a626d0a
PA
16683 case "$host_os" in
16684 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16685 *) gl_absname_cpp="$ac_cpp" ;;
16686 esac
16687
16688 case "$host_os" in
16689 mingw*)
16690 gl_dirsep_regex='[/\\]'
16691 ;;
16692 *)
16693 gl_dirsep_regex='\/'
16694 ;;
16695 esac
16696 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 16697 gl_header_literal_regex=`echo 'float.h' \
4a626d0a
PA
16698 | sed -e "$gl_make_literal_regex_sed"`
16699 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16700 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16701 s|^/[^/]|//&|
16702 p
16703 q
16704 }'
09607c9e 16705
6ec2e0f5 16706 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a 16707 sed -n "$gl_absolute_header_sed"`
09607c9e 16708
6ec2e0f5
SDJ
16709 gl_header=$gl_cv_absolute_float_h
16710 gl_cv_next_float_h='"'$gl_header'"'
09607c9e
TT
16711
16712
16713fi
6ec2e0f5
SDJ
16714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
16715$as_echo "$gl_cv_next_float_h" >&6; }
09607c9e 16716 fi
6ec2e0f5 16717 NEXT_FLOAT_H=$gl_cv_next_float_h
09607c9e
TT
16718
16719 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16720 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 16721 gl_next_as_first_directive='<'float.h'>'
09607c9e
TT
16722 else
16723 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 16724 gl_next_as_first_directive=$gl_cv_next_float_h
09607c9e 16725 fi
6ec2e0f5 16726 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
09607c9e
TT
16727
16728
16729
16730
6ec2e0f5 16731 fi
09607c9e 16732
6ec2e0f5
SDJ
16733 if test -n "$FLOAT_H"; then
16734 GL_GENERATE_FLOAT_H_TRUE=
16735 GL_GENERATE_FLOAT_H_FALSE='#'
3d99e817 16736else
6ec2e0f5
SDJ
16737 GL_GENERATE_FLOAT_H_TRUE='#'
16738 GL_GENERATE_FLOAT_H_FALSE=
3d99e817
AK
16739fi
16740
3d99e817 16741
09607c9e 16742
6ec2e0f5 16743 if test $REPLACE_FLOAT_LDBL = 1; then
8690e634 16744
8690e634 16745
8690e634 16746
8690e634 16747
8690e634 16748
6ec2e0f5
SDJ
16749
16750
16751
16752 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
16753
8690e634 16754 fi
6ec2e0f5 16755 if test $REPLACE_ITOLD = 1; then
8690e634
JK
16756
16757
16758
16759
16760
6ec2e0f5
SDJ
16761
16762
16763
16764 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
16765
8690e634
JK
16766 fi
16767
16768
16769
6ec2e0f5 16770
5e8754f9
SDJ
16771
16772 FNMATCH_H=
6ec2e0f5
SDJ
16773 gl_fnmatch_required_lowercase=`
16774 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
16775 `
5e8754f9
SDJ
16776 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
16777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
6ec2e0f5 16778$as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
d0ac1c44 16779if eval \${$gl_fnmatch_cache_var+:} false; then :
8690e634 16780 $as_echo_n "(cached) " >&6
6ec2e0f5 16781else
5e8754f9
SDJ
16782 if test $gl_fnmatch_required = GNU; then
16783 gl_fnmatch_gnu_start=
16784 gl_fnmatch_gnu_end=
16785 else
16786 gl_fnmatch_gnu_start='#if 0'
16787 gl_fnmatch_gnu_end='#endif'
16788 fi
16789 if test "$cross_compiling" = yes; then :
6ec2e0f5 16790 eval "$gl_fnmatch_cache_var=\"guessing no\""
8690e634
JK
16791else
16792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16793/* end confdefs.h. */
6ec2e0f5 16794#include <fnmatch.h>
5e8754f9
SDJ
16795 static int
16796 y (char const *pattern, char const *string, int flags)
16797 {
16798 return fnmatch (pattern, string, flags) == 0;
16799 }
16800 static int
16801 n (char const *pattern, char const *string, int flags)
16802 {
16803 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
16804 }
8690e634 16805
8690e634
JK
16806int
16807main ()
16808{
6ec2e0f5 16809char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
5e8754f9
SDJ
16810 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
16811 static char const A_1[] = { 'A' - 1, 0 };
16812 static char const A01[] = { 'A' + 1, 0 };
16813 static char const a_1[] = { 'a' - 1, 0 };
16814 static char const a01[] = { 'a' + 1, 0 };
16815 static char const bs_1[] = { '\\\\' - 1, 0 };
16816 static char const bs01[] = { '\\\\' + 1, 0 };
16817 int result = 0;
16818 if (!n ("a*", "", 0))
16819 return 1;
16820 if (!y ("a*", "abc", 0))
16821 return 1;
16822 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
16823 return 1;
16824 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
16825 return 2;
16826 if (!y ("a\\\\bc", "abc", 0))
16827 return 3;
16828 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
16829 return 3;
16830 if (!y ("*x", ".x", 0))
16831 return 4;
16832 if (!n ("*x", ".x", FNM_PERIOD))
16833 return 4;
16834 if (!y (Apat, "\\\\", 0))
16835 return 5;
16836 if (!y (Apat, "A", 0))
16837 return 5;
16838 if (!y (apat, "\\\\", 0))
16839 return 5;
16840 if (!y (apat, "a", 0))
16841 return 5;
16842 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
16843 return 5;
16844 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
16845 return 5;
16846 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
16847 return 5;
16848 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
16849 return 5;
16850 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
16851 return 5;
16852 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
16853 return 5;
16854 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
16855 return 5;
16856 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
16857 return 5;
16858 $gl_fnmatch_gnu_start
16859 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
16860 result |= 8;
16861 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
16862 result |= 16;
16863 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
16864 result |= 32;
16865 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
16866 result |= 64;
16867 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
16868 result |= 64;
16869 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
16870 result |= 64;
16871 $gl_fnmatch_gnu_end
16872 return result;
8690e634
JK
16873
16874 ;
16875 return 0;
16876}
16877_ACEOF
6ec2e0f5
SDJ
16878if ac_fn_c_try_run "$LINENO"; then :
16879 eval "$gl_fnmatch_cache_var=yes"
8690e634 16880else
6ec2e0f5 16881 eval "$gl_fnmatch_cache_var=no"
8690e634 16882fi
6ec2e0f5
SDJ
16883rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16884 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 16885fi
8690e634 16886
8690e634 16887
6ec2e0f5
SDJ
16888fi
16889eval ac_res=\$$gl_fnmatch_cache_var
16890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16891$as_echo "$ac_res" >&6; }
5e8754f9
SDJ
16892 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
16893 if test "$gl_fnmatch_result" = yes; then
16894 rm -f "$gl_source_base/fnmatch.h"
16895 else
16896 FNMATCH_H=fnmatch.h
8690e634
JK
16897 fi
16898
6ec2e0f5
SDJ
16899 if test -n "$FNMATCH_H"; then
16900 GL_GENERATE_FNMATCH_H_TRUE=
16901 GL_GENERATE_FNMATCH_H_FALSE='#'
16902else
16903 GL_GENERATE_FNMATCH_H_TRUE='#'
16904 GL_GENERATE_FNMATCH_H_FALSE=
16905fi
8690e634 16906
8690e634 16907
5e8754f9 16908 if test -n "$FNMATCH_H"; then
8690e634 16909
6ec2e0f5
SDJ
16910
16911
16912
16913
16914
6ec2e0f5
SDJ
16915
16916
7a6dbc2f 16917 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
6ec2e0f5 16918
6ec2e0f5
SDJ
16919
16920
5e8754f9
SDJ
16921cat >>confdefs.h <<_ACEOF
16922#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
16923_ACEOF
16924
16925
6ec2e0f5
SDJ
16926 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
16927"
d0ac1c44 16928if test "x$ac_cv_have_decl_isblank" = xyes; then :
6ec2e0f5 16929 ac_have_decl=1
8690e634 16930else
6ec2e0f5 16931 ac_have_decl=0
8690e634
JK
16932fi
16933
6ec2e0f5
SDJ
16934cat >>confdefs.h <<_ACEOF
16935#define HAVE_DECL_ISBLANK $ac_have_decl
16936_ACEOF
8690e634
JK
16937
16938
472fa5ee
SM
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
16971
8690e634
JK
16972
16973
6ec2e0f5 16974 fi
8690e634
JK
16975
16976
16977
16978
16979
5e8754f9
SDJ
16980 if test -n "$FNMATCH_H"; then
16981
16982
16983
16984
472fa5ee
SM
16985
16986
16987
16988
5e8754f9 16989 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
472fa5ee
SM
16990
16991
16992
5e8754f9
SDJ
16993cat >>confdefs.h <<_ACEOF
16994#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
16995_ACEOF
472fa5ee
SM
16996
16997
5e8754f9
SDJ
16998 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
16999"
17000if test "x$ac_cv_have_decl_isblank" = xyes; then :
17001 ac_have_decl=1
17002else
17003 ac_have_decl=0
17004fi
472fa5ee 17005
5e8754f9
SDJ
17006cat >>confdefs.h <<_ACEOF
17007#define HAVE_DECL_ISBLANK $ac_have_decl
17008_ACEOF
472fa5ee
SM
17009
17010
5e8754f9 17011 :
472fa5ee
SM
17012
17013
17014
17015
17016
17017
17018
17019
17020
17021
17022
98399780 17023
5e8754f9
SDJ
17024
17025
17026
17027
17028
17029
17030
17031
17032
17033
17034
17035
17036
17037
17038
17039 :
17040
17041
17042
17043
17044
17045
17046 fi
17047
17048
17049
17050 FREXP_LIBM=
17051 if test $gl_cv_func_frexp_no_libm = no; then
17052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5
17053$as_echo_n "checking whether frexp() can be used with libm... " >&6; }
17054if ${gl_cv_func_frexp_in_libm+:} false; then :
17055 $as_echo_n "(cached) " >&6
6ec2e0f5 17056else
98399780 17057
5e8754f9
SDJ
17058 save_LIBS="$LIBS"
17059 LIBS="$LIBS -lm"
17060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17061/* end confdefs.h. */
17062#include <math.h>
17063 double x;
17064int
17065main ()
17066{
17067int e; return frexp (x, &e) > 0;
17068 ;
17069 return 0;
17070}
7a6dbc2f 17071_ACEOF
5e8754f9
SDJ
17072if ac_fn_c_try_link "$LINENO"; then :
17073 gl_cv_func_frexp_in_libm=yes
17074else
17075 gl_cv_func_frexp_in_libm=no
17076fi
17077rm -f core conftest.err conftest.$ac_objext \
17078 conftest$ac_exeext conftest.$ac_ext
17079 LIBS="$save_LIBS"
17080
17081fi
17082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5
17083$as_echo "$gl_cv_func_frexp_in_libm" >&6; }
17084 if test $gl_cv_func_frexp_in_libm = yes; then
17085 FREXP_LIBM=-lm
17086 fi
17087 fi
17088 if test $gl_cv_func_frexp_no_libm = yes \
17089 || test $gl_cv_func_frexp_in_libm = yes; then
17090 save_LIBS="$LIBS"
17091 LIBS="$LIBS $FREXP_LIBM"
17092
98399780
YQ
17093
17094
472fa5ee
SM
17095 :
17096
17097
17098
17099
17100
5e8754f9
SDJ
17101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
17102$as_echo_n "checking whether frexp works... " >&6; }
17103if ${gl_cv_func_frexp_works+:} false; then :
17104 $as_echo_n "(cached) " >&6
17105else
17106
17107 if test "$cross_compiling" = yes; then :
17108 case "$host_os" in
17109 netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
17110 *) gl_cv_func_frexp_works="guessing yes";;
17111 esac
17112
17113else
17114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17115/* end confdefs.h. */
17116
17117#include <float.h>
17118#include <math.h>
17119#include <string.h>
17120#if HAVE_DECL_ALARM
17121# include <signal.h>
17122# include <unistd.h>
17123#endif
17124/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
17125 ICC 10.0 has a bug when optimizing the expression -zero.
17126 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
17127 to PowerPC on Mac OS X 10.5. */
17128#if defined __hpux || defined __sgi || defined __ICC
17129static double
17130compute_minus_zero (void)
17131{
17132 return -DBL_MIN * DBL_MIN;
17133}
17134# define minus_zero compute_minus_zero ()
17135#else
17136double minus_zero = -0.0;
17137#endif
17138int main()
17139{
17140 int result = 0;
17141 int i;
17142 volatile double x;
17143 double zero = 0.0;
17144#if HAVE_DECL_ALARM
17145 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
17146 number. Let the test fail in this case. */
17147 signal (SIGALRM, SIG_DFL);
17148 alarm (5);
17149#endif
17150 /* Test on denormalized numbers. */
17151 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
17152 ;
17153 if (x > 0.0)
17154 {
17155 int exp;
17156 double y = frexp (x, &exp);
17157 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
17158 On NetBSD: y = 0.75. Correct: y = 0.5. */
17159 if (y != 0.5)
17160 result |= 1;
17161 }
17162 /* Test on infinite numbers. */
17163 x = 1.0 / zero;
17164 {
17165 int exp;
17166 double y = frexp (x, &exp);
17167 if (y != x)
17168 result |= 2;
17169 }
17170 /* Test on negative zero. */
17171 x = minus_zero;
17172 {
17173 int exp;
17174 double y = frexp (x, &exp);
17175 if (memcmp (&y, &x, sizeof x))
17176 result |= 4;
17177 }
17178 return result;
17179}
17180_ACEOF
17181if ac_fn_c_try_run "$LINENO"; then :
17182 gl_cv_func_frexp_works=yes
17183else
17184 gl_cv_func_frexp_works=no
17185fi
17186rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17187 conftest.$ac_objext conftest.beam conftest.$ac_ext
17188fi
17189
98399780 17190
5e8754f9
SDJ
17191fi
17192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
17193$as_echo "$gl_cv_func_frexp_works" >&6; }
98399780 17194
5e8754f9
SDJ
17195 LIBS="$save_LIBS"
17196 case "$gl_cv_func_frexp_works" in
17197 *yes) gl_func_frexp=yes ;;
17198 *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;;
17199 esac
17200 else
17201 gl_func_frexp=no
17202 fi
17203 if test $gl_func_frexp = yes; then
98399780 17204
5e8754f9 17205$as_echo "#define HAVE_FREXP 1" >>confdefs.h
98399780 17206
5e8754f9 17207 fi
98399780
YQ
17208
17209
5e8754f9 17210 if test $gl_func_frexp != yes; then
6a29c58e
YQ
17211
17212
17213
17214
6a29c58e
YQ
17215
17216
17217
17218
5e8754f9 17219 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
8690e634 17220
5e8754f9 17221 fi
8690e634 17222
8690e634 17223
8690e634 17224
8690e634 17225
8690e634 17226
5e8754f9 17227 GNULIB_FREXP=1
8690e634 17228
8690e634 17229
4a626d0a 17230
8690e634 17231
8690e634 17232
5e8754f9 17233$as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
8690e634
JK
17234
17235
17236
17237
17238
63ce7108 17239
e26b6bb0
TT
17240
17241
17242
5e8754f9
SDJ
17243 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
17244"
17245if test "x$ac_cv_have_decl_frexpl" = xyes; then :
e26b6bb0 17246
5e8754f9
SDJ
17247else
17248 HAVE_DECL_FREXPL=0
17249fi
e26b6bb0
TT
17250
17251
5e8754f9
SDJ
17252 FREXPL_LIBM=
17253 if test $HAVE_DECL_FREXPL = 1; then
e26b6bb0 17254
5e8754f9
SDJ
17255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
17256$as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
17257if ${gl_cv_func_frexpl_no_libm+:} false; then :
17258 $as_echo_n "(cached) " >&6
17259else
e26b6bb0 17260
5e8754f9
SDJ
17261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17262/* end confdefs.h. */
17263#include <math.h>
17264 long double x;
17265int
17266main ()
17267{
17268int e; return frexpl (x, &e) > 0;
17269 ;
17270 return 0;
17271}
17272_ACEOF
17273if ac_fn_c_try_link "$LINENO"; then :
17274 gl_cv_func_frexpl_no_libm=yes
17275else
17276 gl_cv_func_frexpl_no_libm=no
17277fi
17278rm -f core conftest.err conftest.$ac_objext \
17279 conftest$ac_exeext conftest.$ac_ext
e26b6bb0 17280
5e8754f9
SDJ
17281fi
17282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
17283$as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
e26b6bb0 17284
5e8754f9
SDJ
17285 if test $gl_cv_func_frexpl_no_libm = no; then
17286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5
17287$as_echo_n "checking whether frexpl() can be used with libm... " >&6; }
17288if ${gl_cv_func_frexpl_in_libm+:} false; then :
17289 $as_echo_n "(cached) " >&6
17290else
e26b6bb0 17291
5e8754f9
SDJ
17292 save_LIBS="$LIBS"
17293 LIBS="$LIBS -lm"
17294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17295/* end confdefs.h. */
17296#include <math.h>
17297 long double x;
17298int
17299main ()
17300{
17301int e; return frexpl (x, &e) > 0;
17302 ;
17303 return 0;
17304}
17305_ACEOF
17306if ac_fn_c_try_link "$LINENO"; then :
17307 gl_cv_func_frexpl_in_libm=yes
17308else
17309 gl_cv_func_frexpl_in_libm=no
17310fi
17311rm -f core conftest.err conftest.$ac_objext \
17312 conftest$ac_exeext conftest.$ac_ext
17313 LIBS="$save_LIBS"
e26b6bb0 17314
5e8754f9
SDJ
17315fi
17316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5
17317$as_echo "$gl_cv_func_frexpl_in_libm" >&6; }
17318 if test $gl_cv_func_frexpl_in_libm = yes; then
17319 FREXPL_LIBM=-lm
17320 fi
17321 fi
17322 if test $gl_cv_func_frexpl_no_libm = yes \
17323 || test $gl_cv_func_frexpl_in_libm = yes; then
17324 save_LIBS="$LIBS"
17325 LIBS="$LIBS $FREXPL_LIBM"
18848e28 17326
18848e28 17327
5e8754f9
SDJ
17328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
17329$as_echo_n "checking whether frexpl works... " >&6; }
17330if ${gl_cv_func_frexpl_works+:} false; then :
17331 $as_echo_n "(cached) " >&6
17332else
18848e28 17333
5e8754f9 17334 if test "$cross_compiling" = yes; then :
18848e28 17335
5e8754f9
SDJ
17336 case "$host_os" in
17337 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
17338 gl_cv_func_frexpl_works="guessing no";;
17339 *) gl_cv_func_frexpl_works="guessing yes";;
17340 esac
18848e28 17341
5e8754f9
SDJ
17342else
17343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17344/* end confdefs.h. */
18848e28 17345
5e8754f9
SDJ
17346#include <float.h>
17347#include <math.h>
17348/* Override the values of <float.h>, like done in float.in.h. */
17349#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
17350# undef LDBL_MIN_EXP
17351# define LDBL_MIN_EXP (-16381)
17352#endif
17353#if defined __i386__ && defined __FreeBSD__
17354# undef LDBL_MIN_EXP
17355# define LDBL_MIN_EXP (-16381)
17356#endif
17357#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
17358# undef LDBL_MIN_EXP
17359# define LDBL_MIN_EXP DBL_MIN_EXP
17360#endif
17361#if defined __sgi && (LDBL_MANT_DIG >= 106)
17362# if defined __GNUC__
17363# undef LDBL_MIN_EXP
17364# define LDBL_MIN_EXP DBL_MIN_EXP
17365# endif
17366#endif
17367extern
17368#ifdef __cplusplus
17369"C"
17370#endif
17371long double frexpl (long double, int *);
17372int main()
17373{
17374 int result = 0;
17375 volatile long double x;
17376 /* Test on finite numbers that fails on AIX 5.1. */
17377 x = 16.0L;
17378 {
17379 int exp = -9999;
17380 frexpl (x, &exp);
17381 if (exp != 5)
17382 result |= 1;
17383 }
17384 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
17385 function returns an invalid (incorrectly normalized) value: it returns
17386 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
17387 but the correct result is
17388 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
17389 x = 1.01L;
17390 {
17391 int exp = -9999;
17392 long double y = frexpl (x, &exp);
17393 if (!(exp == 1 && y == 0.505L))
17394 result |= 2;
17395 }
17396 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
17397 LDBL_MAX_EXP = 16384.
17398 In the loop end test, we test x against Infinity, rather than comparing
17399 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
17400 {
17401 int i;
17402 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
17403 {
17404 int exp = -9999;
17405 frexpl (x, &exp);
17406 if (exp != i)
17407 {
17408 result |= 4;
17409 break;
17410 }
17411 }
17412 }
17413 /* Test on denormalized numbers. */
17414 {
17415 int i;
17416 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
17417 ;
17418 if (x > 0.0L)
17419 {
17420 int exp;
17421 long double y = frexpl (x, &exp);
17422 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
17423 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
17424 if (exp != LDBL_MIN_EXP - 1)
17425 result |= 8;
17426 }
17427 }
17428 /* Test on infinite numbers. */
17429 x = 1.0L / 0.0L;
17430 {
17431 int exp;
17432 long double y = frexpl (x, &exp);
17433 if (y != x)
17434 result |= 16;
17435 }
17436 return result;
17437}
17438_ACEOF
17439if ac_fn_c_try_run "$LINENO"; then :
17440 gl_cv_func_frexpl_works=yes
17441else
17442 gl_cv_func_frexpl_works=no
17443fi
17444rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17445 conftest.$ac_objext conftest.beam conftest.$ac_ext
17446fi
18848e28
GF
17447
17448
5e8754f9
SDJ
17449fi
17450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
17451$as_echo "$gl_cv_func_frexpl_works" >&6; }
18848e28 17452
5e8754f9
SDJ
17453 LIBS="$save_LIBS"
17454 case "$gl_cv_func_frexpl_works" in
17455 *yes) gl_func_frexpl=yes ;;
17456 *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;;
17457 esac
17458 else
17459 gl_func_frexpl=no
17460 fi
17461 if test $gl_func_frexpl = yes; then
18848e28 17462
5e8754f9 17463$as_echo "#define HAVE_FREXPL 1" >>confdefs.h
18848e28 17464
5e8754f9
SDJ
17465 fi
17466 fi
17467 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
17468 if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
18848e28 17469
5e8754f9
SDJ
17470 FREXPL_LIBM="$FREXP_LIBM"
17471 else
17472 FREXPL_LIBM=
17473 fi
17474 fi
18848e28 17475
18848e28 17476
6ec2e0f5 17477 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
18848e28 17478
18848e28 17479
18848e28 17480
18848e28
GF
17481
17482
18848e28 17483
18848e28 17484
18848e28 17485
6ec2e0f5 17486 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
18848e28
GF
17487
17488 fi
17489
17490
17491
17492
17493
6ec2e0f5 17494 GNULIB_FREXPL=1
18848e28
GF
17495
17496
17497
17498
17499
6ec2e0f5 17500$as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
18848e28
GF
17501
17502
17503
17504
17505
17506
17507
5e8754f9
SDJ
17508 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
17509 REPLACE_FSTAT=1
17510 fi
17511
17512
17513 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
17514 REPLACE_FSTAT=1
17515 fi
18848e28 17516
6a29c58e 17517
6a29c58e 17518
6a29c58e 17519
6ec2e0f5 17520
472fa5ee
SM
17521 :
17522
17523
17524
17525
17526
6ec2e0f5
SDJ
17527 if test $ac_cv_func_fchdir = no; then
17528 HAVE_FCHDIR=0
6a29c58e
YQ
17529 fi
17530
6ec2e0f5
SDJ
17531 if test $HAVE_FCHDIR = 0; then
17532 case "$gl_cv_func_open_directory_works" in
17533 *yes) ;;
17534 *)
17535 REPLACE_FSTAT=1
17536 ;;
17537 esac
17538 fi
6a29c58e
YQ
17539
17540
6ec2e0f5 17541 if test $REPLACE_FSTAT = 1; then
6a29c58e 17542
3d99e817
AK
17543
17544
17545
3d99e817
AK
17546
17547
17548
17549
6ec2e0f5 17550 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
3d99e817 17551
5e8754f9 17552 :
6ec2e0f5 17553 fi
3d99e817
AK
17554
17555
17556
17557
17558
6ec2e0f5 17559 GNULIB_FSTAT=1
3d99e817 17560
49e4877c 17561
49e4877c 17562
49e4877c 17563
49e4877c 17564
6ec2e0f5 17565$as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
49e4877c 17566
6a29c58e
YQ
17567
17568
88b48903 17569
8690e634 17570
a512b375 17571
88b48903 17572
88b48903 17573
472fa5ee
SM
17574 :
17575
17576
17577
17578
17579
6ec2e0f5
SDJ
17580
17581 if test $ac_cv_func_fstatat = no; then
17582 HAVE_FSTATAT=0
17583 else
17584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
17585$as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
d0ac1c44 17586if ${gl_cv_func_fstatat_zero_flag+:} false; then :
6ec2e0f5
SDJ
17587 $as_echo_n "(cached) " >&6
17588else
17589 if test "$cross_compiling" = yes; then :
17590 case "$host_os" in
17591 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
17592 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
17593 esac
88b48903 17594
8690e634
JK
17595else
17596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17597/* end confdefs.h. */
8690e634 17598
6ec2e0f5
SDJ
17599 #include <fcntl.h>
17600 #include <sys/stat.h>
17601 int
17602 main (void)
17603 {
17604 struct stat a;
17605 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
17606 }
17607
88b48903
WN
17608_ACEOF
17609if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 17610 gl_cv_func_fstatat_zero_flag=yes
88b48903 17611else
6ec2e0f5 17612 gl_cv_func_fstatat_zero_flag=no
88b48903
WN
17613fi
17614rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17615 conftest.$ac_objext conftest.beam conftest.$ac_ext
17616fi
17617
17618
17619fi
6ec2e0f5
SDJ
17620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
17621$as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
88b48903 17622
6ec2e0f5
SDJ
17623 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
17624 *yes+*yes) ;;
5e8754f9
SDJ
17625 *) REPLACE_FSTATAT=1
17626 case $gl_cv_func_fstatat_zero_flag in
17627 *yes)
88b48903 17628
6ec2e0f5 17629$as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
88b48903 17630
7a6dbc2f 17631 ;;
5e8754f9
SDJ
17632 esac
17633 ;;
6ec2e0f5
SDJ
17634 esac
17635 fi
88b48903 17636
6ec2e0f5 17637 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
88b48903
WN
17638
17639
17640
17641
17642
88b48903 17643
4a626d0a
PA
17644
17645
6ec2e0f5
SDJ
17646 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
17647
17648 fi
17649
17650
17651
4a626d0a 17652
6ec2e0f5
SDJ
17653
17654 GNULIB_FSTATAT=1
17655
17656
17657
17658
17659
17660$as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
17661
17662
17663
17664
17665
17666
17667
17668
17669 gl_abort_bug=no
4a626d0a
PA
17670 case "$host_os" in
17671 mingw*)
6ec2e0f5 17672 gl_cv_func_getcwd_path_max=yes
4a626d0a
PA
17673 ;;
17674 *)
88b48903 17675
88b48903 17676
472fa5ee
SM
17677 :
17678
17679
17680
17681
17682
17683
17684
17685 :
17686
17687
17688
88b48903
WN
17689
17690
88b48903 17691
6ec2e0f5
SDJ
17692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
17693$as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
d0ac1c44 17694if ${gl_cv_func_getcwd_path_max+:} false; then :
6ec2e0f5
SDJ
17695 $as_echo_n "(cached) " >&6
17696else
17697 # Arrange for deletion of the temporary directory this test creates.
17698 ac_clean_files="$ac_clean_files confdir3"
17699 if test "$cross_compiling" = yes; then :
b567ca63
SM
17700 # Cross-compilation guesses:
17701 case "$host_os" in
17702 aix*) # On AIX, it has the AIX bug.
17703 gl_cv_func_getcwd_path_max='no, it has the AIX bug' ;;
17704 gnu*) # On Hurd, it is 'yes'.
17705 gl_cv_func_getcwd_path_max=yes ;;
17706 linux* | kfreebsd*)
17707 # On older Linux+glibc it's 'no, but it is partly working',
17708 # on newer Linux+glibc it's 'yes'.
17709 # On Linux+musl libc, it's 'no, but it is partly working'.
17710 # On kFreeBSD+glibc, it's 'no, but it is partly working'.
17711 gl_cv_func_getcwd_path_max='no, but it is partly working' ;;
17712 *) # If we don't know, assume the worst.
17713 gl_cv_func_getcwd_path_max=no ;;
5e8754f9 17714 esac
b567ca63 17715
6ec2e0f5
SDJ
17716else
17717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17718/* end confdefs.h. */
88b48903 17719
6ec2e0f5
SDJ
17720#include <errno.h>
17721#include <stdlib.h>
17722#if HAVE_UNISTD_H
17723# include <unistd.h>
17724#else
17725# include <direct.h>
17726#endif
17727#include <string.h>
17728#include <limits.h>
17729#include <sys/stat.h>
17730#include <sys/types.h>
17731#include <fcntl.h>
88b48903
WN
17732
17733
6ec2e0f5
SDJ
17734/* Arrange to define PATH_MAX, like "pathmax.h" does. */
17735#if HAVE_UNISTD_H
17736# include <unistd.h>
17737#endif
17738#include <limits.h>
17739#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
17740# include <sys/param.h>
17741#endif
17742#if !defined PATH_MAX && defined MAXPATHLEN
17743# define PATH_MAX MAXPATHLEN
17744#endif
17745#ifdef __hpux
17746# undef PATH_MAX
17747# define PATH_MAX 1024
17748#endif
5e8754f9 17749#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6ec2e0f5
SDJ
17750# undef PATH_MAX
17751# define PATH_MAX 260
17752#endif
88b48903 17753
88b48903 17754
6ec2e0f5
SDJ
17755#ifndef AT_FDCWD
17756# define AT_FDCWD 0
17757#endif
17758#ifdef ENAMETOOLONG
17759# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
17760#else
17761# define is_ENAMETOOLONG(x) 0
17762#endif
88b48903 17763
6ec2e0f5
SDJ
17764/* Use the getcwd function, not any macro. */
17765#undef getcwd
88b48903 17766
6ec2e0f5
SDJ
17767/* Don't get link errors because mkdir is redefined to rpl_mkdir. */
17768#undef mkdir
88b48903 17769
6ec2e0f5
SDJ
17770#ifndef S_IRWXU
17771# define S_IRWXU 0700
17772#endif
88b48903 17773
6ec2e0f5
SDJ
17774/* The length of this name must be 8. */
17775#define DIR_NAME "confdir3"
17776#define DIR_NAME_LEN 8
17777#define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
88b48903 17778
6ec2e0f5
SDJ
17779/* The length of "../". */
17780#define DOTDOTSLASH_LEN 3
88b48903 17781
6ec2e0f5
SDJ
17782/* Leftover bytes in the buffer, to work around library or OS bugs. */
17783#define BUF_SLOP 20
88b48903 17784
6ec2e0f5
SDJ
17785int
17786main ()
17787{
17788#ifndef PATH_MAX
17789 /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
17790 at least not on a local file system. And if we were to start worrying
17791 about remote file systems, we'd have to enable the wrapper function
17792 all of the time, just to be safe. That's not worth the cost. */
17793 exit (0);
17794#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
17795 - DIR_NAME_SIZE - BUF_SLOP) \
17796 <= PATH_MAX)
17797 /* FIXME: Assuming there's a system for which this is true,
17798 this should be done in a compile test. */
17799 exit (0);
17800#else
17801 char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
17802 + DIR_NAME_SIZE + BUF_SLOP];
17803 char *cwd = getcwd (buf, PATH_MAX);
17804 size_t initial_cwd_len;
17805 size_t cwd_len;
17806 int fail = 0;
17807 size_t n_chdirs = 0;
88b48903 17808
6ec2e0f5
SDJ
17809 if (cwd == NULL)
17810 exit (10);
88b48903 17811
6ec2e0f5 17812 cwd_len = initial_cwd_len = strlen (cwd);
88b48903 17813
6ec2e0f5
SDJ
17814 while (1)
17815 {
17816 size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
17817 char *c = NULL;
17818
17819 cwd_len += DIR_NAME_SIZE;
17820 /* If mkdir or chdir fails, it could be that this system cannot create
17821 any file with an absolute name longer than PATH_MAX, such as cygwin.
17822 If so, leave fail as 0, because the current working directory can't
17823 be too long for getcwd if it can't even be created. For other
17824 errors, be pessimistic and consider that as a failure, too. */
17825 if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
17826 {
17827 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
17828 fail = 20;
17829 break;
17830 }
88b48903 17831
6ec2e0f5
SDJ
17832 if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
17833 {
17834 struct stat sb;
88b48903 17835
6ec2e0f5
SDJ
17836 c = getcwd (buf, PATH_MAX);
17837 if (!c && errno == ENOENT)
17838 {
17839 fail = 11;
17840 break;
17841 }
17842 if (c)
17843 {
17844 fail = 31;
17845 break;
17846 }
17847 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
17848 {
17849 fail = 21;
17850 break;
17851 }
88b48903 17852
6ec2e0f5
SDJ
17853 /* Our replacement needs to be able to stat() long ../../paths,
17854 so generate a path larger than PATH_MAX to check,
17855 avoiding the replacement if we can't stat(). */
17856 c = getcwd (buf, cwd_len + 1);
17857 if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno))
17858 {
17859 fail = 32;
17860 break;
17861 }
17862 }
88b48903 17863
6ec2e0f5
SDJ
17864 if (dotdot_max <= cwd_len - initial_cwd_len)
17865 {
17866 if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
17867 break;
17868 c = getcwd (buf, cwd_len + 1);
17869 if (!c)
17870 {
17871 if (! (errno == ERANGE || errno == ENOENT
17872 || is_ENAMETOOLONG (errno)))
17873 {
17874 fail = 22;
17875 break;
17876 }
17877 if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
17878 {
17879 fail = 12;
17880 break;
17881 }
17882 }
17883 }
88b48903 17884
6ec2e0f5
SDJ
17885 if (c && strlen (c) != cwd_len)
17886 {
17887 fail = 23;
17888 break;
17889 }
17890 ++n_chdirs;
17891 }
88b48903 17892
6ec2e0f5
SDJ
17893 /* Leaving behind such a deep directory is not polite.
17894 So clean up here, right away, even though the driving
17895 shell script would also clean up. */
17896 {
17897 size_t i;
88b48903 17898
6ec2e0f5
SDJ
17899 /* Try rmdir first, in case the chdir failed. */
17900 rmdir (DIR_NAME);
17901 for (i = 0; i <= n_chdirs; i++)
17902 {
17903 if (chdir ("..") < 0)
17904 break;
17905 if (rmdir (DIR_NAME) != 0)
17906 break;
17907 }
17908 }
88b48903 17909
6ec2e0f5
SDJ
17910 exit (fail);
17911#endif
17912}
88b48903 17913
6ec2e0f5
SDJ
17914_ACEOF
17915if ac_fn_c_try_run "$LINENO"; then :
17916 gl_cv_func_getcwd_path_max=yes
17917else
17918 case $? in
5e8754f9
SDJ
17919 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
17920 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
17921 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
17922 *) gl_cv_func_getcwd_path_max=no;;
17923 esac
6ec2e0f5
SDJ
17924fi
17925rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17926 conftest.$ac_objext conftest.beam conftest.$ac_ext
17927fi
88b48903 17928
88b48903 17929
6ec2e0f5
SDJ
17930fi
17931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
17932$as_echo "$gl_cv_func_getcwd_path_max" >&6; }
88b48903 17933
6ec2e0f5
SDJ
17934 case "$gl_cv_func_getcwd_null" in
17935 *yes)
88b48903
WN
17936
17937
472fa5ee
SM
17938 :
17939
17940
17941
17942
17943
17944
17945 :
17946
17947
17948
17949
88b48903
WN
17950
17951
5e8754f9
SDJ
17952 for ac_func in getpagesize
17953do :
17954 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
17955if test "x$ac_cv_func_getpagesize" = xyes; then :
17956 cat >>confdefs.h <<_ACEOF
7a6dbc2f
SDJ
17957#define HAVE_GETPAGESIZE 1
17958_ACEOF
17959
5e8754f9
SDJ
17960fi
17961done
6ec2e0f5
SDJ
17962
17963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5
17964$as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; }
d0ac1c44 17965if ${gl_cv_func_getcwd_abort_bug+:} false; then :
88b48903
WN
17966 $as_echo_n "(cached) " >&6
17967else
6ec2e0f5
SDJ
17968 # Remove any remnants of a previous test.
17969 rm -rf confdir-14B---
17970 # Arrange for deletion of the temporary directory this test creates.
17971 ac_clean_files="$ac_clean_files confdir-14B---"
17972 if test "$cross_compiling" = yes; then :
17973 gl_cv_func_getcwd_abort_bug=yes
88b48903
WN
17974else
17975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17976/* end confdefs.h. */
6ec2e0f5
SDJ
17977
17978#include <errno.h>
17979#include <stdlib.h>
17980#if HAVE_UNISTD_H
17981# include <unistd.h>
17982#else /* on Windows with MSVC */
17983# include <direct.h>
17984#endif
17985#include <string.h>
17986#include <sys/stat.h>
17987
17988
17989/* Arrange to define PATH_MAX, like "pathmax.h" does. */
17990#if HAVE_UNISTD_H
17991# include <unistd.h>
17992#endif
17993#include <limits.h>
17994#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
17995# include <sys/param.h>
17996#endif
17997#if !defined PATH_MAX && defined MAXPATHLEN
17998# define PATH_MAX MAXPATHLEN
17999#endif
18000#ifdef __hpux
18001# undef PATH_MAX
18002# define PATH_MAX 1024
18003#endif
5e8754f9 18004#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6ec2e0f5
SDJ
18005# undef PATH_MAX
18006# define PATH_MAX 260
18007#endif
18008
18009
18010/* Don't get link errors because mkdir is redefined to rpl_mkdir. */
18011#undef mkdir
18012
18013#ifndef S_IRWXU
18014# define S_IRWXU 0700
18015#endif
18016
18017/* FIXME: skip the run-test altogether on systems without getpagesize. */
18018#if ! HAVE_GETPAGESIZE
18019# define getpagesize() 0
18020#endif
18021
18022/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
18023 the 16kB pagesize on ia64 linux. Those conditions make the code below
18024 trigger a bug in glibc's getcwd implementation before 2.4.90-10. */
18025#define TARGET_LEN (5 * 1024)
88b48903
WN
18026
18027int
18028main ()
18029{
6ec2e0f5
SDJ
18030 char *cwd;
18031 size_t initial_cwd_len;
18032 int fail = 0;
18033
18034 /* The bug is triggered when PATH_MAX < getpagesize (), so skip
18035 this relatively expensive and invasive test if that's not true. */
18036#ifdef PATH_MAX
18037 int bug_possible = PATH_MAX < getpagesize ();
18038#else
18039 int bug_possible = 0;
18040#endif
18041 if (! bug_possible)
18042 return 0;
8690e634 18043
6ec2e0f5
SDJ
18044 cwd = getcwd (NULL, 0);
18045 if (cwd == NULL)
18046 return 2;
18047
18048 initial_cwd_len = strlen (cwd);
18049 free (cwd);
18050
18051 if (1)
18052 {
18053 static char const dir_name[] = "confdir-14B---";
18054 size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
18055 / sizeof dir_name);
18056 size_t d;
18057 for (d = 0; d < desired_depth; d++)
18058 {
18059 if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
18060 {
18061 if (! (errno == ERANGE || errno == ENAMETOOLONG
18062 || errno == ENOENT))
18063 fail = 3; /* Unable to construct deep hierarchy. */
18064 break;
18065 }
18066 }
18067
18068 /* If libc has the bug in question, this invocation of getcwd
18069 results in a failed assertion. */
18070 cwd = getcwd (NULL, 0);
18071 if (cwd == NULL)
18072 fail = 4; /* getcwd didn't assert, but it failed for a long name
18073 where the answer could have been learned. */
18074 free (cwd);
18075
18076 /* Call rmdir first, in case the above chdir failed. */
18077 rmdir (dir_name);
18078 while (0 < d--)
18079 {
18080 if (chdir ("..") < 0)
18081 {
18082 fail = 5;
18083 break;
18084 }
18085 rmdir (dir_name);
18086 }
18087 }
18088
18089 return fail;
8690e634 18090}
6ec2e0f5 18091
8690e634
JK
18092_ACEOF
18093if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 18094 gl_cv_func_getcwd_abort_bug=no
8690e634 18095else
5e8754f9
SDJ
18096 ret=$?
18097 if test $ret -ge 128 || test $ret = 4; then
18098 gl_cv_func_getcwd_abort_bug=yes
18099 else
18100 gl_cv_func_getcwd_abort_bug=no
18101 fi
8690e634
JK
18102fi
18103rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18104 conftest.$ac_objext conftest.beam conftest.$ac_ext
18105fi
18106
18107
18108fi
6ec2e0f5
SDJ
18109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5
18110$as_echo "$gl_cv_func_getcwd_abort_bug" >&6; }
18111 if test $gl_cv_func_getcwd_abort_bug = yes; then :
18112 gl_abort_bug=yes
18113fi
18114
18115 ;;
18116 esac
18117 ;;
18118 esac
18119 case "$gl_cv_func_getcwd_path_max" in
18120 "no"|"no, it has the AIX bug") ;;
18121 *)
18122
18123$as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
18124
18125 ;;
18126 esac
18127 case "$gl_cv_func_getcwd_path_max" in
18128 "no, but it is partly working")
18129
18130$as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
18131
18132 ;;
18133 "yes, but with shorter paths")
18134
18135$as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
18136
18137 ;;
18138 esac
18139
18140 if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
18141 || test $gl_cv_func_getcwd_posix_signature != yes \
18142 || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \
18143 || test $gl_abort_bug = yes; then
18144 REPLACE_GETCWD=1
8690e634
JK
18145 fi
18146
6ec2e0f5 18147 if test $REPLACE_GETCWD = 1; then
8690e634
JK
18148
18149
8690e634
JK
18150
18151
18152
18153
18154
18155
6ec2e0f5 18156 gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
8690e634
JK
18157
18158
8690e634
JK
18159
18160
6ec2e0f5
SDJ
18161 :
18162
18163 fi
18164
8690e634
JK
18165
18166cat >>confdefs.h <<_ACEOF
6ec2e0f5 18167#define GNULIB_GETCWD 1
8690e634
JK
18168_ACEOF
18169
18170
8690e634 18171
8690e634
JK
18172
18173
c971b7fa 18174
c971b7fa 18175
6ec2e0f5
SDJ
18176 GNULIB_GETCWD=1
18177
18178
18179
18180
18181
18182$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
18183
c971b7fa 18184
c971b7fa 18185
c971b7fa 18186
c971b7fa 18187
c971b7fa 18188
c971b7fa 18189
c971b7fa 18190
6ec2e0f5
SDJ
18191 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
18192 *yes,yes) ;;
18193 *)
18194 REPLACE_GETCWD=1
18195 ;;
18196 esac
c971b7fa 18197
6ec2e0f5 18198 if test $REPLACE_GETCWD = 1; then
c971b7fa 18199
c971b7fa
PA
18200
18201
c971b7fa
PA
18202
18203
c971b7fa 18204
c971b7fa 18205
c971b7fa 18206
6ec2e0f5 18207 gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
c971b7fa 18208
6ec2e0f5 18209 fi
c971b7fa 18210
c971b7fa 18211
c971b7fa 18212
c971b7fa 18213
8690e634 18214
6ec2e0f5 18215 GNULIB_GETCWD=1
c971b7fa 18216
88b48903
WN
18217
18218
18219
88b48903 18220
6ec2e0f5 18221$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
88b48903 18222
88b48903
WN
18223
18224
18225
6ec2e0f5
SDJ
18226
18227
18228
472fa5ee
SM
18229 :
18230
18231
18232
18233
18234
18235
18236 :
18237
18238
18239
18240
6ec2e0f5
SDJ
18241
18242 if test $ac_cv_func_getdtablesize = yes &&
18243 test $ac_cv_have_decl_getdtablesize = yes; then
5e8754f9
SDJ
18244 # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit
18245 # up to an unchangeable hard limit; all other platforms correctly
18246 # require setrlimit before getdtablesize() can report a larger value.
6ec2e0f5
SDJ
18247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
18248$as_echo_n "checking whether getdtablesize works... " >&6; }
d0ac1c44 18249if ${gl_cv_func_getdtablesize_works+:} false; then :
88b48903
WN
18250 $as_echo_n "(cached) " >&6
18251else
5e8754f9 18252 if test "$cross_compiling" = yes; then :
88b48903 18253 case "$host_os" in
5e8754f9
SDJ
18254 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
18255 gl_cv_func_getdtablesize_works="guessing no" ;;
18256 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
18257 esac
88b48903
WN
18258else
18259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18260/* end confdefs.h. */
18261
5e8754f9 18262 #include <unistd.h>
6ec2e0f5
SDJ
18263int
18264main ()
88b48903 18265{
6ec2e0f5 18266int size = getdtablesize();
5e8754f9
SDJ
18267 if (dup2 (0, getdtablesize()) != -1)
18268 return 1;
18269 if (size != getdtablesize())
18270 return 2;
6ec2e0f5
SDJ
18271
18272 ;
18273 return 0;
88b48903
WN
18274}
18275_ACEOF
18276if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 18277 gl_cv_func_getdtablesize_works=yes
88b48903 18278else
6ec2e0f5 18279 gl_cv_func_getdtablesize_works=no
88b48903
WN
18280fi
18281rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18282 conftest.$ac_objext conftest.beam conftest.$ac_ext
18283fi
18284
18285
18286fi
6ec2e0f5
SDJ
18287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
18288$as_echo "$gl_cv_func_getdtablesize_works" >&6; }
18289 case "$gl_cv_func_getdtablesize_works" in
5e8754f9 18290 *yes) ;;
6ec2e0f5 18291 *) REPLACE_GETDTABLESIZE=1 ;;
88b48903
WN
18292 esac
18293 else
6ec2e0f5 18294 HAVE_GETDTABLESIZE=0
88b48903
WN
18295 fi
18296
6ec2e0f5 18297 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
88b48903
WN
18298
18299
18300
18301
18302
18303
18304
18305
6ec2e0f5 18306 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
88b48903 18307
6ec2e0f5 18308 :
88b48903
WN
18309 fi
18310
18311
18312
18313
18314
6ec2e0f5 18315 GNULIB_GETDTABLESIZE=1
88b48903
WN
18316
18317
18318
88b48903 18319
88b48903 18320
6ec2e0f5 18321$as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
88b48903 18322
88b48903 18323
88b48903 18324
88b48903 18325
88b48903 18326
88b48903 18327
88b48903 18328
88b48903
WN
18329
18330
472fa5ee
SM
18331 :
18332
18333
18334
18335
18336
6ec2e0f5
SDJ
18337 if test $ac_cv_have_decl_getlogin_r = no; then
18338 HAVE_DECL_GETLOGIN_R=0
18339 fi
88b48903 18340
88b48903 18341
472fa5ee
SM
18342 :
18343
18344
18345
18346
18347
6ec2e0f5
SDJ
18348 if test $ac_cv_func_getlogin_r = no; then
18349 HAVE_GETLOGIN_R=0
18350 else
18351 HAVE_GETLOGIN_R=1
18352
18353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getlogin_r works with small buffers" >&5
18354$as_echo_n "checking whether getlogin_r works with small buffers... " >&6; }
d0ac1c44 18355if ${gl_cv_func_getlogin_r_works+:} false; then :
6ec2e0f5
SDJ
18356 $as_echo_n "(cached) " >&6
18357else
88b48903 18358
6ec2e0f5 18359 case "$host_os" in
5e8754f9
SDJ
18360 # Guess no on OSF/1.
18361 osf*) gl_cv_func_getlogin_r_works="guessing no" ;;
18362 # Guess yes otherwise.
18363 *) gl_cv_func_getlogin_r_works="guessing yes" ;;
6ec2e0f5
SDJ
18364 esac
18365 if test "$cross_compiling" = yes; then :
18366 :
88b48903
WN
18367else
18368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18369/* end confdefs.h. */
18370
6ec2e0f5
SDJ
18371#include <stddef.h>
18372#include <unistd.h>
18373#if !HAVE_DECL_GETLOGIN_R
88b48903 18374extern
6ec2e0f5 18375# ifdef __cplusplus
88b48903 18376"C"
6ec2e0f5
SDJ
18377# endif
18378int getlogin_r (char *, size_t);
88b48903 18379#endif
6ec2e0f5
SDJ
18380int
18381main (void)
88b48903
WN
18382{
18383 int result = 0;
6ec2e0f5
SDJ
18384 char buf[100];
18385
18386 if (getlogin_r (buf, 0) == 0)
5e8754f9 18387 result |= 16;
6ec2e0f5 18388 if (getlogin_r (buf, 1) == 0)
5e8754f9 18389 result |= 17;
88b48903
WN
18390 return result;
18391}
18392_ACEOF
18393if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 18394 gl_cv_func_getlogin_r_works=yes
88b48903 18395else
5e8754f9
SDJ
18396 case $? in
18397 16 | 17) gl_cv_func_getlogin_r_works=no ;;
18398 esac
18399
88b48903
WN
18400fi
18401rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18402 conftest.$ac_objext conftest.beam conftest.$ac_ext
18403fi
18404
18405
4a626d0a 18406fi
6ec2e0f5
SDJ
18407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getlogin_r_works" >&5
18408$as_echo "$gl_cv_func_getlogin_r_works" >&6; }
18409 case "$gl_cv_func_getlogin_r_works" in
18410 *yes) ;;
18411 *) REPLACE_GETLOGIN_R=1 ;;
18412 esac
18413 fi
18414
18415 if test $HAVE_GETLOGIN_R = 0 || test $REPLACE_GETLOGIN_R = 1; then
18416
18417
18418
18419
18420
18421
18422
18423
18424 gl_LIBOBJS="$gl_LIBOBJS getlogin_r.$ac_objext"
4a626d0a 18425
4a626d0a 18426
4a626d0a 18427
472fa5ee
SM
18428 :
18429
18430
18431
18432
18433
4a626d0a 18434
4a626d0a
PA
18435 fi
18436
18437
4a626d0a
PA
18438
18439
18440
6ec2e0f5 18441 GNULIB_GETLOGIN_R=1
4a626d0a
PA
18442
18443
18444
18445
18446
6ec2e0f5 18447$as_echo "#define GNULIB_TEST_GETLOGIN_R 1" >>confdefs.h
4a626d0a 18448
4a626d0a
PA
18449
18450
18451
18452
472fa5ee
SM
18453 :
18454
18455
18456
18457
18458
18459
18460
18461
4a626d0a 18462
6ec2e0f5
SDJ
18463 ac_found=0
18464 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
18465"
d0ac1c44 18466if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
6ec2e0f5
SDJ
18467 ac_have_decl=1
18468else
18469 ac_have_decl=0
18470fi
18471
18472cat >>confdefs.h <<_ACEOF
18473#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
18474_ACEOF
18475if test $ac_have_decl = 1; then :
18476 ac_found=1
18477fi
18478
18479 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
18480"
d0ac1c44 18481if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
6ec2e0f5
SDJ
18482 ac_have_decl=1
18483else
18484 ac_have_decl=0
18485fi
18486
18487cat >>confdefs.h <<_ACEOF
18488#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
18489_ACEOF
18490if test $ac_have_decl = 1; then :
18491 ac_found=1
18492fi
4a626d0a 18493
6ec2e0f5
SDJ
18494 ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
18495"
d0ac1c44 18496if test "x$ac_cv_have_decl___argv" = xyes; then :
6ec2e0f5
SDJ
18497 ac_have_decl=1
18498else
18499 ac_have_decl=0
18500fi
4a626d0a 18501
6ec2e0f5
SDJ
18502cat >>confdefs.h <<_ACEOF
18503#define HAVE_DECL___ARGV $ac_have_decl
18504_ACEOF
18505if test $ac_have_decl = 1; then :
18506 ac_found=1
18507fi
4a626d0a
PA
18508
18509
6ec2e0f5
SDJ
18510 # Incur the cost of this test only if none of the above worked.
18511 if test $ac_found = 0; then
18512 # On OpenBSD 5.1, using the global __progname variable appears to be
18513 # the only way to implement getprogname.
18514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
18515$as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
d0ac1c44 18516if ${gl_cv_var___progname+:} false; then :
6ec2e0f5
SDJ
18517 $as_echo_n "(cached) " >&6
18518else
4a626d0a 18519
6ec2e0f5
SDJ
18520 gl_cv_var___progname=
18521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18522/* end confdefs.h. */
18523extern char *__progname;
18524int
18525main ()
18526{
18527return *__progname;
18528
18529 ;
18530 return 0;
18531}
18532_ACEOF
18533if ac_fn_c_try_link "$LINENO"; then :
18534 gl_cv_var___progname=yes
18535
18536fi
18537rm -f core conftest.err conftest.$ac_objext \
18538 conftest$ac_exeext conftest.$ac_ext
18539
18540
18541fi
18542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
18543$as_echo "$gl_cv_var___progname" >&6; }
18544 if test "$gl_cv_var___progname" = yes; then
18545
18546$as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
18547
18548 fi
18549 fi
4a626d0a
PA
18550
18551
18552
18553
18554
18555
18556
18557
472fa5ee
SM
18558 :
18559
18560
18561
18562
18563
4a626d0a
PA
18564
18565 gl_gettimeofday_timezone=void
18566 if test $ac_cv_func_gettimeofday != yes; then
18567 HAVE_GETTIMEOFDAY=0
18568 else
18569
18570
18571
18572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
18573$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
d0ac1c44 18574if ${gl_cv_func_gettimeofday_clobber+:} false; then :
4a626d0a
PA
18575 $as_echo_n "(cached) " >&6
18576else
18577 if test "$cross_compiling" = yes; then :
18578 # When cross-compiling:
18579 case "$host_os" in
5e8754f9
SDJ
18580 # Guess all is fine on glibc systems.
18581 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
18582 # If we don't know, assume the worst.
18583 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
4a626d0a
PA
18584 esac
18585
18586else
18587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18588/* end confdefs.h. */
18589#include <string.h>
18590 #include <sys/time.h>
18591 #include <time.h>
18592 #include <stdlib.h>
18593
18594int
18595main ()
18596{
18597
18598 time_t t = 0;
18599 struct tm *lt;
18600 struct tm saved_lt;
18601 struct timeval tv;
18602 lt = localtime (&t);
18603 saved_lt = *lt;
18604 gettimeofday (&tv, NULL);
18605 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
18606
18607 ;
18608 return 0;
18609}
18610_ACEOF
18611if ac_fn_c_try_run "$LINENO"; then :
18612 gl_cv_func_gettimeofday_clobber=no
18613else
18614 gl_cv_func_gettimeofday_clobber=yes
18615fi
18616rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18617 conftest.$ac_objext conftest.beam conftest.$ac_ext
18618fi
18619
18620fi
18621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
18622$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
18623
18624 case "$gl_cv_func_gettimeofday_clobber" in
18625 *yes)
18626 REPLACE_GETTIMEOFDAY=1
18627
7a6dbc2f
SDJ
18628 REPLACE_GMTIME=1
18629 REPLACE_LOCALTIME=1
4a626d0a 18630
5e8754f9
SDJ
18631
18632$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
18633
4a626d0a
PA
18634 ;;
18635 esac
18636
18637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
18638$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
d0ac1c44 18639if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
4a626d0a
PA
18640 $as_echo_n "(cached) " >&6
18641else
18642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18643/* end confdefs.h. */
18644#include <sys/time.h>
18645 struct timeval c;
18646 int gettimeofday (struct timeval *restrict, void *restrict);
18647
18648int
18649main ()
18650{
18651/* glibc uses struct timezone * rather than the POSIX void *
18652 if _GNU_SOURCE is defined. However, since the only portable
18653 use of gettimeofday uses NULL as the second parameter, and
18654 since the glibc definition is actually more typesafe, it is
18655 not worth wrapping this to get a compliant signature. */
18656 int (*f) (struct timeval *restrict, void *restrict)
18657 = gettimeofday;
18658 int x = f (&c, 0);
18659 return !(x | c.tv_sec | c.tv_usec);
18660
18661 ;
18662 return 0;
18663}
18664_ACEOF
18665if ac_fn_c_try_compile "$LINENO"; then :
18666 gl_cv_func_gettimeofday_posix_signature=yes
18667else
18668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18669/* end confdefs.h. */
18670#include <sys/time.h>
18671int gettimeofday (struct timeval *restrict, struct timezone *restrict);
18672
18673int
18674main ()
18675{
18676
18677 ;
18678 return 0;
18679}
18680_ACEOF
18681if ac_fn_c_try_compile "$LINENO"; then :
18682 gl_cv_func_gettimeofday_posix_signature=almost
18683else
18684 gl_cv_func_gettimeofday_posix_signature=no
18685fi
18686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18687fi
18688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18689fi
18690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
18691$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
18692 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
18693 gl_gettimeofday_timezone='struct timezone'
18694 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
18695 REPLACE_GETTIMEOFDAY=1
18696 fi
18697 if test $REPLACE_STRUCT_TIMEVAL = 1; then
18698 REPLACE_GETTIMEOFDAY=1
18699 fi
5e8754f9 18700
4a626d0a
PA
18701 fi
18702
18703cat >>confdefs.h <<_ACEOF
18704#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
18705_ACEOF
18706
88b48903 18707
4a626d0a 18708 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
88b48903 18709
88b48903 18710
88b48903 18711
88b48903
WN
18712
18713
88b48903
WN
18714
18715
18716
6ec2e0f5
SDJ
18717 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
18718
6ec2e0f5 18719
5e8754f9
SDJ
18720 for ac_header in sys/timeb.h
18721do :
18722 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
18723if test "x$ac_cv_header_sys_timeb_h" = xyes; then :
18724 cat >>confdefs.h <<_ACEOF
18725#define HAVE_SYS_TIMEB_H 1
18726_ACEOF
6ec2e0f5 18727
5e8754f9 18728fi
6ec2e0f5 18729
5e8754f9 18730done
6ec2e0f5 18731
5e8754f9
SDJ
18732 for ac_func in _ftime
18733do :
18734 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
18735if test "x$ac_cv_func__ftime" = xyes; then :
18736 cat >>confdefs.h <<_ACEOF
18737#define HAVE__FTIME 1
18738_ACEOF
6ec2e0f5 18739
5e8754f9
SDJ
18740fi
18741done
6ec2e0f5
SDJ
18742
18743
5e8754f9 18744 fi
6ec2e0f5
SDJ
18745
18746
18747
6ec2e0f5
SDJ
18748
18749
5e8754f9 18750 GNULIB_GETTIMEOFDAY=1
6ec2e0f5
SDJ
18751
18752
18753
7a6dbc2f
SDJ
18754
18755
5e8754f9 18756$as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
6ec2e0f5
SDJ
18757
18758
18759
5e8754f9
SDJ
18760 GLOB_H=
18761 for ac_header in glob.h
18762do :
18763 ac_fn_c_check_header_mongrel "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default"
18764if test "x$ac_cv_header_glob_h" = xyes; then :
18765 cat >>confdefs.h <<_ACEOF
18766#define HAVE_GLOB_H 1
18767_ACEOF
6ec2e0f5 18768
5e8754f9
SDJ
18769else
18770 GLOB_H=glob.h
18771fi
6ec2e0f5 18772
5e8754f9 18773done
6ec2e0f5
SDJ
18774
18775
5e8754f9
SDJ
18776 if test -z "$GLOB_H"; then
18777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU glob interface version 1" >&5
18778$as_echo_n "checking for GNU glob interface version 1... " >&6; }
18779if ${gl_cv_gnu_glob_interface_version_1+:} false; then :
6ec2e0f5
SDJ
18780 $as_echo_n "(cached) " >&6
18781else
18782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18783/* end confdefs.h. */
18784#include <gnu-versions.h>
5e8754f9 18785char a[_GNU_GLOB_INTERFACE_VERSION == 1 ? 1 : -1];
6ec2e0f5
SDJ
18786_ACEOF
18787if ac_fn_c_try_compile "$LINENO"; then :
5e8754f9 18788 gl_cv_gnu_glob_interface_version_1=yes
6ec2e0f5 18789else
5e8754f9 18790 gl_cv_gnu_glob_interface_version_1=no
6ec2e0f5
SDJ
18791fi
18792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18793fi
5e8754f9
SDJ
18794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_gnu_glob_interface_version_1" >&5
18795$as_echo "$gl_cv_gnu_glob_interface_version_1" >&6; }
18796
18797 if test "$gl_cv_gnu_glob_interface_version_1" = "no"; then
18798 GLOB_H=glob.h
6ec2e0f5 18799 fi
5e8754f9 18800 fi
6ec2e0f5 18801
5e8754f9
SDJ
18802 if test -z "$GLOB_H"; then
18803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether glob lists broken symlinks" >&5
6ec2e0f5 18804$as_echo_n "checking whether glob lists broken symlinks... " >&6; }
d0ac1c44 18805if ${gl_cv_glob_lists_symlinks+:} false; then :
6ec2e0f5
SDJ
18806 $as_echo_n "(cached) " >&6
18807else
5e8754f9
SDJ
18808 if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then
18809 gl_cv_glob_lists_symlinks=maybe
18810 else
18811 # If we can't make a symlink, then we cannot test this issue. Be
18812 # pessimistic about this.
18813 gl_cv_glob_lists_symlinks=no
18814 fi
18815
18816 if test $gl_cv_glob_lists_symlinks = maybe; then
18817 if test "$cross_compiling" = yes; then :
6ec2e0f5
SDJ
18818 gl_cv_glob_lists_symlinks=no
18819else
18820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18821/* end confdefs.h. */
5e8754f9 18822
6ec2e0f5 18823#include <stddef.h>
5e8754f9 18824#include <glob.h>
6ec2e0f5
SDJ
18825int
18826main ()
18827{
18828glob_t found;
5e8754f9 18829if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH) return 1;
6ec2e0f5
SDJ
18830 ;
18831 return 0;
18832}
4a626d0a 18833_ACEOF
6ec2e0f5
SDJ
18834if ac_fn_c_try_run "$LINENO"; then :
18835 gl_cv_glob_lists_symlinks=yes
18836else
18837 gl_cv_glob_lists_symlinks=no
18838fi
18839rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18840 conftest.$ac_objext conftest.beam conftest.$ac_ext
18841fi
88b48903 18842
5e8754f9 18843 fi
4a626d0a 18844fi
6ec2e0f5
SDJ
18845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_glob_lists_symlinks" >&5
18846$as_echo "$gl_cv_glob_lists_symlinks" >&6; }
88b48903 18847
5e8754f9
SDJ
18848 if test $gl_cv_glob_lists_symlinks = no; then
18849 GLOB_H=glob.h
6ec2e0f5
SDJ
18850 fi
18851 fi
4a626d0a 18852
5e8754f9 18853 rm -f conf$$-globtest
4a626d0a 18854
88b48903 18855
6ec2e0f5
SDJ
18856 if test -n "$GLOB_H"; then
18857 GL_GENERATE_GLOB_H_TRUE=
18858 GL_GENERATE_GLOB_H_FALSE='#'
18859else
18860 GL_GENERATE_GLOB_H_TRUE='#'
18861 GL_GENERATE_GLOB_H_FALSE=
18862fi
88b48903 18863
88b48903 18864
5e8754f9 18865 if test -n "$GLOB_H"; then
472fa5ee
SM
18866
18867
18868
18869
18870
18871
18872
18873
18874 gl_LIBOBJS="$gl_LIBOBJS glob.$ac_objext"
18875
18876
18877
7a6dbc2f
SDJ
18878 :
18879
18880
18881
472fa5ee 18882
472fa5ee 18883
88b48903 18884
88b48903 18885
5e8754f9
SDJ
18886 if test $ac_cv_header_sys_cdefs_h = yes; then
18887 HAVE_SYS_CDEFS_H=1
18888 else
18889 HAVE_SYS_CDEFS_H=0
7a6dbc2f 18890 fi
88b48903
WN
18891
18892
725e2999
JB
18893 :
18894
18895
18896
18897
18898
18899
18900
18901
18902
18903
18904
18905 fi
18906
18907 :
18908
18909
18910
18911
18912
18913
18914
18915
18916 HAVE_INET_NTOP=1
18917 INET_NTOP_LIB=
18918
18919
18920
18921
18922 :
18923
18924
18925
18926
18927
18928 if test $ac_cv_header_sys_socket_h != yes; then
18929 for ac_header in winsock2.h
18930do :
18931 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
18932if test "x$ac_cv_header_winsock2_h" = xyes; then :
18933 cat >>confdefs.h <<_ACEOF
18934#define HAVE_WINSOCK2_H 1
18935_ACEOF
18936
18937fi
18938
18939done
18940
18941 fi
18942 if test "$ac_cv_header_winsock2_h" = yes; then
18943 HAVE_WINSOCK2_H=1
18944 UNISTD_H_HAVE_WINSOCK2_H=1
18945 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
18946 else
18947 HAVE_WINSOCK2_H=0
18948 fi
18949
18950
18951 if test $HAVE_WINSOCK2_H = 1; then
18952 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <ws2tcpip.h>
18953"
18954if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
18955 ac_have_decl=1
18956else
18957 ac_have_decl=0
18958fi
18959
18960cat >>confdefs.h <<_ACEOF
18961#define HAVE_DECL_INET_NTOP $ac_have_decl
18962_ACEOF
18963
18964 if test $ac_cv_have_decl_inet_ntop = yes; then
18965 REPLACE_INET_NTOP=1
18966 INET_NTOP_LIB="-lws2_32"
18967 else
18968 HAVE_DECL_INET_NTOP=0
18969 HAVE_INET_NTOP=0
18970 fi
18971 else
18972 gl_save_LIBS=$LIBS
18973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
18974$as_echo_n "checking for library containing inet_ntop... " >&6; }
18975if ${ac_cv_search_inet_ntop+:} false; then :
18976 $as_echo_n "(cached) " >&6
18977else
18978 ac_func_search_save_LIBS=$LIBS
18979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18980/* end confdefs.h. */
18981
18982/* Override any GCC internal prototype to avoid an error.
18983 Use char because int might match the return type of a GCC
18984 builtin and then its argument prototype would still apply. */
18985#ifdef __cplusplus
18986extern "C"
18987#endif
18988char inet_ntop ();
18989int
18990main ()
18991{
18992return inet_ntop ();
18993 ;
18994 return 0;
18995}
18996_ACEOF
18997for ac_lib in '' nsl resolv; do
18998 if test -z "$ac_lib"; then
18999 ac_res="none required"
19000 else
19001 ac_res=-l$ac_lib
19002 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
19003 fi
19004 if ac_fn_c_try_link "$LINENO"; then :
19005 ac_cv_search_inet_ntop=$ac_res
19006fi
19007rm -f core conftest.err conftest.$ac_objext \
19008 conftest$ac_exeext
19009 if ${ac_cv_search_inet_ntop+:} false; then :
19010 break
19011fi
19012done
19013if ${ac_cv_search_inet_ntop+:} false; then :
19014
19015else
19016 ac_cv_search_inet_ntop=no
19017fi
19018rm conftest.$ac_ext
19019LIBS=$ac_func_search_save_LIBS
19020fi
19021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
19022$as_echo "$ac_cv_search_inet_ntop" >&6; }
19023ac_res=$ac_cv_search_inet_ntop
19024if test "$ac_res" != no; then :
19025 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19026
19027else
19028 for ac_func in inet_ntop
19029do :
19030 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
19031if test "x$ac_cv_func_inet_ntop" = xyes; then :
19032 cat >>confdefs.h <<_ACEOF
19033#define HAVE_INET_NTOP 1
19034_ACEOF
19035
19036fi
19037done
19038
19039 if test $ac_cv_func_inet_ntop = no; then
19040 HAVE_INET_NTOP=0
19041 fi
19042
19043fi
19044
19045 LIBS=$gl_save_LIBS
19046
19047 if test "$ac_cv_search_inet_ntop" != "no" \
19048 && test "$ac_cv_search_inet_ntop" != "none required"; then
19049 INET_NTOP_LIB="$ac_cv_search_inet_ntop"
19050 fi
19051
19052
19053 :
19054
19055
19056
19057
19058
19059 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <arpa/inet.h>
19060 #if HAVE_NETDB_H
19061 # include <netdb.h>
19062 #endif
19063
19064"
19065if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
19066 ac_have_decl=1
19067else
19068 ac_have_decl=0
19069fi
19070
19071cat >>confdefs.h <<_ACEOF
19072#define HAVE_DECL_INET_NTOP $ac_have_decl
19073_ACEOF
19074
19075 if test $ac_cv_have_decl_inet_ntop = no; then
19076 HAVE_DECL_INET_NTOP=0
19077 fi
19078 fi
19079
19080
19081 if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then
19082
19083
19084
19085
19086
19087
19088
7a6dbc2f 19089
725e2999 19090 gl_LIBOBJS="$gl_LIBOBJS inet_ntop.$ac_objext"
7a6dbc2f
SDJ
19091
19092
19093
7a6dbc2f 19094
725e2999 19095 fi
7a6dbc2f
SDJ
19096
19097
19098
19099
7a6dbc2f 19100
725e2999
JB
19101 GNULIB_INET_NTOP=1
19102
7a6dbc2f
SDJ
19103
19104
49e4877c
PA
19105
19106
88b48903
WN
19107
19108
19109
19110
19111 PRIPTR_PREFIX=
19112 if test -n "$STDINT_H"; then
19113 PRIPTR_PREFIX='"l"'
19114 else
19115 for glpfx in '' l ll I64; do
19116 case $glpfx in
19117 '') gltype1='int';;
19118 l) gltype1='long int';;
19119 ll) gltype1='long long int';;
19120 I64) gltype1='__int64';;
19121 esac
19122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19123/* end confdefs.h. */
19124#include <stdint.h>
19125 extern intptr_t foo;
19126 extern $gltype1 foo;
19127int
19128main ()
19129{
19130
19131 ;
19132 return 0;
19133}
19134_ACEOF
19135if ac_fn_c_try_compile "$LINENO"; then :
19136 PRIPTR_PREFIX='"'$glpfx'"'
19137fi
19138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19139 test -n "$PRIPTR_PREFIX" && break
19140 done
19141 fi
19142
19143
19144
19145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
19146$as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
d0ac1c44 19147if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
88b48903
WN
19148 $as_echo_n "(cached) " >&6
19149else
19150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19151/* end confdefs.h. */
19152/* Work also in C++ mode. */
19153 #define __STDC_LIMIT_MACROS 1
19154
19155 /* Work if build is not clean. */
19156 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
19157
19158 #include <limits.h>
19159 #if HAVE_STDINT_H
19160 #include <stdint.h>
19161 #endif
19162
19163 #if defined INT32_MAX && defined INTMAX_MAX
19164 #define CONDITION (INT32_MAX < INTMAX_MAX)
19165 #elif HAVE_LONG_LONG_INT
19166 #define CONDITION (sizeof (int) < sizeof (long long int))
19167 #else
19168 #define CONDITION 0
19169 #endif
19170 int test[CONDITION ? 1 : -1];
19171int
19172main ()
19173{
19174
19175 ;
19176 return 0;
19177}
19178_ACEOF
19179if ac_fn_c_try_compile "$LINENO"; then :
19180 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
19181else
19182 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
19183fi
19184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19185fi
19186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
19187$as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
19188 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
19189 INT32_MAX_LT_INTMAX_MAX=1;
19190 else
19191 INT32_MAX_LT_INTMAX_MAX=0;
19192 fi
19193
19194
19195 if test $APPLE_UNIVERSAL_BUILD = 0; then
19196
19197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
19198$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
d0ac1c44 19199if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
88b48903
WN
19200 $as_echo_n "(cached) " >&6
19201else
19202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19203/* end confdefs.h. */
19204/* Work also in C++ mode. */
19205 #define __STDC_LIMIT_MACROS 1
19206
19207 /* Work if build is not clean. */
19208 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
19209
19210 #include <limits.h>
19211 #if HAVE_STDINT_H
19212 #include <stdint.h>
19213 #endif
19214
19215 #if defined INT64_MAX
19216 #define CONDITION (INT64_MAX == LONG_MAX)
19217 #elif HAVE_LONG_LONG_INT
19218 #define CONDITION (sizeof (long long int) == sizeof (long int))
19219 #else
19220 #define CONDITION 0
19221 #endif
19222 int test[CONDITION ? 1 : -1];
19223int
19224main ()
19225{
19226
19227 ;
19228 return 0;
19229}
19230_ACEOF
19231if ac_fn_c_try_compile "$LINENO"; then :
19232 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
19233else
19234 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
19235fi
19236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19237fi
19238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
19239$as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
19240 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
19241 INT64_MAX_EQ_LONG_MAX=1;
19242 else
19243 INT64_MAX_EQ_LONG_MAX=0;
19244 fi
19245
19246
19247 else
19248 INT64_MAX_EQ_LONG_MAX=-1
19249 fi
19250
19251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
19252$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
d0ac1c44 19253if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
88b48903
WN
19254 $as_echo_n "(cached) " >&6
19255else
19256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19257/* end confdefs.h. */
19258/* Work also in C++ mode. */
19259 #define __STDC_LIMIT_MACROS 1
19260
19261 /* Work if build is not clean. */
19262 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
19263
19264 #include <limits.h>
19265 #if HAVE_STDINT_H
19266 #include <stdint.h>
19267 #endif
19268
19269 #if defined UINT32_MAX && defined UINTMAX_MAX
19270 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
19271 #elif HAVE_LONG_LONG_INT
19272 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
19273 #else
19274 #define CONDITION 0
19275 #endif
19276 int test[CONDITION ? 1 : -1];
19277int
19278main ()
19279{
19280
19281 ;
19282 return 0;
19283}
19284_ACEOF
19285if ac_fn_c_try_compile "$LINENO"; then :
19286 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
19287else
19288 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
19289fi
19290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19291fi
19292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
19293$as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
19294 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
19295 UINT32_MAX_LT_UINTMAX_MAX=1;
19296 else
19297 UINT32_MAX_LT_UINTMAX_MAX=0;
19298 fi
19299
19300
19301 if test $APPLE_UNIVERSAL_BUILD = 0; then
19302
19303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
19304$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
d0ac1c44 19305if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
88b48903
WN
19306 $as_echo_n "(cached) " >&6
19307else
19308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19309/* end confdefs.h. */
19310/* Work also in C++ mode. */
19311 #define __STDC_LIMIT_MACROS 1
19312
19313 /* Work if build is not clean. */
19314 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
19315
19316 #include <limits.h>
19317 #if HAVE_STDINT_H
19318 #include <stdint.h>
19319 #endif
19320
19321 #if defined UINT64_MAX
19322 #define CONDITION (UINT64_MAX == ULONG_MAX)
19323 #elif HAVE_LONG_LONG_INT
19324 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
19325 #else
19326 #define CONDITION 0
19327 #endif
19328 int test[CONDITION ? 1 : -1];
19329int
19330main ()
19331{
19332
19333 ;
19334 return 0;
19335}
19336_ACEOF
19337if ac_fn_c_try_compile "$LINENO"; then :
19338 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
19339else
19340 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
19341fi
19342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19343fi
19344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
19345$as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
19346 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
19347 UINT64_MAX_EQ_ULONG_MAX=1;
19348 else
19349 UINT64_MAX_EQ_ULONG_MAX=0;
19350 fi
19351
19352
19353 else
19354 UINT64_MAX_EQ_ULONG_MAX=-1
19355 fi
19356
19357
19358
19359
19360
19361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
19362$as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
d0ac1c44 19363if ${gl_cv_func_isnand_no_libm+:} false; then :
88b48903
WN
19364 $as_echo_n "(cached) " >&6
19365else
19366
19367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19368/* end confdefs.h. */
19369#include <math.h>
19370 #if __GNUC__ >= 4
19371 # undef isnand
19372 # define isnand(x) __builtin_isnan ((double)(x))
19373 #else
19374 # undef isnand
19375 # define isnand(x) isnan ((double)(x))
19376 #endif
19377 double x;
19378int
19379main ()
19380{
19381return isnand (x);
19382 ;
19383 return 0;
19384}
19385_ACEOF
19386if ac_fn_c_try_link "$LINENO"; then :
19387 gl_cv_func_isnand_no_libm=yes
19388else
19389 gl_cv_func_isnand_no_libm=no
19390fi
19391rm -f core conftest.err conftest.$ac_objext \
19392 conftest$ac_exeext conftest.$ac_ext
19393
19394fi
19395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
19396$as_echo "$gl_cv_func_isnand_no_libm" >&6; }
19397
19398 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
19399 if test $gl_cv_func_isnand_no_libm = yes; then
19400
19401$as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
19402
19403 fi
19404
19405 if test $gl_func_isnand_no_libm != yes; then
19406
19407
19408
19409
19410
19411
19412
19413
19414 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
19415
19416
19417
19418
19419 fi
19420
19421
19422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
19423$as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
d0ac1c44 19424if ${gl_cv_func_isnanl_no_libm+:} false; then :
88b48903
WN
19425 $as_echo_n "(cached) " >&6
19426else
19427
19428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19429/* end confdefs.h. */
19430#include <math.h>
19431 #if __GNUC__ >= 4
19432 # undef isnanl
19433 # define isnanl(x) __builtin_isnanl ((long double)(x))
19434 #elif defined isnan
19435 # undef isnanl
19436 # define isnanl(x) isnan ((long double)(x))
19437 #endif
19438 long double x;
19439int
19440main ()
19441{
19442return isnanl (x);
19443 ;
19444 return 0;
19445}
19446_ACEOF
19447if ac_fn_c_try_link "$LINENO"; then :
19448 gl_cv_func_isnanl_no_libm=yes
19449else
19450 gl_cv_func_isnanl_no_libm=no
19451fi
19452rm -f core conftest.err conftest.$ac_objext \
19453 conftest$ac_exeext conftest.$ac_ext
19454
19455fi
19456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
19457$as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
19458
19459 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
19460 if test $gl_func_isnanl_no_libm = yes; then
19461
19462
19463
19464
19465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
19466$as_echo_n "checking whether isnanl works... " >&6; }
d0ac1c44 19467if ${gl_cv_func_isnanl_works+:} false; then :
88b48903
WN
19468 $as_echo_n "(cached) " >&6
19469else
19470
19471 if test "$cross_compiling" = yes; then :
4a626d0a 19472 gl_cv_func_isnanl_works="guessing yes"
88b48903
WN
19473else
19474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19475/* end confdefs.h. */
19476
19477#include <float.h>
19478#include <limits.h>
19479#include <math.h>
19480#if __GNUC__ >= 4
19481# undef isnanl
19482# define isnanl(x) __builtin_isnanl ((long double)(x))
19483#elif defined isnan
19484# undef isnanl
19485# define isnanl(x) isnan ((long double)(x))
19486#endif
19487#define NWORDS \
19488 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
19489typedef union { unsigned int word[NWORDS]; long double value; }
19490 memory_long_double;
19491/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
19492 runtime type conversion. */
19493#ifdef __sgi
19494static long double NaNl ()
19495{
19496 double zero = 0.0;
19497 return zero / zero;
19498}
19499#else
19500# define NaNl() (0.0L / 0.0L)
19501#endif
19502int main ()
19503{
19504 int result = 0;
19505
19506 if (!isnanl (NaNl ()))
19507 result |= 1;
19508
19509 {
19510 memory_long_double m;
19511 unsigned int i;
19512
19513 /* The isnanl function should be immune against changes in the sign bit and
19514 in the mantissa bits. The xor operation twiddles a bit that can only be
19515 a sign bit or a mantissa bit (since the exponent never extends to
19516 bit 31). */
19517 m.value = NaNl ();
19518 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
19519 for (i = 0; i < NWORDS; i++)
19520 m.word[i] |= 1;
19521 if (!isnanl (m.value))
19522 result |= 1;
19523 }
19524
19525#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
19526/* Representation of an 80-bit 'long double' as an initializer for a sequence
19527 of 'unsigned int' words. */
19528# ifdef WORDS_BIGENDIAN
19529# define LDBL80_WORDS(exponent,manthi,mantlo) \
19530 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
4a626d0a 19531 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
88b48903
WN
19532 (unsigned int) (mantlo) << 16 \
19533 }
19534# else
19535# define LDBL80_WORDS(exponent,manthi,mantlo) \
19536 { mantlo, manthi, exponent }
19537# endif
19538 { /* Quiet NaN. */
19539 static memory_long_double x =
19540 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
19541 if (!isnanl (x.value))
19542 result |= 2;
19543 }
19544 {
19545 /* Signalling NaN. */
19546 static memory_long_double x =
19547 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
19548 if (!isnanl (x.value))
19549 result |= 2;
19550 }
4a626d0a 19551 /* isnanl should return something even for noncanonical values. */
88b48903
WN
19552 { /* Pseudo-NaN. */
19553 static memory_long_double x =
19554 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
4a626d0a 19555 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
19556 result |= 4;
19557 }
19558 { /* Pseudo-Infinity. */
19559 static memory_long_double x =
19560 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
4a626d0a 19561 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
19562 result |= 8;
19563 }
19564 { /* Pseudo-Zero. */
19565 static memory_long_double x =
19566 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
4a626d0a 19567 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
19568 result |= 16;
19569 }
19570 { /* Unnormalized number. */
19571 static memory_long_double x =
19572 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
4a626d0a 19573 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
19574 result |= 32;
19575 }
19576 { /* Pseudo-Denormal. */
19577 static memory_long_double x =
19578 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
4a626d0a 19579 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
19580 result |= 64;
19581 }
19582#endif
19583
19584 return result;
19585}
19586_ACEOF
19587if ac_fn_c_try_run "$LINENO"; then :
19588 gl_cv_func_isnanl_works=yes
19589else
19590 gl_cv_func_isnanl_works=no
19591fi
19592rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19593 conftest.$ac_objext conftest.beam conftest.$ac_ext
19594fi
19595
19596
19597fi
19598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
19599$as_echo "$gl_cv_func_isnanl_works" >&6; }
19600
19601 case "$gl_cv_func_isnanl_works" in
19602 *yes) ;;
19603 *) gl_func_isnanl_no_libm=no ;;
19604 esac
19605 fi
19606 if test $gl_func_isnanl_no_libm = yes; then
19607
19608$as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
19609
19610 fi
19611
19612 if test $gl_func_isnanl_no_libm != yes; then
19613
19614
19615
19616
19617
19618
19619
19620
19621 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
19622
19623
19624
19625
5e8754f9 19626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
88b48903 19627$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
d0ac1c44 19628if ${gl_cv_cc_long_double_expbit0+:} false; then :
88b48903
WN
19629 $as_echo_n "(cached) " >&6
19630else
19631
19632 if test "$cross_compiling" = yes; then :
19633
19634 gl_cv_cc_long_double_expbit0="unknown"
19635
19636else
19637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19638/* end confdefs.h. */
19639
19640#include <float.h>
19641#include <stddef.h>
19642#include <stdio.h>
19643#include <string.h>
19644#define NWORDS \
19645 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
19646typedef union { long double value; unsigned int word[NWORDS]; }
19647 memory_long_double;
19648static unsigned int ored_words[NWORDS];
19649static unsigned int anded_words[NWORDS];
19650static void add_to_ored_words (long double x)
19651{
19652 memory_long_double m;
19653 size_t i;
19654 /* Clear it first, in case
19655 sizeof (long double) < sizeof (memory_long_double). */
19656 memset (&m, 0, sizeof (memory_long_double));
19657 m.value = x;
19658 for (i = 0; i < NWORDS; i++)
19659 {
19660 ored_words[i] |= m.word[i];
19661 anded_words[i] &= m.word[i];
19662 }
19663}
19664int main ()
19665{
19666 size_t j;
19667 FILE *fp = fopen ("conftest.out", "w");
19668 if (fp == NULL)
19669 return 1;
19670 for (j = 0; j < NWORDS; j++)
19671 anded_words[j] = ~ (unsigned int) 0;
19672 add_to_ored_words (0.25L);
19673 add_to_ored_words (0.5L);
19674 add_to_ored_words (1.0L);
19675 add_to_ored_words (2.0L);
19676 add_to_ored_words (4.0L);
19677 /* Remove bits that are common (e.g. if representation of the first mantissa
19678 bit is explicit). */
19679 for (j = 0; j < NWORDS; j++)
19680 ored_words[j] &= ~anded_words[j];
19681 /* Now find the nonzero word. */
19682 for (j = 0; j < NWORDS; j++)
19683 if (ored_words[j] != 0)
19684 break;
19685 if (j < NWORDS)
19686 {
19687 size_t i;
19688 for (i = j + 1; i < NWORDS; i++)
19689 if (ored_words[i] != 0)
19690 {
19691 fprintf (fp, "unknown");
19692 return (fclose (fp) != 0);
19693 }
19694 for (i = 0; ; i++)
19695 if ((ored_words[j] >> i) & 1)
19696 {
19697 fprintf (fp, "word %d bit %d", (int) j, (int) i);
19698 return (fclose (fp) != 0);
19699 }
19700 }
19701 fprintf (fp, "unknown");
19702 return (fclose (fp) != 0);
19703}
19704
19705_ACEOF
19706if ac_fn_c_try_run "$LINENO"; then :
19707 gl_cv_cc_long_double_expbit0=`cat conftest.out`
19708else
19709 gl_cv_cc_long_double_expbit0="unknown"
19710fi
19711rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19712 conftest.$ac_objext conftest.beam conftest.$ac_ext
19713fi
19714
19715 rm -f conftest.out
19716
19717fi
19718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
19719$as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
19720 case "$gl_cv_cc_long_double_expbit0" in
19721 word*bit*)
19722 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
19723 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
19724
19725cat >>confdefs.h <<_ACEOF
19726#define LDBL_EXPBIT0_WORD $word
19727_ACEOF
19728
19729
19730cat >>confdefs.h <<_ACEOF
19731#define LDBL_EXPBIT0_BIT $bit
19732_ACEOF
19733
19734 ;;
19735 esac
19736
19737
19738
19739 fi
19740
19741
19742
19743
88b48903
WN
19744
19745
5e8754f9 19746 :
472fa5ee
SM
19747
19748
19749
19750
19751
88b48903
WN
19752
19753
2196f55f 19754
49e4877c 19755
5e8754f9 19756 LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
88b48903
WN
19757
19758
19759
19760
472fa5ee
SM
19761 :
19762
19763
19764
19765
19766
f45c62c4
YQ
19767 if test $ac_cv_func_lstat = yes; then
19768
5e8754f9
SDJ
19769 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
19770 *no)
f45c62c4
YQ
19771 REPLACE_LSTAT=1
19772 ;;
19773 esac
19774 else
19775 HAVE_LSTAT=0
19776 fi
19777
19778 if test $REPLACE_LSTAT = 1; then
19779
19780
19781
19782
19783
19784
19785
19786
19787 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
19788
19789 :
19790 fi
19791
19792
19793
19794
19795
19796 GNULIB_LSTAT=1
19797
19798
19799
19800
19801
19802$as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
19803
19804
19805
19806
19807
19808
6a29c58e
YQ
19809 if test $gl_cv_func_malloc_posix = yes; then
19810
19811$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
19812
19813 else
19814 REPLACE_MALLOC=1
19815 fi
19816
19817 if test $REPLACE_MALLOC = 1; then
19818
19819
19820
19821
19822
19823
19824
19825
19826 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
19827
19828 fi
19829
19830
19831
19832
19833
19834 GNULIB_MALLOC_POSIX=1
19835
19836
19837
19838
19839
19840$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
19841
19842
19843
19844
19845
19846
88b48903
WN
19847
19848
19849
19850
19851
88b48903 19852
c971b7fa 19853
c971b7fa 19854
98399780 19855
472fa5ee
SM
19856 :
19857
19858
19859
19860
19861
98399780
YQ
19862
19863
19864
88b48903
WN
19865 if test $gl_cv_have_include_next = yes; then
19866 gl_cv_next_math_h='<'math.h'>'
19867 else
19868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
19869$as_echo_n "checking absolute name of <math.h>... " >&6; }
d0ac1c44 19870if ${gl_cv_next_math_h+:} false; then :
88b48903
WN
19871 $as_echo_n "(cached) " >&6
19872else
c971b7fa 19873
88b48903 19874 if test $ac_cv_header_math_h = yes; then
c971b7fa
PA
19875
19876
4a626d0a
PA
19877
19878
19879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 19880/* end confdefs.h. */
88b48903 19881#include <math.h>
8690e634 19882_ACEOF
4a626d0a
PA
19883 case "$host_os" in
19884 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19885 *) gl_absname_cpp="$ac_cpp" ;;
19886 esac
19887
19888 case "$host_os" in
19889 mingw*)
19890 gl_dirsep_regex='[/\\]'
19891 ;;
19892 *)
19893 gl_dirsep_regex='\/'
19894 ;;
19895 esac
19896 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19897 gl_header_literal_regex=`echo 'math.h' \
19898 | sed -e "$gl_make_literal_regex_sed"`
19899 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19900 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19901 s|^/[^/]|//&|
19902 p
19903 q
19904 }'
19905
19906 gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19907 sed -n "$gl_absolute_header_sed"`
19908
19909 gl_header=$gl_cv_absolute_math_h
19910 gl_cv_next_math_h='"'$gl_header'"'
88b48903
WN
19911 else
19912 gl_cv_next_math_h='<'math.h'>'
19913 fi
8690e634 19914
c971b7fa 19915
88b48903
WN
19916fi
19917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
19918$as_echo "$gl_cv_next_math_h" >&6; }
19919 fi
19920 NEXT_MATH_H=$gl_cv_next_math_h
c971b7fa 19921
88b48903
WN
19922 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19923 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19924 gl_next_as_first_directive='<'math.h'>'
19925 else
19926 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19927 gl_next_as_first_directive=$gl_cv_next_math_h
19928 fi
19929 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
8690e634 19930
c971b7fa 19931
c971b7fa
PA
19932
19933
c971b7fa 19934
88b48903
WN
19935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
19936$as_echo_n "checking whether NAN macro works... " >&6; }
d0ac1c44 19937if ${gl_cv_header_math_nan_works+:} false; then :
c971b7fa
PA
19938 $as_echo_n "(cached) " >&6
19939else
8690e634
JK
19940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19941/* end confdefs.h. */
88b48903 19942#include <math.h>
c971b7fa
PA
19943int
19944main ()
19945{
88b48903
WN
19946/* Solaris 10 has a broken definition of NAN. Other platforms
19947 fail to provide NAN, or provide it only in C99 mode; this
19948 test only needs to fail when NAN is provided but wrong. */
19949 float f = 1.0f;
19950#ifdef NAN
19951 f = NAN;
19952#endif
19953 return f == 0;
c971b7fa
PA
19954 ;
19955 return 0;
19956}
19957_ACEOF
19958if ac_fn_c_try_compile "$LINENO"; then :
88b48903 19959 gl_cv_header_math_nan_works=yes
8690e634 19960else
88b48903 19961 gl_cv_header_math_nan_works=no
c971b7fa
PA
19962fi
19963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 19964fi
88b48903
WN
19965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
19966$as_echo "$gl_cv_header_math_nan_works" >&6; }
19967 if test $gl_cv_header_math_nan_works = no; then
19968 REPLACE_NAN=1
c971b7fa 19969 fi
88b48903
WN
19970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
19971$as_echo_n "checking whether HUGE_VAL works... " >&6; }
d0ac1c44 19972if ${gl_cv_header_math_huge_val_works+:} false; then :
c971b7fa
PA
19973 $as_echo_n "(cached) " >&6
19974else
8690e634 19975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 19976/* end confdefs.h. */
88b48903 19977#include <math.h>
c971b7fa
PA
19978int
19979main ()
19980{
88b48903
WN
19981/* Solaris 10 has a broken definition of HUGE_VAL. */
19982 double d = HUGE_VAL;
19983 return d == 0;
c971b7fa
PA
19984 ;
19985 return 0;
19986}
19987_ACEOF
19988if ac_fn_c_try_compile "$LINENO"; then :
88b48903 19989 gl_cv_header_math_huge_val_works=yes
8690e634 19990else
88b48903 19991 gl_cv_header_math_huge_val_works=no
c971b7fa
PA
19992fi
19993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 19994fi
88b48903
WN
19995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
19996$as_echo "$gl_cv_header_math_huge_val_works" >&6; }
19997 if test $gl_cv_header_math_huge_val_works = no; then
19998 REPLACE_HUGE_VAL=1
8690e634 19999 fi
c971b7fa 20000
c971b7fa 20001
5e8754f9
SDJ
20002 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
20003 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
20004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
20005$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
20006if eval \${$as_gl_Symbol+:} false; then :
20007 $as_echo_n "(cached) " >&6
20008else
20009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20010/* end confdefs.h. */
20011#include <math.h>
20012int
20013main ()
20014{
20015#undef $gl_func
20016 (void) $gl_func;
20017 ;
20018 return 0;
20019}
20020_ACEOF
20021if ac_fn_c_try_compile "$LINENO"; then :
20022 eval "$as_gl_Symbol=yes"
20023else
20024 eval "$as_gl_Symbol=no"
20025fi
20026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20027fi
20028eval ac_res=\$$as_gl_Symbol
20029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20030$as_echo "$ac_res" >&6; }
20031 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
20032 cat >>confdefs.h <<_ACEOF
20033#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
20034_ACEOF
c971b7fa 20035
5e8754f9
SDJ
20036 eval ac_cv_have_decl_$gl_func=yes
20037fi
20038 done
c971b7fa
PA
20039
20040
20041
20042
20043
c971b7fa 20044
c971b7fa 20045
c971b7fa 20046
c971b7fa
PA
20047
20048
c971b7fa 20049
472fa5ee
SM
20050 :
20051
20052
20053
20054
20055
20056
20057 :
20058
20059
20060
20061
8690e634
JK
20062
20063 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
20064
20065
20066
20067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
20068$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
d0ac1c44 20069if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
c971b7fa
PA
20070 $as_echo_n "(cached) " >&6
20071else
8690e634
JK
20072
20073 case "$host_os" in
20074 # Guess no on AIX and OSF/1.
20075 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
20076 # Guess yes otherwise.
20077 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
20078 esac
20079 if test $LOCALE_JA != none; then
20080 if test "$cross_compiling" = yes; then :
20081 :
20082else
c971b7fa
PA
20083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20084/* end confdefs.h. */
c971b7fa 20085
8690e634
JK
20086#include <locale.h>
20087#include <string.h>
20088/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20089 <wchar.h>.
20090 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20091 included before <wchar.h>. */
20092#include <stddef.h>
20093#include <stdio.h>
20094#include <time.h>
20095#include <wchar.h>
20096int main ()
c971b7fa 20097{
8690e634
JK
20098 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
20099 {
20100 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
20101 mbstate_t state;
20102 wchar_t wc;
20103
20104 memset (&state, '\0', sizeof (mbstate_t));
20105 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
20106 if (mbsinit (&state))
5e8754f9 20107 return 1;
8690e634 20108 }
c971b7fa
PA
20109 return 0;
20110}
20111_ACEOF
8690e634
JK
20112if ac_fn_c_try_run "$LINENO"; then :
20113 gl_cv_func_mbrtowc_incomplete_state=yes
c971b7fa 20114else
8690e634 20115 gl_cv_func_mbrtowc_incomplete_state=no
c971b7fa 20116fi
8690e634
JK
20117rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20118 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 20119fi
c971b7fa 20120
8690e634 20121 fi
c971b7fa 20122
8690e634
JK
20123fi
20124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
20125$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
c971b7fa 20126
c971b7fa 20127
c971b7fa 20128
c971b7fa 20129
8690e634
JK
20130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
20131$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
d0ac1c44 20132if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
c971b7fa
PA
20133 $as_echo_n "(cached) " >&6
20134else
20135
8690e634
JK
20136 case "$host_os" in
20137 # Guess no on Solaris 8.
20138 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
20139 # Guess yes otherwise.
20140 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
20141 esac
20142 if test $LOCALE_ZH_CN != none; then
20143 if test "$cross_compiling" = yes; then :
20144 :
20145else
20146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
20147/* end confdefs.h. */
20148
8690e634
JK
20149#include <locale.h>
20150#include <stdlib.h>
20151#include <string.h>
20152/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20153 <wchar.h>.
20154 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20155 included before <wchar.h>. */
20156#include <stddef.h>
20157#include <stdio.h>
20158#include <time.h>
20159#include <wchar.h>
20160int main ()
c971b7fa 20161{
8690e634
JK
20162 /* This fails on Solaris 8:
20163 mbrtowc returns 2, and sets wc to 0x00F0.
20164 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
20165 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
20166 {
20167 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
20168 mbstate_t state;
20169 wchar_t wc;
20170
20171 memset (&state, '\0', sizeof (mbstate_t));
20172 if (mbrtowc (&wc, input + 3, 6, &state) != 4
20173 && mbtowc (&wc, input + 3, 6) == 4)
5e8754f9 20174 return 1;
8690e634 20175 }
c971b7fa
PA
20176 return 0;
20177}
20178_ACEOF
8690e634
JK
20179if ac_fn_c_try_run "$LINENO"; then :
20180 gl_cv_func_mbrtowc_sanitycheck=yes
c971b7fa 20181else
8690e634 20182 gl_cv_func_mbrtowc_sanitycheck=no
c971b7fa 20183fi
8690e634
JK
20184rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20185 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 20186fi
c971b7fa 20187
8690e634 20188 fi
c971b7fa 20189
8690e634
JK
20190fi
20191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
20192$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
20193
20194 REPLACE_MBSTATE_T=0
20195 case "$gl_cv_func_mbrtowc_incomplete_state" in
20196 *yes) ;;
20197 *) REPLACE_MBSTATE_T=1 ;;
20198 esac
20199 case "$gl_cv_func_mbrtowc_sanitycheck" in
20200 *yes) ;;
20201 *) REPLACE_MBSTATE_T=1 ;;
20202 esac
c971b7fa 20203 else
8690e634 20204 REPLACE_MBSTATE_T=1
c971b7fa
PA
20205 fi
20206
20207
20208
472fa5ee
SM
20209 :
20210
20211
20212
20213
20214
8690e634
JK
20215 if test $ac_cv_func_mbrtowc = no; then
20216 HAVE_MBRTOWC=0
20217 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
20218/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20219 <wchar.h>.
20220 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20221 included before <wchar.h>. */
20222#include <stddef.h>
20223#include <stdio.h>
20224#include <time.h>
20225#include <wchar.h>
c971b7fa 20226
8690e634 20227"
d0ac1c44 20228if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
8690e634
JK
20229 ac_have_decl=1
20230else
20231 ac_have_decl=0
c971b7fa 20232fi
c971b7fa 20233
8690e634
JK
20234cat >>confdefs.h <<_ACEOF
20235#define HAVE_DECL_MBRTOWC $ac_have_decl
20236_ACEOF
c971b7fa 20237
8690e634
JK
20238 if test $ac_cv_have_decl_mbrtowc = yes; then
20239 REPLACE_MBRTOWC=1
20240 fi
20241 else
20242 if test $REPLACE_MBSTATE_T = 1; then
20243 REPLACE_MBRTOWC=1
20244 else
c971b7fa
PA
20245
20246
20247
8690e634
JK
20248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
20249$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
d0ac1c44 20250if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
8690e634 20251 $as_echo_n "(cached) " >&6
c971b7fa 20252else
c971b7fa 20253
8690e634
JK
20254 case "$host_os" in
20255 # Guess no on Solaris.
20256 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
20257 # Guess yes otherwise.
20258 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
20259 esac
20260 if test $LOCALE_FR_UTF8 != none; then
20261 if test "$cross_compiling" = yes; then :
20262 :
20263else
20264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
20265/* end confdefs.h. */
20266
8690e634
JK
20267#include <locale.h>
20268#include <stdlib.h>
20269#include <string.h>
20270/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20271 <wchar.h>.
20272 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20273 included before <wchar.h>. */
20274#include <stddef.h>
20275#include <stdio.h>
20276#include <time.h>
20277#include <wchar.h>
20278int main ()
20279{
20280 int result = 0;
20281
20282 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
20283 {
20284 char input[] = "\303\237er";
20285 mbstate_t state;
20286 wchar_t wc;
20287 size_t ret;
20288
20289 memset (&state, '\0', sizeof (mbstate_t));
20290 wc = (wchar_t) 0xBADFACE;
20291 ret = mbrtowc (&wc, input, 5, &state);
20292 if (ret != 2)
20293 result |= 1;
20294 if (!mbsinit (&state))
20295 result |= 2;
c971b7fa 20296
8690e634
JK
20297 memset (&state, '\0', sizeof (mbstate_t));
20298 ret = mbrtowc (NULL, input, 5, &state);
20299 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
20300 result |= 4;
20301 if (!mbsinit (&state))
20302 result |= 8;
20303 }
20304 return result;
20305}
c971b7fa 20306_ACEOF
8690e634
JK
20307if ac_fn_c_try_run "$LINENO"; then :
20308 gl_cv_func_mbrtowc_null_arg1=yes
20309else
20310 gl_cv_func_mbrtowc_null_arg1=no
20311fi
20312rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20313 conftest.$ac_objext conftest.beam conftest.$ac_ext
20314fi
c971b7fa 20315
8690e634 20316 fi
c971b7fa 20317
c971b7fa 20318fi
8690e634
JK
20319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
20320$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
c971b7fa 20321
c971b7fa 20322
c971b7fa 20323
c971b7fa 20324
8690e634
JK
20325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
20326$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
d0ac1c44 20327if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
8690e634
JK
20328 $as_echo_n "(cached) " >&6
20329else
c971b7fa 20330
8690e634
JK
20331 case "$host_os" in
20332 # Guess no on OSF/1.
20333 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
20334 # Guess yes otherwise.
20335 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
20336 esac
20337 if test $LOCALE_FR_UTF8 != none; then
20338 if test "$cross_compiling" = yes; then :
c971b7fa 20339 :
8690e634
JK
20340else
20341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20342/* end confdefs.h. */
20343
20344#include <locale.h>
20345#include <string.h>
20346/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20347 <wchar.h>.
20348 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20349 included before <wchar.h>. */
20350#include <stddef.h>
20351#include <stdio.h>
20352#include <time.h>
20353#include <wchar.h>
20354int main ()
20355{
20356 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
20357 {
20358 mbstate_t state;
20359 wchar_t wc;
20360 int ret;
20361
20362 memset (&state, '\0', sizeof (mbstate_t));
20363 wc = (wchar_t) 0xBADFACE;
20364 mbrtowc (&wc, NULL, 5, &state);
20365 /* Check that wc was not modified. */
20366 if (wc != (wchar_t) 0xBADFACE)
5e8754f9 20367 return 1;
8690e634
JK
20368 }
20369 return 0;
20370}
20371_ACEOF
20372if ac_fn_c_try_run "$LINENO"; then :
20373 gl_cv_func_mbrtowc_null_arg2=yes
20374else
20375 gl_cv_func_mbrtowc_null_arg2=no
20376fi
20377rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20378 conftest.$ac_objext conftest.beam conftest.$ac_ext
20379fi
20380
20381 fi
20382
20383fi
20384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
20385$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
c971b7fa
PA
20386
20387
20388
20389
20390
20391
8690e634
JK
20392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
20393$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
d0ac1c44 20394if ${gl_cv_func_mbrtowc_retval+:} false; then :
8690e634
JK
20395 $as_echo_n "(cached) " >&6
20396else
20397
20398 case "$host_os" in
20399 # Guess no on HP-UX, Solaris, native Windows.
20400 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
20401 # Guess yes otherwise.
20402 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
20403 esac
20404 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
20405 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
20406 if test "$cross_compiling" = yes; then :
c971b7fa 20407 :
8690e634
JK
20408else
20409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20410/* end confdefs.h. */
c971b7fa 20411
8690e634
JK
20412#include <locale.h>
20413#include <string.h>
20414/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20415 <wchar.h>.
20416 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20417 included before <wchar.h>. */
20418#include <stddef.h>
20419#include <stdio.h>
20420#include <time.h>
20421#include <wchar.h>
20422int main ()
20423{
20424 int result = 0;
20425 int found_some_locale = 0;
20426 /* This fails on Solaris. */
20427 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
20428 {
20429 char input[] = "B\303\274\303\237er"; /* "Büßer" */
20430 mbstate_t state;
20431 wchar_t wc;
20432
20433 memset (&state, '\0', sizeof (mbstate_t));
20434 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
20435 {
20436 input[1] = '\0';
20437 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
20438 result |= 1;
20439 }
20440 found_some_locale = 1;
20441 }
20442 /* This fails on HP-UX 11.11. */
20443 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
20444 {
20445 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
20446 mbstate_t state;
20447 wchar_t wc;
20448
20449 memset (&state, '\0', sizeof (mbstate_t));
20450 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
20451 {
20452 input[1] = '\0';
20453 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
20454 result |= 2;
20455 }
20456 found_some_locale = 1;
20457 }
20458 /* This fails on native Windows. */
20459 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
20460 {
20461 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
20462 mbstate_t state;
20463 wchar_t wc;
20464
20465 memset (&state, '\0', sizeof (mbstate_t));
20466 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
20467 {
20468 input[3] = '\0';
20469 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
20470 result |= 4;
20471 }
20472 found_some_locale = 1;
20473 }
20474 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
20475 {
20476 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
20477 mbstate_t state;
20478 wchar_t wc;
20479
20480 memset (&state, '\0', sizeof (mbstate_t));
20481 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
20482 {
20483 input[3] = '\0';
20484 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
20485 result |= 8;
20486 }
20487 found_some_locale = 1;
20488 }
20489 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
20490 {
20491 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
20492 mbstate_t state;
20493 wchar_t wc;
20494
20495 memset (&state, '\0', sizeof (mbstate_t));
20496 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
20497 {
20498 input[3] = '\0';
20499 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
20500 result |= 16;
20501 }
20502 found_some_locale = 1;
20503 }
20504 return (found_some_locale ? result : 77);
20505}
20506_ACEOF
20507if ac_fn_c_try_run "$LINENO"; then :
20508 gl_cv_func_mbrtowc_retval=yes
20509else
20510 if test $? != 77; then
20511 gl_cv_func_mbrtowc_retval=no
20512 fi
c971b7fa 20513
8690e634
JK
20514fi
20515rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20516 conftest.$ac_objext conftest.beam conftest.$ac_ext
20517fi
c971b7fa 20518
8690e634 20519 fi
c971b7fa 20520
8690e634
JK
20521fi
20522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
20523$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
c971b7fa
PA
20524
20525
20526
20527
8690e634
JK
20528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
20529$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
d0ac1c44 20530if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
c971b7fa
PA
20531 $as_echo_n "(cached) " >&6
20532else
8690e634
JK
20533
20534 case "$host_os" in
20535 # Guess no on Solaris 8 and 9.
20536 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
20537 # Guess yes otherwise.
20538 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
20539 esac
20540 if test $LOCALE_ZH_CN != none; then
20541 if test "$cross_compiling" = yes; then :
20542 :
c971b7fa
PA
20543else
20544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20545/* end confdefs.h. */
20546
8690e634 20547#include <locale.h>
c971b7fa 20548#include <string.h>
8690e634
JK
20549/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20550 <wchar.h>.
20551 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20552 included before <wchar.h>. */
20553#include <stddef.h>
20554#include <stdio.h>
20555#include <time.h>
20556#include <wchar.h>
20557int main ()
c971b7fa 20558{
8690e634
JK
20559 /* This fails on Solaris 8 and 9. */
20560 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
c971b7fa 20561 {
8690e634
JK
20562 mbstate_t state;
20563 wchar_t wc;
c971b7fa 20564
8690e634
JK
20565 memset (&state, '\0', sizeof (mbstate_t));
20566 if (mbrtowc (&wc, "", 1, &state) != 0)
5e8754f9 20567 return 1;
8690e634 20568 }
c971b7fa
PA
20569 return 0;
20570}
20571_ACEOF
20572if ac_fn_c_try_run "$LINENO"; then :
8690e634 20573 gl_cv_func_mbrtowc_nul_retval=yes
c971b7fa 20574else
8690e634 20575 gl_cv_func_mbrtowc_nul_retval=no
c971b7fa
PA
20576fi
20577rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20578 conftest.$ac_objext conftest.beam conftest.$ac_ext
20579fi
20580
8690e634
JK
20581 fi
20582
c971b7fa 20583fi
8690e634
JK
20584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
20585$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
20586
4a626d0a
PA
20587
20588
20589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
20590$as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
d0ac1c44 20591if ${gl_cv_func_mbrtowc_empty_input+:} false; then :
4a626d0a
PA
20592 $as_echo_n "(cached) " >&6
20593else
20594
20595 case "$host_os" in
5e8754f9
SDJ
20596 # Guess no on AIX and glibc systems.
20597 aix* | *-gnu*)
20598 gl_cv_func_mbrtowc_empty_input="guessing no" ;;
20599 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
4a626d0a
PA
20600 esac
20601 if test "$cross_compiling" = yes; then :
20602 :
20603else
20604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20605/* end confdefs.h. */
20606
20607 #include <wchar.h>
20608 static wchar_t wc;
20609 static mbstate_t mbs;
20610 int
20611 main (void)
20612 {
49e4877c 20613 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
4a626d0a
PA
20614 }
20615_ACEOF
20616if ac_fn_c_try_run "$LINENO"; then :
4a626d0a 20617 gl_cv_func_mbrtowc_empty_input=yes
49e4877c
PA
20618else
20619 gl_cv_func_mbrtowc_empty_input=no
4a626d0a
PA
20620fi
20621rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20622 conftest.$ac_objext conftest.beam conftest.$ac_ext
20623fi
20624
20625
20626fi
20627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
20628$as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
20629
49e4877c 20630
5e8754f9 20631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
49e4877c 20632$as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
d0ac1c44 20633if ${gl_cv_C_locale_sans_EILSEQ+:} false; then :
49e4877c
PA
20634 $as_echo_n "(cached) " >&6
20635else
20636
20637 gl_cv_C_locale_sans_EILSEQ="guessing no"
20638
20639 if test "$cross_compiling" = yes; then :
5e8754f9 20640 :
49e4877c
PA
20641else
20642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20643/* end confdefs.h. */
20644#include <limits.h>
20645 #include <locale.h>
20646 #include <wchar.h>
20647
20648int
20649main ()
20650{
20651
20652 int i;
20653 char *locale = setlocale (LC_ALL, "C");
20654 if (! locale)
5e8754f9 20655 return 1;
49e4877c
PA
20656 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
20657 {
20658 char c = i;
20659 wchar_t wc;
20660 mbstate_t mbs = { 0, };
20661 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
20662 if (1 < ss)
5e8754f9 20663 return 1;
49e4877c
PA
20664 }
20665 return 0;
20666
6ec2e0f5
SDJ
20667 ;
20668 return 0;
20669}
20670_ACEOF
20671if ac_fn_c_try_run "$LINENO"; then :
20672 gl_cv_C_locale_sans_EILSEQ=yes
20673else
20674 gl_cv_C_locale_sans_EILSEQ=no
20675fi
20676rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20677 conftest.$ac_objext conftest.beam conftest.$ac_ext
20678fi
20679
20680fi
20681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5
20682$as_echo "$gl_cv_C_locale_sans_EILSEQ" >&6; }
20683
20684 case "$gl_cv_func_mbrtowc_null_arg1" in
20685 *yes) ;;
20686 *)
20687$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
20688
20689 REPLACE_MBRTOWC=1
20690 ;;
20691 esac
20692 case "$gl_cv_func_mbrtowc_null_arg2" in
20693 *yes) ;;
20694 *)
20695$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
20696
20697 REPLACE_MBRTOWC=1
20698 ;;
20699 esac
20700 case "$gl_cv_func_mbrtowc_retval" in
20701 *yes) ;;
20702 *)
20703$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
20704
20705 REPLACE_MBRTOWC=1
20706 ;;
20707 esac
20708 case "$gl_cv_func_mbrtowc_nul_retval" in
20709 *yes) ;;
20710 *)
20711$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
20712
20713 REPLACE_MBRTOWC=1
20714 ;;
20715 esac
20716 case "$gl_cv_func_mbrtowc_empty_input" in
20717 *yes) ;;
20718 *)
20719$as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
20720
20721 REPLACE_MBRTOWC=1
20722 ;;
20723 esac
20724 case $gl_cv_C_locale_sans_EILSEQ in
20725 *yes) ;;
20726 *)
20727$as_echo "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
20728
20729 REPLACE_MBRTOWC=1
20730 ;;
20731 esac
20732 fi
20733 fi
20734
20735 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
20736
20737
20738
20739
20740
20741
20742
20743
20744 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
20745
20746
20747 :
20748
20749 fi
20750
20751
20752
20753
20754
20755 GNULIB_MBRTOWC=1
20756
20757
20758
20759
20760
20761$as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
20762
20763
20764
20765
20766
20767
20768
20769
20770
20771
20772
20773
20774
472fa5ee
SM
20775 :
20776
20777
20778
20779
20780
20781
20782 :
20783
20784
20785
20786
6ec2e0f5
SDJ
20787
20788 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
20789
20790
20791
20792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
20793$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
d0ac1c44 20794if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
6ec2e0f5
SDJ
20795 $as_echo_n "(cached) " >&6
20796else
20797
20798 case "$host_os" in
20799 # Guess no on AIX and OSF/1.
20800 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
20801 # Guess yes otherwise.
20802 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
20803 esac
20804 if test $LOCALE_JA != none; then
20805 if test "$cross_compiling" = yes; then :
20806 :
20807else
20808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20809/* end confdefs.h. */
20810
20811#include <locale.h>
20812#include <string.h>
20813/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20814 <wchar.h>.
20815 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20816 included before <wchar.h>. */
20817#include <stddef.h>
20818#include <stdio.h>
20819#include <time.h>
20820#include <wchar.h>
20821int main ()
20822{
20823 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
20824 {
20825 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
20826 mbstate_t state;
20827 wchar_t wc;
20828
20829 memset (&state, '\0', sizeof (mbstate_t));
20830 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
20831 if (mbsinit (&state))
5e8754f9 20832 return 1;
6ec2e0f5
SDJ
20833 }
20834 return 0;
20835}
20836_ACEOF
20837if ac_fn_c_try_run "$LINENO"; then :
20838 gl_cv_func_mbrtowc_incomplete_state=yes
20839else
20840 gl_cv_func_mbrtowc_incomplete_state=no
20841fi
20842rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20843 conftest.$ac_objext conftest.beam conftest.$ac_ext
20844fi
20845
20846 fi
20847
20848fi
20849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
20850$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
20851
20852
20853
20854
20855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
20856$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
d0ac1c44 20857if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
6ec2e0f5
SDJ
20858 $as_echo_n "(cached) " >&6
20859else
20860
20861 case "$host_os" in
20862 # Guess no on Solaris 8.
20863 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
20864 # Guess yes otherwise.
20865 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
20866 esac
20867 if test $LOCALE_ZH_CN != none; then
20868 if test "$cross_compiling" = yes; then :
20869 :
20870else
20871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20872/* end confdefs.h. */
20873
20874#include <locale.h>
20875#include <stdlib.h>
20876#include <string.h>
20877/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20878 <wchar.h>.
20879 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20880 included before <wchar.h>. */
20881#include <stddef.h>
20882#include <stdio.h>
20883#include <time.h>
20884#include <wchar.h>
20885int main ()
20886{
20887 /* This fails on Solaris 8:
20888 mbrtowc returns 2, and sets wc to 0x00F0.
20889 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
20890 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
20891 {
20892 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
20893 mbstate_t state;
20894 wchar_t wc;
20895
20896 memset (&state, '\0', sizeof (mbstate_t));
20897 if (mbrtowc (&wc, input + 3, 6, &state) != 4
20898 && mbtowc (&wc, input + 3, 6) == 4)
5e8754f9 20899 return 1;
6ec2e0f5 20900 }
49e4877c
PA
20901 return 0;
20902}
20903_ACEOF
20904if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 20905 gl_cv_func_mbrtowc_sanitycheck=yes
49e4877c 20906else
6ec2e0f5 20907 gl_cv_func_mbrtowc_sanitycheck=no
49e4877c
PA
20908fi
20909rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20910 conftest.$ac_objext conftest.beam conftest.$ac_ext
20911fi
20912
6ec2e0f5
SDJ
20913 fi
20914
49e4877c 20915fi
6ec2e0f5
SDJ
20916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
20917$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
49e4877c 20918
6ec2e0f5
SDJ
20919 REPLACE_MBSTATE_T=0
20920 case "$gl_cv_func_mbrtowc_incomplete_state" in
20921 *yes) ;;
20922 *) REPLACE_MBSTATE_T=1 ;;
20923 esac
20924 case "$gl_cv_func_mbrtowc_sanitycheck" in
20925 *yes) ;;
20926 *) REPLACE_MBSTATE_T=1 ;;
20927 esac
20928 else
20929 REPLACE_MBSTATE_T=1
20930 fi
8690e634 20931
8690e634 20932
8690e634 20933
472fa5ee
SM
20934 :
20935
20936
20937
20938
20939
6ec2e0f5
SDJ
20940 if test $ac_cv_func_mbsinit = no; then
20941 HAVE_MBSINIT=0
20942 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
20943/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20944 <wchar.h>.
20945 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20946 included before <wchar.h>. */
20947#include <stddef.h>
20948#include <stdio.h>
20949#include <time.h>
20950#include <wchar.h>
8690e634 20951
6ec2e0f5 20952"
d0ac1c44 20953if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
6ec2e0f5
SDJ
20954 ac_have_decl=1
20955else
20956 ac_have_decl=0
20957fi
4a626d0a 20958
6ec2e0f5
SDJ
20959cat >>confdefs.h <<_ACEOF
20960#define HAVE_DECL_MBSINIT $ac_have_decl
20961_ACEOF
49e4877c 20962
6ec2e0f5
SDJ
20963 if test $ac_cv_have_decl_mbsinit = yes; then
20964 REPLACE_MBSINIT=1
20965 fi
20966 else
20967 if test $REPLACE_MBSTATE_T = 1; then
20968 REPLACE_MBSINIT=1
20969 else
20970 case "$host_os" in
20971 mingw*) REPLACE_MBSINIT=1 ;;
8690e634 20972 esac
c971b7fa
PA
20973 fi
20974 fi
20975
6ec2e0f5 20976 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
c971b7fa 20977
c971b7fa 20978
c971b7fa
PA
20979
20980
20981
20982
20983
20984
6ec2e0f5 20985 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
8690e634
JK
20986
20987
20988 :
c971b7fa 20989
a512b375 20990 fi
c971b7fa 20991
8690e634
JK
20992
20993
20994
20995
6ec2e0f5 20996 GNULIB_MBSINIT=1
8690e634
JK
20997
20998
20999
21000
8690e634 21001
6ec2e0f5 21002$as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
8690e634
JK
21003
21004
21005
21006
21007
21008
21009
21010
21011
21012
21013
c971b7fa 21014
472fa5ee
SM
21015 :
21016
21017
21018
21019
21020
21021
21022 :
21023
21024
21025
21026
c971b7fa 21027
8690e634 21028 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
c971b7fa 21029
8690e634
JK
21030
21031
21032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
21033$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
d0ac1c44 21034if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
8690e634
JK
21035 $as_echo_n "(cached) " >&6
21036else
21037
21038 case "$host_os" in
21039 # Guess no on AIX and OSF/1.
21040 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
21041 # Guess yes otherwise.
21042 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
21043 esac
21044 if test $LOCALE_JA != none; then
21045 if test "$cross_compiling" = yes; then :
21046 :
c971b7fa
PA
21047else
21048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21049/* end confdefs.h. */
21050
8690e634
JK
21051#include <locale.h>
21052#include <string.h>
21053/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21054 <wchar.h>.
21055 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21056 included before <wchar.h>. */
21057#include <stddef.h>
21058#include <stdio.h>
21059#include <time.h>
21060#include <wchar.h>
21061int main ()
c971b7fa 21062{
8690e634 21063 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
c971b7fa 21064 {
8690e634
JK
21065 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
21066 mbstate_t state;
21067 wchar_t wc;
21068
21069 memset (&state, '\0', sizeof (mbstate_t));
21070 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
21071 if (mbsinit (&state))
5e8754f9 21072 return 1;
c971b7fa 21073 }
c971b7fa
PA
21074 return 0;
21075}
21076_ACEOF
21077if ac_fn_c_try_run "$LINENO"; then :
8690e634 21078 gl_cv_func_mbrtowc_incomplete_state=yes
c971b7fa 21079else
8690e634 21080 gl_cv_func_mbrtowc_incomplete_state=no
c971b7fa
PA
21081fi
21082rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21083 conftest.$ac_objext conftest.beam conftest.$ac_ext
21084fi
21085
8690e634 21086 fi
c971b7fa
PA
21087
21088fi
8690e634
JK
21089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
21090$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
c971b7fa
PA
21091
21092
c971b7fa
PA
21093
21094
8690e634
JK
21095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
21096$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
d0ac1c44 21097if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
c971b7fa
PA
21098 $as_echo_n "(cached) " >&6
21099else
8690e634
JK
21100
21101 case "$host_os" in
21102 # Guess no on Solaris 8.
21103 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
21104 # Guess yes otherwise.
21105 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
21106 esac
21107 if test $LOCALE_ZH_CN != none; then
21108 if test "$cross_compiling" = yes; then :
21109 :
21110else
c971b7fa
PA
21111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21112/* end confdefs.h. */
8690e634
JK
21113
21114#include <locale.h>
21115#include <stdlib.h>
21116#include <string.h>
21117/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21118 <wchar.h>.
21119 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21120 included before <wchar.h>. */
c971b7fa 21121#include <stddef.h>
8690e634
JK
21122#include <stdio.h>
21123#include <time.h>
21124#include <wchar.h>
21125int main ()
c971b7fa 21126{
8690e634
JK
21127 /* This fails on Solaris 8:
21128 mbrtowc returns 2, and sets wc to 0x00F0.
21129 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
21130 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
21131 {
21132 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
21133 mbstate_t state;
21134 wchar_t wc;
21135
21136 memset (&state, '\0', sizeof (mbstate_t));
21137 if (mbrtowc (&wc, input + 3, 6, &state) != 4
21138 && mbtowc (&wc, input + 3, 6) == 4)
5e8754f9 21139 return 1;
8690e634 21140 }
c971b7fa
PA
21141 return 0;
21142}
21143_ACEOF
8690e634
JK
21144if ac_fn_c_try_run "$LINENO"; then :
21145 gl_cv_func_mbrtowc_sanitycheck=yes
c971b7fa 21146else
8690e634 21147 gl_cv_func_mbrtowc_sanitycheck=no
c971b7fa 21148fi
8690e634
JK
21149rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21150 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 21151fi
c971b7fa 21152
8690e634
JK
21153 fi
21154
21155fi
21156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
21157$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
c971b7fa 21158
8690e634
JK
21159 REPLACE_MBSTATE_T=0
21160 case "$gl_cv_func_mbrtowc_incomplete_state" in
21161 *yes) ;;
21162 *) REPLACE_MBSTATE_T=1 ;;
21163 esac
21164 case "$gl_cv_func_mbrtowc_sanitycheck" in
21165 *yes) ;;
21166 *) REPLACE_MBSTATE_T=1 ;;
21167 esac
21168 else
21169 REPLACE_MBSTATE_T=1
c971b7fa
PA
21170 fi
21171
c971b7fa 21172
8690e634 21173
472fa5ee
SM
21174 :
21175
21176
21177
21178
21179
6ec2e0f5
SDJ
21180 if test $ac_cv_func_mbsrtowcs = no; then
21181 HAVE_MBSRTOWCS=0
21182 ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
8690e634
JK
21183/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21184 <wchar.h>.
21185 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21186 included before <wchar.h>. */
21187#include <stddef.h>
21188#include <stdio.h>
21189#include <time.h>
21190#include <wchar.h>
21191
21192"
d0ac1c44 21193if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
8690e634
JK
21194 ac_have_decl=1
21195else
21196 ac_have_decl=0
c971b7fa 21197fi
c971b7fa 21198
8690e634 21199cat >>confdefs.h <<_ACEOF
6ec2e0f5 21200#define HAVE_DECL_MBSRTOWCS $ac_have_decl
c971b7fa 21201_ACEOF
c971b7fa 21202
6ec2e0f5
SDJ
21203 if test $ac_cv_have_decl_mbsrtowcs = yes; then
21204 REPLACE_MBSRTOWCS=1
8690e634
JK
21205 fi
21206 else
21207 if test $REPLACE_MBSTATE_T = 1; then
6ec2e0f5 21208 REPLACE_MBSRTOWCS=1
8690e634 21209 else
6ec2e0f5
SDJ
21210
21211
21212
21213
21214
21215
21216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
21217$as_echo_n "checking whether mbsrtowcs works... " >&6; }
d0ac1c44 21218if ${gl_cv_func_mbsrtowcs_works+:} false; then :
6ec2e0f5
SDJ
21219 $as_echo_n "(cached) " >&6
21220else
21221
21222 case "$host_os" in
21223 # Guess no on HP-UX, Solaris, mingw.
21224 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
21225 # Guess yes otherwise.
21226 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
21227 esac
21228 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
21229 if test "$cross_compiling" = yes; then :
21230 :
21231else
21232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21233/* end confdefs.h. */
21234
21235#include <locale.h>
21236#include <string.h>
21237/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21238 <wchar.h>.
21239 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21240 included before <wchar.h>. */
21241#include <stddef.h>
21242#include <stdio.h>
21243#include <time.h>
21244#include <wchar.h>
21245int main ()
21246{
21247 int result = 0;
21248 /* Test whether the function supports a NULL destination argument.
21249 This fails on native Windows. */
21250 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
21251 {
21252 const char input[] = "\337er";
21253 const char *src = input;
21254 mbstate_t state;
21255
21256 memset (&state, '\0', sizeof (mbstate_t));
21257 if (mbsrtowcs (NULL, &src, 1, &state) != 3
21258 || src != input)
21259 result |= 1;
21260 }
21261 /* Test whether the function works when started with a conversion state
21262 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
21263 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
21264 {
21265 const char input[] = "B\303\274\303\237er";
21266 mbstate_t state;
21267
21268 memset (&state, '\0', sizeof (mbstate_t));
21269 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
21270 if (!mbsinit (&state))
21271 {
21272 const char *src = input + 2;
21273 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
21274 result |= 2;
21275 }
21276 }
21277 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
21278 {
21279 const char input[] = "<\306\374\313\334\270\354>";
21280 mbstate_t state;
21281
21282 memset (&state, '\0', sizeof (mbstate_t));
21283 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
21284 if (!mbsinit (&state))
21285 {
21286 const char *src = input + 4;
21287 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
21288 result |= 4;
21289 }
21290 }
21291 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
21292 {
21293 const char input[] = "B\250\271\201\060\211\070er";
21294 mbstate_t state;
21295
21296 memset (&state, '\0', sizeof (mbstate_t));
21297 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
21298 if (!mbsinit (&state))
21299 {
21300 const char *src = input + 2;
21301 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
21302 result |= 8;
21303 }
21304 }
21305 return result;
21306}
21307_ACEOF
21308if ac_fn_c_try_run "$LINENO"; then :
21309 gl_cv_func_mbsrtowcs_works=yes
21310else
21311 gl_cv_func_mbsrtowcs_works=no
21312fi
21313rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21314 conftest.$ac_objext conftest.beam conftest.$ac_ext
21315fi
21316
21317 fi
21318
21319fi
21320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
21321$as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
21322
21323 case "$gl_cv_func_mbsrtowcs_works" in
21324 *yes) ;;
21325 *) REPLACE_MBSRTOWCS=1 ;;
8690e634
JK
21326 esac
21327 fi
21328 fi
c971b7fa 21329
6ec2e0f5 21330 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
c971b7fa
PA
21331
21332
21333
21334
21335
21336
21337
21338
6ec2e0f5
SDJ
21339 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
21340
21341
21342
21343
21344
21345
21346
21347
21348
21349 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
c971b7fa
PA
21350
21351
8690e634 21352 :
c971b7fa 21353
a512b375 21354 fi
c971b7fa 21355
c971b7fa 21356
c971b7fa 21357
c971b7fa
PA
21358
21359
6ec2e0f5 21360 GNULIB_MBSRTOWCS=1
c971b7fa 21361
c971b7fa
PA
21362
21363
21364
21365
6ec2e0f5 21366$as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
c971b7fa
PA
21367
21368
c971b7fa 21369
c971b7fa 21370
6ec2e0f5 21371 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
c971b7fa
PA
21372
21373
21374
c971b7fa 21375
c971b7fa
PA
21376
21377
21378
21379
6ec2e0f5 21380 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
8690e634 21381
c971b7fa 21382
6ec2e0f5
SDJ
21383 for ac_header in bp-sym.h
21384do :
21385 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
d0ac1c44 21386if test "x$ac_cv_header_bp_sym_h" = xyes; then :
6ec2e0f5
SDJ
21387 cat >>confdefs.h <<_ACEOF
21388#define HAVE_BP_SYM_H 1
21389_ACEOF
c971b7fa 21390
6ec2e0f5 21391fi
c971b7fa 21392
6ec2e0f5
SDJ
21393done
21394
21395
21396 fi
21397
21398
21399
21400
21401
21402 GNULIB_MEMCHR=1
21403
21404
21405
21406
21407
21408$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
21409
21410
21411
21412
21413
21414 if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
21415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
21416$as_echo_n "checking whether memmem works in linear time... " >&6; }
d0ac1c44 21417if ${gl_cv_func_memmem_works_fast+:} false; then :
8690e634
JK
21418 $as_echo_n "(cached) " >&6
21419else
6ec2e0f5
SDJ
21420 if test "$cross_compiling" = yes; then :
21421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21422/* end confdefs.h. */
21423
21424#include <features.h>
21425#ifdef __GNU_LIBRARY__
21426 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)) \
21427 && !defined __UCLIBC__
21428 Lucky user
21429 #endif
21430#endif
21431#ifdef __CYGWIN__
21432 #include <cygwin/version.h>
21433 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 0)
21434 Lucky user
21435 #endif
21436#endif
21437
21438_ACEOF
21439if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21440 $EGREP "Lucky user" >/dev/null 2>&1; then :
21441 gl_cv_func_memmem_works_fast="guessing yes"
21442else
21443 gl_cv_func_memmem_works_fast="guessing no"
21444fi
21445rm -f conftest*
21446
c971b7fa 21447
8690e634
JK
21448else
21449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 21450/* end confdefs.h. */
c971b7fa 21451
6ec2e0f5
SDJ
21452#include <signal.h> /* for signal */
21453#include <string.h> /* for memmem */
21454#include <stdlib.h> /* for malloc */
21455#include <unistd.h> /* for alarm */
21456static void quit (int sig) { _exit (sig + 128); }
21457
21458int
21459main ()
8690e634 21460{
8690e634 21461
6ec2e0f5
SDJ
21462 int result = 0;
21463 size_t m = 1000000;
21464 char *haystack = (char *) malloc (2 * m + 1);
21465 char *needle = (char *) malloc (m + 1);
21466 /* Failure to compile this test due to missing alarm is okay,
21467 since all such platforms (mingw) also lack memmem. */
21468 signal (SIGALRM, quit);
21469 alarm (5);
21470 /* Check for quadratic performance. */
21471 if (haystack && needle)
21472 {
21473 memset (haystack, 'A', 2 * m);
21474 haystack[2 * m] = 'B';
21475 memset (needle, 'A', m);
21476 needle[m] = 'B';
21477 if (!memmem (haystack, 2 * m + 1, needle, m + 1))
21478 result |= 1;
21479 }
21480 return result;
21481
21482 ;
c971b7fa
PA
21483 return 0;
21484}
21485_ACEOF
8690e634 21486if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 21487 gl_cv_func_memmem_works_fast=yes
8690e634 21488else
6ec2e0f5 21489 gl_cv_func_memmem_works_fast=no
8690e634
JK
21490fi
21491rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21492 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 21493fi
c971b7fa
PA
21494
21495
8690e634 21496fi
6ec2e0f5
SDJ
21497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_fast" >&5
21498$as_echo "$gl_cv_func_memmem_works_fast" >&6; }
21499 case "$gl_cv_func_memmem_works_fast" in
21500 *yes) ;;
21501 *)
21502 REPLACE_MEMMEM=1
21503 ;;
21504 esac
21505 fi
c971b7fa 21506
6ec2e0f5 21507 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
8690e634
JK
21508
21509
21510
6ec2e0f5
SDJ
21511
21512
21513
21514
21515
21516 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
21517
21518 fi
21519
21520
21521
21522
21523 for ac_func in memmem
21524do :
21525 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
d0ac1c44 21526if test "x$ac_cv_func_memmem" = xyes; then :
6ec2e0f5
SDJ
21527 cat >>confdefs.h <<_ACEOF
21528#define HAVE_MEMMEM 1
21529_ACEOF
21530
21531fi
21532done
21533
21534 if test $ac_cv_func_memmem = yes; then
21535 HAVE_MEMMEM=1
21536 else
21537 HAVE_MEMMEM=0
21538 fi
21539
472fa5ee
SM
21540 :
21541
21542
21543
21544
21545
6ec2e0f5
SDJ
21546 if test $ac_cv_have_decl_memmem = no; then
21547 HAVE_DECL_MEMMEM=0
21548 else
21549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
21550$as_echo_n "checking whether memmem works... " >&6; }
d0ac1c44 21551if ${gl_cv_func_memmem_works_always+:} false; then :
c971b7fa
PA
21552 $as_echo_n "(cached) " >&6
21553else
6ec2e0f5
SDJ
21554 if test "$cross_compiling" = yes; then :
21555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21556/* end confdefs.h. */
21557
21558#ifdef __GNU_LIBRARY__
21559 #include <features.h>
21560 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
21561 || __GLIBC_MINOR__ > 12)) \
21562 || (__GLIBC__ > 2)) \
21563 || defined __UCLIBC__
21564 Lucky user
21565 #endif
21566#elif defined __CYGWIN__
21567 #include <cygwin/version.h>
21568 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
21569 Lucky user
21570 #endif
21571#else
21572 Lucky user
21573#endif
21574
21575_ACEOF
21576if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21577 $EGREP "Lucky user" >/dev/null 2>&1; then :
21578 gl_cv_func_memmem_works_always="guessing yes"
21579else
21580 gl_cv_func_memmem_works_always="guessing no"
21581fi
21582rm -f conftest*
21583
8690e634 21584
8690e634 21585else
c971b7fa
PA
21586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21587/* end confdefs.h. */
c971b7fa 21588
6ec2e0f5
SDJ
21589#include <string.h> /* for memmem */
21590#define P "_EF_BF_BD"
21591#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
21592#define NEEDLE P P P P P
21593
21594int
21595main ()
c971b7fa 21596{
8690e634 21597
6ec2e0f5
SDJ
21598 int result = 0;
21599 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
21600 result |= 1;
21601 /* Check for empty needle behavior. */
21602 {
21603 const char *haystack = "AAA";
21604 if (memmem (haystack, 3, NULL, 0) != haystack)
21605 result |= 2;
8690e634 21606 }
6ec2e0f5
SDJ
21607 return result;
21608
21609 ;
c971b7fa
PA
21610 return 0;
21611}
21612_ACEOF
8690e634 21613if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 21614 gl_cv_func_memmem_works_always=yes
c971b7fa 21615else
6ec2e0f5 21616 gl_cv_func_memmem_works_always=no
c971b7fa 21617fi
8690e634
JK
21618rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21619 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 21620fi
8690e634 21621
8690e634
JK
21622
21623fi
6ec2e0f5
SDJ
21624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
21625$as_echo "$gl_cv_func_memmem_works_always" >&6; }
21626 case "$gl_cv_func_memmem_works_always" in
8690e634 21627 *yes) ;;
6ec2e0f5
SDJ
21628 *)
21629 REPLACE_MEMMEM=1
21630 ;;
8690e634 21631 esac
c971b7fa 21632 fi
6ec2e0f5 21633 :
c971b7fa 21634
6ec2e0f5 21635 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
c971b7fa 21636
c971b7fa 21637
8690e634 21638
c971b7fa 21639
6ec2e0f5
SDJ
21640
21641
21642
21643
21644 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
21645
21646 fi
21647
21648
21649
21650
21651
21652 GNULIB_MEMMEM=1
21653
21654
21655
21656
21657
21658$as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
21659
21660
21661
21662
21663
21664
21665
21666
21667
21668 for ac_func in mempcpy
21669do :
21670 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
d0ac1c44 21671if test "x$ac_cv_func_mempcpy" = xyes; then :
6ec2e0f5
SDJ
21672 cat >>confdefs.h <<_ACEOF
21673#define HAVE_MEMPCPY 1
8690e634 21674_ACEOF
c971b7fa 21675
6ec2e0f5
SDJ
21676fi
21677done
c971b7fa 21678
6ec2e0f5
SDJ
21679 if test $ac_cv_func_mempcpy = no; then
21680 HAVE_MEMPCPY=0
21681 fi
8690e634 21682
6ec2e0f5 21683 if test $HAVE_MEMPCPY = 0; then
8690e634
JK
21684
21685
21686
21687
8690e634 21688
6ec2e0f5
SDJ
21689
21690
21691
21692 gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
21693
21694
8690e634 21695 :
c971b7fa 21696
6ec2e0f5 21697 fi
c971b7fa 21698
8690e634 21699
8690e634 21700
8690e634 21701
6ec2e0f5
SDJ
21702
21703 GNULIB_MEMPCPY=1
21704
21705
21706
21707
21708
21709$as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
21710
21711
21712
21713
21714
21715
21716
21717
472fa5ee
SM
21718 :
21719
21720
21721
21722
21723
6ec2e0f5
SDJ
21724 if test $ac_cv_have_decl_memrchr = no; then
21725 HAVE_DECL_MEMRCHR=0
21726 fi
21727
21728 for ac_func in memrchr
21729do :
21730 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
d0ac1c44 21731if test "x$ac_cv_func_memrchr" = xyes; then :
6ec2e0f5
SDJ
21732 cat >>confdefs.h <<_ACEOF
21733#define HAVE_MEMRCHR 1
c971b7fa 21734_ACEOF
6ec2e0f5 21735
c971b7fa 21736fi
6ec2e0f5 21737done
8690e634 21738
8690e634 21739
6ec2e0f5 21740 if test $ac_cv_func_memrchr = no; then
8690e634 21741
6ec2e0f5
SDJ
21742
21743
21744
21745
21746
21747
21748
21749 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
21750
21751 :
c971b7fa
PA
21752 fi
21753
21754
c971b7fa 21755
c971b7fa 21756
c971b7fa 21757
6ec2e0f5
SDJ
21758 GNULIB_MEMRCHR=1
21759
21760
21761
21762
21763
21764$as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
21765
21766
21767
21768
2d8adcbd 21769
8a99096f
SM
21770 :
21771
21772
21773
21774
21775
21776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
21777$as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
21778if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then :
21779 $as_echo_n "(cached) " >&6
21780else
21781 rm -rf conftest.dir
21782 if test "$cross_compiling" = yes; then :
21783 case "$host_os" in
5e8754f9
SDJ
21784 # Guess yes on glibc systems.
21785 *-gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
21786 # If we don't know, assume the worst.
21787 *) gl_cv_func_mkdir_trailing_slash_works="guessing no" ;;
8a99096f
SM
21788 esac
21789
21790else
21791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21792/* end confdefs.h. */
21793
21794# include <sys/types.h>
21795# include <sys/stat.h>
21796
21797int
21798main ()
21799{
21800return mkdir ("conftest.dir/", 0700);
21801 ;
21802 return 0;
21803}
21804_ACEOF
21805if ac_fn_c_try_run "$LINENO"; then :
21806 gl_cv_func_mkdir_trailing_slash_works=yes
21807else
21808 gl_cv_func_mkdir_trailing_slash_works=no
21809fi
21810rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21811 conftest.$ac_objext conftest.beam conftest.$ac_ext
21812fi
21813
21814 rm -rf conftest.dir
21815
21816
21817fi
21818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
21819$as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
21820 case "$gl_cv_func_mkdir_trailing_slash_works" in
21821 *yes) ;;
21822 *)
21823 REPLACE_MKDIR=1
21824 ;;
21825 esac
21826
21827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
21828$as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
21829if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then :
21830 $as_echo_n "(cached) " >&6
21831else
21832 rm -rf conftest.dir
21833 if test "$cross_compiling" = yes; then :
21834 case "$host_os" in
5e8754f9
SDJ
21835 # Guess yes on glibc systems.
21836 *-gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
21837 # If we don't know, assume the worst.
21838 *) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
8a99096f
SM
21839 esac
21840
21841else
21842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21843/* end confdefs.h. */
21844
21845# include <sys/types.h>
21846# include <sys/stat.h>
21847
21848int
21849main ()
21850{
21851return !mkdir ("conftest.dir/./", 0700);
21852 ;
21853 return 0;
21854}
21855_ACEOF
21856if ac_fn_c_try_run "$LINENO"; then :
21857 gl_cv_func_mkdir_trailing_dot_works=yes
21858else
21859 gl_cv_func_mkdir_trailing_dot_works=no
21860fi
21861rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21862 conftest.$ac_objext conftest.beam conftest.$ac_ext
21863fi
21864
21865 rm -rf conftest.dir
21866
21867
21868fi
21869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
21870$as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
21871 case "$gl_cv_func_mkdir_trailing_dot_works" in
21872 *yes) ;;
21873 *)
21874 REPLACE_MKDIR=1
21875
21876$as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
21877
21878 ;;
21879 esac
21880
21881 if test $REPLACE_MKDIR = 1; then
21882
21883
21884
21885
21886
21887
21888
21889
21890 gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
21891
21892 fi
21893
21894
e8d8cce6
SM
21895 for ac_func in mkdtemp
21896do :
21897 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
21898if test "x$ac_cv_func_mkdtemp" = xyes; then :
21899 cat >>confdefs.h <<_ACEOF
21900#define HAVE_MKDTEMP 1
21901_ACEOF
21902
21903fi
21904done
21905
21906 if test $ac_cv_func_mkdtemp = no; then
21907 HAVE_MKDTEMP=0
21908 fi
21909
21910 if test $HAVE_MKDTEMP = 0; then
21911
21912
21913
21914
21915
21916
21917
21918
21919 gl_LIBOBJS="$gl_LIBOBJS mkdtemp.$ac_objext"
21920
21921 :
21922
21923 fi
21924
21925
21926
21927
21928
21929 GNULIB_MKDTEMP=1
21930
21931
21932
21933
21934
21935$as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
21936
21937
21938
21939
21940
2d8adcbd
MM
21941
21942
b3279b60
TT
21943
21944
472fa5ee
SM
21945 :
21946
21947
21948
21949
21950
b3279b60
TT
21951 if test $ac_cv_func_mkostemp != yes; then
21952 HAVE_MKOSTEMP=0
21953 fi
2d8adcbd 21954
b3279b60 21955 if test $HAVE_MKOSTEMP = 0; then
2d8adcbd 21956
2d8adcbd 21957
2d8adcbd 21958
2d8adcbd 21959
2d8adcbd
MM
21960
21961
21962
21963
b3279b60 21964 gl_LIBOBJS="$gl_LIBOBJS mkostemp.$ac_objext"
2d8adcbd
MM
21965
21966
21967
b3279b60 21968 fi
2d8adcbd 21969
2d8adcbd 21970
b3279b60
TT
21971cat >>confdefs.h <<_ACEOF
21972#define GNULIB_MKOSTEMP 1
21973_ACEOF
2d8adcbd
MM
21974
21975
2d8adcbd
MM
21976
21977
21978
21979
21980
b3279b60 21981 GNULIB_MKOSTEMP=1
2d8adcbd
MM
21982
21983
21984
21985
21986
b3279b60 21987$as_echo "#define GNULIB_TEST_MKOSTEMP 1" >>confdefs.h
2d8adcbd
MM
21988
21989
21990
21991
6ec2e0f5
SDJ
21992 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
21993
21994
21995
c971b7fa 21996
c971b7fa 21997
c971b7fa
PA
21998
21999
8690e634 22000
6ec2e0f5 22001 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
8690e634 22002
6ec2e0f5 22003 fi
8690e634 22004
6ec2e0f5 22005 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
8690e634
JK
22006
22007
22008
22009
22010
22011
8690e634
JK
22012
22013
6ec2e0f5 22014 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
8690e634 22015
a512b375 22016 fi
8690e634
JK
22017
22018
725e2999
JB
22019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
22020$as_echo_n "checking whether <netinet/in.h> is self-contained... " >&6; }
22021if ${gl_cv_header_netinet_in_h_selfcontained+:} false; then :
22022 $as_echo_n "(cached) " >&6
22023else
22024
22025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22026/* end confdefs.h. */
22027#include <netinet/in.h>
22028int
22029main ()
22030{
22031
22032 ;
22033 return 0;
22034}
22035_ACEOF
22036if ac_fn_c_try_compile "$LINENO"; then :
22037 gl_cv_header_netinet_in_h_selfcontained=yes
22038else
22039 gl_cv_header_netinet_in_h_selfcontained=no
22040fi
22041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22042
22043fi
22044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
22045$as_echo "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
22046 if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
22047 NETINET_IN_H=''
22048 else
22049 NETINET_IN_H='netinet/in.h'
22050 for ac_header in netinet/in.h
22051do :
22052 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
22053if test "x$ac_cv_header_netinet_in_h" = xyes; then :
22054 cat >>confdefs.h <<_ACEOF
22055#define HAVE_NETINET_IN_H 1
22056_ACEOF
22057
22058fi
22059
22060done
22061
22062
22063
22064
22065
22066
22067
22068 :
22069
22070
22071
22072
22073
22074
22075
22076
22077 if test $gl_cv_have_include_next = yes; then
22078 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
22079 else
22080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
22081$as_echo_n "checking absolute name of <netinet/in.h>... " >&6; }
22082if ${gl_cv_next_netinet_in_h+:} false; then :
22083 $as_echo_n "(cached) " >&6
22084else
22085
22086 if test $ac_cv_header_netinet_in_h = yes; then
22087
22088
22089
22090
22091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22092/* end confdefs.h. */
22093#include <netinet/in.h>
22094_ACEOF
22095 case "$host_os" in
22096 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22097 *) gl_absname_cpp="$ac_cpp" ;;
22098 esac
22099
22100 case "$host_os" in
22101 mingw*)
22102 gl_dirsep_regex='[/\\]'
22103 ;;
22104 *)
22105 gl_dirsep_regex='\/'
22106 ;;
22107 esac
22108 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22109 gl_header_literal_regex=`echo 'netinet/in.h' \
22110 | sed -e "$gl_make_literal_regex_sed"`
22111 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22112 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22113 s|^/[^/]|//&|
22114 p
22115 q
22116 }'
22117
22118 gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22119 sed -n "$gl_absolute_header_sed"`
22120
22121 gl_header=$gl_cv_absolute_netinet_in_h
22122 gl_cv_next_netinet_in_h='"'$gl_header'"'
22123 else
22124 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
22125 fi
22126
22127
22128fi
22129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
22130$as_echo "$gl_cv_next_netinet_in_h" >&6; }
22131 fi
22132 NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
22133
22134 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22135 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22136 gl_next_as_first_directive='<'netinet/in.h'>'
22137 else
22138 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22139 gl_next_as_first_directive=$gl_cv_next_netinet_in_h
22140 fi
22141 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
22142
22143
22144
22145
22146 if test $ac_cv_header_netinet_in_h = yes; then
22147 HAVE_NETINET_IN_H=1
22148 else
22149 HAVE_NETINET_IN_H=0
22150 fi
22151
22152 fi
22153
22154 if test -n "$NETINET_IN_H"; then
22155 GL_GENERATE_NETINET_IN_H_TRUE=
22156 GL_GENERATE_NETINET_IN_H_FALSE='#'
22157else
22158 GL_GENERATE_NETINET_IN_H_TRUE='#'
22159 GL_GENERATE_NETINET_IN_H_FALSE=
22160fi
22161
22162
22163
22164
8690e634 22165
6ec2e0f5
SDJ
22166 case "$host_os" in
22167 mingw* | pw*)
22168 REPLACE_OPEN=1
22169 ;;
22170 *)
22171
472fa5ee
SM
22172 :
22173
22174
22175
22176
22177
6ec2e0f5
SDJ
22178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
22179$as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
d0ac1c44 22180if ${gl_cv_func_open_slash+:} false; then :
6ec2e0f5
SDJ
22181 $as_echo_n "(cached) " >&6
22182else
22183 # Assume that if we have lstat, we can also check symlinks.
22184 if test $ac_cv_func_lstat = yes; then
22185 touch conftest.tmp
22186 ln -s conftest.tmp conftest.lnk
22187 fi
22188 if test "$cross_compiling" = yes; then :
8690e634 22189
6ec2e0f5
SDJ
22190 case "$host_os" in
22191 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
22192 gl_cv_func_open_slash="guessing no" ;;
22193 *)
22194 gl_cv_func_open_slash="guessing yes" ;;
22195 esac
8690e634 22196
6ec2e0f5
SDJ
22197else
22198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22199/* end confdefs.h. */
22200
22201#include <fcntl.h>
22202#if HAVE_UNISTD_H
22203# include <unistd.h>
22204#endif
22205int main ()
22206{
22207 int result = 0;
22208#if HAVE_LSTAT
22209 if (open ("conftest.lnk/", O_RDONLY) != -1)
22210 result |= 1;
22211#endif
22212 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
22213 result |= 2;
22214 return result;
22215}
22216_ACEOF
22217if ac_fn_c_try_run "$LINENO"; then :
22218 gl_cv_func_open_slash=yes
22219else
22220 gl_cv_func_open_slash=no
22221fi
22222rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22223 conftest.$ac_objext conftest.beam conftest.$ac_ext
22224fi
8690e634 22225
6ec2e0f5 22226 rm -f conftest.sl conftest.tmp conftest.lnk
8690e634 22227
6ec2e0f5
SDJ
22228fi
22229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
22230$as_echo "$gl_cv_func_open_slash" >&6; }
22231 case "$gl_cv_func_open_slash" in
22232 *no)
8690e634 22233
6ec2e0f5 22234$as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
8690e634 22235
6ec2e0f5
SDJ
22236 REPLACE_OPEN=1
22237 ;;
22238 esac
22239 ;;
22240 esac
8690e634 22241
6ec2e0f5 22242 if test $REPLACE_OPEN = 0; then
c971b7fa
PA
22243
22244
22245
472fa5ee
SM
22246 :
22247
22248
22249
22250
22251
6ec2e0f5
SDJ
22252 if test $ac_cv_func_fchdir = no; then
22253 HAVE_FCHDIR=0
22254 fi
c971b7fa 22255
6ec2e0f5
SDJ
22256 if test $HAVE_FCHDIR = 0; then
22257 REPLACE_OPEN=1
22258 fi
22259 fi
c971b7fa
PA
22260
22261
22262
6ec2e0f5 22263 if test $REPLACE_OPEN = 1; then
c971b7fa
PA
22264
22265
22266
22267
22268
c971b7fa
PA
22269
22270
c971b7fa 22271
6ec2e0f5 22272 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
c971b7fa 22273
c971b7fa
PA
22274
22275
6ec2e0f5
SDJ
22276 :
22277
a512b375 22278 fi
c971b7fa
PA
22279
22280
22281
22282
22283
6ec2e0f5 22284 GNULIB_OPEN=1
c971b7fa
PA
22285
22286
22287
22288
22289
6ec2e0f5 22290$as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
c971b7fa
PA
22291
22292
22293
22294
22295
c971b7fa 22296
c971b7fa 22297
472fa5ee
SM
22298 :
22299
22300
22301
22302
22303
63ce7108 22304
5e8754f9
SDJ
22305 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
22306 yes+*yes)
6ec2e0f5
SDJ
22307 ;;
22308 yes+*)
22309 # Solaris 9 has *at functions, but uniformly mishandles trailing
22310 # slash in all of them.
22311 REPLACE_OPENAT=1
22312 ;;
22313 *)
22314 HAVE_OPENAT=0
22315 ;;
22316 esac
63ce7108 22317
6ec2e0f5 22318 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
63ce7108 22319
63ce7108 22320
63ce7108 22321
63ce7108 22322
63ce7108
TT
22323
22324
63ce7108 22325
63ce7108 22326
6ec2e0f5 22327 gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
63ce7108
TT
22328
22329
22330
6ec2e0f5 22331 :
63ce7108 22332
6ec2e0f5 22333 fi
63ce7108
TT
22334
22335
6ec2e0f5
SDJ
22336cat >>confdefs.h <<_ACEOF
22337#define GNULIB_OPENAT 1
22338_ACEOF
63ce7108 22339
63ce7108 22340
63ce7108
TT
22341
22342
22343
22344
6ec2e0f5 22345 GNULIB_OPENAT=1
63ce7108 22346
63ce7108 22347
63ce7108 22348
63ce7108 22349
63ce7108 22350
6ec2e0f5 22351$as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
63ce7108
TT
22352
22353
63ce7108 22354
63ce7108 22355
63ce7108 22356
63ce7108 22357
6ec2e0f5
SDJ
22358 for ac_func in opendir
22359do :
22360 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
d0ac1c44 22361if test "x$ac_cv_func_opendir" = xyes; then :
6ec2e0f5
SDJ
22362 cat >>confdefs.h <<_ACEOF
22363#define HAVE_OPENDIR 1
63ce7108 22364_ACEOF
6ec2e0f5 22365
63ce7108 22366fi
6ec2e0f5 22367done
63ce7108 22368
6ec2e0f5
SDJ
22369 if test $ac_cv_func_opendir = no; then
22370 HAVE_OPENDIR=0
22371 fi
63ce7108 22372
6ec2e0f5
SDJ
22373
22374
22375
472fa5ee
SM
22376 :
22377
22378
22379
22380
22381
6ec2e0f5
SDJ
22382 if test $ac_cv_func_fchdir = no; then
22383 HAVE_FCHDIR=0
63ce7108 22384 fi
63ce7108 22385
6ec2e0f5
SDJ
22386 if test $HAVE_FCHDIR = 0; then
22387 if test $HAVE_OPENDIR = 1; then
22388 REPLACE_OPENDIR=1
22389 fi
22390 fi
22391
22392 case $host_os,$HAVE_OPENDIR in
22393 os2*,1)
22394 REPLACE_OPENDIR=1;;
22395 esac
22396
22397 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
63ce7108
TT
22398
22399
22400
22401
22402
22403
22404
22405
6ec2e0f5 22406 gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
63ce7108
TT
22407
22408 fi
22409
22410
22411
22412
22413
6ec2e0f5 22414 GNULIB_OPENDIR=1
63ce7108
TT
22415
22416
22417
22418
63ce7108 22419
6ec2e0f5 22420$as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
63ce7108
TT
22421
22422
22423
22424
22425
472fa5ee
SM
22426 :
22427
22428
22429
22430
22431
63ce7108
TT
22432
22433
2196f55f
YQ
22434
22435
8424cc97
SM
22436
22437 for ac_func in rawmemchr
22438do :
22439 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
d0ac1c44 22440if test "x$ac_cv_func_rawmemchr" = xyes; then :
8424cc97
SM
22441 cat >>confdefs.h <<_ACEOF
22442#define HAVE_RAWMEMCHR 1
22443_ACEOF
22444
22445fi
22446done
22447
22448 if test $ac_cv_func_rawmemchr = no; then
22449 HAVE_RAWMEMCHR=0
22450 fi
22451
22452 if test $HAVE_RAWMEMCHR = 0; then
22453
22454
22455
22456
22457
22458
22459
22460
22461 gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
22462
22463 :
22464 fi
22465
22466
22467
22468
22469
22470 GNULIB_RAWMEMCHR=1
22471
22472
22473
22474
22475
22476$as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
22477
22478
22479
22480
22481
22482
6ec2e0f5
SDJ
22483 for ac_func in readdir
22484do :
22485 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
d0ac1c44 22486if test "x$ac_cv_func_readdir" = xyes; then :
6ec2e0f5
SDJ
22487 cat >>confdefs.h <<_ACEOF
22488#define HAVE_READDIR 1
22489_ACEOF
22490
22491fi
22492done
22493
22494 if test $ac_cv_func_readdir = no; then
22495 HAVE_READDIR=0
22496 fi
22497
22498 if test $HAVE_READDIR = 0; then
22499
22500
22501
22502
22503
22504
22505
22506
22507 gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
22508
22509 fi
22510
22511
22512
22513
22514
22515 GNULIB_READDIR=1
22516
22517
22518
22519
22520
22521$as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
22522
22523
22524
22525
22526
22527
472fa5ee
SM
22528 :
22529
22530
22531
22532
22533
2196f55f
YQ
22534 if test $ac_cv_func_readlink = no; then
22535 HAVE_READLINK=0
22536 else
22537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
22538$as_echo_n "checking whether readlink signature is correct... " >&6; }
d0ac1c44 22539if ${gl_cv_decl_readlink_works+:} false; then :
2196f55f
YQ
22540 $as_echo_n "(cached) " >&6
22541else
22542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22543/* end confdefs.h. */
22544#include <unistd.h>
22545 /* Cause compilation failure if original declaration has wrong type. */
22546 ssize_t readlink (const char *, char *, size_t);
22547int
22548main ()
22549{
22550
22551 ;
22552 return 0;
22553}
22554_ACEOF
22555if ac_fn_c_try_compile "$LINENO"; then :
22556 gl_cv_decl_readlink_works=yes
22557else
22558 gl_cv_decl_readlink_works=no
22559fi
22560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22561fi
22562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
22563$as_echo "$gl_cv_decl_readlink_works" >&6; }
22564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
22565$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
d0ac1c44 22566if ${gl_cv_func_readlink_works+:} false; then :
2196f55f
YQ
22567 $as_echo_n "(cached) " >&6
22568else
22569 # We have readlink, so assume ln -s works.
22570 ln -s conftest.no-such conftest.link
22571 ln -s conftest.link conftest.lnk2
22572 if test "$cross_compiling" = yes; then :
22573 case "$host_os" in
5e8754f9
SDJ
22574 # Guess yes on glibc systems.
22575 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
22576 # If we don't know, assume the worst.
22577 *) gl_cv_func_readlink_works="guessing no" ;;
2196f55f
YQ
22578 esac
22579
22580else
22581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22582/* end confdefs.h. */
22583#include <unistd.h>
22584
22585int
22586main ()
22587{
22588char buf[20];
22589 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
22590 ;
22591 return 0;
22592}
22593_ACEOF
22594if ac_fn_c_try_run "$LINENO"; then :
22595 gl_cv_func_readlink_works=yes
22596else
22597 gl_cv_func_readlink_works=no
22598fi
22599rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22600 conftest.$ac_objext conftest.beam conftest.$ac_ext
22601fi
22602
22603 rm -f conftest.link conftest.lnk2
22604fi
22605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
22606$as_echo "$gl_cv_func_readlink_works" >&6; }
22607 case "$gl_cv_func_readlink_works" in
22608 *yes)
22609 if test "$gl_cv_decl_readlink_works" != yes; then
22610 REPLACE_READLINK=1
22611 fi
22612 ;;
22613 *)
22614
22615$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
22616
22617 REPLACE_READLINK=1
22618 ;;
22619 esac
22620 fi
22621
22622 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
22623
22624
22625
22626
22627
22628
22629
22630
22631 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
22632
22633
22634 :
22635
22636 fi
22637
22638
22639
22640
22641
22642 GNULIB_READLINK=1
22643
22644
22645
22646
22647
22648$as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
22649
22650
22651
22652
6a29c58e
YQ
22653
22654
6ec2e0f5
SDJ
22655 if test $gl_cv_func_malloc_posix = yes; then
22656
22657$as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
22658
22659 else
22660 REPLACE_REALLOC=1
22661 fi
22662
22663 if test $REPLACE_REALLOC = 1; then
22664
22665
22666
22667
22668
22669
22670
22671
22672 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
22673
22674 fi
22675
22676
22677
22678
22679
22680 GNULIB_REALLOC_POSIX=1
22681
22682
22683
22684
22685
22686$as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
22687
22688
22689
22690
22691
22692
6a29c58e 22693
472fa5ee
SM
22694 :
22695
22696
22697
22698
22699
6a29c58e
YQ
22700
22701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
22702$as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
d0ac1c44 22703if ${gl_cv_func_rename_slash_dst_works+:} false; then :
6a29c58e
YQ
22704 $as_echo_n "(cached) " >&6
22705else
22706 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
22707 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
d0ac1c44 22708 as_fn_error $? "cannot create temporary files" "$LINENO" 5
6a29c58e
YQ
22709 # Assume that if we have lstat, we can also check symlinks.
22710 if test $ac_cv_func_lstat = yes; then
22711 ln -s conftest.f conftest.lnk
22712 fi
22713 if test "$cross_compiling" = yes; then :
22714 case "$host_os" in
5e8754f9
SDJ
22715 # Guess yes on glibc systems.
22716 *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
22717 # If we don't know, assume the worst.
22718 *) gl_cv_func_rename_slash_dst_works="guessing no" ;;
6a29c58e
YQ
22719 esac
22720
22721else
22722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22723/* end confdefs.h. */
22724
22725# include <stdio.h>
22726# include <stdlib.h>
22727
22728int
22729main ()
22730{
22731int result = 0;
22732 if (rename ("conftest.f1", "conftest.f2/") == 0)
22733 result |= 1;
22734 if (rename ("conftest.d1", "conftest.d2/") != 0)
22735 result |= 2;
22736#if HAVE_LSTAT
22737 if (rename ("conftest.f", "conftest.lnk/") == 0)
22738 result |= 4;
22739#endif
22740 return result;
22741
22742 ;
22743 return 0;
22744}
22745_ACEOF
22746if ac_fn_c_try_run "$LINENO"; then :
22747 gl_cv_func_rename_slash_dst_works=yes
22748else
22749 gl_cv_func_rename_slash_dst_works=no
22750fi
22751rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22752 conftest.$ac_objext conftest.beam conftest.$ac_ext
22753fi
22754
22755 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
22756
22757fi
22758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
22759$as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
22760 case "$gl_cv_func_rename_slash_dst_works" in
22761 *yes) ;;
22762 *)
22763 REPLACE_RENAME=1
22764
22765$as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
22766
22767 ;;
22768 esac
22769
22770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
22771$as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
d0ac1c44 22772if ${gl_cv_func_rename_slash_src_works+:} false; then :
6a29c58e
YQ
22773 $as_echo_n "(cached) " >&6
22774else
22775 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
22776 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
d0ac1c44 22777 as_fn_error $? "cannot create temporary files" "$LINENO" 5
6a29c58e
YQ
22778 # Assume that if we have lstat, we can also check symlinks.
22779 if test $ac_cv_func_lstat = yes; then
22780 ln -s conftest.f conftest.lnk
22781 fi
22782 if test "$cross_compiling" = yes; then :
22783 case "$host_os" in
5e8754f9
SDJ
22784 # Guess yes on glibc systems.
22785 *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
22786 # If we don't know, assume the worst.
22787 *) gl_cv_func_rename_slash_src_works="guessing no" ;;
6a29c58e
YQ
22788 esac
22789
22790else
22791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22792/* end confdefs.h. */
22793
22794# include <stdio.h>
22795# include <stdlib.h>
22796
22797int
22798main ()
22799{
22800int result = 0;
22801 if (rename ("conftest.f1/", "conftest.d3") == 0)
22802 result |= 1;
22803 if (rename ("conftest.d1/", "conftest.d2") != 0)
22804 result |= 2;
22805#if HAVE_LSTAT
22806 if (rename ("conftest.lnk/", "conftest.f") == 0)
22807 result |= 4;
22808#endif
22809 return result;
22810
22811 ;
22812 return 0;
22813}
22814_ACEOF
22815if ac_fn_c_try_run "$LINENO"; then :
22816 gl_cv_func_rename_slash_src_works=yes
22817else
22818 gl_cv_func_rename_slash_src_works=no
22819fi
22820rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22821 conftest.$ac_objext conftest.beam conftest.$ac_ext
22822fi
22823
22824 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
22825
22826fi
22827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
22828$as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
22829 case "$gl_cv_func_rename_slash_src_works" in
22830 *yes) ;;
22831 *)
22832 REPLACE_RENAME=1
22833
22834$as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
22835
22836 ;;
22837 esac
22838
22839
472fa5ee
SM
22840 :
22841
22842
22843
22844
22845
6a29c58e
YQ
22846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
22847$as_echo_n "checking whether rename manages hard links correctly... " >&6; }
d0ac1c44 22848if ${gl_cv_func_rename_link_works+:} false; then :
6a29c58e
YQ
22849 $as_echo_n "(cached) " >&6
22850else
22851 if test $ac_cv_func_link = yes; then
5e8754f9
SDJ
22852 rm -rf conftest.f conftest.f1
22853 if touch conftest.f && ln conftest.f conftest.f1 &&
6a29c58e
YQ
22854 set x `ls -i conftest.f conftest.f1` && test "" = ""; then
22855 if test "$cross_compiling" = yes; then :
22856 case "$host_os" in
5e8754f9
SDJ
22857 # Guess yes on glibc systems.
22858 *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
22859 # If we don't know, assume the worst.
22860 *) gl_cv_func_rename_link_works="guessing no" ;;
6a29c58e
YQ
22861 esac
22862
22863else
22864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22865/* end confdefs.h. */
22866
22867# include <stdio.h>
22868# include <stdlib.h>
22869# include <unistd.h>
22870
22871int
22872main ()
22873{
22874int result = 0;
22875 if (rename ("conftest.f", "conftest.f1"))
22876 result |= 1;
22877 if (unlink ("conftest.f1"))
22878 result |= 2;
5e8754f9 22879 if (rename ("conftest.f", "conftest.f"))
6a29c58e
YQ
22880 result |= 4;
22881 if (rename ("conftest.f1", "conftest.f1") == 0)
22882 result |= 8;
22883 return result;
22884
22885 ;
22886 return 0;
22887}
22888_ACEOF
22889if ac_fn_c_try_run "$LINENO"; then :
22890 gl_cv_func_rename_link_works=yes
22891else
22892 gl_cv_func_rename_link_works=no
22893fi
22894rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22895 conftest.$ac_objext conftest.beam conftest.$ac_ext
22896fi
22897
22898 else
22899 gl_cv_func_rename_link_works="guessing no"
22900 fi
5e8754f9 22901 rm -rf conftest.f conftest.f1
6a29c58e
YQ
22902 else
22903 gl_cv_func_rename_link_works=yes
22904 fi
22905
22906fi
22907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
22908$as_echo "$gl_cv_func_rename_link_works" >&6; }
22909 case "$gl_cv_func_rename_link_works" in
22910 *yes) ;;
22911 *)
22912 REPLACE_RENAME=1
22913
22914$as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
22915
22916 ;;
22917 esac
22918
22919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
22920$as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
d0ac1c44 22921if ${gl_cv_func_rename_dest_works+:} false; then :
6a29c58e
YQ
22922 $as_echo_n "(cached) " >&6
22923else
22924 rm -rf conftest.f conftest.d1 conftest.d2
22925 touch conftest.f && mkdir conftest.d1 conftest.d2 ||
d0ac1c44 22926 as_fn_error $? "cannot create temporary files" "$LINENO" 5
6a29c58e
YQ
22927 if test "$cross_compiling" = yes; then :
22928 case "$host_os" in
5e8754f9
SDJ
22929 # Guess yes on glibc systems.
22930 *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
22931 # If we don't know, assume the worst.
22932 *) gl_cv_func_rename_dest_works="guessing no" ;;
6a29c58e
YQ
22933 esac
22934
22935else
22936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22937/* end confdefs.h. */
22938
22939# include <stdio.h>
22940# include <stdlib.h>
22941
22942int
22943main ()
22944{
22945int result = 0;
22946 if (rename ("conftest.d1", "conftest.d2") != 0)
22947 result |= 1;
22948 if (rename ("conftest.d2", "conftest.f") == 0)
22949 result |= 2;
22950 return result;
22951
22952 ;
22953 return 0;
22954}
22955_ACEOF
22956if ac_fn_c_try_run "$LINENO"; then :
22957 gl_cv_func_rename_dest_works=yes
22958else
22959 gl_cv_func_rename_dest_works=no
22960fi
22961rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22962 conftest.$ac_objext conftest.beam conftest.$ac_ext
22963fi
22964
22965 rm -rf conftest.f conftest.d1 conftest.d2
22966
22967fi
22968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
22969$as_echo "$gl_cv_func_rename_dest_works" >&6; }
22970 case "$gl_cv_func_rename_dest_works" in
22971 *yes) ;;
22972 *)
22973 REPLACE_RENAME=1
22974
22975$as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
22976
22977 ;;
22978 esac
22979
22980 if test $REPLACE_RENAME = 1; then
22981
22982
22983
22984
22985
22986
22987
22988
22989 gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
22990
22991 fi
22992
22993
22994
22995
22996
22997 GNULIB_RENAME=1
22998
22999
23000
23001
23002
23003$as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
23004
23005
23006
23007
23008
23009
6ec2e0f5
SDJ
23010 for ac_func in rewinddir
23011do :
23012 ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
d0ac1c44 23013if test "x$ac_cv_func_rewinddir" = xyes; then :
6ec2e0f5
SDJ
23014 cat >>confdefs.h <<_ACEOF
23015#define HAVE_REWINDDIR 1
23016_ACEOF
23017
23018fi
23019done
23020
23021 if test $ac_cv_func_rewinddir = no; then
23022 HAVE_REWINDDIR=0
23023 fi
23024
23025 if test $HAVE_REWINDDIR = 0; then
23026
23027
23028
23029
23030
23031
23032
23033
23034 gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
23035
23036 fi
23037
23038
23039
23040
23041
23042 GNULIB_REWINDDIR=1
23043
23044
23045
23046
23047
23048$as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
23049
23050
23051
23052
23053
23054
472fa5ee
SM
23055 :
23056
23057
23058
23059
23060
6a29c58e
YQ
23061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
23062$as_echo_n "checking whether rmdir works... " >&6; }
d0ac1c44 23063if ${gl_cv_func_rmdir_works+:} false; then :
6a29c58e
YQ
23064 $as_echo_n "(cached) " >&6
23065else
23066 mkdir conftest.dir
23067 touch conftest.file
23068 if test "$cross_compiling" = yes; then :
23069 case "$host_os" in
5e8754f9
SDJ
23070 # Guess yes on glibc systems.
23071 *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
23072 # If we don't know, assume the worst.
23073 *) gl_cv_func_rmdir_works="guessing no" ;;
6a29c58e
YQ
23074 esac
23075
23076else
23077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23078/* end confdefs.h. */
23079#include <stdio.h>
23080 #include <errno.h>
23081 #if HAVE_UNISTD_H
23082 # include <unistd.h>
23083 #else /* on Windows with MSVC */
23084 # include <direct.h>
23085 #endif
23086
23087int
23088main ()
23089{
23090int result = 0;
23091 if (!rmdir ("conftest.file/"))
23092 result |= 1;
23093 else if (errno != ENOTDIR)
23094 result |= 2;
23095 if (!rmdir ("conftest.dir/./"))
23096 result |= 4;
23097 return result;
23098
23099 ;
23100 return 0;
23101}
23102_ACEOF
23103if ac_fn_c_try_run "$LINENO"; then :
23104 gl_cv_func_rmdir_works=yes
23105else
23106 gl_cv_func_rmdir_works=no
23107fi
23108rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23109 conftest.$ac_objext conftest.beam conftest.$ac_ext
23110fi
23111
23112 rm -rf conftest.dir conftest.file
23113fi
23114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
23115$as_echo "$gl_cv_func_rmdir_works" >&6; }
23116 case "$gl_cv_func_rmdir_works" in
23117 *yes) ;;
23118 *)
23119 REPLACE_RMDIR=1
23120 ;;
23121 esac
23122
23123 if test $REPLACE_RMDIR = 1; then
23124
23125
23126
23127
23128
23129
23130
23131
23132 gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
23133
23134 fi
23135
23136
23137
23138
23139
23140 GNULIB_RMDIR=1
23141
23142
23143
23144
23145
23146$as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
23147
23148
23149
23150
0750520d 23151
472fa5ee
SM
23152 :
23153
23154
23155
23156
23157
23158
23159
23160
5e8754f9
SDJ
23161
23162
23163
23164 :
23165
23166
23167
23168
23169
23170 if test $ac_cv_func_secure_getenv = no; then
23171 HAVE_SECURE_GETENV=0
23172 fi
23173
23174 if test $HAVE_SECURE_GETENV = 0; then
23175
23176
23177
23178
23179
23180
23181
23182
23183 gl_LIBOBJS="$gl_LIBOBJS secure_getenv.$ac_objext"
23184
23185
23186 for ac_func in __secure_getenv
23187do :
23188 ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
23189if test "x$ac_cv_func___secure_getenv" = xyes; then :
23190 cat >>confdefs.h <<_ACEOF
23191#define HAVE___SECURE_GETENV 1
23192_ACEOF
23193
23194fi
23195done
23196
23197 if test $ac_cv_func___secure_getenv = no; then
23198 for ac_func in issetugid
23199do :
23200 ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
23201if test "x$ac_cv_func_issetugid" = xyes; then :
23202 cat >>confdefs.h <<_ACEOF
23203#define HAVE_ISSETUGID 1
23204_ACEOF
23205
23206fi
23207done
23208
23209 fi
23210
23211 :
23212
23213
23214
23215
23216
23217
23218
23219
23220
23221
23222
23223
23224
23225
23226
23227 fi
23228
23229
23230
23231
23232
23233 GNULIB_SECURE_GETENV=1
23234
23235
23236
23237
23238
23239$as_echo "#define GNULIB_TEST_SECURE_GETENV 1" >>confdefs.h
23240
23241
23242
23243
23244
3d99e817
AK
23245 if test $ac_cv_func_setenv = no; then
23246 HAVE_SETENV=0
23247 else
23248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
23249$as_echo_n "checking whether setenv validates arguments... " >&6; }
d0ac1c44 23250if ${gl_cv_func_setenv_works+:} false; then :
3d99e817
AK
23251 $as_echo_n "(cached) " >&6
23252else
23253 if test "$cross_compiling" = yes; then :
23254 case "$host_os" in
5e8754f9
SDJ
23255 # Guess yes on glibc systems.
23256 *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
23257 # If we don't know, assume the worst.
23258 *) gl_cv_func_setenv_works="guessing no" ;;
3d99e817
AK
23259 esac
23260
23261else
23262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23263/* end confdefs.h. */
23264
23265 #include <stdlib.h>
23266 #include <errno.h>
23267 #include <string.h>
23268
23269int
23270main ()
23271{
23272
23273 int result = 0;
23274 {
23275 if (setenv ("", "", 0) != -1)
23276 result |= 1;
23277 else if (errno != EINVAL)
23278 result |= 2;
23279 }
23280 {
23281 if (setenv ("a", "=", 1) != 0)
23282 result |= 4;
23283 else if (strcmp (getenv ("a"), "=") != 0)
23284 result |= 8;
23285 }
23286 return result;
23287
23288 ;
23289 return 0;
23290}
23291_ACEOF
23292if ac_fn_c_try_run "$LINENO"; then :
23293 gl_cv_func_setenv_works=yes
23294else
23295 gl_cv_func_setenv_works=no
23296fi
23297rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23298 conftest.$ac_objext conftest.beam conftest.$ac_ext
23299fi
23300
23301fi
23302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
23303$as_echo "$gl_cv_func_setenv_works" >&6; }
23304 case "$gl_cv_func_setenv_works" in
23305 *yes) ;;
23306 *)
23307 REPLACE_SETENV=1
23308 ;;
23309 esac
23310 fi
23311
23312 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
23313
23314
23315
23316
23317
23318
23319
23320
23321 gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
23322
23323 fi
23324
23325
23326
23327
23328
23329 GNULIB_SETENV=1
23330
23331
23332
23333
23334
23335$as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
23336
23337
23338
23339
23340
0750520d
PA
23341
23342
23343
23344
23345
23346
23347
23348
23349
23350 if test $gl_cv_have_include_next = yes; then
23351 gl_cv_next_signal_h='<'signal.h'>'
23352 else
23353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
23354$as_echo_n "checking absolute name of <signal.h>... " >&6; }
d0ac1c44 23355if ${gl_cv_next_signal_h+:} false; then :
0750520d
PA
23356 $as_echo_n "(cached) " >&6
23357else
23358
23359
23360
23361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23362/* end confdefs.h. */
23363#include <signal.h>
23364_ACEOF
23365 case "$host_os" in
23366 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23367 *) gl_absname_cpp="$ac_cpp" ;;
23368 esac
23369
23370 case "$host_os" in
23371 mingw*)
23372 gl_dirsep_regex='[/\\]'
23373 ;;
23374 *)
23375 gl_dirsep_regex='\/'
23376 ;;
23377 esac
23378 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23379 gl_header_literal_regex=`echo 'signal.h' \
23380 | sed -e "$gl_make_literal_regex_sed"`
23381 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23382 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23383 s|^/[^/]|//&|
23384 p
23385 q
23386 }'
23387
23388 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23389 sed -n "$gl_absolute_header_sed"`
23390
23391 gl_header=$gl_cv_absolute_signal_h
23392 gl_cv_next_signal_h='"'$gl_header'"'
23393
23394
23395fi
23396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
23397$as_echo "$gl_cv_next_signal_h" >&6; }
23398 fi
23399 NEXT_SIGNAL_H=$gl_cv_next_signal_h
23400
23401 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23402 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23403 gl_next_as_first_directive='<'signal.h'>'
23404 else
23405 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23406 gl_next_as_first_directive=$gl_cv_next_signal_h
23407 fi
23408 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
23409
23410
23411
23412
23413
23414# AIX declares sig_atomic_t to already include volatile, and C89 compilers
23415# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
23416 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
23417#include <signal.h>
23418
23419"
d0ac1c44 23420if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
0750520d
PA
23421
23422else
23423 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
23424fi
23425
23426
23427
23428
23429
23430
23431
23432 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
23433#include <signal.h>
23434
23435"
d0ac1c44 23436if test "x$ac_cv_type_sighandler_t" = xyes; then :
0750520d
PA
23437
23438else
23439 HAVE_SIGHANDLER_T=0
23440fi
23441
23442
23443
5e8754f9
SDJ
23444 for gl_func in pthread_sigmask sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask; do
23445 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
23446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
23447$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
23448if eval \${$as_gl_Symbol+:} false; then :
23449 $as_echo_n "(cached) " >&6
23450else
23451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23452/* end confdefs.h. */
23453#include <signal.h>
23454
23455int
23456main ()
23457{
23458#undef $gl_func
23459 (void) $gl_func;
23460 ;
23461 return 0;
23462}
23463_ACEOF
23464if ac_fn_c_try_compile "$LINENO"; then :
23465 eval "$as_gl_Symbol=yes"
23466else
23467 eval "$as_gl_Symbol=no"
23468fi
23469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23470fi
23471eval ac_res=\$$as_gl_Symbol
23472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23473$as_echo "$ac_res" >&6; }
23474 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
23475 cat >>confdefs.h <<_ACEOF
23476#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
23477_ACEOF
0750520d 23478
5e8754f9
SDJ
23479 eval ac_cv_have_decl_$gl_func=yes
23480fi
23481 done
0750520d
PA
23482
23483
725e2999
JB
23484 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
23485/* <sys/types.h> is not needed according to POSIX, but the
23486 <sys/socket.h> in i386-unknown-freebsd4.10 and
23487 powerpc-apple-darwin5.5 required it. */
23488#include <sys/types.h>
23489#if HAVE_SYS_SOCKET_H
23490# include <sys/socket.h>
23491#elif HAVE_WS2TCPIP_H
23492# include <ws2tcpip.h>
23493#endif
23494
23495"
23496if test "x$ac_cv_type_socklen_t" = xyes; then :
23497
23498else
23499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
23500$as_echo_n "checking for socklen_t equivalent... " >&6; }
23501 if ${gl_cv_socklen_t_equiv+:} false; then :
23502 $as_echo_n "(cached) " >&6
23503else
23504 # Systems have either "struct sockaddr *" or
23505 # "void *" as the second argument to getpeername
23506 gl_cv_socklen_t_equiv=
23507 for arg2 in "struct sockaddr" void; do
23508 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
23509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23510/* end confdefs.h. */
23511#include <sys/types.h>
23512 #include <sys/socket.h>
23513
23514 int getpeername (int, $arg2 *, $t *);
23515int
23516main ()
23517{
23518$t len;
23519 getpeername (0, 0, &len);
23520 ;
23521 return 0;
23522}
23523_ACEOF
23524if ac_fn_c_try_compile "$LINENO"; then :
23525 gl_cv_socklen_t_equiv="$t"
23526fi
23527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23528 test "$gl_cv_socklen_t_equiv" != "" && break
23529 done
23530 test "$gl_cv_socklen_t_equiv" != "" && break
23531 done
23532
23533fi
23534
23535 if test "$gl_cv_socklen_t_equiv" = ""; then
23536 as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
23537 fi
23538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
23539$as_echo "$gl_cv_socklen_t_equiv" >&6; }
23540
23541cat >>confdefs.h <<_ACEOF
23542#define socklen_t $gl_cv_socklen_t_equiv
23543_ACEOF
23544
23545fi
23546
0750520d 23547
63ce7108
TT
23548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
23549$as_echo_n "checking for ssize_t... " >&6; }
d0ac1c44 23550if ${gt_cv_ssize_t+:} false; then :
63ce7108
TT
23551 $as_echo_n "(cached) " >&6
23552else
23553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23554/* end confdefs.h. */
23555#include <sys/types.h>
23556int
23557main ()
23558{
23559int x = sizeof (ssize_t *) + sizeof (ssize_t);
23560 return !x;
23561 ;
23562 return 0;
23563}
23564_ACEOF
23565if ac_fn_c_try_compile "$LINENO"; then :
23566 gt_cv_ssize_t=yes
23567else
23568 gt_cv_ssize_t=no
23569fi
23570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23571fi
23572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
23573$as_echo "$gt_cv_ssize_t" >&6; }
23574 if test $gt_cv_ssize_t = no; then
23575
23576$as_echo "#define ssize_t int" >>confdefs.h
23577
23578 fi
23579
23580
23581
23582
472fa5ee
SM
23583 :
23584
23585
23586
23587
23588
5e8754f9
SDJ
23589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
23590$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
23591if ${gl_cv_func_stat_dir_slash+:} false; then :
2196f55f
YQ
23592 $as_echo_n "(cached) " >&6
23593else
5e8754f9
SDJ
23594 if test "$cross_compiling" = yes; then :
23595 case $host_os in
23596 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
23597 *) gl_cv_func_stat_dir_slash="guessing yes";;
23598 esac
2196f55f
YQ
23599else
23600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23601/* end confdefs.h. */
23602#include <sys/stat.h>
23603
23604int
23605main ()
23606{
5e8754f9 23607struct stat st; return stat (".", &st) != stat ("./", &st);
2196f55f
YQ
23608 ;
23609 return 0;
23610}
23611_ACEOF
23612if ac_fn_c_try_run "$LINENO"; then :
5e8754f9 23613 gl_cv_func_stat_dir_slash=yes
2196f55f 23614else
5e8754f9 23615 gl_cv_func_stat_dir_slash=no
2196f55f
YQ
23616fi
23617rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23618 conftest.$ac_objext conftest.beam conftest.$ac_ext
23619fi
23620
23621fi
5e8754f9
SDJ
23622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
23623$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
23624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
23625$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
23626if ${gl_cv_func_stat_file_slash+:} false; then :
7a6dbc2f 23627 $as_echo_n "(cached) " >&6
2196f55f 23628else
5e8754f9
SDJ
23629 touch conftest.tmp
23630 # Assume that if we have lstat, we can also check symlinks.
23631 if test $ac_cv_func_lstat = yes; then
23632 ln -s conftest.tmp conftest.lnk
23633 fi
23634 if test "$cross_compiling" = yes; then :
23635 case "$host_os" in
23636 # Guess yes on glibc systems.
23637 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
23638 # If we don't know, assume the worst.
23639 *) gl_cv_func_stat_file_slash="guessing no" ;;
23640 esac
7a6dbc2f 23641
2196f55f 23642else
5e8754f9
SDJ
23643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23644/* end confdefs.h. */
23645#include <sys/stat.h>
7a6dbc2f 23646
5e8754f9
SDJ
23647int
23648main ()
23649{
23650int result = 0;
23651 struct stat st;
23652 if (!stat ("conftest.tmp/", &st))
23653 result |= 1;
23654#if HAVE_LSTAT
23655 if (!stat ("conftest.lnk/", &st))
23656 result |= 2;
23657#endif
23658 return result;
7a6dbc2f 23659
5e8754f9
SDJ
23660 ;
23661 return 0;
23662}
23663_ACEOF
23664if ac_fn_c_try_run "$LINENO"; then :
23665 gl_cv_func_stat_file_slash=yes
23666else
23667 gl_cv_func_stat_file_slash=no
2196f55f 23668fi
5e8754f9
SDJ
23669rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23670 conftest.$ac_objext conftest.beam conftest.$ac_ext
2196f55f 23671fi
2196f55f 23672
5e8754f9 23673 rm -f conftest.tmp conftest.lnk
7a6dbc2f 23674fi
5e8754f9
SDJ
23675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
23676$as_echo "$gl_cv_func_stat_file_slash" >&6; }
23677 case $gl_cv_func_stat_dir_slash in
23678 *no) REPLACE_STAT=1
2196f55f 23679
5e8754f9
SDJ
23680$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
23681;;
23682 esac
23683 case $gl_cv_func_stat_file_slash in
23684 *no) REPLACE_STAT=1
2196f55f 23685
5e8754f9
SDJ
23686$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
23687;;
23688 esac
2196f55f 23689
5e8754f9 23690 if test $REPLACE_STAT = 1; then
2196f55f
YQ
23691
23692
23693
23694
23695
23696
23697
2196f55f 23698
5e8754f9 23699 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
2196f55f 23700
5e8754f9
SDJ
23701 :
23702 fi
2196f55f
YQ
23703
23704
23705
23706
2196f55f 23707
5e8754f9 23708 GNULIB_STAT=1
2196f55f
YQ
23709
23710
23711
23712
2196f55f 23713
5e8754f9
SDJ
23714$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
23715
2196f55f
YQ
23716
23717
23718
725e2999
JB
23719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
23720$as_echo_n "checking for working stdalign.h... " >&6; }
23721if ${gl_cv_header_working_stdalign_h+:} false; then :
23722 $as_echo_n "(cached) " >&6
23723else
23724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23725/* end confdefs.h. */
23726#include <stdalign.h>
23727 #include <stddef.h>
23728
23729 /* Test that alignof yields a result consistent with offsetof.
23730 This catches GCC bug 52023
23731 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
23732 #ifdef __cplusplus
23733 template <class t> struct alignof_helper { char a; t b; };
23734 # define ao(type) offsetof (alignof_helper<type>, b)
23735 #else
23736 # define ao(type) offsetof (struct { char a; type b; }, b)
23737 #endif
23738 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
23739 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
23740 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
23741
23742 /* Test _Alignas only on platforms where gnulib can help. */
23743 #if \
23744 ((defined __cplusplus && 201103 <= __cplusplus) \
23745 || (defined __APPLE__ && defined __MACH__ \
23746 ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
23747 : __GNUC__) \
23748 || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \
23749 || __ICC || 0x5110 <= __SUNPRO_C \
23750 || 1300 <= _MSC_VER)
23751 struct alignas_test { char c; char alignas (8) alignas_8; };
23752 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
23753 ? 1 : -1];
23754 #endif
23755
23756int
23757main ()
23758{
23759
23760 ;
23761 return 0;
23762}
23763_ACEOF
23764if ac_fn_c_try_compile "$LINENO"; then :
23765 gl_cv_header_working_stdalign_h=yes
23766else
23767 gl_cv_header_working_stdalign_h=no
23768fi
23769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23770fi
23771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
23772$as_echo "$gl_cv_header_working_stdalign_h" >&6; }
23773
23774 if test $gl_cv_header_working_stdalign_h = yes; then
23775 STDALIGN_H=''
23776 else
23777 STDALIGN_H='stdalign.h'
23778 fi
23779
23780
23781 if test -n "$STDALIGN_H"; then
23782 GL_GENERATE_STDALIGN_H_TRUE=
23783 GL_GENERATE_STDALIGN_H_FALSE='#'
23784else
23785 GL_GENERATE_STDALIGN_H_TRUE='#'
23786 GL_GENERATE_STDALIGN_H_FALSE=
23787fi
23788
23789
23790
2196f55f
YQ
23791
23792
63ce7108
TT
23793 # Define two additional variables used in the Makefile substitution.
23794
23795 if test "$ac_cv_header_stdbool_h" = yes; then
23796 STDBOOL_H=''
23797 else
23798 STDBOOL_H='stdbool.h'
23799 fi
23800
23801 if test -n "$STDBOOL_H"; then
23802 GL_GENERATE_STDBOOL_H_TRUE=
23803 GL_GENERATE_STDBOOL_H_FALSE='#'
23804else
23805 GL_GENERATE_STDBOOL_H_TRUE='#'
23806 GL_GENERATE_STDBOOL_H_FALSE=
23807fi
23808
23809
23810 if test "$ac_cv_type__Bool" = yes; then
23811 HAVE__BOOL=1
23812 else
23813 HAVE__BOOL=0
23814 fi
23815
23816
23817
23818
23819
23820 STDDEF_H=
4a626d0a
PA
23821 ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
23822
23823"
d0ac1c44 23824if test "x$ac_cv_type_max_align_t" = xyes; then :
4a626d0a
PA
23825
23826else
23827 HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
23828fi
23829
63ce7108
TT
23830 if test $gt_cv_c_wchar_t = no; then
23831 HAVE_WCHAR_T=0
23832 STDDEF_H=stddef.h
23833 fi
23834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
23835$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
d0ac1c44 23836if ${gl_cv_decl_null_works+:} false; then :
63ce7108
TT
23837 $as_echo_n "(cached) " >&6
23838else
23839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23840/* end confdefs.h. */
23841#include <stddef.h>
23842 int test[2 * (sizeof NULL == sizeof (void *)) -1];
23843
23844int
23845main ()
23846{
23847
23848 ;
23849 return 0;
23850}
23851_ACEOF
23852if ac_fn_c_try_compile "$LINENO"; then :
23853 gl_cv_decl_null_works=yes
23854else
23855 gl_cv_decl_null_works=no
23856fi
23857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23858fi
23859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
23860$as_echo "$gl_cv_decl_null_works" >&6; }
23861 if test $gl_cv_decl_null_works = no; then
23862 REPLACE_NULL=1
23863 STDDEF_H=stddef.h
23864 fi
23865
23866 if test -n "$STDDEF_H"; then
23867 GL_GENERATE_STDDEF_H_TRUE=
23868 GL_GENERATE_STDDEF_H_FALSE='#'
23869else
23870 GL_GENERATE_STDDEF_H_TRUE='#'
23871 GL_GENERATE_STDDEF_H_FALSE=
23872fi
23873
23874 if test -n "$STDDEF_H"; then
23875
23876
23877
23878
23879
23880
23881
23882
23883 if test $gl_cv_have_include_next = yes; then
23884 gl_cv_next_stddef_h='<'stddef.h'>'
23885 else
23886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
23887$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
d0ac1c44 23888if ${gl_cv_next_stddef_h+:} false; then :
63ce7108
TT
23889 $as_echo_n "(cached) " >&6
23890else
23891
4a626d0a
PA
23892
23893
23894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63ce7108
TT
23895/* end confdefs.h. */
23896#include <stddef.h>
63ce7108 23897_ACEOF
4a626d0a
PA
23898 case "$host_os" in
23899 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23900 *) gl_absname_cpp="$ac_cpp" ;;
23901 esac
63ce7108 23902
4a626d0a
PA
23903 case "$host_os" in
23904 mingw*)
23905 gl_dirsep_regex='[/\\]'
23906 ;;
23907 *)
23908 gl_dirsep_regex='\/'
23909 ;;
23910 esac
23911 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23912 gl_header_literal_regex=`echo 'stddef.h' \
23913 | sed -e "$gl_make_literal_regex_sed"`
23914 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23915 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23916 s|^/[^/]|//&|
23917 p
23918 q
23919 }'
63ce7108 23920
4a626d0a
PA
23921 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23922 sed -n "$gl_absolute_header_sed"`
23923
23924 gl_header=$gl_cv_absolute_stddef_h
23925 gl_cv_next_stddef_h='"'$gl_header'"'
63ce7108
TT
23926
23927
23928fi
23929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
23930$as_echo "$gl_cv_next_stddef_h" >&6; }
23931 fi
23932 NEXT_STDDEF_H=$gl_cv_next_stddef_h
23933
23934 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23935 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23936 gl_next_as_first_directive='<'stddef.h'>'
23937 else
23938 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23939 gl_next_as_first_directive=$gl_cv_next_stddef_h
23940 fi
23941 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
23942
23943
23944
23945
23946 fi
23947
23948
23949
23950
49e4877c 23951 $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
63ce7108
TT
23952
23953
23954
98399780
YQ
23955
23956
23957
23958
23959
4a626d0a
PA
23960
23961
6a29c58e
YQ
23962 if test $gl_cv_have_include_next = yes; then
23963 gl_cv_next_stdio_h='<'stdio.h'>'
23964 else
23965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
23966$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
d0ac1c44 23967if ${gl_cv_next_stdio_h+:} false; then :
6a29c58e
YQ
23968 $as_echo_n "(cached) " >&6
23969else
23970
4a626d0a
PA
23971
23972
23973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6a29c58e
YQ
23974/* end confdefs.h. */
23975#include <stdio.h>
6a29c58e 23976_ACEOF
4a626d0a
PA
23977 case "$host_os" in
23978 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23979 *) gl_absname_cpp="$ac_cpp" ;;
23980 esac
23981
23982 case "$host_os" in
23983 mingw*)
23984 gl_dirsep_regex='[/\\]'
23985 ;;
23986 *)
23987 gl_dirsep_regex='\/'
23988 ;;
23989 esac
23990 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23991 gl_header_literal_regex=`echo 'stdio.h' \
23992 | sed -e "$gl_make_literal_regex_sed"`
23993 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23994 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23995 s|^/[^/]|//&|
23996 p
23997 q
23998 }'
6a29c58e 23999
4a626d0a
PA
24000 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24001 sed -n "$gl_absolute_header_sed"`
6a29c58e 24002
4a626d0a
PA
24003 gl_header=$gl_cv_absolute_stdio_h
24004 gl_cv_next_stdio_h='"'$gl_header'"'
6a29c58e
YQ
24005
24006
24007fi
24008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
24009$as_echo "$gl_cv_next_stdio_h" >&6; }
24010 fi
24011 NEXT_STDIO_H=$gl_cv_next_stdio_h
24012
24013 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24014 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24015 gl_next_as_first_directive='<'stdio.h'>'
24016 else
24017 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24018 gl_next_as_first_directive=$gl_cv_next_stdio_h
24019 fi
24020 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
24021
24022
24023
24024
24025
4a626d0a
PA
24026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
24027$as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
d0ac1c44 24028if ${gl_cv_func_printf_attribute_flavor+:} false; then :
4a626d0a
PA
24029 $as_echo_n "(cached) " >&6
24030else
24031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24032/* end confdefs.h. */
24033
24034 #define __STDC_FORMAT_MACROS 1
24035 #include <stdio.h>
24036 #include <inttypes.h>
24037 /* For non-mingw systems, compilation will trivially succeed.
24038 For mingw, compilation will succeed for older mingw (system
24039 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
5e8754f9 24040 #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
4a626d0a
PA
24041 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
24042 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
24043 #endif
24044
24045int
24046main ()
24047{
24048
24049 ;
24050 return 0;
24051}
24052_ACEOF
24053if ac_fn_c_try_compile "$LINENO"; then :
24054 gl_cv_func_printf_attribute_flavor=system
24055else
24056 gl_cv_func_printf_attribute_flavor=gnu
24057fi
24058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24059fi
24060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
24061$as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
24062 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
24063
24064$as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
24065
24066 fi
24067
6a29c58e
YQ
24068 GNULIB_FSCANF=1
24069
24070
24071cat >>confdefs.h <<_ACEOF
24072#define GNULIB_FSCANF 1
24073_ACEOF
24074
24075
24076 GNULIB_SCANF=1
24077
24078
24079cat >>confdefs.h <<_ACEOF
24080#define GNULIB_SCANF 1
24081_ACEOF
24082
24083
24084 GNULIB_FGETC=1
24085 GNULIB_GETC=1
24086 GNULIB_GETCHAR=1
24087 GNULIB_FGETS=1
24088 GNULIB_FREAD=1
24089
24090
24091 GNULIB_FPRINTF=1
24092 GNULIB_PRINTF=1
24093 GNULIB_VFPRINTF=1
24094 GNULIB_VPRINTF=1
24095 GNULIB_FPUTC=1
24096 GNULIB_PUTC=1
24097 GNULIB_PUTCHAR=1
24098 GNULIB_FPUTS=1
24099 GNULIB_PUTS=1
24100 GNULIB_FWRITE=1
24101
24102
24103
24104
5e8754f9
SDJ
24105 for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen renameat snprintf tmpfile vdprintf vsnprintf; do
24106 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
24107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
24108$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
24109if eval \${$as_gl_Symbol+:} false; then :
24110 $as_echo_n "(cached) " >&6
24111else
24112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24113/* end confdefs.h. */
24114#include <stdio.h>
24115
24116int
24117main ()
24118{
24119#undef $gl_func
24120 (void) $gl_func;
24121 ;
24122 return 0;
24123}
24124_ACEOF
24125if ac_fn_c_try_compile "$LINENO"; then :
24126 eval "$as_gl_Symbol=yes"
24127else
24128 eval "$as_gl_Symbol=no"
24129fi
24130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24131fi
24132eval ac_res=\$$as_gl_Symbol
24133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
24134$as_echo "$ac_res" >&6; }
24135 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
24136 cat >>confdefs.h <<_ACEOF
24137#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
24138_ACEOF
6a29c58e 24139
5e8754f9
SDJ
24140 eval ac_cv_have_decl_$gl_func=yes
24141fi
24142 done
6a29c58e
YQ
24143
24144
24145
24146
24147
24148
24149
24150
24151
24152
24153
24154
98399780
YQ
24155 if test $gl_cv_have_include_next = yes; then
24156 gl_cv_next_stdlib_h='<'stdlib.h'>'
24157 else
24158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
24159$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
d0ac1c44 24160if ${gl_cv_next_stdlib_h+:} false; then :
98399780
YQ
24161 $as_echo_n "(cached) " >&6
24162else
24163
4a626d0a
PA
24164
24165
24166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
98399780
YQ
24167/* end confdefs.h. */
24168#include <stdlib.h>
98399780 24169_ACEOF
4a626d0a
PA
24170 case "$host_os" in
24171 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24172 *) gl_absname_cpp="$ac_cpp" ;;
24173 esac
24174
24175 case "$host_os" in
24176 mingw*)
24177 gl_dirsep_regex='[/\\]'
24178 ;;
24179 *)
24180 gl_dirsep_regex='\/'
24181 ;;
24182 esac
24183 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24184 gl_header_literal_regex=`echo 'stdlib.h' \
24185 | sed -e "$gl_make_literal_regex_sed"`
24186 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24187 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24188 s|^/[^/]|//&|
24189 p
24190 q
24191 }'
98399780 24192
4a626d0a
PA
24193 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24194 sed -n "$gl_absolute_header_sed"`
98399780 24195
4a626d0a
PA
24196 gl_header=$gl_cv_absolute_stdlib_h
24197 gl_cv_next_stdlib_h='"'$gl_header'"'
98399780
YQ
24198
24199
24200fi
24201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
24202$as_echo "$gl_cv_next_stdlib_h" >&6; }
24203 fi
24204 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
24205
24206 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24207 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24208 gl_next_as_first_directive='<'stdlib.h'>'
24209 else
24210 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24211 gl_next_as_first_directive=$gl_cv_next_stdlib_h
24212 fi
24213 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
24214
24215
24216
24217
24218
24219
5e8754f9
SDJ
24220 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
24221 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
24222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
24223$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
24224if eval \${$as_gl_Symbol+:} false; then :
24225 $as_echo_n "(cached) " >&6
24226else
24227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24228/* end confdefs.h. */
24229#include <stdlib.h>
24230#if HAVE_SYS_LOADAVG_H
24231# include <sys/loadavg.h>
24232#endif
24233#if HAVE_RANDOM_H
24234# include <random.h>
24235#endif
24236
24237int
24238main ()
24239{
24240#undef $gl_func
24241 (void) $gl_func;
24242 ;
24243 return 0;
24244}
24245_ACEOF
24246if ac_fn_c_try_compile "$LINENO"; then :
24247 eval "$as_gl_Symbol=yes"
24248else
24249 eval "$as_gl_Symbol=no"
24250fi
24251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24252fi
24253eval ac_res=\$$as_gl_Symbol
24254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
24255$as_echo "$ac_res" >&6; }
24256 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
24257 cat >>confdefs.h <<_ACEOF
24258#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
24259_ACEOF
98399780 24260
5e8754f9
SDJ
24261 eval ac_cv_have_decl_$gl_func=yes
24262fi
24263 done
98399780
YQ
24264
24265
24266
24267
24268
24269
8424cc97
SM
24270 for ac_func in strchrnul
24271do :
24272 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
d0ac1c44 24273if test "x$ac_cv_func_strchrnul" = xyes; then :
8424cc97
SM
24274 cat >>confdefs.h <<_ACEOF
24275#define HAVE_STRCHRNUL 1
24276_ACEOF
24277
24278fi
24279done
24280
24281 if test $ac_cv_func_strchrnul = no; then
24282 HAVE_STRCHRNUL=0
24283 else
24284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
24285$as_echo_n "checking whether strchrnul works... " >&6; }
d0ac1c44 24286if ${gl_cv_func_strchrnul_works+:} false; then :
8424cc97
SM
24287 $as_echo_n "(cached) " >&6
24288else
24289 if test "$cross_compiling" = yes; then :
24290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24291/* end confdefs.h. */
24292
24293#if defined __CYGWIN__
24294 #include <cygwin/version.h>
24295 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
24296 Lucky user
24297 #endif
24298#else
24299 Lucky user
24300#endif
24301
24302_ACEOF
24303if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24304 $EGREP "Lucky user" >/dev/null 2>&1; then :
24305 gl_cv_func_strchrnul_works="guessing yes"
24306else
24307 gl_cv_func_strchrnul_works="guessing no"
24308fi
24309rm -f conftest*
24310
24311
24312else
24313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24314/* end confdefs.h. */
24315
24316#include <string.h> /* for strchrnul */
24317
24318int
24319main ()
24320{
24321const char *buf = "a";
24322 return strchrnul (buf, 'b') != buf + 1;
24323
24324 ;
24325 return 0;
24326}
24327_ACEOF
24328if ac_fn_c_try_run "$LINENO"; then :
24329 gl_cv_func_strchrnul_works=yes
24330else
24331 gl_cv_func_strchrnul_works=no
24332fi
24333rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24334 conftest.$ac_objext conftest.beam conftest.$ac_ext
24335fi
24336
24337
24338fi
24339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
24340$as_echo "$gl_cv_func_strchrnul_works" >&6; }
24341 case "$gl_cv_func_strchrnul_works" in
24342 *yes) ;;
24343 *) REPLACE_STRCHRNUL=1 ;;
24344 esac
24345 fi
24346
24347 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
24348
24349
24350
24351
24352
24353
24354
24355
24356 gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
24357
24358 :
24359 fi
24360
24361
24362
24363
24364
24365 GNULIB_STRCHRNUL=1
24366
24367
24368
24369
24370
24371$as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
24372
24373
24374
24375
24376
24377
24378
472fa5ee
SM
24379 :
24380
24381
24382
24383
24384
6ec2e0f5
SDJ
24385 if test $ac_cv_func_strdup = yes; then
24386 if test $gl_cv_func_malloc_posix != yes; then
24387 REPLACE_STRDUP=1
24388 fi
24389 fi
24390
472fa5ee
SM
24391 :
24392
24393
24394
24395
24396
6ec2e0f5
SDJ
24397 if test $ac_cv_have_decl_strdup = no; then
24398 HAVE_DECL_STRDUP=0
24399 fi
24400
24401 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
24402
24403
24404
24405
24406
24407
24408
24409
24410 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
24411
24412 :
24413 fi
24414
24415
24416
24417
24418
24419 GNULIB_STRDUP=1
24420
24421
24422
24423
24424
24425$as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
24426
24427
24428
24429
24430
24431
24432
24433
24434 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
24435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
24436$as_echo_n "checking for working strerror function... " >&6; }
d0ac1c44 24437if ${gl_cv_func_working_strerror+:} false; then :
6ec2e0f5
SDJ
24438 $as_echo_n "(cached) " >&6
24439else
24440 if test "$cross_compiling" = yes; then :
24441 case "$host_os" in
5e8754f9
SDJ
24442 # Guess yes on glibc systems.
24443 *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
24444 # If we don't know, assume the worst.
24445 *) gl_cv_func_working_strerror="guessing no" ;;
6ec2e0f5
SDJ
24446 esac
24447
24448else
24449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24450/* end confdefs.h. */
24451#include <string.h>
24452
24453int
24454main ()
24455{
24456if (!*strerror (-2)) return 1;
24457 ;
24458 return 0;
24459}
24460_ACEOF
24461if ac_fn_c_try_run "$LINENO"; then :
24462 gl_cv_func_working_strerror=yes
24463else
24464 gl_cv_func_working_strerror=no
24465fi
24466rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24467 conftest.$ac_objext conftest.beam conftest.$ac_ext
24468fi
24469
24470
24471fi
24472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
24473$as_echo "$gl_cv_func_working_strerror" >&6; }
24474 case "$gl_cv_func_working_strerror" in
24475 *yes) ;;
24476 *)
24477 REPLACE_STRERROR=1
24478 ;;
24479 esac
24480
24481 else
24482 REPLACE_STRERROR=1
24483 fi
24484
24485 if test $REPLACE_STRERROR = 1; then
24486
24487
24488
24489
24490
24491
24492
24493
24494 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
24495
24496 fi
24497
24498
24499cat >>confdefs.h <<_ACEOF
24500#define GNULIB_STRERROR 1
24501_ACEOF
24502
24503
24504
24505
24506
24507
24508
24509 GNULIB_STRERROR=1
24510
24511
24512
24513
24514
24515$as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
24516
24517
24518
24519
24520
24521 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
24522
24523
24524
24525
24526
24527
24528
24529
24530 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
24531
24532
24533
24534
24535
472fa5ee
SM
24536 :
24537
24538
24539
24540
24541
6ec2e0f5
SDJ
24542 if test $ac_cv_header_sys_socket_h != yes; then
24543 for ac_header in winsock2.h
24544do :
24545 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
d0ac1c44 24546if test "x$ac_cv_header_winsock2_h" = xyes; then :
6ec2e0f5
SDJ
24547 cat >>confdefs.h <<_ACEOF
24548#define HAVE_WINSOCK2_H 1
24549_ACEOF
24550
24551fi
24552
24553done
24554
24555 fi
24556 if test "$ac_cv_header_winsock2_h" = yes; then
24557 HAVE_WINSOCK2_H=1
24558 UNISTD_H_HAVE_WINSOCK2_H=1
24559 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
24560 else
24561 HAVE_WINSOCK2_H=0
24562 fi
24563
24564
24565 fi
24566
24567
24568
24569
98399780 24570
63ce7108
TT
24571 if test $REPLACE_STRSTR = 0; then
24572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
24573$as_echo_n "checking whether strstr works in linear time... " >&6; }
d0ac1c44 24574if ${gl_cv_func_strstr_linear+:} false; then :
63ce7108
TT
24575 $as_echo_n "(cached) " >&6
24576else
24577 if test "$cross_compiling" = yes; then :
24578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24579/* end confdefs.h. */
24580
24581#include <features.h>
24582#ifdef __GNU_LIBRARY__
24583 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
24584 && !(defined __i386__ || defined __x86_64__) \
24585 && !defined __UCLIBC__
24586 Lucky user
24587 #endif
24588#endif
24589#ifdef __CYGWIN__
24590 #include <cygwin/version.h>
24591 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
24592 Lucky user
24593 #endif
24594#endif
24595
24596_ACEOF
24597if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24598 $EGREP "Lucky user" >/dev/null 2>&1; then :
24599 gl_cv_func_strstr_linear="guessing yes"
c971b7fa 24600else
63ce7108 24601 gl_cv_func_strstr_linear="guessing no"
c971b7fa
PA
24602fi
24603rm -f conftest*
24604
24605
24606else
24607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24608/* end confdefs.h. */
24609
49e4877c
PA
24610#ifdef __MVS__
24611/* z/OS does not deliver signals while strstr() is running (thanks to
24612 restrictions on its LE runtime), which prevents us from limiting the
24613 running time of this test. */
24614# error "This test does not work properly on z/OS"
24615#endif
c971b7fa 24616#include <signal.h> /* for signal */
63ce7108 24617#include <string.h> /* for strstr */
c971b7fa
PA
24618#include <stdlib.h> /* for malloc */
24619#include <unistd.h> /* for alarm */
49e4877c 24620static void quit (int sig) { _exit (sig + 128); }
c971b7fa
PA
24621
24622int
24623main ()
24624{
24625
24626 int result = 0;
24627 size_t m = 1000000;
63ce7108
TT
24628 char *haystack = (char *) malloc (2 * m + 2);
24629 char *needle = (char *) malloc (m + 2);
c971b7fa 24630 /* Failure to compile this test due to missing alarm is okay,
63ce7108 24631 since all such platforms (mingw) also have quadratic strstr. */
c971b7fa
PA
24632 signal (SIGALRM, quit);
24633 alarm (5);
24634 /* Check for quadratic performance. */
24635 if (haystack && needle)
24636 {
24637 memset (haystack, 'A', 2 * m);
24638 haystack[2 * m] = 'B';
63ce7108 24639 haystack[2 * m + 1] = 0;
c971b7fa
PA
24640 memset (needle, 'A', m);
24641 needle[m] = 'B';
63ce7108
TT
24642 needle[m + 1] = 0;
24643 if (!strstr (haystack, needle))
c971b7fa
PA
24644 result |= 1;
24645 }
24646 return result;
24647
24648 ;
24649 return 0;
24650}
24651_ACEOF
24652if ac_fn_c_try_run "$LINENO"; then :
63ce7108 24653 gl_cv_func_strstr_linear=yes
c971b7fa 24654else
63ce7108 24655 gl_cv_func_strstr_linear=no
c971b7fa
PA
24656fi
24657rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24658 conftest.$ac_objext conftest.beam conftest.$ac_ext
24659fi
24660
24661
24662fi
63ce7108
TT
24663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
24664$as_echo "$gl_cv_func_strstr_linear" >&6; }
24665 case "$gl_cv_func_strstr_linear" in
40a73391
JK
24666 *yes) ;;
24667 *)
63ce7108 24668 REPLACE_STRSTR=1
40a73391
JK
24669 ;;
24670 esac
c971b7fa
PA
24671 fi
24672
63ce7108 24673 if test $REPLACE_STRSTR = 1; then
c971b7fa
PA
24674
24675
24676
24677
24678
24679
24680
24681
63ce7108 24682 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
c971b7fa 24683
a512b375 24684 fi
c971b7fa
PA
24685
24686
24687
5e8754f9 24688 if test "$gl_cv_func_memchr_works" != yes; then
63ce7108 24689 REPLACE_STRSTR=1
c971b7fa 24690 else
63ce7108
TT
24691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
24692$as_echo_n "checking whether strstr works... " >&6; }
d0ac1c44 24693if ${gl_cv_func_strstr_works_always+:} false; then :
c971b7fa
PA
24694 $as_echo_n "(cached) " >&6
24695else
24696 if test "$cross_compiling" = yes; then :
63ce7108 24697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
24698/* end confdefs.h. */
24699
24700#ifdef __GNU_LIBRARY__
24701 #include <features.h>
63ce7108 24702 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
c971b7fa
PA
24703 || defined __UCLIBC__
24704 Lucky user
24705 #endif
24706#elif defined __CYGWIN__
24707 #include <cygwin/version.h>
24708 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
24709 Lucky user
24710 #endif
24711#else
24712 Lucky user
24713#endif
24714
24715_ACEOF
24716if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24717 $EGREP "Lucky user" >/dev/null 2>&1; then :
63ce7108 24718 gl_cv_func_strstr_works_always="guessing yes"
c971b7fa 24719else
63ce7108 24720 gl_cv_func_strstr_works_always="guessing no"
c971b7fa
PA
24721fi
24722rm -f conftest*
24723
24724
24725else
24726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24727/* end confdefs.h. */
24728
63ce7108 24729#include <string.h> /* for strstr */
c971b7fa
PA
24730#define P "_EF_BF_BD"
24731#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
24732#define NEEDLE P P P P P
24733
24734int
24735main ()
24736{
63ce7108 24737return !!strstr (HAYSTACK, NEEDLE);
c971b7fa
PA
24738
24739 ;
24740 return 0;
24741}
24742_ACEOF
24743if ac_fn_c_try_run "$LINENO"; then :
63ce7108 24744 gl_cv_func_strstr_works_always=yes
c971b7fa 24745else
63ce7108 24746 gl_cv_func_strstr_works_always=no
c971b7fa
PA
24747fi
24748rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24749 conftest.$ac_objext conftest.beam conftest.$ac_ext
24750fi
24751
24752
24753fi
63ce7108
TT
24754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
24755$as_echo "$gl_cv_func_strstr_works_always" >&6; }
24756 case "$gl_cv_func_strstr_works_always" in
40a73391
JK
24757 *yes) ;;
24758 *)
63ce7108 24759 REPLACE_STRSTR=1
40a73391
JK
24760 ;;
24761 esac
c971b7fa 24762 fi
8839a007 24763
63ce7108 24764 if test $REPLACE_STRSTR = 1; then
8839a007 24765
8690e634
JK
24766
24767
8690e634
JK
24768
24769
24770
24771
24772
63ce7108 24773 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
8690e634 24774
8690e634
JK
24775 fi
24776
8690e634
JK
24777
24778
8690e634 24779
8690e634 24780
63ce7108 24781 GNULIB_STRSTR=1
8690e634
JK
24782
24783
24784
8690e634
JK
24785
24786
63ce7108 24787$as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
8690e634
JK
24788
24789
24790
24791
24792
24793
24794
421693b0
PA
24795 for ac_func in strtok_r
24796do :
24797 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
d0ac1c44 24798if test "x$ac_cv_func_strtok_r" = xyes; then :
421693b0
PA
24799 cat >>confdefs.h <<_ACEOF
24800#define HAVE_STRTOK_R 1
24801_ACEOF
24802
24803fi
24804done
24805
24806 if test $ac_cv_func_strtok_r = yes; then
24807 HAVE_STRTOK_R=1
24808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5
24809$as_echo_n "checking whether strtok_r works... " >&6; }
d0ac1c44 24810if ${gl_cv_func_strtok_r_works+:} false; then :
421693b0
PA
24811 $as_echo_n "(cached) " >&6
24812else
24813 if test "$cross_compiling" = yes; then :
5e8754f9
SDJ
24814
24815 case "$host_os" in
24816 # Guess no on glibc systems.
24817 *-gnu*) gl_cv_func_strtok_r_works="guessing no";;
24818 *) gl_cv_func_strtok_r_works="guessing yes";;
421693b0
PA
24819 esac
24820
24821else
24822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24823/* end confdefs.h. */
24824
24825 #ifndef __OPTIMIZE__
24826 # define __OPTIMIZE__ 1
24827 #endif
24828 #undef __OPTIMIZE_SIZE__
24829 #undef __NO_INLINE__
24830 #include <stdlib.h>
24831 #include <string.h>
24832
24833int
24834main ()
24835{
24836static const char dummy[] = "\177\01a";
24837 char delimiters[] = "xxxxxxxx";
24838 char *save_ptr = (char *) dummy;
24839 strtok_r (delimiters, "x", &save_ptr);
24840 strtok_r (NULL, "x", &save_ptr);
24841 return 0;
24842
24843 ;
24844 return 0;
24845}
24846
24847_ACEOF
24848if ac_fn_c_try_run "$LINENO"; then :
24849 gl_cv_func_strtok_r_works=yes
24850else
24851 gl_cv_func_strtok_r_works=no
24852fi
24853rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24854 conftest.$ac_objext conftest.beam conftest.$ac_ext
24855fi
24856
24857
24858fi
24859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5
24860$as_echo "$gl_cv_func_strtok_r_works" >&6; }
24861 case "$gl_cv_func_strtok_r_works" in
24862 *no)
24863 UNDEFINE_STRTOK_R=1
24864 ;;
24865 esac
24866 else
24867 HAVE_STRTOK_R=0
24868 fi
24869
472fa5ee
SM
24870 :
24871
24872
24873
24874
24875
421693b0
PA
24876 if test $ac_cv_have_decl_strtok_r = no; then
24877 HAVE_DECL_STRTOK_R=0
24878 fi
24879
24880 if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
24881
24882
24883
24884
24885
24886
24887
24888
24889 gl_LIBOBJS="$gl_LIBOBJS strtok_r.$ac_objext"
24890
24891
24892 :
24893
24894 fi
24895
24896
24897
24898
24899
24900 GNULIB_STRTOK_R=1
24901
24902
24903
24904
24905
24906$as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h
24907
24908
24909
24910
24911
24912
24913
8690e634
JK
24914
24915
24916
24917
24918
8690e634 24919
09607c9e 24920
725e2999
JB
24921
24922
472fa5ee
SM
24923 :
24924
24925
24926
24927
24928
09607c9e
TT
24929
24930
24931
24932 if test $gl_cv_have_include_next = yes; then
24933 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
24934 else
24935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
24936$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
d0ac1c44 24937if ${gl_cv_next_sys_stat_h+:} false; then :
09607c9e
TT
24938 $as_echo_n "(cached) " >&6
24939else
24940
24941 if test $ac_cv_header_sys_stat_h = yes; then
24942
24943
4a626d0a
PA
24944
24945
24946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
09607c9e
TT
24947/* end confdefs.h. */
24948#include <sys/stat.h>
09607c9e 24949_ACEOF
4a626d0a
PA
24950 case "$host_os" in
24951 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24952 *) gl_absname_cpp="$ac_cpp" ;;
24953 esac
24954
24955 case "$host_os" in
24956 mingw*)
24957 gl_dirsep_regex='[/\\]'
24958 ;;
24959 *)
24960 gl_dirsep_regex='\/'
24961 ;;
24962 esac
24963 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24964 gl_header_literal_regex=`echo 'sys/stat.h' \
24965 | sed -e "$gl_make_literal_regex_sed"`
24966 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24967 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24968 s|^/[^/]|//&|
24969 p
24970 q
24971 }'
24972
24973 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24974 sed -n "$gl_absolute_header_sed"`
24975
24976 gl_header=$gl_cv_absolute_sys_stat_h
24977 gl_cv_next_sys_stat_h='"'$gl_header'"'
09607c9e
TT
24978 else
24979 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
24980 fi
24981
24982
24983fi
24984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
24985$as_echo "$gl_cv_next_sys_stat_h" >&6; }
24986 fi
24987 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
24988
24989 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24990 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24991 gl_next_as_first_directive='<'sys/stat.h'>'
24992 else
24993 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24994 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
24995 fi
24996 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
24997
24998
24999
25000
25001
25002
25003
25004
2196f55f 25005
09607c9e
TT
25006
25007
5e8754f9 25008 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
09607c9e 25009
5e8754f9 25010$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
09607c9e 25011
5e8754f9 25012 fi
09607c9e
TT
25013
25014 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
25015 #include <sys/stat.h>
25016"
d0ac1c44 25017if test "x$ac_cv_type_nlink_t" = xyes; then :
09607c9e
TT
25018
25019else
25020
25021$as_echo "#define nlink_t int" >>confdefs.h
25022
25023fi
25024
25025
25026
5e8754f9
SDJ
25027 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
25028 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
25029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
25030$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
25031if eval \${$as_gl_Symbol+:} false; then :
25032 $as_echo_n "(cached) " >&6
25033else
25034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25035/* end confdefs.h. */
25036#include <sys/stat.h>
25037
25038int
25039main ()
25040{
25041#undef $gl_func
25042 (void) $gl_func;
25043 ;
25044 return 0;
25045}
25046_ACEOF
25047if ac_fn_c_try_compile "$LINENO"; then :
25048 eval "$as_gl_Symbol=yes"
25049else
25050 eval "$as_gl_Symbol=no"
25051fi
25052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25053fi
25054eval ac_res=\$$as_gl_Symbol
25055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
25056$as_echo "$ac_res" >&6; }
25057 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
25058 cat >>confdefs.h <<_ACEOF
25059#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
25060_ACEOF
09607c9e 25061
5e8754f9
SDJ
25062 eval ac_cv_have_decl_$gl_func=yes
25063fi
25064 done
09607c9e
TT
25065
25066
25067
25068
25069
25070
25071
25072
25073
25074
25075
725e2999
JB
25076
25077
25078
25079
25080
25081
25082 :
25083
25084
25085
25086
25087
25088
25089
25090
25091 if test $gl_cv_have_include_next = yes; then
25092 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
25093 else
25094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
25095$as_echo_n "checking absolute name of <sys/uio.h>... " >&6; }
25096if ${gl_cv_next_sys_uio_h+:} false; then :
25097 $as_echo_n "(cached) " >&6
25098else
25099
25100 if test $ac_cv_header_sys_uio_h = yes; then
25101
25102
25103
25104
25105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25106/* end confdefs.h. */
25107#include <sys/uio.h>
25108_ACEOF
25109 case "$host_os" in
25110 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25111 *) gl_absname_cpp="$ac_cpp" ;;
25112 esac
25113
25114 case "$host_os" in
25115 mingw*)
25116 gl_dirsep_regex='[/\\]'
25117 ;;
25118 *)
25119 gl_dirsep_regex='\/'
25120 ;;
25121 esac
25122 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25123 gl_header_literal_regex=`echo 'sys/uio.h' \
25124 | sed -e "$gl_make_literal_regex_sed"`
25125 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25126 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25127 s|^/[^/]|//&|
25128 p
25129 q
25130 }'
25131
25132 gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25133 sed -n "$gl_absolute_header_sed"`
25134
25135 gl_header=$gl_cv_absolute_sys_uio_h
25136 gl_cv_next_sys_uio_h='"'$gl_header'"'
25137 else
25138 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
25139 fi
25140
25141
25142fi
25143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
25144$as_echo "$gl_cv_next_sys_uio_h" >&6; }
25145 fi
25146 NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
25147
25148 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25149 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25150 gl_next_as_first_directive='<'sys/uio.h'>'
25151 else
25152 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25153 gl_next_as_first_directive=$gl_cv_next_sys_uio_h
25154 fi
25155 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
25156
25157
25158
25159
25160 if test $ac_cv_header_sys_uio_h = yes; then
25161 HAVE_SYS_UIO_H=1
25162 else
25163 HAVE_SYS_UIO_H=0
25164 fi
25165
25166
25167
25168
25169
2d8adcbd
MM
25170 :
25171
25172
25173
25174
09607c9e
TT
25175
25176
25177
8839a007
PA
25178
25179
25180
25181
09607c9e
TT
25182
25183
8839a007 25184
472fa5ee
SM
25185 :
25186
25187
25188
25189
25190
8839a007
PA
25191
25192
25193
25194 if test $gl_cv_have_include_next = yes; then
25195 gl_cv_next_unistd_h='<'unistd.h'>'
25196 else
25197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
25198$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
d0ac1c44 25199if ${gl_cv_next_unistd_h+:} false; then :
8839a007
PA
25200 $as_echo_n "(cached) " >&6
25201else
25202
25203 if test $ac_cv_header_unistd_h = yes; then
25204
25205
4a626d0a
PA
25206
25207
25208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8839a007
PA
25209/* end confdefs.h. */
25210#include <unistd.h>
8839a007 25211_ACEOF
4a626d0a
PA
25212 case "$host_os" in
25213 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25214 *) gl_absname_cpp="$ac_cpp" ;;
25215 esac
25216
25217 case "$host_os" in
25218 mingw*)
25219 gl_dirsep_regex='[/\\]'
25220 ;;
25221 *)
25222 gl_dirsep_regex='\/'
25223 ;;
25224 esac
25225 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25226 gl_header_literal_regex=`echo 'unistd.h' \
25227 | sed -e "$gl_make_literal_regex_sed"`
25228 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25229 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25230 s|^/[^/]|//&|
25231 p
25232 q
25233 }'
25234
25235 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25236 sed -n "$gl_absolute_header_sed"`
25237
25238 gl_header=$gl_cv_absolute_unistd_h
25239 gl_cv_next_unistd_h='"'$gl_header'"'
8839a007
PA
25240 else
25241 gl_cv_next_unistd_h='<'unistd.h'>'
25242 fi
25243
25244
25245fi
25246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
25247$as_echo "$gl_cv_next_unistd_h" >&6; }
25248 fi
25249 NEXT_UNISTD_H=$gl_cv_next_unistd_h
25250
25251 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25252 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25253 gl_next_as_first_directive='<'unistd.h'>'
25254 else
25255 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25256 gl_next_as_first_directive=$gl_cv_next_unistd_h
25257 fi
25258 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
25259
25260
25261
25262
25263 if test $ac_cv_header_unistd_h = yes; then
25264 HAVE_UNISTD_H=1
25265 else
25266 HAVE_UNISTD_H=0
25267 fi
25268
25269
25270
25271
25272
25273
25274
5e8754f9
SDJ
25275 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
25276 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
25277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
25278$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
25279if eval \${$as_gl_Symbol+:} false; then :
25280 $as_echo_n "(cached) " >&6
25281else
25282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25283/* end confdefs.h. */
25284
25285#if HAVE_UNISTD_H
25286# include <unistd.h>
25287#endif
25288/* Some systems declare various items in the wrong headers. */
25289#if !(defined __GLIBC__ && !defined __UCLIBC__)
25290# include <fcntl.h>
25291# include <stdio.h>
25292# include <stdlib.h>
25293# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
25294# include <io.h>
25295# endif
25296#endif
25297
25298int
25299main ()
25300{
25301#undef $gl_func
25302 (void) $gl_func;
25303 ;
25304 return 0;
25305}
25306_ACEOF
25307if ac_fn_c_try_compile "$LINENO"; then :
25308 eval "$as_gl_Symbol=yes"
25309else
25310 eval "$as_gl_Symbol=no"
25311fi
25312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25313fi
25314eval ac_res=\$$as_gl_Symbol
25315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
25316$as_echo "$ac_res" >&6; }
25317 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
25318 cat >>confdefs.h <<_ACEOF
25319#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
25320_ACEOF
8839a007 25321
5e8754f9
SDJ
25322 eval ac_cv_have_decl_$gl_func=yes
25323fi
25324 done
8839a007
PA
25325
25326
25327
25328
472fa5ee
SM
25329 :
25330
25331
25332
25333
25334
25335
25336
25337
25338
25339 :
25340
8839a007 25341
6ec2e0f5
SDJ
25342
25343
25344
3d99e817
AK
25345 if test $ac_cv_have_decl_unsetenv = no; then
25346 HAVE_DECL_UNSETENV=0
25347 fi
25348 for ac_func in unsetenv
25349do :
25350 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
d0ac1c44 25351if test "x$ac_cv_func_unsetenv" = xyes; then :
3d99e817
AK
25352 cat >>confdefs.h <<_ACEOF
25353#define HAVE_UNSETENV 1
25354_ACEOF
25355
25356fi
25357done
25358
25359 if test $ac_cv_func_unsetenv = no; then
25360 HAVE_UNSETENV=0
25361 else
25362 HAVE_UNSETENV=1
25363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
25364$as_echo_n "checking for unsetenv() return type... " >&6; }
d0ac1c44 25365if ${gt_cv_func_unsetenv_ret+:} false; then :
3d99e817
AK
25366 $as_echo_n "(cached) " >&6
25367else
25368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25369/* end confdefs.h. */
25370
25371#undef _BSD
25372#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
25373#include <stdlib.h>
25374extern
25375#ifdef __cplusplus
25376"C"
25377#endif
25378int unsetenv (const char *name);
25379
25380int
25381main ()
25382{
25383
25384 ;
25385 return 0;
25386}
25387_ACEOF
25388if ac_fn_c_try_compile "$LINENO"; then :
25389 gt_cv_func_unsetenv_ret='int'
25390else
25391 gt_cv_func_unsetenv_ret='void'
25392fi
25393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25394fi
25395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
25396$as_echo "$gt_cv_func_unsetenv_ret" >&6; }
25397 if test $gt_cv_func_unsetenv_ret = 'void'; then
25398
25399$as_echo "#define VOID_UNSETENV 1" >>confdefs.h
25400
25401 REPLACE_UNSETENV=1
25402 fi
25403
25404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
25405$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
d0ac1c44 25406if ${gl_cv_func_unsetenv_works+:} false; then :
3d99e817
AK
25407 $as_echo_n "(cached) " >&6
25408else
25409 if test "$cross_compiling" = yes; then :
25410 case "$host_os" in
25411 # Guess yes on glibc systems.
25412 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
25413 # If we don't know, assume the worst.
25414 *) gl_cv_func_unsetenv_works="guessing no" ;;
25415 esac
25416
25417else
25418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25419/* end confdefs.h. */
25420
25421 #include <stdlib.h>
25422 #include <errno.h>
25423 extern char **environ;
25424
25425int
25426main ()
25427{
25428
25429 char entry1[] = "a=1";
25430 char entry2[] = "b=2";
25431 char *env[] = { entry1, entry2, NULL };
25432 if (putenv ((char *) "a=1")) return 1;
25433 if (putenv (entry2)) return 2;
25434 entry2[0] = 'a';
25435 unsetenv ("a");
25436 if (getenv ("a")) return 3;
25437 if (!unsetenv ("") || errno != EINVAL) return 4;
25438 entry2[0] = 'b';
25439 environ = env;
25440 if (!getenv ("a")) return 5;
25441 entry2[0] = 'a';
25442 unsetenv ("a");
25443 if (getenv ("a")) return 6;
25444
25445 ;
25446 return 0;
25447}
25448_ACEOF
25449if ac_fn_c_try_run "$LINENO"; then :
25450 gl_cv_func_unsetenv_works=yes
25451else
25452 gl_cv_func_unsetenv_works=no
25453fi
25454rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25455 conftest.$ac_objext conftest.beam conftest.$ac_ext
25456fi
25457
25458fi
25459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
25460$as_echo "$gl_cv_func_unsetenv_works" >&6; }
25461 case "$gl_cv_func_unsetenv_works" in
25462 *yes) ;;
25463 *)
25464 REPLACE_UNSETENV=1
25465 ;;
25466 esac
25467 fi
25468
25469 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
25470
25471
25472
25473
25474
25475
25476
25477
25478 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
25479
25480
25481
25482
472fa5ee
SM
25483 :
25484
25485
25486
25487
25488
3d99e817
AK
25489
25490 fi
25491
25492
25493
25494
25495
25496 GNULIB_UNSETENV=1
25497
25498
25499
25500
25501
25502$as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
25503
25504
25505
25506
25507
25508
8839a007
PA
25509
25510
25511
25512
25513
25514
472fa5ee
SM
25515 :
25516
25517
25518
25519
25520
8839a007 25521
8690e634
JK
25522
25523
25524 if test $gl_cv_have_include_next = yes; then
25525 gl_cv_next_wchar_h='<'wchar.h'>'
25526 else
25527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
25528$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
d0ac1c44 25529if ${gl_cv_next_wchar_h+:} false; then :
8690e634
JK
25530 $as_echo_n "(cached) " >&6
25531else
25532
25533 if test $ac_cv_header_wchar_h = yes; then
25534
25535
4a626d0a
PA
25536
25537
25538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
25539/* end confdefs.h. */
25540#include <wchar.h>
8690e634 25541_ACEOF
4a626d0a
PA
25542 case "$host_os" in
25543 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25544 *) gl_absname_cpp="$ac_cpp" ;;
25545 esac
25546
25547 case "$host_os" in
25548 mingw*)
25549 gl_dirsep_regex='[/\\]'
25550 ;;
25551 *)
25552 gl_dirsep_regex='\/'
25553 ;;
25554 esac
25555 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25556 gl_header_literal_regex=`echo 'wchar.h' \
25557 | sed -e "$gl_make_literal_regex_sed"`
25558 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25559 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25560 s|^/[^/]|//&|
25561 p
25562 q
25563 }'
25564
25565 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25566 sed -n "$gl_absolute_header_sed"`
25567
25568 gl_header=$gl_cv_absolute_wchar_h
25569 gl_cv_next_wchar_h='"'$gl_header'"'
8690e634
JK
25570 else
25571 gl_cv_next_wchar_h='<'wchar.h'>'
25572 fi
25573
25574
25575fi
25576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
25577$as_echo "$gl_cv_next_wchar_h" >&6; }
25578 fi
25579 NEXT_WCHAR_H=$gl_cv_next_wchar_h
25580
25581 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25582 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25583 gl_next_as_first_directive='<'wchar.h'>'
25584 else
25585 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25586 gl_next_as_first_directive=$gl_cv_next_wchar_h
25587 fi
25588 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
25589
25590
25591
25592
25593 if test $ac_cv_header_wchar_h = yes; then
25594 HAVE_WCHAR_H=1
25595 else
25596 HAVE_WCHAR_H=0
25597 fi
25598
c971b7fa
PA
25599
25600
25601
25602
8690e634
JK
25603 if test $gt_cv_c_wint_t = yes; then
25604 HAVE_WINT_T=1
25605 else
25606 HAVE_WINT_T=0
25607 fi
c971b7fa
PA
25608
25609
25610
5e8754f9
SDJ
25611 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
25612 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
25613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
25614$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
25615if eval \${$as_gl_Symbol+:} false; then :
25616 $as_echo_n "(cached) " >&6
25617else
25618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25619/* end confdefs.h. */
8690e634 25620
5e8754f9
SDJ
25621/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25622 <wchar.h>.
25623 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25624 included before <wchar.h>. */
25625#if !(defined __GLIBC__ && !defined __UCLIBC__)
25626# include <stddef.h>
25627# include <stdio.h>
25628# include <time.h>
25629#endif
25630#include <wchar.h>
c971b7fa 25631
5e8754f9
SDJ
25632int
25633main ()
25634{
25635#undef $gl_func
25636 (void) $gl_func;
25637 ;
25638 return 0;
25639}
25640_ACEOF
25641if ac_fn_c_try_compile "$LINENO"; then :
25642 eval "$as_gl_Symbol=yes"
25643else
25644 eval "$as_gl_Symbol=no"
25645fi
25646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25647fi
25648eval ac_res=\$$as_gl_Symbol
25649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
25650$as_echo "$ac_res" >&6; }
25651 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
25652 cat >>confdefs.h <<_ACEOF
25653#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
25654_ACEOF
c971b7fa 25655
5e8754f9
SDJ
25656 eval ac_cv_have_decl_$gl_func=yes
25657fi
25658 done
8690e634
JK
25659
25660
25661
25662
25663
25664
25665
472fa5ee
SM
25666 :
25667
25668
25669
25670
25671
8690e634
JK
25672 if test $ac_cv_func_iswcntrl = yes; then
25673 HAVE_ISWCNTRL=1
25674 else
25675 HAVE_ISWCNTRL=0
25676 fi
25677
25678
25679
8690e634
JK
25680 if test $gt_cv_c_wint_t = yes; then
25681 HAVE_WINT_T=1
25682 else
25683 HAVE_WINT_T=0
25684 fi
25685
25686
25687
25688
25689
25690
c971b7fa 25691
8690e634 25692
472fa5ee
SM
25693 :
25694
25695
25696
25697
25698
c971b7fa
PA
25699
25700
25701
25702 if test $gl_cv_have_include_next = yes; then
8690e634 25703 gl_cv_next_wctype_h='<'wctype.h'>'
c971b7fa 25704 else
8690e634
JK
25705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
25706$as_echo_n "checking absolute name of <wctype.h>... " >&6; }
d0ac1c44 25707if ${gl_cv_next_wctype_h+:} false; then :
c971b7fa
PA
25708 $as_echo_n "(cached) " >&6
25709else
25710
8690e634
JK
25711 if test $ac_cv_header_wctype_h = yes; then
25712
25713
4a626d0a
PA
25714
25715
25716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 25717/* end confdefs.h. */
8690e634 25718#include <wctype.h>
c971b7fa 25719_ACEOF
4a626d0a
PA
25720 case "$host_os" in
25721 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25722 *) gl_absname_cpp="$ac_cpp" ;;
25723 esac
25724
25725 case "$host_os" in
25726 mingw*)
25727 gl_dirsep_regex='[/\\]'
25728 ;;
25729 *)
25730 gl_dirsep_regex='\/'
25731 ;;
25732 esac
25733 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25734 gl_header_literal_regex=`echo 'wctype.h' \
25735 | sed -e "$gl_make_literal_regex_sed"`
25736 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25737 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25738 s|^/[^/]|//&|
25739 p
25740 q
25741 }'
25742
25743 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25744 sed -n "$gl_absolute_header_sed"`
25745
25746 gl_header=$gl_cv_absolute_wctype_h
25747 gl_cv_next_wctype_h='"'$gl_header'"'
8690e634
JK
25748 else
25749 gl_cv_next_wctype_h='<'wctype.h'>'
25750 fi
c971b7fa
PA
25751
25752
25753fi
8690e634
JK
25754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
25755$as_echo "$gl_cv_next_wctype_h" >&6; }
c971b7fa 25756 fi
8690e634 25757 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
c971b7fa
PA
25758
25759 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25760 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8690e634 25761 gl_next_as_first_directive='<'wctype.h'>'
c971b7fa
PA
25762 else
25763 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8690e634 25764 gl_next_as_first_directive=$gl_cv_next_wctype_h
c971b7fa 25765 fi
8690e634
JK
25766 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
25767
25768
25769
25770
25771 if test $ac_cv_header_wctype_h = yes; then
25772 if test $ac_cv_func_iswcntrl = yes; then
25773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
25774$as_echo_n "checking whether iswcntrl works... " >&6; }
d0ac1c44 25775if ${gl_cv_func_iswcntrl_works+:} false; then :
8690e634
JK
25776 $as_echo_n "(cached) " >&6
25777else
25778
25779 if test "$cross_compiling" = yes; then :
5e8754f9 25780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
25781/* end confdefs.h. */
25782#include <stdlib.h>
25783 #if __GNU_LIBRARY__ == 1
25784 Linux libc5 i18n is broken.
25785 #endif
25786int
25787main ()
25788{
25789
25790 ;
25791 return 0;
25792}
25793_ACEOF
25794if ac_fn_c_try_compile "$LINENO"; then :
25795 gl_cv_func_iswcntrl_works="guessing yes"
25796else
25797 gl_cv_func_iswcntrl_works="guessing no"
25798fi
25799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25800
25801else
25802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25803/* end confdefs.h. */
25804
25805 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
25806 included before <wchar.h>.
25807 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
25808 must be included before <wchar.h>. */
25809 #include <stddef.h>
25810 #include <stdio.h>
25811 #include <time.h>
25812 #include <wchar.h>
25813 #include <wctype.h>
25814 int main () { return iswprint ('x') == 0; }
25815
25816_ACEOF
25817if ac_fn_c_try_run "$LINENO"; then :
25818 gl_cv_func_iswcntrl_works=yes
25819else
25820 gl_cv_func_iswcntrl_works=no
25821fi
25822rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25823 conftest.$ac_objext conftest.beam conftest.$ac_ext
25824fi
25825
25826
25827fi
25828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
25829$as_echo "$gl_cv_func_iswcntrl_works" >&6; }
25830 fi
25831 HAVE_WCTYPE_H=1
25832 else
25833 HAVE_WCTYPE_H=0
25834 fi
25835
25836
25837 case "$gl_cv_func_iswcntrl_works" in
25838 *yes) REPLACE_ISWCNTRL=0 ;;
25839 *) REPLACE_ISWCNTRL=1 ;;
25840 esac
25841
25842
25843 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
25844 :
25845 fi
25846
25847 if test $REPLACE_ISWCNTRL = 1; then
25848 REPLACE_TOWLOWER=1
25849 else
25850 for ac_func in towlower
25851do :
25852 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
d0ac1c44 25853if test "x$ac_cv_func_towlower" = xyes; then :
8690e634
JK
25854 cat >>confdefs.h <<_ACEOF
25855#define HAVE_TOWLOWER 1
25856_ACEOF
25857
25858fi
25859done
25860
25861 if test $ac_cv_func_towlower = yes; then
25862 REPLACE_TOWLOWER=0
25863 else
25864 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
25865 included before <wchar.h>.
25866 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
25867 must be included before <wchar.h>. */
25868 #include <stddef.h>
25869 #include <stdio.h>
25870 #include <time.h>
25871 #include <wchar.h>
25872 #if HAVE_WCTYPE_H
25873 # include <wctype.h>
25874 #endif
25875
25876"
d0ac1c44 25877if test "x$ac_cv_have_decl_towlower" = xyes; then :
8690e634
JK
25878 ac_have_decl=1
25879else
25880 ac_have_decl=0
25881fi
25882
25883cat >>confdefs.h <<_ACEOF
25884#define HAVE_DECL_TOWLOWER $ac_have_decl
25885_ACEOF
25886
25887 if test $ac_cv_have_decl_towlower = yes; then
25888 REPLACE_TOWLOWER=1
25889 else
25890 REPLACE_TOWLOWER=0
25891 fi
25892 fi
25893 fi
25894
25895
25896 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
25897 :
25898 fi
25899
25900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
25901$as_echo_n "checking for wctype_t... " >&6; }
d0ac1c44 25902if ${gl_cv_type_wctype_t+:} false; then :
8690e634
JK
25903 $as_echo_n "(cached) " >&6
25904else
25905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25906/* end confdefs.h. */
25907/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
25908 included before <wchar.h>.
25909 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
25910 must be included before <wchar.h>. */
25911 #include <stddef.h>
25912 #include <stdio.h>
25913 #include <time.h>
25914 #include <wchar.h>
25915 #if HAVE_WCTYPE_H
25916 # include <wctype.h>
25917 #endif
25918 wctype_t a;
25919
25920int
25921main ()
25922{
25923
25924 ;
25925 return 0;
25926}
25927_ACEOF
25928if ac_fn_c_try_compile "$LINENO"; then :
25929 gl_cv_type_wctype_t=yes
25930else
25931 gl_cv_type_wctype_t=no
25932fi
25933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 25934
8690e634
JK
25935fi
25936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
25937$as_echo "$gl_cv_type_wctype_t" >&6; }
25938 if test $gl_cv_type_wctype_t = no; then
25939 HAVE_WCTYPE_T=0
25940 fi
25941
25942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
25943$as_echo_n "checking for wctrans_t... " >&6; }
d0ac1c44 25944if ${gl_cv_type_wctrans_t+:} false; then :
8690e634
JK
25945 $as_echo_n "(cached) " >&6
25946else
25947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25948/* end confdefs.h. */
25949/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
25950 included before <wchar.h>.
25951 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
25952 must be included before <wchar.h>. */
25953 #include <stddef.h>
25954 #include <stdio.h>
25955 #include <time.h>
25956 #include <wchar.h>
25957 #include <wctype.h>
25958 wctrans_t a;
c971b7fa 25959
8690e634
JK
25960int
25961main ()
25962{
c971b7fa 25963
8690e634
JK
25964 ;
25965 return 0;
25966}
25967_ACEOF
25968if ac_fn_c_try_compile "$LINENO"; then :
25969 gl_cv_type_wctrans_t=yes
25970else
25971 gl_cv_type_wctrans_t=no
25972fi
25973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 25974
8690e634
JK
25975fi
25976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
25977$as_echo "$gl_cv_type_wctrans_t" >&6; }
25978 if test $gl_cv_type_wctrans_t = no; then
25979 HAVE_WCTRANS_T=0
c971b7fa
PA
25980 fi
25981
25982
5e8754f9
SDJ
25983 for gl_func in wctype iswctype wctrans towctrans ; do
25984 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
25985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
25986$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
25987if eval \${$as_gl_Symbol+:} false; then :
25988 $as_echo_n "(cached) " >&6
25989else
25990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25991/* end confdefs.h. */
25992
25993/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25994 <wchar.h>.
25995 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25996 included before <wchar.h>. */
25997#if !(defined __GLIBC__ && !defined __UCLIBC__)
25998# include <stddef.h>
25999# include <stdio.h>
26000# include <time.h>
26001# include <wchar.h>
26002#endif
26003#include <wctype.h>
26004
26005int
26006main ()
26007{
26008#undef $gl_func
26009 (void) $gl_func;
26010 ;
26011 return 0;
26012}
26013_ACEOF
26014if ac_fn_c_try_compile "$LINENO"; then :
26015 eval "$as_gl_Symbol=yes"
26016else
26017 eval "$as_gl_Symbol=no"
26018fi
26019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26020fi
26021eval ac_res=\$$as_gl_Symbol
26022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
26023$as_echo "$ac_res" >&6; }
26024 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
26025 cat >>confdefs.h <<_ACEOF
26026#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
26027_ACEOF
c971b7fa 26028
5e8754f9
SDJ
26029 eval ac_cv_have_decl_$gl_func=yes
26030fi
26031 done
c971b7fa
PA
26032
26033
26034 # End of code from modules
26035
26036
26037
26038
26039
26040
26041
26042
26043
26044 gltests_libdeps=
26045 gltests_ltlibdeps=
26046
26047
26048
26049
26050
26051
26052
26053
26054
26055 gl_source_base='tests'
26056 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
26057
26058 gl_module_indicator_condition=$gltests_WITNESS
26059
26060
26061
26062
26063
26064
26065
26066
26067
26068 LIBGNU_LIBDEPS="$gl_libdeps"
26069
26070 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
26071
26072
26073
26074# We don't use automake, but gnulib does. This line lets us generate
26075# its Makefile.in.
d0ac1c44 26076am__api_version='1.15'
c971b7fa
PA
26077
26078# Find a good install program. We prefer a C program (faster),
26079# so one script is as good as another. But avoid the broken or
26080# incompatible versions:
26081# SysV /etc/install, /usr/sbin/install
26082# SunOS /usr/etc/install
26083# IRIX /sbin/install
26084# AIX /bin/install
26085# AmigaOS /C/install, which installs bootblocks on floppy discs
26086# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
26087# AFS /usr/afsws/bin/install, which mishandles nonexistent args
26088# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
26089# OS/2's system install, which has a completely different semantic
26090# ./install, which can be erroneously created by make from ./install.sh.
26091# Reject install programs that cannot install multiple files.
26092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
26093$as_echo_n "checking for a BSD-compatible install... " >&6; }
26094if test -z "$INSTALL"; then
d0ac1c44 26095if ${ac_cv_path_install+:} false; then :
c971b7fa
PA
26096 $as_echo_n "(cached) " >&6
26097else
26098 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26099for as_dir in $PATH
26100do
26101 IFS=$as_save_IFS
26102 test -z "$as_dir" && as_dir=.
26103 # Account for people who put trailing slashes in PATH elements.
26104case $as_dir/ in #((
26105 ./ | .// | /[cC]/* | \
26106 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
26107 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
26108 /usr/ucb/* ) ;;
26109 *)
26110 # OSF1 and SCO ODT 3.0 have their own names for install.
26111 # Don't use installbsd from OSF since it installs stuff as root
26112 # by default.
26113 for ac_prog in ginstall scoinst install; do
26114 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 26115 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
c971b7fa
PA
26116 if test $ac_prog = install &&
26117 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
26118 # AIX install. It has an incompatible calling convention.
26119 :
26120 elif test $ac_prog = install &&
26121 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
26122 # program-specific install script used by HP pwplus--don't use.
26123 :
26124 else
26125 rm -rf conftest.one conftest.two conftest.dir
26126 echo one > conftest.one
26127 echo two > conftest.two
26128 mkdir conftest.dir
26129 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
26130 test -s conftest.one && test -s conftest.two &&
26131 test -s conftest.dir/conftest.one &&
26132 test -s conftest.dir/conftest.two
26133 then
26134 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
26135 break 3
26136 fi
26137 fi
26138 fi
26139 done
26140 done
26141 ;;
26142esac
26143
26144 done
26145IFS=$as_save_IFS
26146
26147rm -rf conftest.one conftest.two conftest.dir
26148
26149fi
26150 if test "${ac_cv_path_install+set}" = set; then
26151 INSTALL=$ac_cv_path_install
26152 else
26153 # As a last resort, use the slow shell script. Don't cache a
26154 # value for INSTALL within a source directory, because that will
26155 # break other packages using the cache if that directory is
26156 # removed, or if the value is a relative name.
26157 INSTALL=$ac_install_sh
26158 fi
26159fi
26160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
26161$as_echo "$INSTALL" >&6; }
26162
26163# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
26164# It thinks the first close brace ends the variable substitution.
26165test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
26166
26167test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
26168
26169test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
26170
26171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
26172$as_echo_n "checking whether build environment is sane... " >&6; }
c971b7fa
PA
26173# Reject unsafe characters in $srcdir or the absolute working directory
26174# name. Accept space and tab only in the latter.
26175am_lf='
26176'
26177case `pwd` in
26178 *[\\\"\#\$\&\'\`$am_lf]*)
d0ac1c44 26179 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
c971b7fa
PA
26180esac
26181case $srcdir in
26182 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
d0ac1c44 26183 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
c971b7fa
PA
26184esac
26185
d0ac1c44 26186# Do 'set' in a subshell so we don't clobber the current shell's
c971b7fa
PA
26187# arguments. Must try -L first in case configure is actually a
26188# symlink; some systems play weird games with the mod time of symlinks
26189# (eg FreeBSD returns the mod time of the symlink's containing
26190# directory).
26191if (
d0ac1c44
SM
26192 am_has_slept=no
26193 for am_try in 1 2; do
26194 echo "timestamp, slept: $am_has_slept" > conftest.file
26195 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
26196 if test "$*" = "X"; then
26197 # -L didn't work.
26198 set X `ls -t "$srcdir/configure" conftest.file`
26199 fi
26200 if test "$*" != "X $srcdir/configure conftest.file" \
26201 && test "$*" != "X conftest.file $srcdir/configure"; then
26202
26203 # If neither matched, then we have a broken ls. This can happen
26204 # if, for instance, CONFIG_SHELL is bash and it inherits a
26205 # broken ls alias from the environment. This has actually
26206 # happened. Such a system could not be considered "sane".
26207 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
26208 alias in your environment" "$LINENO" 5
26209 fi
26210 if test "$2" = conftest.file || test $am_try -eq 2; then
26211 break
26212 fi
26213 # Just in case.
26214 sleep 1
26215 am_has_slept=yes
26216 done
c971b7fa
PA
26217 test "$2" = conftest.file
26218 )
26219then
26220 # Ok.
26221 :
26222else
d0ac1c44 26223 as_fn_error $? "newly created file is older than distributed files!
c971b7fa
PA
26224Check your system clock" "$LINENO" 5
26225fi
26226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26227$as_echo "yes" >&6; }
d0ac1c44
SM
26228# If we didn't sleep, we still need to ensure time stamps of config.status and
26229# generated files are strictly newer.
26230am_sleep_pid=
26231if grep 'slept: no' conftest.file >/dev/null 2>&1; then
26232 ( sleep 1 ) &
26233 am_sleep_pid=$!
26234fi
26235
26236rm -f conftest.file
26237
c971b7fa
PA
26238test "$program_prefix" != NONE &&
26239 program_transform_name="s&^&$program_prefix&;$program_transform_name"
26240# Use a double $ so make ignores it.
26241test "$program_suffix" != NONE &&
26242 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
26243# Double any \ or $.
26244# By default was `s,x,x', remove it if useless.
26245ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
26246program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
26247
c971b7fa
PA
26248if test x"${MISSING+set}" != xset; then
26249 case $am_aux_dir in
26250 *\ * | *\ *)
26251 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
26252 *)
26253 MISSING="\${SHELL} $am_aux_dir/missing" ;;
26254 esac
26255fi
26256# Use eval to expand $SHELL
d0ac1c44
SM
26257if eval "$MISSING --is-lightweight"; then
26258 am_missing_run="$MISSING "
c971b7fa
PA
26259else
26260 am_missing_run=
d0ac1c44
SM
26261 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
26262$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
c971b7fa
PA
26263fi
26264
d0ac1c44 26265if test x"${install_sh+set}" != xset; then
c971b7fa
PA
26266 case $am_aux_dir in
26267 *\ * | *\ *)
26268 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
26269 *)
26270 install_sh="\${SHELL} $am_aux_dir/install-sh"
26271 esac
26272fi
26273
d0ac1c44
SM
26274# Installed binaries are usually stripped using 'strip' when the user
26275# run "make install-strip". However 'strip' might not be the right
c971b7fa 26276# tool to use in cross-compilation environments, therefore Automake
d0ac1c44 26277# will honor the 'STRIP' environment variable to overrule this program.
c971b7fa
PA
26278if test "$cross_compiling" != no; then
26279 if test -n "$ac_tool_prefix"; then
26280 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
26281set dummy ${ac_tool_prefix}strip; ac_word=$2
26282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26283$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 26284if ${ac_cv_prog_STRIP+:} false; then :
c971b7fa
PA
26285 $as_echo_n "(cached) " >&6
26286else
26287 if test -n "$STRIP"; then
26288 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
26289else
26290as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26291for as_dir in $PATH
26292do
26293 IFS=$as_save_IFS
26294 test -z "$as_dir" && as_dir=.
26295 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 26296 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
26297 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
26298 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26299 break 2
26300 fi
26301done
26302 done
26303IFS=$as_save_IFS
26304
26305fi
26306fi
26307STRIP=$ac_cv_prog_STRIP
26308if test -n "$STRIP"; then
26309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26310$as_echo "$STRIP" >&6; }
26311else
26312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26313$as_echo "no" >&6; }
26314fi
26315
26316
26317fi
26318if test -z "$ac_cv_prog_STRIP"; then
26319 ac_ct_STRIP=$STRIP
26320 # Extract the first word of "strip", so it can be a program name with args.
26321set dummy strip; ac_word=$2
26322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26323$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 26324if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
c971b7fa
PA
26325 $as_echo_n "(cached) " >&6
26326else
26327 if test -n "$ac_ct_STRIP"; then
26328 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
26329else
26330as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26331for as_dir in $PATH
26332do
26333 IFS=$as_save_IFS
26334 test -z "$as_dir" && as_dir=.
26335 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 26336 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
26337 ac_cv_prog_ac_ct_STRIP="strip"
26338 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26339 break 2
26340 fi
26341done
26342 done
26343IFS=$as_save_IFS
26344
26345fi
26346fi
26347ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
26348if test -n "$ac_ct_STRIP"; then
26349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
26350$as_echo "$ac_ct_STRIP" >&6; }
26351else
26352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26353$as_echo "no" >&6; }
26354fi
26355
26356 if test "x$ac_ct_STRIP" = x; then
26357 STRIP=":"
26358 else
26359 case $cross_compiling:$ac_tool_warned in
26360yes:)
26361{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26362$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26363ac_tool_warned=yes ;;
26364esac
26365 STRIP=$ac_ct_STRIP
26366 fi
26367else
26368 STRIP="$ac_cv_prog_STRIP"
26369fi
26370
26371fi
26372INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
26373
c971b7fa
PA
26374for ac_prog in gawk mawk nawk awk
26375do
26376 # Extract the first word of "$ac_prog", so it can be a program name with args.
26377set dummy $ac_prog; ac_word=$2
26378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26379$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 26380if ${ac_cv_prog_AWK+:} false; then :
c971b7fa
PA
26381 $as_echo_n "(cached) " >&6
26382else
26383 if test -n "$AWK"; then
26384 ac_cv_prog_AWK="$AWK" # Let the user override the test.
26385else
26386as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26387for as_dir in $PATH
26388do
26389 IFS=$as_save_IFS
26390 test -z "$as_dir" && as_dir=.
26391 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 26392 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
26393 ac_cv_prog_AWK="$ac_prog"
26394 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26395 break 2
26396 fi
26397done
26398 done
26399IFS=$as_save_IFS
26400
26401fi
26402fi
26403AWK=$ac_cv_prog_AWK
26404if test -n "$AWK"; then
26405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
26406$as_echo "$AWK" >&6; }
26407else
26408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26409$as_echo "no" >&6; }
26410fi
26411
26412
26413 test -n "$AWK" && break
26414done
26415
26416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
26417$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
26418set x ${MAKE-make}
26419ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
d0ac1c44 26420if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
c971b7fa
PA
26421 $as_echo_n "(cached) " >&6
26422else
26423 cat >conftest.make <<\_ACEOF
26424SHELL = /bin/sh
26425all:
26426 @echo '@@@%%%=$(MAKE)=@@@%%%'
26427_ACEOF
d0ac1c44 26428# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
c971b7fa
PA
26429case `${MAKE-make} -f conftest.make 2>/dev/null` in
26430 *@@@%%%=?*=@@@%%%*)
26431 eval ac_cv_prog_make_${ac_make}_set=yes;;
26432 *)
26433 eval ac_cv_prog_make_${ac_make}_set=no;;
26434esac
26435rm -f conftest.make
26436fi
26437if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
26438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26439$as_echo "yes" >&6; }
26440 SET_MAKE=
26441else
26442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26443$as_echo "no" >&6; }
26444 SET_MAKE="MAKE=${MAKE-make}"
26445fi
26446
26447rm -rf .tst 2>/dev/null
26448mkdir .tst 2>/dev/null
26449if test -d .tst; then
26450 am__leading_dot=.
26451else
26452 am__leading_dot=_
26453fi
26454rmdir .tst 2>/dev/null
26455
26456DEPDIR="${am__leading_dot}deps"
26457
26458ac_config_commands="$ac_config_commands depfiles"
26459
26460
26461am_make=${MAKE-make}
26462cat > confinc << 'END'
26463am__doit:
26464 @echo this is the am__doit target
26465.PHONY: am__doit
26466END
26467# If we don't find an include directive, just comment out the code.
26468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
26469$as_echo_n "checking for style of include used by $am_make... " >&6; }
26470am__include="#"
26471am__quote=
26472_am_result=none
26473# First try GNU make style include.
26474echo "include confinc" > confmf
d0ac1c44 26475# Ignore all kinds of additional output from 'make'.
c971b7fa
PA
26476case `$am_make -s -f confmf 2> /dev/null` in #(
26477*the\ am__doit\ target*)
26478 am__include=include
26479 am__quote=
26480 _am_result=GNU
26481 ;;
26482esac
26483# Now try BSD make style include.
26484if test "$am__include" = "#"; then
26485 echo '.include "confinc"' > confmf
26486 case `$am_make -s -f confmf 2> /dev/null` in #(
26487 *the\ am__doit\ target*)
26488 am__include=.include
26489 am__quote="\""
26490 _am_result=BSD
26491 ;;
26492 esac
26493fi
26494
26495
26496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
26497$as_echo "$_am_result" >&6; }
26498rm -f confinc confmf
26499
26500# Check whether --enable-dependency-tracking was given.
26501if test "${enable_dependency_tracking+set}" = set; then :
26502 enableval=$enable_dependency_tracking;
26503fi
26504
26505if test "x$enable_dependency_tracking" != xno; then
26506 am_depcomp="$ac_aux_dir/depcomp"
26507 AMDEPBACKSLASH='\'
d0ac1c44 26508 am__nodep='_no'
c971b7fa
PA
26509fi
26510 if test "x$enable_dependency_tracking" != xno; then
26511 AMDEP_TRUE=
26512 AMDEP_FALSE='#'
26513else
26514 AMDEP_TRUE='#'
26515 AMDEP_FALSE=
26516fi
26517
26518
d0ac1c44
SM
26519# Check whether --enable-silent-rules was given.
26520if test "${enable_silent_rules+set}" = set; then :
26521 enableval=$enable_silent_rules;
26522fi
26523
26524case $enable_silent_rules in # (((
26525 yes) AM_DEFAULT_VERBOSITY=0;;
26526 no) AM_DEFAULT_VERBOSITY=1;;
26527 *) AM_DEFAULT_VERBOSITY=1;;
26528esac
26529am_make=${MAKE-make}
26530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
26531$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
26532if ${am_cv_make_support_nested_variables+:} false; then :
26533 $as_echo_n "(cached) " >&6
26534else
26535 if $as_echo 'TRUE=$(BAR$(V))
26536BAR0=false
26537BAR1=true
26538V=1
26539am__doit:
26540 @$(TRUE)
26541.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
26542 am_cv_make_support_nested_variables=yes
26543else
26544 am_cv_make_support_nested_variables=no
26545fi
26546fi
26547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
26548$as_echo "$am_cv_make_support_nested_variables" >&6; }
26549if test $am_cv_make_support_nested_variables = yes; then
26550 AM_V='$(V)'
26551 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
26552else
26553 AM_V=$AM_DEFAULT_VERBOSITY
26554 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
26555fi
26556AM_BACKSLASH='\'
26557
c971b7fa
PA
26558if test "`cd $srcdir && pwd`" != "`pwd`"; then
26559 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
26560 # is not polluted with repeated "-I."
26561 am__isrc=' -I$(srcdir)'
26562 # test to see if srcdir already configured
26563 if test -f $srcdir/config.status; then
d0ac1c44 26564 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
c971b7fa
PA
26565 fi
26566fi
26567
26568# test whether we have cygpath
26569if test -z "$CYGPATH_W"; then
26570 if (cygpath --version) >/dev/null 2>/dev/null; then
26571 CYGPATH_W='cygpath -w'
26572 else
26573 CYGPATH_W=echo
26574 fi
26575fi
26576
26577
26578# Define the identity of the package.
d0ac1c44
SM
26579 PACKAGE='libgnu'
26580 VERSION='UNUSED-VERSION'
c971b7fa
PA
26581
26582
26583# Some tools Automake needs.
26584
26585ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
26586
26587
26588AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
26589
26590
26591AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
26592
26593
26594AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
26595
26596
26597MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
26598
d0ac1c44
SM
26599# For better backward compatibility. To be removed once Automake 1.9.x
26600# dies out for good. For more background, see:
26601# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
26602# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
26603mkdir_p='$(MKDIR_P)'
26604
26605# We need awk for the "check" target (and possibly the TAP driver). The
26606# system "awk" is bad on some platforms.
26607# Always define AMTAR for backward compatibility. Yes, it's still used
26608# in the wild :-( We should find a proper way to deprecate it ...
26609AMTAR='$${TAR-tar}'
26610
26611
26612# We'll loop over all known methods to create a tar archive until one works.
26613_am_tools='gnutar pax cpio none'
c971b7fa 26614
d0ac1c44 26615am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
c971b7fa 26616
c971b7fa
PA
26617
26618
26619
26620
26621depcc="$CC" am_compiler_list=
26622
26623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
26624$as_echo_n "checking dependency style of $depcc... " >&6; }
d0ac1c44 26625if ${am_cv_CC_dependencies_compiler_type+:} false; then :
c971b7fa
PA
26626 $as_echo_n "(cached) " >&6
26627else
26628 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
26629 # We make a subdir and do the tests there. Otherwise we can end up
26630 # making bogus files that we don't know about and never remove. For
26631 # instance it was reported that on HP-UX the gcc test will end up
d0ac1c44
SM
26632 # making a dummy file named 'D' -- because '-MD' means "put the output
26633 # in D".
26634 rm -rf conftest.dir
c971b7fa
PA
26635 mkdir conftest.dir
26636 # Copy depcomp to subdir because otherwise we won't find it if we're
26637 # using a relative directory.
26638 cp "$am_depcomp" conftest.dir
26639 cd conftest.dir
26640 # We will build objects and dependencies in a subdirectory because
26641 # it helps to detect inapplicable dependency modes. For instance
26642 # both Tru64's cc and ICC support -MD to output dependencies as a
26643 # side effect of compilation, but ICC will put the dependencies in
26644 # the current directory while Tru64 will put them in the object
26645 # directory.
26646 mkdir sub
26647
26648 am_cv_CC_dependencies_compiler_type=none
26649 if test "$am_compiler_list" = ""; then
26650 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
26651 fi
26652 am__universal=false
26653 case " $depcc " in #(
26654 *\ -arch\ *\ -arch\ *) am__universal=true ;;
26655 esac
26656
26657 for depmode in $am_compiler_list; do
26658 # Setup a source with many dependencies, because some compilers
26659 # like to wrap large dependency lists on column 80 (with \), and
26660 # we should not choose a depcomp mode which is confused by this.
26661 #
26662 # We need to recreate these files for each test, as the compiler may
26663 # overwrite some of them when testing with obscure command lines.
26664 # This happens at least with the AIX C compiler.
26665 : > sub/conftest.c
26666 for i in 1 2 3 4 5 6; do
26667 echo '#include "conftst'$i'.h"' >> sub/conftest.c
d0ac1c44
SM
26668 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
26669 # Solaris 10 /bin/sh.
26670 echo '/* dummy */' > sub/conftst$i.h
c971b7fa
PA
26671 done
26672 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
26673
d0ac1c44 26674 # We check with '-c' and '-o' for the sake of the "dashmstdout"
c971b7fa 26675 # mode. It turns out that the SunPro C++ compiler does not properly
d0ac1c44
SM
26676 # handle '-M -o', and we need to detect this. Also, some Intel
26677 # versions had trouble with output in subdirs.
c971b7fa
PA
26678 am__obj=sub/conftest.${OBJEXT-o}
26679 am__minus_obj="-o $am__obj"
26680 case $depmode in
26681 gcc)
26682 # This depmode causes a compiler race in universal mode.
26683 test "$am__universal" = false || continue
26684 ;;
26685 nosideeffect)
d0ac1c44
SM
26686 # After this tag, mechanisms are not by side-effect, so they'll
26687 # only be used when explicitly requested.
c971b7fa
PA
26688 if test "x$enable_dependency_tracking" = xyes; then
26689 continue
26690 else
26691 break
26692 fi
26693 ;;
d0ac1c44
SM
26694 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
26695 # This compiler won't grok '-c -o', but also, the minuso test has
c971b7fa
PA
26696 # not run yet. These depmodes are late enough in the game, and
26697 # so weak that their functioning should not be impacted.
26698 am__obj=conftest.${OBJEXT-o}
26699 am__minus_obj=
26700 ;;
26701 none) break ;;
26702 esac
26703 if depmode=$depmode \
26704 source=sub/conftest.c object=$am__obj \
26705 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
26706 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
26707 >/dev/null 2>conftest.err &&
26708 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
26709 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
26710 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
26711 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
26712 # icc doesn't choke on unknown options, it will just issue warnings
26713 # or remarks (even with -Werror). So we grep stderr for any message
26714 # that says an option was ignored or not supported.
26715 # When given -MP, icc 7.0 and 7.1 complain thusly:
26716 # icc: Command line warning: ignoring option '-M'; no argument required
26717 # The diagnosis changed in icc 8.0:
26718 # icc: Command line remark: option '-MP' not supported
26719 if (grep 'ignoring option' conftest.err ||
26720 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
26721 am_cv_CC_dependencies_compiler_type=$depmode
26722 break
26723 fi
26724 fi
26725 done
26726
26727 cd ..
26728 rm -rf conftest.dir
26729else
26730 am_cv_CC_dependencies_compiler_type=none
26731fi
26732
26733fi
26734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
26735$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
26736CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
26737
26738 if
26739 test "x$enable_dependency_tracking" != xno \
26740 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
26741 am__fastdepCC_TRUE=
26742 am__fastdepCC_FALSE='#'
26743else
26744 am__fastdepCC_TRUE='#'
26745 am__fastdepCC_FALSE=
26746fi
26747
26748
26749
d0ac1c44
SM
26750# POSIX will say in a future version that running "rm -f" with no argument
26751# is OK; and we want to be able to make that assumption in our Makefile
26752# recipes. So use an aggressive probe to check that the usage we want is
26753# actually supported "in the wild" to an acceptable degree.
26754# See automake bug#10828.
26755# To make any issue more visible, cause the running configure to be aborted
26756# by default if the 'rm' program in use doesn't match our expectations; the
26757# user can still override this though.
26758if rm -f && rm -fr && rm -rf; then : OK; else
26759 cat >&2 <<'END'
26760Oops!
26761
26762Your 'rm' program seems unable to run without file operands specified
26763on the command line, even when the '-f' option is present. This is contrary
26764to the behaviour of most rm programs out there, and not conforming with
26765the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
26766
26767Please tell bug-automake@gnu.org about your system, including the value
26768of your $PATH and any error possibly output before this message. This
26769can help us improve future automake versions.
26770
26771END
26772 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
26773 echo 'Configuration will proceed anyway, since you have set the' >&2
26774 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
26775 echo >&2
26776 else
26777 cat >&2 <<'END'
26778Aborting the configuration process, to ensure you take notice of the issue.
26779
26780You can download and install GNU coreutils to get an 'rm' implementation
26781that behaves properly: <http://www.gnu.org/software/coreutils/>.
26782
26783If you want to complete the configuration process using your problematic
26784'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
26785to "yes", and re-run configure.
26786
26787END
26788 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
26789 fi
26790fi
26791
c971b7fa 26792
39be3c7e
SM
26793# Check whether --enable-silent-rules was given.
26794if test "${enable_silent_rules+set}" = set; then :
26795 enableval=$enable_silent_rules;
26796fi
26797
d0ac1c44
SM
26798case $enable_silent_rules in # (((
26799 yes) AM_DEFAULT_VERBOSITY=0;;
26800 no) AM_DEFAULT_VERBOSITY=1;;
26801 *) AM_DEFAULT_VERBOSITY=0;;
39be3c7e 26802esac
d0ac1c44
SM
26803am_make=${MAKE-make}
26804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
26805$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
26806if ${am_cv_make_support_nested_variables+:} false; then :
26807 $as_echo_n "(cached) " >&6
26808else
26809 if $as_echo 'TRUE=$(BAR$(V))
26810BAR0=false
26811BAR1=true
26812V=1
26813am__doit:
26814 @$(TRUE)
26815.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
26816 am_cv_make_support_nested_variables=yes
26817else
26818 am_cv_make_support_nested_variables=no
26819fi
26820fi
26821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
26822$as_echo "$am_cv_make_support_nested_variables" >&6; }
26823if test $am_cv_make_support_nested_variables = yes; then
26824 AM_V='$(V)'
26825 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
26826else
26827 AM_V=$AM_DEFAULT_VERBOSITY
26828 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
26829fi
39be3c7e
SM
26830AM_BACKSLASH='\'
26831
26832
c971b7fa
PA
26833# --------------------- #
26834# Checks for programs. #
26835# --------------------- #
26836
26837
26838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
26839$as_echo_n "checking whether ln -s works... " >&6; }
26840LN_S=$as_ln_s
26841if test "$LN_S" = "ln -s"; then
26842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26843$as_echo "yes" >&6; }
26844else
26845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
26846$as_echo "no, using $LN_S" >&6; }
26847fi
26848
26849if test -n "$ac_tool_prefix"; then
26850 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
26851set dummy ${ac_tool_prefix}ranlib; ac_word=$2
26852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26853$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 26854if ${ac_cv_prog_RANLIB+:} false; then :
c971b7fa
PA
26855 $as_echo_n "(cached) " >&6
26856else
26857 if test -n "$RANLIB"; then
26858 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
26859else
26860as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26861for as_dir in $PATH
26862do
26863 IFS=$as_save_IFS
26864 test -z "$as_dir" && as_dir=.
26865 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 26866 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
26867 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
26868 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26869 break 2
26870 fi
26871done
26872 done
26873IFS=$as_save_IFS
26874
26875fi
26876fi
26877RANLIB=$ac_cv_prog_RANLIB
26878if test -n "$RANLIB"; then
26879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
26880$as_echo "$RANLIB" >&6; }
26881else
26882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26883$as_echo "no" >&6; }
26884fi
26885
26886
26887fi
26888if test -z "$ac_cv_prog_RANLIB"; then
26889 ac_ct_RANLIB=$RANLIB
26890 # Extract the first word of "ranlib", so it can be a program name with args.
26891set dummy ranlib; ac_word=$2
26892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26893$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 26894if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
c971b7fa
PA
26895 $as_echo_n "(cached) " >&6
26896else
26897 if test -n "$ac_ct_RANLIB"; then
26898 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
26899else
26900as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26901for as_dir in $PATH
26902do
26903 IFS=$as_save_IFS
26904 test -z "$as_dir" && as_dir=.
26905 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 26906 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
26907 ac_cv_prog_ac_ct_RANLIB="ranlib"
26908 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26909 break 2
26910 fi
26911done
26912 done
26913IFS=$as_save_IFS
26914
26915fi
26916fi
26917ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
26918if test -n "$ac_ct_RANLIB"; then
26919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
26920$as_echo "$ac_ct_RANLIB" >&6; }
26921else
26922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26923$as_echo "no" >&6; }
26924fi
26925
26926 if test "x$ac_ct_RANLIB" = x; then
26927 RANLIB=":"
26928 else
26929 case $cross_compiling:$ac_tool_warned in
26930yes:)
26931{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26932$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26933ac_tool_warned=yes ;;
26934esac
26935 RANLIB=$ac_ct_RANLIB
26936 fi
26937else
26938 RANLIB="$ac_cv_prog_RANLIB"
26939fi
26940
26941
26942if test -n "$ac_tool_prefix"; then
26943 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
26944set dummy ${ac_tool_prefix}ar; ac_word=$2
26945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26946$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 26947if ${ac_cv_prog_AR+:} false; then :
c971b7fa
PA
26948 $as_echo_n "(cached) " >&6
26949else
26950 if test -n "$AR"; then
26951 ac_cv_prog_AR="$AR" # Let the user override the test.
26952else
26953as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26954for as_dir in $PATH
26955do
26956 IFS=$as_save_IFS
26957 test -z "$as_dir" && as_dir=.
26958 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 26959 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
26960 ac_cv_prog_AR="${ac_tool_prefix}ar"
26961 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26962 break 2
26963 fi
26964done
26965 done
26966IFS=$as_save_IFS
26967
26968fi
26969fi
26970AR=$ac_cv_prog_AR
26971if test -n "$AR"; then
26972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
26973$as_echo "$AR" >&6; }
26974else
26975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26976$as_echo "no" >&6; }
26977fi
26978
26979
26980fi
26981if test -z "$ac_cv_prog_AR"; then
26982 ac_ct_AR=$AR
26983 # Extract the first word of "ar", so it can be a program name with args.
26984set dummy ar; ac_word=$2
26985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26986$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 26987if ${ac_cv_prog_ac_ct_AR+:} false; then :
c971b7fa
PA
26988 $as_echo_n "(cached) " >&6
26989else
26990 if test -n "$ac_ct_AR"; then
26991 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
26992else
26993as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26994for as_dir in $PATH
26995do
26996 IFS=$as_save_IFS
26997 test -z "$as_dir" && as_dir=.
26998 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 26999 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
27000 ac_cv_prog_ac_ct_AR="ar"
27001 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27002 break 2
27003 fi
27004done
27005 done
27006IFS=$as_save_IFS
27007
27008fi
27009fi
27010ac_ct_AR=$ac_cv_prog_ac_ct_AR
27011if test -n "$ac_ct_AR"; then
27012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
27013$as_echo "$ac_ct_AR" >&6; }
27014else
27015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27016$as_echo "no" >&6; }
27017fi
27018
27019 if test "x$ac_ct_AR" = x; then
27020 AR=""
27021 else
27022 case $cross_compiling:$ac_tool_warned in
27023yes:)
27024{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27025$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27026ac_tool_warned=yes ;;
27027esac
27028 AR=$ac_ct_AR
27029 fi
27030else
27031 AR="$ac_cv_prog_AR"
27032fi
27033
27034
27035# ---------------------- #
27036# Checks for libraries. #
27037# ---------------------- #
27038
27039ac_config_files="$ac_config_files Makefile import/Makefile"
27040
27041ac_config_commands="$ac_config_commands default"
27042
27043cat >confcache <<\_ACEOF
27044# This file is a shell script that caches the results of configure
27045# tests run on this system so they can be shared between configure
27046# scripts and configure runs, see configure's option --config-cache.
27047# It is not useful on other systems. If it contains results you don't
27048# want to keep, you may remove or edit it.
27049#
27050# config.status only pays attention to the cache file if you give it
27051# the --recheck option to rerun configure.
27052#
27053# `ac_cv_env_foo' variables (set or unset) will be overridden when
27054# loading this file, other *unset* `ac_cv_foo' will be assigned the
27055# following values.
27056
27057_ACEOF
27058
27059# The following way of writing the cache mishandles newlines in values,
27060# but we know of no workaround that is simple, portable, and efficient.
27061# So, we kill variables containing newlines.
27062# Ultrix sh set writes to stderr and can't be redirected directly,
27063# and sets the high bit in the cache file unless we assign to the vars.
27064(
27065 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27066 eval ac_val=\$$ac_var
27067 case $ac_val in #(
27068 *${as_nl}*)
27069 case $ac_var in #(
27070 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
27071$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
27072 esac
27073 case $ac_var in #(
27074 _ | IFS | as_nl) ;; #(
27075 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
27076 *) { eval $ac_var=; unset $ac_var;} ;;
27077 esac ;;
27078 esac
27079 done
27080
27081 (set) 2>&1 |
27082 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27083 *${as_nl}ac_space=\ *)
27084 # `set' does not quote correctly, so add quotes: double-quote
27085 # substitution turns \\\\ into \\, and sed turns \\ into \.
27086 sed -n \
27087 "s/'/'\\\\''/g;
27088 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
27089 ;; #(
27090 *)
27091 # `set' quotes correctly as required by POSIX, so do not add quotes.
27092 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
27093 ;;
27094 esac |
27095 sort
27096) |
27097 sed '
27098 /^ac_cv_env_/b end
27099 t clear
27100 :clear
27101 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27102 t end
27103 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27104 :end' >>confcache
27105if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27106 if test -w "$cache_file"; then
d0ac1c44 27107 if test "x$cache_file" != "x/dev/null"; then
c971b7fa
PA
27108 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
27109$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
27110 if test ! -f "$cache_file" || test -h "$cache_file"; then
27111 cat confcache >"$cache_file"
27112 else
27113 case $cache_file in #(
27114 */* | ?:*)
27115 mv -f confcache "$cache_file"$$ &&
27116 mv -f "$cache_file"$$ "$cache_file" ;; #(
27117 *)
27118 mv -f confcache "$cache_file" ;;
27119 esac
27120 fi
27121 fi
c971b7fa
PA
27122 else
27123 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
27124$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
27125 fi
27126fi
27127rm -f confcache
27128
27129test "x$prefix" = xNONE && prefix=$ac_default_prefix
27130# Let make expand exec_prefix.
27131test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
27132
27133DEFS=-DHAVE_CONFIG_H
27134
27135ac_libobjs=
27136ac_ltlibobjs=
27137for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27138 # 1. Remove the extension, and $U if already installed.
27139 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
27140 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
27141 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27142 # will be set to the directory where LIBOBJS objects are built.
27143 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27144 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
27145done
27146LIBOBJS=$ac_libobjs
27147
27148LTLIBOBJS=$ac_ltlibobjs
27149
27150
27151if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 27152 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
c971b7fa
PA
27153Usually this means the macro was only invoked conditionally." "$LINENO" 5
27154fi
27155if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
d0ac1c44 27156 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
c971b7fa
PA
27157Usually this means the macro was only invoked conditionally." "$LINENO" 5
27158fi
8690e634 27159if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
d0ac1c44 27160 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
8690e634
JK
27161Usually this means the macro was only invoked conditionally." "$LINENO" 5
27162fi
18848e28 27163if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
d0ac1c44 27164 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
18848e28
GF
27165Usually this means the macro was only invoked conditionally." "$LINENO" 5
27166fi
88b48903 27167if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
d0ac1c44 27168 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
88b48903
WN
27169Usually this means the macro was only invoked conditionally." "$LINENO" 5
27170fi
8690e634 27171if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
d0ac1c44 27172 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
8690e634
JK
27173Usually this means the macro was only invoked conditionally." "$LINENO" 5
27174fi
6ec2e0f5 27175if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
d0ac1c44 27176 as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined.
6ec2e0f5
SDJ
27177Usually this means the macro was only invoked conditionally." "$LINENO" 5
27178fi
49e4877c 27179if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
d0ac1c44 27180 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
49e4877c
PA
27181Usually this means the macro was only invoked conditionally." "$LINENO" 5
27182fi
27183if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
d0ac1c44 27184 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
49e4877c
PA
27185Usually this means the macro was only invoked conditionally." "$LINENO" 5
27186fi
c971b7fa 27187if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
d0ac1c44 27188 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
c971b7fa
PA
27189Usually this means the macro was only invoked conditionally." "$LINENO" 5
27190fi
88b48903
WN
27191
27192
725e2999
JB
27193if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
27194 as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined.
27195Usually this means the macro was only invoked conditionally." "$LINENO" 5
27196fi
27197if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
27198 as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
27199Usually this means the macro was only invoked conditionally." "$LINENO" 5
27200fi
8690e634 27201if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
d0ac1c44 27202 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
8690e634
JK
27203Usually this means the macro was only invoked conditionally." "$LINENO" 5
27204fi
c971b7fa 27205if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
d0ac1c44 27206 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
c971b7fa
PA
27207Usually this means the macro was only invoked conditionally." "$LINENO" 5
27208fi
27209
27210 gl_libobjs=
27211 gl_ltlibobjs=
27212 if test -n "$gl_LIBOBJS"; then
27213 # Remove the extension.
27214 sed_drop_objext='s/\.o$//;s/\.obj$//'
27215 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
27216 gl_libobjs="$gl_libobjs $i.$ac_objext"
27217 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
27218 done
27219 fi
27220 gl_LIBOBJS=$gl_libobjs
27221
27222 gl_LTLIBOBJS=$gl_ltlibobjs
27223
27224
27225
27226 gltests_libobjs=
27227 gltests_ltlibobjs=
27228 if test -n "$gltests_LIBOBJS"; then
27229 # Remove the extension.
27230 sed_drop_objext='s/\.o$//;s/\.obj$//'
27231 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
27232 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
27233 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
27234 done
27235 fi
27236 gltests_LIBOBJS=$gltests_libobjs
27237
27238 gltests_LTLIBOBJS=$gltests_ltlibobjs
27239
27240
d0ac1c44
SM
27241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
27242$as_echo_n "checking that generated files are newer than configure... " >&6; }
27243 if test -n "$am_sleep_pid"; then
27244 # Hide warnings about reused PIDs.
27245 wait $am_sleep_pid 2>/dev/null
27246 fi
27247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
27248$as_echo "done" >&6; }
c971b7fa 27249if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
d0ac1c44 27250 as_fn_error $? "conditional \"AMDEP\" was never defined.
c971b7fa
PA
27251Usually this means the macro was only invoked conditionally." "$LINENO" 5
27252fi
27253if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
d0ac1c44 27254 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
c971b7fa
PA
27255Usually this means the macro was only invoked conditionally." "$LINENO" 5
27256fi
27257 if test -n "$EXEEXT"; then
27258 am__EXEEXT_TRUE=
27259 am__EXEEXT_FALSE='#'
27260else
27261 am__EXEEXT_TRUE='#'
27262 am__EXEEXT_FALSE=
27263fi
27264
27265
d0ac1c44 27266: "${CONFIG_STATUS=./config.status}"
c971b7fa
PA
27267ac_write_fail=0
27268ac_clean_files_save=$ac_clean_files
27269ac_clean_files="$ac_clean_files $CONFIG_STATUS"
27270{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
27271$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
27272as_write_fail=0
27273cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
27274#! $SHELL
27275# Generated by $as_me.
27276# Run this file to recreate the current configuration.
27277# Compiler output produced by configure, useful for debugging
27278# configure, is in config.log if it exists.
27279
27280debug=false
27281ac_cs_recheck=false
27282ac_cs_silent=false
27283
27284SHELL=\${CONFIG_SHELL-$SHELL}
27285export SHELL
27286_ASEOF
27287cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
27288## -------------------- ##
27289## M4sh Initialization. ##
27290## -------------------- ##
27291
27292# Be more Bourne compatible
27293DUALCASE=1; export DUALCASE # for MKS sh
27294if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
27295 emulate sh
27296 NULLCMD=:
27297 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
27298 # is contrary to our usage. Disable this feature.
27299 alias -g '${1+"$@"}'='"$@"'
27300 setopt NO_GLOB_SUBST
27301else
27302 case `(set -o) 2>/dev/null` in #(
27303 *posix*) :
27304 set -o posix ;; #(
27305 *) :
27306 ;;
27307esac
27308fi
27309
27310
27311as_nl='
27312'
27313export as_nl
27314# Printing a long string crashes Solaris 7 /usr/bin/printf.
27315as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
27316as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
27317as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
27318# Prefer a ksh shell builtin over an external printf program on Solaris,
27319# but without wasting forks for bash or zsh.
27320if test -z "$BASH_VERSION$ZSH_VERSION" \
27321 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
27322 as_echo='print -r --'
27323 as_echo_n='print -rn --'
27324elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
27325 as_echo='printf %s\n'
27326 as_echo_n='printf %s'
27327else
27328 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
27329 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
27330 as_echo_n='/usr/ucb/echo -n'
27331 else
27332 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
27333 as_echo_n_body='eval
27334 arg=$1;
27335 case $arg in #(
27336 *"$as_nl"*)
27337 expr "X$arg" : "X\\(.*\\)$as_nl";
27338 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
27339 esac;
27340 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
27341 '
27342 export as_echo_n_body
27343 as_echo_n='sh -c $as_echo_n_body as_echo'
27344 fi
27345 export as_echo_body
27346 as_echo='sh -c $as_echo_body as_echo'
27347fi
27348
27349# The user is always right.
27350if test "${PATH_SEPARATOR+set}" != set; then
27351 PATH_SEPARATOR=:
27352 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
27353 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
27354 PATH_SEPARATOR=';'
27355 }
27356fi
27357
27358
27359# IFS
27360# We need space, tab and new line, in precisely that order. Quoting is
27361# there to prevent editors from complaining about space-tab.
27362# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27363# splitting by setting IFS to empty value.)
27364IFS=" "" $as_nl"
27365
27366# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 27367as_myself=
c971b7fa
PA
27368case $0 in #((
27369 *[\\/]* ) as_myself=$0 ;;
27370 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27371for as_dir in $PATH
27372do
27373 IFS=$as_save_IFS
27374 test -z "$as_dir" && as_dir=.
27375 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27376 done
27377IFS=$as_save_IFS
27378
27379 ;;
27380esac
27381# We did not find ourselves, most probably we were run as `sh COMMAND'
27382# in which case we are not to be found in the path.
27383if test "x$as_myself" = x; then
27384 as_myself=$0
27385fi
27386if test ! -f "$as_myself"; then
27387 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
27388 exit 1
27389fi
27390
27391# Unset variables that we do not need and which cause bugs (e.g. in
27392# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
27393# suppresses any "Segmentation fault" message there. '((' could
27394# trigger a bug in pdksh 5.2.14.
27395for as_var in BASH_ENV ENV MAIL MAILPATH
27396do eval test x\${$as_var+set} = xset \
27397 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
27398done
27399PS1='$ '
27400PS2='> '
27401PS4='+ '
27402
27403# NLS nuisances.
27404LC_ALL=C
27405export LC_ALL
27406LANGUAGE=C
27407export LANGUAGE
27408
27409# CDPATH.
27410(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
27411
27412
d0ac1c44
SM
27413# as_fn_error STATUS ERROR [LINENO LOG_FD]
27414# ----------------------------------------
c971b7fa
PA
27415# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
27416# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 27417# script with STATUS, using 1 if that was 0.
c971b7fa
PA
27418as_fn_error ()
27419{
d0ac1c44
SM
27420 as_status=$1; test $as_status -eq 0 && as_status=1
27421 if test "$4"; then
27422 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
27423 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
c971b7fa 27424 fi
d0ac1c44 27425 $as_echo "$as_me: error: $2" >&2
c971b7fa
PA
27426 as_fn_exit $as_status
27427} # as_fn_error
27428
27429
27430# as_fn_set_status STATUS
27431# -----------------------
27432# Set $? to STATUS, without forking.
27433as_fn_set_status ()
27434{
27435 return $1
27436} # as_fn_set_status
27437
27438# as_fn_exit STATUS
27439# -----------------
27440# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
27441as_fn_exit ()
27442{
27443 set +e
27444 as_fn_set_status $1
27445 exit $1
27446} # as_fn_exit
27447
27448# as_fn_unset VAR
27449# ---------------
27450# Portably unset VAR.
27451as_fn_unset ()
27452{
27453 { eval $1=; unset $1;}
27454}
27455as_unset=as_fn_unset
27456# as_fn_append VAR VALUE
27457# ----------------------
27458# Append the text in VALUE to the end of the definition contained in VAR. Take
27459# advantage of any shell optimizations that allow amortized linear growth over
27460# repeated appends, instead of the typical quadratic growth present in naive
27461# implementations.
27462if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
27463 eval 'as_fn_append ()
27464 {
27465 eval $1+=\$2
27466 }'
27467else
27468 as_fn_append ()
27469 {
27470 eval $1=\$$1\$2
27471 }
27472fi # as_fn_append
27473
27474# as_fn_arith ARG...
27475# ------------------
27476# Perform arithmetic evaluation on the ARGs, and store the result in the
27477# global $as_val. Take advantage of shells that can avoid forks. The arguments
27478# must be portable across $(()) and expr.
27479if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
27480 eval 'as_fn_arith ()
27481 {
27482 as_val=$(( $* ))
27483 }'
27484else
27485 as_fn_arith ()
27486 {
27487 as_val=`expr "$@" || test $? -eq 1`
27488 }
27489fi # as_fn_arith
27490
27491
27492if expr a : '\(a\)' >/dev/null 2>&1 &&
27493 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27494 as_expr=expr
27495else
27496 as_expr=false
27497fi
27498
27499if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27500 as_basename=basename
27501else
27502 as_basename=false
27503fi
27504
27505if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27506 as_dirname=dirname
27507else
27508 as_dirname=false
27509fi
27510
27511as_me=`$as_basename -- "$0" ||
27512$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27513 X"$0" : 'X\(//\)$' \| \
27514 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
27515$as_echo X/"$0" |
27516 sed '/^.*\/\([^/][^/]*\)\/*$/{
27517 s//\1/
27518 q
27519 }
27520 /^X\/\(\/\/\)$/{
27521 s//\1/
27522 q
27523 }
27524 /^X\/\(\/\).*/{
27525 s//\1/
27526 q
27527 }
27528 s/.*/./; q'`
27529
27530# Avoid depending upon Character Ranges.
27531as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27532as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27533as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27534as_cr_digits='0123456789'
27535as_cr_alnum=$as_cr_Letters$as_cr_digits
27536
27537ECHO_C= ECHO_N= ECHO_T=
27538case `echo -n x` in #(((((
27539-n*)
27540 case `echo 'xy\c'` in
27541 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27542 xy) ECHO_C='\c';;
27543 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
27544 ECHO_T=' ';;
27545 esac;;
27546*)
27547 ECHO_N='-n';;
27548esac
27549
27550rm -f conf$$ conf$$.exe conf$$.file
27551if test -d conf$$.dir; then
27552 rm -f conf$$.dir/conf$$.file
27553else
27554 rm -f conf$$.dir
27555 mkdir conf$$.dir 2>/dev/null
27556fi
27557if (echo >conf$$.file) 2>/dev/null; then
27558 if ln -s conf$$.file conf$$ 2>/dev/null; then
27559 as_ln_s='ln -s'
27560 # ... but there are two gotchas:
27561 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27562 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 27563 # In both cases, we have to default to `cp -pR'.
c971b7fa 27564 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 27565 as_ln_s='cp -pR'
c971b7fa
PA
27566 elif ln conf$$.file conf$$ 2>/dev/null; then
27567 as_ln_s=ln
27568 else
d0ac1c44 27569 as_ln_s='cp -pR'
c971b7fa
PA
27570 fi
27571else
d0ac1c44 27572 as_ln_s='cp -pR'
c971b7fa
PA
27573fi
27574rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27575rmdir conf$$.dir 2>/dev/null
27576
27577
27578# as_fn_mkdir_p
27579# -------------
27580# Create "$as_dir" as a directory, including parents if necessary.
27581as_fn_mkdir_p ()
27582{
27583
27584 case $as_dir in #(
27585 -*) as_dir=./$as_dir;;
27586 esac
27587 test -d "$as_dir" || eval $as_mkdir_p || {
27588 as_dirs=
27589 while :; do
27590 case $as_dir in #(
27591 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
27592 *) as_qdir=$as_dir;;
27593 esac
27594 as_dirs="'$as_qdir' $as_dirs"
27595 as_dir=`$as_dirname -- "$as_dir" ||
27596$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27597 X"$as_dir" : 'X\(//\)[^/]' \| \
27598 X"$as_dir" : 'X\(//\)$' \| \
27599 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
27600$as_echo X"$as_dir" |
27601 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27602 s//\1/
27603 q
27604 }
27605 /^X\(\/\/\)[^/].*/{
27606 s//\1/
27607 q
27608 }
27609 /^X\(\/\/\)$/{
27610 s//\1/
27611 q
27612 }
27613 /^X\(\/\).*/{
27614 s//\1/
27615 q
27616 }
27617 s/.*/./; q'`
27618 test -d "$as_dir" && break
27619 done
27620 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 27621 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
c971b7fa
PA
27622
27623
27624} # as_fn_mkdir_p
27625if mkdir -p . 2>/dev/null; then
27626 as_mkdir_p='mkdir -p "$as_dir"'
27627else
27628 test -d ./-p && rmdir ./-p
27629 as_mkdir_p=false
27630fi
27631
d0ac1c44
SM
27632
27633# as_fn_executable_p FILE
27634# -----------------------
27635# Test if FILE is an executable regular file.
27636as_fn_executable_p ()
27637{
27638 test -f "$1" && test -x "$1"
27639} # as_fn_executable_p
27640as_test_x='test -x'
27641as_executable_p=as_fn_executable_p
c971b7fa
PA
27642
27643# Sed expression to map a string onto a valid CPP name.
27644as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
27645
27646# Sed expression to map a string onto a valid variable name.
27647as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
27648
27649
27650exec 6>&1
27651## ----------------------------------- ##
27652## Main body of $CONFIG_STATUS script. ##
27653## ----------------------------------- ##
27654_ASEOF
27655test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
27656
27657cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27658# Save the log message, to keep $0 and so on meaningful, and to
27659# report actual input values of CONFIG_FILES etc. instead of their
27660# values after options handling.
27661ac_log="
d0ac1c44
SM
27662This file was extended by libgnu $as_me UNUSED-VERSION, which was
27663generated by GNU Autoconf 2.69. Invocation command line was
c971b7fa
PA
27664
27665 CONFIG_FILES = $CONFIG_FILES
27666 CONFIG_HEADERS = $CONFIG_HEADERS
27667 CONFIG_LINKS = $CONFIG_LINKS
27668 CONFIG_COMMANDS = $CONFIG_COMMANDS
27669 $ $0 $@
27670
27671on `(hostname || uname -n) 2>/dev/null | sed 1q`
27672"
27673
27674_ACEOF
27675
27676case $ac_config_files in *"
27677"*) set x $ac_config_files; shift; ac_config_files=$*;;
27678esac
27679
27680case $ac_config_headers in *"
27681"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
27682esac
27683
27684
27685cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27686# Files that config.status was made for.
27687config_files="$ac_config_files"
27688config_headers="$ac_config_headers"
27689config_commands="$ac_config_commands"
27690
27691_ACEOF
27692
27693cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27694ac_cs_usage="\
27695\`$as_me' instantiates files and other configuration actions
27696from templates according to the current configuration. Unless the files
27697and actions are specified as TAGs, all are instantiated by default.
27698
27699Usage: $0 [OPTION]... [TAG]...
27700
27701 -h, --help print this help, then exit
27702 -V, --version print version number and configuration settings, then exit
d0ac1c44 27703 --config print configuration, then exit
c971b7fa
PA
27704 -q, --quiet, --silent
27705 do not print progress messages
27706 -d, --debug don't remove temporary files
27707 --recheck update $as_me by reconfiguring in the same conditions
27708 --file=FILE[:TEMPLATE]
27709 instantiate the configuration file FILE
27710 --header=FILE[:TEMPLATE]
27711 instantiate the configuration header FILE
27712
27713Configuration files:
27714$config_files
27715
27716Configuration headers:
27717$config_headers
27718
27719Configuration commands:
27720$config_commands
27721
27722Report bugs to the package provider."
27723
27724_ACEOF
27725cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 27726ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
c971b7fa 27727ac_cs_version="\\
d0ac1c44
SM
27728libgnu config.status UNUSED-VERSION
27729configured by $0, generated by GNU Autoconf 2.69,
27730 with options \\"\$ac_cs_config\\"
c971b7fa 27731
d0ac1c44 27732Copyright (C) 2012 Free Software Foundation, Inc.
c971b7fa
PA
27733This config.status script is free software; the Free Software Foundation
27734gives unlimited permission to copy, distribute and modify it."
27735
27736ac_pwd='$ac_pwd'
27737srcdir='$srcdir'
27738INSTALL='$INSTALL'
27739MKDIR_P='$MKDIR_P'
27740AWK='$AWK'
27741test -n "\$AWK" || AWK=awk
27742_ACEOF
27743
27744cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27745# The default lists apply if the user does not specify any file.
27746ac_need_defaults=:
27747while test $# != 0
27748do
27749 case $1 in
d0ac1c44 27750 --*=?*)
c971b7fa
PA
27751 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27752 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
27753 ac_shift=:
27754 ;;
d0ac1c44
SM
27755 --*=)
27756 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27757 ac_optarg=
27758 ac_shift=:
27759 ;;
c971b7fa
PA
27760 *)
27761 ac_option=$1
27762 ac_optarg=$2
27763 ac_shift=shift
27764 ;;
27765 esac
27766
27767 case $ac_option in
27768 # Handling of the options.
27769 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27770 ac_cs_recheck=: ;;
27771 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
27772 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
27773 --config | --confi | --conf | --con | --co | --c )
27774 $as_echo "$ac_cs_config"; exit ;;
c971b7fa
PA
27775 --debug | --debu | --deb | --de | --d | -d )
27776 debug=: ;;
27777 --file | --fil | --fi | --f )
27778 $ac_shift
27779 case $ac_optarg in
27780 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 27781 '') as_fn_error $? "missing file argument" ;;
c971b7fa
PA
27782 esac
27783 as_fn_append CONFIG_FILES " '$ac_optarg'"
27784 ac_need_defaults=false;;
27785 --header | --heade | --head | --hea )
27786 $ac_shift
27787 case $ac_optarg in
27788 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
27789 esac
27790 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
27791 ac_need_defaults=false;;
27792 --he | --h)
27793 # Conflict between --help and --header
d0ac1c44 27794 as_fn_error $? "ambiguous option: \`$1'
c971b7fa
PA
27795Try \`$0 --help' for more information.";;
27796 --help | --hel | -h )
27797 $as_echo "$ac_cs_usage"; exit ;;
27798 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27799 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27800 ac_cs_silent=: ;;
27801
27802 # This is an error.
d0ac1c44 27803 -*) as_fn_error $? "unrecognized option: \`$1'
c971b7fa
PA
27804Try \`$0 --help' for more information." ;;
27805
27806 *) as_fn_append ac_config_targets " $1"
27807 ac_need_defaults=false ;;
27808
27809 esac
27810 shift
27811done
27812
27813ac_configure_extra_args=
27814
27815if $ac_cs_silent; then
27816 exec 6>/dev/null
27817 ac_configure_extra_args="$ac_configure_extra_args --silent"
27818fi
27819
27820_ACEOF
27821cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27822if \$ac_cs_recheck; then
d0ac1c44 27823 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
c971b7fa
PA
27824 shift
27825 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
27826 CONFIG_SHELL='$SHELL'
27827 export CONFIG_SHELL
27828 exec "\$@"
27829fi
27830
27831_ACEOF
27832cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27833exec 5>>config.log
27834{
27835 echo
27836 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27837## Running $as_me. ##
27838_ASBOX
27839 $as_echo "$ac_log"
27840} >&5
27841
27842_ACEOF
27843cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27844#
27845# INIT-COMMANDS
27846#
27847AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
27848
27849_ACEOF
27850
27851cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27852
27853# Handling of arguments.
27854for ac_config_target in $ac_config_targets
27855do
27856 case $ac_config_target in
27857 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
27858 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
27859 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
27860 "import/Makefile") CONFIG_FILES="$CONFIG_FILES import/Makefile" ;;
27861 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
27862
d0ac1c44 27863 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c971b7fa
PA
27864 esac
27865done
27866
27867
27868# If the user did not use the arguments to specify the items to instantiate,
27869# then the envvar interface is used. Set only those that are not.
27870# We use the long form for the default assignment because of an extremely
27871# bizarre bug on SunOS 4.1.3.
27872if $ac_need_defaults; then
27873 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27874 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27875 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
27876fi
27877
27878# Have a temporary directory for convenience. Make it in the build tree
27879# simply because there is no reason against having it here, and in addition,
27880# creating and moving files from /tmp can sometimes cause problems.
27881# Hook for its removal unless debugging.
27882# Note that there is a small window in which the directory will not be cleaned:
27883# after its creation but before its name has been assigned to `$tmp'.
27884$debug ||
27885{
d0ac1c44 27886 tmp= ac_tmp=
c971b7fa 27887 trap 'exit_status=$?
d0ac1c44
SM
27888 : "${ac_tmp:=$tmp}"
27889 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
c971b7fa
PA
27890' 0
27891 trap 'as_fn_exit 1' 1 2 13 15
27892}
27893# Create a (secure) tmp directory for tmp files.
27894
27895{
27896 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 27897 test -d "$tmp"
c971b7fa
PA
27898} ||
27899{
27900 tmp=./conf$$-$RANDOM
27901 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
27902} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
27903ac_tmp=$tmp
c971b7fa
PA
27904
27905# Set up the scripts for CONFIG_FILES section.
27906# No need to generate them if there are no CONFIG_FILES.
27907# This happens for instance with `./config.status config.h'.
27908if test -n "$CONFIG_FILES"; then
27909
27910
27911ac_cr=`echo X | tr X '\015'`
27912# On cygwin, bash can eat \r inside `` if the user requested igncr.
27913# But we know of no other shell where ac_cr would be empty at this
27914# point, so we can use a bashism as a fallback.
27915if test "x$ac_cr" = x; then
27916 eval ac_cr=\$\'\\r\'
27917fi
27918ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
27919if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 27920 ac_cs_awk_cr='\\r'
c971b7fa
PA
27921else
27922 ac_cs_awk_cr=$ac_cr
27923fi
27924
d0ac1c44 27925echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
c971b7fa
PA
27926_ACEOF
27927
27928
27929{
27930 echo "cat >conf$$subs.awk <<_ACEOF" &&
27931 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
27932 echo "_ACEOF"
27933} >conf$$subs.sh ||
d0ac1c44
SM
27934 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
27935ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
c971b7fa
PA
27936ac_delim='%!_!# '
27937for ac_last_try in false false false false false :; do
27938 . ./conf$$subs.sh ||
d0ac1c44 27939 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
c971b7fa
PA
27940
27941 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
27942 if test $ac_delim_n = $ac_delim_num; then
27943 break
27944 elif $ac_last_try; then
d0ac1c44 27945 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
c971b7fa
PA
27946 else
27947 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27948 fi
27949done
27950rm -f conf$$subs.sh
27951
27952cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 27953cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
c971b7fa
PA
27954_ACEOF
27955sed -n '
27956h
27957s/^/S["/; s/!.*/"]=/
27958p
27959g
27960s/^[^!]*!//
27961:repl
27962t repl
27963s/'"$ac_delim"'$//
27964t delim
27965:nl
27966h
d0ac1c44 27967s/\(.\{148\}\)..*/\1/
c971b7fa
PA
27968t more1
27969s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
27970p
27971n
27972b repl
27973:more1
27974s/["\\]/\\&/g; s/^/"/; s/$/"\\/
27975p
27976g
27977s/.\{148\}//
27978t nl
27979:delim
27980h
d0ac1c44 27981s/\(.\{148\}\)..*/\1/
c971b7fa
PA
27982t more2
27983s/["\\]/\\&/g; s/^/"/; s/$/"/
27984p
27985b
27986:more2
27987s/["\\]/\\&/g; s/^/"/; s/$/"\\/
27988p
27989g
27990s/.\{148\}//
27991t delim
27992' <conf$$subs.awk | sed '
27993/^[^""]/{
27994 N
27995 s/\n//
27996}
27997' >>$CONFIG_STATUS || ac_write_fail=1
27998rm -f conf$$subs.awk
27999cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28000_ACAWK
d0ac1c44 28001cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
c971b7fa
PA
28002 for (key in S) S_is_set[key] = 1
28003 FS = "\a"
28004
28005}
28006{
28007 line = $ 0
28008 nfields = split(line, field, "@")
28009 substed = 0
28010 len = length(field[1])
28011 for (i = 2; i < nfields; i++) {
28012 key = field[i]
28013 keylen = length(key)
28014 if (S_is_set[key]) {
28015 value = S[key]
28016 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
28017 len += length(value) + length(field[++i])
28018 substed = 1
28019 } else
28020 len += 1 + keylen
28021 }
28022
28023 print line
28024}
28025
28026_ACAWK
28027_ACEOF
28028cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28029if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
28030 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
28031else
28032 cat
d0ac1c44
SM
28033fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
28034 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
c971b7fa
PA
28035_ACEOF
28036
d0ac1c44
SM
28037# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
28038# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
c971b7fa
PA
28039# trailing colons and then remove the whole line if VPATH becomes empty
28040# (actually we leave an empty line to preserve line numbers).
28041if test "x$srcdir" = x.; then
d0ac1c44
SM
28042 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
28043h
28044s///
28045s/^/:/
28046s/[ ]*$/:/
28047s/:\$(srcdir):/:/g
28048s/:\${srcdir}:/:/g
28049s/:@srcdir@:/:/g
28050s/^:*//
c971b7fa 28051s/:*$//
d0ac1c44
SM
28052x
28053s/\(=[ ]*\).*/\1/
28054G
28055s/\n//
c971b7fa
PA
28056s/^[^=]*=[ ]*$//
28057}'
28058fi
28059
28060cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28061fi # test -n "$CONFIG_FILES"
28062
28063# Set up the scripts for CONFIG_HEADERS section.
28064# No need to generate them if there are no CONFIG_HEADERS.
28065# This happens for instance with `./config.status Makefile'.
28066if test -n "$CONFIG_HEADERS"; then
d0ac1c44 28067cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
c971b7fa
PA
28068BEGIN {
28069_ACEOF
28070
28071# Transform confdefs.h into an awk script `defines.awk', embedded as
28072# here-document in config.status, that substitutes the proper values into
28073# config.h.in to produce config.h.
28074
28075# Create a delimiter string that does not exist in confdefs.h, to ease
28076# handling of long lines.
28077ac_delim='%!_!# '
28078for ac_last_try in false false :; do
d0ac1c44
SM
28079 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
28080 if test -z "$ac_tt"; then
c971b7fa
PA
28081 break
28082 elif $ac_last_try; then
d0ac1c44 28083 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
c971b7fa
PA
28084 else
28085 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28086 fi
28087done
28088
28089# For the awk script, D is an array of macro values keyed by name,
28090# likewise P contains macro parameters if any. Preserve backslash
28091# newline sequences.
28092
28093ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28094sed -n '
28095s/.\{148\}/&'"$ac_delim"'/g
28096t rset
28097:rset
28098s/^[ ]*#[ ]*define[ ][ ]*/ /
28099t def
28100d
28101:def
28102s/\\$//
28103t bsnl
28104s/["\\]/\\&/g
28105s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
28106D["\1"]=" \3"/p
28107s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
28108d
28109:bsnl
28110s/["\\]/\\&/g
28111s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
28112D["\1"]=" \3\\\\\\n"\\/p
28113t cont
28114s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
28115t cont
28116d
28117:cont
28118n
28119s/.\{148\}/&'"$ac_delim"'/g
28120t clear
28121:clear
28122s/\\$//
28123t bsnlc
28124s/["\\]/\\&/g; s/^/"/; s/$/"/p
28125d
28126:bsnlc
28127s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
28128b cont
28129' <confdefs.h | sed '
28130s/'"$ac_delim"'/"\\\
28131"/g' >>$CONFIG_STATUS || ac_write_fail=1
28132
28133cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28134 for (key in D) D_is_set[key] = 1
28135 FS = "\a"
28136}
28137/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
28138 line = \$ 0
28139 split(line, arg, " ")
28140 if (arg[1] == "#") {
28141 defundef = arg[2]
28142 mac1 = arg[3]
28143 } else {
28144 defundef = substr(arg[1], 2)
28145 mac1 = arg[2]
28146 }
28147 split(mac1, mac2, "(") #)
28148 macro = mac2[1]
28149 prefix = substr(line, 1, index(line, defundef) - 1)
28150 if (D_is_set[macro]) {
28151 # Preserve the white space surrounding the "#".
28152 print prefix "define", macro P[macro] D[macro]
28153 next
28154 } else {
28155 # Replace #undef with comments. This is necessary, for example,
28156 # in the case of _POSIX_SOURCE, which is predefined and required
28157 # on some systems where configure will not decide to define it.
28158 if (defundef == "undef") {
28159 print "/*", prefix defundef, macro, "*/"
28160 next
28161 }
28162 }
28163}
28164{ print }
28165_ACAWK
28166_ACEOF
28167cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 28168 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
c971b7fa
PA
28169fi # test -n "$CONFIG_HEADERS"
28170
28171
28172eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
28173shift
28174for ac_tag
28175do
28176 case $ac_tag in
28177 :[FHLC]) ac_mode=$ac_tag; continue;;
28178 esac
28179 case $ac_mode$ac_tag in
28180 :[FHL]*:*);;
d0ac1c44 28181 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
c971b7fa
PA
28182 :[FH]-) ac_tag=-:-;;
28183 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28184 esac
28185 ac_save_IFS=$IFS
28186 IFS=:
28187 set x $ac_tag
28188 IFS=$ac_save_IFS
28189 shift
28190 ac_file=$1
28191 shift
28192
28193 case $ac_mode in
28194 :L) ac_source=$1;;
28195 :[FH])
28196 ac_file_inputs=
28197 for ac_f
28198 do
28199 case $ac_f in
d0ac1c44 28200 -) ac_f="$ac_tmp/stdin";;
c971b7fa
PA
28201 *) # Look for the file first in the build tree, then in the source tree
28202 # (if the path is not absolute). The absolute path cannot be DOS-style,
28203 # because $ac_f cannot contain `:'.
28204 test -f "$ac_f" ||
28205 case $ac_f in
28206 [\\/$]*) false;;
28207 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28208 esac ||
d0ac1c44 28209 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
c971b7fa
PA
28210 esac
28211 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
28212 as_fn_append ac_file_inputs " '$ac_f'"
28213 done
28214
28215 # Let's still pretend it is `configure' which instantiates (i.e., don't
28216 # use $as_me), people would be surprised to read:
28217 # /* config.h. Generated by config.status. */
28218 configure_input='Generated from '`
28219 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
28220 `' by configure.'
28221 if test x"$ac_file" != x-; then
28222 configure_input="$ac_file. $configure_input"
28223 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
28224$as_echo "$as_me: creating $ac_file" >&6;}
28225 fi
28226 # Neutralize special characters interpreted by sed in replacement strings.
28227 case $configure_input in #(
28228 *\&* | *\|* | *\\* )
28229 ac_sed_conf_input=`$as_echo "$configure_input" |
28230 sed 's/[\\\\&|]/\\\\&/g'`;; #(
28231 *) ac_sed_conf_input=$configure_input;;
28232 esac
28233
28234 case $ac_tag in
d0ac1c44
SM
28235 *:-:* | *:-) cat >"$ac_tmp/stdin" \
28236 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
c971b7fa
PA
28237 esac
28238 ;;
28239 esac
28240
28241 ac_dir=`$as_dirname -- "$ac_file" ||
28242$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28243 X"$ac_file" : 'X\(//\)[^/]' \| \
28244 X"$ac_file" : 'X\(//\)$' \| \
28245 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
28246$as_echo X"$ac_file" |
28247 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28248 s//\1/
28249 q
28250 }
28251 /^X\(\/\/\)[^/].*/{
28252 s//\1/
28253 q
28254 }
28255 /^X\(\/\/\)$/{
28256 s//\1/
28257 q
28258 }
28259 /^X\(\/\).*/{
28260 s//\1/
28261 q
28262 }
28263 s/.*/./; q'`
28264 as_dir="$ac_dir"; as_fn_mkdir_p
28265 ac_builddir=.
28266
28267case "$ac_dir" in
28268.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28269*)
28270 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
28271 # A ".." for each directory in $ac_dir_suffix.
28272 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
28273 case $ac_top_builddir_sub in
28274 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28275 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28276 esac ;;
28277esac
28278ac_abs_top_builddir=$ac_pwd
28279ac_abs_builddir=$ac_pwd$ac_dir_suffix
28280# for backward compatibility:
28281ac_top_builddir=$ac_top_build_prefix
28282
28283case $srcdir in
28284 .) # We are building in place.
28285 ac_srcdir=.
28286 ac_top_srcdir=$ac_top_builddir_sub
28287 ac_abs_top_srcdir=$ac_pwd ;;
28288 [\\/]* | ?:[\\/]* ) # Absolute name.
28289 ac_srcdir=$srcdir$ac_dir_suffix;
28290 ac_top_srcdir=$srcdir
28291 ac_abs_top_srcdir=$srcdir ;;
28292 *) # Relative name.
28293 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28294 ac_top_srcdir=$ac_top_build_prefix$srcdir
28295 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
28296esac
28297ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
28298
28299
28300 case $ac_mode in
28301 :F)
28302 #
28303 # CONFIG_FILE
28304 #
28305
28306 case $INSTALL in
28307 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
28308 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
28309 esac
28310 ac_MKDIR_P=$MKDIR_P
28311 case $MKDIR_P in
28312 [\\/$]* | ?:[\\/]* ) ;;
28313 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
28314 esac
28315_ACEOF
28316
28317cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28318# If the template does not know about datarootdir, expand it.
28319# FIXME: This hack should be removed a few years after 2.60.
28320ac_datarootdir_hack=; ac_datarootdir_seen=
28321ac_sed_dataroot='
28322/datarootdir/ {
28323 p
28324 q
28325}
28326/@datadir@/p
28327/@docdir@/p
28328/@infodir@/p
28329/@localedir@/p
28330/@mandir@/p'
28331case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
28332*datarootdir*) ac_datarootdir_seen=yes;;
28333*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
28334 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28335$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
28336_ACEOF
28337cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28338 ac_datarootdir_hack='
28339 s&@datadir@&$datadir&g
28340 s&@docdir@&$docdir&g
28341 s&@infodir@&$infodir&g
28342 s&@localedir@&$localedir&g
28343 s&@mandir@&$mandir&g
28344 s&\\\${datarootdir}&$datarootdir&g' ;;
28345esac
28346_ACEOF
28347
28348# Neutralize VPATH when `$srcdir' = `.'.
28349# Shell code in configure.ac might set extrasub.
28350# FIXME: do we really want to maintain this feature?
28351cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28352ac_sed_extra="$ac_vpsub
28353$extrasub
28354_ACEOF
28355cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28356:t
28357/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
28358s|@configure_input@|$ac_sed_conf_input|;t t
28359s&@top_builddir@&$ac_top_builddir_sub&;t t
28360s&@top_build_prefix@&$ac_top_build_prefix&;t t
28361s&@srcdir@&$ac_srcdir&;t t
28362s&@abs_srcdir@&$ac_abs_srcdir&;t t
28363s&@top_srcdir@&$ac_top_srcdir&;t t
28364s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28365s&@builddir@&$ac_builddir&;t t
28366s&@abs_builddir@&$ac_abs_builddir&;t t
28367s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28368s&@INSTALL@&$ac_INSTALL&;t t
28369s&@MKDIR_P@&$ac_MKDIR_P&;t t
28370$ac_datarootdir_hack
28371"
d0ac1c44
SM
28372eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
28373 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
c971b7fa
PA
28374
28375test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
28376 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
28377 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
28378 "$ac_tmp/out"`; test -z "$ac_out"; } &&
c971b7fa 28379 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 28380which seems to be undefined. Please make sure it is defined" >&5
c971b7fa 28381$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 28382which seems to be undefined. Please make sure it is defined" >&2;}
c971b7fa 28383
d0ac1c44 28384 rm -f "$ac_tmp/stdin"
c971b7fa 28385 case $ac_file in
d0ac1c44
SM
28386 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
28387 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
c971b7fa 28388 esac \
d0ac1c44 28389 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
c971b7fa
PA
28390 ;;
28391 :H)
28392 #
28393 # CONFIG_HEADER
28394 #
28395 if test x"$ac_file" != x-; then
28396 {
28397 $as_echo "/* $configure_input */" \
d0ac1c44
SM
28398 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
28399 } >"$ac_tmp/config.h" \
28400 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
28401 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
c971b7fa
PA
28402 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
28403$as_echo "$as_me: $ac_file is unchanged" >&6;}
28404 else
28405 rm -f "$ac_file"
d0ac1c44
SM
28406 mv "$ac_tmp/config.h" "$ac_file" \
28407 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
c971b7fa
PA
28408 fi
28409 else
28410 $as_echo "/* $configure_input */" \
d0ac1c44
SM
28411 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
28412 || as_fn_error $? "could not create -" "$LINENO" 5
c971b7fa
PA
28413 fi
28414# Compute "$ac_file"'s index in $config_headers.
28415_am_arg="$ac_file"
28416_am_stamp_count=1
28417for _am_header in $config_headers :; do
28418 case $_am_header in
28419 $_am_arg | $_am_arg:* )
28420 break ;;
28421 * )
28422 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
28423 esac
28424done
28425echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
28426$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28427 X"$_am_arg" : 'X\(//\)[^/]' \| \
28428 X"$_am_arg" : 'X\(//\)$' \| \
28429 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
28430$as_echo X"$_am_arg" |
28431 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28432 s//\1/
28433 q
28434 }
28435 /^X\(\/\/\)[^/].*/{
28436 s//\1/
28437 q
28438 }
28439 /^X\(\/\/\)$/{
28440 s//\1/
28441 q
28442 }
28443 /^X\(\/\).*/{
28444 s//\1/
28445 q
28446 }
28447 s/.*/./; q'`/stamp-h$_am_stamp_count
28448 ;;
28449
28450 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
28451$as_echo "$as_me: executing $ac_file commands" >&6;}
28452 ;;
28453 esac
28454
28455
28456 case $ac_file$ac_mode in
28457 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
d0ac1c44 28458 # Older Autoconf quotes --file arguments for eval, but not when files
c971b7fa
PA
28459 # are listed without --file. Let's play safe and only enable the eval
28460 # if we detect the quoting.
28461 case $CONFIG_FILES in
28462 *\'*) eval set x "$CONFIG_FILES" ;;
28463 *) set x $CONFIG_FILES ;;
28464 esac
28465 shift
28466 for mf
28467 do
28468 # Strip MF so we end up with the name of the file.
28469 mf=`echo "$mf" | sed -e 's/:.*$//'`
28470 # Check whether this is an Automake generated Makefile or not.
d0ac1c44 28471 # We used to match only the files named 'Makefile.in', but
c971b7fa
PA
28472 # some people rename them; so instead we look at the file content.
28473 # Grep'ing the first line is not enough: some people post-process
28474 # each Makefile.in and add a new line on top of each file to say so.
28475 # Grep'ing the whole file is not good either: AIX grep has a line
28476 # limit of 2048, but all sed's we know have understand at least 4000.
28477 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
28478 dirpart=`$as_dirname -- "$mf" ||
28479$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28480 X"$mf" : 'X\(//\)[^/]' \| \
28481 X"$mf" : 'X\(//\)$' \| \
28482 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
28483$as_echo X"$mf" |
28484 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28485 s//\1/
28486 q
28487 }
28488 /^X\(\/\/\)[^/].*/{
28489 s//\1/
28490 q
28491 }
28492 /^X\(\/\/\)$/{
28493 s//\1/
28494 q
28495 }
28496 /^X\(\/\).*/{
28497 s//\1/
28498 q
28499 }
28500 s/.*/./; q'`
28501 else
28502 continue
28503 fi
28504 # Extract the definition of DEPDIR, am__include, and am__quote
d0ac1c44 28505 # from the Makefile without running 'make'.
c971b7fa
PA
28506 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
28507 test -z "$DEPDIR" && continue
28508 am__include=`sed -n 's/^am__include = //p' < "$mf"`
d0ac1c44 28509 test -z "$am__include" && continue
c971b7fa 28510 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
c971b7fa
PA
28511 # Find all dependency output files, they are included files with
28512 # $(DEPDIR) in their names. We invoke sed twice because it is the
28513 # simplest approach to changing $(DEPDIR) to its actual value in the
28514 # expansion.
28515 for file in `sed -n "
28516 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
d0ac1c44 28517 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
c971b7fa
PA
28518 # Make sure the directory exists.
28519 test -f "$dirpart/$file" && continue
28520 fdir=`$as_dirname -- "$file" ||
28521$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28522 X"$file" : 'X\(//\)[^/]' \| \
28523 X"$file" : 'X\(//\)$' \| \
28524 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
28525$as_echo X"$file" |
28526 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28527 s//\1/
28528 q
28529 }
28530 /^X\(\/\/\)[^/].*/{
28531 s//\1/
28532 q
28533 }
28534 /^X\(\/\/\)$/{
28535 s//\1/
28536 q
28537 }
28538 /^X\(\/\).*/{
28539 s//\1/
28540 q
28541 }
28542 s/.*/./; q'`
28543 as_dir=$dirpart/$fdir; as_fn_mkdir_p
28544 # echo "creating $dirpart/$file"
28545 echo '# dummy' > "$dirpart/$file"
28546 done
28547 done
28548}
28549 ;;
28550 "default":C)
28551case x$CONFIG_HEADERS in
28552xconfig.h:config.in)
28553echo > stamp-h ;;
28554esac
28555 ;;
28556
28557 esac
28558done # for ac_tag
28559
28560
28561as_fn_exit 0
28562_ACEOF
28563ac_clean_files=$ac_clean_files_save
28564
28565test $ac_write_fail = 0 ||
d0ac1c44 28566 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
c971b7fa
PA
28567
28568
28569# configure is writing to config.log, and then calls config.status.
28570# config.status does its own redirection, appending to config.log.
28571# Unfortunately, on DOS this fails, as config.log is still kept open
28572# by configure, so config.status won't be able to write to it; its
28573# output is simply discarded. So we exec the FD to /dev/null,
28574# effectively closing config.log, so it can be properly (re)opened and
28575# appended to by config.status. When coming back to configure, we
28576# need to make the FD available again.
28577if test "$no_create" != yes; then
28578 ac_cs_success=:
28579 ac_config_status_args=
28580 test "$silent" = yes &&
28581 ac_config_status_args="$ac_config_status_args --quiet"
28582 exec 5>/dev/null
28583 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
28584 exec 5>>config.log
28585 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28586 # would make configure fail if this is the last instruction.
d0ac1c44 28587 $ac_cs_success || as_fn_exit 1
c971b7fa
PA
28588fi
28589if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
28590 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
28591$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
28592fi
28593
28594
28595exit 0
This page took 3.287138 seconds and 4 git commands to generate.